I am trying to put 19 * 6 pictures in a figure but it gave me an error saying it is too long. Also there is some letters shown beside the caption which I didn't write and I didn't need it ((a),(b) .. ). Anyone could help me please? Thanks, The code is:               \begin{figure}               \subfloat[FP1]{\includegraphics[width = 1in]{Figures/FP1_1.jpg}}     \subfloat[FP1]{\includegraphics[width = 1in]{Figures/FP1_2.jpg}}     \subfloat[FP1]{\includegraphics[width = 1in]{Figures/FP1_3.jpg}}     \subfloat[FP1]{\includegraphics[width = 1in]{Figures/FP1_4.jpg}}     \subfloat[FP1]{\includegraphics[width = 1in]{Figures/FP1_5.jpg}}     \subfloat[FP1]{\includegraphics[width = 1in]{Figures/FP1_6.jpg}}               \subfloat[FP2]{\includegraphics[width = 1in]{Figures/FP2_1.jpg}}     \subfloat[FP2]{\includegraphics[width = 1in]{Figures/FP2_2.jpg}}     \subfloat[FP2]{\includegraphics[width = 1in]{Figures/FP2_3.jpg}}     \subfloat[FP2]{\includegraphics[width = 1in]{Figures/FP2_4.jpg}}     \subfloat[FP2]{\includegraphics[width = 1in]{Figures/FP2_5.jpg}}     \subfloat[FP2]{\includegraphics[width = 1in]{Figures/FP2_6.jpg}}               \subfloat[F3]{\includegraphics[width = 1in]{Figures/F3_1.jpg}}     \subfloat[F3]{\includegraphics[width = 1in]{Figures/F3_2.jpg}}     \subfloat[F3]{\includegraphics[width = 1in]{Figures/F3_3.jpg}}     \subfloat[F3]{\includegraphics[width = 1in]{Figures/F3_4.jpg}}     \subfloat[F3]{\includegraphics[width = 1in]{Figures/F3_5.jpg}}     \subfloat[F3]{\includegraphics[width = 1in]{Figures/F3_6.jpg}}          \subfloat[F4]{\includegraphics[width = 1in]{Figures/F4_1.jpg}}     \subfloat[F4]{\includegraphics[width = 1in]{Figures/F4_2.jpg}}     \subfloat[F4]{\includegraphics[width = 1in]{Figures/F4_3.jpg}}     \subfloat[F4]{\includegraphics[width = 1in]{Figures/F4_4.jpg}}     \subfloat[F4]{\includegraphics[width = 1in]{Figures/F4_5.jpg}}     \subfloat[F4]{\includegraphics[width = 1in]{Figures/F4_6.jpg}}          \subfloat[C3]{\includegraphics[width = 1in]{Figures/C3_1.jpg}}     \subfloat[C3]{\includegraphics[width = 1in]{Figures/C3_2.jpg}}     \subfloat[C3]{\includegraphics[width = 1in]{Figures/C3_3.jpg}}     \subfloat[C3]{\includegraphics[width = 1in]{Figures/C3_4.jpg}}     \subfloat[C3]{\includegraphics[width = 1in]{Figures/C3_5.jpg}}     \subfloat[C3]{\includegraphics[width = 1in]{Figures/C3_6.jpg}}          \subfloat[C4]{\includegraphics[width = 1in]{Figures/C4_1.jpg}}     \subfloat[C4]{\includegraphics[width = 1in]{Figures/C4_2.jpg}}     \subfloat[C4]{\includegraphics[width = 1in]{Figures/C4_3.jpg}}     \subfloat[C4]{\includegraphics[width = 1in]{Figures/C4_4.jpg}}     \subfloat[C4]{\includegraphics[width = 1in]{Figures/C4_5.jpg}}     \subfloat[C4]{\includegraphics[width = 1in]{Figures/C4_6.jpg}}          \caption{}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/OqOzn.png)


title: How to define an acronym by using other acronym and print the abbreviations together when first used?

