title: Forest package does not pick up \tikzsetfigurename command with externalization enabled

text: I am using the forest package and have enabled externalization by adding the [external] option when loading the package. I'm already using TikZ with externalization enabled and for each chapter I set the figure name via `\tikzsetfigurename` such that I know for which chapter the PDFs are created. However, it seems that forest does not use this value as it uses the main document prefix for naming the files. Is this a bug or did I do something wrong? I.e. do others experience the same?


title: Is there a better formatting option for an alternated enumerated/itemized list?

text: I'm making a questions/answers page where answer follows the question. The questions are enumerated while the answers are not. Questions are using one color while answers using another one. In order to pause numeration, I've used the solution provided to this question. As a result, my code looks like this in general:               \documentclass[english]{article}     ...     \newcounter{savedenum}     \newcommand*{\saveenum}{\setcounter{savedenum}{\theenumi}}     \newcommand*{\resume}{\setcounter{enumi}{\thesavedenum}}     ...     \usepackage{parskip}     \usepackage{color}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     \usepackage{enumitem}     ...     \begin{document}     ...       \begin{enumerate}         \item \color{black}{Question text goes here.}         \saveenum       \end{enumerate}            \begin{itemize}         \item[] \color{NavyBlue}{Answer text goes here.}       \end{itemize}            \begin{enumerate}         \resume         \item \color{black}{Question text goes here.}         \saveenum       \end{enumerate}            \begin{itemize}         \item[] \color{NavyBlue}{Answer text goes here.}       \end{itemize}     ...     \end{document}      Since there is a lot of code reuse, I'm seeking for a better solution (maybe a loop of some kind?), if possible, that will substitute the copy-and-paste of the `\begin{...} ... \end{...}` blocks.


title: Creating document like this

