title: booktabs-de from texlive-lang-german not installed in debian wheezy

text: I have debian wheezy with packaged texlive (TeX Live 2012/Debian) and want to use the package `booktabs-de` from the apt-package texlive-lang-german. The debian apt installation of that package ran fine.   I'm wondering, why it is not really installed (into the tds). Please have a look at those lines               apt-file show texlive-lang-german | grep  booktabs     texlive-lang-german: /usr/share/doc/texlive-doc/latex/booktabs-de/README-DE     texlive-lang-german: /usr/share/doc/texlive-doc/latex/booktabs-de/booktabs-de.dtx.gz     texlive-lang-german: /usr/share/doc/texlive-doc/latex/booktabs-de/booktabs-de.ins     texlive-lang-german: /usr/share/doc/texlive-doc/latex/booktabs-de/booktabs-de.pdf     texlive-lang-german: /usr/share/doc/texlive-lang-german/latex/booktabs-de/README-DE     texlive-lang-german: /usr/share/doc/texlive-lang-german/latex/booktabs-de/booktabs-de.dtx.gz     texlive-lang-german: /usr/share/doc/texlive-lang-german/latex/booktabs-de/booktabs-de.ins     texlive-lang-german: /usr/share/doc/texlive-lang-german/latex/booktabs-de/booktabs-de.pdf      meaning the package contains it - but it is not installed as the following lines show:               find / -name 'booktabs*.sty'     /usr/share/texlive/texmf-dist/tex/latex/booktabs/booktabs.sty      Okay, I can run the .ins-file and move the results - but shouldn't that be done already by the installer? Is this a debian bug? If, feel free to move this question into the right forum. Thanks.


title: biblatex: remove comma after last author only in book

