title: How to line up a tikz image with the bottom of a cell in a tabular

text: The code for the two images below is identical except for the colors and the 4pt in the bounding box in the bottom image. In the bottom image the diagonal line touches the corner of the blue area; in the top image it does not touch the corner of the purple area. **I'd like to know where the 4pt comes from, i.e. what LaTeX length contains it.** Basically, I'd like to be able to know the distance between the bottom of the diagonal line and the purple area in the top graph regardless of the environment (font sizes, lengths people have chosen, etcetera) so that I can **automatically** move whatever content is in the tikz image in the top left corner of the tabular by the same amount; I'm _not_ looking for an ad hoc fix. I've looked in various places for an answer to no avail. ![PDF OUTPUT](http://i.stack.imgur.com/7wZk2.jpg)               \documentclass[12pt]{article}          \usepackage[svgnames]{xcolor}     \usepackage{tikz}     \usepackage{colortbl}               \begin{document}               \begin{tabular}{rccc}%      \cellcolor{Yellow}%     \begin{tikzpicture}[]     \path[use as bounding box]  (0,0) -- (4,0) -- (4,4) -- (0,4) -- cycle;     \draw (4cm+\tabcolsep,0)--(2cm+\tabcolsep,2);      \end{tikzpicture}     & L & R\\     U& \cellcolor{Purple} abra & & \\     \end{tabular}          \vspace*{3cm}          \begin{tabular}{rccc}%      \cellcolor{Orange}%     \begin{tikzpicture}[]     % NOTE 4pt ON NEXT LINE          \path[use as bounding box]  (0,4pt) -- (4,4pt) -- (4,4) -- (0,4) -- cycle;     \draw (4cm+\tabcolsep,0)--(2cm+\tabcolsep,2);     \end{tikzpicture}     & L & R\\     U& \cellcolor{Blue} abra & & \\     \end{tabular}          \end{document}


title: badbox of "underful hbox (badness 1158)"

text: I wrote the following reference in my `.bib` file:               @ARTICLE{Auvinet11,       author = {E. Auvinet and F. Multon and A. St-Arnaud and J. Rousseau and J. Meunier},       title = {Fall Detection With Multiple Cameras: An Occlusion-Resistant Method \\         Based on 3-D Silhouette Vertical Distribution},       journal = {Information Technology in Biomedicine},       year = {2011},       volume = {15},       pages = {290-300},     }      Because of this reference, LaTeX gives me a `badbox` warning               underful hbox (badness 1158)      and the output `.dvi` file is like the following: ![enter image description here](http://i.stack.imgur.com/jb9R6.png) How can I solve this problem? ### Postscript Taking David Carlisle and Svend Tveskaeg's suggestion, I added \hyphenation{bio-med-i-cine} to my preamble. The result becomes: ![enter image description here](http://i.stack.imgur.com/jb9R6.png) This is better, but the author part is still not correct. One more question, how does Latex decide to break the sentence? Does it break according to the correct hyphenation points of the word?


title: Errors from pdftexcmds.sty

text: I have a book done in latex, which someone on another continent is trying to compile. The sources are here: http://www.lightandmatter.com/cgi- bin/gitweb.cgi . It compiles for me but not for him. The latex output that he emailed me is 30,000 lines, but the relevant section appears to be the following:               Writing index file lm.idx     {/usr/local/texlive/2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map}{fullembe     d.map}     No file lm.aux.     (/usr/local/texlive/2012/texmf-dist/tex/latex/tipa/t3cmr.fd)     (/usr/local/texlive/2012/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     ) ABD: EveryShipout initializing macros     (/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty     (/usr/local/texlive/2012/texmf-dist/tex/generic/oberdiek/ifluatex.sty)     ! Extra \else.     <argument> ...kslashchar pdfdraftmode found}\else                                                       \@PackageInfoNoLine {pdfte...     l.428 }          ! Extra \fi.     <argument> ...raftmode is ignored in DVI mode}\fi          l.428 }          ) (/usr/local/texlive/2012/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty     (/usr/local/texlive/2012/texmf-dist/tex/latex/oberdiek/grfext.sty        Can anyone suggest what this might be or how to go about debugging it? We're both on linux. We did have a bunch of problems where the git archive was missing files, but this doesn't smell like a missing file to me.


title: Working with MiKTeX and WinEdt together

text: How can I work by using WinEdt? Before that I just knew MiKTeX 2.8 and worked with TeXmaker and type with easily, but for some formula my friend introduced me to WinEdt and I don't know the relationship between those. How to I make a PDF with WinEdt? I'd like to learn working with both of them.


title: \maketitle print the below mentioned formats

text: * I am using `article` class file. I need the output each author command will be printed in seperate authors. But the output is printed last authors only.    * How to implement the optional box values like `[aff={1}]`. Kindly provide the ideas.   * How to print the abstract text before the maketitle. Kindly provide the ideas The below mentioned coding is insert inside the tex file:               \author[aff={1}]{Rahuman}     \author[aff={2}]{Kumaran}     \address{address one}     \address{address two}      My Required ouput is:               Rahuman1, Kumaran2     1 address one     2 address one


title: Problems with updated biblatex 2.9 in TeX Live 2014

text: I have problems after updating all Tex Live 2014. This is the error in .log: > Package biblatex Warning: File 'Desarrollo.bbl' is wrong format version - > expected 2.4. `biblatex` version which is installed is 2.9a; I'm using XeLaTeX. Have you any recommendations? It is my thesis. PD. I got another error, maybe related: > ! Incomplete \iffalse; all text was ignored after line 1216. ## Update               \documentclass[11pt,a4paper]{article}          \usepackage[spanish,es-noshorthands]{babel}          \usepackage{inputenc}     \usepackage{fontenc}          \usepackage{csquotes}          \usepackage{tikz}     \usetikzlibrary{arrows,patterns}     \usepackage{dateiliste}     \listfiles          \usepackage[backend=biber,style=numeric,defernumbers,url=true,maxnames=100]{biblatex}     \usepackage{hyperref}     \addbibresource{bib.bib}          \makeatletter     \def\ifskipbib{\iftoggle{blx@skipbib}}     \makeatother          \def\initlist{}     \forcsvlist{\listadd\initlist}{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z}     \forlistloop{\DeclareBibliographyCategory}{\initlist}     \AtDataInput{\ifskipbib{}{\addtocategory{\thefield{sortinit}}{\thefield{entrykey}}}}          %To add square brackets in supercites     \DeclareCiteCommand{\supercite}[\mkbibsuperscript]       {\iffieldundef{prenote}          {}          {\BibliographyWarning{Ignoring prenote argument}}%        \iffieldundef{postnote}          {}          {\BibliographyWarning{Ignoring postnote argument}}%        \bibopenbracket}%       {\usebibmacro{citeindex}%        \usebibmacro{cite}}       {\supercitedelim}       {\bibclosebracket}          \usepackage{pgfplots}     \usepackage{tikzscale}     \usepackage{filecontents}     \pgfplotsset{compat=1.9}          \usepackage{textcomp}          \begin{document}          Esta es mi referencia\cite{jiang2012stairs}, and ohters\cite{chopra2012dynamics}. And~\cite{updateascesei41}.          \printbibheading     \foreach \letter in {A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z}{%       \begingroup\edef\myprintbib{\endgroup\printbibliography[category=\letter,prefixnumbers=\letter,heading=none]}\myprintbib}          \end{document}      And the bibliography:               @book{chopra2012dynamics,       title={Dynamics of Structures},       author={Chopra, A.K.},       isbn={9780133072693},       year={2012},       publisher={Pearson Education}     }          @article{updateascesei41,     title={Update to ASCE/SEI 41 Concrete Provisions},     author={Kenneth J. Elwood and Adolfo B. Matamoros and John W. Wallace and Dawn E. Lehman and Jon A. Heintz and Andrew D. Mitchell and Mark A. Moore and Michael T. Valley and Laura N. Lowes and Craig D. Comartin and Jack P. Moehle},     journaltitle={Earthquake Spectra},     institution={Earthquake Engineering Research Institute},     year={2007},     volume={23},     issue={3},     pages={493-423}     }          @article{jiang2012stairs,         author={Huanjun Jiang and Haiyan Gao and Bin Wang},         title={Seismic damage analyses of staircases in RC frame structures},         journaltitle={Advanced Materials Research},         volume={446-449},         issuetitle={Trends in Civil Engineering},         year={2013},         pages={2326--2330},         addendum={Publisher: Trans Tech Publications, Switzerland},         }


title: Access specific characters in LuaTeX

text: Recently, I switched from XeTeX to LuaTex for a document of mine. However, there is a feature which I do not immediately see how to convert: Accessing specific characters. In particular, I need the upright double quote. In the font I use, however, the standard `\dq` command produces upper 99 quotes. In XeTeX, I therefore redefined the command:               \renewcommand\dq{\XeTeXglyph\XeTeXglyphindex"quotedbl"}        1. How can I do that in general, ie. how can I access all the glyphs in the font, whereever they might be placed (even without a codepoint, perhaps)?   2. Is there another way to access the upright double quote?


title: \lowercase inside \url

text: Why is this snippet:               \newcommand{\Subject}{Skeleton}     \url{http://www.cheatsheet.jim.pm?subject=\lowercase{\Subject{}}}      rendered to this?               http://www.cheatsheet.jim.pm?subject=\lowercase{Skeleton}      and **not** the intended:               http://www.cheatsheet.jim.pm?subject=skeleton


title: Tree in a treenode

text: Is there a way to insert a Tree (with depth 1) in a Tree-node? Which package to use and how to accomplish that?


title: drawing an arrow to a table cell

text: I have to draw an arrow to a table like in this picture. ![http://dl.dropbox.com/u/2793099/ex.png](http://i.stack.imgur.com/83qN7.png)


title: how to ensure no overlap between arrows and text in a commutative diagram?

text: Consider the figure below               \documentclass{article}     \usepackage{amsmath}     \usepackage{tikz-cd}     \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri,calc,shapes.misc,decorations.markings}     \tikzset{degil/.style={                     decoration={markings,                     mark= at position 0.5 with {                     \node[transform shape] (tempnode) {$\backslash$};                     %\draw[thick] (tempnode.north east) -- (tempnode.south west);                     }                     },                     postaction={decorate}     }     }          \begin{document}          %\tikzcdset{row sep/normal=1cm}          \begin{tikzcd}[arrows=Rightarrow,column sep=large, row sep=large]         &  \text{$Y$ is mean indt. of $X$} \arrow[shift right=0ex]{dr}{} \arrow[degil,shift right=1.5ex]{dl}{}  &  \\       \text{Stochastic Independence} \arrow[shift right=0ex]{ur} \arrow[shift left=1.5ex]{dr}{}  &   & C(X,Y)=0 \arrow [degil,shift right=1.5ex]{ul} \arrow [degil,shift left=1.5ex]{dl} \\       & \text{$X$ is mean indt. of $Y$} \arrow[shift left=0ex]{ur} \arrow[degil,shift left=0ex]{ul}{} &      \end{tikzcd}          \end{document}      I tried using the fine tuning options but still I face two (different) issues:   1. How to make the diagram more elegant in the sense that arrows are regular and are neatly arranged from the text. (perhaps using the rlap and llap macros of stackengine package?)   2. Also, how to ensure the figure is horizontally at the centre of the page? [Answered by egreg in comments] * * * BTW, thanks to Enrico's solution here I modified it a bit but the key issue (no. 1) above remains               \documentclass{article}     \usepackage{amsmath}     \usepackage{tikz-cd}     \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri,calc,shapes.misc,decorations.markings}     \tikzset{degil/.style={                     decoration={markings,                     mark= at position 0.5 with {                     \node[transform shape] (tempnode) {$\backslash$};                     %\draw[thick] (tempnode.north east) -- (tempnode.south west);                     }                     },                     postaction={decorate}     }     }          \begin{document}          %\tikzcdset{row sep/normal=1cm}          \[\begin{tikzcd}[arrows=Rightarrow,column sep=large, row sep=large]         &  \begin{tabular}{@{}c@{}} $Y$ is mean \\ indt. of $X$ \end{tabular}   \arrow[shift right=0ex]{dr}{} \arrow[degil,shift right=1.5ex]{dl}{}  &  \\       \begin{tabular}{@{}c@{}} Stochastic \\ Independence \end{tabular}\arrow[shift right=0ex]{ur} \arrow[shift left=1.5ex]{dr}{}  &   & C(X,Y)=0 \arrow [degil,shift right=1.5ex]{ul} \arrow [degil,shift left=1.5ex]{dl} \\       & \begin{tabular}{@{}c@{}} $X$ is mean \\ indt. of $Y$ \end{tabular} \arrow[shift left=0ex]{ur} \arrow[degil,shift left=0ex]{ul}{} &      \end{tikzcd}\]                              \end{document}


title: How do pages included with \includepdf using pdfpages differ from regular pdf pages produced by pdflatex?

text: I wondered if anybody could explain what differences there are in the PDF which would differentiate   1. pages produced by running `pdflatex` on the `.tex` file where the code is part of that file and   2. pages produced by running `pdflatex` on the `.tex` file where the pages are the result of `\includepdf` and the included pdfs were produced by a separate run of `pdflatex` on separate `.tex` files. For example:               \documentclass{article}     \usepackage{pdfpages}     \begin{document}     Here is a page of the first kind.     \clearpage     \includepdf{pdfpage.pdf}     \end{document}      Where `pdfpage.pdf` is the result of running `pdflatex` on               \documentclass{article}     \begin{document}     Here is a page of the second kind.     \end{document}      I am interested because although my compiled documents print fine on printers, if I try to print from a photocopier, it will not print anything after the first `includepdf`. (If there is nothing before this, it gives an error; otherwise, it just prints the pages which came before that point.) For various reasons, I have to print some things from the photocopier rather than a printer and so this is obviously quite awkward. The problem is not specific to any particular document but appears to be general to documents I produce in this way. So what might the photocopier but not the printer see or not see at the point where `\includepdf` occurred in the source? (And is there anything I can do about it?) Note that the MWE is not a real one because that would require me to run test documents on machines at work and I would prefer to do that only if I cannot learn anything about the problem in any other way. So the example represents the pattern I've noticed but I cannot rule out something else being the real issue at this point.


title: Problem on lines of table

text: I wanted to create table but the following problem occurred: ![Problem on Table](http://i.stack.imgur.com/epNr7.png) The problem is that the lines are not long enough. Code:               \begin{table}[htp]     \caption{Gross errors found using plausible value check for ambient temperature in Nodes [25-28-29-31-32] }         \label{tab:gr}     \centering     \footnotesize\setlength{\tabcolsep}{2.5pt}     \begin{tabular}{l@{\hspace{6pt}} *{22}{c}}     \toprule     \bfseries Type & \multicolumn{22}{c}{\bfseries Node name} \\     \cmidrule(l){3-23}     & 25 & 28 & 29 & 31 & 32                 \\     \midrule     \bfseries A     & 20276 & 20302 & 20267 & 20263 & 20257    \\     \bfseries B     & 1376 & 1321 & 83 & 1329 & 1502             \\     \bfseries C     & 0 & 0 & 0 & 0 & 0                           \\     \bottomrule     \addlinespace     \multicolumn{23}{l}{A: Total number of observations}\\     \multicolumn{23}{l}{B: Number of faults}     \multicolumn{23}{l}{C: Number of faults in 2007-09-29}     \end{tabular}     \end{table}


How can I move a "text along path" vertically? Currently, I'm using a path with modified endpoints to place the text, and then draw the actual line.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations,decorations.text}     \begin{document}     \begin{tikzpicture}       \node (p1) at (0,0) {1};       \node (p2) at (5,0) {2};            \path[         postaction={           decorate,           decoration={             text along path,             text align=center,             text={|\small\color{blue}|My curved text}           }         }       ]       (p1.25) to [bend left=15] (p2.155);            \draw (p1) edge[<->,bend left=15] (p2);     \end{tikzpicture}     \end{document}      Bonus points if the solution works regardless of the path orientation (i.e. move the letters along a line perpendicular to the path).


title: How to print all ligatures in a given font?

text: For comparison purposes (between fonts), is there a way to print all available ligatures in a given font? Where do those ligatures reside in the font map?


title: List of LaTeX ligatures

text: Is there a comprehensive list of the LaTeX ligatures in basic font(s)? Besides the long dashes formed by `--` and `---`, and some two and three letter combinations that start with `f` (like `fi`), I can't think of any. I am not doing anything really fancy, just using RevTeX4 class to format my research papers. I searched on the web but didn't find a comprehensive list, though perhaps I missed something. Any help?


title: What is the "correct" way of embedding text into math mode?

text: Lets say I have something like:               \[ Let x = number of cats \]      (This is a contrived example, but pretend we are actually inside a long `align` environment block...) "Let" and "number of cats" need to be written like normal text, while x= needs to be math type text. I've seen this:               \[ \mbox{Let } x = \mbox{ number of cats} \]      and this:               \[ \textrm{Let } x = \textrm{ number of cats} \]      They seem to produce equivalent output, but I'm not sure which is the "correct" one. Also, they are not ideal in that the extra space needs to be placed inside the text mode block, otherwise it is ignored as math mode and butts the text right up against the math. Ideally there would be some command which allowed embedding text into an equation, which correctly inserted leading and trailing space around the block as required without adding space inside the text block. How does one do that "correctly"?


title: How to write text in side the equation

text: I have to write               Accelerating model:            f(a)=exp(-E/RT)                   (1.1)      I do not know how to write that. I have written:               \begin{equation}      $Accelerating model$: \hspace{20 mm}     f(\alpha)= n{\alpha}^{\frac{{(n-1)}}{n}      \end{equation}       but the output is `Accelerating model: f(a)=exp(-E/RT)(1.1)` There is no space in between the Equation and equation number. Can anyone help me in this regards?


> **Possible Duplicate:**   >  What is the "correct" way of embedding text into math mode? What formatting is perfect for word in an equation? Is `\text{ text is here }` the best way? For example,               a = x_j \text{ for } i = 1, 2, \dots, M


title: How do you display words, not variables, in equations in LaTeX?

text: In particular, I need to display the following: P(success) = size of successful region/size of possible region But with a nice divisor line for the fraction. If I just enter this in typical fashion LaTeX makes each letter look like a variable:               $P(success) = \frac{size of successful region}{size of possible region}$


title: Typing problem of word in $ $

text: > **Possible Duplicate:**   >  What is the "correct" way of embedding text into math mode? when I use `$$` for mathematics typing, sometimes like `$\left\{ x: x is an element of A\right\}$`, then it shows "isanelement" by a single word. How do I manage that?


title: How to use tex -ini, tex -fmt, initex and fmtutil?

text: What are the roles of each of these commands? What is the good command to create a new format ?


title: Tombstone misplaced with `multline*` and `\qedhere`

text: It looks like the end-of-proof symbol is misaligned if `multline*` and `\qedhere` are used. Or am I just using them wrong?               \documentclass{article}     \usepackage{amsthm,amsmath}     \begin{document}     \begin{proof}      Only words here.     \end{proof}     \begin{proof}      \begin{equation*}       A=form(u)la. \qedhere      \end{equation*}     \end{proof}     \begin{proof}      \begin{multline*}       A=form(u)la.\\ with/many*lines \qedhere      \end{multline*}     \end{proof}     \end{document}      ![enter image description here](http://i.stack.imgur.com/1Yzx4.png) Is there a way to fix this?


title: tikz calendar, month label position

text: I would like to make a smaller distance between month label and day headings.               \documentclass{article}     \usepackage[top=3cm, bottom=3cm, left=2cm, right=1cm]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[serbian]{babel}     \usepackage{tikz}     \usetikzlibrary{calendar}     \usepackage{pdflscape}     \clearpage     \thispagestyle{empty}     \makeatletter%     \tikzoption{day headings}{\tikzstyle{day heading}=[#1]}     \tikzstyle{day heading}=[]     \tikzstyle{day letter headings}=[         execute before day scope={ \ifdate{day of month=1}{%           \pgfmathsetlength{\pgf@ya}{\tikz@lib@cal@yshift}%           \pgfmathsetlength\pgf@xa{\tikz@lib@cal@xshift}%           \pgftransformyshift{-\pgf@ya}           \foreach \d/\l in {0/Ponedeljak,1/Utorak,2/Sreda,3/Četvrtak,4/Petak,5/Subota,6/Nedelja} {             \pgf@xa=\d\pgf@xa%             \pgftransformxshift{\pgf@xa}%             \pgftransformyshift{\pgf@ya}%             \node[every day,day heading]{\small\l};%           }          }{}%       }%     ]          \makeatother%          \begin{document}     \begin{landscape}     \begin{center}     \begin{tikzpicture}[scale=6,font=\fontsize{25}{12}\selectfont\bfseries]     \calendar (mycal) [dates=2013-05-01 to 2013-05-31,week list,month label above centered,month text=\textcolor{black}{Maj} \%y-, day yshift = 0.4cm,              day letter headings];     \draw[black, line width=2pt] (mycal-2013-05-08) circle (5pt) +(-5pt,-5pt) rectangle +(5pt,5pt) ;     \draw[black, line width=2pt] (mycal-2013-05-10) circle (5pt);     \draw[black, line width=2pt] (mycal-2013-05-12) circle (5pt);     \draw[black, line width=2pt] (mycal-2013-05-15) circle (5pt);     \draw[black, line width=2pt] (mycal-2013-05-17) circle (5pt);     \draw[black, line width=2pt] (mycal-2013-05-19) circle (5pt);     \draw[black, line width=2pt] (mycal-2013-05-22) circle (5pt);     \draw[black, line width=2pt] (mycal-2013-05-24) circle (5pt);          \end{tikzpicture}     \end{center}     \hfill \Large legenda \\          *Napomena\hfill \begin{tikzpicture}     \draw[black, line width=1pt] circle (6pt);     \end{tikzpicture}~~~termini          Termine je moguće iskoristiti do 8. juna.\hfill \begin{tikzpicture}     \draw[black, line width=1pt] circle (6pt)+(-6pt,-6pt) rectangle +(6pt,6pt);     \end{tikzpicture}~~~početak/kraj termina     \end{landscape}     \end{document}


title: Tikz beamer highlight different nodes in presentation using againframe

text: I'm working on a presentation in Beamer, I have a tikz flow chart that I want to repeat after a block on the chart is handeld in the presentation. To make it visually easy for the users I would like to highlight the next block I'm going to talk about and dim the blocks that I've already discussed. I figured out how to create an alert style for the block that should be highlighted. Below is my code.               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes,positioning}     \usepackage{xcolor}               \definecolor{uablue}{RGB}{0,61,100}     \colorlet{uablue100}{uablue}     \colorlet{uablue75} {uablue!75!white}     \colorlet{uablue50} {uablue!50!white}     \colorlet{uablue25} {uablue!25!white}     \colorlet{uablue10} {uablue!10!white}     \colorlet{uablue5}  {uablue!5!white}          \definecolor{uared}{RGB}{126,0,47}     \colorlet{uared100}{uared}     \colorlet{uared75} {uared!75!white}     \colorlet{uared50} {uared!50!white}     \colorlet{uared25} {uared!25!white}     \colorlet{uared10} {uared!10!white}     \colorlet{uared5}  {uared!5!white}     \begin{document}          \begin{frame}     \label{overview}     \frametitle{Overview}     \begin{figure}     \centering     \tikzstyle{block} = [rectangle, draw, fill=blue!25,text width=4em, text centered, rounded corners, minimum height=2em, line width=1pt ]     \tikzstyle{line} = [draw, -latex', line width=1pt]     \tikzstyle{alert} = [text=red, fill=red!25, draw=red]          \begin{tikzpicture}[node distance = 2cm, auto]         % Place nodes         \node [block, alert] (client) {Web Client};         \node [block, right of=client, node distance=3cm] (python) {Python Service};         \node [block, right of=python, node distance=3cm] (wavefront) {Wavefront};         \node [block, above of=wavefront] (AMCL) {AMCL};         \node [block, below of=wavefront] (VFH) {VFH};         % Draw edges         \path [line] (client) -> (python);         \path [line] (python) -> (client);         \path [line] (python) -- (wavefront);         \path [line] (wavefront) -- (AMCL);         \path [line] (AMCL) -- (python);         \path [line] (wavefront) -- (VFH);     \end{tikzpicture}     \end{figure}     \end{frame}          \end{document}      So the idea is that I only define the tikzfigure once and when I use `\againframe` I can select which block should be highlighted and which should be dimmed. I've looked at other examples but they wanted to highlight different parts in sequential frames. I use this frame as my 'overview frame' EDIT: I have my overview frame, then some other frames and then I want to repeat my overview frame again using `\againframe` and select a different block to highlight. thanks!


title: threeparttablex table notes for tabu tabulars with less than \textwidth

text: `threeparttablex` can be used to add table notes to `tabu` tabulars*. If the tabular spans \textwidth, the output is as expected. It seems however that the _tablenotes_ environment does not adjust its width if the tabular is narrow, although of course this would be desirable. 1) Is there any option/command which is intended to automatically adjust the _tablenotes_ environment's width? 2) If not, is there a workaround? @ 2) According to this answer, `threeparttablex` does know the tabular's width. Moreover, given that for the `threeparttable` package, which `threeparttablex` supposedly builds upon, the package documentation states "you can redefine the whole tablenotes environment", it seems that it should be possible to find a workaround.               \documentclass{article}     \usepackage{booktabs}     \usepackage{tabu}     \usepackage{threeparttablex}          \begin{document}         \centering     \begin{ThreePartTable}         \begin{tabu} to .4\textwidth {XX}             a & b   \\\toprule             0 & 1   \\\bottomrule         \end{tabu}         \begin{tablenotes}             \footnotesize             \item[*] This is a long table note text, long enough to exceed the table's width.         \end{tablenotes}     \end{ThreePartTable}     \end{document}      *`threeparttablex` is designed to extend `threeparttable` to `longtable`. Even though the manual does not mention it, `threeparttablex` works with `tabu`, which `threeparttable` does not. Replacing `threeparttablex`'s _ThreePartTable_ environment in the above code with a _threeparttable_ environment gives an "Extra }, or forgotten \endgroup." error.


title: Citing a Series of Articles with BibTeX

text: I use BibTeX and BibDesk to manage my bibliography. What I would like to do is cite a series of articles with only one citation in the bibliography. This seems to have become fairly standard practice amongst other authors citing this series of articles. The series of articles all occur in the same journal but spread over different volumes. The method of citation I have currently seen is > G. Lusztig, _Character Sheaves I-V_ , Adv. in Math. **56** (1985), no. 3, > 193-237; **57** (1985), no. 3, 226-265; **57** (1985), no. 3, 266-315; > **59** (1986), no. 1, 1-63; **61** (1986), no. 2, 103-155. Is this achievable with BibTeX? Slightly less preferable but acceptable would be to list all of the papers individually in the bibliography with the same reference key. For instance something like > [Lus85] G. Lusztig, _Character Sheaves I_ , Adv. in Math. **56** (1985), no. > 3, 193-237. > > [Lus85] G. Lusztig, _Character Sheaves II_ , Adv. in Math. **57** (1985), > no. 3, 226-265. > > [Lus85] G. Lusztig, _Character Sheaves III_ , Adv. in Math. **57** (1985), > no. 3, 266-315. > > [Lus85] G. Lusztig, _Character Sheaves IV_ , Adv. in Math. **59** (1986), > no. 1, 1-63. > > [Lus85] G. Lusztig, _Character Sheaves V_ , Adv. in Math. **61** (1986), no. > 2, 103-155. Are either of these two options achievable?


title: Adding Column to Table

text: \begin{center}     \captionof{table}{Risk Analysis} \label{tab:title}       \begin{tabulary}{0.7\textwidth}{LCL}       Risk      & \ Probability (1-5)  & \ Impact (1-5)  \\     \hline     Software cannot be completed on time. & 2 & 5  \\     System requirements not adequately identified. & 3 & 5 \\     \end{tabulary}       \end{center}      Have a table above, I am trying to create another column called 'Priority (1-5) - ideas on how to do that? * * * When I add an extra column, LaTeX throws up and says > `Extra alignment tab has been changed to \cr. (\end{tabulary} ...)`


title: Multiline title vertical alignment using classicthesis and arsclassica

text: I would like to align the 2nd line of my title to have the same baseline with the chapter number. What I have now is ![enter image description here](http://i.stack.imgur.com/XAyVj.png) , but I would like to have![enter image description here](http://i.stack.imgur.com/EDkJ5.png) instead. I found that the tweak in How to get multi-line chapter name with ClassicThesis package? still leave the alignment problem (and I can't comment there), which are either change the `\titleformat{\chapter}[block]` to `\titleformat{\chapter}[hang]` or the use of `tabularx` package, which results in ![enter image description here](http://i.stack.imgur.com/Bd1y3.png) Although it does look better, but IMHO doesn't look quite right. My MWE:               \documentclass[english,fontsize=11pt,paper=a4,twoside,openright,titlepage,numbers=noenddot,headinclude,BCOR=5mm,footinclude=true,cleardoublepage=empty]{scrreprt}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \setcounter{tocdepth}{3}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.     % Classic Thesis Style loader     \makeatother     \input{classicthesis-config.tex}     \usepackage{arsclassica}     \makeatletter     % use Latin Modern instead of Computer Modern sans serif     \renewcommand{\sfdefault}{lmss}          \makeatother          \usepackage{babel}     \begin{document}          \chapter{Conclusions and Recommendations}     \end{document}      , where by the `classicthesis-config.tex` is exactly the same as the LyX version in https://code.google.com/p/classicthesis/. Here, in the MWE the font is different, but I just leave that since it's not relevant. Does anybody have an idea?


title: Using BibTool with BibLaTeX, again

text: I've installed BibTool and it seems to work for e.g. printing a formatted bibliography to the terminal. I'm trying to extract a bibliography from an .aux file from a document compiled with BibLaTeX. As a MWE here's such a document:               \documentclass[12pt, oneside, article, a4paper]{memoir}          \usepackage[backend=biber, natbib, style=authoryear-comp]{biblatex}     \ExecuteBibliographyOptions{alldates=short, language=british, sortcites}          \usepackage{kantlipsum}          \title{BibTool MWE}     \author{Thomas Hodgson}     \date{11 May 2013}     \bibliography{bibtool_mwe}          \begin{document}     \maketitle          \kant          \citet{Melville2007}          \printbibliography     \end{document}      This compiles, and generates a bib tool_mwe.aux file that looks like this:               \relax      \providecommand*{\memsetcounter}[2]{}     \abx@aux@sortscheme{nyt}     \@writefile{toc}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }     \@writefile{lof}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }     \@writefile{lot}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }     \abx@aux@cite{Melville2007}     \abx@aux@page{1}{3}     \@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {section}{References}{3}}     \abx@aux@page{2}{3}     \memsetcounter{lastsheet}{3}     \memsetcounter{lastpage}{3}      And, in case it's necessary here's the .bib file:               @book{Melville2007,         Author = {Melville, Herman},         Booktitle = {Moby-Dick},         Date-Added = {2013-05-12 09:35:11 +0000},         Date-Modified = {2013-05-12 09:37:33 +0000},         Location = {London},         Publisher = {Vintage},         Title = {Moby-Dick},         Year = {2007}}      When I put the following in the command line BibTool produces a blank line, when I leave it with ctrl-D it generates a .bib file, but it's empty.               bibtool -x bibtool_mwe.aux -o test.bib      For a while I thought this was the same problem as this question. I'm using BibLaTeX as well. But I was getting similar error messages only when I got BibTool's syntax one. In any case, my problem couldn't be solved in the way suggested by the answer to that question because my .aux file is different to the one described there.


title: Should I use center or centering for figures and tables?

text: What is the correct way to center figures and tables (`figure`, `table`)?               \begin{center}     ...     \end{center}      or               \begin{centering}     ...     \end{centering}


title: How to center align the whole table?

text: I created a table and it starts from the left and goes all the way to right, which looks really skewed. So I want to center align the whole table but couldn't figure out how to do it. I'm new to latex so I don't know how to use other plugin or macros, but I suppose there's a command for this basic functionality. Can anyone tell me? This is my code:               \documentclass[a4paper, 12pt]{article}     \author{My Name}     \setlength\parindent{0pt}     \addtolength{\topmargin}{-1in}     \begin{document}     \begin{table}[h]         \centering         \large{Something:}         \centerline{Table 1:}         \begin{tabular}{c c}             \hline             1 & 2 \\             3 & 4 \\             5 & 6 \\             7 & 8 \\         \end{tabular}              \large{Table 2}              \begin{tabular}{c c}             \hline             1 & 2 \\         \end{tabular}          \end{table}     \end{document}      Note here my numbers from 1 - 8 and 1,2 in table 2 are actually long text, which are long enough that it goes over the right edge of the paper. How can I fix it?


title: What is the correct way to center a \tikzpicture?

text: > **Possible Duplicate:**   >  Should I use center or centering for figures and tables? What is the correct way to cause a `\tikzpicture` to be centered? By default it appears to be aligned with the left margin.


title: Best way to centre figure in float

text: > **Possible Duplicate:**   >  Should I use center or centering for figures and tables? There are (at least) two ways of centering a single figure / graphic horizontally in a figure float: 1) using `\begin{centering}` in the float 2) using a `\hfill` left and right of the figure What is the better / more robust / more LaTeX way of doing this?


title: Empty space after adding an image

text: After adding an image I have an empty space. How can it be reduced? I used `\FloatBarrier`. But it did not worked.               % Following copied by Marc van Dongen from comment from OP.     \documentclass[12pt,a4paper,oneside]{report}        \usepackage{fancyhdr}        \usepackage{graphicx}        \usepackage{placeins}        \begin{document}        \FloatBarrier        \subsection{ddd}           \begin{figure}[ht]              \begin{center}                 \includegraphics[width=9cm,height=5.5cm]{sss.jpg}              \end{center}              \begin{center}                 \caption[ddd ]{ ddd }              \end{center}           \end{figure}           \FloatBarrier           In English, the word datum is still used in the general            sense of "an item given".           In cartography, geography, nuclear magnetic     \end{document}


title: How do you center graphics?

text: > **Possible Duplicate:**   >  Should I use center or centering for figures and tables? I am doing an assessment and as part of it have linked some graphics into my Latex report, however they are not centred in the report but the left hand side of the graphics starts on the centre line of the report. Is there anyway i can centre the graphics so that the middle of the graphics is in the middle of the report(on the centre line)?


title: Manually breaking a long URL (in the bibliography)

text: I have a large bibliography in which a few items are causing underfull hboxes due to a long URL. Answers to similar questions suggest a number of global options for fixing this; e.g. Forcing linebreaks in \url hyperref url breaking perform a line break of an URL in bibliography manually (biblatex, hyperref) However, I don't want a global solution (like applying `\sloppy` or `\raggedright` to the whole bibliography), because all the other bibliography items behave as I want them to. In most cases, I have been able to resolve the issue by inserting a manual line break at the start of the url entry in the .bib file. However, in one case that isn't working. MWE:               \documentclass[natbib]{svmono}     \usepackage{url}          \begin{document}     \cite{koepke2009naturalness}     \bibliographystyle{harvard}     \bibliography{test}     \end{document}      test.bib               @article{koepke2009naturalness,       year={2009},       title={Naturalness in formal mathematics},       journal={\\\url{http://www.math.uni-bonn.de/people/koepke/Preprints/Naturalness_in_formal_mathematics.pdf}},       author={Koepke, Peter}     }      I've tried inserting `\\` at various points inside the url; it breaks the line, but I still get an underfull hbox. How can I break the url in a way which doesn't cause an underfull hbox? Edit: http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0 <\-- svmono http://iccle.googlecode.com/svn-history/r2130/trunk/doc/harvard.bst <\-- harvard.bst


title: Forcing enumerated \bibitems using bib units

text: I'm editing my CV and I wanted to use the `bibunits` package to make separate mini-bibliographies for different sections. Here is some code:               \documentclass{article}          \usepackage[ManyBibs]{currvita}     \usepackage{bibunits}     \usepackage[pdfborder={0 0 0},breaklinks]{hyperref}     \usepackage{filecontents}          \defaultbibliography{test}     \defaultbibliographystyle{acm}          \newenvironment{cvseclist}[1]     {\phantomsection     \addcontentsline{toc}{section}{\sc #1}%     \begin{cvlist}{\sc #1}}     {\end{cvlist}}          \newcommand\multilinelabel[1]{%     \smash{\parbox[t]{\cvlabelwidth}{\raggedright #1}}%     }          \makeatletter     \newcommand*\pubs[2]{%     \item[\sc \multilinelabel{#1}]     \begin{bibunit}%         \nocite{#2}%         \putbib     \end{bibunit}%     \IfFileExists{\@bibunitname.bbl}{}{Run \texttt{bibtex     \@bibunitname}}%     }     \makeatother          \begin{document}          \begin{cv}{Anand D. Sarwate \hfill Curriculum Vit\ae}               \begin{cvseclist}{Publications}     \pubs{Journal Papers}{test1,test2,test3}     \end{cvseclist}          \end{cv}     \end{document}      I couldn't figure out how to use `filecontents` so it is faster to provide `test.bib` here:               @article{test3,     Author = {A. D. Sarwate},     Journal = {Baz : Theory and Applications},     Number = {1},     Title = {Baz is meh},     Volume = {1},     Year = {2011}}          @article{test2,     Author = {A. D. Sarwate},     Journal = {IEEE Transactions on Bar},     Number = {2},     Title = {Bar is better},     Volume = {8},     Year = {2010}}          @article{test1,     Author = {A. D. Sarwate},     Journal = {Journal of Foo Studies},     Number = {3},     Title = {Foo is awesome},     Volume = {12},     Year = {2009}}      But when I put in `\pubs{Journal Papers}{test1,test2,test3}`, I get an unnumbered list of `bibitems`. What I want is a numbered bibliography, so that it looks something like: **Journal Papers** [1] A.D. Sarwate, "Foo is awesome", _Journal of Foo Studies_ 12(3), 2009. [2] A.D. Sarwate, "Bar is better", _IEEE Transactions on Bar_ 8(2), 2010. [3] A.D. Sarwate, "Baz is meh", _Baz : Theory and Applications_ , Los Angeles, CA, June 2011. and each `bibunit` is independently numbered. The lack of numbering I see now seems to not change with the bibliography style I use. Is there a way to force BibTeX to number each `bibunit`? Is this a problem with `\nocite`? If I change the command to use `\cite` then the `\cite` command produces numbers like `[1-3]` but the bibliography remains unnumbered.


title: Function rotated about the x-axis

text: I try to reproduce some figure from that file: http://tug.org/TUGboat/tb33-1/tb103wolcott.pdf I exactly need Figure 7: f(x) = sin x rotated about the x-axis. The code for Figure 7 is in appendix B. Used packages:               \usepackage{tikz}     \usepackage{ifthen}\newboolean{color}      Errors from Texmaker:               ! Missing number, treated as zero.<to be read again>{ }     ! Illegal unit of measure (pt inserted).<to be read again>{ }      Errors appears at the middle of these section:               \foreach \x in     {\aDomain, \nextShadingStep, ..., \bDomain} {     \pgfmathsetmacro\xsh{(cos(\phi))*({\x})}     \pgfmathsetmacro\rad{(\fcn)}     \tikzset{xyplane/.estyle={cm={     cos(\phi - 90), 0,0,1, (\xsh, 0)}}}     \draw[xyplane,\backColor,ultra thick,opacity=.6]     (0, \rad) arc (90 : 270 : \rad);     } %%% errors appears here %%%     \foreach \theta in     {0, \rotationGridStepsize, ..., 180} {     \tikzset{xyplane/.estyle={cm={     cos(\phi), 0, sin(\theta)*sin(\phi),     cos(\theta), (0, 0)}}}     \draw[xyplane,smooth] plot (\x, \fcn) ;     }      I know something about LaTeX but nothing about PGF/TikZ. How to erase these errors?


title: Should Greek letters inserted in text (using math mode, mostly) always be italic?

text: The least painful way I know of inserting a Greek letter in a text is to use the math mode and the corresponding command. This will produce an alpha letter :               $\alpha$      But this always produces an italic letter. I never thought about it until now, but when should this letter be italic, and when should it not? Furthermore, if I am talking about microseconds in my text, there will be one Latin and one Greek letter side by side. Which of the following should I use?               1- The average time of this event is 50 $\mu s$.     2- The average time of this event is 50 $\mu$s.     3- The average time of this event is 50 $\mathrm{\mu s}.     4- The average time of this event is 50 μs.      Now to me it's either #1 or #3, as #2 produces one italic letter and one normal letter (that's kind of a visual clash), and #4 is only usable if your document is encoded using UTF-X. What do you do when facing this?


title: Captioning nested subfigures with subcaption

text: The following creates a figure with three images arranged appropriately. If I remove the two `\caption{}` lines, it numbers the main subfigures as I'd like, and keeping the two `\caption{}` lines puts subfigure letters in the right place for the sub-subfigures, but the letters are wrong. How can I change the subfigure identification from a, b, c, d to a, b1, b2, b or something similar?               \documentclass{article}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{fancyref}     \usepackage{subcaption}     \begin{document}     \begin{figure}       \begin{subfigure}{0.5\textwidth}         \centering         \includegraphics[width=\textwidth]{wu8_wedges}         \caption{With wedges.}         \label{fig:wedges}       \end{subfigure}       \begin{subfigure}{0.5\textwidth}         \begin{subfigure}{\textwidth}           \centering           \includegraphics[width=\textwidth]{wu8_flat1}           \caption{}           \label{fig:flat1}         \end{subfigure}         \begin{subfigure}{\textwidth}           \centering           \includegraphics[width=\textwidth]{wu8_flat2}           \caption{}           \label{fig:flat2}         \end{subfigure}         \caption{Without wedges}         \label{fig:flat}       \end{subfigure}       \caption{Interactions between the railcar and the man's feet.}       \label{fig:interactions}     \end{figure}     \end{document}


title: How to create (1) a new Environment for LyX's Environment drop-down menu, (2) a new Text Style

text: My two part question pertains to LyX.   1. How do you create a new "Environment" ("Paragraph Style") for LyX's Environment drop-down list (Standard, Itemize, Enumerate, Chapter, Section, Subsection, Quote, Lyx-Code, etc.)?   2. How do you create a new "Text Style" (LyX top menubar > Edit > CharStyle:Code, CharStyle:Emph, Etc, "CharStyle:NewTextStyleHere")?  I would like to use, eg, the Book(KOMA-script) Document Class, but be able to add to it (1) new Environments (say, eg, a "SubSubparagraph" style, and (2) new Text Styles (say, eg, a "DiminishedFontSize" text style). This would greatly extend the usability of a document class within LyX. The first part of my question is very similar, if not identical, to Dave Jarvis's question on page: Create new paragraph style in LyX Jarvis provides a good example of the kinda of step-by-step instructions that he and I are looking for in an answer. Thank you.


title: Referencing a nested list item by only its most immediate bullet

text: I'd like to be able to reference a nested enumerated list item only by its inner-most identifying character.               \begin{enumerate}[(1)]     \item       \begin{enumerate}[(a)]         \item \label{mylabel} Referenced point.       \end{enumerate}     \end{enumerate}     ...     \ref{mylabel}      The `\ref` above gives me something like `1a`, but I want it to give me `a` only.


title: How can I make height-matched absolute value symbols without including packages?

text: I want to use the following formula: ![Formula from physics.SE](http://i.stack.imgur.com/um9z4.png) or, in markup:               $$| \sum_i \vec{v}_i \Delta t_i  |$$      I want to make nice height-matched absolute value delimiters, but I can't use any packages (I'm using MathJax). Is there a way to do this in pure math mode?


title: How to reset all counters at once?

text: I have several environments in my .tex file. I'd like to know if there is a way to reset all counters at once? To clarify what I mean, suppose we have environments `theorem`, `proposition`, etc., and instead of using individual commands `\setcounter{theorem}{0}`, `\setcounter{proposition}{0}`, etc, for resetting the counters to 0 I'd like to know if there is a way for resetting all counters using a single command. Thanks


title: Why am I receiving a undefined-control-sequence error when compiling this custom letter class?

text: I've read through the Kopka & Daly book, "A Guide to LATEX", 3ed., and I'm attempting to re-crate the example custom letter that begins on page 305. **The custom-letter class "mpletter"**               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{mpletter}          \RequirePackage{ifthen}     \newboolean{@german}     \setboolean{@german}{false}     \DeclareOption{german}{\setboolean{@german}{true}}          %pass-in of letter.cls     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}     \ProcessOptions     \LoadClass[letter]{letter} %%changed for letter sized paper          %German names     \newcommand{\englishnames}{%         \newcommand{\yrefname}{\textsl{Your Ref.}}         \newcommand{\ymailname}{\textsl{Your letter from}}         \newcommand{\myrefname}{\textsl{Our Ref.}}         \newcommand{\subjectname}{\textsl{Subject}}         \newcommand{\telephonename}{Telephone}         \newcommand{\stationname}{Train Station}         \newcommand{\germanname}{GERMANY}         \newcommand{\telcode}{[49]-555-401}         \newcommand{\postcode}{D--37191}     }         \newcommand{\germannames}{%         \newcommand{\telefax}{Telefax}         \newcommand{\telex}{Telex}         \newcommand{\telcode}{(05556) 401}         \newcommand{\postcode}{37191}     }          \ifthenelse{\boolean{@german}}         {\RequirePackage{german}\germannames}{\englishnames}          %Extra info. in the header     \newcommand{\@yref}{}     \newcommand{\@myref}{}     \newcommand{\@internet}{}     \newcommand{\@ymail}{}     \newcommand{\@subject}{}          %     \newcommand{\yref}[1]{\renewcommand{\@yref}{\yrefname: #1}}     \newcommand{\ymail}[1]{\renewcommand{\@ymail}{\ymailname: #1}}     \newcommand{\myref}[1]{\renewcommand{\@myref}{\myrefname: #1}}     \newcommand{\subject}[1]{\renewcommand{\@subject}{\subjectname: #1}}     \newcommand{\internet}[1]{\renewcommand{\@internet}{#1}}     \newcommand{\INTERNET}{@linmpi.mpg.de}          %set margins/text     \setlength{\textheight}{215mm}     \setlength{\textwidth}{160mm}     \setlength{\oddsidemargin}{0pt}     \setlength{\topmargin}{-20pt}     \setlength{\headsep}{35pt}     \setlength{\textwidth}{160mm}     \setlength{\evensidemargin}{0pt}     \setlength{\headheight}{12pt}          %Defining some fonts for the letter head...     \DeclareFixedFont{\xviisf}{OT1}{cmss}{m}{n}{17}     \DeclareFixedFont{\xsf}{OT1}{cmss}{m}{n}{10}     \DeclareFixedFont{\viiisf}{OT1}{cmss}{m}{n}{8}          %letterhead is two fields, total = 160 = textwidth     \newlength{\leftfield} \setlength{\leftfield}{117mm}     \newlength{\rightfield} \setlength{\rightfield}{43mm}          %put institute name in several "saved boxes"     \newsavebox{\FIRM}     \newsavebox{\firm}     \newsavebox{\firmaddress}     \newsavebox{\firmreturn}          \sbox{\FIRM}         {\parbox[t]{\leftfield}             {\xviisf MAX--PLANCK--INSTITUT FUR AERONOMIE}}          \sbox{\firm}         {\xsf MAX--PLANK--INSTITUT FUR AERONOMIE}          \sbox{\firmreturn}         {\viiisf\underline{MPI fur Aeronomie, \postcode{} Katenburg--Lindau}}          \sbox{\firmaddress}         {\parbox[t]{\rightfield}{\viiisf\baselineskip10pt         Max--Plank--Strasse 2\\         \postcode{} Katlenburg--Lindau\\\germanname}}          %put together        \newsavebox{\firmhead}  \newsavebox{\firmfoot}          \sbox{\firmhead}         {\parbox{\textwidth}{\usebox{\FIRM}\raisebox{6pt}             {\usebox{\firmaddress}}\\[3pt]  \rule{\textwidth}{1pt}}}          \sbox{\firmfoot}                 {\parbox{\textwidth}{\rule{\textwidth}{0.6pt}\\[5pt]                     \viiisf\setlength{\baselineskip}{12pt}%                 \begin{tabular}[t]{@{}ll}                     \underline{\telephonename} & \telcode-1\\                     \underline{Telefax} & \telcode-240\\                     \underline{Telex}       & 9\,65\,527 aerli                 \end{tabular}\hfill                 \begin{tabular}[t]{l}                     \underline{Bank}\\                     Kreis--Sparkasse Northeim\\                     41\,104\,449 (BLZ 262\,500\,01)                 \end{tabular}\hfill                 \begin{tabular}[t]{l@{}}                     \underline{\stationname}\\                     Northeim\\                     (Han.)                 \end{tabular} }}          %put head/foot boxes on first page     \renewcommand{\ps@firstpage}         {\setlength{\headheight}{41pt}\setlength{\headsep}{25pt}%             \renewcommand{\@oddhead}{\usebox{\firmhead}}%             \renewcommand{\@oddfoot}{\raisebox{-20pt}[0pt]                                             {\usebox{\firmfoot}}}%             \renewcommand{\@evenhead}{}\renewcommand{\@evenfoot}{}}          %don't know     \renewcommand{\ps@headings}         {\setlength{\headheight}{41pt}%             \renewcommand{\@oddhead}                 {\parbox{\textwidth}{\usebox{\firm}\\[5pt]                     \slshape \headtoname{} \toname\hfill\@date\hfill                                                                 \pagename{} \thepage\\                     \rule[3pt]{\textwidth}{1pt}}}             \renewcommand{\@oddfoot}{}             \renewcommand{\@evenhead}{\oddhead}             \renewcommand{\@evenfoot}{\@oddfoot}     }     %     \providecommand{\@evenhead}{}\providecommand{\@oddhead}{}     \providecommand{\@evenfoot}{}\providecommand{\@oddfoot}{}          %make headings the active page style     \pagestyle{headings}          %lastly, redefine opening cmd that prints address/salutation     \renewcommand{\opening}[1]{\thispagestyle{firstpage}%         \parbox[t]{\leftfield}             {\usebox{\firmreturn}\\                 \parbox[b][3.5cm][c]{\leftfield}{\toname\\\toaddress}}%             \parbox[t]{\rightfield}                 {\fromname                     \ifthenelse{\equal{\telephonenum}{}}                         {}{\\ Tel.: \telcode-\telephonenum}                     \ifthenelse{\equal{\@internet}{}}                         {}{\\{\viiisf Email: \@internet\INTERNET}}                     \\[5mm] \@date}                 \par                 \rule{\textwidth}{0.6pt}                 \makebox[\leftfield][1]                     {\ifthenelse{\equal{\@yref}{}}                         {\@ymail}{\@yref\hfill\@ymail\hfill}}                 \@myref\par                 \ifthenelse{\equal{\@subject}{}}                     {}{\@subject\par}                 \vspace{2\parskip} #1 \par\nobreak}      **And my letter for that class**               \documentclass[12pt]{mpletter}     \name{Dr P. W. Daly}      \signature{Patrick W. Daly}     \myref{PWD/sib}     \date{May 10, 1998}     \subject{\LaTeX{} information}     \telephone{279} \internet{daily}     \ymail{April 28, 1998} \yref{FGM/sdf}     \begin{document}     \begin{letter}{%     Mr George Murphy\\35 Watervile Rd.\\     Centertown, New England\\USA}     \opening{Dear George,}     Thank you!     \closing{Regards,}     \encl{x}     \cc{H. Kopka}     \end{letter}     \end{document}


title: Duplicate figure numbers in Beamer

text: I am trying to have multiple Beamer slides discussing the same figure, and have the figure have the same Figure number across multiple slides. I am not sure how to do this. In the following example, I would like to have multiple slides discussing "First figure". If I simply create two different figures, clearly they will have different numbers. If I label them with the same label, I get `LaTeX Warning: There were multiply-defined labels.` What I want is something like below, but the second slide to say "Another interesting point about Fig. 1". How can I do this? Thank you in advance!               \documentclass{beamer}               \setbeamertemplate{caption}[numbered]               \begin{document}          \begin{frame}{Talk about Fig. 1}       \begin{figure}[h]         \centering         My first figure         %\includegraphics{something.png}         \caption{First figure}         \label{fig:first-fig}       \end{figure}     Interesting point about Fig. \ref{fig:first-fig}.     \end{frame}          \begin{frame}{Talk about Fig. 1}       \begin{figure}[h]         \centering         My first figure         %\includegraphics{something.png}         \caption{First figure}         \label{fig:first-fig-2}       \end{figure}     Another interesting point about Fig. \ref{fig:first-fig-2}.     \end{frame}               \end{document}      ![My beamer currently produces this.](http://i.stack.imgur.com/e8ihZ.png)


title: Is there a built-in PSTricks macro to get the value of \pslinewidth in the current unit?

text: I need the value (without trailing unit) of `\pslinewidth` in `\psunit`. I have done as follows but I am disappointed with the accuracy.               \documentclass{article}     \parindent=0pt     \usepackage{pstricks}     \pstFPdiv\Temp     {\the\pslinewidth}     {\the\psunit}          \begin{document}     \the\pslinewidth% prints 0.8pt          \Temp% prints 0.028116799998875328          \psset{linewidth=\Temp}     \the\pslinewidth% prints 0.80014pt     \end{document}      Is there a built-in macro to get the value (without trailing unit) of `\pslinewidth` in any `\psunit`? The value is very useful to adjust plotting domain such that the cropped curve strokes near the domain edges can be avoided. * * * The real scenario is as follows. Note: `\Temp` is the half of `\pslinewidth` that is not the same as the example above. ![enter image description here](http://i.stack.imgur.com/ckL7D.png)               \documentclass{article}     \usepackage{pst-func}          \def\Left{-1}     \def\Bottom{-1}     \def\Right{1}     \def\Top{1}               \psset{unit=2cm,linewidth=20pt}               %half of linewidth tickness     \pstFPdiv\Temp{\the\pslinewidth}{\the\dimexpr2\psunit\relax}          \pstFPsub\LEFT\Left\Temp     \pstFPsub\BOTTOM\Bottom\Temp     \pstFPadd\RIGHT\Right\Temp     \pstFPsub\TOP\Top\Temp          \begin{document}     \section*{Without extending the plotting domain}     \begin{pspicture*}[showgrid](\Left,\Bottom)(\Right,\Top)             \psPolynomial[coeff=-1 0 2,linecolor=red]{\Left}{\Right}     \end{pspicture*}          \section*{With extending the plotting domain}     \begin{pspicture*}[showgrid](\LEFT,\BOTTOM)(\RIGHT,\TOP)             \psPolynomial[coeff=-1 0 2,linecolor=red]{\Left}{\Right}     \end{pspicture*}     \end{document}      * * * I accepted Herbert's answer that implies that there is no such a built-in macro. I also want to emphasize that   * Herbert's method is less accurate than mine.   * The length in Herbert's method cannot be passed to functions that only accept values without unit. But the value in mine can be passed to such functions.


title: TeX memory size error when using TikZ foreach children in trees

text: **Nearly Identical:** How to expand TeX's “main memory size”? (pgfplots memory overload) * * * I'm getting the same error as the other question, but the answer there is not handling my issue. I believe the error from the other question was due to using _many_ images in the same file; my error is due (I think) to having a lot of memory usage in _one_ image alone. Thus, the externalizing solution doesn't seem to be working. I'm trying to generate a tree diagram for a paper I'm writing. It involves the exponential growth of nodes by 3's up to 3^8 = 6,561 for a total of ~9,000 total nodes. Here is the code:               \documentclass[11pt]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{tikz}     \usetikzlibrary{shapes,trees}     \usetikzlibrary{external}     \tikzexternalize          \begin{document}          \begin{tikzpicture}     [grow cyclic,     level 1/.style={level distance=30mm,sibling angle=120},     level 2/.style={level distance=30mm,sibling angle=60},     level 3/.style={level distance=10mm,sibling angle=50},     level 4/.style={level distance=6mm,sibling angle=30},     level 5/.style={level distance=4mm,sibling angle=10},     level 6/.style={level distance=2mm,sibling angle=7},     level 7/.style={level distance=2mm,sibling angle=7},     every node/.style={circle,draw,inner sep=1.5pt},     dot/.style={circle,fill,inner sep=0.5pt}]     \node {\tiny{you!}}       child foreach \x in {1,2,3} {node[dot] {}      {child foreach \x in {1,2,3} {node[dot] {}      {child foreach \x in {1,2,3} {node[dot] {}      {child foreach \x in {1,2,3} {node[dot] {}      {child foreach \x in {1,2,3} {node[dot] {}      {child foreach \x in {1,2,3} {node[dot] {}      {child foreach \x in {1,2,3} {node[dot] {}}}}}}}}}}}}}};          \end{tikzpicture}          \end{document}      I've tried calling this via `pdflatex -shell-escape file`, but it seems that the last iteration is what kills it. It generates fine if I just remove one of the iterative steps. In other words, 3^6 nodes works, but not 3^7. I'm actually trying to go to 3^8. Any suggestions? * * * Here is the exact error while running `pdflatex -shell-escape file` that halts:               ! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e     rror -interaction=batchmode -jobname "test-figure0" "\def\tikzexternalrealjob{t     est}\input{test}"' did NOT result in a usable output file 'test-figure0' (expec     ted one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system c     alls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also name     d 'write 18' or something like that. Or maybe the command simply failed? Error      messages can be found in 'test-figure0.log'. If you continue now, I'll try to t     ypeset the picture.      Again, running with just one less level compiles fine (without -shell-escape or externalization), so I don't think this message is indicating that anything is wrong with my code, but I could be wrong.


title: Aligning images in the marginal notes based on a specific paragraph height rule

text: Friends, I have to put some images in the marginal notes of a text. Unfortunately, I have some issues with the image alignment. Consider this minimum example:               \documentclass[oneside]{book}     \usepackage[T1]{fontenc}          \parskip 7.2pt          \usepackage{graphicx}     \usepackage{bookman}     \usepackage{lipsum}          \DeclareRobustCommand*\standup{%     \begin{flushright}     \includegraphics[scale=.15]{standup.pdf}%     \end{flushright}     }%          \begin{document}          \reversemarginpar          \noindent Hi there, this is my first line. No real meaning here.          \noindent\marginpar{\standup}Hello, this is a short line.          \noindent\lipsum[4]          \noindent\marginpar{\standup}This is probably another long line to be broken into two lines. Let's see if it happens again.          \noindent\lipsum[4]          \noindent\marginpar{\standup}There we go, this line is supposed to be broken into three lines, so I need to add lots of text here in order to achieve that. Let's see if it happens now.          \noindent\lipsum[4]          \noindent\marginpar{\standup}Now I want the text to be broken into four or more lines. How was your day? Mine was good, despite the fact these images don't want to be my friends. So how about now? Now I want the text to be broken into four or more lines.          \end{document}      The **standup.pdf** file (which is the proper image) can be downloaded here. The output is as follows: ![My text 1](http://i.stack.imgur.com/lxI6w.png) The images are aligned with the baseline of the first line. I'd like to achieve the following alignment rule: * * *   1. If the paragraph has one line, align the center of the image with the center of that line.   2. If the paragraph has two lines, align the center of the image in half the height of those two lines.   3. If the paragraph has three or more lines, align the center of the image with the center of the second line. * * * I hope this image can visually clarify these rules: ![My text 2](http://i.stack.imgur.com/Cvkhx.png) I tried to manually hack their position using `\vspace`, but I had no success. I wonder if someone could enlight me on this issue. I'm open to all ideas, this code was my first attempt. I'm also aware that these rules might be confusing or annoying to be defined, so even a manual adjustment is welcome. `=)`


title: How to properly resize a matrix?

text: Apparently text is resized in one way and math in other way. However, the commands to resize math do not work well on a matrix; it appears barely smaller and unexpectedly shifted down. The commands to resize text also "work well" to resize a matrix except that it give a warning that you are doing it wrong.               LaTeX Font Warning: Command \scriptsize invalid in math mode on input line 16.      So, what is a proper way to resize a matrix that actually works?               \documentclass[12pt]{article}          \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \begin{document}      Properly resize variable: $x$ $\scriptscriptstyle{x}$           Properly resize matrix: $\begin{bmatrix}a & b\\ c & d\end{bmatrix}$ $\scriptscriptstyle{\begin{bmatrix}a & b\\ c & d\end{bmatrix}}$           Improperly resize matrix: $\begin{bmatrix}a & b\\ c & d\end{bmatrix}$ $\scriptsize{\begin{bmatrix}a & b\\ c & d\end{bmatrix}}$     \end{document}      ![enter image description here](http://i.stack.imgur.com/uMnPG.png)


title: Drawing grid with random color in TikZ

text: I'm trying to draw a 10x10 grid in TikZ like so:               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}     \begin{tikzpicture}[scale=1]         \foreach \y in {0.05,0.15,...,0.95}         \foreach \x in {0.05,0.15,...,0.95}             \pgfmathparse{0.9*rnd+0.3}             \definecolor{MyColor}{rgb}{\pgfmathresult,\pgfmathresult,\pgfmathresult}             \node[fill=MyColor,minimum size=0.1] at (\x,\y) {};          \draw[step=.1,help lines] (0,0) grid (1,1);          \draw[->] (0,1) -- (1.2,1);         \draw[->] (0,1) -- (0,-0.2);     \end{tikzpicture}     \end{document}      Which is already quite close to what I had in mind, but the nodes don't line up properly. What am I doing wrong? Here is an image of my output: ![My Attempt](http://i.stack.imgur.com/wdG3Q.png). Also, since I'm new to TikZ, feel free to comment on the code, in terms of readability, coding practices and so on.


title: How to have greyed out subsections in a table of contents frame?

text: I'm doing a beamer presentation with sections and subsections, and would like to remind the audience of the outline at some points (before some subsections). I would like all sections and subsections to be greyed out, except the one I'm about to enter. At the moment, I'm using this:               \begin{frame}<beamer>       \frametitle{Outline}       \tableofcontents[currentsection,currentsubsection,hideothersubsections]     \end{frame}      But all subsections of currentsection are in normal font, not just the current one. I'd like to point out which of those subsections I'm about to enter, so I'd like the other ones to be greyed out. Thanks in advance for your suggestions.


title: Book class appendix

text: I am using the `book` LaTeX class and I want to add appendices. I do this in the following way:               \usepackage{appendix}          \appendix     \appendixpage     \noappendicestocpagenum     \addappheadtotoc          \chapter{Some title}     %...      My problem with this is that the `\chapter` seems to be taken as `\chapter*`. Because instead of **Appendix A. Some title** (which is what I want) the appendix that is just titled **Some title**. Any idea how I can get the "Appendix A" in front of it? I though this would standard behaviour in the `book` class. Possibly some other package is messing things up. For instance, I use `titlesec`, `hyperref` and `cleveref`. Edit: clarification, I am talking about both the title in the text AND the ToC. Neither shows "Appendix A".


title: Drawing diagrams of higher categories with TikZ

text: I a planning to give an introductive talk about strict n-categories and I wanted to use TikZ to show the relations between the k-morphims by some cellular diagrams. To be precise, I want to draw diagrams just like the four diagrams you can find at the top of the page vi of the introduction of Tom Leinster's book "Higher Operads, Higher Categories" http://arxiv.org/abs/math.CT/0305049 ![enter image description here](http://i.stack.imgur.com/MUOUP.jpg) The two firsts are of course easy. For the third one I was able to find this               \begin{tikzcd}     A \arrow[bend left=50]{r}[name=U,below]{} \arrow[bend right=50]{r}[name=D]{} & B \arrow[Rightarrow,to path={(U) -- (D)}]{}     \end{tikzcd}      Unfortunatly I have no clue how to modify my code to draw the last one. Any Ideas ?


title: A centering problem in \begin{equation} ... \end{equation} with svmono.cls

text: If you build the following code the first equation is not centered, unless you remove at least the last letter (`x`), while the second equation (longer) is centered. Note: the first equation begins with `\,` (or `\;` etc.). If you use `\documentclass{book}` or `\documentclass{article}` everything is all right. (The problem arises e.g. if you have a macro starting with `\,` (`\def\xxx{\,...}`): `\begin{equation} \xxx` etc. )               \documentclass{svmono} % svmono 2006/09/01 v4.16     %     \begin{document}     %     \begin{equation} % first eq.     \,abcdefghilmnopqstuvwxyz abcdefghilmnopqstuvwxyz abx     \end{equation}     %     \begin{equation} % second eq.     abcdefghilmnopqstuvwxyz abcdefghilmnopqstuvwxyz abcdefghi     \end{equation}     %     \end{document}


title: What is the advantage of using minimal over article when creating a standalone graphic?

text: What is the advantage of using `minimal` document class over `article` document class when creating a standalone graphic? * * * Bonus question: Before I have time to make a test by myself, is there anybody here know whether `minimal` will compile faster than `article`?


title: Is there another style to make an \underbrace in big braces look elegant?

text: I don't think the following equation looks good because of the existence of the `\underbrace`.               \documentclass[preview,border=12pt,varwidth]{standalone}     \usepackage{amsmath}     \begin{document}     \[     12\left(\underbrace{y^2 +2y\left(-\frac{2}{3}\right) +\left(-\frac{2}{3}\right)^2}_{\left[y+\left(-\frac{2}{3}\right)\right]^2} -\left(-\frac{2}{3}\right)^2 +\frac{4}{5}\right) = 0     \]     \end{document}      ![enter image description here](http://i.stack.imgur.com/O7T8l.png) Is there another style to make an `\underbrace` in big braces look elegant? I want to pull the underbrace out of the braces.


title: Is there a formula to setup the smallest rectangle enclosing a PSTricks grid and its labels?

text: I want to minimize the size of the red rectangle enclosing a PSTricks grid and its labels. How to do this? ![enter image description here](http://i.stack.imgur.com/sQNs9.png)               \documentclass{minimal}     \usepackage{pstricks}     \newpsstyle{gridstyle}{gridlabels=5pt}     \psset{style=gridstyle}     \pagestyle{empty}               \begin{document}     \psframebox[linewidth=0.5pt,linecolor=red,framesep=5.5pt]{%     \begin{pspicture}[showgrid](3,3)     \pscircle[fillstyle=solid,fillcolor=red,opacity=0.2](1.5,1.5){1.5}     \end{pspicture}}     \end{document}


title: What are alternatives to block?

text: I use `\begin{block} ... \end{block}` to describe formalization of some notions, and I want to write some examples under it. I still would like to stick to the structure of a block (one part for title and the other part for the content), but it is desirable to use another color to distinguish the example from the notion. Could anyone tell me what I could use to embed the example?


title: Tangent plot on tikz

text: \documentclass[12pt,a4paper]{article}     \usepackage{graphicx}     \usepackage{amsmath,amssymb}     \usepackage{tikz}                    \begin{figure}[H]     \begin{center}     \begin{tikzpicture}[scale=1.2,smooth,domain=-2*pi:2*pi];     % First line looks reasonable     \draw[blue = solid,  thick ] plot   [domain=0:5*pi/12](\x,{tan(\x r)});     % second line is not goo     \draw[blue = solid,  thick ] plot    [domain=27*pi/45:17*pi/12](\x,{tan(\x r)});          \draw[blue = solid,  thick ] plot   [domain=1.6*pi:29*pi/12](\x,{tan(\x r)});          \end{tikzpicture}     \caption{Graph of $y = \tan\theta$}     \label{fig:graphtan}     \end{center}     \end{figure}


title: Splitting(!) one latex document into two pdf outputs including references

text: I have a quite huge thesis-latex-document with lots of references to the appendix. The **whole document I would like to split into two pdf-files**. That means: **I would like to have the thesis and the appendix as separate .pdf-outputs with own titlepages but the references in the main document leading to the appendix, so I can print out two independent documents.** The reason is: The main file is my thesis, the appendix is - obviously - the appendix that is not actually independent from the thesis but should be treated as independent if you know what I mean. I would like to be able to give out the thesis without the appendix but the references that I have to the appendix should indicate that it actually is another document. I am using the scrreprt-KOMA-Script document class and I would like to keep using it. Also I am using the varioref, hyperref and the cleveref-packages in combination. I also would like to keep that. I assume I'll have to create two separate "main files". One for the main document "thesis.tex" and one for the appendix "appendix.tex". The question then is: How can I   1. let the included "appendix.tex"-file get compiled while actually compiling the "thesis.tex" including all necessary references? In this case the hyperlinks are not that important.    2. get as output thesis.pdf and appendix.pdf?    3. get the reference in the main document point to sth. like "Appendix, p. XY" or - preferabily since I am writing in German - "Anhang, S. XY"? I am using Sublime Text with the latexing-extension but I guess this is not very important in this case. In terms of typesetting engine I use pdflatex, so nothing really experimental. After all I need to know: _What package do I might need for this? What changes do I need to undertake in my document (for example labels) to accomplish the above mentioned results?_


title: Equation labels in the block environment of beamer class are too close to the right boder

text: I am using bearmer to write a poster. In the block environment, I have same labeled equations. The problem is the labels are too close to the block border. Is it possible to move the label a little inward?


title: Is it possible to add an "or" condition to a \def?

text: Is it possible to have something like               \def\fiveorsix{5,6 OR 6,5}      So that the following works:               \documentclass{standalone}          \def\fiveorsix{5,6 OR 6,5}          \makeatletter     \newcommand{\test}[1][]{         \def\test@a{#1}         \ifx\test@a\fiveorsix             the optional argument is 5,6 or 6,5         \else             the optional argument is not 5,6 or 6,5         \fi}     \makeatother          \begin{document}     \test[5,6]     \end{document}      (obviously this does not work) Or is there a better approach to achieve my goal? edit: I had to update the MnWE because the first version was actually too minimal.


title: How to draw graphs in LaTeX?

text: I need to draw simple graph (for example Petersen Graph) in LaTeX. I am using Kile in Ubuntu. I exactly don't know that which package should I use. Any suggestion with example is highly expected.


title: Footnote line number

text: I am using LaTeX to prepare critical edition in DEVNAGARI. I want to set footnotes with reference to text-line numbers **on each page** (not putting super script number exactly on the top of a word in text). How to set and what is the package.


title: Footnotes in tables?

text: I would like to have footnotes in tables, but the `\footnote` command does not work inside a `table` environment. Googling one finds that this is a frequently asked question, at least in the UK. That link contains a list of solutions to the problem, but since the author of the FAQ does not believe that this is good style, no comparison is made between the different methods. I am sure that there are good typographical reasons why in most situations it is undesirable to have footnotes in tables (although I have never come across them), however I have recently felt the need to do just this in a paper I am currently writing. Therefore I'd like to ask two questions:   1. What are the arguments against footnotes in tables?   2. If one really must go against the advice in 1., which method (whether considered in the FAQ above or not) would you recommend? Thanks in advance. ### Added In response to ShreevatsaR's comment: I do not much care for where the text of the footnote appears. I do however insist on the footnote marks being attached to the relevant entries in the table, so that I can avoid having to reference "the second entry in the eighth line of the table", etc...


title: footnote in the column name of a table

text: > **Possible Duplicate:**   >  Footnotes in tables? I tried inserting `\footnote` in the column name of a table. The footnote did not appear at the bottom of the page as expected. Can someone help me? A sample code is provided below:               \begin{table}[htbp]       \centering       \scriptsize         \begin{tabular}{|c|c|c|c|c|}         \hline              \textbf{Queries} & \textbf{NUR}\footnote{No of unigram models satisfying user              preference} & \textbf{NBR}\footnote{No of bigram models satisfying user              preference} & \textbf{UCHR}\footnote{class hit rate for unigram models} &            \textbf{BCHR}\footnote{class hit rate for bigram models} \\


title: Footnotes don't show!

text: Can someone help me out please? I am writing my cv, and I need a normal, standard footnote. Here is the heading:               \documentclass[a4paper,10pt]{article}     \usepackage{eurosym}               \usepackage[bookmarks=false]{hyperref} %make sure it comes last of your loaded packages     %\usepackage[dvips,bookmarks=false]{hyperref} %make sure it comes last of your loaded packages     \hypersetup{pdfstartview=FitH,pdfhighlight=/O,colorlinks=true,urlcolor=red,linkcolor=red}          \oddsidemargin = 21 pt     \evensidemargin = 21pt     \textwidth = 410 pt          \usepackage{fancyhdr}     \pagestyle{fancy}     \usepackage{lastpage}     \lhead{Henrique GOMES\hspace{.5em}}     \chead{}     \rhead{Curriculum \hspace{.5em}   -- \hspace{.5em} Sep 2013}     \lfoot{}     \cfoot{}     \rfoot{{Page \thepage ~of \pageref{LastPage}}}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}                    \setlength\parindent{0in}      And the footnote is in a tabular environment:               \begin{tabular}{ll}     aaaa\footnote{aaaa}     \end{tabular}


title: Footnotes in tables

text: What is the best and simplest way to add footnotes in tables. I used \parnote but it did not give exactly what I am looking for. That is because I have three notes; two of them are same and should have same number and the third one is different.               \begin{tabular}{lll}     \hline     A \parnote{aaa}     & 10 & 10  \\     B \parnote{aaa}     &   5 & 5  \\     C \parnote{bbb}     &   4 & 4  \\     \hline     \end{tabular}     \parnotes


title: Footnote within the table environment

text: I was wondering if there was a way of creating a footnote within a table. Right now I have:               \documentclass[12pt,letterpaper]{report}     \usepackage[masters,4committee,nonsequential]{cuthesis}     \usepackage{array}     \usepackage{graphicx}     \usepackage{cite}     %\usepackage{subfigure}     \usepackage{amsmath}     \usepackage[indent,bf]{caption}     \usepackage{rotating}     \usepackage{setspace}     \usepackage{longtable}     \usepackage{rotating}     \usepackage{float}     %\restylefloat{table}     \usepackage{subcaption}     \usepackage{multirow}     \usepackage{amsfonts}     \usepackage[table]{xcolor}     \usepackage{color}     \usepackage{colortbl}     \usepackage{alltt}     \usepackage{url}     \usepackage{verbatim}     \usepackage{makecell}     \usepackage{placeins}     \usepackage{arydshln}          \begin{document}                   \begin{table}[ht]         \centering         \caption{Footnote within a table}          \begin{tabular}{ll}           how to enter a footnote & this does not work \footnote{} \\         \end{tabular}         \end{table}          \end{document}      I have tried `\usepackage{tablefootnote}` and it doesn't seem to work (it actually seems to break something and not be able to compile). Any help is appreciated!


title: minionint option not working correctly with MinionPro package set up via FontPro

text: The minion integral that is used upon specifying `minionint` as an option for `MinionPro` is not displaying correctly. I installed my minion pro font as suggested by the instructions in the FontPro github page. Here's my code:               \documentclass{article}     \usepackage[minionint]{MinionPro}          \begin{document}          $\left\langle f\left(x\right),g\left(x\right)\right\rangle =\int_{0}^{1}f\left(t\right)g\left(t\right)dt$          \end{document}      Here's what I see: ![enter image description here](http://i.stack.imgur.com/RoCGO.png) I'm not sure what went wrong. I recently did a clean install of osx 10.9 on my system and installed the mactex 2013 distribution. My minion pro font came from Adobe Font Folio.


title: Crossreferencing included PDFs in the appendix for classicthesis + lyx

text: My appendix currently consists of 4 PDF's that I have manually included into the "Appendix" Part of my tex document created in Lyx (classicthesis v4.1). I would like to cross-reference these included PDF's in my text. I am currently adding labels above the `pdfbookmark[]` and `\includepdf[]` statements for each PDF I am including, but referencing these labels in-text only returns me to the "Appendix" level, and not the specific PDF when I compile my document and click on the in-text link. MVE below, showing 2 example included files:               \appendix     \part{Appendix}          \label{SOP052}     \pdfbookmark[1]{SOP052}{SOP052}     \includepdf[pages=-]{"SOP052"}          \label{SOP054}     \pdfbookmark[1]{SOP054}{SOP054}     \includepdf[pages=-]{"SOP054"}          \cleardoublepage{}     \include{Bibliography}     \cleardoublepage{}     \end{document}      How can I create labels that allow me to reference the PDF's, or do I need to reference the PDF bookmark? If so, how do I do it? Or am I missing something?


title: Is there a better and compact way to represent the expansion of products of polynomials?

text: Objective: to show the expansion process as readable as possible so we don't run the risk of misreading the coefficients of the corresponding terms of the expanded, long expressions.               \documentclass[preview,border=12pt]{standalone}     \usepackage{mathtools}          \begin{document}     \abovedisplayskip=0pt\relax% this line is not used in the production     \begin{align*}     (x^2 +x +1)(3x^2 -2x +1)(x^2 +5x -3)     &= \!         \begin{alignedat}[t]{4}           (x^2 +x +1)(3x^4  &&{}+15x^3  &&{}-9x^2 \\                             &&{}-2x^3   &&{}-10x^2 &&{}+6x \\                             &&          &&{}+x^2   &&{}+5x &&{}-3 )        \end{alignedat}\\     &= (x^2 +x +1)(3x^4 +13x^3 -18x^2 +11x -3)\\     &= \!        \begin{alignedat}[t]{7}          3x^6  &&{}+13x^5 &&{}-18x^4 &&{}+11x^3  &&{}-3x^2 \\                &&{}+3x^5  &&{}+13x^4 &&{}-18x^3  &&{}+11x^2  &&{}-3x \\                &&         &&{}+3x^4  &&{}+13x^3  &&{}-18x^2  &&{}+11x  &&{}-3        \end{alignedat}\\     &= 3x^6 +16x^5 -2x^4 +6x^3 -10x^2 +8x -3     \end{align*}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Vp02a.png) Question: Is there a better approach to do so?


title: Counting index entries

text: Is there a way to count the number of entries in an `.idx` file? Currently I'm using the following to accomplish the job but I'm wondering if there is an all TeX/LaTeX way to accomplish the same thing. Were there then I wouldn't have to fit a run of 'Count' into the build process. Here is the code:               #!/usr/bin/perl     # Count.pl -- generate index count info for tex     use strict;     use warnings;     use diagnostics;          our $VERSION = '0.04';          UpdateLines('names.tex',NLines($ARGV[0] . '.idx'));     UpdateLines('places.tex',NLines('places.idx'));          sub NLines {         my $filename = shift;         my @f;         my $fh;              open($fh, '<', $filename);         @f = <$fh>;         return scalar @f;     }          sub UpdateLines {         my $filename = shift;         my $lines = shift;         my $fh;              open($fh, '>', $filename);         print $fh "There are $lines entries in this index.\n";     }      It occurs to me as I write this that since I use a collection of macros to index the various forms of names and places that I could add the necessary to increment the obvious counters `inline` so to speak. If anyone else has a better idea, jump on board. If not and if I manage to cobble something together then I'll post it as an answer in case someone else has this `counting compulsion`. OCD much?


title: How to adjust \UrlFont according to its placement (footnote vs. bibliography)?

text: In my previous post I learned how to make the URL and DOI font smaller. However there is an issue with the URL font size in footnotes specifically, because the font size is already smaller there. When using `\small`, the URL font is in fact bigger than the `\footnotesize` text. What's the right way to address this, considering I use full citations in footnotes, which are reported in the final bibliography with a normal font size?


title: Text does not fit foot line space

text: For my next essay, I got some requriements from my teacher. The layout concerning headlines and footlines should be like this (as there is no adequate Times New Roman I chose Arial):               \documentclass[a4paper, 11pt, oneside, titlepage]{article}     \usepackage[a4paper, left=2.5cm, right=2.5cm, top=2.5cm, bottom=2cm]{geometry}     \linespread{1.25}        \usepackage[ansinew]{inputenc}     \usepackage[ngerman]{babel}      \usepackage[scaled]{helvet}                                                                      \usepackage[T1]{fontenc}     %\usepackage{lastpage}     \usepackage{fancyhdr}          \pagestyle{fancy}     \fancyhead{}     \renewcommand{\headrulewidth}{0pt} %remove standard line     \fancyfoot[C]{}                    %remove some standard stuff     \fancyfoot[R]{              %page \thepage\addspace of \pageref{LastPage} \\             %This line seems to work in the original document.             topic \\             my name \\             version: \date{today}     }          \begin{document}     Dies ist ein Test.     \end{document}      The text is printed in the right corner below, but it does not fit completely below the footnotes. In a "pdflatex"- run you will see that the "version" line goes beyond the defined 2cm. Another part is the font size of the "\fancyfoot[R]" part, which has to be 9 pt. I know that the parameter \footnotesize already contains this size. Which settings do I have to change?


title: Difference between documentation of the code and user documentation

text: From How to Package Your LaTeX Package tutorial: "The important parts of a package are the code, the documentation of the code, and the user documentation." What is the difference between documentation of the code and user documentation?


title: Underfull \hbox badness 10000 \textbf

text: Simple code (new to LaTeX). Receiving these errors:               Underfull \hbox (badness 10000) in paragraph at lines 13--14     Underfull \hbox (badness 10000) in paragraph at lines 15--26     Underfull \hbox (badness 10000) in paragraph at lines 15--26     Underfull \hbox (badness 10000) in paragraph at lines 15--26     Underfull \hbox (badness 10000) in paragraph at lines 27--28      Here is code               \documentclass[11pt]{article}          \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}     \usepackage{verbatim}          \begin{document}          \title{Homework 1}     \author{Joshua Hazel}     \date{\today}     \maketitle          \textbf{2.3 Suppose that the values for a given set of data are grouped into intervals.  The intervals and corresponding frequencies are as follows:} \\           \indent     \begin{tabular}     {|l r|} \hline     age & frequency \\ \hline     1-5 & 200 \\     6-15 & 450 \\     16-20 & 300 \\     21-50 & 1500 \\     51-80 & 700 \\     81-110 & 44 \\ \hline     \end{tabular} \\ \\ \\          \textbf{Compute an \textit{approximate median} value for the data.}\\          My answer here.          \end{document}      The line numbers are pointing to the 2 sections where i used \textbf and the other is pointing to the start/end of the tabular. What is wrong with the code?


title: Fancyhdr layout of "Contents" and "Chapter 0"?

text: The attached latex produces header of page 2 and page 4 to look like ![enter image description here](http://i.stack.imgur.com/OWjJt.png) ![enter image description here](http://i.stack.imgur.com/PasZy.png) where I would have liked "CONTENTS" to be "Contents" and "Chapter 0: Rresumé" to be "Rresumé". All the following chapter headers should still be "Chapter 1: Something". **Question** Does anyone know what I am doing wrong? **Latex**               \documentclass[a4paper,12pt]{book}     \usepackage{fancyhdr}     \usepackage{titlesec}     \usepackage[nottoc]{tocbibind}          \pagestyle{fancyplain}     \renewcommand{\chaptermark}[1]{\markboth{Chapter \thechapter{}: #1}{}}     \lhead[\fancyplain{}{\bfseries\thepage}]         {\fancyplain{}{\bfseries\rightmark}}     \rhead[\fancyplain{}{\bfseries\leftmark}]         {\fancyplain{}{\bfseries\thepage}}     \cfoot[]{}     \addtolength{\headheight}{1.6pt}     \renewcommand{\sectionmark}[1]{\markright{\thesection{} #1}}     \lhead[\fancyplain{}{\bfseries\thepage}]         {\fancyplain{}{\bfseries\rightmark}}     \rhead[\fancyplain{}{\bfseries\leftmark}]         {\fancyplain{}{\bfseries\thepage}}     \cfoot[]{}     \addtolength{\headheight}{1.6pt}          \renewcommand{\chaptertitlename}{}     \titleformat{\chapter}[hang]{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter:}{1em}{}           \begin{document}     \tableofcontents     \chapter*{Resum\'{e}}     \addcontentsline{toc}{chapter}{Resum\'{e}}     \chaptermark{Rresum\'{e}}     aaa     \newpage     aaa     \end{document}


title: Error detection in the code written

text: \begin{frame}     \begin{block} {Video Animation}     \end{block}     \begin{itemize}     \barrow Include package{hyperref}     \barrow command     \begin{itemize}     \bullet {\begin{print}     {\href{run:video.mp4}}     \end{print}}     \barrow Use VLC player to open video/movie     \end{itemize}     \end{itemize}     \end{frame}      Can anyone tell me the error in above code??


title: How to set border for figures

text: When I insert figures into my tex,sometimes it goes out of the page. Can you please suggest a method to avoid this.


title: Multicolumn width in longtable

text: How do I set the multicolumn width in longtable cells? If you run my MWE, you'll see that the first row of my longtable exceeds page limits.               \documentclass[11pt,a4paper,oneside]{report}     \usepackage{setspace}     \usepackage{array}     \usepackage{covington}     \usepackage[danish,english]{babel}     \usepackage{longtable}     \usepackage{caption}     \usepackage{multirow}          \begin{document}               \begin{longtable}{Rp{9cm}}     \caption{Example}\\     \endfirsthead     \caption[]{(continued)}\\     \endhead     \endlastfoot     \multicolumn{2}{l}{Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}\\     \\     \textsc{Lorem}&"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."\\     {\dag} \textsc{Ipsum}&"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."\\     \end{longtable}          \end{document}


title: Changing the section title style for an article document type

text: I have just started working on my master's thesis with my universities latex template. It uses the 'article' document class for it. I have tweaked it here and there a bit to make it more to my liking. I wanted to change the way the section headers looked like to make it look better. So, I want to be able to change the font and font size, style etc. I would also like to add horizontal lines to give it more style. It would roughly look like this:               -------------------        INTRODUCTION     -------------------      Well something with more decoration than the default style atleast. Can anyone tell me how can I make these changes? I would also be useful if I can find some already implemented section styles.


title: picture in enumerate item with floating text

text: I have a list with some text items and I want to add a picture to one of the items, so that the text of that item is floating to the left of the picture. If I use wrapfigure my picture gets placed at the bottom of the page which is not what I want. This is my tex:               \documentclass{article}     \usepackage{wrapfig}     %\usepackage{picins}     \usepackage[ngerman,english]{babel}     \usepackage{blindtext}          \begin{document}     \blindtext          \begin{enumerate}     \item\blindtext     \item     \begin{wrapfigure}{r}{5.8cm}     \rule{5.8cm}{3.2cm}     \end{wrapfigure}     \blindtext     \end{enumerate}          \blindtext     \end{document}      Any ideas?


title: Undefined Control Sequence section

text: I'm new to using LaTeX and I'm using someone else's template. I don't know but I keep getting Undefined Control Sequence error. I would really appreciate if someone could help me out in figuring out what I'm doing wrong.               \documentclass{article}     \usepackage{amsthm}     \usepackage{amsmath}          \makeatletter     \def\lecture{\@ifnextchar[{\@lectureWith}{\@lectureWithout}}     \def\@lectureWith[#1]{\medbreak\refstepcounter{section}%       \renewcommand{\leftmark}{Lecture \thesection}       \noindent{\addcontentsline{toc}{section}{Lecture \thesection: #1\@addpunct{.}}%       \sectionfont Lecture \thesection. #1\@addpunct{.}}\medbreak}     \def\@lectureWithout{\medbreak\refstepcounter{section}%       \renewcommand{\leftmark}{Lecture \thesection}       \noindent{\addcontentsline{toc}{section}{Lecture \thesection.}%       \sectionfont Lecture \thesection.}\medbreak}     \makeatother          \title{Long Boring Lectures on 0-dimensional Manifolds}     \author{Alex Nelson}     \begin{document}     \maketitle          \lecture % it's ok for it to not take any arguments     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse     cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat     non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          \lecture[I'M BRILLIANT] % It can also take an argument     At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis     praesentium voluptatum deleniti atque corrupti quos dolores et quas     molestias excepturi sint occaecati cupiditate non provident, similique sunt in     culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et     harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum     soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime     placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.      Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus     saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae.     Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis     voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.     \end{document}      The error that I get is following:               ! Undefined control sequence.     \@lectureWithout ...re \thesection .}\sectionfont                                                        Lecture \thesection .}\med...     l.23 L           orem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod     ?           Process has been terminated ...      Any help would be appreciated.


title: undefined control sequence in equation

text: I have loaded the `amsmath` package. I am not able to get the mass function of a negative binomial distribution. The code is:               \begin{equation*}          f(count_{i,t}|\lambda_{i,t},\theta_i) =      {\Gamma(\lambda_{i,t} + count_{i,t})/{\Gamma(\lambda_{i,t})\Gamma(count_{i,t}+1)}}{(\theta_i/{1+\theta_i})}^count_{i,t} {(1/{1+\theta_i})}^\lamba_{i,t}          \end{equation*}      The error is:               [14] [15] [16] [17]     ! Undefined control sequence.     l.380 ...})}^count_{i,t} {(1/{1+\theta_i})}^\lamba                                                       _{i,t}      ![This is how I want the equation to look like](http://i.stack.imgur.com/mrFDj.jpg) Thanks in advance!