title: Is there a source function/capability in LaTeX

text: > **Possible Duplicate:**   >  How to make a standard preamble into a package I often have the same preamble stuff in my documents that kind of clutter the work space a bit. Some are custom commands I've stolen from here or there and some are calls to packages. In R I can use a function called `source` that allows me to create an external file of these commands and then I can just call `source` to read this external file and it's magically in the working memory (LINK to source info). It would be nice to do the same with LaTeX. Does LaTeX have this kind of capability?


title: indexing fails in svmono

text: Buildign the code below (pdflatex, makeindex, pdflatex) causes an error               ! LaTeX Error: Environment multicols undefined.      Code:               \documentclass{svmono}     \usepackage{makeidx}     \makeindex     \begin{document}          \frontmatter     \mainmatter     \index{foo}Text          \backmatter     \printindex          \end{document}      I can of course make the error go away using `\usepackage{multicol}` (and shall note this in an answer below), but I'd like to understand what's happening: has svmono simply failed to declare a dependency?


title: Need macro to ignore specific even-numbered inputs

text: My document consists (among other things) of blocks that look like this:               \begin{Solution}{6.7.8,1.2.3}      ...     \end{Solution}      or               \begin{Solution}{,1.2.3}      ...     \end{Solution}      I would like to define the Solution environment so that, upon setting a switch, the contents of the block is included as is (with LaTeX processing, of course), or is omitted completely if the last digit (the "3" above) is even. In addition, the inserted text, if it is inserted, should be labeled with the full string ("1.2.3") in the above example. I don't know TeX well enough to even know where to start. Anyone willing to help?


title: two columns column breaks

text: \documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof,parskip=full]{scrbook}      class and two columns there via "\twocolumn". It works fine mostly but in some instances of the texts involved I have the situation that part of the text of the left column is not put into the next line, and thus seen half into the right column. Interestingly it seems that there is some connectionn to () there as it always happened with text put in paranthesis. (Body) ,.... Is this a known limitation there that () text is being problematic? And how can I circumvent this problem? Edit: AS asked in the comments. As it seems the probblem only happens when something inside () is at the end of a line (in this case "Longevity" reaches into the 2nd column).                   \documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof,parskip=full]{scrbook}              \usepackage[english]{babel}         \usepackage[utf8x]{inputenc}         \usepackage{amsmath}         \usepackage{graphicx}         \usepackage{booktabs}                     \usepackage{multicol}                               \title{title \\*                title 2nd part}         \subtitle{Species book}         \author{author}         \date{}              \begin{document}         \maketitle              \newpage              \tableofcontents         \twocolumn              \chapter{chapter}              \section{section}              \subsection{Advantages}         \noindent\textbf{Dragons health}: Dragons regenerate X points of body per hour in their natural form and Y body per hour in their disguised form.         \textit{Dragons can regenerate wounds (BODY) extremely fast and even regrow limbs. They regenerate the fastest in their natural form.         The only wounds they are not able to heal at an accelerated rate are wounds taken from unnatural sources like magic or wounds taken from other dragons         claws, tails, teeth or breathes.}              \noindent\textbf{blah 1} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl         asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj         ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas          jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa               \noindent\textbf{blah 2} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl         asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj         ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas          jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa               \noindent\textbf{blah 3} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl         asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj         ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas          jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa               \noindent\textbf{blah 4} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl         asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj         ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas          jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa                \noindent\textbf{blah 4} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl         asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj         ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas          jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa                \noindent\textbf{blah 4} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl         asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj         ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas          jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa                \noindent\textbf{blah 4} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl         asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj         ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas          jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa                \noindent\textbf{blah 4} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl         asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj         ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas          jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa              \noindent\textbf{Ageless beings}: +4 CP         \textit{Life Support (Longevity: Immortal) (5 Active Points); Unified Power (Dragon; -1/4)}                 \noindent\textbf{blah 4} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl     asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj     ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas      jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa                 \noindent\textbf{blah 4} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl     asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj     ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas      jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa                 \noindent\textbf{blah 4} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl     asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj     ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas      jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa                 \noindent\textbf{blah 4} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl     asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj     ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas      jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa                 \noindent\textbf{blah 4} asdfsdfasfkjsadfkljsd fjasdlfjkasdf jklsdfkljkl     asfjdklsjfla skfjljkasdlkfjasdklfja sdlfjkasdlfjksdlakjasdkfjasdfasdfjasdklfj     ajksldfjasdfljasdlfjkasdkljasdlfj asdlfjkasdfkasdj fsdjfsdklfj klasdfj  asdlf asdklj sjkadf asdjklf asdklfjasd asdfas klasdf jkl fjklf lafjlas      jaskldf sdjlfsljasdlfj aj klasd jfljkflsdlak fasdf sdjklaf sdklf jsfsa                   \end{document}      _Also as it could be important: I'm using writelatex.com there to write the document (although not sure if it is only limited to there or a general latex phenomenon._


title: How is \mathbf defined?

text: One would define \mathbf as say:               \DeclareMathAlphabet      {\mathbf}{OT1}{cmr12}{bx}{n}      I was wondering, then with that, how \mathbf would be defined? (what is its meaning?).


title: How can I create copies of a document with a running number?

text: I am making a questionnaire, to be filled out with pen and paper. I need 40 copies of it, with around 13 pages each. I expect that some participants might take the questionnaire apart, so I have to be able to match the pages from an exemplar to each other. I want to do it in a simple way, by printing a number from 1 to 40 in the footer of each copy. However, I don't know how to generate different copies from the same TeX source, and I don't want to manually compile 40 times, changing the number each time. I decided to put everything between `\begin{document}` and `\end{document}` in a `\foreach` loop from `pgffor`, using a counter to print the number in the footer. This produces the 40 copies I need in a single document (not a problem from my point of view), but of course, this changes the page numbering, so the second exemplar starts at page 14 instead of page 1. As the page number is printed in the footer too, this is unacceptable. Because I am still making some changes to the questionnaire, I might suddenly find myself with 12 or 14 pages. So, taking the page number modulo 13 for printing in the footer is a bad idea. Any ideas how to make this work? Or will I have to fall back to the hardcoded modulo and just manually change the number if needed? I will prefer it to be really from inside LaTeX, not a script which changes the number in the .tex file and recompiles (I have to compile on different OSes). I don't care if I end up with one very long .pdf or forty small ones, as long as it isn't the same .pdf overwritten forty times.               \documentclass[a4paper,12pt]{article}          \usepackage{pgffor}      \usepackage{fancyhdr}           \newcounter{questionnaireNr}     \setcounter{questionnaireNr}{0}     \pagestyle{fancy}     \fancyfoot[C]{Questionnaire \arabic{questionnaireNr}}      \fancyfoot[R]{page \thepage}          \begin{document}         \foreach \x in {1,2,3,...40}          {             \stepcounter{questionnaireNr}                  Lorem Ipsum %here are the questions          }     \end{document}


title: LyX template for legislation?

text: Anyone know of any simple template for legislation which is easy to modify and looks great so I don't have to spend several hours to figure out the syntax? Edit: By legislation, I mean something whose output resembles bills before the U.S. congress.


title: Vertical alignment of menukeys output in tables