text: I am using biblatex with the biber backend and the chem-acs style. For journals and inproceedings, the author list is printed followed by the title; however, for books and book chapters, there is a comma after the last author. I'd like to get rid of that extra comma. For an MWE, please see below. So far, I read some solutions to similar questions. Both remove comma after the last author and Need to remove comma after last author (only) seem to work on manually created .bst files, and I would like to use the chem-acs style. In the question Colon (:) instead of period (.) after author with biblatex, alphabetic, a quite nice solution is given by               \renewcommand{\labelnamepunct}{\addcolon\space}      However, it seems that this only applies to journals and not to my "problematic" book types. One solution seems to be to complete redefine the bibliograpy driver for book, but I'd like to circumvent that, because I only want to remove a single comma. I had a look into the `chem-acs.bbx` file, and found the following definition:               \DeclareBibliographyDriver{book}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/translator+others}%       \setunit{\labelnamepunct}\newblock       \usebibmacro{maintitle+title}%     (...)     }      I noticed that if I comment out the line `\setunit{\labelnamepunct}\newblock`, the comma stays. So I think it is defined somewhere inside the bibmacro for `author/translator+others`. However, I have no clue how to redefine that macro in a reasonable fashion, and to my best knowledge it is also not possible to redefine it only for types other than journal. Here the MWE: .tex file:               \documentclass{standalone}          \usepackage[style=chem-acs,articletitle,chaptertitle,backend=biber]{biblatex}     \addbibresource{mwe.bib}          \begin{document}            Some journals: \cite{Agrafiotis2000,Agrafiotis2003}       A book, chapter, and inproceeding: \cite{Ozgur2005,Alpaydin2010,Joachims1999}            \printbibliography          \end{document}      .bib file:               @INPROCEEDINGS{Ozgur2005,       author = {{\"O}zg{\"u}r, Arzucan and {\"O}zg{\"u}r, Levent and G{\"u}ng{\"o}r,     Tunga},       title = {{Text Categorization with Class-Based and Corpus-Based Keyword Selection}},       booktitle = {Proceedings of the 20th International Conference on Computer and     Information Sciences},       year = {2005},       pages = {606-615},     }          @ARTICLE{Agrafiotis2000,       author = {Dimitris K. Agrafiotis and Victor S. Lobanov},       title = {{Nonlinear Mapping Networks}},       journal = {Journal of Chemical Information and Computer Sciences},       year = {2000},       volume = {40},       number = {6},       pages = {1356-1362},     }          @ARTICLE{Agrafiotis2003,       author = {Dimitris K. Agrafiotis and Huafeng Xu},       title = {{A Geodesic Framework for Analyzing Molecular Similarities}},       journal = {Journal of Chemical Information and Computer Sciences},       year = {2003},       volume = {43},       number = {2},       pages = {475-484},     }          @BOOK{Alpaydin2010,       title = {{Introduction to Machine Learning}},       publisher = {MIT Press},       year = {2010},       author = {Ethem Alpaydin},       edition = {2nd},     }          @INBOOK{Joachims1999,       chapter = {{Making Large-Scale Support Vector Machine Learning Practical}},       pages = {169-184},       title = {{Advances in Kernel Methods}},       publisher = {MIT Press},       year = {1999},       editor = {Sch{\"o}lkopf, Bernhard and Burges, Christopher J. C. and Smola,     Alexander J.},       author = {Joachims, Thorsten},     }      ![Output: refs \(4\) and \(5\) contain commas after the authors](http://i.stack.imgur.com/qD2Ta.png)


title: Beamer with Tikz graphs

text: Following this question of mine, I now need to make a presentation using Beamer. If you look at the plot below, it has some values on the arrows namely p1, 1-p1, ... I want to put the graph structure first and then when pressing the arrow key get the values showing one by one.   Just writing `\pause` in front of the nodes doesn't work, that would have been too simple. I don't know how to make it happen, anyone help?               \documentclass{beamer}          \usepackage{tikz}     \usepackage{amssymb}     \usetikzlibrary{arrows,positioning}     \usepackage[english]{babel}     \usepackage{amsmath}          \begin{document}     \begin{frame}     \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.5cm,                     thick,main node/.style={rectangle,draw,font=\sffamily\Large    \bfseries}]            \node[main node] (1) {1};     \node[main node] (2) [below = of 1] {2};     \node[main node] (3) [below = of 2] {3};     \node[main node,draw = none] (4) [right = 2in of 1] {$\varnothing$};     \node[main node,draw = none] (5) [right = 2in of 2] {$\varnothing$};     \node[main node,draw = none] (6) [right = 2in of 3] {$\varnothing$};          \path[every node/.style={font=\sffamily\small}]     (1) edge node [left] {$p_1$} (2)         edge node [above] {$1-p_1$} (4)     (2) edge node [left] {$p_2$} (3)         edge node [above] {$1-p_2$} (5)     (3)   edge node [above] {$1-p_3$} (6);     \path[draw,every node/.style={font=\sffamily\small}]     (3.west) -- ([xshift=-2cm]3.west) -- ([xshift=-2cm]1.west) node [midway,left] {$p_3$} -- (1.west);      \end{tikzpicture}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Ga9UX.png)


title: New \left \right delimiters

text: Can I introduce new delimiter symbols to use with `\left` and `\right`? For example I would like to do               \begin{equation}     \left\harpoonleft something \right\harpoonright     \end{equation}      I would then like the size of the symbols to be dependent on the size of `something` between the symbols. How would I do such a thing?


title: Auto-generating tables using etoolbox

text: I have a particular problem which I am trying to solve using `etoolbox`, but I can't figure out how. What I'm trying to do is to auto-generate a table based on information from a previous table. This is best explained with an example:               \newcounter{numc}     \setcounter{numc}{0}     \newcolumntype{n}{>{\thenumc.}r<{\addtocounter{numc}{1}}}     % This is simply a column displaying the row number.          \newrobustcmd{\push}[1]{\listadd{\numcount}{\thenumc} \listadd{\ncom}{#1}}     % This command may have to be defined differently, depending on the missing code below.          \begin{xtabular}{ n l l }       & row1,col2    & row1,col3 \\       & row2,col2    & row2,col3 \\ \push{Comment for row 2.}       & row3,col2    & row3,col3 \\        & row4,col2    & row4,col3 \\ \push{Comment for row 4.}       & row5,col2    & row5,col3 \\ \push{Comment for row 5.}     \end{xtabular}          \begin{xtabular}{ r l }     % The code for auto-generating the second table goes here.     % The first column is supposed to be the values in the numcount list, minus 1.     % The second column is supposed to be the text in the ncom list.     \end{xtabular}      So the output is intended to be as follows: Table 1:               1.   row1,col2   row1,col3     2.   row2,col2   row2,col3     3.   row3,col2   row3,col3     4.   row4,col2   row4,col3     5.   row5,col2   row5,col3      Table 2:               2.   Comment for row 2.     4.   Comment for row 4.     5.   Comment for row 5.      However, I can't find a good solution for the missing code in the second table. The code should generate the first column from the first list (`numcount`), and the second column from the second list (`ncom`). Do you have any suggestions to how I can solve this?


title: How to make the main file recognize relative paths used in the imported files?

text: I'm currently using doxygen to generate some documentation for a project, and doxygen generate some LaTeX code that then can be used to generate a nice pdf. But let's say I would like to write another document, and in that document include the doxygen generated LaTeX code as a part of that document. How would I do that? Has anybody done this type of stuff? * * * My try is to get the code, generate the LaTeX code without the "header". So I end up with a dir called `code/doc/latex/`, seen from the place where I have my own `main.tex`. And try in include that LaTeX code from my `main.tex` with input.               \input{ code/doc/latex/refman.tex }      But when I try to include the `code/doc/latex/refman.tex` (the doxygen, main.tex), he complains that he can't find the other LaTeX files that was generated by doxygen. It seems like he is searching in the same dir as my main.tex and not in `code/doc/latex/`. This is more or less how the `refman.tex` looks like:               \chapter{Todo List}     \label{todo}     \hypertarget{todo}{}     \input{todo}     \chapter{Class Index}     \input{annotated}     \chapter{File Index}     \input{files}     \chapter{Class Documentation}     \include{struct__offsetChannel}     \include{struct__offsetPixel}     \include{struct__tPixel}     ...     ...      Any ideas would be welcome. A solution could be to write a script that edits all the generated LaTeX code, and simply adds this path but this seems like a overly complicated solution. * * * _Update_ : The error I get is like this one               ! LaTeX Error: File `todo.tex' not found.      * * * _Update_ : If I change all the `\input` `\include` and `\includegraphics` like this it works.               \input{todo} -> \input{code/doc/latex/todo}      But there must be a way to make LaTeX understand that he should look into the `code/doc/latex/` for the code?


title: hide console window in texshop

text: I like to work with the tex on one half of the screen and the pdf on the other. How do I hide the console window (with transcription log, error report, etc) unless there is an error? And how can I keep the focus on the tex window? That way, I command-T to see my pdf, but keep typing.


title: When is it good practice to use \unskip

text: One sees in `source2e` the command `\unskip` used in various places. My understanding in general terms is that the macro is the equivalent of `\ignorespacesbehind`. Where would it be recommended to use `\unskip`? MWE for experimentation:               \documentclass{article}     \usepackage{lipsum}     \begin{document}     \lipsum[1]     \def\test{\leavevmode \unskip test  }     \def\testa{\leavevmode test\ignorespaces  }          \test testing  \test           \testa testing  \testa test     \end{document}


title: Warning: Overfull \hbox in table

text: Consider the following example:               \documentclass{article}          \usepackage{booktabs,dcolumn}     \usepackage{siunitx}          \newcommand*\mc[1]{\multicolumn{2}{c}{Eleverne fra $9$.~#1}}          \begin{document}          \begin{table}     \def\spc{\hspace{0.8em}}     \centering      \caption{Something.}      \label{tbl:1}       \begin{tabular}{                S[table-format = 2.1]         >{\spc}S[table-format = 2]                S[table-format = 3]         >{\spc}S[table-format = 2]                S[table-format = 3]       }        \toprule         {S{\o}vnm{\ae}ngde} & \mc{A} & \mc{B}          \\        \midrule         \si{\hour} & {Abs.} & {Rel.} & {Abs.} & {Rel.} \\        \midrule          6.5       &  1\spc &   4    &  0\spc &   0    \\          7         &  4\spc &  16    &  2\spc &  10    \\          7.5       &  3\spc &  12    &  3\spc &  15    \\          8         &  8\spc &  32    &  9\spc &  45    \\          8.5       &  5\spc &  20    &  3\spc &  15    \\          9         &  2\spc &   8    &  3\spc &  15    \\          9.5       &  1\spc &   4    &  0\spc &   0    \\         10         &  1\spc &   4    &  0\spc &   0    \\        \midrule                    & 25\spc & 100    & 20\spc & 100    \\        \bottomrule       \end{tabular}     \end{table}          \end{document}      ![output](http://i.stack.imgur.com/19xtL.jpg) I get the following warning:               Overfull \hbox (8.00003pt too wide) detected at line      for lines 27--36. How do I get rit of these without changing the output layout in the table?


title: How to remove unnecessary space after flalign* environment

text: I was wondering whether it would be possible to remove some unnecessary space after `flalign*` environment. I tried using `\belowdisplayskip`, but to no avail. Below is the sample input.               {\setlength{\abovedisplayskip}{0pt}     \begin{flalign*}     x\mathbf{e}_1 + y\mathbf{e}_2 &= x\mathbf{f}_2 + y(-\mathbf{f}_1 - \mathbf{f}_2) &\\       &= -y\mathbf{f}_1 + (x-y)\mathbf{f}_2 &\\       &= w\mathbf{f}_1 + z\mathbf{f}_2  &     \end{flalign*}}     where $w = -y$ and $z = x - y$.      Here's the corresponding output: ![enter image description here](http://i.stack.imgur.com/j8N72.png)


title: Adding shadow over image

text: I'm making a `beamer` presentation and I'd like to first show an image in its true form: ![fig](http://i.stack.imgur.com/ngPDg.png) and in the next slide have it shown with a shadow over a part of it like so: ![fig_w_shadow](http://i.stack.imgur.com/o4O25.png) Is there a way to do this?


title: How to shorten/shrink spaces between words?

text: My objective is to fit more words within one line. In order to show what I mean, I will exaggerate the word spacing here: Pretend this is a normal line in the document:               Lorem   ipsum   dolor   sit   amet,   consectetuer   adipiscing   elit.      Since I want to fit more words in the same line, I would like to change the word spacing to look like:               Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Add more words.      What command will allow me to shrink the word spacing in the entire line?


title: Drawing tree canopy

text: Is it possible to draw a tree canopy in latex, possibly with `tikz`. An example: ![](http://i.stack.imgur.com/R1mkS.png) So, on the left of this image you will see a bunch of trees, can these be re- created with `tikz`?


title: Changing the table of contents

text: I'm finalizing my dissertation, and they require that the "Table of Contents - Continued" heading in the ToC (that shows if it flows onto a second page) be centered. I thought I could find the code that generates the ToC and just customize it a bit, but I can't even find what's generating it... Anybody have any ideas how I could work this out, or where the code is?


title: LaTeX3: l3keys Multiple-Choices Keys and Startup Value for Predefined Choice Integer Variable

text: In the `interface3` documentation it can be read (what follows is not a literal quotation) that the variable `\l_keys_choice_int` is available to be used as an index register for a multiple-choices key with its values starting up from `0`. Nonetheless, according to my experience with the code below, it is as though the starting value is actually `1`. This is my class, in a file insightfully called `myclass.cls`:               \RequirePackage{l3keys2e,xparse}     \ProvidesExplClass         {myclass}         {2013/08/25}         {1.0}         {myclass}          \bool_new:N  \g_myclass_enum_bool     \bool_new:N  \g_myclass_enumalt_bool          \NewDocumentCommand \SetTBool { m }      {         \bool_gset_true:c          { g_myclass_\tl_trim_spaces:n {#1} _bool}      }          \NewDocumentCommand \TypeBool { m }      { \bool_if:cTF { g_myclass_#1_bool } { T } { F } }          \keys_define:nn { myclass }      {        alter .choice_code:n =         {               \AtBeginDocument{Option ~ Index: ~ \int_use:N \l_keys_choice_int\par}                \int_compare:nNnTF { \l_keys_choice_int } =  { 1 }             { \SetTBool { enum } }             { \SetTBool { enumalt } }         },        alter .generate_choices:n = { enum, enumalt }      }          \ProcessKeysOptions { myclass }          \LoadClass{memoir}      Then I have a document file by the original name `mydoc.tex` reading thus:               \documentclass[alter = enum]{myclass}          \begin{document}     \TypeBool{enum}\par     \TypeBool{enumalt}     \end{document}      What I get in my typeset document is `1 T F`, whereas according to the documentation I should get `0 T F`. Moreover, if I set the class option `alter = enumalt`, I get `2 F T`. Am I getting something wrong?


title: chessboard: how to fit 4 pairs of diagrams in one A4 page?

text: I'm knew to TeX. Searching on the Internet, I was able to put the following code together, but the last pair of diagrams keeps generating a second page. How can I reduce the padding between minipages (or chessboards, if that's the case)?               \documentclass[10pt]{article}     \usepackage[skaknew]{chessboard,skak}     \usepackage{latexsym}     \usepackage[utf8]{inputenc}     \font\logo=logo10     \font\sknf=SkakNew-Figurine     \font\sknfbx=SkakNew-FigurineBold     \font\skndia=SkakNew-DiagramT     \def\Metafont{\mbox{\logo METAFONT}}          \usepackage{a4wide}          \usepackage{fancyhdr} % This should be set AFTER setting up the page geometry     \pagestyle{fancy} % options: empty , plain , fancy     \renewcommand{\headrulewidth}{0pt} % customise the layout...     \lhead{}\chead{}\rhead{}     \lfoot{}\cfoot{\thepage}\rfoot{}          \frenchspacing     \begin{document}          \begin{figure}[ht]     \begin{minipage}[b]{0.45\linewidth}     \chessboard[smallboard,         setfen=rnbqkbnr/pppppppp/8/8/2P5/8/PP1PPPPP/RNBQKBNR b KQkq c3 0 1,         ]     \end{minipage}     \hspace{1.3cm}     \begin{minipage}[b]{0.45\linewidth}     \chessboard[smallboard,         setfen=rnbqkb1r/pppppppp/5n2/8/2P5/8/PP1PPPPP/RNBQKBNR w KQkq - 1 2,         ]     \end{minipage}     \end{figure}          \begin{figure}[ht]     \begin{minipage}[b]{0.45\linewidth}     \chessboard[smallboard,         setfen=rnbqkb1r/pppppppp/5n2/8/2P5/2N5/PP1PPPPP/R1BQKBNR b KQkq - 2 2,         ]     \end{minipage}     \hspace{1.3cm}     \begin{minipage}[b]{0.45\linewidth}     \chessboard[smallboard,         setfen=rnbqkb1r/pp1ppppp/2p2n2/8/2P5/2N5/PP1PPPPP/R1BQKBNR w KQkq - 0 3,         ]     \end{minipage}     \end{figure}          \begin{figure}[ht]     \begin{minipage}[b]{0.45\linewidth}     \chessboard[smallboard,         setfen=rnbqkb1r/pp1ppppp/2p2n2/8/2P1P3/2N5/PP1P1PPP/R1BQKBNR b KQkq e3 0 3,         ]     \end{minipage}     \hspace{1.3cm}     \begin{minipage}[b]{0.45\linewidth}     \chessboard[smallboard,         setfen=rnbqkb1r/pp2pppp/2p2n2/3p4/2P1P3/2N5/PP1P1PPP/R1BQKBNR w KQkq d6 0 4,         ]     \end{minipage}     \end{figure}          \begin{figure}[ht]     \begin{minipage}[b]{0.45\linewidth}     \chessboard[smallboard,         setfen=rnbqkb1r/pp2pppp/2p2n2/3pP3/2P5/2N5/PP1P1PPP/R1BQKBNR b KQkq - 0 4,         ]     \end{minipage}     \hspace{1.3cm}     \begin{minipage}[b]{0.45\linewidth}     \chessboard[smallboard,         setfen=rnbqkb1r/pp2pppp/2p2n2/4P3/2Pp4/2N5/PP1P1PPP/R1BQKBNR w KQkq - 0 5,         ]     \end{minipage}     \end{figure}     \clearpage          \end{document}


title: Font size control for pifont characters

text: ![enter image description here](http://i.stack.imgur.com/Z6v9R.png) How can I enlarge the font size of pifont characters? I tried to use `\large{\ding{204}}`, but it doesn't work.


title: How to control figure numbering in Lyx

text: I have a single figure in a Lyx document, and it is part of a paragraph which itself is part of a section. It is expected that Lyx will produce a caption for it as 'Figure 1: ....', however, the actual output I get is 'Figure 0.1: ...'. I don't think I explicitly ask Lyx to number the figures by section. Any clue on why this happens and how I can fix it? In addition, is it possible to eliminate the numbering of captions (not the captions themselves) all together? Many thanks. P.S. The document class I am using is 'handout (Tufte)' and the paragraph (which itself is of standard text) containing the figure is after two itemized paragraphs, if those make any difference.


title: Table with all numbers in millions

text: What is the proposed way to set numbers in tables which are all in the millions? None of the numbers has a significant digit smaller than 1,000. Since it is a rather large table, I want to get rid off all those `,000` trailing each number.               \documentclass{article}          \usepackage{booktabs}          \begin{document}     \begin{tabular}{lrrrr}         \toprule         Category & Col A & Col B &  Col C & \dots\\          \midrule         Line 1 & 18,855,000 & 13,870,000 & 1,235,000 & \dots\\         \addlinespace         Line 2\\         \quad Item 2--1 & 10,280,000 & 7,519,000 & 650,000 & \dots\\         \quad Item 2--2 & 8,575,000 & 6,351,000 & 585,000 & \dots\\         \dots\\         \bottomrule     \end{tabular}          \end{document}      ![enter image description here](http://i.stack.imgur.com/1MJEY.png)


title: Automatic update for pdf with Kile

text: How can I achieve that Kile updates the pdf automatically in certain intervals? Version: Kile 2.1.3 on Ubuntu 13.10


title: Breadcrumb hyperlink header

text: I wish to put breadcrumb navigation with hyperlinks into the header of each page. Clicking on each part, chapter, section will take you to the beginning of that part/chapter/section. I'm already using `hyperref` to link the ToC.


title: How to make multiple lines in ToC horizontally align?

text: For single line, the content aligned nicely, but that's not the case when the it contains multiple lines. The alignment is odd: ![enter image description here](http://i.stack.imgur.com/MFcaU.png) So how can I make them align nicely? **Mimimum Example**               \documentclass[10pt,letterpaper]{article}     \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}      \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \setcounter{tocdepth}{3}     \setcounter{secnumdepth}{3}     \usepackage[bookmarksopen,bookmarksdepth=3]{hyperref}     \usepackage{titlesec}     \usepackage{xcolor}          %define new colors     \definecolor{dark-red}{rgb}{0.4,0.15,0.15}     \definecolor{dark-blue}{rgb}{0.15,0.15,0.4}     \definecolor{medium-blue}{rgb}{0,0,0.5}          %set up color for table of contents     \hypersetup{         colorlinks, linkcolor={medium-blue},         citecolor={dark-blue}, urlcolor={medium-blue}     }          \usepackage{tocloft}          %preven linebreak between subsection header and its content     \usepackage{titlesec}     \titleformat{\subsection}[runin]{\normalfont\bfseries}{\thesubsection.}{3pt}{}     \titleformat{\section}[runin]{\normalfont\bfseries}{\thesection.}{3pt}{}          \begin{document}          \setlength{\cftsecnumwidth}{8em} % Set numwidth of section     \setlength{\cftsubsecnumwidth}{12em} % Make subsection numwidth the same as section     \setlength{\cftsubsecindent}{\cftsecindent} % Make subsection indent the same as section          \tableofcontents      \setlength{\parindent}{0pt}     \setlength{\parskip}{1ex}              \newpage         \phantomsection         \section*{Problem 4.}         \addcontentsline{toc}{section}         {             \numberline{Problem 4.}Let $T$ be a tree with $n > 1$ nodes. What is the maximum number of degrees one vertex $T$ can have?             What his the minimum number of degree one vertex $T$ can have? Justify both answers.         }         Something     \end{document}


title: Lower right corner symbol – like _|

text: I just wonder what the code for the symbol _| is. (The symbol besides v in the picture below.) ![enter image description here](http://i.stack.imgur.com/OQOoM.jpg) Thanks a lot.


title: How to uncommand a piece of LaTeX document in plasTeX?

text: I need to get text and math expressions (ignoring tables, pictures and styling) from a set of LaTeX documents and represent them in html. Looks like plasTeX and MathJaX are enough for this task. As I understand, after plasTeX parsed the document I just need to get all text nodes of the document and all nodes with math, and for math nodes I try to get their LaTeX source. And the question is if there is a possibility in plasTeX to get LaTeX source of a math expression with all the commands already applied.


title: Biblatex breakline Doi

text: I'm using the XeTeX with BibLaTeX and biber. That's the line:               \usepackage[backend=biber, citestyle=authoryear-ibid, bibstyle=authortitle-ibid]{biblatex}       It's working fine but I'e just get one problem with one of the DOI as you can see. The "x" on the last line looks quite stupid. How can I avoid it? ![Example of the problem](http://i.stack.imgur.com/UQH9h.png)


title: No transparency in TikZ pictures including external PDF graphics in XeLaTeX

text: I was trying to create a tikzpicture environment which includes external graphics (as a PDF). The external graphics should be translucent, so I used the _opacity_ parameter. Using pdfLaTeX it works as expected, but under XeLaTeX (which I need for other reasons) there is no transparency. After checking some more, it appears to work fine under XeLaTeX for JPGs and (more importantly) EPS. If no more elegant solution can be found, I can use EPS graphics instead of PDF. But maybe there is a magical definition I can put in the header to fix this? Here is the MWE:               \documentclass{article}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}% Regular figure         {\node{\includegraphics{pdfgraphics.pdf}};}     \end{tikzpicture}%          \begin{tikzpicture}% Pale figure         {\node[opacity=0.3] {\includegraphics{pdfgraphics.pdf}};}     \end{tikzpicture}%          \end{document}      And here are the results when using both engines: ![results when using both engines:](http://i.stack.imgur.com/1LaFM.png)


title: LuaTeX cannot find existing TTF font

text: Using `lualatex`, I get the following error:               </usr/local/share/fonts/HoodHeaven Ornaments Two SSi.ttf>     !LuaTeX error: cannot find OpenType font file for reading ()      ==> Fatal error occurred, no output PDF file produced!      The file is present and readable:               $ otfinfo -i "/usr/local/share/fonts/HoodHeaven Ornaments Two SSi.ttf"     Family:              HoodHeaven Ornaments Two SSi     Subfamily:           Regular     Full name:           HoodHeaven Ornaments Two SSi     PostScript name:     HoodHeavenOrnamentsTwoSSi     Version:             001.000     Unique ID:           FontMonger:HoodHeaven Ornaments Two SSi     Copyright:           Copyright c 1995 CdExpert Software, Inc. All Rights Reserved.      and the name is correct in the cache:                 {        ["familyname"]="HoodHeaven Ornaments Two SSi",        ["filename"]={ "/usr/local/share/fonts/HoodHeaven Ornaments Two SSi.ttf", false },        ["fontname"]="HoodHeavenOrnamentsTwoSSi",        ["fullname"]="HoodHeaven Ornaments Two SSi",        ["names"]={         ["family"]="HoodHeaven Ornaments Two SSi",         ["fullname"]="HoodHeaven Ornaments Two SSi",         ["psname"]="HoodHeavenOrnamentsTwoSSi",         ["subfamily"]="Regular",        },        ["size"]={},        ["slant"]=0,        ["weight"]=400,        ["width"]=5,       },      What could be going wrong?


title: Multiple evaluation of a macro argument with side effects?

text: In C, preprocessor macros can have unexpected effects because their arguments can be evaluated multiple times. For example, the following code:               #define MAX(a,b) ((a)>(b) ? (a) : (b))     int i = 5, j = MAX(i++, 0);      becomes:               int i = 5, j = ((i++)>(0) ? (i++) : (0));      and the variable `i` will have the value 7--not 6 as expected--because the macro's arguments are repeated in the macro definition. Does LaTeX have similar issues? For example, what would happen in the following:               \newcommand{\foo}[1]{#1 #1}     \foo{\somethingwithsideeffects}      Would the side effects happen twice? If so, how can that be avoided? Can `\edef` be cleverly used to cause side effects to happen only once? Or `\sbox` (assuming the argument is something you want boxed)? Or maybe some way to automatically remove tokens that have side effects from `#1`? Is this a problem in practice?


title: Drawing a figure with concentric circles with text and shading

text: I am trying to draw the below given figure. Please help me to plot it in Tikz. I am only able to plot concentric circles. ![Concentric Cirlces](http://i.stack.imgur.com/MIWRG.jpg). I would like to have different colors in between different circles. Also, the text should be along the curve. The arrow in between the two concentric circles does not have to overlap with the circle on the right hand side. I would be grateful if you could help me in plotting this in Tikz. Please let me know if you need more information. Thanks!               \documentclass[conference]{IEEEtran}          \ifCLASSINFOpdf          \else          \fi          \usepackage[usenames,dvipsnames]{color}     \usepackage[T1]{fontenc}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{arrows}     \usetikzlibrary{shapes.multipart}     \usepackage[caption=false]{subfig}     \usepackage{tabularx,tikz}     \usepackage{graphicx}     \usepackage{color}     \usepackage{pdfpages}     \begin{document}          \title{Practice Tex}               \maketitle          \section{Introduction}          \begin{figure}     \begin{center}     \begin{tikzpicture}             \draw(0,0) circle (0.4cm)       node[draw=none,sloped,above]{cxvzxcv};                     \draw(0,0) circle (0.75cm) node[draw=none,sloped,above]{ratio};            \draw(0,0) circle (1.25cm);       \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,2.2) {22};            \draw(0,0) circle (2cm);       \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,3.8) {33333};            \draw(0,-9) circle (0.4cm);       \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-9) {fsgsdgf};              \draw(0,-9) circle (0.75cm);       \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-7.8) {fgdsfg};            \draw(0,-9) circle (1.25cm) node[midway,sloped] at (0,-9) {dfsdfad};            \draw(0,-9) circle (2.8cm);       \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-6.4) {dfsdfsd};            \draw(0,-9) circle (3.2cm);       \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-6) {dfsdfsd};            \draw(0,-9) circle (3.6cm);       \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-5.6) {sfdsfd};            \draw(0,-9) circle (4.4cm);       \node[draw=none,align=center, font=\scriptsize,text width = 1.25cm] at (0,-4.8) {sdfsf};             \pgfsetlinewidth{3pt}        \draw [-implies][->] (0,-4) -- (0,-4.6);               \end{tikzpicture}      \end{center}     \end{figure}     \end{document}


title: Times New Roman Font in pdfLatex

text: I need to set main font of my document using Times New Roman font. But I just found one solution that is to compile document using xelatex. But my document built since first typing using pdflatex, so when I switch the enggine to xelatex there are so many error I found. And I cannot fix that error immediately. So I need to find solution to set a font to Times New Roman in pdfLatex.


title: Greek pdf bookmarks

text: I am puzzled with sections titled with Greek characters. They do appear in the pdf's _Content_ list, though not correctly. For example, in my thesis--written in English with LyX, based on the KOMA- script--I choose to include a translation of the summary in Greek (=Περίληψη). The "raw" code for the (unnumbered) chapter title reads: `\addchap{\textgreek{Per\char208lhyh}}`. In the final .pdf file (using pdflatex) the respective entry appears as _Per208lhyh_. Using the unicode option for the hyperref package does not fix the problem. **Update detail:** the document (should) not only contain Chapter or Section titles in Greek, but normal text as well. I have found some relevant references within tex.stackexchange and elsewhere (e.g., http://tex.stackexchange.com/a/21675/8272, the manual of the _textgreek_ package, http://www.latex- community.org/forum/viewtopic.php?f=5&t=6059, http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2005-12/msg00944.html). However, I cannot extract a concrete answer. How can Greek characters appear correctly as bookmarks in the .pdf's _Content_ list? **Note** , the information of this Q&A applies to/under **LyX** as well.


title: TeXworks references in included tex files show as [?]

text: I am try to set up TeXworks on Windows to write my thesis, but have hit a problem with creating a shared bibliography in a two-tier document hierarchy. I have a main `thesis.tex` file which sets up the packages and then includes chapters, and finally a bibliography. The `collection.bib` file is in the folder above `thesis.tex`, and chapters are in subfolders.               \documentclass[11pt,a4paper]{../uolthesis}     %\usepackage{alltt,float}     %\usepackage{lgrind}     \usepackage{url}                    % for better handling of URL     \usepackage{lscape}                      \usepackage{subfigure}     \usepackage{mathrsfs}     \usepackage{graphicx}     %\usepackage{caption2}     \usepackage{epstopdf}          \usepackage{sidecap}     \usepackage{../draft_doc}          \graphicspath{{ch1/}{ch2/}}          % correct bad hyphenation here     \hyphenation{op-tical}     % use less hyphenation     \lesshyphenation     % or totally stop it     %\nohyphenation          % speed up compilation     %\includeonly{ch1/ch1}          \begin{document}     \chapter*{thesis title}     \cite{Santner2010,Kalal2011}    % This works     \include{ch1/ch1}               % \cite{} in here produces [?]     \include{ch2/ch2}               % \cite{} in here produces [?]          \clearpage     \markboth{References}{References}     \bibliographystyle{ieeetr}     {\bibliography{../collection}}          \end{document}      The problem is that `\cite{}` from within `thesis.tex` work correctly, but the same citations in the chapter tex files produce `[?]`. The bibliography produced correctly contains all cited papers, so the problem is _only_ in getting the numeric references are the citation point. The log file is, predictably, full of lines like               Package natbib Warning: Citation `Santner2010' on page 9 undefined on input line 61.      I am compiling with `pdfLatex+MakeIndex+BibTeX`. I've tried compiling multiple times without success. What am I doing wrong, please?


title: Anyone know a good template for formal letters?

text: Occasionally, I write letters that I actually print out and send by snail mail :). I'd like them to look as formal as possible. Archaic (pre-typewriter) Dutch customs require the sender's address to be in the top left corner and the recipient's in the top right. The place and date should be aligned with the recipient's address. The sign off ("Yours truly") should also be aligned with that. Of course there are also specific rules for the amount of vertical whitespace. Does anyone know of a good package that lets me customize all this stuff, preferably in a .sty file or something that I can include, so I don't have to do it again for every letter?


title: Combining lattice plots

text: I am trying to put two different plots on same figure. When using implemented R graphics everything works fine. But I want to combine two plots from lattice package (bwplot nad xyplot). Dataset that I am using is **itch.txt** from: http://www.cengage.com/cgi- wadsworth/course_products_wp.pl?fid=M20b&product_isbn_issn=9780534399429&token=               <<>>=     itch <- read.delim("itch.txt")     library(reshape)     df <- melt(itch)     names(df) <- c("oseba", "droga", "srbez")     kratice <- c("ND", "P", "PA" , "M", "A", "PE", "T")     levels(df$droga) <- kratice <- c("ND", "P", "PA" , "M", "A", "PE", "T")     @      This is the code that doesn't work at the moment.               <<figure=TRUE>>=     par(mfrow=c(1,2))     bwplot(droga ~ srbez, data=df, horizontal=TRUE)     xyplot(srbez ~ droga, groups=oseba, data=df, type=c("p", "a"), )     @      It makes each plot separately and I want them side by side.


title: Name of current section/figure

text: I'm looking for a LaTeX command, say `\foo`, which expands to the type of section I'm in. In the following, the first `\foo` should expand to "Section", the second to "Subsection", and the third one to "Figure":               \section{aaa}     Hello \foo          \subsection{bbb}     Hello \foo          \begin{figure}       whatever       \caption{bla \foo}     \end{figure}      I'd like to have this to build a labeling package which knows where the label comes from, i.e., a `\label{R4wmVP}` inside a figure would make `\ref{R4wmVP}` print "Figure \thefigure". The benefit is that after making a section a subsection (or chapter), all references change automatically.


title: Breaking Page with Boiboites Package TikZ

text: I have a problem with package Boiboites I'm writting an exercise enunciate with this package who occupies more than one page, but i cannot break the page. Here's the code:               \documentclass[11pt,a4paper,oneside]{scrbook}     \usepackage{enumerate}          \usepackage{mathpazo}          \usepackage{graphicx}     \usepackage{xcolor}     \usepackage{tikz, pgf, pgfplots}     \usetikzlibrary{arrows,backgrounds,plotmarks,shapes.geometric,calc}     \pgfplotsset{width=7cm,compat=newest}     \pgfplotsset{plot coordinates/math parser=false}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{etex,boiboites}          \definecolor{color1}{RGB}{44,42,37}% borde general     \definecolor{color2}{RGB}{240,240,240}% fondo del cuerpo     \definecolor{color3}{RGB}{44,42,37}% fondo del encabezado     \definecolor{color4}{RGB}{255,255,255}% borde del encabezado          \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground= blue!20,      titleboxcolor = black,thcounter=section ] {bteo}{Teorema}{thCounter}     \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground= blue!20,      titleboxcolor = black,thcounter=section ] {bpropo}{Proposición}{thCounter}     \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground= blue!20,      titleboxcolor = black,thcounter=section ] {bcorolario}{Corolario}{thCounter}     \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground= blue!20,      titleboxcolor = black,thcounter=section ] {bdefi}{Definición}{thCounter}     \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground= blue!20,      titleboxcolor = black,thcounter=section ] {bexercise}{Ejercicio}{thCounter}     \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground= blue!20,      titleboxcolor = black,thcounter=section ] {bexercise2}{Ejercicio}{thCounter}     \newboxedtheorem[boxcolor=orange, background=blue!5, titlebackground= blue!20,      titleboxcolor = black,thcounter=section ] {bejem}{Ejemplo}{thCounter}               \usepackage{upquote}               \usepackage{icomma}      \usepackage{fancyhdr} %activamos el paquete     \usepackage{endnotes}      \usepackage{fancyvrb}          \let\footnote=\endnote     \def\footnotetext{\endnotetext[\number\numexpr\value{endnote}+1]}     \let\footnotemark\endnotemark           \pagestyle{fancy} %seleccionamos un estilo     \fancyhf{} % borra cabecera y pie actuales      \lhead{ECUACIONES} %texto izquierda de la cabecera      \rhead{\thepage }     \chead{TEORÍA Y EJERCICIOS} %texto centro de la cabecera      \rfoot{RESOLUCIÓN ECUACIONES} %texto izquierda del pie     \rhead{\thepage } %número de página a la derecha     \renewcommand{\footrulewidth}{1.0pt}      \renewcommand{\headrulewidth}{1.0pt}                         \usepackage{helvet}     %Helvética     \newcommand{\helv}{\fontfamily{phv}\fontsize{9}{11}\selectfont}               \usepackage[colorlinks=true,linkcolor=black,citecolor=blue, urlcolor=blue]{hyperref}               \usepackage[total={15cm,21cm},left=2cm,top=2cm]{geometry}     \parindent=0mm     \renewcommand{\baselinestretch }{1.2}                    \title{\textbf{Pruebas Octave}}     \author{Cristobal López}     \date{}          \begin {document}     \maketitle     \begin{bexercise}     Se considera un flujo turbulento en una tubería, sea $\mathcal{R}\geq 3500$ el número de Reynolds asociado a su diámetro D. Se desea calcular el coeficiente $\lambda$ de pérdida de carga lineal utilizando la relación de Colebrook:     \[ \lambda ^{-\frac{1}{2}} =-2\log_{10}\left( \dfrac{\epsilon}{3.71\cdot D}+\dfrac{2.51}{\mathcal{R}\lambda^{\frac{1}{2}}}\right) \]     donde: \\     \begin{itemize}     \item $\lambda$ es el coeficiente de pérdida de carga lineal o factor de fricción de Moody. Es adimensional.     \item $\epsilon$ es la rugosidad de la tubería.     \end{itemize}     Para obtener una estimación inicial de $\lambda$ se usará el valor suministrado por la fórmula empírica de Hermann     \[ \lambda_0 =0.0054+0.395\mathcal{R}^{-0.3}\]     El objetivo del ejercicio es calcular aproximadamente $\lambda$ para los siguientes valores de $\mathcal{R}$ y de $\frac{\epsilon}{D}$ \\          \begin{center}     \begin{tabular}{|c|c|}     \hline         $\mathcal{R}$ & $\frac{\epsilon}{D}$\\ \hline         $10^4$ & 0.05\\         $10^5$ & 0.003\\         $10^6$ & 0.003\\     \hline     \end{tabular}     \end{center}     Se utilizarán para ello los siguientes métodos:     \begin{enumerate}     \item Método de las aproximaciones sucesivas.         \begin{enumerate}         \item[1.1] Efectuar un análisis previo de la existencia y unicidad de la solución y de la convergencia de la sucesión aproximadamente.         \item[1.2] Hacer una estimación a priori del número de iteraciones necesarias para obtener la solución con un error $\epsilon <10^{-6}$ para cada pareja de valores $\left(\mathcal{R},\: \frac{\epsilon}{D}\right)$.         \item[1.3] Resolver la ecuación. \clearpage \newpage         \item[1.4] Efectuar estimaciones "a priori" y "a posteriori" del error en cada caso comparando los resultados.         \item[1.5] Efectuar.         \end{enumerate}     \end{enumerate}     \end{bexercise}     \end{document}      How can I follow the exercise in a new page? ![Break Page](http://i.stack.imgur.com/M28KZ.png)


title: Dots, subsections in beamer

text: \section{Results}          \subsection{}          \frame      {      \frametitle{Example 1}      \setbeamercovered{dynamic}          \begin{itemize}     \pause \itemi  example 1 say     \end{itemize}     }                \frame      {      %\frametitle{Example 1}           \begin {figure}[h!]     \centering     \includegraphics[width=6cm]{figureK-Fixed.eps}     \label{figureK-Fixed}     \end{figure}     }      While I do it, the second frame appears as a new dot in the header. How can I make just the first one appear? Can I close a subsection?


title: Keep example number together with floating table

text: I am using the package `linguex` (for 'linguistic examples') to number the examples in my text, using its command `\ex.` I am creating a table that I am numbering with this command `\ex.`:               \ex. \label{my_table}     \begin{tabular}[t]{l l l l}     Row 1 & Row 2 & Row 3 & Row 4\\     etc.     \end{tabular}      The option `[t]` for `\begin{tabular}` is necessary to have the example number be on the same line as the first row in the table. My table is rather large, so I want to make it a float, so I embed the section above within a `{table}` environment. When I do this, however, the example number for my table is separated from the table, i.e. there is a page break between them. How can I prevent this?               \ex. \label{my_table}     \begin{table}     \begin{tabular}[t]{l l l l}     Row 1 & Row 2 & Row 3 & Row 4\\     etc.     \end{tabular}     \end{table}


title: How to remove the name Chapter with fanchyhdr in Report class

text: I try               \renewcommand{\chaptermark}[1]{\markboth{#1}{}}      but is not effect. I need 1.First Chapter on head.


title: Set width of LaTeX float # in List of X

text: Using the LaTeX `float` package, I've created a new float:               \newfloat{schema}{htb}{los}[chapter]     \floatname{schema}{{Schema}}      The list of schemas at the beginning of my document is created with the command               \listof{schema}{List of Schema}      My problem is that LaTeX isn't reserving as much space as I'd like for the schema number in the List of Schemas. When a schema number consists of three digits, like               \numberline {5.14}      then the last digit of this number comes quite close to the first letter of the caption of the schema. (In fact, if the number has four digits, it can actually overlap the caption.) I tried to come up with a solution using the `tocloft` package, but I couldn't figure out how to make that work in conjunction with the `\newfloat` command-- it sounds like I should tell `tocloft` to change a `numwidth` variable associated with my 'schema' float, but I have not been able to figure out what the name of that variable is (it's not `schemanumwidth` or anything else obvious). It may be that `tocloft` just doesn't know about floats created with the `float` package's `\newfloat` command. I finally came up with a dirty hack:               \let\orignumberline\numberline     \renewcommand{\numberline}[1]{\orignumberline{#1}\hspace{1em}}      This wouldn't be too bad if it affected only my List of Schemas, but of course it also affects the chapter and section #s in the ToC, the table #s in the ToT, etc., all of which had perfectly adequate spacing before (and now look a little odd with a too-wide spacing). This seems like the sort of thing that ought to work out of the box: if I define a new float, and create a list of them, then LaTeX ought to leave enough space between the float # and the float caption in the listing of this float. Am I overlooking something obvious?


title: missing file from the package symbol

text: I'm using TeXworks for writing a book in LaTex based on the Springer Template available on http://www.springer.com/authors/book+authors?SGWID=0-154102-12-417900-0 During the first test of their sample, TeXworks asked me to install `fonts\type1\urw\symbol\usyr.pfb` as it is missing from the package **`symbol`**. However, whatever I try, I get following error during the installation:               starting package maintenance...     installation directory: "C:\Program Files\MiKTeX"     package repository: (http://ctan.uib.no/systems/win32/miktex/tm/packages/)     lightweight database digest: fe8645631bc046ced54f9c0c57133b55     going to download 38166 bytes     going to install 14 file(s) (1 package(s))     downloading (http://ctan.uib.no/systems/win32/miktex/tm/packages/symbol.cab...)     38166 bytes, 89.17 KB/Sec     extracting files from symbol.cab...     xdvipdfmx: Windows API error 87: The parameter is incorrect.          xdvipdfmx: Data: C:\ProgramData\MiKTeX\2.9\miktex/data/le\09b5c372fc5c4f2c55f13bbf51b8f129.fndb     Trying to make PK font usyr at 600 DPI...     Running miktex-makemf.exe...     miktex-makemf: The usyr source file could not be found.          Running ttf2pk.exe...     miktex-makepk: PK font usyr could not be created.          ** WARNING ** Could not locate a virtual/physical font for TFM "psyro".     ** WARNING ** >> This font is mapped to a physical font "usyr".     ** WARNING ** >> Please check if kpathsea library can find this font: usyr     ** ERROR ** Cannot proceed without .vf or "physical" font for PDF output...     >Output file removed.     xelatex.EXE: Broken pipe     texify: xelatex failed for some reason (see log file).


title: biblatex-apa output reference list differs from that of Publication Manual of the APA, Sixth Edition

text: So before I invested too much more time with `biblatex-apa`, I wanted to have a look at how `biblatex-apa` presents my reference list, and then compare that with the examples from the authoritative source: the _Publication Manual of the American Psychological Association, Sixth Edition_. I'm surprised to find some noteworthy differences, and although I am no expert on the _Publication Manual of the American Psychological Association, Sixth Edition_ , I sense that it is perhaps one of the most persnickety of any style published, so my questions here may also be persnickety. Apologies if they come across in any other manner than just professional curiosity and concern for getting my manuscript written correctly. My goal is simply to try and find out if I'm doing something wrong in using biblatex-apa to get these differences or if these differences that I point out below are known limitations in biblatex-apa or perhaps something altogether different. I won't try to reproduce the hanging indent format of the reference list, because that seems like it might be hard in TeX.sx, but other than that, below I list 3 different entries in a reference list for the same source document. The three different entries are from:   1. the APA examples ( **sample-references2.pdf** ),   2. a citation engine from my library's electronic database engine for journal articles (called PsycINFO, and it wouldn't surprise me much to learn that this is incorrect with respect to APA 6th ed, but I've listed it for reference here, kind-of a "tie-breaker", and interestingly enough, it seems to agree with biblatex-apa and to disagree with the APA 6th ed.),   3. and biblatex v1.5 with biblatex-apa v4.2 ...respectively.   1. Carstensen, L. L. (1992). Social and emotional patterns in adulthood: Support for socioemotional selectivity theory. _Psychology and Aging, 7_ , 331–338. doi:10.1037/0882-7974.7.3.331   2. Carstensen, L. L. (1992). Social and emotional patterns in adulthood: Support for socioemotional selectivity theory. Psychology and Aging, 7(3), 331-338. doi:10.1037/0882-7974.7.3.331 (this is strictly ascii text, so I don't expect any font formatting)   3. Carstensen, L. L. (1992). Social and emotional patterns in adulthood: support for socioemotional selectivity theory. _Psychology and Aging, 7_ (3), 331–338. doi:`10.1037/0882-7974.7. 3.331` I've done the font formatting with the tools of TeX.sx, but the preview output looks pretty similar to what biblatex is giving me. My two concerns are:   1. the differences between the APA 6th ed (which foregoes the Number of the journal and lists instead only the Volume (perhaps because the page numbers uniformly increase throughout the volume regardless of number, and so perhaps number is redundant? not sure)) and biblatex-apa (which presents both Volume and Number), and   2. the differences between the APA 6th ed (which lists the doi code in the same proportional font as most of the rest of the entry: is that **Times**?) and biblatex-apa (which presents the doi code in a fixed font) Can anyone comment on this? I'd like to continue using biblatex-apa because it looks really powerful, but I'd also like to have my reference list look like that of the APA 6th ed, and as of now, it doesn't. I'm not sure how important the differences are either, so if anyone can comment on that aspect, I welcome the feedback there too.


title: Can't extract embedded font

text: I use visio (on windows) to generate eps file and show it using latex (beamer) in slides. I compile latex to pdf on ubuntu and everything is fine. However, when the pdf slides are shown on windows or mac, following error is thrown. anyway to avoid this?               Can't extract the embedded font "GLFPFT + ARIAL". Some characters may not display or print correctly.      EDIT: as I check with pdffonts, there is following line:               GLFPFT+ARIAL    TrueType(type) yes(emb) yes(sub) yes(uni) ...


title: How do I disable headers and footers in the exam class?

text: I am writing a very large class file for my University, which can generate different kinds of documents (depending on the kind of options). One of the types is an exam. All these documents have to have a unified look to them. For that, I have defined headers and footers using the fancyhdr package, with pagestyles for first page and subsequent pages. These are uniform for assignments, letters, memos, minutes, etc. These **cannot** be changed. I want to use the exam class to generate examination papers with this class (I load the exam class conditionally, depending on the option supplied). However, the exam class's redefining of fancyhdr \lhead, etc. creates a conflict between the two packages (really indefensible and poor programming practice on part of the author of the exam class). I don't get it. I am writing a long class and I have made sure that none of the new commands I have defined mess with commonly used document classes. Why can't everyone just follow that bit of self-evident common sense? I have looked at other people's solutions for this - it seems that all suggest working with the exam document class's headers and footers. That is **not** an option for me because of the reasons above - we need uniformity. So, any solution that allows me to switch the headers and footer commands from the exam class off is needed. Any solution that requires editing the exam class is a **non-starter** because my class is going to be distributed across the University, and I do not want every single user of my class to have the hassle of having to edit a fairly standard class file in their tex distribution. Another possible solution is not use the exam class at all, but for that I need suggestions. I really like the exam class, but if there is no workaround, I have to move on to some other way of doing this.


title: Big braces both on left and right of column or array

text: I'm trying to type a column with seven elements and some vertical big braces on its left and right. The code I use is               \[     \begin{array}{rcl}     & \Gamma & \\     \multirow{3}{*}{$\mathcal{D}_3 \bigg\{$}      & \mathcal{D}_1 & \\     & A & \\     & \mathcal{D}_2 & \multirow{2}{*}{$\bigg\} \mathcal{D}_5$} \\     & B & \\     & \mathcal{D}_4 & \\     & C &     \end{array}     \]      which produces ![this image](http://i.stack.imgur.com/wbyyx.png) but I'd like to produce bigger and closer to the middle column braces such that the one on the left includes elements D_1 to D_2 and the one on the right includes D_2 to D_4. Could anyone help?


title: koma-scrlttr2: bottom margin is immense, how to reduce?

text: I'm really struggling with what seems like it should be a simple layout question for KOMA scrlttr2. I simply cannot find any way to get the bottom margin of a letter to be anything less than 2 inches. I've browsed through the KOMA documentation. I certainly understand the authors' wish for users to understand the principles of proper page layout for publication. However, a letter is _not for publication_. A bottom margin of 2-3 cm may be too small for publication, but it's entirely reasonable for a letter. So I think it should be a fairly simple question, but the documentation provides pounds of theory but nothing like a simple answer. First I tried the geometry package, but the "bottom" property had no effect. Scrlttr2 still insists on breaking the page about 2 inches above the page boundary. Then I saw that typearea is recommended for KOMA scripts. The width parameter of \areaset clearly takes effect, but the height parameter does not.               \usepackage[headexclude,footexclude,landscape]{typearea}     \areaset{6.5in}{11in}      I'm sure there must be a way to do this. There's plenty of room on the page for the content. It's just that scrlttr2 is refusing to let me use that space.


title: pdffonts and adobe X disagree whether all fonts are embedded

text: I'm finishing up my dissertation (in LyX, converted to pdf with pdflatex), and I checked to ensure that all fonts were embedded in the final pdf file, using pdffonts. It showed that all fonts were embedded. However, when I take the very same pdf file and open it with Adobe Reader X version 10.1.4 on a Windows machine, it shows a bunch of Type 3 fonts that are not embedded (neither "(embedded)" nor "(embedded subset)" appears next to their name). What the heck?!?! Who is lying? Adobe Reader, or pdffonts? Or am I misinterpreting either?               pdffonts dissertation_etd.pdf                name                                 type              emb sub uni object ID     ------------------------------------ ----------------- --- --- --- ---------     [none]                               Type 3            yes no  no     482  0     XUWZCB+CMR10                         Type 1            yes yes no     488  0     [none]                               Type 3            yes no  no     531  0     [none]                               Type 3            yes no  no     532  0     [none]                               Type 3            yes no  no     533  0     IJCTHR+CMSY10                        Type 1            yes yes no     590  0     WSFGOP+CMMI10                        Type 1            yes yes no     591  0     NAEIGF+CMMI7                         Type 1            yes yes no     592  0     FROZOC+CMBX10                        Type 1            yes yes no     593  0     KXPRHG+CMEX10                        Type 1            yes yes no     594  0     TPRWIL+CMSY7                         Type 1            yes yes no     595  0     OGKSEF+CMR7                          Type 1            yes yes no     596  0     NANTFZ+MSBM10                        Type 1            yes yes no     597  0     [none]                               Type 3            yes no  no     660  0     [none]                               Type 3            yes no  no     666  0     TMHVPV+MSAM10                        Type 1            yes yes no     667  0     [none]                               Type 3            yes no  no     680  0     [none]                               Type 3            yes no  no     766  0     [none]                               Type 3            yes no  no     784  0     [none]                               Type 3            yes no  no     786  0     [none]                               Type 3            yes no  no     850  0     [none]                               Type 3            yes no  no     851  0     JWIOXB+Helvetica                     Type 1C           yes yes no     856  0     KPSHBO+TT52D0o00                     Type 1C           yes yes no     857  0     KPSHBO+TT52CFo00                     Type 1C           yes yes no     858  0     NHCAHM+CMMI5                         Type 1            yes yes no     892  0     NOPBSI+CMSY5                         Type 1            yes yes no     893  0     KGCVSC+CMR5                          Type 1            yes yes no     894  0     EGSJXT+Times-Roman                   Type 1C           yes yes no     933  0     IAWSAZ+Symbol                        Type 1C           yes yes no     934  0     WNMMHQ+Helvetica                     Type 1C           yes yes no     935  0     CQYSUU+Times-Italic                  Type 1C           yes yes no     936  0     ITGCUR+MSBM7                         Type 1            yes yes no     957  0     NFSINM+MSAM7                         Type 1            yes yes no     959  0     [none]                               Type 3            yes no  no     969  0     BTUXYB+Times-Roman                   Type 1C           yes yes no     980  0     KPSHBO+TT157BFo00                    Type 1C           yes yes no     999  0     QEHNHK+TT157BCo00                    Type 1C           yes yes yes   1000  0     SYGAIY+Symbol                        Type 1C           yes yes no    1001  0     IEBOJP+Times-Roman                   Type 1C           yes yes no    1002  0     ZKXARV+CMR9                          Type 1            yes yes no    1024  0     KNZWIR+CMSY9                         Type 1            yes yes no    1025  0     [none]                               Type 3            yes no  no    1099  0     EDKWPE+Helvetica                     Type 1C           yes yes no    1103  0     HCOJSC+Helvetica                     Type 1C           yes yes no    1110  0     FUQGVM+Helvetica                     Type 1C           yes yes no    1117  0     QJWPHY+Helvetica                     Type 1C           yes yes no    1130  0     JPOSGK+Helvetica                     Type 1C           yes yes no    1137  0     NUEDLC+Helvetica                     Type 1C           yes yes no    1144  0     AAOWGK+CMBX7                         Type 1            yes yes no    1298  0     BXEXLR+CMMI9                         Type 1            yes yes no    1409  0     RENBRO+CMR6                          Type 1            yes yes no    1410  0     [none]                               Type 3            yes no  no    1411  0     EFGUHB+CMMI6                         Type 1            yes yes no    1416  0     ZJYOPT+esint10                       Type 1            yes yes no    1486  0     ZMVOSH+CMEX9                         Type 1            yes yes no    1771  0     PAAUUR+CMMI8                         Type 1            yes yes no    1805  0     ITLAUF+CMR8                          Type 1            yes yes no    1821  0     HBIEHQ+CMSY6                         Type 1            yes yes no    2214  0     COVVAL+CMEX8                         Type 1            yes yes no    2215  0     TMCDBM+CMSY8                         Type 1            yes yes no    2216  0


title: Unexpected clash between babel and pgf spy

text: The following example taken from the pgfplots manual (p. 121) works fine only if the line loading `babel` is commented               \documentclass{article}          \usepackage[frenchb]{babel} % this is the troubelsome line          \usepackage{pgfplots}     \usetikzlibrary{spy}          \begin{document}     \begin{tikzpicture}[spy using outlines=     {circle, magnification=6, connect spies}]     \begin{axis}[no markers,grid=major,     every axis plot post/.append style={thick}]     \addplot coordinates     {(0, 0.0) (0, 0.9) (1, 0.9) (2, 1) (3, 0.9) (80,      0)};     \addplot +[line join=round] coordinates     {(0, 0.0) (0, 0.9) (2, 0.9) (3, 1) (4, 0.9) (80,      0)};     \addplot +[line join=bevel] coordinates     {(0, 0.0) (0, 0.9) (3, 0.9) (4, 1) (5, 0.9) (80,      0)};     \addplot +[miter limit=5] coordinates     {(0, 0.0) (0, 0.9) (4, 0.9) (5, 1) (6, 0.9) (80,      0)};     \coordinate (spypoint) at (axis cs:3,1);     \coordinate (magnifyglass) at (axis cs:60,0.7);     \end{axis}     \spy [blue, size=2.5cm] on (spypoint)     in node[fill=white] at (magnifyglass);     \end{tikzpicture}          \end{document}      I get the following error               Runaway argument?     [fill=white] at (magnifyglass);      ! Paragraph ended before \tikz@lib@spy@parse@opta was complete.     <to be read again>                         \par       which I fail to interpret. I'm using the `TeX Live` distribution that ships with Ubuntu but I manually installed in my _texmf_ folder more recent version of some packages including `pgf` and `pgfplots`. Do you have any idea of what I could do to be able to use both `babel` and the `spy` library?


title: How to convert pictures to Open Office format (odt) using htlatex?

text: I am trying to convert a non scientific content (text with pictures) into .odt format, the only one accepted by a site for writers to upload material. The following command works nicely for the text, but the pictures do not have the proper dimensions after conversion. I have experimented different formats .jpg, .png, .pdf, but no change. Is there a workaround? I call the pictures in the LaTeX source by:               \includegraphics[width=\textwidth]{Pariah-Canyon1.jpg}     htlatex filename.tex "xhtml,ooffice" "oofice/! -cmozhtf" "-coo -cvalidate"      I am getting a warning below, but could not fid any way to eliminate it. TeX4ht warning --- Cannot determine size of graphic in Pariah-Canyon1.jpg (no BoundingBox)


title: How to shorten the space of the entry in a table?

text: My code is as follows,               \documentclass{article}      \usepackage{amsmath, amssymb}     \usepackage{setspace}      \usepackage{ulem}     \usepackage{float} % fix the table     \usepackage{bold-extra}     \usepackage{amsmath,bm}     \usepackage[margin=1in]{geometry}      \usepackage{color}     \usepackage{amsmath,amsopn}     \usepackage{bbm}     \usepackage{import}     \usepackage{hyperref}      \usepackage[Sonny]{fncychap}     \usepackage{mathrsfs}     \usepackage{tikz,pgfplots}     \usepackage{listings}     \usepackage{fancyhdr}     \usepackage{color}     %\usepackage{breqn}      \usepackage{caption}     \usepackage{subcaption}     \usepackage{epstopdf}     \usepackage[titletoc,toc,title]{appendix}     \usepackage{mathtools}          \begin{document}      \begin{table}          \begin{subtable}{\textwidth}     \centering         \label{tab mtl a ins5}     \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|}     \hline          $10^{-2}$ &  5373   &  4248 &3137 & 2029  & 996     &  651 &  488    & 455   &  481                 &   575    &  659     &491    \\           &  378(m) &  299(m) &221(m) & 143(m)  & 70(m)     &  46(m) &  34(m)    & 32(m)       &  34(m)     &   40(m)    &  46(m)     &35(m)    \\\hline     $10^{-5}$ & -      & -     &93712 &59616  & 25353    & 9737  & 19597   & 37621&  55079  &72379    &  90438    &84164 \\           &        &       &6591(m) &4193(m)  & 1783(m)    & 685(m)  & 1378(m)   & 2646(m)&      3874(m)  &5091(m)    &  6361(m)    &5920(m) \\\hline     $10^{-8}$ & -      &   -   &  -    &-      &  -       &34076  &69287   & -      & -     & -        & -     &-\\           &        &       &       &       &          &2397(m)  &4873(m)   &        &       &          &       & \\\hline     \end{tabular}     \end{subtable}     \end{table}          \end{document}      ![enter image description here](http://i.stack.imgur.com/MUsDc.jpg) As the litter image, this line of the table is two long. So I want to shorten the space in each entry horizontally. Thank you in advance!


title: How to include part of an external git hash as text inside a document?

text: _This is my first time asking a question on a site like this. Please tell me if I should do something differently, thanks!_ I want to include a short version of the latest commit hash from git as a text string in a (Xe)LaTeX document. How do I do that? I am able to include the full hash simply with:               \input{.git/ORIG_HEAD}      But I am not able to figure out how to shorten down the hash with the `xstring` package when I am getting the string from a macro. What I currently have is this:               \usepackage{xstring}          \expandarg %% Not at all sure about this command     \StrLeft{\input{.git/ORIG_HEAD}}{8}[\gitrevision]          I would prefer \gitrevision\ to be a short hash.      A fix for the above code would be most appreciated, as the code is constructed from my way of thinking. Yes, I have RTFM, but it is in my opinion lacking in the department of plain down-to-earth usage examples. Of course, a completely different (working) solution is also welcome! A final note, I would easily be able to do all this with an external `bash` script and/or with the `\write18` macro, but I have put an arbitrary limit on myself to only rely on TeX in this case. Otherwise I will never learn more. Many thanks for taking the time to read this question!


title: Chapter name in [oneside]{scrbook}

text: In {scrbook} class the chapter begun just with the number of a chapter :               \documentclass[oneside]{scrbook}     \begin{document}     \chapter{Default Chapter Heading}     \end{document}       ![enter image description here](http://i.stack.imgur.com/6Kerd.jpg) Is there a way to have in regular way like this: ![enter image description here](http://i.stack.imgur.com/34NTO.jpg) without changing `\documentclass[oneside]{scrbook}` and without using `{fncychap}` Any help with this please! Much appreciated.


title: Glossaries Acronyms generate overfull hbox: how do to line wrap?

text: I am using the `glossaries` package with the acronym option:               \usepackage[acronym,style=long3col]{glossaries}      For some reason the acronyms on first use will not line wrap, e.g.,               \newacronym{VHDL}{VHDL}{Very High Speed Integrated Circuit (VHSIC) Hardware Description Language}      I have tried using hyphenation but I can't seem to get LaTeX to detect the spaces in the acronyms and wrap the acronym around the next line. How can I get latex to wrap the text to the next line for long ancronyms when first used or after `\glsreset{}` is used?


title: How can I obtain a good compiled file with PSTricks?

text: I want to use PSTricks for making figures, and I have any code that I know that is good code, because I have viewed the results in images (code compiled well). I'm trying and trying, but I don't obtain a good result compiled. Could you help me? A friend of mine tells me that he thinks that I must compile with `LaTeX` and not with `pdflatex`. I tried, but... I have many errors, and have problems with the `pst-plot` package. WinEdt8 tells me that I may fix the problems with this option in the global options of the `documentclass`, but I tried... and nothing. When I put option `dvips` this... appears in light gray... attenuated Here is the simple code. https://dl.dropboxusercontent.com/u/56475675/mini_pstricks.zip other thing... in any code i must use pst-all... but i think that today is not available. I think that if i don't include pst-all and include all the packeges pst-alll includes.... is enough. For an example with the code visit this link: How can I draw a landscape picture using PSTricks? I compile and.... I obtain NO ERRORS ( :-) ) but the result is https://dl.dropboxusercontent.com/u/56475675/borra10.pdf I would like to can start learning `PSTricks`, but... I need to make a good compiled result with a simple example (i.e., an axis and a function graph). * * * Morevover, I have a similar problem trying this example, using TikZ How to put a brace and a title? I compile with any errors, and obtain this: https://dl.dropboxusercontent.com/u/56475675/borra11.zip.


title: Addressing overlay specifications in TikZ-pictures

text: I was creating a mindmap for a presentation using as reference tikzpicture in beamer. My code is:               \documentclass{beamer}     \usepackage{lmodern}     \usetheme{Copenhagen}          \usepackage{tikz}     \usetikzlibrary{mindmap}          \tikzset{         invisible/.style={opacity=0},         visible on/.style={alt=#1{}{invisible}},         alt/.code args={<#1>#2#3}{%         \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}       },     }          \tikzset{level 1 concept/.append style={font=\sf, sibling angle=90,level distance = 25mm}}     \tikzset{every node/.append style={scale=0.6,text=white}}          \begin{document}     \begin{frame}{Title}     \begin{center}     \begin{tikzpicture}[mindmap,text=white, concept color=blue]     \node[concept,visible on=<1->]{Root Concept}[clockwise from=315]      child [concept color=violet,visible on=<2,3>] {node[concept] (c1){Child 1}                                      }      child [concept color=orange,visible on=<3>]{node [concept](c2){Child 2}      };     \end{tikzpicture}     \end{center}     \end{frame}          \end{document}      which causes as error:               ! Argument of \pgfkeys@code has an extra }.     <inserted text>                      \par      l.38 \end{frame}      I suspect the problem arises along the line:               child [concept color=violet,visible on=<2,3>] {node[concept] (c1){Child 1}}      in particular in presence of `<2,3>` (simply writing `<2>` or `<2->` the compilation is fine), but I don't see any way to fix it and even (worst) I don't understand the reasons behind this error.


title: Cannot achieve nice spacing in list items in beamer

text: I am trying to achieve the best spacing between `items` in a `beamer` presentation. I am using               \documentclass[slidestop,compress,mathserif,12pt,xcolor=dvipsnames]{beamer}     \graphicspath{{images/}}     \definecolor{LHCblue}{RGB}{4, 114, 255}     \usecolortheme[named=LHCblue]{structure}     \usepackage[bars]{beamerthemetree} % Beamer theme v 2.2     \usepackage{kerkis}     \usepackage{multimedia}     \usepackage{subfigure}     \mode<presentation>     %frame     \newcommand*\oldmacro{}%     \let\oldmacro\insertshorttitle%     \renewcommand*\insertshorttitle{%       \oldmacro\hfill%       \insertframenumber\,}%/\,\inserttotalframenumber     \setbeamertemplate{footline}[frame number]     %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     \setbeamercovered{higly dynamic}     \usetheme[watermark=ntua-logo.jpg]{Ilmenau} % Beamer theme v 3.0     \useoutertheme[subsection=true]{smoothbars}%Beamer Outer Theme-circles on top          \useinnertheme{circles} %rectangle bullet points instead of circle ones     \usepackage{beamerthemebars}     \setbeamercolor{navigation symbols dimmed}{fg=red!80!black}     \setbeamercolor{navigation symbols}{fg=red!80!black}     %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     \title[July 2012 H4 Test Beam\hspace{3cm} Stony Brook, NYC]{July 2012 H4 Test Beam}     \author[Stamatopoulos N. Athanasios\hspace{2.5cm}{athanasios.stamatopoulos@cern.ch}]    {Stamatopoulos N. Athanasios}     \institute{NTUA/CERN}     \logo{%       \makebox[0.99\paperwidth]{%         \includegraphics[width=1cm,keepaspectratio]{cern_logo_white.jpg}%         \hfill%         \includegraphics[width=1cm,keepaspectratio]{ntua-logo.jpg}%       }%     }          \usepackage{textpos}     \usepackage{tikz}     %\usepackage{enumitem}     %\usepackage{paralist}          \begin{document}          \begin{frame}     \titlepage     \end{frame}          \begin{frame}     \frametitle{Contents}     \tiny{\tableofcontents[currentsection]}     \end{frame}          \begin{frame}     \frametitle{Short Introduction}     \begin{enumerate}%[noitemsep]     \item Micromegas Telescope     \item Laboratory Set-up     \begin{itemize}     \item Signal to Noise Ratio Optimization     \item Double Spectrum Issue     \end{itemize}     \item Tracker Configuration     \begin{itemize}     \item High Voltage     \item Resistivity     \item Front End Chip     \end{itemize}     \item Software     \begin{itemize}     \item Data Acquisition Software     \item Preliminary Data Visualisation     \end{itemize}     \item Data Analysis     \begin{itemize}     \item Characterisation of the tracking system     \item $1M\Omega/\Box\;Vs\;100k\Omega/\Box$     \item Position Scan     \end{itemize}     \end{enumerate}     \end{frame}          \section{Micromegas Telescope}          \begin{frame}     Good Morning Vietnam!!!     \end{frame}          \end{document}      If I run the previous code I am missing some items. I tried to use `noitemsep` and `nolistsep` but it isn't working. I also used `paralist` and `compactitem` but again it wasn't working. I also tried with               \addtolength{\itemsep}{-0.1\baselineskip}      but the fact that I am having nested lists doesn't produce a nice output not matter how hard I play with spaces... Any ideas?


title: Someone has redefined \pdfoutput?

text: I am very confused by my TeX Live (2012). I used XeLaTeX to run a `.Rnw` file in RStudio and got the following message:               Compiled PDF failed /usr/local/texlive/2012/texmf-dist/tex/generic/oberdisk/ifpdf.sty      Someone has redefined \pdfoutput      /usr/local/texlive/2012/texmf-dist/tex/fontspec/fontspec-xetex.sty      the log file shows:               Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)     Package ifpdf Warning: Someone has redefined \pdfoutput.     Package ifpdf Info: pdfTeX in PDF mode is not detected.      Please help me get rid of the error. Should I re-install my TeX Live? Or should I install any `.sty` file?


title: Can listings automatically indent code?

text: \documentclass[11pt,a4paper] {article}     %\usepackage{fontspec}     \usepackage{listings}     \usepackage{xcolor}     %\setmainfont[BoldFont=黑体]{宋体}     %\XeTeXlinebreaklocale "zh"     %\XeTeXlinebreakskip = 0pt plus 1pt minus 0.1pt     %\linespread{1.5}     \lstset{     numbers = left,     framexleftmargin=10mm,     frame=none,     backgroundcolor=\color[rgb]{245,245,244},     keywordstyle=\bf\color{blue},     identifierstyle=\bf,     numberstyle=\color[RGB]{0,192,192},     commentstyle=\it\color[RGB]{0,96,96},     stringstyle=\rmfamily\s1shape\color[RGB]{128,0,0},     showstringspaces=true     }     \begin {document}     \title{实验课}     \author{ coolwind}     \maketitle     \paragraph{}     你好，世界！          \begin{lstlisting}[language=C]          #include <stdio.h>          int main()     {     printf("Hello world!\n");          for (int i = 0; i < 100; i ++)     {     for (int j = 0; j < 100; j ++)     {     int tmp = i + j;     }     }     return 0;     }          \end{lstlisting}     \end {document}


title: how could I manage a bibliography in a world full of clouds (citeulike / mendeley)?

text: I always used a single `babel.bib` BibTex file to keep a record of all my readings. Great. Then I managed it using a VCS (first SVN, then git). Super great. But at the same time, resources like CiteUlike or Mendeley (but also other services like orcid) allow for cloud-like services of having this data everywhere, anytime. Super super great! But this fails if you have no connection to internet (remote conference, ...) or more importantly if these services change their policy (mendeley to citeulike sync disappeared at a sudden). The work you provide is not yours. These are mostly commercial services while all the open-source tools are there. Most importantly, the multiplicity of tools makes it difficult to share bibliographic data easily, while if we would have a tool to translate between them this would make it possible (without changing your habits). As a consequence, I wish to build such a "BibCloud" service with the following features:   * `bibcloud init` : use with biblatex (but a format using bibjson is possible)   * CLI coded in python (widespread in the scientific community), all databases + configuration files being stored in plain text files.   * `bibcloud commit -am' adding Sawyer14nature'; bibcloud push` : CVS integration (git / hg / ...) - and storage in remote repositories (github, bitbucket)   * `bibcloud pull citeulike`, `bibcloud push citeulike` : easy conversion + pull and push to existing accounts (Citeulike, Mendeley) - including synchronization of PDFs   * `bibcloud detect_dups records` implementation of tools to detect and merge duplicate records, and duplicate fields (like `bibcloud detect_dups authors`: an author with different versions, like eg `Tom Sawyer`, `T Sawyer`, `T J Sawyer` or for journal names with `bibcloud detect_dups journals`)   * `bibcloud pull 2323422.pdf` scan a pdf to extract its metadata (like the DOI) - allow to include the citation in the paper `bibcloud push 2323422.pdf` to simply send a file to colleagues.   * `bibcloud citekey Sawyer14` : generate a citekey according to a given rule   * `bibcloud edit Sawyer14` : edits one particular entry   * `bibcloud file Sawyer14` : files the PDF corresponding to the entry according to some rule   * `bibcloud push html` easy conversion to some web format (github pages?) to read papers online. Before attempting to put that together, I wish to know of the existing pieces the community may know. Notes:   * it is different from this question "Workflow for managing references?" as existing solutions like zotero or do not work for me. I wish to get the pieces of the puzzle together to build a command-line tool for managing bibliographies.   * it is different to this question or to this other as they ask more for a GUI solution.


title: What is the correct way to cite forthcoming paper (without having infos)?

text: I have to cite a forthcoming paper. I know this paper will be printed in 2014 in a collective book but I don't have any specific details about the publisher, collection, editors, ... Basically, I just have the title, the author, the date (2014) and an url to a preprint version. What is the best way to cite such paper in an academic publication? I would like to use `@incollection` biblatex entry type but without the title of the book I obtained: ![enter image description here](http://i.stack.imgur.com/tVHsA.png)               @InCollection{doe_articles_2014,       Title                    = {article's title},       Author                   = {Doe, John},       Date                     = {2014},       Url                      = {http://url_to_preprint_version.pdf}     }      Where do I place the "forthcoming" (or should I write "inpress"?)?


title: Suppress certain URLS in bibliography

text: If you get a .bib file from google books, unsurprisingly it has a link to google books in the URL field. This is handy to have in the .bib file so I'd rather not remove it from the file, which would be easy using regex, however I don't want it to print. Is there a way to suppress printing of the URL field based on the content of that field? Alternatively it looks like I could disable the URL field for `@book`s with something like `\AtEveryBibitem{\ifentrytype{book}{\clearfield{url}}{}}` but I'd rather fix the real issue and keep the ability to cite books with URLs .


title: linewidth and middlelinewidth options in mdframed: wrong information in the documentation?

text: In the documentation of the package `mdframed 1.9b`, the author says (p. 7) > If you are working width framemethod=tikz or framemethod=pstricks the option > linewidth is an alias for the option middlelinewidth. But the following code               \documentclass{article}     \usepackage[framemethod=tikz]{mdframed}     \begin{document}          \begin{mdframed}[linewidth=2mm,                      linecolor=red]     With \verb+linewidth=2mm+     \end{mdframed}          \bigskip          \begin{mdframed}[middlelinewidth=2mm,                      linecolor=red]     With \verb+middlelinewidth=2mm+     \end{mdframed}          \end{document}      produces ![enter image description here](http://i.stack.imgur.com/4fd7f.png) Am I missing something or is the documentation wrong on this point?


title: How to exclude a specific bibtex field from being printed if doesn't contain specific text?

text: I had a look here but I was not able to adapt it to my case. I want `biblatex` to print at the end of my bib entry the field `addendum` only in case the field indicates the original publication date `Original work published \dddd\` but not if the field indicates that the work is a reprint (or for that matter in any other case). Please consider the following MWE.               \RequirePackage{filecontents}          \begin{filecontents*}{mybib.bib}     @book{test1,         address = {Cambridge, {MA}},         title = {The structural transformation of the public sphere: {An} inquiry into a category of bourgeois society},         publisher = {MIT {Press}},         author = {Habermas, Jürgen},         translator = {Burger, Thomas and Lawrence, Frederick},         year = {1989},         addendum = {Original work published 1962}     }     @incollection{test2,         address = {Cambridge, {MA}},         title = {Deliberation and democratic legitimacy},         booktitle = {Deliberative democracy: {Essays} on reason and politics},         publisher = {MIT {Press}},         author = {Cohen, Joshua},         editor = {Bohman, James and Rehg, William},         year = {1997},         addendum = {Reprinted from {Hamlin} 1989 pp.17-34},         pages = {67--91}     }     \end{filecontents*}          \documentclass{article}               % Set the values for the bibliography     \usepackage[         style=apa,         backend=biber,         isbn=false,         url=false,         doi=false,         eprint=false,         hyperref=true,         backref=false,         firstinits=false,     ]{biblatex}          % Recommended for biblatex     \usepackage[utf8]{inputenc}     \usepackage{csquotes}     \usepackage{xpatch}          % Set language     \usepackage[british]{babel}     \DeclareLanguageMapping{british}{british-apa}          \addbibresource{mybib.bib}          \begin{document}          \cite{test1}     \cite{test2}          \printbibliography     \end{document}      What I obtain is ![output](http://i.stack.imgur.com/Y73Cu.png) but what I would like is to avoid printing the `addendum` in the first entry case, like this ![output](http://i.stack.imgur.com/b0JwH.png)


title: citing inside underline/strike out :tex

text: I am working on an article, where I need to strike out or underline some of the sentences with citations. I try to do this as `\uline{sentence1 \citep{reference1}, sentence continued \citep{reference2,reference3}}.` but it shows this warning `extra }, or forgotten \end group`. I tried   1. To add `\protect` in front of each `\citep` or `\citet` which doesn't work.   2. To add the citations as `\mbox{\citex{reference1}}`, which worked and warnings disappeared, but with `\mbox` the page breaks are also disappearing. So, are there any solutions how to strike out/underline keeping the citations intact inside? PS:I'm using `ulem` and `natbib`.


title: Package hyperref's unusual behaviour

text: I edit a newsletter using LaTeX and I find `hyperref` very limiting. I'm using `hyperref` with only one argument: `hidelinks`. If I click on a `\url` link in the newsletter the URL opens in the same window, but without the ability to return to the newsletter via the browser's 'back' button. DUH! How can I emulate the HTML target value `_blank` and open the `\url` in a new window?


title: How to make a subfigure span the two columns in IEEEtrans style?

text: I have three figures that I want to put side by side for the sake of comparison, I am using IEEEtrans. I found solutions for how an equation spans the two columns but not for contiguous figures, any ideas comments will be appreciated, thank you.


title: How can I avoid manual deletion of all helper files when I use psfrag?

text: I have a problem in getting `pstool` to work with `\psfragfig`. I have a folder structure that looks as follows:               main.tex     images/           |           |-testeps.eps      The MWE is shown below. All the packages are included for completeness as that reflects the custom, university provided class file I use. In that class file some other commands are included but those are mostly related to the customisation of the headers and titles and therefore omitted.               \documentclass[a4paper,11pt,twoside,onecolumn,openright]{book}          % Packages found in the class (.cls) file     \RequirePackage{fncychap}     \RequirePackage{ifthen}     \RequirePackage{ifpdf}     \RequirePackage{hyperref}     \RequirePackage{colortbl}     \RequirePackage{geometry}     \RequirePackage{fancyhdr}     \RequirePackage{graphicx}     \RequirePackage{eso-pic}     \RequirePackage{psfrag}     \RequirePackage{nomencl}     \RequirePackage{subfig}     \RequirePackage{caption}          % Packages added by me     \usepackage{pdfsync}                % enable tex source and pdf output syncronicity     \usepackage{natbib}                 % fancy citations     \usepackage{amsmath}                % enables no-number equations {equations*}     \usepackage{tikz}                   % needed to import .tikz graphics     \usepackage{pgfplots}               % needed to import .tikz graphics     \usetikzlibrary{plotmarks}          % needed for tikz scatter plot     \usepackage[section]{placeins}      % keeps figures from floating out of a      \usepackage{pstool}                 % necessary for psfrag with pdflatex          \DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps} %graphicsx package set-up          \begin{document}          Text.          \psfragfig*[width=0.8\linewidth]{images/testeps}     {     \psfrag{A}{$flatplate_2$}     \psfrag{B}{$Plate_2$}     \psfrag{C}{$\gamma$}     }          \end{document}      This MWE compiles fine the first time, but when I try it a second time the output looks like this: ![enter image description here](http://i.stack.imgur.com/JbzPq.png)   The log file has the following error line in it:               ! LaTeX Error: Cannot determine size of graphic in testeps.pdf (no BoundingBox)      I have to manually delete all the files except for the .eps file in the images folder before it works again. Obviously I don't want to delete all the files manually each time before every re-run, so how can I solve this problem? I use TeXShop 3.24 on Mac OSX. **Update 1:** It seems that `pstool` trips over the presence of the .pdf file after it has run the first time. After a first run the image folder contains the following files:               testeps-pstool.aux     testeps-pstool.out     testeps-pstool.pdfsync     testeps.eps     testeps.pdf      If I delete the .pdf file and rerun, all goes well. **Update 2:** It seems that the line               \DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps} %graphicsx package set-up      was giving problems. Removing that line solves my problem.


title: "Argument of \@caption has extra }" error using \makemathbox inside caption

text: I have a math expression which I seem to be unable to use inside a caption. Here's what I want to compile:               \documentclass{article}          \usepackage{amsmath}     \usepackage{mathtools}     \usepackage{MnSymbol}          \begin{document}     \begin{figure}     \caption{$\mathrel{\xleftarrow{\mathmakebox[0.55em]{}}\hspace*{-0.4em}\smallsquare}$}     \end{figure}     \end{document}      If I move the math out of the caption, it compiles fine. (The example is slightly less than minimal; I thought it would be useful to show what the expression does. I can reproduce the problem with the following:               \documentclass{article}          \usepackage{mathtools}          \begin{document}     \begin{figure}     \caption{$\mathmakebox[0.55em]{}$}     \end{figure}     \end{document}      but it doesn't produce any output.)


title: Class Variables

text: I am exploring the use of class options, I was under the impression that optional arguments presented at the point of class declaration, were subsequently presented to all packages used thereafter. Can someone explain to me why the following doesn't produce the output I would expect, which is to pass the geometry arguments (left, right, top, bottom) through to the geometry package.               \documentclass[left=0cm,right=0cm,top=0cm,bottom=0cm]{article}          \usepackage{geometry}     \usepackage{lipsum}          \begin{document}         \lipsum[1-10]          \end{document}


title: Prevent line-breaking after short words

text: The publisher requires that most of short words (shorter then 4 chars, and all the prepositions, etc.) should not be left last on the line but kept with the following word. Wrong:               Following the last theorem, we     can see that ...      Right:               Following the last theorem,      we can see that ...      Yes I can use `sed` to replace such spaces with `~` but that's not right a solutionas it will affect math. P.S. We are using a standard `extbook` class. Thanks in advance.


title: Can/Should I use '\jobname' to pass information from outside LaTeX?

text: I'm creating a _parameterized document_. I want to pass a string into the document from outside at 'compile time'. In particular: a comma-separated list. This list will then be used by LaTeX to resolve internal conditionals. So, depending on the list, some parts of the document will be included and others will not. Preferably, I'd like to pass the list as a simple command line parameter. My first thought would be to use the `-jobname` parameter and retrieve the info from the `\jobname` macro:               > pdflatex input.tex -jobname "a, b, e, g"      Is this an acceptable solution? Could it break anything? Are there perhaps popular packages out there that require `\jobname` to contain the input filename? Or to generalize my question: how would you pass such information into the document?


title: Lyx won't create PDF - "File doesn't exist"

text: I'm new using Lyx, and apparently I don't understand it very well. My problem is when I try to compile a file to pdf. When I click "View", the debug messages shows the following:               08:46:53.880: Previewing ...      08:46:53.901: (buffer-view: Ctrl+R)      08:46:54.064: pdflatex  "New.tex"      08:46:54.373: This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9)     08:46:54.376: entering extended mode 08:46:54.377: ! I can't find file `New.tex'.     08:46:54.379: <*> New.tex 08:46:54.380:      and then it loads for a minute or two, until a message box pops up, which says:               "The command pdflatex "New.tex" has not completed. Do you want to stop     it?"      If I click "Let it Run", it just continues... very slowly... But with no success in the end. If I click Stop, I get the message:               "File does not exist:     C:\Users\JohanEmil\AppData\Local\Temp\lyx_tmpdir.FIEYeMyf6432/lyx_tmpbuff0/New.pdf"      I have googled this problem, and it seems that others have had the same. I see that a lot of people suggest that one should run stuff like               fmtutil --all     updmap --enable Map=txfonts.map     sudo texhash      I don't know how to run this? I somehow sense that it might be from Lyx Preferences --> File Handling --> Converters --> LaTeX (pdflatex) -> PDF (pdflatex)? (If Im wrong, please correct me!) At the moment, it just says `pdflatex $$i` in the "Converter" and `latex=pdflatex` in the "Extra Flag". I'm really confused... Hope someone can help. I would be extremely grateful :)


title: How to override \label to create two \newlabel's?

text: I am attempting to override `\label` so it will automatically create two labels.               \documentclass[11pt,twoside]{book}     \usepackage{hyperref}     \let\origlabel\label     \renewcommand{\label}[1]{\origlabel{vol1:#1}\origlabel{#1}}     \begin{document}     \chapter{Beginning}\label{chap:begin}     \chapter{Middle}\label{chap:middle}     \chapter{End}\label{chap:end}     \end{document}      When I look at the `.aux` file, there are two problems:   1. `\newlabel` command does not contain "vol1".   2. There is only one `\newlabel` per `\label` instead two. **note** Both answers were acceptable based on my original vague question. Accepted answer was able to interpret the complete question (as updated now).


title: Table column partially colored and how to vertically center text inside table

text: I have this MWE:               \documentclass[a4paper,12pt]{article}     \usepackage{color}     \usepackage{colortbl}     \usepackage{longtable}     \usepackage{tabularx}     \usepackage[table]{xcolor}     \usepackage{multirow}     \usepackage{booktabs}     \usepackage{array}     \begin{document}     \begin{longtable}{|p{.3\textwidth}|>{\raggedright\arraybackslash}p{.7\textwidth}|}     \hline     \cellcolor{gray!30}Donnée & \cellcolor{gray!30}Définition \\     \hline     \multicolumn{2}{|p{\textwidth}|}{\cellcolor{green!30} \centering \bfseries Semis} \\     \hline     text & text     \end{longtable}     \end{document}      Here's what I get : ![enter image description here](http://i.stack.imgur.com/k5NV2.png) Why the second line is not entirely colored in green? How to fix it? Second question : how to center **vertically** my text inside the columns?


title: memoir - sidecaption ignore list of figures

text: There is a method presented here on how to selectively ignore list of figures. Is there an equivalent method for sidecaptions in memoir? MWE:               \documentclass{memoir}     \usepackage[english]{babel}     \usepackage{graphicx}          \usepackage{caption}%This is necessary in order to ignore lof          \begin{document}     \listoffigures\clearpage          \begin{figure}     \begin{sidecaption}{Main caption}[fig:label]%unfortunately appears in lof     \includegraphics[width=0.5\textwidth]{Picture}     \end{sidecaption}     \end{figure}          \begin{figure}     \centering     \includegraphics[width=0.5\linewidth]{Picture}     \caption[]{Main caption} %does not appear in lof     \end{figure}     \end{document}


title: add unit circle to a plot

text: I have a point-by-point plot (`pgfplots` option `only marks`) in which I display the real and imaginary part of some points in the complex plane. I would like to add the unit circle to the plot, for scale, that is, the circle $x^2+y^2=1$. I have tried doing it with `\draw (axis cs:0,0) circle (1);`. However, the circle is way too small, since that radius "1" is not interpreted as having the same length as the unit length of the axes, but is an arbitrary unit. Of course `axis cs:1` won't work, since `1` is not a coordinate pair but a single number. I do not see in the docs any equivalent of `axis cs:` for lengths. Any suggestions on how to do it? MWE:               \documentclass{standalone}     \usepackage{tikz,pgfplots}     \begin{document}     \begin{tikzpicture}      \begin{axis}      \addplot[scatter,only marks,mark=x]     coordinates     {(2,-1) (1.5,-2) (-1,0) (0,1) (0,0.5)};     \draw[color=red] (axis cs:0,0) circle (10);     \end{axis}     \end{tikzpicture}     \end{document}      (the circle radius has been scaled up to 10 to make it more visible; with 1 it would be very small) Result: ![enter image description here](http://i.stack.imgur.com/EnVyS.png)