title: What is the difference between \empty and \@empty?

text: I want to elaborate a command that would print differently simple differential `dx` and multidimensional differential `d^3x`. For this purpose I invented the command `\dif` with one optional argument. It is defined as follows:               \newcommand{\dif}[1][]{%         \def\@tmp@a{#1}%         \ifx\@tmp@a\@empty             [b1]\mathrm{d}         \else             [b2]\mathrm{d}^{#1}{} \!         \fi     }      Here [b1] and [b2] are added for debugging. Branch [b1] is intended for the case when the command is called without any argument, e.g. `\dif{x}`. Second branch [b2] should be taken in case where, e.g., the command `\dif[3]{x}` is used to print `d^3x`. The definition, shown above, seems to work fine. However, if `\@empty` is substituted with `\empty` first branch is always ignored. The command `\empty` is explained in _The TeXBook_ , so that initially I tried it for this code and only occasionally reverted to `\@empty` having remembered a post at this site where it was said that the `\end` command of Plain TeX is redefined to `\@@end` in LaTeX. > Can somebody explain what is the difference between `\empty` and `\@empty` > in LaTeX and, perhaps, suggest a better solution for my problem?


title: TeX compilers/wrappers and robustness

text: Please see this post for context. We can use `texi2dvi` to get LaTeX to compile the correct number of times, and to insert a `bibtex` call into the loop if necessary. `rubber` is another wrapper script that can accomplish the same thing. (I've even heard of `latexmk` through TextMate.) The problem is that both wrappers fail on a compiler error (`pdflatex` by default). This is a problem since I'm using `org-mode` as a front end and I'm often not notified of small errors when using wrappers. Sometimes, changing a document and introducing an error can reset counters and I won't notice the counts are busted until I print out the document. Running `pdflatex` many times manually in `nonstopmode` seems to avoid these problems, and counters work as expected. Do you know of any more latex wrappers, ones that might be more robust to these small errors? Are there any flags I can pass to the existing wrappers to make them "keep truckin'"?


title: siunitx's S column misaligns numbers if retain-unity-mantissa is false

text: Consider this MWE:               \documentclass{article}          \usepackage{amsmath}     \usepackage{booktabs}     \usepackage{siunitx}          \begin{document}     \begin{tabular}{l @{\hskip+0.5em} S[retain-unity-mantissa = false]}         \toprule         Force           & \multicolumn{1}{c}{Relative Strength} \\         \midrule         Strong          & 1                                     \\         Electromagnetic & 1e-3                                  \\         Weak            & 1e-8                                  \\         Gravity         & 1e-37                                 \\         \bottomrule     \end{tabular}     \end{document}      Which produces ![Bad Result](http://i.stack.imgur.com/3Hw88.png) Clearly the numbers are not aligned properly. Am I using `siunitx` improperly or is this a bug? If so, can someone think of a fix / workaround?


title: Interactive macro with \typein

text: I would like to allow the user to interact with the document at compilation time, for example to choose the color of hyperlinks. For that, I created a new if and used `\typein` like in the following example :               \documentclass{article}     \usepackage[colorlinks]{hyperref}      \newif\ifcllinks     \newcommand\cllink{}     \typein[\cllink]{Coloried links (true or false) ?}     \csname cllinks\cllink \endcsname     \ifcllinks         \hypersetup{linkcolor=red,citecolor=blue,filecolor=green,urlcolor=blue}     \else         \hypersetup{linkcolor=black,citecolor=black,filecolor=black,urlcolor=black}     \fi     \begin{document}     \section{Title}\label{one}     The section \ref{one}     \end{document}      This works, but I'm not satisfied because of the supplementary macro `\cllink` that isn't very necessary (I think). I try               \newif\ifcllinks     \csname cllinks\typein{Coloried links (true or false) ?} \endcsname      But this doesn't work (`missing \endcsname inserted`). Is it possible to make it works with some TeX hackery (`\expandafter`, `\string`, …) ?


title: How to make an exotic font the default through the whole document

text: How can I use a font that needs explicit calling, like Auriocus Kalligraphicus, as the default font through the whole document?


title: automated indexing against keyword file

text: I use the package `pdfpages` to include scanned and ocr'd pdf's in my LaTeX document, and I need to index them (over 200 pages). I have a plain .txt file with all keywords that I'd like to find my ocr'd pdf, and those keywords that are present in my ocr'd pdf should then be indexed. What would be the best way to do this?


title: Odd interaction between hyperref, breqn, and underscores

text: My problem may have a similar root cause as this question, and although I've got a working solution I'm happy with, I'm puzzled as to why this happens at all. MWE:               \documentclass{article}     \usepackage{mathtools}     \usepackage{breqn}     \usepackage{hyperref}     \begin{document}     \section{Content}     \begin{figure}     \mbox{Figure content}     %%% Version 1, causes "Rerun to get cross-references right" warning every time     %%% if hyperref, mathtools, and breqn loaded simultaneously.     %\caption{dirac\_example.m}     %%% Version 2, works fine     \caption{dirac\textunderscore{}example.m}     %%% Version 3, works fine     %\newcommand{\mycaption}{dirac\_example.m}     %\caption{\mycaption{}}     \label{dirac}     \end{figure}     \end{document}      As noted in the comments, the first version of my figure caption causes pdflatex to constantly throw "Rerun to get cross-references right" warnings. Removing either of hyperref or breqn made the problem go away, and obviously, replacing the escaped underscore with a `\textunderscore{}` or another definition fixed the problem as well. Things I've tried already:   1. Tried with original TL 2010 DVD.   2. Tried with current packages, updated this morning from CTAN.   3. Tried moving breqn after hyperref. No difference on any of those. All exhibited the error, and though I've not tried reinstalling the original DVD, I assume what works on my updated install would work there, too.


title: How can Acrobat features be controlled from within LaTeX?

text: I needed to install the package `xpatch` which fixes a glitch in `revtex4` regarding cross-referencing. However, now, every time I compile a LaTeX file the produced PDF document has the annoying sideband and is 76.9% in size. What are the instructions in the code of the `.tex` document that would cause the sideband to disappear and the size of the page to be, say, 150%?


title: subimport and includeonly

text: Say I have a document structured as follows.               main.tex         + ch1             - ch.tex             - s1.tex             - s2.tex         + ch2             - ch.tex             - s1.tex             - s2.tex      Here, `*.tex` are LaTeX files, and `ch1` and `ch2` are directories.               % main.tex     \documentclass{article}         \usepackage{import}         \includeonly{ch1/ch}     \begin{document}     \subimport{ch1/}{ch}     \subimport{ch2/}{ch}     \end{document}          % ch1/ch.tex     \input{s1}     \input{s2}          % ch1/s1.tex     Section 1.1          % ch1/s2.tex     Section 1.2          % ch2/ch.tex     \input{s1}     \input{s2}          % ch2/s1.tex     Section 2.1          % ch2/s2.tex     Section 2.2      Unfortunately, this compiles the whole document, not just chapter 1. I'm probably doing this completely wrong, but I was trying to do the following. I have a separate folder for each chapter; in each chapter folder, I have a file `ch.tex` that manages the chapter as a whole, and files `s1.tex`, `s2.tex`,... that contain the major sections of the chapter. I am using the import command because I want to be able to use relative paths within `ch.tex` (both for inputing the section files, and for things like including graphics). However, in order to speed up compilation, I want to be able to use `\includeonly`. Is there a way to get the advantages of both `import` and `\includeonly`? What is the best practice for structuring large documents like this? (I'm curious about the best practice even if it means giving up relative paths or `includeonly`. Based on the other posts I read, it seems like the experts favor `include` instead of `import` [How to use the import package?, Splitting a large document into several files, How to make "\input" in a "\include"-d file use the correct current path? ] -- is there a good reason for this?) I saw a post (Getting \includeonly functionality with import package) that I hoped would give me the answer, but that post ended up skirting the actual issue.


title: Problem setting a flag inside a TikZ `\foreach` loop

text: I'm pulling my hair out trying to understand why the following doesn't work. The intention is to calculate whether a given number `#1` is prime, and to set `\isprime` to either `1` (true) or `0` (false). The looping and the conditionals are doing the right thing, but the `\isprime` flag isn't being set properly.                \newcommand{\setisprime}[1]{        \def\isprime{1}        \foreach \i in {2, 3,5,...,#1} {          \pgfmathparse{\i*\i>#1? 1:0}          \ifthenelse{\pgfmathresult=1}{            % Early-out if \i^2 > #1            \breakforeach          }{            % Otherwise test if \i divides #1            \pgfmathparse{Mod(#1,\i)==0? 1:0}            \ifthenelse{\pgfmathresult=1}{              \def\isprime{0}              \breakforeach            }{}          }        }      }      Here's what happens: ![example](http://i.stack.imgur.com/vdTbA.png) Obviously, it's failing quite badly! Here's an MWE with debugging statements:                \documentclass{article}      \pagestyle{empty}           \usepackage{tikz}      \usepackage{ifthen}           \begin{document}           \newcommand{\debugsetisprime}[1]{        Testing #1 for primeness.\par        \def\isprime{1}        \foreach \i in {2, 3,5,...,#1} {          \pgfmathparse{\i*\i>#1? 1:0}          \ifthenelse{\pgfmathresult=1}{            Exiting loop because $\i^2 > #1$.\par            \breakforeach          }{            Testing whether \i\ divides #1...            \pgfmathparse{Mod(#1,\i)==0? 1:0}            \ifthenelse{\pgfmathresult=1}{              Yes.\par Exiting loop because divisor found.\par              \def\isprime{0}              \breakforeach            }{              No.\par            }          }        }        \ifnum\isprime=1          #1 is prime.\par\vskip1em        \else          #1 is not prime.\par\vskip1em        \fi      }           \debugsetisprime{97}      \debugsetisprime{15}           \end{document}


title: How to display the footnote in the bottom of the slide while using \columns?

text: I am using `\columns` in `beamer` to show two pictures. After I added `\footnote{ExampleText}` after captions, the `ExampleTest` just appear in each column. Now I want to show all of the `ExampleText` in the bottom of the slide instead of each column, how can I do this? MWE:               \documentclass{beamer}     \usepackage{graphicx}     \begin{document}      \begin{frame}     \begin{columns}     \begin{column}{.5\textwidth}     \includegraphics{img1}\footnote{f2}     \end{column}     \begin{column}{.5\textwidth}     \includegraphics{img2}\footnote{f1}     \end{column}      \end{columns}     \end{frame}     \end{document}


title: Listings language definition keyword suffixes

text: I'm trying to create a `listings` language definition for ARM assembly and many of the instructions have prefixes/suffixes (i.e. BGT, BLE, BNE, BEQ branch instructions). Is there a way to define B with any suffix as a keyword? Or am I stuck adding every combination of prefix/suffix/instruction in my list of keywords?


title: how to use bullets and new line in a rectangle block of tikz? and how to draw arrows from particulat location of rectangle split node?

text: I want draw something like this: ![enter image description here](http://i.stack.imgur.com/QfYPl.jpg) And this is what I am getting: ![enter image description here](http://i.stack.imgur.com/5ikgL.png) I am facing three difficulties:   1. How to get bullets inside a block? and how to use different font for the same?   2. How to draw these rest of the arrows.   3. How to get three circle below arr2 shown in the figure? This is my tikz code:               \documentclass[a4paper,10pt]{article}     %\documentclass[a4paper,10pt]{scrartcl}     \usepackage{tikz}     \usetikzlibrary{shapes}     \usetikzlibrary{positioning,arrows}     \usepackage[utf8x]{inputenc}     \usepackage{scalefnt}          \begin{document}               \begin{tikzpicture}[fill=blue,ultra thick, scale = 0.75, transform shape,font=\Large]               \node[rectangle] (a1) [draw, minimum width=3.5cm,minimum height=2.5cm] {device $1$};     \node[rectangle] (a2) [draw, minimum width=3.5cm,minimum height=2.5cm,below of=a1,node distance=4cm] {device $2$};     \node[rectangle] (a3) [draw, minimum width=3.5cm,minimum height=2.5cm,below of=a2,node distance=4cm] {device $3$};          \coordinate[right=5.5cm of a1] (a4)  {};          \node[rectangle split , rectangle split horizontal] (a5)[draw, minimum height=1cm,inner sep=0.5 cm, above of=a4,node distance=0.6cm] {arr$1$ \nodepart{two} arr$2$ \nodepart{three} arr$3$ \nodepart{four} arr$N$};     \coordinate[below=1.5cm of a5] (a6)  {};     \node[rectangle] (b1) [draw, minimum width=2.5cm,minimum height=1cm,left of=a6,node distance=0.5cm] {BB$0$};     \node[rectangle] (b2) [draw, minimum width=2.5cm,minimum height=1cm,below of=b1,node distance=2cm] {BB$1$};     \node[rectangle] (b3) [draw, minimum width=2.5cm,minimum height=1cm,below of=b2,node distance=2cm] {BB$2$};          \node[rectangle] (b4) [draw, minimum width=2.5cm,minimum height=1cm,right of=b1,node distance=6cm] {BB$0$};     \node[rectangle] (b5) [draw, minimum width=2.5cm,minimum height=1cm,below of=b4,node distance=2cm] {BB$1$};          \node[rectangle] (b6) [draw, minimum width=7cm,minimum height=3.5cm,below of=b5,node distance=2.5cm] {dimension \\ bounds in each dim };     \coordinate[right=4cm of a3] (a6)  {};          \node[rectangle] (b7) [draw, minimum width=2.5cm,minimum height=1cm,below of=a6,node distance=0.75cm] {BB$3$};     \node[rectangle] (b8) [draw, minimum width=2.5cm,minimum height=1cm,right of=b7,node distance=4cm] {BB$4$};     \node[rectangle] (b9) [draw, minimum width=2.5cm,minimum height=1cm,right of=b8,node distance=4cm] {BB$5$};                    \path[->] (a1) edge node {} (a2);     \path[->] (a2) edge node {} (a3);          \path[->] (a1.18.5) edge node {} (a5);     \path[->] (b7) edge node {} (b8);     \path[->] (b8) edge node {} (b9);          \end{tikzpicture}          \end{document}


title: Quick question about curly braces not showing up

text: Ii am writing a short code, so I doubt anything else in the code is causing the problem. This is the problematic line of code:               \[ M_R := \max {|f(z)|: |z - z_0| = R }\le M\]      It doesn't show the curly braces. I've tried using `\left{` and `\right}` but to no avail. What should I do? Thank you


title: Proper way to detect empty/blank text

text: I am attempting to ignore a command if it is passed with empty/blank text. My use case is not as complicated as one Expand away empty macros within ifthenelse where @egreg provides what seems like a great way to test if the text passed to it would produce no output. However, I can't seem to get it to work. When the following works the output should be just the name (if no address or an empty/blank address is given): > **Name:** Peter's Pizza or if a non-blank address is given: > **Name:** Peter's Pizza > > **Address:** 123 Main Street, Anytown, USA ## `xstring` Version of `IfNoText`: With my original version (with `%\def\UseEgregsIfNoText{}` commented out), Section 1 and 3 are correct. Section 2 does not work properly in that the `Address:` is printed when it should not be. This `xstring` version of `\IfNoText` also does not allow me to have blank lines in the `\SetAddress{}` (see second occurrence of `\UseEgregsIfNoText`) which I would like. Furthermore, Section 4 shows that I am not able to compile if I attempt to access `\MandatoryName`. Note that it is commented out in this case. ![enter image description here](http://i.stack.imgur.com/xmBVr.png) ## Egreg's Version of `IfNoText`: With @egreg's version of `\IfNoText` (uncomment `\def\UseEgregsIfNoText{}`) obtained from Expand away empty macros within ifthenelse, I can compile with blank lines in the `\SetAddress{}` and use the `\MandatoryName` macro, but don't get the desired results. Here Case 1 and 2 are correct, but not 3 (which has additional blank lines inserted in `\SetAddress`) and 4 (which attempts to access the value of `\MandatoryName`). ![enter image description here](http://i.stack.imgur.com/yvqbd.png) ## Notes:   * I was planning to use `\IgnoreSpacesAndImplicitePars` and `\IgnoreSpacesAndAllPars` from Looking for an \ignorespacesandpars, but they don't seem to make a difference. These macros are included in the code below but are not used   * egreg does warn that tricky cases might fool ``, but I don't think that blank lines was what he meant. ## Code:               \def\UseEgregsIfNoText{}%           \documentclass{article}     \usepackage{xspace}     \usepackage{xstring}          % http://tex.stackexchange.com/questions/23100/looking-for-an-ignorespacesandpars/23110#23110     \makeatletter     \def\IgnoreSpacesAndImplicitePars{%  Not used       \begingroup       \catcode13=10       \@ifnextchar\relax         {\endgroup}%         {\endgroup}%     }          \def\IgnoreSpacesAndAllPars{%       Not used       \begingroup       \catcode13=10       \@ifnextchar\par         {\endgroup\expandafter\IgnoreSpacesAndAllPars\@gobble}%         {\endgroup}%     }     \makeatother          \ifdefined\UseEgregsIfNoText         %% http://tex.stackexchange.com/questions/42280/expand-away-empty-macros-within-ifthenelse         \newcommand{\IfNoText}[3]{%             \sbox0{#1}%             \ifdim\wd0=0pt %                 {#2}% if #1 is empty             \else%                 {#3}% if #1 is not empty             \fi%         }     \else         \newcommand{\IfNoText}[3]{%             %\edef\Parameter{\IgnoreSpacesAndAllPars#1}             %\IfStrEq{\Parameter}{\empty}{#2}{#3}%             \IfStrEq{#1}{\empty}{#2}{#3}%         }     \fi               \newcommand*{\MandatoryName}{\empty}%     \newcommand*{\SetName}[1]{\renewcommand*{\MandatoryName}{#1\xspace}}%          \newcommand{\OptionalAddress}{\empty}% can have line breaks, so no "*"     \newcommand{\SetAddress}[1]{%         \IfNoText{#1}{%              % No printable text so ignore...         }{%             \renewcommand{\OptionalAddress}{\ignorespaces#1}%         }%     }%          \newcommand*{\ShowNameAndAddress}{%         \par\noindent\textbf{Name:}~\MandatoryName         \IfNoText{\OptionalAddress}{}{%             \par\noindent\textbf{Address:}~\OptionalAddress         }%     }%     \begin{document}     \section{Name with no Address}     \SetName{Peter's Pizza}     \ShowNameAndAddress          \section{Name with Empty address}     \ifdefined\UseEgregsIfNoText         % Want to be able to handle this:         \SetAddress{                   }     \else         \SetAddress{         }     \fi          \ShowNameAndAddress               \section{Name with Address Given}          \SetAddress{       123 Main Street,       Anytown, USA     }          \ShowNameAndAddress          \section{Name with Address using Name}          %Verify: \verb|\MandatoryName =| \MandatoryName          \ifdefined\UseEgregsIfNoText         % Want to be able to access value of \MandatoryName here         \SetAddress{           123 \MandatoryName Way,           Anytown, USA         }     \else         % Can't even compile in this case with \MandatoryName          \SetAddress{           123 %\MandatoryName Way,           Anytown, USA         }     \fi          \ShowNameAndAddress          \end{document}


title: White horizontal lines in lstlisting

text: I'm having the following problem: I'm using the `listings` package to render what is supposed to look like a teminal screenshot. But the background colour is striped. In my other code snippets the background colour is light gray so it is much less noticeable, but it's really ugly on the black background. I've looked at potential solutions online using `\shaded` or `colorbox`, but none have worked because of the `shadowbox` I'm using. Any input would be much appreciated.               \lstset{%       language=C,                % choose the language of the code       basicstyle=\ttfamily\footnotesize\color{white} ,       % the size of the fonts that    are used for the code       tabsize=2,                      % sets default tabsize to 2 spaces       captionpos=b,                   % sets the caption-position to bottom       breaklines=true,                % sets automatic line breaking       breakatwhitespace=true,         % sets if automatic breaks should only happen at    whitespace       keywordstyle=\color{white},       commentstyle=\color{white},       stringstyle=\color{white},       numberstyle=\tiny\color{midgray},  % the style that is used for the line-numbers       stepnumber=2,                   % the step between two line-numbers. If it's 1, each line                                    % will be numbered       numbersep=5pt,                  % how far the line-numbers are from the code       frame=shadowbox,       rulesepcolor=\color{darkgray},       lineskip={-1.5pt}, % single line spacing       aboveskip=1.5\bigskipamount,       belowskip=\smallskipamount,       escapechar={\@},       showstringspaces=false,       backgroundcolor=\color{black}     }


title: right description list LaTeX beamer

text: How to do right align a description list using beamer?                     Name | Joel Spolsky        Address | Some address          Using the enumitem package as suggested in Description list with right alignment of labels does not seem to work with the beamer package


title: How to align terms in separate lines in this case?

text: I want to get another variant for the alignment points in my question answered by Hendrik Vogt, see How to construct a long equation that is split in LHS and RHS to occupy a narrow column?.               \documentclass[twocolumn]{article}     \usepackage[a4paper,margin=1cm]{geometry}     \usepackage{amsmath}     \begin{document}     \begin{enumerate}         \item The degree of (C) is 3.         \item The degree of (A) is 1.         \item%         $\!         \begin{aligned}[t]           -3x(x+1)&-2x(x-1)\\             &+4(x^2-3x-1)                             &= \!\begin{aligned}[t]                       &-3x^2-3x-2x^2+2x+v \\                       &+4x^2-12x-4                    \end{aligned} \\                             &= \!\begin{aligned}[t]                       -3x^2-&3x-2x^2+2x+v \\                             &+4x^2-12x-4                    \end{aligned} \\                 &= -x^2-13x-4         \end{aligned}         $     \end{enumerate}     \end{document}      The code above does not produce what I want to achieve as follows. ![enter image description here](http://i.stack.imgur.com/AGbDh.png) Note: Feel free to edit the title to be better because I have difficulty to rephrase it.


title: Editing bst file to add "page" or "pages"

text: I've got this bst file http://pastebin.com/z6mXByj7 and am using this tex:               \documentclass[10pt,oneside,letterpaper,spanish]{book}     \usepackage[utf8x]{inputenc}     \usepackage[activeacute,spanish]{babel}     \addto\shorthandsspanish{\spanishdeactivate{~<>.}}     \decimalpoint %\spanishdecimal{.}          \usepackage[spanish]{babel}     \usepackage{natbib}     \usepackage{ulem}     \def\bbluline#1{\uline#1}          \begin{document}     asdasd \citep{chsh_inequality} asdasd \citep*{aspect_test_bell}     \bibliographystyle{fiuady3}     \bibliography{ejem_biblio}          \end{document}      with this bib file               % This file was created with JabRef 2.5.     % Encoding: Cp1252               @ARTICLE{chsh_inequality,        author = {{Clauser}, J.~F. and {Horne}, M.~A. and {Shimony}, A. and {Holt}, R.~A.         },         title = "{Proposed Experiment to Test Local Hidden-Variable Theories}",       journal = {Physical Review Letters},          year = 1969,         month = oct,        volume = 23,        number = 15,         pages = {880-884},           doi = {10.1103/PhysRevLett.23.880},        adsurl = {http://adsabs.harvard.edu/abs/1969PhRvL..23..880C},       adsnote = {Provided by the SAO/NASA Astrophysics Data System}     }          @ARTICLE{aspect_test_bell,        author = {{Aspect}, A. and {Grangier}, P. and {Roger}, G.},         title = "{Experimental Tests of Realistic Local Theories via Bell's Theorem}",       journal = {Physical Review Letters},      keywords = {Fluorescence, phosphorescence},          year = 1981,         month = aug,        volume = 47,        number = 15,         pages = {460-463},           doi = {10.1103/PhysRevLett.47.460},        adsurl = {http://adsabs.harvard.edu/abs/1981PhRvL..47..460A},       adsnote = {Provided by the SAO/NASA Astrophysics Data System}     }      which produces the following output ![enter image description here](http://i.stack.imgur.com/wv2NG.png) that is exactly what I need except for the fact that it should place the particle for pages "pp" before 460-460 and 880-884. Can this be done by editing the bst file?


title: Appendix with titletoc and memoir

text: I'm trying to customize the TOC layout with `titletoc` in a `memoir` document. The `chapter` styling works well as below, but if I try the `appendix` section, I'll get an error for missing number. I think I see that this is because `\chapternumberline` is renewed to `\numberline`, and that doesn't take in the `A` as the appendix number. But if `\chapternumberline` isn't renewed this way, it errors out with `Undefined control sequence` for `\@chapapp@head` in the `memoir` definition:               \newcommand{\chapternumberline}[1]{%       \chapternumberlinehook{#1}%       \hb@xt@\@tempdima{\@chapapp@head\@cftbsnum #1\@cftasnum\hfil}%       \@cftasnumb}      So it looks like `memoir` is locking horns with `titlesec`. Any suggestions to on how to pacify them? The aim is to have the appendix appear similar to the chapter:                Chapter 1 * It Came Into My Head         3     Appendix A * The Time Machine             5      (In the MWE below the appendix styling is commented out, otherwise it would be MNWE) ![enter image description here](http://i.stack.imgur.com/yYmDF.png) `mwe.toc`               \contentsline {chapter}{\chapternumberline {1}It Came Into My Head}{3}     \contentsline {appendix}{\chapternumberline {A}The Time Machine}{5}     \contentsfinish       `mwe.tex`               \documentclass[11pt]{memoir}          \makeatletter          \usepackage{titletoc}          \usepackage{fontspec}     \defaultfontfeatures{Ligatures={TeX}}     \setmainfont{TeX Gyre Pagella}          % Fixes Undefined control sequence error for \@chapapp@head     \renewcommand\chapternumberline[1]{\numberline{#1}}          \titlecontents{chapter}[6pc]     {\normalsize}%     {%       \contentsmargin{0pt}%       \makebox[0pt][r]{%         \chaptername~{\thecontentslabel}%         \hspace*{0.5em}$\cdot$\hspace*{0.5em}%       }%     }     {\contentsmargin{0pt}%     \itshape}     {\hfill\normalsize\thecontentspage}          % FIXME: perhaps \numberline is erroring out b/c "A" is not numerical     %! Missing number, treated as zero.     %<to be read again>     %                   \ttll@appendix     %l.21 ...rline {A}The Time Machine}{11}{appendix.A}          %\titlecontents{appendix}[6pc]     %{\normalsize}%     %{%     %  \contentsmargin{0pt}%     %  \makebox[0pt][r]{%     %    \appendixname~{\thecontentslabel}%     %    \hspace*{0.5em}$\cdot$\hspace*{0.5em}%     %  }%     %}     %{\contentsmargin{0pt}%     %\itshape}     %{\hfill\normalsize\thecontentspage}          \makeatother          \begin{document}          \tableofcontents*          \chapter{It Came Into My Head}          'In another moment we were standing face to face, I and this fragile thing out of futurity\ldots          \appendix          \chapter{The Time Machine}          'There were others coming, and presently a little group of perhaps eight or ten\ldots          \end{document}


title: Separate LaTeX 3 code from 'normal' \newcommand

text: Consider the example from here:               \documentclass{article}          \usepackage{amsmath}     \usepackage{siunitx}          \ExplSyntaxOn     \newcommand*\calculation[1]{%       \dfrac{\SI{#1}{\g}}{\SI{\total}{\g}} \cdot \SI{360}{\degree}       & \biggl(\dfrac{\num{#1} \cdot 360}{\num{\total}}\biggr) \si{\degree}       & \fp_eval:n {round(#1*360/\total)} \si{\degree}       &     }     \cs_new_eq:NN \calculate \fp_eval:n     \ExplSyntaxOff          \newcommand*\total{\calculate{\honning+\pollen+\vand}}               \begin{document}          \begin{equation*}     \def\honning{16710}     \def\pollen{10155}     \def\vand{6210}      \renewcommand*\arraystretch{2.2}       \begin{array}{l@{\qquad} l@{{}={}} l@{{}\approx{}} r@{} l}         \text{Honning:} & \calculation{\honning}; \\         \text{Pollen:}  & \calculation{\pollen}; \\         \text{Vand:}    & \calculation{\vand}.       \end{array}     \end{equation*}          \end{document}      Is it possible to put the definition of `\calculation` outside `\ExplSyntaxOn`/`\ExplSyntaxOff`? I would like to have something like               \ExplSyntaxOn       \cs_new_eq:NN \calculate \fp_eval:n     \ExplSyntaxOff          \newcommand*\total{\calculate{\honning+\pollen+\vand}}     \newcommand*\calculation[1]{%       \dfrac{\SI{#1}{\g}}{\SI{\total}{\g}} \cdot \SI{360}{\degree}       & \biggl(\dfrac{\num{#1} \cdot 360}{\num{\total}}\biggr) \si{\degree}       & \fp_eval:n {round(#1*360/\total)} \si{\degree}       &     }      This makes the code a bit easier to navigate through, I think. If I try the latter, I get the following error.               ! Undefined control sequence.     \calculation ...l }}\biggr ) \si {\degree } & \fp                                                        _eval:n {round(#1*360/\tot...     l.26     \text{Honning:} & \calculation{\honning}                                                      ; \\      P.S. Notice that I know (almost) nothing about L3, so please no explanation that are "too fancy". `:)` **Update** As Joseph hinted in his last comment below, the only problem was that I wasn't thinking.


title: How to make all the entries in a table verbatim font

text: I have a large table in the tabular environment and I need to make all the text verbatim font. I know I can use `\begin{verbatim}...\end{verbatim}` for all the entries but they are just too much for me to do. It might take a whole day from me. I know there is definitely a way out. I would be very grateful if I can get help from somebody. Thanks in advance!


title: Trouble with Tufte-style bar chart

text: I am studying this article: "Tufte-style Bar Charts with pgfplots". I was able to come up to step #4, and was stuck, removing the border from the bars:               \definecolor{tufte1}{rgb}{0.7,0.7,0.55}     \begin{tikzpicture}     ...       cycle list={         fill=tufte1, draw=none\\       }     ...      I wrote this code:               \documentclass{article}     \usepackage[a4paper]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{pgfplots}     \begin{document}     %I added this     \definecolor{tufte1}{rgb}{0.7,0.7,0.55}     \begin{tikzpicture}     \begin{axis}[       ybar,       hide x axis,       axis line style={opacity=0},       major tick style={draw=none},       ymin=0,       bar width=0.9em,       ymajorgrids,       major grid style=white,       axis on top     ]     %and this     cycle list={         fill=tufte1, draw=none\\     }     \addplot table {data.csv};     \end{axis}     \end{tikzpicture}     \end{document}      data.csv:               1    8.5     2   12     3    6.5     4    7     5    3     6   17.5     7   13     8    8.5     9    6     10  11     11   5     12  10      But it doesn't work: the color is not changed, and the border stays intact: ![enter image description here](http://i.stack.imgur.com/4fPRv.png) How to remove the borders and change the color? ![enter image description here](http://i.stack.imgur.com/ADjwZ.png) (I didn't narrow the bars - I don't like it).


title: Interpreting a part of a code

text: I have the following code for header definition:               \pagestyle{fancy}     \fancyhf{}      \fancyhead[RO]{\nouppercase{\emph{\rightmark}}}     \fancyhead[LE]{\nouppercase{\emph{\leftmark}}}     \fancyfoot[RO,LE]{\ifthenelse{\value{page}=42}{\strong{--~\reflectbox{\thepage}~--}}{\strong{--~\thepage~--}}}      \fancypagestyle{plain}{      \fancyhf{}      \fancyfoot[RO,LE]{\ifthenelse{\value{page}=42}{\strong{--~\reflectbox{\thepage}~--}}{\strong{--~\thepage~--}}}      \renewcommand{\headrulewidth}{0pt}}      Now, I've compiled my .tex file with this code and without the `\ifthenelse` part, and I don't see any difference. Now my document still doesn't have 42 pages, and I see that it mentions this here, and I'm wondering what does it do? I used a template from this question.


title: LaTeX CV, change pagenumber position

text: I am preparing my CV in germany using the `currvita` Package. Unfortunally the pagenumbers on the bottom of the page are not really at the bottom of the page. There is something like 5 cm between the "real" bottom of the page and the number. My problem is that I don't know how to change it. I use this code               \documentclass[11pt,a4paper]{scrartcl}     \usepackage[ngerman]{babel}          \usepackage[T1]{fontenc}      % T1-encoded fonts: auch Wörter mit Umlauten trennen     \usepackage[latin1]{inputenc}          \usepackage{currvita}               \usepackage{relsize}     \usepackage{soul}     \usepackage{xspace}               \usepackage[final]{graphicx}  % um Graphiken einzubinden     \usepackage{picins} %fuer bild einfuegen               \begin{document}     \parpic[rs]{\includegraphics[width=3cm]{ild.jpg}}     \begin{cv}{Lebenslauf}       \begin{cvlist}{Persönliche Daten}       \item xxx       \item Tel.:~+xxx\\         E"~Mail:~xxx       \item Geb.~xxx\\         xxx       \end{cvlist}              \begin{cvlist}{Universität}             \item[xx/20xx--xx] xxx         \end{cvlist}            \begin{cvlist}{Weiterführende Schule}             \item[xx/xxxx--xx/xxxx] xxx       \end{cvlist}            \begin{cvlist}{xxxx}             \item[xx/xxxx--aktuell] xxx         \begin{itemize}             \item xxxxxx             \item xxxxxx         \end{itemize}                  \item[xx/xxxx--aktuell] xxx         \begin{itemize}             \item xxxxxx             \item xxxxxx             \end{itemize}                  \item[xx/xxxx--aktuell] xxx         \begin{itemize}             \item xxxxxx             \item xxxxxx                       \item[xx/xxxx--aktuell] xxx         \begin{itemize}             \item xxxxxx             \item xxxxxx         \end{itemize}                       \item[xx/xxxx--aktuell] xxx         \begin{itemize}             \item xxxxxx             \item xxxxxx         \end{itemize}                       \item[xx/xxxx--aktuell] xxx         \begin{itemize}             \item xxxxxx             \item xxxxxx         \end{itemize}                       \item[xx/xxxx--aktuell] xxx         \begin{itemize}             \item xxxxxx             \item xxxxxx         \end{itemize}                       \item[xx/xxxx--aktuell] xxx         \begin{itemize}             \item xxxxxx             \item xxxxxx         \end{itemize}              \end{cvlist}                           \cvplace{Internet}       \date{04.~Februar~2013}          \end{cv}          \end{document}     \endinput      Please ignore the wrong position of the xxs. What matters is the pagenumber and the position and (normally) this example should work


title: Creating a specific (locally vertical-first) cell highlighting order in the PDF

text: I have a table with a bunch of split cells (or large `\multirow` cells, depending on how one looks at it). This is a minimal example, for the setup I need the table in:               \documentclass{memoir}     \usepackage{float}     \usepackage{arydshln}          \newcommand{\colheading}[1]{\textrm{\fontfamily{ppl}\selectfont#1}}     \newcommand{\specialcell}[1]{\begin{tabular}[t]{@{}l@{}}#1\end{tabular}} % for multi-row cells, adapted from user @egreg's answer to http://tex.stackexchange.com/questions/2441/how-to-add-a-forced-line-break-inside-a-table-cell          \begin{document}          \begin{Spacing}{1}     \begin{table}[H]       \caption{Selection of popular Linux distributions}       \begin{center}       \begin{small}       \begin{tabular}{|l|l|l|}         \hline           \colheading{name of distribution} & \colheading{\specialcell{abbreviated \\ name}} & \colheading{inventor} \\         \hline           Debian GNU/Linux & Debian & Ian Murdock \\         \hline           \specialcell{Red Hat \\ Enterprise Linux} & RHEL & \specialcell{Red Hat, \\ Inc.} \\         \cdashline{1-2}[.4pt/1pt]           \specialcell{\ \ \textit{formerly:} \\ \ \ Red Hat Linux \\ \ \ Advanced Server} & \ \ --- & {} \\         \hline           Slackware & --- & \specialcell{Patrick \\ Volkerding} \\         \hline       \end{tabular}       \end{small}       \end{center}     \end{table}     \end{Spacing}          \end{document}      (1. Conceptually, a number of things (such as a special font for column headings) are not necessary, but it's good if the solution works for a non- trivial/non-minimal setup. 2. Please don't modify the cell contents: some things (such as the fact that the middle row cluster's cells aren't the longest ones that define the column width) are intentional.) What's working is the layout: visually everything is as I want it. What is not yet right however is a certain highlighting order I want, for when I select text in the compiled PDF file. The **current highlighting selection order for cells in the PDF file** is > "Red Hat Enterprise Linux" → "RHEL" → "Red Hat, Inc." → "formerly [...]" → > "---". **I however want:** > "Red Hat Enterprise Linux" → "formerly [...]" → "RHEL" → "---" → "Red Hat, > Inc." I've tried many things, involving `\multirow`, `\minipage`, and tricks involving storing the column length somewhere (`\newlength{\colwidthColumnnumber} \settowidth{\colwidthColumnnumber}{Debian GNU/Linux}`), but there is always something that doesn't work. I get:   * the dots for the split cells are too short and don't cover the entire cell width   * extraneous empty lines in cells   * error messages involving `\\\`/`&`/`\cr`   * missing or doubly-thick vertical bars By the way, it seems that the correct way to apply `\cdashline` to a single column is to write `\cdashline{1-1}`, not `\cdashline{1}`. **Is there an easy way to keep the exact current visual appearance (cell layout and contents), _with only the cell selection order different_?** This might involve playing around more with subtables. _Note: Normally the`\specialcell`-trick (see my code; it's a variation of a solution to another question by user @egreg) suffices. It's the dotted line (from package `arydshln`) that makes things complicated and that necessitate a more general treatment._


title: Defining shared counters for theorem environments *after* environments are defined

text: I am trying to use the same numbering for theorems, propositions, definitions, etc. This is normally easily be solved by using `amsmath` and defining these environments and using the same counter:               \newtheorem{theorem}{Theorem}[section]       \newtheorem{proposition}[theorem]{Proposition}       Problem: I am using a journal document class which has `theorem`s, `proposition`s, `definition`s, etc. already defined in the document class. Thus I need to change the counter **after** the environments were already defined, something similar to the way one can simply change the numbering format with:               \renewcommand{\theprop}{\arabic{section}.\arabic{prop}}       In my case, the document class is:               \documentclass[twocolumn]{svjour3}           * * * Just found the very simple solution inspired from How to identify the counter of Equation, Theorem, and Section. The solution is to match the counters:               \makeatletter     \let\c@proposition\c@theorem     \let\c@corollary\c@theorem     \let\c@lemma\c@theorem     \let\c@definition\c@theorem     \let\c@example\c@theorem     \makeatother


title: Incompatible color definition when using tikz with color package

text: I am using the **tikz** package to draw some diagrams. In addition, I need the color package for some highlighting. As the wikibooks page of the color package states, it has to be used _before_ the tikz package. I did this and am now ending up with a huge amount of > Package xcolor Warning: Incompatible color definition on line xxx Where xxx stand for many many lines, I don't control. Any ideas of fixing this? A working example:               \documentclass[12pt,a4paper,twoside]{article}     \usepackage[latin9]{inputenc}     \usepackage[usenames,dvipsnames]{color}     \usepackage{amsmath}     \usepackage{tikz}     \usepackage{pgf}     \usetikzlibrary{decorations.pathreplacing}     \usepackage{graphicx}     \usepackage{listings}          \lstdefinelanguage{constraints} {         keywords = {undefined, terminate, peephole\-constraint, temporal\-constraint, condition, rationale, result, filter, sequence, link, isParent, contains, distance, state, startsWith},       keywordstyle=\color{blue}\bfseries,         sensitive=false,         alsodigit={-},         ndkeywords={FAIL, FAIL_FINAL, PASS, PASS_FINAL, source, origin, sourceType, originType, operation, parameters},         ndkeywordstyle=\color{OliveGreen},         stringstyle=\color{red}\ttfamily,         morestring=[b]',         morestring=[b]"     }          \begin{document}     Text above.\\          \begin{lstlisting}[language=constraints]     temporal-constraint observe-value {       rationale {       }       sequence {         a << b << terminate       }       filter a {         operation == 'observe'       }       filter b {         operation == 'value'         &&  parameters.value != undefined       }       link {           a.parameters.name == b.parameters.name         &&  isParent(a.origin, b.origin)       }     }     \end{lstlisting}          \end{document}


title: Text wrapping a footer in a specific LaTeX template

text: I'm new to LaTeX (<48hrs experience) and am currently writing up a whitepaper using a the "Technical Report" template available through TeXnicCenter (code available at http://pastebin.com/mku5maC6.) I would like to add a two sentence disclosure footer, but my text spills off the page and I receive an Overfull error. Neither `\sloppy` nor `\usepackage{microtype}` resolved the issue. The code in question is:               % ********* Header and Footer **********     % This is something to play with forever. I use here the advanced settings of the KOMA script          \usepackage{scrpage2} %header and footer using the options for the KOMA script     \renewcommand{\headfont}{\footnotesize\sffamily} % font for the header     \renewcommand{\pnumfont}{\footnotesize\sffamily} % font for the pagenumbers          %the following lines define the pagestyle for the main document     \defpagestyle{cb}{%     (\textwidth,0pt)% sets the border line above the header     {\pagemark\hfill\headmark\hfill}% doublesided, left page     {\hfill\headmark\hfill\pagemark}% doublesided, right page     {\hfill\headmark\hfill\pagemark}%  onesided     (\textwidth,1pt)}% sets the border line below the header     %     {(\textwidth,1pt)% sets the border line above the footer     {{\it Federation Confidential}\hfill Chief O'Brian}% doublesided, left page     {Chief O'Brian\hfill{\it Federation Confidential}}% doublesided, right page     {Chief O'Brian\hfill{\it Federation Confidential}} % one sided printing     (\textwidth,0pt)% sets the border line below the footer     }      My attempt:               % ********* Header and Footer **********     % This is something to play with forever. I use here the advanced settings of the KOMA     script          \usepackage{scrpage2} %header and footer using the options for the KOMA script     \renewcommand{\headfont}{\footnotesize\sffamily} % font for the header     \renewcommand{\pnumfont}{\footnotesize\sffamily} % font for the pagenumbers          %%the following lines define the pagestyle for the main document     \defpagestyle{cb}{%     (\textwidth,0pt)% sets the border line above the header     {\pagemark\hfill\headmark\ Company X, LLC}% doublesided, left page     {Company X, LLC\headmark\hfill\pagemark}% doublesided, right page     {Company X, LLC\headmark\hfill\pagemark}%  onesided     (\textwidth,1pt)}% sets the border line below the header     %     {(\textwidth,1pt)% sets the border line above the footer     {\it This document contains unpublished confidential and proprietary information of      Company X. No disclosure or use of     any portion of these materials may be made without the express written consent of   Company X.}% doublesided, left page     {\it This document contains unpublished confidential and proprietary information of   Company X. No disclosure or use of     any portion of these materials may be made without the express written consent of  Company X.}% doublesided, right page     {\it This document contains unpublished confidential and proprietary information of Company X. No disclosure or use of     any portion of these materials may be made without the express written consent of Company     X.} % one sided printing     (\textwidth,0pt)% sets the border line below the footer     }      Any help or guidance would be much appreciated.


title: Customize auto-completion in Texmaker

text: How can I work with customize completion?   I want to add some new auto-completion but I don't know How the wizard works.   It's here: User>Customize Completion I don't know what should be writen in the box.


title: Re-insert equation by label

text: I read over the response given here: Is it possible to re-insert a LaTeX equation by label? which says such a thing is possible only with a macro. I would like to do this. I have a bajillion equations, some labelled and some not. Of those that are labelled, some I would like to display again, say, at the end of the document as a quick summary. Wome equations I want to show twice at different places identically. The problem is I can't decide on notation and I keep changing small things and it is a bit of a pain to remember which equations I want to display again and if I've updated them or not. Would there be a obvious/better way to do this? I have to admit I haven't ever bothered with macros for latex before today so apologies if the following is horrible, but, (to the best of my understanding) is that it would be something like               \newcommand{\acommand}[2]{%         #1       \expandafter\newcommand\csname #2\endcsname{#1}%     }          \acommand{someequation}{equationassociated} \\     \equationassociated      So then `\acommand{someequation}{labelassociated}` will display someequation and define the macro `\labelassociated`. But then, what if I want to display someequation along with the label entered as the second argument?


title: How to add a labeled mark on your plot in xy-plane by using (tikzpicture)?

text: I need a picture like ![The graph](http://i.stack.imgur.com/vEj4a.png) Here is a try:               \documentclass{article}     \usepackage{pgfplots}     \usetikzlibrary{decorations.markings}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}     \draw[-stealth,  thick](0,0)--(4,0) node[below]{$x$};     \draw[-stealth, thick](2,-2)--(2,2) node[left]{$y$};          \draw (2,0) circle (1.2cm);          \end{tikzpicture}     \end{document}


title: Labeling Edges in a Weighted Digraph

text: I would like to have the labels of the edges of a weighted digraph positioned "beside" (north, south, east, west, etc.) the arrows. I have already created the digraph with:               \documentclass{article}     \usepackage{tkz-graph}     \usetikzlibrary{calc}     \usetikzlibrary{decorations.markings}     \begin{document}     \begin{tikzpicture}[x=2.0cm,y=0.8cm]     \GraphInit[vstyle=Classic]     \begin{scope}[VertexStyle/.append style = {minimum size = 6pt, inner sep = 0pt}]     \Vertex[Lpos=180,L=$e$]{e}     \Vertex[x=2,y=3,Lpos=90,L=$a$]{a}     \Vertex[x=4,y=2.5,Lpos=45,L=$b$]{b}     \Vertex[x=5,y=-1,Lpos=-90,L=$c$]{c}     \Vertex[x=2,y=-2,Lpos=-90,L=$d$]{d}     \tikzset{EdgeStyle/.style={postaction=decorate,decoration={markings,mark=at position 0.5 with {\arrow{triangle 60}}}}}     \Edge[style={bend right = 45}](a)(e)     \Edge[style={bend left}](a)(b)     \Edge(a)(c)     \Edge(b)(c)     \Edge[style={bend right}](b)(d)     \Edge(c)(e)     \Edge[style={bend right =60}](c)(b)     \end{scope}     \end{tikzpicture}     \end{document}      You may use any set of weights for the edges.


title: Font not available despite being installed

text: I have TeX Live installation at `~/texlive/2014`. I installed Lato font package using `tlmgr`. There are now several `.ttf` files in `~/texlive/2014/texmf-dist/fonts/truetype/public/lato/` But when I try compiling a file that contains:               \setmainfont[Ligatures=TeX]{Lato}      using `xelatex` it gives an error:               kpathsea: Running mktextfm Lato     /home/user/texlive/2014/texmf-dist/web2c/mktexnam: Could not map source abbreviation  for Lato.     /home/user/texlive/2014/texmf-dist/web2c/mktexnam: Need to update ?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input Lato     This is METAFONT, Version 2.7182818 (TeX Live 2014) (preloaded base=mf)               kpathsea: Running mktexmf Lato     ! I can't find file `Lato'.     <*> \mode:=ljfour; mag:=1; nonstopmode; input Lato          Please type another input file name     ! Emergency stop.     <*> \mode:=ljfour; mag:=1; nonstopmode; input Lato          Transcript written on mfput.log.     grep: Lato.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input Lato' failed to make Lato.tfm.     kpathsea: Appending font creation commands to missfont.log.               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! fontspec error: "font-not-found"     !      ! The font "Lato" cannot be found.      How do I correct this?


title: Typesetting magazine style articles

text: I am trying to compose a two column magazine style article (for a hobby) with callouts, multiple typefaces, etc. Are there examples of style files and class files that do something similar?


title: How to change the interword spacing?

text: I'm trying to enlarge the interword spacing, because with ITC Kabel's default spacing it's sometimes hard to decide where is the space between two words. I read the manual of the `microtype` package, and I did some trying, without success. For example this one:               \usepackage{microtype}     \SetTracking[ spacing = {1000*,1666, } ]{ encoding = T1, family = *, shape=*,series=*}{ 25 }      Maybe there is an easy solution that doesn't involve `microtype`?.


title: Controlling {numcases} horizontal right spacing after first column

text: \begin{numcases}     {Opt\left(P, i, \ell, s, r\right)=min }     \nonumber (3)\hspace{2 mm} Opt(P,i+1,''Skip'',r - 1) + C1\label{eq:3} & $r\geq1$ \\     \nonumber (4)\hspace{2 mm} 0  & $i = |P|$ and $ r \geq 0$ \\     \nonumber (5)\hspace{2 mm} \infty & $r < 0$     \end{numcases}      but I want to control the amount of horizontal space it uses after the first column. The reason is that right now Latex uses too much and one of the conditions is not fully displayed and cut on the page. Thank you!


title: \renewcommand for \forall to add a parameter

text: Hi I'm trying to redefine the `\forall` command so that it accepts an argument instead of using the regular juxtaposition. What it looks like at the moment is               \renewcommand{\forall}[1]{\forall{(#1)}\;}      which doesn't work on               \forall{(u,v) \in V \times V}      producing the error message:               ! TeX capacity exceeded, sorry [input stack size=5000].          \forall #1->\forall (                          #1)\;      However the following works fine albeit would require to substitute every occurrence of `\forall` in the document:               \newcommand{\all}[1]{\forall{(#1)}\;}      Is there an intrinsic recursiveness in that redefinition?


title: Issues with justification

text: I was going through this tex files www.biostat.umn.edu/~brad/8400/HQuick_cv.tex. However, when I use this tex, the text is not justified properly ![enter image description here](http://i.stack.imgur.com/XrKcJ.png) See the words establishments, Experimental are crossing the margin. How can I fix it?


title: Itemize after a FloatBarrier

text: I use `\FloatBarrier` from the package `placeins` to drop all floats before I move to a new chapter. This normally works fine. However, this time I encountered a problem. The section after `\FloatBarrier` contains items and this seems to mess up the compilation. The code below works well without the `\FloatBarrier` or the items, but with both the compilation does not work. > Error: Something's wrong -- perhaps a missing \item Any ideas?               \begin{figure}     \caption{blah blah}      \label{fig:blah}     \includegraphics[width=\textwidth]{../figures/blah}     \end{figure}          \FloatBarrier          \section{Appendix}          \begin{itemize}     \item text     \end{itemize}


title: Vertical lines across page for each chapter

text: I want to make a "title page" for each chapter of a book, and it should have two vertical lines across the page (one thicker than the other), and the name of the chapter, as shown in the image below. ![enter image description here](http://i.stack.imgur.com/Dv9K0.jpg) I don't know how to make the vertical lines and I don't know how to make the "title page" for each chapter. I am using Texmaker in Windows. This is the code after I included the suggestion of Werner:               \documentclass[12pt,letterpaper]{book}     \usepackage[spanish]{babel}     \usepackage[utf8]{inputenc}     \usepackage{graphicx, lipsum, lmodern}     \usepackage{geometry}     \title{Serpientes venenosas de Honduras}     \author{Gustavo A. Cruz}     \date{}           \makeatletter      \def\@makechapterhead#1{%        \vspace*{50\p@}%        \noindent\hspace*{.1\linewidth}\smash{\rule[-2\textheight]{5pt}{3\textheight}}% Thick rule        \hspace{.05\linewidth}\smash{\rule[-2\textheight]{2pt}{3\textheight}}% Thin rule        \hspace{.1\linewidth}%        {\parbox[t]{\dimexpr.75\linewidth-7pt}{\raggedright           \ifnum \c@secnumdepth >\m@ne           \normalfont\bfseries\fontsize{30\p@}{36\p@}\selectfont           \@chapapp\space \scalebox{2}{\thechapter}          \par\nobreak           \vskip 30\p@           \fi            \interlinepenalty\@M            \fontsize{45\p@}{55\p@} \bfseries #1           }          }\thispagestyle{empty}\clearpage}         \def\@makeschapterhead#1{%          \vspace*{50\p@}%         \noindent\hspace*{.1\linewidth}\smash{\rule[-2\textheight]{5pt}{3\textheight}}%        Thick rule        \hspace{.05\linewidth}\smash{\rule[-2\textheight]{2pt}{3\textheight}}% Thin rule        \hspace{.1\linewidth}%        {\parbox[t]{\dimexpr.75\linewidth-7pt}{\raggedright        \fontsize{45\p@}{55\p@} \bfseries #1        }        }\thispagestyle{empty}\clearpage}       \makeatother       \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}          \begin{document}               \maketitle          \chapter*{Agradecimiento}      \lipsum[1]      \end{document}


title: How to get the section title by section number?

text: > This is a follow-up question to How to print section titles like tab-list?. I want to insert section titles somewhere in the background in every pages. (It could be chapter titles, well) I've searched around but did'nt find anything other then the current section title. MWE-1:               \documentclass{article}     \usepackage{lipsum}          \begin{document}              \section{The first section}         \lipsum[1-3]              \section{The second section}         \lipsum[1-3]              \section{The third section}         \lipsum[1-3]              \section{The fourth section}             Hi, I'm the 4th.             The title of the 2nd section is... ?? Huh??              \section{The fifth section}         \lipsum[1-3]              \section{The sixth section}         \lipsum[1-3]              \section{The seventh section}         \lipsum[1-3]          \end{document}      MWE-2: In practice, I need to typeset actual section titles in the following tab buttons:               \documentclass{article}     \usepackage[a5paper,vmargin=2cm]{geometry}     \usepackage{background}     \usepackage{etoolbox}     \usepackage{totcount}     \usepackage{lipsum}          % to have access to the total number of sections     \regtotcounter{section}          % every section starts on a new page     \pretocmd{\section}{\clearpage}{}{}          % auxiliary lengths for the height of the frame and the width of each tab     \newlength\frameheight     \newlength\avgtabwidth          % style for the section tabs     \tikzset{tab/.style={         text width=\avgtabwidth,anchor=south,         draw=gray,thick,rectangle,rounded corners=12pt,rotate=270,         align=center,text height=20pt,         text depth=25pt,inner sep=0pt,fill=gray!20,         yshift=-18pt,font=\sffamily\LARGE}}     % style for the current section tab     \tikzset{selectedtab/.style={tab,color=white,fill=gray!90}}          % the page number is showed in the background material     \pagestyle{empty}          \AtBeginDocument{         % calculation of the width for each tab         \setlength\frameheight{\dimexpr\textheight+2cm\relax}         \ifnum\totvalue{section}>0             \setlength\avgtabwidth{\dimexpr\frameheight/\totvalue{section}\relax}         \fi              % the main part; as background material we place the border,          % the section (current and other) tabs and the page number          \backgroundsetup{scale=1, color=black, angle=0, opacity=1, contents={             \begin{tikzpicture}[remember picture, overlay]                 \node[inner sep=0pt, text width=\the\dimexpr\textwidth+1.5cm]                      at (current page.center) (border)                      {\rule{0pt}{\dimexpr\textheight+2cm\relax}};                 \foreach \valsection in {0,...,\numexpr\totvalue{section}-1\relax} {                     \node[\ifnum\thesection<\numexpr\valsection+1 tab\relax                             \else \ifnum\thesection>\numexpr\valsection+1 tab\relax                             \else selectedtab\fi\fi,                            xshift=(0.5+\valsection)*\avgtabwidth]                         at (border.north east) (tab-\valsection)                         {Section \the\numexpr\valsection+1\relax};                 }                 \node[draw=gray, line width=2pt, rectangle, rounded corners=10pt,                       inner sep=0pt, text width=\the\dimexpr\textwidth+1.5cm\relax, fill=white]                      at (current page.center) {\rule{0pt}{\dimexpr\textheight+2cm\relax}};                 \node[font=\LARGE\sffamily,fill=white]                      at (border.south) {\makebox[3em][c]{\thepage}};             \end{tikzpicture}         }}     }               \begin{document}          \section{Test Section One}     \lipsum[1-3]     \section{Test Section Two}     \lipsum[1-3]     \section{Test Section Three}     \lipsum[1-3]     \section{Test Section Four}     \lipsum[2]          \end{document}


title: Getting chapter title bigger

text: I would get bigger only the chapter title. I heard I should use `titlesec` package but I didn't understand how I should use it to achieve what I mean. I'm using `book` class


title: Pygments/pythontex : how to disable red boxes around non usual characters?

text: Sometimes pygments puts characters in red boxes, and I'd like to disable this feature. In the following example:               \documentclass[a4paper,10pt]{report}     \usepackage[latin1]{inputenc}     \usepackage[francais]{babel}     \usepackage{pythontex}          \begin{document}          \begin{pygments}{python}     >>> a = "L'été sera chaud"     >>> zeros(4, 0)     AssertionError: Dimensions négatives ou nulles.     \end{pygments}          \end{document}       the first two "é" are correctly displayed, but the last one in "négatives" is boxed, and I'd like to remove this ugly box. I apologize for this newbie question, but I couldn't find any help in the massive pygments documentation, wich is way too complex for me.


title: Is there any good and complete tutorial for pgfplots

text: I'm working on converting matlab files to TiKz, and I wanted to do it as cute as possible... Can anybody help me to find a good and complete tutorial for "pgfplots" ?


title: Top-align two parboxes with tables

text: I am looking for a two-column solution: The left column contains one table, the right column several tables. I was thinking of using `parbox`es as follows:               \parbox[t]{2cm}{\vspace{0pt}     \begin{tabular}{ccc}     x & x & x\\     x & x & x\\     x & x & x\\     x & x & x\\     x & x & x     \end{tabular}}     \hfill      \parbox[t]{2cm}{\vspace{0pt}     \begin{tabular}{ccc}     x & x & x\\     x & x & x     \end{tabular}\\[1em]     \begin{tabular}{ccc}     x & x & x      \end{tabular}}      But this creates a nasty space between whatever comes before the two columns. Without `\vspace{0pt}`, the two first tables in both columns are not top- aligned. I am looking for a top-aligned solution without the extra space before the two columns. ![](http://i.stack.imgur.com/WxDTD.png)


title: Using bibtool with biblatex

text: I'm trying to use bibtool to extract bibliography information from an aux file. I'm using this MWE:               \documentclass[12pt]{article}     \usepackage{filecontents}     \begin{filecontents}{foo.bib}     @Book{dickens,         author={Charles Dickens},         title={A Tale of Two Cities},         year=1859,         publisher={Chapman and Hall}       }     \end{filecontents}     \usepackage[style=verbose]{biblatex}     \bibliography{foo}          \begin{document}     \cite{dickens}          \end{document}      When I run:               bibtool -x test.aux -o refs.bib      I get the following errors:               *** BibTool WARNING:  (line 2 in ./test-blx.bib): 23 non-space characters ignored.          *** BibTool WARNING:  (line 9 in ./test-blx.bib): 168 non-space characters ignored.          @Control{biblatex-control,     _^     *** BibTool ERROR:  (line 9 in ./test-blx.bib): Unknown entry type          *** BibTool WARNING: Skiping to next '@'          *** BibTool WARNING:  (line 5 in ./foo.bib): 96 non-space characters ignored.      My `test.aux` is as follows:               \relax      \bibstyle{biblatex}     \bibdata{test-blx,foo}     \citation{biblatex-control}     \citation{dickens}     \@writefile{toc}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }     \@writefile{lof}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }     \@writefile{lot}{\boolfalse {citerequest}\boolfalse {citetracker}\boolfalse {pagetracker}\boolfalse {backtracker}\relax }     \abx@aux@page{1}{1}      I presume this problem is because this tool has been written for bibtex rather than biblatex. Is there a way to use this tool to extract the information, or is there a way to extract the bibliography information I need?


title: How to make \left<\overrightarrow{b}\right> look good?

text: I want a 'b' with an arrow on top, enclosed in angle brackets.               \left<\overrightarrow{b}\right>      gives angle brackets which are far too high.               <\overrightarrow{b}>      gives far too much horizontal space between the brackets and the `\overrightarrow{b}`:               \left<\smash{\overrightarrow}\right>      makes that formula look good, but the upper end of the 'b' touches the line above. So what I want is basically a `\smash` that only affects the brackets, but not e.g. line spacing. Is this possible?


title: Sequence of upgrading to TeX Live 2013

text: Since TUG says there is no upgrade from TeX Live 2012 to 2013, it has to be a new install. However, I do not want to have two versions of TeX Live and I don't want to mess up system `PATH` (Windows 7). Is it the right procedure to uninstall 2012 first, and then install 2013 ? Will other programs such as Emacs redirect link to new 2013 installation correctly? * * * ## Update I ended up install 2013 first, changed system environment PATH and made sure things work, and then uninstalled 2012. So I guess the order doesn't matter as long as the PATH is correct.


title: Pgfplots, problem with pin and [francais]{babel}

text: When I don't use babel package, pins are ok. I suspect there is a problem with the `colon`, in french we put a space before and after, but how to tell pgfplot not to do it?               \documentclass{standalone}     \usepackage{pgfplots}     \usepackage[francais]{babel}     \begin{document}     \begin{tikzpicture}         \begin{axis}             \addplot[domain=0:1,samples=20,smooth,blue,thick](             {(1-x)^2*1+2*(1-x)*x*5+x^2*10},             {(1-x)^2*5+2*(1-x)*x*25+x^2*30}             );             \addplot[domain=0:1,samples=20,smooth,blue,thick]             coordinates{(10,30) (20,40)};                  \addplot[red,very thin] coordinates{(0,0) (8,40)};             \addplot[red,very thin] coordinates{(0,20) (10,30)};             \node [coordinate, pin=-30:{$P_0$}] at (axis cs:1,5) {};             \node [coordinate,pin={150:{$P_1$}}] at (axis cs:5,25) {};             \node [coordinate,pin=-30:{$P_2$}] at (axis cs:10,30) {};         \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/4p44F.png)


title: Variations in ldots

text: Here is my code:                \documentclass{article}      %\usepackage{unicode-math}      %\setmathfont{Latin Modern Math}      \begin{document}      The letters $a, \ldots, z$ are used.      \end{document}      It produces this output, when typesetting with XeLatex: ![enter image description here](http://i.stack.imgur.com/09eKG.jpg) If I uncomment the second line, I get: ![enter image description here](http://i.stack.imgur.com/xjGm6.jpg) If I uncomment the second and third lines, I get: ![enter image description here](http://i.stack.imgur.com/Q1DU7.jpg) My questions are: (1) Are these the expected/correct results, or does it look like my TeX or font installation is somehow messed up? (2) I suppose the third result is a consequence of the design of the ellipsis character in the Latin Modern fonts. Is this design as intended, or is it regarded as a bug? I personally don't like how it looks, but that's just a matter of taste, I guess.


title: Crop equations with preview package

text: Is it possible to avoid left space from equations previewed with preview package?               \documentclass{minimal}     \usepackage{amsmath}     \usepackage[active,tightpage,displaymath]{preview}     \setlength\PreviewBorder{5pt}%          \begin{document}     \[x=3+y^2\]     \end{document}      The result is: ![enter image description here](http://i.stack.imgur.com/60sgM.png) I would like a clipped (cropped?) equation. Is it possible? Do you know a better solution to extract equations as images?


title: Resuming a list

text: I'd like to be able to resume an enumerated list, continuing the old numbering, after some intervening text which should not be formatted like a list item. Is there a nice way to do this? In particular, I _don't_ want to start a second list with a hard-coded initial counter value, because that will break if I change the number of items in the first list.


title: Retrieving the number of items in the previous list

text: I am trying to retrieve the number of items in a list and use it as the starting number in the next list. I used the following code.               \documentclass{article}     \usepackage{enumitem}          \begin{document}     This is the first list.     \begin{enumerate}[label=M\arabic*.]         \item item number one.         \item item number two.         \item item number three.     \end{enumerate}          This is the second list.          \begin{enumerate}[label=M\arabic*., start=4]         \item item number four.         \item item number five.         \item item number six.     \end{enumerate}          \end{document}      How can I replace `start=4` with a code such that it automatically finds the number of items in the previous list, add one to it, and finally use it as the argument of `start`?


title: How to continue an enumeration?

text: > **Possible Duplicate:**   >  Resuming a list What is the best way to extend an enumeration such that the next enumeration environment does not start with one but with the number following the last item from the previous enumeration? (Let's ignore the problem of nested `enumerate` environments.)               \documentclass{article}          \begin{document}         \begin{enumerate}         \item One         \item Two             \end{enumerate}              Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod.               \begin{enumerate}         \item Three         \item Four              \end{enumerate}     \end{document}      ### This is a Duplicate See Resuming a list.


title: How to have the same counter in two enumerate lists?

text: > **Possible Duplicate:**   >  Resuming a list I want to have an enumerate list which is broken in the middle by some text. What I have at the moment is something along the lines of this,               \renewcommand{\labelenumi}{(\roman{enumi})}     \newtheorem{theorem}{Theorem}          \begin{theorem} We are in the theorem environment,       \begin{enumerate}         \item\label{condition1}the first condition,         \item\label{condition2}the second condition,       \end{enumerate}     \end{theorem}          We have exited the theorem environment. We also have one more condition,          \begin{enumerate}       \item[\emph{(iii)}]\label{condition3}\emph{the third condition}.     \end{enumerate}      However, I do not like the fact I have to manually number the final condition, and it also leaves me with problems when referencing. I was therefore wondering if it is possible to connect the counters in the two lists? Otherwise (and clearly this is less than ideal), is there a way of getting \ref{condition2} to be (iii) (that is, what it is in the square brackets). There must be some way of doing this, but I cannot find it! Currently, it spits out...2 (so clearly my issues go deeper than just this question! However, a solution to one of these question would pretty much sort everything out...). > EDIT The solutions given in the Resuming a list question do not seem to work in my example. Two solutions were proffered: The second solution, which gets LaTeX to save the counter manually, I cannot get to work in my document, although it does work when I make a sample document. This is similar to the answer given below, which _does_ work in my document, so I will not dwell on this. The first solution has a subtle problem, which makes it unsuitable for my use. This solution uses the enumitem package. The solution works if the document contains only one Theorem, or if both lists are not straddling a theorem in any way. However, the following does not work (and this most closely resembles what I am doing),               \documentclass{article}     \usepackage{enumitem}     \renewcommand{\labelenumi}{(\roman{enumi})}     \newtheorem{theorem}{Theorem}          \begin{document}     \begin{theorem} We are in the theorem environment,       \begin{enumerate}         \item \label{condition1}the first condition,         \item \label{condition2}the second condition,       \end{enumerate}     \end{theorem}          We havve exited the theorem environment. We also have one more condition,     \begin{enumerate}[resume]       \item \label{condition3}\emph{the third condition}     \end{enumerate}          \begin{theorem}       We have another theorem.     \end{theorem}     \end{document}      Here, the counter is reset when we exit the theorem environment so we get,               (i) the third condition.      while we actually want               (iii) the third condition.      and the same thing happens to the reference (the code I've got above will give `\ref{condition3}` as `1`)


title: how to create enumeration spanning multiple paragraphs?

text: > **Possible Duplicate:**   >  Resuming a list i want to create a list which has arbitrary sized paragraphs in between: ![screenshot of document as it should look like](http://i.stack.imgur.com/P9uTw.png) How can i do this? (what i have now is done with centering and there is no automatic numbering)


title: 3 columns in a landscape document with flowfram

text: I'm trying to create a simple 2 pages document in landscape format, with 3 columns on each page. I'm trying the `\Ncolumn{3}` command of package `flowfram` because `multicols` refuses float figures inside columns. Currently my draft is:               \documentclass[11pt,a4paper]{article}     \usepackage[margin=1cm,landscape]{geometry}          \usepackage[draft]{flowfram}     \ffvadjustfalse     \setlength{\columnsep}{1cm}     \Ncolumn{3}          \usepackage{fontspec,xltxtra,xunicode}     \defaultfontfeatures{Mapping=tex-text}     \setmainfont{Linux Libertine O}          \usepackage{eurosym}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{color,graphicx}     \graphicspath{{images/}}          \usepackage[french]{babel}          \usepackage{lipsum}          \begin{document}          \lipsum[1-2]     \framebreak          \lipsum[1-2]     \framebreak          \lipsum[1-2]     \framebreak          \clearpage          \lipsum[1-2]     \framebreak          \lipsum[1-2]     \framebreak          \lipsum[1-2]     \framebreak          \end{document}      I expected 2 pages with 3 columns on each, instead I'm stuck with 3 pages with 2 columns plus a blank in the middle on each. Any idea how to fix that?


title: Wrong section counter for references when using titlesec

text: Changing the style of my sections using the package `titlesec` works fine with these lines               \usepackage{titlesec}     \titleformat{\section}[block]{\large\scshape\centering{\Roman{section}.}}{}{1em}{}      but after adding my literature to the end of the file...               \bibliographystyle{plain}     \bibliography{literature}      ...the counter doesn't increase and the spacing is not entirely correct for the references section. However, the heading has the defined section style. Do you have a solution for having a consistent counter?


title: missing tick labels for symbolic coords in second plot

text: I am attempting to draw two plots in the same axis environment. Both plots use symbolic X coordinates (and symbolic Y coordinates) but X values that don't appear in the first plot will not make it into the final plot's X axis labels, i.e. those X coordinates that appear only in the 2nd plot will not get an X tick label. **How can I make those labels show up for all my symbolic X coordinates?** Using `xticklabels` does not seem to do the trick. ![missing x tick labels rendering](http://i.stack.imgur.com/l1Ad6.png)   `b2` and `c2` should appear on the X axis, too.               \documentclass{standalone}          \usepackage{filecontents}     \usepackage{pgfplots, pgfplotstable}          \pgfplotsset{compat=1.9}     \begin{filecontents}{dataI.csv}     xitem,yitem,val     a1,X,0.1     a2,Y,0.5% adding this will make the a2 label appear, but I don't want this value. And using `nan` will be plotted as 0.     a1,Z,0.3     b1,Y,0.5     b1,Z,0.6     c1,X,0.8     \end{filecontents}     \begin{filecontents}{dataII.csv}     xitem,yitem,val     a2,X,0.1     b2,Y,0.5     b2,Z,0.6     c2,Y,0.8     c2,Y,0.7     \end{filecontents}          \pgfplotstableread[col sep=comma]{dataI.csv}\datatableI     \pgfplotstableread[col sep=comma]{dataII.csv}\datatableII          \begin{document}          \begin{tikzpicture}     \begin{axis}[         xtick=data, ytick=data, unbounded coords=jump,         symbolic x coords={a1,a2,b1,b2,c1,c2}, symbolic y coords={X,Y,Z},         xticklabels={a1,a2,b1,b2,c1,c2},% has no effect         y dir=reverse, axis line style={draw=none}, tick style=transparent,         y tick label style={inner sep=0, font=\tiny,},         x tick label style={inner sep=0, font=\tiny, rotate=90, anchor=east,},         enlarge x limits={abs=1mm}, enlarge y limits={abs=1mm},         x=2mm, y=2mm,     ]     \addplot[         mark=square*, mark size=1mm, only marks, scatter, mark options={outer sep=0}, scatter/use mapped color={fill=mapped color,draw opacity=0},         point meta=explicit,     ] table [col sep=comma, x=xitem, y=yitem, meta expr=\thisrow{val},]{\datatableI};     \addplot[ mark=diamond*, mark size=1mm, only marks, scatter, mark options={outer sep=0}, scatter/use mapped color={fill=mapped color,draw opacity=0},         point meta=explicit,     ] table [col sep=comma, x=xitem, y=yitem, meta expr=\thisrow{val},     ] {\datatableII};     \end{axis}     \end{tikzpicture}     \end{document}


title: TOC entries in Small Caps

text: I want to have my TOC entries in Small Caps. I cant get by using `\textsc{\tableofcontents}` rather than `\tableofcontents` but this adds a blank page before TOC. Any help will be highly appreciated. Thanks               % Document Class     \documentclass[a4paper,12pt]{book}          % Packages     \usepackage[english]{babel}     \usepackage{blindtext}          \usepackage{titlesec}     \titlespacing*{\chapter}{0pt}{-50pt}{20pt}     \titleformat{\chapter}[display]{\normalfont\scshape\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}               \titleformat{\section}       {\normalfont\scshape\Large\bfseries}{\thesection}{15pt}{\LARGE}               \titleformat{\subsection}       {\normalfont\scshape\large\bfseries}{\thesubsection}{15pt}{\Large}                    \begin{document}          \tableofcontents               \chapter{First Chapter}          \section{Introduction}          % Blind Text     \blindtext[1]               \section{Material \& Method}          % Blind Text     \blindmathpaper               \chapter{Second Chapter}          \section{Introduction}          % Blind Text     \blindtext[1]               \section{Material \& Method}          % Blind Text     \blindmathpaper               % End Document     \end{document}


title: Shortcut for arrows on curves in TikZ

text: If I want to draw a curve with an arrow somewhere along its length (say 40% along), I can write this:               \draw [decoration={                  markings,                  mark=at position 0.4 with \arrow{>}}            ,postaction=decorate]            (A) to (B);      If I want to draw lots of curves with the same decoration, I can put most of this in a scope and reduce how much I have to type for each path. However, if I want to draw lots of curves with different parameters - say, each one needs to have the arrow at a different position, and the choice of < or > could vary between curves. Then it seems I have a lot of typing to do for each curve. What I'd like to do is define something like this:               \newcommand\arrowdata[2]{decoration={                  markings,                  mark=at position #1 with \arrow{#2}}            ,postaction=decorate}      Then I can draw my arrows with ease:               \draw [\arrowdata{0.3}{>}] (A) to (B);     \draw [\arrowdata{0.95}{<}] (C) to (D) to (E);      and so on. But, this doesn't work, and I don't understand the error messages that result. Clearly I'm being too naive in my understanding of how macros apply in TikZ. Can someone help me out?


title: Fit coloured longtable to pagewidth

text: There is a similar question and solution posted here. However, I can't use this solution as I have a coloured table, and the given solution causes white gaps between each column. Is there a way to fit a coloured long table to the width of a page (including landscape pages) so that the row colouring is maintained? Here is an example of my current code:               \documentclass{article}          \usepackage[table]{xcolor}     \usepackage{float}     \usepackage{array}     \usepackage{longtable}          \restylefloat{table}          \definecolor{Gray}{gray}{0.65}     \definecolor{Blue}{RGB}{0,176,240}     \definecolor{light-gray}{gray}{0.90}          % Margins     \topmargin=-0.45in     \evensidemargin=0in     \oddsidemargin=0in     \textwidth=6.5in     \textheight=8.5in     \headsep=0.25in           \linespread{1.1} % Line spacing          \newcommand{\specialcell}[2][c]{\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}     \newcommand\setrowfont[1]{\noalign{\gdef\rowfont{#1}}}     \gdef\rowfont{}          \makeatletter     \newcommand*{\@rowstyle}{}          \newcommand*{\rowstyle}[1]{% sets the style of the next row       \gdef\@rowstyle{#1}%       \@rowstyle\ignorespaces%     }          \newcolumntype{=}{% resets the row style       >{\gdef\@rowstyle{}}%     }          \newcolumntype{+}{% adds the current row style to the next column       >{\@rowstyle}%     }     \newcolumntype{C}{>{\rowfont}c}          \let\oldlongtable\longtable     \let\endoldlongtable\endlongtable     \renewenvironment{longtable}{\rowcolors{2}{light-gray}{Gray}\oldlongtable} {     \endoldlongtable}          \begin{document}          % Normal     \setlength\LTcapwidth{\textwidth}     \setlength\LTleft{-10cm plus -1fill}     \setlength\LTright{\LTleft}     \begin{longtable}{=C+C+C}     \rowcolor{Blue}      \rowstyle{\color{white}}     A & B & C \\     1 & 2 & 3 \\     4 & 5 & 6 \\     7 & 8 & 9 \\     \end{longtable}          % To page width but has white gaps between columns     \setlength\LTcapwidth{\textwidth}     \setlength\LTleft{0pt}     \setlength\LTright{0pt}     \begin{longtable}{@{\extracolsep{\fill}}=C+C+C}     \rowcolor{Blue}      \rowstyle{\color{white}}     A1 & B1 & C1 \\     1 & 2 & 3 \\     4 & 5 & 6 \\     7 & 8 & 9 \\     \end{longtable}          \end{document}      Generates: ![enter image description here](http://i.stack.imgur.com/aske6.png)


title: BibTeX: Author's surname followed by multiple initials

text: I'm having some difficulty trying to get BibTeX to show an Author's surname followed by multiple initials in my bibliography. I have quite a large bibliography and I have several authors, including myself, that have very common first names and surnames (e.g. Smith, C.). The only way to distinguish ourselves is by our middle initials. I've used this answer here to create a "myplainnat.bst", replacing `{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=` with `{ s nameptr "{vv~}{ll}{, f.}{, jj}" format.name$ 't :=` so that I get a reference that is formatted: Other, A., Other, A. Title. _Journal_. vvv.iii.pp-pp. DOI But I can't work out which bit of the code I'm supposed to change to get something along the lines of: Other, A.N. Other, A.J. Title. _Journal_. vvv.iii.pp-pp. DOI Initially I thought it would be the f's in the code, so I added `f.f.f.` but this prevented any initials from being displayed. If anyone could shed some light on this that would be great. Here's a MWE of my code: Document:               \documentclass[12pt,a4paper]{report}     % International language package - allows use of special characters     \usepackage[utf8]{inputenc}     % Natural bibliography package - allows compliation of a bibliography     \usepackage[round,colon]{natbib}     % Caption package - allows captioning of figures and tables     \usepackage{url}     % Nomenclature package - allows for the creation of a nomenclature          %%%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%     %%  DOCUMENT  %%     %%%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%     \begin{document}          \chapter{Literature review}     \section{Radioactive decay}\label{sec:radioactive decay}          I'd like to cite some text with author's with multiple initials \citep{fitch1974timescale}.  And here's another one \citep{buchholz2007uranium}.          \bibliographystyle{myplainnat}     \bibliography{bibliography}          \end{document}      Bibliography:               @article{fitch1974timescale,        author = {Fitch, F. J. and Forster, S. C. and Miller, J. A.},        title = {{Geological time scale}},        journal = {Reports on Progress in Physics},        volume = {37},        number = {11},        pages = {1433-1496},        abstract = {Presents a brief discussion of the assumptions, accuracy and precision of 'geological' errors present in physical geochronometry. The five major physical methods of rock and mineral age determinations currently in use, are described.},        year = {1974}     }          @article{buchholz2007uranium,        author = {Buchholz, B.A. and Brown, T.A. and Hamilton, T.F. and Hutcheon, I.D. and Marchetti, A.A. and Martinelli, R.E. and Ramon, E.C. and Tumey, S.J. and Williams, R.W.},        title = {{Investigating uranium isotopic distributions in environmental samples using AMS and MC-ICPMS}},        journal = {Nuclear Instruments and Methods in Physics Research Section B: Beam Interactions with Materials and Atoms},        volume = {259},        number = {1},        pages = {733-738},        year = {2007},        doi = {http://dx.doi.org/10.1016/j.nimb.2007.01.248}     }      And here's a link to my modified myplainnat.bst file. Here's an image of what my bibliography output looks like, as you can see each author only shows one initial, despite multiple initials being present in the bibliography file. ![enter image description here](http://i.stack.imgur.com/XMdDa.png)


title: Three tables side by side

text: I have three tables and I need that the three tables stays side by side. I tried with this approach but the tables are overlapping each other.               \begin{table}[!htb]\tiny         \begin{minipage}{.20\linewidth}         \caption{First Table}          \label{tab:first_table}           \centering              \begin{tabular}{ccccc}         \toprule         {\bf Library} & {\bf Comedy} & {\bf Scary} & {\bf Others} \\         \midrule         Library1 & $23$ & $233$ & $3295$ \\         Library2 & $843$ & $0$ & $0$ \\         Library3 & $11$ & $1$ & $0$ \\         Library4 & $1$ & $0$ & $0$ \\         \midrule         {\bf Total} & $878$ & $234$ & $3295$ \\         \bottomrule         \end{tabular}         \end{minipage}%         \begin{minipage}{.20\linewidth}           \centering             \caption{Second Table}         \label{tab:second_table}             \begin{tabular}{ccccc}         \toprule         {\bf Library} & {\bf Comedy} & {\bf Scary} & {\bf Others} \\         \midrule         Library1 & $954$ & $40$ & $0$ \\         Library2 & $32$ & $0$ & $1$ \\         Library3 & $11$ & $132$ & $110$ \\         Library4 & $1$ & $30$ & $67$ \\         \midrule         {\bf Total} & $998$ & $202$ & $178$ \\         \bottomrule         \end{tabular}               \end{minipage}%         \begin{minipage}{.20\linewidth}             \centering             \caption{Third Table}         \label{tab:third_table}                 \begin{tabular}{ccccc}         \toprule         {\bf Library} & {\bf Comedy} & {\bf Scary} & {\bf Others} \\         \midrule         Library1 & $483$ & $27$ & $2$ \\         Library2 & $848$ & $220$ & $3$ \\         Library3 & $121$ & $12$ & $40$ \\         Library4 & $13$ & $0$ & $0$ \\         \midrule         {\bf Total} & $1465$ & $250$ & $45$ \\         \bottomrule         \end{tabular}         \end{minipage}      \end{table}      ![enter image description here](http://i.stack.imgur.com/FfSBQ.png)


title: Libertine fonts: spaces in PDF files

text: I am having trouble with the "libertine" font package using TexLive 2014. A PDF file generated will display properly, including interword spaces, but when I save from Acrobat to some other format (such as .txt or .rtf) there are no interword spaces. The only spaces appear where lines in the PDF file are broken. This is true with pdflatex and lualatex, with T1 and OT1 font encoding, and with different versions of Acrobat. I don't have this problem with other fonts, including CM and Charter. Is there a simple fix for this? Edited to include this code example:               \documentclass{article}     \usepackage{libertine}     \usepackage{lipsum}     \setlipsumdefault{1}     \begin{document}     \lipsum     \end{document}


title: why are table lines are not black?

text: my problem is that the lines of my tables (not all but most of them) are not really black but gray. Furthermore, the gray lines are also thinker than the other, which makes my tables look really bad. I'm using Lyx and compiling with XeTeX. I don't use any color in the document, so all color settings are default. The rest of the document has a wonderful black I tried to change the line color to green (following the Lyx help), for testing reasons and this worked:               \usepackage{colortbl}     \let\myHlineC\hline     \renewcommand{\hline}     {\arrayrulecolor{green}\myHlineC\arrayrulecolor{green}}      when I change 'green' to 'black', it's the same problem when I define a new color 'newblack' with `\definecolor{newblack}{rgb}{0,0,0}` and change the color 'green' to 'newblack', it's also the same problem Any ideas whats wrong?


title: reducing spaces in TOC titles

text: Is it possible to manage that space in this following TOC defined in the picture between alphabets and related titles to make smaller, please ? Knowing that the definition of these titles is `\renewcommand\theparagraph{\alph{paragraph}}`. ![enter image description here](http://i.stack.imgur.com/s6n4K.png) Thanks in advance !


title: How can I produce 3 centered columns, with the middle one fitting the width of its content?

text: How can I produce a document similar to this, but cause the middle column to take up only as much space as it needs (rather than explicitly specifying a width), such that as much space as possible is available to the left and right columns?               \documentclass{article}          \begin{document}     \noindent     \fbox{\parbox{0.333\textwidth}{\centering Left content centered \\ between margin and title }}     \fbox{\parbox{0.333\textwidth}{\centering \Huge Title }}     \fbox{\parbox{0.333\textwidth}{\centering Right content \\ also centered }}          \end{document}      ![enter image description here](http://i.stack.imgur.com/qyL3c.png)


title: How can I fine tune the spacing between the question and the start of the question's text in an exam environment

text: I want to make questions in my exams, some of which just ask a question, some have an intro then parts, and then others launch straight into parts. If I use the following:               \documentclass[addpoints,12pt,a4]{exam}       \usepackage{mathptmx}       \qformat{\textbf{\thequestion .} \hspace{0.2cm} \slshape [Maximum mark: \thepoints] \hfill}       % \renewcommand{\questionshook}{\setlength{\parsep}{4mm}} I'm not using this bit but I know %        % how to adjust the space to the parts %       \begin{document}         Blah blah blah...         \begin{questions}           \question[3]             This question has got quite a wordy introduction that may spill over onto a second or even              a higher number of successive lines all chock full of vital information.             \newline Given that this question has some parts, how would you:             \begin{parts}               \part Answer this. \hfill \textit{[1 mark]}               \part Answer that. \hfill \textit{[2 marks]}             \end{parts}           \question[16]             \begin{parts}               \part This question doesn't have an intro so just answer it. \hfill   \textit{[1 mark]}               \part And then answer this bit. \hfill \textit{[15 marks]}             \end{parts}           \question[2]             This one is dead easy, so just answer it.         \end{questions}         \end{document}      Then I don't like the horizontal spacing. If you compare the distance from the [Maximum mark:...] to the text in the intro-ed and non-parted questions (1 & 3) to the distance in question 2, it differs. I want to be able to make the distance increase for questions like 1 & 3 to at least the same as in Q2, or even better to a distance of my choosing. I can do it by changing the line spacing, but then the multiple lines of text in Q1's introduction become similarly spaced out - again, not what I want. I want control over _just_ the spacing from points to the questions. Is it possible?


title: Huge matrix in my document. Possible ways to make it look better?

text: The following is the source for a matrix I'm using in my document:               \documentclass{scrartcl}     \usepackage[english]{babel}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}          \setcounter{MaxMatrixCols}{19}          \begin{document}     \[\begin{pmatrix}     1 & & & & & & & & & & & & & & & & & &\\     & 1 & & & & & & & & & & & & & & & & &\\     & & 1 & & & & & & & & & & & & & & & &\\     & & & 1 & & & & & & & & & & & & & & &\\     \beta_1 & \alpha & & & 1 & & & & & & & & & & & & & &\\     \beta_2 & \beta_1 & & & & 1 & & & & & & & & & & & & &\\     & \beta_2 & & & & & 1 & & & & & & & & & & & &\\     \beta_3 & & \alpha & & & & & 1 & & & & & & & & & &\\     \beta_4 & & \beta_3 & & & & & & 1 & & & & & & & & &\\     & & \beta_4 & & & & & & & 1 & & & & & & & & &\\     \beta_5 & & & \alpha & & & & & & & 1 & & & & & & & &\\     \beta_6 & & & \beta_5 & & & & & & & & 1 & & & & & & &\\     & & & \beta_6 & & & & & & & & & 1 & & & & & &\\     \beta_7 & \alpha & & & & & & & & & & & & 1 & & & & &\\     \beta_8 & \beta_7 & & & & & & & & & & & & & 1 & & & &\\     \beta_9 & & \beta_8 & & & & & & & & & & & & & 1 & & &\\     \beta_{10} & & \beta_9 & & & & & & & & & & & & & & 1 & &\\     \beta_{11} & & & \beta_{10} & & & & & & & & & & & & & & 1 &\\     & & & \beta_{11} & & & & & & & & & & & & & & & 1     \end{pmatrix}\]     \end{document}      The output looks very strange since the first four colums are wider than the last. But I guess I can't fix that, because otherwise the matrix would be too wide. Do you have any idea on what I could do to make the matrix look 'better'? Any suggestions are welcome. I have already thought of splitting the matrix up and only specifying the important 15x4 part. ![Output](http://i.stack.imgur.com/SkraF.png)


title: automatix bibtex generation for documents in a folder

text: Is there reliable package or software to generate ***.bib** files for documents contained in a folder ? I found Mendeley but it does not work as I expected.


title: Reverse graphics in pgfplots

text: ## Issue and Question I encountered that my graphics are all _upside down_. Now I have to mirror them in `pgfplots`. How can I perform this step? It is no solution using the option `[y dir=reverse]` which also turns the axis label upside down (MWE):               \documentclass{standalone}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}     \begin{axis}[y dir=reverse]         \addplot graphics {GraphicsFile.png};     \end{axis}     \end{tikzpicture}     \end{document}      ## Appearance This issue appeared due to the usage of `matlab2tikz` where in MATLAB. I performed the following command to correct the orientation.               set(gca,'Ydir','normal');      Now that I applied all changes/adaptations to my figures I do not want to go back. But maybe you could also give a short answer about improving my usage of MATLAB.


title: List of all modules in ConTeXt

text: Is there a comprehensive updated list of modules currently maintained? The ConTeXt wiki page for modules provides some but I am not sure if it is updated and which ones would be obsolete. It would be nice if the ConTeXt users here at TeX.SX can highlight the modules they use the most and provide some description of there usage.


title: Vertical space in lists

text: What is the best way to _globally_ change the amount of vertical space between items in list environments?


title: How to reduce space between enumerate

text: \begin{enumerate}     \item item 1     \item item 2      \item item 3     \end{enumerate}      How to reduce the space between item 1,2,3?


title: Reduce spacing between items

text: > **Possible Duplicate:**   >  Vertical space in lists Please, how can I reduce spacing between items ?               \begin{itemize}          \item[\textbullet]  first     \item[\textbullet]  second     \item[\textbullet] third          \end{itemize}


title: How to reduce line space (leading) within an enumerate environment?

text: > **Possible Duplicate:**   >  Vertical space in lists Enumerated items seem distant from each other by default settings in the `enumerate` environment. How can I change that globally (I've seen other solutions, but needed to know which is the best practise), and more importantly for one single instance of an `enumerate` or `itemize` environment?


title: How to change the space between the itemize "items" in LaTeX?

text: > **Possible Duplicate:**   >  Vertical space in lists How to change the space between the itemize "items" in LaTeX so that I can continue to use the "itemize" and "item" tag without needing to redefine any new tags?