title: TikZ borders showing through when they shouldn't (overlapping circles)

text: If you draw two circles that are exactly the same in all aspects (location, size, etc...) _except_ they have different colors, then the "border" of the underlying circle is showing through.               \documentclass[10pt]{book}     \usepackage{xcolor}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}         \fill (0,0) circle (0.1);         \fill[color=red] (0,0) circle (0.1);         \fill[color=red] (0.5,0) circle (0.1);     \end{tikzpicture}     \end{document}      Notice the first circle has a black "edge" around it that looks different than the 2nd circle which doesn't. The problem is due to the fact that one is anti-aliasing both circles and the edge colors are being blended. Is there a way to fix this but still have anti-aliasing? (basically render all the objects I need then anti-alias them properly afterwards?) (I realize TikZ probably can't do anything about this but one doesn't know unless they ask)


title: Strange line width problem with tikz-qtree

text: > **Possible Duplicate:**   >  TikZ borders showing through when they shouldn’t (overlapping circles) I have a strange problem with using tikz-qtree where the thickness of the lines are a bit odd. When I say odd I mean that when you zoom in it looks fine, and when you zoom out some of the lines appear thicker. I think its due to lines overlapping. Do you have any ideas? Here's an example that shows the behaviour I'm talking about:               \documentclass{report}          \usepackage{tikz}     \usepackage{tikz-qtree}          \begin{document}          \begin{figure}[H]     \centering                   \begin {tikzpicture}[sibling distance=20pt]                 \tikzset{edge from parent/.style=                    {draw,                     edge from parent path={(\tikzparentnode.south)                                 -- +(0,-8pt)                                 -| (\tikzchildnode)}}}                        \Tree [.{\bf Sibiu}  [.{Oradea (380)} ] [.{Arad (366)} ]      [.{Rimnicu V. (192) } ]   [.{\bf Fagaras (176)} {Bucharest (0)}  ] ]                 %\Tree [.A [.B D E ] [.C F G ] ]                 \end {tikzpicture}                 \caption{Evaluating the adjacent nodes to Fagaras in a greedy search.}                 \label {fig:GreedySecond}     \end{figure}          \end{document}       Compile it to a pdf and try zooming in and out (look towards the center), it's subtle but noticeable enough that I don't want it in my thesis. I'm pretty sure it happens when I run Evince on Linux and when I run Foxit on Windows. If nobody can tell what I mean I'll post some screenshots but I'm sure some people here are as pedantic as I am about presentation.


title: rotated text not appearing where expected when using tikz and xelatex

text: I thought I'd change the font to something none standard from the list of font available on my computer. When I tried to compile the following document, the text that should appear along the spokes was scattered all about the page.               \documentclass{article}     \usepackage{fontspec}     \setmainfont{ScottMorrison}     \usepackage{lipsum}     \usepackage{graphicx}     \usepackage{tikz}     \def\aemonth{\ifcase\x\or         {Jan}\or         {Feb}\or         {Mar}\or         {Apr}\or         {May}\or         {Jun}\or         {Jul}\or         {Aug}\or         {Sep}\or         {Oct}\or         {Nov}\or         {Dec}\else         {ERR}\fi}     \begin{document}          \begin{tikzpicture}            \node[circle,             draw,blue,             minimum size=1em,             inner sep=0pt] (C) at (-1,0) {};       \def\prevx{1}       \foreach \x in {1,2,...,12}         {           \pgfmathparse{-(\x-1)*30+90}           \def\myRotAngle{\pgfmathresult}           \node[anchor=180+\myRotAngle] at (C) {\rotatebox{\myRotAngle}{\hspace*{1.5em}(\x)text along spokes}};           \node[circle,draw,red,minimum size=4pt,anchor=180+\myRotAngle] (C label \x) at ([shift={(\myRotAngle:4)}]C) {\textcolor{black}{\aemonth}};           \draw (C) -- (C label \x);           \draw (C label \x) -- (C label \prevx);           \xdef\prevx{\x}           \ifnum\x=12\relax             \draw (C label 1) -- (C label \prevx);           \fi         }     \end{tikzpicture}     \end{document}      Resulting in: ![enter image description here](http://i.stack.imgur.com/Q9WTL.png) Everything works fine if I eliminate the font declaration and compile with `pdflatex`. ![enter image description here](http://i.stack.imgur.com/YexCX.png) I don't do much, if anything at all, with `xelatex`. What do I need to do to get `xelatex` to play nicely with `tikz`? * * * The font can be found in Using a handwriting font from myscriptfont.com * * * **UPDATE** I get the same problem if I just use `xelatex` without worrying about the setting the font with `\setmainfont` or whether or not I load `\usepackage{fontspec}`. Per the comments, here's the relevant section of my `log` file after using `\listfiles`:                *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     fontspec.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX        expl3.sty    2013/07/12 v4544 L3 Experimental code bundle wrapper      l3names.sty    2012/12/07 v4346 L3 Namespace for primitives     l3bootstrap.sty    2013/01/08 v4420 L3 Experimental bootstrap code         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     l3basics.sty    2013/07/09 v4521 L3 Basic definitions      l3expan.sty    2013/07/09 v4521 L3 Argument expansion         l3tl.sty    2013/04/24 v4482 L3 Token lists        l3seq.sty    2013/05/26 v4500 L3 Sequences and stacks        l3int.sty    2013/04/24 v4482 L3 Integers      l3quark.sty    2013/07/09 v4521 L3 Quarks        l3prg.sty    2013/04/24 v4482 L3 Control structures      l3clist.sty    2013/05/26 v4500 L3 Comma separated lists      l3token.sty    2013/04/24 v4482 L3 Experimental token manipulation       l3prop.sty    2013/01/09 v4423 L3 Property lists        l3msg.sty    2013/01/08 v4412 L3 Messages       l3file.sty    2013/05/01 v4483 L3 File and I/O operations       l3skip.sty    2013/01/13 v4444 L3 Dimensions and skips       l3keys.sty    2013/07/12 v4544 L3 Experimental key-value interfaces         l3fp.sty    2013/07/09 v4521 L3 Floating points        l3box.sty    2013/04/24 v4482 L3 Experimental boxes     l3coffins.sty    2012/09/09 v4212 L3 Coffin code layer      l3color.sty    2012/08/29 v4156 L3 Experimental color support     l3luatex.sty    2012/08/03 v4049 L3 Experimental LuaTeX-specific functions     l3candidates.sty    2013/07/09 v4521 L3 Experimental additions to l3kernel        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)       xparse.sty    2013/07/12 v4544 L3 Experimental document command parser     fontspec-patches.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTe     X     fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX     fontspec-xetex.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX      fontenc.sty       eu1enc.def    2010/05/27 v0.1h Experimental Unicode font encodings       eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern     xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many oth     er characters in Unicode lower plane      eu1lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live        xetex.def    2013/04/29 v0.96 LaTeX color/graphics driver for XeTeX (RRM/JK)          fontspec.cfg       lipsum.sty    2011/04/14 v1.2 150 paragraphs of Lorem Ipsum dummy text         tikz.sty    2013/08/05 v2.10-cvs (rcs-revision 1.129)          pgf.sty    2013/08/23 v2.10-cvs (rcs-revision 1.13)       pgfrcs.sty    2010/11/07 v2.10-cvs (rcs-revision 1.25)     everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)       pgfrcs.code.tex      pgfcore.sty    2010/04/11 v2.10-cvs (rcs-revision 1.7)       pgfsys.sty    2013/08/23 v2.10-cvs (rcs-revision 1.46)       pgfsys.code.tex     pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive      pgfcore.code.tex     pgfcomp-version-0-65.sty    2007/07/03 v2.10-cvs (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v2.10-cvs (rcs-revision 1.1)       pgffor.sty    2013/07/18 v2.10-cvs (rcs-revision 1.24)      pgfkeys.sty          pgfkeys.code.tex      pgfmath.sty          pgfmath.code.tex       pgffor.code.tex         tikz.code.tex        t3cmr.fd    2001/12/31 TIPA font definitions      ***********


title: How to make a LaTex Library

text: Its posible to make a library to Latex? I got the principal idea of the library, but really dont know where to start, is there any tutorial (for dummies maybe, im kinda newbie in this) that explain how to begin.


title: Why is centering a TikZ picture from an external file not the same as a centering a .png figure?

text: Why can't I put a Tikz picture inside `\makebox`?               \begin{figure}[!ht]     \centering       \makebox[\textwidth][c]{\includegraphics[width=.8\textwidth]{./Figures/chapter5/procedure_contacts.pdf}}     \end{figure}      is OK, but a TikZ file which compiles perfectly on its own using `standalone` doesn't in the above environment, that is, `\input{tikz_figure.tex}`


title: Too little space between wrapped text and the line below it

