title: Drawing a box with shading in pgfplots

text: As a follow-up to this question, or more precisely this answer, I'd like to know how to do the equivalent of               \shadedraw       [shading=axis,left color=green,right color=orange,color=blue,line width=2]        (2,0) -- (2,1)        {[rounded corners=1em] -- (3,1)} --       (3,0) -- (2,0);      using pgfplots such that the shading is done in the CMYK colorspace. (This would then be used in `baposter` as a replacement for the shading in the headers of the boxes.)


title: Template for a talk with a column to hold abridged content

text: I'm looking for either a template (or some pointers to generate one) for using to give talks. What I'm looking for is something that will allow a column for the 'full' talk, and then a second for notes, such that I can mostly work from the notes, but move back to the relevant point in the richer text should I lose my place. At the moment I fudge it with margin notes, and wide right margins. **Edit** This is for me to give a talk from, not something to display. I'm after something that will allow me to use shorter notes to talk from, but still give me the fall back of a fuller text. I guess something like:               I want to talk today about the benefits of using version control software,      such as git, \righthandnote{Benefits of VCS and LaTeX} with talks, and why     pure text based systems such as LaTeX are a natural fit, allowing for easy     text based diffs, patching, etc.  The actual files are also smaller, and      and mean that entire repositories can be made available fairly easily.  I'm     now going to filler filler filler....      The paragraph would be then on the left (1/2-2/3 width), and the \righthandnote would take the rest of the width, and be matched to the paragraph to allow me to see where I should move to, if I've lost the flow of what I was saying. Does that clarify what I'm after? It's to help me move away from full talks to notes, but with a fallback position.


title: use a "+" or "-" by itself without terms

text: I want to typeset an I with a subscripted "+" sign. How can I do this? I know there's a trick to tell TeX that there are no operands, but I can't remember what it is, and I can't seem to search for it on the Internet. $I_+$


title: Does it matter if I use \textit or \it, \bfseries or \bf, etc

text: I typically use               \textit{Some italicized text}      while some of my colleagues use               {\it Some other text}      Should I bother changing one or the other, or does it matter?


title: Only the old version of pgfplots is available with MiKTeX (version 1.7)

text: I am looking for a solution to install the last version (currently 1.8) of `pgfplots` via the package manager MiKTeX on Windows. However, MiKTeX only offers the old version 1.7 of `pgfplots`. Is there a way to force MiKTeX to install the new version?


title: MusiXTeX vs Lilypond

text: MusiXTeX and Lilypond both appear to be based around TeX and its syntax. Is there a difference? What makes one better than the other?


title: How to place text at a particular position outside the plot in tikz

