title: How do I get LaTeX / BibLaTeX custom citations to render when converting to docx with Pandoc?

text: I'm writing a manuscript in markdown, and have a goal of getting output in both pdf and docx formats from it. I'm able to create pdf output without issue (using `pandoc` to go from markdown to TeX, and then using `pdflatex` and `bibtex`). With docx, though, I'm having a citations-related issue. Within the manuscript, I'm using several LaTeX citation commands defined in the `apa6` package. These include `\citeA(@bibtex_reference)`, which renders "Last name (Year)," and `\citeyear(@bibtex_reference)`, which renders "(Year)." When `pandoc` renders TeX to docx, it doesn't parse these `apacite`-specific citation commands. It seems to see that they're LaTeX commands, but then doesn't output _anything_ for those citations (to confim, `pandoc` _is_ correctly rendering citations that use the vanilla `\cite()` command). Thus, if I start with Markdown like this: `This conclusion was demonstrated by \citeA(@example), who showed that...` it renders (correctly) in the PDF like this: `This conclusion was demonstrated by So-and-so (2014), who showed that...` and it renders (incorrectly) in the docx like this: `This conclusion was demonstrated by , who showed that...` The `pandoc` command that I'm using to go from TeX to docx is               pandoc "output.tex" \     -t docx \     -s -S \     --bibliography "bibtex_file.bib" \     --csl "apa.csl" \     --reference-odt="reference.odt" \     --data-dir="data_directory" \     -o "output.docx"      I realize that it's not `pandoc`'s job to be able to parse every possible \cite command, but I'm not sure what to do in this case. I've looked both here on StackExchange and on the Pandoc mailing list archives, but haven't found an answer for this particular issue. Using `pandoc`'s `[@reference]` citation notation doesn't seem like a good option to me here, because the `apacite` package allows for more flexibility. If it's not possible to get `pandoc` to parse the custom LaTeX citation commands itself, is there a way to parse the citation commands in LaTeX and then pipe them to `pandoc` somehow? **Edit:** To clarify, here are the `apacite` commands that I'm trying to get to work with docx output (some of them, like `\cite{}`, do work; others, like `\citeA{}`, do not):   * `\cite{smith04}` -> (Smith, 2004)   * `\citeA{smith04}` -> Smith (2004)   * `\citeauthor{smith04}` -> Smith   * `\citeyear{smith04}` -> (2004)   * `\citeyearNP{smith04}` -> 2004   * `\citeNP{smith04}` -> Smith, 2004 I'm open to using the `[@smith04]` Markdown syntax, if it could match these options (in any case, though, I'm still curious about the extra raw citation commands themselves). Does the Markdown syntax have options that match all of these? if not, is there an accessible way to expand it? Thank you!


title: Problem with mdframed and xepersian

text: When i use `mdframed` in latin mode, it works. but when i use package `xepersian` then it dose not show anythings.               \documentclass{article}          \usepackage{mdframed}     \usepackage{xepersian}          \begin{document}          \begin{latin}     \begin{mdframed}     This is test.     \end{mdframed}     \end{latin}               \begin{mdframed}     این یک تست است.     \end{mdframed}          \end{document}      ![enter image description here](http://i.stack.imgur.com/7LXKf.png)


title: how can I display equations in (elsarticle)

text: Equations are not displayed correctly when using               \documentclass[final,5p,times,twocolumn]{elsarticle}      while they are correctly displayed with               \documentclass[preprint,12pt,authoryear]{elsarticle}


title: Sometimes wrong math font in headers when using KOMA's \sectfont with lineno

text: I am using the KOMA-Script scrbook class, and I want to have bold math in my section titles (to match the title text). For this I redefine `\sectfont`, and it works nicely.               \renewcommand{\sectfont}{\bfseries\sffamily\mathversion{bold}}      The section titles in the table of contents and the headers are not changed. However, sometimes I _do_ erroneously get bold math in the headers. I think the problem occurs when the double-page is _just_ full, so that any more text would result in an overflow, and there has to be another section after the current page (so that the next page starts with a section header). Also it only happens when I use line numbers from `\usepackage{lineno}`. **Is lineno incompatible with KOMA-Script? Is there a better way to get bold math fonts in section titles (but not in the TOC and headers)?** I can of course just disable the line numbers as I will with my final document, but this bug makes me suspect I am doing something wrong, and something else might break. Also, I can just stuff `\nolinenumbers` into my `\sectfont` and it seems to work, but if I'm doing something wrong and fragile, then that would be just fixing the symptoms. A MWE is below (compare the top of page 6 with page 4 and 8):               \documentclass[paper=A4,11pt,headsepline,footsepline]{scrbook}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{blindtext}     \usepackage{lineno}          \renewcommand{\sectfont}{\bfseries\sffamily\mathversion{bold}}          \begin{document}           \tableofcontents      \cleardoublepage           \linenumbers          \chapter{Title $xyz$ containing $\chi^2$ math}     \section{Section $A$}     % this double-page is probably not full enough, but     % one more \blindtext will make it overflow     \blindtext\blindtext\blindtext\blindtext     \blindtext\blindtext\blindtext          \section{Section $B$}     % this double-page exhibits the bug.     \blindtext\blindtext\blindtext\blindtext     \blindtext\blindtext\blindtext\blindtext          \section{Section $C$}     % this double-page is identical, but doesn't exhibit the bug,     % since there is no section after it (?)     \blindtext\blindtext\blindtext\blindtext     \blindtext\blindtext\blindtext\blindtext          % uncomment this and the bug appears for section C, too:      %\section{Section $D$}     \end{document}


title: Which typeface free for use with TeX would come closest to the authentic Caslon typeface?

text: Quoting Wikipedia: > Caslon shares the irregularity characteristic of Dutch Baroque types. It is > characterized by short ascenders and descenders, bracketed serifs, > moderately high contrast, robust texture, and moderate modulation of stroke. > The A has a concave hollow at the apex, the G is without a spur. Caslon's > italics have a rhythmic calligraphic stroke. Characters A, V, and W have an > acute slant. The italic p, Q, v, w, and z all have a suggestion of a swash. Adobe Caslon Pro is the typeface used for body text in The New Yorker and is one of the two official typefaces of the University of Virginia. Caslon's types were used in many historic documents, including the U.S. Declaration of Independence. For many years a common rule of thumb of printers and typesetters was _When in doubt, use Caslon._ I am looking for a _"free as in beer"_ analogue. ![specimen of the Caslon typeface](http://i.stack.imgur.com/86uwa.png) ![Adobe Caslon Pro ligatures](http://i.stack.imgur.com/TIVyb.png)


title: Fancy Footnote Rule

text: I am trying to use `tikz` to create a more visually interesting vertical rule to separate the footnotes in my document. Here is my re-definition (code from the `soulpos` package documentation).               \renewcommand{\footnoterule}{%        \kern -3pt\begin{tikzpicture}%        \draw[ color=black, line width=1.5pt, decorate,               decoration= {random steps, segment length=1.5mm, amplitude=.5pt}]               (0,0) -- +(\textwidth,0);         \end{tikzpicture}%         \kern 1.5pt%      }      It seems to correctly align the first footnote rule (horizontally), but all the subsequent lines in the chapter are indented. How do I prevent this behavior?


title: Multiple references on one line of bibliography in LyX 2.0 with revtex4-1

text: The `documentclass revtex4-1` allows multiple citations to appear on the same line in the bibliography. This is accomplished by adding a star next to the citation key [1]:               \cite{bethe, *feynman, *bohr, einstein}      However, can we add stars next to citation keys in LyX's GUI without using ERT (evil red text)? [1] http://d22izw7byeupn1.cloudfront.net/files/revtex/auguide4-1.pdf


title: pdflatex.EXE: Not enough room in an internal buffer

text: I've got a (hopefully) trivial problem. I have a python script that is generating the a .tex file for over 600 figures. The code automatically groups figures in up to 4 subplots depending on some parameters. I ran a brief test script with a reduced number of figures and everything went fine. Then, when running the entire batch of images I get the error: > _geometry_ driver: auto-detecting _geometry_ detected driver: pdftex > [1{C:/Users/ln/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] > ("P:...\Appendix_A.lof") [1] [1]pdflatex.EXE: Not enough room in an internal > buffer. texify: pdflatex failed for some reason (see log file). The log file is useless and has the same info. The script gets the error in the code below:               \begin{figure}[ht]     \subcapcentertrue     \centering         \subfigure[Comparison of percentile concentrations at Location ID 13]{%             \includegraphics[width=0.45\linewidth]{"Biochemical Oxygen Demand 5 Day Un-Diluted_mgL_Percent Saturation Field Dissolved Oxygen_perSAT_13_pp.png"}             \label{fig:subfigure}}         \quad     %     \caption{QQ plots comparing Biochemical Oxygen Demand 5 Day Un-Diluted, mg/L, and Percent Saturation Field Dissolved Oxygen, perSAT.}     \label{fig:figure}     \end{figure}     \clearpage      If I change the includegraphics line to something shorter, like:               \includegraphics[width=0.45\linewidth]{Alkalinity as CaCO3_mgL_pH_pH Units_13_pp.png}      Everything runs fine. I'm starting the file path at C:, so this shouldn't be a windows file path length error. Is there a limitation on the length of an image name in LaTeX that I don't know about? I would ideally like to not regenerate the figures using a different naming convention. Cheers


title: How to strike through obliquely, e.g. to indicate cancellation?

text: How can I strike through an expression (e.g. "2x") obliquely, e.g. from bottom left to top right, so as to indicate cancellation? With the `\sout` command from the `ulem` package, I can only strike horizontally.


title: How to "cut" terms of a expression?

text: > **Possible Duplicate:**   >  How to strike through obliquely, e.g. to indicate cancellation? Like in the image below (see `2x` and `-2x`): ![enter image description here](http://i.stack.imgur.com/8D6SB.png)


title: Showing elimination in the equation

text: I want show solving process. So I have for example `Y=(x-2)y / y =x-2` . I want draw a line over `y` that show as eliminated as problem be solved. How can I do?


title: How to type a slash through a letter?

text: > **Possible Duplicate:**   >  How to strike through obliquely, e.g. to indicate cancellation? How can I type a slash through a letter (specifically an 'R' as in 'not related to') in math mode? Thanks.


title: How to draw 3-junction and 4-junction SQUIDs?

text: **UPDATE** Thanks to John Kormylo I was able to draw a 4-junction SQUID using four components like: ![4-junction squid building block](http://www.tau.ac.il/~suhuvale/squid4elem.png) The whole SQUID ![4-junction squid building block](http://www.tau.ac.il/~suhuvale/squid4jcombined.png) is drawn using the following code               \documentclass{article}     \usepackage{tikz}     \usepackage{circuitikz}`          \newlength{\ResUp} \newlength{\ResDown}     \newlength{\ResLeft} \newlength{\ResRight}     \newlength{\ResLen} \newlength{\ResRadius}     \newlength{\whereamix} \newlength{\whereamiy}          \makeatletter     \def\TikzBipolePath#1#2{\pgf@circ@bipole@path{#1}{#2}}     \def\CircDirection{\pgf@circ@direction}          \pgf@circ@Rlen = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}     \setlength{\ResLen}{\pgf@circ@Rlen}     \makeatother          %%%%%%%%%%%%%%%%%%%%%%% squid4 %%%%%%%%%%%%%%%%%%%%%%%%%     \ctikzset{bipoles/squid4/height/.initial=.6}     \ctikzset{bipoles/squid4/width/.initial=.6}          \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/squid4/height}}     {squid4}     {\ctikzvalof{bipoles/squid4/height}}     {\ctikzvalof{bipoles/squid4/width}}     {     \pgfsetlinewidth{\ctikzvalof{bipoles/thickness}\pgfstartlinewidth}     \pgfextractx{\ResRight}{\northeast}     \pgfextracty{\ResUp}{\northeast}     \pgfextractx{\ResLeft}{\southwest}     \pgfextracty{\ResDown}{\southwest}          \pgfpathmoveto{\pgfpoint{1\ResLeft}{0\ResDown}}     \pgfpatharc{0}{-90}{1\ResLeft}%{\pgfpoint{0cm}{0.8\ResUp}}     \pgfpathmoveto{\pgfpoint{0\ResLeft}{-1\ResDown}}     \pgfpatharc{-90}{-45}{1\ResLeft}          \pgfpathlineto{\pgfpoint{0.35\ResLeft}{0.707\ResUp}}     \pgfpathlineto{\pgfpoint{1.064\ResLeft}{0.707\ResUp}}     \pgfpathmoveto{\pgfpoint{0.707\ResLeft}{-0.35\ResDown}}     \pgfpathlineto{\pgfpoint{0.707\ResLeft}{1.064\ResUp}}     \pgfusepath{draw}        }          \def\mysquidpath#1{\TikzBipolePath{squid4}{#1}}     \tikzset{squid4/.style = {\circuitikzbasekey, /tikz/to path=\mysquidpath, l=#1}}          \begin{document}     \begin{circuitikz}[scale=1]      \draw (1,1) to [squid4, i^>=$I_1$] (-1,-1);      \draw (-1,-1) to [squid4, i^<=$I_1$] (1,1);      \draw (1,-1) to [squid4, i^<=$I_2$] (-1,1);      \draw (-1,1) to [squid4, i^>=$I_2$] (1,-1);      \end{circuitikz} \\     \end{document}      I still have a problem with the 3-junction SQUID. Any help would be appreciated. * * * I am using circuitikz to draw circuit diagrams that contain SQUID magnetometers. The package contains the **squid** symbol for a standard 2-junction SQUID. Using the code: `\documentclass{article} \usepackage{tikz} \usepackage{circuitikz} \begin{document} \begin{circuitikz}[scale=1] \draw (0,1.8) to [squid, l^=$J_1$, i^>=$I_2$] (0,-0.5) (0,1.8) to [squid, l_=$J_2$, i>^=$I_1$] (0,-0.5); \end{circuitikz} \end{document} ` I can draw the SQUID: ![2-junction SQUID](http://www.tau.ac.il/~suhuvale/SQUID2JJ.png) Now, I'd like to draw a 3-junction SQUID like this: ![3-junction SQUID](http://www.tau.ac.il/~suhuvale/SQUID3JJ.png) and a 4-junction SQUID like this: ![4-junction SQUID](http://www.tau.ac.il/~suhuvale/SQUID4JJ.png) How do I draw these symbols?


title: TikZ: "skipping" levels when drawing trees

text: I'm interested in using TikZ to draw rooted trees whose leaves should all be on the same level, pretty much like this: ![alt text](http://i.stack.imgur.com/Z48g4.gif) Please don't pay attention to the fancy style and colours, I'm only interested in having all leaves at the same level. Anyone knows how to do this? I've looked into the manual and the appropriate section on Texample, but had no luck so far. **UPDATE:** a while after this question was answered, I found out about the LaTeX newicktree package, which allows you to draw such trees in an extremely simple way, just by specifying them in the format people in phylogenetics already use. This is obviously much simpler than resorting to TikZ, but thanks anyway to everyone who contributed to helping me.


title: What is wrong with my cyrillic text?

text: This is the document:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T2A]{fontenc}     \begin{document}     This text is in Russian: проверка.     \end{document}      This is what TeXLive on Mac OS says:               This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live/MacPorts 2009_6)     entering extended mode     (./x.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, loaded.     (/opt/local/share/texmf-texlive-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/opt/local/share/texmf-texlive-dist/tex/latex/base/size10.clo))     (/opt/local/share/texmf-texlive-dist/tex/latex/base/inputenc.sty     (/opt/local/share/texmf-texlive-dist/tex/latex/base/utf8.def     (/opt/local/share/texmf-texlive-dist/tex/latex/base/t1enc.dfu)     (/opt/local/share/texmf-texlive-dist/tex/latex/base/ot1enc.dfu)     (/opt/local/share/texmf-texlive-dist/tex/latex/base/omsenc.dfu)))     (/opt/local/share/texmf-texlive-dist/tex/latex/base/fontenc.sty          ! Package fontenc Error: Encoding file `t2aenc.def' not found.     (fontenc)                You might have misspelt the name of the encoding.      What am I doing wrong?


title: How to add a page number on the bottom of the first pages in table of contents, list of figures/tables and bibliography?

text: How to add a page number on the bootom of the first pages in table of contents, list of figures/tables and bibliography?               \tableofcontents     \listoftables     \listoffigures     \bibliography{filename}      Preamble:               \documentclass[12pt,a4paper,oneside]{mwbk}     \usepackage[tableposition=top]{caption}     \usepackage{graphicx}     \usepackage{threeparttable}     \usepackage{polski}     \usepackage{enumitem}     \usepackage{color}     \usepackage[cp1250]{inputenc}     \usepackage{verbatim}     \usepackage{nameref}     \usepackage{natbib}     \usepackage{hyperref}     \usepackage{setspace}     \bibliographystyle{asr}     \bibpunct{[}{]}{;}{a}{}{,}     \fussy     \widowpenalty=10000      \clubpenalty=10000      \addtolength{\textwidth}{1,5cm}     \addtolength{\hoffset}{0cm}     \addtolength{\textheight}{0cm}     \addtolength{\voffset}{0cm}      **EDIT: additional information added previously is not relevant**


title: LaTeX Introductions in languages other than English

text: Inspired by What is the best book to start learning LaTeX?, I thought that it might be useful to collect a list of the many brilliant introductory LaTeX books and tutorials written in languages other than English. I think that such a list could be helpful to many new users. And who would be better to collect such a list than the TEX.SE-community? Please contribute to make the list as complete as possible.


title: Making a (simple) directory tree

text: I'm trying to make a simple directory tree representation in LaTeX. Something like:               spam      |      +-- ham      +-- eggs          |          +-- more spam          +-- dead parrots      The tree won't be that long (say, 10--15 entries or so), with three or so levels, and is a one-off thing. So, quick-and-dirty solutions are welcome. When recommending `tikz`1, please note that I have almost no experience with it, so I'd appreciate a clean simple solution, even if it doesn't look quite perfect. 1 On Tex.SE `tikz` is almost like the `jquery` recurring joke on StackOverflow.. * * * **Edit** : As per Thorsten's suggestion, dirtree is a nice and easy-to-use solution. The example from above could be written as:               \usepackage{dirtree}     ...     \dirtree{%     .1 spam.     .2 ham.     .2 eggs.     .3 more spam.     .3 dead parrots.     }


title: Can I enter code directly from a source file?

text: In a project I'm working, all the files are in the same folder (source codes, papers, images, etc). In the documentation, I'm including some code with `minted` which is really great, but I want to do something like this:               \begin{minted}{c}         \input{main.c}     \end{minted}      I know that won't work, but you can see what I want to do. The reason for this, is because I don't want to update documentation every time I change a source file, do you understand? The idea is to leave main.c as it is, and include that file automatically in the documentation.


title: Error using amsart with algorithmic[x]

text: I use the `algorithm` and `algorithmicx` packages to type algorithms in a paper and my main document class is `amsart`. All is well until I try to use `\listofalgorithms`. This returns a variety of error messages, some of which I've been able to work around thanks to other threads on this website. I am now stuck at the following and here is a (very) minimal working example:               \documentclass{amsart}     \usepackage{algorithmic}     \let\chapter\section               % Conflict fix found on this site.     \usepackage[norelsize]{algorithm}  % [norelsize] fixes another conflict.          \begin{document}     \listofalgorithms                  % This is the problematic command.     \end{document}      This MWE uses `algorithmic` but the same behavior occurs with `algorithmicx`. Running this through pdflatex returns the error               ! Missing } inserted.     <inserted text>                  }     l.7 \listofalgorithms      I'm hoping someone has a hint as to how to fix this. Thanks!


title: LaTeX document in multiple languages

text: > **Possible Duplicate:**   >  Is it possible to keep my translation together with original text? I am working on my resume (CV). I maintain an English and Danish version of it. Right now, this is two separate `.tex` documents. However, I figure there must be a more elegant way of handling multiple language versions of the same document. All the entries and sections in the CV are the same. (same companies, positions, dates) Only the text in each entry is different. I would like to have a switch to flip in the preamble to decide which version to output. How is this done elegantly in LaTeX?


title: How to output multi language documents

text: > **Possible Duplicate:**   >  Whether it's possible to keep translation together with original text? I'm currently writing my CV using the moderncv package and I'm gonna need English and German versions of that. What is the best way to realize this without copy/pasting a lot of the code and so that changes I make to the layout will reflect both output versions?


title: Fake MLA-style bibliography fix?

text: \leftskip0.5in \parindent-0.5in Author. Title. Place: Publisher, Date. Medium.      convincingly fakes the hanging indent of MLA-style bibliography. Is there a way to set this for a region at every new paragraph within the region so as to not have to repeat it at every new entry? At the moment I have this kind of thing going on               \leftskip0.5in \parindent-0.5in Albert, Leonard. “Gnomonology: Joyce’s ‘The Sisters’.” \textit{James Joyce Quarterly} 27.2 (1990): 355–364. PDF.          \leftskip0.5in \parindent-0.5in Aristotle. \textit{The Poetics}. Trans. W. Hamilton Frye. Cambridge: Harvard UP, 1927. Print. Loeb Classical Library 199, Aristotle 23.           \leftskip0.5in \parindent-0.5in Attridge, Derek. “Unpacking the Portmanteau, or Who’s Afraid of \textit{Finnegans Wake}?” \textit{On Puns: The Foundation of Letters}. Ed. Jonathan Culler. Oxford: Blackwell, 1988. 140–155. Print.      and I'd rather just define it once. Thanks!


title: TOC line indent and break problem

text: I have long chapter and section titles in my document, so titles in the table of contents do not fit into one line. I have two problems regarding with this:   1. When the second line starts, i need to indent it to the right a bit, but i do not know how.   2. When a chapter title is too long to fit in one line, the line continues till the margin of the page numbers. I need this line to cut before the page number box, leaving this space empty and continue with the second line. Here is an example:               \documentclass[12pt]{report}      \usepackage{styles/fbe_tez}     \begin{document}        \tableofcontents       \chapter{FORMAT OF DISKETTES/CD CONTAINING COMPUTER SOFTWARE}          Some text here        \section{Table of Contents, List of Figures, List of Tables and List of Symbols/Abbreviations}        Some more text      \end{document}      The style package is provided to me and here is the part relevant to the toc.               %     % Table of Contents     %     \renewcommand\contentsname{TABLE OF CONTENTS}     \renewcommand\tableofcontents{% \ev is used for temporary storage of \parskip     \newlength\ev     \setlength{\ev}{\parskip}     \parskip0pt     % A line as 'TABLE OF CONTENTS' must not appear in the     % Table of Contents. Hence we reproduce the \chapter* here except that     % no entry is put into the toc file.          \clearpage  \global\@topnum\z@          \@afterindenttrue          \begin{center}           { \normalfont            \interlinepenalty\@M            \large \bfseries  \contentsname\par\nobreak            \vskip21pt \vskip0.8\baselineskip           }\end{center}          \@afterheading          \@starttoc{toc}%     \parskip\ev}     %     % FBE style TOC does not have bold lines.     \renewcommand\l@chapter[2]{%       \ifnum \c@tocdepth >\m@ne         \addpenalty{-\@highpenalty}%         \setlength\@tempdima{1.5em}%         \begingroup           \parindent \z@ \rightskip \@pnumwidth           \parfillskip -\@pnumwidth           \leavevmode           \advance\leftskip\@tempdima           \hskip -\leftskip           #1\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep            mu$}\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par           \penalty\@highpenalty         \endgroup       \fi}     %     % The spacing of the TOC lines has been redefined.     \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.em}}     \renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{2.9em}}     \renewcommand*\l@subsubsection{\@dottedtocline{3}{7em}{3.8em}}     \renewcommand*\l@paragraph{\@dottedtocline{4}{11.1em}{4.7em}}     \renewcommand*\l@subparagraph{\@dottedtocline{5}{16.1em}{5.7em}}


title: Removing "Chapter 0" before TOC and Appendix issue

text: I am using the `memoir` class with the `fancyhdr` package for headings. I wanted to lower the size of my headings because of overlapping issues. Here is my tex code               \documentclass[oneside]{memoir}          \setlength\midchapskip{10pt}     \makechapterstyle{VZ23}{     \renewcommand\chapternamenum{}     \renewcommand\printchaptername{}     \renewcommand\chapnumfont{\Huge\bfseries\centering}     \renewcommand\chaptitlefont{\Huge\scshape\centering}     \renewcommand\afterchapternum{%     \par\nobreak\vskip\midchapskip\hrule\vskip\midchapskip}     \renewcommand\printchapternonum{%     \vphantom{\chapnumfont \thechapter}     \par\nobreak\vskip\midchapskip\hrule\vskip\midchapskip}     }\chapterstyle{VZ23}          \usepackage{geometry}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead[LE,LO]{\itshape \nouppercase \rightmark}     \fancyhead[RO,RE]{\itshape \nouppercase Chapter \arabic{chapter}}          \usepackage{lipsum}          \begin{document}          \begin{abstract}     \lipsum[1-3]     \end{abstract}          \newpage          \tableofcontents          \chapter{First Chapter}     \section{Extremely long first section that overlaps}     \newpage     \section{Extremely long second section that overlaps}          \appendix     \chapter{First Appendix}     \section{Lipsum}     \newpage     \section{Lipsum}          \end{document}      This works well but I got two remaining issues :   * At the beginning of my document (before first chapter and toc) I got a annoying "Chapter 0" heading   * I would like to write "Appendix" instead of "Chapter" when hitting chapters after `\appendix`


title: Filling a page with figures

text: I have a text and then a bunch of figures. I would like to fill A page with all the figures so the text would continue AFTER this page. In other words I would need something like this : Page 1 : text Page 2 : Figures (don't want any text) Pages 3 : following of text of Page 1 Thank you in advance !


title: alignment problem under new environment

text: i have defined a new environment called "example"                \newenvironment{ex}{\begin{quote}%         \refstepcounter{examplecounter}%       \textbf{Example \arabic{chapter}.\arabic{examplecounter}}%       \quad     }{%     \end{quote}%     }      However the outcome would be like that               Example 1.2 The function x blah blah blah...(till the right of the page)     *AND it continues here....      What i want is this... the (AND) will align exactly where the "The" words starts in the 1st line...               Example 1.2 The function x blah blah blah...(till the right of the page)                 *AND it continues here....      How can it be done?


title: batch conversion of lyx to pdf

text: Is it possible to "batch" covert lyx documents to pdf? I have more than 250 lyx docs in a folder. I want them in a pdf format. I can do it manually one by one. But there has to be a better way. Hope there is!


title: Forcing new categories in splitbib to start on new pages

text: I use `splitbib` to create a sectioned bibliography in my CV, and I was wondering if there's a way to customize it to force new categories to start on a new page? I'm thinking that I'd have to do something with `\SBtitlestyle`, but I'm not sure what.


title: XML listing shows incorrect quotation marks

text: I'm using \lstinputlisting from listings package to insert an xml file as a listing in my latex file. In the XML file the quotation marks are double quotes as normal when I view my PDF they appear as double closing inverted commas for both the opening and closing. I know that latex requires to use `` and '' for quotation marks but since I'm importing from an XML file, how can I fix this to make them appear normal(so I get proper opening quotation marks)?


title: biblatex: segmented bibliography with name of chapter

text: I am writing a document with chapters where references for each are sectioned in a 'global' bibliography (Using biblatex/biber). I get properly sectioned bibliographies (e.g. 'References for Segment 4'). My question is if instead of saying segment 4 if it could reprint the name of the section/chapter in question (I use a Springer Verlag template, but it could also be memoir--as in the MWE below). The MWE below is, well, working, but if I modify it to include a section label, it breaks with a memory error.               \defbibheading{subbibliography}{\subsection*{References for  Segment~\ref{refsegment:\therefsection\therefsegment}~\currentname}}      here is an excerpt of the log:               {c:/texlive/2013/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2     ]     Package biblatex Info: Reference segment=1 on input line 57.     Package biblatex Info: Setting label 'refsegment:01' on input line 57.     [3] [4     ]     Package biblatex Info: Reference segment=2 on input line 63.     Package biblatex Info: Setting label 'refsegment:02' on input line 63.     [5] [6     ]     Runaway definition?     ->\def \M@currentTitle {References for Segment~\protect \ref {refseg\ETC.     ! TeX capacity exceeded, sorry [main memory size=5000000].      Here is the working example--can I modify this MWE to print the chapter name with each bibliography segment?               \documentclass{memoir}     \usepackage{lipsum}          \usepackage[american]{babel}     \usepackage[utf8]{inputenc}     \usepackage{csquotes}          \makeatletter     \renewcommand{\@chapapp}{Segment}     \makeatother          \usepackage{nameref}            \usepackage[T1]{fontenc}     \usepackage[         backend=biber,         %bibencoding=utf8,         % refsection=chapter,         refsegment=chapter,         url=false,         sorting=none,         sortcites=true,         sorting=nyt,         style=apa         %style=numeric     ]{biblatex}     \DeclareLanguageMapping{american}{american-apa}          \makeatletter     \newcommand*{\currentname}{\@currentlabelname}     \makeatother               % segmented bibliography     \defbibheading{subbibliography}{\subsection*{References for  Segment~\ref{refsegment:\therefsection\therefsegment}}}          \DefineBibliographyStrings{english}{%       references = {Works Cited},     }          \addbibresource{biblatex-examples.bib}          \usepackage[]{hyperref}     \hypersetup{         colorlinks=false,     }               \begin{document}          \author{John Doe}     \title{Bla bla}          \tableofcontents          \chapter{First, there was light}     \label{chapter1}          \lipsum[0-1]     Cite an author not previously cited~\cite{cicero}.     Note: Alphabetcially, K comes before S.     \chapter{Then, there was a power outage}     \label{chapter2}     \lipsum[0-1]     And then again cite some authoprs cited previously~\cite{kastenholz}.     At vero eos et accusam et justo duo dolores et ea rebum~\cite{sigfridsson}.          \printbibheading     % \bibbysection[heading=subbibliography]     \bibbysegment[heading=subbibliography]          \end{document}


title: 'tikz' style arrow tips missing when using tikz-cd crossing over

text: I have been using tikz-cd to create commutative diagrams. I just upgraded to version 0.9b from 0.3c and now there is a problem with the arrow tips. I like to use the 'tikz' solid tips. The following diagram is fine:               \documentclass[11pt]{article}          \usepackage{tikz-cd}     \usetikzlibrary{arrows}          \title{}     \date{}       \tikzset{        commutative diagrams/.cd,        diagrams={>=latex}}          \begin{document}     \begin{tikzcd}[row sep=scriptsize, column sep=scriptsize]      & f^* E_V \arrow[dl] \arrow[rr] \arrow[dd] & & E_V \arrow[dl] \arrow[dd] \\       f^* E \arrow[rr, crossing over] \arrow[dd] & & E \\       & U \arrow[dl] \arrow[rr] & & V \arrow[dl] \\       M \arrow[rr] & & N \arrow[uu, crossing over, leftarrow]\\     \end{tikzcd}     \end{document}      and gives the following output: ![Normal behaviour](http://i.stack.imgur.com/vqKlM.png) However, if I change to solid tips (which take up less room and look better on the rather larger diagram I am really building) by adding an arrow style specification to the tikzset:               \documentclass[11pt]{article}          \usepackage{tikz-cd}     \usetikzlibrary{arrows}          \title{}     \date{}       \tikzset{        commutative diagrams/.cd,        arrow style=tikz,        diagrams={>=latex}}          \begin{document}     \begin{tikzcd}[row sep=scriptsize, column sep=scriptsize]      & f^* E_V \arrow[dl] \arrow[rr] \arrow[dd] & & E_V \arrow[dl] \arrow[dd] \\       f^* E \arrow[rr, crossing over] \arrow[dd] & & E \\       & U \arrow[dl] \arrow[rr] & & V \arrow[dl] \\       M \arrow[rr] & & N \arrow[uu, crossing over, leftarrow]\\     \end{tikzcd}     \end{document}      I now get the following output in which the tips are missing from all lines that use the 'crossing over' feature PLUS the two diagonals from U and V and the horizontal from M to N: ![Arrow tips missing on crossing over lines](http://i.stack.imgur.com/STBt3.png) This behaviour was not exhibited in v.0.3c. Any ideas how to fix it? Thank you.


title: Tabular with horizontal and vertical double line, avoid ugly corner

text: I am using tabular to make simple table, I want to have double line on the sides. The problem is that the double-lines do not meet elegantly at the bottom-right corner: ![badcorner](http://i.stack.imgur.com/ROVCv.png) How can I make the double lines meet in a better what (e.g. forming an double ell shape)? Other environments and packages are welcomed but `tabular` is preferred. Minimal code:               \documentclass[]{article}     \usepackage{array}     \begin{document}     \begin{tabular}{c|c||}     1 & 2 \\     3 & 4 \\     \hline\hline     \end{tabular}     \end{document}


title: Milestone graphic in TikZ

text: > **This question led to a new project:**   >  `timeline` How could I implement a graphic like this in TikZ? ![Milestones](http://owdt.com/wp-content/uploads/2013/06/web-design- milestones.jpg) Several basic requirements:   1. Begin with some arbitrary data input (preferably JSON or CSV) defining the task list, level of effort, and timeline position.   2. Transparency effect used for task bubbles.   3. Description labels placed automatically. Work in progress borrowed from the Skype Example:                   % Timeline         % Author Jake Hertenstein 2014         % http://jakehertenstein.com/         \documentclass{article}         \usepackage{tikz}         \usepackage[active,tightpage]{preview}         \PreviewEnvironment{tikzpicture}              \tikzstyle{task}=[circle,minimum width=20pt,fill opacity=0.5,fill=red]         \tikzstyle{phase}=[circle,minimum width=20pt]         \tikzstyle{legend}=[]         \begin{document}         \begin{tikzpicture}           % Place tasks           \foreach \place/\name in {{(0,0)/a},{(0.5,0)/b},{(1.0,0)/c},{(1.5,0)/d},{(2.0,0)/e}}                 \node[task] (\name) at \place {};            %%%%%%%%           \fill[black] (-.1,-.1) rectangle (2.1,0.1);            % Legends            \node[legend] at (0,-2) {Milestones};            \node[legend] at (3,-2) {Involvement};            \node[legend] at (0,2) {Project Milestones};         \end{tikzpicture}         \end{document}


title: .pdf and .eps files not compiling with our institute's .cls file

text: I am writing my thesis using .cls file provided by my institute.               \documentclass[12pt,ifthen]{iiscthes}     \usepackage{subfigure}     \usepackage{float}     \usepackage{graphics}     \usepackage{graphicx}     \usepackage{longtable}     \usepackage{cite}     \usepackage{array}     \usepackage{lscape}     \usepackage{rotating}     \usepackage{enumerate}     \usepackage{epsfig}     \usepackage{epstopdf}     \usepackage{nomencl}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage[titletoc]{appendix}     \epstopdfsetup{outdir=./}          \begin{document}          \begin{figure}[htbp]         \begin{center}\hspace{10 mm}             \includegraphics[width=105mm,height=70mm]{StressState.pdf}         \end{center}         \caption{fig1}       \end{figure}          \begin{figure}[htbp]         \begin{center}             \includegraphics[width=105mm,height=70mm]{M3tempVsRVst.eps}         \end{center}         \caption{fig2}       \end{figure}          \end{document}      It shows error:               [Loading MPS to PDF converter (version 2006.09.02).]     ) <StressState.pdf, id=1, 597.23125pt x 338.26375pt> <use StressState.pdf> ! Too many }'s.     \color@endbox ->\color@endgroup \egroup           l.35 \end{figure}          ?           ! LaTeX Error: \begin{document} ended by \end{figure}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.35 \end{figure}          ?      ! Extra \endgroup.     <recently read> \endgroup           l.35 \end{figure}          ?      <./M3tempVsRVst-eps-converted-to.pdf, id=2, 634.37pt x 445.665pt>     <use ./M3tempVsRVst-eps-converted-to.pdf>     ! Too many }'s.     \color@endbox ->\color@endgroup \egroup           l.42 \end{figure}          ?           ! LaTeX Error: \begin{document} ended by \end{figure}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.     ...                                                        l.42 \end{figure}          ?      ! Extra \endgroup.     <recently read> \endgroup           l.42 \end{figure}          ?      No file MinWorkingExample.ind.     (./MinWorkingExample.aux) )     No pages of output.     Transcript written on MinWorkingExample.log.      Additional information: If I use "article"document class then it compiles perfectly. Problem comes when I use class file provided by our institute "iiscthes.cls"


title: How to centre my display math overfull hboxes?

text: I have an `overfull hbox` which I've decided to live with. Actually, several. However, since they're in `\\[`…`\\]`, it would look better if they could remain centered, i.e. overflowing the margins equally on both sides, rather than just overflowing to the right. Is it possible to ask LaTeX to do this? (I'm using pdflatex and the `amsbook` class, fwiw.) (Yes, I know overfull hboxes make Donald Knuth cry! But I've considered other options—splitting up these lines of maths, scaling them down a little, changing the document margins, etc—and this seems to me the least worst compromise; so please don't flame me too hard for doing this…)


title: Centering a ragged right text block in ConTeXt?

text: I am trying to typeset a book of poems that I wrote in ConTeXt. Consider the following:               \definehead[PoemTitle][section]     \setuphead[PoemTitle][number=no, page=yes, style=\sc]          \starttext          \PoemTitle{A Silly Whimsy}     \startlines     Some really      poetic lines     are here     and here, these are      deeply moving     \stoplines          \stoptext      This works well for breaking the lines, but the overall positioning on the page is poor, given the short nature of the lines. I am trying to center this text block (not the line) on the page, including the `\PoemTitle` header. The centered text block needs to be able to break over pages. I have been playing with the narrower environment (doesn't move the `\PoemTitle` header with the text block), the `\hbox` command (can't seem to implement anything useful), and the `\defineblock` and `\setupblock` commands. I haven't managed to get useful. Any ideas? _EDIT:_ @Will In LaTeX this gave me the desired result:               \documentclass{memoir}          \renewcommand{\PoemTitlefont}{%     \normalfont\scshape\flushleft% Remove centering from poem title     \hspace*{0.5\linewidth}\hspace*{-0.5\versewidth}}% Makes poem title flush left with body block.          \begin{document}          \settowidth{\versewidth}{Some really deep moving}      \PlainPoemTitle     \PoemTitle{willy nilly}     \begin{verse}[\versewidth]          Some really deep moving\\     lines of poetry\\     here.\\     It is all\\     so moving\\     \end{verse}               \end{document}      @Aditya:I would want to calculate the width of the longest line and choose an offset so that the longest line is in the middle of the text area, as in the LaTeX code above. It might be nice if the calculation of the longest line was automatic.


title: References before appendix

text: My (BiBTeX) references need to appear before my appendix, but my appendix contains new references. These references are flagged as undefined unless my bibliography appears AFTER the appendix. Is there a way to fix this?


title: LaTeX strange new environment definition

text: I'm creating a Beamer presentation and I wanted to change margin size for single slides. I've found a solution on some old mailing list, adapted it a little and it works perfectly, but I have no idea how it works=/               \newenvironment{codemargin}{%       \begin{list}{}{%             \setlength{\leftmargin}{-0.7cm}%             \setlength{\rightmargin}{-0.7cm}%           }%       \item[]}{       \end{list}     }      This creates a new environment that I can use on slides that I want to have smaller margins. Now to the point - what does \item[]}{ mean? I can't find any other examples using similar syntax.


title: How to make a USB LaTeX Stick for OS X?

text: > I want to make a USB Stick with a stand-alone LaTeX for OS X devices. Is there any possibility to doing that? **If yes, how can i do it?** All versions for LaTeX on Mac i found needed a system library to install.


title: portable LaTeX on thumbdrive

text: What is the most common solution to getting TeX on the go. I am looking for a way to fit everything onto a thumbdrive. (up to 8Gb?) It needs to be able to have a text editor and a typesetting system. I tried installing my student-license WinEdt onto a thumbdrive and use MikTeX portable, but this is not compiling things properly. I assume that the typeset system is one of the best available, so assuming that I get the system setup correctly, what other text editors would you recommend? P.S. some systems I work on do no have acrobat. (ie. pdf not supported)


title: Which Lua environment should I use with LuaTeX (LuaLaTeX)?

text: ## Lua code environment I moved on to XeTeX (XeLaTeX) a while ago. I was using pdfLaTeX before that, but now I'm quite comfortable with XeLaTeX. Now, I'd like to use LuaLaTeX to embed Lua in some LaTeX documents. The doc states several ways to embed Lua in TeX, but they confuse me more than actually explain what I need to know about embedding Lua. There's `\directlua{ ... }`, `\luacode ... \endluacode`, and `\begin{luacode} ... \end{luacode}` with the _luacode_ package. The dots (`...`) is where Lua code would go. Now, which one should I use? And is there a quicker way to enter Lua environment like with math mode where I can enter mathmode with '`$`'? ## Saving variables A quick one: When using Lua code embedded in LuaLaTeX, all variables are lost when the code finishes. Now, can I save return values, etc. so I can use them in my document later, with `\myvar` for sinstance, or something?


title: How to control equation labelling in "align" environment?

text: I would like to write something of the form:               \begin{align}       c_1 & = 1 \\       c_2 & = 1 + 2 \\       c_3 & = 1 + 2 + 3  \\       & \; \; \vdots       \end{align}      I would like the first three equations to have "normal" equation numbering, but the last line involving `\vdots` to be _without_ equation numbering. Is this possible?


title: Replicating an environment to another and making changes to original

text: I would like to define a new environment with the name `oldproof` which is basically the `proof` environment and then make changes to the proof environment. I would still like to be able to access the original proof environment using `oldproof`. How do I go about doing this?


title: How to cope with version incompatibilities (i.e. binary units in siunitx)

text: I have to compile my dissertation on two machines with two different TeX Live versions (TeX Live 2009 on Ubuntu 12.04 and now TeX Live 2013 on Ubuntu 14.04). Unfortunately, the siunitx maintainer decided to drop the `alsoload=binary` package option (TeX Live 2009) in favor of the `binary- units=true` option (TeX Live 2013). This means I cannot compile it on both machines without manually removing one or the other option. How can I load such packages in a future-proof manner?


title: Question regarding formatting contents of a cell in a table

text: So I have the table below. It's very ugly how e.g. the contents of the second cell in row two is split. I'd prefer the automatic break to only occur between words -- that is, I don't want it to split any of the words/symbol strings. Is there any way to do this? Thanks a lot.               \documentclass[11pt,a4paper]{book} \setcounter{secnumdepth}{4}     \usepackage{graphicx} \usepackage{gb4e} \usepackage{tipa}     \usepackage{setspace} \usepackage[T1]{fontenc} \usepackage{multirow}     \setcounter{part}{-1} \setcounter{subsection}{0}          \begin{document}          \begin{table}        \begin{center}         \begin{tabular}{ |p{0.18\textwidth}| p{0.18\textwidth}| p{0.18\textwidth} p{0.18\textwidth}|p{0.18\textwidth} |}  \hline  \textbf{S>O} &         \textbf{A'rau} & \textbf{Northern (Zam)} & \textbf{Intermediate(Ba'ro)} &\textbf{Southern (nGora)}\\ \hline  1(>3) & -isratha $\sim$ -sajana & -iriska:ta & -ira:tha & irijatha\\ \hline            \end{tabular}     \end{center}       \caption{Past counterfactual paradigm}       \label{pastCFcompare}       \end{table}          \end{document}


title: Define and set length in one command

text: Sorry this might be a very simple question, I am trying to cleanup a style file, and would like to write a command that basically runs the following code:               \newlength{<name>}\setlength{<name>}{<value>}      Based on another command that runs a `\def`, I though I'd be able to use `expandafter` and `csname` easily; here is what I tried:               \newcommand{\deflen}[2]{%         \expandafter\newlength{%         \csname #1\endcsname}\setlength{%         \csname #1\endcsname}{#2}     }      Unfortunately, this seems to generate an error related to `csname` being already defined. I think it means that I can't use `csname` twice in the same expand, but I don't know how to define the name first, and then use it twice... Help? :)


title: An image side by side in latex

text: I would like to have two figures side by side in my document. I found an example on here with the following code               \begin{figure}     \centering     \begin{minipage}{.5\linewidth}     \centering     \includegraphics[width=.4\linewidth]{image}     \captionof{figure}{A figure}     \label{fig: test1}     \end{minipage}%     \begin{minipage}{.5\linewidth}     \centering     \includegraphics[width=.4\linewidth]{image}     \captionof{figure}{Another figure}     \label{fig: test2}     \end{minipage}     \end{figure}      However when I try to compile it it comes up with the following errors: > template.tex error line 195 Argument of \caption@ydblarg has an extra } > \end{figure} > > template.tex error line 195 Paragraph ended before \caption @ydblarg was > complete \end{figure} How can I fix this to make it work?


title: Two graph - same page? (R/LaTeX)

text: I am using R to create my graph, and I am doing a paper, where I have to put two graph, as showed in the image: ![enter image description here](http://i.stack.imgur.com/Us2hk.png) In R, my output looks like:               y1 <- c(6524, 6701, 6946, 7080, 6920, 6887, 6660, 6746)     y2 <- c(5884, 5749, 6033, 5805, 5643, 5242, 4720, 4324)     x <- c(1, 2, 3, 4, 5, 6, 7, 8)     pdf(file="graph1.pdf",  title="Some", pointsize=7, width=5, height=4, paper="special")     plot(x,y1,type="l",lty="dotted", col="black", ylim = c(4000,7500))     par(new=TRUE)     plot(x,y2,type="l", lty="solid", col="black", ylim = c(4000,7500))      dev.off()          y1 <- c(403, 407, 435, 452, 448, 466, 476, 507)     y2 <- c(844, 934, 950, 1111, 1020, 1058, 1026, 1044)     x <- c(1, 2, 3, 4, 5, 6, 7, 8)     pdf(file="graph2.pdf",  title="Some", pointsize=7, width=5, height=4, paper="special")     plot(x,y1,type="l",lty="dotted", col="black", ylim = c(400,1200))     par(new=TRUE)     plot(x,y2,type="l", lty="solid", col="black", ylim = c(400,1200))     dev.off()      In LaTeX I am using \usepackage{pdfpages} and writing:               \begin{figure}[H]     \centering     \caption{Graph1 and Graph2}     \includepdf[pages=-, scale=0.3]{graph1.pdf}     \includepdf[pages=-, scale=0.3]{graph2.pdf}     \end{figure}      If someone could help me by doing this in R or LaTeX, I would be very happy.


title: Create a Shmoo plot with pgfplots/tikz

text: I'm interested in creating a Shmoo-plot using LaTeX. I have looked through the PGFplot-examples but couldn't find any that looked suitable as a starting template. Google produces nothing as well, and I don't wish to abuse Excel for obvious non-pretty reasons (although it is very easy for this kind of plot). If a Shmoo-plot is unfamiliar to you, it is a two dimensional (presented as such at least) discrete plot looking something like this: ![enter image description here](http://i.stack.imgur.com/5pYSR.jpg) What I want to produce like the image above, although without the pass/fail text. Do you have any suggestions on how I should approach the problem? Sorry if this is a very simple question, I am a beginner in PGFplots and might have missed an easy solution. edit: this is a more accurate image of what I'm trying to reproduce. This is almost exactly the style I'm looking for. ![enter image description here](http://i.stack.imgur.com/DBkKR.png) the input data formatting can be changed to fit any solution, so it is not considered a problem. For example, it can be (x, y, p/f) such as a simple four point set: (1, 10, 1) (1, 11, 0) (2, 10, 1) (2, 11, 0)


title: How to increase the vertical space surrounding mathematical equations?

text: How can I, in a systematic way, increase the vertical space surrounding mathematical equations?               \documentclass{article}     \RequirePackage[ansinew]{inputenc}      \usepackage{amsmath}     \begin{document}     Ah, che bel vivere, che bel piacere, che bel piacere per un barbiere      di qualità, di qualità! Ah, bravo Figaro! Bravo, bravissimo! Fortunatissimo     per verità! Pronto a far tutto, la notte e il giorno sempre d'intorno in giro sta.     \begin{equation}     \frac{(2n)!}{n!^{2}}=\frac{2^{2n}}{\sqrt{\pi}}\frac{\Gamma(n+1/2)}{\Gamma(n+1)}      \end{equation}     Ah, che bel vivere, che bel piacere, che bel piacere per un barbiere      di qualità, di qualità! Ah, bravo Figaro! Bravo, bravissimo! Fortunatissimo     per verità! Pronto a far tutto, la notte e il giorno sempre d'intorno in giro sta.     \vspace*{4pt}     \begin{equation}     \frac{(2n)!}{n!^{2}}=\frac{2^{2n}}{\sqrt{\pi}}\frac{\Gamma(n+1/2)}{\Gamma(n+1)}      \end{equation}          \vspace*{4pt}     Ah, che bel vivere, che bel piacere, che bel piacere per un barbiere      di qualità, di qualità! Ah, bravo Figaro! Bravo, bravissimo! Fortunatissimo     per verità! Pronto a far tutto, la notte e il giorno sempre d'intorno in giro sta.     \end{document}


title: Missing space in biblatex-chicago bibliographies for articles without number entries

text: I'm searching for a fix for a problem with biblatex-chicago's authordate- styled bibliographies. They omit the space between the `volume` and `pages` fields if `article` entries lack a `number` (issue) field. Find a MWE and printout below. Thanks a lot.               \documentclass[american]{article}     \usepackage[utf8]{inputenc}     \usepackage{babel,csquotes}     \usepackage[backend=biber,authordate]{biblatex-chicago}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}       @ARTICLE{adams1887,         author = {Adams, Henry Carter},         title = {Relation of the State to Industrial Action},         journaltitle = {Publications of the American Economic Association},         date = {1887},         volume = {1},         number = {6},         pages = {7--85}         }         @ARTICLE{clark1887,         author = {Clark, John B.},         title = {The Limits of Competition},         journaltitle = {Political Science Quarterly},         date = {1887},         pages = {45--61},         volume = {2}         }     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}     Example.     \nocite{*}     \printbibliography     \end{document}      ![print](http://i.stack.imgur.com/3WBvK.png)


title: How to typeset a continued fraction in the following format?

text: How does one typeset the following continued fraction as shown below? ![enter image description here](http://i.stack.imgur.com/8AwfU.jpg) Source: _Notes on continued fractions and recurrence sequences_ by Alfred van der Poorten. Note: Alf van der Poorten's style is similar to Euler's (in E071). ![enter image description here](http://i.stack.imgur.com/xZBnS.jpg) Source: The Euler Archive, Index Number E71.


title: How can I fix AucTeX's syntax highlighting for the lstlisting environment when using optional arguments?

text: The title really says it all, so I'll provide an example and a screenshot: ![output](http://i.stack.imgur.com/XaE2d.png)               \documentclass{article}     \usepackage{listings}     \begin{document}     For example, if we wished to create a predicate       to determine if a node could mark itself       (considering the \Algorithm{IndSet} problem),       we could put~\autoref{lst:logic:pred-def}     \begin{lstlisting}[     float,     caption={caption}     label={label}     ]     marked = v['marked']     neighbor_marked = any(map(lambda n: n['marked'], N))     return not (marked or neighbor_marked)     \end{lstlisting}     \end{document}      It's worth noting that Emacs can't find the opener for the closing `]`.


title: Constantly have to delete aux.file

text: Everytime I press Typeset, I get a notification of               Runaway argument.          l.30\begin{document}      I read that I would solve it by deleting the aux.file of the document. Any idea what to do? * * * I have tried to find the error by deleting parts of the code, without any result. Even though the document does not contain any actual text, still it reads error. Thus I am left with the prospect that something is wrong in the preamble, which is why I am posting it below:               \documentclass[a4paper, titlepage]{report}          \usepackage[T1]{fontenc}          \usepackage[swedish]{babel}          \usepackage{yfonts}          \usepackage{amsthm}          \usepackage{amssymb,amsmath}          \usepackage{bussproofs}          \usepackage{framed}          \usepackage{enumerate}          \newtheorem{thm}{Sats}[section]          \newtheorem{prop}[thm]{Proposition}          \newtheorem{lem}[thm]{Lemma}          \newtheorem{cor}[thm]{Följdsats}          \newtheorem{ex}[thm]{Övning}          \theoremstyle{definition}          \newtheorem{definition}[thm]{Definition}          \newtheorem{example}[thm]{Exempel}          \theoremstyle{remark}          \newtheorem*{rem}{Anmärkning}          \newtheorem{note}{Kommentar}          \numberwithin{equation}{subsection}          \title{Analys 1 (Övningar)}          \author{-}          \date{\today}     \begin{document}          \end{document}


title: Is it possible to make a pgfplotstable smaller? Reduce spaces and maybe draw vertical lines between columns?

text: My table is too big and won't fit a page, so I wanted it to be a little smaller. Maybe reduce spaces between each column and draw a line instead. Adding               column type/.add={|}{}% results in '|c'      put the vertical lines and the table looked better, but it's still too big. Here's the code, there are more data to it, but I removed some so the code wouldn't be huge:               \documentclass{article}     \usepackage{booktabs}     \usepackage{pgfplotstable}     %\usepackage[paperwidth=35cm]{geometry}          \begin{document}          \pgfplotstabletypeset[      every head row/.style={      before row={\toprule        & &        &\multicolumn{2}{c}{32-2}        &\multicolumn{2}{c}{128-4}        &\multicolumn{2}{c}{256-8}\\       },      after row=\midrule     },     display columns/0/.style={column name={Instance}},     display columns/1/.style={column name={n}},     display columns/2/.style={column name={m}},     display columns/3/.style={column name={Avg. Time.}},     display columns/4/.style={column name={Avg. Qual.}},     display columns/5/.style={column name={Avg. Time.}},     display columns/6/.style={column name={Avg. Qual}},     display columns/7/.style={column name={Avg. Time.}},     display columns/8/.style={column name={Avg. Qual.}},     every last row/.style={after row=\bottomrule},     string type,     header=false     ]     {     hp1.dat    28   4   3.7960  0.9763  5.8166  0.9850  8.0020  0.9895     hp2.dat 35  4   4.0924  0.9673  6.8730  0.9696  9.9091  0.9717     pb1.dat 27  4   3.4976  0.9843  5.2666  0.9890  7.5312  0.9947     pb2.dat 34  4   4.1574  0.9730  7.3916  0.9783  10.5208 0.9812     pb4.dat 29  2   2.9995  0.9996  4.3949  1.0000  6.1613  1.0000     pb5.dat 20  10  2.7515  0.9782  3.6325  0.9820  4.9027  0.9868     pb6.dat 40  30  3.7279  0.9088  5.2931  0.9034  7.5250  0.9093     pb7.dat 37  30  5.9737  0.9894  9.8045  0.9833  14.3086 0.9865     }          \end{document}      Result: ![table](http://i.stack.imgur.com/GAMkM.png)


title: Multibib bibliographies as subsections

text: The reason why I need this modification is that I want to have a general 'Bibliography' section in which all the bibliographies created with `multibib` are included. At the moment my code (narrowed down to a minimal working example) looks like this:               \RequirePackage{filecontents}     \begin{filecontents*}{\jobname.bib}       @BOOK{Doe2013,       title = {The concept of anonymity},       author = {Doe, John},       publisher = {Void},       year = {2013}       }     \end{filecontents*}          \documentclass{article}     \usepackage{multibib}     \newcites{ads}{Advertisments}          \begin{document}     \tableofcontents     \nocite{Doe2013}     \nociteads{Doe2014}     \clearpage     \section*{Bibliography}     \bibliographystyleads{plain}     \bibliographyads{ads}     \renewcommand{\refname}{Books and Articles}     \bibliographystyle{plain}     \bibliography{\jobname}     \end{document}      This (obviously) will create three sections in the end, which is not what I intended for I wish to have one section ("References") with two subsections ("Advertisements" and "Books and Articles"). How can I obtain that the `\bibliography`'ish macros call `\subsection*` instead of `\section*`? ## Addendum Here is a sample `ads.bib`:               @BOOK{Doe2014,       title = {The concept of anonymity 2},       author = {Doe, John},       publisher = {Void},       year = {2014}       }      ## Edit I forgot to mention that I want the bibliographies both automatically added to the TOC.


title: multicolumn display for partial list of table

text: I have a file with some consecutive tables one for each month. The `listoftables` takes up too much space when it lists each table entry on a separate line. I can use `multicols` to have a two column output for the whole list of tables, however I do not want to do this for all the tables. How can I get, say, three column output in the list of table for certain range of tables? The output for list of tables I am trying to get to (preferably first one):               1.1 Table . . . . . . . . . . . . . . . . . . . . . . . . . . . 2     1.2 January . . . 2    1.3 February  . . 2    1.4 March . . . . 2     1.5 April . . . . 3    1.6 May . . . . . 3    1.7 June  . . . . 3     1.8 July  . . . . 3     1.9 More tables . . . . . . . . . . . . . . . . . . . . . . . . 3          1.1 More tables from next chapter . . . . . . . . . . . . . . . 4      or               1.1 Table . . . . . . . . . . . . . . . . . . . . . . . . . . . 2     1.2 January . . . 2    1.5 April . . . . 3    1.8 July  . . . . 3     1.3 February  . . 2    1.6 May . . . . . 3     1.4 March . . . . 2    1.7 June  . . . . 3     1.9 More tables . . . . . . . . . . . . . . . . . . . . . . . . 3          2.1 More tables from next chapter . . . . . . . . . . . . . . . 4      My current hackish solution using `addtocontents` "almost" works but, other than obvious issues with alignment and dot spacing, it is not flexible if I want to switch between two-, three- or four-column layout. And more importantly it is not automatic. Also I am not sure how to suppress the list of table entry for particular table. I tried `caption*` with `caption` package but that did not work. I am guessing it has something to do with `memoir` class. ![Sample output](http://i.stack.imgur.com/eNJxx.png)               \documentclass[oneside]{memoir}     \usepackage{hyperref}     \usepackage{multicol}          \newcommand{\threecoltab}[3]{%     \begin{tabularx}{\linewidth}{XXX} #1 & #2 & #3 \end{tabularx}}          \newcommand{\spaceddotfill}[0]{{} \dotfill \hspace{1.5em}}     \newcommand{\lotcontent}[6]{\noindent%         \hyperref[#2]{#1} \spaceddotfill{} \pageref{#2} \hspace{1em}%         \hyperref[#4]{#3} \spaceddotfill{} \pageref{#4} \hspace{1em}%         \hyperref[#6]{#5} \spaceddotfill{} \pageref{#6} \newline}          \begin{document}          \listoftables     % \begin{multicols}{2}  \listoftables   \end{multicols}          \chapter{Records}     \begin{table}[htp] \caption{Table}       \label{tab:t1} \end{table}     \begin{table}[htp] \caption{January}     \label{tab:m1} \end{table}     \begin{table}[htp] \caption{February}    \label{tab:m2} \end{table}     \begin{table}[htp] \caption{March}       \label{tab:m3} \end{table}     \begin{table}[htp] \caption{April}       \label{tab:m4} \end{table}     \begin{table}[htp] \caption{May}         \label{tab:m5} \end{table}     \begin{table}[htp] \caption{June}        \label{tab:m6} \end{table}     \begin{table}[htp] \caption{July}        \label{tab:m7} \end{table}          \begin{table}[htp] \caption{More tables} \label{tab:t2} \end{table}          \addtocontents{lot}{\noindent         \hyperref[tab:m1]{January}  \spaceddotfill{} \pageref{tab:m1} \hspace{1em}         \hyperref[tab:m2]{February} \spaceddotfill{} \pageref{tab:m2} \hspace{1em}         \hyperref[tab:m3]{March}    \spaceddotfill{} \pageref{tab:m3} \newline}          \addtocontents{lot}{\lotcontent{January}{tab:m1}{February}{tab:m2}{March}{tab:m3}}     \addtocontents{lot}{\lotcontent{April}{tab:m4}{May}{tab:m5}{June}{tab:m6}}     % \addtocontents{lot}{\lotcontent{July}{tab:m7}{}{}{}{}}     \addtocontents{lot}{\noindent         \hyperref[tab:m7]{July}  \spaceddotfill{} \pageref{tab:m7} }          %\addtocontents{lot}{\threecoltab{\hyperref[tab:m1]{January}}{\hyperref[tab:m2]{February}}{\hyperref[tab:m3]{March}}}          \chapter{Data}     \begin{table}[htp] \caption{Table from next chapter} \label{tab:t3} \end{table}          \end{document}


title: NFSS: Is there any further plan about font scheme in LaTeX3?

text: **What will be the place of New Font Selection Scheme (NFSS) in LaTeX3?** NFSS is neither new nor answering to modern trends (I mean True and Open Type fonts). LaTeX3 team has already done huge work but it is facing even bigger work if we want keeping all LaTeX2e's stuff in LaTeX3. Isn't worthy to discuss wheather do we really want to keep Metafont fonts in LaTeX3? UPDATE: Let me rephrase this question as requested by @Leo Liu and @ Mark S. Everitt: **Is there any further plan about font scheme in LaTeX3? And what has been already done?**


title: Help me to write Long LaTeX equations fast with colours and possibly with other aids

text: I am too slow LaTeX-typist, for example with the equations below I cannot find where I am missing some bracket. Could someone offer me some computational method? I use Vim but I am happy with any method you have in hand.               \[     \sum_{n=2}^{\infty}\left( \left(2^{n} \right) 2^{n/k} ln(2^{n})\right)^{-k}=     \sum_{n=2}^{\infty} e^{-k \left(n(1+\frac{1}{k})ln(2)+ln(n)+ln(ln(2)) \right}     \]      **Perhaps related**   1. Videos about writing mathematical expressions in LaTex   2. Typescript terminal recording into video


title: externalization and text export for tikz and pstricks

text: A feature similar to what is offered in Inkscape in terms of font export in figures for subsequent pdflatex/latex use would be a great addition to tikz and pstricks I think. We would then be able to draw all our diagrams/schematics/sketches with these great tools including text, store them as pdf files (without text) and then include them in the main file for compilation with respective text tags. Fonts would then be treated in live during compilation thus avoiding the compilation of all the diagrams/schematics/sketches over and over... Change in fonts in the main document would be easy as well. Does it make sense?


title: Polygon drawn with an offset

text: I'm looking for a more automated way to draw an area _around_ a number of PStricks nodes. The area should be offset by a specific amount so that it will completely contain the vertices inside of it. Here is a minimal example of a polygon that just traces the vertices/nodes: ![enter image description here](http://i.stack.imgur.com/FWvG5.png)               \documentclass{article}     \usepackage{pst-node}% http://ctan.org/pkg/pst-node     \pagestyle{empty}     \begin{document}          \begin{pspicture}(0,0)(10,10)%       \SpecialCoor       % Identify some vertices       \pnode(1;0){c}       \pnode(1;300){g}       \rput{0}([nodesep=1]c){         \pnode(1;60){d}         \pnode(1;0){e}         \pnode(1;-60){f}       }            % Mark area       \pspolygon[fillstyle=solid,fillcolor=black!15,linecolor=black!35,dimen=outer]         (c)(d)(e)(f)(g)            % Mark vertices       \qdisk(c){3pt}       \qdisk(d){3pt}       \qdisk(e){3pt}       \qdisk(f){3pt}       \qdisk(g){3pt}     \end{pspicture}          \end{document}      The `dimen=outer` has no effect (and is used with `\psframe`), but it gives the idea that I'm after, just in a more general setting. From the `pstricks` documentation showing the effect of the `dimen` key-value (section **13 Line styles** p 25): ![enter image description here](http://i.stack.imgur.com/3iZ2I.png) My ideal solution would be something like `offsetsep=5pt`, akin to the `offset` key-value for regular lines (section **31 Node connections** , p 68): ![enter image description here](http://i.stack.imgur.com/WsWZk.png) For example `offsetsep=15pt` will draw a polygon that is offset (outward) by `15pt`, while `offsetsep=-20pt` will draw a polygon that is offset (inward) by `20pt`.


title: Floating point formatting in TeX

text: After long I was exposed to TeX and to a problem that seems to be so simple in traditional languages but surprisingly hard to solve in TeX. We have system out of our scope of control that provides us with numeric inputs to TeX in the common US format, that is dot separator for fractional part and commas separating thousands. We'd like to do basic transformations using `fp` package but it doesn't really support this input. Also, using `\numprint` doesn't seem to be working for us. Is there any easy way how we can strip comma thousand separators off the numbers in TeX before passing it to `fp` for further calculations? It's easy to transform the numbers back using `numprint` afterwards. We could remove one comma but is there an easy way to remove them all?


title: pgfplots: How to move bar labels

text: 2 questions: **1)** How do I move my data labels to the center of my bars? **2)** How do I make the labels be purely data labels, and not cumulative values? eg I want the red bar labels to be the value of that bar not red+blue. ![enter image description here](http://i.stack.imgur.com/1K7J2.png)               \documentclass[tikz,border=12pt]{standalone}     \usepackage{pgfplots}     \usepackage{subfig}     \usepackage{tabularx}     \usepackage{verbatim}     \pgfplotsset{compat=newest}        %\usepgfplotslibrary{external}     %\tikzexternalize     %\documentclass{article}     %\usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \usetikzlibrary{calc,     arrows,decorations.pathmorphing,     backgrounds,fit,positioning,shapes.symbols,chains}     \usetikzlibrary{decorations.pathreplacing}     \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}     %     \begin{document}          \begin{tikzpicture}     \begin{axis}[     ybar stacked,     legend style={at={(0.5,-0.50)},     anchor=north,legend columns=-1},     ylabel={Probability},     symbolic x coords={{Direct Care}, Housekeeping, Mealtimes, {Medication Round},     Miscellaneous,{Personal Care}},     xtick=data,     ymax=1,     x tick label style={rotate=45,anchor=east},     every node near coord/.style={           check for zero/.code={             \pgfkeys{/pgf/fpu=true}             \pgfmathparse{\pgfplotspointmeta-.1}             \pgfmathfloatifflags{\pgfmathresult}{-}{                \pgfkeys{/tikz/coordinate}             }{}             \pgfkeys{/pgf/fpu=false}           }, check for zero, yshift=-5pt, font=\footnotesize},         nodes near coords={\pgfmathprintnumber[precision=2]{\pgfplotspointmeta}},         nodes near coords align={center}     ]     \addplot+[ybar,bar width=20pt] plot coordinates {({Direct Care},0.258883249)     ({Housekeeping},0.176470588)     ({Mealtimes},0.19047619)     ({Medication Round},0.207207207)     ({Miscellaneous},0.222222222)     ({Personal Care},0.615384615)     };     \addplot+[ybar,bar width=20pt] plot coordinates {({Direct Care},0.015228426)     ({Housekeeping},0.235294118)     ({Mealtimes},0)     ({Medication Round},0.027027027)     ({Miscellaneous},0)     ({Personal Care},0.153846154)     };     \addplot+[ybar,bar width=20pt] plot coordinates {({Direct Care},0.152284264)     ({Housekeeping},0.058823529)     ({Mealtimes},0.333333333)     ({Medication Round},0.351351351)     ({Miscellaneous},0.180555556)     ({Personal Care},0.153846154)     };     \legend{{Handwash only},{Gloves only},{Alcohol rub only}}     \end{axis}     \end{tikzpicture}     \end{document}      **EDIT** This code centers the nodes, but makes my data points 10$^3$. How do I get rid of this?               calculate offset/.code={             \pgfkeys{/pgf/fpu=true,/pgf/fpu/output format=fixed}             \pgfmathsetmacro\testmacro{(\pgfplotspointmeta*10^\pgfplots@data@scale@trafo@EXPONENT@y)/2*\pgfplots@y@veclength)}             \pgfkeys{/pgf/fpu=false}         },         every node near coord/.style={             /pgfplots/calculate offset,             yshift=-\testmacro         },         nodes near coords,         nodes near coords align=center      * * * My second question isn't answered in the link provided. I'd appreciate any hints about this


title: Stacked bargraph nodes near coords too bunched up vertically tikz

text: How do I center the coordinates in their bars vertically? This shows horizontally in ybar               \documentclass[tikz,border=12pt]{standalone}     \usepackage{pgfplots}         \pgfplotsset{compat=newest}     \begin{document}          \begin{tikzpicture}     \begin{axis}[     ybar stacked,     legend style={at={(0.5,-0.50)},     anchor=north,legend columns=-1},     ylabel={Probability},     symbolic x coords={{Direct Care}, Housekeeping, Mealtimes, {Medication Round},     Miscellaneous,{Personal Care}},     xtick=data,     ymax=1,     x tick label style={rotate=45,anchor=east},     every node near coord/.style={           check for zero/.code={             \pgfkeys{/pgf/fpu=true}             \pgfmathparse{\pgfplotspointmeta-.1}             \pgfmathfloatifflags{\pgfmathresult}{-}{                \pgfkeys{/tikz/coordinate}             }{}             \pgfkeys{/pgf/fpu=false}           }, check for zero, yshift=3, font=\scriptsize},         nodes near coords={\pgfmathprintnumber[precision=2]{\pgfplotspointmeta}},         nodes near coords align=center     ]     \addplot+[ybar] plot coordinates {({Direct Care},0.258883249)     ({Housekeeping},0.176470588)     ({Mealtimes},0.19047619)     ({Medication Round},0.207207207)     ({Miscellaneous},0.222222222)     ({Personal Care},0.615384615)     };     \addplot+[ybar] plot coordinates {({Direct Care},0.015228426)     ({Housekeeping},0.235294118)     ({Mealtimes},0)     ({Medication Round},0.027027027)     ({Miscellaneous},0)     ({Personal Care},0.153846154)     };     \addplot+[ybar] plot coordinates {({Direct Care},0.152284264)     ({Housekeeping},0.058823529)     ({Mealtimes},0.333333333)     ({Medication Round},0.351351351)     ({Miscellaneous},0.180555556)     ({Personal Care},0.153846154)     };     \legend{{Handwash only},{Gloves only},{Alcohol rub only}}     \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/tnvii.png)


title: Which plotting tool is more likely to stay stable in the basics: MetaPost, PStricks or pgfplots?

text: I have been looking at the three (major ?) tools---MetaPost, PStricks or `pgfplots` for plotting data together with LaTeX. My experience is this:   1. MetaPost code can demand lots of lines for simple codes;   2. Pstricks can necessitate many lines of codes also but it gives more flexibility than MetaPost and can be easier to use;   3. `pgfplots` is very flexible and can require lots of lines if several options are to be included, and most likely this tool will continue evolving fast. I am working on a project where I have a data file and I will keep on adding new data manually every year but without the number of data points getting excessively large. I am currently using MetaPost and I wonder whether my code will still work say in 10 years time. So I am looking for a tool which is robust enough so that changes that will be made will most likely NOT affect basic commands that I am using today. I see that MetaPost and Pstricks have been here for a long time and perhaps will stay stable over the next 10 to 20 years. MetaPost seems to have some troubles handling large numbers and so PStricks seems a better choice for me. Any comments?


title: Include centered full page figure with no margins

text: I have a big figure that takes up a full page. I'd like to include it in my latex document on a separate page, centered horizontally and **vertically**. I managed to put it on a separate page (or it is simply doing that because of the size). Horizontal centering also works using `\centerline`, even though the figure is wider than the text. The only problem left is that I can't center it vertically. No matter what I try it won't let me go over the top margin. I tried `\vspace*{-2cm}` or `${}$\vspace*{-2cm}`, but only the caption was moved (onto the figure..). My current code:               \begin{figure}[p]         \makebox[\linewidth]{             \includegraphics[width=1.3\linewidth]{images/sequence2.pdf}         }         \caption{Sequence diagram}     \end{figure}      **EDIT:** Here is the result (I put a black border around the page, and covered the area of the figure with a gray box). The top margin is slightly larger than the bottom margin. And the figure's caption is below the page number. I'd just like to move the figure and caption up by 1-2 cm. ![enter image description here](http://i.stack.imgur.com/8kGK7.jpg)


title: How to make a row in a table shorter?

text: I have a row of a table (tabular) that has small text (tiny). I would like to make this (first) row shorter, either automatically (automatic height) o̶r̶ ̶m̶a̶n̶u̶a̶l̶l̶y̶ ̶(̶s̶e̶t̶ ̶a̶ ̶n̶o̶n̶-̶d̶e̶f̶a̶u̶l̶t̶ ̶h̶e̶i̶g̶h̶t̶ ̶f̶o̶r̶ ̶t̶h̶a̶t̶ ̶p̶a̶r̶t̶i̶c̶u̶l̶a̶r̶ ̶r̶o̶w̶)̶.̶ I tried different tricks (like using `\\\\[shift]`) with no success. MWE: ![enter image description here](http://i.stack.imgur.com/VzMmj.png)               \documentclass[]{article}     \begin{document}     \begin{tabular}     {|c|c|c|c|}     {\tiny0}&{\tiny1}&{\tiny2}&{\tiny3}\\[-1mm]     \hline 0 & 4.94066e-323 & 22 & 9.78381e+199\\     \hline      \end{tabular}     \end{document}      A simple solution using `tabular` is preferred but elegant solutions using `pgfplotstables` is also welcomed; specially since I have in mind the enumeration of columns (and eventually of rows). Note that similar questions, like How can I reduce table row height? deal with _uniform_ row heights adjustments.


title: Misalignment of \vrule

text: I have been writing my thesis and there is this one problem that I cant seem to figure out why it happens: The following is a segment of the code from my thesis style sheet. This defines the first reader and second reader for my signature page. And I have also attached a output snap of my PDF of the problem. Can someone please tell me why this occurs?               % Signature page     \def\signaturepage{%           \newpage           \thispagestyle{empty} % KS 2009           \begin{center}             \Large\uppercase\expandafter{\@title}           \end{center}           \vspace{.4in}           \centerline{\shortstack[c]{\vrule width 2in height 0.4pt\\                \@author}}           \vfill     %      \vspace{0.15in}     %      \hspace{0in} \rm APPROVED:           \leftline{ Approved:} % KS 2009           \vspace{0.15in}           \rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@adviser}}      %     \vspace{0.15in}            \vfill                \leftline{Committee Members:} % KS 2009      %    \vspace{0.375in}          \vspace{0.15in}           \rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@firstreader}}       %    \vspace{.375in}           \vfill                \rightline{\shortstack[l]{\vrule width 3in height 0.4pt\\ \@secondreader}}       %    \vspace{.375in}           \vfill      This is what I get when I compile. the above code. ![enter image description here](http://i.stack.imgur.com/jhqSC.png)


title: How to generate compounded diacritical fonts for Sanskrit with XeTeX and LuaTeX?

text: I'm trying to use diacritical marks for Sanskrit with a font that does not natively support all the marks (Minion Pro). So they are compounded somehow by XeTeX. This works almost fine in using:               \documentclass{scrartcl}     \usepackage{xunicode,xltxtra}     \usepackage{fontspec,newunicodechar}     \defaultfontfeatures{Ligatures=TeX}     \setmainfont{Minion Pro}          \newunicodechar{Ṛ}{\d{R}}     \newunicodechar{ṛ}{\d{r}}     \newunicodechar{Ṝ}{\={\d{R}}}     \newunicodechar{ṝ}{\={\d{r}}}     \newunicodechar{Ḷ}{\d{L}}     \newunicodechar{ḷ}{\d{l}}     \newunicodechar{Ḹ}{\={\d{L}}}     \newunicodechar{ḹ}{\={\d{l}}}     \newunicodechar{ṃ}{\d{m}}     \newunicodechar{ḥ}{\d{h}}     \newunicodechar{Ṭ}{\d{T}}     \newunicodechar{ṭ}{\d{t}}     \newunicodechar{Ḍ}{\d{D}}     \newunicodechar{ḍ}{\d{d}}     \newunicodechar{Ṅ}{\.{N}}     \newunicodechar{ṅ}{\.{n}}     \newunicodechar{Ṇ}{\d{N}}     \newunicodechar{ṇ}{\d{n}}     \newunicodechar{Ṣ}{\d{S}}     \newunicodechar{ṣ}{\d{s}}          \begin{document}     a  A          ā  Ā          i  I          ī  Ī          u  U          ū  Ū          ṛ  Ṛ          ṝ  Ṝ          ḷ  Ḷ          ḹ  Ḹ          e  E          ai  Ai          o  O          au  Au          ṃ ḥ          k  K          c  C          ṭ  Ṭ          t  T          p  P          kh  Kh          ch  Ch          ṭh  Ṭh          th  Th          ph  Ph          g  G          j  J          ḍ  Ḍ          d  D          b  B          gh  Gh          jh  Jh          ḍh  Ḍh          dh  Dh          bh  Bh          ṅ  Ṅ          ñ  Ñ          ṇ  Ṇ          n  N          m  M          y  Y          r  R          l  L          v  V          ś  Ś          ṣ  Ṣ          s  S          h  H          \end{document}      But the macrons above Ḹ, ḹ, Ṝ, and ṝ are misplaced and thiner than the ones above ā, ī and so on. What can I do about that? Second problem: This fails completely in LuaTeX. xltxtra seems to be essential for this to work. But this is not supported in LuaTeX. I tried this using this code: http://tex.stackexchange.com/a/20791/19458 But the dots below are bigger than the i-dot. This is not the case with the solution above using XeTeX. Any idea how to do this in a better way in LuaTeX? Is it possible at all?


title: What are the best practices for programmatic interaction between LaTeX3 and LaTeX2e?

text: I'm thoroughly enjoying using LaTeX3 for programming my LaTeX stuff and the more I use it, the easier it gets and the more I shudder at returning to LaTeX2e or even pure TeX! But every now and again I find myself needing to interact with LaTeX2e _at the programming level_. As an example, there may be a conditional set by some LaTeX2e package that I want to test in my package written in LaTeX3. I could do this using the LaTeX2e method:               \ifcondition       <stuff>     \else       <other stuff>     \fi      but I don't like that, partly because then I have to remember to worry about `\expandafter`s if I want to ensure that the `\else` and `\fi` don't interfere with the inner code. So I'd rather stick with the LaTeX3 syntax. My current code for the above is:               \prg_new_conditional:Npnn \latex_if:N #1 {p,T,F,TF}     {       \if_meaning:w #1 \iftrue       \prg_return_true: \else: \prg_return_false: \fi:     }      Is this a reasonable approach, or is there a better way? Similarly, (I hope I can get away with two questions here since they are so closely related) how should I interact with LaTeX2e macros? Let's say a package defines a macro `\def\something{This is some text we'll save for later.}` and I want to mess with that using LaTeX3. Am I right in thinking that I should regard is as a token list (`tl`)? Are there any pitfalls to doing so?


title: Drawing a complex transformation using PStricks

text: I'm trying to draw the picture below showing a typical instance of mapping the z point from z plane to w plane by the f(z) transformation. ![the Image which I'm trying to produce via Pstricks](http://i.stack.imgur.com/2Y4mw.jpg) It is almost OK, but when I'm trying to draw the dashed lines I face problems and they are not fixed at my wish points. I have made many changes regarding the axes. I defined a third Cartezian coordinate system for dashed lines, drawing it on the first and second one, changed it's coordinates to many other coordinates, but nothing has been changed. I've also checked the `tug.org` examples. It's all OK when I'm using the straight lines but drawing the dashed curve causes a problem when I do make this change. The code which I'm using is:               \documentclass{article}          \usepackage{pstricks}     \usepackage{pst-plot}          \begin{document}          \psset{xunit=.5cm, yunit=.5cm}     \begin{pspicture}(0,0)(17,5)     \psaxes[labels=none , ticks=none]{->}(0,0)(5,5)     \rput(0,5.2){y}     \rput(5.2,0){x}     \rput(3,2.3){c}     \psbezier[linecolor=blue]{-}(1,1)(3,2)(4,1)(5,3)     \psbezier[linestyle=dashed]{-}(3,3)(6,4)(10,2) %the line which cause me problems     \psdot(1,1)     \rput(1,0.5){$p_{1}$}     \psdot(5,3)     \rput(5,2.3){$p_2$}     \psaxes[labels=none , ticks=none]{->}(12,0)(17,5)     \psbezier[linecolor=blue]{-}(13,1)(15,2)(16,1)(17,3)     \end{pspicture}          \end{document}      and the output of this code is the below picture where the dashed line is not placed at the appropriate coordinates. ![this is the output of the above code ](http://i.stack.imgur.com/4J1PG.jpg) So what should I exactly change in order to gain the right output?


title: TeXnicCenter with MikTeX fails to render many symbols, such as \nsubseteq

text: I am new to LaTeX (sort of) and my fresh installation of TeXnicCenter with MikTeX doesn't recognize many symbols. For example: `\nsubseteq`, `\subseteqq` and `\nsubseteqq` (and the superset counterparts). I've tried exporting both to PDF and DVI.


title: How do I indent the text after the first line in a block of text?

text: I would like the content of the second and following lines of the entries below to indent enough spaces so that they appear after the date. The idea is to make a list of publications easier to read. Maybe a "tab" command? I'm not sure. Thanks.               \documentclass[10pt]{res} % Use the res.cls style, the font size can be changed to 11pt or 12pt here     \usepackage{helvet}      \newsectionwidth{0pt} % Stops section indenting          \begin{document}          11/2012: From chickens to parakeets: How (and why) ghosts from the past possess our birds until today. ``Death, dying, and the Great Beyond'' Conference at the Institute for Paranormal Animal Embodiment – Russian Academy of Sciences, Saint Petersburg, Russia.          11/2012: From chickens to parakeets: How (and why) ghosts from the past possess our birds until today. ``Death, dying, and the Great Beyond'' Conference at the Institute for Paranormal Animal Embodiment – Russian Academy of Sciences, Saint Petersburg, Russia.          \end{document}


title: Directory structure for a large CTAN package upload

text: I'm going to upload my first package to CTAN. But after reading all the upload guides from CTAN and TeXLive I'm still feeling daunted by the directory structure. My package is rather complex and by now consists of >160 files which will become a lot more when the package matures (for example there are a bunch of small pdf files used by the package, along with the sources to recreate them). So I'm far from being able to produce a package with four or five files in one single directory. Do such large numbers of files and changing package contents present special problems for CTAN (and the distros consecutively)? Has best practice for uploading and maintaining such large packages been documented? * * * Details: the package is in good shape, and a few testers fetched it from Github and got it to run without problems. If you want to have a look: the package resides at https://github.com/openlilylib/lilyglyphs **Edit** Right now I'm trying to understand the TDS and how I can prepare a lilyglyphs.tds.zip file. Am I right that I   a) provide the directory as I would use it myself, and when someone downloads from CTAN she will put the complete directory under `texmf/tex/latex/lilyglyphs`   b) provide a `tds.zip` that will allow the distributions to put my files in the right locations in their distribution (that is, the files are stored at different locations)   ? If that's true I still have a few questions about where some of my files should go, but I will come back to this after having tried to tackle the tds documentation.


title: Update TeXstudio portable and keep settings

text: I updated TeXstudio portable 2.6.6 to 2.8.2 by copying the content of the `zip`-file into the existing directory. Unfortunately, all settings, macros etc. were gone when starting the new TeXstudio. How can I update TeXstudio portable without loosing the settings, macros etc?


title: Biblatex - style = alphabetic - change plus sign

text: I use `biblatex` with Biber and `alphabetic` style. In the case your citation has more than three authors this style will put a plus sign (+) in the label. I try to get this plus sign into superscript. Does anyone know how to accomplish this? Just in case you might not exactly know what the `alphabetic` style looks like. For entries with two or three authors it will take the first letter of each authors' surname and put the last two digits of the year behind them. If there are more than three authors the label will carry the first letters of the surnames of the first three authors (EDIT BY LOCKSTEP: only if you set `minalphanames=3`, hereby overriding its default value of 1), put a + for the remaining one and put the last two digits of the year at the end. An example looks like this: >   * A. ASurname, B. BSurname, C. CSurname (2003): Title. > > --> [ABC03] > >   * A. ASurname, B. BSurname, C. CSurname, D. DSurname (2004): Title. > > --> [ABC+04] > >


title: Automatic assignment of references to bibliography categories depending on origdate or date

text: I'm using `biblatex-chicago` with the `author-date` option. I love `biblatex` and `biblatex-chicago` and appreciate the work that has been put into it. I have a small question, however. I usually divide my bibliography into sections using               \DeclareBibliographyCategory{A}      in the preamble and then               \autocite{B}          \AddToCategory{A}{B}      following a citation of B. Now I wonder, if it's possible to have a bibliography category:               \DeclareBibliographyCategory{Before1900}      and have a reference be added automatically to the category `Before1900` if:   1. It has an origdate value and that value is lower than 1900;   2. It has no origdate value but the date value is lower than 1900. I would be interested in such an option since it would enable me to automatically create a split bibliography according to the date a source was written/published.


title: Labels of list items CAPITALIZED + bold style

text: Is there a possibility to make the labels of `description` list items always appear CAPITALIZED and **bold**?


title: Listings: Extract filename (not path to file)

text: I'd like to get just the filename of a text file I'm including using the `listings` package. I use `\lstname`; however, it gives me the full (relative) path to the file. I just want to the filename without the path. Any ideas how to do this? Thanks.


title: How to show the current coordinates for mark=text?

text: In the following example I'm using the library `plotmarks` to set a text on the given path. Now I am interested in showing the current coordinates of the marker instead of `p`.               \documentclass[12pt]{article}     \usepackage{tikz}     \usetikzlibrary{plotmarks}     \begin{document}     \begin{tikzpicture}          \draw[thick,mark=text,     %      text mark=(CURRENT COORDINATE)           ] plot [smooth,] coordinates{                (-0.5,0)(-0.7,-0.75) (1.3,1)                (-1.6,0.8) (-1,0)                  };     \end{tikzpicture}     \end{document}      * * * Now I'm using the provided solution expanded by a precision:               \documentclass[12pt]{article}     \usepackage{tikz}          \usetikzlibrary{plotmarks}     \begin{document}     \begin{tikzpicture}     \draw[thick,mark=text,          text mark={%         \pgfgetlastxy{\x}{\y}%         (\pgfmathparse{\x/28.45274}\pgfmathprintnumber[fixed,precision=0]{\pgfmathresult},% Convert to cm.          \pgfmathparse{\y/28.45274}\pgfmathprintnumber[fixed,precision=0]{\pgfmathresult})% Convert to cm.         }%     ] plot [smooth,] coordinates{                (-0.5,0)(-0.7,-0.75) (1.3,1)                (-1.6,0.8) (-1,0)                  };     \end{tikzpicture}     \end{document}      ![](http://i.stack.imgur.com/GTEox.png)


title: How can I get transparency in beamer compiling with LaTeX in DVI mode?

text: This is a follow-up question to How to make partially transparent beamercolorbox I compiled the code in the answer from Gonzalo Medina, and I noticed the transparency only works with pdflatex. Is there a way to get transparency with latex and dvipdf? In my talk I have a lot of eps pictures and I wouldn't like to have to convert them to png.


title: Create a new math mode

text: # Motivation When I use math mode inside of `itemize` environments for multiline equations, I have to do something like the following               ...     \begin{itemize}       \item $\begin{aligned}[t]         equation stuff       \end{aligned}$       ...     \end{itemize}     ...      # Question How can I wrap the two components `$\begin{aligned}[t]` and `\end{aligned}$` into a new symbol, e.g. `§`? I'd like to write the above example as               ...     \begin{itemize}       \item §equation stuff§       ...     \end{itemize}     ...      It is favorable for the solution to be robust. * * * (It is not required for the new symbol to be `§`.)


title: Export LaTeX to HTML using .gif for equations?

text: I try to make help files for my wxWidgets-based software. wxWidgets supports displaying simple html pages and i use `htlatex` executable tool to convert my `.tex` to `.html`, where equations are rendered as pictures. I learned that i can make `.cfg` file to edit latex4ht's compilation settings. For example i need to convert inline equations to images too and i also would like to have .gif images on output instead of `.png`, so i made this **mycfg.cfg** file:               \Preamble{html}     \begin{document}     \Configure{Picture}{.gif}     \Configure{$}{\PicMath}{\EndPicMath}{}     \Configure{PicMath}{}{}{}{class=’’math’’; align=’’absmiddle’’}     \EndPreamble      And i invoke htlatex like this: `htlatex samplefile.tex "mycfg"`. Everything goes smooth, but there is no `.gif` files. I can see on the end of logs strings like this: > >     l. 90 Writing samplefile.idv[1] (samplefile0x.gif) >     l. 92 Writing samplefile.idv[2] (samplefile1x.gif) >     l. 99 Writing samplefile.idv[3] (samplefile2x.gif) >     l. 104 Writing samplefile.idv[4] (samplefile3x.gif) >   And there is `samplefile.idv` on output, but i do not know how to extract .gifs from .idv files. Also i would like to get rid of CSS on output. Is it possible to get HTML files without CSS? **UPD** : Maybe i'm doing it wrong (trying to get .gif images). Inside the `.log` file i can also read: > --- Note --- for gif bitmaps of pictures, use the 'gif' command line option. > (Character bitmaps are controled only by 'g' records of tex4ht.env and '-g' > switches of tex4ht.c) But i do not know how to include this command-line option. Tried `htlatex myfile "gif"`, it does not work.


title: Babel in ConTeXt(LuaTeX)

text: I am interesting in ConTeXt(LuaTeX) but my biggest problem is that I could not translate a simple program from LuaLaTeX, that uses babel, to a corresponding ConTeXt(LuaTeX) one. The code is the following:               \documentclass[12pt]{article}     \usepackage[polutonikogreek,english]{babel}     \usepackage{luatex}     \usepackage{fontspec}     \setmainfont[ExternalLocation]{TheanoDidot-Regular}     \renewcommand*{\greektext}{}          \begin{document}          \selectlanguage{greek}     ἡ ῥητορική  ἐστιν  ἀντίστροφος  τῇ διαλεκτικῇ:     ἀμφότεραι  γὰρ  περὶ      τοιούτων  τινῶν  εἰσιν  ἃ κοινὰ  τρόπον  τινὰ  ἁπάντων      ἐστὶ  γνωρίζειν        καὶ  οὐδεμιᾶς  ἐπιστήμης  ἀφωρισμένης: διὸ  καὶ      πάντες  τρόπον  τινὰ        μετέχουσιν  ἀμφοῖν: πάντες  γὰρ  μέχρι τινὸς καὶ     ἐξετάζειν καὶ ὑπέχειν      λόγον καὶ ἀπολογεῖσθαι καὶ κατηγορεῖν ἐγχειροῦσιν.          \selectlanguage{english}     Typing in Greek in \LaTeX{} is fun!      \end{document}


title: greek letters and times

text: i'm using palatino and trying to take some greek letters from times or computer modern. i used this command.               \DeclareSymbolFont{greeksymbols}{OML}{ptm}{m}{it}     \DeclareMathSymbol{\pi}{\mathalpha}{greeksymbols}{25}     \DeclareMathSymbol{\chi}{\mathalpha}{greeksymbols}{31}     \DeclareMathSymbol{\mu}{\mathalpha}{greeksymbols}{22}      but it gave nothing: no error and no different output. it gives the same result. a minimal example               \documentclass{article}     \usepackage{mathpazo}     \usepackage{sum}          % i added     %\DeclareSymbolFont{greeksymbols}{OML}{ztmcm}{m}{it}     %\DeclareMathSymbol{\pi}{\mathalpha}{greeksymbols}{25}.....     %in sum.sty file.          \begin{document}          $\alpha \pi \chi \mu \theta $          \end{document}      any suggestion?


title: Is there a way in latex to put hotspots on an image that link to chapters?

text: I would like to insert an overview image (visualizing a timeline) that shows different chapters of a book. When somebody hovers over the image, I would like to show a tooltip ("Go to Chapter 3") that takes you to the respective chapter when you click on it.


title: Equations, autoref and parenthesis

text: In a document at my workplace, `\autoref` is redefined in the following way:               \renewcommand{\autoref}[1]{\cref{#1}}      I suppose this is important because it probably means that I cannot just overwrite `\equationautorefname`. For equations, this results in something like "Equation (5.1)". The parenthis are fine when they are shown next to the equation, but in the text we want them to be displayed without the parenthesis. How can I achieve this?


title: iOS Libraries for LaTeX?

text: I am trying to add support to my app to allow users to type in LaTeX equations and display them within the app. I am not trying to create a LaTeX editing app (this will be one of the features of the app, not the app as a whole), and I'd like to try to find a way to outsource the work of the LaTeX editing and display because I don't see a reason to reinvent the wheel. Are there any libraries for iOS which will either display LaTeX, or that will allow users to easily type in equations? Thanks!


title: pgfplots: Showing tick marks and labels but not axis lines

text: Using `pgfplots`, it's possible to turn on or off printing of axis lines and ticks using `axis lines` for all axes or `axis x line` ( _etc._ ) for only selected axes. However, sometimes it is desirable to print the ticks and labels but not the axis lines themselves. This is a style not dissimilar to those recommended by Edward Tufte (see also Is there a package that provides graphing in the style of Ed Tufte?), but it's useful even if that's not the key concern, for example for making very small plots for abstracts or similar. What is the best way to achieve this?