title: Labeling the lengths and angles in a diagram with measurements

text: I have a diagram that is to be used to define the sine, cosine, and tangent functions. How do I label the drawn radius "r"? How do I draw the angle for alpha? (I am trying to adapt the code that I have. There isn't a manual that explains the syntax.) Two line segments are to be drawn that are perpendicular to the x-axis. One of them is the line segment between the x-axis and the intersection P of the radius and the circle; the other is between the point (r,0) and the ray containing the drawn radius. (The lengths of these line segments are r\sin\alpha and r\tan\alpha.) How do I put a dot at the intersection Q of the second line segment and the ray containing the drawn radius? How do I draw a dotted line segment from P to Q?               \documentclass{article}     \usepackage{amsmath}     \usepackage{tikz}     %\usetikzlibrary{calc,angles,quotes}     \usepackage{pgfplots}               \begin{document}          \begin{center}     \begin{tikzpicture}[     dot/.style={       fill,       circle,       inner sep=2pt       }     ]     \clip (-0.5,-0.5) rectangle (6,6);     \draw[dashed,fill=white] (0,0) circle [radius=4];     \draw[<->] (-5,0) -- (5,0) node[below] {$x$};     \draw[<->] (0,-5) node (yaxis) {} -- (0,5) node[right] {$y$};     \node[dot,label={right:$(r\cos\alpha, \, r\sin\alpha)$}] at (3.464101615,2) {};     \draw (0,0) -- (3.464101615,2);     \draw[->] (1,0) +(0:1cm) [radius=1cm,start angle=0,end angle=30] node[midway,right]{$\alpha$};               \end{tikzpicture}     \end{center}               \end{document}


title: Labels in diagram too far from lines

text: I'm having trouble with the labels in my diagram. I want them closer to the lines, but I can't seem to find a way. Is there any way to put the labels closer to the lines? Here is the code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows}     \begin{document}     \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto, minimum width = 3em, minimum height = 3em,       thick, main node/.style={rectangle,fill=white,draw}      ]            \node[main node,node distance=3cm] (2) {I(t)};       \node[main node,node distance=3cm] (1) [left of=2] {S(t)};       \node[main node,node distance=3cm] (3) [right of=2] {A(t)};       \node[below of=1,node distance=2cm] (dummy1) {};       \node[below of=2,node distance=2cm] (dummy2) {};       \node[below of=3,node distance=2cm] (dummy3) {};       \node[right of=3,node distance=2cm] (dummy4) {};       \node[left of=1,node distance=2cm] (dummy) {};                \draw[->,draw=black] (1)  -- node {$\lambda(t)$} (2);      \draw[->,draw=black] (2)  -- node {$\alpha$} (3);      \draw[->,draw=black] (dummy) -- node {$\Lambda$} (1);      \draw[->,draw=black] (1) -- node {$\mu$} (dummy1);      \draw[->,draw=black] (2) -- node {$\mu$} (dummy2);      \draw[->,draw=black] (3) -- node {$\mu$} (dummy3);      \draw[->,draw=black] (3) -- node {$\nu$} (dummy4);          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Oztfx.png)


title: Blocks at the End of a Solution Structure

text: so a couple of months ago I created my own package. Everything in it works great, and so far it does everything I need it to do, the way I need it to. But I want to change one thing. When I made the package, I found it necessary to create a structure declaration in the package that says               \newtheorem*{solution}{Solution}      Until now, I have been very happy with it. But I've decided (in order to separate the solutions from the surrounding text) that I want the structure to add a black square at the end every time the structure ends. Could somebody tell me how to modify my code to do this?


title: Floatstyle how to come back to the default theme

text: How can I come back to the default `floatstyle` after I called the `floatstyle{boxed}` and the `\restylefloat{figure}` command?


title: eledpar apparatus footnote on the wrong page

text: I'm typesetting some longer documents with facing pages using `eledmac` and `eledpar`. Even if the documents compile with only few warnings, in some cases the footnotes of an apparatus of the last even numbered page do not appear on the same page but on a seperate attached page, that is left blank apart from that. A minimal example with the same code compiles perfectly and I'm helpless, finding the reason for this behavior. Any help would be gratefully welcomed.


title: Can I expand a macro argument once without using a scratch register?

text: I'm still trying to get my head around how expansion works in TeX. One thing I can't figure out is how to expand a macro argument once without having to use a scratch register as an intermediate. As an example, consider the following code, which defines an alternative to `\meaning` with a few bells and whistles:               \long\def\printmeaning#1%     {%         \def\@tempa{#1}%         {\tt\expandafter\string\@tempa} is defined as\par         {\tt\meaning#1}%     }     \printmeaning\centerline          \bye      The output (produced with `pdftex`) is ![enter image description here](http://i.stack.imgur.com/7UD8s.png) So far, so good. However, I'm wondering whether I really have to use a scratch register (such as `\@tempa`), here. Is there a way to print the name of the control sequence passed to `\printmeaning` without using a scratch register (or some other temporary macro)?


title: How to use outertheme infolines with one color?

