title: How can I customize the "go to slide number" navigation symbol

text: I am using a reduced version of the navigation symbols bar that only includes `\insertslidenavigationsymbol`. My presentation only shows the frame numbers (instead of slide numbers) because I use many overlays and the number of slides grows too large. The problem is that if someone in the public ask me to go to a specific frame number (since this is the number they will see), then the navigation button doesn't take me to frame I want to go. Is there a way to customize the `\insertslidenavigationsymbol` option so that it takes me to a frame number instead of a slide number? In the following example you will see that if you go to slide 3 using the navigation symbol, it will take you to page 3 in frame 2 (this is the expected behavior, I guess). However, I want it to go to **frame 3** instead. Any ideas? I tried with `\insertframenavigationsymbol` but that one only let me go to previous/next frame, not to a specific frame number.               \documentclass[compress]{beamer}          \useoutertheme[subsection=false]{miniframes}     \setbeamertemplate{navigation symbols}{\insertslidenavigationsymbol}          {     \defbeamertemplate{footline}{frame number and last}{%       \usebeamercolor[fg]{page number in head/foot}%       \usebeamerfont{page number in head/foot}%        \hfill\insertframenumber\,/\,\inserttotalframenumber\kern1em\vskip2pt%     }          \setbeamertemplate{footline}[frame number and last]{}          \begin{document}       \begin{frame}{This is frame 1}         \onslide<1-2>{Some text\\}         \onslide<2>{\invisible<1>{         Some more text}}       \end{frame}        \begin{frame}{This is frame 2}         This is frame 2        \end{frame}      \begin{frame}{This is frame 3}         This is frame 3      \end{frame}          \end{document}


title: Is there a reason to use \begin{environment} \end{environment} rather than \environment \endenvironment?

text: What reason (other than perhaps being easier for my syntax highlighter to parse) is there to write               \begin{center}     Here is centered text     \end{center}      rather than:               \center     Here is centered text     \endcenter      And likewise for other environments. Does the `\begin` do any extra funky checks or are they effectively synonymous?


title: Names and terms

