title: Rotate entire tikzpicture without using graphics.sty

text: This question is related to the one here. The question is given in the following text.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{mindmap,arrows}     \usepackage{graphicx}          \tikzset{       ld/.style={level distance=#1},lw/.style={line width=#1},       level 1/.style={ld=4.5mm, trunk, lw=1ex ,sibling angle=60},       level 2/.style={ld=3.5mm, trunk!80!leaf a,lw=.8ex,sibling angle=56},       level 3/.style={ld=2.75mm,trunk!60!leaf a,lw=.6ex,sibling angle=52},       level 4/.style={ld=2mm, trunk!40!leaf a,lw=.4ex,sibling angle=48},       level 5/.style={ld=1mm, trunk!20!leaf a,lw=.3ex,sibling angle=44},       level 6/.style={ld=1.75mm,leaf a, lw=.2ex,sibling angle=40},     }     \pgfarrowsdeclare{leaf}{leaf}{       \pgfarrowsleftextend{-2pt} \pgfarrowsrightextend{1pt}     }{       \pgfpathmoveto{\pgfpoint{-2pt}{0pt}}       \pgfpatharc{150}{30}{1.8pt}       \pgfpatharc{-30}{-150}{1.8pt}       \pgfusepathqfill     }          \makeatletter     \def\agobble#1\nil#2{}     \def\mytextcolor@a#1 #2\nil#3{%       \mytextcolor@b#1\nil{#3}       \if\relax\detokenize{#2}\relax\expandafter\agobble\fi       \mytextcolor@a#2\nil{#3}%     }     \def\mytextcolor@b#1#2\nil#3{%       \textcolor{-#3}{\textbf{#1}}\textcolor{#3}{#2}\\     }     \def\mytextcolor#1#2{%       \if\relax\detokenize{#2}\relax\expandafter\agobble\fi       \mytextcolor@a#2 \nil{#1}%     }          \newcommand{\logo}[8]{%       \colorlet{border}{#1}       \colorlet{trunk}{#2}       \colorlet{leaf a}{#3}       \colorlet{leaf b}{#4}       % Question:       % Which tikz feature can I use in place of the following \rotatebox       % to avoid double rotation in the tikzpicture?     %  \rotatebox{#8}{%         % One rotation is here:         \begin{tikzpicture}[rotate=#8,font=\scriptsize\scshape]           \draw[border,line width=1ex,yshift=.3cm,             yscale=1.45,xscale=1.05,looseness=1.42]             (1,0) to [out=90, in=0] (0,1) to [out=180,in=90] (-1,0)             to [out=-90,in=-180] (0,-1) to [out=0, in=-90] (1,0) -- cycle;           \coordinate (root) [grow cyclic,rotate=90]             child {               child [line cap=round] foreach \a in {0,1} {                 child foreach \b in {0,1} {                   child foreach \c in {0,1} {                     child foreach \d in {0,1} {                     child foreach \leafcolor in {leaf a,leaf b}                       { edge from parent [color=\leafcolor,-#5] }                     }                   }                 }               }               edge from parent [shorten >=-1pt,serif cm-,line cap=butt]             };           % Another rotation here:           \node [rotate=#8,scale=1,align=center,below] at (0pt,-.5ex){%             \mytextcolor{#6}{#7}\\           };         \end{tikzpicture}     %  }     }     \makeatother          \begin{document}     \begin{minipage}[c]{\textwidth}     \centering     \logo{green!80!black}{green!25!black!75}{green}{green!80}{leaf}       {border}{Theoretical Computer Science}{45}     \logo{purple!80!black}{purple!25!black!75}{purple}{purple!80}{leaf}       {border}{Theoretical Computer Science}{45}     \end{minipage}     \end{document}      **EDIT** The "double rotation" spots are shown above. I want to indicate only one rotation for the entire figure, because my figure contains many other nodes. ![enter image description here](http://i.stack.imgur.com/Hxyk1.png) **EDIT** The environment _scope_ doesn't rotate the entire picture. Andrew Stacey has confirmed in the comments that this is indeed the case.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{mindmap,arrows}     \usepackage{graphicx}          \tikzset{       ld/.style={level distance=#1},lw/.style={line width=#1},       level 1/.style={ld=4.5mm, trunk, lw=1ex ,sibling angle=60},       level 2/.style={ld=3.5mm, trunk!80!leaf a,lw=.8ex,sibling angle=56},       level 3/.style={ld=2.75mm,trunk!60!leaf a,lw=.6ex,sibling angle=52},       level 4/.style={ld=2mm, trunk!40!leaf a,lw=.4ex,sibling angle=48},       level 5/.style={ld=1mm, trunk!20!leaf a,lw=.3ex,sibling angle=44},       level 6/.style={ld=1.75mm,leaf a, lw=.2ex,sibling angle=40},     }     \pgfarrowsdeclare{leaf}{leaf}{       \pgfarrowsleftextend{-2pt} \pgfarrowsrightextend{1pt}     }{       \pgfpathmoveto{\pgfpoint{-2pt}{0pt}}       \pgfpatharc{150}{30}{1.8pt}       \pgfpatharc{-30}{-150}{1.8pt}       \pgfusepathqfill     }          \makeatletter     \def\agobble#1\nil#2{}     \def\mytextcolor@a#1 #2\nil#3{%       \mytextcolor@b#1\nil{#3}       \if\relax\detokenize{#2}\relax\expandafter\agobble\fi       \mytextcolor@a#2\nil{#3}%     }     \def\mytextcolor@b#1#2\nil#3{%       \textcolor{-#3}{\textbf{#1}}\textcolor{#3}{#2}\\     }     \def\mytextcolor#1#2{%       \if\relax\detokenize{#2}\relax\expandafter\agobble\fi       \mytextcolor@a#2 \nil{#1}%     }          \newcommand{\logo}[8]{%       \colorlet{border}{#1}       \colorlet{trunk}{#2}       \colorlet{leaf a}{#3}       \colorlet{leaf b}{#4}     %  \rotatebox{#8}{%         \begin{tikzpicture}[font=\scriptsize\scshape]           \begin{scope}[rotate=#8]           \draw[border,line width=1ex,yshift=.3cm,             yscale=1.45,xscale=1.05,looseness=1.42]             (1,0) to [out=90, in=0] (0,1) to [out=180,in=90] (-1,0)             to [out=-90,in=-180] (0,-1) to [out=0, in=-90] (1,0) -- cycle;           \coordinate (root) [grow cyclic,rotate=90]             child {               child [line cap=round] foreach \a in {0,1} {                 child foreach \b in {0,1} {                   child foreach \c in {0,1} {                     child foreach \d in {0,1} {                     child foreach \leafcolor in {leaf a,leaf b}                       { edge from parent [color=\leafcolor,-#5] }                     }                   }                 }               }               edge from parent [shorten >=-1pt,serif cm-,line cap=butt]             };           \node [scale=1,align=center,below] at (0pt,-.5ex){%             \mytextcolor{#6}{#7}\\           };         \end{scope}         \end{tikzpicture}     %  }     }     \makeatother          \begin{document}     \begin{minipage}[c]{\textwidth}     \centering     \logo{green!80!black}{green!25!black!75}{green}{green!80}{leaf}       {border}{Theoretical Computer Science}{45}     \logo{purple!80!black}{purple!25!black!75}{purple}{purple!80}{leaf}       {border}{Theoretical Computer Science}{45}     \logo{purple!80!black}{purple!25!black!75}{purple}{purple!80}{leaf}       {border}{}{45}     \end{minipage}     \end{document}


title: Customize \ answerline in Exam class

text: I would like to create a quiz item that resembles this example:               ____ 1. (p. 63) In a grouped frequency distribution, the mode falls in the most         frequently occurring class interval, more specifically, at its           -  a. upper nominal limit      -  b. lower nominal limit      -  c. upper real limit      -  d. midpoint.      When using the Exam class, I am unable to insert an \answerline next to the question number. An example of my code follows:               \documentclass[12pt,answers]{exam}     \begin{document}     \begin{questions}     \question (p. 63) In a grouped frequency distribution, the mode falls in the most        frequently occurring class interval, more specifically, at its     \begin{choices}     \choice upper nominal limit     \choice lower nominal limit     \choice upper real limit     \choice midpoint     \end{choices}     \end{questions}     \end{document}


title: Space before chapters titles in ClassicThesis

text: I want to add some space before the chapters titles in `classicthesis` to get an effect like this thesis so I have modified the `classicthesis.sty` in this manner: * * *               % chapters     \ifthenelse{\boolean{@linedheaders}}%     {% lines above and below, number right     \titleformat{\chapter}[display]%                      {\relax}{\vspace*{0.125\textheight}{\raggedleft{\color{Maroon}\chapterNumber\thechapter} \\ }}{0pt}%         {\titlerule\vspace*{.9\baselineskip}\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%     }{% something like Bringhurst       \titleformat{\chapter}[display]%         {\relax}{\vspace*{0.25\textheight}{\mbox{}\oldmarginpar{\vspace*{-3\baselineskip}\color{Maroon}\chapterNumber\thechapter}}}{0pt}%         {\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]%      }      * * * I want to ask you if this is the right manner to put that space and if the space is put in the right quantity.


title: Make tikzpicture white on black

text: I have a simple gantt chart made using tikzpicture. How can I invert the whole thing so it is white on black? If I change the node lines to node[anchor=north west, text=white, fill=black] then this inverts just that cell. I would like the entire picture to be inverted. I wondered if something from Fitting background in Tikz could be used but I am not sure how to get it to work. Example of picture whose colours I would like to invert.               \documentclass[10pt,landscape]{standalone}          \setlength{\parskip}{3pt}          \usepackage[svgnames]{xcolor}     \usepackage{tikz}     \usepackage[a4paper,left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \usepackage{xspace}          \renewcommand{\rmdefault}{phv} % Arial     \renewcommand{\sfdefault}{phv} % Arial          \pagestyle{empty}          \begin{document}          \noindent \begin{tikzpicture}          \draw (0,14) node[anchor=north west] {{\bf text}};     \draw (0,13.5) node[anchor=north west] {text};     \draw (0,13) node[anchor=north west] {text};     \draw (0,12.5) node[anchor=north west] {text};     \draw (0,12) node[anchor=north west] {text};               \draw (0,1) node[anchor=north west] {{\bf Deliberately left blank}};          % bounding box     \draw[style=help lines] (11,0.5) rectangle (12.5,14);     \draw[style=help lines] (11.75,0.5) rectangle (13.25,14);     \draw[style=help lines] (14,0.5) rectangle (15.5,14);     \draw[style=help lines] (14.75,0.5) rectangle (16.25,14);     \draw[style=help lines] (17,0.5) rectangle (18.5,14);     \draw[style=help lines] (17.75,0.5) rectangle (19.25,14);     \draw[style=help lines] (20,0.5) rectangle (21.5,14);     \draw[style=help lines] (20.75,0.5) rectangle (22.25,14);     \draw[style=help lines] (23,0.5) rectangle (24.5,14);     \draw[style=help lines] (23.75,0.5) rectangle (25.25,14);          \draw[style=help lines] (0,14) -- (26,14);     \draw[style=help lines] (0,11) -- (26,11);     \draw[style=help lines] (0,7.5) -- (26,7.5);     \draw[style=help lines] (0,3.5) -- (26,3.5);     \draw[style=help lines] (0,1) -- (26,1);     \draw (11,0.5) rectangle (26,14);     \draw (14,0.5) rectangle (23,14);     \draw (17,0.5) rectangle (20,14);          \draw (12.5,14) node[anchor=south] {Year 1};     \draw (15.5,14) node[anchor=south] {Year 2};     \draw (18.5,14) node[anchor=south] {Year 3};     \draw (21.5,14) node[anchor=south] {Year 4};     \draw (24.5,14) node[anchor=south] {Year 5};          % blocks          \filldraw[fill=Silver] (11,13) rectangle (13.25,13.5);     \filldraw[fill=Silver] (11.75,12.5) rectangle (16.25,13);     \filldraw[fill=Silver] (14,12) rectangle (17.75,12.5);     \filldraw[fill=Silver] (15.5,11.5) rectangle (20,12);     %\filldraw[fill=Silver] (17,11) rectangle (17.75,11.5);          \filldraw[fill=Silver] (13.25,10) rectangle (16.25,10.5);     \filldraw[fill=Silver] (14.75,9.5) rectangle (18.5,10);     \filldraw[fill=Silver] (17,9) rectangle (20.75,9.5);     \filldraw[fill=Silver] (18.5,8.5) rectangle (22.25,9);     %\filldraw[fill=Silver] (20.75,8) rectangle (20,8.5);          \filldraw[fill=Silver] (14,6.5) rectangle (20,7);     \filldraw[fill=Silver] (19.25,6) rectangle (24.5,6.5);     \filldraw[fill=Silver] (15.5,5.5) rectangle (17.75,6);     \filldraw[fill=Silver] (17.75,5) rectangle (20, 5.5);     \filldraw[fill=Silver] (20,4.5) rectangle (22.25,5);     \filldraw[fill=Silver] (22.25,4) rectangle (24.5,4.5);          \filldraw[fill=Silver] (11,2.5) rectangle (13.25,3);     \filldraw[fill=Silver] (13.25,2) rectangle (15.5,2.5);     \filldraw[fill=Silver] (15.5,1.5) rectangle (24.5, 2);     \filldraw[fill=Silver] (17.75,1) rectangle (24.5,1.5);               \filldraw[fill=Silver] (24.5,0.5) rectangle (26,1);          \end{tikzpicture}          \end{document}


title: How to write a report template to match corporate design

text: I have the problem that I have to write scientific reports for a company. I would love to use LaTeX for this as I have some experience with it when I wrote my thesis. However the report needs to be styled in corporate design with the corporate logo placed on the first page and some special lines on every page. I have the measures for the layout but I do not know how to start customizing. Maybe writing a new class is the way to go. I also looked into the KOMA script letter class, maybe there is something possible based on this?


title: Load font from package directory using fontspec

text: I'm working on a LaTeX package (in fact it is a document class) that I want to make available for others to install in their texmf directory. In this package I'm setting up a default configuration for the \lstset command with a given font. If I for instance would like to use Droid Sans Mono as the font, the following command works if the font is installed on the system:               \newfontfamily\listingsfont[Scale=0.85]{Droid Sans Mono}     \lstset {         basicstyle=\footnotesize\listingsfont     }      However, if the font is not installed on the system, this would of course fail. Because of this, I would like to distribute the font together with the LaTeX package. I have tested the Path option of fontspec               \newfontfamily\listingsfont[Path=/home/username/texmf/tex/latex/mypackage/,Scale=0.85]{Droid Sans Mono}      which works perfectly fine, except that I would have to know the username beforehand. Is there a way to specifiy paths relative to my package in fontspec? Or to get the path to the home directory? (Most users of this package will use Ubuntu as their main OS).


title: Why is siunitx unable to typeset this mixed symbolic and numeric argument to \SI?

text: I'm using the MacTeX 2011 Distribution on OSX Lion (both with all updates installed) and I get a strange error from the `siunitx` package, that did not occur with MacTex 2010 on Snow Leopard. As a minimal example               \documentclass{article}     \usepackage{siunitx}     \sisetup{mode=text,per-mode=symbol,input-symbols={\pi\cdot}}     \begin{document}     \SI{2 \pi \cdot 10}{\kilo\hertz}     \end{document}      will fail to be typeset with the error `Missing $ inserted.`, whereas changing the `\SI` command to               \SI{2 \pi \cdot 1}{\kilo\hertz}      will be typeset with no errors. Can someone explain, why `siunitx` fails to parse the first command correctly?


title: RTL theorems with ntheorem and xetex have separator in wrong place

text: (This is a split-off from another RTL ntheorem issue.) When you have a theorem in RTL language text (e.g. Hebrew), using XeTeX+`polyglossia`(+`bidi`)+`ntheorem`, the theorem separator comes out before, rather than after, the theorem number:               \documentclass{article}     \usepackage{ntheorem}     \theoremseparator{:}     \newtheorem{theorem}{משפט}     \usepackage{polyglossia}     \setdefaultlanguage[numerals=arabic]{hebrew}     \newfontfamily\hebrewfont{David} % You may need David CLM          \begin{document}     \begin{theorem}     משפט מחוזי מאוד.     \end{theorem}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ODS5X.png) Same thing happens for a full-stop separator. Using MikTeX 2.9. Result of `\listfiles`:                *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     ntheorem.sty    2011/02/16 1.31       ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)     polyglossia.sty    2010/07/27 v1.2.0a Babel replacement for XeLaTeX     etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     makecmds.sty    2009/09/03 v1.0a extra command making commands     fontspec.sty    2011/02/26 v2.1f Advanced font selection for XeLaTeX/LuaLaTeX        expl3.sty    2011/06/19 v2478 L3 Experimental code bundle wrapper      l3names.sty    2011/06/19 v2478 L3 Experimental namespace for primitives     l3bootstrap.sty    2011/06/19 v2478 L3 Experimental bootstrap code         calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)     l3basics.sty    2011/07/04 v2493 L3 Experimental basic definitions      l3expan.sty    2011/06/20 v2480 L3 Experimental argument expansion         l3tl.sty    2011/07/09 v2498 L3 Experimental token lists        l3seq.sty    2011/06/19 v2478 L3 Experimental sequences and stacks        l3int.sty    2011/06/19 v2478 L3 Experimental integers      l3quark.sty    2011/06/19 v2478 L3 Experimental quarks        l3prg.sty    2011/07/06 v2495 L3 Experimental control structures      l3clist.sty    2011/07/09 v2498 L3 Experimental comma separated lists      l3token.sty    2011/07/02 v2491 L3 Experimental token manipulation       l3prop.sty    2011/06/19 v2478 L3 Experimental property lists        l3msg.sty    2011/06/19 v2478 L3 Experimental messages         l3io.sty    2011/06/19 v2478 L3 Experimental input-output operations       l3file.sty    2011/06/19 v2478 L3 Experimental file operations       l3skip.sty    2011/06/19 v2478 L3 Experimental dimensions and skips        l3box.sty    2011/06/19 v2478 L3 Experimental boxes     l3keyval.sty    2011/06/19 v2478 L3 Experimental key-value parsing       l3keys.sty    2011/06/19 v2478 L3 Experimental key-value interfaces         l3fp.sty    2011/06/19 v2478 L3 Experimental floating-point operations     l3luatex.sty    2011/06/19 v2478 L3 Experimental LuaTeX-specific functions       l3toks.sty    2011/06/19 v2478 L3 Experimental token registers       xparse.sty    2011/07/02 v2492 L3 Experimental document command parser      xkeyval.sty    2008/08/13 v2.6a package option processing (HA)      xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)     fontspec-patches.sty    2011/02/26 v2.1f Advanced font selection for XeLaTeX/Lu     aLaTeX     fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX      fontenc.sty       eu1enc.def    2010/05/27 v0.1h Experimental Unicode font encodings       eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern     xunicode.sty    2010/11/06 v0.96 provides access to latin accents and many othe     r characters in Unicode lower plane     fontspec.cfg     gloss-hebrew.ldf    polyglossia: module for hebrew         bidi.sty    2011/03/21 v1.1.6 <commit 145> Bidirectional typesetting in pla     in TeX and LaTeX        iftex.sty    2010/07/25 v0.2 Provides if(tex) conditional for PDFTeX, XeTeX,      and LuaTeX     loadingorder-bidi.def    2010/07/25 v0.5 making sure that bidi is the last pack     age loaded     xetex-bidi.def    2010/08/01 v0.8 bidi adaptations for XeTeX engine     footnote-xetex-bidi.def    2010/07/25 v0.5 bidi footnote macros for XeTeX engin     e     article-xetex-bidi.def    2010/07/25 v0.4 bidi adaptations for standard article      class for XeTeX engine     hebrewcal.sty    2008/07/01 v2.4 Hebrew calendar for polyglossia (adapted from      hebcal.sty in Babel)     cal-util.def     babel-hebrewalph.def    2010/03/02 Babel definitions for Hebrew numerals      Adapted from hebrew.ldf (2005/03/30 v2.3h)


