title: mdframed: New bug with page break?

text: The package mdframed works well breaking framed plain texts. I am trying hard to make it work also when the text contais equation arrays, but I keep getting strange compilation errors! My last try was the test code below, inspired by this, which compiles nicely. But when I comment out the first \begin{coderule}...\end{coderule} and leave only the second, I get the following compilation error: **100:Something's wrong--perhaps a missing \item.\end{coderule}** What might be happening?               \documentclass{article}       \usepackage{lipsum}% http://ctan.org/pkg/lipsum       \usepackage{amsmath}% http://ctan.org/pkg/amsmath       \usepackage[framemethod=tikz]{mdframed}% http://ctan.org/pkg/mdframed       \usepackage{xparse}% http://ctan.org/pkg/xparse          \NewDocumentEnvironment{coderule}{O{1em} O{1em} O{black}}%       {% \begin{coderule}[<rule width>][<rule sep>][<rule colour>]     \allowdisplaybreaks[1]%     \begin{mdframed}%       [topline=false,rightline=false,bottomline=false,%       innertopmargin=0pt,innerrightmargin=0pt,innerbottommargin=0pt,%       skipabove=\parskip,skipbelow=0.3\baselineskip,%       innerleftmargin=#2,outerlinewidth=#1,linecolor=#3]       }       {\end{mdframed}}% \end{coderule}          \begin{document}          \begin{coderule}[2em][1em][orange]       Here is a short introduction:       \begin{align}     f(x) &= ax^2+bx+c \\     f(x) &= ax^2+bx+c \\     f(x) &= ax^2+bx+c \\     f(x) &= ax^2+bx+c \\     f(x) &= ax^2+bx+c \\     f(x) &= ax^2+bx+c \\     f(x) &= ax^2+bx+c \\     f(x) &= ax^2+bx+c \\     f(x) &= ax^2+bx+c \\     f(x) &= ax^2+bx+c \\     f(x) &= ax^2+bx+c \\     f(x) &= ax^2+bx+c       \end{align}       \lipsum[5-6]     \end{coderule}          \begin{coderule}     Para mostrarmos que $\sin'\left(0\right) = 1$, primeiro notamos que     \begin{equation}\nonumber     \sin'\left(0\right) = \lim_{h \to 0} \frac{\sin\left(h\right) - \sin\left(0\right)}{h} = \lim_{h     \to 0} \frac{\sin\left(h\right)}{h}.     \end{equation}     Pela Proposi\c{c}\~{a}o \ref{proptrigocont}, temos que     \[     0 < \sin\left(h\right) < h < \tan\left(h\right),     \]     para todo $0 < h < \pi/2$. Dividindo por $\sin\left(h\right) > 0$, obtemos que     \[     1 < \frac{h}{\sin\left(h\right)} < \frac{1}{\cos\left(h\right)}.     \]     Invertendo todos os membros das desigualdades acima, segue que     \begin{equation}\nonumber     1 > \frac{\sin\left(h\right)}{h} > \cos\left(h\right).     \end{equation}     Pela continuidade do cosseno e pelo Teorema do Sandu\'{\i}che, segue ent\~{a}o que     \begin{equation}\nonumber     \sin'\left(0 \downarrow\right) = \lim_{h \downarrow 0} \frac{\sin\left(h\right)}{h} = 1.     \end{equation}     Como $h \downarrow 0$ se e s\'{o} se $-h \uparrow 0$, segue que     \[     \sin'\left(0 \uparrow\right) = \lim_{h \downarrow 0} \frac{\sin\left(-h\right)}{-h} = \lim_{h \downarrow 0} \frac{\sin\left(h\right)}{h} = 1,     \]     onde utilizamos o fato de que seno \'{e} \'{\i}mpar. Isso mostra que $\sin'\left(0\right) = 1$.     %\end{coderule}     %\begin{coderule}     Para mostrarmos que $\cos'\left(0\right) = 0$, primeiro notamos que     \begin{equation}\nonumber     \cos'\left(0\right) = \lim_{h \to 0} \frac{\cos\left(h\right) - \cos\left(0\right)}{h} = \lim_{h     \to 0} \frac{\cos\left(h\right) - 1}{h}.     \end{equation}     Consideramos ent\~{a}o as seguintes igualdades     \begin{align}     \cos'\left(0\right)& = & \lim_{h \to 0} \frac{\cos\left(h\right) - 1}{h}\frac{\cos\left(h\right) + 1}{\cos\left(h\right) + 1} \\     & = & \lim_{h \to 0} \frac{\cos^2\left(h\right) - 1}{h}\frac{1}{\cos\left(h\right) + 1} \\     & = & \lim_{h \to 0} \frac{-\sin^2\left(h\right)}{h}\frac{1}{\cos\left(h\right) + 1}     \end{align}     onde utilizamos o fato que $\cos^2\left(h\right) - 1 = -\sin^2\left(h\right)$.      Temos ent\~{a}o que     \begin{align}     \cos'\left(0\right) & = & - \lim_{h \to 0} \frac{\sin^2\left(h\right)}{h^2}\frac{h}{\cos\left(h\right) + 1} \\     & = & - \left(\lim_{h \to 0} \frac{\sin\left(h\right)}{h}\right)^2 \lim_{h \to 0}\frac{h}{\cos\left(h\right) + 1} \\     & = & -\left(\sin'\left(0\right)\right)^2\frac{0}{\cos\left(0\right) + 1} = 0.     \end{align}     Bis!     Temos ent\~{a}o que     \begin{align}     \cos'\left(0\right) & = & - \lim_{h \to 0} \frac{\sin^2\left(h\right)}{h^2}\frac{h}{\cos\left(h\right) + 1} \\     & = & - \left(\lim_{h \to 0} \frac{\sin\left(h\right)}{h}\right)^2 \lim_{h \to 0}\frac{h}{\cos\left(h\right) + 1} \\     & = & -\left(\sin'\left(0\right)\right)^2\frac{0}{\cos\left(0\right) + 1} = 0.     \end{align}     Bis!     Temos ent\~{a}o que     \begin{align}     \cos'\left(0\right) & = & - \lim_{h \to 0} \frac{\sin^2\left(h\right)}{h^2}\frac{h}{\cos\left(h\right) + 1} \\     & = & - \left(\lim_{h \to 0} \frac{\sin\left(h\right)}{h}\right)^2 \lim_{h \to 0}\frac{h}{\cos\left(h\right) + 1} \\     & = & -\left(\sin'\left(0\right)\right)^2\frac{0}{\cos\left(0\right) + 1} = 0.     \end{align}     \end{coderule}     \end{document}


title: Insert a list into an epigraph environment

text: I would like to produce the following with a list:               \epigraph{There are only four systems that bridge all linguistic barriers:\\          --The complete set of mathematical symbols,\\          --The International System of Units,\\          --The symbols for chemical elements,\\          --The way of writing notes for music.     }


title: Thesis won't compile after editing .bib

text: I'm writing my thesis using the Classic Thesis template. My file compiled well until I added some references to my .bib file. Now TeXworks won't compile my thesis anymore, giving me the following. Would anyone have any idea what has happened? I've spent the first four months of my thesis writing troubleshooting LaTeX, and would really like to get on with the actual writing... Cheers.               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)     restricted \write18 enabled.     entering extended mode     (./ClassicThesis.tex     LaTeX2e <2011/06/27>     Babel <3.9f> and hyphenation patterns for 78 languages loaded.     (/usr/local/texlive/2013/texmf-dist/tex/latex/koma-script/scrreprt.cls     Document Class: scrreprt 2012/07/29 v3.11b KOMA-Script document class (report)     (/usr/local/texlive/2013/texmf-dist/tex/latex/koma-script/scrkbase.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/koma-script/scrbase.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/keyval.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/koma-script/scrlfile.sty     Package scrlfile, 2012/06/15 v3.12 KOMA-Script package (loading files)     Copyright (C) Markus Kohm          ))) (/usr/local/texlive/2013/texmf-dist/tex/latex/koma-script/tocbasic.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/koma-script/scrsize11pt.clo)     (/usr/local/texlive/2013/texmf-dist/tex/latex/koma-script/typearea.sty     Package typearea, 2012/07/29 v3.11b KOMA-Script package (type area)     Copyright (C) Frank Neukam, 1992-1994     Copyright (C) Markus Kohm, 1994-          )) (./classicthesis-config.tex     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/ifthen.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/inputenc.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/latin9.def))     (/usr/local/texlive/2013/texmf-dist/tex/generic/babel/babel.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/babel-german/ngermanb.ldf     (/usr/local/texlive/2013/texmf-dist/tex/generic/babel/babel.def))     (/usr/local/texlive/2013/texmf-dist/tex/generic/babel-english/english.ldf))     (/usr/local/texlive/2013/texmf-dist/tex/latex/natbib/natbib.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsmath.sty     For additional information on amsmath, use the `?' option.     (/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amstext.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsgen.sty))     (/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsbsy.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsopn.sty))     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/fontenc.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/t1enc.def))     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/textcomp.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/ts1enc.def))     (/usr/local/texlive/2013/texmf-dist/tex/latex/koma-script/scrhack.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/tools/xspace.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/mparhack/mparhack.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/fixltx2e.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/acronym/acronym.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/bigfoot/suffix.sty)     (/usr/local/texlive/2013/texmf-dist/tex/generic/xstring/xstring.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/xstring/xstring.tex))     (/usr/local/texlive/2013/texmf-dist/tex/latex/relsize/relsize.sty))     (/usr/local/texlive/2013/texmf-dist/tex/latex/eurosym/eurosym.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/tools/tabularx.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/tools/array.sty))     (/usr/local/texlive/2013/texmf-dist/tex/latex/caption/caption.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/caption/caption3.sty))     (/usr/local/texlive/2013/texmf-dist/tex/latex/subfig/subfig.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/listings.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/lstmisc.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/listings.cfg))     (/usr/local/texlive/2013/texmf-dist/tex/latex/koma-script/listings.hak)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/lstlang1.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/lstlang2.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/lstlang3.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/lstlang1.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/lstlang2.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/lstlang3.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/lstlang1.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/lstlang2.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/lstlang3.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/listings/lstmisc.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/hyperref/hyperref.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))     (/usr/local/texlive/2013/texmf-dist/tex/generic/ifxetex/ifxetex.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/oberdiek/auxhook.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/oberdiek/kvoptions.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/hyperref/pd1enc.def)     (/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/hyperref.cfg)     (/usr/local/texlive/2013/texmf-dist/tex/latex/url/url.sty))          Package hyperref Message: Driver: hpdftex.          (/usr/local/texlive/2013/texmf-dist/tex/latex/hyperref/hpdftex.def     (/usr/local/texlive/2013/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))     (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/graphicx.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/graphics.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/trig.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/graphics.cfg)     (/usr/local/texlive/2013/texmf-dist/tex/latex/pdftex-def/pdftex.def)))     (./classicthesis.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/xcolor/xcolor.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/color.cfg)     (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/dvipsnam.def))     (/usr/local/texlive/2013/texmf-dist/tex/latex/psnfss/mathpazo.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/bera/beramono.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/eulervm/eulervm.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/microtype/microtype.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/microtype/microtype-pdftex.def)     (/usr/local/texlive/2013/texmf-dist/tex/latex/microtype/microtype.cfg))     (/usr/local/texlive/2013/texmf-dist/tex/latex/booktabs/booktabs.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/textcase/textcase.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/koma-script/scrpage2.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/titlesec/titlesec.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/tocloft/tocloft.sty)     Using KOMA-command "deffootnote" for footnote setup     (/usr/local/texlive/2013/texmf-dist/tex/latex/koma-script/scrtime.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/ms/prelim2e.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/ms/everyshi.sty))     (/usr/local/texlive/2013/texmf-dist/tex/latex/carlisle/remreset.sty)     \citation{*}     )) (./ClassicThesis.aux)     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/ts1cmr.fd)     (/usr/local/texlive/2013/texmf-dist/tex/latex/psnfss/t1pplj.fd)     (/usr/local/texlive/2013/texmf-dist/tex/latex/hyperref/nameref.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))     (./ClassicThesis.out) (./ClassicThesis.out)     (/usr/local/texlive/2013/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     ) (/usr/local/texlive/2013/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/oberdiek/grfext.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))     (/usr/local/texlive/2013/texmf-dist/tex/latex/microtype/mt-ppl.cfg)     ABD: EveryShipout initializing macros (./FrontBackmatter/Titlepage.tex     <gfx/aalto_logo.png, id=4, 240.9pt x 200.75pt> <use gfx/aalto_logo.png>     (/usr/local/texlive/2013/texmf-dist/tex/latex/bera/t1fvm.fd) [1{/usr/local/texl     ive/2013/texmf-var/fonts/map/pdftex/updmap/pdftex.map} <./gfx/aalto_logo.png>])     [2] (./FrontBackmatter/Abstract.tex     Overfull \hbox (5.1162pt too wide) in paragraph at lines 15--16     \T1/pplj/m/n/10.95 Logistics, Busi-ness De-vel-op-ment, fill-level sen-sor, Mac     hine-to-machine,     ) [3] [4] (./FrontBackmatter/Contents.tex          Package hyperref Warning: old toc file detected, not used; run LaTeX again.          (/usr/local/texlive/2013/texmf-dist/tex/latex/eulervm/uzeur.fd)     (/usr/local/texlive/2013/texmf-dist/tex/latex/microtype/mt-eur.cfg)     (/usr/local/texlive/2013/texmf-dist/tex/latex/eulervm/uzeus.fd)     (/usr/local/texlive/2013/texmf-dist/tex/latex/microtype/mt-eus.cfg)     (/usr/local/texlive/2013/texmf-dist/tex/latex/eulervm/uzeuex.fd)     (/usr/local/texlive/2013/texmf-dist/tex/latex/psnfss/ot1zplm.fd) [5]          Package hyperref Warning: old lof file detected, not used; run LaTeX again.               Package hyperref Warning: old lot file detected, not used; run LaTeX again.               Package hyperref Warning: old lol file detected, not used; run LaTeX again.          (/usr/local/texlive/2013/texmf-dist/tex/latex/base/t1cmss.fd) [6]) [7] [8]     (./Chapters/Chapter01.tex     Chapter 1.     (/usr/local/texlive/2013/texmf-dist/tex/latex/psnfss/ts1pplj.fd) [9] [10])     [11] (./Chapters/Chapter02.tex [12]     Chapter 2.          Package natbib Warning: Citation `tkeskus_ruraldef' on page 13 undefined on inp     ut line 9.               Package natbib Warning: Citation `maaseudun_kehohj' on page 13 undefined on inp     ut line 11.               Package natbib Warning: Citation `maaseudun_kehohj' on page 13 undefined on inp     ut line 13.               Package natbib Warning: Citation `maaseudun_kehohj' on page 13 undefined on inp     ut line 24.          ) [13] [14]     No file Chapters/Chapter03.tex.     [15] [16] (./Chapters/Chapter04.tex     Chapter 3.     ) [17] (./Chapters/Chapter05.tex [18]     Chapter 4.          Overfull \hbox (63.50275pt too wide) in paragraph at lines 28--34     []\T1/pplj/m/n/10.95 Esimerkkitoimittajia - Agri-mar-ket - K-Maatalous - Pee�\T     S1/pplj/m/n/10.95 �\T1/pplj/m/n/10.95 ss�\TS1/pplj/m/n/10.95 � \T1/pplj/m/n/10.     95 - L�\TS1/pplj/m/n/10.95 �\T1/pplj/m/n/10.95 mp�\TS1/pplj/m/n/10.95 �\T1/pplj     /m/n/10.95 puisto          Overfull \hbox (30.21194pt too wide) in paragraph at lines 39--41     \T1/pplj/m/n/10.95 ``Energiantuotannon kaksi jo-htavaa trendi�\TS1/pplj/m/n/10.     95 �\T1/pplj/m/n/10.95 '' - Matti Pentti, L�\TS1/pplj/m/n/10.95 �\T1/pplj/m/n/1     0.95 mm�\TS1/pplj/m/n/10.95 �\T1/pplj/m/n/10.95 ll�\TS1/pplj/m/n/10.95 �     ) [19] (./Chapters/Chapter06.tex [20]     Chapter 5.          Overfull \hbox (10.63615pt too wide) in paragraph at lines 9--10     []\T1/pplj/m/n/10.95 http://www.solinst.com/products/dataloggers-and-telemetry/     3001-          Overfull \hbox (0.2849pt too wide) in paragraph at lines 9--10     \T1/pplj/m/n/10.95 levelogger-series/technical-bulletins/understanding-pressure     -sensor-     ) [21] (./Chapters/Chapter07.tex [22]     Chapter 6.     ) [23] (./Chapters/Chapter08.tex [24]     Chapter 7.     ) [25] [26] [27] [28] (./Chapters/Chapter09.tex     Chapter 8.     ) [29] (./Chapters/Chapter10.tex [30]     Chapter 9.     ) [31] (./Chapters/Chapter11.tex [32]     Chapter 10.          Overfull \hbox (0.84937pt too wide) in paragraph at lines 2--2     []\chapterNumber 10      ) [33] (./Chapters/Chapter12.tex [34]     Chapter 11.          Overfull \hbox (0.84937pt too wide) in paragraph at lines 2--2     []\chapterNumber 11      ) [35] [36] [37] [38] (./Chapters/Chapter13.tex     Chapter 12.          Overfull \hbox (0.84937pt too wide) in paragraph at lines 2--2     []\chapterNumber 12      ) [39] (./Chapters/Chapter14.tex [40]     Chapter 13.          Overfull \hbox (0.84937pt too wide) in paragraph at lines 2--2     []\chapterNumber 13      ) [41] (./Chapters/Chapter15.tex [42]     Chapter 14.          Overfull \hbox (0.84937pt too wide) in paragraph at lines 2--2     []\chapterNumber 14      ) [43] [44] [45] [46] (./Chapters/Chapter16.tex     Chapter 15.          Overfull \hbox (0.84937pt too wide) in paragraph at lines 2--2     []\chapterNumber 15      ) [47] [48] [49] [50] (./Chapters/Chapter0A.tex     Appendix A.     ) [51] [52] (./FrontBackmatter/Bibliography.tex (./ClassicThesis.bbl     ! Misplaced alignment tab character &.     <argument> The Handbook of Logistics &     Distribution Management     l.14 ...ok of Logistics & Distribution Management}     .     ?           *


title: moderncv banking style: How to move the title block all the way to the left?

text: In have used `banking` style in the `moderncv` class. I have modified things a bit. The code is so huge and messy that for me to provide the MWE would be impossible. In, the `moderncvstylebanking.sty` file, around line number 88 to 92, I have done changes to bring something like this : ![](http://i.stack.imgur.com/R7xIV.png) How do I bring it completely to the left (removing the gap). The modified part of the code is:                 \raggedright       \parbox{\maketitlewidth}{%         % name and title         \namestyle{\@firstname~\@familyname}%         \ifthenelse{\isundefined{\@title}}{}{\titlestyle{\@title}}\\%         % detailed information         \addressfont\color{color2}%         \ifthenelse{\isundefined{\@addressstreet}}      line 88-95.


title: What would cause LaTeX to put text and tables on separate pages?

text: My document is being generated with many pages with a short paragraph of text on one page, a short table on the next page, another short paragraph of text on the following page, etc. There is plenty of space to include more text and tables on most pages, but for some reason LaTeX is treating them like oil and water and separating them completely. How can I change the options so that my document isn't 95% white space? Here basically what my file looks like.               \documentclass[letterpaper,twoside,10pt]{article}     \usepackage[USenglish]{babel} %francais, polish, spanish, ...     \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage{lmodern} %Type1-font for non-english texts and characters          \usepackage{tabularx} %For setting table widths     \usepackage{float}          \usepackage{graphicx} %%For loading graphic files          %% Math Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{amsfonts}          \usepackage[margin=1in]{geometry}          \begin{document}          \pagestyle{empty} %No headings for the first pages.     \title{Awesome Report}     \author{LaTex Noob}     \maketitle          \pagestyle{plain} %Now display headings: headings / fancy / ...          \section{Intro}\label{intro}     asdfa asdf asdfa asdf asdfa asdf asdfa asdf asdfa asdf asdfa asdf asdfa asdf           \include{treeTrainAccuracy}          asdfa asdf asdfa asdf asdfa asdf asdfa asdf asdfa asdf asdfa asdf           \include{treeTestAccuracy}          asdfa asdf asdfa asdf asdfa asdf asdfa asdf asdfa asdf asdfa asdf           \include{svmTrainAccuracy}          asdfa asdf asdfa asdf asdfa asdf asdfa asdf asdfa asdf           \include{svmTestAccuracy}          asdfa asdf asdfa asdf asdfa asdf asdfa asdf asdfa asdf       All of the includes refer to a table with the following structure (values differ of course):               \begin{table}[ht]     \centering     \begin{tabularx}{\textwidth}{|l|X|X|l|X|X|X|}       \hline      & laying & sitting & standing & walk & walkdown & walkup \\        \hline     laying & 221 &   0 &   0 &   0 &   0 &   0 \\        sitting &   0 & 190 &   0 &   0 &   0 &   0 \\        standing &   0 &   8 & 227 &   0 &   0 &   0 \\        walk &   0 &   0 &   0 & 266 &   0 &   0 \\        walkdown &   0 &   0 &   0 &   0 & 193 &   0 \\        walkup &   0 &   0 &   0 &   0 &   0 & 210 \\         \hline     \end{tabularx}     \caption{SVM training set accuracy. Rows represent actual values. Columns are predicted values.\label{tab:svmTrainAccuracy}}      \end{table}


title: How to customize enumeration to implement Brazilian law texts?

text: This is a standard model of a Brazilian contract: http://www.consultta.com/modelos_contratos/modelos_contrato/0215.htm It more or less follow the way Brazilian laws are written: as you can see, the sections are named, like "DO OBJETO DO CONTRATO"; then text is built as an enumeration of paragraphs: "Cláusula 1ª. (text)" "Cláusula 2ª. (text)" Each of the "Cláusula" level paragraph may have sub-paragraphs. If there is only one, it is prefixed by "Parágrafo único", if there are more than one, they are prefixed with "§ 1º", "§ 2º" and so on (in the link I sent, they use "Parágrafo primeiro" and "Paragrafo segundo", but it is equivalent to the "§ 1º" form). The gotcha is that the numbering of "Cláusula" continues after the section titles, as you can see in the sample document. Starting from a LaTeX article class, how to customize the appearance of enumeration (or maybe create another command set) to support this specific way of formatting?


title: Is there a punctuation mark that does not take up any space?

text: I'm typesetting a text from a 17th century Chinese woodblock print. The original text is printed vertically, and I'm printing it horizontally. The text has the same number of Chinese characters per line. It also has punctuation marks, which are in the lower right corner of every character. These marks take up no space, so that although there are an uneven number of punctuation marks in every line, the lines remain of the same length. However, if I use the CJK punctuation mark 。 for punctuation, that counts as one character, creating lines of uneven length. Is it possible to create a punctuation mark to be placed in subscript in the lower right corner of a Chinese character, which will not take up any space on the line, keeping the lines of uniform length?


title: Drawing random paths in TikZ

text: I am looking for a way to draw with TikZ something that looks like a random path. Here is an inspiration: ![example](http://i.stack.imgur.com/DEBUp.png) Is it possible to have TikZ generate something that would be similar to a random path instead of manually choosing points to connect together? Thanks! P.S. This question falls into a more general question (that does not necessarily needs to be answered): is there a (meta-)way to use TikZ to draw diagrams as they would appear on a chalkboard during a class. I mean TikZ generates very professional looking diagrams, but it's hard to draw a "random" curve just to express some notion, or draw a "random" diagram or "random" example to explain a notion.


title: Reformat \frac depending on numerator/denominator size difference

text: Is it possible to detect cases where the second argument of `\frac` is much smaller than the first argument, and split it? Namely (I'm using a new macro name `\wfrac` to simplify things),               \wfrac{x}{2} % => \frac{x}{2}     \wfrac{x+y}{2} % => \frac{1}{2}\left(x+y\right)     \wfrac{\sum_{i=1}^{N} i^3}{x+y+z+t}     % => \frac{1}{x+y+z+t} \left(\sum_{i=1}^{N} i^3\right)     % => or \left(\sum_{i=1}^{N} i^3\right) / \left(x+y+z+t\right)     \wfrac{\sum_{i=1}^{N} i^3}{\sum_{i=1}^{N} i}     % => \frac{...}{...} (unchanged)      Feel free to tell me that this is a bad idea. **EDIT:** As David notes in his comment, it is not clear what I define as bigger/smaller. The third example in particular features a case where the numerator is taller, but the denominator is wider. he also notes that `\wfrac{x}{y}` could become `(x)/(y)`. I am building the requirements as I write the question, so feel free to tweak them at your will. `\wfrac{x}{y}` should become one of `\frac{x}{y}`, or `\frac{1}{y}(x)`, or `(x)/(y)`, with `()/` scaling as appropriate. Here is one scheme that could give nice results. Denote `hx`, `hy` the heights (plus depths) of `x` and `y`; `wx`, `wy` their widths; `h0` and `w0` customizable thresholds for what is considered "small", for instance the dimensions of the formula `$a+b$`, but probably the threshold should depend on the `\mathstyle`.   1. If `hy < h0` and `wy < w0`,     1. If `hx < h0` and `wx < max(w0, 2 * wy)`, use `\frac{x}{y}`.     2. Otherwise use `\frac{1}{y}(x)`.   2. Otherwise use `(x)/(y)`.


title: Removing leader and page number from added line in ToC (memoir class)

text: My question is very similar to this, but a little more complicated - Yet another leader dot question and related for TOC I am trying to format my ToC using the memoir class. I want my ToC to look like this..                          TABLE OF CONTENTS                                    Page     LIST OF TABLES ................. i      LIST OF FIGURES ................ ii     CHAPTER     1 First chapter ................ 1       subheading ................... 2     2 Second chapter ............... 3      Using the pwasu style file and memoir provided commands within, I have been able to make my ToC formatted to look like this...                          TABLE OF CONTENTS                                    Page     LIST OF TABLES ................. i      LIST OF FIGURES ................ ii     CHAPTER ........................ 1     1 First chapter ................ 1       subheading ................... 2     2 Second chapter ............... 3      Here is my current code...               \documentclass[oneside,12pt]{memoir}     \usepackage{pwasu}     \begin{document}     \tableofcontents*     \listoftables     \listoffigures     \addcontentsline{toc}{chapter}{CHAPTER}     \chapter{First chapter}     \end{document}      Here is my best representation of minimal code from pwasu               \let\oldtoc\tableofcontents     \renewcommand{\tableofcontents}{\clearpage\pagestyle{toc}\oldtoc}     \renewcommand{\contentsname}{TABLE OF CONTENTS}     \renewcommand{\listfigurename}{LIST OF FIGURES}     \renewcommand{\listtablename}{LIST OF TABLES}     \renewcommand*{\tocheadstart}{\vspace*{-\topfiddle}}     \renewcommand*{\aftertoctitle}{\thispagestyle{plain}%       \par\nobreak \mbox{}\hfill{\normalfont Page}\par\nobreak}     \renewcommand*{\cftchapterfont}{\normalfont}     \renewcommand*{\cftchapterpagefont}{\normalfont}     \renewcommand*{\cftchapterleader}{%       \cftchapterfont\cftdotfill{\cftchapterdotsep}}     \renewcommand*{\cftchapterdotsep}{\cftdotsep} %%%%      %\renewcommand*{\cftchaptername}{CHAPTER~}     \setlength{\cftbeforechapterskip}{0pt plus 0pt}     \renewcommand*{\insertchapterspace}{}      I want to get rid of the leaders and page number from the added content line, CHAPTER, as it is only there to signify the chapter numbers of subsequent chapters.


title: Migrating from pdfTeX to LuaTeX: Problems with reproducing output for legacy projects

text: I'm currently analyzing and evaluating a migration process from pdfTeX to LuaTeX for our current TeX workflow. With LuaTeX being a fork of pdfTeX and packages like `luainputenc` at hand it seemed promising to reproduce pdfTeX's output using LuaTeX when sacrificing (some or most of) LuaTeX's new features. Currently, however, I'm stuck and need your help to decide whether it's worth digging deeper or accepting what I found out. There are two problems I'm facing. * * * Here's the **first problem**. Engines: pdfTeX 3.1415926-2.4-1.40.13 and LuaTeX beta-0.70.2-2012052410 (both from TeX Live 2012) with `\--output-format=pdf`. When using UTF-8 input (`[utf8x]{inputenc}` for pdfTeX, `[utf8x]{luainputenc}` for LuaTeX) and T1 encoded fonts (`[T1]{fontenc}`) the output from both engines differs for some non-T1 characters. MWE:               \documentclass{article}     \usepackage[utf8x]{luainputenc}     \usepackage[T1]{fontenc}     \renewcommand{\rmdefault}{lmr}     \begin{document}     \begin{tabular}{@{}l*{10}{p{7mm}@{}}}     Some T1 characters:     & \# & \$ & \% & Ă & Ň & § & @ & Æ & ß   & £   \\[1.5mm]     Some non-T1 characters: & ‡  & ÿ  & ‰  & … & ¶ & ½ & ĩ & µ & | | & | | \\     \end{tabular}     \end{document}      Notes: `luainputenc` is forwarding to `inputenc` if called from pdfTeX. The output is the same when using an `\ifluatex` and loading `inputenc` and `luainputenc` separetely. The spaces between the bars in the last two columns of the second row are supposed to be a Unicode NO-BREAK SPACE (U+00A0) and a THIN SPACE (U+2009). pdfTeX output: (everything fine here) ![](http://i.stack.imgur.com/Cs7ri.png) LuaTeX output: (notice the last five columns of the second row) ![](http://i.stack.imgur.com/BWvlA.png) This problem does most certainly exist for other characters as well, these are just some I encountered. Is there a way to get the pdfTeX output from LuaTeX? The problem is the same with different T1 encoded fonts, try `mathpazo` if you want. Using a different font encoding **is not** an option here as the task at hand is to migrate TeX engines, not fonts or their encodings. Am I perhaps missing a pdfTeX package that has to be replaced for LuaTeX usage? The `lutf8x` (notice the leading L) `luainputenc` package option does not help here either. (Which is no suprise as its purpose is different.) What I'm trying to use here, according to its manual, is the "UTF-8 legacy mode" of `luainputenc`, i.e. mimicing the behavior of `inputenc` in pdfTeX by making non-ASCII characters active to determine the correct bit length of characters and so on. Maybe the problem is not the input side (afaik `luainputenc`'s job of translating input bytes into LICR) but the output side (afaik translating LICR into glyph positions of the font used)? Maybe LuaTeX is just translating to Unicode positions, not regarding glyph positions of the font, like the EU2 encoding? Anyway, where does the problem come from? Can it be helped and if so, how? Btw: It works fine with LuaTeX when using an OpenType-Font with `fontspec` and EU2 encoding, but that's not the primary goal here. * * * And here's the **second problem**. It's closely tied to the first one and can be reproduced using the MWE above. When using `\--output-format=dvi` pdfTeX is producing a DVI file that dvips has no problem with. When using a LuaTeX DVI file dvips stops with something like               This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)     ' LuaTeX output 2012.08.01:1700' -> ohnexml-luatex.ps     dvips: ! invalid char 297 from font ec-lmr10      This is how I actually came up with the suspicion that for the first problem Unicode positions and not font encoding specific glyph positions are written to the output file as 297 is the decimal Unicode point of `ĩ` (second row, fourth last column in the MWE above). If a solution to the first problem does not solve this problem transitively, how can this one be helped? Thank you for your thoughts.


title: PGFplot histogram using multiple barplots

text: I'am trying to create a colored histogram using barplots using the following code:               \begin{tikzpicture}     \begin{axis}[ybar,     ymin=0,     bar width=0.2cm,     axis x line*=left,     nodes near coords=\rotatebox{90}{\scriptsize\pgfmathprintnumber\pgfplotspointmeta},     enlarge x limits=false,     grid=major,     height=7cm,     title={All Results},     xlabel={bias from reference in \%},     ylabel={Number of Results},     symbolic x coords={$<-20$,$-20$,$-19$,$-18$,$-17$,$-16$,$-15$,$-14$,$-13$,$-12$,$-11$,$-10$,$-9$,$-8$,$-7$,$-6$,$-5$,$-4$,$-3$,$-2$,$-1$,$0$,$1$,$2$,$3$,$4$,$5$,$6$,$7$,$8$,$9$,$10$,$11$,$12$,$13$,$14$,$15$,$16$,$17$,$18$,$19$,$20$,$>20$},     xtick=data,     xticklabel style={inner sep=0pt, anchor=north east, rotate=45},     width=\textwidth]     \addplot[red,fill=red!40!white] coordinates {($<-20$,3) ($-20$,2) ($20$,0) ($>20$,0)};     \addplot[yellow,fill=yellow!40!white] coordinates {($-19$,1) ($-18$,2) ($-17$,0) ($-16$,1) ($-15$,0) ($15$,0) ($16$,0) ($17$,0) ($18$,0) ($19$,0)};     \addplot[blue,fill=blue!40!white] coordinates {($-14$,0) ($-13$,1) ($-12$,1) ($-11$,0) ($-10$,1) ($10$,0) ($11$,1) ($12$,0) ($13$,0) ($14$,1)};     \addplot[green,fill=green!40!white] coordinates {($-9$,1) ($-8$,5) ($-7$,14) ($-6$,46) ($-5$,105) ($-4$,185) ($-3$,126) ($-2$,297) ($-1$,276) ($0$,301) ($1$,250) ($2$,153) ($3$,67) ($4$,85) ($5$,37) ($6$,29) ($7$,9) ($8$,2) ($9$,10)};     \legend{Bad,Fair,Good,Excellent}     \end{axis}     \end{tikzpicture}      Resulting in something that almost looks great, but I'am missing some x tick and some bars are not on the right spot :( Someone got an idea to fix this, or can suggest an alternative? Grtz, Berry


title: Biblatex no printing page number

text: I am using `biblatex` package to produce my references, with the `ieee` style. This is what I have in the preamble:               \usepackage[style=ieee, backend=biber]{biblatex}     \addbibresource{biblio.bib}      The `biblio.bib` file is like this:               @inproceedings{     Angelosante2007,      author={Daniele Angelosante and Ezio Biglieri and Marco Lops},      title={A Simple Algorithm for Neighbor Discovery in Wireless Networks},      booktitle={Acoustics, Speech and Signal Processing, 2007. ICASSP 2007. IEEE International Conference on},     editor={IEEE},     year=2007,      month=april,     volume=3,      number={},      pages={III-169--III-172},     doi={10.1109/ICASSP.2007.366499},      isbn={1-4244-0728-1},     keywords={limited-complexity constraints; missed detection; neighbor discovery; wireless networks; computational complexity; radio networks;},     }      Everything is OK, except that page is not appearing. If I change pages like `pages={169--172}` it does work. Or if I use:               \bibliographystyle{IEEEtran}     \bibliography{biblio}      It also prints the page range number. How can I do for pages not following strictly the range rule to appear? Thanks.


title: auctex, direct speech highlighting

text: How can I achieve a proper highlighting in auctex/emacs? I use the german guillemets (chevrons), but the highlighting is just revers as I would use the real (french) guillemets. **He says: »** Who are you? **« I reply: »** Just a guy who wants proper highlighting.« The bold parts are highlighted. For the standard syntax table I have this snippet in my ~/.emacs:               (modify-syntax-entry ?« ")»" (standard-syntax-table))      (modify-syntax-entry ?» "(«" (standard-syntax-table))      My guess was that a hook could help:               (add-hook 'LaTeX-mode-hook       (lambda ()         (modify-syntax-entry ?« ")»")         (modify-syntax-entry ?» ")«")     ))      But it didn't. The usual answer to this problem is, put               \usepackage[german]{babel}      in your preamble, but of course it is there.


title: Parallel lines in Feynman Diagram

text: I am trying to draw this feynman diagram ![enter image description here](http://i.stack.imgur.com/pnoLw.png) The part that's a bit tricky is the parallel lines, in the laeft and right side of the diagram. How to do that? I've tried searching in `feynmf`'s manual. I saw a similar diagram, which was using               \fmffreeze     \fmfi{plain}{vpath (__i1,__b) shifted (thick*(0,2))}     \fmfi{plain}{vpath (__i1,__b) shifted (thick*(1,-2))}      but in my case it only produces 2 lines on the left side... My code is               \documentclass{article}     \usepackage{feynmp-auto}     \unitlength=1mm     \begin{document}     \begin{fmffile}{ElasticScattering}     \fmfframe(1,7)(1,7){       \begin{fmfgraph}(40,25)                 \fmfleft{i1,i2}           \fmfright{o1,o2}           \fmfbottom{b}           \fmf{fermion}{i2,v1,o2}           \fmf{photon}{v1,b}           \fmfblob{.15w}{b}           \fmf{phantom}{i1,b,o1}           \fmffreeze           \fmfi{plain}{vpath (__i1,__b) shifted (thick*(0,2))}           \fmfi{plain}{vpath (__i1,__b) shifted (thick*(1,-2))}       \end{fmfgraph}}     \end{fmffile}     \end{document}      My result is ![enter image description here](http://i.stack.imgur.com/AW7sj.png)


title: Using colorbox in a Listing/minipage with underscore "_"

text: I am having some issues with using `\colorbox{}{}` in combination with an underscore. The Listing will compile without issues and highlighting the text properly, but as soon as I have an underscore in the text to be highlighted, I get the same error like 100 times.               pdflatex> l.215 ...red_3      \!\colorbox{lightred}{Man_3}!     pdflatex>                                                    . )     pdflatex> ! Extra }, or forgotten $.     pdflatex> <recently read> \egroup       I've tried escaping that "_" with slash, but that does not help.                       \documentclass[ a4paper,                        % DinA4 Paper                 % abstract      = on,           % enable abstract (not in scrbook})                 draft           = false,        % status: draft, final                 twoside         = false,        % set true for 2-sided                 pdftex,                         % PDF                 pagesize,                 BCOR            = 10mm,                 open            = any,          % right, left                    headings        = normal,       % alt: big, normal                 fontsize        = 12pt,         % font size                 parskip         = full+,        % alt: half+-*                 1.1headlines,                    appendixprefix  = false,                 chapterprefix   = false,                     %titlepage,                 notitlepage,                    % no cleardoublepage                  headinclude,                 numbers         = noenddot,     % no end dot in headings                 % listof        = totoc,        % add LoF to ToC                 % index         = totoc,        % Index                 bibliography    = totoc         % Bib to ToC                 ]{scrbook}  % scrbook,scrreprt              \usepackage[english]{babel} % hyphenation etc.              \usepackage{color}               \definecolor{lightred}{rgb}{1.0,0.4,0.4}   % Light Redish Color              \usepackage{listings}      % llistings                       \lstset{                float             = htpb,     % listings are floats, no page breaks                language         = C,                                    basicstyle       = \ttfamily\scriptsize,                         backgroundcolor  = \color{white},                    numbers          = none,                                     numberstyle      = \tiny\color{gray},                    stepnumber       = 2,                                 numbersep            = 5pt,                      showspaces       = false,                                showstringspaces = false,                         showtabs         = false,                                 frame                = single,                                       rulecolor            = \color{black},                        tabsize          = 2,                                        captionpos       = b,                                    breaklines       = true,                                breakatwhitespace    = false,                            title                = \lstname,                                     keywordstyle     = \bfseries\color{black},                     commentstyle     = \color{black},                   stringstyle      = \color{black},                 escapechar       = \! ,                    %escapeinside        = {\%*}{*)},                       morekeywords     = {*,SEQ,...}                        }                   \begin{document}              \noindent\begin{minipage}{\textwidth}              \lstset{caption = {Caption},label = {label}}              \begin{lstlisting}              Hello              \!\colorbox{lightred}{Highlighted}!              \end{lstlisting}              \end{minipage}              \end{document}      The code above gets rendered as it should, but as soon as I add an "_" it does not work. Does anybody have a clue, how I can use the colorbox on a underscored word in the example?


title: Why don't \pscircle and \psellipse move the current point before drawing their shapes?

text: I have tested all PSTricks closed curves:   * `\psframe`   * `\psccurve`   * `\pspolygon`   * `\pswedge`   * `\psellipticwedge`   * `\pscircle`   * `\psellipse` and I noticed that only `\pscircle` and `\psellipse` do not move the current point before drawing their shapes. ![enter image description here](http://i.stack.imgur.com/7OVXo.png)               \documentclass[border=12pt]{standalone}     \usepackage{pstricks}          \psset     {         fillstyle=solid,         fillcolor=cyan,         linewidth=2pt,         linecolor=red,     }          \everypsbox{\color{red}\bfseries\LARGE}     \begin{document}          \begin{pspicture}[showgrid](-4,-5)(4,7)     \pscustom     {         \psframe(-3,4)(3,5)         \psccurve(-3,2)(-1,2)(-1,3)(-1.5,2.5)         \pspolygon(1,2)(3,2)(2,3)         \pswedge(-2,0){1}{0}{270}         \psellipticwedge(2,0)(1,0.5){0}{270}         \pscircle(-2,-3){1}         \psellipse(2,-3)(1,0.5)     }     \rput(0,6.5){Default Behavior}     \end{pspicture}          \qquad          \begin{pspicture}[showgrid](-4,-5)(4,7)     \pscustom     {         \psframe(-3,4)(3,5)         \psccurve(-3,2)(-1,2)(-1,3)(-1.5,2.5)         \pspolygon(1,2)(3,2)(2,3)         \pswedge(-2,0){1}{0}{270}         \psellipticwedge(2,0)(1,0.5){0}{270}         \moveto(-1,-3)         \pscircle(-2,-3){1}         \moveto(3,-3)         \psellipse(2,-3)(1,0.5)     }     \rput(0,6.5){With \textbackslash moveto()}     \end{pspicture}          \end{document}      Is it a feature by design or a bug? **NOTE:** I intentionally put all objects inside `\pscustom` to show the current point effect. I am not talking about how to draw a solid rectangle, a solid polygon, a solid wedge, a solid elliptical wedge, a solid circle, and a solid ellipse. ## Response to comments Responding Herbert's comment "it is totally nonsense to use a closed curve inside `\pscustom` which itself creates a closed path", I show an example where closed curves are sometimes needed inside `\pscustom` to make   * transparent holes with other parts are opaque and filled with solid color, or   * transparent holes with other parts are opaque and filled with an image via clipping. So this scenario is more complicated than just a single simple ring provided by `\psRing`. ![enter image description here](http://i.stack.imgur.com/QTiwR.png)               \documentclass[border=12pt]{standalone}     \usepackage{pstricks}     \usepackage{graphicx}     \psset{linewidth=3pt,dimen=m}     \begin{document}          \begin{pspicture}[showgrid=top](4,4)     \pscustom[fillstyle=eofill,fillcolor=red]     {            \pscircle(2,2){2}         \moveto(3.75,2.25)         \pscircle(2.75,2.25){1}         \moveto(1.25,2.5)         \pscircle(0.75,2.5){0.5}         \moveto(2,1)         \pscircle(1.5,1){0.5}     }     \end{pspicture}     \hspace{1cm}     \begin{pspicture}[showgrid=top](4,4)     \psclip{%     \pscustom     {          \code{/clip /eoclip load def}         \pscircle(2,2){2}         \moveto(3.75,2.25)         \pscircle(2.75,2.25){1}         \moveto(1.25,2.5)         \pscircle(0.75,2.5){0.5}         \moveto(2,1)         \pscircle(1.5,1){0.5}     }}     \rput(2,2){\includegraphics[width=4cm]{example-grid-100x100pt}}     \endpsclip     \end{pspicture}          \end{document}


title: Should babel package call be placed at the end of the preamble?

text: I remember to have read few year ago1 that `babel` line2 should be placed at the end of the preamble in order to avoid problems with other packages. (I believe `hyperref` package should also be placed at the end of the preamble for the same reason.) However, I see, in MWEs, the `babel` line often just after the `\documentclass`. **Is there any differences? What is the good practice here?** ## Addendum Here is my LaTeX template. Do you see any other misplaced packages calls in general?               \documentclass[12pt,twoside,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{setspace}     \usepackage{todonotes}     \usepackage{graphicx}      \usepackage{lmodern}     \usepackage{xspace}     \usepackage[style=authoryear-comp,hyperref,backend=biber,isbn=false,doi=false,url=false,date=year]{biblatex}     \AtEveryBibitem{\clearlist{language}}     \renewcommand*{\newunitpunct}{\addcomma\space}     \bibliography{biblio}     \title{}     \author{}     \usepackage[francais,english]{babel}     \usepackage{csquotes}     \usepackage[colorlinks]{hyperref}     \begin{document}     \maketitle     \tableofcontents     \onehalfspacing               \printbibliography     \end{document}      * * * 1. I don't remember where... Sorry. 2.`\usepackage[dutch,english]{babel}`


title: Chapter number starts at 2 not 1

text: How can I start my chapter from "Chapter 2" instead of "Chapter 1". I am preparing LaTeX document for each chapter. when I put `\chapter{Introduction}`, it produces "Chapter 1" Introduction. However I want it to be "chapter 2" Introduction instead.


title: break a table on two columns

text: I have a table that is quite long (less than a page, by the way) and quite narrow; to save space I wish to have it, let's say, on two columns. Referring to the following image, I wish to have the first 8 entries side by side with the entries 9-16 (note that the letter "A", "B", and so on are added for code readability purpose, in the original table the column "schema" contains a image that increase the rows height). ![Example result](http://i.stack.imgur.com/Phgp2.png) The code of the example is as follows:               \documentclass[a4paper]{report}          \usepackage{booktabs}     \usepackage{fullpage}     \usepackage{multirow}     \usepackage[table]{xcolor}     \usepackage{array}     \usepackage[pdftex]{graphicx}          \begin{document}          \begin{table}[htbp]       \centering         \begin{tabular}{llp{0.1cm}p{0.1cm}p{0.1cm}p{0.1cm}lp{3cm}}         \toprule     & & \multicolumn{4}{c}{Parameter} & & \\     ID & Schema & F & E & P & N & \multicolumn{2}{l}{Cluster}\\         \midrule     1 & A & H & H & H & H & 1 & High performer\\     2 & B & H & H & H & L & 2 & Cash provider\\     3 & C & H & H & L & H & 3 & Alternative means of financing\\     4 & D & H & H & L & L & 4 & Doubtful case\\     5 & E & H & L & H & H & 5 & Low performer\\     6 & F & H & L & H & L & 5 & Low performer\\     7 & G & H & L & L & H & 6 & Possible AMF\\     8 & H & H & L & L & L & 5 & Low performer\\     9 & I & L & H & H & H & 7 & Cash flow optimization\\     10 & L & L & H & H & L & 7 & Cash flow optimization\\     11 & M & L & H & L & H & 8 & SCF needy\\     12 & N & L & H & L & L & 7 & Cash flow optimization\\     13 & O & L & L & H & H & 4 & Doubtful case\\     14 & P & L & L & H & L & 9 & Potential cash provider\\     15 & Q & L & L & L & H & 5 & Low performer\\     16 & R & L & L & L & L & 5 & Low performer\\         \bottomrule         \end{tabular}%       \caption{Cluster identification.}       \label{clusteridentification}%     \end{table}%          \end{document}      Ok now I know that there are different solutions to this problem:   * The first would be to "double" the table, with the header that would look like: `\toprule   & & \multicolumn{4}{c}{Parameter} & & & & \multicolumn{4}{c}{Parameter} & & \\\   ID & Schema & F & E & P & N & \multicolumn{2}{l}{Cluster} ID & Schema & F & E & P & N & \multicolumn{2}{l}{Cluster}\\\   \midrule` Anyway, this solution is not very flexible, and won't be easy to manipulate the table in the future (and it's probable that I'll have to do it, and let's say it: it's ugly)   * The twocolumn environment is out of discussion, because the rest of the page must be written as the rest of the document, on one column.   * The minipage structure gives problems with the \table environment: I cannot compile the document!


title: Same input file twice, error in table of contents

text: I'm having some difficulties with my table of contents. I want my conclusion to be in the start of the document and in the end. To do this I've included the same input file twice as you can see here in my main documents               \include{Preamble}     \begin{document}     \include{Sektioner/Forside}     \mbox{  }     \thispagestyle{empty}     \tableofcontents     \setcounter{page}{0}     \include{Sektioner/Resume}     \include{Sektioner/Konklusion}     \include{Sektioner/Indledning}     \include{Sektioner/Teori}     \include{Sektioner/Forsoegsbeskrivelse}     \include{Sektioner/Forsoegsresultater}     \include{Sektioner/Databehandling}     \include{Sektioner/SHIPFLOW}     \include{Sektioner/Fuldskala}     \include{Sektioner/Propel}     \include{Sektioner/Engines}     \include{Sektioner/Resultater}     \include{Sektioner/Konklusion}     \include{Appendiks/Appendiks}     \end{document}       But it's showing up wrong. The first conclusion in the beginning of the documents links to the second conclusion (which are both the same). Here's a picture to show ![enter image description here](http://i.stack.imgur.com/cMTDY.png) It's showing up right when going through the documents as you can see ![enter image description here](http://i.stack.imgur.com/ChMsM.png) I hope you can help.


title: Insert a block comment title in Kile

text: I would like to know whether it is possible in Kile to define a script to insert a centered commented block. I often mark different parts of my code with those kind of titles:               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %       OLD MODEL           %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%      So that it's very apparent and easy to spot _in the code itself_. Do you know if there is any way to program Kile to get a prompt, and Kile automagically creates such a stamp, with the text automatically centered? It can definitely be approximated by a User Tag, but this would not create a box type of things, and cannot center the words. Thank you!


title: Incoherent spacing with Libertine and math-mode

text: My problem when using math in a beamer presentation: The space between a $f$ and the following questionmark is way too small (the glyphs intersect). When switching the code (MWE) to an article, the problem is gone, yet now the spacing between a math "f" and the following letters is too big. The problem is absent with LuaTeX (using `libertineotf`) but occurs with XeTeX (same). MWE:               \documentclass{beamer} % try article in comparison and note the gap between "ef..." and "...gh"          \usepackage[T1]{fontenc}     \usepackage{libertine}     \usepackage[libertine]{newtxmath}          \begin{document}          $f$? $efgh$          \end{document}


title: Citing a Web Page with no author

text: For my thesis, I need to cite a lot of web-sources with no specific author. I'd like them to appear in the bibliography in the following format               <title> <year>, accessed <date accessed>,      <url>      and as `(<title> <year>)` within the text. (as described in this guidelines http://www.lc.unsw.edu.au/onlib/ref_elec1.html#elec3 ) Is there an easy way how to achieve this? I was looking into `biblatex`, but it seems to be rather complicated to create a custom source type...


title: Why do I get this error with pdflatex?

text: First, apologies for not having an MWE, I know it makes things harder. I am unable to replicate the problem on a small example. I suspect there is some kind of bug with multirow and pdflatex. I keep getting the following error:                        ! pdfTeX error (\pdfsetmatrix): Unrecognized format..              <to be read again>                                    \endgroup \set@typeset@protect               l.511                    !  ==> Fatal error occurred, no output PDF file produced!      If I remove a table that uses multirow, this error disappears. Note that line 511 is way after the multiraw statements in the tabular environment, it is a random place in the text. I can't figure out why this is happening, and I googled the error in combination of bug, multirow, etc. and nothing comes up. Any ideas how to either isolate the problem to understand it better, or otherwise understand what is its source? EDIT: My use of multirow is completely correct. If I use "latex" (instead of "pdflatex") with the .tex file, it compiles fine. (For the multirow statements, I use the multirow package.)


What causes the red frame not to align with the grid correctly?               \documentclass[tikz,border=12pt]{standalone}     \usepackage{filecontents}     \begin{filecontents*}{diagram.tex}     \documentclass[pstricks,border=0bp]{standalone}     \usepackage{pst-plot}     \begin{document}     \begin{psgraph}{->}(0,0)(-1,-1)(3,2){4cm}{3cm}%     \end{psgraph}%     \end{document}     \end{filecontents*}          \usepackage{pgffor}     \usepackage{graphicx}     \foreach \compiler/\ext in {latex/tex,dvips/dvi,{ps2pdf -dAutoRotatePages=/None}/ps}{\immediate\write18{\compiler\space diagram.\ext}}          \fboxsep=0bp\relax     \begin{document}     \begin{tikzpicture}         \node[anchor=south west,inner sep=0] at (0,0){\color{red}\fbox{\includegraphics{diagram}}};         \draw (-1,-1) grid (5,4);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Vbl6H.png)


title: Repeat beamer presentation automatically

text: I have a `beamer` presentation which should run automatically on its own during an exhibition. I already added `\transduration{5}\transblindshorizontal` to show the next slide automatically after 5 seconds, but I still need to figure out how to jump back to the very first slide after the very last slide has been shown. I can't find anything in the `beamer` manual. PS: I'm not looking for anything like `\againframe`. The whole presentation should repeat itself over and over again for almost a whole day.


title: Renew section command to wrap whole section in an environment

text: I am trying to write a beamer template for pandoc. For that I need to convert               \section{Text 1}     Some text.      to               \begin{frame}[fragile]{Text 1}     Some text.     \end{frame}      Is there a way to do this inside LaTeX, e.g. with a `\renewcommand`? I wouldn't mind multiple parses of the generated LaTeX file. This question seems to look for a similar solution, but the question I am interested in doesn't really get answered. **EDIT** A redefinition of `\section` like (pseudocode)               def \section{$title}:         static has_preceeding_section = False              has_preceeding_section = True              if not has_preceeding_section:             return \begin{frame}[fragile]{$title}         else:             return \end{frame}\begin{frame}[fragile}{$title}              finally:             return \end{frame}      would be sufficient for my use case. How would one implement above pseudocode in LaTeX?


title: How do I change the delimiter for \citeauthor with multiple references and add "and" between the last two?

text: \citeauthor{iso9241-5,ansi2007,osha3092}      produces > International Organization for Standardization; Human Factors and Ergonomics > Society; Occupational Safety and Health Administration Is there a pretty command to make it produce > International Organization for Standardization, Human Factors and Ergonomics > Society and Occupational Safety and Health Administration so I don't have to write               \citeauthor{iso9241-5}, \citeauthor{ansi2007} and \citeauthor{osha3092}


title: biblatex footnote references

text: Another migrating to biblatex type question. In my thesis I have used something called the `footbib` package. What this lets me do is create citations in the text, in some regular way, only the reference list appears as a footnote under a line covering the length of the page. It is implemented using a separate .aux file that has to be processed separately to the main .aux file for the document. The command to add such a citation is `\footcite{<key>}` biblatex also has a command called this, but it doesn't seem to do the same thing. The biblatex version seems to use use a number in the body of the text and then a longer citation index in the footnote (the reference to it is still in the main references section). Now as the commands have the same name, this screams of incompatibility and even if I called `\usepackage{footbib}` after `biblatex`. There could be not immediately noticed problems caused (and it might not work at all). So the question is, how do I do what I want to do with biblatex. It might make matters easier that I only want to do this on one page at the beginning of my thesis. I gather there is a `refsection` command or environment that might do it, but I'm not sure it is the right thing.


title: Using the cleveref package with hebrew and babel

text: I am trying to use the `cleveref` package with `babel` and Hebrew. I get the following error (on the second run of Latex):               ERROR: Missing number, treated as zero.          --- TeX said ---     <to be read again>                         \beginL      l.18 And \cref{eq1,eq2}     ----------------      Below is a minimal example that produces the above error:               \documentclass{article}          \usepackage[hebrew,english]{babel}     \usepackage{cleveref}          \begin{document}          \begin{equation}       \alpha = 1       \label{eq1}     \end{equation}          \begin{equation}       \beta = 1       \label{eq2}     \end{equation}          And \cref{eq1,eq2}.          \end{document}      Is there any workaround for this issue? I don't need any Hebrew cross- references, I just use it in the title and abstract. PS - Below is a longer version of the error:               ERROR: Missing number, treated as zero.          --- TeX said ---     <to be read again>                         \beginL      \@tempa ->\beginL                    1\endL      \@cref@countercmp ...@countstackb }\ifnum \@tempa                                                        <\@tempb \relax \def \cref...          \@cmp ...b }{\@countstackb }\fi \@cref@countercmp                                                        \fi \fi \fi \fi \expandaft...          \@cref@stack@insert ...f@elem }{#2}{\cref@result }                                                       \ifnum \cref@result =2\rel...          \cref@stack@insert ...@stack@insert {}{#1}{#2}{#3}                                                       \cref@stack@pop {#3}     <argument> ...andafter \cref@stack@insert \@tempa                                                        \cref@isstackfull {\@refsu...          \@whilesw #1\fi #2->#1#2                             \@iwhilesw {#1#2}\fi \fi      \cref@stack@sort ...@tempa \cref@isstackfull {#1}}                                                       \expandafter \endgroup \ex...     <argument> ... {\@refsubstack }{\cref@countercmp }                                                       \else \cref@processgroup {...          \@whilesw #1\fi #2->#1#2                             \@iwhilesw {#1#2}\fi \fi      \@cref ...nt types}\@cref@stackfullfalse \fi \fi }                                                       \endgroup      l.20 And \cref{eq1,eq2}                            .     --- HELP ---     This is usually caused by a LaTeX command expecting but not finding     either a number or a length as an argument. You may have omitted an     argument, or a square bracket in the text may have been mistaken for     the beginning of an optional argument. This error is also caused by     putting \protect in front of either a length command or a command such     as \value that produces a number.


title: Using \hfill in a beamer \frametitle in the wuerzburg theme

text: I'm using a set of beautiful beamer templates developed by Christian Gogolin and I'm struggling to get the desired effect using the `\hfill` command in `\frametitle{}` in order to have a beamer button **aligned completely to the right in the frame title.** Here is a MWE, using Gogolin's own _wuerzburg_ beamer outer theme:               \documentclass[xcolor={x11names,svgnames,dvipsnames}]{beamer}      \usepackage[T1]{fontenc}     \usepackage{lmodern}          \useoutertheme[nofootline]{wuerzburg}     \usecolortheme{shark}     %\setbeamertemplate{frametitle}[default][none] % uncommenting this gives proper placement but overrides the frametitle definition of the outer theme.      \begin{document}          \begin{frame}     \frametitle{This is the frame title \hfill \beamergotobutton{right}}     Some text     \end{frame}     \end{document}      This is the result: ![Example frame with unaligned button](http://i.stack.imgur.com/HQvuI.png) The "right" beamer button is not aligned right as expected; its absolute position also changes based on the lenght of the title text. I tried to implement the advice given on google groups: using `\frametitle{Title \hspace{1 filll} Logo}` (`1 filll` or `1 fill` both do not work). Using `\setbeamertemplate{frametitle}[default][none]` gives proper placement but overrides the frametitle definition of the outer theme. I imagine that the fix would involve the definition of `frametitle` template in the _wuerzburg_ theme:               \defbeamertemplate*{frametitle}{wuerzburg theme}[1][left]     {       \nointerlineskip       \ifbeamercolorempty[bg]{frametitle}{\vskip0.5ex}{%         \hbox to\textwidth{\hskip-\Gm@lmargin\pgfuseshading{beamer@frametitletopmshade}\hskip-\Gm@rmargin}         \nointerlineskip%       }%       \@tempdima=\textwidth%       \advance\@tempdima by\beamer@leftmargin%       \advance\@tempdima by\beamer@rightmargin%       \begin{beamercolorbox}[sep=0.3cm,#1,wd=\the\@tempdima]{frametitle}         \usebeamerfont{frametitle}%         \vbox{}\vskip-1.7ex%         \if@tempswa\else\csname beamer@fte#1\endcsname\fi%         \strut\insertframetitle\strut\par%         {%           \ifx\insertframesubtitle\@empty%           \else%           {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\insertframesubtitle\strut\par}%           \fi         }%         \vskip-1.3ex%         \if@tempswa\else\vskip-.3cm\fi% set inside beamercolorbox... evil here...       \end{beamercolorbox}%       \nointerlineskip       \ifbeamercolorempty[bg]{frametitle}{}{%         \hbox to\textwidth{\hskip-\Gm@lmargin\pgfuseshading{beamer@frametitlebottomshade}\hskip-\Gm@rmargin}%         \vskip-1.5pt%       }%     }      But I can't figure out what goes wrong here: the text width seems to be correct and I don't understand the role of `\strut\par` around `\insertframetitle`. Any help is appreciated.


title: tikz matrix align/decorate cellpictures

text: I have a matrix of cell pictures, and want the first column to be right aligned and the second column to be left aligned. However I have trouble using the "nodes" key. example               \documentclass{article}     \usepackage{tikz}     \usepackage[margin=0cm,nohead]{geometry}     \usepackage[active,tightpage]{preview}          \usetikzlibrary{calc}     \usetikzlibrary{positioning}     \usetikzlibrary{arrows}     \usetikzlibrary{matrix}          \PreviewEnvironment{tikzpicture}     \begin{document}           \begin{tikzpicture}[very thick]         \matrix[matrix of nodes, column sep=3ex, row sep=2ex, nodes={draw}]{                 \draw (0,0) rectangle (-2.5,1) rectangle ++ (2.5,1) rectangle ++ (-2.5,1) rectangle ++ (2.5,1);                 \draw (2,2) rectangle ++ (2.5, 1) rectangle ++ (-2.5, 1);                      \draw[thin, gray] (0,0) -- (2,2)  (0,2) -- (2,3) (0,4) -- (2,4);                 &                 \draw (0,0) rectangle (2.5,1) rectangle ++ (-2.5,1) rectangle ++ (2.5,1) rectangle ++ (-2.5,1);                 \draw (-2,2) rectangle ++ (-2.5, 1) rectangle ++ (2.5, 1);                      \draw[thin, gray] (0,0) -- (-2,2)  (0,2) -- (-2,3) (0,4) -- (-2,4);                      \begin{scope}[-latex, shorten >=5pt, shorten <=8pt]                     \draw (-2, 2.4) -- (0, 0.5);                     \draw (-2, 2.6) -- (0, 1.5);                          \draw (-2, 3.4) -- (0, 2.5);                     \draw (-2, 3.6) -- (0, 3.5);                 \end{scope}                      \node at (-1.25,1.95) [red]{\Huge\bfseries{?}};                 \node at (-1.25,3.32) [red]{\Huge\bfseries{?}};             \\         };      \end{tikzpicture}      \end{document}      ![enter image description here](http://i.stack.imgur.com/BOn3s.png) With this example I would expect to see bounding boxes arround the _cells_ , however it only modifies the `nodes` _inside_ the cells. I would like the frames to see the changes I make, once I actually add `column 1={anchor=east}, column 2={anschor=west}`. Note that for shortness this example only has one row, however the actual matrix has several rows. As a further perk I would like to add a label in the top left and bottom center of the cell. therefor it would be great to get those positions from the cell, since the actual cellpicture might be smaller. This can be seen in this example from the tikz manual, page 204:               \begin{tikzpicture}[every node/.style={draw}]     \matrix [draw=red]     {     \node[left] {Hallo}; \fill[blue] (0,0) circle (2pt); \\     \node {X}; \fill[blue] (0,0) circle (2pt); \\     \node[right] {g}; \fill[blue] (0,0) circle (2pt); \\     };     \end{tikzpicture}      the border of the nodes is clearly smaller then the width of the column. * * * **Explanation With Sketch** ![Sketch of desired result](http://i.stack.imgur.com/9Yngx.png) To Clarify the desired result, I added the sketch above.   1. I would like to seperate the images in the Matrix by lines. Preferably as is done with the green lines in the sketch below, however an outer frame is acceptable.   2. I would like to align the pictures of the first column to the right and the pictures of the second column to the left. The (crude)`x` and (crude)`smiley` both have dimensions much smaller than the column, but are right/left aligned within the column respectivly (I thought `column 1/.style={node={anchor=east}` would do but I could not get it to work). Furthermore I would like to center the content vertically within the row. (I tried to indicate this with the blue linse)   3. I would like to add labels (wine red), in the corner positions of the Matrix cells


title: Uneven number of subfloats on separate lines

text: I have 5 subfloats that I would like to distribute 3 on the top line and two udnerneath but equally spaced between the top 3. But `\\\` doesn't seem to do anything between them. What do you sugges? Gives this: ![enter image description here](http://i.stack.imgur.com/aq7Sj.png) I.e. X X X                 X X          \documentclass{article}     \usepackage{graphicx}     \usepackage{subfig}          \begin{document}               \begin{figure}[htb]     \centering     \makebox[\textwidth]{     \subfloat[Single window]{\label{fig:wind_single}\includegraphics[width=3cm, height=2cm]{./Figures/chapter2/wind_single.png}}\hspace{1em}%     \subfloat[Two openings, same side]{\label{fig:wind_same}\includegraphics[width=3cm, height=2cm]{./Figures/chapter2/wind_same.png}}\hspace{1em}%     \subfloat[Two openings, opposite sides]{\label{fig:wind_opposite}\includegraphics[width=3cm, height=2cm]{./Figures/chapter2/wind_opposite.png}}\newline%     \subfloat[Two openings, same side with wings]{\label{fig:wind_wings}\includegraphics[width=3cm, height=2cm]{./Figures/chapter2/wind_wings.png}}\hspace{1em}%     \subfloat[Two openings, adjacent walls]{\label{fig:wind_adjacent}\includegraphics[width=3cm, height=2cm]{./Figures/chapter2/wind_adjacent.png}}%     }     \smallskip     \caption{Passive ventilation examples}     \end{figure}     \end{document}


title: How to plot circular polarized electromagnetic wave

text: I am searching for a solution to get nice looking circular polarized waves in my latex document. My goal is to get a graph that looks like this: ![enter image description here](http://i.stack.imgur.com/t86eB.gif) I do not want the graph to be animated but I can not even get it to plot a circular wave. Any help would be highly appreciated.


title: What is the most efficient way to render LaTeX to a viewable format on a server?

text: I am working on an online web-app that incorporates LaTeX document generation. Currently, as a beginner to LaTeX (but the most experienced developer in my team), I am trying to determine the most efficient way to generate LaTeX docs into a viewable format. Memory is a concern to us, so here are our methods to begin with. * * * `> latex sample.tex` Outputs a `dvi` which I can then convert to a `png` or a `pdf` * * * `> pdflatex sample.tex` Outputs a `pdf` directly * * * Those are the main two methods I have used so far, other methods have either failed or been found to be too complex. If anything, a `.tex` file directly to a `jpeg` would seem the most efficient, but I would prefer for some expert opinions;]


title: How should I express my length calculation to minimize rounding errors?

text: I have an input file as follows.               % Test.tex     \documentclass{article}     \usepackage{pstricks}     \psset     {      linewidth=0.01     }          \newcommand\All{0.1}     \newcommand\Left{-\All}     \newcommand\Right{\All}     \newcommand\Bottom{-\All}     \newcommand\Top{\All}          \newlength\AllPadding\setlength{\AllPadding}{0mm}     \newlength\LeftPadding\setlength{\LeftPadding}{\AllPadding}     \newlength\RightPadding\setlength{\RightPadding}{\AllPadding}     \newlength\BottomPadding\setlength{\BottomPadding}{\AllPadding}     \newlength\TopPadding\setlength{\TopPadding}{\AllPadding}               \topmargin=\dimexpr\TopPadding-72.27pt\relax     \oddsidemargin=\dimexpr\LeftPadding-72.27pt\relax     \paperwidth=\dimexpr\Right\psxunit-\Left\psxunit+\RightPadding+\LeftPadding\relax     \paperheight=\dimexpr\Top\psyunit-\Bottom\psyunit+\TopPadding+\BottomPadding\relax          \special{papersize=\the\paperwidth,\the\paperheight}               \headheight=0pt     \headsep=0pt     \parindent=0pt     \topskip=0pt     \pagestyle{empty}          \pagecolor{yellow}     \begin{document}     \pspicture(\Left,\Bottom)(\Right,\Top)     \psframe(\Left,\Bottom)(\Right,\Top)     \endpspicture     \end{document}      It is compiled with the following batch file.               rem Automate.bat takes an input file name without extension.     latex %1     dvips %1     gswin32c -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=%1.pdf %1.ps     pdftops -eps %1.pdf      I got a result as follows. ![enter image description here](http://i.stack.imgur.com/6Y4Wu.png) Notice that there are excessive strips outside the black frame due to rounding errors in calculating paper size. Depending on the given settings, the excessive strips may appear on the left, right, top, and bottom. Even though the excessive strips will not be noticeable by naked eyes, I want to remove them as far as there is a way to do so. How to express my length calculation to get rid of the excessive strips?


title: How to center the last line of a paragraph?

text: I am trying to center the last line of each paragraph to keep with an old style typesetting. I tried using the example by Gonzalo Medina in How to center text without adding space AND not altering alignment of surrounding text?, but instead of centering the line it sticks out into the right margin. I am still not quite sure how the code is suppose to work, and I'm guessing that using a 2 column book format also has something to do with it. Below is a sample of what I'm doing: (I apologize for the length)               \documentclass[twocolumn,11pt,openany]{book}%Compile with xelatex     \usepackage{polyglossia}     \usepackage[margin=1in, paperwidth=6in, paperheight=9in]{geometry}     \setdefaultlanguage{hebrew}     \newfontfamily\hebrewfont{Narkisim}     \newlength\iiindent \setlength\iiindent{15pt}      \newcommand\secindent{\parshape 3 0pt \linewidth 0pt\dimexpr\linewidth-\iiindent\relax 0pt \linewidth }      \setlength\parindent{0pt}     \begin{document}     \leftskip=0cm plus 0.5fil \rightskip=0cm plus -0.5fil     \parfillskip=0cm plus 1fil     \sloppy     \everypar{\secindent}     (ג) ויאמר אלוהים יהי אור - מלת "אמירה" בכאן להורות על החפץ, כדרך מה תאמר נפשך ואעשה לך (ש"א כ ד), מה תרצה ותחפוץ, וכן ותהי אשה לבן אדניך כאשר דבר ה' (להלן כד נא), כאשר רצה. כי כן הוא הרצון לפניו, או הוא כגון מחשבה, כמו: האומרה בלבבה (ישעיה מז ח). ואמרו אלופי יהודה בלבם (זכריה יב ה). והעניין לומר שלא היה בעמל. וכך קראו רבותינו לזה "מחשבה". אמרו (ב"ר יב יד): מחשבה ביום, המעשה עם דמדומי חמה. והוא להורות על דבר מחושב, שיש בו טעם, לא חפץ פשוט בלבד: ומלת הויה מורה על מעשה הזמן העומד, כמו ואתה הוה להם למלך (נחמיה ו ו). לכן אמר הכתוב, כי כשברא חומר השמים, אמר שיהיה מן החומר ההוא דבר מזהיר קראו אור: ויהי אור - לא אמר "ויהי כן", כאמור בשאר הימים, לפי שלא עמד האור בתכונה הזאת כל הימים כשאר מעשה בראשית. ויש לרבותינו בזה מדרש בסוד נעלם. ודע, כי הימים הנזכרים במעשה בראשית היו בבריאת השמים והארץ ימים ממש, מחוברים משעות ורגעים, והיו ששה כששת ימי המעשה, כפשוטו של מקרא: ובפנימיות העניין יקראו "ימים" הספירות האצולות מעליון, כי כל מאמר פועל הוויה תקרא "יום". והיו ששה, כי לה' הגדולה והגבורה, והמאמרים עשרה, כי הראשונות אין שם "יום" נתפס בהם. והפירוש בסדור הכתובים בזה נשגב ונעלם, ודעתנו בו פחות מטפה מן הים הגדול:          (ד) וירא אלוהים את האור כי טוב - כתב רבנו שלמה: אף בזה אנו צריכין לדברי אגדה, ראה שאינו ראוי להשתמש בו רשעים והבדילו לצדיקים לעתיד לבוא. ולפי פשוטו כך פרשהו, ראהו כי טוב ואין נאה לו ולחשך להשתמש בערבוביא, וקבע לזה תחומו ביום ולזה תחומו בלילה. ורבי אברהם אמר: וירא, כמו וראיתי אני (קהלת ב יג), והיא במחשבת הלב. וטעם "ויבדל", בקריאת השמות: ואין דברי שניהם נכונים, שאם כן יראה כעניין המלכה ועצה חדשה, שיאמר כי אחרי שאמר אלוהים יהי אור, והיה אור, ראה אותו כי טוב הוא, ולכן הבדיל בינו ובין החשך, כעניין באדם שלא ידע טיבו של דבר עד היותו: אבל הסדר במעשה בראשית, כי הוצאת הדברים אל הפועל יקרא "אמירה"; ויאמר אלוהים יהי אור, ויאמר יהי רקיע, ויאמר תדשא הארץ. וקיומם יקרא "ראיה", כעניין וראיתי אני דקהלת (ב יג), וכן ותירא האשה כי טוב העץ למאכל (להלן ג ו), והוא כעניין שאמרו (כתובות קט א): רואה אני את דברי אדמון. וכמוהו (ש"ב טו כז): ויאמר המלך אל צדוק הכהן הרואה אתה שובה העיר בשלום. והעניין להורות כי עמידתם בחפצו, ואם החפץ יתפרד רגע מהם יהיו לאין. וכאשר אמר בכל מעשה יום ויום וירא אלוהים כי טוב, ובשישי כאשר נשלם הכל וירא אלוהים את כל אשר עשה והנה טוב מאד, כן אמר ביום הראשון בהיות האור וירא אלוהים כי טוב, שרצה בקיומו לעד: והוסיף בכאן "את האור", שאילו אמר סתם "וירא אלוהים כי טוב", היה חוזר על בריאת השמים והארץ, ולא גזר בהן עדיין הקיום, כי לא עמדו ככה, אבל מן החומר הנברא בראשון נעשה בשני רקיע, ובשלישי נפרדו המים והעפר ונעשית היבשה שקראה "ארץ", ואז גזר בהם הקיום, ואמר בהם: וירא אלוהים כי טוב: ויבדל אלוהים בין האור ובין החשך - איננו החשך הנזכר בפסוק הראשון שהוא האש, אבל הוא אפיסת האור, כי נתן אלוהים מידה לאור, שיהיה נעדר אחר כן עד שובו: ואמרו קצת המפרשים (כוזרי ב, כ): כי האור הזה נברא לפניו של הקב"ה, כלומר במערב, ושקעו מיד כדי מדת לילה, ואחרי כן האיר כמידת יום. וזה טעם ויהי ערב ויהי בקר, שקודם היה לילה ואחר כך יום, ושניהם אחרי הוויית האור. ואיננו נכון כלל, כי יוסיפו על ששת ימי בראשית יום קצר: אבל יתכן שנאמר, כי האור נברא לפניו יתברך ולא נתפשט ביסודות הנזכרים, והבדיל בינו ובין החשך שנתן לשניהם מידה, ועמד לפניו כמידת לילה, ואחר כך הזריח אותו על היסודות, והנה קדם הערב לבקר: ועוד יתכן שנאמר, כי משיצאו השמים והארץ מן האפס אל היש הנזכר בפסוק הראשון, נהיה זמן, כי אף על פי שזמנינו ברגעים ושעות שהם באור ובחשך, משיהיה יש ייתפש בו זמן. ואם כן נבראו שמים וארץ ועמדו כן כמידת לילה מבלי אור, ואמר יהי אור ויהי אור, וגזר עליו שיעמוד כמידת הראשון, ואחר כך יעדר מן היסודות, ויהי ערב ויהי בקר:          \end{document}      Any explanation of what went wrong? Any ideas for a solution?


title: Subfigure caption as normal caption

text: I'm trying give the reference to the subfigure, but I want that instead of figure number as, 1a and 1b, I want them to be 1, 2 etc. and in sync with normal figure number. Can anyone give any insight to that?


title: I want to create a command that will conditionally gobble up trailing whitespace: I want an "\unxspace" command

text: I have a command that occasionally produces whitespace that I don't want.               \def\testa{a}     \def\testb{a}     \newcommand{\mycommand}[1]{\ifx\testa\testb{#1}\fi}      When `\testa` and `\testb` are different, I wind up getting unwanted whitespace in the following example:                   Testing \mycommand{This} \mycommand{is} \mycommand{my} \mycommand{trial} \mycommand{run.} Testing      I thought I could do something clever like               \def\sweetnothing{}     \def\testa{a}     \def\testb{b}     \newcommand{\mycommand}[1]{\ifx\testa\testb{#1}\else\sweetnothing\fi}      I thought this would make the test line above equivalent to the following               Testing \sweetnothing \sweetnothing \sweetnothing \sweetnothing Testing      But it's not. I tried some `\expandafter` magic               \newcommand{\mycommand}[1]{\ifx\testa\testb{#1}\else\expandafter\sweetnothing\fi}      Since I thought that would essentially unwind to `\sweetnothing` followed by a blank space. No such luck. Here's a M(non)WE:               \documentclass{article}     \makeatletter     %%     \def\testa{a}     \def\testb{b}     \newcommand{\mycommand}[1]{\ifx\testa\testb{#1}\fi}     %%     \def\sweetnothing{}     \newcommand{\mycommandvar}[1]{\ifx\testa\testb{#1}\else\sweetnothing\fi}     %%     \makeatother     \pagestyle{empty}     \begin{document}     \textbf{Line 1:} Testing \mycommand{This} \mycommand{is} \mycommand{my} \mycommand{trial} \mycommand{run.} Testing          \textbf{Line 2:} Testing \mycommandvar{This} \mycommandvar{is} \mycommandvar{my} \mycommandvar{trial} \mycommandvar{run.} Testing          \textbf{Line 3:} Testing {} {} {} {} {} Testing          \textbf{Line 4:} Testing \sweetnothing \sweetnothing \sweetnothing \sweetnothing Testing     \end{document}      I really wanted all three lines to look like line 4 when `\testa` and `\testb` are different. Then I went off the deep end and tried something along the lines of               \documentclass{article}     \makeatletter     \def\testa{a}     \def\testb{b}     \def\eat@white@space#1{\ifcat #1\relax\else#1\fi}     \newcommand{\mycommand}[2]{\ifx\testa\testb{#1#2}\else\expandafter\eat@white@space\fi}     \makeatother     \pagestyle{empty}     \begin{document}     Testing \mycommand{This} \mycommand{is} \mycommand{my} \mycommand{trial} \mycommand{run.} Testing     \end{document}      But this had completely unexpected results. I didn't really expect it to work, but I didn't expect to quite fail like this either. ![enter image description here](http://i.stack.imgur.com/T9ceo.png) What I _thought_ I was doing was comparing the catcode of a space to the catcode passed of the first argument. If they were the same, then I wanted to discard the second argument (at that point there should be a recursive call--- which I don't do). If they are not the same, then I want to keep the first argument. Any ideas?


title: how to prevent part of section name from being part of the hyperlink generated automaticaly in TOC?

text: sometimes I'd like part of the section name text (and subsection and anything that goes to TOC) to show up but without it being part of the link that is generated automatically by pdflatex and by htlatex. This way I can annotate a section name in TOC, but not have the annotation by part of the href text itself. A simple example will help. Given this .tex file, where I put the text that I do not want be part of the link inside \small{} just for illustration. (I know this is wrong way to make font small in \section but I do not know any better now).               \documentclass[12pt,titlepage]{article}%          \usepackage{hyperref}          \begin{document}     \tableofcontents     \section{HW1 {\small{this hw was on subject x}}}        jdkfjdkfjdf          \section{HW2 {\small{this hw was on subject y but is also related to subject x}}}          \end{document}      I'd like the TOC generated to look like this below which I drew this to show the part of the name I want to underlinked. ![enter image description here](http://i.stack.imgur.com/qesxk.jpg) But ofcourse what comes out now is this: ![enter image description here](http://i.stack.imgur.com/NOhRj.jpg) and from pdflatex as ![enter image description here](http://i.stack.imgur.com/qzqXO.jpg) one can see that the whole text inside \section is underlined. The commands used: `htlatex foo.tex` and `pdflatex foo.tex` **question** : Is there a trick or option to tell latex/pdflatex not to include part of the section in the hyperref link when making TOC?


title: Wrong Sorting nomenclature and predefined variables

text: this time I'm writing my Bachelor Thesis on Uni Stuttgart. Now I got a Problem. I predefined my Variables for being able to change them easily in the whole dokument. For example I did it like this: `\newcommand{\x}{L_i}` If I now create a list of variables by `\makenomenclature` the variables are sorted by the command. Here \x. Is it possible to sort it by the given variables? Here L_i. It would be very nice to have a most possible easy solution for this. Thank you and sorry for my bad english.


title: How to use symbols such as \delta and \lambda

text: I'm trying to use symbols such as `\lambda` and `\delta` but for some reason it's not compiling. I've reproduced the problem in the following code:               \documentclass[12pt,a4paper,oneside]{article}          \begin{document}          \begin{center}          M = < X,Y,S,ta, \delta int, \delta ext, \lambda >          \end{center}          \end{document}      I'm getting the following errors:               Missing $ inserted M = < X,Y,S,ta, \delta          Missing $ inserted I've inserted a begin-math/end-math symbol since I think          Missing } inserted I've inserted something that you may have forgotten.     Extra }, or forgotten \endgroup      Despite these errors, I can still view it in a PDF and it looks like the following: ![The output of above code](http://i.stack.imgur.com/NHnPG.png) So, just to clarify what I actually want:   1. To compile without the errors i.e. how do you make use of symbols like `\delta` etc?   2. How do I actually make it display like the following :  ![enter image description here](http://i.stack.imgur.com/4wEZQ.png)   3. As depicted above, I want `int` and `ext` to be subscripts to the `\delta` symbols


title: How to draw a 3d curved manifold in tikz

text: I'm trying to draw something like this: ![enter image description here](http://i.stack.imgur.com/OyUEU.png) How would I go about it in tikZ? For example, how do I draw the curved gray manifold?


title: Sideway tables flipping back and forth

text: I'm joining my papers for my thesis and face an issue with sideways tables. I have several sideways tables. In each separate paper, they are fine, always top on the left. When I put the papers together as chapters in my thesis, the tables just alternately turn 180 degrees (top on the left, then top on the right,...). Any explanation and solution?


title: Naming row and column in table

text: I want to create the table like this (with row and column each names individually and also in a group): ![enter image description here](http://i.stack.imgur.com/WyitA.png) I can create the table, but I do not know how to write those column and row names. How can I selectively remove the vertical line on table in some cells?


title: Global setting of spacing between items in itemize environment for beamer

text: I'd like to modify the spacing between items in the itemize environment. This post shows how to modify a specific itemize environment (`\addtolength{\itemsep}{0.5\baselineskip}`). However, I'd like to do it globally for the entire document. This post suggests the enumitem package. However, I get an error in beamer when i use this package (just declaring it). Any suggestions? I'm currently using the addtolength method on all my itemize environments. I'd like a global solution. Thanks.


title: Is there a way to create a standalone folder/document with non standard packages?

text: I am working on an article which will be compiled on another machines (of somebody else). I don't want to depend on the other person to install missing packages. Is there a way to include them with the folder I'll send him?


title: Distortion of parts of images and parts of images missing during animations in my .pdf output file produced using pdflatex

text: I have found placing animations in a `.pdf` (Portable Document Format) file beginning with a `.gif` animation challenging. At this stage my result in having animations in a `.pdf` file appears quite primitive compared to putting the animations in a `.html` file using the programs LaTeX and LaTeX2HTML using the advice kindly provided to me by Nasser M. Abbasi. Nevertheless here I will describe some of what I have done so far in that direction and present some problems I encountered. From a "javalatex" Web page within wikipedia on the WorldWide Web I learned that `pdflatex` does not support the use of `.gif` images. From what I have read on the Internet at least one way to deal with this matter is to convert the `.gif` images in an animated `.gif` file to a series of `.png` (Portable Network Graphics) images, one for each frame in the `.gif` file containing an animation. Following the advice on the Web page. I installed the free program ImageMagick in a Windows XP Home Edition operating system and subsequently used a command in a command-prompt of the following form to effect the conversion from an animated `.gif` file to a series of `.png` files:               convert MyFile.gif MyFile%05d.png      The result was that gratefully many `.png` images were produced with names of the form `MyFile00000.png`, `MyFile00001.png`, `MyFile00002.png`, et cetera (Previously I had downloaded something from ImagicMagick's Web site which appeared to provide online conversion of a file from the `.gif` to the `.png` format in my Mozilla Firefox Web browser. By clicking on "File Tools" right on my Firefox Web browser and then selecting "Image Converter" among the subsequent choices I could have access to that capability. But that conversion did not work for me.). Previously I had installed Alexander Grahn's `animate` software package for TeX Live in an openSUSE-12.2, Linux operating system. I think I obtained it via the Comprehensive TeX Archive Network (CTAN) Web site http://tug.ctan.org/tex-archive/macros/latex/contrib/animate/doc/animate.pdf. Following some of probably his or else Jim Hefferon's advice I had downloaded the file `animate.zip` and in my case extracted its contents in the directory `/usr/share/texmf`. Fortunately most, if not all of the software requirements for the `animate` software package appear to be contained in a modern version of TeX Live.---Unless this was done for me in the process of updating openSUSE-12.2 software, at least I haven't knowingly and especially downloaded and installed any new software packages other than the `animate` package to add to my installation of TeX Live lately. For the purpose of making the `.pdf` output file containing animated figures I followed much of Alexander Grahn's advice and input or else already had commands of the following form into my `.tex` file:               \documentstyle[a4paper,12pt]{article}     \usepackage{animate,graphicx}          \begin{document}     In \hyperref[ref]{Figure (Fig. 1)}{Figure (Fig. 1)}{}{MyFigure}          \begin{figure}          \begin{center}     \animategraphics{30}{MyFile}{00000}{00097}     %for 30 frames/second each with a name of the form MyFile00000.png,      MyFile00001.png,     ........, MyFile00097.png     %Figure caption here     \label{MyFigure}     \end{center}     \end{figure}     .....     .....     \end{document}      Then I executed the command of the form `pdflatex MyFile.tex`. Following that execution I eventually opened the output file with a name of the form `MyFile.pdf` in Acrobat Reader 9.5.1 and Adobe Reader X 10.1.4. I think in each case I had to click on an animated image in the `.pdf` file to start its animation after seeing the image of I think a small, white, right hand with an upward-pointing index finger on it. But after that first clicking a popup window appeared containing the message "Please Note: Click 'sign' to fill out and sign this form," a message which did not apply to my `.pdf` file. After closing that window by perhaps clicking on an "X" in its upper-right-hand corner, I think the animation began. I think the animation was executed once for each click on an animated figure in the `.pdf` file. (It seems like I might have seen somebody else's `.pdf` file containing an animated figure which did not require my clicking on it to get that animation started. That animation might have only been the drawing of a colored curve. And that animation might have continued in a repetitive fashion. If so, I think I like those behaviors better for a reader of a `.pdf` document than the ones I obtained which I report here.). There were some problems:   1. The vertical dimension appeared to be compressed compared to the horizontal dimension. The animations each proceeded from left to right. By the time the final frame was reached in the animation the vertical dimension was obviously highly compressed compared to the horizontal dimension. And I think the horizontal dimension of an object in the animation may have been horizontally stretched in the course of the animation so that the last image showed an object or objects which were much more horizontally stretched than at the beginning of the animation. Right now I suppose I can't rule out the possibility that what I saw could be explained by just the horizontal stretching alone without any vertical compression.---The result of either stretching in the horizontal dimension or compression in the vertical dimension makes a circle appear as an ellipse that is longer in the horizontal than in the vertical direction.    2. Although one to-be animated image initially had good color and proportions between its vertical and horizontal components before starting the animation with a click on it, I think parts of the frame images could not be seen at all during the course of the animation.---That is during the animation I think parts of the image could be seen; and parts of them could not be seen. I suppose that if by me doing things more correctly than I have up to now that better results could imaginably be obtained for animated figures in a `.pdf` file produced from an animation originally contained in a `.gif` file. Please advise me on how to eliminate the problems 1 and 2 and, if possible, how to make continuously running animated figures which do not require clicking on them to start them in an output, `.pdf` file produced using the program `pdflatex` executing on a `.tex` file. **Edit 2012-11-02:** Removing the `\begin{figure}[h]`, `\end{figure}` environment and the `\begin{center}`, `\end{center}` commands around my `\animategraphics.....` command and the `\parbox....` figure-caption command below the `\animategraphics....` command unfortunately did not eliminate the distortion. I left a `\label{...}` command in place under the `\animategraphics....` command. Looking at some of the `.png` (Portable Network Graphics) files in the program GIMP [Gnu's Not Unix (GNU) Image Manipulation Program], they did not appear distorted; only in my output, `.pdf` file did I notice their distortion. From my inspection using GIMP I did notice an offset which increased in the images from left to right in the animation. But that might be normal to make the objects in the animation appear to be moving from left to right. When opening the `.png` files in GIMP I clicked on a button to ignore such offsets, which made the images displayable within the GIMP window area. One concern I probably haven't fully explored is that the software package animate's producer Alexander Grahn wrote that his package animate requires the program `pdftex`, whereas I have been using the program `pdflatex` on my `.tex` file, which uses the `graphicx` and `animate` among other software packages. The version of the program pdflatex that I have been using handled my command `\documentstyle[a4paper,12pt]{article}` in my `.tex` file better than the version of the program `pdftex` that I used. Alexander Grahn also wrote, "Package `animate` supports the usual PDF making workflows, i. e. pdfLATEX, LATEX -->dvips-->ps2pdf/Distiller and (X E)LATEX ---> (x)dvipdfmx." So that looks at least encouraging regarding whether the program `pdflatex` can also work well with the `animate` package or not. I request that no one take any of my comments here in a personally critical way.---My goal here is to get a procedure working for myself to produce animated figures in a `.pdf` file when the figures were originally `.gif` (Graphic Interchange Format) files, before converting those files containing animations to a series of `.png` file using the free program ImageMagick. I appreciate Alexander Grahn kindly producing his probably free software package called animate for use in an installation of the TeX Live group of computer programs.


title: hyperref isn't linking the entire uri

text: I am trying to create a clickable hyperlink using hyperref for a list of urls. One url is giving me trouble: http://en.wikipedia.org/wiki/Function_(mathematics) The relevant line of latex is:               \hyperref[ref6]{http://en.wikipedia.org/wiki/Function\_(mathematics)}      The line is clickable in the resultant PDF, but it only links to: http://en.wikipedia.org/wiki/Function with the _(mathematics) part ignored. I expect that this calls for some special escaping, but have tried several different approaches to no avail (backslashes and the like) and would appreciate some assistance. Here's a minimal working example:               \documentclass{article}     \usepackage{hyperref}          \begin{document}     Here's what's broke:          \hyperref[ref6]{http://en.wikipedia.org/wiki/Function\_(mathematics)}          \end{document}      Thanks!


title: LaTeX table: line thickness varying and incorrect horizontal alignment

text: This LaTeX source ( http://pastebin.com/3HdpbQi5 ) yields two types of errors ( http://i.stack.imgur.com/4J87t.png ): The line thickness of the table borders in the primary header row varies and the last entry in the secondary header-row ("erh.", short for "erhalten" which means "received" :) is a good few points above where it should be. Now, knowing that LaTeX does not err, I however do so quite frequently - any ideas what I can do to get a clean result? The whole thing, btw., is a ham radio logbook in case you wondered. Thanks in advance, Christian DC1TS.


title: How to get datetime to print "12.34pm", not "12:34 noon", at 34 minutes past noon?

text: When it uses the 12-hour clock, `datetime` prints "noon" instead of "pm" when the time is between 12 noon and 1pm. Probably a bug rather than by design? How can it be made to print "12.34pm" rather than "12.34 noon"?


title: Add label to flowchart nodes

text: I need to add a "label" to nodes in a flowchart with tikz, preferably in the top left corner. See picture: the text in red is where I need it. This is because each block should have a "label" so I can refer to it elsewhere in the text and in other flowcharts (expanding nodes). ![enter image description here](http://i.stack.imgur.com/5fWbv.png)


title: Automatically avoid broken internal hyperlinks

text: I am using pdftex and the hyperref package. I have a number of automatically generated `\hyperlink{<label>}{<text>}`, which point to other automatically generated `\hypertarget{<label>}{<text>}`. But since the two are generated independently, I don't know a priori whether a given label exists or not. The default behaviour when hyperlinking to an inexistent target is to put a "Go to page 1" link, which is completely useless for the user. Is it possible to change that default behaviour to either   * put no link when the link would be broken, or   * point the link to itself?


title: How to make ellipsis work with sans serif font?

text: ## Problem/question It seems that the `ellipsis` package does not work with sans-serif fonts. Is it a known problem or maybe not a problem at all? This question follows this one, about "how to change the appearance of `\dots`"? Thank you. ## MWE (minimal working example)               \documentclass{article}     \usepackage[utf8]{inputenc}          \usepackage{ellipsis}     \setlength{\ellipsisgap}{0.05em}          \begin{document}          {\sffamily So\dots{} let's see\dots{}}          So\dots{} let's see\dots{}          \end{document}      ![enter image description here](http://i.stack.imgur.com/1wuVp.png) * * * ## edit Based on David's answer, here is my code               \documentclass{article}     \usepackage[utf8]{inputenc}          \usepackage{ellipsis}     \setlength{\ellipsisgap}{0.05em}     {\sffamily\setlength{\ellipsisgap}{0.05em}}     {\bfseries\setlength{\ellipsisgap}{0.05em}}          \begin{document}          {\normalfont So\dots{} let's see\dots{}}          {\sffamily So\dots{} let's see\dots{}}          {\bfseries So\dots{} let's see\dots{}}          So\dots{} let's see\dots{}          \end{document}