text: Are there any packages that would help to handle titles and names in the text?   * formatting: italics, quotation marks   * index generation: removing articles, rearranging names to Last, First in the index Or that is what you have to do yourself? Like these:               \newcommand{\ftfilm}[1]{\index{\textit{#1}}}     \newcommand{\ftarticle}[1]{``\index{#1}''}     \newcommand{\ftname}[1]{\index{#1}}


title: Fixing alignment in equations

text: I wish to get a more typical alignment (I hope this obvious) than what I am getting with the following code:               \[                                                                                \hat\delta = \left \{                                                                                \begin{array}{lr}                                                                                \hat\delta(q_i, \epsilon) &= q_i \\                                                                                \hat\delta(q_i, ax) &= \hat\delta(\delta(q_i, a), x) : a\in\Sigma, x\in\Sigma^*                                                                                \end{array}                                                                                \right.                                                                                \]      This produces:![Weird Alignment](http://i.stack.imgur.com/xGOiT.png) After seeing the above picture, I believe it is obvious that I wish to move the = sign and the q_i over to the left in the alignment. How can I achieve this? Thanks for all the help!


title: Prevent longtable breaking in multirow

text: How can I prevent `multirow` from breaking in `longtable` environment, so this won't break at wrong position as shown by code below.               \documentclass{article}     \usepackage{multirow,tabularx,ltxtable,filecontents}     \begin{document}     AAAA     \vspace{49em}          \begin{filecontents}{table.tex}     \begin{longtable}{!{\vrule width 1.2pt}c|c|>{\centering\arraybackslash}X!{\vrule width 1.2pt}}     \noalign{\hrule height 1.2pt}     \multirow{2}{*}{A} & B & C\\ \cline{2-3}% I shouldn't break here      & B & C\\ \hline % I can break here     \multirow{2}{*}{A} & BB & C\\ \cline{2-3}% I shouldn't break here      & B & C\\     \noalign{\hrule height 1.2pt}     \end{longtable}     \end{filecontents}          \LTXtable{\textwidth}{table.tex}     \end{document}      One more thing, how can I make the hline in breaking position become this:               \noalign{\hrule height 1.2pt}


title: Tabular and lines displaying problem with Adobe

text: Considering the following code ( **MWE** ) :               \documentclass{article}     \usepackage[table]{xcolor}% http://ctan.org/pkg/xcolor     \begin{document}     \begin{tabular}{|l|c|r|}       \hline       Some & \cellcolor{blue!25}coloured & contents \\       \hline       \multicolumn{2}{|c|}{\cellcolor{blue!25} multicolumn coloured} & \cellcolor{blue!6} other color \\ \hline       Some & \cellcolor{blue!15}coloured & contents \\       \hline     \end{tabular}     \end{document}      I am having issues with tabular lines displaying, as you can notice on the following pictures. * * * **With Evince (LINUX) :** ![Linux displays](http://i.stack.imgur.com/Byso7.png) No problem so far. * * * **With Adobe (WINDOWS) :** ![windows display](http://i.stack.imgur.com/zsfuU.png) As you can see, lines are not displayed properly. How can I fix this problem ? I wish my document would be displayable whatever the operating system. * * * **NOTES :**   * I tried to follow this post proposal link, but unfortunately, it didn't fixed the problem.   * I compile on Linux with pdflatex, version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)   * That's the same issue with no multicolumn as you can see on below : ![with no multicolumn, windows](http://i.stack.imgur.com/3wiGf.png)


title: Yet another "perhaps a missing \item" error

text: In the following, I get a `perhaps a missing \item` error each time a chapter is processed. This occurred only after the second compilation, once the table of contents information is built. Below I have a MWE where the offending code is near the top. That code is to ensure that the "leading dots" and page number for the "mini table of contents" inserted below the chapter title are printed in black instead of the default color. The result looks the way I want it, in spite of the errors. I have included a little bit more code below than that strictly required for a MWE as I want to avoid solutions that would mess up other important parts (for instance the full table of contents). How could I fix this to avoid these error messages --- while still getting error messages if truly missing `\item`s elsewhere.               \documentclass[11pt,openany]{memoir}     \usepackage{titletoc}     \usepackage{lipsum}          %%%%%% Problem code is here     \titlecontents{section}     [10em] %  left margin     {}% font formatting     {\contentslabel{3em}} % section label and offset     {}     {\color{black}\titlerule*[1pc]{.}\contentspage}     %%%%%%%%  end of problem code          \usepackage{color,calc}     \definecolor{ChapRed}{rgb}{.600,.100,.100}     \setsecheadstyle{\color{ChapRed}\large\bfseries}          % coloured chapter font in toc     \let\oldcftchapterfont=\cftchapterfont     \renewcommand{\cftchapterfont}{\color{ChapRed}\oldcftchapterfont}          %% adapted from BlueBox style, pp:43-44     % http://mirror.csclub.uwaterloo.ca/CTAN/info/latex-samples/MemoirChapStyles/MemoirChapStyles.pdf     \newcommand{\RedBarLength}{5em}          \newsavebox{\ChpNumBox}     \makeatletter     \newcommand*{\thickhrulefill}{%     \leavevmode\leaders\hrule height 1\p@ \hfill \kern \z@}     \newcommand*\BuildChpNum[2]{%     \begin{tabular}[t]{@{}c@{}}     \makebox[0pt][c]{#1\strut} \\[.5ex]     \colorbox{ChapRed}{%     \rule[-\RedBarLength]{0pt}{0pt}%     \rule{1ex}{0pt}\color{white}#2\strut     \rule{1ex}{0pt}}%     \end{tabular}}     \makechapterstyle{RedBox}{%     \renewcommand{\chapnamefont}{\large\scshape}     \setlength{\beforechapskip}{-30pt}     \setlength{\midchapskip}{10pt}     \setlength{\afterchapskip}{30pt}     \renewcommand{\printchaptername}{}     \renewcommand{\chapternamenum}{}     \renewcommand{\printchapternum}{%     \sbox{\ChpNumBox}{%     \BuildChpNum{\chapnamefont\@chapapp}%     {\chapnumfont\thechapter}}}     \renewcommand{\printchapternonum}{%     \sbox{\ChpNumBox}{%     \BuildChpNum{\chapnamefont\vphantom{\@chapapp}}%     {\chapnumfont\hphantom{\thechapter}}}}     \renewcommand{\afterchapternum}{}     \renewcommand{\printchaptertitle}[1]{%     \usebox{\ChpNumBox}\hfill     \parbox[t]{\hsize-\wd\ChpNumBox-1em}{%     \vspace{\midchapskip}%     \thickhrulefill\\[10pt]     {\chaptitlefont \textcolor{ChapRed}{##1}}\\     \startcontents[chapters]     \printcontents[chapters]{}{1}{\color{ChapRed}}     }}%     }     \chapterstyle{RedBox}          \begin{document}     \tableofcontents     \chapter{A chapter}     \section{Section}     \lipsum[1]     \section[Short title for this section]{Section 2 with a very, very long title which probably takes more than one line}     \lipsum[1]          \renewcommand{\RedBarLength}{10em}            \chapter{Second chapter}     \section{Section}     \lipsum[1]     \section{Another section}     \lipsum[1]     \section{Another section}     \section{Another section}     \section{Another section}     \section{Another section}          \end{document}


title: How to teach latex to find Sweave.sty? [Ubuntu 12.04; TeXLive 2011]

text: I work on XUbuntu 12.04 and I have installed `R 2.15`. Since the package manager only provides TeX Live 2009, I use the following to install TeX Live 2011 on XUbuntu:   1. download `install-tl-unx.tar.gz` from Installing TeX Live over the Internet   2. `tar -xzf install-tl-unx.tar.gz`   3. `sudo ./install-tl` # see TeX Live - Quick install (hit "I")   4. add the newly installed version to `PATH` (in `.profile`):              PATH=/usr/local/texlive/2011/bin/x86_64-linux:$PATH      Whenever I compile a `.tex` document containing `\usepackage{Sweave}`, I obtain               ERROR: LaTeX Error: File 'Sweave.sty' not found.      Typically, one uses a symbolic link to teach `(pdf)latex` (actually, `latexmk` in my case) where to find `Sweave.sty`. I did the following:               cd /usr/local/texlive/2011/texmf/tex/latex # that's the tex tree obtained by kpsewhich -var-value TEXMFMAIN     sudo ln -s /usr/share/R/share/texmf Sweave      I also created a link named `Sweave` in `/usr/share/texmf/tex/latex` (via `sudo ln -s /usr/share/R/share/texmf Sweave`). In both cases, I still obtain that `Sweave.sty` was not found (even after a `reboot/texhash`...). How can I tell `pdflatex` where to find `Sweave.sty`? If you need more information about my setup of `R` etc., just let me know. **FINAL SOLUTION** Alan's answer below is completely correct. The reason why `Sweave.sty` was not found in `/usr/local/texlive/texmf-local/tex/latex` is that I installed TeXLive 2011 via `sudo` and so I also had to execute `mktexlsr` via `sudo`. The problem is (see `sudo which mktexlsr` vs `which mktexlsr`) that `sudo mktexlsr` updates only the _old_ (2009) TeXLive tex tree. I found two posts that precisely address this (http://compgroups.net/comp.text.tex/texlive-not- searching-texmflocal/266185 and http://ubuntuforums.org/showthread.php?t=1843563). The final solution is to `sudo chown -R myuser:myuser /usr/local/texlive`. Then one can simply use `mktexlsr` (without `sudo`) to update the new (2011) TeXLive tex tree. Then, `Sweave.sty` is found as Alan described.


title: Remove macro's functionality via a regular expression

text: I want find all `\textbf` in my `.tex` file and delete it, together with it's argument braces `{}`. For example, I want to change:   1. `\textbf{text}` to `text`   2. `\textbf{text \textit{textbis}}` to `text \textit{textbis}`   3. `\textbf{\textit{\textls[-5]{textbis}} text}` to `\textit{\textls[-5]{textbis}} text`   4. `\textbf{\textit{X{textbis}} text}` to `\textit{X{textbis}} text` (where `X` is a paragraph break). I tried to use `\\\textbf\\{([^}]*)\\}` in `\1` but it didn't work because it stops at first `}`.


title: Diagram in TikZ (or other package)

text: I need to make a graphic in LaTeX, almost exactly like the one below but I didn't find any examples of similar diagrams. Can anyone help me? (I removed the text because I didn't want to infringe on anyones copyright.) ![diagram](http://imgur.com/QDu577W.jpg)


title: How to change the distance between columns in a two column footnotes?

text: I'm using `eledmac`'s `\foottwocolX` to put my footnotes into two columns, but can't find a way to reduce the white space between those two columns.               \documentclass[a4paper,12pt]{article}      \TeXXeTstate=1          \usepackage{eledmac}          \foottwocolX{A}          \begin{document}     hello%          \footnoteA{hello hello hello hello hello hello hello hello hello hello hello hello }       \footnoteA{hello hello hello hello hello hello hello hello hello hello hello hello }       \footnoteA{hello hello hello hello hello hello hello hello hello hello hello hello }       \footnoteA{hello hello hello hello hello hello hello hello hello hello hello hello }       \footnoteA{hello hello hello hello hello hello hello hello hello hello hello hello }       \footnoteA{hello hello hello hello hello hello hello hello hello hello hello hello }            \end{document}


title: Test if a given control sequence is an \outer macro

text: I'm in need of a macro which receives a control sequence as argument to test if this control sequence is actually an `\outer` macro. I can code it myself as below .               \documentclass{minimal}     \usepackage{expl3}     \ExplSyntaxOn     \group_begin:     \char_set_lccode:nn { `\; } { `\: }     \char_set_lccode:nn { `\Z } { `\t }     \char_set_lccode:nn { `\T } { `\T }     \char_set_lccode:nn { `\F } { `\F }     \tl_map_function:nN { O U Z E R M A C R ; } \char_set_catcode_other:N     \tl_to_lowercase:n       {         \group_end:         \prg_new_conditional:Nnn \cs_if_outer_macro:c { p, T , F , TF }           {             \exp_last_unbraced:Nf \cs_if_outer_macro_aux:w             \cs_meaning:c {#1} OUZER ~ MACRO ; \q_stop           }         \cs_new_nopar:Npn \cs_if_outer_macro_aux:w #1 OUZER ~ MACRO ; #2 \q_stop           {             \prg_case_str:xxn { #1 ~ }               {                 { \token_to_str:N \ }                 { \prg_return_true: }                 { \token_to_str:N \long \token_to_str:N \ }                 { \prg_return_true: }                 { \token_to_str:N \protected \token_to_str:N \ }                 { \prg_return_true: }                 { \token_to_str:N \protected \token_to_str:N \long \token_to_str:N \ }                 { \prg_return_true: }               }               { \prg_return_false: }           }       }     \cs_new_eq:NN \IfOuterMacroTF \cs_if_outer_macro:cTF     \ExplSyntaxOff          \long\outer\protected\def\fooa{}     \outer\def\foob{}     \def\fooc{}     \def\food{outer macro:}          \typeout{It's \IfOuterMacroTF{fooa}{}{NOT }an outer macro.}     \typeout{It's \IfOuterMacroTF{foob}{}{NOT }an outer macro.}     \typeout{It's \IfOuterMacroTF{fooc}{}{NOT }an outer macro.}     \typeout{It's \IfOuterMacroTF{food}{}{NOT }an outer macro.}     \typeout{It's \IfOuterMacroTF{relax}{}{NOT }an outer macro.}      It is inspired by the `l3token` package. The test is expandable. I have used it in the `xeCJK` package. But, it only receives the _csname_ instead of control sequence. What is more, I think it is a bit slow. I think it is a good question and like to see other possible approaches.


title: ConTeXt: How to make table of contents to show only those entries which go after its placement?

text: \setuplist     [chapter][       style={bold},       color={default},     ]          \setuplist     [section]     [color={default}]          \setuplist     [subsection]     [color={default}]          \setuplist     [title][       style={bold},       color={default},     ]          \setupcombinedlist     [content][       alternative={c},              list={chapter, section, subsection, title},     ]          ...          \starttitle     [title={Annotation}]       ...     \stoptitle          \starttitle     [title={Table of Contents}]       \placecontent     \stoptitle          \starttitle     [title={Introduction}]       ...     \stoptitle          \startchapter     [title={My Chapter}]       ...     \stopchapter          ...          \starttitle     [title={References}]       ...     \stoptitle      I don't want table of contents to show **Annotation** and **Table of Contents** entries, but rather only those that go after its placement, e.g. **Introduction** , **My Chapter** , and **References**. This style is quite typical, but I haven't found any options related to it. Any ideas?


title: beamer: Scaling document icons in the bibliography

text: Bibliographies can be typeset in a smaller font size by redefining the `\bibfont` macro (if one uses `natbib` or `biblatex`) or by simply appending the definition of `\thebibliography`. This also works with the `beamer` class; however, switching to a smaller font size leaves `beamer`'s document icons at the start of each bibitem unchanged. How can I scale those icons down to, say, 75% of their original size? (From Removing document icons from a Bibtex bibliography in Beamer, I gather that an answer is likely to involve some clever use of `\setbeamertemplate{bibliography item}`.)               \documentclass{beamer}          \usepackage{etoolbox}     \apptocmd{\thebibliography}{\scriptsize}{}{}          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @article{Bli74,       author = {Blinder, Alan S.},       year = {1974},       title = {The economics of brushing teeth},       journal = {Journal of Political Economy},       volume = {82},       number = {4},       pages = {887--891},     }     \end{filecontents}          \begin{document}          \nocite{*}          \bibliographystyle{plain}          \begin{frame}     \bibliography{\jobname}     \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/roc4X.jpg)


title: Centre an image, ignoring margins

text: I have a document with .5cm margins; I want to include a long image which will span the width of the page, ignoring margins. I don't care about the whole image being visible (or which part of the image is visible, to be honest) so long as it spans the width. At present the image goes off the right-hand side of the page but its left edge is aligned to the margin.               \documentclass[a5paper,twoside]{article}     \usepackage{graphicx}     \usepackage[a5paper,margin=0.7in]{geometry}          \begin{document}          \newgeometry{margin=.5cm} %tiny margins          Text here.          \vfill          \begin{center}     \hspace{-1cm} \includegraphics[height=4cm]{image}     \end{center}          \vfill          Some text here (not very much).          \end{document}      * * * Bonus question: it would also be very helpful if someone could explain how to position the image a set distance from the base of the page, as opposed to just using `\vfill`s to space things out.


title: Pixelated font as on Texas Instruments calculators

text: For pedagogical reasons, I would like to build one environment to display something like the screen of one Texas Instruments calculator. What I'm looking for is a way to produce, via pdflatex, one pixelated font on Windows, Linux and also Mac OS. Is it possible?


title: Add Appendix with correct page to ToC

text: I am failing to add a heading for the appendix to the ToC with the correct page number:               \documentclass{scrbook}     \begin{document}     \tableofcontents     \chapter{test}     \appendix     \addcontentsline{toc}{part}{\appendixname}     \chapter{First Appendix}     \end{document}      ![enter image description here](http://i.stack.imgur.com/2I3pt.png) I also tried to use the `\addappheadtotoc` command from the appendix package, but that changes nothing (expect that it writes 'Appendices' instead). I assume that the `appendix` package provides the solution, but I could not figure out how to use it.


title: Redefining the amsmath equation* environment

text: For the background to this, see my previous question I've been trying to make changes in my LaTeX document so that math displays in black and text in red. Thanks to Stefan Kottwitz and Torbjørn T. I've been able to go some way towards doing this. At the moment I have               \usepackage{amsmath}     \usepackage{color}     \usepackage{everysel}     \EverySelectfont{\color{red}}     \everymath{\color{black}}          \let\originaldisplaystyle\displaystyle     \renewcommand\displaystyle{\color{black}\originaldisplaystyle}          \let\oldeq\equation     \def\equation{\oldeq\color{black}}      This changes the text color to red, and then changes the colors for inline math, `align` environment and `equation` environment to black. This all works fine. However, when I try to make similar changes to the `equation*` environment:               \let\oldeq*\equation*     \def\equation*{\oldeq*\color{black}}      I get errors. My guess is that the compiler is reading `\equation*` as `\equation` followed by a text asterisk: if I type               \newenvironment{oldeq*}{\equation*}{\endequation*}     \renewenvironment{equation*}{\begin{oldeq*}}{\end{oldeq*}}      then the document compiles, but the `\equation*` environment now renders as the `\equation` environment (i.e. with numbering) but with an asterisk placed before the equation. This is the only thing that I have managed to get to compile so far. What am I doing wrong?


title: \normalfont in new theorem-like environment

text: How can I get universal in my new environment normalfont instead of italic (default)? I thought it was something simple like               \newtheorem{exercise}{ \normalfont}[chapter] `      but doesn't work. I could not find something similar but I think it is something simple, even for me as a new user to LaTeX.


title: Latex formatting entire document for spacing after full stop and comma

text: I am writing a long document in latex. I want to make sure that through out the document the following thing is maintained:   1. no space before and one space after "." (full stop) at the end of a sentence.   2. no space before and one space after "," (comma). This should be done irrespective of how ever the text is written in the latex editor. I tried using \frenchspacing but that does not do this properly. If i have multiple space after "." it reduces it to one space. but if there is no space after "." it does not add a space there. I am not sure if this can be done or not! please help... Example : I want **this. I** want this. I don't want **this.I** don't want this.


title: Question about headers and one inch margins

text: I'm writing an application for the National Science Foundation (NSF) Graduate Fellowship (NSF GRFP) and they require you to have one inch margins. As I want to put the title of the proposal at the top of each page, I put in a header using the fancyhdr package. However, NSF requires that the application have one inch margins, and I was wondering if the header is one inch away from the edge of the page (it sure looks like it)?


title: Marker color in legend

text: Since I updated to TexLive2012 yesterday, I can't get ant colored markers in my legend. Where as first I could put the following in the `\addlegendentry` options, it now won't work. `[{draw=blue,fill=blue!30!white}]` Now it will make a box around my text with the color described. Do I create the legend in a wrong way or is something else going wrong? This is the code I'm using:               \documentclass{article}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}     [title=\textit{ D - $VMG_{up}$}, xlabel=\textit{$VMG_{up}$ [kn]}, ylabel=\textit{D [m]}, legend style={cells={anchor=west},legend pos=outer north east},minor tick num=1]          \addplot[scatter,only marks, mark=*,mark size=1.5,scatter/use mapped color=     {draw=blue,fill=blue!30!white}]coordinates{     (1.9,   5.4)     (2.1,   5.75)     (2.5,   6.14)     (1.95,  5.6)     (2,     5.28)     (2.1,   5.4)     (1.9,   4.89)     (2.19,  4.94)     (2.36,  5.3)     };          \addlegendentry{$C_n$}          \end{axis}     \end{tikzpicture}          \end{document}      I've only put in a few coordinates. Normally I'm importing them from a `.dat` file. Also I am not an experienced user, so it may be just a silly question.


title: Citation replaced by question marks, no error or warning

text: In a pdf with many citations, one of them becomes ????, without errors or warnings. How to make it display correctly? Multiple compilation runs do not help. Replacing the bibtex entry for that citation by an alternative one, the problem disappears. The entry appears correctly formatted, but maybe I missed something - see MWE of tex and bib files below. In the bib file, the citation that is commented out works, the other does not, when the bib file is used with the tex file. tex file:               \documentclass{article}            \usepackage{natbib}          \title{titl}           \author{auth}          \date{dat}          \begin{document}          \cite{meier+schipper2012} \cite{mengel+2011}          \bibliographystyle{econometrica}          \bibliography{MWEbib}          \end{document}      bib file:               %@techreport{meier+schipper2012,     %  title={Bayesian games with unawareness and unawareness perfection},     %  author={Martin Meier and Burkhard C. Schipper},     %  institution={SSRN},     %  number={2055026},     %  year={2012}     %}          @article{meier+schipper2012,       title={Bayesian games with unawareness and unawareness perfection},       author={Martin Meier and Burkhard C. Schipper},       journal={Economic Theory},       pages={1--31},       year={2012},       publisher={Springer}     }          @TechReport{mengel+2011,       author={Friederike Mengel and Elias Tsakas and Alexander Vostroknutov},       title={Decision making with imperfect knowledge of the state space},       year={2011},       month={2},       institution={Maastricht University},       address={PO Box 616, Maastricht 6200 MD, the Netherlands}     }


title: Adding a knitr table from R into a \pgfplotstableread statement

text: I'm trying to get a table from R into a pgfplotstable to edit for printing. the r code is               \documentclass{article}     \usepackage{pgfplotstable}     \begin{document}         \pgfplotstableread[format=inline,row sep=\\,col sep=&,header=false,         ignore.chars={\ }]{%          <<echo=FALSE,results='asis'>>=          temp=rbind(c(rep("",6)),c("",seq(2012,2016,1)),c(rep("",6)))          print(xtable(temp),include.rownames=F,include.colnames=F,only.content=T,hline.after=NULL)          @         }\mytable     \end{document}      and the output has the space at the end shown below and fails to compile with an error. The extra space at the end seems to be an xtable problem rather than a knitr one, but I'm not sure this one is right to ask on SO, and am hoping perhaps there is another way to get the info into the pgfplotstableread that I haven't thought of.               \documentclass{article}     \usepackage{pgfplotstable}     \begin{document}         \pgfplotstableread[format=inline,row sep=\\,col sep=&,header=false,         ignore.chars={\ }]{%         % latex table generated in R 2.15.1 by xtable 1.7-0 package         % Thu Nov  1 19:19:18 2012           &  &  &  &  &  \\             & 2012 & 2013 & 2014 & 2015 & 2016 \\             &  &  &  &  &  \\                 }\mytable     \end{document}      Thanks


title: New list environment: automatic enumeration with "a posteriori" format

text: This is a follow-up question to Nested enumerate labels with parent label appended plus a single set of enclosing parentheses First and foremost, sorry for my English, I'm learning it currently. Exists any form to set first the numbers, and then enclose it between parenthesis, inside the local environment? I'm making my personal `labelist` environment, and I've the same problem. First my intended output and next my actual code:               (A) Item 1       (A.1) Other item       (A.2) Other item     (B) Item 2       (B.1) More items.          (B.1.1) Third level.          (B.1.2) Other third-level item.     (C) And so on      And here the code of my actual custom environment:               \newcounter{list@depth}     \setcounter{list@depth}{0}          \newenvironment{labelist}{%             \stepcounter{list@depth}             \ifnumcomp{\value{list@depth}}{=}{0}{           \begin{enumerate}[label=\Alpha*]        }{           \begin{enumerate}[label*=.\arabic*]        }             %% Here enclose the actual format between parenthesis           }{%         \ifnumcomp{\value{list@depth}}{=}{1}{            \setcounter{list@depth}{0}         }{             \addtocounter{list@depth}{-1}         }              \end{enumerate}      }      With this code, only I get outputs like this:               A Item 1       A.1 Other item       A.2 Other item     B Item 2       B.1 More items.          B.1.1 Third level.          B.1.2 Other third-level item.     C And so on      Because I need only to add parenthesis enclosing labels (an "a posteriori" format).


title: Append a token list to \everymath

text: I've mimicked Donald Knuth by setting `|` as a verbatim delimiter. To give it its normal meaning in math mode, I've set               \everymath{\catcode`\|=12}     \everydisplay{\catcode`\|=12}      However I'd like to _append_ this to `\everymath` instead of erasing its previous content (if any). I've tried               \everymath{a}     \everymath{\the\everymath b}      but it doesn't work. Any idea? PS: this question is for plain TeX.


title: Making an edit to an inline equation that went off of the screen

text: ![enter image description here](http://i.stack.imgur.com/dGGnd.jpg) I'm using LyX, and I want to make an edit to an equation. Since the inline equation is really long, it continues off of the screen. I'm literally in the dark when I try to edit my work since I cannot see it. Is there a way I can copy and paste it or somehow get a hold of the entire equation so I can edit it?


title: "Dimension too large" for pgf plots

text: I have code below which complaining "Dimension too large", what is the problem? And I want to zoom in the 99.8-100 rather than using log scale for y axis, how should I do it?               \documentclass{article}     % GRAPHICS     \usepackage{pgf}     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{pgfplots}     \usetikzlibrary{arrows,automata,positioning}     \begin{document}          \begin{tikzpicture}[font=\sffamily]     \begin{semilogyaxis}[title=\textbf{Anti-correlated dataset},         legend pos=outer north east,xtick={1,2,3,4,5,6,7,8,9},             scaled ticks=false,             log ticks with fixed point,             ylabel = Optimality (%),             xlabel = Number of Constraints     ]     \addplot plot coordinates{(1,100)(2,100)(3,100)(4,100)(5,100)(6,99.82)(7,99.84)(8,99.59)(9,99.65)};     \addplot plot coordinates{(1,100)(2,100)(3,100)(4,100)(5,100)(6,99.44)(7,100)(8,99.78)(9,99.73)};     \addplot plot coordinates{(1,100)(2,100)(3,100)(4,100)(5,100)(6,99.82)(7,99.74)(8,99.74)(9,99.86)};     \addplot plot coordinates{(1,100)(2,100)(3,100)(4,100)(5,100)(6,99.82)(7,99.74)(8,99.74)(9,99.86)};     \legend{$\kmeans$,$\kmeansskyline$,$\pyramid$,$\pyramidskyline$}     \end{semilogyaxis}     \end{tikzpicture}      \end{document}


title: Texmaker Error "File not found"

text: When I open my `Thesis.tex` file I get "File not found" ![enter image description here](http://i.stack.imgur.com/BrvqW.gif) Worst error description ever!? This first occured when I opened the `.tex` file yesterday from my USB. My USB was suddenly write protected (don't know how to fix this either). So I copy the files to a new USB drive (as the files could still be read) but now I have got it again! (This time the USB is not write protected though) It opens the file just fine and I can still work in it but building the pdf doesn't work (it doesn't finish). That's the best description I can give. I think I'm just going to start over copying and pasting the text but maybe you guys have a better suggestion?


title: Adjusting features of a pgf plot

text: I have the pgf plots below, where it doesn't appear well. I wish to   1. put closer the "Solving Time(ms)" and y axis,    2. put the font size smaller how should i do it? There is also a problem for cramping up the number in the right chart, is there a way not to display every number so that the number do not cramping up?               \documentclass[9pt]{sig-alternate}     % GRAPHICS     \usepackage{pgf}     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{pgfplots}     \usetikzlibrary{arrows,automata,positioning}     \begin{document}     \pgfplotsset{     xticklabel={$\mathsf{\pgfmathprintnumber{\tick}}$},     every axis/.append style={     font=\sffamily,       width=6.5cm,         height=4.9cm     }     }     \begin{figure*}[t]     \begin{minipage}{0.5\linewidth}     \centering     \scriptsize      \begin{tikzpicture}[font=\sffamily]     \begin{semilogyaxis}[title=\textbf{ Dataset 1},         legend pos=outer north east,             legend style={draw=none},             xtick={50,100,150,200,250,300,350,400,450,500},         scaled ticks=false,         log ticks with fixed point={1000 sep=},             axis x line=bottom,         axis y line=left,             axis line style=-,             minor tick style={draw=none},             enlargelimits,             ylabel = Solving Time (ms),             xlabel = Service Class Size     ]     \addplot plot coordinates{(50,77)(100,81)(150,109)(200,155)(250,112)(300,139)(350,175)(400,214)(450,206)(500,228)};     \addplot plot coordinates{(50,10)(100,1)(150,2)(200,2)(250,1)(300,1)(350,1)(400,2)(450,1)(500,1)};     \addplot plot coordinates{(50,2)(100,2)(150,2)(200,2)(250,2)(300,1)(350,1)(400,2)(450,1)(500,1)};     \addplot plot coordinates{(50,3)(100,1)(150,1)(200,1)(250,1)(300,1)(350,1)(400,1)(450,1)(500,1)};     \addplot plot coordinates{(50,5)(100,1)(150,2)(200,1)(250,1)(300,1)(350,1)(400,1)(450,1)(500,1)};     \legend{$a$,$b$,$c$,$d$,$e$}     \end{semilogyaxis}     \end{tikzpicture}     \end{minipage}     \begin{minipage}{0.5\linewidth}     \centering     \scriptsize      \begin{tikzpicture}[font=\sffamily]     \begin{semilogyaxis}[title=\textbf{ Dataset 2},         legend pos=outer north east,             legend style={draw=none},             xtick={500,1000,1500,2000,2500,3000,3500,4000,4500,5000},         scaled ticks=false,         log ticks with fixed point={1000 sep=},             axis x line=bottom,         axis y line=left,             axis line style=-,             minor tick style={draw=none},             enlargelimits,             ylabel = Solving Time (ms),             xlabel = Service Class Size     ]     \addplot plot coordinates{(500,35)(1000,1048)(1500,1668)(2000,2309)(2500,2918)(3000,3965)(3500,5008)(4000,5569)(4500,5833)(5000,6680)};     \addplot plot coordinates{(500,855)(1000,1613)(1500,1878)(2000,2228)(2500,2738)(3000,2480)(3500,2512)(4000,3263)(4500,3746)(5000,4676)};     \addplot plot coordinates{(500,80)(1000,90)(1500,62)(2000,77)(2500,54)(3000,49)(3500,33)(4000,45)(4500,34)(5000,68)};     \addplot plot coordinates{(500,101)(1000,633)(1500,302)(2000,151)(2500,138)(3000,35)(3500,41)(4000,57)(4500,20)(5000,42)};     \addplot plot coordinates{(500,20)(1000,66)(1500,79)(2000,74)(2500,81)(3000,45)(3500,57)(4000,45)(4500,27)(5000,17)};     \legend{$a$,$b$,$c$,$d$,$e$}     \end{semilogyaxis}     \end{tikzpicture}     \end{minipage}     \end{figure*}      \end{document}       ![enter image description here](http://i.stack.imgur.com/vtuHz.png)


title: Why isn't kpathsea picking up my local version of a file?

text: I've just made a minor alteration to a file from a TeX package. I copied it into my local texmf tree and made the change there. When I tried `kpsewhich <filename>` to test that it was finding my local version, it returned the original one and not the new one. In actual fact, the original file was from my local texmf tree already so I renamed the old one something simple. Now `kpsewhich <filename>` returned the _system_ version of the file. To check that the file was there, I tried `kpsewhich -all <filename>` and got the correct two versions of the file: my modified one and the system one (in that order). If I try this with another file that I know exists in both places, then `kpsewhich <filename>` returns my local file. Here's the various invocations and their results:               ~% kpsewhich pgfsys-pdftex.def     /usr/local/texlive/2012/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def     ~% kpsewhich -all pgfsys-pdftex.def      /Users/stacey/Library/texmf/tex/latex/bzr/pgfsys-pdftex.def     /usr/local/texlive/2012/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def     ~% kpsewhich tqft.sty                   /Users/stacey/Library/texmf/tex/latex/bzr/tqft.sty     ~% kpsewhich -all tqft.sty     /Users/stacey/Library/texmf/tex/latex/bzr/tqft.sty     /usr/local/texlive/2012/texmf-dist/tex/latex/tqft/tqft.sty      Is it something special about the `.def` extension? Is there some command that I forgot to run? Are there some other options to `kpsewhich` that will help me debug this?


title: How do I change subsection labeling?

text: The following code produces 1 next to Foo and 1.1 next to Bar.               \section{Foo}     \subsection{Bar}      How do I produce 1 next to Foo and 1a next to Bar? And 1b for the next subsection, and so on?


title: macports tex install does not have nag.sty

text: How do I install missing style files with macports' tex install?                File `nag.sty' not found.


title: bigfoot with "para" option cannot count footnotes perpage

text: I'm typesetting a large and complex document with some tens of thousands of footnotes. Some of these notes are substantial, while many others are very short. So I need to use footnote numbering "per page", which the `perpage` package handles fine. I would also like to place the short notes inside a single paragraph where this is convenient, while the longer footnotes have their own paragraph. The `bigfoot` package with `\DeclareNewFootnote[para]{default}` does this nicely. However I struggled to get the two behaviours to work together: when the paragraphing of notes is correct, it will not count footnotes per page. Here's a MWE.               \documentclass{book}          \usepackage{perpage}     \usepackage{bigfoot}     \DeclareNewFootnote[para]{default}          \begin{document}     Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.}           Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.}           Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.}           Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.}           Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.}           Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.}           Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Short.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.} Here is some paragraph text.\footnote{Here is quite a long, really very quite long, long footnote. It's actually very long if you take the time to read the whole thing.}                \end{document}


title: Why is my text font lighter than my math font?

text: When I used packages like Mathdesign and give commands like `\setrmdefault{cmr}` or something like this, what used to happen is the Text Font used to get lighter whereas the Math font used to be darker. Why does this happen, and how can I prevent this from happening?


title: placing the figure at bottom of the page

text: I want to place the column-spanned figure at the bottom of the page near to the text but using `\begin{figure*}[b]` goes the figure to the end of the document!! Why?               \begin{figure*}[b]         \centering         \includegraphics{fig.eps}         \caption{Something}         \label{f1}     \end{figure*}


title: What's the right way to change display of chapter headings?

text: I am using the `scrbook` class and I would like to achieve the following effect for my chapter headings:                ####        #####          ###          ###         #####      Name of chapter      How would I do this best? Is it possible to do this by simply changing the preamble?


title: Strange Vertical Grid in TiKZ bar plots

text: I've trying to make a set of bar plots using TiKZ and `pgfplots` but for some unknown reason, the plot displays a vertical grid in X = 1, even when there is no grid added to the graph. Is there a way to solve this? Here is a MWE:               \documentclass{article}     \begin{document}     \begin{tikzpicture}     \begin{axis}[      xmin = 0, xmax = 4,      ymin = 0, ymax = 0.2,      yticklabel={\pgfmathparse{\tick*100}\pgfmathprintnumber{\pgfmathresult}\%},      xlabel = X, ylabel = Y,      ybar interval=1,      bar width=25pt,      legend style={cells={anchor=center, fill}, nodes={inner sep=1,below=-1.1ex}},area legend,      legend pos=outer north east      ]      \addplot [color = red, fill = red, ybar]         coordinates{(1,0.1632003)                     };      \addplot [color = green, fill = green, ybar]         coordinates{(2,0.132558)                     };       \addplot [color = blue, fill = blue, ybar]         coordinates{(3,0.1173594)                     };      \draw [black, thick] (axis cs:0,0) -- (axis cs:7,0);                     \legend{A, B, C}      \end{axis}      \end{tikzpicture}          \end{document}      And a preview: ![enter image description here](http://i.stack.imgur.com/YHINL.jpg)


title: Multiple arrows to an object

text: I am trying to figure out how to make several arrows point to a particular object. For example if I am wanting to have an arrow `$A_i \rightarrow A` `A_j \rightarrow A$` and `$A_k \rightarrow A$` and `$A_i \rightarrow A_j$` in a diagram. I have worked out how to do:               \begin{equation*}       \xymatrix@C+2em@R+2em{        A_i  \ar[d]_{f^{i}} & B_i \ar[d]^{h^{i}} \\       A \ar[r]_{\phi} & B       }      \end{equation*}      But I don't know how to modify this to get what I want (and I can't seem to find examples using the `equation*` or other workable examples. Thanks, Brian


title: Align equals sign in table

text: I am trying to align an equals sign between two sets of cells. The first table here doesn't want to align, whilst the second table does. Is there a more elegant way of doing this?               \documentclass{article}     \begin{document}     \begin{table}     \centering                   \begin{tabular}{c c c c}     \hline     1 & 167 & 1 & 144 \\                    2 & 194 & 2 & 167 \\                     \multicolumn{2}{r}{Chi-square = .19} & \multicolumn{2}{r}{Chi-square = 5.74} \\     \multicolumn{2}{r}{\emph{p} = .999} & \multicolumn{2}{r}{\emph{p} = .332} \\     \hline                                   \end{tabular}     \end{table}      \end{document}      This one is aligned:               \documentclass{article}     \begin{document}     \begin{table}     \centering     \begin{tabular}{c c c c}     \hline                                   1 & 160 & 1 & 160 \\                   2 & 160 & 2 & 179 \\                      \multicolumn{2}{r}{Chi-square=2.73}&\multicolumn{2}{r}{Chi-square=5.28} \\     \multicolumn{2}{r}{ p=.741}&\multicolumn{2}{r}{ p=.383} \\     \hline                                   \end{tabular}     \end{table}      \end{document}


title: Line break in lines with colons

text: I noticed that if I've got something like this:               one::two::three::four one::two::three::four one::two::three::four      something weird happen:               %                      the right page margin would be here |     %                                                          |     %                                                          v     one::two::three::four one::two::three::four one::two::three::four      the page margin is where I marked, but the line doesn't get broken, `::four` goes out of the page, although it is aligned so that the first colon is exactly after the margin, like if it had to be splitted. Why doesn't the line gets broken between `one::two::three` and `::four`?   And then why does it get aligned that way, so that `::four` goes out of the page?


title: A biblatex style that's like plainnat

text: I want to switch to `biblatex` but despite the rather minimal changes suggested in some answers to switching from `natbib`, there's really a lot that seems to need changing. For example, the "In:" needs to go. The order of entries needs to change. The book edition field needs to change as well as move. Basically, there's a lot more to do than suggested in the answers to the first question. Is there a simple way that I can start with a `biblatex` style that behaves exactly like `plainnat` (modulo the incompatible changes to the various fields like edition) and then tweak it from there? It's not worth my time right now (deadlines, you understand) to start from `numeric-comp` and then try to figure out what needs to change in order to match `plainnat`. This is exacerbated by needing to have two slightly different versions of the `.bib` (again, for things like edition) to test for differences.


title: includegraphics error when scaling image

text: I have been using Latex for years now, and consider myself fairly fluent, but this error has me stumped. I am using Miktex 2.9 in Windows 7, and am encountering an error in something that up until now has always worked fine for me on other systems. I get the error:                ! pdfTeX error (\pdfsetmatrix): Unrecognized format..     <to be read again>                     \endgroup \set@typeset@protect      l.9 \end{document}      when compiling with pdflatex and I include an image (png or pdf, haven't tried other formats) and try to resize it using either of the following:               \includegraphics[width=\textwidth]{CQL.pdf}      or               \includegraphics[height=10cm]{CQL.pdf}      However, if I simply use:               \includegraphics{CQL.pdf}      then it all works fine. I have removed all other packages and set the document class to article rather than a custom style, but that doesn't solve the problem. Here is the a minimal piece of code that gives this problem:               \documentclass{article}     \usepackage{graphicx}     \begin{document}          \begin{figure}     \includegraphics[height=10cm]{CQL.pdf}     \end{figure}          \end{document}      Given an option, I would probably just avoid this headache by booting up Ubuntu, but I currently do not have that option (also not in a VM). Can anybody help me? EDIT: PDF file in question: https://drive.google.com/file/d/0BwRwUW7S2s2HWXMxMEtCeXNOS3c/edit Log output, including \listfiles output:               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (preloaded     format=pdflatex 2014.2.11)  18 FEB 2014 17:17 entering extended mode     **figtest (C:\Users\andrew.k\Documents\ecai2014\figtest.tex LaTeX2e <2011/06/27> Babel <v3.8m> and hyphenation patterns for english,     afrikaans, ancientgreek, ar abic, armenian, assamese, basque, bengali,     bokmal, bulgarian, catalan, coptic,  croatian, czech, danish, dutch,     esperanto, estonian, farsi, finnish, french, ga lician, german,     german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland ic,     indonesian, interlingua, irish, italian, kannada, kurmanji, latin,     latvian,  lithuanian, malayalam, marathi, mongolian, mongolianlmc,     monogreek, ngerman, n german-x-2013-05-26, nynorsk, oriya, panjabi,     pinyin, polish, portuguese, roman ian, russian, sanskrit, serbian,     slovak, slovenian, spanish, swedish, swissgerm an, tamil, telugu,     turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl ishmax,     welsh, loaded. ("C:\Program Files (x86)\MiKTeX     2.9\tex\latex\base\article.cls" Document Class: article 2007/10/19 v1.4h Standard LaTeX document class ("C:\Program Files (x86)\MiKTeX     2.9\tex\latex\base\size10.clo" File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option) ) \c@part=\count79     \c@section=\count80 \c@subsection=\count81 \c@subsubsection=\count82     \c@paragraph=\count83 \c@subparagraph=\count84 \c@figure=\count85     \c@table=\count86 \abovecaptionskip=\skip41 \belowcaptionskip=\skip42     \bibindent=\dimen102 ) ("C:\Program Files (x86)\MiKTeX     2.9\tex\latex\graphics\graphicx.sty" Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)          ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty"     Package: keyval 1999/03/16 v1.13 key=value parser (DPC)     \KV@toks@=\toks14 ) ("C:\Program Files (x86)\MiKTeX     2.9\tex\latex\graphics\graphics.sty" Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)          ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty"     Package: trig 1999/03/16 v1.09 sin cos tan (DPC) ) ("C:\Program Files     (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg" File: graphics.cfg     2007/01/18 v1.5 graphics configuration of teTeX/TeXLive ) Package     graphics Info: Driver file: pdftex.def on input line 91.          ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"     File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX          ("C:\Program Files (x86)\MiKTeX     2.9\tex\generic\oberdiek\infwarerr.sty" Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) ) ("C:\Program Files     (x86)\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty" Package: ltxcmds     2011/11/09 v1.22 LaTeX kernel commands for general use (HO) )     \Gread@gobject=\count87 )) \Gin@req@height=\dimen103     \Gin@req@width=\dimen104 )     (C:\Users\andrew.k\Documents\ecai2014\figtest.aux) LaTeX Font Info:        Checking defaults for OML/cmm/m/it on input line 6. LaTeX Font Info:       ... okay on input line 6. LaTeX Font Info:    Checking defaults for     T1/cmr/m/n on input line 6. LaTeX Font Info:    ... okay on input line     6. LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6. LaTeX Font Info:    ... okay on input line 6. LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6. LaTeX Font Info:       ... okay on input line 6. LaTeX Font Info:    Checking defaults for     OMX/cmex/m/n on input line 6. LaTeX Font Info:    ... okay on input     line 6. LaTeX Font Info:    Checking defaults for U/cmr/m/n on input     line 6. LaTeX Font Info:    ... okay on input line 6.          (C:\Users\andrew.k\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     \scratchcounter=\count88 \scratchdimen=\dimen105 \scratchbox=\box26     \nofMPsegments=\count89 \nofMParguments=\count90     \everyMPshowfont=\toks15 \MPscratchCnt=\count91     \MPscratchDim=\dimen106 \MPnumerator=\count92     \makeMPintoPDFobject=\count93 \everyMPtoPDFconversion=\toks16 )     <CQL.pdf, id=1, 722.7pt x 542.025pt> File: CQL.pdf Graphic file (type     pdf)  <use CQL.pdf> Package pdftex.def Info: CQL.pdf used on input     line 9. (pdftex.def)             Requested size: 379.37907pt x     284.52756pt.          Overfull \hbox (34.37907pt too wide) in paragraph at lines 9--10 [][]      []          [1 ! pdfTeX error (\pdfsetmatrix): Unrecognized format.. <to be read     again>                        \endgroup \set@typeset@protect  l.12 \end{document}                 Here is how much of TeX's memory you used:  1100 strings out of     493921  14605 string characters out of 3144867  62924 words of memory     out of 3000000  4449 multiletter control sequences out of 15000+200000     3640 words of font info for 14 fonts, out of 3000000 for 9000  841     hyphenation exceptions out of 8191  27i,5n,19p,215b,213s stack     positions out of 5000i,500n,10000p,200000b,50000s !  ==> Fatal error     occurred, no output PDF file produced!


title: Pgfplots, Units and "Modify Number Data Scale"

text: I've got a question with `tikzpicture` in LaTeX. Data of Tikzpicture are in a external file. The y-axis scale is like: 100,000 - 150,000... (thousands). I need to put the scale of this axis like 100 - 150 - 200..., and put "K_unit" on the axis label. I've tried so many options, but nothing works. The last approximation that I've followed was to use the library units from pgfplots, as in: this page. It works, but shows "[unit]" in the axis label. Two questions: 1) Is it possible to remove the unit text, or customize axis label with the previous approximation? 2) Is there another option "to reduce the scale of my data"?


title: Skim,emacs,sublime text3, backward search doesn't work

text: My working enviroment follows: OS: OS X Mavericks 10.9.2 Skim: 1.4.8 Editors: emacs-mac with AucTeX(Homebrew), sublime 3 with LaTeXtools (all versions are up-to-date) I have met a strange issue that the backward search shorcut of skim is invalid while the forward search works well for me(at least when used with emacs, the line chosen was highlighting, although not the specific word was marked. In sublime, which was wierd, the default shortcut"cmd+l,j" worked now and then and the skim couldn't come to foreground automatically). I failed to use cmd+shift+left click to jump from PDF to .tex file with both editors. I've no idea if there is any application conflicts with the keybinding after assigning a new shorcut in system preference for "backward search" in skim.app still couldn't made any change. My solution(at least partial): Thanks to Christiaan's help and one thread from skim-app-user mailing list, I use the command of "/usr/local/bin/emacsclient" in the custom preset, and it works well. So I think maybe I should make some change to the preset command of Sublime Text 3.


Where is the encoding format stored for a .tex file? I had my editor set to latin1 by mistake when I created my file and I had to resort to               % !TEX encoding = UTF-8 Unicode      in the preamble to force UTF-8. I think the file still is encoded in latin1 and this modeline makes the editor ignore the actual encoding and force it to UTF-8.


title: How to use siunitx with mathdesign and Adobe Garamond fonts?

text: I have seen this question, but in making an MWE I discovered that this happens without `fontspec` loaded at all. I would expect that `siunitx`'s mode detection would cause output to match the numerals in either text or math mode in the rest of the document. This works as I'd expect with two fonts including oldstyle numerals (`cfr-lm` and `mathpazo`): the numerals used in `\num{560}` correspond to those used in `560`, and the same for `\\(\num{560}\\)` and `\\(560\\)`. But using `adobe-garamond` with `mathdesign`, I get oldstyle numerals with `\\(\num{560}\\)` while getting uppercase numerals with `\\(560\\)`. The behavior is the same if I use `$ $` or `\\( \\)` to delimit math mode. I tried to find a free font that also has this issue, but was unsuccessful; so I apologize in advance for that inconvenience. How can I use `siunitx` with `\usepackage[adobe-garamond]{mathdesign}` and have `siunitx`'s mode detection function properly? **MWE**               \documentclass{article}     %\usepackage{cfr-lm} % this works as expected     %\usepackage[osf]{mathpazo} % this works as expected     %\usepackage{mathpazo} % this also works as expected     \usepackage[adobe-garamond]{mathdesign} % this doesn't work as expected (siunitx typesets oldstyle figures)     \usepackage{siunitx}     %\sisetup{detect-all} % tried this; it has no effect          \begin{document}     Here, a test of numerals in text mode: 560          And numerals in mathematics mode: \(560\)          And numerals in \textsf{siunitx} macros (text): \num{560}          And numerals in \textsf{siunitx} macros (math): \(\num{560}\)          % for Joseph's comment:     With mathnormal: $\mathnormal{560}$          With mathrm: $\mathrm{560}$     \end{document}      **Output** ![enter image description here](http://i.stack.imgur.com/EW6vV.png) *I realize that the sans serif fonts are bitmapped in my MWE; I just didn't load anything else for the purpose of keeping the MWE minimal.


title: Big \sum instead of small \sum in array environment

text: \begin{align*}     \begin{array}{c}     \min \: A = \min \: \sum_{i\in B} C_i      \\ \\     \min \: D = \min \: \sum_{i\in B} \pi_i \cdot F_i     \end{array}     \end{align*}      See http://i.stack.imgur.com/TFIfY.png for an image of the equation. How can I get {i \in B} below the Sigma symbol without breaking the align into multiple aligns? Thanks!


title: How to break this long radical into multiple lines?

text: I've got a very long radical in a display-math environment, so long that the equation spills in the right margin. How can I break that equation over multiple lines, so that it doesn't go into the right margin? ![enter image description here](http://i.stack.imgur.com/nWSDa.jpg)               \documentclass[12pt,a4paper]{article}          \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{fourier}     \usepackage[left=3cm,right=3cm,top=2.5cm,bottom=2cm]{geometry}          \begin{document}     \[         V_{DABC}=\dfrac{1}{6}\cdot DA \cdot DB \cdot DC \cdot \sqrt{1+2\cdot         \cos \widehat{ADB}\cdot \cos \widehat{BDC}\cdot \cos \widehat{ADC}         -\cos^2 \widehat{ADB} -\cos^2 \widehat{ADC} -\cos^2 \widehat{BDC}}          =\dfrac{2\sqrt{2}}{3}.     \]     \end{document}


title: How can I define a series of different font styles for use in a document? (like a .css style sheet...)

text: I am completely new to Latex so forgive me if this is a stupid question. What I want to be able to do is specify a number of different font styles for use in different parts of my document. So for example, I might create a style called `title` which uses Helvetica Black at 14pt, and a style `sub-title` that uses Helvetica Condensed at 12pt, and a `body` style that uses Tahoma at 10pt in 80% grey. I would then just label the various bits of my document. I am currently using XeLaTeX, like so:               \usepackage{xltxtra}     \setmainfont[Mapping=tex-text]{Tahoma}     \begin{document}      But this just gives me one font throughout and then the document styles the headers etc, I don't get a chance to use a different type face, or take fine grained control. I'm probably missing something here, but I'm sure what I'm asking is possible? Thanks


title: How do I use a circle as a math accent (larger than \mathring)?

text: To denote the interior of a set, I'd like to have a command `\interior`. Now, as one can learn from this post, one possibility is to use `\mathring`. This is a neat command, but it produces a circle that to my taste is too small for the purpose. Of course one can experiment with `\overset{\circ}{...}`, but this way I had difficulties getting satisfactory vertical and in particular horizontal positioning of the `\circ`. An example:               $\mathring{I}\ \mathring{J}\ \overset{\circ}{I}\ \overset{\circ}{J}$      yields ![alt text](http://i.stack.imgur.com/RTjj2.png) . If one has a close look then one sees that the `\circ` over the `J` should be moved to the right _more_ than the `\circ` over the `J`! Is there a way to obtain the same nice automatic positioning as with mathring?


title: How do I make the command texdoc latex2e to open the PDF version by default?

text: I found a `latex2e.pdf` in my MiKTeX installation tree. How do I make `texdoc latex2e` open the PDF version by default? **UPDATE** :   I tried renaming `latex2e.html` to something else, and now the PDF version is opened by default. Is there a more elegant way to do this?


title: Beamer with XeLaTeX on TexLive2013: enumerate numbers in black

text: Using TeX Live 2013, with this combination:   * Beamer (version 3.26) Copenhagen theme.   * Compiled with XeLaTeX.   * Using enumerate environment. I get the numbers (usally as white font inside blue circle) with black font colour. With TeX Live 2012, the numbers are white, as expected. For example:               \documentclass[10pt,table]{beamer}     \usetheme{Copenhagen}          \begin{document}     \begin{frame}     \begin{enumerate}         \item num         \item num         \item num         \item num     \end{enumerate}     \end{frame}     \end{document}      Produces with TexLive2012: ![enter image description here](http://i.stack.imgur.com/5N71Q.png) And with TexLive2013: ![enter image description here](http://i.stack.imgur.com/XuwAI.png) What can be done to get the numbers white again? (I want them like that because of the better contrast with the blue background). * * * **Update:** As requested by @JosephWright, this is the relevant file listing:               beamer.cls    2013/01/04 3.26 A class for typesetting presentations (rcs-revision e81e0c94bcc6)     beamerbasercs.sty    2013/01/04 (rcs-revision 9a97a4eee358)     beamerbasemodes.sty    2012/04/15 (rcs-revision cc6557182d97)     beamerbasedecode.sty    2010/05/01 (rcs-revision efa082c6111d)     beamerbaserequires.sty    2010/05/01  (rcs-revision efa082c6111d)     beamerbasecompatibility.sty    2012/05/01  (rcs-revision 67c48b3b652d)     beamerbasefont.sty    2012/09/19  (rcs-revision 733629cd0c6c)     beamerbasetranslator.sty    2010/06/11  (rcs-revision 85fd1cc7fc42)     beamerbasemisc.sty    2012/02/24  (rcs-revision 2ff5461be705)     beamerbasetwoscreens.sty    2010/05/01  (rcs-revision efa082c6111d)     beamerbaseoverlay.sty    2012/11/11  (rcs-revision 6afbc49b1109)     beamerbasetitle.sty    2010/09/21  (rcs-revision f0446ed0b6ae)     beamerbasesection.sty    2013/01/04  (rcs-revision 54309ceef997)     beamerbaseframe.sty    2012/12/26  (rcs-revision 1443917db2cf)     beamerbaseverbatim.sty    2012/08/30  (rcs-revision dfdb135076b3)     beamerbaseframesize.sty    2011/09/12  (rcs-revision 70f9d8411e54)     beamerbaseframecomponents.sty    2012/09/13  (rcs-revision dcd846607320)     beamerbasecolor.sty    2010/06/06  (rcs-revision d1a9b48be06d)     beamerbasenotes.sty    2012/12/19  (rcs-revision 1686da3db3c9)     beamerbasetoc.sty    2012/10/02  (rcs-revision 5ed0f4010e8a)     beamerbasetemplates.sty    2010/05/01  (rcs-revision efa082c6111d)     beamerbaseauxtemplates.sty    2012/05/01  (rcs-revision 67c48b3b652d)     beamerbaseboxes.sty    2012/05/13  (rcs-revision 56972908a390)     beamerbaselocalstructure.sty    2012/11/13  (rcs-revision ddfba79dac19)     enumerate.sty    1999/03/05 v3.00 enumerate extensions (DPC)     beamerbasenavigation.sty    2012/04/03  (rcs-revision 42a0f21a412d)     beamerbasetheorems.sty    2010/06/06  (rcs-revision 7e7cc5e53e9d)


title: What is the LaTeX command for "em dash" (—)?

text: I am trying to insert the symbol in the title of the question, which I copied from a PDF article, but it appears as space in the output file. What is the corresponding LaTeX command?


title: How to right align content of pbox?

text: Lets have simple `\pbox` example like this:               \documentclass[twoside]{book}     \usepackage{pbox, calc}     \begin{document}     \noindent\fbox{\pbox{\textwidth}{Some text\\Text}}     \end{document}      Here is printed result: ![enter image description here](http://i.stack.imgur.com/z9ea2.png) I want that `Text` on second line to be alighned right. I tried to adjust previous code so that it reads:               \documentclass[twoside]{book}     \usepackage{pbox, calc}     \begin{document}     \noindent\fbox{\pbox{\textwidth}{\begin{flushright}Some text\\Text\end{flushright}}}     \end{document}      When trying to compile it I'm getting following error:               ! LaTeX Error: Something's wrong--perhaps a missing \item.      Even with the error there is still some output but it is not entirely correct (too big box margins): ![enter image description here](http://i.stack.imgur.com/jUXlF.png) How can I correctly right align content of `pbox`?


title: First time XeLaTeX UTF8 bibliography in TeXworks

text: I see people having various problems related to bibliographies in TEX.SE, but I cannot really benefit from answers, because I'm not sure how to use any bibliography let alone UTF8. Could anybody paste a minimal working example citing a website and a tell how to compile it (it appears to be different than simply compiling a .tex)? Edit: I realize how lame this thread looks, but I honestly could not find an exact tutorial, because it's either pdflatex, non-UTF8, not TeXworks or whatever people talking about...


title: Chapter Numbering

text: Using code from Remove "chapter #" from the chapter title but keep chapter number in the table of contents This removes the Chapter # from the header, however can I have the chapter number inserted within the chapter name? I.e 1 - Introduction etc. To match the table of contents.


title: Alignment with IEEEeqnarray

text: Let's say I wish to use IEEEeqnarray to typeset an equation like the following: ![enter image description here](http://i.stack.imgur.com/4j5LZ.png) Obviously I can do this by manually inserting lots of spacing commands, but I would prefer to be able to do this by specifying the column alignment when the IEEEeqnarray environment is started. So I have been experimenting with various alignment options such as               \begin{IEEEeqnarray}{lCr}      but can I only achieve an equation typeset similar to ![enter image description here](http://i.stack.imgur.com/Uy3L7.png) How can I do this through the allignment option?


title: Russian and Chinese in the same document

text: I'm writing a document that is going to required having Russian, Chinese characters, and English. I'm using CJK and babel and example code is below:               \documentclass[12pt]{article}     \usepackage[margin=1in]{geometry}     \usepackage[T1,T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[russian, english]{babel}     \usepackage{CJK}     \usepackage{setspace}     \doublespacing     \usepackage{natbib}     \begin{document}     слово     \begin{CJK}{UTF8}{gbsn}     你好     \end{CJK}          слово          \end{document}      The Russian that becomes before the CJK environment shows up fine, but anything afterwards doesn't display properly.


title: How to adjust length of bosons, feynmp/feynmf

text: I am having trouble making the length of three bosons the same. I've been working on this diagram for more than two weeks and just can't get the length to come out just right. Here is my code:               \documentclass{article}     \usepackage{feynmf}%%%{feynmp}     \usepackage{tikz}          \unitlength=1mm     \begin{document}                    \begin{fmffile}{tree2}     \begin{fmfgraph*}(60,55)          \fmfleft{i0,i1,i2,i3,i4}     \fmfright{o0,o1,o2,o3,o4}     %%\fmf{fermion}{o1,i1}     \fmf{scalar, label=$A^0$, tension=.7,l.side=left}{i2,v2}     \fmf{scalar, label=$\vec{q}$, tension=.7,l.side=right}{i2,v2}     \fmf{phantom}{v2,o2}     \fmffreeze     \fmf{boson, label=$Z$, lab.side=left}{v3,o4}     \fmf{boson, label=$\vec{p_3}$, lab.side=right}{v3,o4}          \fmf{boson, label=$Z$ , lab.side=right}{v3,o2}     \fmf{boson, label=$\vec{p_2}$ , lab.side=left}{v3,o2}          \fmf{scalar, label=$H$, tension = .5, l.side=left}{v2,v3}     \fmf{scalar, label=$\vec{q}-\vec{p_1}$, tension = .5,l.side=right}{v2,v3}               \fmf{phantom}{i4,v3}     \fmffreeze     \fmf{boson, label=$\vec{p_1}$ , lab.side=right}{v2,o0}     \fmf{boson, label=$Z$ , lab.side=left}{v2,o0}          \fmflabel{$\mu$}{o0}     \fmflabel{$\nu$}{o2}     \fmflabel{$\rho$}{o4}          \end{fmfgraph*}     \end{fmffile}     \end{document}      Thank You! ![This is what I am trying to draw](http://i.stack.imgur.com/v0kyl.png)


title: Floating wrapfigure and page break

text: I use the `wrapfig` package to have some text wrapping around a figure. I want the wrapfigure to float so I use the capital letter L to set the placement of the figure. When the figure is at the bottom of a page and that there is not enough space left, wrapfig decides to put the figure on the next page. But it puts it where the next paragraph starts. Is it possible to make wrapfig place the figure at the top of the next page? ![enter image description here](http://i.stack.imgur.com/gxamy.png)               \documentclass{article}     \usepackage{wrapfig}     \begin{document}     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test          test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test          test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test          test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test          test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test          test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test          \begin{wrapfigure}{L}{10cm}     \rule{10cm}{5cm}     \end{wrapfigure}     WRAP PAR BEGIN test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test SHOULD BE HERE test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test WRAP     PAR END          EFFECTIVE WRAP PAR test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test     test test test test test test test test test test test test test test          \end{document}


title: Using toggles from etoolbox to switch Sweave Schunks of code on and off

text: I would like to use the toggles from `etoolbox` to direct Sweave to evaluate or not evaluate chunks of code. Example:               \newtoggle{FirstTime}     \toggletrue{FirstTime}     %\togglefalse{FirstTime}          \iftoggle{FirstTime}{     <<>      read.csv("My Big Fat Data file.csv") -> MyData     @     }      The idea would be to read in the data at the beginning of the work session and then `\togglefalse` so it would not need to be read again. I am using Eclipse and StatET, so object MyData would be resident in memory and accessible to R throughout the session. However, the above code evaluates regardless of the toggle value. I know I can achieve this result by changing `eval=TRUE` to `eval=FALSE` - but using toggles would be cleaner and give more flexibility.


title: ybar stacked plot with negative coordinates

text: When using ybar stacked on a mix of positive and negative coordinates I cannot seem to find the answer I want.               \begin{figure}       \begin{tikzpicture}         \begin{axis}[ybar stacked]           \addplot[green,fill=green] coordinates { (1, 3) (2, 3) (3,3) (4,3) };           \addplot[red,fill=red]     coordinates { (1,-4) (2,-4) (3,4) (4,4) };         \end{axis}       \end{tikzpicture}     \end{figure}      I'd like to get all red bars 4 units long (as they are in the coordinates), though the left two bars are hiding behind the green ones. Is there any solution to this? (Changing the order of the `\addplot` calls in the code above cannot fix it.)


title: Is this possible in Tikz?

text: ![enter image description here](http://i.stack.imgur.com/JOQzu.png) I am wondering if it is possible to quickly create something like this in Tikz. In particular, I am concerned with making the zig-zag line, which has these properties:   * Each star is on a clearly identifiable horizontal "level"   * Each star is exactly _between_ two of the characters (alphas and betas) along the top Having the zig-zag line line up with the tree on the right would be a plus too! Thanks in advance!


title: Make a character thinner

text: With the following LaTeX code, the braces look too thick when the `array` is large. Is it possible to make the brace thinner? By the way, the `|` delimiters look always good.               \[\left\{\begin{array}{l}      A+B=C\\J+K=L     \end{array}\right. \quad     \left\{\begin{array}{l}     A+B=C\\J+K=L\\O+P=Q\\R+S=T\\U+V=W\\X+Y=Z     \end{array}\right. \]          \[\left|\begin{array}{l}      A+B=C\\J+K=L     \end{array}\right|\quad     \left|\begin{array}{l}     A+B+C\\J+K=L\\O+P=Q\\R+S=T\\U+V=W\\X+Y=Z     \end{array}\right| \]      ![enter image description here](http://i.stack.imgur.com/ehtBt.png)


title: Beamer - combining the ways for creating overlays

text: I want to create a frame with text the reveals itself one item at a time, with a picture at the bottom which changes when new text is revealed. I did the following naive attempt:               \documentclass{beamer}          \begin{document}     \begin{frame}{title}            \begin{itemize}         \item text 1         \pause         \item text 2       \end{itemize}            \includegraphics<1>[height=40mm]{pic1.jpg}            \includegraphics<2>[height=40mm]{pic2.jpg}          \end{frame}     \end{document}      However, this failed; pic1 is not displayed. I guess the problem is that the includegraphics for pic1 comes after the pause, but how can I place it before the pause and still ensure it will be at the same place as pic2? Another solution is not to use pause at all, but the alternative I see is using numbers for all the items in the slide, which will be very cumbersome in slides with many items.


title: Can a table consist only of an image, e.g. a .pdf?

text: I have got a table that I would like to adorn with some coloured rings to pick out some overlapping subsets of its elements. The table itself consists simply of a rectangular array of numbers. I was wondering whether I could make it in a graphics program, do the adornment there, save it as an image (e.g. a .pdf), and then call it from Texmaker as a table. It needs to be numbered e.g. 'Table 5'. The idea is that from the reader's point of view, it would be a table in the same way as any other. I'd be grateful if someone could advise on whether this is possible, and if so, how to do it. Many thanks in advance! Harry


title: Error when setting a label in an alignat-environment which is embedded in a figure-environment

text: I want to label equations in a alignat-environment which is embedded in a figure-environment and it won't compile. Example:               \documentclass[11pt,a4paper,twoside,openright]{book}          \usepackage{amsmath}          \begin{document}      \begin{figure}       \begin{alignat*}{2}        a & = b  &  c & = d \\ \label{eq:1}        e & = f  &  g & = h \\ \label{eq:2}       \end{alignat*}     \caption{Equalities}      \end{figure}          \end{document}      Error message:               ! Package amsmath Error: Multiple \label's: label 'eq:1' will be lost.          See the amsmath package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.11   \end{alignat*}      Has anybody an idea how I can set the labels?


title: Typesetting longitude or latitude followed by a comma

text: How do you typeset a latitude followed by a comma? Using `siunitx` it looks like there's too much space:               \documentclass[12pt]{memoir}     \usepackage{siunitx}          \begin{document}     At the latitude \ang{30;30;30}, we saw a cat.     \end{document}      ![Latitude](http://i.stack.imgur.com/nSVyl.png) Is there a standard way to tighten that up?


title: Is there a workaround against loss of precision in pgfplots axis?

text: I am generating a bunch of plots automatically using pgfplots. For some datasets the span of data in one axis (y) is relatively small (relative to the absolute value) and therefore pgfplots when printing the numbers in that axis outputs a ridiculous repetition of numbers (see figure, -1.41 repeated 4 times). ![repeated numbers in axis](http://i.stack.imgur.com/UCebF.png) Of course one option is to increase the formatting precision for the numbers, adding digits. The question is, Can the precision be set automatically by some option in the `axis` options? This can lead to an unlimited number of necessary digits, which leads to a second question is there an easy way to automatically choose a reference base value and "add" it to the scaling (e.g. `$\cdot 10^8 - 10^7$` instead of `$\cdot 10^7$` in the example). MWE:               \documentclass[]{article}     \usepackage[]{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}     \addplot coordinates {      ( 10, -14136746 )      ( 72.421875, -14136749 )      ( 166.054688, -14136829 )      ( 228.476562, -14137018 )      ( 290.898438, -14137366 )     };     \end{axis}     \end{tikzpicture}     \end{document}


title: Control sub line width in tkz-collection

text: In `tkz-base` I can control the line width of a grid with the `line width` option as in the following example:               \documentclass{article}          \usepackage{tkz-base}     \begin{document}     \begin{tikzpicture}        \tkzInit[xmax=4, ymax=2]         \tkzGrid[sub,line width=1.5]         \tkzAxeXY     \end{tikzpicture}     \end{document}      ![output](http://i.stack.imgur.com/ZJ1tg.png) However is there also a way to control the line width of the sub grid independently?


title: Vertical spacing around lhs2TeX code block in floats

text: How do I get the appropriate vertical space around a `\begin{code}`/`\end{code}` or `\begin{spec}`/`\end{spec}` in a figure? Here is a basic example with `fancyhdr` added to show the top of the page:               \documentclass{article}     \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhead[C]{}     %include polycode.fmt     \begin{document}     Some text.     \begin{figure}[t]     \begin{code}     main = putStrLn "Hello, world!"     \end{code}     \caption{Hello world example}     \end{figure}     \end{document}      ![Basic example](http://i.stack.imgur.com/d3ZAC.png) Unfortunately, when you compare this figure to another without code, the spacing above and below the code is noticeably more. When looking at the code of lhs2TeX, I noticed the use of `\abovedisplayskip` and `\belowdisplayskip`. So I tried setting those to `0pt`:               ...     \begin{figure}[t]     \setlength{\abovedisplayskip}{0pt}     \setlength{\belowdisplayskip}{0pt}     \begin{code}     ...      ![Using \\abovedisplayskip and \\belowdisplayskip](http://i.stack.imgur.com/Jfw9c.png) This looks more like other figures with just text. However, if I want to center the code, I get extra vertical space again:               ...     \begin{figure}[t]     \setlength{\abovedisplayskip}{0pt}     \setlength{\belowdisplayskip}{0pt}     \begin{center}     ...      ![With centering](http://i.stack.imgur.com/saq4F.png) What's the recommended way to get the appropriate vertical spacing around a (possibly centered) code block in a figure?


title: Repeating Simple Text

text: Is there an easy way to repeat a simple piece of text? For example, I want to write `$\downarrow$ & $\downarrow$ & $\downarrow$ & ...` (for a table). I tried `*{8}{$\downarrow$ &}`, but it doesn't work...


title: Uneven text distribution with two-column layout

text: I am comfortable with creating basic LaTeX documents and making minor modifications to templates I can find online, but not much more. The Oxford Bioinformatics journal has an awesome template here that I am trying to modify for a school assignment. The template uses a two-column layout, but if there is not enough text to fill the final page, it distributes the text evenly between the two columns. Is there a way I can modify this template so that the first column is filled before any text flows over to the second column? I've been able to make most of the layout modifications I need in the `bioinfo.cls` file, but I cannot figure this one out.


title: is it possible to fake the amsart class format?

text: I often use the amsart documentclass. I like it because it is very compact (it also seems to be an industry standard in my area). What I don't like about it is that I'm not able to use kpfonts or ntheorem with it. So my question is: does anyone have a solution to this problem? One solution might be that I'm incompetent with latex and therefore it is actually possible to use kpfonts with amsart. The other solution I thought is by using some package like titlesec to get all the formatting (including toc?) the same as amsart. So then the question becomes: have you already figured out how to do that and would you mind telling me? (I agree this solution is a bit dumb) EDIT: an example of what goes wrong with ntheorem is as follows               \documentclass{amsart}     \usepackage{ntheorem}     \begin{document}         MWE     \end{document}      it brings up an error (Package ntheorem Error: theoremstyle plain already defined)


title: Making a fonttable of Zapf Chancery

text: I am trying to use fonttable to make a table of the Zapf Chancery font (in order to improve my answer to this question). The following document compiles fine and looks right: the font is being used.               \documentclass{article}     \usepackage{fonttable}     \begin{document}     \fontfamily{pzc}\selectfont Lorem Ipsum     %\fonttable{pzc}     \end{document}      However, when I uncomment the `\fonttable` line, I get errors:               kpathsea: Running mktextfm pzc     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input pzc     This is METAFONT, Version 2.718281 (TeX Live 2009/Debian)               kpathsea: Running mktexmf pzc     ! I can't find file `pzc'.     <*> \mode:=ljfour; mag:=1; nonstopmode; input pzc          Please type another input file name     ! Emergency stop.     <*> \mode:=ljfour; mag:=1; nonstopmode; input pzc          Transcript written on mfput.log.     grep: pzc.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input pzc' failed to make pzc.tfm.     kpathsea: Appending font creation commands to missfont.log.     ! Font \f@ttestfont=pzc not loadable: Metric (TFM) file not found.     <to be read again>                         \f@ttestfont      l.5 \fonttable{pzc}          [1{/home/seamus/.texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     (./chanceryfonttable.aux) )      What can I do to get my font table?


title: Personalizing Table of contents

text: I want to make my table of contents to have the words "Chapter", "Title" and "Page" written in uppercase, like "CHAPTER", "TITLE" and "PAGE". My document class is Book. How can I do it?


title: How to define edges in tikz

text: When I use absolute position for the edges, I get almost intersecting arrows. Here is my code. Kindly help.               \begin{tikzpicture} [           node distance = 2cm and 0.8cm,           >=stealth,           scale=0.8,           transform shape         ]         \node[block] at (2,3) (Incompetent Reflux Mechanism){Incompetent Lower esophageal sphincter};         \node[block] at (2,0) (Gastric content into esophagus and beyond){Gastric content into esophagus and beyond};         \node[block] at (-2, -3) (Symptoms){Symptoms};         \node[block] at (6, -3)(Mucosal damage){Mucosal damage};         \node at (2,-3){and or};         \begin{scope}[cyan!40!black]         \draw[->] (2,3) -- (2,0);         \draw[->] (2,0) -- (-2,-3);         \draw[->] (2,0) -- (6,-3);         \end{scope}         \end{tikzpicture}            \end{frame}


title: Include 6 pages of a pdf with document's header and section title

text: So, with `pdfpages`'s `includepdf` one can include several pages of a pdf in the document. But this forces a pagebreak which leaves a lonely and unhappy section title.               \includepdf[nup=2x3, pages={6-}]{present.pdf}      Since internally `includepdf` uses `includegraphics` now can do               \fbox{\centering \includegraphics[page=6, scale=0.71]{present.pdf}}      To embed a page on the pdf. However, how can we embed 2x3 pages? I'm guessing I could do the `includegraphics` trick six times, but it's not very elegant. Any suggestions?


title: Why is text being placed beyond the specified line width?

text: I thought that I knew a few things, but looks like I have some basic misunderstanding on how TeX is supposed to typeset material. I thought that settings by the geometry package would force the text to fit inside the given `\geomerty{textwidth=6.0in}`. It seems to work sometime, but not all the time. The code below illustrates the following: **Case 0** illustrates the correct placement of the text. It goes right up to the left and the right as I think it should. Here things work as one would expect. **Case 1** uses a really long word. When used as in Case 1a,the text goes way past the end of specified `textwidth`. Case 1b does not appear to be all that different, and yet, things seems to work fine: the long word gets hyphenated. What is the difference that causes Case 1a to break, but Case 1b to work? More importantly, how do I get the behavior of Case 1B **all** the time. **Case 2** has text following two minipages which take up `0.65\linewidth` and `0.30\linewidth`. Some leading space is being inserted so perhaps that is the problem, and hence I have been limiting my minipage width sum to be `0.95\linewidth`. I can put up with the leading space of the minipage, but I really don't like the line "Why does this not start on a new line?" starting **past** the edge where text should be placed. **Case 3** (seems different to me, but I suspect it might be the same root problem) has a wide minipage following some text. My understanding is that TeX will make a box of this minipage, realize that it won't fit at the current location in the line and then automatically go on to the next line, but it does not seem to be doing that.               \documentclass{article}     \usepackage{geometry}          \newcommand*{\BlahBlah}{     blah blah blah blah blah blah blah blah blah blah blah blah      blah blah blah blah blah blah blah blah blah blah blah blah      blah blah blah blah blah blah blah blah blah blah blah blah      }          \newcommand*{\LongText}{     YadaYadaYadaBlahBlahBlahYadaYadaBlahBlahBlahYadaYadalahYadaYadaYadaBlahBlahBlahYadaYadaBlahBlahBlah     }          \geometry{top=0.5in}%     \geometry{bottom=0.5in}%     \geometry{paperheight=11.0in}%     \geometry{paperwidth=8.5in}%     \geometry{textwidth=6.0in}%     \geometry{left=1.125in}  %{(\paperwidth-\textwidth)/2)}     \geometry{right=1.125in}  %{(\paperwidth-\textwidth)/2)}     \geometry{showframe=true}%          \begin{document}     \textbf{Case 0}: This illustrates the correct placement of the text: \BlahBlah           \textbf{Case 1a}: \LongText          \textbf{Case 1b}: The above did not stop at end of line, but this does: \LongText          Case 2: Text following minipages:          \begin{minipage}{0.65\linewidth}     \textbf{Minpage 1}: \BlahBlah     \end{minipage}     \begin{minipage}{0.30\linewidth}     \textbf{Minipage 2}: \BlahBlah     \end{minipage}     % Adding a blank line here will fix this problem     Why does this not start on a new line?          \textbf{Case 3}: \BlahBlah \BlahBlah     % Why does commenting this out result is a line much longer than 6.0in     \begin{minipage}{0.65\linewidth}     \textbf{Minipage 3}: \BlahBlah     \end{minipage}     \end{document}      I realize that Case 2 and 3 are easily fixed manually by inserting a blank line (currently comment lines) which tells TeX to start a new paragraph and things work fine. But I would like to understand why this is not happening automatically. I am having problems in much more complicated situations and the issues described here in this MWE are very similar so if I can understand this, I can tackle the more complicated issues. So to summarize, how can I force text to **always** be placed **only** within the `\textwidth` dimensions I have set. Of course, if there is a minipage (or image) that is wider than the specified `textwidth` then all bets are off, but I am only interested in cases where things are less than the `textwidth`. I would have liked to include an image of the results so that this question could be more easily understood, but I guess I don't have enough of a reputation to do that yet... Hopefully I will get there soon......


title: Format chapter's heading

text: I want all my headings to have these characteristics:   1. 12pt   2. Center aligned   3. Bold   4. Times new roman font But when I write `\chapter{Introduction}`, I can only manipulate the name of the chapter, not the text saying Chapter 1. My final result should be (centered): **Chapter 1** **Introduction**