title: TikZ and Babel disagree when Hebrew is loaded

text: As with most things related to LaTeX, when Hebrew (and I assume other RTL languages too) tend to completely break everything.               \documentclass[10pt]{article}          %\usepackage[utf8x]{inputenc}     %\usepackage[english,hebrew]{babel}     \usepackage{tikz}     \usetikzlibrary{shadows}          \tikzstyle{testbox} = [rectangle, rounded corners, draw=black,       fill=blue!20, inner sep=10pt, drop shadow={fill=black, opacity=.4}]     \tikzstyle{titlebox} =[fill=gray!20, text=black!80, draw=black]          \begin{document}       \noindent\begin{tikzpicture}%       \node [testbox] (box){%         \begin{minipage}{.7\textwidth}%           I am Lrrr, of the planet Omicron Persei Eight.%         \end{minipage}%       };       \node [titlebox, right=5pt] at (box.north west) {\textbf{Lrrr}};%       \end{tikzpicture}     \end{document}      This compiles just fine. But if I remove the % from the `inputenc` and `babel` packages, nothing is drawn. Seeing how the entire code is just a TikZ picture, that seems to be a problem. It seems that just removing the `hebrew` from the `babel` options makes everything work, so that must be the culprit. Any idea how to fix this? **Added:** If I put the `tikzpicture` code inside an `\L{}` environment of `babel` (which treats the text as left-to-right), then everything works again. But the whole purpose is to have such scenario where the text is in Hebrew, so that defeats the purpose. * * * LOG File.               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Arch Linux) (format=pdflatex 2014.3.13)  23 MAR 2014 06:34     entering extended mode      restricted \write18 enabled.      %&-line parsing enabled.     **123123123.tex     (./123123123.tex     LaTeX2e <2011/06/27>     Babel <3.9h> and hyphenation patterns for 78 languages loaded.     (/usr/share/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-dist/tex/latex/base/size10.clo     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     (/usr/share/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty     (/usr/share/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty     (/usr/share/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty     (/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex     \pgfutil@everybye=\toks14     \pgfutil@tempdima=\dimen103     \pgfutil@tempdimb=\dimen104          (/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex))     (/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def     \pgfutil@abb=\box26          (/usr/share/texmf-dist/tex/latex/ms/everyshi.sty     Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)     ))     (/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex     Package: pgfrcs 2013/12/20 v3.0.0 (rcs-revision 1.28)     ))     Package: pgf 2013/12/18 v3.0.0 (rcs-revision 1.14)          (/usr/share/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty     (/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty     Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)          (/usr/share/texmf-dist/tex/latex/graphics/keyval.sty     Package: keyval 1999/03/16 v1.13 key=value parser (DPC)     \KV@toks@=\toks15     )     (/usr/share/texmf-dist/tex/latex/graphics/graphics.sty     Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)          (/usr/share/texmf-dist/tex/latex/graphics/trig.sty     Package: trig 1999/03/16 v1.09 sin cos tan (DPC)     )     (/usr/share/texmf-dist/tex/latex/latexconfig/graphics.cfg     File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live     )     Package graphics Info: Driver file: pdftex.def on input line 91.          (/usr/share/texmf-dist/tex/latex/pdftex-def/pdftex.def     File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX          (/usr/share/texmf-dist/tex/generic/oberdiek/infwarerr.sty     Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)     )     (/usr/share/texmf-dist/tex/generic/oberdiek/ltxcmds.sty     Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     )     \Gread@gobject=\count87     ))     \Gin@req@height=\dimen105     \Gin@req@width=\dimen106     )     (/usr/share/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty     (/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex     Package: pgfsys 2013/11/30 v3.0.0 (rcs-revision 1.47)          (/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex     \pgfkeys@pathtoks=\toks16     \pgfkeys@temptoks=\toks17          (/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex     \pgfkeys@tmptoks=\toks18     ))     \pgf@x=\dimen107     \pgf@y=\dimen108     \pgf@xa=\dimen109     \pgf@ya=\dimen110     \pgf@xb=\dimen111     \pgf@yb=\dimen112     \pgf@xc=\dimen113     \pgf@yc=\dimen114     \w@pgf@writea=\write3     \r@pgf@reada=\read1     \c@pgf@counta=\count88     \c@pgf@countb=\count89     \c@pgf@countc=\count90     \c@pgf@countd=\count91     \t@pgf@toka=\toks19     \t@pgf@tokb=\toks20     \t@pgf@tokc=\toks21          (/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg     File: pgf.cfg 2008/05/14  (rcs-revision 1.7)     )     Driver file for pgf: pgfsys-pdftex.def          (/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def     File: pgfsys-pdftex.def 2013/07/18  (rcs-revision 1.33)          (/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def     File: pgfsys-common-pdf.def 2013/10/10  (rcs-revision 1.13)     )))     (/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex     File: pgfsyssoftpath.code.tex 2013/09/09  (rcs-revision 1.9)     \pgfsyssoftpath@smallbuffer@items=\count92     \pgfsyssoftpath@bigbuffer@items=\count93     )     (/usr/share/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex     File: pgfsysprotocol.code.tex 2006/10/16  (rcs-revision 1.4)     ))     (/usr/share/texmf-dist/tex/latex/xcolor/xcolor.sty     Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)          (/usr/share/texmf-dist/tex/latex/latexconfig/color.cfg     File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive     )     Package xcolor Info: Driver file: pdftex.def on input line 225.     Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.     Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.     Package xcolor Info: Model `RGB' extended on input line 1353.     Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.     Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.     Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.     Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.     Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.     Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.     )     (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex     Package: pgfcore 2010/04/11 v3.0.0 (rcs-revision 1.7)          (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex)     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex     \pgfmath@dimen=\dimen115     \pgfmath@count=\count94     \pgfmath@box=\box27     \pgfmath@toks=\toks22     \pgfmath@stack@operand=\toks23     \pgfmath@stack@operation=\toks24     )     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex)     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code     .tex)     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex)     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.te     x) (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex)     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex)     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex)     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics     .code.tex))) (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex     \c@pgfmathroundto@lastzeros=\count95     )) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex     File: pgfcorepoints.code.tex 2013/10/07  (rcs-revision 1.27)     \pgf@picminx=\dimen116     \pgf@picmaxx=\dimen117     \pgf@picminy=\dimen118     \pgf@picmaxy=\dimen119     \pgf@pathminx=\dimen120     \pgf@pathmaxx=\dimen121     \pgf@pathminy=\dimen122     \pgf@pathmaxy=\dimen123     \pgf@xx=\dimen124     \pgf@xy=\dimen125     \pgf@yx=\dimen126     \pgf@yy=\dimen127     \pgf@zx=\dimen128     \pgf@zy=\dimen129     )     (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex     File: pgfcorepathconstruct.code.tex 2013/10/07  (rcs-revision 1.29)     \pgf@path@lastx=\dimen130     \pgf@path@lasty=\dimen131     ) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex     File: pgfcorepathusage.code.tex 2013/12/13  (rcs-revision 1.23)     \pgf@shorten@end@additional=\dimen132     \pgf@shorten@start@additional=\dimen133     )     (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex     File: pgfcorescopes.code.tex 2013/10/09  (rcs-revision 1.44)     \pgfpic=\box28     \pgf@hbox=\box29     \pgf@layerbox@main=\box30     \pgf@picture@serial@count=\count96     )     (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex     File: pgfcoregraphicstate.code.tex 2013/09/19  (rcs-revision 1.11)     \pgflinewidth=\dimen134     )     (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.t     ex     File: pgfcoretransformations.code.tex 2013/10/10  (rcs-revision 1.17)     \pgf@pt@x=\dimen135     \pgf@pt@y=\dimen136     \pgf@pt@temp=\dimen137     ) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex     File: pgfcorequick.code.tex 2008/10/09  (rcs-revision 1.3)     )     (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex     File: pgfcoreobjects.code.tex 2006/10/11  (rcs-revision 1.2)     )     (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.te     x     File: pgfcorepathprocessing.code.tex 2013/09/09  (rcs-revision 1.9)     ) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex     File: pgfcorearrows.code.tex 2013/11/07  (rcs-revision 1.40)     \pgfarrowsep=\dimen138     )     (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex     File: pgfcoreshade.code.tex 2013/07/15  (rcs-revision 1.15)     \pgf@max=\dimen139     \pgf@sys@shading@range@num=\count97     )     (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex     File: pgfcoreimage.code.tex 2013/07/15  (rcs-revision 1.18)          (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex     File: pgfcoreexternal.code.tex 2013/07/15  (rcs-revision 1.20)     \pgfexternal@startupbox=\box31     ))     (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex     File: pgfcorelayers.code.tex 2013/07/18  (rcs-revision 1.7)     )     (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex     File: pgfcoretransparency.code.tex 2013/09/30  (rcs-revision 1.5)     ) (/usr/share/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex     File: pgfcorepatterns.code.tex 2013/11/07  (rcs-revision 1.5)     )))     (/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex     File: pgfmoduleshapes.code.tex 2013/10/31  (rcs-revision 1.34)     \pgfnodeparttextbox=\box32     )     (/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex     File: pgfmoduleplot.code.tex 2013/07/31  (rcs-revision 1.12)     )     (/usr/share/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty     Package: pgfcomp-version-0-65 2007/07/03 v3.0.0 (rcs-revision 1.7)     \pgf@nodesepstart=\dimen140     \pgf@nodesepend=\dimen141     )     (/usr/share/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty     Package: pgfcomp-version-1-18 2007/07/23 v3.0.0 (rcs-revision 1.1)     ))     (/usr/share/texmf-dist/tex/latex/pgf/utilities/pgffor.sty     (/usr/share/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty     (/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex))     (/usr/share/texmf-dist/tex/latex/pgf/math/pgfmath.sty     (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex))     (/usr/share/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex     Package: pgffor 2013/12/13 v3.0.0 (rcs-revision 1.25)          (/usr/share/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex)     \pgffor@iter=\dimen142     \pgffor@skip=\dimen143     \pgffor@stack=\toks25     \pgffor@toks=\toks26     ))     (/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex     Package: tikz 2013/12/13 v3.0.0 (rcs-revision 1.142)          (/usr/share/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.te     x     File: pgflibraryplothandlers.code.tex 2013/08/31 v3.0.0 (rcs-revision 1.20)     \pgf@plot@mark@count=\count98     \pgfplotmarksize=\dimen144     )     \tikz@lastx=\dimen145     \tikz@lasty=\dimen146     \tikz@lastxsaved=\dimen147     \tikz@lastysaved=\dimen148     \tikzleveldistance=\dimen149     \tikzsiblingdistance=\dimen150     \tikz@figbox=\box33     \tikz@figbox@bg=\box34     \tikz@tempbox=\box35     \tikz@tempbox@bg=\box36     \tikztreelevel=\count99     \tikznumberofchildren=\count100     \tikznumberofcurrentchild=\count101     \tikz@fig@count=\count102      (/usr/share/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex     File: pgfmodulematrix.code.tex 2013/09/17  (rcs-revision 1.8)     \pgfmatrixcurrentrow=\count103     \pgfmatrixcurrentcolumn=\count104     \pgf@matrix@numberofcolumns=\count105     )     \tikz@expandcount=\count106          (/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary     topaths.code.tex     File: tikzlibrarytopaths.code.tex 2008/06/17 v3.0.0 (rcs-revision 1.2)     )))     (/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary     shadows.code.tex     File: tikzlibraryshadows.code.tex 2008/01/13 v3.0.0 (rcs-revision 1.3)          (/usr/share/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrary     fadings.code.tex     File: tikzlibraryfadings.code.tex 2009/11/15 v3.0.0 (rcs-revision 1.2)          (/usr/share/texmf-dist/tex/generic/pgf/libraries/pgflibraryfadings.code.tex     File: pgflibraryfadings.code.tex 2008/02/07 v3.0.0 (rcs-revision 1.3)     )))     (/usr/share/texmf-dist/tex/latex/base/inputenc.sty     Package: inputenc 2008/03/30 v1.1d Input encoding file     \inpenc@prehook=\toks27     \inpenc@posthook=\toks28          (/usr/share/texmf-dist/tex/latex/ucs/utf8x.def     File: utf8x.def 2004/10/17 UCS: Input encoding UTF-8     ))     (/usr/share/texmf-dist/tex/latex/ucs/ucs.sty     Package: ucs 2013/05/11 v2.2 UCS: Unicode input support          (/usr/share/texmf-dist/tex/latex/ucs/data/uni-global.def     File: uni-global.def 2013/05/13 UCS: Unicode global data     )     \uc@secondtry=\count107     \uc@combtoks=\toks29     \uc@combtoksb=\toks30     \uc@temptokena=\toks31     )     (/usr/share/texmf-dist/tex/generic/babel/babel.sty     Package: babel 2013/12/03 3.9h The Babel package          (/usr/share/texmf-dist/tex/generic/babel-english/english.ldf     Language: english 2012/08/20 v3.3p English support from the babel system          (/usr/share/texmf-dist/tex/generic/babel/babel.def     File: babel.def 2013/12/03 3.9h Babel common definitions     \babel@savecnt=\count108     \U@D=\dimen151     )     \l@canadian = a dialect from \language\l@american      \l@australian = a dialect from \language\l@british      \l@newzealand = a dialect from \language\l@british      )     (/usr/share/texmf-dist/tex/generic/babel-hebrew/rlbabel.def     File: rlbabel.def 2005/03/30 v2.3h Right-to-Left support from the babel system      Hebrew language support from the babel system     )     (/usr/share/texmf-dist/tex/generic/0babel/hebrew.ldf     File: hebrew.ldf 2004/02/20 v2.3h Hebrew language definition from the babel sys     tem Hebrew language support from the babel system               Package babel Warning: No hyphenation patterns were preloaded for     (babel)                the language `Hebrew' into the format.     (babel)                Please, configure your TeX system to add them and     (babel)                rebuild the format. Now I will use the patterns     (babel)                preloaded for english instead on input line 57.          \l@hebrew = a dialect from \language0     )) (/usr/share/texmf-dist/tex/generic/babel-hebrew/he8enc.def     File: HE8enc.def 2005/05/20 v1.2c 8-bit Hebrew font encoding (test version: sti     ll liable to change)     ) (./123123123.aux     LaTeX Font Info:    Try loading font information for HE8+cmr on input line 2.     (/usr/share/texmf-dist/tex/generic/babel-hebrew/he8cmr.fd     File: HE8cmr.fd 2005/05/20 v1.2c Hebrew default font (test version: still liabl     e to change)     ))     \openout1 = `123123123.aux'.          LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 13.     LaTeX Font Info:    ... okay on input line 13.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 13.     LaTeX Font Info:    ... okay on input line 13.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 13.     LaTeX Font Info:    ... okay on input line 13.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 13.     LaTeX Font Info:    ... okay on input line 13.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 13.     LaTeX Font Info:    ... okay on input line 13.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 13.     LaTeX Font Info:    ... okay on input line 13.     LaTeX Font Info:    Checking defaults for HE8/cmr/m/n on input line 13.     LaTeX Font Info:    ... okay on input line 13.          ABD: EveryShipout initializing macros     (/usr/share/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     \scratchcounter=\count109     \scratchdimen=\dimen152     \scratchbox=\box37     \nofMPsegments=\count110     \nofMParguments=\count111     \everyMPshowfont=\toks32     \MPscratchCnt=\count112     \MPscratchDim=\dimen153     \MPnumerator=\count113     \makeMPintoPDFobject=\count114     \everyMPtoPDFconversion=\toks33     ) (/usr/share/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty     Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO     )          (/usr/share/texmf-dist/tex/generic/oberdiek/ifluatex.sty     Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)     Package ifluatex Info: LuaTeX not detected.     )     (/usr/share/texmf-dist/tex/generic/oberdiek/ifpdf.sty     Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)     Package ifpdf Info: pdfTeX in PDF mode is detected.     )     Package pdftexcmds Info: LuaTeX not detected.     Package pdftexcmds Info: \pdf@primitive is available.     Package pdftexcmds Info: \pdf@ifprimitive is available.     Package pdftexcmds Info: \pdfdraftmode found.     )     (/usr/share/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty     Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf          (/usr/share/texmf-dist/tex/latex/oberdiek/grfext.sty     Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)          (/usr/share/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty     Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)     ))     (/usr/share/texmf-dist/tex/latex/oberdiek/kvoptions.sty     Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)          (/usr/share/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty     Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)          (/usr/share/texmf-dist/tex/generic/oberdiek/etexcmds.sty     Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     Package etexcmds Info: Could not find \expanded.     (etexcmds)             That can mean that you are not using pdfTeX 1.50 or     (etexcmds)             that some package has redefined \expanded.     (etexcmds)             In the latter case, load this package earlier.     )))     Package grfext Info: Graphics extension search list:     (grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE     G,.JBIG2,.JB2,.eps]     (grfext)             \AppendGraphicsExtensions on input line 452.          (/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg     File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv     e     ))     (/usr/share/texmf-dist/tex/latex/ucs/ucsencs.def     File: ucsencs.def 2011/01/21 Fixes to fontencodings LGR, T3     )     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <7> on input line 18.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <5> on input line 18.      [1          {/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./123123123.aux) )      Here is how much of TeX's memory you used:      12314 strings out of 493308      244753 string characters out of 6143616      290522 words of memory out of 5000000      15529 multiletter control sequences out of 15000+600000      7456 words of font info for 20 fonts, out of 8000000 for 9000      957 hyphenation exceptions out of 8191      55i,7n,78p,414b,685s stack positions out of 5000i,500n,10000p,200000b,80000s     {/usr/s     hare/texmf-dist/fonts/enc/dvips/culmus/he8.enc}</usr/share/texmf-dist/fonts/typ     e1/public/culmus/DavidCLM-Bold.pfa></usr/share/texmf-dist/fonts/type1/public/cu     lmus/DavidCLM-Medium.pfa>     Output written on 123123123.pdf (1 page, 22419 bytes).     PDF statistics:      44 PDF objects out of 1000 (max. 8388607)      22 compressed objects within 1 object stream      0 named destinations out of 1000 (max. 500000)      109 words of extra memory for PDF output out of 10000 (max. 10000000)