text: I am trying to create a handout like the one in the following link. Image: ![enter image description here](http://i.stack.imgur.com/Uby2B.png) But I can't get it. Can someone help me create such a document.


title: Subscript under sum with dot

text: I have a problem with the subscript under a sum with dot, it changes the position of the subscript. Namely,               \documentclass[a4paper,12pt]{article}          \usepackage[english]{babel}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{amssymb}          \begin{document}     \begin{align}      \dot{\sum}_{i \in I}     \end{align}     \end{document}       places the subscript next to the sum instead of under it. Does anyone know how to fix this?


title: Default article-like classes with compact bibliography

text: In most academic journal styles, the bibliography is typeset in a much more compact fashion than in the usual classes. Compare for instance these two: ![enter image description here](http://i.stack.imgur.com/XtOt9.png) ![enter image description here](http://i.stack.imgur.com/MEbcq.png) The former is obtained with `siamltex.cls`, the latter from `article.cls`. I would like to obtain something that resembles the former, without using a class from a specific journal: the journal classes include lots of quirks for author and title formatting, and generally tend to be old, badly written and incompatible one with each other and with many modern packages. So I would like to have the benefits of "standard" classes (like `article.cls`, `paper.cls` or `scrartcl.cls`), together with a more compact typesetting. I am focusing here on the bibliography, but there are also some other small details such as the font size for the paper title. > Are there any standard documentclasses that allow for a more compact display > of the bibliography? Or, alternatively, are there any additional packages > that alter the aspect of the standard classes to obtain a more compact look > (possibly not as extreme as `savetrees.sty`)?


title: How to redefine gather environment so it has justification to the left and allows to use enumerate?

text: I need redefinition of gather (cannot be equation because of some other problem I asked about earlier on this forum) so it would have justification to the left, has no empty line after enumerate number. It may sound strange but I really need to have both labels tag and enumerating. Document has to be written in one style and I have to have enumerate in some sections where I don't have to have labels. So, I want something like this:               \documentclass[11pt]{article}     \usepackage{amsmath}     \setlength{\jot}{0pt}     \begin{document}       \begin{enumerate}            \item \begin{gather} a=b \tag{12}\label{one}\end{gather}            \item \begin{gather}c=d \tag{lee}\label{two}\end{gather}            \item \begin{gather}e=f \tag{bom}\label{three}\end{gather}         \end{enumerate}          \eqref{one} \eqref{two} \eqref{three}           \end{document}      to look like this ![](http://i.stack.imgur.com/Ui7Ba.jpg) Thanks in advance!


title: Wrong links in bibliography using hyperref with options pagebackref and hypertexnames=false

text: I am using the `hyperref` package (v6.82m) with MiKTeX 2.9. I am using the option `pagebackref` so as to obtain a bibliography with links to the pages where the references are cited. I am also using the option `hypertexnames=false` because a comment in this question says that it is more robust. Although links in the bibliography show the right page numbers, they point to wrong pages (correct page minus 2). Other page links within the document are ok. I think this is related to the fact that the `\titlepage` I am using resets page numbers (I have another page before the `\titlepage`). However, changing `\pagenumbering` before and after `\titlepage` does not solve the problem. If I suppress the `hypertexnames=false` option, the problem disappears. Why is this happening? Is this a bug in the `backref` package?               \documentclass{report}          % wrong links in bib     \usepackage[pagebackref, hypertexnames=false]{hyperref}          % right links in bib     %\usepackage[pagebackref]{hyperref}          \begin{document}          \pagenumbering{roman}          Some stuff to mess things up a bit more.          \begin{titlepage}               Title page          \end{titlepage}          \pagenumbering{arabic}          This is page 1 \cite{X}.          \newpage          This is page 2 \cite{X}.               \begin{thebibliography}{1}               \bibitem{X}          Very important paper.               \end{thebibliography}     \end{document}


title: Layout Problems due to Using the Libertine Font in Beamer

text: Using Linux Biolinum as the sans font in beamer leads to layout problems for several themes. This seems to be related to a bug in the font, since it does not provide the right x-value, see here. I am just wondering if there exists a work-around. I am using MikTeX and the latest libertine fonts. Here is a MWE.               \documentclass{beamer}     \usetheme{CambridgeUS}     \usepackage{libertineotf}     \begin{document}     \section{Beamer}       \begin{frame}{Beamer}         \begin{enumerate}           \item test         \end{enumerate}       \end{frame}     \end{document}      Maybe these pictures help to clearify my problem. Without the libertine package everything is exactly where it should be. ![enter image description here](http://i.stack.imgur.com/xw5nU.jpg) But with libertine the header, footer are misplaced and the enumeration symbol is too small. ![enter image description here](http://i.stack.imgur.com/XqvIo.jpg)


title: Easy-to-use reference-able environment for restating theorem-like environments?

text: This question is a development of the same issue as this one; following my own answer and later comment there, I decided it deserves a spin-off. I would like to define an environment for restating theorems(/lemmata/propositions/etc), which makes the following code work:               \documentclass{article}     \usepackage{ntheorem}          % Magic goes here          \newtheorem{theorem}{Theorem}[section]     \newtheorem{prop}[theorem]{Proposition}          \begin{document}     \begin{theorem}\label{myfirst}     This is the first environment.     \end{theorem}     \begin{prop}\label{mysecond}     This is the second environment.     \end{prop}     \begin{theorem}\label{mythird}     This is the third environment.     \end{theorem}     \clearpage     \begin{restatement}[restated]{mysecond}     \label{mysecond-restated}     This is a restatement of the second environment.     \end{restatement}     \begin{theorem}\label{myfourth}     This is the fourth environment.     \end{theorem}     a \verb|ref| to the second environment: \ref{mysecond} \\     a \verb|ref| to its restatement: \ref{mysecond-restated} \\     a \verb|pageref| to the second environment: \pageref{mysecond} \\     a \verb|pageref| to its restatement: \pageref{mysecond-restated}     \end{document}      **Requirements:**   1. The environment only requires the label of the theorem you're referencing, nothing else.   2. You should be able to reference the restatement rather than the original statement.   3. You can't assume the environment's counter has the same name as the environment (e.g. the user may have `\newtheorem{proposition}[theorem]{Proposition}`, so propositions use the theorem counter). **Optional, Nice-to-Have features:**   1. No reliance on `hyperref`, `cleveref` or `thmtools`. (This was "Requirement 5" which the bounty mentions)   2. Code which works with `amsthm` as well.   3. `\autoref`ing or `\namecref`ing the restatement work when `hyperref` or `cleveref` are used.   4. Code doesn't break when writing right-to-left documents (Hebrew, Arabic)   5. Possibility of restating unnumbered theorems. **An initial solution** My initial work has evolved into a basically-satisfactory solution, see below, with the help I got asking lead-up questions. But that solution suffers from several problems: The problems with this are:   * I have no idea what `\cref@constructprefix` in `ntheorem` does, and what's the intended use of `p@somecounter`, so I basically copy-pasted that part blindly and maybe I'm doing something wrong.   * The code is already not so short.   * Code likely to break if `cleveref` or `ntheorem` change slightly. And it does not meet most of the useful want-to-have's above. So improvements are quite welcome for your bounty!


title: Layout problems with tables and graphics (eps files) - they're all over the place!

text: I know I'm doing something dumb here but I can't figure it out. I am creating a `.tex` file with a header:               %% XXXXXXXXXXXXXX created this file.     \documentclass[english]{article}     \usepackage{avant}     \usepackage[T1]{fontenc}     \usepackage{geometry}     \geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm,headheight=1cm,headsep=1cm,footskip=1cm}     \usepackage{fancyhdr}     \pagestyle{fancy}     \usepackage{color}     \usepackage{babel}     \usepackage{array}     \usepackage{float}     \usepackage{graphicx}     \usepackage{parskip}     \usepackage[bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,     breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]     {hyperref}     \hypersetup{pdftitle={XXXXXX},     pdfauthor={Autogenerated by XXXXXX}}     \providecommand{\tabularnewline}{\\}     \usepackage{color}     \lhead{XXXXXX}     \begin{document}      Then a number of sections:               \section{\textsf{Section Name}}      Each containing several tables and graphs:               \begin{tabular}{|l|r|r|r|r|r|}     \hline      & 1 Month & 3 Month & 6 Month & Average & Total\tabularnewline     \hline      World&-12.6867&-14.984&-19.1529&-15.9345&-95.6071\tabularnewline     \hline      Data Title&-12.6867&-14.984&-19.1529&-15.9345&-95.6071\tabularnewline     \hline      \end{tabular}     \newline     \vspace*{.25 cm}     \newline          \begin{figure}[h!]     \centering     \includegraphics[scale=.8]{MyGraph}     \caption{World}     \end{figure}     \begin{figure}[h!]     \centering     \includegraphics[scale=.8]{World}     \caption{World}     \end{figure}      Each section is far larger than a page, but before each section I have a               \newpage      For simple (ie very few sections / tables / graphs) the rendering to pdf via xelatex is often perfect. However once the document gets larger the tables are always in order but the graphs are all over the place - almost randomly. I know I'm doing (or not doing) something really dumb here. I just want everything to appear in the order I write it. Can anyone offer any assistance please?


title: Beamer: Arrowing forward with "split frames" and backwards with non-split frames. Is it possible?

text: I faced an annoying situation using the beamer class. The situation: During a presentation it is helpful to use "split" frames (produced by commands like `\pause` etc.). But when there is a discussion or a question/answer part after the presentation, the split frames are annoying. Because when you would like to go back to a certain piece of information, it takes ages to get there. I wonder if there is the possibility to arrow forward using split frames and to arrow back "jumping" from non-split frame to non-split frame.


title: How to change the level distance in tikz-qtree for one level only?

text: I am trying to draw a tree for a game theory problem. The problem is that the label _p 1=0.5_ crosses label _I_. I would like to adjust the level distance of the first level, but the `\tikzset{level distance=2cm]` command changes all the distances. Have also tried `\tikzstyle{level 1}=[level distance=2cm]`, but it does not work. What should I do? I am new to TikZ (2 days only) so will happily accept any other comments.               \documentclass{article}          \usepackage{tikz}     \usepackage{tikz-qtree}          \begin{document}      \tikzset{edge from parent/.style=      {draw, edge from parent path={(\tikzparentnode) -- (\tikzchildnode)}}}          \begin{tikzpicture}[grow=down] % game tree     \tikzstyle{mydot} = [circle, minimum width=2pt,fill, inner sep=0pt] % decision node style     \tikzstyle{mystart} = [circle, minimum width=3pt, fill, inner sep=0pt] % starting node style     % \tikzset{level distance=2cm} % attempt to adjust level distance      \Tree          [.\node[mystart, label=above: {N}] {};              \edge node[left] {$p_1=0.5$}; [.\node[mydot, label=above left:I] {};                  \edge node[left] {$a$}; \node[mydot, label=below: {$5,1$}] {};                   \edge node[right] {$b$}; [.\node[mydot, label=above right:II] {};                       \edge node[left] {$m$}; \node[mydot, label=below: {$1,2$}] {};                      \edge node[right] {$n$}; \node[mydot, label=below: {$2,3$}] {}; ]   ]             \edge node[right] {$p_2=0.5$}; [.\node[mydot, label=above right:II] {};                   \edge node[left] {$c$}; [.\node[mydot] (a) {};                       \edge node[left] {$z$}; \node[mydot, label=below: {$1,0$}] {};                      \edge node[right] {$t$}; \node[mydot, label=below: {$2,2$}] {}; ]                  \edge node[right] {$d$}; [.\node[mydot] (b) {};                      \edge node[left] {$z$}; \node[mydot, label=below: {$3,1$}] {};                      \edge node[right] {$t$}; \node[mydot, label=below: {$0,0$}] {}; ]   ]   ]     \draw[dashed] (a)--node[label=above:I] {}(b);     \end{tikzpicture}     \end{document}


title: Use float counter in a section title

text: I defined a new float environment for examples               \usepackage{float     \newfloat{example}{htp}{example}     \floatname{example}{Example}      that I the use throughout the document               \begin{example}     ...     \caption{yet another example}     \end{example}      with automatic numbering and a table of examples               \listof{example}{List of Examples}      Now I have some long examples that I wish not to put in a float but give as subsections:               \subsection*{A long example}     ...      How can I make this subsection to get included in the numbering of examples (with title "Example X: A long example") and appear in the list of examples? * * * **P.S.:** Claudio Fiandrino has provided a boilerplate which I adopted for my document the following way (looks like the solution depends on you document style, I use `scrbook`):               \newcommand{\subsectionexample}[1]{       \stepcounter{example}       \subsection*{Example \theexample: #1}       \addcontentsline{example}{example}{\protect\numberline{\theexample}#1}     }          \subsectionexample{A long example}     ....


title: Removing scientific notation in tikzpicture made by matlab2tikz

text: I am having a very hard time trying to figure out how to remove the scientific notations on the y-axis of my graphs. The graphs are made in MATLAB and then converted into TikZ files using the package `matlab2tikz`. I have added the codes to remove scientific notations in MATLAB, but it seems when I put the tikz files into LaTeX, it automatically recovers the scientific notation format. Any help would be appreciated! The code I use in LaTeX is as follows               \begin{figure}[H]     \begin{scriptsize}     \begin{center}     \setlength\figureheight{8cm}     \setlength\figurewidth{13cm}     \input{My_Picture.tikz}     \end{center}     \end{scriptsize}     \end{figure}


title: How shoud I manage captions and sub captions with float and non float items?

text: I am currently writing my PhD thesis and I am using this code to put some figures or tables on the left page. So, I have two kinds of figures, some are in a float, some are not. In both cases, I often use sub floats (with subfigure package for floats, and \captionof{subfigure} for left pages figures). The issue is about sub caption labelling. For example, I have a left page figure with two subfigures, let's say 1.A and 1.B. If I put a regular floating figure after this and let's say 2 subs, I get 2.C and 2.D like if figure number is correctly increased and subfigure letter is continuous. My question is the following: How do you "strongly" delimit figures and subfigures so that referencing is correct ? I tried to define a new environment, to move labels and captions commands, etc. without success. What is the general way to proceed ? EDIT : Here is my general syntax for left page figures I use the command provided in the link above :               \addfig{     *subfigure contents*     \captionof{subfigure}     \label{subfigure}          *subfigure contents*     \captionof{subfigure}     \label{subfigure}     }      and then a floating one               \begin{figure}     \subfloat[title]{     *subfigure contents*     \label{subfigure}     }     \subfloat[title]{     *subfigure contents*     \label{subfigure}     \end{figure}.      Subfigures labels are continued between the two figures.


title: "Namethatchar" macro

text: I am searching for a macro/package that would give the name of characters. Here are a few examples of a possible behaviour:               \namethatchar{A} → A     \namethatchar{À} → Agrave     \namethatchar{a} → a     \namethatchar{\`A} → Agrave      The names do not have to be these specifically, just unique identifiers using ASCII characters only. Is there a basic macro or a package that would do that already? Edit: To clarify, this need comes from the `lettrine.4ht` setting for TeX4HT. Currently, when typesetting a drop cap, it creates a `lettrine-<letter>` CSS class, for example `lettrine-A`. This works well, as long as the character is not accentuated, in which case you get something like a `lettrine-À` CSS class. Since I compile with LuaTeX and the browsers I use seem to have implemented support for accents in CSS classes (ahead of the spec), it works for me. But it fails for others and is not acceptable globally speaking. For this reason, the output of the command is aimed to be used by both machines and humans. The former because it generates CSS classes, which are clearly used by machines. The latter because human beings might want to tune the rendering of their HTML document by modifying the CSS properties of the generated CSS classes. Ideally, all the CSS settings could be done using the `lettrine` options, mapped through `lettrine.4ht`, but we're not there yet.


title: Where is "texmf" on a Windows install?

text: On UNIX you have the `texmf` folder in your home directory where you store packages you've installed yourself, but where is that folder on a Windows install? Yeah, I know that if you use MiKTeX then you don't need to worry about it since it installs needed packages on-the-fly, but I'm still interested. =)


title: File expl3.sty not found when trying to compile a *.tex file with XeLaTeX

text: I've installed XeTeX to my Fedora 17 recently (before that, I was using pdfLaTeX). The main reason for switching to XeTeX was the polyglossia package I'd like to make use of. Unfortunately, whenever trying to compile a `*.tex` source file that includes `polyglossia` with xelatex, e.g.               xelatex file.tex      the following error message turns up:               (/usr/share/texmf/tex/latex/fontspec/fontspec.sty          ! LaTeX Error: File `expl3.sty' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: sty)          Enter file name:       I therefore tried to install the `expl3` library, which is included in the l3kernel package. Nonetheless, this didn't solve the problem since the package doesn't contain the file `expl3.sty` itself, only `expl3.dtx` (and `expl3.pdf`). So far I haven't been able to build `expl3.sty` from it (should be done using `xelatex expl3.dtx`? Sadly, doesn't work.)


title: Is there a \die command?

text: Is there a command that generates the error or warning of my choice? I'm planning to put it in an `\ifthenelse`, so it can't be a syntax error.


title: How do I manipulate the output produced by the plain bibliography style?

text: I have the following output in the references: X. Mao J. Appleby and A. Rodkina. On stochastic stabilization of difference equations. Discrete and Continuous Dynamical Systems, 15:843–857, 2006. How can I put a comma between the first two authors, delete the colon that comes after the volume and also put the year before the pages. That is I need the output: X. Mao, J. Appleby and A. Rodkina. On stochastic stabilization of difference equations. Discrete and Continuous Dynamical Systems, 15, (2006), 843–857. I am using `\bibliographystyle{plain}` and in the bibtex file I have               @article{Rod1,          author   ="J.~Appleby, X.~Mao and A.~Rodkina",          title    ="On Stochastic Stabilization Of Difference Equations",          journal  ="Discrete and Continuous Dynamical Systems",          volume   ="15",          pages    ="843--857",          year     ="2006" }


title: Linenumbering per page with XePersian and the traditionalpoem environment

text: I’m editing an Arabic poem with XePersian and the traditionalpoem environment which works fine so far, but I have some questions regarding the line numbers and the paragraph footnotes. (1) I would like to have line numbers per page and they should change the side of the margin according to even and uneven pages. Is this somehow possible? (2) If I add a footnote in a specific line of the page, can I refer to this line by a specific counter? If I have different variant readings, I would like to refer to the line of the page, not to a footnote marker. (3) Is it possible to reduce the spacing between each footnote in the footnote paragraph? My minimal example:               \documentclass[12pt,a4paper]{book}               %XePersian and Bidipoem     \usepackage[extrafootnotefeatures, Kashida]{xepersian}     \paragraphfootnotes     \settextfont[Mapping=arabicdigits]{Amiri}     \usepackage{bidipoem}     \setdigitfont{Charis SIL}     \setlatintextfont{Charis SIL}          %Linespacing     \linespread{1.6}          %Space between the halfverses     \renewcommand\poemcolsepskip{0.5cm}          %Don’t show footnote markers     \renewcommand*{\thefootnote}{}          %Decrease space between footnotes in the paragraph     \usepackage[para]{footmisc}     \addtolength{\footskip}{0cm}     \makeatletter     \let\splitfootnoterule=\pagefootnoterule     \makeatother          %Linenumbering     \newcount\LineNumber \newcount\templinenumber      \newdimen\linenumberskip \linenumberskip=-1em      \chardef\linestep=2     \def\poemlinenumber{%         \advance\LineNumber1         \templinenumber=\LineNumber        \computelinenumber        }      \def\computelinenumber{%         \ifnum\templinenumber>\linestep           \advance\templinenumber-\linestep           \expandafter\computelinenumber         \else          \ifnum\templinenumber=\linestep            \leavevmode\rlap{\kern\linenumberskip\the\LineNumber}%           \fi         \fi        }      \newenvironment{numberedpoem}        {\everypar{\everypar{\poemlinenumber}}%          \begin{traditionalpoem}}         {\end{traditionalpoem}}               \begin{document}               % In this page, we typeset footnotes from right to left     \setRTLparagraphfootnotes          \begin{numberedpoem}          %%%%%%Verse 1%%%%%%%%%%     قِفَا نَبْكِ مِنْ ذِكْرَى حَبِيبٍ ومَنْزِلِ     &     بِسِقْطِ اللِّوَى بَيْنَ الدَّخُولِ فَحَوْمَلِ     \footnote{     (1)     ذِكْرَى ج : ذكري ب     || الدخول ج : الذخولي ب.     }     \\     %%%%%%Verse 2%%%%%%%%%%     فَتُوْضِحَ فَالمِقْراةِ لَمْ يَعْفُ رَسْمُها     &     لِمَا نَسَجَتْهَا مِنْ جَنُوبٍ وشَمْألِ     \footnote{     (2)     جَنُوبٍ  ج : حنوب ب     }     \\          \end{numberedpoem}     \end{document}


title: Would it be possible to port the fontawesome package to pdflatex?

text: I really like the `fontawesome` package and it has almost every fancy symbol I need for my documents. Now I'm working with a third party document which must use pdflatex, and I really miss the fontawesome symbols. What would it take to port the existing package to pdflatex? Is it a trivial task or does it require some major rewriting?


title: How can one prevent \fbox from running off the page?

text: I am using the `\fbox` command to box a large chunk of text:               \fbox{Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.}      This text does not line wrap. It just runs off the page. Why does it do that?


title: Creating non-math mode substitutes for \overset and \underset not dependent on the amsmath package

text: I have been using `\overset` and `\underset` to stack text, e.g.:               \documentclass{article}     \usepackage{amsmath}     \begin{document}         $\overset{\text{a}}{\text{b}}$ \\     $\underset{\text{c}}{\text{d}}$     \end{document}      The results seems better proportioned font size, line spacing, and baseline positioning than other solutions I have found for stacked text, however, recently, I found some incompatibilities between another package and `amsmath`.   * How can I create an alternative to these commands which does not use math mode, but otherwise has identical font sizes and proportions (so that the output is visually the same)? I found the source code for `\overset` and `\underset` in amsmath.dtx:               \newcommand{\overset}[2]{\binrel@{#2}%         \binrel@@{\mathop{\kern\z@#2}\limits^{#1}}}          \newcommand{\underset}[2]{\binrel@{#2}%         \binrel@@{\mathop{\kern\z@#2}\limits_{#1}}}      It seems to be using some code for `\limits` to define the stacking, however, I can't find anything in the rest of the source of the `amsmath` package showing how `\limits` works or how to use it without first specifying math mode.


title: 2d graphs in a 3d plot

text: I am trying to create 3d plots with several 2d graphs, like in Plotting several 2d functions in a 3d graph. However the end result looks like this: ![Filling should be below the plot, not above!](http://i.stack.imgur.com/LjDPM.png) Using `\closedcycle` doesn't help either, as it generates this: ![Ugly line connecting last point of the last plot to the first point of the first plot](http://i.stack.imgur.com/bqlRy.png) The following is a MWE for the second figure, with a reduced dataset:               \documentclass[12pt]{article}     \usepackage{pgfplots,pgfplotstable}          \pgfplotsset{compat=1.7}          \begin{document}     \begin{tikzpicture}          \pgfplotstableread{     q   1h  2h  3h  4h     0.01138 124.153702  119.550705  117.984253  115.065399                  0.089615    4.255316    4.356256    4.253153    4.040073            0.129441    4.262549    3.756256    3.765975    4.120948            0.254584    2.837865    3.107194    2.983951    2.531952         0.298655    2.638327    2.848219    2.792608    2.729832             }\data          \begin{axis}[         zmode=log,         log origin z=0,         area plot/.style={             fill opacity=0.75,             draw=blue!70!violet,thick,             fill=blue!70!violet!50,             mark=none,         }     ]     \pgfplotsinvokeforeach{4,3,2,1}{       \addplot3 [area plot] table [x=q, y expr=#1, z=#1h] {\data} \closedcycle;          }     \end{axis}     \end{tikzpicture}          \end{document}      How can I get this straight?


title: Make BibLaTeX show the full bibliography entry of used sources as a footnote on the page they are used on

text: I am trying to get the combined effect of biblatex's `\footfullcite` and `\cite` in the way that it detects multiple cites from the same source and assigns the same number to them. On every page this source is used, it should be printed as a footnote in `\footfullcite`-style, but only once, regardless of how often it is used. If multiple pages cite from this source, the footnote should also be printed on each of those pages. Thanks to the comments, I have found this answer, but it does not seem to handle multiple different page counters correctly. **mwe.bib:**               @article{ExampleOne:2013:Article,         author = {Example Author},         title = {Example One},         journaltitle = {Example Journal},         date = {2013-01-01},         url = {https://www.example.org/example/one}     }     @collection{ExampleTwo:2012:Collection,         editor = {Example Author},         title = {Example Two},         month = jan,         year = {2012},         url = {https://www.example.org/example/two}     }      **mwe.tex:**               \documentclass[12pt,a4paper]{article}     \usepackage[top=2.5cm, left=5cm, bottom=2cm, right=2cm]{geometry}     \usepackage[backend=biber,style=numeric-comp]{biblatex}     \ExecuteBibliographyOptions{%         citetracker=true,%         pagetracker=page,%         sorting=none,%         hyperref=true%     }     \bibliography{mwe}     \usepackage[pdftex]{hyperref}     \hypersetup{%         colorlinks=true,%         citecolor=blue%     }     % Custom citation style: sfcite.sty     \usepackage{sfcite}     \begin{document}         \section{Introduction}         \subsection{Preface}         Cupcake ipsum dolor sit. Amet halvah croissant danish candy canes biscuit. \sfcite{ExampleOne:2013:Article} Chocolate bar icing macaroon bear claw \sfcite{ExampleOne:2013:Article}.         Apple pie sweet liquorice. Lemon drops gingerbread donut tiramisu. Sweet roll chocolate sesame snaps cheesecake chupa chups topping jelly macaroon. Halvah cookie chocolate bar cotton candy applicake lollipop marshmallow. \sfcite{ExampleTwo:2012:Collection}.         Cookie dessert jelly beans gummi bears gummi bears sweet jelly caramels muffin. Lollipop bonbon cheesecake pastry marzipan applicake. Toffee gingerbread powder cupcake. Applicake topping caramels topping fruitcake gummies applicake croissant.         \newpage         \pagestyle{plain}         \section*{Appendix}         \pagenumbering{Roman}         \subsection*{Bibliography}         \printbibliography     \end{document}      **sfcite.sty** (taken from here):               \ProvidesPackage{sfcite}          \makeatletter     % user-level citation command     \DeclareCiteCommand{\sfcite}[\cbx@superscript]       {\usebibmacro{cite:init}%        \let\multicitedelim\supercitedelim        \iffieldundef{prenote}{}{\BibliographyWarning{Ignoring prenote argument}}%        \iffieldundef{postnote}{}{\BibliographyWarning{Ignoring postnote argument}}}       {\usebibmacro{citeindex}%        \usebibmacro{cite:super:foot}%        \usebibmacro{cite:comp}}       {}       {\usebibmacro{cite:dump}}          % save instcount, save key and last inline instcount if seen first on page     \newbibmacro*{cite:super:foot}{%       \xdef\cbx@key{\thefield{entrykey}}%       \ifsamepage{\value{instcount}}{\csuse{cbx@instcount@\cbx@key}}{}{%         \listxadd{\cbx@savelist}{\cbx@key}%         \ifnumequal{\value{cbx@tempcntd}}{0}{%           \defcounter{cbx@tempcntc}{\value{instcount}}%           \loop\ifnum\value{cbx@tempcntc}>0             \ifsamepage{\value{instcount}}{\value{cbx@tempcntc}}               {\ifcsundef{blx@fnpage@\number\numexpr\value{cbx@tempcntc}}                  {\setcounter{cbx@tempcntd}{\value{cbx@tempcntc}}}{}%                \stepcounter{cbx@tempcntc}}               {\setcounter{cbx@tempcntc}{0}}%           \repeat}{}}%       \csnumgdef{cbx@instcount@\cbx@key}{\value{instcount}}}     \let\cbx@savelist\@empty     \newcounter{cbx@tempcntc}     \newcounter{cbx@tempcntd}     \setcounter{cbx@tempcntd}{0}          \newrobustcmd*{\cbx@superscript}[1]{%       \global\toggletrue{cbx@sfcite}       \mkbibsuperscript{#1}%       \cbx@footnote%       \global\togglefalse{cbx@sfcite}}     \newtoggle{cbx@sfcite}          \AtEveryCitekey{%       \ifciteseen{}{\csnumgdef{cbx@instcount@\thefield{entrykey}}{-1}}%       \iftoggle{cbx@sfcite}{}{\cbx@footnote}}     \AtEveryBibitem{\cbx@footnote}     \AtEveryLositem{\cbx@footnote}          % defer citation footnotes to last inline reference instance on page     \newrobustcmd*{\cbx@footnote}{%       \ifboolexpr{ not test {\ifdefempty{\cbx@savelist}}                    and test {\ifnumequal{\value{instcount}}{\value{cbx@tempcntd}}} }         {\cbx@sortlist@init%          \let\do\cbx@do          \dolistloop{\cbx@sortlist}%          \global\let\cbx@savelist\@empty          \setcounter{cbx@tempcntd}{0}}{}}          % print footnotes in 'sorting' order     \def\cbx@do#1{%       \ifinlist{#1}{\cbx@savelist}         {\begingroup          \blx@resetdata          \blx@getdata@cite{#1}%          \blx@setoptions@type\abx@field@entrytype          \blx@setoptions@entry          \blx@execute          \blx@beglang          \iffieldundef{shorthand}            {\gdef\@thefnmark{\printfield{prefixnumber}\printfield{labelnumber}}}            {\gdef\@thefnmark{\printfield{shorthand}}}%          \gappto\@thefnmark{\blx@initunit}%          \ifhyperref            {\H@@footnotetext{\blx@driver\abx@field@entrytype}}            {\@footnotetext{\blx@driver\abx@field@entrytype}}%          \blx@endlang          \endgroup}         {}}          % access internal list of sorted entry keys     \def\cbx@sortlist@init{%       \ifcsundef{blx@sort@\the\c@refsection}         {\global\letcs{\cbx@sortlist}            {blx@slists@\the\c@refsection @entry@\blx@sorting}}% Biber         {\global\letcs{\cbx@sortlist}{blx@sort@\the\c@refsection}}}% BibTeX     \let\cbx@sortlist\@empty     \makeatother          \renewcommand*{\thefootnote}{\fnsymbol{footnote}}      ![Preview of the mwe.pdf](http://i.imgur.com/Gc3yGda.jpg) The citation style is exactly what I aim to achieve, but I need an appendix with a page counter reset (albeit with a different numbering style, see the MWE), which somehow results in the footnotes being placed in the appendix rather than the page they're supposed to be on with this solution. Being a total newcomer to BibLaTeX and handling bibliography/citing in LaTeX in general, this is way above my skills and I'm totally at loss on what to do; I'd appreciate any help, even small tips, I can get.


title: Aligning TikZ graphic vertically to neighbor in multicol

text: For my documentation of a blocks world problem in Prolog, I'd like to show the example code (using the listing package) next to the real world equivalent, which I made using TikZ. For this I used the multicolumn package and 2 columns. Unfortunately the two frames of those two elements are not starting at the same height. I'd like the top border of those two to start at the same vertical point. Here is the example code:               \documentclass[11pt]{article}     \usepackage{tikz}     \usepackage{multicol}     \usepackage{listings}          \lstset{ %       language=Prolog,                % the language of the code       basicstyle=\scriptsize\ttfamily,     % the size of the fonts that are used for the code       numbers=left,                   % where to put the line-numbers       numberstyle=\tiny\color{gray},  % the style that is used for the line-numbers       stepnumber=1,                   % the step between two line-numbers. If it's 1, each line will be numbered       numbersep=5pt,                  % how far the line-numbers are from the code       backgroundcolor=\color{white},  % choose the background color. You must add \usepackage{color}       showspaces=false,               % show spaces adding particular underscores       showstringspaces=false,         % underline spaces within strings       showtabs=false,                 % show tabs within strings adding particular underscores       frame=single,                   % adds a frame around the code       rulecolor=\color{black},        % if not set, the frame-color may be changed on line-breaks within not-black text       tabsize=4,                      % sets default tabsize to 4 spaces       captionpos=b,                   % sets the caption-position to bottom       breaklines=true,                % sets automatic line breaking       breakatwhitespace=false,        % sets if automatic breaks should only happen at whitespace       title=\lstname,                 % show the filename of files included with \lstinputlisting;                                       % also try caption instead of title       keywordstyle=\color{blue},      % keyword style       commentstyle=\color{dkgreen},   % comment style       stringstyle=\color{mauve},      % string literal style       escapeinside={\%*}{*)},         % if you want to add LaTeX within your code     }          \begin{document}     \tikzstyle{block} = [rectangle, draw, minimum height=1cm, minimum width=1cm]     \tikzstyle{table} = [rectangle, draw, minimum width=5cm, minimum height=0.5cm, fill=gray!50]     \tikzstyle{b1} = [fill=orange!50]     \tikzstyle{b2} = [fill=green!50]     \tikzstyle{b3} = [fill=cyan!50]     \tikzstyle{b4} = [fill=red!50]          This is an example paragraph.          \begin{multicols}{2}     \begin{lstlisting}[language=Prolog]     [         block(block1),         block(block2),         block(block3),         block(block4),         on(table,block2),         on(table,block3),         on(block2,block1),         on(table,block4),         clear(block1),         clear(block3),         clear(block4),         handempty     ]     \end{lstlisting}          \begin{tikzpicture}         \draw(-2,-2) rectangle (5,4);         \node[block, b3] at (1.5,0) {3};         \node[block, b2] at (0,0) {2};         \node[block, b1] at (0,1) {1};         \node[block, b4] at (3,0) {4};         \node[table] at (1.5,-0.75) {Table};     \end{tikzpicture}     \end{multicols}          Another paragraph can follow here.     \end{document}      And here is the result of this, showing the issue with the top borders not being on the same vertical level: ![enter image description here](http://i.stack.imgur.com/46KRS.png)


title: Highlighting double backslash using listings with texcsstyle

text: I've got a question (it's in the title) about listings that I do not believe have been answered anywhere (either that or my Google-fu isn't that sufficient). Before I knew of `texcsstyle`'s star option, I tried to highlight double backslash (`\\`) by using the `literate` option (how monstrous):               literate=*{\\\\}{{\textcolor{red}{\textbackslash{}\textbackslash{}}}}{1}      With this I used to be able to highlight double backslash but since I didn't use `texcsstyle` I could not highlight the backslash that comes before all LaTeX commands. But when I finally DO use `texcsstyle`, the `literate` option suddenly no longer works for double backslash, even though all the other `literate` replacements (for `&`,`[`,`]`,`{`,`}`,...) still work. I guess `texcsstyle` is interfering with the `literate` option? How do I resolve this? Is it even possible to have both `texcsstyle` and double backslash highlighted? Edit: added an example, sorry. Uncomment the line with texcsstyle and you will see the double backslash stop getting highlighted.               \documentclass{article}     \usepackage[T1]{fontenc}       \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     \usepackage{listings}     \usepackage{charter}     \definecolor{lightgrey}{rgb}{0.9,0.9,0.9}     \definecolor{darkgreen}{rgb}{0,0.6,0}     \definecolor{darkred}{rgb}{0.6,0,0}     \definecolor{myblue}{RGB}{20,105,176}     \definecolor{darkgreen}{rgb}{0,0.6,0}     \lstdefinelanguage{mytex}[LaTeX]{TeX}{       moretexcs={includegraphics,multicolumn,multirow,newcolumntype,intertext,},       morekeywords=[2]{figure,tabular,tabulary,document,minipage,verbatim,table,         enumerate,tikzpicture,preview},         % texcsstyle=*\bfseries\color{darkred},       literate=                 *{\{}{{\textcolor{myblue}{\{}}}{1}                 {\}}{{\textcolor{myblue}{\}}}}{1}                 {\&}{{\textcolor{red}{\&}}}{1}                 {\\\\}{{\textcolor{red}{\textbackslash{}\textbackslash{}}}}{1}                 {[}{{\textcolor{myblue}{[}}}{1}                 {]}{{\textcolor{myblue}{]}}}{1},     }     \lstset{language=mytex}     \lstdefinestyle{mystyle1}{     basicstyle=\small\ttfamily,     keywordstyle=\color{purple}\bfseries,     keywordstyle=[2]{\color{magenta}},     commentstyle=\color{darkgreen},      stringstyle=\color{orange},     identifierstyle=\ttfamily,     showstringspaces=true,     breaklines=true,     tabsize=4,     columns=fullflexible,     keepspaces=true,     }     \lstset{style=mystyle1}     \begin{document}                    \begin{lstlisting}     \begin{alignat*}{4}        y & = -4   & + 3 & +4     & -7      \\        y & =      & + 3 &        & -7      \\        \intertext{therefore}        a & = b    & d   & = cccc & e & = d \\        a & = bbbb & d   & = c    & e & =   \\     \end{alignat*}     \end{lstlisting}          \end{document}


title: plot legend : increase its area

text: So my question in general is what is the method to change the precise area of the rectangle used in pgf plots? Yes, to make it larger ... MWE: a typical bar chart               \documentclass{standalone}\usepackage{pgfplots}     \usetikzlibrary{patterns}\begin{document}%     \begin{tikzpicture}%     \pgfplotsset{every axis legend/.append style={width=40pt,height=30pt,at={(0.96,0.72)},% (0.96,0.72) |-> (1,0.8) defaults this     anchor=south east}}%     \begin{axis}[grid=major,ybar,     width=384pt,x tick style={ultra thick, draw=black},height=384pt,y tick style={ultra thick, draw=black},legend image code/.code={\draw[#1] (-4pt,-4pt) rectangle (14pt,14pt);}]     \addplot[fill=blue,draw=black,point meta=y,         every node near coord/.style={inner ysep=8pt},         error bars/.cd,y dir=both,y explicit] table [y error=error] {%         x   y       error    label         1   30  2           1};      \draw ({rel axis cs:0,0}|-{axis cs:0,0}) -- ({rel axis cs:1,0}|-{axis cs:0,0});      \legend{\raisebox{8pt}{blah},%      }\end{axis}\end{tikzpicture}\end{document}      edit: If the legend is basically a matrix, then the separation of entries and the distributed height can be increased, but what about adding a thick white border? (Assume I put in draw=none inside legend style.) How does one increase the white space horizontal from the left and the right of the matrix entries, while keeping them were they are, so the box becomes larger but they do not move? Also from the top and the bottom, while keeping the matrix entries in place. Is it possible, or would this require drawing a white rectangle behind the legend to do this, because no parameter can do this automatically in the legend box itself?


title: error generating separate pdf from pgfplots

text: When I followed the chapter 7pgfplots manual (Revision 1.8) to generate seperate pdf files from the pgfplots figure I could not get the required pdf files. MY file name is test.tex Here is the code:               \documentclass{article}     \usepackage{amsmath}     \usepackage {tikz,pgfplots}     %\usepgfplotslibrary{external}     %\tikzexternalize     \pgfrealjobname{test}     \usetikzlibrary{shapes,arrows,shadows}     \tikzstyle{block} = [draw,fill=blue!20,rounded corners= 2pt,  rectangle, minimum    height= 2em, minimum width =4em,line width =1.5pt,drop shadow]     \tikzstyle{sum} = [draw, fill=gray!15, circle,radius = 1.5cm, node distance=1cm,line width =1.5pt,drop shadow]     \tikzstyle{input} = [coordinate]     \tikzstyle{output} = [coordinate]     \tikzstyle{pinstyle} = [pin edge={to-,thick,black}]     \tikzstyle{branch}=[fill,shape=circle,minimum size=4pt,inner sep=0pt]     \tikzstyle{line} = [draw, thick, color=black!50, -latex']          % The block diagram code is probably more verbose than necessary     \begin{document}     \beginpgfgraphicnamed{f1}     \begin{tikzpicture}[auto, node distance=2cm,>=latex']     % We start by placing the blocks,input output, branch          \node [input, name=input,label=left:$\phi_{des}$] {};     \node [sum, right of=input] (sum1) {};          \node [block, right of=sum1,node distance=2cm] (controller1) {$K_{p}$};     \path (sum1)--coordinate(branch1) (controller1);     \node [block, above of=controller1,node distance=1.5cm] (controller2) {$K_{i}\int e\,dt $};     \node [sum, right of=controller1,node distance=1.5cm] (sum2) {};     \node [block, right of=sum2  ] (system) {${1\over{J_xs^2}}$};     \node [block, below of=system,node distance=1.5cm              ] (controller3) {$K_{d}s$};     \node [input, right of= controller3, node distance = 1.35cm](y_mid){};          % We draw an edge between the controller and system block to      % calculate the coordinate u. We need it to place the measurement block.           \draw [->,line width =1pt] (sum2) -- node[name=u] {$\tau_{\phi}$} (system);     \node [output, right of=system,node distance =2cm] (output) {};     \path (system)--coordinate(branch2)(output);    %Finds the coordinate between system      \path (branch2)|- coordinate(branch3)(controller3);    %Finds the coordinate between           \node[input,name= feedback,below of= sum2,node distance=2.5cm]{};     % Once the nodes are placed, connecting them is easy.           \draw [draw,->,line width =1pt] (input) -- node[pos =0.9] {$+$} (sum1);     \draw [->,line width =1pt] (sum1) -- node[pos =0.1]{$e$} (controller1);          \draw [->,line width =1pt] (branch1)node[branch]{} |-  (controller2);     \draw[->,line width =1pt](controller2)-|node[pos =0.95]{$+$} (sum2);          \draw [->,line width =1pt] (controller1) -- node [pos =0.9]{$+$} (sum2);          \draw [->,line width =1pt] (system) -- node[name =y]  {$\phi$}(output);     \draw[line width =1pt](branch2)node[branch]{}|- (controller3);          \draw [line width =1pt] (branch3) |-  (feedback);          \draw [->,line width =1pt] (controller3) -| node[pos=0.95]{$-$}(sum2);     \draw [->,line width =1pt] (feedback) -| node[pos=0.97]{$-$}(sum1);          \end{tikzpicture}     \endpgfgraphicnamed     \end{document}      I command "pdflatex" first and then "pdflatex --jobname f1 test" > test.tex > > Package pgfplots Warning: running in backwards compatibility mode > (unsuitable t > > — 30 Package amsmath Warning: Foreign command \over; \frac or \genfrac > should be used instead >on input line 30.


title: Alignment within align environment

text: My minimum working example:               \documentclass{report}          \usepackage{amsmath}          \begin{document}          \begin{align}     x_1 = \alpha,\, x_2 = q,\, u = \delta \\     f_1(x_1) &= C_1 \left [ \phi_{z1}(x_1) + \phi_{z2}(x_1)M \right ] \\     f_2(x_1) &= C_2 \left [ \phi_{m1}(x_1) + \phi_{m2}(x_1)M \right ] \\     g_1 = C_1 b_z,\, g_2 = C_2 b_m \\     C_1 = \frac{\bar{q}S}{mV_T},\, C_2 = \frac{\bar{q}Sd}{I_{yy}}     \end{align}          \end{document}      The result: ![enter image description here](http://i.stack.imgur.com/oD2v8.png) What I want: ![enter image description here](http://i.stack.imgur.com/Dhrvv.png)


title: Align the roman numbers of the parts in ToC

text: How can I align the roman numbers of the parts in this manner? The alternative is to use an arabic enumeration. I would not any changes at the TOC of classicthesis outside of the alignment of the roman numbers of the parts.               \documentclass{scrreprt}                  % classe report di KOMA-Script;          \usepackage[%                         pdfspacing,%                   % migliora il riempimento di riga                         linedheaders,%                         dottedtoc,%                         parts%                        % da decommentare in un documento diviso in parti                         ]{classicthesis}               % stile ClassicThesis          \hypersetup{hidelinks}          \begin{document}          \tableofcontents          \part{Test Part One}     \chapter{Test Chapter One}     \section{Test Section One One}     \section{Test Section One Two}     \part{Test Part Two}     \chapter{Test Chapter One}     \section{Test Section One One}     \section{Test Section One Two}     \part{Test Part Three}     \chapter{Test Chapter One}     \section{Test Section One One}     \section{Test Section One Two}          \end{document}      ![enter image description here](http://i.stack.imgur.com/lwDxd.jpg)


title: Row spacing of multi-line paragraph cell in `tabular` in the `res` document class

text: I was trying to compose my CV (as a mathematician) in LaTeX, and found the document class res on CTAN that appealed to me aesthetically. The cls file for this document class can be found here: http://ctan.org/tex- archive/macros/latex/contrib/resume/res.cls. However, there is a strange problem with the `tabular` environment in this class. The row spacing is insufficient when a paragraph cell has multiple lines. Consider the following example (using `res.cls` linked above):               \documentclass{res}          \begin{document}          \begin{tabular}{p{4in}}       Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a justo       in lorem. \\       Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a justo       in lorem. \\       Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a justo       in lorem. \\     \end{tabular}          \end{document}      The output I get is: ![output with res.cls](http://i.stack.imgur.com/4saO1.png) As you can see, adjacent rows are too close—the letters "j" and "L" almost touched each other. In comparison, below is what I get from `amsart` (replacing `res` with `amsart` in the above code snippet): ![output with amsart](http://i.stack.imgur.com/ZbUTt.png) and below is what I get from `article`: ![output with article](http://i.stack.imgur.com/o3wwy.png) Both of these have much reasonable spacing. **Since I know nothing about document class writing, could anyone help me look into`res.cls` and identify what's wrong with the spacing? And is it possible to somehow fix this issue in `res.cls`?** Thanks in advance. * * * I am fully aware that this question might be too localized to be constructive; however, I can't find other helpful sources to resolve this issue. Sure I might have an answer myself after reading the TeXbook or other multi-hundred- page TeX programming reference manuals, but this is not so realistic for a lay LaTeX user who focuses mainly on content (after all, content is what LaTeX emphasizes). I apologize for my potential abuse of this site. By the way, **if you know any simple and elegant CV document class suitable for mathematicians (in academia), you are more than welcome to leave me a comment.** Thanks.


title: pgfplots bar plot: spacing inbetween bars

text: How can I increase the spacing between the bars in a bar plot from pgfplots?               \documentclass{minimal}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}          \begin{document}     \begin{tikzpicture}     \begin{axis}[         every axis plot post/.style={/pgf/number format/fixed},         ybar,         x=3cm,         ymin=-0.1,         ymax=12,         xtick=data,         enlarge x limits=0.2,         bar width=15pt,         symbolic x coords={A,B,C},         nodes near coords,         axis lines*=left,         ]     \addplot coordinates {(A,2) (B,0.5) (C,10)};     \addplot coordinates {(A,20) (B,30) (C,1)};     \addplot coordinates {(A,6) (B,11) (C,7)};     \end{axis}     \end{tikzpicture}     \end{document}      I want to increase the space between the bars (A,2), (A,20), (A,6) (and analogously with B's and C's). And on another note: How can I deal with values that are too large to be displayed? (e.g (B,30))


title: Memoir class headers listing section/subsection/etc. hierarchy

text: I'm trying to use the `memoir` class such that a document with the following structure:               \section{A section}     \subsection{A subsection}     \subsection{Another subsection}     \subsubsection{A subsubsection}     \subsubsection{Another subsubsection}     \subsection{Yet another subsection}     \section{Another section}      gives headers such as               1 A section     1 A section >> 1.1 A subsection     1 A section >> 1.2 Another subsection     1 A section >> 1.2 Another subsection >> 1.2.1 A subsubsection     1 A section >> 1.2 Another subsection >> 1.2.2 Another subsubsection     1 A section >> 1.3 Yet another subsection     2 Another section      To this end, I have the following in my preamble:               \def\sectionmark#1{\markright{\thesection \hskip.25cm #1}}     \def\subsectionmark#1{\markright{\rightmark \hskip.25cm >> \hskip.25cm \thesubsection \hskip.25cm #1}}     \def\subsubsectionmark#1{\markright{\rightmark \hskip.25cm >> \hskip.25cm \thesubsubsection \hskip.25cm #1}}      which almost works, but not quite. In particular, it will generate the following headers:               1 A section     1 A section >> 1.1 A subsection     1 A section >> 1.1 A subsection >> 1.2 Another subsection     1 A section >> 1.1 A subsection >> 1.2 Another subsection >> 1.2.1 A subsubsection     1 A section >> 1.1 A subsection >> 1.2 Another subsection >> 1.2.1 A subsubsection >> 1.2.2 Another subsection     1 A section >> 1.1 A subsection >> 1.2 Another subsection >> 1.2.1 A subsubsection >> 1.2.2 Another subsection >> 1.3. Yet another subsection     2 Another section      as the subsectionmark and subsubsectionmark commands nest. What can I do to prevent this?


title: I want to disable auto-fill-mode when editing equations

text: How can I disable auto-fill-mode when editing equations? I like auto-fill-mode in general, but I'd like to turn it off in specific situations,   e.g. between a `\begin{equation}` and `\end{equation}`   or `\begin{equation*}` and `\end{equation*}` or `\begin{eqnarray}` and `\end{eqnarray*}` etc. I did some searching and found Suppress emacs auto-fill in a selected region which looked relevant, but I couldn't make it work.   Specifically, I tried changing `%%% BEGIN NO FILL` and `%%% END NO FILL`   to `\begin{eq` and `\end{eq` to no avail. Thanks in advance!


title: how to use citation in references

text: > **Possible Duplicate:**   >  Citation in bibliography when having multiple authors I'm using bibtex for writing references with natbib package. If I use `\citet` command I get something like Green et al. Is it possible to use some modification for obtaining the same in other langauge? More precisely, I would need to get instead of "Green et al." "Green a spol."


title: Making a table as a box in beamer in whch 2 cells are highlighted

text: I am trying to make a table similar to: How to construct a confusion matrix in LaTeX? I prefer to do it in tikz. I would also like to highlight 2 cells in the same row or 2 cells in the same column as in: Highlighting table cells If the 2 cells cannot be circled, highlighting them in another way would also be awesome. I would also like to do this in beamer. I am also not fully sure how to center this figure--or generally--how to adjust its position within the beamer slide. I would be very grateful for any help! Thank you in advance. I have modified the tikz code in the earlier solution on just setting up the box (without any highlighting), but when add \begin{frame} and \end{frame} it no longer compiles:               \documentclass[professionalfont, fleqn]{beamer}          \usepackage{tikz}     \usetikzlibrary{arrows,shapes,positioning,fit,shapes.misc}          \begin{document}          \begin{tikzpicture}[     box/.style={draw,rectangle,minimum size=1.0cm,text width=1cm,align=center}]     \matrix (conmat) [row sep=0cm,column sep=0cm] {     \node (tpos) [box,     label=left:\( \mathbf{p'} \),     label=above:\( \mathbf{p} \),     ] {};     &     \node (fneg) [box,     label=above:\textbf{n},] {$\checkmark$};     \\     \node (fpos) [box,     label=left:\( \mathbf{n'} \),] {$\checkmark$};     &     \node (tneg) [box] {$\checkmark$};     \\     };     \node [left=.05cm of conmat,text width=1.5cm,align=center] {\textbf{actual \\ value}};     \node [above=.05cm of conmat] {\textbf{prediction outcome}};     \end{tikzpicture}               \end{document}


title: Putting abstract at the titlepage

text: My LaTeX file:               \maketitle     \begin{abstract}        For over a century, fingerprints have been an undisputed personal identifier.         Recent court rulings have sparked interest in verifying unique...     \end{abstract}      I would like to a similar titlepage as here. My document class is article. This is the beginning of my file.


title: Workflow for creating/updating tables?

text: I primarily a Word user, but use LaTeX now and then. One thing I don't like working with in LaTeX is tables. My data might come from Excel (usually), Word, or the output of some custom program. If my data source is Excel, I use some xls2Latex macro (that I downloaded somewhere) to do the job for me. However, I am wondering, is there any good, general workflow for easily getting your data in a LaTeX tables? Do you modify your programs to directly output to LaTeX format, or do you e.g. output to csv first and then use a csv to latex script? And how do you update it? By hand directly in LaTex, or do you rerun your whatever-to-LaTeX script?


title: Why does the package babel[french] destroy \@for loops?

text: Why does this minimal example code:               \documentclass{article}     \usepackage[francais]{babel}     \begin{document}          \def\names{Toto,Titi,Tete,Tutu}     \makeatletter     \@for\next:=\names\do{\textbf{\next} }     \makeatother          \end{document}      lead to this error message:               Runaway argument?     \next :=\names \do {\textbf {\next } } \makeatother \par \end {docume\ETC.     ! File ended while scanning use of \@for.      but the same code works perfectly if I delete the line               \usepackage[francais]{babel}      and of course, is there any solution that preserves the use of the [french] option?


title: Why do I need a '\vspace{0pt}` to align a table and a figure along the bottom line when using '\vbox' and '\hbox'?

text: Recently, I fiddled with placing a table and a figure next to each other such that their bottom parts aligned with each other. I managed to do by using `\vbox` and `\hbox`, but there is one thing that bothers me: In order for it to work, I had to put a `\vspace{0pt}` after the table inside the `\vbox{}`. Why? To illustrate, here is an example. Notice that I don't need the `vspace{0pt}` for the `\rule`s, so why is it only necessary for the table? ![enter image description here](http://i.stack.imgur.com/bnzo8.png)               \documentclass{article}          \begin{document}     \newsavebox{\firstfig}     \newsavebox{\secondfig}     \newsavebox{\thirdfig}     \savebox{\firstfig}{%       \begin{tabular}{ l c r }         \hline         1 & 2 & 3 \\         4 & 5 & 6 \\         7 & 8 & 9 \\         \hline       \end{tabular}     }     \savebox{\secondfig}{%       \rule{5em}{5em}     }     \savebox{\thirdfig}{%       \rule{2em}{2em}     }          \noindent     Without \textsf{\textbackslash vspace\{0pt\}}: \\     \mbox{}%     \vbox{\vbox{\hbox{\usebox{\firstfig}}}}     \vbox{\vbox{\hbox{\usebox{\secondfig}}}}          \vspace{3\baselineskip}          \noindent     With \textsf{\textbackslash vspace\{0pt\}}: \\     \mbox{}%     \vbox{\vbox{\hbox{\usebox{\firstfig}}\vspace{0pt}}}     \vbox{\vbox{\hbox{\usebox{\secondfig}}}}          \vspace{3\baselineskip}          \noindent     Without \textsf{\textbackslash vspace\{0pt\}}: \\     \mbox{}%     \vbox{\vbox{\hbox{\usebox{\thirdfig}}}}     \vbox{\vbox{\hbox{\usebox{\secondfig}}}}          \end{document}


title: How to get rid of the table of contents sidebar in LaTeX Beamer ?

text: I'm making a presentation with Beamer and I'm using the Hannover theme with the table of contents sidebar which is on each slide. I'd like not to show it on the first slide where is the title, the authors,... How can I do that ? Here is my code:               \documentclass[french]{beamer}     \usetheme{Hannover}     \setbeamertemplate{navigation symbols}{}          \usepackage[utf8]{inputenc}     \usepackage[frenchb]{babel}     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage{color}               \title[]{Projet Q2: Mag-Id-Tag !}     \subtitle{\color{black}{Groupe 11.65}}     \author[]{Adrien Farinelle \and Emile Fourneau \and Antoine Gauthier \and Thibault Hellings \and Vincent Nadrin \and Charles Snyers}     \date{23 juin 2011}               \begin{document}     \maketitle     \section*{Table des matières}     \frame{\tableofcontents}          \section{Introduction}          \section{Sous-blocs du système}          \section{Validation du système}          \section{Conclusion}          \end{document}


title: What is the side effect when hyperref has stopped early?

text: ![enter image description here](http://i.stack.imgur.com/7Nr3e.png)               \documentclass{beamer}     \usepackage{lmodern}     \usepackage{caption}     \begin{document}     \begin{frame}{Are you kidding?}     No! I am not a good joker.     \end{frame}     \end{document}      The following is taken from Ulrike's comment: > beamer loads hyperref with the option `implicit=false`. This option inserts > a `\endinput` in the command `\MaybeStopEarly` in hyperref and has the > effect that about 2000 lines of code of hyperref are not executed. This 2000 > lines contains a lot of definitions and redefinitions. One of them is e.g. > that it inserts in `\@caption` the command `\hyper@makecurrent{\@captype}`. > So getting rid of the warning by giving `\hyper@makecurrent` and empty > definition **will quite probably not enable hyperref support**. The next question becomes: Why does beamer load incompletely hyperref? What is the purpose?


title: \setbox vs. \sbox and \savebox - What are the differences I need to know about?

text: What's the difference between using TeX's `\setbox` and LaTeX's `\sbox` and `\savebox`?


title: Cute (child-friendly) document in LaTeX

text: My girlfriend is teacher at primary school, she's new using LaTeX and she needs to make a "cute document" for kids, but I don't know how change the following items to make them look nice for the kids:   * parts,   * sections,   * page number/number of pages   * and all this things to make a cute document.


title: One way slide transitions

text: Is there a way to have a transitions only if coming from a particular ''direction'' in beamer? I explain myself better. I'm doing a presentation and when I come to a particular slide from the linear workflow I want the transition to happen; I then have a reference in the appendix to the same slide and if I come from there I don't want the transition. Here is the link to a the MWE, (currently) the same as the following:               \documentclass[10pt]{beamer}     \usepackage[utf8]{inputenc}     \usepackage{hyperref}          \mode<beamer>     {     \usetheme{PaloAlto}     }          \begin{document}          \begin{frame}{First slide}     some stuff     \end{frame}          \begin{frame}{I want transition}{\transwipe[direction=180, duration=0.6]}     \label{trans-slide}     I want a transition if I come from the first slide          I don't want it if I come from the appendix     \end{frame}          \appendix     \begin{frame}{Appendix}          \hyperlink{trans-slide}{\beamergotobutton{I don't want transition}}          \end{frame}          \end{document}      Thanks for your help


title: Help to change svg package to include a 600dpi pdf instead of creating huge pdf with vector graphic. (Downgrade PDF)

text: I am using the svg package to include an svg file with transparent 3D graphic and latex code to be set at the right label positions. I tried many different methods to do that (matlab->eps+tex file) where always a bitmap graphic was included in an vector graphic (eps) and non of them did perform nicely. I think the conversion from bitmap to vector graphics has sometimes problems with the conversion since I had regular patterns of white/blank line over the image. Now after solving this issue with the matlab2svg and importing the resulting pdf of the svg package with `\includesvg` I have the issue with quite large files size and slow rendering of the final pdf at the corresponding pages. Now I thought maybe one could change the svg package such that it generates the intermediate pdf not with the vector graphic but with a high resolution bitmap pdf (let's say 600dpi). This should decrease the final file size and increase the pdf rendering while viewing it. Can somebody tell me if this is possible and how I could come to this solution? Maybe it is just a change of an option and that's it. My goal is to have a quite straight forwards automated workflow and until now the svg workflow was the best for my graphics despite of the resulting file size. Hope for some advise. Best regards to the latex geeks out there!


title: How to write maths symbols

text: I have written in my work `$X^{+},\,\rm{e}^{X},\,|X|^{p}$`. Why is the second and third term not in italics?


title: How to change AUCTeX latex compile command? (using Emacs 23)

text: I'd like to configure AUCTeX to compile without stopping on errors. I can do it from a terminal with               pdflatex -interaction=nonstopmode filename.tex      but AUCTeX apparently does               pdflatex filename.tex      when asked to compile with C-c C-c. How can I force the "-interaction=nonstopmode" option?


title: Using \displaystyle in Equation environment

text: I have an equation in `eqnarray` environment. The equation has a _sum_ notation with subscript and superscript. The problem is that the subscript and superscript appear on sideways of the _sum_ notation which looks pretty ugly. I came to know about `\displaystyle` but it can be used only with inline equation. How can I use such a command with the `equation` or `eqnarray` environment.


title: Missing $ or }in split environment and cant find source of error

text: I simply can't find the error in my code               \documentclass[12pt,a4paper]{scrartcl}     \usepackage[utf8]{inputenc}          \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}               \usepackage[pdftex]{graphicx}     \usepackage{latexsym}     \usepackage{amsmath,amssymb,amsthm}     \usepackage{todonotes}      \usepackage{kbordermatrix}      \usepackage{etoolbox}     \usepackage{amsbsy}      \usepackage{multirow}               \newcommand{\bg}{\boldsymbol{g}}     \newcommand{\bh}{\boldsymbol{h}}         \begin{document}         \[         \begin{split}         U((1:n), (n-1:n))=\left[ U \cdot I_{n}\right]((1:n), (n-1:n))=U((1:n),(n-1:n))         \begin{pmatrix}          0 & \cdots & 0 & 1 & 0 \\ 0 & \cdots & 0 &  0 &  1         \end{pmatrix} \\         =\left( \begin{array}{ccc|c|c}                0 & \cdots & 0 & \multirow{2}{*}{\bh_{n-1}}      &  \multirow{2}{*}{B_{n}\bh_n} \\                 0 & \cdots & 0 &   \\         \end{array} \right) =         \begin{pmatrix}          G_{n-1}h_{n-1} & G_{n-1}B_n \\ \sigma_{n-1} &  \bg_n^T          \end{pmatrix}         \end{split}         \]               \end{document}      This is the error I'm getting:               ! Missing } inserted.     <inserted text>


title: Filter table rows for regression

text: I have a table containing a flag and x and y values. I'd like to have a regression for all rows with 1 in the first column. How can I do this?               \documentclass{article}     \usepackage{array}     \usepackage{pgfplots}     \pgfplotsset{compat=1.5.1}     \usepackage{pgfplotstable}     \begin{document}       \pgfplotstableread{         Exmpl  a   v         1      0   0         1      1   1         1      2   1         1      3   4         2      0   -0         2      1   -1         2      2   -1         2      3   -4       } \data       \begin{tikzpicture}         \begin{axis} % [legend pos=outer north east]           \addplot table [x=a, y=v] {\data};           \addplot table [x=a, y={create col/linear regression={y=v}}] {\data};         \end{axis}       \end{tikzpicture}     \end{document}      I think, the pgfplots filters don't apply here, since I guess, pgfplots only gets the x and y values. It would be great, if there is a possibility to create a filtered table and do the regression and plotting stuff from there.


title: Two different calligraphic font styles in math mode

text: I have been succesful in using the `calrsfs` package together with the standard CM type1cm font. I have been able to obtain in separate documents different calligraphic symbols in math mode with `\mathcal{}` for e.g. transform operators: `\mathcal{F}`, `\mathcal{L}`, ... I am considering two different operators in one single document, with each the letter 'L' in calligraphic style, but in a different font. I am working with MikTeX 2.8 / 2.9 and CM. I have considered What are all the font styles I can use in math mode? on this forum, as well as The LaTeX Companion. The topic two fonts in math mode seems to offer the complete solution. However, where do I find the reference to the desired fonts ? The LaTeX Companion refers to `nfssfont.tex`. I would like to utilize the `fourier` math font.   * Where do I find the reference to the fourier font in the command               \DeclareSymbolFont{pazoletters}{OML}{zplm}{m}{it}         * I would like to utilize the `fourier` font to declare the first symbol with _newcommand_ , then invoke the `calrsfs` package to have the second symbol in another font in calligraphic mode. Is it necessary to invoke the corresponding packages ?              \usepackage{fourier}      \newcommand{\L_a}{\mathcal{L}          \usepackage{calrsfs}         \newcommand{\L_b}{\mathcal{L}}      Once the font is in place with any of the previous method, declaring the new symbols is done with the `\DeclareMathSymbol` command (without declaring a complete new alphabet).                   \DeclareMathSymbol{\L_a}{12}{fourier}{"4C}         \DeclareMathSymbol{\L_b}{12}{calrsfs}{"4C}       Many thanks in advance,


title: Drawing thick, doublesided arrows with texts between circles

text: This is the first time I'm using Latex to draw things, so this is all new to me. I'm trying to draw the following ![enter image description here](http://i.stack.imgur.com/OKWZo.png) And I got the circles about right, but I have no idea how to draw these arrows: ![enter image description here](http://i.stack.imgur.com/IGBwk.png) This is my code:               \begin{tikzpicture}     \def\firstcircle{(0,0) circle (2cm)}     \def\secondcircle{(6,-8) circle (2cm)}     \def\thirdcircle{(12,0) circle (2cm)}     \begin{scope}[ fill opacity=0.8]         \fill[red] \firstcircle;         \fill[green] \secondcircle;         \fill[blue] \thirdcircle;     \end{scope}          \draw \firstcircle node[] (c1) {Verwacht};     \draw \secondcircle node[] (c2) {Afspraak};     \draw \thirdcircle node[] (c3) {Geleverd};     \draw[<->] (c1) -- (c2);     \draw[<->] (c2) -- (c3);     \draw[<->] (c3) -- (c1);     \end{tikzpicture}      If anyone could help me with these arrows, thanks!


title: Using dashes with siunitx with pgfplotstable

text: I have a table setup that is mostly numerical columns. However, there are occasionally some cells that have a blank entry, currently the in the excel csv file output as "---". Everything worked fine, until I wanted the cells aligned on the decimal place. I had found good results with the `S` column of the `siunitx` package, which is in use elsewhere in my document. So I decided to use those. However, now the "blank" cells with the "---" are causing trouble and conflict. I have tried to use some of the methods in the thread here to resolve the issue: Siunitx: how to deal with invalid numerical input '-'? Without any success (using `\textemdash`, or protecting the cell with braces `{---}`). I also tried adding `string type` to the column style as I read in the `pgfplotstable` manual that this causes `pgfplotstable` to simply read the cell without further processing. Depending on the method I use, I either get `Missing \endcsname inserted` when I try the `textemdash` method, or `Could not parse input '---' as a floating point number` I'm also not at all married to one method or another. I do want to use `pgfplotstable`, as this is only one of about 45 or so external tables of this format I will need to include in my document, and I would prefer not to typeset them all into latex code manually. Here is a "mwe", since it doesn't actually work :(               \documentclass{memoir}     \usepackage{pgfplotstable}     \usepackage{siunitx}     \usepackage{longtable}          \pgfplotstableset{         begin table=\begin{longtable},         end table=\end{longtable},     }          \begin{document}         \pgfplotstabletypeset[%             col sep=comma,%             columns/atomnum/.style={int detect,column type=c},%             columns/atomtype/.style={string type,column type=c},%             columns/x/.style={string type,column type=S},%             columns/y/.style={string type,column type=S},%             columns/z/.style={string type,column type=S},%             columns/nmrshieldtens/.style={column type=S},%             columns/nmrscaledshifts/.style={column type=S},%             header=true,             every head row/.style={before row=\toprule, after row=\midrule\endhead},%             every last row/.style={after row=\bottomrule}%         ]{nankakurineSI.csv}%     \end{document}      I use an external file, and I'm not sure how provide that here, so I've included the file contents below. You can see in lines 43 and 48, the trouble spots.               atomnum,atomtype,x,y,z,nmrshieldtens,nmrscaledshifts     1, C ,2.645924,-0.284964,1.121739,145.6803,38.1985     2, C ,3.061887,-0.314747,-1.738533,138.1991,45.6797     3, C ,4.192868,-0.744373,-0.81303,152.3163,31.5625     4, C ,3.609622,-1.293585,0.487818,158.2814,25.5974     5, H ,2.179934,-0.733573,2.004648,29.7536,2.1014     6, H ,3.222428,0.584598,1.466674,30.9379,0.9171     7, H ,2.482083,-1.204262,-2.037409,28.7647,3.0903     8, H ,3.460033,0.135058,-2.653243,29.1953,2.6597     9, H ,4.8172,-1.495056,-1.309066,30.3061,1.5489     10, H ,4.826006,0.126259,-0.596497,30.5419,1.3131     11, H ,4.407002,-1.530092,1.200573,30.3571,1.4979     12, H ,3.088045,-2.236207,0.278539,30.219,1.636     13, C ,-0.54058,-1.145592,0.929915,143.9137,39.9651     14, C ,0.528585,-0.902319,-0.152946,143.2553,40.6235     15, C ,1.550392,0.221805,0.156845,124.581,59.2978     16, C ,0.851532,1.450518,0.80068,133.676,50.2028     17, C ,0.027293,1.042491,2.023216,147.7008,36.178     18, C ,-1.109706,0.152585,1.53285,140.8497,43.0291     19, H ,-0.057217,-1.683382,1.759072,30.1175,1.7375     20, H ,0.034879,-0.650236,-1.095222,30.0622,1.7928     21, H ,1.056471,-1.849267,-0.318437,29.5661,2.2889     22, H ,1.648183,2.146325,1.095154,30.7693,1.0857     23, H ,0.631687,0.517402,2.770335,29.9253,1.9297     24, H ,-0.375923,1.941621,2.506378,30.4385,1.4165     25, H ,-1.749305,-0.12778,2.381335,30.3971,1.4579     26, C ,-0.086446,2.231626,-0.127235,121.2219,62.6569     27, C ,-2.015491,0.916314,0.549213,113.5813,70.2975     28, H ,-0.424133,3.132366,0.42693,29.8436,2.0114     29, H ,0.446378,2.597638,-1.011354,28.8531,3.0019     30, C ,-1.676245,-2.03098,0.39515,138.255,45.6238     31, H ,-2.274539,-2.393781,1.244793,30.6875,1.1675     32, H ,-1.25699,-2.917557,-0.100028,30.3609,1.4941     33, C ,-2.623346,-1.297773,-0.5652,156.7968,27.082     34, H ,-2.066223,-1.014811,-1.468623,29.9263,1.9287     35, C ,-3.14384,-0.01614,0.093255,140.5753,43.3035     36, H ,-2.46664,1.767252,1.104586,29.9266,1.9284     37, H ,-3.843967,0.497571,-0.574314,29.7727,2.0823     38, H ,-3.719835,-0.292135,0.988647,31.0288,0.8262     39, C ,-3.780339,-2.203913,-0.982867,159.2459,24.6329     40, H ,-4.373272,-2.494855,-0.106965,31.3512,0.5038     41, H ,-4.447095,-1.695357,-1.687373,30.882,0.973     42, H ,-3.413599,-3.118855,-1.46021,30.8992,0.9558     43, N ,-1.242229,1.456093,-0.582487,{---},{---}     44, C ,-2.064595,2.286645,-1.451361,138.6569,45.2219     45, H ,-1.433234,2.735618,-2.223064,29.7894,2.0656     46, H ,-2.833329,1.693382,-1.950341,29.0105,2.8445     47, H ,-2.559918,3.103363,-0.892348,30.514,1.341     48, N ,2.23005,0.694822,-1.070475,{---},{---}     49, H ,1.515066,0.996756,-1.729488,30.5467,1.3083


title: Jenor chapter style

text: Is it possible to get the `Jenor` chapter style available with the `memoir` documentclass in the `scrreprt` documentclass ( **Koma-script** )? Here is a link to `Jenor` style.


title: Clash between animate and hyperref on pdfLaTeX

text: When I compile the MWE below on `pdfLaTeX` I get the error message ``! pdfTeX error (ext4): destinations cannot be inside an XForm.` right before the `\newframe*` command is read. I have tried by switching the loading order of the `animate` and the `hyperref` packages, only to get the same error. Is there anyone out there who can provide any hints on what the problem is?               \documentclass{memoir}          \usepackage{xifthen, ifpdf, ifxetex}     \usepackage[pdfcrop = { --hires }]{auto-pst-pdf}      \ifpdf\else\usepackage{pstricks}\fi     \usepackage{animate}     \usepackage{hyperref}          \begin{document}     \begin{animateinline}{2}       \begin{pspicture}(0,0)(1,1)         \psline(0,0)(0.5,0.5)       \end{pspicture}     \newframe*       \begin{pspicture}(0,0)(1,1)         \psline(0,0)(1,1)       \end{pspicture}     \end{animateinline}     \end{document}


title: How to insert margin note just left side of all page in my persian document?

text: \documentclass{book}     \usepackage[english]{babel}     \usepackage[svgnames]{xcolor}     \usepackage[doublespacing]{setspace}     \newcommand{\mymarginnote}[1]{%       \marginpar{\colorbox{yellow}{\parbox{\marginparwidth}{%       \setstretch{0.5}\textcolor{red}{\scriptsize{#1}}}}}}           \usepackage{xepersian}     \begin{document}     \begin{persian}     ریاضیدانان بزرگ جهان تلاش فراوانی در جهت پیشبرد اهداف علوم مختلف انجام داده اند.     \mymarginnote{نظریه اعداد از مباحث ریاضی است.}     \newpage     ریاضیدانان بزرگ جهان تلاش فراوانی در جهت پیشبرد اهداف علوم مختلف انجام داده اند.     \mymarginnote{نظریه اعداد از مباحث ریاضی است.}     \end{persian}     \end{document}


title: PGFPLOTS: How to merge 2 tables for histogram

text: I have a data set that I will plot across two pages. My initial strategy is to split the table in half. Read in the first table and plot, and so with the second. My problem with this is I do a summary histogram and I need the full file, that is now split. How can I merge the tables into 1 table, actually the first column from each? Everything I've seen in the pgfplotstable/pgfplots manuals show adding columns. Can "addplot hist" take multiple tables? If I have:               \begin{filecontents}{dataA.csv}     Miles,   Bike,    rdate,   desc     12.5,    Yel-11,  {$\stackrel{\hbox{Yel-11}}{\hbox{\tiny 03-30-14}}$},   {12.5 miles:\ Mohawk}     16.5,    Fuji,    {$\stackrel{\hbox{Fuji}}{\hbox{\tiny 04-23-14}}$},     {16.5 miles:\ Snow}     21.0,    8000SHX, {$\stackrel{\hbox{8000SHX}}{\hbox{\tiny 05-18-14}}$},  {21.0 miles:\ Ojibway Road}     24.2,    Yel-11,  {$\stackrel{\hbox{Yel-11}}{\hbox{\tiny 05-24-14}}$},   {24.2 miles:\ Ojibway Road}     23.4,    YFoil,   {$\stackrel{\hbox{YFoil 77}}{\hbox{\tiny 05-29-14}}$}, {23.4 miles:\ Snow}     21.1,    Y-22,    {$\stackrel{\hbox{Y-22}}{\hbox{\tiny 05-30-14}}$},     {21.1 miles:\ Ojibway Road}     \end{filecontents}     \begin{filecontents}{dataB.csv}     Miles,   Bike,    rdate,   desc     23.9,    YFoil,   {$\stackrel{\hbox{YFoil 77}}{\hbox{\tiny 06-01-14}}$}, {23.9 miles:\ Snow}     32.5,    Fuji,    {$\stackrel{\hbox{Fuji}}{\hbox{\tiny 06-05-14}}$},     {32.5 miles:\ Phoenix Church}     23.8,    YFoil,   {$\stackrel{\hbox{YFoil 77}}{\hbox{\tiny 06-17-14}}$}, {23.8 miles:\ Snow}     27.0,    YFoil,   {$\stackrel{\hbox{YFoil 77}}{\hbox{\tiny 06-22-14}}$}, {27.0 miles:\ Snow}     34.0,    Y-22,    {$\stackrel{\hbox{Y-22}}{\hbox{\tiny 06-27-14}}$},     {34.0 miles:\ Central Mine}     20.0,    Fuji,    {$\stackrel{\hbox{Fuji}}{\hbox{\tiny 06-29-14}}$},     {20.0 miles:\ Snow}     \end{filecontents}      Results in:               \begin{filecontents}{merged.dat}     Miles     12.5     16.5     21.0     24.2     23.4     21.1     23.9     32.5     23.8     27.0     34.0     20.0     \end{filecontents}      Any help here is greatly appreciated. Dave.


title: Dynamic project setup in TeXlipse

text: I'm using TeXlipse, and it has this default setup: The input file is `document.tex` and the output file is `document.pdf`. This leaves me with a lot of files named `document`. Having more than one project open at a time becomes confusing, I have to change the name of the pdf before sending it to people and it's generally annoying. You can of course change this manually every time you create a project, but I'm lazy enough to think there must be some other way. I assign a project name anyway, why couldn't it just be `<projectname>.tex` and `<projectname>.pdf` by default? Also, having the builder to always put the `*.pdf` files in, for instance, `Documents` instead of in the project directory would be great. Is there any way to set this up? Is there any reason not to?


title: How to find only headwords (entries of a foreign language dictionary) using text search in PDF Reader?

text: I'm working on a two language dictionary (german-french) with some thousand entries (headwords). Each entry has the following structure:               \hypertarget{headword}{}     \index{headword}     {\de{german}}{\fr{french}}     cf. \hyperlink{link_1}{hword_1} /          \hyperlink{link_2}{hword_2} / … /          \hyperlink{link_n}{hword_n}     [more examples etc. concerning <headword>...      see picture below: headword "Probe"]      with `link_i` pointing to another headword in the dictionary. Now, using full text search in the resulting PDF for passages containing headword, I get **every instance** of headword in the file. How can it be achieved to find **only the entry** headword (e.g. "Probe" below) using text search in a PDF file? ![PDF output, headword with infos](http://i.stack.imgur.com/hefdf.png) MWE:               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{hyperref}     \begin{document}          TEXT, with some instances of      Experiment, Probe % these instances should NOT be found by textsearch in PDF          %--- HEADWORD "Experiment", this should be found by textsearch in PDF     \hypertarget{Experiment}{}     \index{Experiment}     \begin{tabular}{p{60mm}p{60mm}}     das Experiment, e & l’expérience, expérimentation \\     cf.  die \hyperlink{Probe}{Probe}      \end{tabular}          \newpage          TEXT ...          %--- HEADWORD "Probe", this should be found by textsearch in PDF      \hypertarget{Probe}{}     \index{Probe}     \begin{tabular}{p{60mm}p{60mm}}     die Probe, n &  l’entraînement, la répétiton  \\     cf.  das \hyperlink{Experiment}{Experiment}      \end{tabular}          TEXT ...          \end{document}


title: Writing pgfplots macros that take coordinates as input

text: Is it possible to write macros for pgfplots that take coordinates as arguments. I want to use it like that:               \begin{axis}     \myMacro{(1 2 3)};     \end{axis}      The goal is to write a macro that plots a helpline from a 3D point to the xy- plane. The plotting itself shouldn't be a problem once I know how to access the coordinates.


title: Problems with the `graphs` library

text: According to the documentation for version 3.0.0 of PGF/TikZ (Section **19 Specifying Graphs** , page 258), the powerful `graphs` library: > [...] offers a powerful path command for specifying how the nodes in a graph > are connected by edges and arcs: The graph path command, which becomes > available when you load the `graphs` library. A few lines below there are some examples of the use of the path; amongst those examples one finds:               \tikz       \graph [nodes={draw, circle}, clockwise, radius=.5cm, empty nodes, n=5] {         subgraph I_n [name=inner] --[complete bipartite]         subgraph I_n [name=outer]     };      and               \tikz     \graph [nodes={draw, circle}, clockwise, radius=.75cm, empty nodes, n=8] {     subgraph C_n [name=inner] <->[shorten <=1pt, shorten >=1pt]     subgraph C_n [name=outer]     };      which should produce the following images (taking directly from the documentation): ![enter image description here](http://i.stack.imgur.com/CORxc.png) However, when I try the exact same code in a "real" document:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{graphs}          \begin{document}           \tikz       \graph [nodes={draw, circle}, clockwise, radius=.5cm, empty nodes, n=5] {         subgraph I_n [name=inner] --[complete bipartite]         subgraph I_n [name=outer]     };     \tikz       \graph [nodes={draw, circle}, clockwise, radius=.75cm, empty nodes, n=8] {         subgraph C_n [name=inner] <->[shorten <=1pt, shorten >=1pt]         subgraph C_n [name=outer]     };               \end{document}      This is all I get (image zoomed at 400%): ![enter image description here](http://i.stack.imgur.com/0KQT6.png) Even more disppointing is the following example on page 276:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{graphs}          \begin{document}          \tikz \graph [simple] {     subgraph K_n [n=8, clockwise];     % Get rid of the following edges:     1 -!- 2;     3 -!- 4;     6 -!- 8;     % And make one edge red:     1 --[red] 3;     };          \end{document}      The documentation shows this as the result: ![enter image description here](http://i.stack.imgur.com/EJeaW.png) but I only get an error message:               ! Missing $ inserted.     <inserted text>      $     l.15 }         ;     ?       Am I missing something? Is some other library required in order to get the expected graphs?


title: lstlisting ignores float setting

text: My document starts with:               \begin{document}     \lstset{ %       language=Java,       float=tb     }      However all listings appear exactly just where they have been defined, e.g. this one:               \begin{lstlisting}[label=fig:jaxrs-annotated-resource-example,                        caption={Example of a JAX-RS annotated Resource class (by Marek Potociar)}]     @Path("atm/{cardId}")        public class AtmResource {       `         @GET         @Path("balance")         @Produces("text/plain")          public String balance(@PathParam("cardId") String card,                                @QueryParam("pin") String pin) {             return Double.toString(getBalance(card, pin));         }     \end{lstlisting}      Do you already see sth. wrong or do I need to find a minimal document with this issue? My full document is here: https://github.com/thkoch2001/bachelor- thesis/blob/master/latex/restful_groupware.tex


title: Fleurons and indentations

text: I'm trying to change the indentation settings on my latex documents. ATM, every paragraph is indented by default. I would fill the space of the indentation with a symbol, e.g. a fleuron. Obviously, starting each paragraph with               \noindent     **Symbol** Lorem ipsum...      can be an idea, but I'm looking for a more automatic solution, if it's not too hard to implement. I'm using the style Classicthesis by André Miede, I don't know if this can affect the possible solution in some way. Thanks for your time, Nigredo


title: KOMA-Script: caption, subfig, and captionlabel

text: My problem is best illustrated with an example:               \documentclass{scrreprt}          \usepackage{caption}     \captionsetup[subfigure]{font={sf,md,sl,small}}     \setkomafont{caption}{\itshape\sffamily}     \setkomafont{captionlabel}{\upshape\bfseries\sffamily}     \usepackage{subfig}          \begin{document}     \begin{figure}      \subfloat[Test]{\hskip70pt}\hskip30pt      \subfloat[Test 2]{\hskip70pt}     \caption{Main caption.}     \end{figure}     \end{document}      I wish for the labels `(a)` and `(b)` to render as _(a)_ and _(b)_ as opposed to **(a)** and **(b)**. How can I go about this?


title: Backing up and restoring texlive 2011 (Linux)

text: Is there an easy and safe way to back up and restore an entire texlive installation, e.g. before a fresh OS (re)installation or to put onto another pc (same architecture)? What I have in mind is to simply copy (rsync) my whole texlive directory (~/texlive) to my external HD, i.e. along with my usual home directory backup, then copy it back into my (new) home directory after doing a fresh install of Xubuntu. As far as I know, everything tex-related is in ~/texlive. But I don't know whether tlmgr perhaps has a backup option (for entire texlive installations, not just packages), or if there's a better way. I also don't know if my proposal requires something extra, like updating tlmgr or what.


title: tex4ht: create (dummy) eps images on the fly

text: I am using tex4ht to create a document in HTML and my images are PNG files. For tex4ht I need eps images although in the final HTML page I use original PNG files (see my other question here on tex.se). So the idea is to use a dummy eps image of a certain width and height (the size should not matter, as the final image is replaced anyway). * * * The current situation is the following: for every PNG image, I need an EPS image with the same name, for `htlatex` (DVI mode) to find it. The EPS is never visible to the user, it is only used internally. So IMO it is not really necessary. I would like to avoid the extra steps to create the EPS file and the double disk space (I use a lot of images).


title: Copy sectioning and non-text environments to new file (for presentation)

text: My situation is as follows: I've completed a thesis in LaTeX (`memoir`) and now need to create a presentation for its defense. That means copying all of the document structure from the thesis (including at least some of the figures and equations) into a `beamer` document. Ideally, I'd run a script which would copy a configurable set of non-text elements into a new file and perhaps even put the figures and equations into `beamer` frames. It wouldn't be too hard to selectively comment/uncomment or delete lines by hand (or to write my own script) but it seems like jumping between a presentation and an article is such a common scenario that a toolset would already have been developed to handle it. I'm using TeX-Live (installed January 2012) on Linux.


title: how to link sub-document with reference file for auto-completion in vim-latex?

text: I am writing a long document so I am making use of sub-documents and inserting them with `\include`. The problem I am facing is that as the `\bibliography{}` line is on the main .tex file the sub-documents are not able to 'see' what is in the bibtex file, hence when I run the auto-completion function while editing the sub-document I cannot see the options for citing. If I try the auto-completion function while editing the main.tex file I am able to see all the different options for citing. How can I tell the sub-document to see that bibtex file too?


title: Cite a range of references

text: I have a very long list of citations in my `TeX` file. Rather than each bibliographic key appearing in the list, I would like a range of values, e.g. given               \cite{ref1,ref2,ref3,ref4}      I get               [1,2,3,4]      but would prefer               [1-4].      I am using `TeX` \+ `Eplain` \+ `BibTeX`. Any suggestions? I have tried using a few LaTeX packages (`cite`,`mcite`, and `natbib`), but (unsurprisingly) they all fail to load.


title: How to make an enumerate list with a set margin

text: I simply want to nest lists for answering homework problems with multiple parts as such               \begin{description}      \item[3]      \item[5]     \begin{enumerate}       \item       \item      \end{enumerate}     \end{description}      and to have the nested list all aligned. I can't find a way to do this automatically, and I know the answer may be simple but this is bothering me a lot. My document class is article and I tried using enumitem with no success.


title: Running of ConTeXt along with MiKTeX 2.9 windows8 64bit

text: MikTeX 2.9 is running very well. However, I installed ConTeXt as instructed in the separate drive and specified path. When I tested in the command line I get the following error > C:>context --version E:\context\tex\texmf-win64\bin\mtxrun.lua:14222: C > stack overflow What have I to do to run conTeXt in the same system?


title: Block in column has a too big margin from top

text: I want to use a two-column layout in my slides and place a block in each of these columns. Whenever I do this, the two boxes have a bigger distance from the top than when using a single box without columns. See these two slides: ![Bug](http://i.stack.imgur.com/Pr8ab.png) When not looking closely, one might not recognize the difference but when switching slides it is clearly visible that the distance between the frame- title and the start of the boxes is bigger on the two-column version. Why is this the case? I checked multiple themes, it occured with each of them. I want the two-column version to have the same distance from the top as the one column version. I think the spacing above the two column version is to big. By inserting `\hspace{-0.5cm}` in each of the columns (before the `\begin{block}`) I can achieve what I want but this is very hacky in my opinion. Minimal working example (generating the two slides):               \documentclass[18pt]{beamer}     \usetheme{Frankfurt}          \begin{document}          \begin{frame}[t]{Frame with Columns}      \begin{columns}[t]        \begin{column}{0.4\textwidth}           \begin{block}{Block 1}             Text here           \end{block}         \end{column}         \begin{column}{0.4\textwidth}           \begin{block}{Block 2}             More text here           \end{block}         \end{column}       \end{columns}     \end{frame}          \begin{frame}[t]{Frame without Columns}       \begin{block}{Block}         Even more text here       \end{block}     \end{frame}          \end{document}


title: How to see which package define a particular command/macro?

text: We often encounter multiple definitions of certain commands/macros. Then, we often get the error, e.g.: ! LaTeX Error: Command \P already defined. Or name \end... illegal, see p.192 of the manual. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.225 \newcommand{\P}{{\mathcal P}} When we get such an error, is there anyway to know which package or file predefined that particular command/macro? I'm talking about general cases, not the particular case of '\P' listed above. It is quite cumbersome if we have to go through all possible files via 'grep' manually. I hope that there's a way to see which file already defined the command that produces the conflict/error. Thanks a lot! BVP


title: Automatic frame titles subtitles, with condition

text: I'm trying to set up automatic frame titles and subtitles as follows:   * If a frame has a title or subtitle set (even to `{}`, it is used).   * If subsection title is not empty, use section title as a frame subtitle, and subsection title as a frame title.   * Otherwise, use section title as a frame title, frame does not have a subtitle. Here is a code that I tried (does not follow the first rule above, taken from Automatic frame titles and subtitles). It does not work as expected — with `\subsection*{}` frame title is empty and frame subtitle is set to section title.               \addtobeamertemplate{frametitle}{       \ifx\insertsubsection\empty         \let\insertframetitle\insertsectionhead       \else         \let\insertframetitle\insertsubsectionhead       \fi     }{}          \addtobeamertemplate{frametitle}{       \ifx\insertsubsection\empty       \else         \let\insertframesubtitle\insertsectionhead       \fi     }{}          \makeatletter       \CheckCommand*\beamer@checkframetitle{%         \@ifnextchar\bgroup\beamer@inlineframetitle{}}       \renewcommand*\beamer@checkframetitle{%         \global\let\beamer@frametitle\relax\@ifnextchar%         \bgroup\beamer@inlineframetitle{}}     \makeatother      Any hints?


title: Adding caption and counter to source code environment

text: I have a source code listing with minted environment. How can I make a counter/caption to be shown as follows. ![enter image description here](http://i.stack.imgur.com/GnSQi.png) I also need to make \tableofsourcecode to enlist all the source code references. The used source code environment is `minted`.               \documentclass[article]{memoir}          \usepackage{listings}     \usepackage{xcolor}     \usepackage{textcomp}     \usepackage[T1]{fontenc}     \usepackage{minted}          \begin{document}          \begin{minted}[mathescape,                    linenos,                    numbersep=5pt,                    gobble=0,                    frame=lines,                    framesep=2mm,                    fontsize=\tiny]{java}     public static void main(String[] args) {         try {             Registry r = LocateRegistry.getRegistry();             r.bind("printer", new RemotePrinterImpl());         }         catch (Exception e){             e.printStackTrace();         }     }     \end{minted}          \end{document}