title: How to change fontfamily for memoir chapter style bringhurst

text: I am trying to change `bringhurst` chapter style's titles to `\sffamily`. The following code works with other chapter styles (`dash`, for example), but not for `bringhurst`. What's the difference?               \documentclass[12pt,ebook]{memoir}          \usepackage{color}          \chapterstyle{bringhurst}     \renewcommand{\chaptitlefont}{\normalfont\bfseries\sffamily}           \begin{document}          \chapter{Title}          \end{document}


title: How to set indentation within grammar environment?

text: I'm using `mdwtools` and `syntax` package to write BNF grammar, I wonder is there a way to set the `parindent` so that each production line will be center algined instead of left aligned by default? **Minimal Example**               \documentclass[10pt,letterpaper]{article}       \usepackage{mdwtab}     \usepackage{syntax}           \setlength{\grammarparsep}{0.25cm}   % vertical distance between production rules     \setlength{\grammarindent}{1cm}      % horizontal indent distance               \renewcommand{\syntleft}{}          % do not display '<' associated with variable, for example <A>     \renewcommand{\syntright}{}         % do not display '>' associated with variable, for example <A>          % Note: the empty line between production rules is not optional!          \begin{document}         \begin{grammar}             <A> $\rightarrow$ B | c | d                  <B> $\rightarrow$ B                  <C> $\rightarrow$ D          \end{grammar}     \end{document}      **Update** (`\phantom` solution)               \begin{grammar}\centering             <S> $\ra$ abB                   <A> $\ra$ aaBb                  <B> $\ra$ bbAa                  <A> $\ra$ $\lambda$     \end{grammar}


title: scrartcl and fancyhdr: Strange spacing behaviour