title: How to change the opacity of PSTricks strokes?

text: I need to change the opacity of PSTricks strokes, is it possible to do this?


title: strange error with siunitx and sans serif font

text: After reinstalling my system, I'm getting a weird `"Parameters must be numbered consecutively."` error message when trying to use siunitx with a sans serif font. Here is a minimal example code:               \documentclass{article}     \renewcommand\familydefault{\sfdefault}     \usepackage{siunitx}     \begin{document}     test     \end{document}      I'm using Fedora 16 with a (non-full) Texlive 2011 installation, on my old system with Fedora 15 and a complete Texlive 2011 everything compiled fine. Also, the error doesn't occur when I remove the line with the font command. Complete pdflatex output:               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)     restricted \write18 enabled.     entering extended mode     (./PRGLBE_01.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, po     lish, german, ngerman, swissgerman, italian, ukenglish, usenglishmax, czech, du     tch, basque, slovak, catalan, portuguese, french, spanish, german-x-2011-07-01,     ngerman-x-2011-07-01, galician, loaded.     (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))     (/usr/share/texlive/texmf-dist/tex/latex/siunitx/siunitx.sty     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3names.sty     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty))     (/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty)     (/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)     (/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty     (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)     (/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))     (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty     (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)     (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg))     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3basics.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3expan.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3tl.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3seq.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3int.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3quark.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3prg.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3clist.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3token.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3prop.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3msg.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3io.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3file.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3skip.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3keys.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3fp.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3box.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3coffins.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3color.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3luatex.sty))     (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty     (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))     (/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty)     (/usr/share/texlive/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty     (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty))     (/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator.sty     (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)     (/usr/share/texlive/texmf-dist/tex/latex/beamer/translator/translator-language-     mappings.tex))) (./PRGLBE_01.aux)     (/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     ) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty))     (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty     (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty))     (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))     (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))     ! Parameters must be numbered consecutively.     <to be read again>                    ##     l.4 \begin{document}


title: `nowidow.sty` not found