text: Consider the following table example, the text in the second row is wrapped.               \documentclass[a4paper]{article}          \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{tabu}     \usepackage{booktabs}          \usepackage{array}     \setlength{\extrarowheight}{5pt}          \begin{document}            \begin{tabu} to \linewidth {X[.5,c] X[1,l] X[1,l] X[2,l]}         \toprule         \rowfont{\bfseries}         Row & Head 1                   & Head 2 & Head 3 \\\hline         1.  & short text               & ? & ? \\\hline         2.  & long long long long text & ? & ? \\\hline         3.  & short text               & ? & ? \\\hline         4.  & short text               & ? & ? \\         \bottomrule       \end{tabu}          \end{document}      It renders like: ![enter image description here](http://i.stack.imgur.com/DIR4G.jpg) Why is there so little space between the text in the second row and the rule below it? How can I fix it? What comes to my mind is to use `\\\\[1ex]` instead of `\\\`, is there a better solution?


title: Updating FNDB in MiKTeX

text: The problem: After modifying the `xypic` directory in windows, adding a new version that now accepts an option `\usepackage{barr}` that loads a new file `xybarr` (formerly `diagxy` and distributed by me) I am trying to get the new program added to the filename database. When I run `mktexlsr`, I get the messages:               Creating fndb for user root directory (C:\Users\Mike\AppData\Roaming\MiKTeX\2.8)...     Creating fndb for user root directory (C:\Users\Mike\AppData\Local\MiKTeX\2.8)...     Skipping common root directory (C:\ProgramData\MiKTeX\2.8)...     Skipping common root directory ("C:\MiKTeX 2.8")...      But my file is precisely in the last named directory. Actually, I was unaware that the other three existed. I tried running `maketexlsr -help` and got the message:               initexmf: -help: unknown option      Finally, I tried `mktexlsr "\miktex 2.8"` and got the message:               initexmf: This utility does not accept non-option arguments.      So there is no (discernible) help, and I know no way of forcing it to index the actual tex directory, is there any way of updating the fndb? Incidentally, going to the maintenance routine of MiKTeX has no effect either. I click on `update fndb` and it says ok, but there is no change. So is there any way to deal with this?


title: How to center Display equations on ClassicalThesis

text: While using ClassicalThesis package with scrbook document, I noticed that the display equations defined with `\\[...\\]` aren't centered in the page as with scrbook without the ClassicalThesis package and its preamble. How could I restore the original behaviour by placing the display formulas centered in the page? Thanks in advance.


title: Error arising when using \typeout & \meaning with \midrule

text: In order to facilitate debugging some experimental code, I created a version of `\typeout` that will break its content into multiple lines:               %% dummy macro for simulating newlines in output to terminal     \def\my@linefeed{}     \def\mytypeout#1\my@linefeed#2\@nil{%%       \typeout{\detokenize{#1}}%%       % \typeout{\meaning#1}%%       \expandafter\ifx\expandafter\relax\detokenize{#2}\relax\else         \mytypeout#2\@nil       \fi}      I would use it as follows:               \mytypeout ==> A testing mytypeout on its own\my@linefeed                ==> B testing mytypeout on its own\my@linefeed                ==> C testing mytypeout on its own\my@linefeed                ==> D testing mytypeout on its own\my@linefeed                ==> E testing mytypeout on its own\my@linefeed                ==> F testing mytypeout on its own\my@linefeed\@nil      my `\mytypeout{...}` seemed to work fine until I started using it in conjunction with `booktabs`. The following MWE compiles:               \documentclass{article}     \usepackage{booktabs}     \usepackage{etoolbox}     \usepackage{pgffor}          \makeatletter     %%\let\my@linefeed\relax%% --> raises errors!     %% dummy macro for simulating newlines in output to terminal     \def\my@linefeed{}     \def\mytypeout#1\my@linefeed#2\@nil{%%       \typeout{\detokenize{#1}}%%       % \typeout{\meaning#1}%%       \expandafter\ifx\expandafter\relax\detokenize{#2}\relax\else         \mytypeout#2\@nil       \fi}          %% `\space`s added to make `\typeout` more readable     \def\my@row@of@table{%%       First column matter \space        &        \expandonce\x \space        \noexpand\\       %% Neither \meaning nor \detokenize raise an error       %% if this next line is commented out       % \noexpand\midrule       \noexpand\my@linefeed       }          \def\full@agenda{}     \def\build@agenda{%%       \foreach \x in \list@of@agenda@items {%%         \xdef\full@agenda{%%           \expandonce\full@agenda           \my@row@of@table}%%         \expandafter\mytypeout\full@agenda\my@linefeed\@nil         \typeout{---DONE----}%%       }}          \def\setagenda#1{%%       \bgroup         \def\list@of@agenda@items{#1}%%         \build@agenda         \begin{tabular}{cl}           \toprule           \full@agenda                     \bottomrule         \end{tabular}%%       \egroup       \def\full@agenda{}}          \makeatother     \begin{document}          \setagenda{         {A Line of random content},         {B Not too involved math: $x\cdot y$ },         {C Some more random text.},         {D Random },         {E Hello world},         {F no more}         }          \end{document}      If I uncomment the line                 % \noexpand\midrule      then in order to get the above MWE to compile, I had to change the definition of `\mytypeout`. Namely, I had to change               \typeout{\meaning#1}      to               \typeout{\detokenize{#1}}      I can't quite figure out what's going on here. I tried isolating the error by testing the following code               %% No problems with `\typeout` + `\meaning` in either of the next two examples:     %% example #1     \def\aetemp{\midrule}     \typeout{TEMP(A):\meaning\aetemp}     %% example #2     \def\aetemp{\noexpand\midrule}     \typeout{TEMP(B):\meaning\aetemp}      But I didn't get any errors. What's happening here? What am I missing?


title: Fixing lstlisting inside exsheets question and solution environments

text: I am trying to use `exsheets` to prepare the tests for Foundation of Programming exam. I need to include snippets of C code in some `question` and `solution` and I am going to use `listings` (with the options specified in the _minimal working example_ below). However I realised that the code is messed up if injected inside a `question` or a `solution`. Do you know how to work around the problem? * * * **Minimal Working Example**               \documentclass{article}          \usepackage{xcolor}     \usepackage{listings}     \usepackage{exsheets}          \lstset{       frame=single,       xleftmargin=20pt,       numbers=left,       numberstyle=\small,       tabsize=2,       breaklines,       showspaces=false,       showstringspaces=false,       language=C,       basicstyle=\small\ttfamily,       commentstyle=\itshape\color{gray}     }          \begin{document}          \begin{question}{6}     Consider the following C program.     \begin{lstlisting}     #include <stdio.h>          int main(int argc, char *argv[]) {       printf("hello, world\n");     }     \end{lstlisting}     \end{question}          \begin{solution}     Consider the following C program.     \begin{lstlisting}     #include <stdio.h>          int main(int argc, char *argv[]) {       printf("hello, world\n");     }     \end{lstlisting}     \end{solution}          \pagebreak     \printsolutions           \end{document}


title: How can I change the color of a \enquote quotation inside Emacs?

text: When I paste a text inside quotation marks into Emacs+AUCTeX, AUCTeX formats it with a soft red color (see the screenshot below at the first line). I like this color. However, I'm using `csquotes` package to handle (multilingual) quotations marks. The `\enquote` commands (provided by `csquote` package) use another color. I don't like this last color (see screenshot at the second line). With this ugly soft green color, I cannot find quickly quotation inside a big document. How can I change `csquotes` default color to use AUCTeX default one? ## The screenshot: ![enter image description here](http://i.stack.imgur.com/opg1j.png) (This screenshot uses French quotation marks but it hasn't any influence on my question.) There is a bunch of settings about fontification in the csquotes.el file but I didn't see any reference to colors:                 ;; Fontification        (when (and (featurep 'font-latex)               (eq TeX-install-font-lock 'font-latex-setup))          (font-latex-add-keywords '(("DisableQuotes" "")                     ("RestoreQuotes" ""))                       'function)          (font-latex-add-keywords '(("enquote" "*{")                     ("foreignquote" "*{{")                     ("hyphenquote" "*{{")                     ("textcquote" "*[[{[{")                     ("foreigntextcquote" "*{[[{[{")                     ("hyphentextcquote" "*{[[{[{")                     ("textquote" "*[[{")                     ("foreigntextquote" "*{[[{")                     ("hyphentextquote" "*{[[{")                     ("blockquote" "[[{")                     ("foreignblockquote" "{[[{")                     ("hyphenblockquote" "{[[{")                     ("blockcquote" "[[{[{")                     ("foreignblockcquote" "{[[{[{")                     ("hyphenblockcquote" "{[[{[{"))                       'textual)          (font-latex-add-keywords '(("setquotestyle" "[{")                     ("MakeOuterQuote" "{")                     ("MakeInnerQuote" "{")                     ("MakeAutoQuote" "*{{")                     ("MakeForeignQuote" "*{{{")                     ("MakeHyphenQuote" "*{{{")                     ("MakeBlockQuote" "{{{")                     ("MakeForeignBlockQuote" "{{{{")                     ("MakeHyphenBlockQuote" "{{{{")                     ("DeclareQuoteStyle" "[{[[{[{[{[{")                     ("DeclareQuoteAlias" "[{{")                     ("DeclareQuoteOption" "{")                     ("DeclarePlainStyle" "{{{{")                     ("SetBlockThreshold" "{")                     ("SetBlockEnvironment" "{")                     ("SetCiteCommand" "{"))                       'variable)))))          ;;; csquotes.el ends here


title: LaTeX file not compiling due to too many unprocessed floats and other error messages

text: I am in the process of trying to compile a LaTeX document. I have a separate `.bib` file and am using BiBTex. I had put in eight figures, generally using the `htbp` placement option, and these compiled fine. However when trying to compile to insert a 9th figure using the command:               \begin{figure}[htbp]      \centering      \includegraphics[width=\textwidth]{figures/Fig9-retry.png}      \caption[A representation of an injector block.]{A representation of an injector block.}      \label{fig:9}      \end{figure}       It does not compile and I get the following error messages:               <use figures/Fig8-storagemod.png>      Package pdftex.def Info: figures/Fig8-storagemod.png used on input line 270.      (pdftex.def) Requested size: 455.24411pt x 266.9888pt.      [13 <C:/Users/jd7368/Documents/Lit review/figures/Fig8-storagemod.png>] [14] [      15] [16] [17] [18]      ! Undefined control sequence.      <argument> ... \sf@size \z@ \selectfont \@currbox      l.440 \begin{figure}[htbp]      The control sequence at the end of the top line      of your error message was never \def'ed. If you have      misspelled it (e.g., `\hobx'), type `I' and the correct      spelling (e.g., `I\hbox'). Otherwise just continue,      and I'll forget about whatever was undefined.           Missing character: There is no ô in font cmr12!      Missing character: There is no ó in font cmr12!      Missing character: There is no ò in font cmr12!      Missing character: There is no ñ in font cmr12!      Missing character: There is no ð in font cmr12!      Missing character: There is no ï in font cmr12!      Missing character: There is no î in font cmr12!      Missing character: There is no í in font cmr12!      Missing character: There is no ì in font cmr12!      Missing character: There is no ë in font cmr12!      Missing character: There is no ü in font cmr12!      Missing character: There is no û in font cmr12!      Missing character: There is no ú in font cmr12!      Missing character: There is no ù in font cmr12!      Missing character: There is no ø in font cmr12!      Missing character: There is no ÷ in font cmr12!      Missing character: There is no ö in font cmr12!      Missing character: There is no õ in font cmr12!      ! Undefined control sequence.      \@xfloat ...a \@tempcntb \global \count \@currbox      \@tempcnta }\@fltovf \fi \...      l.440 \begin{figure}[htbp]      The control sequence at the end of the top line      of your error message was never \def'ed. If you have      misspelled it (e.g., `\hobx'), type `I' and the correct      spelling (e.g., `I\hbox'). Otherwise just continue,      and I'll forget about whatever was undefined.           ! Missing number, treated as zero.      <to be read again>      }      l.440 \begin{figure}[htbp]      A number should have been here; I inserted `0'.      (If you can't figure out why I needed to see a number,      look up `weird error' in the index to The TeXbook.)                ! LaTeX Error: Too many unprocessed floats.           See the LaTeX manual or LaTeX Companion for explanation.      Type H <return> for immediate help.      ...      l.440 \begin{figure}[htbp]      You've lost some text. Try typing <return> to proceed.      If that doesn't work, type X <return> to quit.           ! Undefined control sequence.      \@xfloat ...@fltovf \fi \global \setbox \@currbox      \color@vbox \normalcolor \...      l.440 \begin{figure}[htbp]      The control sequence at the end of the top line      of your error message was never \def'ed. If you have      misspelled it (e.g., `\hobx'), type `I' and the correct      spelling (e.g., `I\hbox'). Otherwise just continue,      and I'll forget about whatever was undefined.           ! Missing number, treated as zero.      <to be read again>      \color@vbox      l.440 \begin{figure}[htbp]      A number should have been here; I inserted `0'.      (If you can't figure out why I needed to see a number,      look up `weird error' in the index to The TeXbook.)           <figures/Fig9-retry.png, id=518, 642.14906pt x 331.99031pt>      File: figures/Fig9-retry.png Graphic file (type png)           <use figures/Fig9-retry.png>      Package pdftex.def Info: figures/Fig9-retry.png used on input line 442.      (pdftex.def) Requested size: 455.24411pt x 235.36522pt.           ! Undefined control sequence.      \@largefloatcheck ->\ifdim \ht \@currbox      >\textheight \@tempdima -\textheigh...      l.445 \end{figure}      The control sequence at the end of the top line      of your error message was never \def'ed. If you have      misspelled it (e.g., `\hobx'), type `I' and the correct      spelling (e.g., `I\hbox'). Otherwise just continue,      and I'll forget about whatever was undefined.           ! Missing number, treated as zero.      <to be read again>      >      l.445 \end{figure}      A number should have been here; I inserted `0'.      (If you can't figure out why I needed to see a number,      look up `weird error' in the index to The TeXbook.)           ! Undefined control sequence.      <argument> \@currbox      l.445 \end{figure}      The control sequence at the end of the top line      of your error message was never \def'ed. If you have      misspelled it (e.g., `\hobx'), type `I' and the correct      spelling (e.g., `I\hbox'). Otherwise just continue,      and I'll forget about whatever was undefined.           ! Improper \prevdepth.      <recently read> \prevdepth      l.445 \end{figure}      You can refer to \spacefactor only in horizontal mode;      you can refer to \prevdepth only in vertical mode; and      neither of these is meaningful inside \write. So      I'm forgetting what you said and using zero instead.           ! You can't use `\prevdepth' in horizontal mode.      \end@float ...pdima \prevdepth \vbox {}\prevdepth      \@tempdima \penalty \@floa...      l.445 \end{figure}      Sorry, but I'm not programmed to handle this case;      I'll just pretend that you didn't ask for it.      If you're in the wrong mode, you might be able to      return to the right one by typing `I}' or `I$' or `I\par'.           ! Missing number, treated as zero.      <to be read again>      \penalty      l.445 \end{figure}      A number should have been here; I inserted `0'.      (If you can't figure out why I needed to see a number,      look up `weird error' in the index to The TeXbook.)           ! Illegal unit of measure (pt inserted).      <to be read again>      \penalty      l.445 \end{figure}      Dimensions can be in units of em, ex, in, pt, pc,      cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!      I'll assume that you meant to say pt, for printer's points.      To recover gracefully from this error, it's best to      delete the erroneous units; e.g., type `2' to delete      two letters. (See Chapter 27 of The TeXbook.)       I have looked into a few previous forum answers relating to the “too many unprocessed floats” problem and I tried inserting the `\clearpage` command at the bottom of each page, and also tried using the morefloats package. Neither of these seemed to work and it is still not compiling. The problem seems linked with the 9th figure insert. Does anyone have and suggestions on how I could get the file to compile? This would be much appreciated. My pre-amble looks like:               \documentclass[a4paper,12pt]{report}      \usepackage{graphicx}      \usepackage[left=3.0cm, right=2.0cm, top=3.0cm, bottom=3.0cm]{geometry}      \usepackage{amsmath}      \usepackage{url}      \usepackage[notlof, nottoc, notlot]{tocbibind}      \usepackage{hyperref}      \usepackage{siunitx}      \usepackage{mathabx}      \usepackage{morefloats}      \usepackage{setspace}      \linespread{1.6}      \usepackage{cite}


title: Cannot make substitution

text: I want a command `\myreplace` replacing all instances of `:` with the `\textlengthmark` command from the `tipa` package. (In fact, this is one of the things that the `tipa` command `\textipa` does, but for reasons unrelated to this matter, I cannot use that particular command.) Therefore, I run the code.               \documentclass{memoir}          \usepackage{xstring,tipa}          \newcommand*\myreplace[1]{\StrSubstitute{#1}{:}{\textlengthmark}}          \begin{document}          \myreplace{gaga:}          \end{document}      However, all I get is > TeX capacity exceeded, sorry [input stack size=5000] \myreplace{gaga:} This seems related to the `\textlengthmark` command, since replacing it with any other string works just fine. Can somebody find the error?


title: Putting bibliographies at the end of each chapter

text: I have a project that requires that separate bibliographies be maintained for each chapter and that the references appear at the end of each chapter. I am using `natbib` and I know that I should be using               \usepackage{natbib}     \usepackage{chapterbib}      But I am having problems with the directory structure (I think). Here is my structure               Main directory         book.tex         abbr.bib (this incluses @string abbreviation definitions for journal names)         ch1-directory            ch1.tex            ch1.bib         ch2-directory            ...      A minimal example of my `book.tex` file contents is as follows:               \documentclass{book}     \usepackage[square,sort]{natbib}     \usepackage{chapterbib}     \begin{document}         \include{ch1-directory/ch1}     \end{document}      My `ch1.tex` file has the following at the very end:               \bibliographystyle{plainnat}     \bibliography{../abbr,ch01}      Bibtex'ing the `book.tex` file gives two errors:               I couldn't open database file ../publications.bib     ---line 15 of file ch-1/ch01.aux      : \bibdata{../abbr      :                 ,ch01}     I'm skipping whatever remains of this command     I found no database files---while reading file book.aux     Warning--I didn't find a database entry for "Luhn:1958fk"     Warning--I didn't find a database entry for "Bertossi:2011uq"     Warning--I didn't find a database entry for "Deutch:2012kx"     Warning--I didn't find a database entry for "Carenini:2011vn"     Warning--I didn't find a database entry for "Armbrust:2010ys"      I wonder what I am doing wrong. I did find other discussions here about putting references at the end of chapters, but they do not have the nested directory structure that I have, and it seems that is the main problem.


title: \AtBeginChapter?

text: Are there any hooks that work like `\AtBeginDocument` for chapters, sections, etc.? Something like `\AtBeginChapter`? I would like to have the following code:               \AtBeginChapter{%        \setcounter{mycounter}{2}%        . . .      }      Yes—I know that I can create my counter so as reset itself whenever a new chapter starts, with               \newcounter{mycounter}[chapter]      but I would like to have more control as to what happens when a new chapter, section, etc. starts.


title: How to indent the whole text and float environment?

text: Using http://www.latex-community.org/viewtopic.php?f=4&t=251&start=10 I can indent the text, but how to center the figures and table like the image as follow? ![enter image description here](http://i.stack.imgur.com/QzuBl.png) My code               \documentclass{article}     \usepackage{lipsum}% http://ctan.org/pkg/lipsum     \usepackage[a4paper,text={150true mm,224true mm}]{geometry}     \usepackage{fancyhdr}     \pagestyle{fancy}     \usepackage{titlesec}                % define section style     \let\oldsection\section     \renewcommand{\section}{\leftskip=6em \oldsection}     \let\oldsubsection\subsection     \renewcommand{\subsection}{\leftskip=6em \oldsubsection}     \let\oldsubsubsection\subsubsection     \renewcommand{\subsubsection}{\leftskip=6em \oldsubsubsection}     \begin{document}     \section{First section}      \lipsum[1]     \begin{figure}[htbp]     \centering     \rule{4cm}{2cm}     \caption{figure}\label{fig:1}     \end{figure}     \lipsum[2]     \subsection{First subsection}      \lipsum[2]     \subsection{Second subsection}      \lipsum[3]     \subsection{Third subsection}      \lipsum[4]     \subsection{Last subsection}      \lipsum[5]     \section{Second section}      \lipsum[1]     \subsection{First subsection}      \lipsum[2]     \subsection{Second subsection}      \lipsum[3]     \subsection{Third subsection}      \lipsum[4]     \end{document}      get ![enter image description here](http://i.stack.imgur.com/JtvvH.png)


title: Numbering figures and tables in a problem set

text: A standard problem set from a physics textbook is divided into sections, with problems numbered sequentially from start to finish (i.e., not resetting in every section). Tables and figures are numbered as the problems, without any extra sub-numbering, because it is assumed that no problem will be associated with more than one table or figure (and if that were the case, it would probably get an a,b,c,... sub-numbering, only when needed). This means that problem 8 goes with figure 8 and problem 15 with figure 15, even if all problems in between lack any figures. I've used the `enumerate` package to achieve sequential numbering of the problems, and it works beautifully, but so far I have not succeeded in getting tables and figures numbered in the same way as the problems. The `chngcntr` package comes close to providing the functionality I need, but, as far as I can see, it always assumes that a sub-numbering scheme should take place, so that I get figure 5.1 accompanying problem 5, which is not what I want (because there is no figure 5.2). Any ideas would be greatly appreciated!


title: \psmatrix baseline

text: I'm using lingmacros' `\enumsentence` with a `\psmatrix` inside.               \enumsentence{     \psset{linewidth=.5pt}     \begin{psmatrix}[rowsep=.2cm,nodesep=.05cm,colsep=.1cm]     &\rnode{gm}{grammatical morphemes}\\     \rnode{m}{\textit{bound}}&&\rnode{s}{free}\\     &\rnode{h}{\textit{head}}&&\rnode{d}{dependent}\\     &&\rnode{c}{\textit{complement}}&&\rnode{mod}{\textit{modifier}}     \ncline{gm}{m}\ncline{gm}{s}     \ncline{s}{h}\ncline{s}{d}     \ncline{d}{c}\ncline{d}{mod}     \end{psmatrix}     }      This results in the example number aligned with the bottom of the `psmatrix`. I'd like it to align with the top. Normally, I think, `minipage` is used for this sort of thing. However, it seems that `minipage` isn't helping in this context (I'm flummoxed as to why.) I found a thread with what seems to be a similar question here. But I don't see an answer given. Any ideas? edit: in reply to a comment, I'm adding a minimal working example:               \documentclass{article}     \usepackage{pstricks,pst-node}     \usepackage{lingmacros}     \begin{document}               \enumsentence{     \psset{linewidth=.5pt}     \begin{psmatrix}[rowsep=.2cm,nodesep=.05cm,colsep=.1cm]     &\rnode{gm}{grammatical morphemes}\\     \rnode{m}{\textit{bound}}&&\rnode{s}{free}\\     &\rnode{h}{\textit{head}}&&\rnode{d}{dependent}\\     &&\rnode{c}{\textit{complement}}&&\rnode{mod}{\textit{modifier}}     \ncline{gm}{m}\ncline{gm}{s}     \ncline{s}{h}\ncline{s}{d}     \ncline{d}{c}\ncline{d}{mod}     \end{psmatrix}     }          \end{document}      The above code compiles but produces the example number aligned with the baseline of the `psmatrix` as described above.


title: Importing PDF in LateX

text: I have include `PDF` file in `latex` but I want to know that is there any method that table of content can automatically be updated after importing the `PDF` file. I searched a lot but can't find any thing useful.


title: Formatting bibliography: biblio entry followed by page number(s) where the entry is cited. How?

text: I'm trying to format a bibliography for a journal submission, and they have the requirement that each bibliography entry is followed by "the page numbers of your manuscript in which these references are cited," . For instance: > SMITH, John, T. (1966): The Theory of Social Science. Ulan Bator: Famous > University Press. [2,3] Here 2 and 3 would be the pages in my manuscript, where this book is cited. I'm using `natbib`. Any idea how to do this?


title: How to emulate \pdfstartlink and \pdfendlink with xetex?

text: In my `ocgx` package, I would use the new `ocg-p` package instead of the `ocg` package. With pdflatex or lualatex, all is good. But with xelatex, I obviously can't use `\pdfstartlink` and `\pdfendlink` (these primitives are provided by `pdftex` or `luatex`). How to emulate these two primitives with xetex? Here is an example of current code in my `ocgx` package:               \long\def\switchocg#1#2{%       \def\ocgx@list{}%       \ocgx@listOCG#1 ENDOFOCGS %       \leavevmode%       \pdfstartlink user {%         /Subtype /Link         /A << /S/SetOCGState /State [/Toggle \ocgx@list] >>         /Border [0 0 0]       }%       #2\pdfendlink%     }


title: Uncover Table Row-wise not working with \setbeamercovered{transparent}

text: Consider the following MWE:               \documentclass[10pt,compress,                    xcolor={dvipsnames,table}                   ]{beamer}     %%%Beameroptions      \usetheme{Luebeck}      \usecolortheme{orchid}      \usefonttheme{default}      \useinnertheme{rectangles}      \useoutertheme{default}      \setbeamercovered{transparent}     \begin{document}          \begin{frame}{onslide}     \begin{tabular}{l c r}     \hline      letter  & number & misc. \\     \hline     \onslide<1->{     A & 10 & ! \\     }     \onslide<2>{     B & 20 & ? \\[-\normalbaselineskip]     }     \\\hline     \end{tabular}     \end{frame}          \begin{frame}{onslide+}     \begin{tabular}{l c r}     \hline      letter  & number & misc. \\     \hline     \onslide+<1->{     A & 10 & ! \\     }     \onslide+<2>{     B & 20 & ? \\[-\normalbaselineskip]     }     \\\hline     \end{tabular}     \end{frame}          \begin{frame}{onslide in every cell}     \begin{tabular}{l c r}     \hline      letter  & number & misc. \\     \hline     \onslide<1->{A} & \onslide<1->{10} & \onslide<1->{!} \\     \onslide<2->{B} & \onslide<2->{20} & \onslide<2->{?} \\\hline     \end{tabular}     \end{frame}          \begin{frame}{pause}     \begin{tabular}{l c r}     \hline      letter  & number & misc. \\     \hline     A & 10 & ! \pause\\     B & 20 & ? \\     \hline     \end{tabular}     \end{frame}     \end{document}      What I want to do is uncover a similar table in two steps. Unfortunately I face some problems with that. I have already read this and it does work fantastically. (I also followed these descriptions.)However, once I add `\setbeamercovered{transparent}` to the preamble it does not work anymore. Instead of using the whole argument enclosed in `\onslide<2->{ ... }` only the contents of the first cell is displayed in transparent. I found a workaround here, using `\onslide+<2->{ ... }`,which works fine, but not in the way I would like it to behave: Instead of displaying the argument transparent it is not displayed at all. I could live with this for the moment, but as `itemize` environments work just fine I would rather switch off transparency entirely. (`\visible<2->{ ... }` has the same effect. Using `\invisible{ ... }` is more complicated and has similar effects.) Another problem arises with the alignment of the first column, but this might just be unfortunate and removed by commenting out line endings. I have not tried this yet because I wanted to focus on the other problem. I also tried to workaround with putting `\onslide<2->{ ... }` in every cell, which works 'just' fine, but is a rather nasty workaround. While the example shows a very small table, the actual ones are much more complicated and I would prefer a simpler solution. I have also tried the pause command, which produces two slides, that are exactly the same. Again if I remove the `transparent` option it works just fine (as it should). I expect the problem to be similar to that described in section 23.4 with the alignment in formulas (the code is reprocessed several times, messing things up.). But I have no clue of the internals, hence cannot create a working solution. For that kind of thing was suggested a workaround, which is even more nasty than putting `onslide` in every cell. (See here.) I browsed manual and the internet quite a bit but nothing led me to a satisfying conclusion. (Apart from those I already discussed.) Maybe someone can point me in the right direction. I am interested in some more convenient and more elegant solutions than the presented ones. Any ideas are very welcome.


title: IEEEtran remove author picture

text: I'm using LyX and the `article (IEEEtran)` template to write a paper for an IEEE conference. In the biographies section, there's a default space for a picture for the first author. Even if I remove the optional placeholder in the LyX GUI, There's an empty box generated in the PDF where such a picture would go. I know that I can get around this with LaTeX directly by using `\begin{IEEEbiographynophoto}` instead of `\begin{IEEEbiography}`.   However, I do not see a way to get around this without having to export to LaTeX from LyX and then edit the `.tex` file. Is there a way to get LyX to not require a picture for the first author?


title: Inconsistent ulem (with textbf and textit)

text: Using the latest (2012-05-18) ulem package gives inconsistent underlining after font changes respectively depending on the position of the underlined text:               \documentclass{article}     \usepackage{ulem}          \begin{document}       \textbf{foo} \dashuline{bar}\par       \textit{foo} \dashuline{bar}\par       f \dashuline{bar}\par       fo \dashuline{bar}\par       foo \dashuline{bar}\par       foof \dashuline{bar}\par       foofo \dashuline{bar}\par     \end{document}      leads to ![enter image description here](http://i.stack.imgur.com/1F8n2.png) with different a) counts of dashes and b) horizontal placement relative to the underlined word. Is there a way to get consistent (`\dashuline{bar}` looking exactly the same in all above positions) underlining?


title: LaTeX table adjustments

text: I am typing the following table in LaTeX:               \begin{center}     \setlength\extrarowheight{5pt}     %\renewcommand{\arraystretch}{1.2}     \begin{tabular*}{3.4in}{@{\extracolsep{\fill} }  | c | c | c | c | c | c | c | }       \hline       \small\textit{g(t+0)} & \small\textit{g(t+1)} & \small\textit{g(t+2)} & \small\textit{f(t+3)} & \small\textit{f(t+4)} & \small\textit{g(t+5)} & \small{...}  \\       \hline     \end{tabular*}     \end{center}      I get the following output: ![eoutput](http://i.stack.imgur.com/8hD5J.png)   1. Note the overlap on the left. How can I remove them?   2. How do I adjust the fonts to be centered in the middle of the columns other than on the bottom?


title: How to generate full citation using multibib in latex

text: I am new to Latex and am using it for an academic paper. As I need several bibliographies, I am using multibib which is working great, but I need full citations of the bibliography entries to appear at several point in the text as well. I have about 150 entries so I really don't fancy putting them all in manually... Is there a way to do this? I read about the \bibentry package but I can't get it to work with multibib... Any help would be greatly appreciated.               \documentclass[11pt,oneside,a4paper]{report}     \usepackage{multibib}     \newcites{sec}{Secondary Sources}          \begin{document}     Blablablabla \fullcitation-from-either-bibliography blablabla          \bibliographystyle{acm}     \renewcommand\bibname{Primary Sources}     \bibliography{pri}          \bibliographystylesec{acm}     \bibliographysec{sec}          \end{document}


title: Unix Text Processing

text: In 1987 Dale Dougherty and Tim O'Reilly wrote a marvelous book Unix Text Processing which is now freely available. The book gives tour the force introduction to the world of Unix text processing tools: vi, regex, sed, awk, Troff (various macros). Even though TeX was available at that time and vastly superior to Troff (at least for typesetting Mathematics) it has never been the part of the standard Unix installation and it will never be (kerTeX is the only reasonable distribution of TeX that could be considered a system tool). I was wondering if anybody is aware of any project to write a TeX based "Unix Text Processing book" (My title would be "Unix TeXt processing book")? The potential audience for the book are power or would be power users, those folks who like to learn things once and use them all their lives.


title: What is the right way of creating bilingual book with poetry?

text: I want to create a book with poetry in two columns, side-by-side, in different languages. After some googling, I chose the `ledmac` and `ledpar` packages. But then I found myself doing hacks, and I wonder if there is a better way. In particular, I need the following:   1. Aligned stanzas (in other words, starting lines of stanzas with the same numbers from both columns are at the same height). `astanza` environment does that.   2. Numbered stanzas (only for the left column). I am using the macro from `ledpar` documentation:               \newcommand*{\stanzanum}[2][\stanzaindentbase]{%             \hskip -#1\llap{\textbf{#2}}\hskip #1             \ignorespaces}             % Use: \stanzanum{<dimen: whitespace after # of stanza>}{<text: # of stanza>}          \newcommand{\interstanza}{\par\mbox{}\skipnumbering}        1. No line numbers. I set `\firstlinenum{999}` in the beginning of the document.   2. Footnotes for stanzas. Something like:              \begin{astanza}     blablabla     \end{astanza}     \stanzafootnote{foobar}      And this is supposed to create a footnote with the number of the stanza. This can be done by creating the counter for stanza number and the macro with this number and `\footnotetext`. So, are there any packages that can do it already? Or did I miss something in documentation? Maybe `ledmac` and `ledpar` were not the best choice? I find it suspicious that I am writing macros for things that seem to be common tasks. Thank you in advance. Sorry if the question is stupid.


title: How to add multi-authors with different affiliations in Beamer using LyX?

text: I want to have two authors with different affiliations showing on the cover page in `beamer`. Can anyone help me how I can do this in LyX? Specifically, I want to have the below structure:                   Title             Author1      Affiliation1             Author2      Affiliation2          Conference         Date


title: xdvipdfmx parse error when using particular font with fontspec

text: I am using the font `IM FELL English PRO` (open-source otf here) via the `fontspec` package, and when I tried typesetting the character `\'{n}`, I got this error:               xdvipdfmx:fatal: Type2 Charstring Parser: Parsing charstring failed: (status=-1, stack=5)     Output file removed.      Here is the MWE:               \documentclass{minimal}     \usepackage{fontspec}     \setmainfont{IM FELL English PRO}     \begin{document}     \'{n}     \end{document}      I am using XeTeX version 3.14159265-2.6-0.99991 and `fontspec` version 2.4a. Another user also got the same error using LuaTeX with this MWE. The character `\'{n}` does exist in this font. I haven't come across any other character that gives this error. The error goes away if I change to another font, such as `Arial`. There is another similar thread where the OP there got the same error with some fonts but not others. It was suggested there for various reasons that I should start a new question. The font developer Igino Marini told me the font had been generated in FontLab Studio and had passed the Microsoft Font Validator, and no problems have been reported to him outside of LaTeX. Many thanks for looking into this.