text: I am using `acro` package and like it. However, I have the following problem. I would like to define for example "dsDNA" using the acronym of "DNA". When I do that, everything is fine as long as I first use "DNA" in the text (section "good" in the working example). However, if I first use "dsDNA" in the text, "DNA" and "dsDNA" are separately displayed in parentheses as shown below (section "bad" in the working example).               \documentclass{scrbook}          \usepackage[single=true,macros=true,xspace=true]{acro}          \DeclareAcronym{dna}{     short = DNA ,     long = deoxyribonucleic acid     }          \DeclareAcronym{dsdna}{     short = ds\acs{dna} ,     long = double-stranded \ac*{dna}     }          \begin{document}          \section*{good}          \Ac{dna} is a very important molecule.      The virus xyz contains \dsdna.          Apart from that, \dna exists in almost all cells of the body. In most cases it is \dsdna.          \section*{bad}     \acresetall          The virus xyz contains \dsdna.     \Ac{dna} is a very important molecule. Apart from that, \dna exists in almost all cells of the body. In most cases it is \dsdna.               \end{document}      Then it looks like this: ![enter image description here](http://i.stack.imgur.com/tqQdH.png) What I would like to get would be something like this:               The virus xyz contains double-stranded deoxyribonucleic acid (dsDNA).     DNA is a very important molecule.      Apart from that, DNA exists in almost all cells of the body. In most cases it is dsDNA.      Is it possible to achieve this somehow? Using an abbreviation for "double- stranded" doesn't seem feasible to me. In this case I would probably get something like               double-stranded (ds) deoxyribonucleic acid (DNA)      which is not what I want.


title: OpenType/TrueType version of AMS Euler

text: I'm looking for OpenType/TrueType version of AMS Euler. Or a similar, but free, font. Any hints? I've checked https://github.com/khaledhosny/euler-otf - it is too premature to use.


title: Highlighting SI: "invalid-token-in-number"

text: I need to highlight some parts of code containing both text and numbers using the `siunitx`package but I get an `invalid-token-in-number`, the token being a number! Here's my mwe:               \documentclass{article}          \usepackage{soul} % Enables highlighting     \usepackage{siunitx}          \begin{document}              %% Error:          %% siunitx error: "invalid-token-in-number" and "Invalid token '6' in numerical input."             \hl{             Dummy text to avoid SI as very first argument of hl             \SI{666}{\nm}             Dummy text just in case}               \end{document}      Thanks for your help.


title: How to produce multiplication tables/diagram/list using a script

text: I am a math teacher and would like to produce a LaTeX document that generates multiplication tables. I would like the output to be like 1x5=5 2x5=10 etc. Can someone help me out?


title: \left\langle bigger then \Biggl\langle

text: I am putting a graphics inside `\left\langle .. \right\rangle`, as               \left\langle \vcenter{\hbox{\includegraphics[scale=0.05]{images/lhs.pdf}}}\right\rangle_{av}       The problem is, as it seems, for `scale=0.05`, it is using `\\[l/r]angle`'s biggest possible size, and if I try to make the graphics bigger, it is not expanding. I have searched google and stackexchange's older posts, and got this thread, which suggested to use `scalebox`. I tried that, as               \scalebox{2.0}{\left\langle} \vcenter{\hbox{\includegraphics[scale=0.105]{images/lhs.pdf}}}\scalebox{2.0}{\left\langle} {\right\rangle}_{av}      which ends up in a error:               l.113 \end{frame}          ?      ! Extra }, or forgotten \right.     \Gscale@box ...scale@y {#2}\setbox \z@ \hbox {{#3}                                                       }\setbox \tw@ \hbox {\Gsca...     l.113 \end{frame}      `l.113` is the `\end{frame}` of my working frame. So, something is missing. Not Sure. May I get some help? **EDIT** As for example,               \Biggl\langle \vcenter{\hbox{\includegraphics[scale=0.105]{images/lhs.pdf}}}\Biggr\rangle_{av}       gives ![This Picture](http://i.stack.imgur.com/Q2kz1.png)


title: Typesetting: Footnotes in math mode - confusable with exponents?

text: Consider the following text sample:               \documentclass{article}     \usepackage{amsmath}          \begin{document}          The fermion fields consist of two different chiral components, which     are by convention called left- and right-handed. Chiral theories like     the theory of electroweak interaction treat the chiral field     components differently. The most prominent example of this asymmetry     is the right-handed neutrino (or left-handed antineutrino) which, if     assumed massless     \footnote{The observation of neutrino oscillations requires non-zero       neutrino masses. However, the numerical value of these masses is       still unknown.  So far, only upper bounds have been measured,       proving the neutrino masses to be several orders of magnitude       smaller than masses of other fermions.}, does not     couple to any known type of interaction and is hence unobservable.          The complete gauge group of the standard model is     $SU\left(3\right)_{C}\otimes SU\left(2\right)_{T} \footnote{The       \ensuremath{SU\left(2\right)} group is commonly displayed with the index       \ensuremath{L} in the literature. However, to keep consistency with       the choice of \ensuremath{T} for the weak isospin, the latter is       used for identification throughout this thesis.}  \otimes     U\left(1\right)_{Y}$.  From this, particle interactions can be derived.          \end{document}      The footnote in math mode works as expected - maybe apart form the fact that it's a little too far from the right, but I could cope with that with some `\hspace{-1ex}` or alike. What is more of the issue here is that I find that the footnote superscript might be confusing to the reader, since it looks like the expression is being squared instead. While for anybody familiar with the topic, there is no real confusion possible, the whole point of the footnote is clarifying the notation. Hence, I feel a strong desire to achieve a maximum of readability and well-definedness at this particular spot. Any suggestions on how to treat this problem? I wouldn't mind switching to other footnote symbols (like letters), since I don't have that many footnotes - but since almost any thinkable symbol has already been used for mathematical purposes at some point, I don't feel this buys me anything...


title: How to vertical align lines of facing pages

text: It is a good typographic practice* that lines of two facing pages are aligned. Also, the lines at the two sides of a paper should be aligned. How can I achieve this with LaTeX? Especially when having floats. *: Robert Bringhurst, "The elements of typographic style"


title: How can I put the empty subfloat subcaptions to the right?

text: I'm putting two figures above each other with `\subfloat` from the `subfig` package. Their captions are empty as I just want to describe the figures with the main caption, but I still want the `(a)` and `(b)` subcaptions to show up, so that I've got something to refer to. How can I put those tiny subcaptions to the right of the subfloats instead? They're eating my precious vertical space. Here is a minimal working (but not as I'd like to) example:               \documentclass[a4paper,draft]{scrreprt}          \usepackage{graphicx}      \usepackage[margin=1cm]{caption}     \usepackage{subfig}          \begin{document}          \begin{figure}[htb]         \centering         \subfloat[]{%             \includegraphics{pic-1.png}%             \label{label-1}%         }\\%         \subfloat[]{%             \includegraphics{pic-2.png}%             \label{label-2}%         }%         \caption{This is the text that describes \subref{label-1} and \subref{label-2}.}     \end{figure}          \end{document}      ![mwe](http://i.stack.imgur.com/VRHO1.png) I started looking at the `subcaption` package, but it claims to be incompatible with `subfig`.


title: Why shouldn't I use the mathdesign package?

text: I'm not sure, if I read about this topic here on TeX.SX, but I read, that using the `mathdesign` package is discouraged. I guess this is due to suboptimal spacing of the fonts. I created a sample figure, above is a snippet from the `mathdesign` manual, below the same formula typeset with Computer Modern. ![enter image description here](http://i.stack.imgur.com/A3MEV.png) I think that the spacing around the parenthesis and the binary operators is not as good as with Computer Modern. **Can someone summarize the pros and cons of the`mathdesign` package?**


title: Customize legend position in PGFplots axis environment

text: I am trying to customize the position of the legend in the axis environment of PGFplots. A simple way to do this is by using something like               legend pos=south west|south east|north west|north east      in the axis options. If none of the directions suffice, we can use               legend style={at={(0.45,0.5)}}      , again in the axis options. It is, however, a bit annoying and inefficient to get the correct position by trial and error. Furthermore, it is unclear to me where               legend style={at={(0,0)}}      is. It would help me if I would know what coordinates the 'legend pos' command uses. Then I would already know the proper offset from the axis and I would only have to adjust one of the coordinates a bit. Does anybody know how you can retrieve the coordinates that 'legend pos' uses for an axis environment? Thanks in advance! And many thanks to Till Tantau and Christian Feuersanger for TikZ/PGF and PGFplots!


title: Align image next to text

text: The problem is to align an image right to a variable length of text at the top. Here is a minimal example:               \documentclass{minimal}     \usepackage{lipsum}     \begin{document}         \parbox{0.8\textwidth}{\lipsum[1]}%         \qquad%         \parbox{0.1\textwidth}{\rule{1cm}{1cm}}     \end{document}      ![Image next to text](http://i.stack.imgur.com/R7tZy.png) I need the image to be in one line with the first sentence. I know I can individually raise the box. However, I'm searching for a general approach because I have quite a few of these cases in my document.


title: tikz foreach index in variable name

text: I want to have a set of variables holding numerical values (e.g., cnt1, cnt2, cnt3) and access them based on the foreach index. For example:               \foreach \i in {1,...,5} {         \pgfmathtruncatemacro{\cnt\i}{\cnt\i + 4}     }      Is that possible? (edited for clarity) Since it is not still very clear: I want to have a numerical value to a variable with a name that is constructed based on the foreach index, and I want to do numerical operations in this variable (e.g., using pgfmath* commands).


title: How can I reduce the space between the text and the text and the borders of the page?

text: What I have:               |--text--|      What I would like to have:               |-textte-|


title: Mis-alignment of columns in tabular environment when using ulem (and beamer)

text: I have not been able to find a solution to the following problem in the `ulem` documentation. Could somebody help, please? When I use a `ulem` macro to strike through some text in the tabular environment I would like the text to be aligned still. I think the following MWE demonstrates the problem. Many thanks,               \documentclass{beamer}          \usepackage[normalem]{ulem}     \newcommand\tst{ % thick strike through       \bgroup       \markoverwith{\textcolor{red}{\rule[.8ex]{1pt}{0.8pt}}}       \ULon     }          \begin{document}          \begin{frame}  \frametitle{Meeting Times}     \begin{tabular}{llll}     Lecture Hours: & &\tst{{Tue. 17h00}} & \tst{\emph{S117}}\\                    & & Tue. 14h00  & \emph{KB118}\\                    & & Thu. 16h00  & \emph{S117}\\[.5ex]     Tutorials      & \textbf{3B} & Tue. 10h00 & \emph{SR2027} \\                    & \tst{\textbf{3A}} & \tst{Tue. 14h00} & \tst{\emph{KB118}}\\[.5ex]     \end{tabular}     \end{frame}          \end{document}


title: How to create a macro "environmentally-dependent"

text: Yesterday I was reading the `etoolbox` documentation where there are defined some new document commands such as:               \Before<Begin/End>Environment{<envir>}{<code>}     %     \At<Begin/End>Environment{<envir>}{<code>}     %     \After<Begin/End>Environment{<envir>}{<code>}      Which I found very useful in dealing fine-tuning macro expansion inside or outside specific environments. The main question however hit me when I wanted to define a new command, based on the above, that looks like this:               \If<Before/At/After><Begin/End>Environment{<envir>}{<code>}{%      <yes>%     }{%      <no>%     }      The main action of this code is that it checks if a specific control sequence name or macro/code `<code>` appears `<Before/At/After><Begin/End>` the `environment` and then applies the code if it is met the condition stated, and does else otherwise. This can be similar to the standard if-clause conditional very well known inside plain TeX (maybe some TeXpert could put an eye to this macro). The main reason on why it reads the control sequence name it's that if there is some macro behind a specific environment, it doesn't expand its arguments and keeps reading it as a `csname`. So my question can be expressed as: _how this macro can be created? is there some command that simulates its action that I'm not aware of?_ I basically couldn't find any documentation or source even remotely related to this application on macro setting.


title: How to avoid the tiny white line between clipped areas and gobbed line width

text: The is a tiny unwanted white line between blue areas (it is a MWE ;-) ) and the black border line is cut by the clipping line. How to avoid this two problems ? It's not visible on a png image but very annoying on a pdf.               \documentclass[tikz]{standalone}          \begin{document}     \begin{tikzpicture}          \begin{scope}     \clip[rotate=45] (-1,-1) rectangle (0,1) ;     \draw[fill=blue] (0,0) circle (1) ;     \end{scope}          \begin{scope}     \clip[rotate=45] (1,-1) rectangle (0,1) ;     \draw[fill=blue] (0,0) circle (1) ;     \end{scope}               \end{tikzpicture}     \end{document}


title: Beamer: Using href in notes

text: In my example               \documentclass{beamer}     \usepackage{pgfpages}          %\setbeameroption{show notes on second screen}     \setbeameroption{show notes}     \setbeamertemplate{note page}{\insertnote}          \begin{document}     \frame{\href{http://www.google.com}{test frame}\note{\href{http://www.google.com}{test note}}}     \end{document}      the link behind "test note" only works if I use "show notes", if I switch to "show notes on second screen" then the link is not clickable at all. Any ideas or help?


title: Selectable picture environment in PDF

text: I'd like to be able of copy & pasting the results of a `picture` environment in a PDF file to a plain text file. The problem is that once I copy the text the results are unsatisfactory: for example, if the picture consists solely of lines, there's nothing to be selected to begin with. To give you a MWE:               \documentclass{article}     \begin{document}       This is the standard Shogi board:            \bigskip       \setlength{\unitlength}{18pt}       \centering       \begin{picture}(9,9)         \multiput(0,0)(1,0){10}{\line(0,1){9}}         \multiput(0,0)(0,1){10}{\line(1,0){9}}       \end{picture}     \end{document}      The result looks something like: ![The resulting PDF](http://i.stack.imgur.com/z3yiV.png) I'd like the actual board to be selectable, copyable and the resulting pasted text to be something like:               +---+---+---+---+---+---+---+---+---+     |   |   |   |   |   |   |   |   |   |     +---+---+---+---+---+---+---+---+---+     |   |   |   |   |   |   |   |   |   |     +---+---+---+---+---+---+---+---+---+     |   |   |   |   |   |   |   |   |   |     +---+---+---+---+---+---+---+---+---+     |   |   |   |   |   |   |   |   |   |     +---+---+---+---+---+---+---+---+---+     |   |   |   |   |   |   |   |   |   |     +---+---+---+---+---+---+---+---+---+     |   |   |   |   |   |   |   |   |   |     +---+---+---+---+---+---+---+---+---+     |   |   |   |   |   |   |   |   |   |     +---+---+---+---+---+---+---+---+---+     |   |   |   |   |   |   |   |   |   |     +---+---+---+---+---+---+---+---+---+     |   |   |   |   |   |   |   |   |   |     +---+---+---+---+---+---+---+---+---+      I don't pretend the solution to figure this out by itself, but rather allow me to specify what should be the _text_ representation of a `picture` (or an otherwise "graphical") element.


title: Long Underscore to Divide Sections of Text

text: Is there a way to write an underscore that extends along the full length of the page, to represent a break in sections? As of now, I'm using the `\blank{?cm}` command explained in this answer, but with this solution I need to specify the length of the blank manually (so if I change my page size later, I'll have to go back and change all these parameters)...


title: Fit node to another node in a seperate scope that has been shifted and canvas transformed

text: I want to fit a node to another node which is defined in a different scope which has been subject to the options "(x)shift and transform canvas" (see example code and image). Without any canvas or shift operations, the fit works as expected. With the transform canvas option, however, the fit does not work. How can I get the "world coordinates", i.e. the coordinates after all scope modifications have been applied, of a node? ## Code:               \documentclass[a5paper]{article}     \pagenumbering{gobble}          \usepackage{tikz}     \usetikzlibrary{fit}          \usepackage[paperwidth=8cm,paperheight=12cm]{geometry}          \begin{document}          \section*{Without Canvas Transform}          \begin{tikzpicture}         \begin{scope}             \node[ultra thick, draw, blue, minimum width=2cm, circle, xshift=15] (n1) {};         \end{scope}         \begin{scope}             \node[thick, fill opacity=0.3, fill=yellow, draw, inner sep=0, yellow, fit=(n1)] (n2) {};         \end{scope}     \end{tikzpicture}          \section*{With Canvas Transform}     \vspace{10pt}     \begin{tikzpicture}         \begin{scope}[transform canvas={scale=1.5}, xshift=15]             \node[ultra thick, draw, blue, minimum width=2cm, circle] (n1) {};         \end{scope}         \begin{scope}             \node[thick, fill opacity=0.3, fill=yellow, draw, inner sep=0, yellow, fit=(n1)] (n2) {};         \end{scope}     \end{tikzpicture}     \end{document}      ![Fit nodes with and without canvas transformation](http://i.stack.imgur.com/98p3X.jpg)


title: Arrow joining beginning and end of line with xy-pic

text: I'm trying to draw a sequence of arrows with xy-pic that extends over two lines, and so I need to draw an arrow joining the end of the first line with the beginning of the second line. Here's the code I've tried:               \documentclass{amsart}     \usepackage[all]{xy}          \begin{document}          \[     \xymatrix{     \cdots\ar[r] & \mathrm{K}_j(M^{p+1}) \ar[r]^{i^p_j} &\mathrm{K}_j(M^{p})      \ar[r]^{q^p_j} & \mathrm{K}_j(M^{p}/M^{p+1}) \ar`r[d] `d[dl]      `l[ddlll]_{b^p_j} `d[ddll] '[ddll]&\\     & & & &\\     & \mathrm{K}_{j-1}(M^{p+1}) \ar[r]^{i^p_{j-1}} &\mathrm{K}_{j-1}(M^{p})      \ar[r]^{q^p_{-1}} & \mathrm{K}_{j-1}(M^{p}/M^{p+1}) \ar[r] & \cdots     }     \]          \end{document}      This produces the following output, which is almost what I want. ![Arrow](http://i.stack.imgur.com/ili3i.jpg) The problem is that the head of the arrow joining the first and the second line is not positioned correctly. I have a suspicion that this is due to me not understanding the syntax of xy-pic correctly, so I would be glad if someone could point out what I'm doing wrong. **Edit:** I just realized that there is a typo in the above code: I typed an apostrophe instead of a backquote in front of the last target of the relevant arrow. The code should read               \documentclass{amsart}     \usepackage[all]{xy}          \begin{document}          \[     \xymatrix{     \cdots\ar[r] & \mathrm{K}_j(M^{p+1}) \ar[r]^{i^p_j} &\mathrm{K}_j(M^{p})      \ar[r]^{q^p_j} & \mathrm{K}_j(M^{p}/M^{p+1}) \ar`r[d] `d[dl]      `l[ddlll]_{b^p_j} `d[ddll] `[ddll]&\\     & & & &\\     & \mathrm{K}_{j-1}(M^{p+1}) \ar[r]^{i^p_{j-1}} &\mathrm{K}_{j-1}(M^{p})      \ar[r]^{q^p_{-1}} & \mathrm{K}_{j-1}(M^{p}/M^{p+1}) \ar[r] & \cdots     }     \]          \end{document}      which produces the following output. ![Arrow2](http://i.stack.imgur.com/odjj1.jpg) This outcome is unfortunately even worse.


title: enumitem conflict with french babel

text: The following crashes with the error: ! LaTeX Error: Something's wrong--perhaps a missing \item.               \documentclass[]{article}     \usepackage[francais]{babel}     \usepackage{enumitem}     \begin{document}     \begin{itemize}[topsep=20pt]     \item item1     \item item2     \end{itemize}     \end{document}      Works ok with english babel. I tried the option loadonly like in enumitem conflicts with galician but without success. Crashes also with french babel. * * * I found a workaround: use                \begin{enumerate}[topsep=20pt,label=--]      instead of                \begin{itemize}[topsep=20pt]


title: How to change the style of ToC and \chapter?

text: I would like to adapt the style and content of my ToC, but I'ma little bit stuck with the tocloft package ^^ e.g., how to set the horizontal ruler? Do I change the command that is used in the ToC or do I add this in my latex document? (see page 5 "To add a horizontal line across the whole width of the ToC below an entry for a Part:...") _It should look like this:_ **CHAPTER N** **Title of my chapter** * * * N.M Title of my section .......... pagenumber N.M Title of my section .......... pagenumber _Variation:_ Chapter N | **Title of my chapter** * * * N.M Title of my section .......... pagenumber N.M Title of my section .......... pagenumber Additionally, I would like to change the font family of the chapters within the ToC and the document itself, as well. Thank you very much!


title: What under \subsubsection?

text: In a `\subsubsection`, I'm describing a software component, and I have to describe the classes it is composed of. I'm thinking to add some "titles" like "Class 1", "Class 2", but what's the best way to do this? The simple way I know is to put a `\noindent \textbf{myTitle}`, is there a smarter way? Thoses sub-titles don't go in the index, but it is important they are clearly distinguishable


title: Replace Column in PGFPlotstable with lookup values

text: I have a table that has a column of integer values representing atomic numbers. I know of the command: `string replace={---}{\textemdash}` However this is table-wide. I want to match the values in a specific column, and replace it with a lookup value. Either through multiple replace statements (I will only be dealing with a few integers: 1,6,7,8,16 I think are the only possible integers I'll need). Or preferably through some sort of lookup table. Is there a method for this type of substitution. I can rewrite the python script that generates these tables, but they are spread across many locations, and it would be considerable effort to pull together a whole new set of them for this single purpose. I would like to replace the values found in the atomicnum column. I've included a sample csv file below:               atomnum,atomicnum,x,y,z     1,6,0.000001,0.700530,-1.910890 2,6,0.000001,1.438902,-0.717628     3,6,0.000000,0.696419,0.453609 4,6,0.000000,-0.696419,0.453609     5,6,-0.000001,-1.438902,-0.717628 6,6,-0.000001,-0.700530,-1.910890     7,1,0.000001,1.224386,-2.862243 8,1,0.000002,2.524808,-0.733291     9,6,0.000001,-0.786842,1.970076 10,1,0.890609,-1.241092,2.412264     11,6,-0.000001,0.786842,1.970076 12,1,0.890605,1.241095,2.412266     13,1,-0.890609,1.241092,2.412264 14,1,-0.890605,-1.241095,2.412266     15,1,-0.000002,-2.524808,-0.733291 16,1,-0.000001,-1.224386,-2.862243      The table that `pgfplotstable` would "see" would be substituted according a pseudocode array like the following: `temp[] = {1=>"H", 6=>"C", 7=>"N", 8=>"O", 16=>"S"}` The table used and output is then:               atomnum,atomicnum,x,y,z     1,C,0.000001,0.700530,-1.910890     2,C,0.000001,1.438902,-0.717628     3,C,0.000000,0.696419,0.453609     4,C,0.000000,-0.696419,0.453609     5,C,-0.000001,-1.438902,-0.717628     6,C,-0.000001,-0.700530,-1.910890     7,H,0.000001,1.224386,-2.862243     8,H,0.000002,2.524808,-0.733291     9,C,0.000001,-0.786842,1.970076     10,H,0.890609,-1.241092,2.412264     11,C,-0.000001,0.786842,1.970076     12,H,0.890605,1.241095,2.412266     13,H,-0.890609,1.241092,2.412264     14,H,-0.890605,-1.241095,2.412266     15,H,-0.000002,-2.524808,-0.733291     16,H,-0.000001,-1.224386,-2.862243


title: How to prevent unwanted cropping in a tikz picture?

text: I am trying to make a series of engineering drawings with TikZ for an industrial catalogue. I would like to get only the drawings. The following MWE crops the bottom of the picture, and I would like to prevent this.               \documentclass[]{standalone}     \usepackage{tikz}     \usepackage{wasysym}     \usetikzlibrary{arrows}          \begin{document}     \begin{tikzpicture}     \draw [<->, >=triangle 45, thick] (0,0)--(5,0) node[above, midway]{\large \diameter\normalsize {3}};     \end{tikzpicture}     \end{document}


title: Latexdiff "fixes" and config files

text: Latexdiff, while overall very useful, sometimes requires manual fixes to its configuration variables and default options; for instance, excluding the `tikzpicture` environment from the diff algorithm seems necessary, or the default `ARRENV` includes `[pbvBV]matrix` but not `smallmatrix`. Is there a maintained set of configuration files, or at least something better than starting from scratch to build my own list of exceptions?


title: Making the table enumerated

text: I don't know LaTeX very well, and I don't know the proper words in LaTeX commands for my question, so I was going to ask it here.   You know in the problem pages of mathematics books, where they have a question like: >   1. Solve these equations > > (a) eq 1 (b) eq 2 (c) eq 3   >  (d) eq 4 (e) eq 5 (f) eq 6 > > How do you do that in LaTeX? Yes, I have tried searching but Enumerated List and Table is not what I want.   I want it to look like the problem page in a math book. This is the code I came up with:               \begin{enumerate}     %question <<Question 6 page 68 Pure Mathematics 1>>>     \item Solve the following inequalities.        \begin{enumerate}          \begin{tabular}{ l c r }          \item $ \dfrac{1}{3}\left(8x+1 \right) - 2\left(x-3 \right) > 10$ &\item  $\dfrac{5}{2}\left( x+1\right) - 2\left(x-3\right) <7 $ & \item $\dfrac{2x+1}{3} - \dfrac{4x+5}{2} \le 0 $ \\          \item $\dfrac{3x-2}{2} - \dfrac{x-4}{3} < x $ & \item $ \dfrac{x+1}{4} + \dfrac{1}{6} \ge \dfrac{2x-5}{3}$ & \item $\dfrac{x}{2} - \dfrac{3-2x}{5} \le 5$ \\         \end{tabular}       \end{enumerate}     \end{enumerate}


title: Can one determine the first character of a given math list?

text: I'm still pursuing my quest to code a better \widebar command. I can do bars over single characters quite well already, but I have problems when it comes to letter combinations such as `AW`. `\overline{AW}` produces ![output of \\overline{AW}](http://i.stack.imgur.com/IH3SC.png) which doesn't look nice in my opinion: the bar extends too far to the left; it doesn't take the skew of the `A` into account. To correct this, I must be able to find out the first character of the argument of my `\widebar` command. For `AW` this is easy, but I also would like to cover the following arguments:   1. `\mathcal{AW}` or `\mathcal{A}W` (where `\mathcal{A}` is the first character),   2. `\sin x` (where an upright `s` is the first character),   3. `\mathchar"0141` (which is just the character `A` from the standard math font),   4. `\left(a^2+b^2\right)` (where some `(` is the first character). Maybe #4 is too tricky since a large `(` might turn out to be a box and not a character. Of course, fractions and radicals shouldn't come up in the beginning of the argument; personally, I wouldn't want to overline such quantities. So my question is: given a math list that starts with a character, can one find out what that first character is?


title: In Lyx, align text inside a float caption

text: I'm trying to align a legend inside a table caption, so that the colons are vertically aligned. I can do it with the align ambient outside of the caption, but if I use the same code inside the caption the pdf won't compile (I use LuaTeX to compile). I'm using the package caption. EDIT: i want something like this: ![desired output](http://i.stack.imgur.com/tTPAJ.png) for which i've written this code:               \begin{align}     \begin{split}     a : {} & the~first~letter~of~the~alphabet \\     b : {} & the~second~one \\     and : {} & so~on     \end{split}     \end{align}      There might be a more elegant way... but i don't know it. Anyway, I can't do it inside the caption, that's why i'm stuck.


title: Changing scale using TeXgraph

text: I'm using TeXgraph to create figures and stuff, being a bit lazy and not wanting to code everything. I chose to export the code into `tikz` to use with `tikzpicture`. The outcome is great if I don't have to scale anything, but when it comes to scaling, things aren't pretty. I tried the built-in scale option of `tikzpicture` but this does not scale the text so it does not come out right. I then tried using the command `\pgftransformscale`, which got things a little better but it only gave me what I wanted, in terms of scaling when used in par with `\pgflowlevel`. However the placement is wrong and I have no idea how to move it. Here is a short example to see what I mean. First one is the original size, second one a smaller one with a half scale factor               Soit le graphique suivant: \\     % TeXgraph version 1.97     \begin{tikzpicture}%     %\pgflowlevel{\pgftransformscale{0.5}}     \useasboundingbox (-5.5,-5.5)--(5.5,5.5);     %objet6  (Utilisateur)     %objet1  (Grille)     \pgfsetstrokecolor{rgb,1:red,0.7529;green,0.7529;blue,0.7529}     \pgfsetlinewidth{0.4pt}      \pgfsetroundjoin \pgfxyline(0,-5)(0,5)\pgfxyline(0.5,-5)(0.5,5)\pgfxyline(1,-5)    (1,5)\pgfxyline(1.5,-5)(1.5,5)     \pgfxyline(2,-5)(2,5)\pgfxyline(2.5,-5)(2.5,5)\pgfxyline(3,-5)(3,5)\pgfxyline(3.5,-5)(3.5,5)     \pgfxyline(4,-5)(4,5)\pgfxyline(4.5,-5)(4.5,5)\pgfxyline(5,-5)(5,5)\pgfxyline(-0.5,-5)(-0.5,5)     \pgfxyline(-1,-5)(-1,5)\pgfxyline(-1.5,-5)(-1.5,5)\pgfxyline(-2,-5)(-2,5)\pgfxyline(-2.5,-5)(-2.5,5)     \pgfxyline(-3,-5)(-3,5)\pgfxyline(-3.5,-5)(-3.5,5)\pgfxyline(-4,-5)(-4,5)\pgfxyline(-4.5,-5)(-4.5,5)     \pgfxyline(-5,-5)(-5,5)\pgfxyline(-5,0)(5,0)\pgfxyline(-5,0.5)(5,0.5)\pgfxyline(-5,1)(5,1)     \pgfxyline(-5,1.5)(5,1.5)\pgfxyline(-5,2)(5,2)\pgfxyline(-5,2.5)(5,2.5)\pgfxyline(-5,3)(5,3)     \pgfxyline(-5,3.5)(5,3.5)\pgfxyline(-5,4)(5,4)\pgfxyline(-5,4.5)(5,4.5)\pgfxyline(-5,5)(5,5)     \pgfxyline(-5,-0.5)(5,-0.5)\pgfxyline(-5,-1)(5,-1)\pgfxyline(-5,-1.5)(5,-1.5)\pgfxyline(-5,-2)(5,-2)     \pgfxyline(-5,-2.5)(5,-2.5)\pgfxyline(-5,-3)(5,-3)\pgfxyline(-5,-3.5)(5,-3.5)\pgfxyline(-5,-4)(5,-4)     \pgfxyline(-5,-4.5)(5,-4.5)\pgfxyline(-5,-5)(5,-5)     %objet2  (Axes)     \pgfsetstrokecolor{rgb,1:red,0;green,0;blue,0}     \pgfxyline(-5,0)(5,0)\pgfxyline(0,-5)(0,5)     \pgfsetfillcolor{rgb,1:red,0;green,0;blue,0}     \pgfxyline(0,-0.1)(0,0.1)\pgfxyline(1,-0.1)(1,0.1)\pgfxyline(2,-0.1)   (2,0.1)\pgfxyline(3,-0.1)(3,0.1)     \pgfxyline(4,-0.1)(4,0.1)\pgfxyline(5,-0.1)(5,0.1)     \pgfputat{\pgfxy(0.05,-0.2)}{\pgftext[top,left]{\small $0$}}     \pgfputat{\pgfxy(1,-0.2)}{\pgftext[top]{\small $1$}}     \pgfputat{\pgfxy(2,-0.2)}{\pgftext[top]{\small $2$}}     \pgfputat{\pgfxy(3,-0.2)}{\pgftext[top]{\small $3$}}     \pgfputat{\pgfxy(4,-0.2)}{\pgftext[top]{\small $4$}}     \pgfputat{\pgfxy(5,-0.2)}{\pgftext[top]{\small $5$}}     \pgfxyline(-1,-0.1)(-1,0.1)\pgfxyline(-2,-0.1)(-2,0.1)\pgfxyline(-3,-0.1)(-3,0.1)\pgfxyline(-4,-0.1)(-4,0.1)     \pgfxyline(-5,-0.1)(-5,0.1)     \pgfputat{\pgfxy(-1,-0.2)}{\pgftext[top]{\small $-1$}}     \pgfputat{\pgfxy(-2,-0.2)}{\pgftext[top]{\small $-2$}}     \pgfputat{\pgfxy(-3,-0.2)}{\pgftext[top]{\small $-3$}}     \pgfputat{\pgfxy(-4,-0.2)}{\pgftext[top]{\small $-4$}}     \pgfputat{\pgfxy(-5,-0.2)}{\pgftext[top]{\small $-5$}}     \pgfxyline(-0.1,0)(0.1,0)\pgfxyline(-0.1,1)(0.1,1)\pgfxyline(-0.1,2)(0.1,2)\pgfxyline(-0.1,3)(0.1,3)     \pgfxyline(-0.1,4)(0.1,4)\pgfxyline(-0.1,5)(0.1,5)     \pgfputat{\pgfxy(-0.2,0.05)}{\pgftext[right,bottom]{\small $0$}}     \pgfputat{\pgfxy(-0.2,1)}{\pgftext[right]{\small $1$}}     \pgfputat{\pgfxy(-0.2,2)}{\pgftext[right]{\small $2$}}     \pgfputat{\pgfxy(-0.2,3)}{\pgftext[right]{\small $3$}}     \pgfputat{\pgfxy(-0.2,4)}{\pgftext[right]{\small $4$}}     \pgfputat{\pgfxy(-0.2,5)}{\pgftext[right]{\small $5$}}     \pgfxyline(-0.1,-1)(0.1,-1)\pgfxyline(-0.1,-2)(0.1,-2)\pgfxyline(-0.1,-3)(0.1,-3)\pgfxyline(-0.1,-4)(0.1,-4)     \pgfxyline(-0.1,-5)(0.1,-5)     \pgfputat{\pgfxy(-0.2,-1)}{\pgftext[right]{\small $-1$}}     \pgfputat{\pgfxy(-0.2,-2)}{\pgftext[right]{\small $-2$}}     \pgfputat{\pgfxy(-0.2,-3)}{\pgftext[right]{\small $-3$}}     \pgfputat{\pgfxy(-0.2,-4)}{\pgftext[right]{\small $-4$}}     \pgfputat{\pgfxy(-0.2,-5)}{\pgftext[right]{\small $-5$}}     %D4  (Droite)     \pgfxyline(1,-5)(-5,1)     %D5  (Droite)     \pgfxyline(3,5)(-5,-3)     %objet5  (Droite)     \pgfxyline(-4,-5)(2.6667,5)     %bs  (Point(s))     \pgfsetstrokecolor{rgb,1:red,0;green,0;blue,1}     \pgfsetfillcolor{rgb,1:red,0;green,0;blue,1}\pgfellipse[fillstroke]{\pgfxy(0,2)}  {\pgfxy(0,0.0492)}{\pgfxy(-0.0492,0)}     \pgfellipse[fillstroke]{\pgfxy(0,1)}{\pgfxy(0,0.0492)}{\pgfxy(-0.0492,0)}     \pgfellipse[fillstroke]{\pgfxy(0,-4)}{\pgfxy(0,0.0492)}{\pgfxy(-0.0492,0)}     \pgfputat{\pgfxy(-4,1)}{\pgftext{\color{rgb,1:red,0;green,0;blue,0}\small   $D4$}}\pgfstroke     \pgfputat{\pgfxy(-1,1.5)}{\pgftext{\color{rgb,1:red,0;green,0;blue,0}\small $D5$}}\pgfstroke     \pgfputat{\pgfxy(0.5,1)}{\pgftext{\color{rgb,1:red,0;green,0;blue,0}\small   $D6$}}\pgfstroke     \end{tikzpicture}%      And for the scaled one               Soit le graphique suivant: \\     % TeXgraph version 1.97     \begin{tikzpicture}%     \pgflowlevel{\pgftransformscale{0.5}}     \useasboundingbox (-5.5,-5.5)--(5.5,5.5);     %objet6  (Utilisateur)     %objet1  (Grille)     \pgfsetstrokecolor{rgb,1:red,0.7529;green,0.7529;blue,0.7529}     \pgfsetlinewidth{0.4pt}      \pgfsetroundjoin \pgfxyline(0,-5)(0,5)\pgfxyline(0.5,-5)(0.5,5)\pgfxyline(1,-5)    (1,5)\pgfxyline(1.5,-5)(1.5,5)     \pgfxyline(2,-5)(2,5)\pgfxyline(2.5,-5)(2.5,5)\pgfxyline(3,-5)(3,5)\pgfxyline(3.5,-5)(3.5,5)     \pgfxyline(4,-5)(4,5)\pgfxyline(4.5,-5)(4.5,5)\pgfxyline(5,-5)(5,5)\pgfxyline(-0.5,-5)(-0.5,5)     \pgfxyline(-1,-5)(-1,5)\pgfxyline(-1.5,-5)(-1.5,5)\pgfxyline(-2,-5)(-2,5)\pgfxyline(-2.5,-5)(-2.5,5)     \pgfxyline(-3,-5)(-3,5)\pgfxyline(-3.5,-5)(-3.5,5)\pgfxyline(-4,-5)(-4,5)\pgfxyline(-4.5,-5)(-4.5,5)     \pgfxyline(-5,-5)(-5,5)\pgfxyline(-5,0)(5,0)\pgfxyline(-5,0.5)(5,0.5)\pgfxyline(-5,1)(5,1)     \pgfxyline(-5,1.5)(5,1.5)\pgfxyline(-5,2)(5,2)\pgfxyline(-5,2.5)(5,2.5)\pgfxyline(-5,3)(5,3)     \pgfxyline(-5,3.5)(5,3.5)\pgfxyline(-5,4)(5,4)\pgfxyline(-5,4.5)(5,4.5)\pgfxyline(-5,5)(5,5)     \pgfxyline(-5,-0.5)(5,-0.5)\pgfxyline(-5,-1)(5,-1)\pgfxyline(-5,-1.5)(5,-1.5)\pgfxyline(-5,-2)(5,-2)     \pgfxyline(-5,-2.5)(5,-2.5)\pgfxyline(-5,-3)(5,-3)\pgfxyline(-5,-3.5)(5,-3.5)\pgfxyline(-5,-4)(5,-4)     \pgfxyline(-5,-4.5)(5,-4.5)\pgfxyline(-5,-5)(5,-5)     %objet2  (Axes)     \pgfsetstrokecolor{rgb,1:red,0;green,0;blue,0}     \pgfxyline(-5,0)(5,0)\pgfxyline(0,-5)(0,5)     \pgfsetfillcolor{rgb,1:red,0;green,0;blue,0}     \pgfxyline(0,-0.1)(0,0.1)\pgfxyline(1,-0.1)(1,0.1)\pgfxyline(2,-0.1)   (2,0.1)\pgfxyline(3,-0.1)(3,0.1)     \pgfxyline(4,-0.1)(4,0.1)\pgfxyline(5,-0.1)(5,0.1)     \pgfputat{\pgfxy(0.05,-0.2)}{\pgftext[top,left]{\small $0$}}     \pgfputat{\pgfxy(1,-0.2)}{\pgftext[top]{\small $1$}}     \pgfputat{\pgfxy(2,-0.2)}{\pgftext[top]{\small $2$}}     \pgfputat{\pgfxy(3,-0.2)}{\pgftext[top]{\small $3$}}     \pgfputat{\pgfxy(4,-0.2)}{\pgftext[top]{\small $4$}}     \pgfputat{\pgfxy(5,-0.2)}{\pgftext[top]{\small $5$}}     \pgfxyline(-1,-0.1)(-1,0.1)\pgfxyline(-2,-0.1)(-2,0.1)\pgfxyline(-3,-0.1)(-3,0.1)\pgfxyline(-4,-0.1)(-4,0.1)     \pgfxyline(-5,-0.1)(-5,0.1)     \pgfputat{\pgfxy(-1,-0.2)}{\pgftext[top]{\small $-1$}}     \pgfputat{\pgfxy(-2,-0.2)}{\pgftext[top]{\small $-2$}}     \pgfputat{\pgfxy(-3,-0.2)}{\pgftext[top]{\small $-3$}}     \pgfputat{\pgfxy(-4,-0.2)}{\pgftext[top]{\small $-4$}}     \pgfputat{\pgfxy(-5,-0.2)}{\pgftext[top]{\small $-5$}}     \pgfxyline(-0.1,0)(0.1,0)\pgfxyline(-0.1,1)(0.1,1)\pgfxyline(-0.1,2)(0.1,2)\pgfxyline(-0.1,3)(0.1,3)     \pgfxyline(-0.1,4)(0.1,4)\pgfxyline(-0.1,5)(0.1,5)     \pgfputat{\pgfxy(-0.2,0.05)}{\pgftext[right,bottom]{\small $0$}}     \pgfputat{\pgfxy(-0.2,1)}{\pgftext[right]{\small $1$}}     \pgfputat{\pgfxy(-0.2,2)}{\pgftext[right]{\small $2$}}     \pgfputat{\pgfxy(-0.2,3)}{\pgftext[right]{\small $3$}}     \pgfputat{\pgfxy(-0.2,4)}{\pgftext[right]{\small $4$}}     \pgfputat{\pgfxy(-0.2,5)}{\pgftext[right]{\small $5$}}     \pgfxyline(-0.1,-1)(0.1,-1)\pgfxyline(-0.1,-2)(0.1,-2)\pgfxyline(-0.1,-3)(0.1,-3)\pgfxyline(-0.1,-4)(0.1,-4)     \pgfxyline(-0.1,-5)(0.1,-5)     \pgfputat{\pgfxy(-0.2,-1)}{\pgftext[right]{\small $-1$}}     \pgfputat{\pgfxy(-0.2,-2)}{\pgftext[right]{\small $-2$}}     \pgfputat{\pgfxy(-0.2,-3)}{\pgftext[right]{\small $-3$}}     \pgfputat{\pgfxy(-0.2,-4)}{\pgftext[right]{\small $-4$}}     \pgfputat{\pgfxy(-0.2,-5)}{\pgftext[right]{\small $-5$}}     %D4  (Droite)     \pgfxyline(1,-5)(-5,1)     %D5  (Droite)     \pgfxyline(3,5)(-5,-3)     %objet5  (Droite)     \pgfxyline(-4,-5)(2.6667,5)     %bs  (Point(s))     \pgfsetstrokecolor{rgb,1:red,0;green,0;blue,1}     \pgfsetfillcolor{rgb,1:red,0;green,0;blue,1}\pgfellipse[fillstroke]{\pgfxy(0,2)}  {\pgfxy(0,0.0492)}{\pgfxy(-0.0492,0)}     \pgfellipse[fillstroke]{\pgfxy(0,1)}{\pgfxy(0,0.0492)}{\pgfxy(-0.0492,0)}     \pgfellipse[fillstroke]{\pgfxy(0,-4)}{\pgfxy(0,0.0492)}{\pgfxy(-0.0492,0)}     \pgfputat{\pgfxy(-4,1)}{\pgftext{\color{rgb,1:red,0;green,0;blue,0}\small   $D4$}}\pgfstroke     \pgfputat{\pgfxy(-1,1.5)}{\pgftext{\color{rgb,1:red,0;green,0;blue,0}\small $D5$}}\pgfstroke     \pgfputat{\pgfxy(0.5,1)}{\pgftext{\color{rgb,1:red,0;green,0;blue,0}\small   $D6$}}\pgfstroke     \end{tikzpicture}%      I'd like to know if there would be a way to move the rendered object, or another way of scaling that would do it by itself.


title: Increasing the text size in tufte documents

text: I have typeset my lecture notes using the tufte latex style. The notes are around 60 pages long. This year I have a few students who require notes where the text size is larger than the default - I'd imagine 14pt or 16pt. I don't really won't to have two sets of notes, since it would be far to easy to get them out of sync.   1. What's the best way of tackling this problem?   2. What latex style classes are best suited when dramatically changing the text size?


title: Where are my latex fonts (linux)

text: I am pretty sure this question was already asked but I cannot find it. I am using ubuntu and would like to know where are the font files I am using when I compile a latex document? I looked at them using my PDF reader (okular) but it does not tell me where the original file is and moreover, the name are strange, for example: WMZQAI+CMR12. I would like to use these fonts in gnuplot without downloading anything and just use the ones that are on my computer. Thanks


title: How to add another row of tick labels?

text: Rather than adding a second x axis by putting it on the other side of the plot I would like to add one implicitly simply by adding another row of tick labels to an existing axis. What I am after is something like the following mockup: ![Mockup of a plot with an extra row of x axis tick labels](http://i.stack.imgur.com/uSKlo.png) Using the idea in this answer I have tried to come up with something like this but there are some problems and maybe there is a better approach to the issue? ![My failed attempt of reproducing the mockup](http://i.stack.imgur.com/nTIi2.png)               \documentclass{article}          \usepackage{pgfplots}          \pgfplotsset{           domain=0:1,           xmin=0, xmax=1,           ymax=1, ymin=0         }          \begin{document}          \begin{figure}       \begin{tikzpicture}         \begin{axis}[xtick align=inside,           extra x ticks={0.2, 0.4, ..., 0.8},           extra x tick labels={0.33, 0.33, 0.33, 0.33},           every extra x tick/.style={             xtick align=outside,           },           xlabel=\(x_1\),           after end axis/.code={             \node  at (rel axis cs:1,0) [anchor=south west, align=left] {\(x_2\)};           }           ]           \addplot{x};         \end{axis}       \end{tikzpicture}     \end{figure}          \end{document}


title: How do I use circuitikz package in TikzEdt?

text: I'm using TikzEdt and I'm currently using the circuits.ee.IEC tikz library. As far as I'm aware, there is no variable capacitor component. However, there is a tex package called circuitikz that does but I get a compile error when I try to use it either via \usepackage{} or \usetikzlibrary{}. Can I use circuitikz and if so, how do I include the package in TikzEdt? Or Is there another circuits tikzlibrary I can use in TikzEdt?


title: Debugging TikZ and PGFPlots compatibility issue

text: I just tried to compile an old TikZ code (which as far as I recall compiled perfectly in the past and was not changed in the meanwhile) and I faced some serious compilation issues related to TikZ. The last few lines of log are:               Package pgfplots: loading complementary code for your PGF version...          (/usr/local/texlive/2012/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot     soldpgfsupp_misc.code.tex     ! Undefined control sequence.     l.236 ...e\let\pgfutil@next\relax\fi \pgfutil@next                                                       }      Little googling around pointed that the problem might be some incompatibility between TikZ elements on my system. Since, as far as I recall, I didn't change my code and it compiled in the past, I believe that the problem indeed relates to my installation of TikZ. I'm using `MacTeX` on a Snow Leopard Mac OS, and I installed the CVS version of TikZ in my home directory. It seems, however, that `pdflatex` uses the older version of TikZ which is to be found in `/usr/local/texlive/2012`. I don't really know where to start and debug this issue. For the reference the complete log file is here. How can I fix the installation of TikZ? Is it correct behavior that TikZ uses code from both the main installation of `texlive` and from my local installation? If this question fails (and it is I guess a border case) to be valid to TeX.SE, then I hope you can at least point me to sources/places where I can get some help with this.


title: How do I edit a package?

text: I downloaded a package from an article template. The thing is that I want to edit it, but don´t know how to do it.


title: A problem with underfull \hbox in alignment (tabular*) and/or perhaps the calc package

text: I am getting an               underfull \hbox in alignment (badness 10000)      with `tabular*`. The warning goes away if I adjust the table width by 0.00002pt (as per the MWE below). The difference seems to arise from the length calculations with `calc` using `\real` and TeX's fixed point arithmetic. I know that using `tabularx` with an X column is a solution, but a) I want to have complete control over the table and b) the "correction" generally depends on the the current `\linewidth`. This looks like a trap for those, like me, wanting a clean TeX log file. If one follows example 5.3.1 in The LaTeX Companion (nothing against it though!), one may fall into that trap, more so that it isn't easy to reason out such a tiny difference. Should one live with that?               \documentclass{article}     \usepackage{calc}     \begin{document}     \newlength{\MyLen}      \setlength{\MyLen}{(\linewidth*\real{0.5}-\tabcolsep)/3}%     \newlength{\MyLenTwo}   \setlength{\MyLenTwo}{\MyLen*\real{1.3}}     \newlength{\MyLenThree} \setlength{\MyLenThree}{\MyLen*\real{0.7}}     \newlength{\MyLenFour}  \setlength{\MyLenFour}{\linewidth*\real{0.5}-(\MyLen+\MyLenTwo+\MyLenThree+\tabcolsep)}     % \showthe\MylenFour % gives 0.00002pt; if that is not accounted for, TeX barks with an "Underfull \hbox (badness 10000) in alignment..."          \begin{tabular*}{0.5\linewidth-0.00002pt}{p{\the\MyLen}@{}p{\the\MyLenTwo}@{}p{\the\MyLenThree}@{}}     First&Second&Third \\     \end{tabular*}     \end{document}


title: How to put a gigantic number next to the title?

text: Consider the following minimal working example:               \documentclass[reqno]{article}     \usepackage{amsfonts, amsmath, amssymb, amsthm}     \usepackage[T1]{fontenc}          \renewcommand{\sfdefault}{cmbr}          \begin{document}          \begin{flushleft}     Author \\ \vspace{0.5em}     \hrule \vspace{1.5em}     \large{\sffamily{\itshape{Subtitle:}}} \\     \LARGE{\sffamily{\itshape{Title}}} \\     \end{flushleft} \vspace{10em}          Content.          \end{document}      I want to put a large number, say 1.01, next to the title block (title and subtitle). It should be the same height as the title block, in `cmbright` font, and have an adjustable amount of space between the number and the title block. Also, I just noticed that the title and subtitle aren't all the way flush left. Is there any way to fix this? Thanks a lot! EDIT: The number should be to the LEFT of the title block... Sorry I forgot to mention that from the outset.


title: Citation style and arranging references

text: Following is the latex code provided by @Mike Renfro from Putting Serial Numbers in References               \documentclass{article}     \usepackage{filecontents}     \begin{filecontents*}{refs.bib}     @BOOK         {KandR,          AUTHOR  = "Kernighan, Brian W. and Ritchie, Dennis M.",          TITLE   = "{The C Programming Language Second Edition}",          PUBLISHER = "Prentice-Hall, Inc.",          YEAR = 1988     }     \end{filecontents*}     \usepackage[bibstyle=numeric,citestyle=authoryear,backend=bibtex]{biblatex}     \addbibresource{refs.bib}          \defbibenvironment{bibliography}     {\enumerate{}     {\setlength{\leftmargin}{\bibhang}%     \setlength{\itemindent}{-\leftmargin}%     \setlength{\itemsep}{\bibitemsep}%     \setlength{\parsep}{\bibparsep}}}     {\endenumerate}     {\item}          \renewcommand*{\nameyeardelim}{\addcomma\space}          \begin{document}          In 1988 C was totally awesome. \autocite{KandR}          \printbibliography      \end{document}      However in the text at same time if I have to use (Kernighan and Ritchie, 1988) and at some places Kernighan and Ritchie (1988) then what will be the citing style for second scenario. Moreover in references, i also need them to appear like this:   1. Kernighan, B.W. and Ritchie, D.M. The C Programming Lan- guage Second Edition. Prentice-Hall, Inc., 1988. ie last name appearing first and accordingly all refernces are arranged in alphabetically order according to last name of first author. How it can be done. Please help.


title: Print glossaries without title

text: For now I print my glossaries in document using command `\printglossaries` from `glossaries` package. Unfortunately the title of glossaries messes up my document formatting in a way that blank page appears before the title. In documentation I found command `\setglossarysection` which by using in my document as:               \setglossarysection{subsubsection}      fixes the issue of blank page before the glossaries, but the title still remains. What are the possibilities of printing glossaries without the title?


title: cases and spacing between array rows

text: The space between two rows seems to differ if the cases environment is used. Have a look at the following example: ![enter image description here](http://i.stack.imgur.com/gXfI7.png)               \documentclass{minimal}          \begin{document}     \[     \begin{array}{l}     f(x) =%     \begin{dcases}     -1 & x < 0 \\     1 & x > 0     \end{dcases} \\[2em]     g(x) = x \\[2em]     k(x) =%     \begin{dcases}     -1 & x < 0 \\     1 & x > 0     \end{dcases}     \end{array}     \]     \end{document}      I adjust the space between the rows by adding `2em` but it looks different. Does someone has an explanation for it?


title: Frown with arrow

text: I'd like to know if there's a symbol in math mode like `\frown` but with an arrow in its end. Like this: ![enter image description here](http://i.stack.imgur.com/xUS8R.png) (I just love using paint hahaha) Thanks! :)


title: How can a package be listed on CTAN but not be available in Tex Live?

text: Here is a comment by Alan Munn on How soon do all CTAN mirrors update for TeX Live Utility to detect the changes? > Except for during [the freeze period], (i.e., most of the time) TeXLive > updates to packages (not binaries) are available within a day or so of them > being uploaded to CTAN. I submitted my very first package to CTAN earlier this year and my submission was successful: http://www.ctan.org/tex-archive/macros/latex/contrib/matlab- prettifier. I last updated the package in late April 2014. However, to this day, I have never seen my package listed as part of Tex Live 2013: the TeX Live Utility (I'm on Mac OS X) has never listed it under the "Packages" tab. I've now installed and switched to Tex Live 2014, but my package is not listed in there either. Before I bother CTAN or TeX Live people, I'd like your thoughts on this. Does the absence of my package in Tex Live 2014 have to do with the annual freeze period? What am I doing wrong? Under what circumstances can a package be listed on the CTAN site but not be available in Tex Live? * * * **Update** : `matlab-prettifier` is now available in TeX Live 2014.


title: ModernCV Remove horizontal line in sections

text: I want to write my cv with `moderncv-Classic` style. Can you tell me, how I can remove the horizontal line in the left of each section?


title: Redefine @ for tabular inter-column specification within \makeatletter \makeatother

text: I need to use a `tabular` with a @ inter-column specification within a `\makeatletter` and `\makeatother` environment. I. e. I something like               \makeatletter     %code that uses @ as letter     \begin{tabular}{c@{}c}     %code that uses @ as letter     \end{tabular}     %more code that uses @ as letter     \makeatother      Is there any alternative to the @-character in the tabular definition. For example the `\\\` sequence can be substituted by `\tabularnewline` if necessary. Is there something similar for the @. And as I am already asking, does an alternative for `&` (in tabulars) exists, too? Amendment from 21.06.2014: I found a working solution myself. This is my code now:               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{myarticle}[2014/06/18 My article]          \ProcessOptions\relax          \LoadClass[paper=a4,fontsize=10pt,ngerman,hyperref,draft]{scrartcl}          \RequirePackage[T1]{fontenc}     \RequirePackage{lmodern}     \RequirePackage{textcomp} % required to get special symbols     \RequirePackage[utf8]{inputenc}     \RequirePackage[final]{microtype}     \RequirePackage{babel}     \RequirePackage[final]{graphicx}     \RequirePackage{booktabs}          \makeatletter          \def\@maketitle{%     \newpage\null\noindent%     \setlength{\tabcolsep}{0pt}%     \begin{tabular}[t]{lr}%     \begin{minipage}[t]{.75\textwidth}%     \sffamily     \Huge\@title\par%     \vskip.5ex%     \Large\@date\par%     \end{minipage}%     &%     \begin{minipage}[t]{.25\textwidth}%     \raggedleft\footnotesize     \includegraphics[width=\textwidth]{logo.pdf}\par%     \vskip.5\baselineskip%     Company Name\par%     \vskip.5\baselineskip%     Street and Number\par%     Postal code and Town\par%     \end{minipage}%     \end{tabular}%     \par     }          \makeatother      Originally, I did not have the line               \setlength{\tabcolsep}{0pt}      but tried               \begin{tabular}[t]{l@{}r}%      instead to supress the inter-column spacing. The latter results into non- compiling code. So my guess was that the `@` notation interferes with the `\makeatletter` command.


title: Inconsistent TikZ multipart node anchors

text: In the following example, why aren't the node anchors placed consistently?               \input tikz     \usetikzlibrary{arrows,shapes.multipart}     \tikzset{       font=\tt, >= stealth, every picture/.style={thick}, pointer/.style={*->},       box/.style={draw, inner sep=2ex, fill=black!10, rounded corners,         rectangle, rectangle split, rectangle split parts=2,         rectangle split ignore empty parts=false, rectangle split horizontal}}     \tikzpicture[every node/.append style={at end}]       \node[box] (1) {};       \draw[pointer] (1.text) -- +(0,-1) node[anchor=north,box] (2) {};       \draw[pointer] (2.text) -- +(0,-1) node[anchor=north] {1};       \draw[pointer] (2.two) -- +(0,-1) node[anchor=north] {2};       \draw[pointer] (1.two) -- +(1,0) node[anchor=base west,box] (3) {};       \draw[pointer] (3.text) -- +(0,-1) node[anchor=north] {3};       \draw[pointer] (3.two) -- +(0,-1) node[anchor=north] {4};     \endtikzpicture     \bye      ![enter image description here](http://i.stack.imgur.com/kMO5h.png) Ideally, I'd like the black dots to be exactly in the center.


title: etoolbox: environment hooks in boolean switch

text: What did I wrong, that the following does not work here: _(Edit: I mixed up the true and false parts, but I don't want to change the code, because the answers refer to this in a way confusing one.)_               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{xcolor}          \usepackage{fancyvrb}       \DefineVerbatimEnvironment{ExampleVerbatim}{Verbatim}%         {fontsize=\small,formatcom=\color{blue},commandchars=\\\{\}}          \usepackage{setspace}       \doublespacing          \usepackage{etoolbox}       \newbool{tightspace}       \setbool{tightspace}{false}     %----------------------------%     \ifbool{tightspace}{% true part empty - should do nothing     }{% false part:       \BeforeBeginEnvironment{ExampleVerbatim}{\begin{spacing}{0.9}}%       \AfterEndEnvironment{ExampleVerbatim}{\end{spacing}}%     }          \usepackage{lipsum}          \begin{document}          \lipsum[1]          \begingroup     \setbool{tightspace}{true}     \begin{ExampleVerbatim}     Because of \textcolor{black}{\itshape{\textbackslash}setbool\{tightspace\}\{true\}}     the line spacing should be very narrow ...     Don't wonder at \textcolor{red}{the missing line breaks:}     \lipsum[2]     \end{ExampleVerbatim}     \endgroup          \begin{ExampleVerbatim}     And now, with \textcolor{black}{\itshape{\textbackslash}setbool\{tightspace\}\{false\}},     it should have \textcolor{red}{the document's line stretch ...}     \lipsum[3]     \end{ExampleVerbatim}          \lipsum[4]          \end{document}      It seem's, that the boolean switch has no effect – or is there another thing I didn't realize?


title: TikZ Grid Without Edges

text: I have a TikZ grid               \draw[step=0.5cm,color=gray] (0,0) grid (3.5,3.5);      But I'd like to draw the grid without edges, or with half of the edges cells missing, so that it appears to be a small section of a larger, infinite grid. What's the best way to achieve this?


title: Best way to draw a quantum harmonic oscillator?

text: I'm writing up my notes from my photonics lectures, in LaTeX. Both so I can make sense of the notes, and so I can learn some LaTeX. To be frank doing it in LaTeX is quite a motivating reason to go through them! The issue is, I need draw a quantum harmonics oscillator that appears like so: ![enter image description here](http://i.stack.imgur.com/QZdim.png) This is what I have so far: ![enter image description here](http://i.stack.imgur.com/hcVhq.png) **I'd like more control over the parabola** so I can eventually make it larger and change the aspect ratio I've gotten where I am by guess work. As well **I'd like to _draw the wavefunctions_ and put them outside of the parabola with arrows (i.e. pins)** but I'm not sure what the best way to draw the wave functions is. How can I draw them? They only need to be sin/cos functions. Here is what I have so far:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}         \draw[->] (-0.5,-2) -- (-0.5,0.5);         \draw (-2.69,-0.5) -- (2.5,-0.5) node[right] {E2};         \draw (-2.25,-1) -- (2.5,-1) node[right] {E1};             \draw (-1.75,-1.5) -- (2.5,-1.5) node[right] {E0};         \draw (-3,0) parabola[parabola height=-2cm] (2,0);     \end{tikzpicture}     \end{document}      I'll warn you I have tried drawing from functions (brought in through gnuplot), and it's never seemed to work, so if that's your answer be prepared for a thorough explanation! * * * # Edit the First I now have this code               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \draw[->] (0,0) -- (0,4.5);          \def\lzero{(3,0.4) cos (4,0.6) sin (5,0.8) cos (6,0.6) sin (7,0.4)};     \fill[blue,opacity=0.2] \lzero;     \draw[blue!75!black] \lzero node[right,black] {$\Psi_0(x)$ \textendash ~Even};     \draw (-0.632,0.4) -- (2,0.4) node[right] {$E_0$};          \def\lone{(3,1.5) cos (3.66,1.4) sin (4.33,1.3) cos (5,1.5) sin (5.66,1.7) cos (6.33,1.6) sin (7,1.5)};     \fill[red,opacity=0.2] \lone;     \draw[red!75!black] \lone node[right,black] {$\Psi_1(x)$ \textendash ~Odd};     \draw (-1.224,1.5) -- (2,1.5) node[right] {$E_1$};          \def\ltwo{(3,2.6) cos (3.5,2.7) sin (4,2.8) cos (4.5,2.6) sin (5,2.4) cos (5.5,2.6) sin (6,2.8) cos (6.5,2.7) sin (7,2.6)};     \fill[green,opacity=0.2] \ltwo;     \draw[green!75!black] \ltwo node[right,black] {$\Psi_2(x)$ \textendash ~Even};     \draw (-1.61,2.6) -- (2,2.6) node[right] {$E_2$};               \draw (0,0) parabola (2,4);     \draw (0,0) parabola (-2,4);     \end{tikzpicture}     \end{document}      Which produces this: ![enter image description here](http://i.stack.imgur.com/vaj7p.png) Now I understand how to draw parabolas better, and how to make the wave functions, I'm much happier.


title: How can I note transformation step?

text: I currently have this: ![enter image description here](http://i.stack.imgur.com/q04j2.png) with this code:               \begin{align}         0     &\stackrel{!}{=} (d_{P,f}^2)'\\               &= -2 x_p + 2x -2y_p f'(x) + \left (f(x)^2 \right )'\\               &\overset{\mathclap{\normalfont\mbox{Chain rule}}}{=} -2 x_p + 2x     -2y_p f'(x) + 2 f(x) \cdot f'(x)               &= -2 x_p + 2x -2y_p (2ax+b) + ((ax^2+bx+c)^2)'     \end{align}      Instead of `\overset{\mathclap{\normalfont\mbox{Chain rule}}}{=}`, I've also tryed `\stackrel{\text{chain rule}}{=}`: ![enter image description here](http://i.stack.imgur.com/rQ52i.png) The best I could come up with is `\overset{\mathclap{\tiny\mbox{chain rule}}}{=}`: ![enter image description here](http://i.stack.imgur.com/uF5nx.png) But it still does not look satisfying. Is it possible to make a line break within "chain rule"? Do you have a better idea for this kind of annotation?


title: Subfigure have problems putting figures in the same line

text: I am using the `IEEEtran` template, two columns. When I want to put 4 figures in the same line (spanning two columns) using the `\subfigure` package, with the width of each figure setting to `0.24\textwidth`, these four figures cannot be placed in the same line. (see below latex code and the resulting figure.)               \begin{figure*}[!t]       \centering       \begin{minipage}[htp]{1\textwidth}       \subfigure[\footnotesize x1.]{         \includegraphics[width=0.24\textwidth]{x1.eps}         \label{fig:x1}       }       \hfill       \subfigure[\footnotesize x2.]{         \includegraphics[width=0.24\textwidth]{x2.eps}         \label{fig:x2}       }       \hfill       \subfigure[\footnotesize x3.]{         \includegraphics[width=0.24\textwidth]{x3.eps}         \label{fig:x3}       }       \hfill       \subfigure[\footnotesize x4.]{         \includegraphics[width=0.24\textwidth]{x4.eps}         \label{fig:x4}       }       \vspace{-0.2cm}        \caption{\footnotesize xxxx.}\label{xxxx}     \end{minipage}     \end{figure*}      ![enter image description here](http://i.stack.imgur.com/QGoVF.jpg) However, when I do not use the `\subfigure` package, 4 figures can be correctly reside in one line. (see below)                  \begin{figure*}[!t]       \centering       \begin{minipage}[htp]{0.24\textwidth}         \centering         \includegraphics[width=1\textwidth]{x1.eps}         \vspace{-0.6cm}%         \caption{\footnotesize x1.}         \label{fig:x1}       %\vspace{-0.2cm}%       \end{minipage}         \centering       \begin{minipage}[htp]{0.24\textwidth}         \centering         \includegraphics[width=1\textwidth]{x2.eps}         \vspace{-0.6cm}%         \caption{\footnotesize x2.}\label{fig:x2}       %\vspace{-0.2cm}%       \end{minipage}        \begin{minipage}[htp]{0.24\textwidth}         \centering         \includegraphics[width=1\textwidth]{x3.eps}         \vspace{-0.6cm}%         \caption{\footnotesize x3.}         \label{fig:x3}       %\vspace{-0.2cm}%       \end{minipage}         \centering       \begin{minipage}[htp]{0.24\textwidth}         \centering         \includegraphics[width=1\textwidth]{x4.eps}         \vspace{-0.6cm}%         \caption{\footnotesize x4.}\label{fig:x4}       %\vspace{-0.2cm}%       \end{minipage}       \vspace{-0.3cm}%     \end{figure*}      ![enter image description here](http://i.stack.imgur.com/xVg2y.jpg) **Why the same width leads to different formats?** **Edit** : I have upload the tex and eps files to here: http://pan.baidu.com/share/link?shareid=1594110695&uk=3776487005, which compose a MWE. Please open that link and click the button as shown in the figure below to download. (The opened page will be in Chinese.) ![enter image description here](http://i.stack.imgur.com/xbh1X.jpg)


title: pgfplots and calculations; without fpu 'dimension too large', with fpu 'Illegal unit of measure (pt inserted)'

text: I'm trying to multiply some numbers that will end up in the legend of a plot. I can't get it to work:   1. If I naively try `\pgfmathmultiply`, I get a `dimension too large` error, with the code in **MWE 1** (see below). I understand this is because TeX doesn't count beyond 18 inch (or so). All right, I need to load `fpu`, as explained in section 36 of the `pgfmanual` (version 2.10).   2. If I pass `/pgf/fpu` to an axis-environment, compilation fails with `Illegal unit of measure (pt inserted)` (with **MWE 2** ). Even if the axis-environment is completely empty. According to " How do I use pgfmathdeclarefunction to create define a new pgf function?", `pgfplots` uses `fpu` internally, so I don't really understand why I can't load it.   3. Maybe I'm using a wrong function, I thought. On page 362 of the PGF-manual, I read _The installation exchanges any routines of the standard math parser with those of the FPU:`\pgfmathadd` will be replaced with `\pgfmathfloatadd` and so on. Furthermore, any number will be parsed with `\pgfmathfloatparsenumber`_. So, if I already have the FPU, maybe I need to use `\pgfmathfloatmultiply` instead? I tried with **MWE 3** , but this time it fails to compile with: _! Package PGF Math Error: Sorry, an internal routine of the floating point unit got an ill-formatted floating point number '1000'. The unreadable part was near '1000'.._. Maybe `\pgfmathmultiply` is not meant to be used by the user, or so. How do I multiply large numbers and show the result in my `pgfplot`? Related yet different questions:   * How do I use pgfmathdeclarefunction to create define a new pgf function?   * How can I avoid the "Dimension too large" error when plotting in newer PGF versions?   * Dimension too large while plotting with pgfplots **MWE 1:**               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.5}     \begin{document}     \begin{tikzpicture}     \begin{axis}[         title={\pgfmathmultiply{1000}{1000}}               ]     \addplot coordinates {(0, 0) (1, 1) (2, 2)};     \end{axis}     \end{tikzpicture}     \end{document}      **MWE 2**               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.5}     \begin{document}     \begin{tikzpicture}     \begin{axis}[/pgf/fpu,         title={\pgfmathmultiply{1000}{1000}}               ]     \addplot coordinates {(0, 0) (1, 1) (2, 2)};     \end{axis}     \end{tikzpicture}     \end{document}      **MWE 3** :               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.5}     \begin{document}     \begin{tikzpicture}     \begin{axis}[         title={\pgfmathfloatmultiply{1000}{1000}}               ]     \addplot coordinates {(0, 0) (1, 1) (2, 2)};     \end{axis}     \end{tikzpicture}     \end{document}


title: "Illegal unit of measure (pt inserted)" using arithmetic in TikZ foreach

text: I am using a `\foreach` loop in TikZ with `\i in {2,3,..,5}` and I'd like to be able to use the value `\i-1`. However, every approach I have tried gives me a `Illegal unit of measure (pt inserted)` error. Below are three minimal examples with my different attempts after reading some answer in this and other forums: With the `evaluate` option:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \node (N1) {N1};     \foreach \i [evaluate=\i as \j using \i-1] in {2,3,..,5}{       % whatever     }     \end{tikzpicture}     \end{document}      With `\pgfmathtruncatemacro`:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \node (N1) {N1};     \foreach \i in {2,3,..,5}{       \pgfmathtruncatemacro{\j}{\i - 1}       % whatever     }     \end{tikzpicture}     \end{document}      With `\pgfmathparse`:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \node (N1) {N1};     \foreach \i in {2,3,..,5}{       \pgfmathparse{\i - 1}       % whatever     }     \end{tikzpicture}     \end{document}      I have seen plenty of similar examples supposed to work, what am I missing? My version of PGF/TikZ (as reported by `\pgfversion`) is 3.0.0. PD: I know that `foreach` supports iterating over two variables at the same time, so I could use `\foreach \i / \j in {2/1, 3/2, 4/3, 5/4}`, but that doesn't scale too well.


title: Beamer: Custom styles for environments

text: In _beamer_ , there are some predefined (colour) styles like _plain_ , _theorem_ , _definition_ and _remark_. My first question is _where can I find the list of these styles?_ and the second one is _how can I create my own style?_ For instance, I want to apply _orange_ colour for remarks.


title: Formatting of Table of Contents

text: I'm using the simple ordinary `\tableofcontents` command to produce a table of contents, and I find that the resulting spacing between the section number and the section title is too small: ![enter image description here](http://i.stack.imgur.com/BKL07.jpg) Can someone tell me how to fix this, please. My documentclass is `memoir`, if that matters.


title: What is the difference between putting macros in a .sty package file vs. simply \input them from another .tex file?

text: If `\input` just "imports the commands from the [target file]" into your new document, then what is the difference between calling a set of commands via `\input{filename}` (where `filename` is some `.tex` document) and creating a package with these commands defined and calling that package via `\usepackage`?


title: Is there an interactive TeX interpreter?

text: Some times I need to check the typesetting - wither I've made a formula right. For such cases I need to have an interactive TeX interpreter -- with no customisations - I just want to check the formula. Maybe You know something like that? By the way - I'm on Kubuntu 11.10


title: Why the placement of \title makes a difference when using amsart with nag?

text: % !TeX program = pdfLaTeX     \RequirePackage[l2tabu,orthodox]{nag}     \documentclass{amsart}     \begin{document}     \title{The $n$-th term}     \maketitle     \end{document}      If the `\title` command is placed after `\begin{document}`, as shown above, then the math mode n is capitalized. It is not capitalized if either `\title` is placed before `\begin{document}` or we do not use the `amsart` document class or the `l2tabu` option of the `nag` package. Why is that, and where should I put the `\title` by best practice?


title: Bringing the nodes of a TikZ decision tree closer to each other vertically

text: I am currently working on creating a decision tree for a journal publication and need to save space. As of right now, my decision tree looks like ![enter image description here](http://i.stack.imgur.com/tDuMA.png) Although this is nice, I would like to "compress" the tree vertically (i.e. bring the nodes closer to each other but vertically). Does anyone know how to do this using TikZ? I've tinkered with a number of settings in the code below... but cannot seem to get anything to work.               \documentclass[letterpaper]{article}     \usepackage{aaai}     \usepackage{tikz}      \usepackage{pgfplots}      \usetikzlibrary{shapes,arrows}          \frenchspacing     \setlength{\pdfpagewidth}{8.5in}     \setlength{\pdfpageheight}{11in}          \tikzstyle{block} = [rectangle, draw, fill=white!20,          text width=6em, text centered, rounded corners, minimum height=1em]     \tikzstyle{line} = [draw, -latex']     \tikzstyle{cloud} = [draw, text centered, ellipse,fill=gray!15, node distance=0cm, text width=3.3em,         minimum height=0.0em]         %begin tree       \begin{center}         \begin{tikzpicture}[node distance =0cm, auto]         % Place nodes         \small         \centering         \node [block] (init) {\scriptsize{history of petty theft?}};         \node [cloud, left of=init, below of=init, node distance=1.5cm] (end1) {\scriptsize{no violent crime}};         \node [block, right of=init, below of=init, node distance=1.5cm] (dec1) {\scriptsize{history of weapon use?}};         \node [cloud, right of=dec1, below of=dec1, node distance=1.5cm] (end2) {\scriptsize{no violent crime}};         \node [block, left of=dec1, below of=dec1, node distance=1.5cm] (dec2) {\scriptsize{history of employment?}};         \node [cloud, left of=dec1, below of=dec2, node distance=1.5cm] (end3) {\scriptsize{no violent crime}};         \node [cloud, right of=dec1, below of=dec2, node distance=1.5cm] (end4) {\scriptsize{violent crime}};         % Draw edges         \path [line] (init) -| node [near start, above] {\scriptsize{yes}} (end1);         \path [line] (init) -| node [near start] {\scriptsize{no}} (dec1);         \path [line] (dec1) -| node [near start, above] {\scriptsize{yes}} (dec2);         \path [line] (dec1) -| node [near start] {\scriptsize{no}} (end2);         \path [line] (dec2) -| node [near start, above] {\scriptsize{yes}} (end3);         \path [line] (dec2) -| node [near start] {\scriptsize{no}} (end4);     \end{tikzpicture}     \end{center}


title: Legend with Markers for Mesh Plot

text: I use a mesh plot with scatter points (2d) where the colors are determined from a third coordinate of the data as described in this question. The legend however should contain the markers of a curve as icon (not that miniature mesh). How can I achieve that? Edit: the problems seems to be with `legend image code` in `line legend` that does not draw correctly with mesh settings. How do I have to modify a custom `legend image code` to simply display the current marker in a fixed color (say black)? My attempt so far               \pgfplotsset{       /pgfplots/pplots legend/.style={       legend image code/.code={            \draw[color=black] (0cm,0cm) to (0.6cm,0cm);         \draw[#1,color=black,mark repeat=1,mark phase=1]           plot coordinates {           (0.3cm,0cm)         };       }}}      failes due to a compile error:               Undefined control sequence. [...] \pgfplotsplothandlermesh@numpoints ->\numcoords


title: Vertical spacing of text changes in a macro depending on input

text: I defined a keynote macro to insert key ideas in my document using `varwidth`. The document is in `\doublespacing` and I have defined `\singlespacing` inside my macro. However, the correct spacing is achieved only for long sentences and not for short text like here. ![Variable spacing](http://i.stack.imgur.com/EthNt.png)               \documentclass{standalone}     \usepackage{setspace,varwidth,lipsum}          \newcommand{\keynote}[1]{%         \begin{varwidth}{4cm}%           {\singlespacing \narrowragged #1}%         \end{varwidth}%     }          \begin{document}       \doublespacing       \hspace{1cm} \keynote{\lipsum[2]}       \hspace{1cm} \keynote{This note explaining a key idea should go to at least two lines.} \hspace{1cm}     \end{document}


title: Suggestions for typewriter font to match Concrete and Euler

text: I'm having fun using a combination of Concrete and Euler in some of my documents. I wonder if anyone has a suggestion about a matching typewriter font? I've been trying Inconsolata (scaled to .97) but it seems a bit heavy (?dark, maybe?) to my very untutored eye. Does anyone have another suggestion?


title: How to check for Lua definitions

text: When there is `\directlua{x = 25}` one can say `\edef\rgf{\directlua{tex.sprint(x)}}`, but when `x` was never created by `\directlua{x = 25}`, `\directlua{tex.sprint(x)}` will fail. Thus something like `\@ifundefined{x}{x undefined}{x defined}` would be nice. How does one "say this in Lua", please?


title: How to get an "approximately proportional to" symbol

text: I've looked everywhere, and there does not seem to be a symbol for this, i.e. a `\propto` with a `\sim` underneath. I've googled ways of combining these two symbols but haven't found anything satisfactory. Anybody know a simple way of achieving this? `\stackrel` and `\utilde` look horrible.


title: Reference different places to the same footnote

text: For example, I want to make footnotes both at Sentence 1 and Sentence 2 (which are on the same page) to the same footnote. Wikipedia's "References" have this effect.


title: One footnote with two marks in the text

text: > **Possible Duplicate:**   >  Reference different places to the same footnote How can I have a single footnote but place the mark for it in multiple places on the page (in fact, in a single table). Assume that `\footnote{}` is used liberally in the rest of the document.


title: why call type 3 font bitmap?

text: I check wiki and it says both are outline fonts which mean there are vector images. The only difference is that Type 3 lacks hints. Or do I just misunderstand what bitmap means?


title: How do I add text to the bottom left of each page?

text: I'd like to add text "`Prepared for Name, Surname`" at the bottom left on each page of the PDF document. Anyone knows how to do it easily?


title: Getting started with Chinese in ConTeXt

text: I am trying to setup a basic document with ConTeXt, but I am having difficulty even getting started. First, I tried the documentation at ConTeXt wiki: Chinese. I tried the sample code on that page:               \enableregime[utf]     \usemodule[chi-00]     \starttext         你好！     \stoptext      That compiled without errors, but displayed an empty document. Next, I tried building a minimal document based on my understanding of the instructions in Chinese in ConTeXt:               \usemodule[chinese]     \usemodule[chi-simplified]     \defineunicodefont [SimChi] [SimplifiedChinese] [chinese]     \definefontsynonym [SimChiLiShuRegular] [gbls] [encoding=gbk]     \definefontsynonym [SimChiLiShuSlanted] [gbls] [encoding=gbk]     \definefontsynonym [SimChiLiShuItalic]  [gbls] [encoding=gbk]     \definefontsynonym [SimChiLiShuBold]    [gbls] [encoding=gbk]     \definefontsynonym [SimChiLiShuBoldSlanted] [gbls] [encoding=gbk]     \definefontsynonym [SimChiLiShuBoldItalic] [gbls] [encoding=gbk]     \starttext         \completecontent         \chapter{你好}             你好     \endtext      I was unsure which compiler this code was for:   * With `context test.tex`, the compiler complained `\defineunicodefont` was an "Undefined control sequence".   * With `texexec --xtx test.tex`, the compiler complained that `\setupunicodefont` was an "Undefined control sequence". Finally, I just ignored all of the documentation about using Chinese and tried to build a minimal working document following ConTeXt wiki: Fonts in XeTeX. With this, I finally have some code that compiles (at least with `texexec --xtx test.tex`):               \mainlanguage[chinese]     \definetypeface[Song][rm][Xserif][Adobe Song Std]     \definetypeface[Heiti][ss][Xsans][Adobe Heiti Std]     \definefont[TitleFont][Song]     \setupbodyfont[Song, 12 pt]     \setuphead[chapter][number=yes, style=Heiti]     \starttext         \chapter{你好}             你好     \stoptext      This code compiles and displays Chinese, but I quickly found some problems:   * `\mainlanguage` is set to `[chinese]`, but the document uses English titles (e.g. "Contents"), rather than Chinese titles (e.g. "目录") and Western-style section numbering (e.g. "1, 1.1"), rather than Chinese-style numbering (e.g. "第一章") and all of the other nice language-specific features described in the Chinese in ConTeXt and ConTeXt up-to-date 1999/7 Chinese documentation.   * When compiling, it ever puts line breaks anywhere, so all sentences run off the page. How can I create a basic Chinese-language document in ConTeXt (preferably using OpenType fonts)? Are tools such as (or similar to) `ctex` or `xecjk` available for ConTeXt?


title: XeLaTeX inserts blank double page compared to pdfLaTeX

text: I've tried recompiling some complex documents meant for pdfLaTeX using XeLaTeX. After a few fixes and `\ifxetex` in the preamble (regarding input, hyperref and font encodings), it went through... but for some reason the newly produced document was 117 pages long instead of the original 115! The reason is that a blank double page (well, blank except for running headers) is inserted between chapter 3 and 4. Obviously, this is something difficult to reproduce - it did not occur between all chapters, and it possibly depends on the height of the last page. Does this resemble some known phenomenon?


title: Setting math fonts in Beamer

text: Is it possible to only change the math font in Beamer with XeLaTeX? The only partial solution I've been about to find is to create a new command:               \renewcommand\mathfamilydefault{\rmdefault}      The above command does essentially what I want, but it also strangely inserts characters (`lmr`) prior to maths. For example,               \mathfamilydefault{${x}_{ij} = -d_{k}/d_{0}$},      yields: ![enter image description here](http://i.stack.imgur.com/IVj8i.png)


title: Reduce white space above TikZ label

text: I'm new to TikZ, and have drawn the following picture,               \documentclass[12pt,a4paper]{article}     \usepackage{tikz}     \usetikzlibrary{trees,arrows}     \begin{document}          \begin{tikzpicture}[every node/.style={draw,shape=circle,inner sep=2pt,fill=black}]         \node [label=above:$a$]{}             child {node[label=above:$b$,label=below:$p\land q$]{}}             child {node[label=above:$c$,label=below:$p\land \lnot q$]{}}     ;     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/x9W5z.png) But there's too much space above the propositional formula on the right, is there any way I can decrease the amount of whitespace to be closer to the amount of whitespace for the labels a, b, c? [edit] Jesse linked me to a way of adjusting the position of the label manually, but a way to align both labels without fine tuning would be nice.


title: How to (quick) redefine the space between section number and section title in ToC

text: Following this post, I could use `titletoc` (which is want I want to do) and completely redefine the format with               \titlecontents{<section>}[<left>]{<above>}               {<before with label>}{<before without label>}               {<filler and page>}[<after>]      as indicated in the `titletoc` documentation, and to place a `\contentslabel{length}` in the field `<before with label>`. ButIi'm absolutely happy with the style and I just want to modify the space. Is there a way to somehow use `\contentslabel{length}` without redefining the whole `\titlecontents` ?


title: How to small capitalize a word in a section title

text: > **Possible Duplicate:**   >  Using \textsc{} within \section{} I tried `\section{abc \textsc{test}}` but it doesn't work. I guess there must be some simple way to do it. Is it impossible? Why devote my question? I don't care if the small cap is bold or not.                \documentclass{article}           \begin{document}           \section{abc \textsc{test}}           the above.           \end{document}


title: Natibib entry without a year - How to insert dots?

text: In my literature directory I have got some sources, where I dont have a year, when it was published. This is why I use {o.J.} as my year. Compiling the whole thing, all my dots are erased. How to show them? Here is an example entry:               @MISC{CMSDef,       author = {{Gabler Wirtschaftslexikon}},       title = {Content Management System (CMS)},       year = {{o.J. }},       note = {Zugriffen am 03.07.2013 {\"u}ber   \url{http://webpage.de/index.html}},       owner = {Me},       timestamp = {2013.05.04}     }      **EDIT1:** How I insert my literature:               \bibliographystyle{chicago-new}     \bibliography{literatur/literatur}       The package I am using:               \usepackage[authoryear]{natbib}      **EDIT 2:** Here is a link to the chicago-new.bst at pastebin: http://pastebin.com/7c8LxVwu **EDIT 3** Deleting purify did not work. I get lots of errors then. The console tells me, the second line is the critical one.               \bibitem[\protect\citeauthoryear{{Blueray-Disc.de}}{{Blueray-Disc.de}}{J.       }a}]{MP4Def}      This is how it looks, when purify is inside:               \bibitem[\protect\citeauthoryear{{Blueray-Disc.de}}{{Blueray-Disc.de}}{oJ       a}]{MP4Def}


title: How to connect figures by arrows in Beamer?

text: In a related post; How to connect Beamer blocks by arrows?, I found this image (latex+beamer): ![enter image description here](http://i.stack.imgur.com/PMatu.png) I would like to do the exact same thing, but replace the 3 blocks by 3 figures. The figures may have different sizes. Any suggestions how I could do that?


title: Using Macro Defined Lists in TikZ/PGFplots

text: I want to be able to use a macro to specify a list (it is a constant list, i.e. will not change throughout the document) and use this macro rather than hard code the list contents in the TikZ/PGFplots for readability. This problem was mentioned in this earlier question about `foreach` loops, but was not the main thrust of that question. Here is a related question on how to maintain consistency with TikZ and pgfplots, and its continuation on the use of a macro as coordinate in pgfplots, but these related to specifying coordinates, and not lists. In the MWE below, Example 1's solution is based on this question on using a macro defined list in a foreach which suggested to not enclose the macro defined list in a curly brace. This works fine for TikZ, so no problem yet. However, in PGFplots things are different. The solution in Example 2 to using a `foreach` is from the above referenced question, and works great as long as I do **not** use a macro for the list, but I would prefer to use a macro here. In Example 3, I can easily use a macro defined list for the `xtick`, but am **not** able use it for `xticklabels`. So, is there a consistent way that I can always define a macro for a list and then use it without having to worry about the context of its use? If not, is there a way to change the definition of the list and/or its use for Examples 2 and 3 that work in those situations.               \documentclass{article}     \usepackage{pgfplots}          \newcommand*{\XTickLocationList}{-2, -1, 1, 2}     \newcommand*{\XTickLabelsList}{a, b, c, d}     \newcommand*{\XTickLocationsAndLabels}{-2/a, -1/b, 1/c, 2/d}          \begin{document}     \begin{tikzpicture}   % Example 1     \draw [->][gray, thin](-3,0) -- (3,0) node[blue, right] {$x$};      \draw [->][gray, thin](0,-3) -- (0,3) node[blue, above] {$y$};          %\foreach \x/\l in {-2/a, -1/b, 1/c, 2/d} { % Works     %\foreach \x/\l in {\XTickLocationsAndLabels} {  % Does not compile     \foreach \x/\l in \XTickLocationsAndLabels {  % Works         \draw [thick, red]             (\x,-2pt) -- (\x,2pt)             node [red, above] {\l};     }     \end{tikzpicture}          \begin{tikzpicture}   % Example 2     \begin{axis}[         minor tick num=0,          axis y line=center,          axis x line=middle,          xmin=-3, xmax=3,          ymin=-3, ymax=3,         xlabel=$x$, ylabel=$y$,         xtick={0},  xticklabels={}         ]          \foreach \x/\l in {-2/a, -1/b, 1/c, 2/d}{ % Works     %\foreach \x/\l {\XTickLocationsAndLabels}  % Does not compile     %\foreach \x/\l \XTickLocationsAndLabels  % Does not compile         \edef\temp{\noexpand\addplot             [mark=none,color=red, thin, samples=2]%             coordinates{ (\x,-0.05) (\x,0.05) }                 node [red, below] {\l};         }         \temp     }           \end{axis}     \end{tikzpicture}          \begin{tikzpicture}    % Example 3     \begin{axis}[         minor tick num=0,          axis y line=center,          axis x line=middle,          xmin=-3, xmax=3,          ymin=-3, ymax=3,         xlabel=$x$, ylabel=$y$,         %xtick={-2, -1, 1, 2}, % Works         %xtick=\XTickLocationList, % Works         xtick={\XTickLocationList}, % Works         xticklabels={a, b, c, d}  % Works         %xticklabels={\XTickLabelsList}  % Compiles, but wrong results         %xticklabels=\XTickLabelsList  % Compiles, but wrong results         ]          \end{axis}     \end{tikzpicture}     \end{document}


title: What is `/utils/exec` and where do I find it's documentation

text: In response to this question on using a conditional to define a TikZ style it was suggested to use `/utils/exec`. It is easy to find uses of this, but I have not been able to locate documentation on it. I have looked in the TeXbook and TeX By Topic, but did not find this. So, where what exactly is `/utils/exec` and where can I find documentation on it. Under what conditions should one use this or not use this?


title: Has the typesetting of Knuth and gang's Concrete Mathematics been modified over subsequent editions?

text: I understand its a late 80's book and the authors were justifiably proud of their new AMS Euler typeface when they wrote it. However, by today's display standards, I find it a bit lacking (atleast in my copy, no offense). The equations are not as pretty compared to standard TeX or even pre-TeX printing, the letters zig zag vertically sometimes, I dont know perhaps to make emphasis or avoid italics, which is not exactly visually pleasing, and there are typos. I am so willing to read this book I'll order a new one if I'm convinced that modern editions have an improved typesetting. Does anybody know?


title: Width of empty multi-part node segment larger than expected

text: If I draw the following node, I'd expect to get four squares:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes.multipart}     \begin{document}     \begin{tikzpicture}[multibox/.style={draw,       rectangle split,       inner sep=0cm,       rectangle split empty part width=0.3cm,       rectangle split empty part height=0.3cm}]     \node[multibox] {};     \end{tikzpicture}     \end{document}      But the resulting rectangles are wider than expected. What parameter am I missing?


title: Add colour to margin notes

text: I'm using LyX with XeTeX and the `KOMA-script` article class. I'm trying `secsty` and `fontspec` for the first time. I'm trying to do a unique layout with large outer margins. On some pages I will put key points or quotes from the main text in the outer margin. I assumed the best way is to use margin notes. It's important for me to customise the look of these notes - specific colours and font sizes. Is there a way to change the colour/size of all margin notes in the latex preamble? Is there a completely different solution to what I want to do?


title: Displayed math looks bad using beamerposter with lmodern

text: I'm using a theme for `beamerposter` that requires the package `lmodern`. Specifically, I'm modifying the theme found here. However, the displayed equations do not look right when I use `lmodern`. MWE:               \documentclass[final]{beamer}       \usepackage{lmodern}       \usepackage[english]{babel}       \usepackage{times}\usefonttheme{professionalfonts}       \usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}          \begin{document}       \begin{frame}{}          \begin{block}           \centering           {\VERYHuge $\sum_k^\infty$}         \end{block}            \end{frame}       \end{document}      The sigma for the `\sum` here is tiny. It looks normal if I do not use the line `\usepackage{lmodern}`. It also works fine if I use `lmodern` in `beamer` without `beamerposter`.


title: Adding an email to LaTeX file

text: Is it possible to add an email just below the authors in this code?               \documentclass[11pt,oneside,a4paper]{article}     \usepackage{hyperref}               \title{Hello}     \author{User1 \and User2}                    \begin{document}     \maketitle          \section{Introduction}     A1     \section{Literature Review}     A2          \section{Conclusion}     A2          \end{document}


title: How can I get US letter output from KOMA-script's scrlttr2 class?

text: I use KOMA-script for most everything, including correspondence. This is painless when I am using A4 paper, but when I try to use US letter, the problems start. With the `scrartcl` class, `\KOMAOptions{paper=letter}` does the trick. With the `scrlttr2` class: If the default class option file is used (`DIN.lco`, I believe), then `\KOMAOptions{paper=letter}` has no effect. The document compiles with this warning:               Class scrlttr2 Warning: Letter option file `DIN.lco'     (scrlttr2) needs paper size `a4'.     (scrlttr2) Current paper size is not `a4'!     (scrlttr2) You should add `paper=a4' at the     (scrlttr2) option list of \documentclass!     (scrlttr2) Maybe you know what you are doing,     (scrlttr2) so I do not change this myself.      and the output is A4. If I use `UScommercial9.lco` _without_ `paper=letter`, it compiles with this warning:               Class scrlttr2 Warning: Letter option file `UScommercial9.lco'     (scrlttr2)              needs paper size `letter'.     (scrlttr2)              Current paper size is not `letter'!     (scrlttr2)              You should add `paper=letter' at the     (scrlttr2)              option list of \documentclass!     (scrlttr2)              Maybe you know what you are doing,     (scrlttr2)              so I do not change this myself.      If I use the `UScommercial9.lco`, as in this MWE:               \documentclass[UScommercial9]{scrlttr2}     \usepackage[english]{babel}          \listfiles          \KOMAoptions{paper=letter,fromphone=true,fromfax=false}          \begin{document}          \setkomavar{fromname}{Stephen Bosch}     \setkomavar{fromaddress}{10 Lemon Lane \\ Sour Orchards BC V0E 0B0}     \setkomavar{fromphone}{+1 250 377 4141}          \begin{letter}{Tremulor Nocharme \\ Compliance Officer \\ Special TPS Police     \\ Fram Jammer Building \\ 320, 220 -- 4 Street \\ Treacleton AB T0M 0M0}          \setkomavar{subject}{Late TPS reports 2008, 2009, 2010, 2011, 2012}          \opening{Dear Mr. Nocharme,}          Attached please find the TPS reports you requested. Please accept my apologies for the delay.\\          \closing{Sincerely,}          \end{letter}          \end{document}      I no longer receive the warning, but the output is _still_ A4. In addition, when I try to simplify my MWE further by removing the               \usepackage[english]{babel}      line, I get a series of very strange errors:               ! Undefined control sequence.     \select@language ... \@empty }\languageshorthands                                                        {none}\babel@beginsave \cs...     l.8 \begin{document}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \select@language ...me \relax \babel@savevariable                                                        \lefthyphenmin \babel@save...     l.8 \begin{document}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Undefined control sequence.     \select@language ...hyphenmin \babel@savevariable                                                        \righthyphenmin \expandaft...     l.8 \begin{document}          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          Class scrlttr2 Info: used language is `english'.     (scrlttr2)           Supported languages are `english', `UKenglish',     (scrlttr2)           `british', `american', `USenglish',     (scrlttr2)           `german', `ngerman', `austrian', `naustrian',     (scrlttr2)           `dutch', `italian', `spanish',     (scrlttr2)           `croatian', `finnish', `norsk' on input line 8.      Note: I get this error even though I have deleted all the output files (including aux)! To my knowledge, koma-script and `DIN.lco` do not require babel, and yet the error messages suggest that there are babel leftovers somewhere. If so, I know not where, because I have deleted everything that I can see prior to compiling. I have read this post and this post already. The files used (from `\listfiles`) are:                *File List*     scrlttr2.cls    2012/07/29 v3.11b KOMA-Script document class (letter)     scrkbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-dependent ba     sics and keyval usage)      scrbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-independent      basics and keyval usage)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     scrlfile.sty    2012/06/15 v3.12 KOMA-Script package (loading files)     scrsize12pt.clo    2012/07/29 v3.11b KOMA-Script font size class option (12pt)     typearea.sty    2012/07/29 v3.11b KOMA-Script package (type area)          DIN.lco    2012/07/29 v3.11b KOMA-Script letter-class-option     UScommercial9.lco      ***********      In case it is relevant, I am using XeTeX when compiling.