text: I've been working on this for the last three hours and found no clue. This morning I found the blog Certificates with LaTeX and downloaded the tex file certificate.tex. When I compile this in my emacs I run into the following error report: > ERROR: LaTeX Error: File `nowidow.sty' not found I followed the instruction on this post: Where do I place my own .sty files, to make them available to all my .tex files? and put the `nowidow.sty` into the directory: `/usr/local/share/texmf/nowidow` But the error report still pops up. Did I put the file in the wrong directory or am I missing other important steps? Could anyone help me? My system is Ubuntu 12.04.


title: Wrap text around pseudocode

text: I use `algorithm`/`algorithmic` packages to write some pseudocode. The width of the box spans across the entire page and I was wondering if there is any way to constrain it (since the actual code doesn't exceed the mid of the page). Practically, I want to wrap text around my pseudocode. ps: I tried `wrapfig` package, but I had some problems. Would be also helpful if anyone could verify whether this approach works. Any ideas ?


title: Itemize text in a table

text: I have such a table:               \begin{table}[H]     \centering         \begin{tabular}{l|l}              Feature eines Signales   & Feature eines Bildes                \\ \hline\hline          Der Peak vom Spektral        &  Der Peak vom Spektral   \\          Der Peak von der Autokorrelation &  Die Größe des Bildes  \\               Die Amplitude eines Signals  & Der Durchschnitt der Lichtstärke \\          Nulldurchgang                & Die Fläche der Farbkomponente   \\ \hline         \end{tabular}         \caption{Die mögliche Features eines Signales und eines Bildes.\cite{kz4}}      \end{table}      How can I itemize text in both column?


title: How can I highlight an interactive GAP session just like so?

text: Suppose I want to typeset a screen session in some programming language (GAP in my case, but it could be Python, BASH, or something else with an interactive read prompt just as well). So on my screen, I might have something like this:               gap> for i in [1..10] do     >   Print(i, ":");     > od;     1:2:3:4:5:6:7:8:9:10:     gap> 2^10;     1024     gap> 1/0;     Error, Rational operations: <divisor> must not be zero     not in any function at line 5 of *stdin*     you can replace <divisor> via 'return <divisor>;'     brk> 2^10;     1024     brk>      That is, there is a command prompt `gap>`, after which the user enters a multi line input. After that comes a line of output, then another prompt `gap>`. This repeats, until a command triggers an error, at which point the prompt changes to `brk>`. I would like to use the `listings` package (or something else) to   1. color the prompts `gap>`, `>`, and `brk>`; say, blue and red;   2. highlight keywords like `for`, `do`, and `od`; say, by making them bold;   3. but _only_ highlight the keywords in lines starting with a prompt, hence not inside the output of my commands. The last point is the one that is causing me troubles. I couldn't figure out a way to do that. The result is often quite ugly when words like `and`, `not`, and `in` are highlighted as keywords in, e.g., an error message. Similar questions have been asked before, but of those I managed to find, none asked for exactly this, resp. got an answer that does what I want. For the record, here is the language definition I am using for now:               \lstdefinelanguage{GAP}{%         morekeywords=[2]{and,break,continue,do,elif,else,end,fail,false,fi,for,%             function,if,in,local,mod,not,od,or,rec,repeat,return,then,true,%             until,while},%         moredelim=[s][\color{blue}]{gap}{>},%         moredelim=[s][\color{red}]{brk}{>},%         %moredelim=*[l][\color{blue}]{gap>},%         %moredelim=*[l][\color{red}]{brk>},%         sensitive=true,%         morecomment=[l]\#,%         morestring=[b]',%         morestring=[b]",%         }%      PS: To illustrate what I want, consider this image showing how my example from above could look (in addition to what I described above, I also set all user inputs in italics): ![enter image description here](http://i.stack.imgur.com/zxTzB.png)


title: box the size of A containing B

text: A thing I'd often like to do is put in my document a box the size of some text A and containing some other text B. For instance, I have two `tikz` nodes, one containing $n$ and one containing $n+1$, and I want them to be the same size (but not larger than necessary, as I would get by specifying a `minimum width`). If I want the text B to be right- or left-aligned, I can do the trick with a combination of `phantom` and `mathrlap`/`mathllap`. However, if I want it to be centered, I don't see an easy way to do it. Is there a simple command in some package to do this? It looks like a common task. Minimal example: I want to alter the bounding box of $n$ so that the two circles are the same size (and $n$ is still centered in the circle).               \documentclass{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}      \node[circle,draw=black] (A) {$n$};      \node[circle,draw=black] (B) [right of=A] {$n+1$};     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/lPPrZ.png)


title: Simple mini frames under frame title beamer