title: How to make an appendix with only tables without "too many unprocessed floats" errors?

text: I'm often writing reports containing over 50 tables and over 200 figures that have to be included in appendices. The problem is obvious: if you just make an appendix               \chapter{Tables}     \begin{table}      ...     \end{table}          \begin{table}      ...     \end{table}     ...      at a certain point you get the "too many unprocessed floats" error. I've tried specifying `[h]`, `[h!]` and so many other variants, but somehow LaTeX doesn't want to agree on just placing them one after the other, and saves them up. My current solution is to add `\afterpage{\clearpage}` every so often, but this requires me to manually reposition them a number of times before the layout is more or less acceptable. How should this be done without all the manual manipulations?


title: Change TikZ's default coordinate system

text: In the TikZ manual I read that the default coordinate system's spacing is 1cm, so that (1,1) would be a vector going 1cm in x-direction and 1cm in y. In a diagram with a lot of nodes, that I am placing using the options such as `above =of ...`, this spacing is too much. In order to change that, how can I change the coordinate system's default spacing?


title: Howto: Set up knitr (*.Rnw compilation) from in TexStudio

text: How do I set up TeXstudio to compile xxx.Rnw files? I am using the TeX-Editor TeXstudio 2.7, on Windows 7, and R 3.01 64-bit. I would like to write a xxx.Rnw-file in TeXstudio and then from TeXstudio automatically (a) call R, (b) compile the Rnw to tex using knitr, (c) compile the pdf, (d) view the Pdf. I found these pieces of information regarding the issue   * http://yihui.name/knitr/demo/editors/   * http://sourceforge.net/p/texstudio/feature-requests/250/ Using the configuration "Rscript -e "library(knitr); knit2pdf('"test"Rnw')" for the user-defined compilatin command in TeXstudio, I get the error message that the _command could not be started_ if I try to compile a sample file. I would be glad if somebody made this work and is willing to share the configuration of the TeXstudio commands. Thanks a lot in advance! Jana