text: I would like to write `\gamma` **on top of my legend** in the plot (shown in Image) generated by using the code shown below. I generally use `\node at (axis cs: co-ordinate x,co-ordinate y) {text}` of the plot. Since the legend is outside the plot, i am not sure how to access a point above the legend using `\node`.               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}          \begin{document}               \begin{tikzpicture}     \begin{loglogaxis}[      %  scale=0.8,      %  width=\columnwidth,      %  baseline,         ylabel={$G(\gamma,t) \:\: \mathrm{(Pa)}$},         xlabel= t (s),         legend entries ={0.1,0.2,0.4,0.8},         legend style={at={(1.3,0.5)},anchor=east,font=\small},     ]          \addplot [color=red,line width=1.5pt] table [x=time,y=m01,row sep=newline] {relaxationExpDatafor65v.dat};          \addplot [color=green,line width=1.5pt] table [x=time,y=m02,row sep=newline] {relaxationExpDatafor65v.dat};          \addplot [color=blue,line width=1.5pt] table [x=time,y=m04,row sep=newline] {relaxationExpDatafor65v.dat};          \addplot [color=cyan,line width=1.5pt] table [x=time,y=m08,row sep=newline] {relaxationExpDatafor65v.dat};               %%fits          \addplot [color=black,line width=1pt,densely dashed] table [x=time,y=m01,row sep=newline] {relaxationExpDataPredfor65v.dat};          \addplot [color=black,line width=1pt,densely dashed] table [x=time,y=m02,row sep=newline] {relaxationExpDataPredfor65v.dat};          \addplot [color=black,line width=1pt,densely dashed] table [x=time,y=m04,row sep=newline] {relaxationExpDataPredfor65v.dat};          \addplot [color=black,line width=1pt,densely dashed] table [x=time,y=m08,row sep=newline] {relaxationExpDataPredfor65v.dat};                    \end{loglogaxis}     \end{tikzpicture}          \end{document}      ![Generated plot](http://i.stack.imgur.com/5KCkd.jpg) I hope you don't need the .dat files called in the code (frankly i am not sure how to upload them, since this is my first question in this community). Thank you in advance for your time!


title: How to write "is distributed as" under a certain hypothesis?

text: I'd need a special symbol used in statistics. What I need is a tilde with something written upon it. I can get the tilde by using `\sim`, but I need to add a superscript over it (`H_0`). If I use `\sim^{H_0}`, I get a tilde with H_0 over it and on the right, not simply _upon_ it.


title: Minted Package escaping code for SQL

text: I'm using `minted` package in LaTeX to display SQL statements however, I have a variable which it confuses with the keyword "ORDER" in SQL. How can escape this? Is it possible?


title: Listings: Format part of a string differently (markup language inside a string)

text: I made a new language definition for a .NET template engine where part of the strings in the C# code are markup. Example:               string templateString = @"{% for name in names %}      Hallo {{ name }}      {% endfor %}";      Everything between {% and %} and {{ and }} is part of the template engine and should be formatted different from the string. My language definition looks like this:                \lstdefinelanguage{dotliquid}[Sharp]{C}      {morecomment=[s][\color{liquidgreen}]{\{\%}{\%\}},      morecomment=[s][\color{liquidgreen}]{\{\{}{\}\}}      }      When I have normal C# code with template code inside (not inside a string) it works fine, but in the example above the complete string is formatted one way. Is there any way to achieve this? I experimented with moredelim and deletestring but didn't manage to get the wanted result.


title: Problem with sorting literature order by entry type (misc, book,...) in BiBTeX

text: EDIT: I edited a "main" file and I added a `.bib` file. I have problem with BibTeX - concretely with sorting literature order by entry type. The `.cls` file is HERE and `.bst` file is HERE. Error:               ! LaTeX Error: Command \bibhang already defined.     Or name \end... illegal, see p.192 of the manual.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.     ...                                                        l.402 \newlength{\bibhang}          ?      Document:               \documentclass[thesis=B,czech]{FITthesis}[2012/06/26]          \usepackage[utf8]{inputenc}          \usepackage{graphicx}     \usepackage{dirtree}     \usepackage[square,sort,comma,numbers]{natbib}     \usepackage[defernumbers=true]{biblatex}               \department{text}     \title{text}     \authorGN{text}     \authorFN{text}     \authorWithDegrees{text}     \supervisor{text}     \acknowledgements{text}     \abstractCS{text}     \abstractEN{text}     \placeForDeclarationOfAuthenticity{text}     \declarationOfAuthenticityOption{1}     \keywordsCS{text}     \keywordsEN{text}          \begin{document}          \begin{introduction}         %     \end{introduction}          \chapter First              \cite{alfa}         \cite{beta}         \cite{gama}         \cite{delta}          \begin{conclusion}         %     \end{conclusion}          \bibliographystyle{csn690}     \bibliography{mybibliographyfile}          \appendix          \end{document}      `.bib` file:               @BOOK{gama,      author = {Gama},      title = {1.},      subtitle = {Gama},      address = {Gama},      publisher = {Gama},      year = {Gama},     }          @MISC{delta,       Author = {2.},       Institution = {Delta},       note = {Delta},       Year = {2000},       Title = {Delta}     }          @MASTERTHESIS{beta,       author = {Beta},       title = {3.},       year = {2000},       school = {Beta},       type = {Beta},       url = {http://www.beta.com},     }          @MANUAL{alfa,         title = "4.",         url = "http://www.alfa.com",     }      Thank you!


title: \usepackage{sectsty} and problems with \pagebreak

text: **UPDATE WHERE IT BREAKS DOWN... PLEASE REFER TO CODE BELOW. I ADDED ONE MORE PACKAGE and ONE DEFINITION**               \documentclass[twocolumn]{book}     \usepackage[T1]{fontenc}     \usepackage{caption}     \usepackage{tikz}     \usetikzlibrary{arrows}     \usepackage{pgfplots}     \usepackage{titletoc}      \usepackage{booktabs} %%<-- added NEW NEW ENWE NEW     \newcommand{\head}[1]{\textnormal{\textbf{#1}}} %%%%% <--- added NEW NEW NEW NEW     \usepackage{blindtext}% dummy text      \usepackage{geometry,xcolor,amssymb,amsmath,graphicx}%      \usepackage{sectsty}      \sectionfont{\sectionrule{1.4ex}{2pt}{-.6ex}{2pt}%     {\small \sffamily\centering\vspace{-2.65ex}\MakeUppercase}}     %\allsectionsfont{\raggedright\ulemheading{\uuline}}     \subsectionfont{\sffamily\MakeUppercase}     \vspace{-5ex}     \usepackage[colorlinks=true,urlcolor=blue]{hyperref}% dummy text     \contentsmargin{0cm}     % End of preamble ===========================     \begin{document}     \chapter{hello3}     \section{hello blinder}     \subsection{nothing}     -     \subsection{nothing}     -     \subsection{sample}     {\small     \begin{table}[H]     \caption*{{\small $\blacksquare$: Man.\\ $\square$: Woman }}     {\small     \begin{tabular}{ll}     \toprule[1.5pt]     \multicolumn{2}{c}{\head{next generation}}\\     \head{{\footnotesize byye}} & \head{{\footnotesize hello}}\\     \midrule     \hfill$\blacksquare$ &\hfill$\blacksquare$ \\\hfill$\square$ &\hfill$\square$ \\     \bottomrule[1.5pt]     \end{tabular}     }     \end{table}     }     {\tiny     \begin{table}[H]     {\small     \begin{tabular}{ll}     \toprule[1.5pt]     \multicolumn{2}{c}{\head{next generation}}\\     \head{{\footnotesize next  1}} & \head{{\footnotesize next 2}}\\     \midrule     \hfill$\blacksquare$ &\hfill$\blacksquare$\\\hfill$\square$ &\hfill$\square$\\     \bottomrule[1.5pt]     \end{tabular}     }     \end{table}     }     \subsection{sample2}     \centering     \textbf{sample3}     asdasdasd     \textbf{sample2}     \begin{tikzpicture}[thick,scale=.6]     \begin{axis}[     ybar,     tick label style={font=\small},     tickpos=left,     xticklabels={},      xtick={1,2,3,4},     ymin=0,     legend entries={zzz, yyy, xxx },     y tick label style={/pgf/number format/.cd,%     scaled y ticks = false,     set thousands separator={},     fixed     },     ]     \addplot +[bar shift=-.4cm, area legend] coordinates {(1,0.23) };     \addplot  +[bar shift=.0cm, area legend]coordinates {(1,0.51) };     \addplot  +[bar shift=.4cm, area legend]coordinates {(1,0.26)  };     \end{axis}     \end{tikzpicture}     \subsection{FACILITIES}     -     \subsection{sample}     \blindtext[2]     \section{New Section}     \subsection{clown4}     \blindtext[4]     \subsection{clown3}     \blindtext[4]     \subsection{clown2}     {\small     \begin{table}[H]     \caption*{{\small $\blacksquare$: Man.\\ $\square$: Woman. }}     {\small     \begin{tabular}{ll}     \toprule[1.5pt]     \multicolumn{2}{c}{\head{next generation}}\\     \head{{\footnotesize next generation}} & \head{{\footnotesize next generation}}\\     \midrule     En\hfill$\blacksquare$ &Ena\hfill$\blacksquare$ \\Chi\hfill$\square$                &Chiegua\hfill$\square$ \\Maics\hfill$\square$ &Macs\hfill$\square$      \\Science\hfill$\square$ &Lidie\hfill$\square$ \\Compuer\hfill$\square$      &Phs\hfill$\square$ \\Chnesor\hfill$\square$ &Chery\hfill$\square$      \\Hisy\hfill$\square$ &Bigy\hfill$\square$    \\Gehy\hfill$\square$      &Infoationan\hfill$\square$ \\Eccau\hfill$\square$ &Bess\hfill$\square$      \\Mic\hfill$\square$ &Accond\hfill$\square$ \\Physica\hfill$\square$      &Ecmics\hfill$\square$ \\VisualArts\hfill$\square$ &Chior\hfill$\square$      \\Ded\hfill$\square$ &Hiy\hfill$\square$ \\Hoonomics\hfill$\square$      &Geaphy\hfill$\square$ \\Putua\hfill$\square$ &Touros\hfill$\square$      \\Lie\hfill$\square$ &Viss\hfill$\square$   \\&Desppl\hfill$\square$      \\&Phyduca\hfill$\square$ \\&Schr\hfill$\square$ \\     \bottomrule[1.5pt]     \end{tabular}     }     \end{table}     }     {\tiny     \begin{table}[H]     {\small     \begin{tabular}{ll}     \toprule[1.5pt]     \multicolumn{2}{c}{\head{2013/2014}}\\     \head{{\footnotesize S1-S3}} & \head{{\footnotesize S4-S6}}\\     \midrule     Brownie\hfill$\blacksquare$ &Brownie \hfill$\blacksquare$\\Cheap\hfill$\square$      &Cheap\hfill$\square$\\womanizer\hfill$\square$ &womanizer      \hfill$\square$\\Scce\hfill$\square$ &eie\hfill$\square$\\Comr\hfill$\square$      &Phcs\hfill$\square$\\Cheap\hfill$\square$ &hy\hfill$\square$\\Hiy\hfill$\square$      &Bgy\hfill$\square$\\Gphy\hfill$\square$ &form\hfill$\square$\\Ecu\hfill$\square$      &Bss\hfill$\square$\\Mic\hfill$\square$ &Accand\hfill$\square$\\Pca\hfill$\square$      &Eccs\hfill$\square$\\Vts\hfill$\square$ &Cistor\hfill$\square$\\Ded\hfill$\square$      &Hory\hfill$\square$\\Hcs\hfill$\square$ &aphy\hfill$\square$\\hua\hfill$\square$      &Tos\hfill$\square$\\Liie\hfill$\square$        &Vts\hfill$\square$\\&Dppl\hfill$\square$\\&Pca\hfill$\square$\\&SdAr\hfill$\square$\\     \bottomrule[1.5pt]     \end{tabular}     }     \end{table}     }     \subsection{Spring term}     \centering     \textbf{helloo clown}     asdasdasd     \textbf{hello baffoon}     \begin{tikzpicture}[thick,scale=.6]     \begin{axis}[     ybar,     tick label style={font=\small},     tickpos=left,     xticklabels={},      xtick={1,2,3,4},     ymin=0,     legend entries={$0-4$ years, $5-9$ years, $>10$ years },     y tick label style={/pgf/number format/.cd,%     scaled y ticks = false,     set thousands separator={},     fixed     },     ]     \addplot +[bar shift=-.4cm, area legend] coordinates {(1,0.42) };     \addplot  +[bar shift=.0cm, area legend]coordinates {(1,0.28) };     \addplot  +[bar shift=.4cm, area legend]coordinates {(1,0.3)  };     \end{axis}     \end{tikzpicture}     \subsection{something2}     \blindtext[3]     \subsection{something 4}     \blindtext[4]     \end{document}      So, I amended the Kurt's generous and insightful solution and it appears to break down as I include other information .... for instance the `\hello macro` ... I believe that was one of the reasons I used the `extraplaceins` package in my original solution.               \documentclass[twocolumn]{book}          \usepackage[T1]{fontenc}          \usepackage{caption}          \usepackage{tikz}     \usetikzlibrary{arrows}     \usepackage{pgfplots}          \usepackage{titletoc}     \usepackage{blindtext}% dummy text     \usepackage{geometry,xcolor,amssymb,amsmath,graphicx}%              \usepackage{sectsty}      \sectionfont{\sectionrule{1.4ex}{2pt}{-.6ex}{2pt}%     {\small \sffamily\centering\vspace{-2.65ex}\MakeUppercase}}     %\allsectionsfont{\raggedright\ulemheading{\uuline}}     \subsectionfont{\sffamily\MakeUppercase}     \newcommand\firstoftwo[2]{#1}     \newcommand\secondoftwo[2]{#2}     \newcommand\hello[9]{%     {\small \sffamily      \firstoftwo#1\hfill\\% Address     \textbf{\Large Hello} \firstoftwo#2~~$\circ$~~%     \textbf{\Large Hello} \secondoftwo#2\\      \textbf{\Large Kitty} \firstoftwo#3 \hfill\\       \textbf{\Large Pitty} \url{\firstoftwo#5}\hfill\\     \textbf{Smoothness} \firstoftwo#8~~$\circ$~~%      \textbf{Classification} \firstoftwo#4\\     \textbf{Car Sales} \firstoftwo#9~~$\circ$~~%     \textbf{Micro Sales} \secondoftwo#5\\     \textbf{Ornamentation year} \secondoftwo#9~~$\circ$~~%     \textbf{Gesticulation cancer} \secondoftwo#7\\     \textbf{unknown parody} \secondoftwo#8~~$\circ$~~\\     \textbf{annoying} \secondoftwo#4\\      \textbf{as hell} \firstoftwo#6~~\textemdash~~%     \secondoftwo#6}     \begin{quoting}     \footnotesize\Fontskrivan%\calligra ... what you want     \firstoftwo#7     \end{quoting}     \begin{minipage}[c]{\linewidth}     \color{gray}     \offinterlineskip     \rule[0ex]{\linewidth}{.2ex}\vspace{.5mm}     \rule[0ex]{\linewidth}{.4ex}     \end{minipage}     \vspace{-5ex}     }               \begin{document}          \chapter{Hello world}     \blindtext[2]     \section{Hello section title}     \hello     {{ 123123123123132123213}}%     {{123123213}{123123123}}%     {{1233213123123}}%     {{123123123}{asdasdasddasd}}%     {{asdasdasda}{asdadsad}}%     {{asdadasd}{adsadsad}}%     {{adsasdad}{asdadsasd}}     {{asdasdadasdads}}     {{asdasdadsad}{asdasdasd}}                         \blindtext[2]     \subsection{some tables and figures here}     \blindtext[1]     \subsection{testing}     \blindtext[2]     \begin{tikzpicture}[thick,scale=.6]     \begin{axis}[%     ybar,     tick label style={font=\small},     tickpos=left,     xticklabels={},      xtick={1,2,3,4},     ymin=0,     legend entries={$0-4$ years, $5-9$ years, $>10$ years },     y tick label style={/pgf/number format/.cd,%         scaled y ticks = false,         set thousands separator={},         fixed     },     ]     \addplot +[bar shift=-.4cm, area legend] coordinates {(1,0.23) };     \addplot  +[bar shift=.0cm, area legend]coordinates {(1,0.51) };     \addplot  +[bar shift=.4cm, area legend]coordinates {(1,0.26)  };     \end{axis}     \end{tikzpicture}               \subsection{hello}          \section{section title here}     \blindtext[1]     \subsection{something}     \blindtext[1]     \subsection{something else}     \blindtext[2]     \subsection{another subsection}     \blindtext[1]     \subsection{here is a subsection}     \blindtext[1]          \begin{figure}     \centering     \begin{tikzpicture}[thick,scale=.6]     \begin{axis}[     ybar,     tick label style={font=\small},     tickpos=left,     xticklabels={},      xtick={1,2,3,4},     ymin=0,     legend entries={$0-4$ years, $5-9$ years, $>10$ years },     y tick label style={/pgf/number format/.cd,%       scaled y ticks = false,       set thousands separator={},       fixed     },     ]     \addplot +[bar shift=-.4cm, area legend] coordinates {(1,0.42) };     \addplot  +[bar shift=.0cm, area legend]coordinates {(1,0.28) };     \addplot  +[bar shift=.4cm, area legend]coordinates {(1,0.3)  };          \end{axis}     \end{tikzpicture}     \end{figure}               \end{document}                                        \documentclass[twocolumn]{book}     \usepackage[T1]{fontenc}     \usepackage{caption}     \usepackage{marvosym}     \usepackage{calligra}     \usepackage{aurical}     \usepackage{tikz}     \usetikzlibrary{arrows}     \usepackage{epigraph}     \usepackage{titletoc}     \usepackage{lipsum}% dummy text     \usepackage{geometry,xcolor,amssymb,amsmath,graphicx}%      \usepackage[colorlinks=true,urlcolor=blue]{hyperref}% dummy text     \usepackage{quoting}     \quotingsetup{vskip=5pt}     \usepackage{PTSansNarrow}      \usepackage{booktabs}     \newcommand{\head}[1]{\textnormal{\textbf{#1}}}     \usepackage{pgfplots}     \usepackage{float}     \usepackage[section,subsection,subsubsection]{extraplaceins}               \renewcommand\epigraphflush{flushright}     \renewcommand\epigraphsize{\normalsize}     \setlength\epigraphwidth{0.7\textwidth}                                   %------------------------------------------     \contentsmargin{0cm}     %------------------------------------------               \usepackage{sectsty}      \sectionfont{\sectionrule{1.4ex}{2pt}{-.6ex}{2pt}%     {\small \sffamily\centering\vspace{-2.65ex}\MakeUppercase}}     %\allsectionsfont{\raggedright\ulemheading{\uuline}}     \subsectionfont{\sffamily\MakeUppercase}     \vspace{-5ex}                         % End of preamble ===========================          \begin{document}     \chapter{Hellow world}     \section{Hello section title}     \subsection{some tables and figures here}     \subsection{testing}     \centering     \textbf{something else}     \textbf{some diagram}     \begin{tikzpicture}[thick,scale=.6]     \begin{axis}[     ybar,     tick label style={font=\small},     tickpos=left,     xticklabels={},      xtick={1,2,3,4},     ymin=0,     legend entries={$0-4$ years, $5-9$ years, $>10$ years },     y tick label style={/pgf/number format/.cd,%           scaled y ticks = false,           set thousands separator={},           fixed     },     ]     \addplot +[bar shift=-.4cm, area legend] coordinates {(1,0.23) };      \addplot  +[bar shift=.0cm, area legend]coordinates {(1,0.51) };     \addplot  +[bar shift=.4cm, area legend]coordinates {(1,0.26)  };          \end{axis}     \end{tikzpicture}               \subsection{hello}     -     \section{section title here}     \subsection{something}     something     \subsection{something else}     \subsection{another subsection}     \subsection{here is a subsection}     \centering     \textbf{Some Tikzpicture}     \begin{tikzpicture}[thick,scale=.6]     \begin{axis}[     ybar,     tick label style={font=\small},     tickpos=left,     xticklabels={},      xtick={1,2,3,4},     ymin=0,     legend entries={$0-4$ years, $5-9$ years, $>10$ years },     y tick label style={/pgf/number format/.cd,%           scaled y ticks = false,           set thousands separator={},           fixed     },     ]     \addplot +[bar shift=-.4cm, area legend] coordinates {(1,0.42) };     \addplot  +[bar shift=.0cm, area legend]coordinates {(1,0.28) };     \addplot  +[bar shift=.4cm, area legend]coordinates {(1,0.3)  };          \end{axis}     \end{tikzpicture}                    \end{document}      Update: As Mico correctly pointed out, I did not provide the entire context to the problem. I am using the following environment:               \documentclass[twocolumn]{book}      and related hopefully relevant info follow below               \contentsmargin{0cm}          \titleformat{\part}[display]     {\normalfont\huge\bfseries}{\thepart}{20pt}{\Huge}          \titlecontents{part}[0pc]     {     \protect\addvspace{13pt}%     \begin{tikzpicture}%     \draw[help lines,step=.4cm,color=blue] (0,0) grid (2.4,1.2);%     \pgftext[left,x=.1cm,y=.6cm]{\Large\scshape\partname};%     \fill[fill=white,draw=blue] (1.8,.6) circle (0.4cm);%     \node at(1.8cm,.6cm) {I};%     \end{tikzpicture}\\\color{blue}\large\scshape\bfseries     \thepart}%          {}          {l}          {$\;$\titlerule$\;$\large\bfseries\thecontentspage}%                    \usepackage{sectsty}          \sectionfont{\sectionrule{1.4ex}{2pt}{-.6ex}{2pt}%     {\small \sffamily\centering\vspace{-2.65ex}\MakeUppercase}}     %\allsectionsfont{\raggedright\ulemheading{\uuline}}     \subsectionfont{\sffamily\MakeUppercase}     \newcommand\firstoftwo[2]{#1}     \newcommand\secondoftwo[2]{#2}     \newcommand\ContactUs[9]{%     {\small \sffamily      \firstoftwo#1\hfill\\%      \textbf{\Large \XXX} \firstoftwo#2~~$\circ$~~%     \textbf{\Large \YYY} \secondoftwo#2\\     \textbf{\Large \ZZZ} \firstoftwo#3 \hfill\\     }     \begin{quoting}     \footnotesize\Fontskrivan%\calligra ...      \firstoftwo#7     \end{quoting}     \begin{minipage}[c]{\linewidth}     \color{gray}     \offinterlineskip     \rule[0ex]{\linewidth}{.2ex}\vspace{.5mm}     \rule[0ex]{\linewidth}{.4ex}     \end{minipage}     \vspace{-5ex}     }          \newcommand\ZZZ[6]{%     {\footnotesize\sffamily%     \textbf{ Wow:} #1\hfill%\\     \textbf{Bow:} #4 \hfill%     }}      # These are the ones relevant for the `\usepackage{sectsty}` package I believe. I am using the `\usepackage{sectsty}` for nicely decorating each `\section{xxxx}`. I'd like to start a new page after each section so as to avoid floating problems. So, ideally, I'd like to have each section compile individually and independently of others. When the latex algorithm runs through and decides to placings of figures and tables, I'd like to fool it into believing that each section is on its own and nothing follows after it. How can I accomplish this ? I thought that simply placing a `\pagebreak` or `\newpage` or even `\clearpage` will do this. Unfortunately, whenever I do this something weird happens with my content in the `\section` command ... I obtain error messages               >>! Package sectsty Error: Can't use \sectionrule with \centering.          >>See the sectsty package documentation for explanation.          >>Type  H <return>  for immediate help.          >> ...       And the formatting that I designed for each section is lost. Is there any work around ? Oh, yes, I run pdflatex.


title: Emacs LaTeX formatting paragraphs

text: I like the Format Paragraph function of Auctex/LaTeX in Emacs but it seems to move markup commands around. Is there any way I can format a buffer but only the plaintext sections of it so that it ends up like the fill paragraph or format region commands but without touching LaTeX commands? Just to be a little more clear, if the command(s) are on a newline I want them to not be messed with, so commands that are inside the paragraph such as `texbf` can be moved around.


title: Ending all pages with period/fullstop

text: I want to have LaTeX (LyX) make its pages end at a fullstop (`.`). In other words no broken sentences carried to next page. I hope to use `\raggedbottom` so that pages will be shortened by a few lines when the Fullstoppenalty acts on the way Latex does its page break. Can any one help me with code for `\fullstoppenalty` a new penalty command macro. Can you tell me how I can build this into my tex system or least wise into the Memoir class. I hope that I would then put the command `\fullstoppenalty= -5000` in the preamble. Being a negative penalty would I think make it favour breaking the page at a full stop and the `\raggedbottom` will facilitate reducing the number of lines on a page.


title: Include only paragraph titles in the table of contents

text: My Latex document has a large number of `paragraph`s (about 10 per page), and I'd like to build a list of the titles of all these paragraphs. For example, given the following document:               \paragraph{Bla1} Bla bla bla bla     \paragraph{Bla2} Bla bla bla bla     \paragraph{Bla3} Bla bla bla bla     \paragraph{Bla4} Bla bla bla bla      the output would look like > Bla1 — Bla2 — Bla3 — Bla4 Ideas? I tried customizing the table of contents, but I can't exclude sections and subsections... Thanks!


title: Is there a package to create Optical Mark Reader answer-sheets?

text: Is there a package to create Optical Mark Reader answer-sheets (aka bubble sheet)? EDIT 1: No choice. I think I must use PSTricks and \multido to make it.


title: Choosing data columns with Tikz plot

text: I want to plot data from a file using Tikz. I have a data file with 5 columns of data, and I want, for example to plot column 1 and 3 together. How can I make Tikz load the data from the correct columns? Example of data file:               1,3,6     2,4,5     3,3,7     4,1,2     5,1,1      Current Latex:               \draw[color=blue] plot[smooth,mark=*,mark size=1pt] file {data.dat} node [right] {data};


title: Put legend (pgfplots) below the plot

text: I have a pgfplot where the legend is right to the plot. I create the plot as follows:               \begin{axis}[         scale only axis,         xmode=log,         ymode=log,         width=7cm,         legend cell align=left,         legend pos=outer north east,         legend style={draw=none}       ]      Now I would like to move the legend down below the plot. So I thought I have just to replace `legend pos=outer north east` by `legend pos=outer south west`. But LaTex does not like this idea: `Choice 'outer south west' unknown in key '/pgfplots/le gend pos'`. Whats wrong with this?


title: Getting length as number?

text: I have probably formulated the question wrong, as I don't know the Tex internals - but this is what I mean; consider this example:               \newcommand{\myNum}{2}     \newlength{\myLength}     \setlength{\myLength}{\myNum cm}      Here, I'd consider `\myNum` to represent a 'numeric variable', and `\myLength` a Tex length (i.e. a number and a unit); and so I'd consider the above example a "conversion" from numeric to length "variable". Is it possible to do the other way around? I.e. if `\myLength` is given to be 2 cm, is there a command that will "get"/"extract" the numeric value only? I'd imagine doing something like this (pseudocode):               \newcommand{\myNum}{\getlength{\myLength}}      ... after which, `\myNum` would have value "2" ... Does anything like this exist? EDIT: I guess I need something similar to `\the` which is for counters ... ?!


title: How to set rulecolor in a listings frame only for the top line?

text: I use the following `lstlisting` (`listings` package):                  \documentclass{thesis}          \usepackage{ucs}     \usepackage[utf8]{inputenc}     \usepackage{url}     \usepackage{bbding}     \usepackage{listings}     \usepackage{tikz}     \usepackage[center]{caption}     \usepackage{tabularx}     \usepackage{amssymb}     \usepackage{array}     \usepackage{nameref}     \usepackage[section]{placeins}     \usepackage{graphicx}                    \usepackage{calc} \newlength\tdima \newlength\tdimb \setlength\tdima{ \fboxsep+\fboxrule} \setlength\tdimb{-\fboxsep+\fboxrule}          \DeclareCaptionFont{white}{\color{white}}     \DeclareCaptionFormat{listing}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}}     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white}          \begin{document}          \lstset{language=SQL,morekeywords={PREFIX,java,rdf,rdfs,url}}     \begin{lstlisting}[captionpos=t,label=lst:sparql,caption=SPARQL query to retrieve the names of each package in a software project,frame=tlrb, xleftmargin = \tdima, xrightmargin = \tdimb, rulecolor= \color{gray}]     PREFIX java: <http://evolizer.org/ontologies/seon/2009/06/java.owl#>     PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>     PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>     SELECT ?url ?name     WHERE {        ?url rdf:type java:Package .        ?url rdfs:label ?name     }     \end{lstlisting}          \end{document}      As one can see I set the rulecolor to gray. But I want to set the rule color only for the top line of the frame to gray. All the other lines (left, right, bottom) should stay black. How can I achieve that?


title: Debugging Advice: Dimension too large (Need stack trace)

text: ## Background: I am stuck on a `"Dimension too large"` problem which is occurring during index generation. This is a large index of links to files (along with other related information), and am sure the problem is not with the indexing packages, but in my code that adds the related information. The message I get in my actual use case is: > ./FileName-FileName.ind:8741: Dimension too large. \pgfmath@x > > l.8741 ...path to file} \hyperpage{119} ? If I reduce the size of this index (even if it includes the offending file that was being linked to, as listed in the error message above) the problem does _not_ occur. So, it is not a problem with the file listed in the error message, but with the macros that determine which related information to add. If I could get a stack dump and know what part of my code calls `pgfmath` before the problem occurs, then I could have some hope of determining the root of the problem. This same code is executed 1000s of times before the problem shows up, so I can't just terminate early by putting an undefined macro in the code to do a manual trace. * * * ## Sample Test Case Although things are obvious in the "cooked" up MWE below, they are not in my actual code. The MWE below terminates with: > ./TeX-SE.tex:38: Dimension too large.   >  to be read again   >  \relax l.38 }   >  % So, from the error message I know where the problem originates in the main source code. But form there, how do I determine where the problem lies? Also note that the error message here gives no indication that the problem is some `pgfmath` function. ## References:   * Origin and formation to the ERROR ‘Dimension too large’.   * ! Dimension too large ## Notes:   * In the MWE below, the source of the problem is obvious and several fixes are possible. But, in my actual use case I have not yet been able to narrow down the source of a problem with a similar error message. So, this question is about _how_ do I narrow down the source of the problem, _not_ how do I fix this _specific_ issue.. ## Code:               \begin{filecontents*}{GrillFunctions.sty}         \newcommand*{\FunctionValue}[1]{%             % ... lots of code ....             \pgfmathsetmacro{\NewValue}{\arabic{MyCounter}/100}%             \num{\NewValue}%             % ... lots of code ....         }     \end{filecontents*}          \begin{filecontents*}{GrillMacros.sty}         \newcommand*{\DeterminePercentage}[1]{%             % ... lots of code ....             % ... Don't know what in here is creating the problem.             %     Obvious given this MWE, but in actual usage not so obvious             \FunctionValue{#1}%             % ... lots of code ....         }     \end{filecontents*}               \documentclass[12pt]{article}     \usepackage{siunitx}     \usepackage{xstring}     \usepackage{tikz}     \usepackage{GrillFunctions}     \usepackage{GrillMacros}          \newcounter{MyCounter}     \setcounter{MyCounter}{100000}               \begin{document}     \IfStrEq{\arabic{MyCounter}}{0}{%         Value of counter is zero.%     }{%         Value of counter is \DeterminePercentage{\arabic{MyCounter}}.%     }%     \end{document}


title: control vertical space before and after verbatim environment?

text: How do I control how much vertical space appears before and after a `verbatim` environment? With the following source (run through `pdflatex`):               \documentclass[varwidth]{standalone}     \begin{document}     text before verbatim     \begin{verbatim}     some verbatim text     \end{verbatim}     text after verbatim     \end{document}      I get the following: ![bad behavior](http://i.stack.imgur.com/7YvuG.png) I would like to be able to tweak things to get the following behavior: ![good behavior](http://i.stack.imgur.com/JTgTr.png) **Edit:** I would also like the solution to work for `verbatim` environments in a list item:               \documentclass[varwidth]{standalone}     \begin{document}     \begin{itemize}     \item text before verbatim     \begin{verbatim}     some verbatim text     \end{verbatim}     text after verbatim     \end{itemize}     \end{document}      ![bad behavior in a list](http://i.stack.imgur.com/LtHaz.png)


title: Abbreviations: taking into account spacing AND punctuation

text: So I'm trying to come up with some _good_ , _general_ definitions for latin abbreviations in my TeX template... What I did up to now is this:               \usepackage{xspace}     \newcommand{\etc}{etc.\xspace}      ..which works fine for **spacing** , but does not solve the problem of "blah etc.." at the end of a sentence when I use the macro like `blah \etc.`. So I had a look around and found the nice solution in this answer here, which I slightly modified to:               \usepackage{expl3}     \ExplSyntaxOn     \newcommand{\appendFullStop}[1]{       \peek_meaning:NTF . {% Same as \@ifnextchar         #1\@}%       { \peek_catcode:NTF a {% Check whether next char has same catcode as \'a, i.e., is a letter           #1.\@ }%         {#1.\@}}}     \ExplSyntaxOff     % Omit final dot from each definition, it is added automatically when needed!     \newcommand{\etc}{\appendFullStop{etc}}      Now, _this_ works fine for **punctuation** , meaning that `..blah \etc.` is actually compiled to "..blah etc." and not "etc..". BUT I now again have the spacing problem... So I thought to solve this by merging the two approaches. But changing the last line in the above snippet to               \newcommand{\etc}{\appendFullStop{etc}\xspace}      breaks the punctuation thing again... I am lost on this, any help would be really appreciated! * * * Example of the second code snippet not handling spacing:               \documentclass{article}     %\usepackage{xspace}          % Define a macro to look ahead one character and append a full-stop     \usepackage{expl3}     \ExplSyntaxOn     \newcommand{\appendFullStop}[1]{       \peek_meaning:NTF . {% Same as \@ifnextchar         #1\@}%       { \peek_catcode:NTF a {% Check whether next char has same catcode as \'a, i.e., is a letter           #1.\@ }%         {#1.\@}}}     \ExplSyntaxOff     % Define the style for latin abbreviations     % Omit final dot from each definition, it is added automatically when needed!     \newcommand{\etc}{\appendFullStop{etc}}          \begin{document}     Test \etc in the middle. \\     After comma \etc, we test as well. \\     Finally at the end of a sentence \etc. \\     \end{document}


title: Macros for et al, e.g., i.e., etc.

text: > **Possible Duplicate:**   >  Macros for common abbreviations Hi, Taking et al. as an example, is it possible to make a one-shot macro like `\etal` that can actually handle all possible cases where you'd want to use this? All the scenarios I can think of right now are:   1. It falls in the middle of a sentence with no immediate other punctuation after it, in which case there should just be "et al." followed by the rest of the sentence without captilizing the next letter.    2. It ends a sentence, in which case there should be a single period which both abbreviates et al and ends the sentence.   3. It preceeds a comma, in which case I think it should still have a period to abbreviate et al, and the period should be followed immediately by a comma. I think these scenarios are comparable for e.g., i.e., and etc. So, I have two questions:   1. Are my three scenarios correct or am I mis-using et al in any of them?   2. Can this be done with one simple macro, and if so, how?  I've included an example below where I've shown the behaviour of the macro included with my school's thesis template, which clearly doesn't handle all scenarios correctly. Thanks.               \documentclass{article}[10pt.]               \newcommand{\etal}{{et al}.\@ }          \begin{document}          This reads correctly:          Smith \etal have contributed to the research.           \vspace{1em}          These do not:           \vspace{1em}          This was possible thanks to Smith \etal. Their work is great.          Should read: This was possible thanks to Smith et al. Their work is great.          \vspace{1em}          This work, introduced by Smith \etal, has many applications.          Should read: This work, introduced by Smith et al.\@, has many applications.          \end{document}      ![enter image description here](http://i.stack.imgur.com/RzxTE.jpg)


title: Apply a vertical rule beside graphics within Algorithm floats

text: ## Background Using LyX to write a book. The source code listings shown in the book are graphics. The graphics should have a vertical rule beside them. But only graphics that are embedded within an Algorithm float. The code for the float resembles:               \begin{algorithm}[H]     \includegraphics{source/sql/query-formatted.sql.png}          \caption{\label{alg:Query-with-Formatting}Query with Formatting}          \end{algorithm}      There are scores of these example source code snippets, with more to come. Adding code to each one, manually, is undesirable. ## Problem Listing 1.1 in the following figure shows the placement character `[H]` nestled between the vertical rule and the graphic: http://i.stack.imgur.com/B1i4k.png The preamble used:               % Determine if the image is too wide for the page.     \makeatletter     \def\ScaleIfNeeded{%       \ifdim\Gin@nat@width>\linewidth         \linewidth       \else         \Gin@nat@width       \fi     }     \makeatother          % Resize figures that are too wide for the page.     \let\oldincludegraphics\includegraphics     \renewcommand\includegraphics[2][]{%       \oldincludegraphics[width=\ScaleIfNeeded]{#2}       \graphicsalignment     }          % Do not centre graphics within Algorithm floats.         \expandafter\def\expandafter\algorithm\expandafter{%       \expandafter\let\expandafter\graphicsalignment\expandafter\relax       \algorithm       \vrule width 1em     }          \let\graphicsalignment\centering      ## Question How do you eliminate the `[H]` argument so that the `\vrule` appears flush with the graphic, and placed "Here definitely"? (I have managed to do this in other ways, but then the graphics are no longer "`H`ere definitely.") Thank you!


title: Controlling formatting options for xtable

text: All, I'm a LaTex/knitr/Sweave amateur and have had trouble finding answers to what seem like they should be fairly simple questions online. I have a .Rnw script that I am currently compiling to PDF using `knitr`'s `knit2pdf` function. Within that script I have tables converted to LaTex format using `xtable`. I would like to do two things: (1) Lose the "Table 1:" label. Apparently this is not as straightforward as passing a blank or NA character string to `xtable`'s `label` argument. (2) Increase the font size of the table entries Here is a simple .Rnw script. I've saved this as `'test_template.Rnw'`:               \documentclass{article}          %%Save this script file as 'test_template.Rnw' in an easy-to-access location.           \begin{document}          <<test_table, results='asis', echo=FALSE>>=     MAT <- matrix(1:9, 3, 3)     print(xtable(MAT, caption = '\\textbf{Test Table}', label = ''),            caption.placement = getOption("xtable.caption.placement", "top"))     @          \end{document}      and here is the R code that I am using to render the PDF:               install.packages('knitr')     library(knitr)     setwd('SET WORKING DIRECTORY HERE') #..Note: Working directory should match the location of the .Rnw file.      knit2pdf('test_template.Rnw')      **UPDATE** Scott's answer was right on target. Note that that label formatting options have to be coded independently within the label character string using double escapes ('\\\'). Thanks!               \documentclass{article}          \usepackage{caption}          \begin{document}          \captionsetup{labelformat=empty}          <<test_table, results='asis', echo=FALSE>>=     MAT <- matrix(1:9, 3, 3)     print(xtable(MAT, caption = '\\textbf{\\Huge{Test Table}}', label = ''),        caption.placement = getOption("xtable.caption.placement", "top"), size = 'Huge')     @          \end{document}


title: Latex and code blocks: how to mark statements that way?

text: I’d like to show you a nice technique used in this book to describe code listings (see pag. 6 and 7 of the PDF -- 116 and 117 of the book), in which relevant statement are labeled with special “markers”. **Can you tell me how to replicate such technique in Latex?** I know that the packet `listings` allows escaping (so it is possible to insert Latex code within code listings) but I cannot figure out how to typeset the markers (hopefully with auto numbering within the listing itself) -- in the book, the numbering for the markers wraps around at each listing. I was thinking to something like the following:               % preamble     \lstset{         (...)         escapechar=§,     }          % Definition for the command `mycoderef`          (...)      % begin document          % Marked listing     \begin{lstlisting}[language=c,label=src-hello-c]         #include <stdio.h>              int         main(int argc, char *argv[])         {             §\mycoderef{mylabel1}§printf("Hello, World!\n");             return 0;         }     \end{lstlisting}          % The text refers to the marked statement     The hello message is printed with the statement printf\autoref{mylabel1}.      Thanks,   Giorgio


title: Accent in equation list

text: I'm need to make a list of equation in my document. I found and use the modified version of Lev Bishop's code from here. Everything work until there's an accent in the equation label. I got this error message : > ! TeX capacity exceeded, sorry [input stack size=5000]. > > \@latex@warning #1->\GenericWarning {\space \space \space \@spaces \@spaces > ... > > l.38 \label{eq:équation} I'm currently using TeXnicCenter on Windows 7 but I tried others and they all gave me the same error... Do you have any solution ? # Example in Latex               \documentclass[pdftex,a4paper,11pt,twoside]{report}     \usepackage[francais]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}         \usepackage{xstring}     \usepackage{tocloft}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \let\oldequation = \equation     \let\endoldequation = \endequation     \AtBeginDocument{\let\oldlabel = \label}     \newcommand{\mynewlabel}[1]{         \fullexpandarg         \StrBehind{#1}{eq:}[\Str]         \myequations{\Str}\oldlabel{#1}}     \renewenvironment{equation}{         \oldequation         \let\label\mynewlabel         }{\endoldequation}          \newcommand{\listequationsname}{Liste d'équations}     \newlistof{myequations}{equ}{\listequationsname}     \newcommand{\myequations}[1]{%         \addcontentsline{equ}{myequations{\hspace{15pt}\protect\numberline{\theequation}#1}}           \setlength{\cftmyequationsnumwidth}{3em}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \listofmyequations          \begin{equation}         2+2=4         \label{eq:équation}     \end{equation}          \end{document}


title: TikZ doesn't find all intersections between plot and a line

text: Why doesn't TikZ find all intersections. They are obviously there … ![missing intersections](http://i.stack.imgur.com/19UiG.png)               \documentclass[border=10mm]{standalone}          \usepackage{tikz}     \usetikzlibrary{intersections}          \begin{document}     \begin{tikzpicture}[point/.style={fill=blue,minimum size=1mm,inner sep=0pt,circle}]         % Zoom (to prevent oveflow)         \def\yzoom{100}         % Plots         \foreach \T/\xmin/\a in {%             0.27/1.538/a,             0.28/1.590/b,             0.29/1.649/c         } {             \draw [thin,name path global/.expanded={kurve \a}]                 plot [raw gnuplot] function {%                     set xrange [\xmin:10];                     set yrange [0:0.08*\yzoom];                     set samples 1000;                     f(x) = \yzoom*(\T/(x-1) - 1/(x**2));                     plot f(x);                 };         }         % Lines         \foreach \p/\a in {%             %% T = 0.27             0.0231/a,             %% T = 0.28             0.02855/b,             %% T = 0.29             0.0338/c         }{             \draw [red,thin,name path global/.expanded={linie \a}]                 (0,\p*\yzoom) -- (10,\p*\yzoom) node [fill=white,pos=0.1] {\a};         }         % Intersections points         \path [name intersections={of=kurve a and linie a,by={P1,P2,P3}}]             (P1) node [point] {} (P2) node [point] {} (P3) node [point] {};         \path [name intersections={of=kurve b and linie b,by={P1,P2,P3}}]             (P1) node [point] {} (P2) node [point] {} (P3) node [point] {};         \path [name intersections={of=kurve c and linie c,by={P1,P2,P3}}]             (P1) node [point] {} (P2) node [point] {} (P3) node [point] {};     \end{tikzpicture}     \end{document}      There seems to be no problem with the names of the paths but TikZ is missing four intersection points. Bonus question: Is it possible to solve the last part (adding blue points) with the second `\foreach`? I tried it but I get the error `File ended while scanning use of \tikz@intersect@path@names@parse.`.


title: Column-wise break of extra wide tables

text: I have to plot geochemical data tables that are like this table ![from Martin, P.M. and Mason, B. \(1974\). Major and trace elements in the Allende meteorite. Nature 249\(5455\): 333-334](http://i.stack.imgur.com/3L5zz.jpg) , i.e. with a **header column** , but that have much more sample columns. When having too many columns, the table has to be broken at a certain column, and to be continued on the next page; most importantly, the header column has to be repeated (like in the `\longtable` environment, only transposed). This has been _sort-of_ discussed in http://stackoverflow.com/questions/3681498/very-wide-tables-in-latex However, there is only manual solutions for this problem. Has there been any more progress to automate a "column-wise table break"? (I don't think that transposing my over-wide tables, to make it a long table, is very helpful in terms of legibility.)               % Table generated by Excel2LaTeX from sheet 'Sheet1'     \begin{tabular}{rrrrrrrrrrrrrrrrrrrrrrrrr}              Sample &   Sample 1 &   Sample 2 &   Sample 3 &   Sample 4 &   Sample 5 &   Sample 6 &   Sample 7 &   Sample 8 &   Sample 9 &  Sample 10 &  Sample 11 &  Sample 12 &  Sample 13 &  Sample 14 &  Sample 15 &  Sample 16 &  Sample 17 &  Sample 18 &  Sample 19 &  Sample 20 &  Sample 21 &  Sample 22 &  Sample 23 &  Sample 24 \\          Major element abundances (wt\%) &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            \\                SiO2 &         25 &         81 &         36 &         75 &         23 &         21 &         65 &         84 &          1 &         59 &         38 &         16 &          3 &         56 &         29 &         34 &          3 &         59 &         55 &         17 &          2 &         81 &         59 &         43 \\                TiO2 &         48 &         96 &          0 &         90 &         61 &         72 &         83 &         16 &         10 &          1 &         40 &         83 &         35 &         31 &         76 &         31 &         57 &          8 &         83 &        100 &         14 &         12 &         48 &         69 \\               Al2O3 &          7 &         14 &         99 &         53 &         89 &         65 &         88 &         17 &         76 &         81 &         43 &         87 &         15 &         71 &         17 &         85 &         59 &        100 &         96 &         85 &         74 &         50 &         59 &         36 \\               Fe2O3 &         32 &         34 &         23 &         86 &         50 &         58 &          8 &         29 &         88 &         27 &         49 &         16 &         19 &         89 &         45 &         88 &         79 &         42 &         42 &         29 &         10 &         60 &         87 &         97 \\                FeOt &         35 &         42 &         83 &          0 &         55 &         51 &         35 &         11 &         43 &         44 &         69 &         30 &         49 &         55 &         56 &          4 &         74 &         72 &         98 &         94 &         14 &         35 &         59 &         34 \\                 MnO &         64 &         48 &         52 &         65 &         61 &         16 &         73 &         56 &         73 &         54 &         75 &          7 &         18 &         84 &         52 &         38 &         46 &         91 &         59 &         90 &         31 &         84 &         54 &         32 \\                 MgO &         48 &         97 &         83 &         47 &         43 &         41 &         37 &         71 &         92 &         57 &         76 &         36 &          8 &         37 &         94 &          6 &         50 &         57 &         80 &         63 &         25 &         18 &         85 &         16 \\                 CaO &         56 &         11 &         68 &         49 &          6 &         20 &         31 &         74 &         72 &         24 &         39 &         38 &         68 &         69 &         73 &         23 &         40 &         32 &         63 &         93 &         28 &         56 &         12 &         18 \\                Na2O &         73 &         18 &          0 &         62 &         98 &         61 &         59 &         42 &         97 &         47 &         74 &         31 &         40 &          3 &         75 &          2 &         52 &         96 &         67 &         44 &         84 &          9 &         35 &         51 \\                 K2O &         69 &          0 &         52 &         73 &         23 &         11 &         12 &         70 &         86 &         46 &         29 &         84 &         77 &         47 &         25 &         43 &         97 &         48 &         30 &         94 &         83 &         93 &         23 &         25 \\                P2O5 &         92 &         80 &         59 &          6 &         90 &         99 &         54 &         64 &         96 &         84 &         58 &         18 &         37 &          7 &         55 &         89 &         34 &         53 &         59 &         56 &         38 &         23 &         63 &         89 \\                LOI§ &         51 &         65 &         64 &          2 &         67 &         51 &         58 &         55 &         60 &         48 &         64 &         54 &         56 &         46 &         78 &         70 &         38 &         44 &         45 &         37 &         66 &          7 &         34 &         76 \\                 Mg# &         20 &         27 &         34 &         40 &         66 &          3 &          7 &         42 &         19 &         85 &         35 &         24 &         31 &         40 &         14 &         39 &         31 &        100 &          0 &         41 &         19 &         14 &         75 &          5 \\                 CIA &         24 &         57 &          1 &         80 &         86 &         72 &         38 &         11 &         51 &         23 &         49 &         94 &         43 &         65 &         15 &          5 &         41 &         21 &         32 &         83 &         22 &         16 &         63 &         51 \\          Trace element abundances (ppm) &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            &            \\                   V &         91 &        421 &        256 &        480 &        669 &        888 &        403 &        456 &        661 &         77 &        997 &        729 &        647 &         77 &         69 &        163 &         52 &        589 &        772 &        267 &        110 &        998 &        547 &        789 \\                  Cr &        635 &        712 &        208 &        938 &        754 &        600 &         91 &        531 &        211 &        798 &        880 &        240 &        197 &        671 &        298 &        921 &        538 &        577 &         49 &        195 &        596 &        744 &        719 &        910 \\                  Co &        288 &        182 &        672 &        825 &        197 &        466 &        204 &        803 &        943 &        321 &        444 &        134 &        471 &         22 &        191 &        188 &        457 &        481 &        288 &        971 &        475 &        906 &        261 &        243 \\                  Ni &        492 &        234 &         46 &         62 &        213 &        531 &        808 &        557 &        599 &        356 &        681 &        487 &        929 &         36 &        729 &         84 &        962 &        918 &        260 &        688 &        373 &        363 &        679 &         51 \\                  Cu &        675 &        494 &        754 &        743 &        119 &        404 &        142 &        402 &        120 &        643 &        576 &        135 &        870 &        205 &        639 &        775 &        549 &         82 &        933 &        222 &         55 &        567 &        672 &        354 \\                  Zn &        440 &        656 &        667 &        193 &        305 &        758 &        814 &        660 &        811 &        519 &        885 &        488 &        223 &        182 &        120 &        448 &         58 &        830 &        173 &        473 &        847 &        809 &         22 &        456 \\                  Ga &        782 &        639 &        282 &        906 &        595 &         39 &        901 &         73 &        825 &        330 &        937 &        860 &         48 &        920 &        968 &        150 &        967 &        838 &        819 &        997 &        430 &        635 &        959 &        672 \\                  Rb &        422 &        930 &        404 &        581 &        916 &        747 &        970 &         87 &        343 &        784 &        843 &        339 &        919 &        398 &        827 &        265 &        216 &        382 &        772 &         17 &        770 &        745 &        543 &        224 \\                  Sr &        468 &         17 &        860 &        996 &        938 &        416 &        594 &        506 &        226 &        572 &        507 &        432 &         54 &        484 &        517 &        629 &        793 &        721 &        743 &        481 &        306 &        948 &        387 &        239 \\                  Pb &        429 &        280 &         83 &        495 &        980 &        715 &        225 &        540 &         58 &        513 &        653 &        149 &        893 &        918 &        553 &        879 &        136 &        266 &        900 &        811 &        942 &        706 &        344 &        528 \\                   U &        669 &        507 &        455 &        714 &         83 &         39 &         83 &        175 &        466 &        940 &        794 &        232 &        600 &        327 &        590 &        723 &        597 &        759 &        377 &        214 &        372 &        627 &        746 &        102 \\                  Cs &        408 &        615 &        657 &        539 &        612 &        907 &        615 &        820 &        650 &        133 &        870 &        605 &        691 &        190 &        741 &        245 &        370 &        486 &        269 &        475 &        258 &        320 &        909 &        204 \\                   Y &        291 &        830 &        767 &        872 &        522 &        639 &        159 &        548 &        236 &        718 &        701 &        762 &        965 &        323 &        770 &        688 &         22 &         11 &        930 &        329 &        657 &        778 &        432 &        581 \\                  Zr &        902 &        131 &        233 &        211 &        399 &        315 &        730 &        852 &         76 &        973 &        350 &        887 &        201 &        895 &        691 &        885 &        223 &        830 &        690 &        477 &        424 &        756 &        659 &        166 \\                  Nb &        594 &        969 &        833 &        663 &        243 &        154 &        197 &        104 &        317 &        834 &        901 &        891 &        997 &        934 &        328 &        261 &        982 &        581 &        781 &        933 &        625 &        783 &        711 &        354 \\                  Ba &        790 &        957 &        606 &        730 &        754 &        928 &        646 &          0 &        389 &         71 &        616 &        434 &        107 &        126 &        692 &        118 &        983 &         24 &        281 &        808 &        743 &        381 &        139 &        856 \\                  La &        624 &        859 &        233 &        176 &        540 &        138 &        188 &        475 &        478 &        203 &        614 &         53 &        435 &        694 &         66 &        860 &        628 &        271 &        338 &        799 &        924 &        877 &        777 &        721 \\                  Ce &        826 &        471 &        327 &        809 &        496 &        180 &        378 &        155 &         61 &        345 &        736 &        341 &        201 &        634 &        393 &        932 &        498 &        334 &         29 &        319 &        254 &         79 &        691 &         52 \\                  Pr &        476 &        447 &        951 &        786 &        450 &        717 &        248 &        790 &        561 &        259 &        748 &        104 &        881 &        804 &        385 &        676 &        435 &        815 &        634 &        234 &        809 &        105 &        471 &        529 \\                  Nd &        758 &        523 &        672 &        159 &        405 &        597 &        657 &        307 &         28 &         28 &         30 &        273 &         74 &        189 &        403 &        326 &         19 &        735 &        121 &        992 &         26 &        723 &        243 &        927 \\                  Sm &        307 &        422 &        764 &        933 &        197 &        180 &        956 &        276 &        347 &        492 &        534 &        760 &        904 &        247 &          0 &        518 &        593 &        714 &        223 &        619 &        634 &         39 &        265 &        445 \\                  Eu &        463 &        194 &        627 &        954 &         32 &        940 &        824 &        229 &         58 &        684 &        780 &        761 &        348 &        464 &         39 &        577 &        432 &        920 &        425 &        799 &          3 &        207 &        208 &        398 \\                  Gd &        863 &        274 &        512 &        718 &        770 &        900 &        221 &        674 &        342 &        553 &        522 &        945 &        880 &         23 &        605 &        544 &        214 &        987 &        348 &        445 &        763 &        893 &        607 &        162 \\                  Tb &        162 &        547 &         73 &        216 &        420 &        242 &        451 &        196 &        987 &        649 &        184 &        256 &        218 &         86 &        962 &        203 &         37 &        494 &        286 &        663 &        612 &        549 &        537 &        594 \\                  Dy &        265 &         21 &        889 &        312 &        756 &         94 &        976 &        188 &        147 &        839 &        527 &        442 &        849 &        948 &        570 &        553 &        902 &        290 &         81 &        758 &        759 &        598 &        344 &        104 \\                  Ho &        218 &        503 &        999 &        465 &        573 &        586 &        122 &        991 &        241 &        710 &        182 &         87 &        965 &        746 &         90 &        638 &         35 &        122 &        389 &        892 &        815 &        617 &        116 &        895 \\                  Er &        571 &        932 &        738 &        653 &        986 &        430 &        992 &        432 &        823 &        542 &        444 &        702 &        524 &         58 &        248 &        914 &        697 &        420 &        913 &        754 &        596 &        429 &        995 &        927 \\                  Tm &        551 &         72 &        654 &        819 &        593 &          7 &        110 &        707 &        535 &         74 &        142 &        150 &        610 &        564 &        859 &        451 &        832 &        822 &        938 &        877 &        954 &        430 &         41 &        657 \\                  Yb &        815 &        643 &        650 &        217 &        962 &        612 &        926 &        524 &        559 &        500 &        822 &        630 &        901 &        525 &        407 &        563 &        575 &        161 &        505 &        166 &        207 &        680 &        418 &        478 \\                  Lu &        106 &        597 &        551 &        650 &        391 &        850 &        589 &        649 &          6 &        277 &        129 &        566 &        109 &        922 &        767 &        173 &        525 &        250 &        449 &        662 &        221 &        831 &        969 &        479 \\                  Hf &        100 &        833 &        566 &        331 &         36 &        589 &         33 &        785 &        862 &        447 &        469 &        284 &        329 &        116 &        608 &        256 &        665 &         41 &         74 &        527 &        479 &        300 &        800 &         51 \\                  Ta &        337 &        757 &        903 &        411 &        745 &        638 &        243 &        584 &        336 &        477 &        994 &        307 &        349 &        981 &        572 &        364 &        822 &        609 &        198 &        478 &        922 &        854 &        819 &        130 \\                  Th &       1000 &        520 &        222 &        998 &        774 &         88 &        843 &        259 &        424 &        845 &        884 &        739 &        666 &        673 &        531 &        934 &        322 &        682 &        754 &        944 &        153 &        779 &         20 &        890 \\          \end{tabular}


title: Wide table spanning multiple pages using longtable and landscape packages

text: I am using the `longtable` and `landscape` package in the hope it would allow my very wide table to be read easily across multiple pages without breaks. However, it only spans one page and any extra content is just cut off (which I didn't think would be the case with longtable). How do I fix it?               \documentclass[a4paper,oneside,11pt,notitlepage]{report}          \usepackage[english]{babel} %francais, polish, spanish, ...     \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage[cm]{fullpage}     \usepackage{float}     \usepackage{lmodern}      \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{amsfonts}     \usepackage{a4wide}     \usepackage{multirow}     \usepackage{tabularx}     \usepackage{graphicx}     \usepackage{lscape}     \usepackage{longtable}     \setlength{\marginparwidth}{0cm}     \setlength{\topmargin}{0cm}     \setlength{\voffset}{0cm}     \setlength{\hoffset}{0cm}     \setlength{\headsep}{0cm}          \usepackage{etoolbox}      \begin{landscape}     \begin{longtable}{cc|ccccccccccccccccccc|cccccccccccccccccccccc}     Tail Config & alpha & Temperature [K] & Barometric Pressure [kPa] & Velocity [m/s] & Density [kgm-3] & Viscosity [] & Dynamic Pressure [Pa] & Re [-] & Lift [lbf] & Left Bar & Right Bar & Average & Drag [lbf] & Left Bar & Right Bar & Average & Moment [lbf ft] & Left Bar & Right Bar & Average & Lift [lbf] & Lift [N] & Drag [lbf] & Drag [N] & Moment [lbf-ft] & M\_{io} [lbf ft] & Moment [lbf-ft] & Moment [Nm] & cltu [-] & cdtu [-] & cmtu [-] & Cl [-] & Cd [-] & Cmp [-] & cdi [-] & cdsupports [-] & CD [-] & True alpha & cl2 [-] & delta cm & cmp [-] & cmg [-] \\     \hline     \hline     No tail & -2    & 290.0 & 101.65 & 37.09 & 1.22  & 1.82E-05 & 8.40E+02 & 3.93E+05 & -2.10 & -5    & 5     & 0.0   & 1.235 & -1    & 0     & -0.5  & 0.474 & -1    & 0     & -0.5  & 2.10  & 9.34  & 1.235 & 5.491 & -0.454 & -0.1074 & -0.347 & -0.470 & 0.09  & 0.051 & -0.028 & 0.08  & 0.048 & -0.026 & 0.000 & 0.018 & 0.031 & -1.96 & 0.01  & -     & -0.026 & - \\     No tail & 0     & 300.0 & 101.65 & 37.03 & 1.18  & 1.87E-05 & 8.09E+02 & 3.69E+05 & -6.04 & -2    & 5     & 1.5   & 1.243 & -3    & 0     & -1.5  & 0.095 & -1    & 0     & -0.5  & 6.03  & 26.80 & 1.242 & 5.522 & -0.075 & 0.0000 & -0.075 & -0.102 & 0.26  & 0.053 & -0.006 & 0.24  & 0.050 & -0.006 & 0.001 & 0.017 & 0.034 & 0.13  & 0.06  & -     & -0.006 & - \\     No tail & 2     & 301.1 & 101.65 & 36.90 & 1.18  & 1.88E-05 & 8.01E+02 & 3.65E+05 & -9.83 & -3    & 3     & 0.0   & 1.322 & 0     & 0     & 0.0   & -0.331 & 0     & 0     & 0.0   & 9.83  & 43.73 & 1.322 & 5.881 & 0.331 & 0.1298 & 0.201 & 0.273 & 0.43  & 0.057 & 0.017 & 0.40  & 0.054 & 0.016 & 0.002 & 0.017 & 0.039 & 2.22  & 0.16  & -     & 0.016 & - \\     No tail & 4     & 301.5 & 101.64 & 36.81 & 1.17  & 1.88E-05 & 7.96E+02 & 3.64E+05 & -13.53 & -2    & 1     & -0.5  & 1.470 & -3    & 0     & -1.5  & -0.707 & -1    & 0     & -0.5  & 13.54 & 60.21 & 1.469 & 6.532 & 0.727 & 0.2820 & 0.445 & 0.603 & 0.59  & 0.064 & 0.037 & 0.55  & 0.060 & 0.035 & 0.003 & 0.016 & 0.047 & 4.31  & 0.31  & -     & 0.035 & - \\     No tail & 6     & 302.2 & 101.66 & 36.73 & 1.17  & 1.88E-05 & 7.90E+02 & 3.61E+05 & -16.55 & -3    & 0     & -1.5  & 1.711 & 0     & 2     & 1.0   & -1.186 & 0     & 0     & 0.0   & 16.57 & 73.68 & 1.712 & 7.615 & 1.186 & 0.4566 & 0.729 & 0.989 & 0.73  & 0.075 & 0.062 & 0.68  & 0.071 & 0.058 & 0.005 & 0.016 & 0.059 & 6.38  & 0.47  & -     & 0.058 & - \\     No tail & 8     & 302.4 & 101.66 & 36.65 & 1.17  & 1.88E-05 & 7.87E+02 & 3.60E+05 & -19.31 & -3    & 3     & 0.0   & 1.996 & 0     & 2     & 1.0   & -1.649 & 0     & 0     & 0.0   & 19.31 & 85.90 & 1.997 & 8.883 & 1.649 & 0.6536 & 0.995 & 1.350 & 0.85  & 0.088 & 0.085 & 0.80  & 0.083 & 0.080 & 0.006 & 0.016 & 0.074 & 8.44  & 0.64  & -     & 0.080 & - \\     No tail & 10    & 302.8 & 101.64 & 36.56 & 1.17  & 1.88E-05 & 7.81E+02 & 3.58E+05 & -21.66 & -1    & 2     & 0.5   & 2.340 & 0     & 0     & 0.0   & -2.097 & 0     & 0     & 0.0   & 21.66 & 96.33 & 2.340 & 10.409 & 2.097 & 0.8730 & 1.224 & 1.660 & 0.96  & 0.104 & 0.105 & 0.90  & 0.098 & 0.099 & 0.008 & 0.015 & 0.091 & 10.50 & 0.82  & -     & 0.099 & - \\     No tail & 12    & 303.0 & 101.64 & 36.47 & 1.17  & 1.89E-05 & 7.77E+02 & 3.57E+05 & -23.57 & -2    & 4     & 1.0   & 2.837 & 0     & 1     & 0.5   & -2.573 & 0     & 0     & 0.0   & 23.56 & 104.80 & 2.838 & 12.622 & 2.573 & 1.1148 & 1.458 & 1.977 & 1.05  & 0.127 & 0.126 & 0.99  & 0.119 & 0.118 & 0.010 & 0.015 & 0.114 & 12.54 & 0.98  & -     & 0.118 & - \\     \hline     1     & -2    & 302.6 & 101.63 & 37.10 & 1.17  & 1.88E-05 & 8.05E+02 & 3.64E+05 & -3.08 & -3    & 3     & 0.0   & 1.335 & 0     & 0     & 0.0   & 0.795 & -1    & 0     & -0.5  & 2.15  & 9.56  & 1.335 & 5.938 & 0.075 & -0.1074 & 0.182 & 0.247 & 0.09  & 0.058 & 0.015 & 0.09  & 0.054 & 0.014 & 0.000 & 0.018 & 0.037 & -1.95 & 0.01  & 0.001 & 0.016 & 0.014 \\     1     & 0     & 302.8 & 101.62 & 37.04 & 1.17  & 1.88E-05 & 8.02E+02 & 3.63E+05 & -7.59 & -4    & 3     & -0.5  & 1.350 & -1    & 1     & 0.0   & 1.035 & 0     & 1     & 0.5   & 6.67  & 29.65 & 1.350 & 6.005 & -0.205 & 0.0000 & -0.205 & -0.278 & 0.29  & 0.058 & -0.017 & 0.27  & 0.055 & -0.016 & 0.001 & 0.017 & 0.039 & 0.15  & 0.07  & 0.004 & -0.012 & -0.018 \\     1     & 2     & 303.2 & 101.64 & 36.95 & 1.17  & 1.89E-05 & 7.97E+02 & 3.61E+05 & -12.01 & -3    & 3     & 0.0   & 1.445 & -1    & 1     & 0.0   & 1.344 & 0     & 0     & 0.0   & 11.08 & 49.29 & 1.445 & 6.428 & -0.494 & 0.1298 & -0.624 & -0.846 & 0.48  & 0.063 & -0.052 & 0.45  & 0.059 & -0.049 & 0.002 & 0.017 & 0.044 & 2.25  & 0.21  & 0.007 & -0.042 & -0.053 \\     1     & 4     & 303.5 & 101.64 & 36.84 & 1.17  & 1.89E-05 & 7.92E+02 & 3.60E+05 & -16.08 & -1    & 2     & 0.5   & 1.635 & 0     & 4     & 2.0   & 1.616 & 0     & 0     & 0.0   & 15.15 & 67.37 & 1.637 & 7.282 & -0.766 & 0.2820 & -1.048 & -1.421 & 0.66  & 0.072 & -0.089 & 0.62  & 0.067 & -0.083 & 0.004 & 0.016 & 0.055 & 4.34  & 0.39  & 0.009 & -0.074 & -0.089 \\     1     & 6     & 303.6 & 101.63 & 36.78 & 1.17  & 1.89E-05 & 7.89E+02 & 3.59E+05 & -19.67 & -4    & 4     & 0.0   & 1.930 & -2    & 0     & -1.0  & 1.915 & -1    & 0     & -0.5  & 18.74 & 83.36 & 1.929 & 8.581 & -1.045 & 0.4566 & -1.502 & -2.036 & 0.82  & 0.085 & -0.127 & 0.77  & 0.080 & -0.120 & 0.006 & 0.016 & 0.070 & 6.43  & 0.60  & 0.012 & -0.108 & -0.126 \\     1     & 8     & 303.8 & 101.60 & 36.65 & 1.17  & 1.89E-05 & 7.82E+02 & 3.57E+05 & -22.93 & -3    & 1     & -1.0  & 2.305 & -2    & 2     & 0.0   & 2.161 & 0     & 0     & 0.0   & 22.01 & 97.91 & 2.305 & 10.253 & -1.311 & 0.6536 & -1.965 & -2.664 & 0.98  & 0.102 & -0.168 & 0.92  & 0.096 & -0.158 & 0.008 & 0.016 & 0.089 & 8.50  & 0.84  & 0.014 & -0.144 & -0.166 \\     1     & 10    & 304.0 & 101.61 & 36.58 & 1.16  & 1.89E-05 & 7.79E+02 & 3.56E+05 & -25.61 & 0     & 5     & 2.5   & 2.760 & -1    & 1     & 0.0   & 2.320 & 0     & 1     & 0.5   & 24.66 & 109.67 & 2.760 & 12.277 & -1.490 & 0.8730 & -2.363 & -3.204 & 1.10  & 0.123 & -0.203 & 1.03  & 0.116 & -0.191 & 0.011 & 0.015 & 0.111 & 10.57 & 1.07  & 0.015 & -0.175 & -0.200 \\     \hline     -3    & 0     & 304.3 & 101.60 & 36.97 & 1.16  & 1.89E-05 & 7.95E+02 & 3.59E+05 & -5.90 & -7    & 7     & 0.0   & 1.400 & 0     & 0     & 0.0   & -1.586 & 0     & 2     & 1.0   & 4.97  & 22.11 & 1.400 & 6.228 & 2.396 & 0.0000 & 2.396 & 3.249 & 0.22  & 0.061 & 0.202 & 0.20  & 0.057 & 0.190 & 0.000 & 0.017 & 0.041 & 0.11  & 0.04  & 0.003 & 0.193 & 0.188 \\     -3    & 2     & 304.4 & 101.61 & 36.98 & 1.16  & 1.89E-05 & 7.95E+02 & 3.59E+05 & -10.37 & -6    & 8     & 1.0   & 1.454 & -1    & 0     & -0.5  & -1.160 & 0     & 1     & 0.5   & 9.43  & 41.95 & 1.454 & 6.465 & 1.990 & 0.1298 & 1.860 & 2.522 & 0.41  & 0.063 & 0.157 & 0.39  & 0.060 & 0.147 & 0.001 & 0.017 & 0.044 & 2.21  & 0.15  & 0.006 & 0.153 & 0.144 \\     -3    & 4     & 304.8 & 101.63 & 36.89 & 1.16  & 1.89E-05 & 7.90E+02 & 3.57E+05 & -14.48 & 0     & 3     & 1.5   & 1.607 & -2    & 0     & -1.0  & -0.888 & 0     & 1     & 0.5   & 13.54 & 60.21 & 1.606 & 7.144 & 1.718 & 0.2820 & 1.436 & 1.947 & 0.59  & 0.071 & 0.122 & 0.56  & 0.066 & 0.114 & 0.003 & 0.016 & 0.053 & 4.31  & 0.31  & 0.008 & 0.123 & 0.110 \\     -3    & 6     & 305.1 & 101.61 & 36.85 & 1.16  & 1.90E-05 & 7.88E+02 & 3.56E+05 & -18.04 & -1    & 3     & 1.0   & 1.860 & 0     & 0     & 0.0   & -0.352 & -1    & 0     & -0.5  & 17.10 & 76.06 & 1.860 & 8.274 & 1.222 & 0.4566 & 0.765 & 1.038 & 0.75  & 0.082 & 0.065 & 0.71  & 0.077 & 0.061 & 0.005 & 0.016 & 0.066 & 6.39  & 0.50  & 0.011 & 0.072 & 0.055 \\     -3    & 8     & 305.2 & 101.62 & 36.77 & 1.16  & 1.90E-05 & 7.84E+02 & 3.55E+05 & -21.32 & -3    & 4     & 0.5   & 2.181 & 0     & 2     & 1.0   & -0.106 & -1    & 0     & -0.5  & 20.39 & 90.68 & 2.182 & 9.706 & 0.976 & 0.6536 & 0.322 & 0.437 & 0.90  & 0.097 & 0.028 & 0.85  & 0.091 & 0.026 & 0.007 & 0.016 & 0.082 & 8.47  & 0.72  & 0.013 & 0.039 & 0.019 \\     -3    & 10    & 305.3 & 101.63 & 36.67 & 1.16  & 1.90E-05 & 7.80E+02 & 3.54E+05 & -24.05 & -3    & 3     & 0.0   & 2.584 & 0     & 0     & 0.0   & 0.037 & 0     & 0     & 0.0   & 23.12 & 102.84 & 2.584 & 11.494 & 0.813 & 0.8730 & -0.060 & -0.081 & 1.03  & 0.115 & -0.005 & 0.97  & 0.108 & -0.005 & 0.009 & 0.015 & 0.102 & 10.53 & 0.94  & 0.014 & 0.010 & -0.013 \\     -3    & 12    & 305.4 & 101.61 & 36.58 & 1.16  & 1.90E-05 & 7.75E+02 & 3.53E+05 & -26.49 & -5    & 0     & -2.5  & 3.191 & 0     & 0     & 0.0   & 0.372 & 0     & 0     & 0.0   & 25.59 & 113.81 & 3.191 & 14.194 & 0.478 & 1.1148 & -0.637 & -0.863 & 1.14  & 0.143 & -0.055 & 1.08  & 0.134 & -0.052 & 0.012 & 0.015 & 0.131 & 12.59 & 1.16  & 0.016 & -0.036 & -0.061 \\     \hline     \end{longtable}%     \end{landscape}


title: Table spanning two pages horizontally?

text: Is there a way to have the overflow of a table too wide for the page to continue horizontally on the next page? I'm trying to create two pages with a table each where every row is adjacent to same row on the other page and this seems like the best way to make sure the row heights are equal, other that strutting and measuring, which seems like a pain. Is there any way this can be done?


title: tikz-cd equivalent to the xy-pic command \ar@{-}

text: How do I make the diagram `X - Y -> Z` with tikz-cd? With xy-pic, I would enter `\xymatrix{ X \ar@{-}[r] & Y \ar[r] & Z }` I tried `\begin{tikzcd} X \ar[no head]{r} & Y \ar{r} & Z \end{tikzcd}` but it didn't work. Note that `\begin{tikzcd} X \ar[two heads]{r} & Y \ar{r} & Z \end{tikzcd}` produces `X ->> Y -> Z` "as it should". In other words: What is the tikz-cd equivalent to the xy-pic command `\ar@{-}`? Thank you very much in advance for your help. **EDIT.** Peter Jansson kindly asked me to provide a Minimal Working Example (MWE). So here is what works:               \documentclass{article}     \usepackage[all]{xy}     \usepackage{tikz-cd}     \begin{document}     $$     \xymatrix{ X \ar@{-}[r] & Y\ar[r] & Z}     $$     $$     \begin{tikzcd}      X \ar[two heads]{r} & Y \ar{r} & Z      \end{tikzcd}     $$     \end{document}      Here is what doesn't work:               \documentclass{article}     \usepackage{tikz-cd}     \begin{document}     $$     \begin{tikzcd}      X \ar[no head]{r} & Y \ar{r} & Z      \end{tikzcd}     $$     \end{document}      I get the error message               ! Package pgfkeys Error:      I do not know the key '/tikz/no head'      and I am going to ignore it.      Perhaps you misspelled it.      This doesn't surprise me because I just tried to guess at a possible command. But I hope that there is a simple way to do this.


title: How to customize \fg{} and \og{} appearances in BEAMER?

text: How to customize **< <** and **>>** appearances in beamer for a better appearance?


title: How do I remove white space before or after the figures and tables?

text: Whenever my figure or table has to move to the next page it is placed exactly at the center of the page, and thus occupies the whole page by itself. I tried all the combination in:               \begin{figure}[htb]      having failed, I tried this one               \usepackage{float}      .      .           \begin{figure}[H]      This kind of work, but again whenever the figure has to be placed on the next page, the previous page has white spaces between the _section heading_ and the _paragraphs_ before and after. I'm exhausted of plans now. any help? **EDIT** Example:               \documentclass[11pt,a4paper,twoside,openany]{book}               \usepackage[latin1]{inputenc}     \usepackage[english]{babel}     \usepackage[demo]{graphicx}          % privides the H option     \usepackage{float}          % produces random text for testing     \usepackage{blindtext}          \begin{document}          \blindtext[2]          \begin{figure}[H]     \centering     \includegraphics[width=0.8\textwidth,height=50mm]{}     \caption{Test Test Test}     \end{figure}          \blindtext[2]          \begin{figure}[H]     \centering     \includegraphics[width=0.8\textwidth,height=50mm]{}     \caption{Test Test Test}     \end{figure}          \blindtext[2]          \begin{figure}[H]     \centering     \includegraphics[width=0.8\textwidth,height=50mm]{}     \caption{Test Test Test}     \end{figure}          \blindtext[2]          \begin{figure}[H]     \centering     \includegraphics[width=0.8\textwidth,height=50mm]{}     \caption{Test Test Test}     \end{figure}          \blindtext[2]          \end{document}      and this is what I get on page 2: ![tex test](http://i.stack.imgur.com/9TpmD.png)


title: pgfplots, using sprintf in clickable library

text: I am using pgfplots in combination with the clickable library. Here's an example               \documentclass{article}     \usepackage[latin1]{inputenc}          % important packages     \usepackage{pgfplots}     \usepgfplotslibrary{clickable}          \begin{document}     \begin{tikzpicture}     \begin{axis}         [% options         xlabel=$x$,         ylabel={$x$},         clickable coords = {exact coords: <br/> (xy)}, % activates a snap-to-nearest feature         annot/snap dist=10,         clickable coords size = {10,5}, % size in characters for the snapping pop ups         annot/popup size generic = {20,10}, % size in characters  for the rest         ]     \addplot         [% options         only marks, % do not connect data points         ]          coordinates          {         (0,0)         (2,2)         (5,5)         };     \end{axis}     \end{tikzpicture}     \end{document}      The result can be seen here https://dl.dropbox.com/u/1833443/clickable-Problem/my_LaTeX_File.pdf If you click near the data points then you will get a message like this:               exact coords:     (x,y)      If you click anywhere else you just get:               (x,y)      Here's a screenshot of the first case: ![Screenshot](https://dl.dropbox.com/u/1833443/clickable- Problem/Screenshot.png) In the pgfplots documentation in chapter 5.1.3 there is also mentioned that you can use the sprintf syntax to customize the formatting. Example:               /pgfplots/annot/point format={sprintf-format} (initially (%.1f,%.1f))      ![documentation](https://dl.dropbox.com/u/1833443/clickable- Problem/documentation.png) But I do not understand how I can use the               %      and               \n      within the normal LaTeX code. **Does anyone have an example how to use the line break symbol (\n) and the variable placeholder symbol (%) in the context of the clickable library?**


title: Setting the line length for caption

text: I am trying to use subfigure to put two figures beside each other and unfortunately LaTeX puts them to the right. I used `hspace` to reduce the space between them and that results in messing up the captions. So I thought the solution might be to change the length of line that makes the caption line break automatically.               \begin{figure}[~hbt]     \subfigure[Nonuniform distribution of points on sphere when the $n$-spherical coordinates are uniformly chosen from related intervals]     {     \includegraphics[scale=0.4]{sphere}     }     \hspace{-3em}     \subfigure[Nonuniform distribution of points on cube when the points on left figure has been transformed using the mentioned diffeomorphism]     {     \includegraphics[scale=0.4]{cube}     }          \end{figure}      Any other solution is welcomed as well.


title: How do I contribute to CircuiTikZ?

text: # Update (29 Dec 2012) The author has already update CircuiTikZ (Thank you, Massimo!). It should be integrated into the CTAN official repositories in a few days. The package is now hosted in Github for easier collaboration at https://github.com/mredaelli/circuitikz * * * I'm having difficulty contacting the author of `circuitikz`. The email address listed in the README no longer exists; delivery fails permanently. I needed a fully differential operational amplifier `fd op amp`, so I created a shape for it. Kindly have a look at my code at https://github.com/kitmonisit/circuitikz Some caveats:   1. Basically I added it to `pgfcirctripoles.sty`. It's supposed to be a quadpole, but I could not figure out how to add it to `pgfcircquadpoles.sty` and simply changing the declaration line to `\pgfdeclarequadpole`   2. I may not have followed the convention in specifying the coordinates to enable dynamic scaling. I'll just call out the following new parts so you can check them easily: new anchors `out-`, `out+`, and the new output terminals which have been commented with `% Positive output terminal` and `% Negative output terminal` I'm hoping that this new shape will be integrated into the next official version of CircuiTikZ. ## Example usage               \documentclass[preview]{standalone}          \usepackage[siunitx]{circuitikz}          \ctikzset{bipoles/capacitor/height/.initial=.4854}     \ctikzset{bipoles/capacitor/width/.initial=.1}          \begin{document}%     \begin{tikzpicture}       \draw       (0,0) node[fd op amp] (opamp) {} node[left] {\(A\)}       % Input       (opamp.-) node[circ] {} to[C, l_=\(C_s\)] ++(-1.5,0) node[ocirc] {} node[left] {\(v_i^-\)}       (opamp.+) node[circ] {} to[C, l=\(C_s\)] ++(-1.5,0) node[ocirc] {} node[left] {\(v_i^+\)}       % Feedback       (opamp.-) -- ++(0,1)  to[C, l=\(C_f\)] ++(2,0) -| (opamp.out+) {}       (opamp.+) -- ++(0,-1) to[C, l_=\(C_f\)] ++(2,0) -| (opamp.out-) {}       % Output       (opamp.out+) node[circ] {} -- ++(1,0) node[ocirc] {} node[right] {\(v_o^+\)}       (opamp.out-) node[circ] {} -- ++(1,0) node[ocirc] {} node[right] {\(v_o^-\)}       ;     \end{tikzpicture}     \end{document}      ![Fully differential operational amplifier](http://i.stack.imgur.com/gZ3oK.png)


title: How can I wrap each page of a document with a box that has a caption?

text: I have a LaTeX document that contains proprietary information. I need to print a version of the document that has a box around the text with a disclaimer (something to the effect of "Proprietary information of company XYZ, do not redistribute without express consent'). How can I do this? If it matters, I'm using MacTex.


title: Two videos side by side in one slide beamer?

text: How can I add two videos in one slide side by side. Both videos should be in a horizontal line. The following code put a video above the other video.               \begin{frame}[t]         \frametitle{ Results}               \includemedia[       label      = AA,       width      = 110mm,       height     = 50mm,       activate   = pageopen,       addresource= master.mov,       flashvars={flv=master.mov & autoplay=0}     ]{}{player_flv_maxi.swf}          \includemedia[       label      = BB,       width      = 110mm,       height     = 50mm,       activate   = pageopen,       addresource= master.mov,       flashvars={flv=master.mov & autoplay=0}     ]{}{player_flv_maxi.swf}          \end{frame}


title: subcaption vs. subfig: Best package for referencing a subfigure

text: On this question a comment by Martin H says, that one should forget about the `subfigure` and `subfig` packages and use `subcaption`. As `subfig` replaces `subfigure`, no argument there. I am currently using `subfig` for displaying my subfigures and quite content with it. So I am wondering, what the advantages of using `subcaption` instead would be or if and **why** the use of `subcaption` is generally preferable to `subfig`.


title: How to automatically detect overfull \hboxes for inline maths mode

text: I am trying to create a macro which should have the following behaviour:   * Write the mathematical expression with the inline mode `\( \)` if it doesn't give rise to an `overfull \hbox` warning,   * Write the same expression in an `dmath` environment (from the `breqn` package) if the first option gives rise to an `overfull \hbox` warning. My problem is to detect the `overfull \hbox` and then to set a variable to true or false in order for the macro to act consequently. Here is my macro:               \newcommand{\mymath}[1]{%     \newif\iftest%     \testfalse     \iftest      \(#1\)     \else     : \begin{dmath}#1\end{dmath}     \fi}      What should I put instead of the `\testfalse` line (which is here only for example purpose) in order to achieve the desired behaviour?


title: Graphical interface for generating presentation slides

text: Is there a good graphical interface, similar to PowerPoint or LibreOffice Impress, for generating presentation slides? When writing documents I prefer to write my text and LaTeX-markups using a text-editor and not using a graphical tool like LyX. However, in the case of presentation slides I want to see the layout and to have the ability to immediately see what you get e.g. by moving a picture with arrow keys. ADDITION: The background to my question is as follows. I have used PowerPoint for more than a decade and like to use a WYSIWYG tool when making presentation slides. However, I can not use PowerPoint on my current computer and I think the output from LibreOffice Impress is inferior. As a long-time user of LaTeX, I have considered using SliTeX or Beamer but unfortunately I do not like the way of working. The end result is of course superior, but I found it very time-consuming and tiresome to e.g. adjust the position and size of pictures.


title: adjusting position of page numbers in bound in PDF pages

text: My document consists of three parts, where part two is an external PDF which I bound in using the `\includepdf` command from the `pdfpages` package. I managed to place page numbers on these pages by use of the option `pagecommand={}`; e.g. `\includepdf[pages=2,noautoscale,pagecommand={}]{Part_2.pdf}`. There is, however, one subtle thing I'd like to have adjusted: As it is now, all page numbers are displayed in the respective top outer corner. However I would like to have the page number of the first page of the PDF to be displayed in the middle at the bottom. How can I do that? (The document class used is `amsbook`)


title: A table with some cells selected

text: I have an assignment at university and I have to write some documents written by hand into a TeX document. I'm facing a problem with the following table: ![](http://i.stack.imgur.com/3VmBN.png) Is it possible to achieve a result similar to the picture above using TeX? I'm not asking for a provided working solution, I'm wondering if I should do it with a photo editor or not (and in this case a little hint would be helpful).


title: hyperref, natbib and PDF/A-compliance

text: My e-Thesis submission is required to be in PDF/A-1b format, and I'm having difficulty producing output that meets this standard using LaTeX. I have successfully typeset a chapter using `dvips` to produce a PostScript file, which can then be converted to PDF/A using Adobe Distiller (Acrobat Pro v8.1.2), BUT with the following issues:   1. if I use `hyperref` with coloured links, the conversion fails, because the PS file is not PDF/A-compliant (see below)   2. if I turn on `draft` mode in `hyperref`, the resulting PS file _can_ be successfully output to PDF/A using Adobe Distiller, but then I get an error, sometimes 2, while typesetting the bibliography (generated with BibTeX and `natbib` using a custom bibliography style) For 1) I have seen references to this known issue: hyperlinks are not incompatible with PDF/A per se, but `hyperref` does not include all the flags required for PDF/A compliance: http://tug.org/mailman/htdig/pdftex/2008-January/007522.html I tried editing `hyperref.sty` as suggested, but this did not seem to work for me (either when typesetting using `pdftex`, or through `dvips`). Acrobat still complained about missing Print and Annot flags for each link (citation and cross- references). I can live with 2) for the official version (no links, but at least it will be 'archive-quality'). Nevertheless, the errors are incredibly annoying. Each bibliographic entry produces this error:                   Argument of \hyper@anchorstart has an extra }      and sometimes also:                   Paragraph ended before \hyper@anchorstart was complete.      These errors never happen when typesetting through `pdflatex`, even in draft mode. I need to produce a PS file for PDF/A-1b conversion, but these errors are a huge pain. I can't fully disable hyperref, because I use the `\autoref{}` macro a lot, and I would rather not have to replace all those manually. I also tried using the `pdfx` package (using the `pdflatex` driver), but got some strange errors very early on in the typesetting run:               /usr/local/texlive/2011/texmf-dist/tex/latex/pdfx/pdfx.sty:121: Use of \getTZh      doesn't match its definition.     <inserted text> D:20121114223403-                                      05'00'     l.121 \expandafter\convertDate\pdfcreationdate      I hope there is enough information above for people to suggest alternatives, or ways to fix the errors. I haven't put together a MWE, but I could probably throw one together if it would help. Thanks for any help you can offer. I am using TexLive 2011 on a Mac (OS X 10.6.8), document processing in TeXShop using simpdftex, Version 20070809 or pdfTeX, Version 3.1415926-2.3-1.40.12


title: Easiest way to write Avery 11137 template

text: Trying to get a template to work for the Avery 11137 label template and it is exceedingly harder than one would think because the geniuses over at Avery put it on an 8.5x7 page and, although it is not impossible to print on 8.5x7 paper, it is the closest thing to impossible without trying to question relativistic physics. ![enter image description here](http://i.stack.imgur.com/1CED4.jpg) So what I want to do instead is print as if it was 8.5x11 and laugh as the printer gets 7 inches in and realizes there are 4 inches missing =D My initial thought was to use tables like so, generate the output to make sure it works, then remove the borders. But I have to make sure it fits the following margins:   * 1 inch from top   * 0.75 inches from right   * 0.75 inches from left   * Row width of 3.5 inches   * Tow height of 0.5 inches **Minimal working example:** EDIT I included `p{3in}` to control the width of the columns               \documentclass{report}          \newcommand{\labelA}{Mastercard}     \newcommand{\labelB}{Visa}     \newcommand{\labelC}{AMEX}     \newcommand{\labelD}{}     \newcommand{\labelE}{}     \newcommand{\labelF}{}     \newcommand{\labelG}{}     \newcommand{\labelH}{}     \newcommand{\labelI}{}     \newcommand{\labelJ}{}     \newcommand{\labelK}{}     \newcommand{\labelL}{}     \newcommand{\labelM}{}     \newcommand{\labelN}{}     \newcommand{\labelO}{}     \newcommand{\labelP}{}     \newcommand{\labelQ}{}     \newcommand{\labelR}{}     \newcommand{\labelS}{}     \newcommand{\labelT}{}     \newcommand{\labelU}{}     \newcommand{\labelV}{}     \begin{document}          \begin{tabular}{ |p{3in}| p{3in}| }       \hline                              \labelA & \labelB \\       \hline                              \labelC & \labelD \\       \hline                              \labelE & \labelF \\       \hline                              \labelG & \labelH \\       \hline                              \labelI & \labelJ \\       \hline                              \labelK & \labelL \\       \hline                              \labelM & \labelN \\       \hline                              \labelO & \labelP \\       \hline                              \labelQ & \labelR \\       \hline                              \labelS & \labelT \\       \hline                              \labelU & \labelV \\       \hline       \end{tabular}     \end{document}      % How do I achieve this with tables? Is there an easier way?


title: Automatically "Trash Aux Files" after successful typesetting in TeXShop

text: Is there some way to automatically fire the "Trash Aux Files" command after successful typesetting in TeXShop, without manual action on the part of the user?


title: How to make front-matter page number non-bold in ToC?

text: Shown in the following pic: ![enter image description here](http://i.stack.imgur.com/WMEXM.png) It seems the Roman page number for front-matter look too dark in ToC, so how to make it as normal font but not change the bold Arabic number for chapters?


title: alternative text to be displayed in the PDF viewer's table of content

text: I use the `hyperref` and the `bookmark` package. Hence the table of content (toc) of the document gets also displayed in the side bar of the PDF reader, when viewing the generated document. My problem is now that I have mathematical expressions in the headlines of some sections, which then are of course not properly displayed in the toc at the side bar of the PDF viewer. For instance the entry ![header example](http://i.stack.imgur.com/FFC5J.png) in the documents table of content gets displayed as ![header example 2](http://i.stack.imgur.com/DDjmb.png) in the side bar of the PDF viewer. I know that it is not possible to have the correct mathematical expression written there, but I would for instance like to have `X_VIII` instead of `XVIII`. Another problem i have is that in some headers I added a `\vspace{8pt}`, and sadly the 8pt is then displayed in the side bar of the PDF viewer: ![header example 3](http://i.stack.imgur.com/kVTyL.png) Therefore my question: Is there a way to manually specify the text to appear in the side bar of the PDF to each section/subsection, etc.?


title: How to present a vertical multiplication/addition

text: How do I present vertical (columnar) multiplication and addition in LaTeX. Like this: http://mathworld.wolfram.com/LongMultiplication.html                   3 8 4     x     5 6     ---------       2 3 0 4     1 9 2 0     ---------     2 1 5 0 4      I used the "array" environment. But i have right align problem. Any other best ideas?


title: How to typeset basic arithmetic

text: What would be the best way to use TeX to typeset basic arithmetic as it's done in school - for example, to typeset equations like                356     + 42      ---      398      written in this way?