text: I have a simple black beamer template for presentations that I often use. I would like to add some simple mini frame navigation to this, but the outer theme for mini frames adds in too much extra stuff (section names, etc). I want to add miniframe circles beneath the frametitle without any words or separation denoting section changes in the pdf. Just one circle per frame, centered in a thin line underneath the frametitle. But I do want to have sections in the pdf for general navigation when viewing the file. It would look something like this... ![enter image description here](http://i.stack.imgur.com/B7t3j.jpg) I looked into adapting the code from the outer theme "mini-frame" .sty, but it is beyond my skill. Here is my MWE:               \documentclass{beamer}     \setbeamertemplate{itemize items}[circle]     \setbeamercolor{itemize item}{fg=black}     \setbeamercolor{section in head/foot}{fg=white, bg=black}     \setbeamercolor{frametitle}{fg=white, bg=black}     \setbeamerfont{frametitle}{size=\small}     \setbeamertemplate{navigation symbols}{ }     \usefonttheme{serif}     \begin{document}               \section{Some Amazing Presentation}     \begin{frame}{MWE $\vert$ Some Amazing Presentation}     \begin{itemize}     \item This is a really amazing presentation, demonstrating a MWE     \item Very impressive     \end{itemize}     \end{frame}          \section{The Second Part}     \begin{frame}{MWE $\vert$ The Second Part}     \begin{itemize}     \item The second part of this presentation is even better     \item It was really worth waiting for     \end{itemize}     \end{frame}               \begin{frame}{MWE $\vert$ The Second Part}     \begin{itemize}     \item Lots of things to say     \item these things are interesting     \end{itemize}     \end{frame}               \begin{frame}{MWE $\vert$ The Second Part}     \begin{itemize}     \item blah blah blah     \item la la la     \end{itemize}     \end{frame}               \section{The End}     \begin{frame}{MWE $\vert$ The End}     \begin{itemize}     \item But the end is really the best part     \end{itemize}     \end{frame}               \end{document}


title: Bibliography entry containing <>

text: Using BibTeX, I'm trying to add a DOI `10.1002/(SICI)1097-0118(199902)30:2<71::AID-JGT1>3.0.CO;2-G` to my bibliography. However, the presence of the `<` and `>` characters causes problems. Is there a good way to add such a DOI? I'm using a bibliography style which has been processed with urlbst to support DOI and URL fields. My current workaround is to drop the DOI field. Instead I add a field > `url = {http://dx.doi.org/10.1002/(SICI)1097-0118(199902)30:2<71::AID- > JGT1>3.0.CO;2-G},` which seems to work, but it would be preferable to use the DOI directly.


title: PDF randomly does not show parts of the text without errors in compilation

text: I am writing my thesis with `pdflatex` and did not have any problems until now. When I compile my thesis I don't get any errors. However a part of a sentence is suddenly missing (so that a part of a line is just blank). I was trying to locate what the reason for this is, and it seems to be that if I remove one or two words in the last sentence of the paragraph (or somewhere else), the text looks fine. Does anyone have any idea why this is happening? All references are fine and everything compiled just fine yesterday. Today I added some minor corrections from my professor and this suddenly happened. If I compile the same paragraph separately with the same preamble, I don't get this problem. I attached two images, to illustrate the problem: Compiling in Document: ![Compiling in Document](http://i.stack.imgur.com/Ruc1H.png) Compiling Separately: ![enter image description here](http://i.stack.imgur.com/S5qnX.png) If a MWE example helps, I can do that, but obviously everything works, the text is just radomly missing... Here is a more or less minimal working example:               % % % % % % % % % % % % % % %     \documentclass[a4paper,     final,     12pt,     numbers=noendperiod,      BCOR=5.00mm,     bibliography=totoc,     listof=totoc]{scrreprt}               \usepackage[english]{babel}     \usepackage{tocbasic}     \usepackage{scrhack}     \usepackage[toc,page]{appendix}               \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}                         \usepackage[right]{eurosym}          % Font Encoding      \usepackage[T1]{fontenc}     \newcommand{\changefont}[3]{     \fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}                    \usepackage[utf8]{inputenc}               \usepackage{libertine}     \usepackage[scaled=.83]{beramono}     \usepackage[libertine]{newtxmath}     \DeclareMathSymbol{=}{\mathrel}{operators}{`=} % redefine math for chemmacros     %\usepackage{eulervm} % Math typing     \usepackage{microtype}                    \usepackage{csquotes}     \usepackage[backend=biber,style=chem-angew]{biblatex}     \addbibresource{acf.bib}               \usepackage{longtable}     \usepackage{graphicx}          % mehrere Spalten vereinigen     \usepackage{multirow}          % Better table layouts     \usepackage{booktabs,dcolumn}          % Paket für Zeilenabstand     \usepackage[onehalfspacing]{setspace}                    \usepackage{tabularx}                    \frenchspacing               % Mathematische Sachen     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amstext}     \usepackage{mathtools}     \usepackage{bm}     \usepackage{nicefrac}     \usepackage{braket}     \usepackage{environ}     \usepackage{tikz}     \usetikzlibrary{calc,arrows}     \usepackage{tabulary}     \usepackage{pdflscape}               \usepackage{graphicx}          \usepackage{siunitx}          \usepackage{xspace}                         %%\usepackage{overpic}     \newcommand{\pnmr}{\textsuperscript{31}P-NMR\xspace}     \newcommand{\phnmr}{\textsuperscript{31}P\{\textsuperscript{1}H\}-NMR\xspace}     \newcommand{\hnmr}{\textsuperscript{1}H-NMR\xspace}     \newcommand{\cnmr}{\textsuperscript{13}C-NMR\xspace}     \newcommand{\cnmrh}{\textsuperscript{13}C\{\textsuperscript{1}H\}-NMR\xspace}     \newcommand{\engl}{\textit{engl.}\xspace}     \newcommand{\etal}{\textit{et al.}\xspace}     \newcommand{\via}{\textit{via}\xspace}               \newcommand{\M}{[M]\textsuperscript{+}}     \newcommand{\MH}{[M+H]\textsuperscript{+}}          \newcommand{\superscript}[1]{\ensuremath{^{\textrm{#1}}}}     \newcommand{\subscript}[1]{\ensuremath{_{\textrm{#1}}}}          \usepackage[within=chapter]{newfloat}               \DeclareFloatingEnvironment[     fileext=los,     name=Scheme,     listname={List of Schemes},     ]{scheme}               \usepackage{caption}     \usepackage{subcaption}     \captionsetup{format=plain,     font=onehalfspacing,font=footnotesize}     \captionsetup[table]{belowskip=2ex}               \captionsetup[sub]{font+=footnotesize}               \usepackage{multicol}     \newcolumntype{.}{D{.}{.}{-1}}               \usepackage[version=3]{mhchem} % Formula subscripts using \ce{}     \usepackage{bpchem}     \usepackage{psfrag}     \usepackage[crop=off]{auto-pst-pdf} % Use EPS graphics with pdfLaTeX     \usepackage{xkeyval}     \usepackage{pst-pdf}     \usepackage{ifplatform}     \usepackage{chemnum}     \cmpdsetup{cmpd-style =\rmfamily, ref-style = \rmfamily}     \usepackage{chemgreek}                         \setkomafont{captionlabel}{\sffamily\bfseries}          \usepackage{lipsum}          % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %     % Automatic List of Abbreviations % % % % % % % % % % % % % %     % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %      \usepackage{nomencl}     \makenomenclature     \renewcommand*{\nomprefix}{}     \newcommand*{\nom}[2]{#1\nomenclature{#1}{#2}}     \renewcommand{\nomname}{Abbreviations}     \renewcommand{\nompreamble}{\markboth{\nomname}{\nomname}}     % % latex run, then use nomencl command, then run latex again          % % % % % % % %Header % %     \pagestyle{headings}     %\setcapindent{1.5em}          % % % % % % % % % % % % % % % % % % % % % % % % % %     %Hyperref % % % % % % % % % % % % % % % % % % % % %     % % % % % % % % % % % % % % % % % % % % % % % % % %          %\usepackage[linktocpage=true]{hyperref}     \usepackage[bookmarksnumbered,hyperfootnotes=false,breaklinks=true]{hyperref}     \hypersetup{colorlinks,                 citecolor=DarkGreen,                 linkcolor=black, %DarkBlue,                 urlcolor=black} % % Bestimme Farben von Hyperrefverweisen          \KOMAoptions{DIV=last}          \begin{document}          The structures of these PN ring systems have been extensively studied in the solid state     \via single crystal X\mbox{-}ray crystallography, where in a predominant number of cases     only the thermodynamically favoured \textit{cis} isomers can be observed.           \pnmr experiments on the other hand suggest that both \textit{cis} and \textit{trans}     species can be encountered in nearly equal amounts in solution.\supercite{Stahl2000}          Although there is a general consensus in the literature that the \textit{cis} isomer is      the more stable product, little is known about the reasons for this trend.          Low\mbox{-}level \textit{ab\mbox{ }initio} and semi\mbox{-}empirical calculations      presented by Haiduc and co-workers in 1994 provide insight into the source of puckering,          but fail to explain observed stabilities.\supercite{Silaghi-Dumitrescu1994}          Another related facet of cyclodiphosphazane chemistry that has received little attention     is the mechanism of ring inversion, where vertex inversion at the phosphorus, edge        inversion at the imino nitrogen and a sequence of cycloreversion and cycloaddition have          been proposed.\supercite{Chen1985,Wirringa1995,Silaghi-Dumitrescu1998,Schranz1999} %,                 \end{document}


title: problem with a beamer theme

text: I like a lot the beamer theme "Air" (you can find it by the link "Nice Air based template for Latex" at the page http://www.kde.org/kdeslides/ ). But sometimes, in a slide, my text is a little too long, and if I could withdraw the air-header.png on the top, it could be nice. So, can you help me please? In fact, I think that the best idea is to modify the `beamerthemeAir.sty`, with the part:               \setbeamertemplate{headline}     {       \pgfuseimage{air-header}       \vskip -1.95cm       \linethickness{0.0pt}            \framelatex{       \begin{beamercolorbox}[wd=\paperwidth,ht=0.3\beamer@headheight]{Title bar}         \usebeamerfont{section in head/foot}%         \insertsectionnavigationhorizontal{0pt}{\hskip0.22cm}{}%       \end{beamercolorbox}}            \framelatex{       \begin{beamercolorbox}[wd=\paperwidth,ht=0.7\beamer@headheight]{Title bar}       \end{beamercolorbox}}     }      becoming optional, for example, it could appear only when the slide has a title whith a `\frametitle`. If you don't know, please say it to me, I will delete this part from the `sty` file.


title: xelatex and pgfpages compatibility

text: I've just switched from pdflatex to xelatex for my lectures to take advantage of the `unicode-math` package so that I can change the colours of all my mathematics. When compiling the "handout" version last night, I found that it didn't work as I expected. I use the `pgfpages` package to produce the handout as a 4-up document (with a nice box round each frame) to save paper. But the page size in the resulting document was that of one slide, not a full a4 piece of paper. A little googling led me to a quick fix on tug:               \newlength\hackpaperwidth \hackpaperwidth210mm     \newlength\hackpaperheight \hackpaperheight297mm     \RequirePackage{everyshi}     \EveryShipout{%      \special{papersize=\the\hackpaperwidth,\the\hackpaperheight}}      with the comment (from the author): > Probably not the cleanest way of doing things, so if someone has a better > idea and/or can locate the bug exactly, comments welcome. There were no follow-up comments, but it was dated November 2008. In June 2009, there's a similar-looking problem on the xetex mailing list with this response: > That's a reported (and probably not fixed yet) problem in pgfpages. Use this > to tell pgfpages how to set page sizes in XeLaTeX: >   >   >     \renewcommand\pgfsetupphysicalpagesizes{% >         \pdfpagewidth\pgfphysicalwidth\pdfpageheight\pgfphysicalheight% >     } >   (These are (linked from) the top two hits on google for `xelatex pgfpages`). My _real_ question is: is this going to get fixed? But that's not a good tex.SE question. So my attempt to make it into a good question is: > The second of the above seems the better of the two. Is that the best way to > fix this problem? PS The MWE from the first linked post is still a suitable one:               \documentclass{beamer}     \usepackage{pgfpages}     \pgfpagesuselayout{2 on 1}[a4paper]     \begin{document}     \frame{\frametitle{A} foo}     \frame{\frametitle{B} bar}     \end{document}


title: Are the new math fonts being made new characters, or adaptation of existing work to OTF?

text: I just watched UK-TUG 2012 - TeX Gyre Math report, and it wasn't clear to me if the characters of existing fonts are being adapted to the OTF formats, or if all-new glyphs are being created. For example, one of the fonts being worked on is Times, via TeX Gyre Termes (Nimbus Roman No9 L). Are the new math characters brand new, or they adapted from some other source, such as mathptmx (URW Nimbus Roman)?


title: How to align continued/spilled line to part of the sentence

text: Is there any way to align the spilled over line to a particular part within the sentence I want to align the second line under MS Office....               \textbf{Software} --- MS Office Powerpoint, Software 1, Software 2, Software 3, Software 4, Software 5, Software 6, Software 7, etc. etc.      As of now, I am doing this:               \textbf{Software} --- MS Office Powerpoint, Software 1, Software 2, Software 3, Software 4,\\     \hspace{60pt}Software 5, Software 6, Software 7, etc. etc.


title: Using eledmac package to arrange footnotes by line number

text: I've got a question about formatting footnotes using eledmac. I'm trying to create a critical edition of a manuscript text using XeTeX, Memoir and `eledmac` and I would like the footnotes (`\Afootnote`) to be arranged according to the standard single column at the bottom of the page (`\footnormal{A}`). However, instead of listing the different footnotes belonging to the same line-number as separate individual row entries (with the repeated line-number in each instance), I'd like the footer to have ALL footnotes belonging to the same line to be listed as a single row entry, mutually separating them with an appropriate separator (semicolon or \hspace for instance) As an example of what it currently resembles for the following text (following lineation) --               \documentclass[10pt, a4paper,twoside]{memoir}     \usepackage{fontspec}     \usepackage[parapparatus]{eledmac}     \usepackage{eledpar}               \begin{document}     \beginnumbering     \pstart     \protect     \noindent     {\edtext{lorem}{\Afootnote{loreim A, lorieem B}}\\     \edtext{ipsum}{\Afootnote{ipsium A}} dolor sit \edtext{amet}{\Afootnote{amit B}}\\     \edtext{consectetuer}{\Afootnote{consectetor A}} adipiscing elit\\     sed diam nonummy}     \pend     \endnumbering     \end{document}       FOOTER                1 lorem ] loreim A, lorieem B      2 ipsum ] ipsium A      2 amet ] amit B      3 consectetuer ] consectetor A      What I'd like to have is -- FOOTER                1 lorem ] loreim A, lorieem B      2 ipsum ] ipsium A  \hspace{5pt}  amet ] amit B      3 consectetuer ] consectetor A      If anyone can help with this that would be super!


title: Errors of using column environment