text: Consider the following piece of code:               \documentclass{scrartcl}     \usepackage{ifthen}     \usepackage{fancyhdr}     \pagestyle{fancy}     \lhead{}     \chead{         \ifthenelse{\equal{\thepage}{1}}{}{                         \textbf{foo}\\                         \textbf{bar}\\                         \textbf{baz}             }     }     \rhead{}     \lfoot{}     \cfoot{}     \rfoot{}     \renewcommand{\headrulewidth}{0pt}          \begin{document}     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     \newpage     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     \newpage     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     \end{document}      This is how pages 2 and 3 of the example look like: ![enter image description here](http://i.stack.imgur.com/EGsll.png) as you can see the rows of _x_ are not at the same height. Additionall _baz_ does not start where _foo_ and _bar_ do - it is a bit more at the left. Do you have any idea what the problem might be?


title: Algorithm2e Comment Lines w/out semicolons

text: For some reason even when I enable `\DontPrintSemicolon` there are still semicolons on lines with comments. This is in Algorithm2e version 3.9.               \documentclass[12pt]{article}     \usepackage[lined,boxed]{algorithm2e}% using version 3.9     \usepackage{amsmath}          \newcommand*{\DontPrintSemicolon}[0]{\dontprintsemicolon}%remove for 5.0          %define defaults for algorithm2e     \let \oriAlgorithm=\algorithm     \renewcommand{\algorithm}[2]{       \oriAlgorithm  % Begin document         \SetLine         \DontPrintSemicolon         \SetKwComment{Comment}{}{}         \Titleofalgo{ #1 }         \caption{ #2 }     }          \newcommand*{\Set}[2]{ #1 $\gets$ #2 }     \newcommand*{\SetC}[3]{ #1 $\gets$ #2 \Comment*[r]{#3} }          \begin{document}       \begin{algorithm}{test}{test to show semicolons existence}         \SetC{$f$}{$true$}{Some comment}\;         \Set{$f$}{$\lnot f$}\;         \Return{$f$}\;       \end{algorithm}     \end{document}      ![compiled latex png](http://i.stack.imgur.com/IQ95O.png)


title: Automating custom entry names in glossary

text: I've been trying to get used to the glossary package but I'm having quite some problem as I'm probably doing some mistakes as I've always to manually edit .gls file.               \newglossaryentry{cars}{name=cars, description={Something you can drive}}     \newglossaryentry{apples}{name=apples, description={Something you can eat}}     \makeglossaries      with references               \gls{cars} .... \gls{apples}      Doing this will leave my text correct but will add the plural form of the words in the glossary, while trying to put in either the first brackets or as name value the singular version will solve the problem in the glossary but put the singular form in the text. Of course I've solved myself manually editing the .gls file but it doesn't seem the right way to do it to me, am I missing anything ? (I'm using xindy and toc, I don't know if it counts )


title: Equations as pictures in text

text: Is there a way to compile a document with pdflatex and render all displaymath into graphics which are then included in the document instead of the equation code itself? Analogous to what you can do with tikz graphics and the externalize library?


title: How can I change the line distances without affecting the footnote distances?

text: I know that by `\renewcommand{\baselinestretch}{number}` it is possible to change the line distances, but it would also change the footnote distances. How can I only change the line distances in the main text? I think there should be some changes in macros of `\@footnote` or some thing like this. Any idea?


title: Components of (La)TeX's memory usage

text: After reading Increase LaTeX capacity and not being able to summon Gandalf1, I am curious to know what contributes to the components of memory usage during a (La)TeX compilation. Take the above post's output as an example:               l.3593 ...temp.png}          If you really absolutely need more capacity,     you can ask a wizard to enlarge me.               Here is how much of TeX's memory you used:      31937 strings out of 94500      1176767 string characters out of 1176767      272586 words of memory out of 1000000      24170 multiletter control sequences out of 10000+50000      11185 words of font info for 39 fonts, out of 500000 for 2000      580 hyphenation exceptions out of 1000      28i,7n,36p,345b,3810s stack positions out of 1500i,500n,5000p,200000b,5000s     PDF statistics:      33619 PDF objects out of 300000      7356 named destinations out of 131072      48094 words of extra memory for PDF output out of 65536     !  ==> Fatal error occurred, the output PDF file is not finished!      What, in a "regular document" that includes packages, contains user-defined macros and environments, constitutes a `string`, a `string character`, a `word`, a `multiletter control sequence`, `words of font`, a `hyphenation exception`, `stack positions` and (when running `pdftex`) a `PDF object`, a `named destination` and `word of extra memory`? The intent of this question is more to understand where one might run into problems if you are (say) compiling a 4000 page document \- yikes! Perhaps, a more realistic scenario might be that you are typesetting a _very large document_ and you include a large number of packages even though you only use a select few macros/environments from each package. (La)TeX still loads the _entire_ package into memory, leaving you with less to work with. Reading pdf objext/destinations/memory limits only suggests where one might have problems and perhaps how to boost (La)TeX's available capacity. However, it doesn't state which parts of the document contribute to which memory component. Similar to other posts I've found. Some of the memory output may be self-explanatory, but not all. For example, `multiletter control sequences` probably refer to definitions like `\newcommand{\mycom}{...}` and `\def\stuff{...}` each of which I assume puts a +1 to the tally. However, this seems to exclude `\def\a{...}` since it is a `single letter control sequence`? Also, does `\def\stuff{...}` add +1 to the `string` and +5 to the `string characters`? Understand this will probably not sway me from any of my current usages, since they have never given me memory problems of such a nature without the problem being on my end rather on the compiler's. However, it may improve future (La)TeX programming of macros/environments. * * * 1 By the way, TeX's output of `If you really absolutely need more capacity, you can ask a wizard to enlarge me.` is just epic.


title: How to have bold font in mdframed environment?

text: I did not find bold word in the manual. My tex is:               \documentclass{article}     \usepackage[framemethod=tikz]{mdframed}     \newtheorem{question}{Question}     \mdfdefinestyle{que}{       linecolor=cyan,       backgroundcolor=cyan!20,     }     \surroundwithmdframed[style=que]{question}     \begin{document}     \begin{question}     Lorem. % No bolding needed here so save space here, but need to fix the above     \end{question}     \end{document}      How can you have bold font in mdframed environment?


title: Conflict between xparse and pstricks: pstricks doesn't believe xparse function is defined

text: I want to create a `pspicture` with a variety of parameters which are interdependent. I'm using `expl3` for the interface. But I get an error when I try to use `\getr`               Error: /undefined in \getr     Operand stack:        --nostringval-- 56.9055  0.0      Initially, I had no ideas of where the error was arising from. I've now tried quite a few different ways to replicate the error. Most of them do **not** fail. The only time I get a fail is when I'm using `xparse` to define the interface I want. Here's my MWE:               \documentclass{article}     \usepackage{xparse}     \usepackage{pst-eucl}     \usepackage[margin=1in]{geometry}     \psset{unit=1cm}     \pagestyle{empty}     %%     \ExplSyntaxOn         \cs_generate_variant:Nn \int_eval:n {c}         \NewDocumentCommand{\setr}{ m m }             {                 \int_if_exist:cF { g__ace_angle_ #1 _int }                 { \int_new:c { g__ace_angle_ #1 _int }}                 \int_gset:cn  { g__ace_angle_ #1 _int }                               {\int_eval:n {#2}}             }         \NewDocumentCommand{\getr}{ m }             {                 \int_eval:c  { g__ace_angle_ #1 _int }             }         %%         \setr{r1}{-30}         \setr{u1}{\getr{r1}+90}         %%         \newcounter{dummy}\setcounter{dummy}{-30}         \newcommand{\asimplecommand}{-30}         \newcommand{\expliiimacro}{\int_eval:n {\asimplecommand + 60}}         \newcommand{\argdependentmacro}[1]{\ifcase#1\relax-30\or0\or30\or60\fi}         \NewDocumentCommand{\xparsemacroA}{ }{120}         \NewDocumentCommand{\xparsemacroB}{ m }{#1}         \cs_new:Npn \latexiiimacro #1 { #1 }     \ExplSyntaxOff     \setlength{\parindent}{0ex}     \setlength{\parskip}{5ex}     \begin{document}          Works:\hspace*{1in}\texttt{getr(r1)=}$\getr{r1}$\newline     Works:\hspace*{1in}\texttt{getr(u1)=}$\getr{u1}$     \vspace{1cm}          \textbf{It's not a problem with passing a counter-like thingy:}\newline     Works:       \begin{pspicture}[shift=-1](-1,-1)(1,1)         \pstGeonode(0,0){o}(1,0){r}         \pstRotation[RotAngle=\thedummy]{o}{r}[r1]          \pstRotation[RotAngle=-60]{o}{r}[u1]      \end{pspicture}          \textbf{It's not a problem with a command:}\newline     Works:     \begin{pspicture}[shift=-1](-1,-1)(1,1)         \pstGeonode(0,0){o}(1,0){r}         \pstRotation[RotAngle=\asimplecommand]{o}{r}[r1]          \pstRotation[RotAngle=-60]{o}{r}[u1]      \end{pspicture}          \textbf{It's not with a command name whose internals are defined with \texttt{expl3}:}\newline     Works:     \begin{pspicture}[shift=-1](-1,-1)(1,1)         \pstGeonode(0,0){o}(1,0){r}         \pstRotation[RotAngle=\expliiimacro]{o}{r}[r1]          \pstRotation[RotAngle=-60]{o}{r}[u1]      \end{pspicture}          \textbf{It's not a problem with first having to evaluate an argument:}\newline     Works:     \begin{pspicture}[shift=-1](-1,-1)(1,1)         \pstGeonode(0,0){o}(1,0){r}         \pstRotation[RotAngle=\argdependentmacro{2}]{o}{r}[r1]          \pstRotation[RotAngle=-60]{o}{r}[u1]      \end{pspicture}          \textbf{It's not a problem with command name defined in \texttt{latex3}:}\newline     Works:     \begin{pspicture}[shift=-1](-1,-1)(1,1)         \pstGeonode(0,0){o}(1,0){r}         \pstRotation[RotAngle=\latexiiimacro{-120}]{o}{r}[r1]          \pstRotation[RotAngle=-60]{o}{r}[u1]      \end{pspicture}          \textbf{What about \texttt{xparse}:}\newline     Fails:     \begin{pspicture}[shift=-1](-1,-1)(1,1)         \pstGeonode(0,0){o}(1,0){r}         \pstRotation[RotAngle=\xparsemacroA]{o}{r}[r1]          \pstRotation[RotAngle=-60]{o}{r}[u1]      \end{pspicture}          \textbf{What about \texttt{xparse}:}\newline     Fails:     \begin{pspicture}[shift=-1](-1,-1)(1,1)         \pstGeonode(0,0){o}(1,0){r}         \pstRotation[RotAngle=\xparsemacroB{120}]{o}{r}[r1]          \pstRotation[RotAngle=-60]{o}{r}[u1]      \end{pspicture}          Fails:     \begin{pspicture}(-1,-1)(1,1)         \pstGeonode(0,0){o}(1,0){r}(0,1){u}         \pstRotation[RotAngle=\getr{r1}]{o}{r}[r1]          \pstRotation[RotAngle=-60]{o}{r}[u1]      \end{pspicture}          \end{document}      Producing: ![enter image description here](http://i.stack.imgur.com/yMyAc.png) Of all the methods I'm using, only `xparse` seems to result in the error:                Error: /undefined in \xparsemacro      That's actually the last place I thought I'd have a problem. Any ideas?


title: Tabular: l{unit}?

text: I would like to define a few table columns with fixed width, just like p{2cm}, but I prefer the text to be flushed left, instead of justified. So basically something like l{2cm}. Is there a way to achieve that without having to touch every cell?


title: Boldface for undescore in math mode

text: I need to insert an equation which contains the term `x_y` (`y` is subscript). The term must also be boldfaced. How do I achieve this in LaTeX?


title: Can't plot a surf from MATLAB using pgfplots

text: for whatever reason I cannot come up with I am not able to plot a surf figure I have generated in MATLAB and then converted to tikz using the script available here. I am getting the following errors: > ! Package pgfkeys Error: I do not know the key '/tikz/axis lines' and I am > goin g to ignore it. Perhaps you misspelled it. > > ! Package pgfkeys Error: I do not know the key '/tikz/surf' and I am goin g > to ignore it. Perhaps you misspelled it. > > ! Package pgfkeys Error: I do not know the key '/tikz/colormap/jet' and I am > goin g to ignore it. Perhaps you misspelled it. > > ! Package pgfkeys Error: I do not know the key '/tikz/shader' and I am goin > g to ignore it. Perhaps you misspelled it. I initially thought that it was because of the version I am using of tikz/pgsplots, but I donwloaded the latest versions and I am now using them but still get the same errors... Funny thing is that other plots that use the same "unknown" tags (i.e: \begin{axis}) work perfectly.. Here is the code I am trying to compile. Any guess?               \documentclass{article}          \usepackage{/tmp/pgf_2.10.tds/tex/latex/pgf/frontendlayer/tikz}     \usepackage{/vol/vssp/mesh-animation/Documents/Publications/TVCG2012/extraevaluation/LaTeX/pgfplots_1.5.1/tex/latex/pgfplots/pgfplots}          \newlength\figureheight      \newlength\figurewidth      \setlength\figureheight{6cm}      \setlength\figurewidth{6cm}          \begin{document}     \begin{tikzpicture}          \begin{axis}[     view={64}{26},     width=\figurewidth,     height=\figureheight,     scale only axis,     xmin=1, xmax=11,     xmajorgrids,     ymin=1, ymax=11,     ymajorgrids,     zmin=275, zmax=320,     zmajorgrids,     axis lines=left,     grid=none]          \addplot3[     surf,     opacity=0.5,     colormap/jet,     shader=faceted]     coordinates{      (1,1,317.78)(1,2,313.118)(1,3,308.644)(1,4,304.398)(1,5,300.435)(1,6,296.847)(1,7,293.804)(1,8,291.48)(1,9,290.175)(1,10,290.13)(1,11,291.368)          (2,1,313.066)(2,2,308.339)(2,3,303.818)(2,4,299.548)(2,5,295.597)(2,6,292.067)(2,7,289.147)(2,8,286.993)(2,9,285.917)(2,10,286.203)(2,11,287.879)          (3,1,308.557)(3,2,303.803)(3,3,299.283)(3,4,295.054)(3,5,291.201)(3,6,287.85)(3,7,285.172)(3,8,283.275)(3,9,282.451)(3,10,283.034)(3,11,285.119)          (4,1,304.275)(4,2,299.54)(4,3,295.084)(4,4,290.979)(4,5,287.331)(4,6,284.248)(4,7,281.877)(4,8,280.299)(4,9,279.764)(4,10,280.635)(4,11,283.095)          (5,1,300.253)(5,2,295.6)(5,3,291.288)(5,4,287.399)(5,5,284.021)(5,6,281.256)(5,7,279.238)(5,8,278.021)(5,9,277.839)(5,10,279.029)(5,11,281.83)          (6,1,296.547)(6,2,292.054)(6,3,287.964)(6,4,284.349)(6,5,281.291)(6,6,278.878)(6,7,277.241)(6,8,276.432)(6,9,276.662)(6,10,278.21)(6,11,281.344)          (7,1,293.183)(7,2,288.92)(7,3,285.106)(7,4,281.814)(7,5,279.117)(7,6,277.095)(7,7,275.878)(7,8,275.519)(7,9,276.207)(7,10,278.174)(7,11,281.647)          (8,1,290.351)(8,2,286.358)(8,3,282.855)(8,4,279.909)(8,5,277.591)(8,6,275.979)(8,7,275.203)(8,8,275.312)(8,9,276.483)(8,10,278.879)(8,11,282.666)          (9,1,288.032)(9,2,284.347)(9,3,281.187)(9,4,278.618)(9,5,276.71)(9,6,275.536)(9,7,275.229)(9,8,275.835)(9,9,277.49)(9,10,280.298)(9,11,284.359)          (10,1,286.265)(10,2,282.921)(10,3,280.134)(10,4,277.975)(10,5,276.508)(10,6,275.805)(10,7,276.011)(10,8,277.127)(10,9,279.246)(10,10,282.397)(10,11,286.674)          (11,1,285.069)(11,2,282.101)(11,3,279.727)(11,4,278.015)(11,5,277.026)(11,6,276.847)(11,7,277.598)(11,8,279.215)(11,9,281.721)(11,10,285.143)(11,11,289.588)          };          \end{axis}     \end{tikzpicture}     \end{document}       Cheers!


title: Tikz: Correct arrows at the end of parametric curves?

text: \documentclass[11pt]{amsart}      \usepackage{tikz}      \begin{document}     \begin{tikzpicture} [scale=4]     \draw[domain=0:0.4, smooth, variable=\t, samples=200, ->] plot({(1/sqrt(2)*(\t-\t^3)},     {(1/sqrt(2)*(\t+\t^3)});     \draw[domain=0:0.4, smooth, variable=\t, samples=200, ->] plot({\t}, {-\t^3});     \end{tikzpicture}     \end{document}      Hi the arrows will only point up at the end of my parametric curves. Is there a way I can fix this? Edit: Removing the smooth option fixed it. I thought I needed that for obvious reasons. Thanks, Jesse!


title: Aligning tangents of graphs

text: I am drawing some graphs with tangents. I calculated the tangent should be centered at `x=57/27` which is approximately `x=2.11`. I'm currently using the `pos` and `sloped` keys for nodes to draw tangents, but I'm not happy about the result; the tangents don't really align. I think this is because the `pos` key calculates the actual length of the graph while the graphs don't have the same length. I'm sure I can somehow let `LaTeX` do the calculations for me so as to align the slopes vertically at an `x` value of my choice. But how? PS: The below document requires a working installation of `gnuplot` to compile. ![enter image description here](http://i.stack.imgur.com/ClMFu.png)               \documentclass{standalone}       \usepackage{pgfplots}     \pgfplotsset{compat=1.10}     \usetikzlibrary{arrows, decorations.markings,intersections}          \makeatletter     \tikzset{         nomorepostaction/.code=\makeatletter\let\tikz@postactions\pgfutil@empty,          my axis/.style={             postaction={                 decoration={                     markings,                     mark=at position 1 with {                         \arrow[ultra thick]{latex}                     }                 },                 decorate,                 nomorepostaction             },             thin,             -,             every path/.append style=my axis         }     }     \makeatother          \definecolor{headtitle}{RGB}{167,63,63}          \begin{document}     \begin{tikzpicture}       \begin{axis}[%           axis line style={my axis},           xlabel = $U_A$,           ylabel = $S$,           xmin = 0, xmax = 3.25,           ymin = 0,           xtick={1,1.5},           xticklabels={$U_{B,\mathrm{initial}}$,$U_{A,\mathrm{initial}}$},           xticklabel style={                 inner sep=0pt,                 anchor=north east,                 rotate=35             },           ytick=\empty,           height=.66\linewidth, width=\linewidth-4.5\tabcolsep,           axis lines*=left,           every axis y label/.style={at=(current axis.above origin),anchor=east},           every axis x label/.style={at=(current axis.right of origin),anchor=west}]%         \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%           set samples 51;           plot [0:3] log(3*(3-x)+1);           } node[sloped,above,pos=.63333,           minimum height=1cm,minimum width=1cm] (SB) {} node[pos=0.6,pin=45:{\color{black}{$S_B$}}] {};          \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%           set samples 51;           plot [0:3] log(9*x^2+6*x+1);           } node[sloped,above,pos=.83333,           minimum height=1cm,minimum width=1cm] (SA) {} node[pos=0.25,pin=-15:{\color{black}{$S_A$}}] {};           \addplot+[mark={},draw=headtitle] gnuplot[raw gnuplot] {%           set samples 51;           plot [0:3] log(9*x^2+6*x+1)+log(3*(3-x)+1);           } node[sloped,above,pos=.775,           minimum height=1cm,minimum width=1cm] (St) {} node[pos=0.525,pin=165:{\color{black}{$S_\mathrm{total}$}}] {};          \path (SB.south east) edge[headtitle,very thick] node {} (SB.south west);          \path (SA.south east) edge[headtitle,very thick] node {} (SA.south west);          \path (St.south east) edge[headtitle,very thick] node {} (St.south west);       \end{axis}%     \end{tikzpicture}%     \end{document}


title: tikz/foreach: Protect space after "iteration variable"

text: I try to draw some nodes in tikz, and as they are very simple I wanted to "shorten" this using a `\foreach` command:               \foreach \xnum in {1,2,3,4,5}     {         \node at (X\xnum center) {$x_\xnum$};     }      You can insert this into any MWE with a `tikzpicture` environement which has some nodes X1, X2, ... defined. (In my case, this are rectangles, using this: http://tex.stackexchange.com/a/47797/22276 ) The problem with this is, that the space after `\xnum` is not preserved, which is why I get the following error on running pdflatex:               ! Package pgf Error: No shape named X1center is known.      Any idea how to solve this?


title: Greek letter in math mode appears lower than the rest of the statement

text: This is my first time using the math mode. My problem is visible in the following screen capture. I find that the lower-case _chi_ letter is rendered lower than the latin characters. Is that normal? ![alt text](http://i.stack.imgur.com/1gd2M.png) A test text and my relevant packages are below:               \documentclass[12pt,titlepage]{article}     \usepackage{setspace}     \setstretch{1.6}     \usepackage[final,babel]{microtype}          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua:  $\chi^{2} = 123.4567$ Ut enim ad minim veniam, quis nostrud exercitation ullamco labori nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.      Thank you.


title: How can add a line to block environment in Beamer?

text: I would like to define a block environment as illustrated in the figure in the link ![enter image description here](http://i.stack.imgur.com/HXn7v.png) I made this block using the code               \begin{block}{My title\\ \vspace{-1.25em} \line(1,0){312}}\vspace{-0.7em}                  teste     \end{block}      Does someone knows how to do that? BTW, how can I change the title font using XeLaTeX?


title: Center vertically in tabularx with multiple font size and arraystretch

text: I would like to find a way to make boxes with a colored background, that take the whole width available, with variable text size and variable arraystretch. For the moment, the best solution I've found is to use tabularx but depending on the combination of text size and arraystretch factor, the text is often not vertically aligned. Here is an example with 3 text size and 2 arraystretch factors :               \documentclass{article}     \usepackage[table]{xcolor}     \usepackage{array}     \usepackage{tabularx}               \begin{document}          \setlength{\arrayrulewidth}{0pt} \renewcommand{\tabularxcolumn}[1]{>{\centering\arraybackslash}m{#1}}          \section{Arraystretch == 1}                  \renewcommand{\arraystretch}{1}             \begin{tabularx}{\linewidth}{X} \rowcolor{lightgray}  \begin{normalsize}Title\end{normalsize}  \end{tabularx}                   \begin{tabularx}{\linewidth}{X} \rowcolor{lightgray}  \begin{Large}Title\end{Large}  \end{tabularx}                   \begin{tabularx}{\linewidth}{X} \rowcolor{lightgray}  \begin{Huge}Title\end{Huge}  \end{tabularx}           \section{Arraystretch == 1.5}                  \renewcommand{\arraystretch}{1.5}             \begin{tabularx}{\linewidth}{X} \rowcolor{lightgray}  \begin{normalsize}Title\end{normalsize}  \end{tabularx}                   \begin{tabularx}{\linewidth}{X} \rowcolor{lightgray}  \begin{Large}Title\end{Large}  \end{tabularx}                   \begin{tabularx}{\linewidth}{X} \rowcolor{lightgray}  \begin{Huge}Title\end{Huge}  \end{tabularx}           \end{document}      In this example, the first 3 tabularx are not vertically aligned, the text touches the top. With the arraystretch factor set to 1.5, depending on the size of the font, the text is aligned or touches the top. I would like a solution that always center vertically the text, regardless of the font size and the arraystretch factor.


title: Avoid line break after macro

text: The following example produces a line break after the second text.               \define[2]\smallfigure{\placefigure[margin][#1]{#2}{!}}%          \starttext      text text\smallfigure{fig1}{A}text text      \stoptext      ![linebreak_example](http://i.stack.imgur.com/QYapu.png) The ConTeXt FAQ addresses this explicitly. However, although the problem seems identical, changing the macro to               \define[2]\smallfigure{\dontleavehmode\placefigure[margin][#1]{#2}{!}}%      does not work as intended and avoiding the macro altogether               \starttext      text text\dontleavehmode\placefigure[margin][]{A}{!}text text      \stoptext       does not work either. Is there a way to avoid the line break?


title: How to change the formatting/font of page numbers?

text: So, I'm using the article class, and I'd like to make the page number smaller, and set it in a different font. I don't need to create a new pagestyle, necessarily, and I'm hesitant to do so without understanding the ramifications.


title: Using Harvard referencing style

text: Can someone point me to some good instructions and resources on how to setup Harvard referencing style (a.k.a. Author-year) with bibtex in a LaTeX document? The final formatting of the bibliography should look as in this page: http://libweb.anglia.ac.uk/referencing/harvard.htm I'm not totally new to LaTeX itself, but didn't use BibTex a lot, other than the default, predefined setup.


title: Global use of values obtained in draw let

text: In one of my `tikzpicture`s, I found an angle I labelled `\n2`. I would like to use this value to rotate a node. However, when I try, in the node options, `rotate = \n2`, I am told undefined control sequence. My guess is `\n2` is only accessible in the `\draw let` command. Can I set `\n2` to be used globally? * * *               \documentclass[tikz, convert = false]{standalone}%          \usetikzlibrary{calc}     \usetikzlibrary{intersections}          \begin{document}     \begin{tikzpicture}[line join = round, line cap = round]       \coordinate (O) at (0, 0);            \draw (O) -- +(3, 0) coordinate (P1);       \draw[name path = sline] (O) -- (3, 2) coordinate (P2);            \draw[-stealth] let         \p0 = (O),         \p1 = (P1),         \p2 = (P2),         \n1 = {atan2(\y1 - \y0, \x1 - \x0)},         \n2 = {atan2(\y2 - \y0, \x2 - \x0)},         \n3 = {1cm},         \n4 = {(\n1 + \n2)/2}       in (O) +(\n1:\n3) arc[radius = \n3,       start angle = \n1, end angle = \n2] node[right, font = \tiny] at (\n4:\n3)       {$\theta$} \pgfextra{\xdef\myn{\n2}} ;            \path[name path = line1] (1.5, 0) -- +(0, 1.25);       \path[name path = line2] (2, 0) -- +(0, 1.5);       \path[name intersections = {of = sline and line1, by = P3}];       \path[name intersections = {of = sline and line2, by = P4}];            \draw (P3) -- ($(P3)!.25cm!-90:(O)$) coordinate (P5);       \draw (P4) -- ($(P4)!.25cm!-90:(O)$) coordinate (P6);       \draw (P5) -- (P6) node[pos = .5, below, font = \tiny, rotate = {\n2}] {$M$};     \end{tikzpicture}     \end{document}      No matter where I place `\pgfextra{\xdef\myn{\n2}}` after in, I get undefined control sequence


title: Why do some fonts used by siunitx and textcomp look rasterized?

text: For example, the mu in `\SI{1.55}{\micro\metre}` looks really bad for some reason. For `textcomp`, `\textmu` looks the same.


title: Automatic section body generation using text extracted from the rest of the document

text: > **Possible Duplicate:**   >  Extract all emphasized words from latex document I'm writing a report which involves a comparative analysis of some standards. Throughout the body of my report, I have a detailed comparison of minor and major issues. However, at the end of the document, I want a separate section which will only highlight the major differences, for someone who doesn't have time to go through the detailed report. For this, I basically want to extract specific lines from the rest of the document and insert them in my final section. But I want this insertion to be automatic, such that **when I mark a particular line of text in my document, it will automatically get added to this final section** , i.e. something that works like automatic Table of Content generation based on the section names. I don't know how else to phrase this question. Any help would be much appreciated.


title: Table will not center (and it is spilling off the right side of the page)

text: I just generated this table using Excel2LaTeX: ![alt text](http://i.stack.imgur.com/7nBoX.png) Even though I enclosed the table in `\begin{center}` the table did not get centered. The table still sticks out the right side. Is there somehow that I can easily fix this? This is the code for the table:               \begin{center}     \begin{tabular}{rrrrrrr}                  &    MSRP & Vol. Disc. & Promo. Allow. & Discount/Sale & Promo/Sale & Income/Sale \\          {\bf All Round} & {\bf \$5.49} & {\bf 30.0\%} & {\bf 13.0\%} & {\bf \$1.65} & {\bf \$0.71} & {\bf \$2.36} \\          {\bf All Round (suggestion)} & {\bf \$5.49} & {\bf 25.0\%} & {\bf 20.0\%} & {\bf \$1.37} & {\bf \$1.10} & {\bf \$2.47} \\          Believe &  \$3.99 &  33.5\% &  15.6\% &  \$1.34 &  \$0.62 &  \$1.96 \\          Best Help &  \$4.59 &  34.5\% &  13.3\% &  \$1.58 &  \$0.61 &  \$2.19 \\          Coughcure &  \$4.69 &  28.5\% &  16.7\% &  \$1.34 &  \$0.78 &  \$2.12 \\           Defogg &  \$4.09 &  22.5\% &  11.1\% &  \$0.92 &  \$0.45 &  \$1.37 \\          Dripstop &  \$4.09 &  21.5\% &  13.3\% &  \$0.88 &  \$0.54 &  \$1.42 \\          {\bf Dryup} & {\bf \$4.79} & {\bf 21.5\%} & {\bf 15.6\%} & {\bf \$1.03} & {\bf \$0.75} & {\bf \$1.78} \\          Effective &  \$4.09 &  30.0\% &  14.4\% &  \$1.23 &  \$0.59 &  \$1.82 \\              End &  \$4.49 &  30.0\% &  14.4\% &  \$1.35 &  \$0.65 &  \$1.99 \\            Extra &  \$4.09 &  31.0\% &  12.5\% &  \$1.27 &  \$0.51 &  \$1.78 \\          \end{tabular}       \end{center}


title: Drawing a curve with TikZ

text: I want to draw something like this using TikZ: ![curve example](http://i.stack.imgur.com/SRzyS.png) I can probably make the curve using controls but that wouldn't allow me to draw the points on it.


title: Beamer, TiKZ, and commutative diagrams

text: I have a commutative diagram that renders without issue in a memoir document, but, when I copy the code into a beamer slide, the mapping text becomes super imposed over the arrows. Is there a solution to this? A few Google searches find nothing.


title: xymatrix using lyx

text: I'm trying to draw in LyX, using `XYmatrix`. I'm using it with the `Ctrl`+`shift`+`M` command, and then using the `\xymatrix` to start "drawing" what i want. I'm having a problem doint a "hookrightarrow" between to sets, and I wonder if anyone knows how to do it using LyX. I do know that i need to write something like `- \ar@{^(->}` , but my main problem is with the `^` sign.. is it needs to be `shift`+`6`, or should it be something else? I know that its a silly question, but im really stuck, and haven't found the answer in the previous questions that was asked.   Can you give me a hand with it?


title: Arrow heads on \twoheadrightarrow

text: The arrow heads on `\twoheadrightarrow` don't look like the arrow heads on `\rightarrow` and `\hookrightarrow`. Is there some way of fixing this? For instance, the code               \documentclass{article}     \usepackage{amssymb}          \begin{document}     \[ \hookrightarrow \twoheadrightarrow \rightarrow \]     \end{document}      produces an output as follows. ![Arrow heads](http://i.stack.imgur.com/hL52P.jpg)


title: Number sections on leaflet

text: Using the `leaflet` class, sections are not numbered. If I try to use               \renewcommand\thesection{\arabic{section}. }      it doesn't change anything. Is there a way to number sections in `leaflet`?


title: Problem Using JD Font

text: I would like to use the JD font in LaTeX documents. When I try to typeset the following example               \documentclass{article}          \usepackage{emerald}     \usepackage[T1]{fontenc}          \begin{document}          Words. {\ECFJD More words.}          \end{document}      I get the error message               ! Font T1/fjd/m/n/10=fjdmw8t at 10.0 pt not loadable: Metric (TFM) file not found.      I am using TeXShop on a Mac OS 10.6. I downloaded the `zip` file for the font at http://www.ctan.org/tex-archive/fonts/emerald/, and it is in the following directory: `~/Library/texmf/tex/latex`. I don't know anything about installing fonts and assume I've done it wrong, but I have no idea how to make it work.


title: Defining a macro whose syntax includes another macro's syntax

text: I've defined the following macro:               \begingroup     \lccode`\~=`\#%     \lowercase{\endgroup%     \def~ #1\par}{%     \begingroup\def\par{\endgroup\par}%     \section*{#1}\par}%     \catcode`\#=13      But if I go on to define a command such as               \begingroup     \lccode`\~=`\#%     \lowercase{\endgroup%     \def~~ #1\par}{%     \begingroup\def\par{\endgroup\par}%     \subsection*{#1}\par}%     \catcode`\#=13      while `## Test` now works as expected, any usages of `# Test` no longer function, and the console returns an error stating that `Use of # doesn't match its definition.`. How can I configure a macro of this variety so that both macros work as expected?


title: Box or sidebar for additional text

text: I'm not sure of the name of what I need. I would like to set some text in a box or sidebar, as I've seen in some textbooks. The main text will refer the reader to the sidebar for more details. I would like this shaded. There is too much text for `marginpar`. I could just use a float figure? I'd prefer it to be half the width of the page though. Is there an easy way to achieve this? I'm not sure what search terms to use to find out about this.


title: Generate table of contents when \section* (sections without numbering) has been used

text: Is it possible just to generate a table of contents based on sections in asterisk mode, i.e., `\section*`? I basically just want the table of contents without section numbers. Like a list of headings and their associated pages. The following doesn't generate a ToC:               \documentclass[12pt,a4paper]{article}          \begin{document}          \tableofcontents          \subsection*{Section 1}          \subsection*{Section 2}          \end{document}


title: How to list citing papers under each of my paper?

text: I have papers p1, p2, p3, .... Under each of them, i'd like to list papers that cite them:               p1     [1] c11     [2] c12     ...          p2     [1] c21     [2] c22     ...          ...      I can build `*.bib` files for each of my papers, but I don't know how to use them to form the above formatting. p1, p2, ... are in `mine.bib`. c11, c12, ... are in `citee1.bib`. c21, c22, ... are in `citee2.bib`. ...


title: Problem about pattern and gradient

text: I draw a graph using the code below . ![enter image description here](http://i.stack.imgur.com/QEhCW.jpg)               \documentclass[tikz]{standalone}     \usetikzlibrary{         shapes.geometric,         positioning,         fit,         calc,         patterns     }     \usepackage{tikz}     \usepackage{scalefnt}     \begin{document}          \pgfkeys{/tikz/.cd,       gradient style init/.initial=left color,       gradient style init/.get=\grsi,       gradient style init/.store in=\grsi,       gradient style end/.initial=right color,       gradient style end/.get=\grse,       gradient style end/.store in=\grse,     }          \tikzset{      block/.style = {circle, draw,         text width=1em,align=center,inner sep=0pt},       line/.style = {draw,thick,->},       oplus/.style={draw,circle, text width=1em,align=center,inner sep=0pt,       postaction={path picture={%         \draw[black]           (path picture bounding box.south west) -- (path picture bounding box.north east)           (path picture bounding box.north west) -- (path picture bounding box.south east);}}},        my pattern/.style args={#1 colored by #2}{%        path picture={          \node[pattern=#1,pattern color=#2] at (path picture bounding box.center) {};        }       },       my gradient/.style args={#1 and #2}{%        \grsi=#1,        \grse=#2,      },     }     \begin{tikzpicture}     \node [block,my pattern=north east lines colored by blue!50,       my gradient=orange!60 and yellow!40] (s13){13};     \end{tikzpicture}     \end{document}       However, when I put the graph into a big tree, there is only two blue lines inside the circle. May I know what's the problem. Is the blue line related to the size of the circle? Here is the new code:               \documentclass[tikz]{standalone}     \usetikzlibrary{         shapes.geometric,         positioning,         fit,         calc,         patterns     }     \usepackage{tikz}     \usepackage{scalefnt}     \begin{document}          \pgfkeys{/tikz/.cd,       gradient style init/.initial=left color,       gradient style init/.get=\grsi,       gradient style init/.store in=\grsi,       gradient style end/.initial=right color,       gradient style end/.get=\grse,       gradient style end/.store in=\grse,     }          \tikzset{      block/.style = {circle, draw,         text width=1em,align=center,inner sep=0pt},       line/.style = {draw,thick,->},       oplus/.style={draw,circle, text width=1em,align=center,inner sep=0pt,       postaction={path picture={%         \draw[black]           (path picture bounding box.south west) -- (path picture bounding box.north east)           (path picture bounding box.north west) -- (path picture bounding box.south east);}}},        my pattern/.style args={#1 colored by #2}{%        path picture={          \node[pattern=#1,pattern color=#2] at (path picture bounding box.center) {};        }       },       my gradient/.style args={#1 and #2}{%        \grsi=#1,        \grse=#2,      },     }     {\scalefont{0.5}     \begin{tikzpicture}[node distance=4mm]     \node [block] (s1) {1};     \node [block,below = of s1] (s2) {2};     \node [block, below = of s2] (s5) {5};     \node [block,below = of s5,my pattern=north east lines colored by blue!50,       my gradient=orange!60 and yellow!40] (s13){13};               \node [block, below = of s13] (s4) {4};          \end{tikzpicture}     }     \end{document}       ![enter image description here](http://i.stack.imgur.com/SVo1Z.jpg)


title: Define new PSTricks object with arguments

text: Inspired by Clemens Niederberger's post about a possible new package, I have tried to create a similar figure using PSTricks. **Code**               \documentclass{article}          \usepackage{chemmacros}     \usepackage{pstricks-add}          \pagestyle{empty}          \begin{document}          \begin{figure}[htbp]     % Parameters     \def\basinwidth{15 }     \def\basinheight{10 }     \def\waterheight{8}     \def\cathode{\ch{Zn}}     \def\cathodeColour{gray!30}     \def\anode{\ch{Cu}}     \def\anodeColour{red!50}     \centering     \psset{unit=0.7\psunit}     \begin{pspicture}(15,11.5)     % Basin     \psline(0,\basinheight)(0,\waterheight)     \pscustom[fillstyle=solid,fillcolor=cyan!70]{%       \psline(0,\waterheight)(\basinwidth,\waterheight)       \psline(0,\waterheight)(0,1)       \psarc(1,1){1}{180}{270}       \psline(1,0)(!\basinwidth 1 sub 0)       \psarc(!\basinwidth 1 sub 1){1}{270}{360}       \psline(\basinwidth,1)(\basinwidth,\waterheight)      \closepath     }     \psline(\basinwidth,\waterheight)(\basinwidth,\basinheight)     % Membrane     \psline[linestyle=dashed]%       (!\basinwidth 2 div 0)%       (!\basinwidth 2 div \waterheight)     % Cathode     \pspolygon[fillstyle=solid,fillcolor=\cathodeColour]%       (!\basinwidth 4 div 1 sub 1)%       (!\basinwidth 4 div 1 sub \basinheight 1 sub)%       (!\basinwidth 4 div 1 add \basinheight 1 sub)%       (!\basinwidth 4 div 1 add 1)     \rput(!\basinwidth 4 div \basinheight 2 div){\cathode}     % Anode     \pspolygon[fillstyle=solid,fillcolor=\anodeColour]%       (!3 \basinwidth mul 4 div 1 sub 1)%       (!3 \basinwidth mul 4 div 1 sub \basinheight 1 sub)%       (!3 \basinwidth mul 4 div 1 add \basinheight 1 sub)%       (!3 \basinwidth mul 4 div 1 add 1)     \rput(!3 \basinwidth mul 4 div \basinheight 2 div){\anode}     % Wires     \rput(!\basinwidth 4 div 1 add \basinheight){$+$}     \psline(!\basinwidth 4 div \basinheight 1 sub)%            (!\basinwidth 4 div \basinheight)     \psarc(!\basinwidth 4 div 1 add \basinheight){1}{90}{180}     \psline(!\basinwidth 4 div 1 add \basinheight 1 add)%            (!\basinwidth 1 sub 2 div \basinheight 1 add)     \pscircle(!\basinwidth 2 div \basinheight 1 add){0.5}     \rput(!\basinwidth 2 div \basinheight 1 add){$U$}     \psline(!3 \basinwidth mul 4 div 1 sub \basinheight 1 add)%            (!\basinwidth 1 add 2 div \basinheight 1 add)     \psarc(!3 \basinwidth mul 4 div 1 sub \basinheight){1}{0}{90}     \psline(!3 \basinwidth mul 4 div \basinheight 1 sub)%            (!3 \basinwidth mul 4 div \basinheight)     \rput(!3 \basinwidth mul 4 div 1 sub \basinheight){$-$}     % Electron movement     \rput(!3 \basinwidth mul 1 add 8 div \basinheight 3 2 div add)%          {\ch{->[ e- ]}}     \rput(!5 \basinwidth mul 2 sub 8 div \basinheight 3 2 div add)%          {\ch{->[ e- ]}}     \end{pspicture}     \end{figure}          \end{document}      The code should be compiled with `xelatex`. **Question** Is it possible to define a new object with argument that looks something like the following?               \cell[       cathode=Zn,       cathodeColour=grey!30,       anode=Cu,       anodeColour=red!50     ]{"basinwidth"}{"basinheight"}{"waterheight"}      If it is possible, how do I do it? **Extra question** I have had a look at section 28.2 in the chemmacros manual in order to draw the arrows with electrons above but I couldn't make it work with `\ch{ ->[\el] }`. If someone can tell be how to draw this, that would be nice. ( _Solved_ )


title: How to put a line-break in section heading?

text: I have some section headings occupying two lines and I'm not satisfied with the way XeLaTeX breaks the heading. If I manually add `\\` the output looks fine, but I get the following warning:               [hyperref] Token not allowed in a PDF string (PDFDocEncoding): removing `\\'.       My code looks like that:               \section{this is a very long title I \\ want to break manually}      Is there a way to have a line-break there without the warning?


title: Gantt using Tikz

text: I would like to draw following picture in latex. I would like to have a suggestion if this could be easily possible by `pgfgantt` package? Or should I use `tikz` to draw this kind of diagram? In `pgfgantt`, it is produce some top line, which I would not like to have. Plus in addition it has a box like borders, whereas I would prefer the diagram to look like below. Can anyone give me suggestion, how can I do this quickly? ![enter image description here](http://i.stack.imgur.com/b7Eb4.jpg)


title: Default value for basicstyle in lstlisting

text: I have most of the code in Python, which renders very nice with this simple configuration of `lstlisting` At a certain point I have to include an XML file, so I switched to `language=XML` but it renders ugly with the default charset so I added also `basicstyle=\ttfamily`. Now I don't know how to switch back to default style after that.               \documentclass{article}     \usepackage{listings}     \lstset{tabsize=2, language=Python, breaklines=true,           breakatwhitespace=true,  xleftmargin=.25in}     \begin{document}          %some python listings here          %XML listing     \lstset{language=XML, basicstyle=\ttfamily}     \begin{lstlisting}         <XML></XML>     \end{lstlisting}          %what do I put here?          %python listings again     \begin{lstlisting}         for i in python:             pass     \end{lstlisting}     \end{document}


title: How to suppress automatic conversion of “<=” inside lstlisting/lstinline?

text: I have the following LaTeX code:               some text \lstinline!u <= 1! some text      In my output, the two characters `<=` get automatically joined to form a single "less-than-or-equal" chararacter (i.e. Unicode `U+2264`). How do I get rid of this feature? It looks nice, but it does not reflect the original syntax. Some remark: In my case, I'm using a custom definition for the Modelica language. However, I get the very same behaviour when switching to a pre- defined language, i.e. Pascal.


title: Does align environment (or an alternative) have an option to choose left, center or right alignment?

text: I have quite a long set of equations, written in an `array` environment, but I can't seem to get it to split so that it is spread over multiple pages. I could use the `align` environment, but I can't seem to find a left, center or right option, while I would like to use it as in the `array` environment: `\begin{array}{llrcl} ... \end{array}`. This is the LaTeX code:               \[     \begin{array}{llrcl}     g_1=\dfrac{f_1}{\norm{f_1}}\\     h_2=f_2-(f_2,g_1)g_1, & g_2=\dfrac{h_2}{\norm{h_2}}, & (g_1,g_2) & = & \dfrac{(g_1,f_2-(f_2,g_1)g_1)}{\norm{h_2}}\\     &&& = & \dfrac{(f_2,g_1)-(f_2,g_1)(g_1,g_1)}{\norm{h_2}}\\     &&& = & 0\\     h_3^1=f_3-(f_3,g_1)g_1, & g_3^1=\dfrac{h_3^1}{\norm{h_3^1}}, & (g_1,g_3^1) & = & \dfrac{(g_1,f_3-(f_3,g_1)g_1)}{\norm{h_3^1}}\\     &&& = & \dfrac{(f_3,g_1)-(f_3,g_1)(g_1,g_1)}{\norm{h_3^1}}\\     &&& = & 0\\     h_3^2=g_3^1-(g_3^1,g_2)g_2, & g_3=g_3^2=\dfrac{h_3^2}{\norm{h_3^2}}, & (g_1,g_3^2) & = & \dfrac{(g_1,g_3^1-(g_3^1,g_2)g_2)}{\norm{h_3^2}}\\     &&& = & \dfrac{(g_1,g_3^1)-(g_2,g_3^1)(g_1,g_2)}{\norm{h_3^2}}\\     &&& = & 0\\     && (g_2,g_3^2) & = & \dfrac{(g_2,g_3^1-(g_3^1,g_2)g_2)}{\norm{h_3^2}}\\     &&& = & \dfrac{(g_2,g_3^1)-(g_2,g_3^1)(g_2,g_2)}{\norm{h_3^2}}\\     &&& = & 0\\     \vdots & \vdots & \vdots & \vdots & \vdots\\     h_j^1=f_j-(f_j,g_1)g_1, & g_j^1=\dfrac{h_j^1}{\norm{h_j^1}}, & (g_1,g_j^1) & = & \dfrac{(g_1,f_j-(f_j,g_1)g_1)}{\norm{h_j^1}}\\     &&& = & \dfrac{(f_j,g_1)-(f_j,g_1)(g_1,g_1)}{\norm{h_j^1}}\\     &&& = & 0\\     h_j^2=g_j^1-(g_j^1,g_2)g_2, & g_j^2=\dfrac{h_j^2}{\norm{h_j^2}}, & (g_1,g_j^2) & = & \dfrac{(g_1,g_j^1-(g_j^1,g_2)g_2)}{\norm{h_j^2}}\\     &&& = & \dfrac{(g_1,g_j^1)-(g_j^1,g_2)(g_1,g_2)}{\norm{h_j^2}}\\     &&& = & 0\\     && (g_2,g_j^2) & = & \dfrac{(g_2,g_j^1-(g_j^1,g_2)g_2)}{\norm{h_j^2}}\\     &&& = & \dfrac{(g_2,g_j^1)-(g_j^1,g_2)(g_2,g_2)}{\norm{h_j^2}}\\     &&& = & 0\\     \vdots & \vdots & \vdots & \vdots & \vdots\\     h_j^{j-1}=g_j^{j-2}-(g_j^{j-2},g_{j-1})g_{j-1}, & g_j=g_j^{j-1}=\dfrac{h_j^{j-1}}{\norm{h_j^{j-1}}}, & (g_k,g_j) & = & \dfrac{(g_k,g_j^{j-2}-(g_j^{j-2},g_{j-1})g_{j-1})}{\norm{h_j^{j-1}}}\\     &&& = & \dfrac{\!\!\!\!\!\overbrace{(g_k,g_j^{j-2})}^{\delta_{k,j-1}(g_k,g_j^{j-2})}\!\!\!\!\!-(g_j^{j-2}\!\!\!\!\!,g_{j-1})\overbrace{(g_k,g_{j-1})}^{=\delta_{k,j-1}}}{\norm{h_j^{j-1}}}\\     &&& = & 0     \end{array}     \]      where `\norm{...}` stems from the custom command               \newcommand{\norm}[1]{\ensuremath{\left|\left|{#1}\right|\right|}} % General norm.


title: Texmaker on Mac doesn't like my \section{}s

text: I have just made a clean install on a Mac I'm using at the moment. Everything seems good except when I compile, I have the error > Missing number, treated as zero. s The error tells me that this occurs on line `xxx`, where `xxx` is everywhere I have `\section{}`


title: Tikz Graph with Nodes and Edges and some Dots

text: I want to draw an image like this with TIKZ. ![Image](http://i.stack.imgur.com/5MF0s.png) I want to convert the Squares to rectangles, thus I am using Tikz. However, I am unable to draw those dots in TIKZ. Here is the code that I have written.               \begin{tikzpicture}[%        ->,         >=stealth',        shorten >=1pt,        node distance=2cm,        thick,        every state/.style={%        fill=white,        draw=black,        text=black       }          ]              \node[state] (A) {$A$};              \node[state] (B1) [right of=A] {$B$};         \node[state] (B2) [above of=B1] {$B$};         \node[state] (B3) [below of=B1] {$B$};         \node[state] (B4) [below of=B3,node distance=4cm] {$B$};         \node[state] (B5) [above of=B1,node distance=4cm] {$B$};              \draw[below of=B5]  node {...};              \node[state] (C1) [right of=B1] {$C$};         \node[state] (C2) [right of=B2] {$C$};         \node[state] (C3) [right of=B3] {$C$};              \node[state] (D) [right of=C1] {$D$};              \path (A) edge node [above, xshift=-1mm,very near start] {$N$} node [above, xshift=1mm,very near end] {$1$} (B1)               (A) edge node [above, xshift=-1mm,very near start] {$1$} node [above, xshift=1mm,very near end] {$1$} (B2)               (A) edge node [above, xshift=-1mm,very near start] {$1$} node [above, xshift=1mm,very near end] {$1$} (B3)               (B1) edge node [above, xshift=-1mm,very near start] {$1$} node [above, xshift=1mm,very near end] {$1$} (C1)               (B2) edge node [above, xshift=-1mm,very near start] {$1$} node [above, xshift=1mm,very near end] {$1$} (C2)               (B3) edge node [above, xshift=-1mm,very near start] {$1$} node [above, xshift=1mm,very near end] {$1$} (C3)               (C1) edge node [above, xshift=-1mm,very near start] {$1$} node [above, xshift=1mm,very near end] {$1$} (D)                (C2) edge node [above, xshift=-1mm,very near start] {$1$} node [above, xshift=1mm,very near end] {$1$} (D)                (C3) edge node [above, xshift=-1mm,very near start] {$1$} node [above, xshift=1mm,very near end] {$1$} (D);          % Hard-coded the token location since i don't know about it.      % \fill[black] (0.00,1.00) circle  (2pt);       %\fill[black] (3.00,1.00) circle  (2pt);       %\fill[black] (6.00,1.00) circle  (2pt);       \end{tikzpicture}      Can anyone please show me how to make it work?


title: Brackets with a center bracket

text: I have some data displayed in pairs. Currently, it appears like this, on one line:               (numbers; numbers; numbers)      However, I am looking for a better center divider. Here are some e.g.:               (numbers | numbers | numbers | numbers)     (numbers / numbers / numbers)      I am willing to change the outer brackets to any style, if necessary, to find a good match:               {numbers | numbers | numbers | numbers}     [numbers I numbers I numbers I numbers I numbers]      However, these all seem like good solutions. I cannot find any center divider that matches any of the outer dividers or that at least looks nice and visually separates the various parts. What can I use?


title: An enumerate environment in which the label is omitted when item number is just one and displayed as usual when item number is more than one

text: How to define an enumerate environment in which the label is omitted when item number is just one and displayed as usual when item number is more than one?


title: pdflatex binaries for win32?

text: Is the a place where I can download up-to-date win32 binaries of pdflatex (including all other files needed)? I don't need a GUI, just the plain .exe. MikTex-portable contains a pdflatex.exe but also a lot of other stuff i don't need and copying it to a microSD-Card takes a lot of time because the filesystem has to create a lot of (small) files. Instead of reckless deleting stuff from the Miktex directory i would like to use pdflatex from a trustworthy source and just add the packages i need.


title: Drawing boxes around words

text: I want to put some small boxes around certain words in a paragraph. The boxes will never contain more than one word. The `\ovalbox` command described in the `fancybox` documentation is close to what I need. However, I found some problems:   * The rounded corners do not line up with the sides perfectly.   * Text to the left and right in the paragraph are pushed away.   * The spacing between lines in the paragraph is increased vertically. I would like to create boxes which:   * Adjust horizontally to fit the width of the text inside.   * Have rounded or beveled corners.   * Can be filled with a solid color.   * Will not cause any text inside or around the box to move.   * Will not impact the vertical spacing of lines.


title: Exam poll generator?

text: I need a recomendation for some good LaTeX document generator. I have two lists of questions - I want the Generator - to make a given number of exam polls which will have first question from the first list, and second question from the second list. I'm on Kubuntu 11.10 and a fan of Emacs - but the more general the solution - the better. Preferably - the solution should be requiring tex/latex installation only. Of course I could write it myself in Python - but I'm sure something similar in functionality is implemented in many ways already - the question is - what is better/easier to do - to learn an existing package (I don't know one) - or to write it from scratch in Python.


title: How to put periods between a set of equations?

text: Is there a better way to put points between a set of equations as follow:               \begin{equation}     \begin{split}     &y_1=y_0+hf_0\\     &y_2=y_0+2hf_1\\     .\\     .\\     .\\     &y_n=y_{n-1}+2hf_{n-1}     \end{split}     \label{eq: stoer method 2}     \end{equation}


title: Switching mode within macro doesn't work

text: I defined the macro `\ShowOnlyInBeamerMode` that should print a frame if beamer is not in handout mode and its first argument isn't empty (see the appended code). Unfortunately the macro doesn't work as expected. If `handout` in the second line is commented out all three frames a printed. Otherwise only the first frame is printed. For me it looks like the requirement from the beamer manual on page 210 > Note: When searching line-wise for a `\mode` command to shake it out of its > gobbling state, TEX will not recognize a `\mode` command if a mode > specification follows on the same line. Thus, such a specification must be > given on the next line. is violated. However i can't figure out if this is actually correct and further how to fix it. May the wisdom be with you! * * *               \documentclass[        handout     ]{beamer}          \usepackage{etoolbox}          \newcommand{\ShowOnlyInBeamerMode}[1]{%        \ifstrempty{#1}{}{%     \mode<beamer>        }             \begin{frame}{#1}           #1        \end{frame}        \ifstrempty{#1}{}{%     \mode     <all>        }     }           \begin{document}          \begin{frame}        First frame     \end{frame}          % switch to <beamer> mode          \ShowOnlyInBeamerMode{Show only in beamer mode}          % switching back to modes set <all> doesn't work          \begin{frame}        Last frame     \end{frame}          \end{document}


title: Inserting an image properly in a table

text: I'd like to insert those lines that from "Foo" point to the four different rows in the table. > ![enter image description here](http://i.stack.imgur.com/24WxW.png) I've tries inserting an image but it doesn't come out right ( _please ignore the bad quality of the lines and the table not resembling the one above_ ): > ![enter image description here](http://i.stack.imgur.com/ygrSj.png) Here's the minimal example:               \documentclass[12pt]{book}          \usepackage[utf8]{inputenc}     \usepackage[a4paper]{geometry}          \usepackage{graphicx}     \usepackage{multirow}     \usepackage{array}          \pagestyle{empty}          \begin{document}              \setlength{\extrarowheight}{5pt}              \begin{tabular}{ c c c c c c }                  & & A & B & C & D \\ \cline {2-6}         \multirow{4}{*}{Foo \includegraphics[scale=0.5]{IMAGE HERE}}    & 1 & foo A1 & foo B1 & foo C1 & foo D1 \\                                 & 2 & foo A2 & foo B2 & foo C2 & foo D2 \\                                 & 3 & foo A3 & foo B3 & foo C3 & foo D3 \\                                 & 4 & foo A4 & foo B4 & foo C4 & foo D4 \\              \end{tabular}          \end{document}      Obviously, if you know of a "Tex-native" way to do this without using images, which quality will inevitably go poor when inserted, that would be a perfect solution.


title: How to typeset an i with asterisk above?

text: I tried it with a modification of `\overset` as suggested by Werner in this question: Creating non-math mode substitutes for \overset and \underset not dependent on the amsmath package With the new command, I used `\overset{$*$}{ı}`, but the asterisk is too high and increases the line height. How can I overset the asterisk as in a dotted i? In German, there is an internal I for gender-neutral forms like “TeXnikerIn” _TeXnician_ for “TeXnikerin” (female) or “TeXniker” (male). Then there is the suggestion to combine it with an asterisk (“TeXniker*In”) for genderqueer people. So my idea is to use a lowercase i with an asterisk instead of a dot as an agglutination.


title: How to set font size for minitoc in LyX

text: Hi all I'm writing a book in LyX with the package `minitoc`. If i use `\documentclass [10pt]{book}` the minitoc is set in one page, but if I use `12pt` the minitoc is set in 2 pages. I want use the 12 pt but resize minitoc like was in 11pt! Latex code:               %% LyX 2.0.7 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \RequirePackage{fix-cm}     \documentclass[10pt,oneside,italian]{book}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{listings}     \lstset{basicstyle={\ttfamily},     breaklines=true,     frame=TRBL,     frameround=ffff}     \usepackage{fancyhdr}     \pagestyle{fancy}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{1}     \setlength{\parskip}{\smallskipamount}     \setlength{\parindent}{0pt}     \usepackage{float}     \usepackage{amsmath}     \usepackage{setspace}     \doublespacing          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.     \numberwithin{equation}{section}     \numberwithin{figure}{section}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{minitoc}     \renewcommand{\mtcfont }{\tiny}     \usepackage[Lenny]{fncychap}          \makeatother          \usepackage{babel}     \begin{document}     \dominitoc          \tableofcontents{}          \begin{singlespace}          \chapter{\noindent Cap1}     \end{singlespace}          \begin{singlespace}     \noindent \null      \vfill     \begin{singlespace}     \minitoc     text text text text text text text text text text text text text text text text .     \end{singlespace}     \end{singlespace}               \section{Sec1}               \subsection{SubSec1}               \subsection{SubSec2}               \section{Sec2}               \subsection{SubSec1}               \subsection{SubSec2}               \section{Sec3}               \subsection{SubSec1}               \subsection{SubSec2}               \section{Sec4}               \subsection{SubSec1}               \section{Sec5}               \subsection{SubSec1}               \subsection{SubSec2}               \section{Sec6}               \subsection{SubSec1}               \subsection{SubSec2}               \section{Sec7}     \end{document}      with 10p the output is: toc in 1 page with 12p the output is: toc in 2 pages


title: Conditional Bibliography insertion

text: I am autogenerating several latex documents from the same base. Some of them have a `\cite` inside, so I want to include a Bilbiography. I'am using bibtex and it is perfectly working. However sometimes, I can have a document without any `\cite` inside, thus my final document appears with an Empty bibliography. Is it possible to include a bibliography only it there are references in it ? Of course, because documents are autogenerated, I need to have the same management for all documents, so not calling bibtex is not a acceptable solution for me.


title: MiKTeX: "Font ccicons at 600 not found"

text: I'm using MiKTeX 2.9 and TeXnicCenter 1.0-RC1 (Windows 7) and try to compile the following minimal code:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{ccicons}     \begin{document}      \ccbysa     \end{document}      I installed the `ccicons`-package using the MiKTeX Package Manager (MPM). TeXnicCenter gives 0 errors, 0 warnings - nothing, but doesn't even create any PDF output. Reading the log-file shows the following fatal error: > !pdfTeX error: C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\pdflatex.exe > (file ccicons): Font ccicons at 600 not found ==> Fatal error occurred, no > output PDF file produced! While browsing the net for this error, I came across this question: Font installed, compiles to dvi, but fails compiling to pdf. "font at 600 not found" \- which is quite the same problem that I have. The suggested solution is to run `updmap-sys --enable Map=ccicons.map` or `updmap --enable Map=ccicons.map` but this is obviously linux command line notation. Running this from a Windows command prompt I will always get the following message: > mkfntmap: --enable: unknown option I also tried `-enable` or `/enable` but still the same result. So, my question, what is the correct command for Windows users? (It's quite strange as MiKTeX is originally designed for Windows, isn't it?) The `ccicons` readme also suggests running `updmap --enable Map ccicons.map` ... Any ideas?


title: Citations and bibliography style for literature

text: I've been using tetex in my Slackware box for scientific papers once in a while. But now, I need some help to aid another person, in setting up her system with TeX Live in Ubuntu, for Literature texts. The citations should look like:               (Leag, 1997: 582)      (Leag, 1997: 582-585)       Note: There's a bib entry for the book of author Leag written in 1997, but not for the passage of the text on page 582. So, what to do in this kind of cases? Should a bibliographic entry be entered for each page where a note was taken from a book? Or is it possible to create just one bibliographic entry and be possible to write the number of page when using `\cite{xxx pages}`? There are also some (special to me) kind of citations, like:               (apud Trofon, 1978: 9)      when the citation is indirect, an author that cites another one. Some other citations must appear as:               (ibidem)     (Idem, p. 300)      And footnotes as:               Apud, Seixo et Abreu, 1998: 214     Drivaux, (1984) Poésie Complet, Paris, Éditions du Gramour, p.314     Ibidem     Idem, p. 300      For a book or thesis (author, _title of book_ , place, editor and year)               Martins, António, *Sebastianismo*, Coimbra, Mar da Palavra, 2005.      Article collection (author name, "name of article", in _book_ (coordinators [note that author is one of the coordinators], pages, place, editor and year.               Martins, António, “Realismo”, in *Geografia literária* (coordenação de António Martins e Manuel Ricardo; autor do artigo), pp. 7-18, Coimbra, Barco à vela, 2010.      And as: author, _name of book_ , (author of edition/notes/preface), number of edition, place, editor, year               Pardo Bazán, Emilia, *Los Pazos de Ulloa* (edición de Maria de los Ángeles Ayala), Décima Edición, Madrid, Cátedra Letras Hispánicas, 2009.      Is there any bibliographic style that permits doing all this? Or do I have to adapt one? (Although I've never done such job and it doesn't seem easy for me)


title: Chemfig new line reaction scheme

text: I just recently started using LaTeX and `chemfig` and have a question in regard with making a new line in the text below or above the reaction arrow. I am trying to place MW, 160C, 5min under Na2CO3, H2O as a new line. I will greatly appreciate any help!


title: Creating a colored bar chart using MetaPost or pgfplots

text: Right now I have this:               input graph     input sarith          beginfig(1)       draw begingraph(3cm,2cm)         gdata("data1.d", v,           path p;           augment p (v1,0);           augment p (v1,v2);           augment p (v1 Sadd "1",v2);           augment p (v1 Sadd "1",0);           gfill p--cycle withcolor .8white;           gdraw p--cycle;           );     endgraph;     endfig;          end      This builds a bar chart with grey bars with my test data set. However I need it colored, **very much like the one in this question:How to create a bar chart in which the y-axis is expressed in percents?** There will be 3 different colors, representing algorithms, each of these colors will have 3 bars: best, worst and average, this will be manually put into the data set file. How can I do this? Can I label each bar with a name? Maybe putting a string inside the bar? Like "Best" and so on? Also, can I set the x-axis as a string space? I mean, i wanted the algorithm's name as a lower label, then the three bars on top of it. I'm really new to metapost, so forgive me my noobness. Thanks. Edit: Checking on how nice the bar chart on the solution I posted, this could be done in pgfplots. However I have no knowledge on this package. If anyone knows how to do what I want using pgfplots, I'd study and use it. Added tags.


title: using **xyz** instead of \foo{xyz}

text: How can I use `**xyz**` or another similar one instead of `\foo{xyz}` or `\foo*{xyz}`? **note** : question is updated to reflect my concern, question is general and is not depended on a special package. You may use `**xyz**` form for any other command


title: How can I make labels (or other elements) rotate with a node using TikZ?

text: Is there a way to get label text to rotate with the TikZ node to which it is attached. I can rotate the node and its text; but labels do not rotate along with the node, and instead remain "level":               \tikzset{fig/.style={regular polygon, regular polygon sides=3, label=60:A,label=below:B}}     \begin{tikzpicture}      \foreach \i in {0,1,2,3}{\node[fig,rotate=20*\i,draw] at(\i*4,0) {Text};}     \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/KSdSg.png) In general, I'd like to find a way to rotate a "composite" element, consisting of more than just a single, simple node and it's labels; for example, a shape, in which the corners have been "marked" with symbols or other shapes: ![enter image description here](http://i.stack.imgur.com/asqEg.jpg) * * *               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{shapes}     % Not needed for MWE but used in my code:     %\usetikzlibrary{positioning}     %\usetikzlibrary{petri}          \begin{document}          \tikzset{fig/.style={regular polygon, regular polygon sides=3, label=60:A,label=below:B}}     \begin{tikzpicture}      \foreach \i in {0,1,2,3}{\node[fig,rotate=20*\i,draw] at(\i*4,0) {Text};}     \end{tikzpicture}          % I don't know how to create the images in the second illustration          \end{document}


title: Request for examples of Victorian chapter TOC

text: Often a Victorian novel would have many chapters and the TOC was usually a delight of both information (chapter had blurb along with name) and typography. I'm looking at a project to duplicate that look and feel. So I would deeply appreciate url citations of examples. I've will be using Memoir and XeLaTeX so complexity and fonts are not likely to be a problem! Thanks— Hugh S. Myers


title: Capitalise table of contents title with tocloft

text: Simple question, but I can't put the answer together through googleing. I want to capitalize the table of contents **TITLE** in my LaTeX document. Nothing else. I'm using the `tocloft` package and various links I've read through suggest renewing the `\cfttoctitlefont` command, but I haven't had much luck.


title: How to get ligatures in beamer?

text: While this               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{lmodern}          \begin{document}     fi 10\%     \end{document}      produces ligatures, this:               \documentclass{beamer}     \usepackage[T1]{fontenc}     \usepackage{lmodern}          \begin{document}     \begin{frame}     fi 10\%     \end{frame}     \end{document}      does not. What do I need to do to get the same ligatures in beamer too?


title: Text is not fitting the column

text: I want my texts to continue in the next line instead of continuing in the other column. How can I manage this? My code is : ![enter image description here][1]               \begin{tabular}{|p{2,8cm}|p{2.8cm}|p{2.8cm}|p{2.8cm}|p{2.8cm}|}       \hline       \textbf{Architecture }& \textbf{Sharing }& \textbf{TrustSetting} & \multicolumn{2}{l|}{\textbf{Access Control}}\\ \hline       Distributed:\cite{ 40crossdomain},\cite{51cassandra},\cite{53oasis},\cite{54huDynamic},\cite{79searchengine},\cite{19paas} &    & Trusted: & \textbf{Cryptographic }& \textbf{Non-cryptographic} \\ \cline{4-5}         &   &  &  &  \\         &    &  &  & \\\cline{1-1}\cline{3-4}       Centralized: &    & Semi-trusted: &  &  \\\cline{2-2}        &    &  & &  \\         &   &  &  &  \\\cline{1-1}\cline{3-4}       Cloud: &    & Untrusted: &  & \\        &   & &   &   \\ \hline          \end{tabular}


title: Can I label figures in LaTeX?

text: I googled to find the answers to the above question. But by "label" I mean labeling the figure, not the label that is used for referencing. Let me explain. Say I am making a figure for a high school presentation which shows various parts of a PC: the CPU, the monitor, the keyboard, the mouse, etc. I can insert the labels using a software like MS Paint. But inserting equations, letters with subscripts, superscripts is a very difficult using softwares like MS Paint. For the same purposes I would like to use LaTeX. Is there a way to do that? Another reason for wanting to use Latex is that Latex will perhaps create text in the form of vectors, i.e. the text will most likely not pixelate when zoomed into.


title: How to draw custom nodes attached to tikz-qtree?

text: I want to draw a tree which is similar to the **Merge sort recursion tree** in this Tikz sample from TeXample.net: However, I don't want to draw all the `+` and `=` signs, I just want two columns: one from the left and one from the right. I'm using tikz-qtree package. I wonder is there a way to add custom node to this tree structure? ![enter image description here](http://i.stack.imgur.com/oD5OD.png) This is my current tree:               \documentclass[10pt,letterpaper]{article}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{cancel}     \usepackage{tikz-qtree}          \begin{document}          \tikzset{edge from parent/.style=          {draw, edge from parent path={(\tikzparentnode) -- (\tikzchildnode)}}}         \begin{tikzpicture}[sibling distance=.5cm]         \matrix{         \Tree         [.n              [.$\dfrac{n}{2}$ [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] ]              [.$\dfrac{n}{2}$ [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] ]              [.$\dfrac{n}{2}$ [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] ]          ]         &         \\};         \end{tikzpicture}          \end{document}      **Edit** My current solution is to use tikz-nodes, but it looks a little odd:               \tikzset{edge from parent/.style=         {draw, edge from parent path={(\tikzparentnode) -- (\tikzchildnode)}}}         \begin{tikzpicture}[sibling distance=0.5cm,level distance=1.5cm,node distance=1.5cm,auto,on grid,initial text=]                      \matrix{         \Tree         [.n              [.$\dfrac{n}{2}$ [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] ]              [.$\dfrac{n}{2}$ [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] ]              [.$\dfrac{n}{2}$ [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] [.$\dfrac{n}{4}$ ] ]          ]         &          \node (0)               {$= n$};         \node (1) [below=of 0]  {$= 3 \cdot \dfrac{n}{2}$};         \node (2) [below=of 1]  {$= 3^2 \cdot \dfrac{n}{2^2}$};         \\};         \end{tikzpicture}


title: How do I make tabu and multicol play nice with each other?

text: I'm trying to write a document that will require lots of small tables (which contain other, nested tables) in a section of my document, which I want to put into a two-column section. I use `tabu` for the tables and `multicol` to get the two-column formatting for only part of the document. When I wasn't using `multicol`, I deliberately picked a sizing for my `tabu` tables to make them sit nicely by each other. However, once I introduced `multicol`, things started to get... odd. In summary, I started with this, and it worked:               \documentclass[10pt]{article}     \usepackage[margin=1.5cm]{geometry}     \usepackage{array,booktabs,tabu}          Some initial text goes here, that should not be in two-column format.     \begin{tabu} to 0.45/linewidth {X}     \toprule     \centering {\bf A table heading}\\     \midrule     \begin{tabular}{lp{6.2cm}}         {\bf Text} & More text\\          & Other text.\\          & Yet more text.\\     \end{tabular}\\     \begin{tabular}{lp{1.6cm}p{3.8cm}}        {\bf Text} & More complicated & table.\\         & More & complexity.\\     \end{tabular}\\     \end{tabu}     \begin{tabu} to 0.45/linewidth {X}     \toprule     \centering {\bf Another table heading}\\     \midrule     \begin{tabular}{lp{6.2cm}}         {\bf Text} & More text\\          & Other text.\\          & Yet more text.\\     \end{tabular}\\     \begin{tabular}{lp{1.6cm}p{3.8cm}}        {\bf Text} & More complicated & table.\\         & More & complexity.\\     \end{tabular}\\     \end{tabu}     \end{document}      Then, I tried to wrap the two `tabu` tables in a `multicols` as follows:               \documentclass[10pt]{article}     \usepackage[margin=1.5cm]{geometry}     \usepackage{array,booktabs,tabu,multicol}          Some initial text goes here, that should not be in two-column format.     \begin{multicols}{2}     \begin{tabu} to 0.45/linewidth {X}     \toprule     \centering {\bf A table heading}\\     \midrule     \begin{tabular}{lp{6.2cm}}         {\bf Text} & More text\\          & Other text.\\          & Yet more text.\\     \end{tabular}\\     \begin{tabular}{lp{1.6cm}p{3.8cm}}        {\bf Text} & More complicated & table.\\         & More & complexity.\\     \end{tabular}\\     \end{tabu}     \begin{tabu} to 0.45/linewidth {X}     \toprule     \centering {\bf Another table heading}\\     \midrule     \begin{tabular}{lp{6.2cm}}         {\bf Text} & More text\\          & Other text.\\          & Yet more text.\\     \end{tabular}\\     \begin{tabular}{lp{1.6cm}p{3.8cm}}        {\bf Text} & More complicated & table.\\         & More & complexity.\\     \end{tabular}\\     \end{tabu}     \end{multicols}     \end{document}      However, this made the formatting horribly broken and unreadable. I then tried to go back and wrap each `tabu' in a`table` environment as follows:               \documentclass[10pt]{article}     \usepackage[margin=1.5cm]{geometry}     \usepackage{array,booktabs,tabu,multicol}          Some initial text goes here, that should not be in two-column format.     \begin{multicols}{2}     \begin{table}[!h]     \begin{tabu} to 0.45/linewidth {X}     \toprule     \centering {\bf A table heading}\\     \midrule     \begin{tabular}{lp{6.2cm}}         {\bf Text} & More text\\          & Other text.\\          & Yet more text.\\     \end{tabular}\\     \begin{tabular}{lp{1.6cm}p{3.8cm}}        {\bf Text} & More complicated & table.\\         & More & complexity.\\     \end{tabular}\\     \end{tabu}     \end{table}     \begin{table}     \begin{tabu} to 0.45/linewidth {X}     \toprule     \centering {\bf Another table heading}\\     \midrule     \begin{tabular}{lp{6.2cm}}         {\bf Text} & More text\\          & Other text.\\          & Yet more text.\\     \end{tabular}\\     \begin{tabular}{lp{1.6cm}p{3.8cm}}        {\bf Text} & More complicated & table.\\         & More & complexity.\\     \end{tabular}\\     \end{tabu}     \end{table}     \end{multicols}     \end{document}      However, when I did _that_ , I instead ended up with both tables _vanishing_ , and just having an empty page in their place. What am I doing wrong, and how can I make all these components play nice with each other?


title: subcaption: third figure breaks column

text: I would like to align one big image next to three different small ones with the help of the subcaption (wich is used in all the rest of my document). But I still don't get the posistions "right". The one-nextTo-two version looks okay (despite an unnecessary horizontal space in the beginning), but adding the third figure yield in the opening of a third column... Can anybody help me to get this mess in the right form? Thanks a lot in advance, Guntram               \documentclass[]{article}     \usepackage[utf8]{inputenc}      \usepackage[demo]{graphicx}     \usepackage{floatrow}     \usepackage{subcaption}          \begin{document}     \begin{figure}     \ffigbox[\FBwidth]{      \begin{subfloatrow}         \ffigbox[\FBwidth]{\caption{image1}}{\includegraphics[width=2cm,height=8cm]{image1a}}%         \ffigbox[\FBwidth]{\caption{invisible?}}         {             \ffigbox[\FBwidth]{\caption{image1b}}{\includegraphics[width=2cm,height=2cm]{image1b}}%             \ffigbox[\FBwidth]{\caption{image1c}}{\includegraphics[width=2cm,height=5cm]{image1c}}%         }     \end{subfloatrow}     }{\caption*{image1}}     \end{figure}          \begin{figure}     \ffigbox[\FBwidth]{      \begin{subfloatrow}         \ffigbox[\FBwidth]{\caption{image2}}{\includegraphics[width=2cm,height=8cm]{image2a}}%         \ffigbox[\FBwidth]{\caption{invisible?}}         {             \ffigbox[\FBwidth]{\caption{image2b}}{\includegraphics[width=2cm,height=2cm]{image2b}}%             \ffigbox[\FBwidth]{\caption{image2c}}{\includegraphics[width=2cm,height=5cm]{image2c}}%             \ffigbox[\FBwidth]{\caption{image2d}}{\includegraphics[width=2cm,height=3cm]{image2d}}%         }     \end{subfloatrow}     }{\caption*{image2}}     \end{figure}     \end{document}


title: If the usage of the $ symbols for typing maths is undesirable why many editors still use them?

text: After rea d this question: Unnumbered equations: Any difference between \begin{equation*} and [? which led me to this other: What are the differences between $$, [, align, equation and displaymath? which in turn led me to this one: Why is [ … ] preferable to $$ … $$? and also this: align vs equation I wonder **why if using the $ symbol for the equations is as inadvisable, remains this method used in more than one dedicated`LaTeX` editor?** Beyond the obvious and almost trivial answer: _because developers like and they don't care what you think about it and if you don't like, program your own editor._ I think in this site participate many package authors and developers of many of the technical jewels we get in LaTeX. And maybe more than one has to do with the development of one of the many dedicated editors that there are today, so I ask the question here. I can't ensure that all editors continue to use `$` to compose math because I have not tried them all. But in all I've ever tried, it's the same. Among recent editors that I can mention are `Texmaker` and its fork `TeXstudio`, and `Sublime Text 2` with `LaTeX Tools` package. It's very likely that the people who work with `vim` or `emacs` don't have such problem, or has been corrected or can easily change. Nor do I think it's impossible to change. I just curious to know why it is still so popular if it is considered a bad practice or maybe just a not very good practice. Why is still the default setting in those editors?


title: xtab alignment problem

text: \documentclass[12pt,a4paper]{article}          \usepackage{amsmath}          \usepackage{xtab}       % table page breaks     \usepackage{array}      % for advanced column specification: use >{\command} for                             % commands executed right before each column element                             % and <{\command} for commands to be executed right after                             % each column element          \usepackage{booktabs} % toprule, bottomrule, midrule               \begin{document}               \renewcommand{\arraystretch}{1.5}     \begin{xtabular}{>{$}l<{$} c c}              \toprule         \text{Model} & \text{AIC (logistic link)} & \text{AIC (linear link)} \\         \midrule             \{ \phi(\cdot)  ,  p(\cdot) \}         & 986   & 986 \\             \{ \phi(\cdot)  ,  p(t) \}             & 993   & 993 \\             \{ \phi(\cdot)  ,  p(h_2) \}           & 961   & 959 \\             \{ \phi(\cdot)  ,  p(h_3) \}           & 948   & 948 \\             \{ \phi(\cdot)  ,  p(h_4) \}           & 952   & 952 \\             \{ \phi(\cdot)  ,  p(t+h_2) \}         & 969   & 977 \\             \{ \phi(\cdot)  ,  p(t+h_3) \}         & 949   & 981 \\             \{ \phi(\cdot)  ,  p(t+h_4) \}         & 953   & 999 \\             \{ \phi(\cdot)  ,  p(t \times h_2) \}  & 970   & 1032 \\             \{ \phi(\cdot)  ,  p(t \times h_3) \}  & 979   & 1131 \\             \{ \phi(\cdot)  ,  p(t \times h_4) \}  & 993   & 1124 \\             \{ \phi(t)  ,  p(\cdot) \}  &       & 994 \\             \{ \phi(t)  ,  p(t) \}      &       & 996 \\             \{ \phi(t)  ,  p(h_2) \}    & 963   & 963 \\             \{ \phi(t)  ,  p(h_3) \}    & 952   & 952 \\             \{ \phi(t)  ,  p(h_4) \}    & 956   & 956 \\             \{ \phi(t)  ,  p(t+h_2) \}  & 973   & 976 \\             \{ \phi(t)  ,  p(t+h_3) \}  & 954   & 968 \\             \{ \phi(t)  ,  p(t+h_4) \}  & 958   & 975 \\             \{ \phi(t)  ,  p(t \times h_2) \}  &       & 1018 \\             \{ \phi(t)  ,  p(t \times h_3) \}  & 976   & 1165 \\             \{ \phi(t)  ,  p(t \times h_4) \}  & 999   & 1167 \\             \{ \phi(h_2)  ,  p(\cdot) \}  & 968   & 968 \\             \{ \phi(h_3)  ,  p(\cdot) \}  & 972   & 972 \\             \{ \phi(h_4)  ,  p(\cdot) \}  & 976   & 976 \\             \{ \phi(h_2)  ,  p(t) \}      &       & 971 \\             \{ \phi(h_3)  ,  p(t) \}      & 975   & 1055 \\             \{ \phi(h_4)  ,  p(t) \}      & 979   & 979 \\             \{ [\phi(h)  ,  p(h)]_2 \}           & 970   & 959 \\             \{ [\phi(h)  ,  p(h)]_3 \}           & 951   & 951 \\             \{ [\phi(h)  ,  p(h)]_4 \}           & 957   & 957 \\             \{ [\phi(h)  ,  p(t+h)]_2 \}         & 967   & 972 \\             \{ [\phi(h)  ,  p(t+h)]_3 \}         & 957   & 969 \\             \{ [\phi(h)  ,  p(t+h)]_4 \}         & 959   & 976 \\             \{ [\phi(h)  ,  p(t \times h)]_2 \}  & 987   & 993 \\             \{ [\phi(h)  ,  p(t \times h)]_3 \}  & 978   & 1047 \\             \{ [\phi(h)  ,  p(t \times h)]_4 \}  & 993   & 1063 \\             \{ \phi(t+h_2)  ,  p(\cdot) \}       & 982   & 987 \\             \{ \phi(t+h_3)  ,  p(\cdot) \}       & 977   & 983 \\             \{ \phi(t+h_4)  ,  p(\cdot) \}       &       & 987 \\             \{ \phi(t+h_2)  ,  p(t) \}           & 977   & 982 \\             \{ \phi(t+h_3)  ,  p(t) \}           & 980   & 987 \\             \{ \phi(t+h_4)  ,  p(t) \}           & 985   & 992 \\             \{ [\phi(t+h)  ,  p(h)]_2 \}            & 965   & 967 \\             \{ [\phi(t+h)  ,  p(h)]_3 \}            & 956   & 959 \\             \{ [\phi(t+h)  ,  p(h)]_4 \}            & 962   & 966 \\             \{ [\phi(t+h)  ,  p(t+h)]_2 \}          & 965   & 984 \\             \{ [\phi(t+h)  ,  p(t+h)]_3 \}          & 959   & 1000 \\             \{ [\phi(t+h)  ,  p(t+h)]_4 \}          & 965   & 1009 \\             \{ [\phi(t+h)  ,  p(t \times h)]_2 \}   & 981   & 1043 \\             \{ [\phi(t+h)  ,  p(t \times h)]_3 \}   & 987   & 1185 \\             \{ [\phi(t+h)  ,  p(t \times h)]_4 \}   & 994   & 1080 \\             \{ \phi(t \times h_2)  ,   p(\cdot) \}  & 978   & 991 \\             \{ \phi(t \times h_3)  ,   p(\cdot) \}  & 993   & 1045 \\             \{ \phi(t \times h_4)  ,   p(\cdot) \}  & 1012  & 1023 \\             \{ [\phi(t \times h)  ,   p(h)]_2 \}    & 970   & 974 \\             \{ [\phi(t \times h)  ,   p(h)]_3 \}    & 1000  & 990 \\             \{ [\phi(t \times h)  ,   p(h)]_4 \}    & 1003  & 1000 \\         \bottomrule         \topcaption{AIC values}          \end{xtabular}               \end{document}      If you look at the output on page 2 and 3, the column width are smaller than its on page 1. I mean the talbes on page 2 and 3 are treated as if they are separate ones with its "heading". Is there a way to improve this? And why it breaks at those points? It is apparent we are fit more rows onto the first and second pages. And where is the topcaption???? Thanks!


title: How to ensure that Droid Sans and Garamond are available on the system

text: I’m writing a class file and wish to use Droid Sans and Garamond which is no problem width `\usepackage{droidsans}` and `\usepackage[garamond]{mathdesign}`. With my TeX Live 2012 on Mac OS X eveything works like a charm but the client, I’m writing the class for, uses Windows XP, Suse and Ubuntu where TeX can’t find all necessary font files, although `droidsans` and `mathdesign` are available. The question is what do I have to do to make the font available for any user (with an up to date distribution)? I guess there’s nothing I can do directly but I would like to explain in the manual what to do to install the fonts … ## Update Heres a small example.               \documentclass{scrbook}          % simulate class option     \newif\iffonts% to prevent the class                     % loading any font packages     \fontstrue          \iffonts        \usepackage[T1]{fontenc}        \usepackage{droidsans}        \usepackage[garamond]{mathdesign}     \fi          \begin{document}     \chapter{Section one}     Some text     \end{document}      This should be compiled with `pdflatex`. It qould be great if there’d be a solution for WIndows and Ubuntu (other users can help themselves or use `\fontsfalse`). One may also use `\fontsfalse` when using any other machin then `pdflatex`. The font support must only work with `pdflatex`.


title: Producing Delaunay Triangulations

text: Does anyone know how I can produce 2D Delaunay Triangulations in tikz by giving as inputs a list of randomly generated points? Or at least a program that takes that list and produces tikz output.


title: Hyperref and ulem commands cannot be combined

text: Some `hyperref` commands do not mix well with `ulem` commands. Compiling this MWE               \documentclass{article}          \usepackage[normalem]{ulem}     \usepackage{hyperref}          \begin{document}     \sout{\hypertarget{label}{text}}     \end{document}      results in the following error:               ! Undefined control sequence.     <recently read> \put@me@back           l.7 \sout{\hypertarget{label}{text}}      Same applies if we replace `sout` with other ulem commands such as `uwave` or `xout`. Is there any solution to this problem? It is nice to use strike- through to symbolize deleted text (Latexdiff does this if the proper option is specified)


title: How to swap subcaptions of zoomboxes?

text: I greatly appreciate the zoomboxes given in this question: How to create magnified subfigures and corresponding boxes for portions of a large image. As the comments thread is already long enough I decided to make a new question. Consider I want to place the boxes on the left side:               \documentclass{article}     \usepackage{tikz,pgfplots,subcaption}     \usetikzlibrary{spy,calc}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%% ZOOMBOX-CODE from http://tex.stackexchange.com/questions/25414 %%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \newif\ifblackandwhitecycle     \gdef\patternnumber{0}          \pgfkeys{/tikz/.cd,         zoombox paths/.style={             draw=orange,             very thick         },         black and white/.is choice,         black and white/.default=static,         black and white/static/.style={              draw=white,                zoombox paths/.append style={                 draw=white,                 postaction={                     draw=black,                     loosely dashed                 }             }         },         black and white/static/.code={             \gdef\patternnumber{1}         },         black and white/cycle/.code={             \blackandwhitecycletrue             \gdef\patternnumber{1}         },         black and white pattern/.is choice,         black and white pattern/0/.style={},         black and white pattern/1/.style={                     draw=white,                 postaction={                     draw=black,                     dash pattern=on 2pt off 2pt                 }         },         black and white pattern/2/.style={                     draw=white,                 postaction={                     draw=black,                     dash pattern=on 4pt off 4pt                 }         },         black and white pattern/3/.style={                     draw=white,                 postaction={                     draw=black,                     dash pattern=on 4pt off 4pt on 1pt off 4pt                 }         },         black and white pattern/4/.style={                     draw=white,                 postaction={                     draw=black,                     dash pattern=on 4pt off 2pt on 2 pt off 2pt on 2 pt off 2pt                 }         },         zoomboxarray inner gap/.initial=5pt,         zoomboxarray columns/.initial=2,         zoomboxarray rows/.initial=2,         subfigurename/.initial={},         figurename/.initial={zoombox},         zoomboxarray/.style={             execute at begin picture={                 \begin{scope}[                     spy using outlines={%                         zoombox paths,                         width=\imagewidth / \pgfkeysvalueof{/tikz/zoomboxarray columns} - (\pgfkeysvalueof{/tikz/zoomboxarray columns} - 1) / \pgfkeysvalueof{/tikz/zoomboxarray columns} * \pgfkeysvalueof{/tikz/zoomboxarray inner gap} -\pgflinewidth,                         height=\imageheight / \pgfkeysvalueof{/tikz/zoomboxarray rows} - (\pgfkeysvalueof{/tikz/zoomboxarray rows} - 1) / \pgfkeysvalueof{/tikz/zoomboxarray rows} * \pgfkeysvalueof{/tikz/zoomboxarray inner gap}-\pgflinewidth,                         magnification=3,                         every spy on node/.style={                             zoombox paths                         },                         every spy in node/.style={                             zoombox paths                         }                     }                 ]             },             execute at end picture={                 \end{scope}                 \node at (image.north) [anchor=north,inner sep=0pt] {\subcaptionbox{\label{\pgfkeysvalueof{/tikz/figurename}-image}}{\phantomimage}};                 \node at (zoomboxes container.north) [anchor=north,inner sep=0pt] {\subcaptionbox{\label{\pgfkeysvalueof{/tikz/figurename}-zoom}}{\phantomimage}};          \gdef\patternnumber{0}             },             spymargin/.initial=0.5em,             zoomboxes xshift/.initial=1,             zoomboxes right/.code=\pgfkeys{/tikz/zoomboxes xshift=1},             zoomboxes left/.code=\pgfkeys{/tikz/zoomboxes xshift=-1},             zoomboxes yshift/.initial=0,             zoomboxes above/.code={                 \pgfkeys{/tikz/zoomboxes yshift=1},                 \pgfkeys{/tikz/zoomboxes xshift=0}             },             zoomboxes below/.code={                 \pgfkeys{/tikz/zoomboxes yshift=-1},                 \pgfkeys{/tikz/zoomboxes xshift=0}             },             caption margin/.initial=4ex,         },         adjust caption spacing/.code={},         image container/.style={             inner sep=0pt,             at=(image.north),             anchor=north,             adjust caption spacing         },         zoomboxes container/.style={             inner sep=0pt,             at=(image.north),             anchor=north,             name=zoomboxes container,             xshift=\pgfkeysvalueof{/tikz/zoomboxes xshift}*(\imagewidth+\pgfkeysvalueof{/tikz/spymargin}),             yshift=\pgfkeysvalueof{/tikz/zoomboxes yshift}*(\imageheight+\pgfkeysvalueof{/tikz/spymargin}+\pgfkeysvalueof{/tikz/caption margin}),             adjust caption spacing         },         calculate dimensions/.code={             \pgfpointdiff{\pgfpointanchor{image}{south west} }{\pgfpointanchor{image}{north east} }             \pgfgetlastxy{\imagewidth}{\imageheight}             \global\let\imagewidth=\imagewidth             \global\let\imageheight=\imageheight             \gdef\columncount{1}             \gdef\rowcount{1}             \gdef\zoomboxcount{1}         },         image node/.style={             inner sep=0pt,             name=image,             anchor=south west,             append after command={                 [calculate dimensions]                 node [image container,subfigurename=\pgfkeysvalueof{/tikz/figurename}-image] {\phantomimage}                 node [zoomboxes container,subfigurename=\pgfkeysvalueof{/tikz/figurename}-zoom] {\phantomimage}             }         },         color code/.style={             zoombox paths/.append style={draw=#1}         },         connect zoomboxes/.style={         spy connection path={\draw[draw=none,zoombox paths] (tikzspyonnode) -- (tikzspyinnode);}         },         help grid code/.code={             \begin{scope}[                     x={(image.south east)},                     y={(image.north west)},                     font=\footnotesize,                     help lines,                     overlay                 ]                 \foreach \x in {0,1,...,9} {                      \draw(\x/10,0) -- (\x/10,1);                     \node [anchor=north] at (\x/10,0) {0.\x};                 }                 \foreach \y in {0,1,...,9} {                     \draw(0,\y/10) -- (1,\y/10);                        \node [anchor=east] at (0,\y/10) {0.\y};                 }             \end{scope}             },         help grid/.style={             append after command={                 [help grid code]             }         },     }          \newcommand\phantomimage{%         \phantom{%             \rule{\imagewidth}{\imageheight}%         }%     }     \newcommand\zoombox[2][]{         \begin{scope}[zoombox paths]             \pgfmathsetmacro\xpos{                 (\columncount-1)*(\imagewidth / \pgfkeysvalueof{/tikz/zoomboxarray columns} + \pgfkeysvalueof{/tikz/zoomboxarray inner gap} / \pgfkeysvalueof{/tikz/zoomboxarray columns} ) + \pgflinewidth             }             \pgfmathsetmacro\ypos{                 (\rowcount-1)*( \imageheight / \pgfkeysvalueof{/tikz/zoomboxarray rows} + \pgfkeysvalueof{/tikz/zoomboxarray inner gap} / \pgfkeysvalueof{/tikz/zoomboxarray rows} ) + 0.5*\pgflinewidth             }             \edef\dospy{\noexpand\spy [                 #1,                 zoombox paths/.append style={                     black and white pattern=\patternnumber                 },                 every spy on node/.append style={#1},                 x=\imagewidth,                 y=\imageheight             ] on (#2) in node [anchor=north west] at ($(zoomboxes container.north west)+(\xpos pt,-\ypos pt)$);}             \dospy             \pgfmathtruncatemacro\pgfmathresult{ifthenelse(\columncount==\pgfkeysvalueof{/tikz/zoomboxarray columns},\rowcount+1,\rowcount)}             \global\let\rowcount=\pgfmathresult             \pgfmathtruncatemacro\pgfmathresult{ifthenelse(\columncount==\pgfkeysvalueof{/tikz/zoomboxarray columns},1,\columncount+1)}             \global\let\columncount=\pgfmathresult             \ifblackandwhitecycle                 \pgfmathtruncatemacro{\newpatternnumber}{\patternnumber+1}                 \global\edef\patternnumber{\newpatternnumber}             \fi         \end{scope}     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%% END ZOOMBOX-CODE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \begin{figure}       \begin{tikzpicture}[figurename=fig:schmahmann,zoomboxarray,zoomboxes left,zoomboxarray columns=1,zoomboxarray rows=2,connect zoomboxes,zoombox paths/.append style={ultra thick, blue}]        \node [image node] {\includegraphics[width=0.49\textwidth]{example-image-a}};        \zoombox[magnification=3]{0.35,0.48}        \zoombox[magnification=3]{0.66,0.24}      \end{tikzpicture}     \end{figure}          \end{document}      Which produces: ![subcaption b before a](http://i.stack.imgur.com/A8hbU.png) I know that those lines 90 and 91 needs to be swapped:               \node at (image.north) [anchor=north,inner sep=0pt] {\subcaptionbox{\label{\pgfkeysvalueof{/tikz/figurename}-image}}{\phantomimage}};     \node at (zoomboxes container.north) [anchor=north,inner sep=0pt] {\subcaptionbox{\label{\pgfkeysvalueof{/tikz/figurename}-zoom}}{\phantomimage}};      if the figures are placed on the left side.