text: I want to collect a number of menu entries and associated shortcuts in a table with additional information and references. The actual table is quite large, so here is an abbreviated example:               \documentclass{article}     \usepackage{menukeys}          \begin{document}       \begin{tabular}{|l|l|l|}         \hline         Menu & Key & Whatever \\         \hline         \menu{Foo > Bar} & \keys{F1} & Go To Next Bar \\         \hline         \menu{Baz > Boo > Far} & \keys{F5} & Go To Remote Bar \\         \hline       \end{tabular}     \end{document}      I need the `\hlines` or something equivalent because the table takes up entire landscape pages and users need to be able to visually follow the table lines. The problem is that the output of the macros `\menu` and `keys` is not centered vertically in the table lines: ![problem](http://i.stack.imgur.com/tjt7u.png) As you can see, the output is very close to the upper margin of each table line. Is there a way to adjust this globally -- or add a bit of height to the table lines?


I currently would like to typeset an integral with long integral borders. But either I get too much space after the integral sign and before the function I integrate, or I get a wrong alignment of the border: ![enter image description here](http://i.stack.imgur.com/rsDhG.png) How can I typeset long integral borders? ## MWE               \documentclass[a5paper]{scrartcl}     \usepackage{amssymb, amsmath} % needed for math     \usepackage[utf8]{inputenc} % this is needed for umlauts     \usepackage[ngerman]{babel} % this is needed for umlauts     \usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf     \usepackage{mathtools}     \begin{document}     \section*{With mathclap}     \begin{align*}     \int_S f \mathrm{d} A &= \sum_{i=1}^n \int_{\mathclap{V_i}} f \mathrm{d} A \\     &- \sum_{i \neq j} \int_{\mathclap{V_i \cap V_j}} f \mathrm{d} A \\     &+ \sum_{i,j,k} \int_{\mathclap{V_i \cap V_j \cap V_k}} f \mathrm{d} A\\     &- \dots     \end{align*}          \section*{Without mathclap}     \begin{align*}     \int_S f \mathrm{d} A &= \sum_{i=1}^n \int_{V_i} f \mathrm{d} A \\     &- \sum_{i \neq j} \int_{V_i \cap V_j} f \mathrm{d} A \\     &+ \sum_{i,j,k} \int_{V_i \cap V_j \cap V_k} f \mathrm{d} A\\     &- \dots     \end{align*}     \end{document}


title: Wrap text around a picture except for the first line

text: As the following minimal sample shows, a text wrapping around a picture starts wrapping with the first line. Including the `wrapfigure` in the text leads to strange paragraph breaks.               %----     \documentclass[bibliography=totoc,listof=totoc,12pt,a4paper,oneside]{scrbook}     \usepackage{lipsum}     \usepackage[demo]{graphicx}     \usepackage{wrapfig}     %----              \begin{document}          \begin{wrapfigure}[]{l}{0pt}         \vspace{-30pt}         \includegraphics{test}     \end{wrapfigure}              \textbf{Lorem-ipsum-dolor-sit-amet-consetetur-sadipscing-elitr (1)}. Now starts text \lipsum[1]          \end{document}      Any suggestions how to avoid the first line form wrapping around a picture like in the following scheme? ![enter image description here](http://i.stack.imgur.com/b9lxk.jpg) ## Edit: I have found a way to solve the problem for a minimal example using `picinpar` and a `window` environment. `\begin{window}[<number of lines>, <align>, \includegraphics[]{<file>}, {<caption-text>}]`               %---     \documentclass[bibliography=totoc,listof=totoc,12pt,a4paper,oneside]{scrbook}     \usepackage{lipsum}     \usepackage[demo]{graphicx}     \usepackage{picinpar}     %---          \begin{document}          \begin{window}[1, l, \includegraphics[]{test}, {}]     \textbf{Lorem-ipsum-dolor-sit-amet-consetetur-sadipscing-elitr (1)}.      Now starts text \lipsum[1]     \end{window}               \end{document}      But still I want to use `schemeref` to add numbering within a picture and therefore I need a `figure` environment and no such solution with `window`. Any ideas regarding that?


title: How to fix the space between each x ticks in a pgfplot?

text: I want to plot some data using pgfplot. Here is what I got for now:               \begin{tikzpicture}     \begin{axis}[       xlabel=X,       xmin = 0,       xtick = {1,2,3,4,8},       ylabel=Y,       enlargelimits=false     ]          \addplot coordinates {       (1,   2000)       (2,   5000)       (3,   8000)       (4,   11000)       (8,   13000)     };     \addlegendentry{A}     \end{axis}     \end{tikzpicture}      The display is OK, but I do not want to have more space between 4 and 8 than between 1 and 2. I want the same space between each x tick. Is that possible ?


title: Acronym capitalization not working in plural mode

text: I am using the `glossaries` package to manage acronyms and it seems like the combination of "use long form", "make first letter uppercase" and "use plural form" does not work (see MWP below): At first I thought it might be related to the remarks in the glossaries documentation concerning the uppercase commands not being expandable as I came across this problem when using `\Acfp` at the beginning of a caption in combination with `hyperref`. But even after removing all the clutter, it still does not seem to work:               \documentclass{article}          \usepackage[acronym,shortcuts]{glossaries}          \newacronym{mTA}{mTA}{my test acronym}          \begin{document}     Try acr shortcuts:\\     \acf{mTA}\\     \Acf{mTA}\\     \acfp{mTA}\\     \Acfp{mTA}\\          Try acr commands:\\     \acrfull{mTA}\\     \Acrfull{mTA}\\     \acrfullpl{mTA}\\     \Acrfullpl{mTA}\\          Try gls commands:\\     \glsentryfirst{mTA}\\     \Glsentryfirst{mTA}\\     \glsentryfirstplural{mTA}\\     \Glsentryfirstplural{mTA}\\     \end{document}      ![MWP](http://i.stack.imgur.com/PnzzQ.png) The `\glsentryfirst*` family does the 'right' thing but are lacking the `hyperref` information (not part of the MWP). So am I missing something here?


title: \colon for maps in opposite direction

text: Using `\colon` gives correct spacing for a map `$F\colon C\to D$` in one direction. But writing `$L\colon C\rightleftarrows D\colon R$` for a couple of maps in both directions (e.g. for an adjunction) gives disturbingly asymmetric spaces near first and second colons (like if D were a map from R, not the other way round). Probably, it should be fixed (e.g. some other command should be used) — but how?


title: Remove indent of paragraph and add line skip with tufte-latex

text: I'm using `tufte-latex` and I want paragraphs to have no indent, but a line skip instead. Normally you can achive this with:               \usepackage[parfill]{parskip}      Using `tufte-latex` this does not work however. So how do I do this?


title: TikZ: Tilting a submatrix of a \matrix

text: \documentclass{standalone}          \usepackage{tikz,pgf}          \usetikzlibrary{fit,scopes,arrows,calc,shapes.misc,matrix,positioning}          \begin{document}          \newcommand{\bbrect}[3]{         \pgfmathtruncatemacro\result{#1+1};         \node[rectangle,draw,fit=(A-#1-\result.north west) (A-#1-#2.south east), inner sep = 0pt] (block#3) {}     }          \begin{tikzpicture}         \ttfamily         \begin{scope}                 \matrix (A) [matrix of nodes, ampersand replacement = \&] {                     {0} \& {0} \& {1} \& {0} \& {1} \& {0}\\                     {0} \& {0} \& {0} \& {1} \& {1} \& {1}\\                     {0} \& {0} \& {0} \& {0} \& {1} \& {0}\\                     {0} \& {0} \& {0} \& {0} \& {0} \& {1}\\                     {0} \& {0} \& {0} \& {0} \& {0} \& {1}\\                     {0} \& {0} \& {0} \& {0} \& {0} \& {0}\\                 };         \end{scope}         \bbrect{1}{5}{1};     \end{tikzpicture}          \end{document}      I would like to tilt the submatrix rectangle frame created by `\bbrect{1}{5}{1}` to some small degree -- with all its entries `0 1 0 1`, too. Since the matrix environment is used expressly for the purpose of _aligning_ items, this seems near to impossible?


title: Could not use cases with ws-aa class file

text: I am preparing a paper which will be submitted to a journal of World Scientific publisher. They recommend author use package: `ws-aa.cls` file as the following link: http://www.worldscientific.com/page/aa/stylefiles- readme-2e. I use `ws-aa.tex` file to type manuscript. Then I could not use the following command:               \[     \omega(x)=     \begin{cases}      \phi\left(\frac x{|x|}\right)\qquad\text{if $x\neq0$},&\\     \quad0\quad\;\;\;\qquad\text{if $x=0$},&\\     \end{cases}     \]      How could I do this?


title: Put the \encl at the bottom of the page (lettre class)

text: Using the `lettre` document class, I want to place the enclosures _automatically_ at the bottom of the page, like this : ![image](http://i47.tinypic.com/ykwlj.png) This is the default behavior : ![image](http://i49.tinypic.com/i6z2hg.png) This is the code I used to get the first picture (with the enclosures at the bottom) :               \documentclass[romand]{lettre}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[francais]{babel}          \name{Mister Z}               \begin{document}          \begin{letter}{Company X\\     Mister Y\\     Address\\     Town}          \conc{Business contract}          \opening{Dear Sir,}          Lorem ipsum dolor sit amet, % and so on..          \closing{Kind regards,}     \vspace{60mm} % This is what I want to be automatic (adaptative)     \encl{Contract}          \end{letter}          \end{document}      I'd like to replace `\vspace{60mm}` by something which would automatically take all free space like `\vfill`. But `\vfill` does not do what I want here, I think this is because the letter is written inside the _letter_ environment, which probably does not take the whole page. I tried to find a solution by looking at the `lettre.cls` file, but with no success.


title: Vertically aligned table in plainTeX / LaTeX / Context etc

text: My last answer about vertically aligned table inspired me to write my first question at this site. How to create the following table in various TeX approaches: plainTeX, LaTeX, Context, eplain, OPmac etc.? The comparison would be welcome. The table has given column widths, each data item is vertically centered, some data items can be vertically spanned and vertically centered in its space. Data items are one of the two types: single centered line in the column or the paragraph. There are single lines between columns and between lines. The table looks like: ![valign2](http://i.stack.imgur.com/KbDX7.png) It would be fine to separate the code to two parts: first part will be signed as `% macro code` created by the macro programmer and/or typo designer. The second part is signed as `% document` and the author of the text is supposed to write it. I'll give the answer for plainTeX (this is my domain). I am looking forward to another approaches. As a bonus you can try to create the table from my book TeXbook inside out (full text is available here) from the page 142. The vertical aligning is here too: the last but one line is vertically centered and the the last line is aligned to the top. **Edit** I am still waiting for LaTeX solution. One user mentioned in comments that this is worse aspect from typographical point of view. But I am not evaluating the typographical quality of many examples presented at tex.stackexchange. Why do it with this special case? For example, my customer asked me for creating the following excel-like table: ![table-v](http://i.stack.imgur.com/SB5DR.png) This is not used for printing in book but only as a tool printed on paper sheets to do data more transparent. This is typical example for `\valign` usage. > **Is there a LaTeX approach to do this?** LaTeX is mentioned here in 98 % of > threads. Can we found somebody to explain this from LaTeX point of view? Or > LaTeX isn't able to do it (without absorbing the plain TeX solution)? Note: the vertical-alignment tag includes 1030 threads. What can be more natural than `\valign` primitive for such request... Today, there is **very similar question** Different vertical alignment with multirow.


title: Publicity Poster

text: I am looking for a good poster class for latex. Googling gave only conference posters. This is for a program. Is there any specific classes for it. Or I need to stick to conference poster


title: Invert Background and Text Colours across Whole Document with pdflatex

text: When using pdflatex is there a simple way to invert the colors to give white text on a black background across the whole document? I'd like the colours to be inverted whilst I write and edit the document, and then to be able to switch back to black text on a white background for the final version


title: Multiple papers in one BibTeX entry

text: I'm quite surprised by the fact that this question hasn't appeared before (or I just couldn't find one), because the situation looks very common to me. Namely, I have to cite an article, but since it is written in Russian, I also want to supply a link to the English translation on arXiv. Of course, it is possible to add a comment to the end of the entry, like "~paper info~ (in Russian, see English translation at arXiv:~number~)", but this looks not very good to me. Is it possible to place two article in one BibTeX entry? If not, what is the suitable bibliography package to do it?


title: How to generate n points over a circumference and choose label and color

text: I would like to place n points over a circumference like Figure 3 of this file. I'd choose the label to be assigned to each vertex and color and I'd like to have the code in TikZ-pgf. ![enter image description here](http://i.stack.imgur.com/Y0I1q.png)


title: \StrMid and \MakeUppercase problem

text: What's wrong with this:               \documentclass{minimal}     \usepackage{xstring}     \begin{document}     \newcommand{\cim}{c1095}     \StrMid{\MakeUppercase{\cim}}{1}{1}     \StrMid{\cim}{2}{100}     \end{document}      `\MakeUppercase{\cim}` works but `\StrMid{\MakeUppercase{\cim}}{1}{1}` doesn't work. Why?


title: Special handling of first and/or last item in an etoolbox list

text: Is there a simple way of handling the first and/or the last item in an `etoolbox`-based list in a special way? Here’s a simple example:               \documentclass{article}          \usepackage{etoolbox}          \begin{document}          \forcsvlist{\listadd\namelist}{Tom, Dick, Harry, Jack}          \renewcommand*{\do}[1]{; #1}     \dolistloop{\namelist}          \renewcommand*{\do}[1]{#1, }     \dolistloop{\namelist}          \end{document}      The output is > ; Tom; Dick; Harry; Jack > > Tom, Dick, Harry, Jack, How would I go about changing the above code to create the output > Tom; Dick; Harry; Jack > > Tom, Dick, Harry and Jack The first output would be easy to achieve if one could define the first item’s formatting to be simply `#1` while the rest are formatted as `; #1`. The second output would be easy to achieve if one could define all items to be formatted as `, #1` except the first one, which should be `#1` and the last one, which should be `and #1`. Note that I’m looking for a solution for `etoolbox` lists, not other list structures.


title: Odd behavior of random selection of exercises

text: I'm testing some of the features of the `exsheets` package. Specifically I'm trying to use `\includequestions[<options>]{<list of filenames>}` to include some random exercise from some external files. But I just get: `No pages of output`. The code is here.


title: Uncovering items and changing frame title with beamer

text: The usual behavior of `beamer` when using `\framebreak` is to change the title of the current frame by adding a "local numbering" of the slide within those "broken frames". I would like to achieve the same result on some frames (this can't be a global behavior change) when using `\uncover`, `\only`, `\alt` and such, but for now, I do it by hand, e.g.               \documentclass[svgnames,smaller]{beamer}     \usepackage{tikz}     \usepackage[utf8]{inputenc}     \usetheme{Warsaw}          \begin{document}          \begin{frame}     \frametitle{HELLO \uncover<1->{I}\uncover<2->{I}\uncover<3->{I}}     \uncover<1->{ A \\}     \uncover<2->{ B \\}     \uncover<3->{ C \\}     \end{frame}          \end{document}      So my two question are pretty straightforward : do you know how to this properly (for example, I can't go beyond a counter value of 3 in this piece of code)? and what is the `beamer` counter that stores the "local numbering" I was referring to earlier in this post.


title: how to get a colon ":" after the short abbreviation in acronym

text: I was wondering how to get in my acronym list ":" (colon) after the short abbreviation, for example: I want to get > UV: Ultra Violet but I keep getting > UV Ultra Violet without the colon.


title: Install Gnuplot on Mac OS-X 10.8.2 for use with 'tkz-fct' package

text: I have recently discovered the TikZ packages for LaTeX: http://altermundus.com/pages/tkz/index.html I have run the examples for `tkz-euclide` with success. I would also like to use the `tkz-fct` package for plotting curves. Since I have not previously installed Gnuplot, when I compile examples using the `tkz- fct` package I get the error message: Plot data file `filename.tkzfct.table' not found. I have read several web pages that describe how to compile the source for Gnuplot for Mac OSX and also some explanations on how to obtain binaries as part of other packages such as Octave and others. I have not tried these procedures yet, as they seam complicated and I am a novice at Mac OSX details. What is the best practice for how to install Gnuplot for use with TexShop with MacTex 2012 distribution, on Mac OS-X 10.8.2 Mountain Lion for use with 'tkz- fct' package. I apologize if a similar question was answered already, but there are so many different answers and many are a few years old.


title: Newline in equations

text: The code looks something like:                       $$               If \ abs(dx) = abs(dy) \  then \\                 step = abs(dx)\\             else \\                 step = abs(dy)\\             $$      I want the '\\\' to behave as in normal way (newline) but it does not display a newline. Thanks


title: Proceedings bibliography problem - not displaying year, address and pages

text: I want to show proceedings information in the output PDF file using data from `publications.bib`. Particularly, I have a problem displaying year, address and pages.               \documentclass[11pt,a4paper,sans]{moderncv}     \moderncvstyle{classic}                                 \moderncvcolor{blue}                                       \makeatletter          \makeatother     \renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}          % bibliography with multiple entries     \usepackage{multibib}          \newcites{article,inproceedings}{{Journal articles (peer review)},{Conference papers (peer review)}}          .     .     .          \section{Publications}          \nociteinproceedings{proceedings2, proceedings1}     \bibliographystyleinproceedings{unsrt}     \bibliographyinproceedings{publications}                  \end{document}      In publications.bib I have the following:               @INPROCEEDINGS{proceedings2,       author  = {XXXX},        title = {A1},       booktitle = { B1},       address = {World},       year = {3-5 apr, 2013}       pages = {1-5},       }          @INPROCEEDINGS{proceedings1,       author  = {XXXX},        title = {A2},       booktitle = {B2},       address = {World},       year = {3-5 apr, 2013}       pages = {6-9},       }      I do not want to have a cross-reference system, i.e. I just want to show data in PDF. I also tried `@Proceedings`, but it didn't work.


title: Why doesn't the \closing center in my letter?

text: If I `pdflatex` the below Latex, then "Kind regards," and "Sandra" doesn't get centred. If the letter is two pages long, then it does. **Question** How do I get this centred when my letter is just one page?               \documentclass[a4paper, danish]{letter}     \usepackage{a4}     \usepackage[danish]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{aeguill}          \signature{Sandra}          \begin{document}     \begin{letter}{}     \opening{Re: }          test          \closing{Kind regards,}          \end{letter}     \end{document}


title: PGFPLOTS 3d box line for Z axis not being drawn

text: The vertical 3d box line for Z axis is not being drawn. If I make the grid lines dashed, the line is drawn, but also appears dashed, as the grid lines. To me, it looks that the line is in fact drawn, but it seems to be behind the grid (that's why it would appear dashed with the dashed grid). UPDATE: Just confirmed, if I remove grids with `grids = none` the box line appears. Any way to fix this? MWE (for dashed, just uncomment the grid style line):               \documentclass[12pt,a4paper]{report}     \usepackage[latin1]{inputenc}     \usepackage{pgfplots}     \pgfplotsset{compat=1.3}     \begin{document}     \begin{figure}     \centering     \begin{tikzpicture}     \begin{axis}[     width=8cm,     height=8cm,     grid = major,     %grid style={dashed, gray!50},     scale only axis,     xmin=-2, xmax=2,     xtick={-2,-1,0,1,2},     xlabel={X},     ymin=-2, ymax=2,     ytick={-2,-1,0,1,2},     ylabel={Y},     zmin=0, zmax=4,     ztick={0,1,2,3,4},     zlabel={Z},     3d box=background,     view={322.5}{30},]          \addplot3 [     color=black,     mark size=2.5pt,     only marks,     mark=*,     mark options={solid}]     table {     -0.25 -0.25 3     };     \addplot3 [     color=black,     mark size=2.5pt,     only marks,     mark=*,     mark options={solid}]     table {     -0.25 0.25 3     };     \addplot3 [     color=black,     mark size=2.5pt,     only marks,     mark=*,     mark options={solid}]     table {     0.25 0.25 3     };     \addplot3 [     color=black,     mark size=2.5pt,     only marks,     mark=*,     mark options={solid}]     table {     0.25 -0.25 3     };     \end{axis}     \end{tikzpicture}     \end{figure}     \end{document}      Results: ![enter image description here](http://i.stack.imgur.com/BWyPj.png) ![enter image description here](http://i.stack.imgur.com/NNpnx.png)


title: Making section headers link to local files

text: I want to make the section titles in my document link to external files on my machine, so that when you click on the section title, an external document (a pdf-file) is opened. What is the nicest way to do this?


title: gb4e + biblatex error "patching footnotes failed"

text: I'm having a problem while using `gb4e` and `biblatex` in the same file. It does compile, but I get an "patching footnotes failed" warning. Minimal example:               \documentclass[11pt,a4paper]{article}               \usepackage[backend=biber,style=authoryear]{biblatex}     \usepackage[american,spanish]{babel}     \usepackage{csquotes}          \usepackage{gb4e}     \noautomath          \begin{document}          ejemplo de texto               \end{document}      Gives the error:                Package biblatex Warning: Patching footnotes failed.      (biblatex) Footnote detection will not work.      Am I doing something wrong? is the warning important or could I just ignore it?


title: Help in creating tables, errors in code

text: I am beginner of LaTeX. I am using MiKTeX 2.9 and TeXnicCenter as editor. I tried following code to create merged table but I got 101 errors! I want to create PDF file and not able to understand what went wrong. Probably, am I not using correct package? Please help, following is the code:               \documentclass[a4paper,12pt]{article}     \usepackage{tabls}     \usepackage{ctable}     \usepackage{booktabs}     \usepackage{longtable}          \begin{document}     \section{Table 1}          \begin{tabular}{ccc}          \multicolumn{2}{c}{\head{Input}} & \multicolumn{1}{c}{Output}\\          \head{Group A} & \head{Group B} & \head{Group C} \\          cmidrule[2pt](lr){1-2} \cmidrule[1pt](r){3}          30 & 50 & 80\\          10 & 20 & 30\\          1 & 5 & 6\\          \bottomrule[1.5pt]          \end{tabular}     \end{document}      The editor is showing error at first `\multicolumn` line. It is showing > pdflatex-> !undefined control sequence.


title: Curve synthesis - Adding two curves to get another one

text: Case 1: Let's say I have a few coordinates (A), (B), (C), (W), (X), (Y), and (Z) (possibily obtained through intersection, rotation, and whatnots). I draw two **piecewise linear** curves through (A), (B), (C) on one hand and (W), (X), (Y), and (Z) on the other hand. Case 2: I have two curves defined by two functions, say f(x) = x + 3 and g(x) = - x + 2. Case 3: One of the curves is defined by coordinates and the other by a function In all these cases, is there a way to "add" both curves to obtain a third one (say h(x) = f(x) + g(x))? For sake of simplicity, all curves I'm interested in at the moment have the nice property of being **piecewise linear** but feel free to relax this if there is an all encompassing solution. Example for case 1:               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{calc,positioning}          \begin{document}          \begin{tikzpicture}     \newcounter{i}          % Curve 'one' .. is there a way to give it a name?      % Coordinates saved for further labeling, and so on.     % How to do it smoothly?     \begin{scope}[red]        \setcounter{i}{0}%       \foreach \point in {(0,4),(4,1),(10,6)} {%         \node[coordinate] (one-\arabic{i}) at \point { };%         \fill (one-\arabic{i}) circle (0.1);%         \stepcounter{i}       }       \draw (one-0) -- (one-1) -- (one-2);     \end{scope}          % Curve 'two' ..      % If I don't need to save the coordinates for later use,      % there must be a better way to draw?     \begin{scope}[green]        \setcounter{i}{0}%       \foreach \point in {(0,1),(3,5),(6,5),(10,2)} {%         \node[coordinate] (two-\arabic{i}) at \point { };%         \fill (two-\arabic{i}) circle (0.1);%         \stepcounter{i}       }       \draw (two-0) -- (two-1) -- (two-2) -- (two-3);     \end{scope}          %%% What I want is the "sum" of curves one and two ...     \end{tikzpicture}          \end{document}


title: hyperref conflicts with todonotes and chemfig packages

text: I'm using TexLive 2012 from the openSUSE buildservice publishing repository, and a document that would compile with TeXLive 2011 now effects error messages such as: > Package PGF Math Error: The function `add' already exists. > > Package PGF Math Error: The function `subtract' already exists. and so on. This is caused by `todonotes` and `chemfig`, since both load `tikz`. Is there a way to resolve this conflict? An example, as requested:               \documentclass[a4paper]{scrbook}     \usepackage{hyperref}     \usepackage{todonotes}     \begin{document}     test     \end{document}      The relevant excerpt of the log from texlive 2011:               (/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty     Package: pgfcomp-version-1-18 2007/07/23 v2.10 (rcs-revision 1.1)     ))     (/usr/share/texmf/tex/latex/pgf/utilities/pgffor.sty     (/usr/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty     (/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex))     (/usr/share/texmf/tex/generic/pgf/utilities/pgffor.code.tex     Package: pgffor 2010/03/23 v2.10 (rcs-revision 1.18)      and that of the log from texlive 2012:               (/usr/share/texmf/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty     Package: pgfcomp-version-1-18 2007/07/23 v2.10 (rcs-revision 1.1)     ))     (/usr/share/texmf/tex/latex/pgf/utilities/pgffor.sty     (/usr/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty     (/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex))     (/usr/share/texmf/tex/latex/pgf/math/pgfmath.sty     (/usr/share/texmf/tex/generic/pgf/math/pgfmath.code.tex     (/usr/share/texmf/tex/generic/pgf/math/pgfmathcalc.code.tex     (/usr/share/texmf/tex/generic/pgf/math/pgfmathutil.code.tex)     (/usr/share/texmf/tex/generic/pgf/math/pgfmathparser.code.tex     \pgfmath@dimen=\dimen142     \pgfmath@count=\count113     \pgfmath@box=\box35     \pgfmath@toks=\toks24     \pgfmath@stack@operand=\toks25     \pgfmath@stack@operation=\toks26     )     (/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.code.tex     (/usr/share/texmf/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex


title: Print programs with its proper syntax by minted

text: I have post a question several weeks ago: Print programs with its proper syntax, and I finally decided to use the package `minted`. I summarize a little bit my needs here: the language I define has its special tokens (`do`, `od`, `if`, `fi`...), and support comments. I would like `minted` to highlight these key words (coloring is not necessary at this stage). If possible, I hope `minted` could read a program directly from a file. @Raphink showed me a blog post for example, which is too hard to understand for me without the output picture; the doc of `minted` does not contain any details either... Does anyone have any idea about my specific requests above?


title: Change the baselinestretch (line spacing) only for figure captions

text: I use               \renewcommand{\baselinestretch}{1.5}      in my preamble to change line spacing of my main text. For my Figure cpations I'd like to have a value of `1.0` or `1.2`. Is there an easy way to change the line-spacing for figure captions, table captions,... independently?


title: Edition field in BibTeX: How to use "custom" entries?

text: As far as I know the recommended way to fill the `edition` field for BiBTeX entries is to use write out ordinal numbers capitalized such as               edition = {Second}      BibTeX then usually outputs "second edition". Now I would like to put a different information there, e.g.               edition = {reprint}      and I don't want BibTeX to write "reprint edition", but only "reprint". I have read that there are bibstyles which check whether the `edition` field is an ordinal word and if not write out the field content unchanged. Can somebody point me to such a style file?


title: Change chapter name in ToC

text: I need to change "Chapter" word to, for example, "Heading". I tried to use command `\renewcommand{\chaptername}{Heading}` but it changed chapter name only in text, but in ToC it's still "Chapter". How can I change chapter title in ToC too?


title: Including Bitmap (.bmp)

text: I can't include bitmaps with pdflatex. Here is my mwe:               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[turkish]{babel}     \addto\extrasturkish{\uccode`i=\string"9D \lccode`I=\string"19 }     \addto\noextrasturkish{\uccode`i=`I \lccode`I=`i }               \usepackage{graphicx}          \begin{document}          \shorthandoff{=}      \includegraphics[width=5cm,height=5cm]{000.bmp}     \end{document}      Gives the error `Unknown graphics extension: .bmp.`


title: Complex nomenclature entries in LyX

text: When I try to make a particularly complex nomenclature entry - in particular, inserting curly braces, and in specific, `$E_{\left(A_i|B_I\right)}$` \- the result simply doesn't appear in when the nomenclature entry later in the document. Everything else works fine - subscripts included, it's just the braces that seem to be broken.


title: "Killmargins" package?

text: Editors such as "Gummi" show a split-screen with the LaTeX source code on the left, and a preview of the later document on the right. However, having a substantial paper margin makes editing more tedious due to the extra scrolling and the fact that the "Fit Page Width" scaling is not suitable when working with small screens. For editing documents with a wide variety of document classes, which are often publisher-dependent, it would be nice to have a simple way of removing the page margin to 1 or 2 millimeters. Is there some package for LaTeX that can read the current page layout settings and modify them accordingly, so that the publisher's layout stays the same? Of course, this could be done by defining the page geometry by hand, but this is relatively tedious as it would have to be done for every style file separately. In principle, shouldn't it be possible to have a package doing that for the user when being included? Surely, the effect can be obtianed using "pdfcrop" or similar tools, but that slows down live preview considerably, not mentioning that some editors (such as "Gummi") do not support customizing the build command. * * * _Edit_ : Here is an example for which tohecz's easy-to-use solution unfortunately does not work due to a "Package geometry Error: \paperheight (0.0pt) too short.":               \documentclass{sig-alternate}      \usepackage[paperwidth=\dimexpr\the\textwidth+2em\relax, hmargin=1em]{geometry}      \begin{document}      Hello World      \end{document}       Without the second line, the TeX code compiles file. The class file can be downloaded from http://acm.org/sigs/publications/sig-alternate.cls


title: How do I determine what items to add to my "restricted-shell-escape" safe list?

text: I am trying to follow the MacTeX-2012 instructions for migrating from (unsafe) `shell-escape` to using "restricted-shell-escape". But it is unclear to me what items to put in the file that specifies the "safe list" for this mode. For example, if I remove `shell-escape` from my command line (or, disable it from the warning dialog in TeXShop), and try to use a package that requires it, like, for example, `auto-pst-pdf` I get an error: **"You need to run LaTeX with the equivalent of "pdflatex -shell-escape" Or turn off auto-pst-pdf."** when processing even the simplest of files:               \documentclass{article}     \usepackage{auto-pst-pdf}     \begin{document}     Test.      \end{document}      I also notice that I get other warnings, even with this simple example, such as **"Package ifplatform Warning: Shell escape is disabled, so I can only detect \ifwindows"** and wonder if there is a way to avoid these, and the corresponding loss of functionality using "restricted-shell-escape" -- or at least find out what I'm missing without scanning the log. What items do I need to add to my `texmf.cnf` to get `auto-pst-pdf` to work without enabling `shell-escape`? How, in general, do I determine what items should be in this list? Are there some things that will _only_ work with the `shell-scape` flag, and not with "restricted-shell-escape"; how can I determine what those are? * * * The (local) `texmf.cnf` file:               shell_escape_commands = bibtex,bibtex8,kpsewhich,makeindex,mpost,repstopdf


title: Are there an easy way to coloring tables depending on the value in each cell?

text: I viewed in this post Conditional format for correlation table a solution to my question, but... ![enter image description here](http://i.stack.imgur.com/KQxiE.png) Are there any easier way (or alternative) to do this using colors? Thank you. \------------------ edited after showed than it´s duplicate ------------- I think that there are many sols, but for example this is easy using a normal table without pgf... the Unas answer is interesting I´m trying to adapt to similar colors to apply to the table probabilitiess


title: arara: show warnings only in the last compilation step

text: I use this function to compile my latex documents in gVim with arara:               function! CompileTex()         silent write!         call setqflist([])         echon "compiling with arara ..."         exec "lcd %:h"         setlocal makeprg=arara\ -v\ %         silent make!              if !empty(getqflist())             copen             wincmd J         else             cclose             redraw             echon "successfully compiled"         endif     endfunction      And have the following mapping to call it:               nnoremap <buffer> <F6> :call CompileTex()<CR>      I use Latex-Box in order to parse and filter the tex build output nicely. Everything works fine (arara is really awesome) but there is one thing that I would like to know if it can be improved. Suppose I have the following document:               \documentclass{article}          % arara: pdflatex: {synctex: yes, action: nonstopmode, options: "-file-line-error-style"}     % arara: bibtex     % arara: pdflatex: {synctex: yes, action: nonstopmode, options: "-file-line-error-style"}     % arara: pdflatex: {synctex: yes, action: nonstopmode, options: "-file-line-error-style"}          \begin{document}          \section{Foo}     \label{sec:foo}     \ref{sec:foo}          \end{document}      As you can see in the image, when I compile the document the quickfix window (showing errors and warnings) shows the warning of the first call to the compiler (which goes away after compiling again). Is there some way to tell arara to ignore warnings until the last call?![enter image description here](http://i.stack.imgur.com/BIwZw.jpg). Note: i) I know I can just add one directive and avoid the problem but this is just a MWE of what happens in larger documents. ii) If this question doesn't belong here please delete it (I actually posted it in arara's github issues but received no answer yet). **Edit:** I would (also) like to know if the compilation time can be reduced by telling arara to run pdftex only once and only perform successive runs if they are really needed (for instance to correct cross-references).


title: Good gray font: Do metafont proofs have to look this bad?

text: The old `gray` seen in this question about gray.tfm has ... issues. **shrink factor 8** : ![gray-sf8.png](http://i.stack.imgur.com/e9cY4.png) **shrink factor 9** : ![gray-sf9.png](http://i.stack.imgur.com/fTob3.png) So, even when using shrink factor 8, which given the 4x4 pixel pattern used for pixels in `grayf.mf` seems like it should put 2x2 proof pixels on one display pixel, something goes wrong and we get rows of missing pixels, and when we use an unrelated shrink factor we get something much worse :-( What gray font / xdvi flags should I use to get my metafont proofs to render correctly?


title: How do I get what's been printed by {align}?

text: I was trying to figure out an automatic answer to Sharing alignment between equations in two different items by way of typesetting an `{align}` inside a `\vbox` and then using `\unvbox` and `\lastbox` repeatedly to get the lines of the alignment. Alas, this does not work, as this session with `latex` shows:               >latex     **\relax     *\documentclass{article}\usepackage{amsmath}\begin{document}          *\setbox0=\vbox{\begin{align*} a&=b \end{align*}}          *\tracingonline=1          *\showbox0     > \box0= []          ! OK.     <*> \showbox0          ?           *          *\unvbox0          *\unskip          *\setbox1=\lastbox          *\showbox1     > \box1=void          ! OK.     <*> \showbox1          ?       How can there be _nothing_ in the box? Doesn't TeX typeset something? This is surely a mathmode thing, except that the following _does_ work:               > tex     **\relax          *\setbox0=\vbox{$$\eqalign{a&=b}$$}          *\tracingonline=1          *\showbox0     > \box0=     \vbox(22.5+0.0)x469.75499     .\hbox(0.0+0.0)x469.75499, glue set 449.75499fil     ..\hbox(0.0+0.0)x20.0     ..\penalty 10000     ..\glue(\parfillskip) 0.0 plus 1.0fil     ..\glue(\rightskip) 0.0     .\penalty 10000     .\glue(\abovedisplayshortskip) 0.0 plus 3.0     .\glue(\baselineskip) 3.5     .\hbox(8.5+3.5)x26.24402, shifted 221.7555     ..\hbox(0.0+0.0)x0.0     ..\glue 1.66663     ..\vbox(8.5+3.5)x22.91077     ...\hbox(8.5+3.5)x22.91077 []     ..\glue 1.66663     .etc.          ! OK.     <*> \showbox0          ?           *      (`\eqalign` is the TeX version of `{align}`, to some extent). Perhaps it is more that the AMS environments do what the TikZ documentation refers to as "wicked things", but I don't see how they could trick TeX itself into thinking the box were empty. I do notice that even in the `\eqalign` example, the innermost box of the alignment is `\hbox(8.5+3.5)x22.91077 []`; going by the dimensions `\hbox(0.0+0.0)x469.75499, glue set 449.75499fil`, this is the text (i.e. `a = b`) but the empty brackets indicate that there is nothing inside the box. So maybe it is a mathmode thing after all and the AMS' wickedness is just hiding the surrounding material as well? So, is there any way to unwrap an `{align}`?


title: Section and newcommand in LaTeX's memoir

text: I want to change the section layout. The section layout should start with an § then the number (which should start with 1 instead of 0.0) and then the name of the section. I have tried to make such a thing by myself:               \documentclass[a4paper, 11pt]{memoir}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     %\usepackage{amsfonts, amssymb, amsmath}     \usepackage{libertine}     \pagestyle{empty}     \usepackage{geometry}     \geometry{a4paper,left=30mm,right=20mm, top=3cm, bottom=2cm}     \setlength{\parindent}{0em}     \newcommand{\titel}{\textbf{\S \vspace{1pt}  \thesection{\textbf{}}} \vspace{1pt}}          \begin{document}     \begin{center}     {\fontsize{38}{40} \selectfont \textbf{Wohnungs -- Mietvertrag}}     \end{center}               \titel{TEST}     \end{document}      If it would work correctly, the sectioning would look like this: **§ 1 TEST**


title: Creating/making a new open/free font (and class for CTAN)?

text: This may be a bit wider question, and may relate to Latex not so directly - so moderators, feel free to move this post elsewhere if more appropriate! Let's say I like Caslon (as being used in a magazine); let's say I scan the text in the magazine with high resolution, and prepare a bitmap image of alphabet table based on the scan. Then, let's say I use this bitmap image as underlay (background) for a software like fontforge, where I'd draw the font vectors "by hand", tracing the bitmap outlines - thereby creating a font. So, several questions here:   * Could such a font be legally released afterwards as free/open? If so,      * what kind of license should be attributed to such a font, so it's considered free/open?      * Are there any open source (Linux) alternatives to `fontforge` as font creation software?     * What would be the procedure - and the preferred font format - so that this font can end up on CTAN?  Now, I have also realised that there is an open font Junicode; and the Garamond_junicode_caslon comparison makes me realize I'd be quite satisfied with it instead of the "real" Caslon I originally fancied. And it is already in CTAN:               $ tlmgr search --global --file junicode     tlmgr: package repository http://mirrors.dotsrc.org/ctan/systems/texlive/tlnet     context-typescripts:       texmf-dist/tex/context/third/typescripts/type-junicode.tex     junicode:       texmf-dist/doc/fonts/junicode/Junicode.pdf       texmf-dist/doc/fonts/junicode/Junicode.tex       texmf-dist/doc/fonts/junicode/License.pdf       texmf-dist/doc/fonts/junicode/License.tex       texmf-dist/doc/fonts/junicode/README       texmf-dist/doc/fonts/junicode/aelfric_job.pdf       texmf-dist/doc/fonts/junicode/aelfric_job.tex       texmf-dist/doc/fonts/junicode/mufi.pdf       texmf-dist/doc/fonts/junicode/mufi.tex       texmf-dist/doc/fonts/junicode/replacements       texmf-dist/fonts/truetype/public/junicode/Junicode-Bold.ttf       texmf-dist/fonts/truetype/public/junicode/Junicode-BoldItalic.ttf       texmf-dist/fonts/truetype/public/junicode/Junicode-Italic.ttf       texmf-dist/fonts/truetype/public/junicode/Junicode-Regular.ttf      ... however, it seems it is distributed as `TTF`, and apparently only ConText (and XeLatex) could use it by default. So, how would I go about creating a package that would allow usage of this font with `(pdf)latex` \-- in the same sense that after installing `tlmgr install palatino`, Palatino can be used via `\usepackage{palatino}`?   * If I'd succeed in making such a package - what would be then the procedure of sharing it through CTAN?  I am aware this is complex matter, which probably cannot be answered in full with a single answer - however, any pointers like links to documentation/tutorials concerning specific parts will be much appreciated!


title: No idea why this error is occurring "Runaway argument? Paragraph ended before \\cventry was complete"

text: \begin{document}     \makecvtitle          \section{Education}     ....     \cventry{2004}{Secondary School}{ABC School}{Cityname}{\textit{94.4/100}}     ...      WriteLatex gives me this error               Runaway argument?     Paragraph ended before \\cventry was complete.     <to be read again>                         \par      l.72       I dont know why this occurrs, If I comment out all the Education \cventry fields, then it compiles properly. But I cant leave the education field blank in my CV, so Please help.


title: How can I use arabic numbering for theorems?

text: I used the `newtheorem` command to create exercises in a book in the following way.               \newtheorem{xca}[theorem]{Problems}      So in the body I use the following command to create a set of exercises,               \begin{xca}\label{ex1.3}{Problems}      The default numbering in this environment is roman. I would like to change it to arabic without having to go through each of the exercises in the book and modifying the enumeration command. Here is a MWE. By creating a MWE, I noted why I was getting roman as oppose to arabic. My question now is whether I can still add something to the definition of `xca` so that enumeration is in Arabic and not in Roman.               \documentclass{cambridge7A}          \newtheorem{theorem}{Theorem}[chapter]               \newtheorem{xca}[theorem]{Problems}          % remove the dot and change default for enumerated lists     \def\makeRRlabeldot#1{\hss\llap{#1}}     \renewcommand\theenumi{{\rm (\roman{enumi})}}     \renewcommand\theenumii{{\rm (\alph{enumii})}}     \renewcommand\theenumiii{{\rm (\arabic{enumiii})}}     \renewcommand\theenumiv{{\rm (\Alph{enumiv})}}               \begin{document}     \begin{xca}\label{ex1.3}{Problems}     \begin{enumerate}     \item Show that it follows from the definition of a field that zero, unit, additive, and multiplicative inverse scalars are all unique.     \end{enumerate}     \end{xca}     \end{document}


title: Theming LaTeX documents

text: I would like to create LaTeX documents with new visual styles that use color, fonts, and header style that differ from the standard Computer Modern style everybody knows. I have been doing my academic work exclusively in LaTeX for a long time now, but I have resisted for using LaTeX for anything else because black-and-white Computer Modern texts scream _academia_. While it is easy to switch article classes, and doing so is well documented, this does not seem to be the case with themes. A Google search easily found me themes for LaTeX slideshow classes, but not for regular articles. What options are there for creating document 'themes' in LaTeX, or where might existing theme collections be found?


title: LaTeX Macro for "code" style, underscore package and hyphenation

text: I'm looking for a way to nicely set code inside my document. I used `\def\code#1{{\texttt{#1}}}`, but it still allows the text to be hyphenated. To prevent that, I tried the advise from Prevent hyphenation and use line break in block of text and tried `\def\code#1{{\mbox{\texttt{#1}}}}`, but then the font size is lost when I write, for example, `T_{\code{FOO}}`. Unfortunately, the `\nohyphens{...}` solution clashed with some other package (as I understand it) and the `\hyphenpenalty 10000` solution produced no changes. While preparing the MWE I found that the hyphenation only happens after underscores. It can't be that hard to get what I want, or is it? Here is an MWE:               \documentclass{article}          \def\code#1{{\texttt{#1}}}     %\def\code#1{{\mbox{\texttt{#1}}}}          \usepackage[strings]{underscore}          \begin{document}          I really like to use \code{assert()}. Still,     \code{assertions_that_should_never_fail_even_if_they_stick_out()}      should not be hyphenated. I know some long words:      pneumonoultramicroscopicsilicovolcanoconiosis,     parastratiosphecomyia stratiosphecomyioides,     pseudopseudohypoparathyroidism,     floccinaucinihilipilification,     subdermatoglyphic,     squirrelled,     abstentious and      rotavator.          Function \code{FOO} runs in time $T_{\code{FOO}}$, not $T_{FOO}$.          \end{document}


title: multiline equation inside \newglossaryentry

text: I want a multiline equation (preferably even centered w.r.t. the appropriate column, since single line equations I already have using [ and ] or $$ $$ aren't centered) in part of the description of \newglossaryentry. So basically I want, centered in the column of the glossary, single-line and multi-line equations. Thanks! P.S. I thought I could get something from this: enter link description here but I couldnt'...               \documentclass[twoside]{amsbook}          \usepackage[colorlinks]{hyperref}              \usepackage[xindy,counter=section,sanitize={name=false},style=index]{glossaries} %[toc]% %\glstoctrue         \usepackage{nomencl}             \makeglossaries %has to be after \usepackage{hyperref}                           %                     \glossarystyle{long3col}                                 %\glossarystyle{super3col}                          \setlength{\glsdescwidth}{0.6\textwidth}                     \setlength{\glspagelistwidth}{0.15\textwidth}                 \newglossaryentry{AffineVariety}                     {                         name=Affine Variety,                         description={Affine varieties are defined to be anything that looks like the set of common zeros of a collection of polynomials. E.g., $A = \mathbb{C}[X]$ is the ring of polynomials in $X$ with complex coefficients. Let $f=X-1 \in A$ and its set of zeros, $Z(\{f\})=\{1\}$ is an example of an affine variety.}                     }                 \newglossaryentry{RemovableSingularity}                     {                         name=Removable Singularity,                         description={Formally, if $U \subset \mathbb{C}$ is an open subset of the complex plane $\mathbb{C}$, and $a \in U$, and $f: U\backslash\{a\} \to \mathbb{C}$ a holmorphic function, then $a$ is a removable singularity for $f$ if there exists a holomorphic function $g: U \to \mathbb{C}$, coinciding with $f$ on $U\backslash\{a\}$. It is said that $f$ is holomorphically extended over $U$ if such a $g$ exists.  A simple example is the function $$f(z) = \frac{\sin(z)}{z}$$ at $z=0$ (even this: \[f(z) = \frac{\sin(z)}{z}\] doesn't center.). The singularity, due to the indeterminate form, can be removed by defining $f(0)=1$, which is the limit of $f$ as $z$ approaches zero.}                     }                 \newglossaryentry{TetrahedralCoordinates}                     {                         name=Tetrahedral Coordinates,                         description={Coordinates useful in plotting projective three-dimensional curves of the form $f(x_0,x_1,x_2,x_3)=0$, which are defined by           %               \begin{minipage}[t][5cm][b]{0,5\textwidth}         %               \ensuremath{         %               $$ {\setlength\arraycolsep{0.2em} \begin{eqnarray} x_0 = 1-z-\sqrt{2}\,x \\  x_1 = 1 - z + \sqrt{2}\,x \\ x_2 = 1+ z+ \sqrt{2}\,y \\ x_3 = 1 + z - \sqrt{2}\,y \end{eqnarray} } $$          %               \end{minipage}         %               }                         }                     }               \makeglossaries                         \begin{document}          Consider the equation     \begin{equation}     e = m * c^2     \end{equation}     in which \gls{AffineVariety} is here, but not here \gls{TetrahedralCoordinates} oh and this \gls{RemovableSingularity}.               \printglossary          \end{document}


title: How to get rid of extra numbered blank page before cover page in LyX?

text: I have a 50 pages document in LyX. For this report I have to add a coverpage before the title with different style and template from the report. This is what I do: I create my coverpage in a separate LyX file and compile it to "cover_page.pdf" At the beginning of my report I insert an "External Material, PDFPages" and put the "cover_page.pdf" there. in LaTeX and LyX options tab I write "pages=-" (Although I am not sure what it does! I suppose if the external material is has multiple pages, without this command just the first page is shown) When I compile the whole thing, My cover page is there before the title but the output PDF file starts with an extra blank page that is numbered (1) also. Is there a way to get rid of this page? Thanks, P.S. Someone has suggested somewhere that the paragraph settings should be on "Default". Mine is on default but still I have this problem. EDIT: I tried the same coverpage with a minimal example, a containing just a title. This is the exported LaTex:               \documentclass[english]{article}     \usepackage[latin9]{inputenc}     \usepackage{pdfpages}     \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     %% A simple dot to overcome graphicx limitations     \newcommand{\lyxdot}{.}     \makeatother     \usepackage{babel}     \begin{document}     \title{\includepdf[pages=-]{Candidature_Coverpage}Title}\maketitle     \end{document}      But the blank page is still there before the coverpage.


title: Parentheses and square brackets contextually in small caps

text: In a book publication I use references in parentheses with an open type font. The references are set in small caps (both letters and numbers):               % xelatex xetex 0.9999 texlive 2013 windows     \documentclass{scrbook}     \usepackage{fontspec}     \setmainfont[Ligatures=TeX,     Numbers=OldStyle,     ]{TeX Gyre Pagella}  % to be replaced by a font which supports small caps brackets     \begin{document}          Text (\textsc{ref.} 1.1) text.          \end{document}      ![enter image description here](http://i.stack.imgur.com/uCE4c.png) I would like the parentheses (round or square) around the reference to be set into small caps contextually. What would be the usual way how to do it in latex? Thank you in advance. Update: The font I use for the publication does support alternate "small caps" brackets, but I still search for a convenient contextual way how to set it so in latex contextually without having to reformat the references: ![enter image description here](http://i.stack.imgur.com/Nxv55.png)


title: TikZ won't let me externalize and halts on error

text: * TeX Live 2013   * I am using pdflatex   * TeXstudio 2.7.0   * Win 7 64 bit   * Taken from the `.log` file, via `\listfiles`: `tikz.sty 2013/12/13 v3.0.0 (rcs-revision 1.142)` This... ## MWE               \documentclass[     a4paper     ]{scrartcl}          \usepackage{     newtxtext,     amsmath,     }     \usepackage[T1]{fontenc}          \usepackage{tikz}     \usetikzlibrary{         external,         calc,trees,shadows,positioning,arrows,chains,         decorations.pathreplacing,         decorations.pathmorphing,         decorations.shapes,         decorations.text,         shapes,         shapes.geometric,         shapes.symbols,         matrix,         patterns,         intersections,         fit     }     \tikzexternalize[shell escape=-shell-escape]     %\tikzexternalize[shell escape=pdflatex -shell-escape] %I used this method as well     \tikzexternalize          \tikzsetexternalprefix{Test/Pictures/}     \tikzsetfigurename{Test01_}          \begin{document}     \begin{center}     \begin{tikzpicture}[font=\sffamily\small]     %     \draw[thick] (0,0) rectangle (25mm, 50mm) node[below,xshift=-12.5mm] {Text.};     %     \end{tikzpicture}     \end{center}     \end{document}      ... leads to: ## Picture: ![enter image description here](http://i.stack.imgur.com/RqAxJ.png) ## File list For the sake of completeness, per percusse's request:               *File List*     scrartcl.cls    2013/12/19 v3.12 KOMA-Script document class (article)     scrkbase.sty    2013/12/19 v3.12 KOMA-Script package (KOMA-Script-dependent bas     ics and keyval usage)      scrbase.sty    2013/12/19 v3.12 KOMA-Script package (KOMA-Script-independent b     asics and keyval usage)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     scrlfile.sty    2013/12/19 v3.12 KOMA-Script package (loading files)     tocbasic.sty    2013/12/19 v3.12 KOMA-Script package (handling toc-files)     scrsize11pt.clo    2013/12/19 v3.12 KOMA-Script font size class option (11pt)     typearea.sty    2013/12/19 v3.12 KOMA-Script package (type area)     newtxtext.sty    2014/03/18 v1.241     fontaxes.sty    2014/03/23 v1.0d Font selection axes      xkeyval.sty    2012/10/14 v2.6b package option processing (HA)      xkeyval.tex    2012/10/14 v2.6b key=value parser (HA)     etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)      fontenc.sty        t1enc.def    2005/09/27 v1.99g Standard LaTeX file     textcomp.sty    2005/09/27 v1.99g Standard LaTeX package       ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file      amsmath.sty    2013/01/14 v2.14 AMS math features      amstext.sty    2000/06/29 v2.01       amsgen.sty    1999/11/30 v2.0       amsbsy.sty    1999/11/29 v1.2d       amsopn.sty    1999/12/14 v2.01 operator names      fontenc.sty        t1enc.def    2005/09/27 v1.99g Standard LaTeX file         tikz.sty    2013/12/13 v3.0.0 (rcs-revision 1.142)          pgf.sty    2013/12/18 v3.0.0 (rcs-revision 1.14)       pgfrcs.sty    2013/12/20 v3.0.0 (rcs-revision 1.28)     everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)       pgfrcs.code.tex      pgfcore.sty    2010/04/11 v3.0.0 (rcs-revision 1.7)     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)       pgfsys.sty    2013/11/30 v3.0.0 (rcs-revision 1.47)       pgfsys.code.tex     pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive      pgfcore.code.tex     pgfcomp-version-0-65.sty    2007/07/03 v3.0.0 (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v3.0.0 (rcs-revision 1.1)       pgffor.sty    2013/12/13 v3.0.0 (rcs-revision 1.25)      pgfkeys.sty          pgfkeys.code.tex      pgfmath.sty          pgfmath.code.tex       pgffor.code.tex         tikz.code.tex     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)       ts1cmr.fd    1999/05/25 v2.5h Standard LaTeX font definitions      t1ntxrx.fd    2012/12/25 v1.0     supp-pdf.mkii     epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf       grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)     kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live        t1qhv.fd    2009/09/25 v1.2 font definition file for T1/qhv


title: Delete an element from a comma delimited list

text: LaTeX's low-level programming is poorly documented and the section on what is called control commands is even more so. LaTeX provides the `\@for` macro. This works by repeatedly assigning list items to a temporary variable: I want to define a list that will include all the greek math letters. The list is defined as follows:               \newcommand{\mathList}{\alpha,\beta,\gamma,                    \delta,\epsilon,\zeta,\theta}      To iterate over the list I have used the `@for` macro. For example the following explodes the list and removes the comma.                  \@for\i:=\mathList\do{%           \ensuremath \i \space          }      How can I define a macro to be able to delete the nth element of the list? I have figured out appending to the list but have not posted it for brevity. I would prefer a TeX or LaTeX solution, although I would also be curious to see how it is done in LaTeX3, so all solutions are welcome. Minimal example for convenience below:               \documentclass[11pt]{article}     \begin{document}     \makeatletter     \let\dotlessi\i     \newcommand*{\mathList}{\alpha,\beta,\gamma,                    \delta,\epsilon,\zeta,\theta, }     \@for\i:=\mathList\do{%       \ensuremath \i \space       }     \let\i\dotlessi     \makeatother     \end{document}


title: how to compile just one equation

text: I am working with WinEdt 6.0 and working with a long document, therefore, some times I would like to compile just one equation and get the pdf output of it, instead of running pdflatex that compiles the whole document. I used to do so with previous versions of WinEdt but don´t findout how to do so with version 6. This saves a lot of time! Thanks


title: All document classes gone in LyX

text: I have somehow managed to lose all my document classes and hence cannot compile anything. I have tried re-configuring and re-installing to no avail. I am on a university computer and cannot edit the program files.


title: Using xypic in Texmacs.

text: **Question:** When I try to "start up" the xypic interactive thing in texmacs, it just writes "Busy..." and never evaluates anything I put in. What am I doing wrong? **Motivation:** I just started to use Texmacs and I find it to be a little bit easier for my purposes. Unfortunately, a lot of what I do uses commutative diagrams and, therefore, \xypic makes my life a whole lot easier. I just cannot find any documentation anywhere on this. (I'm also not sure exactly what to tag this, since there doesn't seem to be any texmacs tags...)


title: Styling a Single Element in a Pgfplotstable

text: According to the manual of `pgfplotstable` it is fairly easy to set the color of a whole row or a whole column of a table. However, I would like to style only one element located in a certain row and column. There is `\pgfplotstablegetelem{<row>}{<col>}\of{<table>}` for accessing table elements. I can style elements determined by their signs: `columns/account1/.style={fonts by sign={}{\color{red}}}`. How can I style 22 in the following example identified by its row-columns- coordinates (colB,2)? This feature makes sense, if I load data from a file with plain data.               \pgfplotstabletypeset[col sep=&,row sep=\\,sci zerofill]{       colA & colB & colC \\       11   & 12   & 13   \\       21   & 22   & 23   \\     }


title: Merge single cells in LyX table without ERT

text: Basically, I want to merge single cells in a LyX table without using ERT (hopefully) to get something similar to: ![Table example](http://i.stack.imgur.com/kl1zI.png) To clarify, cells of Headline 1 and 2 are merged vertically and Headline 3 horizontally. Thank you.


title: Opposite of \ensuremath: ensure that I'm *not* in math mode?

text: I'd like a macro that is the opposite of `\ensuremath`: something like `\ensurenotmath`, which makes sure that its argument is _not_ typeset in math mode. Is there such a macro, or a way to implement it? For my purposes, it would be sufficient to just detect math mode, so I could do something like:               \if\inmathmode         % give sensible error message     \else         % do the usual thing     \fi      Any ideas? (Alternatively: I tried `\show\ensuremath` to see how it works, but it's protected. How can I use `\show` on such a macro?)


title: Problem with \usepackage{standalone} in standalone file in new TeX Live distribution

text: I have ONE standard file that I use in ALL my files including the standalone files. This method was working fine until today, when I updated my texlive distribution using `sudo /usr/texbin/tlmgr update --all` command. Once this completed, I got the following error `Extra \fi`. I found that the reason was that the standalone files were including the standalone package. I know I can easily workaround this using `\ifdefined\standalone`, so am posting this here in case others update and have the same problem. Here is the smallest file that reproduces this problem.               \documentclass{standalone}          % Now include my standard packages, which also includes:     \usepackage{standalone}          \begin{document}     foobar     \end{document}      Also the NEW version of standalone package reports: `standalone.cfg 2010/02/28 v0.4` where as the older one reported `standalone.cfg 2010/03/27 v0.3a`, which is dated AFTER the v0.4 version. I suspect that this is just a typo in the new version and should have probably been 2011. **Update:** Ok, now I think that this is problem as I am not able to get a basic main file which includes a standalone file to work without getting the above error. Here is the standalone file (similar to the standalone doc) called `StandaloneProblem.tex`:               \documentclass{standalone}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}          \draw   (0 ,0)  circle  (2) node    [midway]    {Example};     \end{tikzpicture}     \end{document}      and here is the main file:               \documentclass{article}           \usepackage{standalone} % Load all packages needed for all sub−files :     \usepackage{tikz}          \begin{document}         \begin{figure}              \input{StandaloneProblem} \caption{A subfile}         \end{figure}     \end{document}      This gives me the `Extra \fi` error as mentioned above.


title: Package babel Error: No Cyrillic encoding definition files were found

text: On Ubuntu using TeXworks, I get this error when building a document containing Ukrainian characters. Works fine on Windows with MiKTeX. How to resolve it?


title: Are there alternatives to Beamer for slides ?

text: I like Beamer and I use it but I wanted to check if there other classes for slides or presentation purposes to consider seriously when starting to write a presentation.


title: Display of source code in customised (IDE-like) format in PDFLaTeX

text: I want to put some “C” source code snippets in latex (I am using PDFLaTeX), but I don’t get the result that I want using the “listings” package. What ideally would like to get is the same result as the source code is visible in Keil uVision IDE. Here is a sample of what I want to get: ![enter image description here](http://i.stack.imgur.com/GvJvL.png) … and this is what I currently have: ![enter image description here](http://i.stack.imgur.com/NBIWK.png) The uVision IDE is using “Courier New” font at size 10 in…   * normal style for the text (black colour)   * italic style for the comments (green colour)   * bold style for the keywords (black colour)   * normal style for the decimal numbers (purple colour)   * normal style for the brackets (blue colour) If this proves to be quite tough to achieve, another alternative would be to get an all-black text, but with the C-keywords in bold (e.g. “for”, “if”, “void”, “int”, etc.) and the rest of the text in “Courier New” font at size 10 with no spacing. Also, it will be good to be able to edit the “TAB” size to 3 spaces. I will really appreciate any help on that.


title: Weird text when copying from PDF

text: \documentclass[12pt, a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[swedish]{babel}     \usepackage{fullpage}          \begin{document}         åäö     \end{document}      Making a PDF from this creates a document with the text "åäö". Copying that text (OSX 10.9) results in "aa ̈o ̈"


title: External command visibility in Texmaker

text: How commands defined in my shell RC file (e.g. `.bashrc`) can be made visible to Texmaker? Consider the following code:               \begin{tikzpicture}     \begin{axis}     \addplot shell {python -c 'print 0,0'};     \addplot shell {octave -q --eval 'disp([0 0])'};     \end{axis}     \end{tikzpicture}      On my Linux machine, Python is available to all users, but GNU Octave is only added to the path later in my `.bashrc`. Both plots will work if I compile by hand:               $ pdflatex -shell-escape foo.tex      If I try it within Texmaker, only Python is found.


title: Add \centering to all subfigures in subcaption using \g@addto@macro

text: I'm trying to center `subcaption` subfigures as outlined this answer. However, compilation fails with               ! Argument of \subcaption@minipage has an extra }.     <inserted text>                      \par      l.6 \g@addto@macro\subcaption@minipage\centering          ?      Process interrupted by user      Any ideas?               \documentclass{article}          \usepackage{subcaption}          \makeatletter     \g@addto@macro\subcaption@minipage\centering     \makeatother          \begin{document}     \begin{figure}     \begin{minipage}[b]{.5\linewidth}     \large A     \subcaption{A subfigure}\label{fig:1a}     \end{minipage}%     \begin{minipage}[b]{.5\linewidth}     \large B     \subcaption{Another subfigure}\label{fig:1b}     \end{minipage}     \caption{A figure}\label{fig:1}     \end{figure}     \end{document}


title: jurabib style bibliography versus body or footnote

text: I know jurabib isn't today's jam and I should use biblatex. However, biblatex isn't very well integrated with LyX yet, as far as I can tell and Jurabib works quite fine out of the box apart from those changes I would like to achieve:   * the french layout adds spaces before colons and punctuation marks, which is fine generally but not necessarily for citations and _absolutely not for english citation titles_! I guess the code below has some leak that makes babel french mess with the references (both types, body/footnote AND bibliography styles), it treats the citations as normal text is needs to process in (I don't want any spaces to be added although I appreciate the strictly bibliographical processings like 'and' or 'et' for multiple authors). How to prevent bibtex or juralib from adding that extra space in the citations ?   * why does the juralib setup (\jurabibsetup) applies sometimes only to the citation style in the body or footnote (namely titleformat and authorformat), and otherwise only to the bibliography/references part (namely dotafter=bibentry)? Is there a way to tweak this style or do I have to create a new one on my own? (code updated)               %% LyX 2.0.6 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[french]{article}     \begin{filecontents}{file.bib}     @BOOK{Binet2006[1887],       title={Le Magn{\'e}tisme animal : {\'E}tudes sur l'hypnose},       publisher={l'Harmattan},       year={2006 [1887]},       author={Alfred Binet and Charles F{\'e}r{\'e}},       pages={283 pages}     }          @BOOK{Collins1992[1985],       title={Changing Order: Replication and Induction in Scientific Practice},       publisher={University of Chicago Press},       year={1992 [1985]},       author={Harry Collins},       edition={New edition}     }     \end{filecontents}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \setcounter{secnumdepth}{-1}     \setcounter{tocdepth}{2}     \usepackage{babel}     \makeatletter     \addto\extrasfrench{%        \providecommand{\og}{\leavevmode\flqq~}%        \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%     }          \makeatother     \usepackage{jurabib}[2004/01/25]          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \jurabibsetup{     authorformat={allreversed,and},     citefull=first,     dotafter=bibentry,     titleformat={commasep,italic},     }          \makeatother          \begin{document}     \cite{Binet2006[1887]}          \cite{Collins1992[1985]}          \bibliographystyle{jurabib}     \bibliography{file}          \end{document}      Thanks


title: Arrows on number line

text: How do I add arrows to both ends of this number line?               \begin{tikzpicture}     \begin{axis}[       axis y line=none,       axis lines=left,       axis line style={-},       xmin=112.5,       xmax=121.5,       ymin=0,       ymax=1,       xlabel=$\mu$,       scatter/classes={o={mark=*}},       restrict y to domain=0:1,       xtick={113,114,...,121}     ]     \end{axis}     \end{tikzpicture}


title: No available SBL style?

text: Where can I find a link that actually works for the document class/stye/package Society of Biblical Literature (SBL)? AFAIK all related threads in this forum and elsewhere are either broken or the link to the file is dead.


title: Auto-insert "Ref." word before citation

text: I would like to ask if there is an easy way to auto-include a "Ref." word before any of my citations ie if I do               Have a look in \cite{pub1}      then to show up like               Have a look in Ref. [1]


title: count words in latex files with input

text: Hi is there something like `texcount` to count all the words of a latex file including the ones linked by `input` and `include`? Solution for linux as well as for windows are fine for me.


title: Wrong page number in contents

text: I am trying to add a non number chapter in the table of contents. Below are the packages already in use for the complete document.               \documentclass[12pt,twoside,a4paper]{report}     \usepackage[Sonny]{fncychap}     \usepackage{graphicx}     \graphicspath{{Images/}}     \usepackage{caption}     \usepackage{subcaption}     \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead{}     \fancyhead[RO,LE]{xxxxxxx}     \usepackage{amsmath}     \usepackage{hyperref}     \usepackage[export]{adjustbox}     \usepackage{amssymb}     \usepackage{latexsym}     \usepackage{amsthm}     \usepackage{afterpage}     \usepackage{float}     \usepackage[nottoc]{tocbibind}          **% Trying to add bibliography to TOC     \chapter*{Bibliography}     \input{Chapters/Bibliography}     \cleardoublepage     \addcontentsline{toc}{chapter}{Bibliography}**      For the above statement it does not add the chapter, when I use clearpage instead the page number is wrong in TOC. It states the last page of bibliography as the page number in TOC. Kindly suggest me what I could do.


title: How to suppress caption numbering in a table?

text: How can the auto-numbering on table captions be suppressed? For example, I have a table:               \section{Data}     \begin{table}[h]     \setlength{\arrayrulewidth}{1.5px}     \centering     \begin{tabular}{lcccc} \bottomrule      \bottomrule     \end{tabular}     \caption{This is my caption.}     \end{table}      I just want the caption to read `This is my caption.` However, when I compile this code into a PDF file my table is automatically named `Table 1. This is my caption.` I've tried using `\caption*`, to suppress the auto-generated `Table 1.`, but this does not solve my problem. Can anyone help?


title: \tableofcontents[ISSUES]

text: Hello TeX/LaTeX/Beamer colleagues, There is a prob I could not solve. I'm preparing a 2 hours class, so my toc is really heavy. 5 Sections, some of them with several subsections. I already have the following outline at the beginning: OUTLINE 1 Section One 2 Section Two . . . 5 Section Five. However, running the presentation, at the beginning of each section and subsection appears the dense toc. All sections + all subsections.... frightful! What I want is, starting either a section or a subsection, to project a clean viewgraph containing ONLY the current section, highlighting the current subsection and shading the others (subsections of the current section...) Is possible to do that? In advance I thank you very much! Best Physics is love!


title: Reducing R figure sizes in lyx?

text: I am using LyX with the Sweave module to generate some R figures within a document. I can't seem to get the figures to be smaller, and they tend to take up half a page which is far too large. I have tried:                <<echo=F, fig=T, width=0.5, height=0.5>>=      bit it throws an error. Putting any value greater than 1 for width and height make my figure lines thick and font huge but the amount of space it takes up is essentially the same. So is there anyway to make the output figures smaller?


title: tikz sloped lines

text: I would like to draw lines at a specific angle with `tikzpicture`. But it doesn't work the way I think it should. Example:               \documentclass[a4paper,12pt]{article}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}       %\draw [help lines] (-3,-1) grid (9,7);       \coordinate (a) at (0,0) node at (a) {A};       \coordinate (c) at (0,5) node at (c) {C};       \draw (0,0) -- (0:2cm);       \draw (0,0) -- (30:3cm);       \draw (0,5) -- (0:2cm);     \end{tikzpicture}          \end{document}      the two lines from (0,0) does what I want, a line at 0 degrees from (0,0) to (2,0) and a line from the same point at an angle of 30 degrees with the length of 3 cm. The line from point (0,5) does something else. I thought it should be parallel to the first line, that is, from (0,5) to (2,5) (0 degrees angle) but it ends in (2,0). I have been looking in the pgf-manual section 13.1 (page 125). But I think I need something more.


title: Different \section for odd and even pages

text: I would like to make the section titles look different on even and odd pages. I have the following MnWE with the trivial approach. The problem is that you don't know that your section header gets moved to the next page. I even tried to check the oddity of the page number after the section is typeset, but with no success (that is the "After:" text).               \documentclass[a4paper,twoside]{article}          \makeatletter     \let\X@section\section     \def\section#1{%       \ifodd\c@page\relax         \X@section{ODD: #1}%       \else         \X@section{EVEN: #1}%       \fi       \par After:\ifodd\c@page\relax odd\else even\fi \par % <-- for testing purposes     }     \makeatother          \usepackage{lipsum}          \begin{document}          \section{Test section} \lipsum[1]     \section{Test section} \lipsum[1]     \section{Test section} \lipsum[1]     \section{Test section} \lipsum[1]     \section{Test section} \lipsum[1]          \end{document}


title: How to TeX an arrow with vertical stroke?

text: It is really strange, but LaTeX doesn't seem to include any tag for an arrow with vertical stroke (unicode character 21F8), used in mathematics to represent a partial function between sets (as reported in this article from Wiki.en). Do you know any workaround to this? I tried something like               \newcommand{\pto}{\to\hspace{-xyz cm}\shortmid \hspace{xyz cm}}      (for different values of xyz) but the outcome is not very satisfactory. Thank you in advance for any help. P.S.: the symbol should fit in mathematical equations.


title: How to circumvent a late \pagetotal reset to 0pt?

text: Below example demonstrates at the beginning of each paragraph how `\pagetotal` is not always reset to 0pt at the beginning of the page. This appears to interfere with my attempt to automatically clear a `floatingfigure`. What could be a remedy for this?               \documentclass{article}     \usepackage{mwe}          \makeatletter     \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth     \else\Gin@nat@width\fi}     \makeatother     \let\Oldincludegraphics\includegraphics     \renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}          \setlength{\parindent}{0pt}          % begin preamble.tex        \usepackage{calc}     \newlength\vimgflt     \newlength\vposflt     \newlength\vtypesetflt     \newlength\vspaceflt          \usepackage{floatflt}     \renewenvironment{description}{%         \renewcommand{\includegraphics}[1]{\vspace{-1ex}\Oldincludegraphics[width=4cm]{##1}}         \renewcommand{\item}[1][]{             \settototalheight\vimgflt{##1}%             \global\vimgflt=\vimgflt%             ##1%             \end{floatingfigure}%             \the\pagetotal%             \setlength\vposflt\pagetotal%             \global\vposflt=\vposflt%             }%         \clearflt         \hspace{0pt}%         \begin{floatingfigure}[l]{4cm}}%         {}          \newcommand{\clearflt}{         \par         \setlength\vtypesetflt{\dimexpr\pagetotal-\vposflt}         \ifdim \vtypesetflt<\vimgflt \setlength\vspaceflt{\dimexpr\vimgflt-\vtypesetflt+\baselineskip} \else \setlength\vspaceflt{0pt} \fi         \vspace*{\vspaceflt}         }          \let\Oldsection\section     \renewcommand{\section}{\clearflt\Oldsection}     % end preamble.tex          \begin{document}     \blindtext[3]     \section{Section title}     \begin{description}     \itemsep1pt\parskip0pt\parsep0pt     \item[\includegraphics{example-image-a}]     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin.     \end{description}          \section{Section title}     \begin{description}     \itemsep1pt\parskip0pt\parsep0pt     \item[\includegraphics{example-image-b}]     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin.     \end{description}          \section{Section title}     \begin{description}     \itemsep1pt\parskip0pt\parsep0pt     \item[\includegraphics{example-image-c}]     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin.     \end{description}          \blindtext[2]     \end{document}      ![Late \\pagetotal reset to 0pt](http://i.stack.imgur.com/byPZa.png)


title: How remove note frames of beamer presentation's pages count?

text: I am using the `\note` command to insert note frames in a `Beamer` presentation. I would like to remove these notes frames from pages count even when compiling my presentation with notes enable. How can I do that ?


title: mktextfm failed to make igo10.tfm

text: I am using Ubuntu 12.04, and need to install the package at http://www.ctan.org/tex-archive/fonts/igo to compile a document I have received the tex source of. I am trying to follow the instructions at http://www.stat.cmu.edu/~nmv/2012/06/14/managing-latex-packages-manually-in- ubuntu-12-04 , but after unzipping the zip file downloaded from CTAN into ~/texmf/tex/latex , the font auto-generation does not seem to work properly. Here's the excerpt from the compilation detailing the error:               ++++++++++++++++++++++++++++++++++++++++++++++++++++++      ++++++++++++ igo.sty - January 2007 - 0.62 +++++++++++      + A TeX package to manipulate Go games and positions +      ++++++++++++++++++++++++++++++++++++++++++++++++++++++          (/home/kroon/texmf/tex/latex/igo/repeat.tex Loading loop macro, version 0.93)     kpathsea: Running mktextfm igo10     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input igo10     This is METAFONT, Version 2.718281 (TeX Live 2012/Debian)               kpathsea: Running mktexmf igo10     ! I can't find file `igo10'.     <*> ...e:=ljfour; mag:=1; nonstopmode; input igo10          Please type another input file name     ! Emergency stop.     <*> ...e:=ljfour; mag:=1; nonstopmode; input igo10          Transcript written on mfput.log.     grep: igo10.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input igo10' failed to make igo10.tfm.     kpathsea: Appending font creation commands to missfont.log.          ! Font \igo@font=igo10 at 10.0pt not loadable: Metric (TFM) file not found.     <to be read again>                         \global      l.175 \smallgoban          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on talk.log.     make: *** [talk.pdf] Error 1      Here's the relevant section of talk.log:               ++++++++++++++++++++++++++++++++++++++++++++++++++++++     ++++++++++++ igo.sty - January 2007 - 0.62 +++++++++++     + A TeX package to manipulate Go games and positions +     ++++++++++++++++++++++++++++++++++++++++++++++++++++++          (/home/kroon/texmf/tex/latex/igo/repeat.tex Loading loop macro, version 0.93     \REPdepth=\count350     )     \igo@count=\count351     \igo@endwhile=\count352     \igo@fontsize=\count353     \igo@minrow=\count354     \igo@maxrow=\count355     \igo@mincol=\count356     \igo@maxcol=\count357     \igo@box=\box98     \igo@dimen=\dimen315          ! Font \igo@font=igo10 at 10.0pt not loadable: Metric (TFM) file not found.     <to be read again>                        \global     l.175 \smallgoban          Here is how much of TeX's memory you used:      33445 strings out of 495059      754929 string characters out of 3182030      852479 words of memory out of 3000000      36022 multiletter control sequences out of 15000+200000      4245 words of font info for 16 fonts, out of 3000000 for 9000      14 hyphenation exceptions out of 8191      50i,0n,74p,664b,609s stack positions out of 5000i,500n,10000p,200000b,50000s          !  ==> Fatal error occurred, no output PDF file produced!      missfont.log simply contains 13 lines all saying "mktextfm igo10". Finally, mfput.log contains the following:               This is METAFONT, Version 2.718281 (TeX Live 2012/Debian) (base=mf 2012.9.12)  14 NOV 2012 22:19     **\mode=ljfour; mag=1; nonstopmode; input igo10          ! Emergency stop.     <*> \mode=ljfour; mag=1; nonstopmode; input igo10          *** (job aborted, file error in nonstop mode)


title: Convert TeX -> C++/Java -> PDF

text: Recently I've seen LaTeX sources and convinced those are very complicated and difficult for understanding. So my question is: Is that possible to convert LaTeX kernel sources to some widely used language like C++ or Java sources?