text: Here is my Latex file:               \documentclass{beamer}     \title{Here is my Title}     \author{}     \date{}          \begin{document}          \begin{frame}     \begin{columns}[t] % contents are top vertically aligned     \begin{column}[5cm] % each column can also be its own environment     Contents of first column \\ split into two lines     \end{column}     \begin{column}[T]{5cm} % alternative top-align that's better for graphics Line 13     Contents of second column \\ split into two lines     \end{column}     \end{columns}     \end{frame} % Line 17          \end{document}      This is the output of compilation:               line 17: Missing number, treated as zero \end{frame}     line 17: Illegal unit of measure (pt inserted) \end{frame}     line 17: Missing number, treated as zero \end{frame}     line 17: Illegal unit of measure (pt inserted) \end{frame}     line 13:  This package is obsolete and no longer needed on input line 13. This package is obsolete and no longer needed     line 0:  Option `pdfpagelabels' is turned off(hyperref) because \thepage is undefined.     line 17: Overfull \hbox (33.76253pt too wide) in paragraph     line 17: Overfull \hbox (8.82085pt too wide) in paragraph     line 17: Overfull \hbox (17.76335pt too wide) in paragraph     line 17: Overfull \hbox (16.6075pt too wide) in paragraph     line 17: Overfull \hbox (20.01422pt too wide) in paragraph     line 17: Overfull \hbox (19.04083pt too wide) in paragraph     line 17: Overfull \hbox (17.70251pt too wide) in paragraph     line 17: Overfull \hbox (16.30333pt too wide) in paragraph     line 17: Overfull \hbox (19.95334pt too wide) in paragraph     line 17:  Font shape `OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted on input line 17. Font shape `OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted     line 0:  Size substitutions with differences(Font) up to 1.0pt have occurred.      If I remove the parts between `\begin{column}` and `\end{column}`, all will be fine. I wonder how I can fix the errors? Thanks and regards! * * * Update: After changing `\begin{column}[5cm]` to `\begin{column}{5cm}`, here is the new error               line 0: Emergency stop     line 13:  This package is obsolete and no longer needed on input line 13. This package is obsolete and no longer needed     line 0:  Option `pdfpagelabels' is turned off(hyperref) because \thepage is undefined.     line 17:  Font shape `OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted on input line 17. Font shape `OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted


title: Space between heading 'Contents' and the first line in ToC

text: The MWE is as follows:               \documentclass[12pt,letter]{report}          \usepackage[titles]{tocloft}          \usepackage[compact,tiny]{titlesec}          \begin{document}          \setcounter{tocdepth}{3}          \setlength\cftaftertoctitleskip{0pt}          \titlespacing*{\chapter}{0.00in}{0.48in}{5mm}     \titleformat{\chapter}[display]{\normalfont\normalsize\filcenter}{%       \centering\chaptertitlename\ \thechapter}{0pt}{\normalsize\uppercase}          \renewcommand{\contentsname}{TABLE OF CONTENTS}     \renewcommand{\cftchapfont}{\normalsize}     \renewcommand{\cftchappagefont}{\normalsize}     \renewcommand{\cftchapleader}{\normalsize\cftdotfill{\cftchapdotsep}}          \tableofcontents          \univchapter[first chapter]{first chapter}     some text     \univchapter[second chapter]{second chapter}     some more text     \end{document}      The definition of `\univchapter` is               \newcommand\univchapter{\if@openright\cleardoublepage\else\clearpage\fi                         \thispagestyle{plain}%                         \global\@topnum\z@                         \@afterindentfalse                         \secdef\@univchapter\@schapter}          \def\@univchapter[#1]#2{\ifnum \c@secnumdepth >\m@ne                              \refstepcounter{chapter}%                              \typeout{\@chapapp\space\thechapter.}%                              \addcontentsline{toc}{chapter}%                                        {\chaptername\, \protect\numberline{\thechapter} \uppercase{#1}}%                         \else                         \addcontentsline{toc}{chapter}{\chaptername\, \uppercase{#1}}%                         \fi                         \chaptermark{#1}%                         \addtocontents{lof}{\protect\addvspace{10\p@}}%                         \addtocontents{lot}{\protect\addvspace{10\p@}}%                         \if@twocolumn                           \@topnewpage[\@makechapterhead{#2}]%                         \else                           \@makechapterhead{#2}%                           \@afterheading                         \fi}      The error it generates while creating a MWE and also while executing the code with your suggestion is `Use of \@ doesnt match its definition. \univchapter...i\thispagestyle{plain}global \@t opnum\z@afterindentfal....`


title: formating document in latex

text: I want document in specific database schema style. Like in image. I have tried as much I can do, even I am facing issue.   1. Why access_log & group_id coming up with indentation (I want all line indented similar)   2. Why text exceeds the page width? I tried with `\usepackage[paperwidth=5.5in, paperheight=8.5in]{geometry}` , `\setlength{\textwidth}{6.5in}` but even text content exceed page wdith   3. In access_log, I want to create array as appearing in image. Is it possible?   4. Can I create title as it is `Users-schema` in image width black strip **Link to Source code with DEMo :** https://www.sharelatex.com/project/5374a2ebeb2b8d651828ef64?r=380e068e&rs=ps&rm=d Image: ![enter image description here](http://i.stack.imgur.com/otdyB.png)


title: I had a problem with spacing of tabular columns combined with \multicolumn. I found an inelegant solution. Perhaps someone knows of a better one?

text: Consider a table with several columns. Three consecutive columns are thin. These three thin columns have a long `\multicolumn{c}{3}{??}` heading over them. If nothing is done to specify how these should be spaced then the default behaviour is to make the first two columns as thin as they can be to accommodate the contents of the first two columns and the final column is made up to the size required to line up with the end of the heading. One solution, is to manually add space between columns using `@{}` or manually specify the width of columns using `p{??}` or `S[table-column-width=??]` (in the case of the `siunitx` package). I was hoping there would be some kind of automated solution, or that this could be a possible development project. It has occurred to me thought that in the more general case, where there might be multiple overlapping `\multicolumn` commands on different lines then this might range from awkward to impossible. Here is some code to produce a table with the problem (first) and a slightly awkward solution the problem that I implemented (second). I used the `siunitx` package to implement columns as I prefer the layout and it provides me with some more options.               \documentclass{article}     \usepackage{siunitx}     \usepackage{booktabs}               \begin{document}               \begin{table}        \centering     %  \sisetup{table-alignment=center,table-column-width=2.8cm}        \sisetup{table-alignment=center}        \begin{tabular}{ S S S S }        \toprule           \multicolumn{3}{c}{k-points in lattice vector and here's some more words} & \\           $\mathbf{a}$  &  $\mathbf{b}$  &  $\mathbf{c}$  &  {total k-points}\\        \midrule               1             &  1             &  1             &   1    \\               2             &  1             &  2             &   4    \\               3             &  2             &  3             &  18    \\               4             &  2             &  4             &  32    \\               5             &  3             &  5             &  75    \\               5             &  4             &  5             & 100    \\               6             &  4             &  6             & 144    \\               7             &  5             &  7             & 245    \\               8             &  6             &  8             & 384    \\              10             &  6             & 10             & 600    \\              10             &  8             & 10             & 800    \\           \bottomrule        \end{tabular}     \end{table}                                   \begin{table}        % try to determine correct column spacing for 3 thin columns under a long heading.        \def\tempHeading{k-points in lattice vector and here's some more words} % this is the heading        \newlength{\tempHeadingLen}                          % a length is a type of object and must be defined        \settowidth{\tempHeadingLen}{\tempHeading}           % get length of heading        \addtolength{\tempHeadingLen}{-4\tabcolsep}          % 2x2\tabcolsep betweeen columns        \setlength{\tempHeadingLen}{0.33333\tempHeadingLen} % divide by three. nice if this could be automated.     %        \centering        \sisetup{table-alignment=center}           \begin{tabular}{ S[table-column-width=\tempHeadingLen]                             S[table-column-width=\tempHeadingLen]                            S[table-column-width=\tempHeadingLen]                            S }           \toprule              \multicolumn{3}{c}{\tempHeading} & \\              $\mathbf{a}$  &  $\mathbf{b}$  &  $\mathbf{c}$  &  {total k-points}\\           \midrule                 1             &  1             &  1             &   1    \\                 2             &  1             &  2             &   4    \\                 3             &  2             &  3             &  18    \\                 4             &  2             &  4             &  32    \\                 5             &  3             &  5             &  75    \\                 5             &  4             &  5             & 100    \\                 6             &  4             &  6             & 144    \\                 7             &  5             &  7             & 245    \\                 8             &  6             &  8             & 384    \\                 10            &  6             & 10             & 600    \\                 10            &  8             & 10             & 800    \\           \bottomrule        \end{tabular}     \end{table}               \end{document}


title: Reduce vertical space between bars in pgfgantt

text: Is it possible to reduce the default vertical space between bars in pgfgantt? The manual specifies "last line height" but there appears to be no "line height" option.               \documentclass[a4paper,11pt]{article}     \usepackage{pgfgantt}     \begin{document}     \section{}               \begin{tikzpicture}[x=3cm, y=0.75cm]       \begin{ganttchart}[bar={fill=red!50}]{5}     \gantttitle{2012--2017}{5} \\     \gantttitlelist{1,...,5}{1} \\     \ganttbar{PhD1}{1}{3.5} \\     \ganttbar{PhD2}{2.5}{5} \\     \end{ganttchart}     \end{tikzpicture}     \end{document}


title: Defining multiple, similar macros

text: > **Possible Duplicate:**   >  Defining multiple shorthands quickly I am using               \def\Ac{\mathcal{A}}      However, I want similar macros like `\Bc`, `\Cc`, ... `\Zc`. Instead of defining them all manually, is there a simpler way to define all? * * * SOLUTION FOUND:               \usepackage{etoolbox}     \makeatletter     \def\do#1{\@namedef{#1c}{\ensuremath{\mathcal{#1}}}}     \docsvlist{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z}     \makeatother


title: Tab not as extra alignment tab

text: Is there a way to have LaTeX render the tabs in a tabular environment to determine the columns so that there is no further need for the ampersands & ? Most of the time the columns only contain a word and I already align them in the source code with tabs. So it would come in handy to be able to leave the & out.


title: TikZ: text along path as node

text: I'm using the decorations library to put bended text along a path. That works fine. However, I'd like to have the bended text as a node, so that I can later use it as a reference (for instance to draw a line to it). Is that possible? How do I define the nodes's name? Here you have a MWE:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{decorations.text}     \usetikzlibrary{decorations.pathmorphing}          \begin{document}          \begin{tikzpicture}          \node at (0,0) (nodeA) {A};     \node at (2,2) (nodeB) {B};          \draw (nodeA) -- (nodeB);          \draw [decoration={text along path,         text={path text},text align={center}},decorate]  (nodeA) -- (nodeB);              \node at (0,2) (nodeC) {C};         \draw [->] (nodeC) -- (.8,1.2);          \end{tikzpicture}          \end{document}      In the last bit, where a line is drawn from (nodeC) to the "path text", I had to use a coordinate, but I'd like to be able to use the a node reference. The picture looks like this: ![MWE result](http://i.stack.imgur.com/obzEO.png)


title: Font and typesetting of EGA by Numdam

text: I very much like the typesetting in Numdam's writeup of Éléments de géométrie algébrique. I find the font particularily pleasing, and the headers are nice as well. I've heard this is how it looked in the original release; I would like to snatch it. Does anyone know the name of the font, or does anyone have a general setup?


title: Colored text in table is floating

text: Currently I am trying to create a table in which one column contains colored text. However, the color differs per cell. See the example code below, where the last column contains the (possibly) colored text.                   % Works as it should         \begin{table}\centering\begin{tabular}{ccc}         \toprule            1 & 2 & {\color{red}3} \\         \bottomrule         \end{tabular}\end{table}              % Does not work well...         \begin{table}\centering\begin{tabular}{@{} p{2cm} p{2cm} p{2cm} p{2cm} p{2cm} @{}}         \toprule            Model & Parameter & BIC & $UD\text{max}F_T$ & Same?\\         \midrule            M1 & $\kappa_t^{(2)}$ & $\{43\}$ & $\{22, 50\}$ & {\color{red}No} \\         \bottomrule         \end{tabular}\end{table}      The problem with the second example is, in my case at least, that the text in the last column drops down, or seems to be put at a lower line. In the first example, the colored text is at the same line, though, as I would like it to be. Does anyone have an idea what is going wrong? Packages that I use are:                   tabularx, amsmath, amsfonts, amsthm, color      Your help is greatly appreciated!


title: Font installation working on Win/miktex but not Ubuntu/texlive

text: after researching and trying out many tipps here from online ressources (spending two days) I am about to give up - but still hope that maybe you might have some good idea. The task: I want to install the rotis font package. I've got both the font files themselves as well as the help files from CTAN following also the instructions included there (http://mirror.unl.edu/ctan/fonts/metrics/w-a- schmidt/pro.txt). Unfortunately the routine for TeX Live (2009) is not described, but I thought I found my way using different other ressources. What have I done/tried so far?   * Using kpsewhich TEXMFLOCAL / TEXMFHOME / pdftex.map etc to identify visible paths/locations.   * Copying all relevant files to their respective locations and TEXMFLOCAL   * I checked, that no local (`~/texmf` `~/.texmf-var` etc.) might interact   * texhash (many times)   * Using `updmap-sys --enable Map=pro.map`   * Checked whether the entries for the font are included in the pdftex.map file identified with kpsewhich -> the entries are there! Hopefully I have not forgotten anything. As I have a dual boot installation I tried the installation also under Windows / MikTeX 2.9 - I managed to install the fonts within one hour! Thus, using the exact same testfile that worked under miktex under TeXLive09/Ubuntu12.04 I got the following error:               (/usr/local/share/texmf/tex/latex/pro/t1pro.fd)     (/usr/local/share/texmf/tex/latex/pro/t1pr1.fd)      [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]      (./Fonttest1.aux) )     {/usr/share/texmf/fonts/enc/dvips/cm-super/cm-super-t1.enc}     {/usr/share/texmf-texlive/fonts/enc/dvips/base/8r.enc}          !pdfTeX error: pdflatex (file pr1r8a.pfb): cannot open Type 1 font file for reading      ==> Fatal error occurred, no output PDF file produced!      Thank you very much in advance for your help (and questions)!


title: TikZ - How can I draw a line through a point on a line, with the new line perpendicular to the old line?

text: I have a line `A-B` between two points and already a point `X` on `A-B`. Now I'd like to draw a line through `X` which then is perpendicular to `A-B`. How can I do this? Also: No other (directly related) points around the line are given, I only have `X` which is the product of the usage of `\path` and creating two intersecting paths. Hence I say I can't use code in replies to other related questions, at least I do not see how. ## Picture ![enter image description here](http://i.stack.imgur.com/cw2bZ.png) ## MWE               \documentclass{standalone}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}          \usepackage{     tikz,     xspace     }          \usetikzlibrary{     intersections,     calc     }          \begin{document}     \begin{tikzpicture}[font=\small]     \draw     (0,0) coordinate (A)     (1,1.435) coordinate (B)     (3,3) coordinate (C)     ;     \draw[thick] (A) rectangle (C);     \draw[thick] (A)--(B) node[pos=0.6] (x) {x};     \end{tikzpicture}     \end{document}


title: How to remove a period from middle initial in bst file

text: I have a question about manipulating a bst file to remove a period after a middle initial. Assume the following .bib file entry:               @BOOK{author1999book,     title = {Very Informative and Handsome Book},     publisher = {College Town, ST: College University Press},     year = {1999},     author = {First M. Last},     }      I've been working with the `apa.bst` file on some various hacks to create a bst file that speaks well with a particular journal. One of the things they demand is that middle initials do not have periods after them. Thus, their style for the bibliography section looks like: Last, First M (1999) _Very informative and handsome book_. College Town, ST: College University Press. I already modified the `apa.bst` file to address the other peculiarities of formatting (parentheses around the years, capitalization of titles). What's left is the issue of periods after middle initials. Now, I can get this by simply removing the period after the middle initial in the .bib file entry. What I would like to do, though, is find a way to do that in the *.bst file. Can I? The reason I ask is that several bst styles will actually include that period if it's _not_ there in the *.bib file. What I would like to do is get the bst file to remove the period from the middle initial if it _is_ there in the *.bib file. I didn't know if that was possible and, if so, how I could do it.


title: Putting frame only around equation using mdframed package

text: I am in the process of finalizing the notebook text, and I am into framing equations and figures. For this I am testing `mdframed` package, which produces nice frames. However, I don't know how to frame only equations, without framing equation numbers. Is that possible in `mdframed`?


title: Show only the last two year digits in Biblatex citation

text: I'm writing a piece where I'm citing several standards, for example               @STANDARD{en1990,       title = {EN 1990: Eurocode: Basis of Structural Design},       organization = {Comit\'e Europ\'een de Normalisation (CEN)},       address = {Brussels, Belgium},       year = {2002}     }      and               @STANDARD{aci318-63,       title = {ACI 318-63: Building Code Requirements for Reinforced Concrete},       organization = {American Concrete Institute (ACI)},       address = {Farmington Hills, Michigan, USA},       year = {1963}     }      I use `biblatex` with `style=authoryear`. I can cite the first one as `\parencite*[EN 1990:][]{en1990}`, which causes the citation to appear as `(EN 1990: 2002)` in running text, which is the way this standard is usually cited. However, this won't work for the second example, since this standard is styled as `ACI 318-63` and `\parencite*` will only produce the whole year instead of only the last digits. Is there a way to change the way the year is formatted for a certain citation? Even better, is there a way to override/modify the default citation text? I kind of suspect I'd need to create a custom style with an extra field that holds the formatted year as it should appear in the citation, but I hope there's an easy way to do it without spending too much time customizing `biblatex` styles.


title: Customized Numbering the diagrams

text: I'm creating PDFs with diagrams using latex and have no problem. Using the below, am getting all the diagrams numbered starting from 1 in sequence.               \documentclass[12pt, twocolumn, oneside]{extreport}     \usepackage[paperwidth=8.9in, paperheight=13.9in]{geometry}          \usepackage{pifont}     \usepackage{enumitem}     \usepackage[ps]{skak}     \usepackage{latexsym}          \newenvironment{changemargin}[2]{%     \begin{list}{}{%     \setlength{\topsep}{0pt}%     \setlength{\leftmargin}{#1}%     \setlength{\rightmargin}{#2}%     \setlength{\listparindent}{\parindent}%     \setlength{indent}{\parindent}%     \setlength{\parsep}{\parskip}%     }%     []}{\end{list}}          \font\logo=logo10     \font\sknf=SkakNew-Figurine     \font\sknfbx=SkakNew-FigurineBold     \font\skndia=SkakNew-DiagramT          \def\Metafont{\mbox{\logo METAFONT}}     \def\resetPgnTags{%       \def\WhitePlayer{}%       \def\BlackPlayer{}%       \def\WhiteElo{}%       \def\BlackElo{}%       \def\Result{}%       \def\Site{}%       \def\Round{}%       \def\Date{}%       \def\Eco{}}          \def\whiteWins{\mbox{1--0}}     \def\blackWins{\mbox{0--1}}     \def\aDraw{\mbox{1/2--1/2}}     \def\unclearResult{$\ast$}          \def\gameHeader{}%\Result{}}          \def\rwwins{{\bfseries\ \whiteWins}}     \def\rbwins{{\bfseries\ \blackWins}}     \def\rdraw{{\bfseries\ \aDraw}}     \def\runclear{\ \unclearResult}          \def\gameskip{}     \def\headerskip{}%\smallskip}     \frenchspacing          \usepackage{fancyhdr}     \pagestyle{fancy}          \chead{{\textsc{\textit{Author} - Testing}} }          \cfoot{}          \headheight = 18pt     \fancyheadoffset{50pt}          \marginparwidth = 0pt     \voffset = -40pt % altura header     \textheight = 860pt %580pt     \setlength{\columnsep}{2in}     \setlength{\columnseprule}{0.2pt}           \marginparwidth = 0pt          \def\resetPgnTags{%       \def\WhitePlayer{}%       \def\BlackPlayer{}%       \def\WhiteElo{}%       \def\BlackElo{}%       \def\Result{}%       \def\Site{}%       \def\Round{}%       \def\Date{}%       \def\Eco{}}          \def\whiteWins{\textbf\wdecisive}     \def\blackWins{\textbf\bdecisive}     \def\aDraw{\textbf\equal}     \def\unclearResult{$\ast$}          \largeboard     \showmoveron          \linespread{1}          \begin{document}     \begin{enumerate}[label=\huge\textbf{\arabic*},start=1]     \item      \item      \fenboard{5Q2/8/6q1/B2Bp1k1/P1N1Pp2/5K2/8/1N4q1 w - - 0 1}     \centerline{\showboard}     \item      \fenboard{r1b1k2r/ppppqppp/1bn2n2/4p1N1/2BPP3/1QP5/P4PPP/RNB2RK1 b kq - 0 1}     \centerline{\showboard}     \item      \fenboard{2r3k1/4qppp/1p3n2/pNrp4/P2Qn3/1P1RN1P1/4PPKP/R7 w - - 0 1}     \centerline{\showboard}     \item      \fenboard{8/2p3pk/r2p4/B6p/R1PpqP2/3b2PP/1Q3P2/6K1 b - - 0 1}     \centerline{\showboard}     \item      \fenboard{2b3rk/5pr1/1p1p1n2/p1pP1q1p/P1P2P1n/1QP3PP/4RN1K/2B3RB b - - 0 1}     \centerline{\showboard}          \end{enumerate}     \end{document}        But one special requirement is to label the diagrams with something like > 1,2,3A,3B,3C,4,5A,5B,5C,5D,5E,6,7A,7B etc.... is there any way I can customize diagram numbering? Thanks


title: How can I insert by .bib file into my .tex file?

text: After a lot of struggle, I was successful with using a .bib file for the references in my .tex file using the following 2 lines of code:               \bibliographystyle{abbrv}     \bibliography{parallel-stochastic-hmm}       Unfortunately, I just found out that I need to produce a single .tex file instead of using separate files. How do I insert the citations of my .bib file into my .tex file? Is there a special command for that?


title: chemmacros and dots

text: I am trying to write chemical equation with `\usepackage{chemmacros}` but I have a problem. I want something like that               $...Al + Fe_2O_3 \longrightarrow ...Fe + Al_2O_3$      The dots are for my students. When I write               \ch{..Fe{} + ...O2 -> Fe3O4}      it's a mess. Anybody have a solution?


title: tikzpicture "There is no ... in font nullfont", but no extraneous text

text: While looking at the log file of my document, I see a lot of paired error message lines that look like this (there might be slight inaccuracies, I am typing this on another computer for reasons I won't go into):               Missing character: There is no . in font nullfont!     Missing character: There is no 5 in font nullfont!      These occur together in pairs, always one that is a "." and one that is a "5", and always in that order. Generally there are a handful of them together in one place. From other questions I have gleaned that this error message generally occurs when extraneous text (i.e. text that is neither TikZ commands nor TeX comments) is entered inside a tikzpicture environment. The places in the log file that these errors appear do indeed appear to correspond to places where tikzpictures are found in my document. Moreover, bigger collections of them generally seem to correspond to bigger tikzpictures (in the sense of more TikZ code). However, as far as I can tell there is no extraneous text in my tikzpicture environments. In this question the questioner was unwittingly causing this sort of error by putting two `[]`-delimited sets of options in the same place, but I do not think that is what is happening here. I can try to put together an example file later today, if that would be helpful. I say "try" because I don't know for certain that I'll be able to create another, sufficiently small document that exhibits the same behaviour (the document whose log file displays this issue is too large for posting it here, inline, to be practical.) # Update It turns out this has something to do with code that was generously written for me by another TeX/LaTeX Stack Exchange user, in response to another question I asked. As such, this is slightly embarrassing, because it makes me look somewhat ungrateful if I point out defects (if indeed that is what this is) in something someone gave me for free. But I didn't know that's what was going wrong before I asked the question. I'd be interested to know what is going wrong though. Anyway, if you compile the below example document (taken without modification from Qrrbrbirlbel's answer to the linked question) and look at the log afterwards, you will see these lines:               Missing character: There is no . in font nullfont!     Missing character: There is no 0 in font nullfont!     Missing character: There is no . in font nullfont!     Missing character: There is no 0 in font nullfont!     Missing character: There is no . in font nullfont!     Missing character: There is no 0 in font nullfont!     Missing character: There is no . in font nullfont!     Missing character: There is no 0 in font nullfont!      (Why is it a 0 instead of a 5 this time? I don't know.)               \documentclass[tikz,border=2pt]{standalone}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}          \makeatletter     \tikzset{nomorepostaction/.code = \let\tikz@postactions\pgfutil@empty}     \def\pgf@arrowset#1#2{%       \pgfutil@ifundefined{pgf@arrow@code@#2}       {\PackageError{pgf}{Arrow #1 type ``#2'' unknown}{}}       {%         \edef\pgf@arrow@temp{#2}%         \ifx\pgf@arrow@temp\pgfutil@empty% ah. clear!           \expandafter\let\csname pgf@#1arrow\endcsname=\pgfutil@empty%           \expandafter\let\csname pgf@shorten@#1\endcsname=\pgfutil@empty%         \else%           %\pgf@arrow@prepare{#2}%           \expandafter\def\csname pgf@#1arrow\endcsname{\multiply\pgflinewidth by \pgflinewidth@arrow\relax\pgf@arrow@call{#2}}%           \expandafter\edef\csname pgf@shorten@#1\endcsname{\multiply\pgflinewidth by \noexpand\pgflinewidth@arrow\relax\expandafter\noexpand\csname pgf@arrow@right@#2\endcsname}%         \fi%       }%     }     \tikzset{         bigdiagramarrow/.style = {             -latex,             arrow thick         },         arrow line width/.code={             \pgfmathsetmacro\pgflinewidth@arrow{#1}         },         arrow line width=1,         arrow ultra thin/.style={arrow line width=0.25},         arrow very thin/.style={arrow line width=0.5},         arrow thin/.style={arrow line width=1},         arrow semithick/.style={arrow line width=1.5},         arrow thick/.style={arrow line width=2},         arrow very thick/.style={arrow line width=3},         arrow ultra thick/.style={arrow line width=4},     }     \makeatother     \begin{document}         \begin{tikzpicture}             \node [draw] (A) at (0, 0) {$A$};             \node [draw] (B) at (0, 1) {$B$};             \node [draw] (C) at (2, 1) {$C$};             \draw [bigdiagramarrow] (A) to (B);             \draw [out = 0, in = 180][bigdiagramarrow] (A) to (C);         \end{tikzpicture}     \end{document}


title: How do I refer to a line of code from a C file?

text: I have a source code listing in my appendix. I have added it like this:               \lstinputlisting[language=C]{Appendix/tcas/tcas.c}      I want to refer a line, e.g., line 72, from this file. How do I do this ? Can I refer to this line from a different section ?


title: How can I typeset this accented, dotless i?

text: ![Accent of the letter 'i'](http://i.stack.imgur.com/jP09x.png) See the rough sketch above. I am able to typeset the accented _i_ shown in the middle (for which I used the `\v` macro) and, obviously, the plain and simple _i_ shown on the left also. However, I can't figure out how to typeset the one shown on the right. How can I do that?


title: Line break in list in indented theorem

text: I'm trying to make an indented theorem environment as in A theoremstyle with complete indentation using amsthm. Here's a minimal (non-)working example:               \documentclass{article}     \usepackage{amsthm}     \usepackage[english]{babel}     \usepackage{blindtext}          \makeatletter       \newtheoremstyle{indent}       {3pt}% space before       {3pt}% space after       {         \setlength{\leftskip}{2.5em}         \setlength{\rightskip}{2.5em}         \addtolength{\@totalleftmargin}{2.5em}       }% body font       {}% indent       {\bfseries}% header font       {.}% punctuation       {.5em}% after theorem header       {}% header specification (empty for default)     \makeatother     \theoremstyle{indent}\newtheorem{theorem}{Theorem}          \begin{document}          \blindtext          \begin{theorem}[correct spacing]     \blindtext     \begin{itemize}     \item This is ok.     \item \blindtext     \end{itemize}     \end{theorem}          \end{document}      Whether or not I add that extra rightskip, my problem is that as soon as an item in a list within my theorem gets longer than one line (as in the third blindtext) it extends over the original right margin of the page, a case not considered in the original post. Any suggestions?


title: Weird message on dvi mode

text: I am getting the following message when I visualize in dvi mode:               MiKTeX Problem Report     Message: Some PostScript specials could not be rendered.     Data: Error: /undefined in H.S     Operand stack:        --nostringval--   PermitFileReading   --nostringval--   PermitFileWriting   --nostringval--     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1914   1   3   %oparray_pop   1913   1   3   %oparray_pop   1897   1   3   %oparray_pop   1787   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--     Dictionary stack:        --dict:1166/1684(ro)(G)--   --dict:0/20(G)--   --dict:80/200(L)--   --dict:95/300(L)--   --dict:17/200(L)--     Current allocation mode is local     MiKTeX GPL Ghostscript  9.00: Unrecoverable error, exit code 1          Source: Libraries\MiKTeX\Dvi\Ghostscript.cpp     Line: 372     MiKTeX: 2.9     OS: Microsoft Windows 8 Business Edition, 64-bit (build 9200)     Invokers: explorer/TeXnicCenter     SystemAdmin: no     PowerUser: no     Root0: C:\Users\acb\AppData\Roaming\MiKTeX\2.9     Root1: C:\Users\acb\AppData\Local\MiKTeX\2.9     Root2: C:\ProgramData\MiKTeX\2.9     Root3: C:\Program Files\MiKTeX     UserInstall: C:\Users\acb\AppData\Roaming\MiKTeX\2.9     UserConfig: C:\Users\acb\AppData\Roaming\MiKTeX\2.9     UserData: C:\Users\acb\AppData\Local\MiKTeX\2.9     CommonInstall: C:\Program Files\MiKTeX     CommonConfig: C:\ProgramData\MiKTeX\2.9     CommonData: C:\ProgramData\MiKTeX\2.9        What does it mean?


title: Literature with Biber generates strange citations: firstnames appear erratically

text: I had been using bibtex and then biblatex for quite some time. For the newest edition of my book I moved to biber. I happened t notice that firstnames are sometimes generated and sometimes not. Has this been observed by others? I have tried to make a minimal example but without success. Using the following code, which shows all the commands related to biblatex I have in my preamble I could not get the firstnames to be shown. Even with the stylefile I made for this book (second line) the error did not occur. I have a dropbox with the latex files for the book available. I can give access to these. What do you propose?               \documentclass[fontsize=10pt,twoside]{scrbook}     \usepackage{hormonbuch}     \usepackage[%       style=authoryear%       ,natbib=true%       ,sorting=nyt,backend=biber,doi=false,isbn=false,url=false]{biblatex}     \addbibresource{../Literatur/EndokrinologieKundeNourl.bib}          \renewcommand*{\bibpagespunct}{\addcolon}     \DeclareFieldFormat{pages}{#1}          \renewrobustcmd*{\enquote}{}          \renewbibmacro{in:}{%       Herbert Voss auf http://tex.stackexchange.com/questions/10682/suppress-in-biblatex       \ifentrytype{article}{}{%       \printtext{\bibstring{in}\intitlepunct}}}          \renewbibmacro*{journal+issuetitle}{%       \usebibmacro{journal}%       \setunit*{\addspace}%       \iffieldundef{series}         {}         {\newunit          \printfield{series}%          \setunit{\addspace}}%       \usebibmacro{volume+number+eid}%     %  \setunit{\addspace}%       \newunit}          \renewbibmacro*{volume+number+eid}{%       \printfield{volume}%     %  \setunit{\addcolon\space}%       }%     %     \renewbibmacro*{note+pages}{%       \printfield{pages}%       \newunit}     %     \begin{document}          \citet{CRT+88,FDe+85}     \citep{CRT+88,FDe+85}     \cite{CRT+88,FDe+85}      \printbibliography          \end{document}


title: How to make scrlttr2 look like letter

text: I need to put a subject line in a letter so after looking around most suggestions seem to point towards using the document class `scrlttr2` instead of `letter` since it is much more flexible. However, the look of the letter when I change to `scrlttr2` becomes totally messed up from the simple `letter` format I prefer. More specifically:   1. The from address is moved to the top left instead of the right over the date.   2. OMR markers introduced on the left of the page.   3. A separate underlined from address added on the top with a different font.   4. The indentation and paragraphing is really ugly. It indents new paragraphs instead of putting whitespace. (While this is OK for a normal document, its totally ugly for a letter)    5. While the normal `letter` style allowed me to leave the address of the recipient empty like this `\begin{letter}{}`, I am forced to put something in `scrlttr2` even if I don't want to put anything. (If I leave it empty or just put a space it gives a very cryptic error `Line 0: There's no line end here` even if its not on line 0.) Is there anyway I can make it look like the `letter`style? I am just going through this to add a subject line, so if there's a simpler way it would be equally good. **UPDATE** The output from `scrlttr2` when I use `\KOMAoptions{foldmarks=off,backaddress=false,fromalign=right}` is now as follows: ![enter image description here](http://i.stack.imgur.com/LnaP0.jpg) This is because it is inserted in the page header rather than the page content. I need it to look at least as it is generated by `letter` as follows: ![enter image description here](http://i.stack.imgur.com/JMzuM.jpg) The best thing would be if it is also right aligned, but if I manage to get it like `letter` it should be enough.


title: Using tikzpictures as symbols in glossaries

text: In a text, I'm using a `tikzpicture` as a math symbol. I'd like to reference this symbol in a glossary. It seems to me that makeindex doesn't know how to draw the picture. Here's an example.               \documentclass[12pt]{scrbook}          \usepackage{a4wide}     \usepackage{tikz}     \usepackage[toc, section, numberline]{glossaries}          \newcommand{\Plus}{\mathord{     \begin{tikzpicture}[baseline=0ex, line width=1, scale=0.13]     \draw (1,0) -- (1,2);     \draw (0,1) -- (2,1);     \end{tikzpicture}}}          \makeglossaries          \newglossaryentry{gls:Plus}{name={\ensuremath{\Plus}},description=\nopostdesc} % Does not work; change \Plus to, e.g., + else to compile.          \begin{document}     $A \gls{gls:Plus} B$          $A \Plus B$     \printglossary[type=main, style=list, nonumberlist=false]     \end{document}


title: Subtitle in IEEE document class

text: How can I add a subtitle to my Latex document using the IEEETran document class? I would like to know if it is possible to use a built-in command that gives me the regular title in addition to a subtitle written in a slightly smaller font? I found this question related to it, where they recommend to use a title page, but this does not seem to fit my needs. Also, I looked in the documentation for the IEEETran class but was unable to find it there.


title: How to write “Java” in LaTeX

text: How can I write "Java" in LaTeX so that the output looks as it is typeset on https://www.java.com/en/ (image below). For example `\textsc{Java}` doesn't look good. The image uses white text on red background, but it should just be normal black text. ![Java typeset](http://i.stack.imgur.com/0IlXt.png)


title: latex2html - Omit buttons and doc info; don't separate sections;

text: Wonder whether this is an ubuntu question or a latex question: I am trying to output my LaTeXed cv in HTML format, using `latex2html` - probably the easiest way. Here are the TeX and the HTML files. My objective is this: I want to get rid of "About this Document" section and the navigation buttons. Also need to keep it as a single document with all sections with contents appearing one after another.


title: skipbelow does not work for combination of mdframed and thmtools

text: I am trying to alter the space below a theorem box, which is created using thmtools and mdframed.               \documentclass{scrartcl} %     %     \usepackage{amsthm}     \usepackage{thmtools}     \usepackage{mdframed}     %     \declaretheoremstyle[ %         mdframed={ %             skipbelow=50pt, %             skipabove=50pt, %         } %     ]{myStyle} %     \declaretheorem[style=myStyle]{example} %     %     \begin{document} %         text         \begin{example} %             text         \end{example} %         text     \end{document} %      Adding space above works, adding space below does not.


title: Where to put \renewcommand in Beamer

text: This question is related to Setting default overlay specification for itemize environment. In the above-linked question, Werner provided a solution that uses `\LetLtxMacro` and `\renewcommand`. However, `\renewcommand` must be put _after_ `\begin{document}`. Interestingly, using `\AtBeginDocument{\renewcommand...}` in the preamble won't work either. Renewing the `\alert` command, in contrast, works regardless of where it's issued. # Questions   * Why does `\renewcommand\itemize...` need to be put after `\begin{document}` while `\renewcommand\alert...` doesn't?   * Why does `\AtBeginDocument{\renewcommand\itemize...}` not work, while it works for renewing `\alert`? # MWE               \documentclass{beamer}     \usepackage{letltxmacro}     \LetLtxMacro\olditemize\itemize          % \renewcommand{\itemize}[1][<+(1)->]{\olditemize[#1]} % doesn't work     % \AtBeginDocument{\renewcommand{\itemize}[1][<+(1)->]{\olditemize[#1]}} % doesn't work          \AtBeginDocument{\renewcommand\alert[1]{\textcolor{blue}{#1}}} % works     % \renewcommand\alert[1]{\textcolor{blue}{#1}} % works          \begin{document}     % Update itemize to have a default overlay     \renewcommand{\itemize}[1][<+(1)->]{\olditemize[#1]} % works          % \renewcommand\alert[1]{\textcolor{blue}{#1}} % works          \begin{frame}     Some question ...          (a) Part a of question      \begin{itemize}       \item Step 1 of \alert{solution}       \item Step 2 of solution     \end{itemize}          (b) Part b of question     \begin{itemize}       \item Step 1 of solution       \item Step 2 of solution     \end{itemize}     \end{frame}          \end{document}


title: Design of an asteroid belt in TikZ

text: How can I construct an asteroid belt in TikZ? That is my question: I get everything right, but I do not know how to make the asteroid belt. I have no code to add besides the preamble with TikZ package since I don't know where to start. ![enter image description here](http://i.stack.imgur.com/W9QzX.jpg)


title: Confusing behavior of uput with non-zero dimensional object

text: I really don't understand the behavior of `\uput` with non-zero dimensional object as illustrated below. ![enter image description here](http://i.stack.imgur.com/ulS4U.gif)               \documentclass[pstricks,border=12pt]{standalone}      \usepackage{multido}           \def\NonZeroDimenObject{%         \pspicture(2,2)             \psframe(2,1)         \endpspicture}          \begin{document}           \multido{\i=0+30}{12}{%     \begin{pspicture}[showgrid](8,8)         \pscircle(4,4){1.414}         \rput(4,4){$\i^\circ$}         \uput{1.414}[\i]{0}(4,4){\NonZeroDimenObject}     \end{pspicture}}          \end{document}      Which point on the frame should be used as a reference to understand how `\uput` works? ## Edit: In other words, which points on the frame or inside the frame or outside the frame move with a circular trajectory?


title: Does italic math originate from TeX?

text: When I look in old mathematical textbooks from the seventies and before, mathematics is always upright. Their use of italic letters in other contexts, however, shows that this is not because of technical limits. On the other hand, all textbooks I have seen with italic math look very TeX-like. So I was wondering if this is a coincidence? could italic math be an invention by Knuth introduced in TeX? Does someone know the history of italic math?


title: Random Greek Symbols appears in pdf generated by LaTeX

text: I use Texmaker. Once the `.pdf` file is generated by LaTeX, I notice that there are several greek symbols (mostly Sigma) in random places. Does any one know the reason? (My code does not contain these characters.)


title: Command for special text with reserved LaTeX symbols

text: Surely I am missing something here, but I can't remember =(. I want to build a command that accepts special LaTeX symbols and correctly display them. As special I mean `\`, `_`, or some others, and respect spaces, page/line breaks. The special text can be in `\rmfamily` or `\ttfamily` and no hyphenation is desirable.               \documentclass{article}          \newcommand{\specialtext}{\ttfamily #1}          \begin{document}          \specialtext{This a special text with \ # _}          \end{document}


title: Unable to generate pdf

text: I use TeXnicCenter and get the following error window after I try to compile ![enter image description here](http://i.stack.imgur.com/F4GkP.png) Even TexMaker is unable to create the pdf file. No error is detected in the window below after compilation.


title: Create a banner for section style

text: I am wondering if there is any way to change the default style for sections. I would like to create a banner (across the page) with a dark-gray background and the section title in white. It would be great if I can also put two black bold lines on the top and bottom edge of the banner. I saw someone use TikZ to style the section but I am not familiar with that; is there any other package that can do that for me?


title: Typesetting characters across several rows in a table

text: You will see in the following example there are curly brackets that span two rows of this table: ![enter image description here](http://i.stack.imgur.com/38o7B.png) Is there a way to generate this kind of typesetting in the basic table environment?


title: Chemfig - Proper Vertical Aligning in Chemical Reactions

text: I have the following chemical equation in Chemfigs:               \documentclass{article}     \usepackage{chemfig,chemmacros}     \begin{document}          \schemestart     2     \chemfig{-[:30](=[:90]O)-[:-30]OH}     \arrow     \chemfig{-[:30](=[:90]O)-[:-30]} + \ch{CO_2} + \ch{H_2O}     \schemestop          \end{document}      The problem is I can't get the proper vertical alignment with this code. How can alignment be achieved in Chemfig package?


title: Installing the fourier package to TeXLive 2012/Debian Ubuntu 12.04 LTS

text: I installed TeXLive from TUG 2 months ago and I just updated the packages. I'm trying to use the fourier package, but the terminal says it's missing. I was told that TeXLive should contain the fourier package by default. But after updating and rerunning pdflatex I got the same error which is fourier.sty could not be found. I tried to install it manually. But I can't add the package and extract it to the directory of TexLive.


title: How to create vertical and horizontal dotted lines in a matrix?

text: Similar to this question, I am trying to output a similar matrix with dotted line instead of dashed line. ![enter image description here](http://i.stack.imgur.com/feos5.png)   1. Is there anyway to do this?   2. I also try to use these three packages:              \usepackage{tabularx}     \usepackage{longtable}     \usepackage{arydshln}        3. I also like to learn how to implement this in **\documentclass{revtex4}** , in addition to using in **\documentclass{article}**. As far as we know that arydshln may not be compatible with revtex4 or revtex4-1 as far as I tried. I encounter a problem like this post. And I add `arydshln` after the `tabularx`; but it cannot compile successfully, but only output errors. Could someone offer any hints or some resolutions? The answer needs not to be complete. Thank you for your help!!!


title: Book style used in Concrete Mathematics

text: Does anyone know what style is used in Dr. Knuth's Concrete Mathematics? I'm hoping to use it for my dissertation. I know that they use the concrete and Euler fonts, but with regards Chapter formatting etc. are they using anything other than the standard book style?


title: Problems with siunitx package?

text: Once I use the `siunitx` package, this error message prompts: > >     ! File ended while scanning use of > \__siunitx_table_rewrite_create_aux:w. >       <inserted text> >       \par >       <*> paper.tex >       I suspect you have forgotten a `}', causing me >       to read past where you wanted me to stop. >       I'll try to recover; but if the error is serious, >       you'd better type `E' or `X' now and fix your file. >       ! Emergency stop. >       <*> paper.tex >       *** (job aborted, no legal \end found) >       Here is how much of TeX's memory you used: >       21553 strings out of 494045 >       422667 string characters out of 3148364 >       448797 words of memory out of 3000000 >       24480 multiletter control sequences out of 15000+200000 >       91950 words of font info for 94 fonts, out of 3000000 for 9000 >       715 hyphenation exceptions out of 8191 >       56i,1n,55p,726b,104s stack positions out of > 5000i,500n,10000p,200000b,50000s >       ! ==> Fatal error occurred, no output PDF file produced! >   **Here is my MWE.**               \documentclass[conference]{IEEEtran}               \usepackage{natbib} % for the bibliography     \usepackage{graphicx}     \usepackage[cmex10]{amsmath} % http://www.ctan.org/tex-archive/macros/latex/required/amslatex/math/     \usepackage{amsfonts}     \usepackage{bm}     \usepackage{array} % http://www.ctan.org/tex-archive/macros/latex/required/tools/     \usepackage{mdwmath}     \usepackage{mdwtab} % http://www.ctan.org/tex-archive/macros/latex/contrib/mdwtools/     \usepackage{eqparbox} % http://www.ctan.org/tex-archive/macros/latex/contrib/eqparbox/     \usepackage[T1]{fontenc}     \usepackage[caption=false]{subfig} % http://www.ctan.org/tex-archive/obsolete/macros/latex/contrib/subfigure/     \usepackage{fixltx2e} % http://www.ctan.org/tex-archive/macros/latex/base/     \usepackage{stfloats} % http://www.ctan.org/tex-archive/macros/latex/contrib/sttools/     \usepackage{url} % http://www.ctan.org/tex-archive/macros/latex/contrib/misc/     \usepackage{siunitx}     % for TikZ drawing     \usepackage{tikz}     \usetikzlibrary{backgrounds, calc, positioning, fit}     \usepackage{color}     % for figure inclusion     \usepackage{pdfpages}     % for pseudocode     \usepackage{algorithmicx}     \usepackage{algorithm} % http://ctan.org/pkg/algorithms     \usepackage{algpseudocode} % http://ctan.org/pkg/algorithmicx     \algnewcommand\algorithmicinput{\textbf{INPUT: }}     \algnewcommand\Input{\item[\algorithmicinput]}     \algnewcommand\algorithmicoutput{\textbf{OUTPUT: }}     \algnewcommand\Output{\item[\algorithmicoutput]}          \begin{document}          \title{Title}          \author{     \IEEEauthorblockN{         Name1\IEEEauthorrefmark{1},         Name2\IEEEauthorrefmark{2},         Name3\IEEEauthorrefmark{3} and         Name4\IEEEauthorrefmark{4}}     \IEEEauthorblockA{\IEEEauthorrefmark{1}institute1\\ Email1}     \IEEEauthorblockA{\IEEEauthorrefmark{2}institute2\\ Email2}     }          holding assumption     HD algorithm     \SI{42.122}{\micro\tesla}     \footnote{National Geophysical Data Center http://www.ngdc.noaa.gov/geomag-web}          \end{document}


title: How to increase TeX memory for LaTeX in TeX Live on Windows?

text: How to increase TeX memory for (pdf)LaTeX in TeX Live on windows (7)? I found a lot of usefull instructions to increase the TeX memory on linux systems or with MikTeX on Windows, but I still miss a recipe as a kind of step by step instruction for the procedure in TeX Live under Windows.