title: \uppercase does not work with \IfSubStr?

text: I'm using `\IfSubStr` macro of `xstring` package to decide if user given options contains some letter and if they do I take some actions. I want case independent test on whether user options contain that letter so I thought I will just use `\uppercase` macro to implement case independent comparison. But it does not work as I expect. Here is minimal demonstration:               \usepackage{xstring}     \newcommand{\test}[1]{%       \IfSubStr{\uppercase{#1}}{K}{%then         In then%       }{%else         In else%       }     }     \begin{document}       \test{k}     \end{document}      I would expect this to print `In then`, but instead it prints `In else`. Why is that and how do I fix it so that it prints `In then` as I expect?


title: vertical line in tabular and size

text: In the code below, how do I add a vertical line to separate the second column from everything to the right of it? Also, the content of the table is too wide horizontally. I can see though that if columns 4 and up were aligned better, the content would perfectly fit the page. What would be the best way to do it? Thanks much in advance. ![enter image description here](http://i.stack.imgur.com/q9a53.png)               \documentclass[11pt]{article}          \usepackage{rotating}          \usepackage[         lmargin=1.0in,         rmargin=1.0in,         tmargin=2.0cm,         bmargin=2.0cm     ]{geometry}                    \usepackage{tabularx, booktabs}     \newcolumntype{Y}{>{\centering\arraybackslash}X}          \usepackage{multirow}               \begin{document}          \renewcommand{\arraystretch}{1.1}     \begin{sidewaystable}         \centering         \caption{bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.}      %   \scalebox{0.95}{         \begin{tabularx}{\textheight}{@{}l@{\quad}lc*{11}{Y}@{}}         \toprule           & & &\multicolumn{11}{c}{aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}\\[1mm]           & & $a$ &$1\times10^2$ & $2\times10^2$ & $3\times10^2$ & $4\times10^2$ & $5\times10^2$ & $6\times10^2$ & $7\times10^2$ & $8\times10^2$ & $9\times10^2$             & $1\times10^3$ & $1\times10^4$\\         %\midrule         \cmidrule[0.6pt]{4-14}             \parbox[t]{3mm}{\multirow{22}{*}{\rotatebox[origin=c]{90}{cccccccccccccccccccccccccccccc}}}                 &\multirow{2}{*}{0.0}                 &\multirow{2}{*}{0.000000}                 & $00.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$  & $000.00$ & $0,000.00$\\                 & &                 & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(0,000.000)$ & $(00,000.000)$\\         \cmidrule{2-14}                 &\multirow{2}{*}{0.0}                 &\multirow{2}{*}{0.000000}                 & $00.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$  & $000.00$ & $0,000.00$\\                 & &                 & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(0,000.000)$ & $(00,000.000)$\\         \cmidrule{2-14}                 &\multirow{2}{*}{0.0}                 &\multirow{2}{*}{0.000000}                 & $00.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$  & $000.00$ & $0,000.00$\\                 & &                 & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(0,000.000)$ & $(00,000.000)$\\         \cmidrule{2-14}                 &\multirow{2}{*}{0.0}                 &\multirow{2}{*}{0.000000}                 & $00.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$  & $000.00$ & $0,000.00$\\                 & &                 & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(0,000.000)$ & $(00,000.000)$\\         \cmidrule{2-14}                 &\multirow{2}{*}{0.0}                 &\multirow{2}{*}{0.000000}                 & $00.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$  & $000.00$ & $0,000.00$\\                 & &                 & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(0,000.000)$ & $(00,000.000)$\\         \cmidrule{2-14}                 &\multirow{2}{*}{0.0}                 &\multirow{2}{*}{0.000000}                 & $00.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$  & $000.00$ & $0,000.00$\\                 & &                 & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(0,000.000)$ & $(00,000.000)$\\         \cmidrule{2-14}                 &\multirow{2}{*}{0.0}                 &\multirow{2}{*}{0.000000}                 & $00.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$  & $000.00$ & $0,000.00$\\                 & &                 & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(0,000.000)$ & $(00,000.000)$\\         \cmidrule{2-14}                 &\multirow{2}{*}{0.0}                 &\multirow{2}{*}{0.000000}                 & $00.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$  & $000.00$ & $0,000.00$\\                 & &                 & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(0,000.000)$ & $(00,000.000)$\\         \cmidrule{2-14}                 &\multirow{2}{*}{0.0}                 &\multirow{2}{*}{0.000000}                 & $00.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$  & $000.00$ & $0,000.00$\\                 & &                 & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(0,000.000)$ & $(00,000.000)$\\         \cmidrule{2-14}                 &\multirow{2}{*}{0.0}                 &\multirow{2}{*}{0.000000}                 & $00.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$ & $000.00$  & $000.00$ & $0,000.00$\\                 & &                 & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(000.000)$ & $(0,000.000)$ & $(00,000.000)$\\         \bottomrule         \end{tabularx}       %  } % endof \scalebox     \end{sidewaystable}               \end{document}


title: newclude does not include file content

text: I am trying to include chapters in a document without page breaks and found the `newclude` package can do this using `\include*`, however, when I try to implement it, instead of inputing the file, I just get text. I have something like this...               \input{Layout.tex}  %Here I have some layout stuff for page numbering and such     \input{Macros.tex}  %Here I have the \usepackage{newclude} command     \begin{document}     \input{TitlePage.tex}          \chapter{Introduction}     \include*{1-Introduction}          \end{document}      The output is fine through the title page, but the Introduction has the chapter at the top with `Introduction` and the text is `1-Introduction`. I'm not sure what I'm doing incorrectly with this file. The above compiles fine using the normal `\include` command without the `newclude` package.


title: Typesetting URL/URI/IRI in plain TeX

text: I would like to be able to allow line breaking on `/`'s, `?`, and `&`'s. I understand I should change the `\catcode`'s of those letters, but I don't want them to be global, but instead restricted to inside of the macro. This is what I have tried:               \def\url{%       \begingroup%         \def\urlaux##1{##1\endgroup}%         \catcode`\&=13         \def&{\penalty0\char`\&}%         \urlaux}          \url{http://tex.stackexchange.com/some/long/path/and?someBizarreLong=param&andYetAnotherSuchBizarreLong=param}     \bye      but TeX tells me that `&` is inaccessible on its `\def`inition I remember reading something like: “ _The catcode change is not being done during the execution of the macro, but during reading of it_ ”, or something along those lines. But I have tried moving the definition of the ampersand to inside of the `\urlaux`, for example, without success. How could I make it accessible?


title: How to write a big integral in an " align" environment?

text: I would like to write a big integral in a align environment but bigint seems to be useless. Could anyone suggest? Here is a MWE containing the long expression:               \documentclass[a4paper,10pt]{report}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english]{babel}     \usepackage{bigints}          \begin{document}          \begin{align}     P(r, \omega) \propto \bigint_{h \in I}      {\left(  \left(  \frac{r}{L} \right)^2 + c \left( \frac{\eta}{L}  \right)^2 \right)^{(1-h)/2}}     {\exp \left(  -\frac{L \omega}{2}  \left(  \left(  \frac{r}{L} \right)^2 + c \left( \frac{\eta}{L}  \right)^2 \right)^{(1-h)/2} \right)}\\\nonumber     \left( \left( \frac{r}{L} \right)^{3-D(h)} + c \left( \frac{\eta}{L} \right)^{3-D(h)} \right)     dh.     \end{align}               \end{document}


title: How to include concluding remarks in my paper

text: I was wondering if there is some standard way of including a “concluding remarks” section in a LaTeX document. I couldn't find a specific environment to do this in (I was hoping there would be something similar to the `abstract` environment...), and keeping in mind that I have written a 20 page paper, organized in sections and subsections, neither of the following options really satisfies me:   1. Just adding a new section. This makes the most sense, but I only have other three sections in my paper, and they are all several pages long, while my concluding remarks occupy about a third of a page.   2. Adding a new subsection. Although this alternative doesn't have the problem of having a huge title for a small bit of text, it has the defect that the concluding remarks would seem to refer to the last section only, while my intention is that they should refer to the whole text.   3. Using the `abstract` environment and getting it to display "concluding remarks" instead of "abstract" (is it possible to do this? I tried adding `[optional arguments]`, but it didn't recognize them), but it wouldn't be at all standard.  Sorry if this isn't a standard LaTeX question, but I'd really like to organize my text properly, and I'm convinced there is an elegant way to do it. Perhaps one of the experienced LaTeX users on this website will be able to point me in the right direction. Thanks a lot for any advice.


title: How can I make a custom environment that wraps listings?

text: Thanks to this answer, I know it is possible to float and wrap text around a listing. I would like to setup an environment for mini-code snippets that always floats and wraps the same way. I can achieve the effect manually, but every attempt I have made at combining the environments falls flat. Here is a MWE that shows what I'm after and what _doesn't_ work:               \documentclass{scrartcl}          \usepackage{listings}     \usepackage{blindtext}     \usepackage{wrapfig}          \lstnewenvironment{mysnippets}[1][]{%         \lstset{aboveskip=-12pt,belowskip=-12pt,caption=#1,captionpos=b}         \ttfamily     }{%     }     \lstnewenvironment{yoursnippets}[1][]{%         \lstset{aboveskip=-12pt,belowskip=-12pt,caption=#1,captionpos=b}         \wrapfigure{R}{.5\textwidth}         \ttfamily     }{%         \endwrapfigure     }          %% This sort of arrangement doesn't work     %\newenvironment{oursnippets}{%     %    \wrapfigure{R}{.5\textwidth}     %    \mynippets[test]     %}{%     %    \endmysnippets     %    \endwrapfigure     %}          \begin{document}          \subsection*{This works if you do it by hand}          \begin{wrapfigure}{R}{.5\textwidth}     \begin{mysnippets}[ac karni cozumu]     if (aciktim) {         manti yeyeyim     }     \end{mysnippets}     \end{wrapfigure}          \blindtext          \subsection*{This arrangement floats but not to anywhere useful}          \begin{yoursnippets}[ac karni cozumu]     if (aciktin) {         manti yeyin     }     \end{yoursnippets}     \blindtext          %\subsection*{This and all my other attempts don't even compile}     %     %\begin{oursnippets}[ac karni cozumu]     %if (aciktik) {     %    manti yeyelim     %}     %\end{oursnippets}     %\blindtext          \end{document}      Which currently only produces something like: ![MWE](http://i.stack.imgur.com/v8akz.png) I am not attached to `wrapfig`, but would really prefer to stick with `listings` as possible since I use it extensively for larger blocks of code samples already. Is there a way to combine these environments so I have a snippets environment that always floats here and wraps, but is typeset by `listings`?


title: How does \pgfkeysvalueof work?

text: With this minimal example               \documentclass{report}     \usepackage{tikz}          \begin{document}     \tikzset{     line width  = 5cm,     CC/.initial = 7cm     }     It doesn't works :\pgfkeysvalueof{/tikz/line width}          It works : \pgfkeysvalueof{/tikz/CC}     \end{document}      I can't get the value of line width, on the contrary of CC. Why? Is it because CC is stored like plain text and line width is not? How can I achieve my goal?


title: Align appearance of listings and algorithm packages

text: I want the output generated by the listings and the algorithm package to be the same. Consider the following minimum working example.               \documentclass[fontsize=12pt,a4paper,final,parskip=full]{scrreprt}          \usepackage{listings}     \usepackage{xcolor}          \definecolor{Numbers}{rgb}{0.3,0.3,0.3}     \definecolor{Frame}{rgb}{0.5,0.5,0.5}          \lstset{       basicstyle=\small\ttfamily,     columns=fixed,     keywordstyle=\bfseries,       % keyword style     numbers=left,     frame=single,     xleftmargin=\parindent,     language={SPARQL},     numberstyle=\footnotesize\color{Numbers},     rulecolor=\color{Frame},     showspaces=false,     showstringspaces=false     }          \usepackage[boxed]{algorithm}     \usepackage[noend]{algpseudocode}          \begin{document}          \paragraph{First}\mbox{}          \begin{lstlisting}     SELECT *     WHERE {?s ?p ?o.}     \end{lstlisting}          \paragraph{Second}\mbox{}          \begin{algorithm}     \begin{algorithmic}[1]     \Function{doSomething}{params}         \If{params == correct}             \State   doIt         \EndIf     \EndFunction                 \end{algorithmic}     \end{algorithm}          \end{document}      and its output ![enter image description here](http://i.stack.imgur.com/so4JY.png) Both listings should be displayed exactly the same. The main requirement are the line numbers outside the box. Specifying colors for line numbers and boxes would be a bonus.


title: How do I robustly typeset a double-hat?

text: I'm trying to typeset a symbol with two hat accents (useful for denoting superoperators in quantum mechanics, for instance), but `\hat{\hat{L}}` produces too much space between the hats. I found one approach on a LaTeX forum that seems to work, but it requires manual adjustment for each letter that I might want to typeset. If anyone has any suggestions, I'd appreciate it. Thanks!


title: convert moderncv to html

text: I've written my CV in `moderncv` template. Now I'm looking for a fast way to create an HTML version of my CV in order to use it in my website. Any idea?


title: Brackets in biblatex entries

text: Following typical conventions, bibliographical information missing from the publication, but which can be reliably recovered, should be printed between square brackets `[]`. When this applies to the name of the author, this is printed somewhat awkwardly both in the citations and in the bibliography. In the example below, I would like the citations to appear as > ([Lennon 1970]; Lennon 1972) and the references to appear as > [Lennon, John] ([1970]). _[Peace on earth]_. [London]. > > Lennon, John (1972). More peace on earth. London.               \documentclass{article}     \usepackage{csquotes,filecontents}     \usepackage[style=authoryear,dashed=false]{biblatex}     \begin{filecontents}{\jobname.bib}     @BOOK{lennon1970,         AUTHOR = "[John Lennon]",         TITLE = "[Peace on earth]",         YEAR = "[1970]",         LOCATION = "[London]"}     @BOOK{lennon1972,         AUTHOR = "John Lennon",         TITLE = "More peace on earth",         YEAR = "1972",         LOCATION = "London"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     \parencites{lennon1970}{lennon1972}.     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/MSzn0.png)


title: Possible to renew table counter?

text: Can I renew the table counter to use my own counter similarly to renewing, for instance, the `\tablename`? What is the keyword or where could I look for it? This will be used within a `newenvironment` based on `tabu` (in order to have a separate counter from the table environment). This is for the environment created in this question. When we click in a hyperlink in the PDF, we are always sent to the first Interface or last Table in the document. I believe the reason may be that `hyperref` relies on the table counter to work properly; if we comment out the counter decrease, `\addtocounter{table}{-1}`, in the environment definition then: hyperlinks work well, but table numbering is incorrect.               \documentclass{article}          \usepackage{array, booktabs, longtable, tabu}     \usepackage{hyperref}          \newcommand{\ListOfInterfacesName}{List of Interfaces}     \newcommand{\InterfaceName}{Interface}          % Define list of interfaces command     \makeatletter%       \newcommand{\listofinterfaces}{%         \section*{\ListOfInterfacesName}%         \@starttoc{int}  % New toc with extension *.int%         \clearpage%       }%     \makeatother%          % Usage: {}{<label>}{<ifNum>}{<caption>}     \newenvironment{ryetable}[4]{%       \renewcommand{\tablename}{\InterfaceName} % Safe to renew table because it is inside a group       \renewcommand{\thetable}{#3} % Explicitly set table number to given argument (safe because redifinition also occurs inside a group)       \addtocounter{table}{-1} % Reduce counter number since using table increases it automatically       \addcontentsline{int}{subsection}{\protect{\numberline{#3}{#4}}} % Define entry subsection akin to normal tables       \gdef\tmpheaders{#1} % Not currently used       \gdef\tmplabel{\label{#2}} % Save label for later use       \gdef\tmpifnum{#3} % Save interface number       \gdef\tmpcaption{\caption[]{#4}} % Save caption for later use ---> drop the entry to the table list       \begin{longtabu} to \textwidth {@{} X[1,l] X[1,l] X[1,l] >{\raggedright}X[1,l] @{}}         \\\toprule\rowfont\bfseries         Header1 & Header2 & Header3 & Description \\         \midrule       \endfirsthead         \multicolumn{4}{@{}c@{}}{\small\textit{(continued)}}\\         \toprule\rowfont\bfseries         Header1 & Header2 & Header3 & Description \\         \midrule       \endhead         \bottomrule         \multicolumn{4}{@{}r@{}}{\small\textit{(continues)}}\\       \endfoot         \bottomrule         \tmpcaption         \tmplabel       \endlastfoot     }{%       \end{longtabu}     }          \begin{document}     \listoftables     \listofinterfaces %TODO     \section{MySection}     For a nifty new environment check Interface~\ref{if:myinterface}.     \begin{ryetable}{}{if:myinterface}{31}{This is my pretty interface.}     a & b & c & d\\     e & f & g & h\\     i & j & k & l\\     m & n & o & p\\     q & r & s & t\\     u & v & w & x\\     y & z & -- & --\\     \end{ryetable}          % Some other table to show on list     \begin{table}[h]       \centering       \begin{tabular}{c|c}         a&b\\         c&d\\       \end{tabular}       \caption{Caption of tabular table.}       \label{tab:somelabel}     \end{table}          \newpage     \begin{ryetable}{}{if:myif2}{35}{This is the other interface.}     a & b & c & d\\     e & f & g & h\\     i & j & k & l\\     m & n & o & p\\     q & r & s & t\\     u & v & w & x\\     y & z & -- & --\\     \end{ryetable}     Go to Interface~\ref{if:myif2}. % Incorrectly links to first environment     \end{document}


title: Save size exceeded 80000 - which texmf.cnf to edit?

text: This started as a comment on David Carlisle's answer http://tex.stackexchange.com/a/134599/37570 Running under Windows, I see 2 `texmf.cnf` files: under `\texlive\2013` and `\texlive\2013\texmf-dist\web2c`. The first file did not have save size option and I added a value of 160000:               % (Public domain.)     % This texmf.cnf file should contain only your personal changes from the     % original texmf.cnf (for example, as chosen in the installer).     %     % That is, if you need to make changes to texmf.cnf, put your custom     % settings in this file, which is .../texlive/YYYY/texmf.cnf, rather than     % the distributed file (which is .../texlive/YYYY/texmf-dist/web2c/texmf.cnf).     % And include *only* your changed values, not a copy of the whole thing!     %     OSFONTDIR = $SystemRoot/fonts//     save_size = 160000     % for saving values outside current group      The second file had it set to 100000 and I changed to 160000. But still getting the same error that says 80000! So nowhere in the original `texlive` install was a value of 80000 used and still is not, but it throws that error. Full text of an error:               ! TeX capacity exceeded, sorry [save size=80000].     \pgfmath@operation@process ...gfmath@operator {#1}                                                       \ifx \pgfmath@stack@operat...     l.2160 \end{forest}          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:      108577 strings out of 493308      3987696 string characters out of 6141361      1624088 words of memory out of 5000000      111702 multiletter control sequences out of 15000+600000      23776 words of font info for 26 fonts, out of 8000000 for 9000      957 hyphenation exceptions out of 8191      149i,15n,164p,930b,80000s stack positions out of 5000i,500n,10000p,200000b,80000s     !  ==> Fatal error occurred, no output PDF file produced!      **Q:** What am I doing wrong? (Have no control of the assignments as they are inside Forest/PGF. If the document temporary files only slightly exceed the capacity, I need to override it to allow processing of the large trees. But where does the setting have to go? I cannot post the actual document that throws an error here, as it is fairly large, but an MWE is below. There is nothing there but Forest and its options. As you can see, there are no `assignments` in the document at all. The document with live data that throws the error is only different in the following areas:   1. Node text is much longer, in the format `first name last name\\\position\\\work location`   2. The number of nodes in each level is around 5-6 The document renders fine when limited to 5 levels maximum, but 6 and over throws the above error.               \documentclass{standalone}     \usepackage{forest}          \begin{document}          \begin{forest}      for tree={         draw=black, align=center, l sep=4ex, parent anchor=south, child anchor=north,         node options={font=\footnotesize, minimum width=14em, minimum height=10ex, rounded corners=1ex},         edge path={             \noexpand\path[\forestoption{edge}]             (!u.parent anchor) -- +(0,-2ex) -| (.child anchor)\forestoption{edge label};         },         where n children=0{             child anchor=west,             edge path={                 \noexpand\path[\forestoption{edge}]                 ([xshift=-6em]!u.parent anchor) |- (.child anchor)\forestoption{edge label};             },             draw=red,for parent={                 parent anchor=south, l sep=-12em, grow'=east, calign=child edge, draw=blue                       }         }{}     }         [Parent,name=Parent             [Child1,name=Child1                 [,phantom]                 [Child11]                 [Child12,name=Child12]             ]             [Child3                 [,phantom]                 [Child31,name=Child31]                 [Child32]             ]         ]     %     \end{forest}     \end{document}      The results of kpsewhich command as suggested:               D:\>kpsewhich --all texmf.cnf     d:/texlive/2013/texmf.cnf     d:/texlive/2013/texmf-dist/web2c/texmf.cnf      Error message after increasing main memory to 16000000:               ! TeX capacity exceeded, sorry [save size=80000].     \pgfmath@stack@push ...def \pgfmath@stack@top {#2}                                                       \expandafter \expandafter ...     l.2898 \end{forest}          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:      112721 strings out of 493308      4124339 string characters out of 6141361      1856073 words of memory out of 5000000      115488 multiletter control sequences out of 15000+600000      23776 words of font info for 26 fonts, out of 8000000 for 9000      957 hyphenation exceptions out of 8191      149i,15n,164p,884b,80000s stack positions out of 5000i,500n,10000p,200000b,80000s     !  ==> Fatal error occurred, no output PDF file produced!      When the failure occurred, pdflatex was using roughly 45 MB of RAM. Should the edits to `texmf.cnf` file have affected the maximums in the error message???


title: Beamerposter: rounded and shadowed blocks

text: I want to create rounded blocks with shadows in `beamerposter`. The MWE does that, but in an ugly way: the bottom corners of the header are rounded and have a shadow, and the top corners of the text block have corners and a shadow. For a pleasing design the two should be better integrated. ![enter image description here](http://i.stack.imgur.com/VUgS8.png)               \documentclass[final]{beamer}          \mode<presentation>{\usetheme{Berlin}}          \usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}          %From http://tex.stackexchange.com/questions/47264/beamer-round-blocks-without-fading     % \setbeamertemplate{blocks}[rounded][shadow=true]     % \makeatletter     % \pgfdeclareverticalshading[lower.bg,upper.bg]{bmb@transition}{200cm}{%     %   color(0pt)=(lower.bg); color(4pt)=(lower.bg); color(4pt)=(upper.bg)}     % \makeatother          \setbeamertemplate{block begin}{     \vskip.75ex     \begin{beamercolorbox}[rounded=true,shadow=true,leftskip=1cm,colsep*=.75ex]{block title}%     \usebeamerfont*{block title}\insertblocktitle     \end{beamercolorbox}%     {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%     \usebeamerfont{block body}%     \begin{beamercolorbox}[rounded=true,shadow=true,colsep*=.75ex,sep=.75ex,vmode]{block body}%         \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%     }     \setbeamertemplate{block end}{     \end{beamercolorbox}     }          \begin{document}       \begin{frame}       \begin{columns}       \begin{column}{.3\textwidth}         \vfill         \begin{block}{\large Fontsizes}           \centering           {\tiny tiny}\par           {\scriptsize scriptsize}\par           {\footnotesize footnotesize}\par           {\normalsize normalsize}\par         \end{block}         \vfill         \end{column}         \end{columns}       \end{frame}          \end{document}      The commented code in the MWE is taken from the answer to: Beamer round blocks without fading. And I uncomment it and comment the template blog begin, I get what I want, but loose the cleverer spacing of other template. ![enter image description here](http://i.stack.imgur.com/it8xr.png) So my question is basically: how do I get the nice corners and shadows from the second picture into the first? Disclaimer: My question is very similar to Rounded and shadow for block, but as there has not been an MWE added since Sep 2012 I post a new question.


title: \ref, make figure/table reference automatically toggle between "above" or "below"

text: Is it possible to automatically include a reference to the _position_ of a labeled object (Table, Figure) in text? By this I mean the following: Say I have labeled a figure in chapter 1:               \label{fig:one}      Then I refer to it in text by using:               See Figure~\ref{fig:one}      Which produces "See Figure 1.1" as desired. I'd like to be able to have it produce: "See Figure 1.1, above" or "See Figure 1.1, below", automatically detecting whether to produce "above" or "below" depending on whether the figure will be placed above that position on the final page.


title: Capitalize list of tables in Table of Contents

text: How can I capitalize all the table names in the Table of Contents, List of Tables? I am not talking about the headings, but the actual entries. E.g., the first entry in the picture is ok, as it is uppercase, while the others are not. ![enter image description here](http://i.stack.imgur.com/NE10j.png)


title: How can I modify vertical space between multiple sub-figures

text: I'd like to reduce the vertical space between graphics included in my figure. It looks like that:               \begin{figure}[H]          \centering         \includegraphics[height=3.in,width=6in]{pics3/LCCohResEW.pdf}            \includegraphics[height=3.in,width=6in]{pics3/CBDCohResEW.pdf}               \includegraphics[height=2.05in,width=2.98in]{pics3/LCYearResEW.pdf}          \includegraphics[height=2.05in,width=2.98in]{pics3/CBDYearResEW.pdf}             \includegraphics[height=2.05in,width=2.98in]{pics3/LCAgeResEW.pdf}         \includegraphics[height=2.05in,width=2.98in]{pics3/CBDAgeResEW.pdf}                                      \caption{}         \label{}     \end{figure}           The plan is to have 4 panels with graphics and i want to reduce the vertical space between them. I tried adding `\vspace{-something}` but it does not seem to work as placed. Any help appreciated.


title: marking conditional versions with line in margin #2

text: I faced with a problem how to mark a new or a corrected text for my co- authors. A time ago Matthew Leingang asked a similar question and got the receipt. The receipt didn't work for me, however. Can't figure out the root of the problem, I just attach a screenshot: ![enter image description here](http://i.stack.imgur.com/fMq5E.png) BTW, I've already had a satisfactory solution for my task.


title: Texindy sorting Icelandic

text: I use command `texindy -L icelandic -M lang/icelandic/utf8 dict_main.idx` to create a list of the names of the photographes, their authors and licenses. But the sorting is not correct (for example Icelandic alphabet ends in this letter order þ æ ö) MWE:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[]{makeidx}     \usepackage[icelandic, czech]{babel}     \makeindex     \begin{document}     Hello     \index{Þari - Franz Eugen Kohler, Public Domain}     \index{Þistill - ŠARŽÍK František, COPYRIGHT/PD}     \index{Önd - Karney, Lee, PD}     \index{Æðarkóngur - Whitehouse, Laura L., PD}     \index{Avókadó - Forest \& Kim [[p:2684;Starr]], CC-BY}     \index{Auðnutittlingur - Arnstein Rønning, CC BY-SA 3.0}     \index{Asni - Zicha Ondřej, COPYRIGHT/CC-BY-NC}     \index{Á - hvalur.org, CC Unported Licence}     \index{Álft - Bukovský Jiří, COPYRIGHT/CC-BY-NC}     \index{Álka - Jack Spellingbacon from Scotland, CC BY-SA 3.0}          \printindex     \end{document}      Running this commands:                 pdflatex test.tex       texlua utftexindy.lua -L icelandic test.idx       pdflatex test.tex      Details of the code in this answer.


title: How to put table into multicols

text: I'm trying to get table formated like this:               A    desription of A      D    description of D     B    long description     Eee  description of Eee          of B                 F    description of F     Cccc description of Cccc        and I'm limited with space on the page where this table should be. When I use `\begin{tabular}{lp{5cm}lp{5cm}}` I get table which is too long to fit onto the page, `longtable` with same parameters throws last line onto next page. With `multicols` package I tried `tabbing` environment, but _long description of B_ goes over _Eee_ and `longtable` throws error that it can t be used in twocolumn. `description` environment can do that sort of things but I can't force it to align _descriptions_ Is there chance to make this table automatically without experimenting with `\\\`positioning or creating two independent tables?


title: \raggedright removes paragraph indentation

text: This code               \documentclass[]{article}     \usepackage{lipsum}          \begin{document}              \raggedright              \lipsum[1-3]          \end{document}      produces three paragraphs with a ragged right edge and no paragraph indentation. Why? And how can I get a ragged right edge _with_ paragraph indentation? Also -- please feel free to add tags to this post; I didn't quite know what would be best.


title: Problem with pdflatex and dviopt

text: I just reinstalled my latex distribution: earlier I used MacTeX Basic with some extensions. Now I am using MacTeX full (comparable to TexLive Full). Since the switch, I suddenly have a different problem. Using `pdfopt` I always get the following errors.                  **** Considering object with an invalid number 13 as null.        **** Considering object with an invalid number 14 as null.        **** Considering object with an invalid number 13 as null.        **** Considering object with an invalid number 14 as null.      A minimal example is               \documentclass{report}     \pagestyle{empty}     \begin{document}     x     \end{document}      Then               pdflatex file      and               pdfopt file.pdf newfile.pdf      the errors show up. Prior to reinstalling this problem did not occur. Manual inspection does not show an error, but I am concerned as I am batch- producing the files, so manual inspection does not look like a good approach System: MacTeX 2012, full. MacBook 2010 15", Mountain Lion.


title: booktabs and tiny horizontal space

text: In a regular table, I'm trying to remove the small horizontal space before the first column and after the last one as achieved with package `booktabs` with the option `@{}`. How can I do that? Please compile the code below:               \documentclass[fleqn,11pt]{book}     \usepackage{booktabs}     \begin{document}     \begin{table}[!ht]\centering     \begin{tabular}{@{}llr@{}} \toprule     Gnat & per gram & 13.65 \\     Gnu & stuffed & 92.50 \\ \bottomrule     \end{tabular}     \end{table}     \begin{table}[!ht]\centering     \begin{tabular}{llr} \toprule     Gnat & per gram & 13.65 \\     Gnu & stuffed & 92.50 \\ \bottomrule     \end{tabular}     \end{table}     \end{document}


title: How define a fixed width page, but length > some minimum length, but only as long as needed

text: This recent question on how to increase the width of the output, and this earlier question on how to increase the length of the output reminded me of something I have been wondering: I would like to fix the width and have the length to be longer than some minimum length, but only as long as necessary. So far I have been using the `geometry` package to fix the width, and set the page length to be very long as per the above links, and this has been working. However, I would like to not have the extra blank space at the bottom for very short pages. This is intended to generate individual pages for on screen viewing, and not a long document. Hence the desire for a single "page".


title: siunitx, threeparttables and table footnotes

text: I am trying to use the `S` option of `siunitx` for table alignment alongside with `threeparttables` for table footnotes, but it looks like that the footnote mark is flushed left everytime \tnote{} is used. Is it possible to use both packages together?               \documentclass{article}          \usepackage{booktabs}     \usepackage{multirow}     \usepackage{threeparttable}     \usepackage{siunitx}          \usepackage{xltxtra}     \usepackage{amsmath}          \setmainfont[Kerning=On,Mapping=tex-text]{Linux Libertine O}          \newcommand{\tabnote}[3]{\multicolumn{1}{#1}{#2\tnote{#3}}}     \begin{document}          \begin{table}[tpb]         \centering         \begin{threeparttable}[b]             \begin{tabular}{lcSSSSl}                 \toprule                 &&\multicolumn{4}{c}{Pull--out}\\                 \cmidrule{3-6}                 &&\multicolumn{2}{c}{Good Conditions} & \multicolumn{2}{c}{Other Conditions}\\                 \cmidrule(r){3-4} \cmidrule(r){5-6}                 && \multicolumn{1}{c}{\emph{MC 1990}} &  \multicolumn{1}{c}{\emph{MC 2010}} &  \multicolumn{1}{c}{\emph{MC 1990}} & \multicolumn{1}{c}{\emph{MC 2010}}\\                 \cmidrule(r){3-3} \cmidrule(r){4-4} \cmidrule(r){5-5} \cmidrule(r){6-6}                 $t_{max}$ & [\si{MPa}] & 2.50          & 2.50          & 1.25          & 1.25          & $\times \sqrt{f_{ck}}$\\                 $t_f$     & [\si{MPa}] & 0.40\tnote{1} & 0.40\tnote{1} & 0.40\tnote{1} & 0.40\tnote{1} & $\times t_{max}$\\                 $s_1$     & [\si{mm}]  & 1.0           & 1.0           & 1.0           & 1.8           & \\                 $s_2$     & [\si{mm}]  & 3.0           & 2.0           & 3.0           & 3.6           & \\                 $a$       & [-]        & 0.40          & 0.40          & 0.40          & 0.40          & \\                 \bottomrule             \end{tabular}             \begin{tablenotes}\footnotesize                 \item [1] From data analysis.             \end{tablenotes}         \end{threeparttable}     \end{table}          \end{document}      ![enter image description here](http://i.stack.imgur.com/XTBX4.png)


title: Reduce space between header and headrule

text: # Problem I'm trying to create fancy headers for my documents using `fancyhdr`. I want the headrule to be dotted, which can be achieved using               \renewcommand{\headrule}{\vbox to 0pt{\hbox to\headwidth{\dotfill}\vss}}      as stated in the `fancyhdr`-documentation on page 12. Now I also want to move the rule nearer to the content of the header. For the footer, there is `\footruleskip `, but unfortunately no ~~`\footruleskip`~~. If I just elevate the box of the headrule by using `\raisebox` I get               Package Fancyhdr Warning: \headheight is too small (38.32509pt):       Make it at least 39.58127pt.      How do I automatically adjust `\headheight` or how can I get rid of the overfull box produced by raising the headrule box. _Bonus:_ Currently I specify `\setlength{\headheight}{3.5em}` because of the `\Huge\thechapter`. How can I automatically set `\headheight`? # MWE               \documentclass{scrbook}     % Display box around header     \usepackage{eso-pic}     \AddToShipoutPictureFG{         \AtTextUpperLeft{%             \put(0,\LenToUnit{\headsep}){%                 \framebox(\LenToUnit{\textwidth},\LenToUnit{\headheight}){}%             }%         }%     }          \usepackage{fancyhdr}     \pagestyle{fancy}          \setlength{\headheight}{3.5em}          % From fancyhdr documentation     \fancyhf{}     \fancyhead[LE,RO]{\sffamily\chaptername\ \Huge\thechapter}     \fancyhead[RE,LO]{\sffamily\leftmark}     \begin{document}          \chapter{Test Chapter}     \eject          \renewcommand{\headrule}{\vbox to 0pt{\hbox to\headwidth{\dotfill}\vss}}     \hbox{}     \eject          \renewcommand{\headrule}{\raisebox{0.25\headheight}{\vbox to 0pt{\hbox to\headwidth{\dotfill}\vss}}}     \hbox{}          \end{document}      # Output `\renewcommand{\headrule}{\vbox to 0pt{\hbox to\headwidth{\dotfill}\vss}}` > ![enter image description here](http://i.stack.imgur.com/Qcs6M.png) `\renewcommand{\headrule}{\raisebox{0.25\headheight}{\vbox to 0pt{\hbox to\headwidth{\dotfill}\vss}}}` > ![enter image description here](http://i.stack.imgur.com/oIaIR.png)


title: Undefined control sequence argument

text: \begin{algorithm}     \SetKwData{Candidates}{candidates}     \SetKwData{Links}{links}     \SetKwData{Visited}{visited}     \SetKwData{URL}{URL}     \SetKwData{TraversalDepth}{traversalDepth}     \SetKwFunction{RetrieveByTraversal}{retrieveByTraversal}     \SetKwInOut{Input}{input}     \SetKwInOut{Output}{output}     \Input{Starting page URL, Traversal parameter traversalDepth, Set of visited pages Visited, Already retrieved pages Candidates}     \Output{School list page candidates}     \BlankLine     \Candidates $= \emptyset$\;     \Visited $= \emptyset$\;     \Candidates = \Candidates $\cup$ \URL\;     \Links = Retrieve all but media type links from \URL\;     \Visited = \Visited $\cup$ \Links\;     \ForEach{link $link$ in \Links} {        %\RetrieveByTraversal($link$, \TraversalDepth-1, \Visisted, \Candidates)\;     }     return \Candidates\;     \caption{Retrieving School List Page Candidates Using Traversal}     \label{algo_traversal_s}     \end{algorithm}      I got an undefined control sequence argument error at the commented-out line. When it is commented out, everything works fine. I'm not able to figure out what's wrong with that line. **Edit** : as requested, I'm posting a minimum working example and the corresponding error message.               \documentclass[12pt,letterpaper]{report}          \usepackage{array}     \usepackage{graphicx}     \usepackage{cite}     \usepackage{subfigure}     \usepackage{amsmath}     \usepackage[indent,bf]{caption}     \usepackage{rotating}     \usepackage{setspace}     \usepackage{longtable}     \usepackage{rotating}     \usepackage[algochapter,linesnumbered,noend,ruled,oldcommands]{algorithm2e}     \usepackage{url}     \usepackage{float}     \usepackage{bookmark}          \begin{document}          \begin{algorithm}     \SetKwData{Candidates}{candidates}     \SetKwData{Links}{links}     \SetKwData{Visited}{visited}     \SetKwData{URL}{URL}     \SetKwData{TraversalDepth}{traversalDepth}     \SetKwFunction{Union}{Union}     \SetKwFunction{RetrieveByTraversal}{retrieveByTraversal}     \SetKwInOut{Input}{input}     \SetKwInOut{Output}{output}     \Input{Starting page URL, Traversal parameter traversalDepth, Set of visited pages Visited, Already retrieved pages Candidates}     \Output{School list page candidates}     \BlankLine     \Candidates $= \emptyset$\;     \Visited $= \emptyset$\;     \Candidates = \Candidates $\cup$ \URL\;     \Links = Retrieve all but media type links from \URL\;     \Visited = \Visited $\cup$ \Links\;     \ForEach{link $link$ in \Links} {        \RetrieveByTraversal($link$, \TraversalDepth-1, \Visisted, \Candidates)\;     }     return \Candidates\;     \caption{Retrieving School List Page Candidates Using Traversal}     \label{algo_traversal_s}     \end{algorithm}          \end{document}      The corresponding error message is as follows:               ! Undefined control sequence.     <argument> ...ink$, \TraversalDepth -1, \Visisted                                                        , \Candidates )\;      l.45 }          ?


title: How to measure the vertical space that was typeset without placing it into an environment?

text: I would like to achieve automatic clearing of a `{floatingfigure}` at the beginning of a new `\section` for texts automatically created by Pandoc. For this to work, I am in need of a way to measure the vertical space that was typeset by LaTeX since placing the `{floatingfigure}`. I tried out the `placeins` package to no effect. The ideal solution would involve placing a starting marker. An environment or any other block/braced/bracketed structure should not be used as the text that follows the `{floatingfigure}` is generally unknown. Everything needs to be implemented by renewing commands and environments in the preamble. Should a second starting marker follow upon a first starting marker without taking a measurement, than the vertical measurement should be reset to 0pt. Here is a minimum working example. I have placed comments from where to where I would like to measure.               \documentclass{article}     \usepackage{mwe}          \makeatletter     \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth     \else\Gin@nat@width\fi}     \makeatother     \let\Oldincludegraphics\includegraphics     \renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}          \setlength{\parindent}{0pt}          \usepackage{calc}     \newlength\imgheight          \usepackage{floatflt}     \renewenvironment{description}{%         \renewcommand{\includegraphics}[1]{\vspace{-1ex}\Oldincludegraphics[width=4cm]{##1}}         \renewcommand{\item}[1][]{             \settototalheight\imgheight{##1}%             \global\imgheight=\imgheight%             ##1%             \end{floatingfigure}%             % I would like to measure vertical space from here...             }%         \hspace{0pt}%         \begin{floatingfigure}[l]{4cm}}%         {}     % end preamble.tex          \begin{document}     \begin{description}     \itemsep1pt\parskip0pt\parsep0pt     \item[\includegraphics{example-image-a}]     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin.     \end{description}          % ... to here.     \vspace{\dimexpr\imgheight-3\baselineskip}     \section{Section title}     \begin{description}     \itemsep1pt\parskip0pt\parsep0pt     \item[\includegraphics{example-image-b}]     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin.     \end{description}          \blindtext     \end{document}      In below document, the first paragraph is too short to wrap completely around `floatingfigure` **A**. Hence, I would like to achieve automatic `floatingfigure` clearing at the beginning of a new section or a new `floatingfigure`. Right now, I have done it manually by adding `\vspace{\dimexpr\imgheight-3\baselineskip}`. ![Section clearing that I would like to automate](http://i.stack.imgur.com/5pQnE.png)


title: ConTeXt: Wrong mathmatrix spacing between rows in startalign-environment

text: When using a mathmatrix (e.g. for vectors) in between `\startalign` and `\stopalign`, the spacing between rows becomes too large. I'm running Mark IV and the problem exists on live.contextgarden.net as well. Is there anything I can do about this? MWE:               \setupmathmatrix[left={\left[\,}, right={\,\right]}]          \starttext          \startformula       \startmathmatrix \NC 1 \NR \NC 2 \NR \NC 3 \NR \stopmathmatrix     \stopformula          \startformula \startalign       \NC \startmathmatrix \NC 1 \NR \NC 2 \NR \NC 3 \NR \stopmathmatrix \NR     \stopalign \stopformula          \stoptext      which gives ![enter image description here](http://i.stack.imgur.com/K6J8J.png) **Edit:** Adding `\noalign{\blank[-6pt]}` between each row in the matrix solves my problem and I can do that programmatically, so I'll be fine. A nicer solution would be nice though.


title: Equation numbers under equations

text: I have three similar equations which I want on a same line. I put them in `tabular` environment nested within `subequations` following this: subequation in tabular. Now I have this code:               \documentclass{article}     \usepackage{amsmath,array}     \usepackage{amstext}     \begin{document}     Here is what I get:\\          \begin{subequations}         \noindent\begin{tabular}{@{}*{3}{m{0.38\linewidth}@{}}}{}         \begin{equation}         (A+B)C=D(E-F)-G  \label{eq:eq1}         \end{equation} &         \begin{equation}         (A+B)C=D(E-F)-H  \label{eq:eq2}         \end{equation} &         \begin{equation}         (A+B)C=D(E-F)-I  \label{eq:eq3}         \end{equation}         \end{tabular}     \end{subequations}          \end{document}      Since my eq's are little bit longer than in the above thread I want numbering under the eq's. Is that possible?