text: I want to use the outertheme infoline with one color. My style file `beamerthemeTest.sty` looks like this:               \usetheme{CambridgeUS}     \useinnertheme{rectangles}          \setbeamertemplate{navigation symbols}{}     \setbeamercovered{transparent}          \RequirePackage{pgf}          \definecolor{zhawblue}{HTML}{1166AD}     \setbeamercolor*{Title bar}{fg=white,bg=zhawblue}     \setbeamercolor*{frametitle}{parent=Title bar}     \setbeamercolor*{block title}{bg=zhawblue,fg=white}     \setbeamercolor*{palette primary}{fg=white,bg=zhawblue}     \setbeamercolor*{palette secondary}{fg=white,bg=zhawblue}     \setbeamercolor*{palette tertiary}{bg=zhawblue,fg=white}     \setbeamercolor*{palette quaternary}{fg=white,bg=zhawblue}     \setbeamercolor*{separation line}{bg=zhawblue,fg=zhawblue}     \setbeamercolor*{fine separation line}{bg=zhawblue,fg=zhawblue}      ![enter image description here](http://i.stack.imgur.com/2u5x7.png) But what resides is a small separation line between the panels. How can I remove them? Thanks for any hints! Cheers Reza


title: Using braces in verbatim environment

text: I want to put some code in a verbatim environment:               \begin{verbatim}     data _≥_ : Nat → Nat → Set where       ge0 : {y : Nat}                   → y     ≥ zero       geS : {x : Nat} {y : Nat} → x ≥ y → suc x ≥ suc y     \end{verbatim}      but when I compile the document I get warnings saying that { and } are not defined for this font: > ./3-proofs.tex:0:No file OMScmtt.fd. on input line 116. > > ./3-proofs.tex:116: Font shape `OMS/cmtt/m/n' undefined(Font) > using`OMS/cmsy/m/n' instead(Font) for symbol `textbraceleft' on input line > 116. Font shape`OMS/cmtt/m/n' undefined(Font) using `OMS/cmsy/m/n' > instead(Font) for symbol`textbraceleft' > > dep-typed-wbl-heaps.tex:0: Some font shapes were not available, defaults > substituted. Somewhere on the web I found a hint to add               \usepackage[T1]{fontenc}       to my document, but that completely messes up huge portions of my text and therefore is not an option. Is there any other way to get curly braces in verbatim environment?


title: Hiding a column with colored cells

text: I want to use the column type described in this answer to hide certain columns in a table. The table occurs multiple times throughout the document, always with different columns hidden. Some of the cells are highlighted using the `colortbl` package, and this is what appears to cause a problem: ![problem](http://i.stack.imgur.com/JAa1y.png) It appears that the colored cells are somehow "leaking" from the hidden cells into the following cells. What can I do to prevent this? I want the background color of the hidden cells disappear completely - I do not want it to appear even partially in the following cells. MWE:               \documentclass{article}     \usepackage{array}     \usepackage{colortbl}          \newcommand{\gc}{\cellcolor[gray]{.7}}     \newcolumntype{H}{>{\setbox0=\hbox\bgroup}c<{\egroup}@{}}          \newcommand{\tablebody}{%           foo &     bar & \gc boo &     baz &     faa \\           bar & \gc boo &     baz & \gc faa &     foo \\       \gc boo &     baz &     faa &     foo & \gc bar \\           baz & \gc faa &     foo & \gc bar &     boo \\           faa &     foo & \gc bar &     boo &     baz %     }          \begin{document}          \section*{all columns visible}          \begin{tabular}{ccccc}       \tablebody     \end{tabular}          \section*{center column hidden}          \begin{tabular}{ccHcc}       \tablebody     \end{tabular}          \section*{middle columns hidden}          \begin{tabular}{cHcHc}       \tablebody     \end{tabular}          \section*{outer columns hidden}          \begin{tabular}{HcccH}       \tablebody     \end{tabular}          \end{document}


title: Extensible double angle, etc

text: I was wondering about an efficient way to generate an inner product symbol like               \[     \langle\langle u, v \rangle\rangle     \]      (i.e., double angle brackets), or a norm symbol like               \[     \lvert\lVert x \rVert\rvert     \]      (i.e., triple bars). Of course, the above examples are terrible, no respect for spaces. Is there an efficient way of doing this so that the delimiters are extensible (compatible with `$\left$` and `$\right$`)? I know of the package _nath_ , but it's quite incompatible with amsmath, and generates thousands of errors, so is not an option. I've also tried with "DeclareMathDelimiterX" in _mathmode_ , but couldn't get it to work quite as well as I'ld like.


title: How to adjust the kerning around a forward slash in text

text: In contrast to `\texttt{typewriter}` normal text is "connected". When using a forward slash, I get for `y/.` this: ![y/.](http://i.stack.imgur.com/TGZM0.png) while I would like to get something like that: ![y$!$/$!$.](http://i.stack.imgur.com/aVTBk.png) which can be accomplished by `y$\\!$/$\\!$.`, but this is brute-force. Is there a better way to tell LaTeX to "connect" the forward slash with the adjacent characters? (For fractions there is `\sfrac` of the xfrac package, but I do not want to typeset fractions here.) MWE:               \documentclass{minimal}     \begin{document}     y/.          y$\!$/$\!$.     \end{document}


title: table causing misalignment in two column layout

text: I'm fairly new to LaTeX and I've run into a problem I'm not even sure how to Google. I'm using the two column document class `IEEEtran` for a scientific paper. However the text in the right hand column seems to be "pushed down" by the table in the left hand column. I've uploaded a screenshot to: ![Screenshot](http://i.stack.imgur.com/sRLFt.png) I would like the text in the right column to align with the top of the table in the left hand column. It is very hard to reduce this problem into a small document as it only occurs when the text, image and tables appear in the order and position they are currently in. I'm not sure exactly what information you might need to help me diagnose the problem, but I can try to provide any additional information needed. I use the following to insert the image at the top of the page:               \begin{figure*}[!t]         \centerline{\subfloat[cap1]{\includegraphics[width=3.5in]{img/img1}\label{fig:label1}}         \hfil         \subfloat[cap2]{\includegraphics[width=3.5in]{img/img2}\label{fig:label2}}}         \caption{Caption}         \label{fig:L}     \end{figure*}      The table code I use is:               \begin{table}[htbp]         \begin{center}              \begin{tabular}{ |p{20mm}|p{5mm}|p{5mm}|p{5mm}|p{4mm}|p{20mm}|}             \cline{2-4}              \multicolumn{1}{l|}{} & \multicolumn{3}{|c|}{\bf A}  &  \multicolumn{2}{|l}{} \\                 \hline                      {\bf E} & {\bf R} & {\bf N} & {\bf A} & {\bf \#F} & {\bf \% L} \\                 \hline                 A & $51.35$ & $90.28$ & $70.82$ & - & $0$ \\ \hline                 B 1/1 & $67.05$ & $82.45$ & $74.75$ & $3$ & $25.88$ \\ \hline                 C 2/3 & $71.47$ & $79.84$ & $75.66$ & $2$ & $26.12$ \\ \hline                 D 3/5 & $64.54$ & $80.75$ & $72.64$ & $1$ & $27.56$ \\ \hline                 E & $72.17$ & $78.59$ & $75.38$ & $2$ & $100$ \\ \hline                 F &$72.12$ & $84.45$ & $78.28$ & - & $19.23$ \\ \hline                 G & $81.60$ & $83.54$ & $82.57$ & - & $100$ \\ \hline         \end{tabular}         \caption{c1}         \label{tab:c1}              \begin{tabular}{ |p{20mm}|p{5mm}|p{5mm}|p{5mm}|p{4mm}|p{20mm}|}             \cline{2-4}              \multicolumn{1}{l|}{} & \multicolumn{3}{|c|}{\bf A}  &  \multicolumn{2}{|l}{} \\                 \hline                      {\bf E} & {\bf R} & {\bf N} & {\bf A} & {\bf \#F} & {\bf \% L} \\                 \hline                 A & $59.22$ & $69.21$ & $64.22$ & - & $0$ \\ \hline                 B 1/1 & $73.84$ & $72.53$ & $73.18$ & $2$ & $23.58$ \\ \hline                 C 2/3 & $71.05$ & $66.26$ & $68.66$ & $1$ & $14.09$ \\ \hline                 D 3/5 & $67.44$ & $76.05$ & $71.74$ & $0$ & $16.13$ \\ \hline                 E & $58.29$ & $71.44$ & $64.86$ & $0$ & $100$ \\ \hline                 F & $72.33$ & $69.88$ & $71.11$ & - & $20.24$ \\ \hline                 G & $78.08$ & $75.50$ & $76.79$ & - & $100$ \\ \hline         \end{tabular}         \caption{c2}         \label{tab:c2}         \end{center}     \end{table}      I've tried adjusting the table column widths but this does not fix the problem. I have also tried moving the table and image around in the document but have not managed to find a way to get the table and image to appear close to where they are referenced in the text and not cause the layout problem. Any ideas on what I can try to do to fix this would be very much appreciated.


title: Tabular, make a column or a row emphasized

text: I want to create a table and to make all cells of a column emphasized. Is there a simple way to do it, or do I have to emphasize every single cell?


title: Media9 and Flash-free OS environments

text: I've been using Movie 15 to create narrated PDF files. Works well in Adobe Acrobat and may soon work on the iPad, too (pdf readers there are promising to handle embedded sound). But Movie 15 is now "deprecated". The replacement, Media9 seems to depend on a Flash engine (built into desktop Adobe Acrobat readers) to play media including sound. Bad choice, it seems to me since, in addition to IOS which is Flash-free, Flash is disappearing from Linux, desktop browsers and possibly elsewhere. Is the "deprecation" of Movie 15 going to be a problem for its continued use? Is there an alternative way to embed sound in LaTeX-sourced PDFs?


title: LaTeX error: can't write file

text: I'm using Miktex 2.9 on windows 7 x32, texniccenter as IDE. I encounter an error for a project that worked few days ago: when I compile, I get the message:               ! I can't write on file `../preamble1.aux'.      The beginning of the .tex file is:               \documentclass[xcolor=dvipsnames]{beamer}     \include{../preamble1}     \begin{document}      What should I do? Thanks.


title: Repository of TikZ shapes

text: Ti _k_ Z shapes are extremely hard to create – even the documentation admits as much. On the other hand, the selection of shapes that ships with the `tikz` package is pretty meagre – besides rectangles, circles, diamonds and regular polygons there isn’t much more. A split circle and a few strike outs is about all. **Is there an online repository of ready usable high-quality shapes?** For example, I’m searching for a tag shape and while this is of course straightforward to create myself1 it’s still a lot of work and most probably redundant since someone else must have needed the same shape aready. * * * 1 I’ve already created a “document” shape with a dog ear in one corner based on the tutorial in the documentation. Including debugging and parameter tweaking, this has certainly taken me more than one hour.


title: How can I draw two loops above a node?

text: How can I draw two loops above a node? Here is my code:               \path (r) edge[loop above] node[left=1pt] {3} (r);     \path (r) edge[out=140, in=50, looseness=0.8, loop] node[above=3pt] {4} (r);      How can I make the 2nd loop bigger, so that I get more space in between the loops? Thanks in advance


title: Why doesn't the first column wrap text to its width?

text: I have the following code               \documentclass[a4paper, 11pt]{article}     \usepackage{multirow}     \begin{document}          \begin{tabular}{|p{2cm}|p{6cm}|p{1cm}|p{1cm}|p{1cm}|}     \hline     \multicolumn{2}{|c|}{} & Start date & End date & Days spent\\     \hline     \multirow{6}{2cm}{Background research} & This is some long text that wraps below& Lucus Radebe  & & \\      & This is some long text that wraps below & Michael Duberry  & & \\      & This is some long text that wraps below & Dominic Matteo  & & \\       & This is some long text that wraps below & Dominic Matteo  & & \\        & This is some long text that wraps below & Dominic Matteo  & & \\      & This is some long text that wraps below & Didier Domi  & & \\ \hline     \multirow{3}{2cm}{Midfielders} & MC & David Batty  & & \\      & MC & Eirik Bakke  & & \\      & MC & Jody Morris  & & \\ \hline     Forward & FW & Jamie McMaster  & & \\ \hline     \multirow{2}{2cm}{Strikers} & ST & Alan Smith  & & \\      & ST & Mark Viduka  & & \\     \hline     \end{tabular}     \end{document}      It wraps text in the third column but not the first. How can I make it wrap in the first column too? EDIT: One possible solution Use `\multirow{6}{2cm}{{\begin{center}Defenderss adsadasdasdas\end{center}}}` But that does not maintain the vertical alignment if your other rows get wrapped


title: What files are used in the TeX world?

text: > **Possible Duplicate:**   >  File extensions of LaTeX-related files   >  Egad! What are all those files? What are files that LaTeX creates when calling one of it’s programs (including `biber`, `xindy` etc.)? What are files used to create a document? * * * Actually I know the answer but I think it’s a good idee to collect them in one question. I suggest making a CW answer for each “topic” with the following format               ## Topic          * __`.suffix`:__ Explanatory text      (When is it created?,       For what is it used?       what happens when I delete it? …)  [two spaces, i.e. line break]         Created by `program`.      Sort the entries alphabetically, please.


title: Use of different output files in LaTeX (pdflatex)

text: When I use pdflatex, I get a bunch of files:               test.aux       test.log       test.out       test.pdf       test.tex       test.toc      The .tex file and the .pdf file have an obvious use, but what do the other files do? Thanks in advance.


title: LaTeX Compilation

text: Why does LaTeX generate the following files:     1. aux file   2. log file   3. out file I believe that the log file would keep the errors incase if the tex file had it but incase if it already was generated then why the log file is created and there overheads of aux and out file. Wouldn't the tex file and the pdf file be sufficient?(and a necessary log file)


title: Egad! What are all those files?

text: Ok, let's write a document!               $ vim thesis.tex     i[input a whole bunch of latex and text]<Esc>ZZ     $ pdflatex thesis     $ ls     thesis.acn  thesis.alg  thesis.bbl  thesis.dvi  thesis.glo  thesis.ilg     thesis.ist  thesis.pdf  thesis.toc  thesis.acr  thesis.aux  thesis.blg     thesis.glg  thesis.gls  thesis.ind  thesis.log  thesis.tex      What _are_ all of these files? I only wanted my document! Ok, ok, so you can see that I've used pdflatex _and_ latex, and I'm obviously using a few common packages (e.g. glossaries) and bibtex. Nevertheless, it'd be great to know what these files (and similar files for other common packages) are for, and whether there's any reason to keep them.


title: Two pictures and text on one page

text: I got the following problem: I want to have two pictures at the end of a subsection just before the next subsections starts. I tried it with:                   \begin{figure}[ht]         \centering         \includegraphics[width=\linewidth]{geschw.png}         \caption{Geschwindigkeitsverläufe von Globoidkurve und Greifer bei 0,7s Wechselzeit}         \includegraphics[width=\linewidth]{beschl.png}         \caption{Beschläunigungsverläufe von Globoidkurve und Greifer bei 0,7s Wechselzeit}         \label{fig:geschw}         \end{figure}      But then the pictues are at the end of the whole text. The first subsection ends at the end of a page so i tried to use                   \begin{figure}[p]      which placed them on the next page between the end of the first and the beginning of the second subsection, but in the middle of the page with white space above and below. The next subsection then starts at the next page. Is it somehow possible to move the pictures to the top of the page and let the next subsection start right below.


title: How to pass in a ratio in fractional form?

text: How to pass in a ratio of 4/15 (instead of its approximated decimal form of 0.266) to table definition. * * * Final solution can be seen here. * * * I need one more vote to close this topic.


title: How to scale a pgfplot in a tikzpicture correctly?

text: I created a figure in pgfplots and added some extra labels in a tikzfigure environment. Now it turns out I need to rescale the whole figure. Normally this can be done by adding `scale=2` but here the scaling is interpreted differently for `pgfplots` and `tikzfigure`. The result is rather ugly and I have tried several options but could not fix it. Ideally I want the fontsize not to change at all in both environments. Here is the MWE and its output:               \documentclass[tikz,12pt]{standalone}          \usepackage{tikz,pgfplots}     \pgfplotsset{compat=1.8}     \usetikzlibrary{plotmarks}          \begin{document}          % figure looks fine with:     % \begin{tikzpicture}[scale=1,font=\footnotesize]     % but fonts scale unevenly with:     \begin{tikzpicture}[scale=1.5,font=\footnotesize]          \begin{axis}[name=main plot,         view={45}{45},         ymax=0.4,         xmax=0.16,         zmax=0.6,         y dir=reverse,         xtick={0}, ytick={1}, ztick={1},         extra z ticks={0.5},         extra z tick labels={0.5\,K},            axis lines=center,         ]         \addplot3+[blue,fill=blue!40!white, fill opacity=0.5,domain=0:0.233,no markers,samples y=0,samples=50] ({0},{x},{0.419-1.2466E-5*(x+1.30574)^24.19521}) -- (axis cs:0,0,0) -- cycle;                     %/*     \tikzset{endpoint/.style={circle,draw=black,fill,inner sep=0pt,minimum size=3pt} }     \node[endpoint] at (axis cs:0,0.23,0) [label=below:{(1)}] {};           %*/       \end{axis}          \node at (0.8,1.6) {$H\perp c$};     \node at (4.5,5) {28\%};          \end{tikzpicture}           \end{document}      ![enter image description here](http://i.stack.imgur.com/esT3U.png) Is there an easy way to fix this?


title: Retain coordinate value in tikz foreach loop

text: I would like to retain a computed coordinate value from one step of a tikz foreach loop to the next. In the code below, I would like the increment in the y-value to depend on the previous y-value, which I am denoting \lasty. Is there a way to retain this value? Thanks for the help. The example below errors out including the `\- \lasty`; the example should work otherwise.               \documentclass{beamer}     \usepackage{tikz}          \begin{document}     \begin{frame}[fragile]     \newcommand{\Emmett}[6]{% points, advance, rand factor, options, end label     \draw[#4] (0,0)     \foreach \x [remember=\x as \lastx] in {1,...,749}     {   -- ++(#2,{rand*#3 + #2*(#6-\lasty)/(#1-\x)})     }     node[right] {#5};     }     \scalebox{0.5}{        \begin{tikzpicture}     \draw[help lines] (0,-5) grid (15,5);     \Emmett{750}{0.02}{0.2}{red}{first one}{2.0}     \Emmett{750}{0.02}{0.2}{green}{second one}{-1.0}     \Emmett{750}{0.02}{0.2}{blue}{third one}{-2.0}     \end{tikzpicture}     }     %\pgfmathsetseed{1337}     \end{frame}     \end{document}


title: Warnings about Underfull/Overfull hboxes

text: I have created a calendar in LaTeX using MiKTeX and although the whole code is correct I have 12 warnings about underfull hboxes and overfull. Can someone tell me first how to make my code run without warnings, what is the result of these warnings and what these warnings specifically mean?


title: Polyglossia with Biblatex (and Historian) and American English

text: I am having some issues with XeLaTeX, Biblatex, and American English in Polyglossia. According to the Biblatex manual, it uses polyglossia to determine the variant style of english and sets the style accordingly. However, this is not occurring for me. American English has successive citations as Ibid. and not Ibidem. In the following MWE, when compiled with xelatex (and biber), the second footnote is Ibidem. When compiled with pdflatex (and biber), the second footnote is Ibid.               \documentclass[letterpaper,12pt]{article}          \usepackage{iftex}     \ifXeTeX       \usepackage{fontspec}     \fi     \ifPDFTeX       \usepackage[american]{babel}     \fi     \usepackage{fullpage}     \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}     \ifXeTeX       \usepackage{polyglossia}       \setmainlanguage[variant=american]{english}     \fi     \usepackage[doublespacing]{setspace}     \usepackage[style=historian,     % Loads the Historian files             backend=biber,             sorting=nty,         % Sorts bibliography by name, title             autocite=footnote,   % Autocite command generates footnotes             mincrossrefs=1,      % Includes all x-ref'ed entries in the bibliography             usetranslator=true,  % Translator's name may be substituted for                                  % author or editor, if the latter are blank             printnoterefs=false, % Do not print "see note" short shortened notes             printseries=true]    % Options provided by Historian, see below             {biblatex}          \addbibresource{bib1.bib}          \begin{document}          This is a reference to a footnote.\footcite[1]{Book}. This should be an Ibid.\footcite[2]{Book}          \end{document}      The contents of bib1.bib are:               @book{Book,        author    = {John Smith},        title     = {A book with a very long title to make sure that it wraps around to a second line},        address   = {1600 Pennsylvania Ave},        publisher = {Good Books Press},        year      = "2014"     }      It is possible that this is an issue with the Historian package for biblatex, but that just uses biblatex's settings, according to its documentation.


title: My figures don't align

text: I have three subfigures within a figure, and for some reason the one on the left (including it's caption) lines up lower than the other two. I'm sure it must be some typo, but I just don't see it! Any help would be greatly appreciated.               \begin{figure}[htb]     \centering         \begin{subfigure}{0.32\textwidth}             \centering             \includegraphics[width=0.95\textwidth]{images/DW-MD-T1}             \caption{V-shape in high density             \label{fig:DW-MD-T1}}         \end{subfigure}         \begin{subfigure}{0.32\textwidth}             \centering             \includegraphics[width=0.95\textwidth]{images/DW-MD-T1}             \caption{Line-shape in medium density             \label{fig:DW-MD-T2}}         \end{subfigure}         \begin{subfigure}{0.32\textwidth}             \centering             \includegraphics[width=0.95\textwidth]{images/DW-MD-T3}             \caption{Line-shape in medium density             \label{fig:DW-MD-T3}}         \end{subfigure}         \caption{A V-shaped DO-formation meets a medium density crowd; (a) The crowd starts to move aside. The closer agents start adjusting their velocity to flee from the formation. (b) The agents directly in front of the formation don't get a chance to move aside as they are only steered ahead; (c) The agents that did not get a chance to flee get overrun.}         \label{fig:DW-MD-T}     \end{figure}


title: grouping the citations from [1],[2] to [1,2]

text: I am citing some papers in my tex file. I use **\cite** command and it works fine. In cases that there are two citations together for example \cite{paper1,paper2} then the result is un-grouped.               ...In recent researches [1],[2]...      And I would like it to be:               ...In recent researches [1,2]....      I used **\usepackage{cite}** but it doesn't make any change. How can I fix the problem? P.S : I am using IEEEconf original latex class files. example:               \documentclass[letterpaper, 10 pt, conference]{ieeeconf}     \IEEEoverridecommandlockouts     \overrideIEEEmargins          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{framed,color}     \usepackage{fancybox}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{multirow}     \usepackage{tabularx}     \usepackage{rotating}     \usepackage{url}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{cite}  % converts [1],[2] to [1,2]          \title{\LARGE \bf Example}     \author{NKN}     \begin{document}          \maketitle     \thispagestyle{empty}     \pagestyle{empty}               \section{INTRODUCTION}          Alongside the conventional approaches \cite{paper1}, recently, several other approaches have been proposed \cite{paper2,paper3}.          \bibliographystyle{IEEEtran}     \bibliography{IEEEabrv,mybib}          \end{document}      Result: ![enter image description here](http://i.stack.imgur.com/T1QYX.jpg)


title: How do I write this mathematical equation?

text: I want to write the shown mathematical equation in LaTeX but I am getting an error. Here this is not eta but it is `n`. The code which I am writing is               \begin{equation}     \Delta {E} +  \frac{\omega^2 n$_{i}$^2}{c^2} E = 0     \end{equation}      ![enter image description here](http://i.stack.imgur.com/qr1Zw.jpg)


title: Auto word wrapping in a node in TikZ?

text: I am using `TikZ` to make a flow chart demonstrating my scheme step by step. I notice that the word wrapping is not automatic in a node. That is, the line can be extremely long across the whole page. The MWE is as follows.               \documentclass[a4paper]{article}          \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage[colorinlistoftodos]{todonotes}     \usepackage{tikz}          \title{Your Paper}          \begin{document}     \maketitle          \begin{tikzpicture}[block/.style={draw, fill=white, rectangle, minimum width=0.95*\columnwidth, anchor=west}, font=\small]         \node[block, minimum width=0.95\columnwidth, minimum height=1cm, fill=white, opacity=1, text opacity=1, rounded corners, thick](step1) at (0,0){};         \node[below=0cm of step1.north, align=left]{\textbf{Step 1}: This is Step one, which is a very very very long sentence. I really hate it when it does not automatically do the wrapping.};         \node[block, minimum width=0.95\columnwidth, minimum height=1cm, below right=0.9cm and 0cm of step1.south, fill=white, opacity=1, text opacity=1, rounded corners, thick](step2) at (0,0){};         \node[below=0cm of step2.north, align=left]{\textbf{Step 2}: Step 2 is cute and short.};         \draw[-stealth](step1.south)--(step2.north)node[pos=0.5, above=0cm]{};     \end{tikzpicture}               \end{document}      which renders as ![enter image description here](http://i.stack.imgur.com/00jI4.jpg) My current workaround is to manually insert new line, which is very troublesome. I, therefore, wish to find **an elegant way to achieve the automatic word wrapping in a node of`TikZ`**.


title: Setting image size in html output of tex4ht

text: I have a complex document which I'm trying to convert to `html` with `tex4ht` and TeXLive under Ubuntu, but I'm not able to coherently control the image size of `jpg` and `eps` images. In `html` output, `jpg` images get direct reference to original image and seems to display at 1 to 1 pixel, while `eps` images are converted into a `png` image whose size is specified in `html` but seems to display too small. In both (or at least some) cases the original `\includegraphics[width=mymeasure]{myimage.jpg-eps}` specification isn't respected. I've tried a lot of tricks, configurations and snippets (like this and this) without success. Is it possible to transfer the size specified for images in LaTeX source to `html` output? Here is my MWE:               \documentclass{book}     \usepackage{graphicx}     \begin{document}     Lorem ipsum dolor sit amet, consectetur adipisici elit:     \begin{centering}     \includegraphics[width=0.5\textwidth]{myimage.jpg}          \includegraphics[width=1.0\textwidth]{myimage.jpg}          \includegraphics[width=0.5\textwidth]{myimage.eps}          \includegraphics[width=1.0\textwidth]{myimage.eps}     \end{centering}     \end{document}      which I compile with `htlatex myfile`. And here is the `html` output. ![enter image description here](http://i.stack.imgur.com/Fmz3n.jpg) As you can see, the big (as well as the small) `jpg` and `eps` images should have the same (100%) width, whereas they don't (in `html`, but they do in the `pdf`). Also, the two `jpg` images should have one the half width of the other, whereas they don't (in `html`, but they do in the `pdf`).


title: How can I fix the error "GUI framework cannot be initialized" with TeXnicCenter and MiKTeX?

text: I don't know what I've done, but all of a sudden I am unable to compile any document which uses the `geometry` package. Minimal (non)-working example:               \documentclass[11pt]{article}          \usepackage{geometry}      \begin{document}     test     \end{document}      doesn't produce any output, and this is what I see in my error summary screen in TeXnicCenter: ![enter image description here](http://i.stack.imgur.com/dm5KS.png) The red arrow points to what seems to be the problem: something about the bundle "`oberdiek`" and its package "`ifvtex`" is causing pdflatex.exe (which, while I don't really know what it does, sounds pretty important) to "not be initialized". I looked up this package, and it's relevance here is a mystery to me. I've confirmed that all of my files without the `geometry` package compile just fine; however, that doesn't mean that the problem is _with_ the `geometry` package - what seems more likely is that there is some hidden cause of the error, and `geometry` happens to be one way to induce that. By the way, I've tried compiling a document which includes the `ifpdf` and `ifvtex` packages separately, and they do just fine; it's only when I include the geometry package (which for some reason requires these `ifpdf` and `ifvtex` packages) that the error occurs. I've tried the only things I can think of:   * going into MiKTeX Package Manager (by the way I am using 2.8), and removing + reinstalling both `geometry` and `oberdiek`   * refreshing the file name database ("FNDB")   * deleting all automatically generated files, as well as simply starting over in a new document So I'm stuck now. I've considered attempting to just get rid of all traces of MiKTeX and TeXnicCenter from my computer and starting over, but that seems a bit excessive - after all, the `geometry` package was working for me just earlier today. I honestly am not sure what I did to cause this; I've spent today trying to make a better template file for myself, and so I've been trying out new packages, but if I'm not loading these new packages there shouldn't be any conflicts, right? Actually, I've just now thought of something that I think I did between the last time it worked and now, so is a possible candidate for the cause: I had to install some package manually, as it wasn't available on MiKTeX, and so I created a folder and pointed MiKTeX to it (i.e. the second option described here). The package didn't do what I wanted, so I deleted the folder and removed it from the list of folders I told MiKTeX to check. Perhaps it's still trying to reach it for some reason?


title: TeXnicCenter does not compile a document

text: > **Possible Duplicate:**   >  How can I fix the error "GUI framework cannot be initialized" with > TeXnicCenter and MiKTeX? I checked the net, but haven't found a solution so far. I'm using MikTeX 2.9 and TeXnicCenter "1.0 Stable release Candidate 1" which I've downloaded few weeks ago. As I'm currently writing a book, I thought of splitting it up into subparts including different `.tex` documents into one main document. I even did it before that way (was in 2008, worked with MikTeX 2.7 and TeXnicCenter without any problems) Now it won't compile. The source code is the following:               \documentclass[a4paper,12pt, DIV12]{book}          \usepackage[ngerman]{babel}         \usepackage[T1]{fontenc}            \usepackage[ansinew]{inputenc}     \usepackage[dvips]{graphicx}     \usepackage{multicol}               \usepackage{float}                  \usepackage{amsmath}                \usepackage{listings}               \usepackage{lastpage}               \pagemark = Seitenzahl          \usepackage{setspace}     \onehalfspacing            \setlength{\parindent}{1em}                    \begin{document}          \maketitle          \tableofcontents          \newpage     \include{mit17}          \end{document}      TeXnicCenter always tells me that: (only part of error message) > >     pdflatex.exe: GUI framework cannot be initialized. >     I couldn't open file name C:\... (the correct address)\main.aux >     Couldn't find input index file C:\... (the correct address)\main >     LaTeX result: 0 errors, 0 warnings, 0 full/empty boxes, 0 pages >   I hope anyone can help me!


title: TeXnicCenter won't build when using pgf package

text: > **Possible Duplicate:**   >  How can I fix the error "GUI framework cannot be initialized" with > TeXnicCenter and MiKTeX? I recently installed the "pgf" package via the MiKTeX package installer. I attempted to use the pgf file in a TeX file using TeXnicCenter. However, when I included the line "usepackage{pgf}" and attempted to build the output I would always get the following message at the end of the output profile: > LaTeX-Result: 0 Error(s), 1 Warning(s), 0 Bad Box(es), 0 Page(s) However, according to the output profile multiple files from the pgf package were loaded, so it's definitely been installed. When I remove the line "usepackage{pgf}" from the TeX file the file built and displayed perfectly (I had not included any pgf code in the file). In the output profile, after four pgf-related files are listed, is the line: > latex.exe: GUI framework cannot be initialized. This is the last line in the output profile before BibTeX takes over. I suspect it points to the issue. Is this the case, and if so how do I fix it?


title: Commands from graphics have no effect

text: I am learning LaTeX from a book, and I am using TeXnicCenter. The book has a chapter about the `graphics` package, so I download it and try the commands. But I find that when I use commands like `\scalebox` and `\resizebox`, they cannot take effect. Also, the PDF seems to be "dead" after that, i.e. when I make some changes and click "build and view", the PDF remains unchanged. I have tried the `graphicx` package but the result is the same. For example, firstly I type               \documentclass[12pt]{article}     \usepackage{amsfonts, amsmath, amsthm, amstext, amssymb, amscd, ulem, array}     \begin{document}     abc     \end{document}      then this produces a pdf with a word 'abc'. At the bottom of TeXnicCenter, I see 0 error, 0 warning, 0 bad box, and 1 page. Then I change it to               \documentclass[12pt]{article}     \usepackage{amsfonts, amsmath, amsthm, amstext, amssymb, amscd, ulem, array}     \usepackage{graphicx}     \begin{document}     \scalebox{2}{abc}     \end{document}      The same pdf occurs, i.e. no size enlarged. At the bottom of TeXnicCenter, I see 0 error, 0 warning, 0 bad box, and 0 page. Finally I change it to               \documentclass[12pt]{article}     \usepackage{amsfonts, amsmath, amsthm, amstext, amssymb, amscd, ulem, array}     \usepackage{graphicx}     \begin{document}     \scalebox{2}{efg}     \end{document}      I still see the word 'abc' with the same size. At the bottom of TeXnicCenter, I see 0 error, 0 warning, 0 bad box, and 0 page. Would any one please help me? In the output area of the TeXnicCenter, I find the following which is unusual: "C\User\user\Desktop\myfile\test.aux)pdflatex.exe: GUI framework cannot be initialized."


title: Packages not recognised and no output produced

text: > **Possible Duplicate:**   >  How can I fix the error “GUI framework cannot be initialized” with > TeXnicCenter and MiKTeX? I am using MiKTex with TexnicCenter (the 32bit version) and whenever I try compiling a file with `\usepackage{pgf}`or `\usepackage{lscape}` in the preamble it doesn't produce any output(whereas other packages do work). I have installed both of the packages using the manager and thus have not idea what might be causing this? Am afraid this is indeed the whole log file. (Tried compiling it again but get the same output)               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=latex 2012.10.3)  13 DEC 2012 19:05     entering extended mode     **LaTeX1.tex     (C:\Users\Desktop\LaTeX1.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat     vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm     an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,      romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis     sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u     senglishmax, welsh, loaded.     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\minimal.cls"     Document Class: minimal 2001/05/25 Standard LaTeX minimal class     ) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pgf\basiclayer\pgf.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pgf\utilities\pgfrcs.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\pgf\utilities\pgfutil-common.te     x"     \pgfutil@everybye=\toks14     )     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\pgf\utilities\pgfutil-latex.def     "     \pgfutil@abb=\box26     }


title: GUI framework error after Update

text: > **Possible Duplicate:**   >  How can I fix the error "GUI framework cannot be initialized" with > TeXnicCenter and MiKTeX? Yesterday I updated all packages via the Miktex 2.8 update funktion. Since then, when I use `\usepackage{geometry}` oder `\usepackage{hyperref}`, the compiling process stops with error message > pdflatex.exe: GUI framework cannot be initialized and produces no output at all. All my other packages and stuff works just fine. Aditionally the temporary file > main.synctex(busy) doesn't disappear. I know about the activate On the Fly solution, it doesn't work. Neither does un- and reinstalling those packages via package manager. Unfortunately I have no admin-rights on this computer, otherwise I would just reinstall Miktex completely.


title: American Anthropologist Association (AAA) citation style in LaTeX using BibLaTeX

text: I'm writing a paper for my Anthropology class and the American Anthropologist Association citation style is required. I've been reading through the BibLaTeX documentation but I don't believe any of the described citation styles match my requirements. Aside from building a custom citation style file, using something like `custom-bib`, is there a possible way I can achieve this citation style?


title: How to write additional description under a table

text: I want to add additional description (with small fonts) under a table. An example is as follows: ![enter image description here](http://i.stack.imgur.com/QJcAz.png) I want to add "This table shows the type of X-ray analysis performed. ..."


title: Symbol for encoding error: black diamond with white question mark �

text: I would like to add this symbol: � to a beamer presentation. It is shown when something went wrong with the encoding. Sadly, I can't simply include this symol:               [53]     ! Package inputenc Error: Unicode char \u8:� not set up for use with LaTeX.     See the inputenc package documentation for explanation.      and I don't have any idea how to get it in LaTeX (An image is not the solution I would like to use!) Detexify didn't help either. Description of the symbol (to make it easier to find):   * a black diamond with a white question mark within or   * a black sexagon with a white question mark   * seems to be "\xa0" in `sed` How is this symbol � called? How can I print it with LaTeX?


title: Arrow end type stealth unknown

text: This is the first time I approach at drawing diagrams with latex. I have included the `tkz` library and the tkz library `shapes.multipart`. As my code is processed I get back a bunch of nasty errors, on top of the others there is               !Package pdg Error: Arrow end type ``stealth''' unknown. See the pgf package documentation for explanation.      I have been told I need to include the shapes.multipart package in my document in order to get rid of this error, but apparently it doesn't work. Can anyone please help me sort out this issue?               \documentclass[11pt,a4paper,oneside]{article}     \usepackage[italian]{babel}     \usepackage[utf8]{inputenc}     \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{centernot}     \usepackage{mathtools}     \usepackage{tikz}     \usetikzlibrary{shapes.multipart}          %opening     \title{Esame di Algebra}     \author{haunted85}          \begin{document}          \maketitle     \newpage          ... blah blah... paper content          \subsection{} L'insieme proposto non risulta totalmente ordinato in quanto $15$ e $21$ non sono tra loro confrontabili, in particolare $15 \centernot\sigma 21$ e $21 \centernot\sigma 15$.      \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm,semithick]         \tikzstyle{every state}=[fill=blue,draw=none,text=black]              \node[initial,state] (A)                    {$49$};         \node[state]         (B) [below of=A]       {$35$};         \node[state]         (C) [below left of=B]  {$15$};         \node[state]         (D) [below right of=B] {$21$};         \node[state]         (E) [below of=B]       {$4$};     \path   (A) edge    node{} (B)             (B) edge    node{} (C)             (B) edge    node{} (D)             (C) edge    node{} (E)             (D) edge    node{} (E);     \end{tikzpicture}     \end{document}


title: Change appearance of 'Series' + 'Number' entries in biblatex' bibliography

text: Following the style guidelines for an article I'm writing, I need to make sure that the title of the book series is printed in italics, preceded by an equal sign plus a space, and followed by a comma, the number within that series, and a period, and all of that enclosed in parentheses, and no period following the closing parenthesis. E.g. > Girvan, R. (1931). _Angelsaksisch handboek_. (= _Oudgermaansche handboeken_ > , 4.) Haarlem: H. D. Tjeenk & Zoon. Note that it's only the series title that's italicized within the parentheses. The various symbols (`=`, `,`, `.`) and the parentheses themselves are in an upright font. What command(s) can I include in the preamble of my `.tex` file that will result in such a bibliography? MWE:               \documentclass{article}     \usepackage[style=authoryear]{biblatex}     \begin{filecontents}{\jobname.bib}     @BOOK{girvan1931,         AUTHOR = "R. Girvan",         TITLE = "Angelsaksisch handboek",         YEAR = "1931",         LOCATION = "Haarlem",         NUMBER = "4",         PUBLISHER = "H. D. Tjeenk Willink \& Zoon",         SERIES = "Oudgermaansche handboeken"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     \nocite{girvan1931}     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/Y9j0S.png)


title: Align boxes and rotate boxes in plain TeX

text: When I finish reading the Appendix D: Dirty Tricks in the TeXbook, I rethink a question: is it possible to align some character boxes like this: ![enter image description here](http://i.stack.imgur.com/06hv9.png) The input may be like this:                   \font\fortyeightrm=cmr10 at48pt         \font\twentyfourrm=cmr10 at24pt              \parindent=0pt         {\fortyeightrm A}|\twentyfourrm a b c d e f g h i j k l m n o p q r|         \bye      We assume that when TeX is scanning the big `A`, it will place that character box at the baseline of the first line. When scanning the `|`, it will enter a group, then TeX will place the character boxes `a`, `b`, `c`, ... , `r` above then below the axis of the character box `A` (at this time, TeX may be insert the line-break at the end of a line, for example, behind the character box `i`) I haven't a good and simple method to solve this. Also another question: is it possible to rotate the character box (maybe we should put it into a `\hbox`) ?


title: How do I solve "Undefined color `\dtlpie@segcolix '"?

text: I have the following LaTeX file:               \documentclass{article}     \usepackage[pdftex,active,tightpage]{preview}     \setlength\PreviewBorder{2mm}     \usepackage{datapie}     %\usepackage{xcolor}      %\xdefinecolor{\dtlpie@segcolix }{rgb}{.8,.6,.4} <- didn't work          \begin{document}     \begin{preview}         \DTLloaddb{myDB}{local-disk-space-piechart-2013-07-08.csv}         \DTLdisplaydb{myDB}         \DTLpiechart{variable=\Space,outerlabel=\Part}{myDB}{\Part=Part,\Space=Space}         %\DTLdisplaydb{myDB} <- this works     \end{preview}     \end{document}      with this csv file:               Part,Space     programs,18124.8     movies,21606.4     source code,6246.4     VMs,3788.8     Android SDK,1228.8     Audio files,917.0     .cache,832.1     .config,358.5     Desktop,341.3     misc,829.44      which I compile like this within a Makefile:               pdflatex source.tex -output-format=pdf      I have no idea how I can get rid of the error:               [...]     (/usr/local/texlive/2012/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))          ! Package xcolor Error: Undefined color `\dtlpie@segcolix '.          See the xcolor package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.12 ...abel=\Part}{myDB}{\Part=Part,\Space=Space}          ?      ! Emergency stop.      ...                                                        l.12 ...abel=\Part}{myDB}{\Part=Part,\Space=Space}          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on local-disk-space-piechart.log.     make: *** [make] Error 1      Do you know how to solve this problem?


title: xelatex + frenchb introduce extra spaces before some characters in lstlisting blocks

text: When using babel 'frenchb' with xelatex, spaces are introduced before colons and other characters. This is great for prose, but this is also being applied to code snippets. This yields an unacceptable result when rendering code as a monospaced font. The image below is supposed to read "a:b:c" but the colons are hidden under other letters because of the extra spacing: ![enter image description here](http://i.stack.imgur.com/msLYe.png) It was generated with this code:               \documentclass{report}     \usepackage{listings}      \usepackage[frenchb]{babel}           \lstset{basicstyle=\ttfamily, columns=fixed}          \begin{document}          \begin{lstlisting}     a:b:c     \end{lstlisting}          \end{document}      I'm not sure how I should remedy this. I've already tried using other fonts to no avail, and setting `columns=flexible` has the effect of wrecking the vertical alignment because of the extra spaces.


title: Reusing / inserting text in different publications from a text database

text: _Update: A solution has been worked out here:String comparison in \ifthenelse_ _Another way of reusing text could be done with the_ extract _package_ as mentioned here. I am working on the translation of an ancient Indian/Tibetan text (written in stanzas) and a commentary (written in prose) to it. I'd like to put the stanzas of the root text (original language plus my Translation) in a seperate file. Then I want to reuse that in different other texts: a translation of the root text alone, a translation of the commentary with the quoted root stanzas inserted and so on. I think this would be something for XML, but this seems to complex for me ... so I'd like to do it with latex. my root.tex would be something like a database: record 1: stanza-nr, original, germantranslation, anothertranslation record 2: stanza-nr, original, germantranslation, anothertranslation .... In my publication.tex I'd then use a macro command such as \insertroot[g]{stanza-nr} that would fetch the data from the root.tex. (the optionial parameter would help me to just insert what I want, the german Translation, the original, both ...) I started to do it the easy way: I define a \newcommand{stanzaxxx}{} for each stanza in the root.tex (with xxx being the no. of the stanza in letters, since Latex won't accept numbers in commands). I make those macros availabe via \input{root} in the publication.tex and insert the macros \stanzanoxxx at the proper places. This means I will have to create a new command for each stanza (there are about 1.000 in the text). I think there should be a more intelligent solution - I thought maybe even Bibtex could be tweaked for that purpose? Any suggestions are most welcome. This is how I do it now: Part of root.tex - each stanza has its own command (a means 0, b means 1 etc.):                \newcommand{\abaab}{1. Mich respektvoll verneigend vor den       Sugatas, vor dem Körper der Wahrheit, den sie besitzen,       sowie vor ihren Kindern und ebenso vor allen, die der       Verehrung wert sind, will ich die Ausübung der Disziplin       der Sugata-Kinder entsprechend den Schriften in       zusammengefasster Form darlegen.}          \newcommand{\abaac}{2. Etwas, das es zuvor noch nicht       gegeben hat, habe auch ich hier nicht zu sagen; und ich       besitze nicht die Kunstfertigkeit in der Komposition von       Schriften: Deshalb habe ich auch keine Absicht, anderen zu       nutzen; vielmehr schreibe ich dieses, um meinen eigenen       Geist daran zu gewöhnen.}          \newcommand{\abaad}{3. Aufgrund der Gewöhnung an das       Heilsame mag die Kraft meines Vertrauens durch diese       [Kontemplationen] zeitweilig anwachsen; und wenn andere,       die mir in ihren Veranlagungen ähnlich sind, diese sehen,       so mag es auch für sie von Bedeutung sein.}      Part of the commentary.tex - in this example stanza 001 of chapter 01 is inserted via the correspoding macro command:               \begin{quote}       \abaab{}     \end{quote}     Der Autor verneigt sich respektvoll mit den drei Toren [Körper, Rede und Geist] vor den     Objekten der Verehrung. Zunächst verneigt er sich vor den Drei Juwelen: ... etc. etc.      Part of the publication.tex of just the root stanzas:               \chapter*{Eintritt in das Leben zur Erleuchtung}     \section*{1. Die Vorzüge des Erleuchtungsgeistes}        \abaab{} \par     \abaac{} \par     \abaad{} \par     \abaae{} \par      Advantage is, if I correct a translation in root.tex, it will automatically effect the quotations in all the other publication files. What I'd like would be something like this: Each record would be for one stanza (no, original, Translation):               {1}{bde shegs chos kyi sku ...}{Vor den Sugatas, ihrem Dharmakaya ...}     {2}{sngon chad ma byung ba ...}{Etwas, was bisher noch nicht gesagt ...}      etc. When printing the stanza I would like to retrieve the data via a macro such as \stanza{1}, which would tell Latex to retrieve the translation of stanza 1, for example. Something like that. It would save me from having to define a seperate command for each stanza.


title: Multitoc Package: Center title

text: I would like to center the title of a 2 column table of contents using the multitoc package. I have searched and read multitoc docs but cannot figure this one out.               \documentclass[12pt]{article}     \usepackage[toc]{multitoc}     \usepackage{tocloft}     \renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}     \begin{document}     \renewcommand*\contentsname{Table of Contents}     \tableofcontents     \clearpage     \section{Question 1}     \section{Question 2}     \section{Question 3}     \section{Question 4}     \section{Question A1}     \section{Question A2}     \section{Question A3}     \end{document}      ![TOC EXAMPLE](http://i.stack.imgur.com/MtsAg.jpg) Thanks


title: List with wrapped figures

text: I am trying to define a list to describe a series of images. I would like each list element to have the image aligned with the first line of the description text and have the text wrap around the image. My attempt is listed below, but two issues remain:   1. I would like "Step XX:" no to stick out into the margin (the rest of the text should be indented).    2. The wrapping fails for short paragraphs or when the description for an item has multiple paragraphs, see Step 2 in the example. Here is the code. Any suggestions on solving the two issues above is appreciated.               \documentclass{article}     \usepackage{lipsum}     \usepackage[demo]{graphicx}     \usepackage{cutwin}     \usepackage{parskip}          \newcounter{step}     \newenvironment{steps}%         {\par\setcounter{step}{0}}%         {\par\bigskip}%     \newlength{\stepmargin}%     \setlength{\stepmargin}{1em}%     \newlength{\windowwidth}%     \setlength{\windowwidth}{\textwidth}%     \addtolength{\windowwidth}{-5cm}%     \addtolength{\windowwidth}{-\stepmargin}%          \newcommand\step[2]{%         \stepcounter{step}%         \begingroup         \opencutright         \pageinwindow          \renewcommand\windowpagestuff{%             \hspace*{\stepmargin}%             \includegraphics[%                 width=5cm,                 height=8\baselineskip,                 keepaspectratio]{#1}%             }%         \leftmargin=1.5cm\begin{cutout}{0}{\windowwidth}{0pt}{9}%             \noindent             \llap{%                 \makebox[1.5cm][l]{%                     \bfseries                     Step~\arabic{step}:%                 }%             }%         #2%         \end{cutout}%         \endgroup         \par\bigskip     }          \begin{document}          \lipsum[1]     \begin{steps}         \step{step1.png}{\lipsum[2]}         \step{step2.png}{%             Short description that doesen't take up the total height of the image.\par              The text might have paragraphs.\par             The next step should start below the image for this step.         }         \step{step3.png}{\lipsum[3]}     \end{steps}     \lipsum[4]          \end{document}


title: tikz library calc and auctex preview in emacs fails

text: The emacs-variable preview-default-preamble contains the statement \PreviewEnvironment{tikzpicture} so tikz pictures are processed by preview, which usually works fine. But preview in emacs fails if I use the calc library. Minimum example:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}     \begin{tikzpicture}       \draw ($(0,0) + (0,0)$) -- ($(1,1) + (1,1)$);     \end{tikzpicture}     \end{document}      throws the following error in emacs               ! Preview: Snippet 1 started.     <-><->          l.8 \begin{tikzpicture}          ! Missing \endcsname inserted.     <to be read again>                         \pr@$      l.9 \draw ($(0,0)                       + (0,0)$) -- ($(1,1) + (1,1)$);     ! Missing number, treated as zero.     <to be read again>                         \pr@$      l.9 \draw ($(0,0)                       + (0,0)$) -- ($(1,1) + (1,1)$);     ! Illegal unit of measure (pt inserted).     <to be read again>                         \pr@$      l.9 \draw ($(0,0)                       + (0,0)$) -- ($(1,1) + (1,1)$);          ! Package PGF Math Error: Unknown operator `0' or `0@' (in '$(0').          See the PGF Math package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.9 \draw ($(0,0)                       + (0,0)$) -- ($(1,1) + (1,1)$);     ! Missing $ inserted.     <inserted text>                      $     l.9 \draw ($(0,0)                       + (0,0)$) -- ($(1,1) + (1,1)$);     ! Missing \endcsname inserted.     <to be read again>                         \pr@$      l.9 \draw ($(0,0)                       + (0,0)$) -- ($(1,1) + (1,1)$);     ! Missing number, treated as zero.     <to be read again>                         \pr@$      l.9 \draw ($(0,0)                       + (0,0)$) -- ($(1,1) + (1,1)$);     ! Illegal unit of measure (pt inserted).     <to be read again>                         \pr@$      l.9 \draw ($(0,0)                       + (0,0)$) -- ($(1,1) + (1,1)$);          ! Package PGF Math Error: Unknown operator `0' or `0@' (in '$(0').          See the PGF Math package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.9 \draw ($(0,0)                       + (0,0)$) -- ($(1,1) + (1,1)$);     ! Missing $ inserted.     <inserted text>                      $     l.9 \draw ($(0,0)                       + (0,0)$) -- ($(1,1) + (1,1)$);          ! Package tikz Error: Giving up on this path. Did you forget a semicolon?.          See the tikz package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.9 \draw ($(0,0) + (0,0)$                               ) -- ($(1,1) + (1,1)$);     Preview: Tightpage -32891 -32891 32891 32891     ! Preview: Snippet 1 ended.(26214+0x26214).     <-><->          l.10 \end{tikzpicture}      My emacs-version is               GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0, Carbon Version 1.6.0 AppKit 1265)      Any hints for solving this issue are appreciated.


title: Marking author's own work when citing them

text: There is a requirement for my PhD thesis: all my own works shall be marked with * when cited, like this:               as I noted in [3*], something something      All other works shall be cited as usual. In bibliography my works and other authors' works will be in the same list, without any special marks, so there'll be no problem here. I assume you could change closing with `\bibpunct`, but that would change output globally, if I understand correctly. Ideally, I would like to have some `\citemy` command which would format citing with a star. I will use it to cite my own works, and `\cite` for all other articles. Any suggestions?


title: biblatex: How to modify the ieee-alphabetic to group papers by authors?

text: When using the `ieee-alphabetic` template for `biblatex`, it gives               [author1-year1; author1-year2; ...; auhtor2-year1; author2-year2,....]      in my pdf. I manage to get the years arranged in the numerical order. How can I get it to concatenate the author1 since sometimes I have several papers from the same (bunch of) authors:               [author1--year1--year2--...;author2--year1--year2--...]      in such a manner that the hyperreferences (the clickable red rectangles) will be on each --year1 --year2 and so on ?


title: How to direct TeXShop to all all .aux files, also in subfolders, such that they can be trashed?

text: I am writing a report in TeXShop with a main file (main.tex) and several chapter files, which I include with the `\include` command. The main.tex looks as follows:               % !TEX TS-program = pdflatexmk     \documentclass{article}     \begin{document}     \include{chapters/one}     \include{chapters/two}     \end{document}      The directory structure looks like this:               root     |     |-main.tex     |     |-chapters         |         |-one.tex         |-two.tex      When compiling, .aux files are created in the root folder but also in the chapters folder. When something goes wrong and I want to trash the .aux files I press the "Trash Aux Files" button in the console or hit "Trash Aux & Typeset" in the menu. However, this only trashes the .aux files in the root folder, not in the chapters folder. Is there a way to direct TeXShop to the aux files in the subfolders? I am using TeXShop 3.26 with pdflatexmk 4.37


title: Limit macro/newcommand scope to section

text: How can I limit the scope of a `\newcommand` to a `\section`? This is what I'd like to have:   1. The command is defined only inside the `\section`, not globally;   2. The command scope is that `\section` and cannot be seen outside of it;   3. It should not matter if a `\subsection` sees the command or not (it probably makes sense that it sees it as well); and   4. The command can be defined again in a different `\section` without generating errors (I know that `\renewcommand` could solve it but I'd like to use `\newcommand` if possible). What I have is (which generates an error because of the two definitions):               \documentclass{article}     \begin{document}          \section{First section}     \newcommand*{\blipo}{Jill}     Hello \blipo{}. \blipo{} is blonde.          \section{Second section}     \newcommand*{\blipo}{ET}     Hello \blipo{}. \blipo{} is green.          \section{Third section}     Not defined here. Attempt to use it generates error.          \end{document}      [edit] In my particular case, I'll be having around 20-30 different `\newcommand` in a single section which may or may not be used (redefined) in different sections of the document.


title: Common fonts used in writing a thesis in Mathematics

text: I am writing my thesis in Mathematics but I am not happy with the default fonts of the template that I am using. So kindly inform me what are the common fonts used in thesis along with the latex commands for those fonts.


title: Number only Appendix in Article

text: I am using a customized style for my article, where section is the top header, and no numbering is made for sections, subsections...etc I would like to keep it as it is, but, use an alphabetical numbering for my appendix. Does anyone have a idea? A MWE:               \documentclass[letterpaper,Arial,9pt]{sae}      \usepackage{amsmath}           \usepackage{lipsum}     \usepackage[titletoc,toc,title]{appendix}%5,page     \begin{document}           kjasww     \section{section}          \lipsum[1]          \appendix     \setcounter{section}{0}     \renewcommand{\thesection}{\Alph{section}}     %\begin{appendices}     \begin{appendices}     \section{Appendix}     \lipsum[1]     \end{appendices}      The style file can be found here;


title: What are the finishing touches you put to a document?

text: I'm curious about the finishing touches that people put to LaTeX documents. Are there any canonical or special things that people do in finalizing a document? What I do:   * Careful proofreading of the document (which I think is the single most important thing to do when finalizing a document).   * Read through the source file to remove unnecessary stuff and document code by commenting.   * Read through the .log file and look for warnings, overfull boxes and such.   * Check the placement of figures.    * Remove trailing spaces with a tool in gedit (it is made via `sed 's/[[:blank:]]*$//'`).   * Rename the generated file, like the pdf, to represent it being a final version.   * Since I use git I usually tag the final version and commit the final pdf.   * I also sometimes `pdfopt` my document.


title: Style individual epigraphs or leave default?

text: I am writing a doctoral thesis and I have a fair few epigraphs after each of my chapter titles. I can't decide whether it is better to style each of the individual epigraphs, or have a generic styling for all of them. That is, some of the epigraphs are short, and some are long and what looks good for the long epigraphs does not look so good for the short ones. **Best not to fiddle, or get it looking perfect?** **To clarify:** I am looking for advice on how to implement the epigraph package on a large document. I believe that fiddling about and hand adapting code is not the TeX way, and I am interested in what others would do in this circumstance. **Last Update:** I did originally style the individual epigraphs. But when I moved to having more than 1 epigraph, I invoked the `\begin{epigraph}` env, which seems not to play ball with the command:               \setlength{\epigraphwidth}{.8\textwidth}      And thus, it all starts to get a bit higgledy-piggledy. I have actually settled on the style below, but personally I think it looks a little crook. ![enter image description here](http://i.stack.imgur.com/pohuW.png) MWE:               \documentclass{report}     \usepackage{setspace}     \usepackage{epigraph}     \setlength{\epigraphrule}{0pt}     \onehalfspacing     \begin{document}     \chapter{Introduction}     \setlength{\epigraphwidth}{.95\textwidth}     \begin{epigraphs}     \qitem{For the living know that they shall die: but the dead know not any thing, neither have they any more a reward; for the memory of them is forgotten. Also their love, and their hatred, and their envy, is now perished; neither have they any more a portion for ever in any thing that is done under the sun.}%      {---\textsc{Ecclesiastes 9:5-6}}      \qitem{In the long run, we are all dead.}%     {---\textsc{John Maynard Keynes}}     \end{epigraphs}     \noindent Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tincidunt urna gravida odio ultrices ullamcorper. Praesent bibendum feugiat tortor pellentesque luctus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Donec et velit magna. Proin malesuada ornare lacinia. Pellentesque ac justo sit amet neque ullamcorper mollis. Quisque tempus vehicula tempor. Quisque magna tortor, aliquam eu dictum a, sodales nec dui. Etiam semper sem interdum tellus egestas imperdiet. Donec sed dolor non nibh rhoncus scelerisque ac vel diam.     \end{document}


title: Techniques and packages to keep up with good practices

text: ## Question What techniques and packages are there to keep up with good practices? ## What I already know I already know of the following packages for this kind of purpose:               \RequirePackage[l2tabu,orthodox]{nag}% Old habits die hard. All the same, there are                                          % commands, classes and packages which are                                           % outdated and superseded. nag provides routines                                          % to warn the user about the use of those.     \usepackage{fixltx2e}     \usepackage[all,error]{onlyamsmath}  % Error on deprecated math commands like $$ $$.      I also know to use `\\( \\)` instead of `$ $` and `\\[ \\]` instead of `$$ $$` (as discussed in Are `\\(` and `\\)` preferable to `$`?). And that `csquotes` has a strict mode to turn warnings into errors:               \usepackage[strict=true]{csquotes}      And I am aware of the fact that mostly the content is more important than appearance and technicalities. Thus it is mostly a good practice to use packages and tools that lets you focus on content and to automate as much as possible, e.g. to automate compilation with `latexmk`. Finally, I also found Best practices in LaTeX.


title: pst-eucl bold labels and arc sizes

text: I got a couple of questions about pst-eucl. How can I make a point label bold? I've tried the following permutations               \pstGeonode[PointName=\textbf{A}](1,1){A}(-1,-1){B}     \pstGeonode[PointName={\bf A}](1,1){A}(-1,-1){B}     \pstGeonode[PointName=\bf{A}](1,1){A}(-1,-1){B}      but I can't make it work. Also, how can I control the radius of the angles arcs? So if i have overlapping arcs they don't intersect.


title: Setting the name of an index with makeidx and adding to table of contents

text: I would like to change the name of my index, so that instead of "Index", it reads "Index of whatever I want". I've tried quite a few things:   * redefining `\indexname`, after or before calling `\makeindex`   * using the `index` package and calling `\newindex` instead of `\makeindex` None of these worked. Also, I'm trying to add the index to the ToC, but it doesn't get linked properly. From what I understand the contentsline should be called inside the `.ind` but this file is generated by `makeindex`. How can I do that?


title: \citeauthor* behaves like \citeauthor or \citeyearpar uses square brackets instead of round

text: I am LaTeX newbie so please bare with me. I would like to have citations in following format:               e.g. "Bauer et al. (1988) [1]"      so "1st Author et al. (year of publishing) [number in references]".      Thus I would like to have both numbered references and also citations which contain the first author's name               e.g. [1] David S. Bauer and Michael E. Koblentz. NIDX-an expert system ...      As you can see from the code bellow I use macro               \DeclareRobustCommand{\citeext}[1]{\citeauthor{#1}~\citeyearpar{#1}~\cite{#1}}      according to Wiki LaTex Bibliography Management `\citeauthor` (without `*`) and `\citeyearpar` should work as I expect, but currently I get the citations in following format:               David S. Bauer and Michael E. Koblentz [1988] [2]      There are two main problems:   1. Why are square brackets around the year of publishing instead of round brackets?   2. Why are the full names of the authors displayed instead of just the name of the first author (other authors should be displayed like "et al.")? MWE:               \documentclass[11pt]{article}          \usepackage[sort&compress,numbers,square,comma,numbers]{natbib}          % makro by which I can cite both author and year simultaneously     % ~ - tilde represent space     \DeclareRobustCommand{\citeext}[1]{\citeauthor{#1}~\citeyearpar{#1}~\cite{#1}}     % what is #1 argument     % this is an macro and I see that citep and citet have troubles so better not use but what is citep vs. citeauthor?          % makes color citations     \usepackage[dvips,dvipdfm,colorlinks=true,urlcolor=blue,citecolor=red,linkcolor=red,bookmarks=true]{hyperref}          % document begin     \begin{document}          % author and title     \title{Work}     \author{Author1 \and Author2\v{C}\'y}     \date{\today}     %\                  this adds empty page to beginning     \maketitle     \pagebreak     %\newline          Bauer (IV.) citation \citeext{Bauer1988}. Anderson (I.) citation \citeext{Anderson1980}. Landwehr (II.) citation \citeext{Landwehr1981}. Denning (III.) citation \citeext{Denning1987}. \citeext{Anderson1981}          % this must be set to use natbib (citep, citet) but requires BibTeX     \bibliographystyle{plainnat}     \bibliography{bibliography}          \end{document}      PS: I based my solution on this post: citet and citep behaves like cite.


title: Define a \newif within a nested \ifdefined

text: The MWE below attemps to define a `\newif` within a `\ifdefined`. This works fine, except when the file is loaded the second time. As it is below generates the following error message: > Incomplete \ifdefined; all text was ignored after line 1. However if you comment out the `\newif` works as desired. ## Question: How do I declare the `\newif` within the `\ifdefined`? ## MWE:               \documentclass{article}          \usepackage{filecontents}     \begin{filecontents*}{MyHeader.tex}         \ifdefined\MyHeaderAlreadyIncluded\else             \def\MyHeaderAlreadyIncluded{}%             \newcommand{\SomeCommand}{some command}%             \newif\ifDTLnewdbonload%         \fi     \end{filecontents*}               \begin{document}     Lorem ipsum     \input{MyHeader.tex} \SomeCommand.          \input{MyHeader.tex} \SomeCommand.     \end{document}


title: Big Table with line and pagebreaks

text: For a technical documentation (two columns: function name left, description right) I need a way for automatic line and page breaks in a `table` environment in case the descriptions get a bit longer. I am currently using `tabulary` which I thought worked fine but breaks when the table is longer than one page. I wanted to try out the `longtable` package but I can't get it to work:               misplaced alignment tab character &      And after a `\\\` for the next row               there is no line here to end.      I couldn't find any information on what seems to be the standard way to handle this. There seem to be a bunch of packages (`tabularx`, `tabulary`, `longtable`, ...) with more or less overlapping functionalities. edit: This is an example for the `longtable` use. Notice how the line expands over the end of the page (It didnt work in my original document, perhaps there are some conflicting packages. nevermind).               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english]{babel}     \usepackage{tabulary}     \usepackage{longtable}     \begin{document}     \begin{longtable}{ll}     -foobar & preeeeeeeeeeeeeeeeeeeeety long string here whic doesnt automatically break when it reaches the end of the current line.     \end{longtable}     \end{document}      If you replace the `\begin{longtable}` with `\begin{tabulary}{\textwidth}{l J}` the break at the end of the line works, but now longer documents are not possible anymore since page breaks are not handled. A list description could work I suppose only that I would like for the text to not continue directly below the description text but is indented to the right so that there is space below the description text (like in a table). Edit2: I tried the code posted here with the following result: ![Link to Image](http://i.stack.imgur.com/cL6A3.png) I did the table itself with `\begin{ltabulary}{LJ}`


title: Inserting non-indented mdframed object in outline

text: I want to be able to put an `mdframed` object inside of an `outline` environment without it being indented to the indentation level that I'm at, and so that I can continue the outline after the `mdframed` like below:                   I. text text text              A. text text text         __________________________         |                         |         |  MD FRAMED STUFF        |         |                         |         |                         |         |_________________________|              B. text text text       Below is the code that I'm trying to use, but I can't get back to level `\2` after level `\0`. I've tried adding the `leftmargin =-1.75cm` and that will move the `mdframed` over, but I have to guess at the amount by which to move it over (ie, -1.75 cm or -1.7cm or ...) and then if I add more to my outline, it is a less than ideal strategy. Please help!               \documentclass[11pt]{article}          \usepackage{enumerate}     \usepackage{outlines}     \usepackage{enumitem}     \setenumerate[1]{label=\Roman*.}     \setenumerate[2]{label=\Alph*.}     \setenumerate[3]{label=\arabic*.}     \setenumerate[4]{label=\alph*.}          \usepackage{mdframed}          \title{Notes}     \author{}     \date{}          \begin{document}     \maketitle          \begin{outline}[enumerate]         \1 text text text                   \2 text text text      \0     \begin{mdframed}[frametitle=MD FRAMED STUFF:]     MD FRAMED STUFF     \end{mdframed}                  \2 text text text     \end{outline}          \end{document}      At this site, in section 1.4 they seem to be doing something like what I'm interested in, but I don't understand what each part means, and if I could just adjust set those items for the area I want the `mdframed`, and not the entire paper. http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/outlines/outlines.pdf


title: reusing code from moderncv

text: I am a beginner for creating latex templates. I am using a custom template for CV. And I would like to create a table which looks like below. I like the way the text wraps in the columns. This is taken from `moderncv` latex template. I tried to copy the code from `moderncv` template in order to create this table. However,I was not able to do it, because it generated some errors which I was unable to resolve. I read about a similar question which is mentioned here. However it did not help my problem. ![enter image description here](http://i.stack.imgur.com/DzJkw.png) I will try to provide a MWE here -               \documentclass[]{temp}          \begin{document}          \singleitem{Hardware Platforms}{Intel MPSoC for Wireless USB, TI MPSoC for VOIP, Freescale IMX31, MIPS32, ATMEL, ARM 7, Microblaze}     \singleitem{Development Tools}{GCC, Rose Compiler, Xilinx ISE,  Logic Analyzer, LeCroy USB Tracer, Ellisys Wireless-USB Tracer,  Atmel AVR Studio}     \singleitem{Languages}{C, C++, Linux Shell Scripts, VHDL, Assembly,  SystemC, Java}     \singleitem{Operating Systems}{Linux, VxWorks, RTLinux, MQX, RedBoot}     \singleitem{Protocols}{PCI, USB, Wireless USB, RS 232, SPI, I2C, Ethernet}     \singleitem{Other}{Clearcase, SVN}          \end{document}      Here is the short template file which I am using.               \LoadClass{article}     \RequirePackage[left=6.1cm,top=2cm,right=1.5cm,bottom=2.5cm,nohead,nofoot]{geometry}              \newlength{\columnWidth}     \setlength{\columnWidth}{320pt}          \newcommand*{\singleitem}[2]{%      \begin{minipage}[t]{50pt}\raggedleft{\fontsize{7pt}{7pt}{#1}}\end{minipage}\hspace*{30pt}\begin{minipage}[t]{\columnWidth}#2\end{minipage}     \vspace{5pt}}      The PDF it produces has somewhat cluttered appearance. ![enter image description here](http://i.stack.imgur.com/NcT4p.png)


title: How can I manipulate data in a PGFPlots Table using l3int?

text: I need to provide statistical functionality to some of my TeX-trainees and I'd like to leverage the intuitiveness of `l3int` and the expressiveness of `pgfplots` and its table helper package. So, as a proof of concept, how might I take in an input file, sum the numbers in each row (appending the result), and then (the proof part of the concept) typeset it as a table?


title: Node on a jointed TikZ path

text: I have the following code               \documentclass{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}       \draw (-3,-3) rectangle (3,3);       \path[draw,thick] (0,0) |- (1.5,1.5);       \node at (0.75,1.5) [above] {Hi};     \end{tikzpicture}     \end{document}      which results in: ![Right-angled path shown with the word "Hi" mid-way along top branch](http://i.stack.imgur.com/64M4I.jpg) In my mind, I can achieve the same effect by doing this:               \path[draw,thick] (0,0) |- node{Hi} (1.5,1.5);      But, when I try, I get: ![Right-angled path shown with the word "Hi" at the corner](http://i.stack.imgur.com/bJNnW.jpg) Is there a way to achieve what I want?


title: Expansion of single line vs multiple line gather

text: As described in Multiple split equations I want to create an equation environment that inserts `aligned` and lets me split equations with `\n`. The solution I found there is a bit hackish I guess, but works in the general case. Now curiously, if I only put a single line (i.e. one `aligned`, split by `\n` or not) into the environment, like this:               \documentclass{article}     \usepackage[fleqn]{amsmath}          \usepackage{environ}     \makeatletter     \NewEnviron{multeq}{%         \let\n\math@cr         \begin{gather}             \def\math@cr{\end{aligned}\n\begin{aligned}}             \begin{aligned}                 \BODY             \end{aligned}         \end{gather}     }     \makeatother          \begin{document}         \begin{multeq}             1-1=9         \end{multeq}     \end{document}      compilation will fail with an error like               ! Missing $$ inserted.     <to be read again>                         \egroup      l.20    \end{multeq}      So the question, I can't figure out is: What is the difference when there is only one `aligned`? Also there seem to be issues with using `\intertext` and `\shortintertext` inside of `multeq` now. If somebody has a suggestion for improvement, that would be great!


title: Include the list of parts and their sections in a global tableofcontents of beamer

text: I'm using beamer to produce a long presentation with several parts. Is there any way to generate a global TOC which should contains all the parts and their sections ? MWE:               \documentclass{beamer}     \AtBeginPart{%         \frame{\partpage}%     }     \begin{document}     \begin{frame}{Outline}       \tableofcontents     \end{frame}          \section{section Out-one}\begin{frame}\end{frame}     \section{section Out-two}\begin{frame}\end{frame}               \part{Introduction}         \section{section I-one}             \subsection{subsection I-one}\begin{frame}\end{frame}         \section{section I-two}\begin{frame}\end{frame}     \part{chapter two}         \section{section one}\begin{frame}\end{frame}         \section{section two}\begin{frame}\end{frame}         \section{section three}\begin{frame}\end{frame}          \end{document}


What does this error message from BibDesk mean?               warning: found " at brace-depth zero in string (TeX accents in BibTeX should be inside braces)      Does it mean I can't use `\"{a}` in BibTeX? Instead should I use `{\"a}`? That sounds weird. Please help me clarify the issues around this warning message.


title: Is there a way to \mskip 0mu plus 1 fill

text: I would often like to use a `\hfil` equivalent inside a normal display math without using some `align` like environment or leaving math mode. Is this possible and if yes how? Is this the wrong approach? If yes is there a better one? The Texbook and TexByTopic are silent on the issue other than that all lengths used by `mskip` have to be in terms of mu which i guess fill can't be expressed in.


title: Textwidth longtable with centered headers

text: I'm trying to create a `longtable` which spans the entire `\textwidth`. Additionally, although the contents of the table use different alignments, all of the header cells should be centered. Based upon e.g. this question, I have come up with the following code:               \documentclass[letterpaper,12pt]{report}          \usepackage[margin=1in]{geometry}     \usepackage{longtable}          \setlength\LTleft{0pt}     \setlength\LTright{0pt}          \begin{document}          \noindent     \begin{longtable}{@{\extracolsep{\fill}} | l | c | c | r | r | }     \hline     \multicolumn{1}{|c|}{\textbf{Header 1}} &         \multicolumn{1}{c|}{\textbf{Header 2}} &         \multicolumn{1}{c|}{\textbf{Header 3}} &         \multicolumn{1}{c|}{\textbf{Header 4}} &         \multicolumn{1}{c|}{\textbf{Header 5}} \\     \hline     \endhead     \end{longtable}          \end{document}      When rendered with `pdflatex`, however, the first column is correctly centered, but the remaining columns seem to be right-aligned instead. I believe that the problem is that I'm misunderstanding how `@{\extracolsep{\fill}}` works in the `longtable` definition. What am I doing wrong?


title: ipe-7.1.4 pdflatex conversion error

text: I am trying to write A (so as to label a point in my figure) in ipe-7.1.4. Apparently, it is done through the following .tex file which I have managed to find in the conversion directory. Note the location of the A and the symbol % following it in the .tex file. The problem is that the pdf file it is producing is empty. I have no idea how to fix this. Can anyone please help? Thanks in advance.               \pdfcompresslevel0     \nonstopmode     \expandafter\ifx\csname pdfobjcompresslevel\endcsname\relax\else\pdfobjcompresslevel0\fi     \ifnum\the\pdftexversion<140\errmessage{Pdftex is too old. Set IPEANCIENTPDFTEX environment variable!}\fi     \documentclass{article}     \newcommand{\PageTitle}[1]{#1}     \newdimen\ipefs     \newcommand{\ipesymbol}[4]{\ipefs 1ex\pdfliteral{(#1) (\the\ipefs) (#2) (#3) (#4) sym}}     \usepackage{color}     \definecolor{red}{rgb}{1,0,0}     \definecolor{green}{rgb}{0,1,0}     \definecolor{blue}{rgb}{0,0,1}     \definecolor{yellow}{rgb}{1,1,0}     \definecolor{orange}{rgb}{1,0.647,0}     \definecolor{gold}{rgb}{1,0.843,0}     \definecolor{purple}{rgb}{0.627,0.125,0.941}     \definecolor{gray}{gray}{0.745}     \definecolor{brown}{rgb}{0.647,0.165,0.165}     \definecolor{navy}{rgb}{0,0,0.502}     \definecolor{pink}{rgb}{1,0.753,0.796}     \definecolor{seagreen}{rgb}{0.18,0.545,0.341}     \definecolor{turquoise}{rgb}{0.251,0.878,0.816}     \definecolor{violet}{rgb}{0.933,0.51,0.933}     \definecolor{darkblue}{rgb}{0,0,0.545}     \definecolor{darkcyan}{rgb}{0,0.545,0.545}     \definecolor{darkgray}{gray}{0.663}     \definecolor{darkgreen}{rgb}{0,0.392,0}     \definecolor{darkmagenta}{rgb}{0.545,0,0.545}     \definecolor{darkorange}{rgb}{1,0.549,0}     \definecolor{darkred}{rgb}{0.545,0,0}     \definecolor{lightblue}{rgb}{0.678,0.847,0.902}     \definecolor{lightcyan}{rgb}{0.878,1,1}     \definecolor{lightgray}{gray}{0.827}     \definecolor{lightgreen}{rgb}{0.565,0.933,0.565}     \definecolor{lightyellow}{rgb}{1,1,0.878}     \definecolor{black}{gray}{0}     \definecolor{white}{gray}{1}     \def\ipesetcolor{\pdfcolorstack0 push{0 0 0 0 k 0 0 0 0 K}}     \def\iperesetcolor{\pdfcolorstack0 pop}                         \pagestyle{empty}     \newcount\bigpoint\dimen0=0.01bp\bigpoint=\dimen0     \begin{document}     \begin{picture}(500,500)     \setbox0=\hbox{\normalsize     \ipesetcolor     A%     \iperesetcolor}     \count0=\dp0\divide\count0 by \bigpoint     \pdfxform attr{/IpeId /004e4300 /IpeStretch 1 /IpeDepth \the\count0}0\put(0,0){\pdfrefxform\pdflastxform}     \end{picture}     \end{document}


title: Add arrow to 3D pgfplot

text: How to add an arrow (cf red arrows below) in a 3D plot (or 2D plot should be similar) in pgfplots ? The arrow has not to be specifically aligned with the label but could be placed closer to the axis. ![enter image description here](http://i.stack.imgur.com/mAzdo.png)


title: Declaring a newcommand for a single letter in mathcal

text: I am trying to enter a command that references the `\mathcal` font for single letter in LaTeX. Below is what I am trying and it doesn't seem to work, would appreciate any help.                \newcommand {\until} {\mathcal {u} }      I believe by doing this, when I type `\until` it should apply the `u` in the desired font.


title: TikZ picture shapes

text: I am very new to the TikZ package, and I need to draw some flow chars by using the following shapes. However I couldn't figure out how to draw the 4th and and 6th ones below. It would be very nice (for completeness) to help with all of the shapes in the list below. ![enter image description here](http://i.stack.imgur.com/fErmQ.jpg) Your help will be greatly appreciated. **Note:** I have visited Node shapes TikZ but it contains some other shapes.


title: How to add partial horizontal lines in horizontally aligned math environments

text: I'm having trouble writing a proof of a theorem in LaTeX, where I need to sum a set of inequalities and continue the proof with this sum. The problem I have is that I'd like to introduce this step visually like in the following picture: ![desired final output](http://i.stack.imgur.com/BnbpI.png) but I can't get that horizontal line. In this picture, I added it by editing the LaTeX output using an image editor. I'm using the `align*` environment provided by `amsmath`. Is there any way for me to do what I want using a horizontally aligned math environment (like `align*`)?


title: Align bput on ncline

text: I wanna place some text below a line. So I'm using `\bput`. Works great, but text is always centered. Is there a way to align it left / right? See the picture for better bellow.               \documentclass[letterpaper,dvips]{article}          \usepackage[utf8]{inputenc}          \usepackage{pst-all}     \usepackage{pst-eps}          \begin{document}              \pagestyle{empty}     \begin{TeXtoEPS}     \fontfamily{phv}\selectfont     \psset{xunit=1cm,yunit=1cm,runit=1cm}     \begin{pspicture}(0,-8.3)(16,0.0)         \psframe[fillstyle=solid, linewidth=1pt](0,-8.3)(16,0.0)         \psset{linewidth=2pt}              \psframe[fillstyle=none, linewidth=0pt](0.5,-0.6)(15.5,-3.0)         \pcline[linestyle=solid, linecolor=black]{<->}(1.0,-1.5)(15.0,-1.5)         \bput*{:U}(0.1){LongerWord1}         \bput*{:U}(0.5){LongerWord2}         \bput*{:U}(0.90){LongerWord3}              \psframe[fillstyle=none, linewidth=0pt](0.5,-3.6)(15.5,-6.0)         \pcline[linestyle=solid, linecolor=black]{<->}(1.0,-4.5)(15.0,-4.5)         \bput*{:U}(0.1){Short1}         \bput*{:U}(0.5){Short2}         \bput*{:U}(0.90){Short3}          \end{pspicture}          \end{TeXtoEPS}          \end{document}      ![enter image description here](http://i.stack.imgur.com/fVfJx.png)


title: Making a text right-sided under an equation in LaTeX?

text: I'm trying to put a text on the right side under an equation in LaTeX. Here is my code:               \begin{dmath}     \mbox{log-likelihood ratio} = A \log{ \left( \frac{A/(A+B)}{(A+C)/N} \right) } +      B \log{ \left( \frac{B/(A+B)}{(B+D)/N}  \right)} +     C \log{ \left( \frac{C/(C+D)}{(A+C)/N}  \right)} +     D \log{ \left( \frac{ D/(C+D) }{ (B+D)/N }  \right)}      \end{dmath}          where $N = A + B + C + D      Here's the result: ![enter image description here](http://i.stack.imgur.com/BhxuU.png) I want "where N = A + B + C + D" to be under the equation on the right side. How to do that?


title: Fontspec demands ifpdf.sty?

text: I am using Arch Linux, but I installed TeX Live from the network, so that I can use `tlmgr` to install a minimal set of packages that I can add to as needed. Here is a `.tex` file:               \documentclass{minimal}     \usepackage{fontspec}     \begin{document}     Forsan et haec olim meminisse iuvabit.     \end{document}      Trying to run XeLaTeX on it gets me:               ! LaTeX Error: File `ifpdf.sty' not found.      If I run:               tlmgr install ifpdf      I get:               package ifpdf not present in package repository.      I am uncertain how to proceed, and have several related questions:   1. Does `tlmgr` simply fail to install dependencies? I installed `fontspec` with no problem. If it requires `ifpdf` why was this not installed with `fontspec`?   2. Since `ifpdf` seems to be a legitimate package, why is it not installing?   3. Is there some better way I could investigate this problem on my own?


title: How to inline tikzexternal.sty

text: I am preparing a document, which uses `pgfplots`, for submission. I externalized figures etc. successfully. Though, now I'm facing a serious problem: On the target system the `tikzexternal.sty` file may not be used (not even if I supply it). So, I tried to inline it in my `.tex` file. This results in the following error:               ) (./tikzexternal.sty     ! Missing number, treated as zero.     <to be read again>                     @     l.24 \toksdef\t@                 tikzexternal@tmpa=0     A number should have been here; I inserted `0'.      However, in tikzexternal.sty there is a comment, that inlining the code is in principle possible. I'd like to know what I'm doing wrong or how to modify the tikzexternal code to make it work. Here is an MWE, assuming that external figures have been generated:               \documentclass[]{article}               \usepackage{graphicx}          %\usepackage{pgfplots}     %\usepgfplotslibrary{external}     %\tikzexternalize[mode=list and make]                    %\usepackage{tikzexternal}  % <--- WORKS!!     \input{tikzexternal.sty}    % <--- FAILS!!          \tikzexternalize                    \begin{document}          \begin{figure}[h]     \begin{tikzpicture}          \begin{axis}[width=\columnwidth]             \addplot[dashed,very thick,color=gray]{sin(x)}; \label{tikz:test_1};         \end{axis}     \end{tikzpicture}     \caption[labelInTOC]{ \ref{tikz:test_1}}     \label{fig:test}     \end{figure}          \end{document}


title: how can I add a custom subject line below the \opening section of in scrlttr2 doc?

text: I'm struggling with my first latex project and I need to add a subject line, and make it bold, below the opening salutation in letter. Any help much appreciated


title: Trim spaces in a macro with expl3

text: I'm inserting graphics from data in a csv-file and due to lazy input I have to get rid of leading and trailing spaces. It works fine with the `trimspaces` package.               \documentclass{article}     \usepackage{expl3,graphicx}     \usepackage{trimspaces}     \begin{document}          \def\testA{example-image-a }     %\includegraphics{\testA} %error          \def\testB{ example-image-a}     %\includegraphics{\testB} %error          \makeatletter     \trim@spaces@in\testA     \includegraphics{\testA}          \trim@spaces@in\testB     \includegraphics{\testB}               \end{document}      By curiosity I tried to get this with `expl3` and `\tl_trim_spaces:n` but didn't find a sensible way to store the content of the commands without the spaces in a command. Does someone know how to do it?