title: Problems compiling arXiv LaTeX source files

text: I use LaTeX to write papers. I'm using TeXworks/MiKTeX on a Windows XP computer. When I write the LaTeX code, I can compile it without any problems using "pdfLaTeX+MakeIndex+BibTeX". But if I download LaTeX source code from arXiv and I try to compile it using "pdfLaTeX+MakeIndex+BibTeX" it won't work. I get the error "! Undefined control sequence". However, I don't have any problems compiling LaTeX source code from arXiv if I use "pdfLaTeX" instead of "pdfLaTeX+MakeIndex+BibTeX". Why is this happening? What's the difference between "pdfLaTeX+MakeIndex+BibTeX" and "pdfLaTeX"? The reason why I ask these questions is that I'd like to make some minor changes to one of my arXiv papers, so I will download the LaTeX source code and make the changes there. I guess I'll have to use "pdfLaTeX" to compile the source code, but I want to make sure that no unwanted changes are made in the paper. LaTeX source files downloaded from arXiv don't seem to have .tex extension. They seem to be of a different type (I guess this is due to arXiv processing), but anyway I can open them without any problems using TeXworks.


title: Floats Analogue of framed

text: I have very little experience with LaTeX. So, pardon my ignorance, but is there a float equivalent of `\framebox`? Ideally, I'd like a simple construct for framed text that I can position at the top [t] or bottom [b] of the page. I found two posts that didn't quite seem to address my needs:   1. Framed text with a float in it   2. Frame around text and floats


title: Finding one's place in a document after a hyperref click

text: I am just about to start using hyperref for the first time. One of the problems about clicking on a cross-reference is that it takes you away from the text you are reading. I often find that getting back to the same place is a problem. How does one write the source file in LaTeX so that it is easy to find one's place after leaving it? Should I be generating html or pdf?


title: How to make \tableofcontents look like table as in the figure attached below

