title: LaTeX error bad math environment delimiter inside subfloat caption

text: For some reason, I am getting hit with a bad math environment delimiter. I know the problem has to stem from the `\begin\end` figure I added since the file compiled prior to this begin added. In my preamble, I have tried everything suggested error using environment inside the section argument Here is my preamble in case there is something conflicted in it:               \documentclass[11pt, dvipsnames]{article}          \usepackage{amsmath, amssymb, eucal, pxfonts, setspace, enumerate, amscd,                  dsfont, wasysym, tikz, tikz-qtree, mathtools, kurier, pgfplots, listings,                etoolbox, tikz-3dplot, float, wrapfig, multirow, array, tkz-fct, graphicx,               datetime, fancyhdr, amsfonts, xcolor, microtype, marvosym, starfont, hyperref,           fixltx2e}     \usepackage[margin=0.75in]{geometry}     \usepackage[caption = false]{subfig}     \usepackage[all]{hypcap}      Figure that is causing the issue is below:               \begin{figure}       \centering       \subfloat[\(z\in [-50, 0]\)]{\includegraphics[width = 3.25in]         {stumpffneg50to0.eps}}       \subfloat[\(z\in [0, 30]\)]{\includegraphics[width = 3.25in]         {stumpff0to30.eps}}       \subfloat[\(z\in [0, 500]\)]{\includegraphics[width = 3.25in]         {stumpff0to500.eps}}       \caption{The Stumpff functions \(C(z)\) and \(S(z)\) plotted for the specified             ranges.}       \label{fig:stumpff}     \end{figure}      Here is the log file:               ./230OrbitalMechanicsNotes.tex:2184: LaTeX Error: Bad math environment delimite     r.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.2184   \subfloat[\(z\in [-50, 0]\)                                         ]{\includegraphics[width = 3.25in]     Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.          ./230OrbitalMechanicsNotes.tex:2184: Missing $ inserted.     <inserted text>                      $     l.2184   \subfloat[\(z\in [-50, 0]\)                                         ]{\includegraphics[width = 3.25in]     I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.          ./230OrbitalMechanicsNotes.tex:2184: Missing $ inserted.     <inserted text>                      $     l.2184   \subfloat[\(z\in [-50, 0]\)                                         ]{\includegraphics[width = 3.25in]     I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.               Overfull \hbox (9.3413pt too wide) in paragraph at lines 2184--2184     []\OT1/kurier/m/n/9 (-20) (a)      []               Overfull \hbox (11.57193pt too wide) in paragraph at lines 2184--2184     |$\OML/pxmi/m/it/9 z \OMS/pxsy/m/n/9 2      []               Overfull \hbox (26.26796pt too wide) in paragraph at lines 2184--2184     \OT1/pxr/m/n/9 [\OMS/pxsy/m/n/9 ^^@\OT1/pxr/m/n/9 50\OML/pxmi/m/it/9 ; \OT1/pxr     /m/n/9 0$       []          Package epstopdf Info: Source file: <stumpffneg50to0.eps>     (epstopdf)                    date: 2013-06-04 21:23:34     (epstopdf)                    size: 25117 bytes     (epstopdf)             Output file: <stumpffneg50to0-eps-converted-to.pdf>     (epstopdf)                    date: 2013-06-04 21:24:44     (epstopdf)                    size: 14370 bytes     (epstopdf)             Command: <repstopdf --outfile=stumpffneg50to0-eps-conver     ted-to.pdf stumpffneg50to0.eps>     (epstopdf)             \includegraphics on input line 2185.     Package epstopdf Info: Output file is already uptodate.     <stumpffneg50to0-eps-converted-to.pdf, id=590, 578.16pt x 433.62pt>     File: stumpffneg50to0-eps-converted-to.pdf Graphic file (type pdf)          <use stumpffneg50to0-eps-converted-to.pdf>     Package pdftex.def Info: stumpffneg50to0-eps-converted-to.pdf used on input lin     e 2185.     (pdftex.def)             Requested size: 234.87749pt x 176.15768pt.               ./230OrbitalMechanicsNotes.tex:2186: LaTeX Error: Bad math environment delimite     r.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.2186   \subfloat[\(z\in [0, 30]\)                                        ]{\includegraphics[width = 3.25in]     Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.          ./230OrbitalMechanicsNotes.tex:2186: Missing $ inserted.     <inserted text>                      $     l.2186   \subfloat[\(z\in [0, 30]\)                                        ]{\includegraphics[width = 3.25in]     I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.          ./230OrbitalMechanicsNotes.tex:2186: Missing $ inserted.     <inserted text>                      $     l.2186   \subfloat[\(z\in [0, 30]\)                                        ]{\includegraphics[width = 3.25in]     I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.               Overfull \hbox (9.53748pt too wide) in paragraph at lines 2186--2186     []\OT1/kurier/m/n/9 (-20) (b)      []               Overfull \hbox (11.57193pt too wide) in paragraph at lines 2186--2186     |$\OML/pxmi/m/it/9 z \OMS/pxsy/m/n/9 2      []               Overfull \hbox (20.24696pt too wide) in paragraph at lines 2186--2186     \OT1/pxr/m/n/9 [0\OML/pxmi/m/it/9 ; \OT1/pxr/m/n/9 30$       []          Package epstopdf Info: Source file: <stumpff0to30.eps>     (epstopdf)                    date: 2013-06-04 21:23:35     (epstopdf)                    size: 25597 bytes     (epstopdf)             Output file: <stumpff0to30-eps-converted-to.pdf>     (epstopdf)                    date: 2013-06-04 21:24:44     (epstopdf)                    size: 15001 bytes     (epstopdf)             Command: <repstopdf --outfile=stumpff0to30-eps-converted     -to.pdf stumpff0to30.eps>     (epstopdf)             \includegraphics on input line 2187.     Package epstopdf Info: Output file is already uptodate.     <stumpff0to30-eps-converted-to.pdf, id=591, 578.16pt x 433.62pt>     File: stumpff0to30-eps-converted-to.pdf Graphic file (type pdf)          <use stumpff0to30-eps-converted-to.pdf>     Package pdftex.def Info: stumpff0to30-eps-converted-to.pdf used on input line 2     187.     (pdftex.def)             Requested size: 234.87749pt x 176.15768pt.               ./230OrbitalMechanicsNotes.tex:2188: LaTeX Error: Bad math environment delimite     r.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.2188   \subfloat[\(z\in [0, 500]\)                                         ]{\includegraphics[width = 3.25in]     Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.          ./230OrbitalMechanicsNotes.tex:2188: Missing $ inserted.     <inserted text>                      $     l.2188   \subfloat[\(z\in [0, 500]\)                                         ]{\includegraphics[width = 3.25in]     I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.          ./230OrbitalMechanicsNotes.tex:2188: Missing $ inserted.     <inserted text>                      $     l.2188   \subfloat[\(z\in [0, 500]\)                                         ]{\includegraphics[width = 3.25in]     I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.


title: How to use circuitikz to plot the below figure

text: I am new to tikz, so I definitely have no idea to plot the below figure with circuitikz, especially the center parts. Can anyone help me?   ![a electrical circuits](http://i.stack.imgur.com/R1JGW.png) * * * **EDIT** : According to the documentation of circuitikz, I wrote some codes which met some parts of the graph. Howerver, it is far away from the final one.               \begin{tikzpicture}[scale=0.5]      \draw[color=black, thick]        (0,0) to [R,l=$R_1$,] (6,0)        to [L,l=$V_1$,] (6,6)        to [short] (0,6)        to [battery1, l=$E$] (0,0)        (3,6.5) node[]{\large{I}}             (14,0) to [short] (8,0)        to [L, l=$V_2$,] (8,6)        to [R,l=$R_2$,] (14,6)        to [C, l=$C$,] (14,0);     \end{tikzpicture}      which likes: ![enter image description here](http://i.stack.imgur.com/wZtPT.png) Please give me some modifications, many thanks! @darthbith


title: Image Caption Alignment

text: I have two images of different heights and widths sat next to eachother on the page, and I'd like their captions to align. As it is currently, one caption is displaced vertically from the other. My code goes as follows:               \begin{figure}[h]        \begin{minipage}[c]{0.49\textwidth}           \centering           \includegraphics[width=\textwidth]{image1}           \caption{Caption 1 with citation 1.}           \label{fig:label1}          \end{minipage}         \hspace*{0.1cm}          \begin{minipage}[c]{0.49\textwidth}           \centering           \includegraphics[width=\textwidth]{image2}           \caption{Caption 2 with citation 2.}           \label{fig:label2}          \end{minipage}         \end{figure}      I've tried a couple of things, but none seem to work very well for me. Does anyone have any suggestions? Edit: I've tried using [heightadjust=all]{floatrow} and the minipage[b] solution, but it does not seem to work. I've tried using both methods in a seperate document, but for the [heightadjust=all]{floatrow} I get an hbox error and the minipage[b] only works on some of my images.


title: Sorting references in both number and alphabetic manner

text: Consider the following text               \documentclass[pageno]{jpaper}     \begin{document}          Technology has been introduced in various ways \cite{HAR02}.      One of them is the usage of mobile phones\cite{LIU07, AKR09}.          \bstctlcite{bstctl:etal, bstctl:nodash, bstctl:simpurl}     \bibliographystyle{IEEEtranS}     \bibliography{references}     \end{document}      And the bib file contains               @IEEEtranBSTCTL{bstctl:etal,       CTLuse_forced_etal = {no},       CTLmax_names_forced_etal = {3},     }           @IEEtranBSTCTL{bstctl:nodash,       CTLdash_repeated_names = {no},     }          @IEEEtranBSTCTL{bstctl:simpurl,       CTLname_url_prefix = {Available: },     }          @article{HAR02,       Author = {A. Author},       Title = {The Title},       Year = {2002}     }          @article{AKR09,       Author = {B. Akreman},       Title = {The Title},       Year = {2009}     }          @article{LIU07,       Author = {C. Liu},       Title = {The Title},       Year = {2007}     }      The output looks like               Technology has been introduced in various ways [2].      One of them is the usage of mobile phones [3, 1].                References:      [1] B. Akreman ...      [2] A. Haris ...      [3] C. Liu ...      The references are sorted alphabetically (as stated by `IEEEtranS`) However the problem is the second set of references are not sorted ascending. As you can see it is `[3, 1]`. I want to see `[1, 3]`. You may say that I can manually change the order of `\cite{LIU07, AKR09}` to `\cite{AKR09, LIU07}` but for large number of citations in various places it is error prone. Also it is not very good to see `[12, 3, 15, 13, 5, 30]`. Is there any way to have globally sorted in alphabetical order and locally sort by numbers?


title: Adding custom metadata values to a PDF file

text: Is it possible to create custom metadata key/values for a PDF file? I can see (from other questions here) how to add title, author, keywords etc. However, I'm creating transcriptions of historical documents and I'd like to add some additional metadata, such as the record office holding the document and the document accession number. The idea is that (in the future) when I want to make them available on the web I can write an app that can read the PDF to extract the metadata (via something like PDFBox or iText) to include it in a HTTP POST.


title: Justified text extending beyond margin

text: I'm having an issue with a document I've created. The text should be fully left and right justified, and for the most part it is. However, a couple times in the document, the text extends beyond the right margin. How do I tell LaTeX (or more specifically, XeLaTeX) that this is not okay? ![Unjustified text](http://i.stack.imgur.com/T5WhO.png)


title: Hyperref package issue with cite border

text: I am trying to get the hyperref package to display the default green boxes around the citation but when typesetted, there is no such formatting. Here is the preamble that I have currently in my TeX file:               \documentclass[11pt,a4paper]{article}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[      % authoryear,     round, numbers, comma, sort&compress]{natbib}     \usepackage{hyperref}          \begin{document}     \cite{foo}          \begin{thebibliography}{foo}     \bibitem{foo} Foo.          \end{thebibliography}     \end{document}        I have tried adding the following at **_different_** times to try to add the cite borders to no avail:               \usepackage[citebordercolor=green]{hyperref}     \usepackage[citebordercolor=red]{hyperref}     \usepackage[pdfborder=0 0 1]{hyperref}      I'm not sure if there is a conflict between packages in the existing preamble above but I have tried all suggestions I have came across in this forum and others but have not yet been successful. Can you offer any suggestions? (P.S. I am compiling with XeLaTeX)


title: What macros are defined in a Web2c format file?

text: Web2c defines its format style using Pascal strings, so there are no separator characters between csnames. Is there a straightforward way of listing all csnames bound in a .fmt file?


title: How to run this template of latex in a Mac OS TexLive?

text: CASthesis-v0.2.zip Above is a template for writing thesis in Chinese. (Fortunately, there is not very much Chinese content in this template.) It works well on a Windows machine. But when I run it on a Mac OS machine, there are errors. The error information is shown as below. ![enter image description here](http://i.stack.imgur.com/SuQ8F.png) It says that 'Error: Wrong DVI mode driver option 'dvipdfm', because XeTex is running.' But I was told that this template can support XeTex. Please check it for me if there is anything I should modify or setup. * * * Update: Above problem is solved by changing the coding environment. But a new problem appear. The error information is as below. > Output written on template.dvi (35 pages, 103108 bytes). SyncTeX written on > template.synctex.gz. Transcript written on template.log. > > ### /usr/texbin/dvips -R -Poutline -o > /tmp/altpdflatex.5730-1359428424/template.ps template.dvi This is > > dvips(k) 5.991 Copyright 2011 Radical Eye Software (www.radicaleye.com) ' > TeX output 2013.01.29:1400' -> /tmp/altpdflatex.5730-1359428424/template.ps > > kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+123/600 \--dpi > 723 gbksong41 mktexpk: don't know how to create bitmap font for gbksong41. > mktexpk: perhaps gbksong41 is missing from the map file. kpathsea: Appending > font creation commands to missfont.log. /usr/texbin/dvips: Font gbksong41 > not found; using cmr10 > > /usr/texbin/dvips: ! invalid char 169 from font gbksong41 > > ### FAILED to generate /tmp/altpdflatex.5730-1359428424/template.ps ()


title: Harvard style biblatex commands already defined

text: I'm very new to this so I'm probably missing something obvious but I can't find the answer anywhere. I'm trying to use Harvard style citations and even the following won't work:                   \documentclass{article}         \usepackage[backend=bibtex]{biblatex}         \usepackage{harvard}              \begin{document}              \end{document}      I get the errors:                   ! LaTeX Error: Command \HAR@checkdef already defined.         ! LaTeX Error: Command \citename already defined.         ! LaTeX Error: Command \citeyear already defined.      I'm running Texmaker 4.1.1 and MikTex 2.9.5105 Any help would be greatly appreciated


title: Referencing a Vertex that has Math Typesetting inside it to make an Edge

text: I want to create math font inside of my vertex circles, AND draw edges between them. How I typically create network graphs is as follows:               \usepackage{tkz-graph}               \begin{tikzpicture}     \Vertex[x=1,y=6]{A};     \Vertex[x=1,y=5]{B}     \Vertex[x=1,y=4]{C}     \Edge[label= 20](B)(C)     \end{tikzpicture}      However, if I do the following, it doesn't work. How can I get around this so that I can have equations or math font inside my nodes and connect them with an edge?               \begin{tikzpicture}     \Vertex[x=1,y=6]{$\frac{x}{y}$};     \Vertex[x=1,y=5]{$2^n$}     \Vertex[x=1,y=4]{$t$}     \Edge[label= 20]($2^n$)($t$)     \end{tikzpicture}


title: Solfa style music notation (Carnatic)

text: I'm looking for a way to typeset Carnatic (Indian) music. The notation system is textual, similar to solfa, with some symbols like comma, semi-colon and | for durations, and bar lines. Fine control for notes, phrases, and spacing between is needed. Control over Vertical alignment is needed too. ![Carnatic Music Score with LaTeX](http://i.stack.imgur.com/R2xLG.png)               \documentclass[10pt,a4paper]{article}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \author{Ananth}     \begin{document}          $ \begin{array}{llll|ll|ll||}     \\     g,m,    & d,,,  & nndn  & \dot{s},,, &     d n s n     & , d d n   & d d m g   & m g r s \\     nin ne  & ko-   & - & ri- &     yun & ,nna  & ---ra & ---- \\     \\     rs\d{nd}    &, \d{n}sr  & snsg  &mddn   &     \dot{s}\dot{g}\dot{r}\dot{s}    & nd\dot{s}n    &dmgd   &mgrs \\     ne--na  &--rum- &chi--- &nan--- &     nee--lu &--ko-  &---ra  &----\\          \end{array} $          \paragraph* { another array  \break}          $     \begin{array}{llllllllllllllll|}     s&g&r&s&n&d&s&n&d&m&g&d&m&g&r&s\\     ne&&&lu&&&ko&&&&&ra&&&\\     \end{array} $          \paragraph*{That was array. Now using ams' align package}           \begin{align}     rsn & d && ,nsr && snsg && mddn | \\     ne-- & na   &&--rum-    &&chi---    &&nan---    \\     \intertext{and}     sgrs    && ndsn && dmgd && mgrs || \\     nee--lu &&--ko- &&---ra &&----\\ \end{align}           verdict: Tables, Arrays, ams' align package - all  are good for swara notation. Not upto the mark for synchronizing lyrics.               \end{document}      Grid like, fixed spacing between notes is possible - Tables etc., and are widely used too. I'm looking for flexible spacing between musical _phrases_ , and points of alignment between lines. Inspired by Lilypond, one could say. Is it possible to do these with LaTeX? If so, how? I've tried using `array`s and `align` (ams) with not so satisfactory results.


title: boxruled formatted algorithm text overflowing

text: I have a algorithm which is really a sequence of long statements and I'd like it to be inside a box but the following gets the word wrapping wrong. Anyone knows why?               \documentclass[a4paper,10pt]{article}     \usepackage{algorithm2e}     \begin{document}     \RestyleAlgo{boxruled}     \begin{algorithm}     \scriptsize         \begin{enumerate}     \item This is a long text that overflow the box jjjj jjjjjjjjjjjjj jjjjjjjjjjjj jjjjjjjjjj jjjjjj jjjjj jjjj jjjj jjjjjjj jjjj jjjjjj jjjjjjjjj jjjjj jjjj jjjjj jjjjjjj jjjjjj jjjjjjjjjjj j jjjjjjjj j j jjjjjjjj jjjjj j jj jjjjjjjjjj jjjj jjjj jjjjjjj jjjjjjjj jjjjjjjjj jjjjjjjjj jjjj jjjjjjj jjjjjjjj j jjjj jjjj jjjj j j  jjjjjjj jjj jjjjj jjjjjjjj jj jjjj jjj j jjjjjjj     \item This is a long text that overflow the box jjjj jjjjjjjjjjjjj jjjjjjjjjjjj jjjjjjjjjj jjjjjj jjjjj jjjj jjjj jjjjjjj jjjj jjjjjj jjjjjjjjj jjjjj jjjj jjjjj jjjjjjj jjjjjj jjjjjjjjjjj j jjjjjjjj j j jjjjjjjj jjjjj j jj jjjjjjjjjj jjjj jjjj jjjjjjj jjjjjjjj jjjjjjjjj jjjjjjjjj jjjj jjjjjjj jjjjjjjj j jjjj jjjj jjjj j j  jjjjjjj jjj jjjjj jjjjjjjj jj jjjj jjj j jjjjjjjj     \item This is a long text that overflow the box jjjj jjjjjjjjjjjjj jjjjjjjjjjjj jjjjjjjjjj jjjjjj jjjjj jjjj jjjj jjjjjjj jjjj jjjjjj jjjjjjjjj jjjjj jjjj jjjjj jjjjjjj jjjjjj jjjjjjjjjjj j jjjjjjjj j j jjjjjjjj jjjjj j jj jjjjjjjjjj jjjj jjjj jjjjjjj jjjjjjjj jjjjjjjjj jjjjjjjjj jjjj jjjjjjj jjjjjjjj j jjjj jjjj jjjj j j  jjjjjjj jjj jjjjj jjjjjjjj jj jjjj jjj j jjjjjjj     \end{enumerate}     \caption{A caption}     \end{algorithm}     \end{document}      I've tried putting it in `miniboxes` and `\vbox` but nothing works


title: Biblatex authoryear style is printing numerical citations

text: Here is my `biblatex` setting in the preamble:               \usepackage[bibstyle=authoryear,      firstinits=true,      maxbibnames=5,      maxcitenames=2,      sorting=nyt,      url=false,      isbn=false,      eprint=false,      doi=false,      dashed=false,      natbib=true]{biblatex}      Still, my citations are being printed numerically e.g. `[2]`, `[72,58]` etc. I have cleared all the `aux`, and `bbl` files and tried recompiling, but still getting same results. The references are being printed correctly and strangely enough, they don't have numbers. So there is a complete disconnect between citations and references.


title: Using \put command relative to page size

text: I want to include a logo in the pdf pages included in Beamer. I tried writing macro and progressed so far.               \documentclass[fleqn,xcolor=dvipsnames]{beamer}          \newlength{\logosize}     \setlength{\logosize}{7.50mm}          \newlength{\logoXinpdf}     \newlength{\logoYinpdf}     \setlength{\logoXinpdf}{0.9\textwidth}     \setlength{\logoYinpdf}{0.8\textheight}               \usepackage{pdfpages}          \def\getpdfpages#1#2{\begingroup       \setbeamercolor{background canvas}{bg=}       \includepdf[pages={#1},picturecommand={\put(\logoXinpdf,\logoYinpdf){\pgfimage[width=\logosize]{mylogo}}}]{#2}       \endgroup}               \begin{document}               \getpdfpages{{9,12}}{mypdf.pdf}               \end{document}      However, when I run pdfLaTeX, I get an error in the line of,               ! A <box> was supposed to be here.     <to be read again>                         \unitlength      l.23 \getpdfpages{{9,12}}{mypdf.pdf}      I understand that the problem is with the `\put` command. If I replace the `\logoXinpdf,\logoYinpdf` lengths with absolute numbers, everything works fine. Is there a way I can use these defined lengths with the `\put` command?


title: What to do with 237 eps files?

text: I have some 237 `.eps` files that represent the printer's ornaments from the small press `The Underground Grammarian`. I would like to build and provide (to `CTAN`) a package similar to the `pgfornament` package. I'd like to create a command something like `\UGOrnament` which would take either a number or a name as indicated with the accompanying documentation. Other options would basically mirror `\pgfornament`. There are an additional 125 `.tif` files which should be provided as well but I thought I'd start with the `.eps` files first. So 'What is the problem?' you say. Well as may be apparent, my ambitions are inversely proportional to my TeX-Fu. In a nutshell, I've no clue as to how I'd go about this. Knowing this, I ask the above. I don't want someone to do the work (although I'd not turn it down :) ) but I would appreciate links, suggestions and pointers to guide me. I've a copy of Herbert Voss' **_PSTricks_** and will most likely begin there but I'd like to gather as much information as I can. I've given some thought to the API hence the reference to `pgfornament`, I've even thought about converting the files to a font or fonts since I have both open source and proprietary software for font creation. I think I'd rather go the `sty` approach instead. Thanks for reading...


title: How to get minipage to fill remainder of width up to right margin?

text: I'm trying to design a custom question\solution environment for homework assignments (I'm aware of the `exam` class but I am choosing to try and make my own) and am having problems with the alignment. I've set my minipage to use `\linewidth` for its width, but that extends beyond the right margin, as is shown in my MWE. Is there any way I can make it so that it fills to the right margin without having to set specific lengths? I may change my document margins at a later time and I don't want to have to also change the width of the minipage. Also, as can be seen, problems are indented quite far over from the left margin, and I'd prefer them to be a tad closer. How can I go about achieving this?               \documentclass{article}          \usepackage{lipsum}     \usepackage{environ}     \usepackage{amsthm}     \usepackage{amssymb}     \usepackage{thmtools}     \usepackage{array}     \usepackage{fancyhdr}     \RequirePackage[left=1in,right=1in,top=1.0in,bottom=1.0in]{geometry}          \makeatletter     \newcommand{\@coursenumber}{{\em No \textbackslash coursenumber specified}}     \newcommand{\@semester}{{\em No \textbackslash semester specified}}     \newcommand{\@studentname}{{\em \textbackslash studentname unknown}}     \newcommand{\@studentid}{{\em \textbackslash studentid unknown}}     \newcommand{\@school}{{\em \textbackslash school unknown}}     \newcommand{\@department}{{\em \textbackslash department unknown}}     \newcommand{\@lecture}{\textbackslash lecture}          \newcommand{\solutionstext}{\bfseries (Solutions)}     \newcommand{\coursenumber}[1]{\renewcommand{\@coursenumber}{#1}}     \newcommand{\semester}[1]{\renewcommand{\@semester}{#1}}     \newcommand{\studentname}[1]{\renewcommand{\@studentname}{#1}}     \newcommand{\studentid}[1]{\renewcommand{\@studentid}{#1}}     \newcommand{\school}[1]{\renewcommand{\@school}{#1}}     \newcommand{\department}[1]{\renewcommand{\@department}{#1}}     \newcommand{\lecture}[1]{\renewcommand{\@lecture}{#1}}          % These commands follow the titling package format for titles     % They define user commands to format the subtitle     \newcommand\presubtitle[1]{\gdef\@presubtitle{#1}}     \newcommand\postsubtitle[1]{\gdef\@postsubtitle{#1}}     % This command takes the subtitle as its argument, and uses the titling command     % \maketitlehookb plus the previously defined formatting commands to insert     % the subtitle into the titlepage. It also generates \thesubtitle for subsequent use     \newcommand\subtitle[1]{%       \renewcommand{\maketitlehookb}{\@presubtitle#1\@postsubtitle}       \newcommand\thesubtitle{#1}}     % Now we define the formatting for the subtitle     \presubtitle{\begin{center}\Large} % change this as needed     \postsubtitle{\end{center}}          % These commands set up the headers. They are set up for even and odd pages the same     % Check the fancyhdr documentation for information on how to set them differently     % for odd and even pages     \lhead{\begin{tabular}{@{}l}\@coursenumber\ (\@semester)\\\@studentname\ (\@studentid)\end{tabular}}     \chead{}     \rhead{\begin{tabular}{r@{}}Assignment \#\@lecture\\\today\end{tabular}}     \lfoot{}     \cfoot{\thepage}     \rfoot{}     % Set the width of the header rule. Make 0pt to remove the rule.     \renewcommand{\headrulewidth}{.5pt}     \renewcommand{\footrulewidth}{0pt}     % Make the head height match the size of the header     \setlength{\headheight}{24pt}     \pagestyle{fancy}     \makeatother          \newcounter{problem}     \setcounter{problem}{0}     \newcounter{problempart}[problem]          \NewEnviron{problem}[1]{       \stepcounter{problem}       \begin{tabular}{m{3mm}l}         \arabic{problem}. & \textbf{#1}\\[1mm]         & \hfill           \begin{minipage}{\linewidth}             \BODY           \end{minipage}       \end{tabular}}          \let\proof\relax          \declaretheoremstyle[         within=section,         spaceabove=5mm,         spacebelow=3mm,         headfont=\bfseries,         notefont=\normalfont,         bodyfont=\itshape,         headpunct=\newline,         %postheadspace={10pt},         notebraces={}{},         headformat=\NAME:     ]{proof}          \declaretheorem[style=proof,qed=\qedsymbol,name=Proof]{proof}     \declaretheorem[style=proof,qed=\qedsymbol,name=Solution]{solution}          \begin{document}       \begin{problem}{Problem Title}         \lipsum[1]         \begin{solution}           \lipsum[2]              \end{solution}       \end{problem}            \begin{problem}{Problem 2}         \lipsum[3]       \end{problem}     \end{document}


title: Tikz : pgfmathresult after a pgfmathparse returns 0

text: I'm trying to create a generic code to draw a cycle graph. I used a code found in the net to create the nodes... But when it comes to re-use `pgfmathparse` and `pgfmathresult`, I only get as value for the second `\pgfmathresult` ... 0. Even in this example, I've put `\pgfmathparse{int(2)}`, and in the second line, he draws me a vertex with the label "0" ... Which should be "2"... Right ? I don't understand what I'm missing.                   \tikzstyle{vertex}=[circle,fill=black!0, draw, minimum size=10pt,inner sep=0pt]         \tikzstyle{edge} = [draw,thick,-]         \begin{tikzpicture}[scale=0.8, auto,swap]           \foreach \i in {1,...,4}{%             \pgfmathparse{(\i-1)*90+floor(\i/5)*22.5}             \node[vertex] (N-\i) at (\pgfmathresult:2) [thick] {}; % Put some nodes N-1 to N-4             \pgfmathparse{int(2)}             \node (muck) at (0,0) {\pgfmathresult}; % DISPLAY 0 AS RESULT           }         \end{tikzpicture}


title: Automatically Determine which TeXLive Version is being used

text: I would like to be able to automatically determine which release of TeXLive that I am running. I sometimes encounter a problem where it is useful to test that the file compiled correctly in an older release first, before trying to debug the problem. Currently, I have updated my code to use the _new_ features of the the `datatool` package as per No room for a new \count with datatool. Along with the `datatool` update, I updated _all_ the other packages and am now encountering a problem that at least _seemed_ to have worked properly for over a year now. But it is not simple to switch back to running the older TeXLive2011 as it does not have the new packages. And of course updating the packages of the 2011 would kind of defeat the purpose of here. :-) The MWE below runs fine with the latest _updated_ TeXLive2012 (Version `2.13` of `datatool` or later). But, in order for this to run with an older release, one needs to manually edit the `\def\TeXLiveVersion` version to something other than `2012`. ## References:   * Print 'system information' in LaTeX doc   * When to use \LetLtxMacro? ## Notes:   * For the MWE to be useful, an older release is required as there is no issue here with the current TeXLive2012. Or, if you have not updated your packages lately and have v2.12 (or older) version of `datatool` package (in which case this won't run unless you manually edit the `\TeXLiveVersion` to:              \def\TeXLiveVersion{2011}%        * Here is an older question where I had a problem with TeXLive2011 (but the file compiled fine with TeXLive2010): Debugging Advice: TeX Capacity Exceeded with TeXLive2011 (but not with TeXLive2010). At that time I had manually changed the preamble, but again that is a case where an automated solution would have been useful.   * In case it is not obvious, the actual output of the MWE here is _not_ important. It is a cooked up example to show a case where I need to know which version of TeXLive I am using, and a way to test that the proposed solution of determining the version actually worked. ## Code:               \def\TeXLiveVersion{2012}% <--- Don't want to have to manually specify this          \documentclass{article}     \usepackage{datatool}     \usepackage{pgffor}     \usepackage{xstring}     \usepackage{letltxmacro}          %\usepackage{filecontents}% Commented to prevent overwriting MyData.csv     \begin{filecontents*}{MyData.csv}         Directory, Color         ../dirB,    red         ../dirC,    yellow     \end{filecontents*}          \LetLtxMacro\MyDTLcleardb{\DTLcleardb}% Default to 2012 and future     \IfEq{\TeXLiveVersion}{2012}{%     }{%         \newif\ifDTLnewdbonload%         \LetLtxMacro\MyDTLcleardb{\DTLdeletedb}%     }%          \begin{document}          \DTLnewdb{MyDB}     \DTLnewdbonloadfalse% don't let \DTLloaddb create a new database           \foreach \x in {1,...,5}{% Read DB numerous times         \typeout{count=\x}%         \MyDTLcleardb{MyDB}% clear database         \DTLloadrawdb[keys={Directory,Color}]{MyDB}{MyData.csv}%     }%          \par\noindent\DTLdisplaydb{MyDB}% Some output to have a PDF     \end{document}


title: Project-local package management

text: As a follow up to the question ‘What does the output of TeX/LaTeX depend on (in the sense of version and distribution)’, I wonder if there are any tools (or at least plans to ship such a tool) which would allow noting a specific version of all packages being used and the tool would make sure that all TeX sources are being built with those packages (and their dependencies). Similar to how most of the modern [*] programming languages do it (eg. http://bundler.io). Running `tlmgr` to upgrade all packages from CTAN (or installing a new TeXLive) feels like a very stupid thing to do when something changes in a package and messes with one’s documents. (And one might not even notice immediately.) [*] Not sure if _modern_ is the right word here, as there is even a package management tool for vim now: Vundle.


title: Algorithm input in a box

text: I am trying to write pseudo code               \documentclass[a4paper]{article}          \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage[colorinlistoftodos]{todonotes}     \usepackage{algorithm}% http://ctan.org/pkg/algorithms     \usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx     \algnewcommand\algorithmicinput{\textbf{Input:}}     \algnewcommand\INPUT{\item[\algorithmicinput]}     \algnewcommand\algorithmicoutput{\textbf{Output:}}     \algnewcommand\OUTPUT{\item[\algorithmicinput]}          \algrenewcommand{\algorithmicforall}{\textbf{for each}}     \newcommand{\INDSTATE}[1][1]{\STATE\hspace{#1\algorithmicindent}}                    \def\ForEach{\ForAll}          \begin{algorithm}     \caption{My Algorithm}{ }     \begin{algorithmic}[1]               \INPUT       \Statex a , \Comment The a of the algo     \Statex $b$  \Comment The b of the algo ,          \Statex $c$  \Comment The c of the algo           \noindent \Statex  \hrulefill     \State $V \gets 0$                   \end{algorithmic}         \end{algorithm}         \end{document}        1. I want the `\INPUT` to be in a box or somehow surrounded in a border   2. Currently I just added an horizontal line, but it is indented, is there a way to remove the indentation?


title: A nomenclature which it can be displayed in a MWE but nothing occurs when the full packages are included. Is there any conflict between packages?

text: All works well for a MWE. However, when I would like to display a nomenclature for the whole document including all the packages. the first compilation with PDFlatex and calling makeindex were successful. When I compile the second time nothing happens! Please here is the text.               \documentclass[a4paper,12pt]{report}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english]{babel}     \usepackage[top=2cm, bottom=2.5cm, left=3cm, right=2cm]{geometry}     \bibliographystyle{plainnat}     \usepackage{graphicx}     \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{scalerel}     \usepackage{amssymb}     \usepackage{bigints}     \usepackage{setspace}     \usepackage{mathrsfs}     \usepackage{tabu}     \usepackage{array}     \usepackage{booktabs}     \usepackage{tabularx,booktabs,caption}     \usepackage{tikz}     \usepackage[colorlinks=true,linkcolor=blue]{hyperref}     \usepackage{cleveref}     \usepackage{xcolor}     \usepackage{natbib}     \usepackage{epstopdf}     \usetikzlibrary{shapes,arrows}          \usepackage{makeidx}     \usepackage{nomencl}     \usepackage{ifthen}     \usepackage{amsfonts}     \usepackage{fancyhdr}     \usepackage{amssymb}          \onehalfspacing     \thispagestyle{empty}          \makenomenclature     \renewcommand{\nomgroup}[1]     {\ifthenelse{\equal{#1}{L}}{\item[\textbf{Latin letters}]}     {\ifthenelse{\equal{#1}{G}}{\item[\textbf{Greek letters}]}     {\ifthenelse{\equal{#1}{A}}{\item[\textbf{Acronyms}]}     {\ifthenelse{\equal{#1}{S}}{\item[\textbf{Subscripts}]}{}     }}}}          \newcommand{\blankpage}{     \newpage     \thispagestyle{empty}     \mbox{}     \newpage     }          \begin{document}          \nomenclature[latin]{$b$}{radius, $m$}     \nomenclature[grec]{$\alpha$}{entrainment coefficient}     \nomenclature[acronyms]{CFD}{Computational Fluid Dynamics}     \nomenclature[subscript]{$i$}{initial state}          \printnomenclature     \end{document}


title: Include a lstlistings keyword in lstlistings caption

text: I'm writing a small summary for my fellow students about VB in LaTeX. I have to cover the basic loops and found the `\lstlistnigs` package to be the best for writing colored code. I have already added some keywords that are not included directly in the package.   I have also defined a short verb for inline listing.   Now, what I would like to do, is to include a VB keyword in a listing's caption with the help of a inline listing.               \documentclass{book}          \usepackage{listings}     \usepackage[dvipsnames]{xcolor}          \lstset{ language=[Visual]Basic,       keywordstyle=\color{blue}, commentstyle=\color{ForestGreen}, stringstyle=\color{Maroon},     basicstyle=\ttfamily\normalsize,       frame=lines, showspaces=false, showstringspaces=false,       tabsize=3,     aboveskip=10pt,     belowskip=10pt,     lineskip=3pt,       numbers=left, numberstyle=\tiny, stepnumber=1, numbersep=5pt       morekeywords={Or, Loop, Until, To, As, Single, Module, Console, Double, ByVal}}          \lstMakeShortInline[basicstyle=\ttfamily\normalsize]{\|}          \begin{document}          Here, we can see an example of the |If| loop implementation with the |ElseIf| and |Else| statements.          \begin{lstlisting}[caption={|If| loop with |Else If| and |Else|},label=ifloop]       If [cond] Then           [code]       ElseIf [cond] Then           [code]       Else           [code]       End If       \end{lstlisting}            \end{document}      I hope I have described the problem thoroughly and will be grateful for any tips! Cheers


title: Unwanted space in path for `\addbibresource`

text: I wanted to store a part of a path to a bib-file in a command. But if I run this example (neither the bib-file nor the bib-entry is needed to see the problem) I get an unwanted space in the path:               \documentclass[]{scrartcl}     \usepackage{biblatex}     \newcommand\pathtosrc{test/}     \addbibresource{\pathtosrc contact.bib}     %\edef\bibpath{\pathtosrc contact.bib}     %\addbibresource{\bibpath}     \begin{document}     \cite{a}     \end{document}      biber gives an error message which shows that there a space in the path after test/:                ERROR - Cannot find 'test/ contact.bib'      # Questions   * Is this a bug or a feature?   * How could one suppress the space apart the `\edef` variant?


title: Problem with overwriting diagram files using feynmf.sty

text: I've just installed `feynmf.sty` from the software center and tried working with a standard example,               \begin{fmffile}{simple} % simple.mf will be created for this feynman diagram      \begin{fmfgraph}(40,25) % define diagram size     \fmfleft{i1,i2} % define left inputs     \fmfright{o1,o2} % define right outputs     \fmf{fermion}{i1,v1,o1} % define 'arrow' lines through input nr 1 -- vortex nr 1 -- output nr 1     \fmf{fermion}{i2,v2,o2} % define 'arrow' lines through input nr 2 -- vortex nr 2 -- output nr 2     %\fmf{photon}{v1,v2} % define 'snake' line linked vortices     \end{fmfgraph}     \end{fmffile}       (Found on http://www.sharelatex.com/learn/Feynman_diagrams .) The compilation worked fine and I got the diagram in the PDF, but when changing the code (such as just removing the photon) nothing happens. It seems as if there is some problem with the rights concerning overwriting the already created diagram files. I'm not that used to ubuntu but I tried go to properties for both the files and the folder and changing to the most liberal settings - allowing both 'create and delete files' and overwriting. Any suggestions on what to do next?


title: Big matrix in latex

text: I have a big matrix which exceeds the width of page, how can I fix this problem? ![enter image description here](http://i.stack.imgur.com/k37JZ.png)


title: Changing code in listings dynamically

text: I need to change dynamically the code in the listing by adding just one key word to the code. I tried to do it like this:               \begin{lstlisting}[escapechar=|]       class MyThread extends Thread {       private |\only<3>{\alert{volatile}}| boolean stop = false;            public void run() {         while (!stop) {             doSomeWork();         }       }       public void setStop() {         this.stop = true;       }     }     \end{lstlisting}      It works ok, but there are two spaces between "private" and "boolean" when the "volatile" is not visible. Is there any other way to make what I want?


title: How to place two (or multiple) figures in a row with same height in ConTeXt?

text: I need to place several figures with different aspect ratios in a row using `ConTeXt`. I also need their heights to be equal, but summary width of pictures to be `\textwidth`. Height of pictures must calculated authomatically, pictures must be glued exactly side-to-side. like               -----------------------------     |pic1|   wide pic2   | pic3 |     -----------------------------      |        \textwidth         |     |<------------------------->|       How ?


title: Book cover fonts

text: I am typesetting my first book. I am using Computer Modern for the font. I am trying to decide which font to use for the covers/dust jacket. I took a look at a number of similarly formatted books, and they all seem to use sans serif fonts for the cover, even if they are typeset with serif fonts in the body. **Is there a good reason—aesthetic or otherwise—why one should use a sans serif font ( _e.g._ , CMSS) over regular CMR for the cover?** **Backstory:** My university has, in my opinion, an incredibly ugly format that is _required_ for all Masters and Ph.D. theses. Double spaced, single sided, letter paper, small margins, single column ... it just looks terrible. For my Ph.D. dissertation I of course used the required formatting for the archival versions that go to the university library, however, I also created my own style file that I think looks a lot better. I am going to use my "prettier" format for printing copies of my dissertation for my advisors, friends, family, _& c._ The book binder I am using allows me to customize the cover of the book. **Disclaimer:** I realize this question isn't specifically related to (La)TeX, however, it is realted to typesetting; I hope it is not off topic!


title: Is there a disadvantage to using natbib=true with biblatex?

text: I am making the switch to `biblatex` and I was wondering whether there are any disadvantages to using the `natbib=true` compatibility option. I am sure we can all sympathise that journals will probably never make the switch to `biblatex`, so I think it would be wise to write my documents using the traditional `natbib` syntax which will allow me to transfer text directly from, say, my thesis to a paper I am writing up for Journal X. But I would also like to know whether there are any disadvantages to using the compatibility option for the write up of my thesis. Will I end up sacrificing some super `biblatex` tricks that I am unaware of, or is `natbib=true` simply a series of macros that replace `natbib` commands with `biblatex` commands? In case anyone needs to demonstrate something, here's a MWE:               \documentclass{article}          \begin{filecontents*}{bib.bib}     @article{citation,       title     = {How To Live Underwater},       author    = {Squarepants, SpongeBob},       journal   = {Journal of Marine Biology},       pages     = {1--8},       year      = 2006,       month     = jan,     }     \end{filecontents*}          \usepackage[style=authoryear,natbib=true]{biblatex}     \addbibresource{bib.bib}          \begin{document}     \noindent``How is babby formed?'' \parencite{citation} \\     ``How is babby formed?'' \citep{citation}     \printbibliography     \end{document}


title: media9 and Acrobat

text: I often have a problem with video playback integrated in Acrobat by MEDIA9. The file can be read on some items and not others. so I ask these questions   * What is the minimum version of Acrobat Reader to view the videos embedded by MEDIA9 (mp4) under windows   * Should we install plugins to view videos?   * Should you install any codecs? PS: the last document with which I have problems is available here: http://sciences-indus-cpge.papanicola.info/Utilisation-de-Scilab-Xcos-pour thank you


title: Determine File Name and Line Number Where a Macro is Invoked From

text: Wondering if there is any way to print out (for debugging purposes) the file name and the line number from where a macro is _invoked_ (not where it is defined). My attempt to use the `currfile` package only shows the main file name in the output:               **** ------ Enabling macro trace     **** DEBUG: (Depth=0) (File=TeX-SE.tex, Line=0) Started macro `\MacroA'.     **** DEBUG: (Depth=1) (File=TeX-SE.tex, Line=0) Started macro `\MacroB'.     **** DEBUG: (Depth=2) (File=TeX-SE.tex, Line=0) Started macro `\MacroC'.     **** DEBUG: (Depth=2) (File=TeX-SE.tex, Line=0) Completed macro `\MacroC'.     **** DEBUG: (Depth=1) (File=TeX-SE.tex, Line=0) Completed macro `\MacroB'.     **** DEBUG: (Depth=0) (File=TeX-SE.tex, Line=0) Completed macro `\MacroA'.     **** ------ Disabling macro trace      The desired output is something like:               **** ------ Enabling macro trace     **** DEBUG: (Depth=0) (File=TeX-SE.tex, Line=59) Started macro `\MacroA'.     **** DEBUG: (Depth=1) (File=MyMacros.sty, Line=7) Started macro `\MacroB'.     **** DEBUG: (Depth=2) (File=MyMacros.sty, Line=3) Started macro `\MacroC'.     **** DEBUG: (Depth=2) (File=MyMacros.sty, Line=3) Completed macro `\MacroC'.     **** DEBUG: (Depth=1) (File=MyMacros.sty, Line=7) Completed macro `\MacroB'.     **** DEBUG: (Depth=0) (File=TeX-SE.tex, Line=59) Completed macro `\MacroA'.     **** ------ Disabling macro trace      ## Notes:   * This is a follow-up to Redefine \newcommand to insert code at start and end of custom macros.   * I am only interested in doing this for my custom macros, not those that are part of other packages. ## Code:               %\RequirePackage{filecontents}% <--- Commented out to prevent overwriting an existing file.     \begin{filecontents*}{MyMacros.sty}         \newcommand*{\MacroC}[1]{cc#1cc}         \newcommand*{\MacroB}[1]{\MacroC{CC}b#1b}         \newcommand*{\MacroA}[1]{a\MacroB{#1}a}     \end{filecontents*}     %     \documentclass{article}     \usepackage{xparse}     \usepackage{currfile}          %\usepackage{letltxmacro}     %\LetLtxMacro{\OldUsepackage}{\usepackage}     %\renewcommand{\usepackage}[2][]{\edef\currfilename{#2}\OldUsepackage[#1]{#2}}%               \newcommand*{\CurrentLineNumber}{0}%          \newif\ifEnableTrace     \newcounter{NestingDepth}     \let\latexnewcommand\newcommand               \newcommand{\StartMacro}[1]{%       \ifEnableTrace         \typeout{**** DEBUG: (Depth=\arabic{NestingDepth}) (File=\currfilename, Line=\CurrentLineNumber) Started macro `\string#1'.}%         \stepcounter{NestingDepth}%       \fi     }     \newcommand{\EndMacro}[1]{%       \ifEnableTrace         \addtocounter{NestingDepth}{-1}%         \typeout{**** DEBUG: (Depth=\arabic{NestingDepth}) (File=\currfilename, Line=\CurrentLineNumber) Completed macro `\string#1'.}%       \fi     }          \NewDocumentCommand{\NewCommand}{smO{0}om}{%       \IfBooleanTF{#1}         {\IfNoValueTF{#4}{\latexnewcommand*{#2}[#3]}{\latexnewcommand*{#2}[#3][#4]}}%         {\IfNoValueTF{#4}{\latexnewcommand{#2}[#3]}{\latexnewcommand{#2}[#3][#4]}}%       {\StartMacro{#2}#5\EndMacro{#2}}%     }          % if you want to enable tracing     \let\newcommand\NewCommand          \usepackage{MyMacros}          \begin{document}          \MacroA{XXX}     \MacroB{YYY}          \EnableTracetrue     \typeout{**** ------ Enabling macro trace}     \MacroA{XXX}          \typeout{**** ------ Disabling macro trace}     \EnableTracefalse     \MacroB{YYY}          \end{document}


title: Modify tikzpicture plot outside .tikz file

text: I am not sure if my title gets through what I'm after, but basically I am using matlab2tikz to generate some plots for me and am wondering how you can do some modifications from outside the .tikz file. e.g a .tikz from matlab2tikz will be like:               \begin{tikzpicture}     \begin{axis}[%     width=4.52083333333333in,     height=3.565625in,     scale only axis,     xmin=1, xmax=511, xlabel={$\text{q (um}^\text{-}\text{1)}$},     ymin=0.5, ymax=1, ylabel={Normalized RMS error}]     \addplot [color=blue,solid,line width=1.0pt,forget plot]     table[row sep=crcr]{     1    -57.943745    \\     2    .more data     3    .more data     };     \end{axis}     \end{tikzpicture}%      I am importing and scaling the files in my document as follows (copied from Dimension too large from matlab2tikz, and aligning graph axis ):               \begin{table}[h!]            \begin{center}          \begin{tabular}{ c  p{6cm}  p{6cm}  }          \toprule           A & B & C \\           \cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(l){3-3}           text                         &                \scalebox{0.4}{\input{images/exp5nrmse.tikz}}           \scalebox{0.4}{\input{images/exp5diff.tikz}}           \scalebox{0.4}{\input{images/exp5diff.tikz}}]           &            \scalebox{0.4}{\input{images/exp5nrmse.tikz}}           \\ \bottomrule           \end{tabular}           \caption{DDM Results}           \label{tbl:myLboro}           \end{center}     \end{table}      Is it possible to change things like picture width, height, x and y label positions and things without having to edit the actual .tikz files. I ask because the presented code's graphs do not line up, and I would like to never have to touch the contents of the .tikz files to fix this issue. Picture of the problem below (the red lines I added in paint show the misalignment): ![Misaligned graphs](http://i.stack.imgur.com/zGrbh.png) Thanks for your time.


title: Problem with nomenclature

text: I am trying to get a list of abbreviations into my paper using the               \usepackage{nomencl}     \makenomenclature      package. However, I won't create a list in my document when I type               \printnomenclature      Can anyone please help? I am very new to Tex, so please help me out. The documentation says I have to run `makeindex <filename>.nlo -s nomencl.ist -o <filename>.nls` I have no idea what this means, nor do I know where to type this or what filename to enter. My file looks like this, and I am typing in TexMaker:               \documentclass[12pt]{article}      \usepackage{nomencl}     \makenomenclature          \begin{document}          \printnomenclature          \nomenclature{AIMR}{Association for Investment Management and Research}          blablabla AIMR          \end{document}


title: Macro for week number

text: Is there a macro or package to calculate the ISO week number or alternative can someone help me with one?


title: Is there a way to change the appearance of LyX output with change tracking (or alter the commands in LaTeX)?

text: I tend to use LyX for composing scientific papers, but a journal wants me to have changed text marked in specific ways that don't happen to be the way that LyX translates tracked changes into PS/PDF. Is there a way to modify not just the color but also the underlining of changed text when it's converted to PS or PDF? I suppose I'd have to do something with the `\lyxadded` and/or `\lyxdeleted` commands? LyX seems to always generate commands that look like `\lyxadded{My Name,,,}{2011 blah blah date}{my text}`, so if there's a good way to intercept this and add my own formatting to the `{my text}` part, that would probably work if there's no more elegant way.


title: Error Latex TeX capacity exceeded, sorry [input stack size=5000]

text: I want to test this template http://students.engr.scu.edu/~sschaeck/latexforthesis/. when i run the makefile i get this error .Please what does it mean this error here the code :               \documentclass[12pt]{thesis} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %%% preample %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%               %%% packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%               \usepackage[T1]{fontenc}        % euro quality fonts [T1] (togeth. w/ textcomp)     \usepackage{textcomp, amssymb}  % additional symbols (there are more packages)     \usepackage[latin1]{inputenc}   % umlaute in input file     \usepackage{setspace}           % doublespacing     \usepackage{anysize}            % margin package sets tighter margins     \usepackage[all]{xy}            % creating figures within latex     \usepackage[tight]{subfigure}% subfigures: figures within figures          %\marginsize{1.2in}{0.9in}{1.1in}{0.9in} % small margins     \marginsize{1.2in}{0.9in}{0.5in}{1.5in} % small margins          \usepackage{ifpdf}              % if pdflatex then ... else ...     \ifpdf       \pdfadjustspacing=1           % make pdflatex behave like latex       \usepackage{aeguill}          % PS converted CM fonts for better acro preview       \usepackage[pdftex]{graphicx} % graphics packages       \usepackage[pdftex]{color}    % color packages       \usepackage[pdftex]{thumbpdf} % create thumbnails (run thumbpdf as well)       \usepackage[pdftex,colorlinks,%                   pagebackref=true, % bibliography -> text                   linktocpage=true, % toc etc: make page number active (not name)                   plainpages=false, % distinguish roman and arabic pagenumbers                   bookmarksopen=true,%                   bookmarksnumbered=true,%                   pdfauthor={Stefan Sch�ckeler},%                   pdftitle={Lorem Ipsum Dolor Sit Amet},%                    pdfsubject={PhD Thesis},%                   pdfkeywords={Embedded Systems, Code Compaction},%                  ]{hyperref}        % clickabe references     \else       \usepackage[hypertex,                   plainpages=false, % distinguish roman and arabic pagenumbers                   linktocpage=true, % toc etc: make page number active (not name)                  ]{hyperref}        % clickabe references in .dvi                                     % purposely included before color package       \usepackage[dvips]{color}     % color packages; needed by xy       \usepackage[dvips]{graphicx}  % graphics packages     \fi               % hyperref must be the second last package and glossary the last package          % index     \usepackage{makeidx}                       % for \printindex     \makeindex                                 % creates paper.idx index file          % glossary     \usepackage[style=super, cols=3]{glossary} % for \printclossary     \makeglossary                              % creates paper.glo glossary file               %%% style and finetuning %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \pagestyle{plain}               % pagestyle: headings, empty, plain          % new theorems     \newtheorem{example}{Example}     \newtheorem{proof}{Proof}               %%% document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \pagenumbering{roman} % titlepage does not get a number - that's odd, but good.          \ifpdf\pdfbookmark[1]{Title}{label:title}\fi              \input{titlepage.tex}          \newpage                                                     \input{spruch.tex}          {\doublespacing     \newpage\ifpdf\pdfbookmark[1]{Acknowledgement}{label:ack}\fi\input{acknowledge.tex}     \newpage\ifpdf\pdfbookmark[1]{Abstract}{label:abst}\fi     \input{abstract.tex}     }          \newpage\ifpdf\pdfbookmark[1]{Table of Contents}{label:toc}\fi \tableofcontents     \newpage\ifpdf\pdfbookmark[1]{List of Figures}{label:lof}\fi     \listoffigures     \newpage\ifpdf\pdfbookmark[1]{List of Tables}{label:lot}\fi       \listoftables          {\doublespacing     \newpage\pagenumbering{arabic}          \newpage\input{body.tex}               % Bibliography and Glossary          (\phantomsection is needed for hyperlinks)          \newpage\phantomsection%     \addcontentsline{toc}{chapter}{\bibname}              % add Bibliography to TOC     \bibliographystyle{alpha}\bibliography{references}               \newpage\phantomsection%     \addcontentsline{toc}{chapter}{\indexname}                   % add Index to TOC     \printindex          \newpage\phantomsection%     \addcontentsline{toc}{chapter}{Glossary}                  % add Glossary to TOC     \printglossary          \end{document}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      the error it at the else .               Package thumbpdf Warning: Thumbnail data file `thesis.tpt' not found.          )     ! TeX capacity exceeded, sorry [input stack size=5000].     \curr@fontshape ->\f@encoding                                    /\f@family /\f@series /\f@shape      l.38 \else          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:      4193 strings out of 495285      52396 string characters out of 3180406      331427 words of memory out of 3000000      7339 multiletter control sequences out of 15000+200000      7342 words of font info for 24 fonts, out of 3000000 for 9000      14 hyphenation exceptions out of 8191      5000i,0n,9994p,231b,80s stack positions out of 5000i,500n,10000p,200000b,50000s     !  ==> Fatal error occurred, no output PDF file produced!


title: Error: I can't find the format file pdflatex.fmt

text: For no particular reason that I could identify, I was faced with the impossibility to compile any latex document and invariably got this error message each time I tried :               LaTeX: problems after [0] pages          kpathsea: Running mktexfmt pdflatex.fmt     tcfmgr: config file `tcfmgr.map' (usually in $TEXMFMAIN/texconfig) not found.     I can't find the format file `pdflatex.fmt'!


title: ctable footnotes - automatic labeling?

text: Is there a way to have `ctable` automatically label the footnotes: a, b, c, etc... (or some other formatting)?               \ctable[     ] {rl} {         \tnote{first footnote}         \tnote{second footnote}     }{         \FL Configuration & Error         \ML Full\tmark & 0.0         \ML Partial\tmark & 0.0         \LL     }      The above code marks them all as footnote a. Obviously I could specify each individually (`\tnote[a]{}`, `\tnote[b]{}`), but where's the fun in that?


title: Numbering equation error

text: \bigskip \begin{equation} $\phantom{SPACE}$ $C_{n}$  = $ \dfrac {4i(-1)^{n}n}{(n^2 - 1)^2} $ \end{equation}      Will not number the equation, or even allow me to view the PDF. I am just looking for an easy way to number this equation on the right hand side.


title: Automatically run Latex command after saving .tex file in Emacs

text: How can I have Emacs call the Latex command every time after I save my .tex file? Thanks A solution: while playing with ELisp and looking around, I added this to .emacs and it seems to work quite well (just don't press `C-x C-s` too much frequently, say every 5 secs):               (defun run-latex ()         (interactive)         (let ((process (TeX-active-process))) (if process (delete-process process)))         (let ((TeX-save-query nil)) (TeX-save-document ""))         (TeX-command-menu "LaTeX"))     (add-hook 'LaTeX-mode-hook (lambda () (local-set-key (kbd "C-x C-s") #'run-latex)))      The advantage of this solution over latexmk is that it is quicker to put working because I don't have to customize anything (and risking making mistakes). Also, in case I want to remove it, I only have to comment the last line `(add-hook ...` in your .emacs. Anyway, latexmk seems also another interesting path I will try when I have more time. Thanks for your answers and help.


title: Free ornaments font

text: I'm looking for a free ornaments font. I know about `webomint` and `pifont`. Where can I find more glyphs?


title: Beamer reflections with pgf/tikz

text: I want some nice reflections in my slides. Something like the ones seen in Jobs Keynotes. ![](http://i.stack.imgur.com/8jNS4.jpg) Suppose you have multiple elements in the tikz picture and you want to reflect the whole thing with fading. How can I achieve this using pgf/tikz?


title: CircuitTikZ - Combine Tripoles with resistors

text: I'm just learning how to use CircuitTikZ to draw circuits, and I am trying to draw a good looking BJT biasing circuit. But I am having making the resistors across from each other look even, and since there are no examples of combining tripoles with bipoles in the documentation I'm a little confused about whether or not I am doing this the best way. Here is my code:               \documentclass{article}     \usepackage{circuitikz}     \usepackage{amsmath}     \usepackage{SIunits}     \usepackage{circ}          \begin{document}           Single Transistor discrete BJT biasing circuit:     \begin{center}     \begin{circuitikz}[scale=1.4]     \draw (0,0) node[ground] {};     \draw (0,0) to[R=$R_2$] (0,2);     \draw (0,2) to[R=$R_1$, *-] (0,4) -- (2,4);     \draw (2,2) node[pnp] (pnp) {}         (pnp.B) -- (0,2);     \draw (2,4) to[R=$R_C$] (pnp.E);     \draw (2,0) node[ground] {};     \draw (2,0) to[R=$R_E$] (pnp.C);     \end{circuitikz}     \end{center}          \end{document}      I would like to have the top and bottom resistors at the same height if possible. Any help would be greatly appreciated!


title: How do I capture the existing color of a group?

text: My question is a follow-up of my answer to this question Color underline a formula My answer would have been much better, if I could save the color of the text and then restore it. Is it possible to capture the active color of a group and if yes, how does one do this?


title: How to modify the template

text: I am new to latex, and I am using a template to write my thesis. The template is available here , The problem I met is that after every "part", there always a empty page, which also takes one page number. Also there is empty pages between "Outline of the thesis" and the main body, and so on. My question is how could I modify the template to control(delete) these empty pages. Which file should I modify? Thank you very much!


title: How to set LaTeX so that PDF reader opens PDF file in a prespecified view?

text: When I open PDF file generated from `.tex` files in Adobe Reader I obtain 200% view and I'd like it to have much smaller? Are there some settings for my `.tex` files allowing to do that?


title: xy diagram problem: too wide, some arrows too short

text: I'm trying to write the diagrams of the isomorphism theorems, and I'm having problems. Some objects are too wide, and some arrows too short. Currently I have               $$\xymatrix{A\ar[r]^\pi\ar[d]_\rho & A/C\ar[d]_\tau\ar@{-->}[dl]_\sigma\\                     A/B\ar@{-->}[r]^\theta  & (A/C)/(B/C)\\}\hspace{-4mm}$$     $$\xymatrix{A\ar[r]^\rho\ar[d]_\iota\ar[dr]_\varphi & A/(A\cap N)\ar@{-->}[d]_\theta\\                     A\,N\ar[r]^\pi  & A\,N/N\\}$$      which produces ![enter image description here](http://i.stack.imgur.com/nlCSU.jpg) instead of ![enter image description here](http://i.stack.imgur.com/68ZuF.jpg). Notice that the problem is the position of (A/C)/(B/C) and A/(A\cap N): both should be positioned more to the right (left justified), so that all arrows were more or less equally long. How can I **specify the length of arrows** and **position/justification of objects**? I'm using `\usepackage[all]{xy}`.


title: Savebox and usebox unexpected behaviour for the box with index 10

text: I have found that when saving and later using boxes the box with index 10 behaves differently to all other. Here is simple demo that shows different behaviour. In preamble I define this commands:               \usepackage{forloop}     \newcounter{BoxCount}     \newcommand{\numberedBox}[1]{%       \stepcounter{BoxCount}%       \savebox{\theBoxCount}{\vbox{\noindent\theBoxCount\\~ #1}}%     }%     \newcommand{\writeBoxes}{       \stepcounter{BoxCount}%       \newcounter{I}%       \setcounter{I}{1}%       \forloop{I}{1}{\value{I} < \value{BoxCount}}{%       \usebox{\theI}\par     }%      The `\numbredBox` basically stores given text in indexed box while adding number of the box to the text. The `\writeBoxes` prints all stored boxes in order they were stored. In document body I have this code:               \numberedBox{word}     \numberedBox{word}     \numberedBox{word}     \numberedBox{word}     \numberedBox{word}     \numberedBox{word}     \numberedBox{word}     \numberedBox{word}     \numberedBox{word}     \numberedBox{word}     \numberedBox{word}     \numberedBox{word}     \numberedBox{word}     \writeBoxes      This is printed output of this document: ![enter image description here](http://i.stack.imgur.com/FWjLq.png) All the boxes are printed as expected except for 10th box which somehow interfere with box 11. I have played with similar code a little and found out that 10th saved almost always box behaves strange. In some cases I even got `! Incompatible list can't be unboxed` error but only for 10th saved box (content of all the boxes was equal). Why is this happening? How can I avoid it? * * * ## EDIT Here is complete source of this example that Hebert asked for. Just compile with pdfLaTeX and you will get output shown above.               \documentclass[a5paper]{book}     \usepackage{forloop}     \newcounter{BoxCount}     \newcommand{\numberedBox}[1]{%       \stepcounter{BoxCount}%       \savebox{\theBoxCount}{\vbox{\noindent\theBoxCount\\~ #1}}%     }%     \newcommand{\writeBoxes}{       \stepcounter{BoxCount}%       \newcounter{I}%       \setcounter{I}{1}%       \forloop{I}{1}{\value{I} < \value{BoxCount}}{%         \usebox{\theI}\par       }%     }     \begin{document}       \numberedBox{word}       \numberedBox{word}       \numberedBox{word}       \numberedBox{word}       \numberedBox{word}       \numberedBox{word}       \numberedBox{word}       \numberedBox{word}       \numberedBox{word}       \numberedBox{word}       \numberedBox{word}       \numberedBox{word}       \writeBoxes     \end{document}


title: How does one get endnotes at the end of every chapter?

text: Is it possible to get endnotes at the end of every chapter? Presently I am using the `endnotes` package and it seems to only generate all the endnotes together at the point where I put `\theendnotes`.


title: how to use already-downloaded Miktex 2.8 packages?

text: After a lot of bother with setting up a Miktex-Texmaker-Adobe arrangement, I've now done a basic install of non-portable Miktex 2.8, which is working fine. But given the slowness of my internet connection, I'd like to be able to use a large number of packages I already downloaded as part of a previous install, rather than download packages on the fly. I know I'm supposed to put miktex-zzdb1-2.8 and miktex-zzdb1-2.9 somewhere, but where exactly? and in what order do I need to refresh FNDB from mo.exe, run texhash, alter the Texmaker 3.3.4 config, and so on? The OS is Win 7 Pro, and the main Miktex directory is "C:\Program Files (x86)\ MiKTeX 2.8". Thanks in advance for any help with this!


title: Suppress/remove sectioning (heading) from table of contents?

text: ( _NB: **not** the same question as How to remove “Contents” line from table of contents [closed]_) Please consider the following MWE, compiled with `pdflatex test.tex`:               \documentclass[twoside,a4paper]{book}          \begin{document}          \section{TOC}          \tableofcontents          \cleardoublepage          \section{Sect 1}          \section{Sect 2}          \section{Sect 3}          \end{document}      This gives me:   * pg 1: "0.1 TOC" heading   * pg 2: blank   * pg 3: "Contents" heading (+ toc)   * pg 4: blank   * pg 5: "0.2 Sect 1"; "0.3 Sect 2" and "0.4 Sect 3" (as expected) Now, what I would like to do, is have the heading for the table of contents set by a `\section` command (the `\section{TOC}`) - and I'd like the contents table to continue as a paragraph would continue after a `\section`; or - my expected result would be:   * pg 1: "0.1 TOC" heading (+ toc)   * pg 2: blank   * pg 3: "0.2 Sect 1"; "0.3 Sect 2" and "0.4 Sect 3" (as expected) Obviously, in the example above, the `\tableofcontents` command first clears a double page - then inserts its own heading. In other words, I'd like to suppress this heading inserted by `\tableofcontents` \- however, _not_ merely by `\renewcommand\contentsname{}`; because I'd also like to reclaim the vertical space that the toc heading usually claims (because it's actually a `\chapter`, I guess). How do I do that?


title: How can I force LyX to rebuild intermediate files for clean PDF display?

text: I am working on a multi-file document in LyX (my thesis) and occasionally have problems where LyX seems to rely on old version of intermediate files when updating the PDF output. Is there an easy way to force a clean/refresh from scratch within LyX? For example, I have a separate LyX file that uses exclusively raw LaTeX (in ERT mode) to define acronyms that are shared across chapters. I then conditionally include this file in each chapter to enable building stand-alone chapters for review. The problem is that when I make and save changes (e.g. spelling) to an _existing_ entry in the acronym file, the changes do not automatically show up in the PDF output on the next view "Update" (`Shift`-`⌘`-`R`) or if the PDF preview is build with "View" (`⌘`-`R`). As a work around, I have forced a refresh by adding a new dummy entry to the acronym list, which apparently forces LyX to rebuild the temp files in a different way. I have experienced similar issues with other non-plain text edits. Any ideas of how to force a complete temp file re-build when updating the view? I am aware of the low-level (La)TeX answers from this post but am looking for a LyX specific method, ideally one available through the graphical interface. Environment: LyX 2.0.4, pdfLatex, Mac OSX 10.7.4


title: How to leave nomenclature list out of table of contents

text: In my thesis, I have a table of contents, list of figures, list of tables and a list of symbols and nomenclature generated with `nomencl` (in that order). The lists of figures and tables do not appear in my table of contents. But, for some reason, my list of symbols and nomenclature does. How can I prevent the list of symbols and nomenclature from showing up in the TOC? I am generating my list of symbols with the commands `\renewcommand{\nomname}{List of Symbols and Nomenclature}` (just to rename it to include both symbols and very brief definitions). Then: `\printnomenclature[5cm]` to print the list.


title: nice fonts for the classical sequence spaces?

text: I have the problem that I want to have nice looking math symbols for the classical sequence spaces like Schwartz space, convergent sequences, sequences with finitely many non-zero members etc. I like the `\ell^p` for p-summable sequences but want some calligraphic looking ones for the others as well. Currently, I use the calligra package with some experimental (and still improvable) scaling. It produces a rather OK `c_0` and `c` but the `f` does not match at all. Any suggestions how to improve that? ![enter image description here](http://i.stack.imgur.com/Lw73b.png) here's a sample of code:               \documentclass{article}     \usepackage{calligra}          % used for sequence spaces     %     % Stuff for sequence spaces, more dirty than quick:     % use the calligra fonts for this, scaled a bit larger, only the "f"     % is too large...     %     \DeclareFontShape{T1}{calligra}{m}{n}{<->s*[2.2]callig15}{}     \DeclareMathAlphabet{\mathcalligra}{T1}{calligra}{m}{n}     % convergent sequences     \newcommand{\seqc}           {\mathcalligra{c}}     % zero sequences     \newcommand{\seqcn}          {\mathcalligra{c}_0}     % finite sequences       \newcommand{\seqf}{{\mathcalligra{f}}}     % Schwartz sequences     \newcommand{\seqs}{\mathcalligra{s}}          \begin{document}     The classical sequence spaces are:     \[     \seqf     \subseteq \seqs     \subseteq \seqcn     \subseteq \seqc     \subseteq \ell^\infty     \]     \end{document}      Beside that, there seem to be quite a bit of kerning issues...


title: Extract the logically first slide in a Beamer overlay specification?

text: When writing Beamer slides for a talk, I find that I often want to have some text (usually math) visible on a group of slides and be alerted on only the first slide in the group. For example, I can achieve this with `$1 + 1 = \action<visible@+- | alert@+>{2}$`, `$2 + 2 = \action<visible@.(-1)- | alert@.(-1)>{4}$`, etc. However, it would be more maintainable and readable if these actions could be combined into one `alertvisible` action. Using a simple macro, it's easy to handle the case where the group of slides has the form `<slide number>-`:               \documentclass{beamer}     \newcommand{\alertvisible}[1]{visible@#1- | alert@#1}     \begin{document}     \begin{frame}{Frame Title}       Facts:\pause       \begin{itemize}       \item $1 + 1 = \action<visible@+- | alert@+>{2}$       \item $2 + 2 = \action<\alertvisible{+}>{4}$       \item $3 + 3 = \action<\alertvisible{.(-1)}>{6}$       \item $4 + 4 = \action<\alertvisible{+}>{8}$       \end{itemize}     \end{frame}     \end{document}      Unfortunately, this simple solution does not handle the general case. For example, I might want to have a single `alertvisible` action so that `\action<alertvisible@+,+(2)-+(3)>` is equivalent to `\action<visible@+,+(2)-+(3) | alert@+>`. This would seem to require a way, say `\firstslideof`, to extract the logically first slide in a group so that one could define               \newenvironment<>{alertvisibleenv}%         {\begin{visibleenv}#1\begin{alertenv}\firstslideof{#1}}%         {\end{alertenv}\end{visibleenv}}      Is there some way to define `\firstslideof` to allow this sort of general definition of `alertvisibleenv`? ## Edit: I am attempting to use the `xparse` and `xstring` packages to build `\firstslideof`, which, for some reason, I decided to rename as `\extract`. The basic idea is to parse out the left endpoint of each range in the slide specification and evaluate it to a numeric value. The slide specification with the smallest value should be returned as the "first-slide-of". For example, `\extract<+-+(1), 3, +, +(-2)-8>` should return `+(-2)` when the value of `beamerpauses` is smaller than 5, and `3` otherwise. Here is the code that I have so far:               \documentclass{beamer}     \usepackage{etoolbox}     \usepackage{etextools}     \usepackage{xparse}     \usepackage{xstring}          \makeatletter          \NewDocumentCommand{\extract}{>{\SplitList{,}}r<>}{%       % Initially set the minimum slide spec to something large       \def\beamer@extract@min{+(1000)}%       \ProcessList{#1}{\beamer@extract}%     }          \newcommand*{\beamer@extract}[1]{%       % Substitute \beamer@extract@groupplus for each +       \saveexpandmode       \expandarg       \StrSubstitute{#1}{+}{\noexpand\beamer@extract@groupplus}[\@tmpa]%       \restoreexpandmode     %       % Once \@tmpa is fully expanded, each occurrence of       % a possibly shifted + will be surrounded with { }.       % The { } are used to prevent \beamer@@extract from       % incorrectly splitting +(-1) as +( and 1).       %       %% How do I fully expand \@tmpa here?  Is this right?       \ExpandNext{\beamer@@extract}{\@tmpa}%     }          \NewDocumentCommand{\beamer@@extract}{>{\SplitArgument{1}{-}}m}{%       % Use \SplitArgument and  \@firstoftwo to get left endpoint       % of range.       Found: `\@firstoftwo#1'\par     %       % Evaluate the prospective and current minima to       % a numeric value and store the result in \@tmpa       % and \@tmpb, respectively.       \beamer@@extract@eval{\@tmpa}{\@firstoftwo#1}%       \beamer@@extract@eval{\@tmpb}{\beamer@extract@min}%     %       % If the prospective minimum is smaller, then        % make it the current minimum.       \ifnumless{\@tmpa}{\@tmpb}{%         \expandnext{\def\beamer@extract@min}{\@firstoftwo#1}%         Updated       }{%         Not Updated       }%       Minimum: \meaning\beamer@extract@min\par     }          \newcommand*{\beamer@@extract@eval}[2]{%       % Substitute \beamer@@extract@evalplus for each occurrence of        % + in #2, storing the fully expanded result in #1.       \saveexpandmode       \expandarg       \StrSubstitute{#2}{+}{\noexpand\beamer@@extract@evalplus}[#1]%       \restoreexpandmode       %% How do I fully expand #1 here?     }          \NewDocumentCommand{\beamer@@extract@evalplus}{r()}{%       \value{beamerpauses}+#1%     }          \NewDocumentCommand{\beamer@extract@groupplus}{D(){0}}{%       {+(#1)}%     }          \makeatother               \begin{document}          \begin{frame}{Test Frame}       % The following should set \beamer@extract@min to       %   +(-2) if beamerpauses < 5       %   3     if beamerpauses >= 5       \extract<+-+(1), 3, +, +(-2)-8>     \end{frame}          \end{document}      Unfortunately, when I run the code, I get an error: `You can't use \numexpr in horizontal mode. \ifnumcomp ...\ifnum \numexpr #1\relax #2\numexpr #3\relax \expandafter \@fi...`. My guess is that this error comes from expansion problems at the lines marked above with `%%`. **Question:**   Is the problem indeed related to expansion? If so, how can I fix it?


title: Problems using achicago package to create a bibliography

text: I've been having trouble using achicago package, I tried to run this example:               \documentclass[15pt]{article}     \usepackage{xltxtra}     \usepackage{dialogue}     \usepackage{achicago}     \usepackage{attrib}     \usepackage{lips}          \setmainfont[Mapping=tex-text]{Linux Libertine O}     \begin{document}          \begin{dialogue}     \speak{Vladimir} Whare are all these corpses from?     \speak{Estragon} These skeletons.     \par\lips\par     \speak{Vladimir} A charnel-house! A charnel-house! \attrib{\cite[41]    {beckett:godot}}     \attrib{\play{Waiting for Godot}, 41 \normalcitations\cite{beckett:godot}}     \medskip     \direct{     Estragon has exited offstage to right and left and come ‘‘panting’’ back     and fallen into Vladimir’s arms. \emph{---Ed.}     }     \speak{Estragon} I’m in hell!     \speak{Vladimir} Where were you?     \speak{Estragon} They’re coming there too!     \speak{Vladimir} We’re surrounded! \direct{\refer{Estragon} makes a rush     towards back.} Imbecile! There’s no way out there.     \direct{\refer{He} takes \refer{Estragon} by the arms     and drags him towards front. Gesture towards front.}     There! Not a soul in sight! Off you go! Quick!     \direct{\refer{He} pushes \refer{Estragon} towards     auditorium. \refer{Estragon} recoils in horror.} You     won’t? \direct{\refer{He} contemplates auditorium.}     Well I can understand that. Wait till I see.     \direct{\refer{He} reflects.} Your only hope left is to     disappear.          \attrib{47}     \end{dialogue}     Hello \cite{beckett:godot}\\          \bibliographystyle{plain}     \bibliography{biblio}          \end{document}      but I get the following error:               ! Undefined control sequence.     <argument> \@listctr           l.3 \bibitem{beckett:godot}          ?       The content of the biblio.bib file is the following:               @book{beckett:godot,     Author = {Samuel Beckett},     Publisher = {Grove Press},     Title = {Waiting for Godot},     Year = {1984}}      Any help will be welcome, thanks!


title: How do I force using the blank space before/after a table in a two column env?

text: I'm using a two column environment, and I placed a table in the left column, as shown in the image: ![actual format](http://i.stack.imgur.com/SOADo.png) Below it the latex source excerpt used to draw such a table:               \documentclass[final,5p,times,twocolumn]{elsarticle}          \usepackage[table]{xcolor}     \usepackage{booktabs}          \begin{document}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis metus a massa fringilla rutrum. Nulla in tincidunt eros. Maecenas porta facilisis pretium. Ut id tortor ac libero mattis aliquet. Fusce tincidunt, orci ut rhoncus pretium, mauris metus volutpat tortor, nec interdum ante quam a libero. Donec lacinia fringilla tellus nec pretium. Proin iaculis leo eu nisi eleifend non mattis mi convallis. Nam vel nunc mauris, sed condimentum elit. Nam rhoncus nulla eget odio vulputate molestie pretium ligula fringilla. In elementum arcu et augue bibendum dignissim. Ut vel lacus eu erat vulputate consequat at id odio.          Nulla et nibh enim, id faucibus enim. Nullam lobortis, arcu sed commodo semper, urna nisl imperdiet mauris, non vulputate nisl turpis eu arcu. Sed tincidunt, lorem sed posuere dictum, sapien magna euismod ante, at laoreet ligula ipsum sit amet sapien. Ut aliquam, nunc nec vehicula mattis, erat massa pharetra arcu, vel aliquam ipsum mi et nisl. Quisque dui metus, tincidunt in consequat ut, ullamcorper ac quam. Sed diam odio, placerat at gravida eu, accumsan vitae libero. Sed facilisis mi in risus luctus nec dictum ipsum placerat. Nulla facilisi. Curabitur mattis facilisis placerat. Suspendisse vel velit nec sapien posuere ultricies. Proin fringilla, libero vitae bibendum mattis, lacus ipsum interdum purus, eu cursus sapien neque at justo.          \begin{table}[!htp]           \center \footnotesize \rowcolors{2}{white}{gray!25}          \caption{List of studies.}\label{tab:studiesList}          \begin{tabular}{llcc}          \toprule              \textbf{ID} & \textbf{Reference} & \textbf{Pub. Type} & \textbf{Year}\\          \midrule              S84 & text text fake text  & C & 2010\\          S85 & fake text fake text & W & 2011\\          S86 & fake text fake text & W & 2011\\         S87 & fake text fake text & C & 2010\\         S88 & fake text fake text  & C & 2011\\         S89 & fake text fake text  & W & 2011\\                  S90 & fake text fake text & C & 2010\\         S91 & fake text fake text  & W & 2011\\         S92 & fake text fake text  & C & 2011\\         S93 & fake text fake text  & C & 2010\\         S94 & fake text fake text  & J & 2012\\         S95 & fake text fake text  & C & 2010\\         S96 & fake text fake text  & C & 2011\\         S97 & fake text fake text  & W & 2011\\                  S98 & fake text fake text  & C & 2011\\                  S99 & fake text fake text  & C & 2010\\         S100 & fake text fake text  & C & 2011\\         S101 & fake text fake text  & C & 2010\\                              S102 & fake text fake text  & C & 2010\\         S103 & fake text fake text  & C & 2009\\         S104 & fake text fake text  & C & 2010\\         S105 & fake text fake text  & C & 2011\\                     S106 & fake text fake text  & C & 2009\\         S107 & fake text fake text  & J & 2011\\         S108 & fake text fake text  & C & 2009\\         S109 & fake text fake text  & BC & 2010\\                    S110 & fake text fake text  & C & 2010\\         S111 & fake text fake text  & C & 2011\\         S112 & fake text fake text  & W & 2011\\         S113 & fake text fake text  & C & 2010\\         S114 & fake text fake text  & J & 2011\\         S115 & fake text fake text  & W & 2011\\                     S116 & fake text fake text  & W & 2010\\         S117 & fake text fake text  & J & 2011\\                     S118 & fake text fake text  & C & 2010\\         S119 & fake text fake text  & C & 2010\\         S120 & fake text fake text  & J & 2011\\                     S121 & fake text fake text  & J & 2011\\                     S122 & fake text fake text  & W & 2012\\                     S123 & fake text fake text  & C & 2012\\                     S124 & fake text fake text  & W & 2009\\         S125 & fake text fake text  & C & 2010\\         S126 & fake text fake text  & C & 2011\\         S127 & fake text fake text  & W & 2012\\                     S128 & fake text fake text  & C & 2010\\         S129 & fake text fake text  & W & 2011\\                     S130 & fake text fake text  & C & 2007\\         S131 & fake text fake text  & J & 2010\\                     S132 & fake text fake text  & J & 2011\\          \bottomrule              \multicolumn{4}{l}{\textit{Legend for Publication Type:}} \\         \multicolumn{4}{l}{[J] Journal, [C]         Conference, [W] Workshop, [BC] Book Chapter}\\          \end{tabular}           \end{table}          Suspendisse potenti. Pellentesque vel diam velit. Maecenas sagittis feugiat leo, sed lacinia neque pulvinar elementum. Phasellus non ornare velit. Nulla pretium ultrices libero, non vehicula erat semper laoreet. Pellentesque at tortor id diam ornare tincidunt at ac urna. Nulla condimentum interdum sapien. Nunc sit amet quam velit, sed bibendum dolor. Vivamus nec tortor diam, at hendrerit erat. Donec quis ante ut neque dignissim dignissim. Nam dui eros, pulvinar at laoreet sodales, luctus sed leo. Cras id leo quis nunc interdum tristique at nec dolor. Suspendisse eu elit mauris, at iaculis erat. Nunc quis tortor sed justo venenatis tempor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Maecenas arcu lacus, condimentum nec rhoncus et, sagittis sed nisi.          Donec sed mi sem. Suspendisse adipiscing, lectus ut egestas vulputate, magna nunc mollis augue, a venenatis dui sapien at mi. Morbi consectetur tincidunt mi id hendrerit. Sed in pellentesque ante. Cras erat orci, fringilla in hendrerit nec, placerat vitae metus. Phasellus vel elit quis est facilisis pellentesque sit amet et nisl. Aliquam placerat libero sed lacus rutrum sodales non vulputate risus. Curabitur condimentum elit ultricies justo iaculis tristique pretium ligula lacinia. Donec convallis mi nec lectus convallis suscipit. Nullam nisi nisl, tempus in condimentum eget, tristique ut mi. Sed in mi nibh. Donec ligula, sagittis vel facilisis a, rhoncus eget lectus. Quisque consectetur libero sit amet sapien commodo ornare. Integer et convallis dolor. Nunc dignissim commodo ultricies. Nam a ante dictum justo laoreet pellentesque.          Integer nulla sapien, viverra at vehicula ac, accumsan sed risus. Praesent nec ante sem, vitae scelerisque massa. Praesent at posuere ipsum. Morbi sed purus a massa bibendum luctus a vitae justo. Integer pretium auctor lacus vitae tincidunt. Suspendisse viverra pretium ante sed luctus. Suspendisse potenti. Cras ullamcorper adipiscing orci, ut pretium nunc pretium at. In vitae augue vel sapien dictum euismod pretium quis erat.          Vestibulum luctus adipiscing orci, ac sagittis purus placerat consectetur. Duis a bibendum sem. Vivamus non sem vel augue blandit rhoncus eget sed lectus. Nulla facilisi. Fusce tellus odio, faucibus et fringilla et, venenatis suscipit risus. Aenean aliquet tempor ligula auctor condimentum. Nulla accumsan est quis nisl fringilla varius. Morbi aliquam dictum magna in commodo.           Donec sed mi sem. Suspendisse adipiscing, lectus ut egestas vulputate, magna nunc mollis augue, a venenatis dui sapien at mi. Morbi consectetur tincidunt mi id hendrerit. Sed in pellentesque ante. Cras erat orci, fringilla in hendrerit nec, placerat vitae metus. Phasellus vel elit quis est facilisis pellentesque sit amet et nisl. Aliquam placerat libero sed lacus rutrum sodales non vulputate risus. Curabitur condimentum elit ultricies justo iaculis tristique pretium ligula lacinia. Donec convallis mi nec lectus convallis suscipit. Nullam nisi nisl, tempus in condimentum eget, tristique ut mi. Sed in mi nibh. Donec ligula ligula, sagittis vel facilisis a, rhoncus eget lectus. Quisque consectetur libero sit amet sapien commodo ornare. Integer et convallis dolor. Nunc dignissim commodo ultricies. Nam a ante dictum justo laoreet pellentesque.          \end{document}      There is notably some space that could be used before and after the table. How can I force the use of such spaces, so that the text could be something like the following picture. ![expected format](http://i.stack.imgur.com/RpCiN.png) I reach a similar "unexpected" result when I use an image, instead of a table. Especially when I use the command `\begin{figure*}[!htp]`, when I try to enlarge the image a little bit, so that I fits the entire page width, it doesn't place the text in the same page, but rather it forces the text to the next page, as shown in the following pictures. ![initial format for image and text](http://i.stack.imgur.com/rBcdb.png) ![actual and unexpected result](http://i.stack.imgur.com/czRdx.png)


title: Changing the output of \vref

text: I'm using `\vref` for labels in my text. I'd like to change it in the output form X on p. Y instead of X on page Y. How can I do it?


title: Compiler error "save size exceeded"

text: I have a problem with compiling my thesis. Due to a new plot I inserted, it lo longer compiles. According to this guide, i increased the limits for lualatex as follows:               pool_size=5000000     main_memory=6000000     extra_mem_bot=2000000     font_mem_size=2000000     save_size=120000      And saved them:               initexmf --dump=lualatex      Nevertheless, I receive this error message: > ! TeX capacity exceeded, sorry [save size=80000]. \pgfplotsarraysort@iflt > ...then@b =\pgfmathresult \ifdim \pgfplotsplothandle... l.45682 \end{axis} > If you really absolutely need more capacity, you can ask a wizard to enlarge > me. > > Here is how much of LuaTeX's memory you used: 114715 strings out of 495013 > 100000,36569284 words of node,token memory allocated 25514 words of node > memory still in use: nodes avail lists: > 1:1,2:35,4:2165,5:257,6:3245,7:522,8:5,9:1078,10:558,11:1 115594 multiletter > control sequences out of 65536+200000 197 fonts using 5517751 bytes > 68i,19n,144p,1144b,79999s stack positions out of > 5000i,500n,10000p,200000b,80000s ! ==> Fatal error occurred, no output PDF > file produced! As I see it, my changed up the limit to 80k (was 50k) but this seems to be a hard limit. Minimum Working example:               \documentclass[12pt, a4paper, bibliography=totoc, listof=totoc, parskip=half, numbers=noenddot]{scrreprt}     \usepackage[utf8]{inputenc}     \usepackage[english, ngerman]{babel}     \usepackage{lmodern}     \renewcommand{\familydefault}{\sfdefault}     \usepackage{tikz, tikz-3dplot, pgfplots}     \usepackage{siunitx}     \usepackage{tikz, tikz-3dplot, pgfplots}     \pgfplotsset{compat=1.9}     \usetikzlibrary{shapes, arrows, plotmarks, calc, fpu, positioning, fit, fadings, external}     \tikzset{>=latex}          \begin{document}          \begin{figure}[htb]         \centering         \input{diff_slice_KV-Referenz_131.tikz.tex}         \caption{Problematic plot}         \label{fig:iterpower_Referenz}     \end{figure}          \end{document}      The inputfile for the plot is found here: https://www.dropbox.com/s/osl8ulsukcrasip/diff_slice_KV-Referenz_131.tikz.tex I also tried to use XeLaTex, but I got the same error as with pdflatex a long time go: "main memory size" exceeded. (That was the reason to switch to lualatex in the first place) I know this is taxing on tex, but all the other surface plots work fine. This slice plot, which is comprised of two surface plots, apparently pushes lualatex over the edge. It was generated by matlab2tikz, therefore I assume it should be syntactically correct. (All the other surface plots are) Also, I have tested a smaller slice plot, that is slow (as always) but renders okay. Is there any way I can render this plot with pfgplots? The questions, that cover the same error, suggest that I cannot raise the limit over 80k, and that maybe something in the code is wrong. But I don't know how to trace down the error.


title: problem installing texlive 2014 on ubuntu

text: I have tried to remove and install texlive on my PC with Ubuntu 14 (64 bit). But the version that is installed is 2013. Can anybody tell me why?


title: htlatex and postscript graphics with psfig

text: I want to compile TeX source files to html (which I will then convert to the mobi format)with htlatex. The TeX source files are, unfortunately, rather old and contain postscript figures via the psfig package. For an example, this LaTeX document, http://arxiv.org/format/gr-qc/9712019v1 available by clicking `download source`. When I build in the conventional manner,               latex grnotes.tex     latex grnotes.tex     divpdfm grnotes.dvi      My grnotes.pdf document contains all figures. With,               htlatex grnotes.tex      The figures are missing - I can see two horizontal lines enclosing where the figures ought to be. Also, I can see no evidence that the figures (*.ps) were converted to png. How can I make `htlatex` convert the *ps figures and include them?


title: How to create this table for multi-line rotated text and thick vertical lines?

text: I want to create the table below and I am not sure how to do it. I also want the lines that say, "Long line of text really long" to be wrapped, and take up 2 instead of 1 so that the table isn't as long. I want this table to fit in a column of a 2 column paper. I included an arrow in the picture because I want that first vertical line to be thick also and I don't know how to do it. I also want the horizontal line below the columns 2-9 to be bold. Thank you! ![enter image description here](http://i.stack.imgur.com/yRrO9.png)


title: How can I make title quotations use single quotes?

text: I'm trying to display all titles in my bibliography / references using single quotes. In other words,               Gordon E Moore, “Cramming more com- ponents onto integrated circuits” (1965) 38(8) Electronics 114.      should be               Gordon E Moore, `Cramming more com- ponents onto integrated circuits' (1965) 38(8) Electronics 114.      I'm basing my style off earlier work by another developer. In the original style, he wrote:               % AGLC likes to use single quotes everywhere, not double quotes.     \renewrobustcmd{\mkbibquote}[1]{`#1'}      I can only assume that this was intended to force teh use of single quotes, but it doesn't appear to be working. What is the correct way to do this?


title: Table of 2x2 tikzpictures defined by my own macro

text: As a follow-up question from this post I am trying to find out how to arrange multiple tikspictures in a table, where my diagrams are defined by my own macros. **Problem:** Showing the diagrams separately works, but they are not loaded in a table. Furthermore I want the table to cover the textwidth of my document. My question is similar to this one with the difference that I'm trying to call a command which I defined in the preamble.                   \documentclass[a4paper,11pt,twoside]{book}          \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}          \usepackage{tabularx}          \newcommand{\clocks}[4]{     \begin{figure}[htb]     % \resizebox{#5 \textwidth}{!}{     \begin{tikzpicture}     \begin{axis}[       ybar,     %  enlargelimits=0.25,     %  legend style={at={(0.5,-0.15)},     %  anchor=north,legend columns=-1},       ylabel={CPU clocks},       symbolic x coords={one, two, three, four},       xtick=data,       nodes near coords,       nodes near coords align={vertical},     ]     \addplot coordinates {     (one, #1)     (two, #2)     (three, #3)     (four, #4)};     %\legend{one, two, three, four}     \end{axis}     \end{tikzpicture}     %}     \end{figure}     }               \begin{document}          \clocks{20}{50}{30}{70}          \begin{tabularx}{\textwidth}{|X|X|}     \hline     A & B \\     \hline     C & D \\     \hline     \end{tabularx}          %this table should be scaled to pagewidth!     \begin{tabularx}{\textwidth}{|X|X|}     \hline     \clocks{20}{50}{30}{70} & \clocks{20}{50}{30}{70} \\     \hline     \clocks{20}{50}{30}{70} & \clocks{20}{50}{30}{70} \\     \hline     \end{tabularx}          \end{document}