text: ![This is the required output](http://i.stack.imgur.com/TM9m6.jpg) In latex, the toc comes without border but the firm where I work requires me to follow the toc in this format. Any help will be appreciated.               \documentclass[11pt, openany, oneside]{book}     \usepackage[english]{babel}     \usepackage{helvet}     \renewcommand{\familydefault}{\sfdefault}     \usepackage[paper=a4paper,margin=1.3 in]{geometry}% http://ctan.org/pkg/geometry     \usepackage{graphicx}     \usepackage{fancyhdr}     \usepackage[toc,page]{appendix}     \newenvironment{myfont}{\fontfamily{phv}\selectfont}{\par} %for setting the font     \usepackage{color}     \definecolor{light-gray}{gray}{0.45} % Just one number between 0 (black) and 1 (white)     \usepackage{titlesec}     \titleformat{\chapter}{\normalfont\large\bfseries\color{black}}{\thechapter.}{1 em}{}     \titleformat{\section}{\normalfont\normalsize\bfseries\color{black}}{\thesection.}{.5 em}{}     \titleformat{\subsection}{\normalfont\small\bfseries\color{black}}{\thesubsection.}{.3 em}{}     \usepackage{tikz}     \usepackage{lastpage}     \usepackage{etoolbox}     \makeatletter     \patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}     \makeatother     \titlespacing*{\chapter}     {0 pt}{12 pt}{12 pt}     \usepackage{tabularx}     \renewcommand{\headrulewidth}{0 pt}     \setlength{\headheight}{0 pt}     \pagestyle{fancy}     \fancyhf{}     %\lhead{\textcolor{light-gray}{\large\textbf{\begin{myfont}Company Name Pvt. Ltd.\end{myfont}\textbf{}}}}     \rhead{\includegraphics[width=3.0 cm,keepaspectratio]{../IMAGES/Company_logo.jpg}}     \cfoot{Page \thepage\ of \pageref{LastPage}}     \usepackage[hidelinks]{hyperref}     \usepackage{multirow}     \hypersetup{pdfauthor={XYZ},%                 pdftitle={XYZ},%                 pdfsubject={XYZ},%                 pdfkeywords={XYZ, XYZ}     }          \begin{document}     \fancypagestyle{plain}{}          \chapter{PROJECT SUMMARY}          \section{PROJECT OVERVIEW}     \end{document}


title: How to build and combine sophisticated layouts in figures

text: How can I get a layout like the one below in my document?                 ![enter image description here](http://i.stack.imgur.com/l7Crb.png) With this question, I am looking for:   1. An answer for the above layout   2. General advice on which combination of packages is recommended to build sophisticated layouts. By sophisticated layouts I mean layouts where:      * I can tile **figures** and **subfigures** with different sizes but still have them vertically or horizontally **aligned**.     * I can have the ability to reference subfigures from the text with links, e.g. "In Fig. 2(a) we have.." In addressing this problem, I think Mico's answer in this thread: Vertically align subfloats at the top while having subcaptions vertically aligned below the subfloats is releveant, where he said: > According to the latest edition of the l2tabu document, both the subfigure > and subfig packages should no longer be used; instead, one should use the > subcaption package (from the same author of the caption package). With this in mind, I thought a good combination of packages to build sophisticated layouts would be:               \usepackage{floatrow}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{calc}     \usepackage{graphicx}      so I used them to try building my layout below, but it didn't work as expected. Below is the code that shows my attempt:               \begin{figure}[t!]%     \begin{floatrow}[2]%     \ffigbox[\FBwidth]% Width of the subfloat:     {%        \includegraphics[width=0.20\textwidth]{1-1.png}%        \includegraphics[width=0.20\textwidth]{1-2.png}%        \includegraphics[width=0.20\textwidth]{1-3.png}%        \includegraphics[width=0.20\textwidth]{1-4.png}%         }{\caption{Foo}\label{fig:1}}%     \ffigbox[\Xhsize]%     {%         \begin{subfloatrow}%         \ffigbox[\FBwidth]% Width of the subfloat:         {%         \includegraphics[width=0.20\textwidth]{2-A.png}%         }         {%           \subcaption{}\label{fig:2-A}%         }         \ffigbox[\FBwidth]% Width of the subfloat:         {%         \includegraphics[width=0.20\textwidth]{2-B.png}%         }         {%           \subcaption{}\label{fig:2-B}%         }         \end{subfloatrow}     }%     {\caption{Results. subref{fig:2-A}: Foo. \subref{fig:1b}: Bar}}     \end{floatrow}%     \end{figure}


title: MacTeX -aux-directory=DIR

text: i'm using Textmate and MacTeX (texLive 1.12). There is the option in MiKTeX (Windows) to use the command `-aux-directory=DIR` and `-output-directory=DIR`. The output part works in TeXLive, but the PDF does not auto open, and there are still an aux-file in the main folder, and also a `.fdb_latexmk` file. Does anybody know if there is an `-aux-directory=DIR` command for TeXLive?


title: Writing practice sheets - dotted letters

text: I would like to make writing practice sheets similar to the following. ![](http://i.stack.imgur.com/49OGQ.png) How can you make "dotted" fonts like this? The closest I saw on this forum was How can I convert text to paths with pdflatex? but I don't know if `\pscharpath` can be modified/used to do this job. Or maybe there is a TikZ solution? **Update.** My plan was to position the horizontal lines using trial and error. Is there, alternatively, some way to get the correct height of a lower case and upper case letter automatically?


title: Why doesn't lineno number a paragraph when it is followed by an "align" equation environment without a space?

text: `lineno` skips the line numbering in this case:               \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{lineno}     \linenumbers     \begin{document}     Lorem ipsum dolor sit amet, consectetur adipiscing elit:      \begin{align}     1+1=2     \end{align}     \end{document}      but is fine with               \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{lineno}     \linenumbers     \begin{document}     Lorem ipsum dolor sit amet, consectetur adipiscing elit:           \begin{align}     1+1=2     \end{align}     \end{document}      Note that though this sounds a lot like this question. I don't believe the answer is related, since this doesn't use $$. Is the latter somehow more correct?


title: Where is the code for control buttons in animate or a repository of composite characters?

text: I am looking for the code for the control buttons of "player" in `animate` package (for example the button which is a square with a right-pointing triangle is used for PLAY button, as expected). I did not find this in Detexify or in comprehensive LaTeX Symbol List. Is there a repository for the code of characters or logos which appear to be made from two or more existing characters: an example is `\bigoplus` a circle with a plus sign. Some logos, like `TeX` itself are rather easy to find. Others not so easy. Here is an attempt for some composite math symbols.


title: Longtable - aligning caption to left

text: > **Possible Duplicate:**   >  Formating captions in longtable tables Is it possible to align longtable caption to the left side of paper ? Standard table and tabular command align caption to the left and I would like to achieve the same effect in longtable. Is it possible ??


title: texworks not loading style

text: I installed Texlive and texworks 0.4.5. TexWorks is claiming it cannot find style lstlsting.sty I saw a posting on here claiming that the solution (for MikTeX is to update MikTex). I don't know how to get a version out of TeXLive, or how to update it. Can I just reinstall TeXLive? Do I need MikTeX instead?


title: String equality in \ifx conditional using output from concatenating macros

text: Please consider the following MWE - where I try to test for string equality between an parameter, and a test string prepared by a macro:               \documentclass{article}          \def\testStr#1{IOIO#1}          \newcommand{\doTest}[1]{%     \edef\tmphwp{\testStr{XX}} %     \typeout{=\tmphwp=#1=} %     \ifx\tmphwp#1{%     \typeout{~equal}%     }\else{%     \typeout{!not equal}%     }\fi %     \typeout{ ^^J } % newline in terminal stdout     }          \begin{document}          \doTest{12}          \doTest{hello}          \doTest{IOIOXX}          \end{document}      Strangely, this seems to always determine strings are unequal - even if I enter specifically the right string - terminal log (from `pdflatex`) reports:               =IOIOXX=12=     !not equal               =IOIOXX=hello=     !not equal               =IOIOXX=IOIOXX=     !not equal      Hmm ... I would have expected `IOIOXX` = `IOIOXX` ?! Can anyone explain why am I not getting the expected results - and how to get the right comparison? Does this have maybe to do anything with catcodes? Many thanks in advance for any answers,   Cheers!


title: Centered title page in twoside report

text: I'm writing my thesis using a twoside report. However, when it comes to the title page I think I want to have it centered i.e. the left margin and the right margin to be equal. How can I achieve this for the title page only? This is a minimum working example demonstrating what I mean:               \documentclass[11pt,twoside,a4paper]{report}          \title{The title of my thesis}     \author{My name \\ \\ \\ \emph{Supervisor:} \\ My supervisor's name \\ \\}     \date{\today}          \begin{document}     \maketitle     \end{document}      Thanks in advance!


title: XITS font not found

text: I am running a recently updated TeX Live 2011 on a Mac (OS X 10.7 Lion). I wanted to use the XITS fonts, but the following file generates errors when processed with xelatex:               \documentclass{article}     \usepackage{unicode-math}      \setmainfont{XITS}      \setmathfont{XITS Math}     \begin{document}     Text $x+y=\sqrt{z}$     \end{document}      I'm including the relevant (I think) output below. Any ideas what is going on?               kpathsea: Running mktextfm XITS     /usr/local/texlive/2011/texmf/web2c/mktexnam: Could not map source abbreviation X for XITS.     /usr/local/texlive/2011/texmf/web2c/mktexnam: Need to update /usr/local/texlive/2011/texmf-dist/fonts/map/fontname/special.map?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input XITS     This is METAFONT, Version 2.718281 (TeX Live 2011)               kpathsea: Running mktexmf XITS     ! I can't find file `XITS'.


title: Hyperref to expand macro in argument

text: I am confused as to why the `edef` below does not get expanded in the link? The `\GetTexFilePath` is from Text being output when none should be, which is expandable, and the `\GetTexFilePathOld` is the older version which is not. Both yield identical results in this case. I attempted various `\expandafter` magic but could not figure out the correct combination.               \documentclass{article}          \usepackage{xstring}     \usepackage{xparse}     \usepackage{hyperref}          \ExplSyntaxOn     \NewDocumentCommand{\GetTexFilePath}{m m m}{% Expandable version         \str_if_eq:xxTF{#1}{SpecialValue}{#1/#2#3}{../#1/#2#3}%     }%     \ExplSyntaxOff          \NewDocumentCommand{\GetTexFilePathOld}{m m m}{%         \IfStrEq{#1}{SpecialValue}{#1/#2#3}{../#1/#2#3}%     }%               \begin{document}         \edef\FullExpandedFileName{\GetTexFilePath{foo}{bar}{.tex}}         \href{run:\FullExpandedFileName}{\GetTexFilePath{foo}{bar}{}}         %         \edef\FullExpandedFileName{\GetTexFilePathOld{foo}{bar}{.tex}}         \href{run:\FullExpandedFileName}{\GetTexFilePathOld{foo}{bar}{}}              \edef\FullExpandedFileName{\GetTexFilePath{SpecialValue}{bar}{.tex}}         \href{run:\FullExpandedFileName}{\GetTexFilePath{SpecialValue}{bar}{}}         %         \edef\FullExpandedFileName{\GetTexFilePathOld{SpecialValue}{bar}{.tex}}         \href{run:\FullExpandedFileName}{\GetTexFilePathOld{SpecialValue}{bar}{}}     \end{document}


title: How do I backcolor in verbatim?

text: I have some code I want to typeset as verbatim (lstlisting would be ok as well) - but I want to highlight some parts of it via a different background color, i.e. something like this:               \begin{verbatim}     hello \colorbox{red}{world} blah     hello world blub     \end{verbatim}      Where `colorbox` should not be interpreted verbatim and should not introduce additional horizontal spaces, i.e. blah and blub should be correctly aligned (like without any highlighting). I tried the `Verbatim` and `lstlisting` environments like this:               \begin{lstlisting}[escapechar=\%]      or               \begin{Verbatim}[commandchars=\\\{\}]      in combination with a then escaped `colorbox` command - the highlighting works - but the additional spaces are introduced and screw up the character alignment. How can I do it right?


title: covering map arrow

text: I am trying to draw an arrow going down similar to these we usually see in topolgy books. For example, when we study covering spaces we usually put the covering space and then an arrow and then the base space. Any help is appreciated. ![Here is a picture:](http://i.stack.imgur.com/21fSF.jpg)


title: How do I prevent conflicts between accsupp and hyperref?

text: This question is related to the answer to the question Is there a LaTeX trick to prevent a PDF viewer from copying the line number? Unless you turn `hyperref` off, the following MWE               \documentclass{article}          \usepackage{listings}     \usepackage{accsupp}     \renewcommand*{\thelstnumber}{\protect\BeginAccSupp{ActualText={}}\arabic{lstnumber}\protect\EndAccSupp{}}          \lstset     {         language={[LaTeX]TeX},         numbers=left,         columns=flexible,     }          \usepackage{hyperref}          \begin{document}          \begin{lstlisting}     Hello\\     Universe!     \end{lstlisting}          \end{document}      cannot be compiled with the following error message: ![enter image description here](http://i.stack.imgur.com/hmiwN.png) How do I prevent conflicts between `accsupp` and `hyperref`?


title: How to improve row vector appearance inside paragraph?

text: > **Possible Duplicate:**   >  Parentheses size around matrix When using a row vector inside paragraph with double line spacing the output looks ugly (imo) because the brackets are too tall and much bigger than the text itself. I tried using the package `setspace` in the middle of the paragraph to force single space, but this also breaks the line.               \documentclass[12pt,a4paper]{report}     \usepackage[latin1]{inputenc}     \usepackage{pgfplots}     \usepackage{mathtools}     \usepackage{siunitx}     \usepackage{setspace}     \pgfplotsset{compat=newest}          \begin{document}          % Single space     Some text $ \mathbf{r} = \begin{bmatrix*} 0 & -1 & 0,5 & 0 & 0 & -\pi/18 \end{bmatrix*}^T $ then some more text.          \vspace{20pt}     % Double space     \begin{doublespace} Some text $ \mathbf{r} = \begin{bmatrix*} 0 & -1 & 0,5 & 0 & 0 & -\pi/18 \end{bmatrix*}^T $ then some more text. \end{doublespace}          % Forcing single spacing in middle of paragraph     \vspace{20pt}     \begin{doublespace} Some text in double space, \begin{singlespace} $ \mathbf{r} = \begin{bmatrix*} 0 & -1 & 0,5 & 0 & 0 & -\pi/18 \end{bmatrix*}^T $ \end{singlespace} then some more text in double space. \end{doublespace}     \end{document}      and this is the output ![enter image description here](http://i.stack.imgur.com/HIYYd.png) Any ideas how to improve this?


title: Lightweight equivalent of \cref and \Cref

text: I'm trying to convert my LaTeX document to HTML using HeVeA and I'm facing a problem with `cleveref` package -- my LaTeX file uses `\cref` and `\Cref` heavily, but hevea doesn't support this package by default. First thing I tried was importing whole `cleveref.sty` -- that somehow didn't work, I was also looking at `cleveref` source, but that is a little too complex for me :-) So the question is -- how do you think is a best way to do references in document that is supposed to be converted with HeVeA? example of this is really trivial:               \documentclass{article}     \usepackage{cleveref}     \begin{document}     \section{A}     \label{x}     \Cref{x}, \cref{x}.     \end{document}      run pdflatex on this twice and you get a nice pdf with 'Section 1, section 1'. HeVeA fails with `Command not found: \Cref`


title: Lower case in section title

text: I am quite newbie in LaTeX. Following examples in other questions for using lower case in titles, I tried to mimic them without success, when applying it to a section: I am working in LyX2.0.               \documentclass{book}          \usepackage{textcase}          \begin{document}     \chapter{X}     \section{Y}     \section{Introduction to A\MakeLowercase{g} compounds}          \end{document}      I get the error:               ! Undefined control sequence.     \MakeLowercase ...owercaseUnsupportedInPdfStrings            l.17 ...roduction to A\MakeLowercase{g} compounds}           The control sequence at the end of the top line      of your error message was never \def'ed. If you have      misspelled it (e.g., `\hobx'), type `I' and the correct      spelling (e.g., `I\hbox'). Otherwise just continue,      and I'll forget about whatever was undefined.      Is this somehow possible to get?


title: Customising theorem style

text: I wish to customise my theorem style to something like the one shown, but I couldn,t figure a universal definition of parameters. Some suggestions? ![enter image description here](http://i.stack.imgur.com/tHuG4.png) The code:               \documentclass{article}     \usepackage{tikz}          \newcommand\Loadedframemethod{TikZ}     \usepackage[framemethod=\Loadedframemethod]{mdframed}     \tikzstyle{titregris} =          [draw=gray, thick, fill=white, shading = exersicetitle, %           text=black, rectangle, rounded corners, right,minimum height=.7cm]     \pgfdeclarehorizontalshading{exersicebackground}{100bp}               {color(0bp)=(white); color(100bp)=(white!5)}     \pgfdeclarehorizontalshading{exersicetitle}{100bp}               {color(0bp)=(white);color(100bp)=(black!5)}     \newcounter{exercise}     \renewcommand*\theexercise{Example:~\arabic{exercise}}     \makeatletter     \def\mdf@@exercisepoints{}%new mdframed key:     \define@key{mdf}{exercisepoints}{%         \def\mdf@@exercisepoints{#1}     }     \mdfdefinestyle{exercisestyle}{%       outerlinewidth=1em,outerlinecolor=white,%       leftmargin=-1em,rightmargin=-1em,%       middlelinewidth=1.2pt,roundcorner=5pt,linecolor=gray,       apptotikzsetting={\tikzset{mdfbackground/.append style ={%                            shading = exersicebackground}}},       innertopmargin=1.2\baselineskip,       skipabove={\dimexpr0.5\baselineskip+\topskip\relax},       skipbelow={-1em},       needspace=3\baselineskip,       frametitlefont=\sffamily\bfseries,       settings={\global\stepcounter{exercise}},       singleextra={%           \node[titregris,xshift=1cm] at (P-|O) %              {~\mdf@frametitlefont{\theexercise}~};           \ifdefempty{\mdf@@exercisepoints}%           {}%           {\node[titregris,left,xshift=-1cm] at (P)%             {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}%        },       firstextra={%           \node[titregris,xshift=1cm] at (P-|O) %              {~\mdf@frametitlefont{\theexercise}~};           \ifdefempty{\mdf@@exercisepoints}%           {}%           {\node[titregris,left,xshift=-1cm] at (P)%             {~\mdf@frametitlefont{\mdf@@exercisepoints points}~};}%        },     }     \makeatother               \begin{document}          \begin{mdframed}[style=exercisestyle]     Near what I want     \end{mdframed}          \end{document}


title: How to install Tex in Ubuntu... for a newbie

text: Im trying to install texlive or any tex editor.. I will be using it for document preparation for my coursework. could anybody give me a step by step way to install any kind of tex on my Ubuntu system? I basically want an editor where I can   * have a preview of my commands   * where i can easily edit math equations and symbols    * friendly to use this is from my terminal > Blockquote ~$ sudo apt-get install texlive-full Reading package lists... > Done Building dependency tree   >  Reading state information... Done E: Unable to locate package texlive-full > ~$ sudo apt-get install texmaker Reading package lists... Done Building > dependency tree   >  Reading state information... Done E: Unable to locate package texmaker


title: How to change font size of year in natbib's author-year citations?

text: I am using LaTeX with Natbib, and would like to change the fonts for my in- line, author-date citations (but not in the bibliography itself). I have found ways to change the font of the author's name (as here), and also to change the font of numerical citations (same page), but I can't find a way to change the font (or more importantly, just the **size** ) of the year numbers in an author-date citation. I suppose this might be easier in BibLaTeX, but I'd like to avoid the move if I can.


title: \begin{framed} with background-color

text: Does anybody know how to set the background-color of a framed element?               \begin{framed}                Let me have a background :(      \end{framed}


title: What is LaTeX's \if@nobreak mechanism for and how does it work?

text: many LaTeX sectioning-related commands have a block in manipulating the `\@nobreak` flag. Taking the following example for the sake of example:               \begingroup     \parindent \z@ \rightskip \@pnumwidth      \parfillskip -\@pnumwidth      {\leavevmode      \large \bfseries #1      \leaders\hbox{$\m@th\mkern 1.5mu\cdot\mkern 1.5mu$}      \hfil \hb@xt@\@pnumwidth{\hss #2}}\par      \nobreak      \global\@nobreaktrue      \everypar{\global\@nobreakfalse\everypar{}}%      \endgroup      \fi}      (from an implementation of `\l@chapter`), I am looking to understand why the mechanism is required and how it works in detail.


title: Double-spacing in text but not footnotes in memoir class while using arabxetex

text: The `memoir` class's `\DoubleSpacing` command without an asterisk (*) is supposed to double-space the text but not the footnotes or float text. However, when the `arabxetex` package has been loaded, this functionality is disrupted, such that in addition to the main text, the footnotes are also double-spaced (floats are still single-spaced as expected). I am not the first to point out that sometimes `\DoubleSpacing` erroneously produces double-spacing in the footnotes; someone already did a year ago -- but that question was closed without being answered. I hope that now that I have identified the specific package (or at least one of the packages) which causes this problem, the question will be easier to answer. The following example file, compiled with `xelatex` (MacTex 2014), produces double-spaced footnotes; I would like it to produce _single_ -spaced footnotes (while keeping the package `arabxetex`).               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode          \documentclass[12pt,article,oneside,letterpaper]{memoir}     \usepackage[american]{babel}     \usepackage{fontspec}     \setromanfont[Mapping=tex-text]{Times New Roman}          \usepackage[novoc,fdf2alif,utf]{arabxetex}          \DoubleSpacing          \begin{document}          Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.\footnote{Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.}          \end{document}      ## Update (2014-09-05) As was pointed out in the comments below, the real problem is a conflict between the `bidi` package and `memoir`'s `\DoubleSpacing` command; once `bidi` is removed, the command functions as described in the `memoir` documentation (text double-spaced, footnotes single-spaced). Just to be clear, I am not requesting a comprehensive fix of this problem, which I imagine would involve a modification of the `bidi` package itself. My question is simply whether there is a decent work-around which would allow me to achieve the desired result. (So far I have met with no success fiddling with `\baselineskip` and the other parameters described in `memman.pdf` §3.3.2 = pp. 48–49.)


title: beamer title with \hfill

text: I include citations in the titles of slides and I would like the citations to be right justified (fully) while the title itself is left justified. I used               <title-text> \hfill <\cite{}>      but this does not push the citation to make it right-justified; it simply moves the citation a bit to the right as shown in the following figure. Is there any way to make the citation right-justified? Thanks. ![enter image description here](http://i.stack.imgur.com/fxYPw.jpg)


title: .sty suffix (extension) for LaTeX packages

text: I understand that the suffix `.cls` stands for **classes**. Then, why **packages** don't have the suffix `.pkg`, but rather have `.sty`?


title: pgfplots: drawing areas from a table starting "above" an axis

text: Please let me explain the motivation behind this a bit more broadly. I'd like to draw measured benchmark values as follows: background/nothing between the x-axis and the minimum value a green area between the minimum value and the median a black line at the median a red area between the median and the maximum value background/nothing above the maximum I tried various attempts to reach this before using the IMHO quite inelegant way of just drawing a white area on top of the other plots (although after all the pain I think I can live with that :), the code below shows that and how an alternative solution should look like too. One try was to use stacked plots, but of course the values are stacked and I could not find an equivalent to `bar shift=0pt`. I also think there is no way to disable the stacking per plot (or the other way around, i.e. disable it globally but enable it for selected plots). The most similar solution I could find yet is Fill between two curves in pgfplots. but I could not get it to work with the pre-existing table data I have (is there really no easy way to copy selected columns into a new table!?). Is the white area approach below really the best way to do this?               \documentclass{article}     \usepackage{pgfplots}     \usepackage{pgfplotstable}          \begin{document}          \pgfplotstableread{         size        min         max         med         1           1           3           2         10          2           4           3     }{\loadedtable}          \begin{tikzpicture}     \begin{axis}[         legend entries={above median,below median, median,},         ymin=0,         area style,         ]         \addplot [fill=red!40, draw=none]   table [x=size, y=max]   {\loadedtable} \closedcycle;         \addplot [fill=green!40, draw=none] table [x=size, y=med]   {\loadedtable} \closedcycle;         \addplot [draw=black, line legend]  table [x=size, y=med]   {\loadedtable};         \addplot [fill=white, draw=white]   table [x=size, y=min]   {\loadedtable} \closedcycle;          \end{axis}     \end{tikzpicture}          \end{document}


title: How to use an environment defined by the versions-package inside another environment

text: When I use the versions package to conditionally exclude content like this:               \documentclass{article}     \usepackage{color}% just as example          \usepackage[tracing]{versions}     \excludeversion{vers}% opposite to \includeversion{vers}          \newenvironment{test}{%     START%     \vers%     \color{red}%     }{%     \endvers%     END% is excluded but should not be excluded      }          \begin{document}     before          \begin{test}     % content is excluded for \excludeversion{vers}     %        and included for \includeversion{vers} above     inside     \end{test}          after     \end{document}      I can exclude the content of the `vers` environment, as intended by the use of the `versions` package. But also `END` gets excluded (after `\endvers`), opposed to my intention. With `\includeversion{vers}` also `END` gets included (as intended). What do I do wrong, and how do I fix it? It is possible to define               \newcommand{\afterendvers}{%     END% and all other stuff I want to have executed here     }      and replace `\end{test}` by `\end{test}\afterendvers` in the whole document, but a more "TeXnical" solution would be nice. Related issue: With `\includeversion{vers}` `END` is printed in red, although > environments processed as if `\begin{<version>}` and `\end{<version>}` just > were not present, however they form groups like `\begin{relax} <code> > \end{relax}` or `\begingroup <code> \endgroup` (from the versions manual), but               \vers%     \bgroup%     \color{red}%     }{%     \egroup%     \endvers%     END%      leads to `END` being written in black, as expected. I.e.: `\vers` and `\endvers` do not appear to act as `\begingroup` and `\endgroup` in this case.


title: Slight vertical mis-alignment of cells when using TikZ matrix of nodes

text: While laying out a bunch of nodes with a TikZ matrix, I noticed slight vertical mis-alignment of nodes. It seems that words with “tall” letters (p, b, l) shift the box vertically up or down. This does not happen if the node contains only a word without those letters. E.g. `test` will appear shifted when placed beside a node with `uiae` as text. Here's a minimum example:               \usetikzlibrary{matrix}     \begin{tikzpicture}          \matrix[         matrix of nodes,         column sep=1ex, row sep=1ex,         nodes={             draw,             minimum height=2em,             text width=30mm,         },     ] (matrix-optimization) {         Encodings &         Problems &         Algorithms \\     %         Selection &         uiae &         pppp \\     };     \end{tikzpicture}      The nodes `Problems` and `pppp` will appear shifted. How can I fix that? I'd like all nodes to have the same height (text vertically centered) and to be perfectly aligned.


title: How to use modernCV for creating resume in Mac OS X 10.6?

text: I referred multiple sources but nothing is working out. Used TeXShop and it did generated PDF after clicking on "Typeset". I am missing out something , please help!


title: Creating variables with index (using counters)

text: Is there a way to add an index to a command? For example:               \newcounter{count}     \loop<condition>       \def\var\Roman{count}{some data}     \repeat      The `\var\Roman{count}` should become the variable `\varI`, `\varII`, `\varIII` and so on. Background: I need to get some data from external files and store it into variables (which I will later use to create a document). Normally every `\varI` should be the same as every `\varII`, but I need to check whether it really is the case or not. If not I should return a warning or error. * * * Solution for the first problem is in the comments, but I have a second problem. Suppose I wrote this:               \newcommand\addindex[3]{  % #1 as name of var, #2 as index and #3 as content       \expandafter\def\csname #1\Roman{#2}\endcsname{#3}  % thanks to egreg     }          \newcounter{count}     \loop\unless\ifnum\value{count}=5       \stepcounter{count}       \addindex{var}{count}{\arabic{count}}     \repeat      All `\var<index>` have now as value 5, because they are defined as `\arabic{count}`, and not their value at the moment. Adding `\expandafter` before `\arabic{count}` does not seem to work for some reason...


title: How to automatically add parentheses around fractions?

text: Is there any way to make LaTeX automatically put parentheses around a `\frac` if it is followed by a superscript expression?


title: How to fill a region bounded by a character and a graphic object with a color?

text: There are 5 white regions bounded by the ellipse and character R as shown in the following figure. > _I want to fill **EACH** of these regions with a > **UNIQUE/DIFFERENT/DISTINGUISHABLE** color._ How to do this in either PSTricks or Ti _k_ Z? ![enter image description here](http://i.stack.imgur.com/aYd6j.png)               \documentclass[border=0pt]{standalone}          \usepackage{pstricks}          \begin{document}         \begin{pspicture}[showgrid=false](4,6)             \begin{psclip}{\psellipse[linestyle=none](2,3)(2,3)}                 \rput(2,3){\psscalebox{21}{R}}             \end{psclip}             \psellipse(2,3)(2,3)         \end{pspicture}     \end{document}        1. Please don't suggest me to replace the character border with a new object by tracing it such as using `\pscurve`, `\psbezier`, or the like.   2. Please don't suggest me to use a tool provided by vector or raster graphics editors as shown in the following screenshot. ![enter image description here](http://i.stack.imgur.com/wlUyu.png)


title: Is there a website where I can paste RTF and get out LaTeX?

text: Yes, I know there are loads of plugins and all kinds of options for Oo, but I can't get them to work and I spend more time then I can to admit looking for things italicized in Word which should be italicized in the LaTeX document... it's making me insane. Help would be appreciated so much.


title: Why is my text vertically spread out?

text: Can anyone see from the following LaTeX fragment why the page got formatted the way it can be seen in the picture below? For some reason everything got centered vertically across the whole page.               \section{Another way to double-space a file}          \begin{lstlisting}     awk 'BEGIN { ORS="\n\n" }; 1'     \end{lstlisting}          \bb{BEGIN} is a special kind of pattern which is not tested against the input.     It is executed before any input is read. This one-liner double-spaces the file     by setting the \bb{ORS} variable to two newlines. As I mentioned previously,     statement "\bb1" gets translated to "\bb{\{ print \}}", and every print statement     gets terminated with the value of \bb{ORS} variable.          \pagebreak      I am doing anything fancy and my document declaration looks like this:               \usepackage{amsmath} %Never write a paper without using amsmath for its many new commands      \usepackage{amssymb} %Some extra symbols      \usepackage{makeidx} %If you want to generate an index, automatically      \usepackage{graphicx} %If you want to include postscript graphics           \usepackage{listings}     \usepackage{xcolor}     \usepackage{textcomp}          \begin{document}           \newcommand{\bb}[1]{\textbf{#1}}          \definecolor{codebg}{HTML}{EEEEEE}     \definecolor{codeframe}{HTML}{CCCCCC}          \lstset{language=Awk}     \lstset{backgroundcolor=\color{codebg}}     \lstset{frame=single}     \lstset{framesep=10pt}     \lstset{rulecolor=\color{codeframe}}     \lstset{upquote=true}          \lstset{emph={awk}, emphstyle=\textbf}      ![wrong](http://i.stack.imgur.com/dnx6z.png)


title: Is there a way to define single space or more in math mode to be \,?

text: I am learning LaTeX and I find one annoying thing. I have to keep typing `\,` when in math mode to add that tiny space between different variables when I want one. This makes the LaTeX code harder to read and modify. For example, I'd rather just write                $a b c$       and have it come out as                a b c       instead of                abc        Now one has to write                $a\,b\,c$      So a single space or more, is interpreted as `\,` when in math mode, so writing `$a b c$` it will come out to be `a b c`. If the `\,` is present, then that is ok. So when writing                $a\,  b c$      it will come out as                 a  b c      I do not see that this will cause a problem. If I do not want the `\,` then I will write `ab` and if I want the space, I'll write `a b` much easier, less things to type, and the LaTeX code becomes easier to read. Is it possible to have some magic macro or renewcommand to do this? **Update** Ok, thanks for the advice. Will take it. I thought I needed to add space to make it look better. Here is an example:               \documentclass{article}     \begin{document}     $$s(t)= A_c \cos(2 \pi  f_c t + \beta  m(t))$$           $$s(t)= A_c \cos(2 \pi  f_c t + \beta\,  m(t))$$      \end{document}      Here is the output ![enter image description here](http://i.stack.imgur.com/gtOhk.png) after looking more at it, I see that I really did not need the extra space between the \beta and the m.


title: Build custom \itemize

text: I'd like to create a CV similar to the one shown here. But I don't know what's the best way to create those text blocks. I had the idea to use itemize. But I don't know how to format the label of the \item in italics. I also get in trouble when trying to spread a label on multiple lines (eg. when the content of the label is too long for one line). Here is an example of what I'm trying to do:               June 2007  Responsible for the visual design and HTML / CSS     –present   templating for a social media site where people                discuss their unusual pets.          Another    Some text     Date      The label should be in italics. I'd appreciate any help.


title: Modify Tag Command

text: Fairly sure this is something really obvious. Trying to redefine the `\tag{...}` command via:               \let\tagOld\tag     \renewcommand{\tag}[1]{\tagOld{#1$^*$}}      In other words, it appends an asterisk to the argument, however, it is making no difference. If I create a whole new command:               \providecommand{\mytag}[1]{\tag{#1$^*$}}      and call the new the `\mytag{...}` command instead of `\tag{...}`, then the output is generated as anticipated.


title: How to prevent offset in subcaption / subfigure

text: I have the following problem trying to align two figures horizontally within the same figure environment. The right image is always put lower than the left image. Here is my code:               \begin{figure}          \begin{subfigure}[b]{0.5\textwidth}         \includegraphics[scale=0.5]{plots/dipfdbs_componentSizeComponentCount.pdf}         \end{subfigure}         \begin{subfigure}[a]{0.5\textwidth}                 \includegraphics[scale=0.5]{plots/dipfdbs_averageDegree.pdf}         \end{subfigure}         \caption{Degree distribution and component sizes of dipfdbs recommendation graph.}         \label{fig:dipfdbsgraphplots}     \end{figure}      And here is how it looks like in rendered pdf: ![result](http://i.stack.imgur.com/dQ2ip.jpg) Any help would be greatly appreciated.


title: Restate linguistic example

text: I have made a numbered example with the package GB4E. I want to restate this example with the same number. I.e. istead of just refering to the example with `\ref`, i want the whole thing to show up again. How? The output of the following is what i would like to restate: `\begin{exe} \ex \label{dog} Bonzo is a dog \end{exe}`


title: How to make sure I get regular ASCII quotes in code examples when using `listings`

text: So I am writing a book on AWK and when using `listings` code highlighting module, I get the fancy quotes `“ ”` and `‘ ’` instead of the regular ASCII ones `" "` and `' '`. I hate these fancy quotes because when copying code examples from a PDF, they never work in the terminal. Does anyone know how to make all code examples use only ASCII quotes? I found out that you can set `\lstset{upquote=true}` and that fixes the single quotes `' '` but the double ones are still broken. Any ideas?


title: Is there any cryptographic-related graphics drawing package?

text: For example, fig 4.7, 4.8 shows in http://williamstallings.com/Extras/Security-Notes/lectures/blockA.html


title: How to control borders of intersected nodes (rectangles)

text: I am trying to superpose 2 rectangles; one blue, one red, and have the intersection area with a mix of blue and red. I have problems with the borders though.   1. I am not getting the thickness of the borders correctly where rectangles intersect   2. when using rounded corners, I don't see how to nicely get 2 angles rounded (south west and north east) and 2 not. Any idea? ![intersecting rectangles](http://i.stack.imgur.com/3tvl7.png) Here is my MWE:               \documentclass{article}     \usepackage{tikz}     \tikzset{     box1/.style={draw=black, thick, rectangle,rounded corners, minimum height=4cm, minimum width=4cm},     box2/.style={draw=black, thick, rectangle, minimum height=4cm, minimum width=4cm},     }          \begin{document}     \begin{tikzpicture}          \node[box1, fill=red!10] (c2) at (0,0) {};     \node[box1, fill=blue!10] (c1) at (2,2) {};     \begin{scope}     \clip (0,0) rectangle (4,4);     \clip (-2,-2) rectangle (2,2);     \fill[color=blue!50!red!10, rounded corners, draw=black, thick] (2,2) rectangle (0,0);     \end{scope}               \node[box2, fill=red!10] (c2) at (8,0) {};     \node[box2, fill=blue!10] (c1) at (10,2) {};     \begin{scope}     \clip (8,0) rectangle (12,4);     \clip (6,-2) rectangle (10,2);     \fill[color=blue!50!red!10, draw=black, thick] (10,2) rectangle (8,0);     \end{scope}          \end{tikzpicture}     \end{document}


title: Tikz mindmap with opacity, a different approach to venn diagrams

text: I need to draw Venn diagrams for some special sets. In these sets I knew for example that the intersection of some of them are empty, so I wanted to draw a special venn diagram that omits those empty intersections. I made a graph that each vertex is a set or a intersection of sets. Them I deleted vertex with empty intersection. This way I can get the coordinates of each vertex. Using mindmap I could make a modified venn diagram. But them don't seem quite good enough. The connection between them are small (there is a decoration called "circle connection bar" but I don't know how can I modify the node concept using this). A simple example bellow of a posibility. I just wanted some tips on what kind of parameters should I change to make it better looking. Or maybe a complete change around, maybe midmap isn't the best way.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{mindmap}          \begin{document}          \begin{tikzpicture}[small mindmap,scale=4,opacity=0.4]     \coordinate (A)   at (2.00003,0.882642);     \coordinate (AB)  at (1.49021,1.74189);     \coordinate (AC)  at (1.50998,0.0102365);     \coordinate (ABC) at (1.00055,0.8711);     \coordinate (B)   at (0.490009,1.73215);     \coordinate (BC)  at (0.,0.860431);     \coordinate (C)   at (0.510476,0.);     % The links between the sets.     % In this notation AB means the intersection of A with B.     \path [concept color=red]         node [concept] at (A) {}             child  {node [concept] at (AB) {}}             child  {node [concept] at (AC) {}}             child  {node [concept] at (ABC) {}};     \path [concept color=blue]         node [concept] at (B) {}             child  {node [concept] at (AB) {}}             child  {node [concept] at (BC) {}}             child  {node [concept] at (ABC) {}};     \path [concept color=green]         node [concept] at (C) {}             child  {node [concept] at (AC) {}}             child  {node [concept] at (BC) {}}             child  {node [concept] at (ABC) {}};     % Place the label later, otherwith they got transparent     \path [opacity=1]         node at (A) {$A$}         node at (B) {$B$}         node at (C) {$C$}         node at (AB) {$A \cap B$}         node at (AC) {$A \cap C$}         node at (BC) {$B \cap C$}         node at (ABC) {$A \cap B \cap C$};     \end{tikzpicture}          \end{document}      ![](http://i.stack.imgur.com/JgHA9.png)


title: Better solution to display the Distributive Property

text: Trying to apply the solution provided for the question How to draw arrows between parts of an equation to show the Math Distributive Property (Multiplication)? I have found a major problem as is shown in my example below:               \documentclass{article}     \usepackage{amsmath}     \usepackage[dvipsnames]{xcolor}     \usepackage{tikz}     \usetikzlibrary{calc,shapes}          \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}     \newcommand{\DrawBox}[2]{%       \begin{tikzpicture}[overlay,remember picture]         \draw[->,shorten >=5pt,shorten <=5pt,out=70,in=130,distance=0.5cm,#1] (MarkA.north) to (MarkC.north);         \draw[->,shorten >=5pt,shorten <=5pt,out=50,in=140,distance=0.3cm,#2] (MarkA.north) to (MarkB.north);       \end{tikzpicture}     }     \begin{document}     \[\tikzmark{MarkA}a(b\tikzmark{MarkB}+c\tikzmark{MarkC})=ab+ac \DrawBox{OrangeRed}{Cerulean}\]          \begin{align*}     -(2x+5)&=(-\tikzmark{MarkA}1)(2x\tikzmark{MarkB}+5\tikzmark{MarkC})\DrawBox{OrangeRed}{Cerulean}\\            &=(-1)(2x)+(-1)(5)\\            &=-2x+(-5)\\            &=-2x-5     \end{align*}          \end{document}      This gives: ![enter image description here](http://i.stack.imgur.com/yXBMw.png) To start with I don't like how the arrows leave and enter the node. I would like to able to control the height of the arc. Secondly, the arrow is not pointing correctly above the right node. I understand the command is not set to take the character and let it act as a node like in Jakes answer. This is a downfall. Next, even when I tried Jakes method, there can only be one source but several targets. How can one define several sources. I like Peter Grill's answer since one can define several `tikzmark`'s. This is very useful but in terms of appearance it is not the best. The color scheme I have chosen I wish to maintain standard but the other parameters I mentioned above I would like to be able to customize. Hence, the arcs must be a suitable height (maybe let TikZ do the calculations) for this and that there can be several sources and targets without defining new `\tikzmark`s. Its somewhat a combination of both answers. > EDIT I think that I am understanding the `\tikzmark` command but here is my major problem that can be avoided if the mathmode characters are selected as nodes as Jakes answer does. This is the example where I see the most problem (probably its just my lack of understanding of TikZ and nodes.)               \documentclass[letterpaper]{article}     \usepackage{amsmath,amssymb}     \usepackage[dvipsnames]{xcolor}     \usepackage{tikz}     \usetikzlibrary{calc,shapes}     \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}     \newcommand{\DrawBox}[2]{%       \begin{tikzpicture}[overlay,remember picture]         \node[xshift=0.85cm,yshift=0.65cm] (MarkExp) {\footnotesize Exponent};         \node[xshift=-0.85cm,yshift=-0.35cm] (MarkBase) {\footnotesize Base};         \draw[->,shorten >=6pt,out=180,in=90,#1] (MarkExp.west) to ([xshift=-2.5pt]MarktoExp.north);         \draw[->,out=0,in=270,#2] (MarkBase.east) to ([xshift=2.5pt,yshift=2pt]MarktoBase.south);       \end{tikzpicture}     }     \begin{document}     $\tikzmark{MarktoBase}2^3\tikzmark{MarktoExp}$\DrawBox{OrangeRed}{Cerulean}     \end{document}      ![enter image description here](http://i.stack.imgur.com/YgkUV.png) I feel that in my solution above, I have forced the arrows to fit what I want even though it does the job. I sincerely believe there is a better method to achieve the same output as above.


title: BibTeX single author entries with two periods

text: Using BibTeX, I am trying to edit a .bst file to not produce two periods following the author name of a single author entry. For example the following entry...               @ARTICLE{Yeh2004,       author = {Yeh, P. J.},       title = {Rapid evolution of a sexually selected trait following population         establishment in a novel habitat},       journal = {Evolution},       year = {2004},       volume = {58},       pages = {166-174},       number = {1},       endnotereftype = {Journal Article},       issn = {0014-3820}     }      ...produces this given my current .bst file: ![enter image description here](http://i.stack.imgur.com/5iCGQ.jpg) Anyone know how I can edit this for single authors, yet maintain a period to separate entries with multiple authors from the subsequent year? Many thanks in advance.


title: Making Back-Referencing More Pretty

text: The question Back-referencing in LaTeX was marked a duplicate, so I can't post to that thread. Nonetheless, I found the code provided there by Ryan Reich to be a good learning exercise. His solution provided a comma-separated list of back references, without spaces. I just thought that his approach would be even more useful, if it could be modified to produce not just a string of comma separated numbers, but actual legible text that might be used in a document. So I tried to improve his solution


title: BibTeX key alignment and localization

text: I'm having problems with my `bibtex` keys. According to my style guide, they should be left-aligned, whereas now they're right-aligned. Is there a way to change that? I am using `amsalpha` bibliography style. ![right-aligned bibliography keys](http://i.stack.imgur.com/6G7rE.png) Also, in the authors list, I need to have a localized value of `'and'` before the last author. I've found a bunch of `bibtex` localization files in it's installation directory. Will I need to copy one and change strings in it? How do I tell `bibtex` which one to use (I'm using XeLaTeX for my document)? Removing the `'and'` completely and just leaving the comma before it will do too. I do not need a good solution to this one right now, a quick one will suffice. _EDIT_ Ok, i managed to figure out the right alignment of keys is cause by `natbib` package. I include MWE below: `mwe.tex`:               \documentclass[a4paper]{article}          \usepackage{natbib}          \bibliographystyle{amsalpha}          \begin{document}          \cite{hu62}     \cite{ss97}     \cite{crm03}          \bibliography{mwe}          \end{document}      `mwe.bib`:               @Article{hu62,         title = {Visual Pattern Recognition by Moment Invariants},         journal = {IRE Transactions on Information Theory},         pages = {179--187},         year = {1962},         author = {Hu, Ming-Kuei}     }          @Conference{ss97,         title = {Hu’s moment invariants: How invariant are they under skew and perspective transformations?},         booktitle = {IEEE WESCANEX 97: Communications, Power and Computing. Conference Proceedings.},         pages = {292--295},         year = {1997},         author = {Sivaramakrishna, Radhika and Shashidhar, N. S.}     }          @Article{crm03,         title = {A comparative analysis of algorithms for fast computation of Zernike moments},         journal = {Pattern Recognition},         pages = {731--742},         year = {2003},         author = {Chong, Chee-Way and Raveendran, P. and Mukundan, R.}     }      I am using `bibtex` and `xelatex`.


title: Change symbol size in circuitikz

text: How can I make the diodes in the following circuit smaller?               \documentclass{article}     \usepackage{tikz}     \usepackage[europeanresistors,americaninductors]{circuitikz}          \begin{document}       \begin{circuitikz}         %\draw[step=1.0,black!20] (0,0) grid (6,4);         \draw             (1,1) node[nigfete] (fet1) {}             (1,3) node[nigfete] (fet2) {}             (3,1) node[nigfete] (fet3) {}             (3,3) node[nigfete] (fet4) {}             (5,1) node[nigfete] (fet5) {}             (5,3) node[nigfete] (fet6) {};         \draw             (fet1.S)++(0,0.4) -- ++(0.5,0) to[sD*] ($(fet1.D)+(0.5,-0.4)$) -- ++(-0.5,0)             (fet2.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet2.D)+(0.5,-0.1)$) -- ++(-0.5,0)                     (fet3.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet3.D)+(0.5,-0.1)$) -- ++(-0.5,0)                     (fet4.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet4.D)+(0.5,-0.1)$) -- ++(-0.5,0)             (fet5.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet5.D)+(0.5,-0.1)$) -- ++(-0.5,0)                     (fet6.S)++(0,0.1) -- ++(0.5,0) to[sD*] ($(fet6.D)+(0.5,-0.1)$) -- ++(-0.5,0);         \draw             (fet1.S)++(0,0) -- ++(-2,0) to[battery] ($(fet2.D)+(-2,0)$) -- ++(2,0);         \draw              (fet1.D) to (fet2.S)             (fet3.D) to (fet4.S)             (fet5.D) to (fet6.S);         \draw              (fet1.S) to (fet3.S)             (fet3.S) to (fet5.S)             (fet2.D) to (fet4.D)             (fet4.D) to (fet6.D);       \end{circuitikz}     \end{document}      to[sD*, scale=.5] doesnt work. Thanks.


title: TeXstudio: How to add custom highlighting for custom environment?

text: Until there is a `cwl` file for the `paralist` package, I would like to just include the `compactenum` environment into the custom highlighting list in the TeXstudio Options. I tried adding `compactenum` in the custom environment column, but to no avail. ![](http://i.stack.imgur.com/8JOus.png) Even after a restart of TeXstudio, `\begin{compactenum}` and `\end{compactenum}` were still highlighted in red ![](http://i.stack.imgur.com/KENBE.png) Is there something I'm missing? How do you add a custom environment to TeXstudio? The custom command `\possessivecite` that you can see in the first screenshot is working fine...


title: What makes the radius too long in the following PS expression?

text: I want to translate               \pstVerb{/Dist {N-A.x N-A.y N-B.x N-B.y Pyth2} def}      from the following ![enter image description here](http://i.stack.imgur.com/CURxh.png)               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-eucl}     \addtopsstyle{gridstyle}{gridlabels=0pt,griddots=0}     \psset{saveNodeCoors}     \begin{document}     \begin{pspicture}[showgrid](-2,-2)(2,2)         \pstGeonode[PosAngle={180,45,-90}]             (-1.5,-1){A}             (1.5,1){B}         \pstVerb{/Dist {N-A.x N-A.y N-B.x N-B.y Pyth2} def}%         \pnode[A](!Dist 21 PtoC){D}\psdots(D)         \psarc[origin={A},arcsep=-1](A){!Dist}{(D)}{(B)}     \end{pspicture}     \end{document}      to                \pstVerb{%             tx@Dict begin                 tx@NodeDict begin                     /N@A load GetCenter                     /N@B load GetCenter                 end                 Pyth2 \pst@number\psrunit\space div                 /Dist ED             end}%      used in ![enter image description here](http://i.stack.imgur.com/3zJLe.png)               \documentclass[pstricks,border={12pt 12pt 25cm 15cm}]{standalone}     \usepackage{pst-eucl}     \addtopsstyle{gridstyle}{gridlabels=0pt,griddots=0}     \makeatletter     \psset{runit=\psunit}     \begin{document}     \begin{pspicture}[showgrid](-2,-2)(2,2)         \pstGeonode[PosAngle={180,45,-90}]             (-1.5,-1){A}             (1.5,1){B}         \pstVerb{%                 tx@Dict begin                     tx@NodeDict begin                         /N@A load GetCenter                         /N@B load GetCenter                     end                     Pyth2 \pst@number\psrunit\space div                     /Dist ED                 end}%         \pnode[A](!Dist 21 PtoC){D}\psdots(D)         \psarc[origin={A},arcsep=-1](A){!Dist}{(D)}{(B)}     \end{pspicture}     \end{document}      What is my mistake caused the radius to be too long? Edit: The problem solved when `Pyth2 \pst@number\psrunit\space div` is replaced by `Pyth2 236 div`. But it still leaves a question, why is it `236`?


title: Latex beamer - showing a slide A with 3 points - then a picture on Slide B - and afterwards slide A with one additional point

text: I want to show a slide that has an overall of 4 items, but I first want to show the first 3 points, all at once, then show a picture that illustrates those 3 points and than show the slide with all 4 items. I think this should somehow work with againframe, but I can't get it to work. So as an example SlideA:   * Poing1   * Point2   * Point3 SlideB: Show picture SlideC:   * Point1 (from slideA)   * Point2 (from slideA)   * Point3 (from slideA)   * Point4 (new) So long I got this far:               \documentclass{beamer}     \begin{document}     \frame<1-2>[label=framelabel]{       \frametitle{First Headline}       \begin{itemize}         \item<1> Good point1         \item<2> Good point2         \item<2> Good point3           \begin{itemize}             \item Good subpoint1             \item Good subpoint2           \end{itemize}         \item<3> Good point4       \end{itemize}     }     \begin{frame}       \includegraphics[width=0.7\textwidth]{images/ClarinD-Logo}     \end{frame}          \againframe{framelabel2}          \end{document}      This unfortunately results in one slide with one point, than another slide with the two points and the subpoints, then there comes the picture and than it starts over again with showing a slide with one item, than another slide with the items marked with<2> and than a slide with the 4th item.


title: How to use chessboard package?

text: I'm using TexLive under Windows 8 & TexMaker, when I tried to run this code snippet,               \documentclass{article}     \usepackage{chessboard}     \storechessboardstyle{4x4}{maxfield=d4}     \begin{document}     \chessboard[style=4x4,setwhite={Qa1,Qd2},showmover=false]     \end{document}      It didn't produce any result, instead a warning said `\usepgfmodule{shapes}` is obsolete. Any idea?               This package is obsolete. Use \usepgfmodule{shapes} instead      Is there any package for chessboard available in TikZ?


title: Apacite: suppress initials intext? (Sublime 2 on mac)

text: I am using the package `apacite` for my dissertation (document class report). For a few in-text citations, the author's first name initials appear and I would like to remove/suppress them in the in-text contexts alone. I tried to follow the solution provided in Apacite: suppress initials intext? but I am unable to find `apacite.bst`. I am using sublime 2 editor in mac. It looks like the apacite has been installed as the references list work well. Any help either finding the `.bst` file or other recommendations would be great!


title: Change a parameter in document using the cmd?

text: I need to be able to change the value of a parameter inside a LaTeX document without having to change it manually. I'll explain: There is one main program that executes another smaller one. This smaller program computes some things and creates a .txt-file with a specific name and all its results inside. Then the main program executes the LaTeX file I have to create which will process the created .txt-file into a nice pdf (using commands such as `\openin\txtfile=\filename.txt` and the package `datatool`).   Problem is that LaTeX needs to know the name of the newly created .txt-file. The main program knows the name it and will call the LaTeX file by using the cmd command `> latex texfile.tex`. But this won't change the value of `\filename` in any way. Is there actually any possible way to change a value (of `\filename`) inside the LaTeX file using the cmd? Because I have absolutely no clue and Google doesn't help me either...


title: How to add Go to the programming languages list in Lyx

text: I'm adding Go code to my document via 'Insert->Program Listing' in Lyx. The language Go is not available in the language dropdown in the settings. Is there an easy way to add Go syntax highlighting/parsing to Lyx?


title: How to make the hyperlink point to the top of linked figure and item of enumeration?

text: I want to create a problem booklet. Each problem numbered by `enumerate` has at most one figure that may either be in `marginpar` or float and occupy the full width. The caption for each figure has a hyperlink to the corresponding question. From the question, we also has a link to the corresponding figure. I use auto-generated labels               \def\qMark{Q.\arabic{chapter}.\arabic{section}.\arabic{enumi}}     \def\fMark{F.\arabic{chapter}.\arabic{section}.\arabic{enumi}}      to establish the linking. I add `\usepackage[all]{hypcap}` to get a better linking behavior, i.e., clicking a hyperlink will direct us to the top of the linked object rather than to the point that requires us to adjust the view.               \documentclass[12pt]{book}     \usepackage[         a4paper,         vmargin=2cm,         outermargin=9cm,         innermargin=2cm,         marginparwidth=7cm,         marginparsep=20pt     ]{geometry}               \usepackage{graphicx}     \usepackage{marginfix}     \usepackage{ifoddpage}     \usepackage{caption}          \usepackage{lipsum}          \usepackage[colorlinks,bookmarksnumbered]{hyperref}     \usepackage[all]{hypcap}               \def\qMark{Q.\arabic{chapter}.\arabic{section}.\arabic{enumi}}     \def\fMark{F.\arabic{chapter}.\arabic{section}.\arabic{enumi}}          \let\tempItem=\item     \renewcommand\item{\tempItem\label{\qMark}}          \def\getQRef{Problem~\ref{\qMark}}     \def\getFRef{\figurename~\ref{\fMark}}               \newcommand\MarginFig{%     \marginpar{\includegraphics[width=\linewidth]{example-image-a}     \captionof{figure}{For \getQRef.}\label{\fMark}%     }}          \newcommand\FullFig{%     \begin{figure}[hbtp]         \checkoddpage       \edef\side{\ifoddpage l\else r\fi}%         \makebox[\textwidth][\side]{%          \parbox{\dimexpr\textwidth+\marginparwidth+\marginparsep\relax}{%             \includegraphics[width=\linewidth]{example-image-b}             \caption{For \getQRef.}             \label{\fMark}}}     \end{figure}     }               \begin{document}     \chapter{Higgs Boson}          \begin{enumerate}     \item     \MarginFig     \getFRef\     \lipsum[1]          \item     \lipsum[1]          \item     \FullFig     \lipsum[1]\getFRef.          \item     \MarginFig     \lipsum[1]\getFRef.          \item     \FullFig     \lipsum[1]\getFRef.          \item     \MarginFig     \lipsum[1]\getFRef.          \item     \lipsum[1]     \end{enumerate}          \end{document}      Unfortunately, clicking, for example, `Figure 1.3` or `Problem 3` does not behave as they are supposed to be. Please try them by yourself to get the idea. How to fix this issue?


title: Comprehensive book on Kile

text: Finally, I have decided to migrate from Office to Latex. That is why I have chosen Kile as an editor, for many known reasons that I don't want to list here because of space. That's why I need a comprehensive book or would be even better to find some video training course on Kile. The reason for that is that I have never worked with Kile before. Could you help me to choose a good starting point on learning Kile,please? Thank you.


title: Breaking equations with breqn

text: I am new to using the `breqn` package. It looks good, but I get an odd behaviour when an equation can almost fit in the page but not quite: the alignment gets completely wrong. Is there a way to fix this? For the example, I used the minipage environment at various sizes. `\fbox` is only there to show the borders. Compiling the example below gives good results for small sizes and big sizes, but for `15em`, `16em` and `17em`,the second equation gets out of the box.               \documentclass{article}     \usepackage{breqn}          \newcommand{\myequation}[1]{       \fbox{         \begin{minipage}{#1}           Size #1:           \begin{dgroup*}             \begin{dmath*}               (x+\cdots+y+\cdots + z) - (x+\cdots + z) = 0             \end{dmath*}             \begin{dmath*}               A = 0              \end{dmath*}           \end{dgroup*}           Text         \end{minipage}       }     }          \begin{document}          \myequation{5em} \qquad \myequation{6em} \qquad \myequation{9em} \\     \myequation{13em} \qquad \myequation{15em} \\     \myequation{16em} \\     \myequation{17em} \\     \myequation{18em} \\     \myequation{30em}          \end{document}      With some versions of breqn and the expl3 bundle, the following code may need to be added to the preamble:               \ExplSyntaxOn     \cs_set_eq:NN \intexpr_eval:w \int_eval:w     \cs_set_eq:NN \intexpr_eval_end: \int_eval_end:     \ExplSyntaxOff


title: Math and Times font

text: I am trying to use the Times font for normal text and variables, and the default math font (CMR) for math. I tried using the Times package. This partially solves the problem. But I want the text in math (by which I mean English alphabet and numbers other than greek, operators etc) to be in the Times font. How do I do this? Any comments or suggestion is appreciated. For further clarity see this: ![Times math example](http://i.stack.imgur.com/WJF1p.png) EDIT: There seems to be a commercial font used by many journals called MathTime. Maybe this is the one that I saw.


title: How to create a Node below a node

text: \documentclass{minimal}     \usepackage[a4paper,margin=1cm,landscape]{geometry}     \usepackage{tikz}     \usetikzlibrary{positioning,shapes,shadows,arrows}          \begin{document}     \tikzstyle{abstract}=[rectangle, draw=black, rounded corners, fill=blue!40, drop shadow,             text centered, anchor=north, text=white, text width=3cm]     \tikzstyle{comment}=[rectangle, draw=black, rounded corners, fill=green, drop shadow,             text centered, anchor=north, text=white, text width=3cm]     \tikzstyle{myarrow}=[->, >=open triangle 90, thick]     \tikzstyle{line}=[-, thick]          \begin{center}     \begin{tikzpicture}[node distance=2cm]         \node (Item) [abstract, rectangle split, rectangle split parts=2]             {                 \textbf{ITEM}                 \nodepart{second}name             };         \node (AuxNode01) [text width=4cm, below=of Item] {};         \node (Component) [abstract, rectangle split, rectangle split parts=2, left=of AuxNode01]             {                 \textbf{COMPONENT}                 \nodepart{second}nil             };         \node (System) [abstract, rectangle split, rectangle split parts=2, right=of AuxNode01]             {                 \textbf{SYSTEM}                 \nodepart{second}parts             };              \draw[myarrow] (Component.north) -- ++(0,0.8) -| (Item.south);         \draw[line] (Component.north) -- ++(0,0.8) -| (System.north);          \end{tikzpicture}     \end{center}     \end{document}      Hi I modified the example posted here. http://www.texample.net/tikz/examples/class-diagram/ The author put dummy node below "ITEM" \node (AuxNode01) [text width=4cm, below=of Item] {}; and created two nodes one to the right and one to the left. Now my question is how to create a third node exactly below the item, at the place where the dummy node is. Intuitively I tried "at" & "over" but did not work.


title: vertical space after algorithm

text: I am using the usual `algorithm` package for a paper. However, LaTeX puts too much vspace below algorithms. I have already reduced `\floatsep`, `\textfloatsep` and `\intextsep` but it does not seem to help. For figures, I can use negative `\vspaces` after the figure to get less space after it. However, this does not work for algorithms as there is a line displayed below the algorithm. If I use a negative vspace in the algorithm environment, the line gets pulled into the pseudocode. Thus, both answers which were posted for this question: How to remove/change the vertical spacing before and after an \algorithm environment? do not work. How to fix this?


title: Removing slide numbers in the Madrid theme

text: I use the Madrid theme. I would like to know how to remove the slide number and the total number of slides from ALL slides in my presentation.


title: Table of contents and appendices

text: I am writing a "memoire" about a research project to end my undergraduate studies, but I am not able to format the sections and the table of contents as I would like to do. My paper, written with the LaTeX class article, is composed with 3 major sections, followed by 3 appendices and references at the end. I'd like it to have a table of contents looking like:               I- Section 1     II- Section 2     III- Section 3     Appendices     A - Appendix A     B - Appendix B     C - Appendix C     References      So far, I created a `\section{Appendices}` to make it have the same weight as the three first sections. But, as they are important and take several pages, I'd like each one of the appendices to be defined as a section too and not a subsection. Is there a way to make Appendices appear in the table of contents still showing that it contains the three following lines without defining it as a section. Sorry if I'm not really clear, and thank you in advance. Also: I added the references with a `\begin{thebibliography}{99}` and they don't appear in the table of contents so far, how can I fix it?


title: The ^^ notation in various engines

text: Basically, how does the `^^^...` notation work in LuaTeX and XeTeX, exactly? In 8-bit TeX engines (recent TeX, eTeX, pdfTeX, at least), two consecutive identical catcode 7 characters (typically `^`), followed by two lowercase hexadecimal digits, are converted before the tokenization step to the corresponding byte. Namely, `^^6f` is exactly equivalent to `o`: for instance, `\sh^^6fw ^^6f` will cause TeX to show `the letter o`. There is also the notation with two `^` (identical catcode 7 characters), followed by any ascii character (but not two lowercase hexadecimal digits), which is replaced by the character obtained by either subtracting or adding 64 to the character code, remaining among ASCII characters (range 0 to 128). Unicode-aware engines (I'm thinking of LuaTeX and XeTeX, there are perhaps other less known ones around) also provide `^^^^xxxx` and `^^^^^xxxxx` for characters whose hexadecimal representation has 4, or 5 digits. But this does not seem to be done in the same way across engines. For instance, both LuaTeX and XeTeX appear to accept the notation with 4, 5, or 6 carets followed by the same number of hexadecimal digits, but XeTeX also accepts it for 3, while LuaTeX doesn't. Compiling the following with pdfTeX, LuaTeX, and XeTeX gives different results.               \catcode0=12     \newlinechar=10     \def\loopshow#1{\message{\meaning #1^^J}\loopshow}     \loopshow \/       ^^56       ^^^056       ^^^^0056       ^^^^^00056       ^^^^^^000056       ^^^^^^^0000056     {\end\iffalse}     \fi}     \bye      One weird fact about XeTeX (a bug?) is that               \show ^^^^^^010101      shows `the character displaywidth`. My goal (there may be a better way to do this) is to provide a way to test whether passing a given list of tokens through `\scantokens` is safe. For that, my plan is to go through the `\detokenized` token list one character at a time, applying TeX's rule for tokenizing (but no need to fully tokenize), and detecting begin-group and end-group tokens, as well as invalid characters.


title: How to set path to Latex distribution in a .tex file?

text: I am writing my CV and and I am modifying the `moderncv` package. Since Texlive can update packages and potentially overwrite my changes, I have copied the `moderncv` package inside my working folder. However, the `moderncv.cls` file refers to files that are in the latex distribution folder. How do I tell the `moderncv.cls` to find those packages from the default distribution folder? Environment: MacOS 10.7 + MacTex


title: Unable to put \geq or \leq when using polski along with newtxmath

text: \documentclass[12pt]{mwrep}     \usepackage{polski}     \usepackage{newtxmath}     \begin{document}     Why can't I write $a \leq 3$ or     \[     a \geq 2     \]     \end{document}      Output:   ![enter image description here](http://i.stack.imgur.com/7788e.png) When using combination of packeges shown in MWE above I'm unable to get some characters (`\geq` and `\leq`). When I comment `\usepackage{polski}` I get proper result. Unfortunately I need this package. What can I do to fix this issue?


title: Change the way subsections appear in table of contents

text: I am writing a LaTeX document with short sections which results in subsections being listed in the table of contents in the same or subsequent pages. How can I suppress the appearance of page number for each subsection and make a list of subsections in a single sentence under their section? Some books use this style... Edit: I am using the report document class and no special toc package


title: Specify output directory for htlatex

text: I would like to know how I can specifiy the output directory for the html/css generated by htlatex. My call is as follows:               htlatex main.tex      The files are generated in the same directory where main.tex is located. But I would rather like to write it to a folder named html contained in the current directory (./html). I read about adding `"" "-d/mypath/"` args but it didn't work out. Can someone help me? I also have some problems to get documentation as calling htlatex with `-h` or `\--help` doesn't work out. http://tug.org/applications/tex4ht/mn.html was not useful either.


title: metaUML class diagram: set some methods as abstract in an abstract class

text: I usually found the answer of my questions in StackExchange or over Internet. But this time I can't. I look for a lot yesterday and I didn't find a solution. Recently I started to use LaTex, and I'm using metaUML for describe a few of my important classes. But I have a problem with abstract classes. I have an abstract class with some methods abstract, an the rest of the methods not. I want to put the abstract methods in Italic or Oblique (value metauml_defaultFontOblique), but I don't know how to access to the font of each method to put that value. For example:               input metauml;     beginfig(1);          AbstractClass.AbsClass("AbsClass")()(     "+AbsClass()",     "+abstractMethod(): void",     "+nonAbstractMethod(): void"     );          drawObject(AbsClass);     endfig;     end      ![The result of the above code](http://i.stack.imgur.com/nepxF.png) Here I want abstractMethod will appear in italic, and noAbstractMethod will appear normal. How can I do this? I can put the name of the class in Italic if I add:               AbsClass.info.iName.iFont.name := metauml_defaultFontOblique;      And I can put all the methods in Italic if I use:               AbsClass.info.iMethodStack.iPict.iFont.name := metauml_defaultFontOblique;      ![The result if I put all methods in italic using the above code](http://i.stack.imgur.com/lgB6Q.png) But I only want the abstract method in Italic. Thank you for your help.


title: Context with TexMaker

text: I'm using TexWorks to type my Context documents. I wish to get folding (which is not, yet, implemented in TW). I hoped to use TexMaker but I can't find the way to choose a Context build. Did anyone succeed ?