title: Commonly used arrows with TikZ

text: In a previous question Gonzalo Medina and Peter Grill gave a solution to replace the `\to` arrow by an arrow generated by `TikZ`. For some people using TikZ in commutative diagrams, it would be perhaps desirable to uniformize the tips of some common arrows (`\to`, `\leftarrow`, `\mapsto`,`\rightsquigarrow`,etc.) One can extend Peter Grill's solution in the question above (Gonzalo Medina's solution provides an arrow that resizes, but since arrows other than `\to` are less commonly used in super- or subindices, here the simplest solution is used) to obtain a`\leftarrow` as in the code show bellow. The problem is with the `\mapsto` arrow, for I cannot produce it: its vertical part is too large, as shown in the picture bellow.               \documentclass{article}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}          % Tikz part     %********************************************************************     \usepackage{tikz}     \usetikzlibrary{mindmap,trees}     \usetikzlibrary{arrows,chains,matrix,positioning,scopes}     \makeatletter     \tikzset{join/.code=\tikzset{after node path={%     \ifx\tikzchainprevious\pgfutil@empty\else(\tikzchainprevious)%     edge[every join]#1(\tikzchaincurrent)\fi}}}     \makeatother     %     \tikzset{>=stealth',every on chain/.append style={join},              every join/.style={->}}     \tikzstyle{labeled}=[execute at begin node=$\scriptstyle,        execute at end node=$]     \usepackage{tikz-cd}     \usetikzlibrary{arrows}     \tikzset{     commutative diagrams/.cd,     arrow style=math font,     diagrams={>=stealth}}      %*******************************************************     %redefining the arrows     %*******************************************************     \newcommand{\MyOt}[1][]{\mathbin{\tikz \draw [#1, stealth-] (0,0) (0,0.5ex) -- (1.0em,0.5ex);}}     \newcommand{\MyTo}[1][]{\mathbin{\tikz \draw [-stealth, #1] (0,0) (0,0.5ex) -- (1.0em,0.5ex);}}     \newcommand{\MyMapsto}[1][]{\mathbin{\tikz \draw [|-stealth, #1] (0,0) (0,0.5ex) -- (1.0em,0.5ex);}}          \let\OldTo\to     \let\OldOt\leftarrow     \let\OldMapsto\mapsto     \renewcommand{\to}{\MyTo}%     \renewcommand{\leftarrow}{\MyOt}     \renewcommand{\mapsto}{\MyMapsto}     \newcommand{\where}{\quad\mbox{where}\quad}     %**************************************************           \begin{document}              \begin{align*}     f: A\to B & \quad \rightsquigarrow \quad f^*:A^*\leftarrow B^*\where  f^*:\phi \mapsto \phi\circ f\qquad&\mbox{(with TikZ)} \\     f: A\OldTo B &\quad \rightsquigarrow \quad f^*:A^*\OldOt B^* \!\!\where f^*:\phi \OldMapsto \phi\circ f\qquad &\mbox{(ordinary)}\\     \end{align*}          \end{document}      The result is: ![enter image description here](http://i.stack.imgur.com/wepTM.jpg)


title: Non-italic quote in the quote environment

text: Any idea how to produce a quote in the `quote` environment that's not italicized (using LyX)? I'm trying to create a presentation in `beamer` and can't seem to figure it out.


title: \date command - replacing "Date:" by something else

text: I'm using `\documentclass{amsart}`. In the `tex` file, before `\maketitle` I write `\date{22th october 2012}`, and then I obtain "Date: 22th october 2012." as a result. Using `\date`, I want it to print "London, 22th october 2012.". How can I do that? I tried `\renewcommand{\date}`, but maybe the right thing to do is to change `\the@date`.


title: Glossaries and custom section headings broken

text: I've a document, where I use the glossaries to manage acronyms for me. Sometimes, I use a \gls{} command inside a section heading, and I have defined page headers to have the current section heading. However, when a section heading contains a \gls{} command, the headings for those pages render incorrectly, with what appears to be some code from the glossaries package appearing instead. MWE:               \documentclass[a4paper, 12pt]{report}     \usepackage[toc,xindy,nonumberlist,acronym,shortcuts]{glossaries}     \usepackage{fancyhdr}     \begin{document}     \pagestyle{plain}     \pagestyle{fancyplain}     \renewcommand{\sectionmark}[1]{\markboth{\thesection #1}{}}     \newacronym{ecg}{ECG}{electrocardiogram}     \chapter{test}     \gls{ecg} is ecg     \pagebreak     \section{\gls{ecg}}     waffle here     \end{document}      I should note, I am compiling this with TL2011, but I have also had a friend with TL2013 test it.


title: pstree: How can I force a tree node to one side?

text: I'm drawing some binary search trees using pstricks and pstree, but I don't see anything in the docs to push a node to one side. In a binary search tree, every child must be either right or left, but if there's only one child then pstree will hang it straight down.                  *       / \      *   *     / \  |      should be                  *       / \      *   *     / \   \


title: Put a leading space to a paragraph using texttt

text: This line               ~~Some~~thing      produces two leading spaces before the word 'Some' and the spaces before 'thing'. However,               \texttt{~~Some~~thing}      does not produces the first two spaces (but produces the two spaces between the words). Is there a way to force the leading spaces also when using `\texttt`?


title: A style prevents me from setting \belowcaptionskip, how do I change that?

text: I am writing a paper using the llncs style (Springer lecture notes for computer science). Using the default formatting, the distance between and the caption and the caption and the table is very big, 16 resp. 9 mm onscreen: ![enter image description here](http://i.stack.imgur.com/ykvar.png) The setting shouldn't be like that. Their own example of a text set in the llncs style (using Word) has a much shorter distance. The proceedings of the same conference from previous years are in the same style, and they all have the short distance. My professor, who is on the program committee, agrees that it should have the short distance. Below, the distance from their own example: ![enter image description here](http://i.stack.imgur.com/LP4bE.png) I tried reducing the space above and below the caption using the commands               \addtolength{\belowcaptionskip}{-5pt}     \addtolength{\abovecaptionskip}{-12pt}      but nothing changed at all. Even if I set the distance to ridiculous -100mm, there is absolutely no change to the way my captions look. Using `\setlength` instead of `\addtolength` doesn't help. When I use `article` instead of `llncs` as a document style, the commands work just as intended. So it must be a setting in the llncs package. How do I override the setting, without changing the llncs package? An example for the preamble and a table would be:               \documentclass{llncs}     \usepackage{array}     \usepackage{colortbl}     \usepackage{rotating}     \usepackage{placeins}          \setcounter{secnumdepth}{3}     \addtolength{\textfloatsep}{-3mm}     \addtolength{\belowcaptionskip}{-100pt}     \addtolength{\abovecaptionskip}{-100pt}          \begin{document}     This is some filler text representing      a paragraph above the table     \begin{table}[!htb]          \caption{Examples for requirement the target users preferred}          \label{tab:features_liked}          \begin{center}                  \begin{tabular}{|p{90mm} | p{30mm}|}                  \hline                  Requirement & Relevant value \\                  \hline                   Some requirement & A value \\                  \hline                  Another requirement & Another value \\                  \hline              \end{tabular}          \end{center}     \end{table}     \end{document}


title: Wraparound of tikz pictures in twocolumn layout

text: I am currently typesetting a document in a two column layout. Many text blocks are put into colored boxes, currently implemented with TikZ. This works; however, I have to split the text blocks manually between two columns, otherwise the whole column will move to the second column, as the tikzpicture gets too large. Is there any way to automatically split all nodes of a tikzpicture when the bottom of a column is reached? If not, can I implement this using a theorem package?               \documentclass[twocolumn]{scrartcl}     \usepackage{lipsum}     \usepackage{tikz}          \newcommand\mybox[1]{%       \noindent\begin{tikzpicture}%       \node[rectangle, draw=red!40, fill=red!20, inner sep=10pt] (box){%         \begin{minipage}{0.9\columnwidth}%           #1%         \end{minipage}%       };%       \end{tikzpicture}%     }          \begin{document}     \section{Observe overflow:}     \mybox{\lipsum[1]}     \mybox{\lipsum[3]}          \newpage     \section{Correctly set:}     \mybox{\lipsum[4]}          \end{document}


title: LaTeX Referenz in English

text: Not too long ago, I think it was at the beginning of November, the LaTeX Referenz by Herbert Voß was released for free, but its in German (am not saying its a bad thing). Are there any plans on translating this into English or can anyone do it? It is a very good quick reference and would love to see an English translation. If any one knows where I can get one I would appreciate it. May be Herbert Voß could answer this :-).


title: Big algorithm causing big mess

text: I am writing a document in which I needed to include the description of the Number Field Sieve (NFS) algorithm as mentioned in the book by Crandall and Pomerance. The algorithm's pseudo code is lengthy enough to fill an A4 page, and I am facing the following two problems:   1. The white spaces around the algorithm do not seem to be properly distributed; causing the algorithm to get chopped, instead of naturally proceeding on the next page, meanwhile covering the page number!   2. The arrangement of the contents in previous pages is altered in such an unexpected way; a blank page is left, the sections/subsections look improperly spaced (scattered).              \documentclass{article}     \usepackage{fullpage}     \usepackage{amssymb}        % for some mathematical symbols     \usepackage[format=hang, font=small, labelfont=bf]{caption} % makes the table caption in bold     \usepackage{mathtools}      % for cieling function paranthesis     \usepackage{float}          % for fixing the position of the tables and figures          \usepackage[ruled, vlined, algosection, norelsize]{algorithm2e} % The algorithms writing      \SetAlFnt{\sf} % Set the algorithms font style to sans serif     \begin{document}          \begin{algorithm}[H]     \caption{Number Field Sieve \label{alg:NFS}}     %\DontPrintSemicolon     \SetKwBlock{Setup}{Setup}{}     \SetKwBlock{TheSieve}{The Sieve}{}     \SetKwBlock{TheMatrix}{The Matrix}{}     \SetKwBlock{LinearAlgebra}{Linear Algebra}{}     \SetKwBlock{SquareRoots}{Square Roots}{}     \SetKwBlock{Factorization}{Factorization}{}     \SetAlFnt{\small \sf}     \KwIn{An odd composite number $N$ that is not a power.}     \KwOut{A nontrivial factorization of $N$}     {     \BlankLine     \nl \Setup     {             $d = \left \lfloor 3 \left(\frac{\ln N}{\ln \ln N} \right)^{\frac{1}{3}} \right \rfloor$ \tcp*[r]{This $d$ has $d^{2d^2} < N$.}             $B = \left \lfloor \exp((\frac{8}{9})^{1/3} (\ln N)^{1/3} (\ln \ln N)^{2/3}) \right \rfloor$ \tcp*[r]{Note that both $d$ and $B$ can be tuned to taste.}             $m = \lfloor N^{1/d} \rfloor$\;             Write $N$ in base $m$: $N = m^d + c_{d-1}m^{d-1} + \ldots + c_0$\;             $f(x) = x^d + c_{d-1}x^{d-1} + \ldots + c_0$ \tcp*[r]{Establish the polynomial $f$.}             Attempt to factor $f(x)$ into irreducible polynomials in $\mathbb{Z}[x]$ using the factoring algorithm in \cite{Lenstra et al. 1982} or a variant such as \cite{Cohen 2000}(p. 139)\;             If $f(x)$ has the nontrivial factorization $g(x)h(x)$, return the (also nontrivial) factorization $N = g(m)h(m)$\;             $F(x,y) = x^d + c_{d-1}x^{d-1}y + \ldots + c_0y^d$ \tcp*[r]{Establish the polynomial $F$.}             $G(x, y) = x - my$\;             \For {$(\text{prime } p \leq B)$}             {                     compute the set $R(p) = \{ r \in [0, p-1]: f(r) \equiv 0 \pmod p \}$\;             }             $k =\lfloor 3\lg N \rfloor$\;             Compute the first $k$ primes $q_1, \ldots, q_k > B$ such that $R(q_j)$ contains some element $s_j$ with             $f'(x_j) \not \equiv 0 \pmod {q_j}$ storing the $k$ pairs $(q_j, s_j)$\;             $B' = \sum_{p \leq B}\#R(p)$\;             $V = 1 + \pi(B) + B' + k$\;             $M = B$\;             }             \BlankLine     \nl \TheSieve     {             Use a sieve to find a set $\mathcal{S}'$ of coprime integer pairs $(a, b)$ with $0 < |a|, b \leq M$, and $F(a, b)G(a, b)$ being $B$-smooth, until $\#\mathcal{S}' > V$, or failing this, increase $M$ and try again, or goto      \textrm{\bf Setup} and increase $B$\;     }             \BlankLine     \nl \TheMatrix     {             \tcp*[f]{We shall build a $\#\mathcal{S}' \times V$ binary matrix, one row per $(a, b)$ pair.}             \tcp*[f]{We shall compute $\vec{v}(a - b\alpha)$, the binary exponent vector for $a - b\alpha$ having $V$ bits (coordinates) as follows:}\\             Set the first bit of $\vec{v}$ to $1$ if $G(a, b) < 0$, else set this bit to 0\;             \tcp*[f]{The next $\pi(B)$ bits depend on the primes $p \leq B$: Define $p^\gamma$ as the power of $p$ in the prime factorization of $|G(a, b)|$.}\\             Set the bit for $p$ to $1$ if $\gamma$ is odd, else set this bit to 0\;             \tcp*[f]{The next $B'$ bits are to correspond to the pairs $p, r$ where $p$ is a prime not exceeding $B$ and $r \in R(p)$.}\\             Set the bit for $p, r$ to $1$ if $v_{p, r}(a - b\alpha)$ is odd, else set it to 0\;             \tcp*[f]{Next, the last $k$ bits correspond to the pairs $q_j, s_j$.}\\             Set the bit for $q_j, s_j$ to $1$ if $\left( \frac{a - bs_j}{q_j} \right)$ is $-1$, else set it to 0\;             Install the exponent vector $\vec{v}(a - b\alpha)$ as the next row of the matrix\;     }     \BlankLine     \nl \LinearAlgebra     {             By some method of linear algebra, find a nonempty subset $\mathcal{S}$ of $\mathcal{S}'$ such that             $\sum_{(a, b) \in \mathcal{S}} \vec{v}(a - b\alpha)$ is the $0$-vector $(\bmod{2})$\;     }     \BlankLine     \nl \SquareRoots     {             Use the known prime factorization of the integer square $\prod_{(a, b) \in \mathcal{S}}(a - bm)$ to find a residue $v \mod n$ with $\prod_{(a, b) \in \mathcal{S}}(a - bm) \equiv v^2 \pmod{N}$\;             By the suitable method to find the square root $\gamma$ in $\mathbb{Z}[\alpha]$ of             $f'(\alpha)^2 \prod_{(a, b) \in \mathcal{S}}(a - b\alpha)$, and, via a simple replacement $\alpha \to m$, compute             $u = \phi(\gamma)\pmod{N}$\;     }     \BlankLine     \nl \Factorization     {             return $\gcd((u - f'(m)v), n)$\;     }     }     \end{algorithm}     \end{document}


title: In beamer, how can you use \tableofcontents[hidesubsections] and still render correctly the TOC?

text: Using: pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013) When using the `\tableofcontents` in `beamer`, using the theme `Berkeley`, with the option `[hidesubsections]`, `[hideothersubsections]` and the options to hide subsections, it renders the TOC wrongly. It introduces too much space to separate the section names. The aim is to have a slide before each beginning of a section, with the ToC highlighting the current section and showing its subsections. Given the following Minimal not Working Example(MnWE):                   \documentclass[]{beamer}              \usetheme{Berkeley}              \begin{document}              \AtBeginSection[]{         \frame{         \tableofcontents[currentsection,hideothersubsections]         }         }              \begin{frame}         \tableofcontents[hidesubsections]         \end{frame}              \begin{frame}         \tableofcontents[currenthideallsubsections]         \end{frame}              \begin{frame}         \tableofcontents         \end{frame}              \section{section 1}         \subsection{subsection1}         \begin{frame}         subsection1         \end{frame}         \subsection{subsection2}         \begin{frame}         subsection1         \end{frame}              \section{section 2}         \subsection{subsection1}         \begin{frame}         subsection1         \end{frame}         \subsection{subsection2}         \begin{frame}         subsection1         \end{frame}              \section{section 3}hidesubsections         \begin{frame}         subsection1         \end{frame}         \section{section 4}         \begin{frame}         subsection1         \end{frame}         \section{section 5}         \begin{frame}         subsection1         \end{frame}         \section{section 6}         \begin{frame}         subsection1         \end{frame}         \section{section 7}         \begin{frame}         subsection1         \end{frame}         \section{section 8}         \begin{frame}         subsection1         \end{frame}         \end{document}      It will show the following images for the first, and third slide. The second is the same as the first: The TOC with hidesubsections option and displayed wrongly, too many space to separate section names: ![The TOC with hidesubsections option and too many space to separate section names](http://i.stack.imgur.com/5tMXC.png) The TOC without hidesubsections option, displayed correctly: ![The TOC without hidesubsections option, displayed correctly.](http://i.stack.imgur.com/Vagud.png)


title: LyX as template for automated document generator

text: I used ERT (raw TeX code) in LyX to create PHP template for my documents. When document is exported to LaTeX, this PHP statements are intact and after processing by PHP I get real LaTeX document. So the entire process is this:               LyX  ---export--->  PHP  ---execution--->  LaTeX  ---lualatex--->  PDF.      But including RAW PHP code into template is a bit inpractical while writing the template, since preview feature is broken (PHP is not compatible with LaTeX, obviously). And writing tags is very annoying. But it is working. So, how to do this better? ![example](http://i.stack.imgur.com/Z6rfH.png) (The `tex()` function escapes string for use in LaTeX and prints it.) Thank you.


title: Recursion in math-mode \text

text: Why does this:               $\text{a^b}$      produce this: ![Example output of $\\text{a^b}](http://i.stack.imgur.com/r9PBf.png) Tested here, but my copy of MiKTeX 2.9 (pdflatex) fails with an error.


title: How to redefine itemize for Beamer moderntimeline slide

text: I am preparing a slide for my PhD defense with a list of research stays with some tasks and publications. My question is how to modify the itemize environment to act like in a article template so that the items appear with - and they are squeezed as much as possible to save space. More over how those environment definitions work? Because when integrating this slide with the entire presentation, all the format of the modertimeline gets random and the slide destroied.               \documentclass{beamer}     %\usepackage[german]{babel}     \usepackage[latin1]{inputenc}     \usepackage{xcolor}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{tikz}     \usetikzlibrary{decorations}     \usepackage{textcomp}      \usetikzlibrary{snakes}     \usepackage{ifthen}     \usepackage[firstyear=2009,lastyear=2014]{moderntimeline}          \usepackage{beamerthemesplit}     %\usetheme{PaloAlto}          \makeatletter     % change these colors according to your needs     \colorlet{color0}{blue}     \colorlet{color1}{olive}          \newcommand*{\hintfont}{}     \newcommand*{\hintstyle}[1]{{\hintfont\textcolor{color0}{#1}}}     \newcommand*{\listitemsymbol}{a~}     \newcommand*{\cventry}[7][.25em]{%       \cvitem[#1]{#2}{%         {\bfseries\raggedright #3}%         \ifthenelse{\equal{#4}{}}{}{, \raggedright{\slshape#4}}%         \ifthenelse{\equal{#5}{}}{}{,  \raggedright#5}%         \ifthenelse{\equal{#6}{}}{}{, \raggedright#6}%         .\strut%         \ifx&#7&%           \else{\newline{}\begin{minipage}[t]{\linewidth}\small\raggedright#7\end{minipage}}\fi}}     \newcommand*{\cvitem}[3][.25em]{%       \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%           \raggedleft\hintstyle{#2} & {#3}%       \end{tabular}%       \par\addvspace{#1}}     \tlmaxdates{2009}{2014}     \newlength{\quotewidth}     \newlength{\hintscolumnwidth}     \setlength{\hintscolumnwidth}{0.175\textwidth}     \newlength{\separatorcolumnwidth}     \setlength{\separatorcolumnwidth}{0.025\textwidth}     \newlength{\maincolumnwidth}     \newlength{\doubleitemmaincolumnwidth}     \newlength{\listitemsymbolwidth}     \settowidth{\listitemsymbolwidth}{\listitemsymbol}     \newlength{\listitemmaincolumnwidth}     \newlength{\listdoubleitemmaincolumnwidth}          \setlength{\maincolumnwidth}{\dimexpr0.9\linewidth-\separatorcolumnwidth-\hintscolumnwidth\relax}          \tikzset{         tl@startyear/.append style={             xshift=(0.5-\tl@startfraction)*\hintscolumnwidth,             anchor=base         }     }     \makeatother          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @misc{A01,         author = {Author, A. and Buthor, B. and Cuthor, C.},         year = {2001},         Journal = {Some Conference},         title = {First Article Title Apha AAAAAAAAAAAAA AAA AA AA AA A AAA A A A AAAA}     }          \end{filecontents}          \usepackage     [   style=numeric-comp,                                 autocite=superscript, % apply options here.                                 sortcites,                                 backend=bibtex                             ]{biblatex}     \usepackage{scalefnt,lmodern}          \addbibresource{\jobname.bib}          \begin{document}          \begin{frame}          \tldatelabelcventry{2009.580}{June 2009}{MSc Thesis}{}{}     {}{}{}          \tllabelcventry{2009.583}{2009.833}{July-Sept. 2009}{Research stay}{Some Lab at SomeUniversity}     {Somewhere}{}{     \begin{itemize}     \item task 1     \item task 2     \item More awesome tasks we developed     \end{itemize}     }          \tllabelcventry{2011.500}{2011.995}{June-Dec. 2011}{Research stay}{Some Lab at SomeUniversity}{Seomewhere}{}{}          \tldatelabelcventry{2010.500}{June 2010}{Some Conf. 2010}{}{}     {}{{\scriptsize \fullcite{A01}}}          \end{frame}          \end{document}


title: How can I add annotations to my astroads.bst bibliography?

text: I'm using the AstroADS BibTeX style (link). I would like to add annotations to my bibliography entries for various scientific papers. Is there an easy fix, or is there another style file I could use? Or, is there perhaps a better solution altogether? I definitely like the AstroADS style over the default style, so I want to use something that is at least similar to it -- not the default annotation style. I'm also considering putting annotations in another Section or Chapter rather than the bibliography, similar to this question, except I have no idea what LyX is. Thanks in advance! NOTE: I would be willing to use the APJ BibTeX file instead (link), although I do not like how it automatically inserts page numbers. (I don't want to go back through my references to find out which pages things were on.) NOTE: I'm also interested in making custom keys, as another poster asked (link), but this may be too tricky.


title: ToC entry formatting

text: I'm using the code below to redefine my `\part` style. I want to modify it so that I see "Part I: A Test ... " with \scshape font in the TOC. Right Now, in the TOC I see "I A Test ... ". How should I modify my code?               \documentclass{book}     \usepackage{epigraph}     \usepackage{titlesec}          \makeatletter     \titleformat{\part}[display]       {\Huge\scshape\filright}       {\partname~\thepart:}       {20pt}       {\thispagestyle{epigraph}}     \makeatother     \setlength\epigraphwidth{.6\textwidth}               \begin{document}          \epigraphhead[450]{Fairy tales are more than true: not because they tell us that     dragons exist, but because they tell us dragons can be beaten.\par\hfill\textsc{C.K. Chesterton}}     \part{A Test Part Title}          \end{document}


title: Table too tall for page

text: I have a table that is slightly too tall to fit on the same page as the section header. I would like to know the best way to make the table fit, without affecting margin spacing elsewhere in the document. That is, I'd like the solution to only affect this page, and not others. I would also like to avoid shrinking the table, as I think there is room enough for the table to fit. Here is a minimum working example:               \documentclass[letterpaper,12pt]{article}     \usepackage{geometry}     \geometry{verbose,letterpaper,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}     \usepackage{booktabs}          \begin{document}           \section{Using Unallocated Census Data} \label{app:Unallocated}          %This table fits on the page with the title.          \begin{table}[h]     \caption{Effects of Merit Aid Eligibility, Ages 24 to 32, Omitting Allocated Data}  \label{tab:Unallocated}     \begin{center}     \small     \begin{tabular}{lccccc}          \toprule      & (1) & (2) & (3) & (4) & (5) \\     \midrule     Outcome & & & \multicolumn{2}{c}{Merit \&} & \\     & \multicolumn{2}{c}{All States}  &  \multicolumn{2}{c}{Southern States}  & Merit States \\      \cmidrule(lr){2-3} \cmidrule(lr){4-5}\cmidrule(lr){6-6}                Living In-State & -0.005 & 0.005 & 0.007 & 0.008 & 0.006 \\      & (0.009) & (0.007) & (0.007) & (0.007) & (0.008) \\      \\      Living In-State w/ BA & -0.003 & 0.002 & 0.002 & 0.003 & 0.002 \\      & (0.003) & (0.003) & (0.003) & (0.004) & (0.004) \\      \\      Living In-State w/ Some College & 0.003 & 0.006 & 0.008* & 0.008* & 0.006 \\      & (0.005) & (0.004) & (0.004) & (0.005) & (0.005) \\      \\      BA Degree & -0.003 & -0.001 & -0.001 & -0.002 & -0.002 \\      & (0.003) & (0.003) & (0.003) & (0.003) & (0.003) \\      \\      Some College Attendance & 0.006 & 0.001 & 0.002 & 0.001 & 0.000 \\      & (0.005) & (0.004) & (0.004) & (0.004) & (0.004) \\      \\      Currently Enrolled in College & 0.005*** & 0.003*** & 0.003* & 0.003** & 0.004** \\      & (0.002) & (0.001) & (0.002) & (0.001) & (0.001) \\      \\      Currently Enrolled in College In-State & 0.005** & 0.005*** & 0.003 & 0.006*** & 0.006*** \\      & (0.002) & (0.002) & (0.003) & (0.002) & (0.002) \\      \midrule     $N$ & 5,049 & 5,049 & 2,178 & 2,178 & 1,485 \\      Trend & N & Y & N & Y & N \\          \bottomrule          \end{tabular}       \end{center}     \footnotesize Note:      Includes unallocated 2000 Decennial and 2001-2010 ACS survey data at the state-cohort-year level. The dependent variable is the share of a cohort born in a state and aged 24 to 32 at the time of the survey for whom the designated outcome     is true. Each regression includes state, year, cohort and age fixed effects. Where indicated, the regression also includes a trend in year of birth relative to the year the first treated cohort was born for states with merit aid programs. Regressions are weighted by the number of observations in the given state-cohort-year cell. Standard errors are clustered at the state level. ***, ** and * indicate statistically significant coefficients at the one, five and ten percent levels respectively.      \end{table}          \clearpage          %This Time, the Table doesn't fit           \section{Using Unallocated Census Data} \label{app:Unallocated}          \begin{table}[h]     \caption{Effects of Merit Aid Eligibility, Ages 24 to 32, Omitting Allocated Data}  \label{tab:Unallocated}     \begin{center}     \small     \begin{tabular}{lccccc}          \toprule      & (1) & (2) & (3) & (4) & (5) \\     \midrule     Outcome & & & \multicolumn{2}{c}{Merit \&} & \\     & \multicolumn{2}{c}{All States}  &  \multicolumn{2}{c}{Southern States}  & Merit States \\      \cmidrule(lr){2-3} \cmidrule(lr){4-5}\cmidrule(lr){6-6}                Living In-State & -0.005 & 0.005 & 0.007 & 0.008 & 0.006 \\      & (0.009) & (0.007) & (0.007) & (0.007) & (0.008) \\      \\      Living In-State w/ BA & -0.003 & 0.002 & 0.002 & 0.003 & 0.002 \\      & (0.003) & (0.003) & (0.003) & (0.004) & (0.004) \\      \\      Living In-State w/ Some College & 0.003 & 0.006 & 0.008* & 0.008* & 0.006 \\      & (0.005) & (0.004) & (0.004) & (0.005) & (0.005) \\      \\      BA Degree & -0.003 & -0.001 & -0.001 & -0.002 & -0.002 \\      & (0.003) & (0.003) & (0.003) & (0.003) & (0.003) \\      \\      Some College Attendance & 0.006 & 0.001 & 0.002 & 0.001 & 0.000 \\      & (0.005) & (0.004) & (0.004) & (0.004) & (0.004) \\      \\      Currently Enrolled in College & 0.005*** & 0.003*** & 0.003* & 0.003** & 0.004** \\      & (0.002) & (0.001) & (0.002) & (0.001) & (0.001) \\      \\      Currently Enrolled in College In-State & 0.005** & 0.005*** & 0.003 & 0.006*** & 0.006*** \\      & (0.002) & (0.002) & (0.003) & (0.002) & (0.002) \\      \midrule      \\ % By adding this additional vertical space, we get pushed to the next page.     $N$ & 5,049 & 5,049 & 2,178 & 2,178 & 1,485 \\      Trend & N & Y & N & Y & N \\          \bottomrule          \end{tabular}       \end{center}     \footnotesize Note:      Includes unallocated 2000 Decennial and 2001-2010 ACS survey data at the state-cohort-year level. The dependent variable is the share of a cohort born in a state and aged 24 to 32 at the time of the survey for whom the designated outcome     is true. Each regression includes state, year, cohort and age fixed effects. Where indicated, the regression also includes a trend in year of birth relative to the year the first treated cohort was born for states with merit aid programs. Regressions are weighted by the number of observations in the given state-cohort-year cell. Standard errors are clustered at the state level. ***, ** and * indicate statistically significant coefficients at the one, five and ten percent levels respectively.      \end{table}          \end{document}      As you can see, the first table fits on the page with the section title. There seems to be plenty of space below the table. The second table has one additional line, which I've highlighted in the code. Now, the table and the section title cannot coexist on the same page. In practice, this table will be a part of an entire document, where the margin spacing is fine everywhere else. So, I would like a solution that does not affect the margin spacing globally. If possible, I would not like to affect the size of the visual parts of the table, i.e., the font size, etc., so that it is consistent with the rest of the tables in the document. In other words, I see empty space between the end of the table note and the page number, and I believe some invisible part (bounding box?) of the table is running up against a spacing constraint. I would like to perhaps relax that constraint, without having to actually shrink the visible parts of the table.


title: Beamer image positioning

text: I am trying to place two images side-by-side in a `beamer` document. However, when I compile the document, the image in the right column is forced too low on the page. I am using the `[htp]` options but no variation on these options moves the image. Is there something I am missing?               \begin{frame}{Frame}         \begin{columns}         \begin{column}{0.5\textwidth}             \includegraphics[htb, scale=0.3]{image1}         \end{column}         \begin{column}{0.5\textwidth}             \includegraphics[htb, scale=0.3]{image2}             \vfill         \end{column}         \end{columns}     \end{frame}


title: The multi-line equation with explanation is too wide

text: The original question provides a good answer for how to add explanations to the multi-line equations. However, my problem is that the explanations have too long space to the corresponding equations, so they often extend to the margin of page. How can I narrow the space between the equations and their explanations?


title: How to include symlinked graphics with spaces?

text: I symlink to images and reference the symlink in the code. This works well as long the filename ends in an extension. However, the method I use to create symlinks creates symlinked files with the following filename:               filename.pdf symlink      If I use that filename in `\includegraphics`, in combination with this answer to handle the space, I get the following error:               Unknown graphics extension: .pdf symlink      Is there a way to solve this error, except for renaming the symlinked files?


title: How to specify LaTeX style file precedence when multiple versions (might) exist

text: For example, let's say that a user has an older version of `somepackage.sty` somewhere on their system.               /path/to/install/latex/somepackage.sty      Placing a (possibly different version) `somepackage.sty` in the working directory appears to shadow the system/installed version.               /some/other/dir/myfile.tex     /some/other/dir/somepackage.sty      However, if the preferred version of `somepackage.sty` is not in the local working directory, how can it be specified on the command line? Is it even possible? In the example below, I want to be able to specify the non- system/non-default version of `somepackage.sty`:               /some/path/preferred/package/versions/somepackage.sty     /my/current/project/myfile.tex


title: Glossaries list - no separating lines

text: I am trying to produce a list of acronyms and definitions in which each entry is at some distance from the previous one. Distance of two lines worked out of the box and I am happy with it, but it is not applied to all entries - some entries start on the next line after the previous one ends. I am also seeing a lot of `underfull hbox` warnings, and I think it might have something to do with the space between entries, but I am not sure how to fix the problem. Is there a way to maintain that two lines space between entries even though the spacing between the words somewhat violates the allowed values?               \documentclass[12pt,twoside,a4paper]{book}     \usepackage[xindy,nonumberlist,nopostdot]{glossaries}     \usepackage{tabulary}     \usepackage{setspace}     \usepackage{parskip}     \usepackage{setspace}     \loadglsentries{glossaries}          \makeglossaries     \begin{document}     \glossarystyle{long}     \glsaddall     \printglossaries     \end{document}      The glossaries file:               \newglossaryentry{functesting}     {     name={functional testing},     description={Testing based on an analysis of the specification of the functionality of a        component or system. Performed by black-box testing  techniques.\cite{istqb_glossary}\nopostdesc}     }          \newglossaryentry{regtesting}     {     name={regression testing},     description={Testing of a previously tested program following modification to ensure  that defects have not been introduced or uncovered in unchanged areas of the software, as a result of the changes made. Performed when the software or its environment is changed.\cite{istqb_glossary}\nopostdesc}     }          \newglossaryentry{regtesting2}     {     name={regression testing2},     description={Testing of a previously tested program following modification to ensure that defects have not been introduced or uncovered in unchanged areas of the software, as a result of the changes made. Performed when the software or its environment is changed.\cite{istqb_glossary}\nopostdesc}     }          \newglossaryentry{testauto}     {     name={test automation},     description={See \textit{automated testing}.}     }          \newglossaryentry{sysofsys}     {     name={system of systems},     description={Multiple heterogeneous, distributed systems that are embedded in networks at multiple levels and in multiple interconnected domains, addressing large-scale inter-disciplinary common problems and purposes, usually without a common management structure.\cite{istqb_glossary}\nopostdesc}     }          \newglossaryentry{sysintegrtest}     {     name={system integration testing},     description={Testing the integration of systems and packages; testing interfaces to external organizations.\cite{istqb_glossary}\nopostdesc}     }          \newglossaryentry{CR}     {     name={capture/replay},     description={A type of test execution tool where inputs are recorded during manual testing in order to generate automated test scripts that can be executed later (i.e. replayed). These tools are often used to support automated regression testing.Also known as record/playback, capture/playback.\cite{istqb_glossary}\nopostdesc}     }          \newglossaryentry{RP}     {     name={record/playback},     description={See \textit{capture/replay}.\nopostdesc}     }          \newglossaryentry{CP}     {     name={capture/playback},     description={See \textit{capture/replay}.\nopostdesc}     }


title: get rid of whitespace after postheadhook thmtools

text: I want to get rid of the stupid white space after the `postheadhook` `\newline` (see before _asdasd_ ) in the following example:                   %!TEX TS-program = XeLaTeX     %!TEX encoding = UTF-8 Unicode               % DEFINITIONS ===================================================     \documentclass[         12pt,         a4paper,         twoside,         headings=normal,         titlepage=true     ]{scrreprt}               \usepackage[centertags]{amsmath}     \usepackage[framemethod=TikZ]{mdframed}     \usepackage{amsthm}     \usepackage{thmtools}          \usepackage{lipsum}               \newlength{\spacingtheorem}     \setlength{\spacingtheorem}{2mm}     \declaretheoremstyle[%             headfont=\bfseries,%             notebraces={(}{)},%             bodyfont=\normalfont,%             notefont=\itshape,%             headpunct={:},%             postheadspace=0mm,%             postheadhook={\hspace{0mm}\newline},%{\textcolor{red}{\rule[.6ex]{\linewidth}{0.4pt}}\\},%             spacebelow=0mm,%             spaceabove=0mm,%             mdframed={%               frametitlealignment=\raggedright,%               linecolor=black,%               middlelinewidth=1pt,%               innertopmargin=0.5\baselineskip,%               innerbottommargin=0.5\baselineskip,%               innerleftmargin=10pt,%               innerrightmargin=10pt,%               skipbelow=\dimexpr-\parskip+\spacingtheorem\relax,%               skipabove=\spacingtheorem,%               font=\upshape%             }%     ]{myFramedTheoremStyle}%          \declaretheorem[         style=myFramedTheoremStyle,         name=Theorem,         numberwithin=chapter     ]{theorem1}          \declaretheorem[         style=myFramedTheoremStyle,         name=Definition,         numberwithin=chapter     ]{example1}          % Basic Command     \ExplSyntaxOn         \NewDocumentEnvironment{example} { o o }          {%           \IfNoValueTF{#1} {\begin{example1}}{ \begin{example1}[#1] }%                                            \IfNoValueTF{#2} {}{\label{#2}}%          }%          {%           \end{example1}%          }%     \ExplSyntaxOff                    \begin{document}     \raggedbottom          \setlength{\parskip}{0mm}     \setlength{\parsep}{0mm}     \setlength{\parindent}{0mm}     \lipsum[1]     \begin{example}[asd][asd]     asdasd     \end{example}     \lipsum[1]     \end{document}        **How can I achieve this?** ![enter image description here](http://i.stack.imgur.com/Knzs0.png)


title: Framed mdtheorem with qed symbol at the end

text: I'm trying to include a `$\blacktriangle$` at the end of a framed environment using the `mdframed` package. However, my code is somehow not working properly. Let me explain what I'm doing:               \documentclass[12pt,twoside]{report}     \usepackage[brazil]{babel}      \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{fouriernc}     \usepackage[margin=2cm]{geometry}      \usepackage{amsmath,amsthm,amssymb}     \usepackage{thmtools}     \usepackage{tikz}     \usepackage[framemethod=TikZ]{mdframed}          \declaretheoremstyle     [     spaceabove=0pt, spacebelow=0pt, headfont=\normalfont\bfseries,     notefont=\mdseries, notebraces={(}{)}, headpunct={\newline}, headindent={},     postheadspace={ }, postheadspace=4pt, bodyfont=\normalfont, qed=$\blacktriangle$     ]{mystyle}          {\theoremstyle{mystyle}     \newmdtheoremenv[%     outermargin = 1.3cm , %     leftmargin = 0pt , rightmargin = 0pt , %     innerleftmargin = 5pt , innerrightmargin = 5pt , %     innertopmargin = 5pt, innerbottommargin = 5pt , %     backgroundcolor = blue!10 , %     align = center , % align the environment itself (left, center, rigth)     nobreak = true, % prevent a frame from splitting     hidealllines = true , %     topline = true , bottomline = true , %     splittopskip = \topskip , splitbottomskip = 0pt , %     skipabove = 0.5\baselineskip ,  skipbelow = 0.3\baselineskip]     {example}{Exemplo}[chapter]}          \begin{document}     \section{Introduction}     Lorem ipsum sed nulla id risus adipiscing vulputate.          \begin{example}     Um consumidor financiou a compra de um veículo pagando 48 parcelas de \$800,00 mensais e a taxa de juros cobrada pela concessionária foi de 1,2\% a.m.. Qual era o valor à vista do automóvel adquirido?     \newline     \textbf{Solução:}     \newline     $PV = 800 \times \left[ \dfrac{1,012^{48}-1}{1,012^{48}\times 0,012} \right] \newline     PV = 800 \times \left[ \dfrac{0,772820}{0,021274} \right] \newline     PV = \$29.061,79$     \end{example}          Lorem ipsum sed nulla id risus adipiscing vulputate.     \end{document}      I've done lots of attempts and I had no success so far in putting the `$\blacktriangle$` at the end of my `mdframed` framed environment. That's what I'm getting so far: ![enter image description here](http://i.stack.imgur.com/ib7cX.jpg) Could someone give me a hint of what I'm doing wrong?


title: Problem with lettergothic package in LaTeX/TeXLive

text: I'm trying to use the lettergothic package in LaTeX for the Letter Gothic monospaced font. According to the LaTeX Font Catalog, it would be simple to use it with               \usepackage[scaled]{ulgothic}     \usepackage[T1]{fontenc}      but, for some reason it does not work. After compiling (with `pdflatex`) I get this message (the last lines):               kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+12/600 --dpi 612 ulgb8rmktexpk: don't know how to create bitmap font for ulgb8r.     kpathsea: Appending font creation commands to missfont.log.          !pdfTeX error: pdflatex (file ulgb8r): Font ulgb8r at 612 not found      ==> Fatal error occurred, no output PDF file produced!          LaTeX exited abnormally with code 70 at Wed Aug 15 00:46:57      I can't understand why this is happening since I have all the files installed on my system. I've installed all nonfree fonts (which Letter Gothic belongs) with               $ sudo getnonfreefonts-sys -a      and `sudo updmap-sys` and `sudo texhash`. All the files are where they were supposed to be. I'm using Ubuntu 12.04 with `texlive` and with both `texlive-fonts- recommended` and `texlive-fonts-extra` The location path for the files are (summarizing):               $ sudo find / -iname ulg*     /usr/local/share/texmf/tex/latex/ulg/ulgothic.sty     /usr/local/share/texmf/fonts/vf/urw/lettrgth/ulgb*.vf     /usr/local/share/texmf/fonts/afm/urw/lettergothic/ulgb*.afm     /usr/local/share/texmf/fonts/map/dvips/ulg/ulg.map     /usr/local/share/texmf/fonts/tfm/urw/lettrgth/ulgb*.tfm     /usr/local/share/texmf/fonts/type1/urw/lettergothic/ulgb*.pfb      The path for `pdftex.map` is               $ kpsewhich pdftex.map     /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map


title: Use TeXShop Preview window when different output-dir is set

text: In TeXShop, under Preferences -> Engines I have modified the LaTeX command by adding `-output-dir=/tmp`. All of my auxiliary and final output files end up in this directory instead of where my source file is. That's what I want and this currently works. However, when output-dir is set as anything, the output pdf does not open in the TeXShop Preview window following a successful typeset. I can open the pdf manually from /tmp with another pdf viewer. Also, the **Window-> Source <=>Preview** menu item does nothing. Is there anyway to restore the automatic Preview functionality in combination with a different output directory?


title: Easy way to find the location of a compilation error?

text: When I compile my project with pdflatex, I get to see at which line the error has occurred, but the file is it claims the error has occurred in is incorrect since it always just says that it has occurred in the main .tex file, while it really has occurred in some other file. Double clicking on the error, which normally takes you straight to the problematic code line, is therefore useless. Why does pdflatex behave like this? Does anyone have a suggestion for what I can do to find the line that actually has caused the error, so I can know what pdflatex is complaining about?


title: Generate Author/Year Index Using biblatex and imakeidx

text: Based on this question/answer Automatically indexing references by author and year, I am trying to create an index of all my entries in the bibliography database. For that I am using `biblatex` to handle bibliography and `imakeidx` for the index, but I cannot put it to work. The `MWE` is below:               \documentclass[%         a4paper,         english,         11pt,     ]{article}          \usepackage{filecontents}     \begin{filecontents*}{\jobname.bib}     @article{Padial:2010,         title={The integrative future of taxonomy},         author={José M.~Padial and Aurélien Miralles and Ignacio De la Riva and Miguel Vences},         journal={Frontiers in Zoology},         year=2010,         month=may,         volume=7,         number=16,         pages={1--14},         doi={10.1186/1742-9994-7-16},         issn={1742-9994},         keywords={biology, taxonomy},     }     \end{filecontents*}          \usepackage{fixltx2e}     \usepackage{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{type1ec}     \usepackage{microtype}          \usepackage{csquotes}     \usepackage[style=authoryear,indexing,backend=biber]{biblatex}     \addbibresource{\jobname.bib}          \usepackage{imakeidx}     \makeindex[name=authors,title=Authors Index,columns=1]     \makeindex[name=years,title=Years Index,columns=1]          \makeatletter     % For the "years" index, we redefine the ordinary bibmacro     % which indexes titles, so that it indexes into the years     % index instead     \renewbibmacro*{index:title}[2]{%       \iffieldundef{year}          {\usebibmacro{index:years}%           {\index}%           {\undated}%           {\thefield{indexsorttitle}}%           {\thefield{entrykey}}}         {\usebibmacro{index:years}%           {\index}%           {\thefield{year}}%           {\thefield{indexsorttitle}}%           {\thefield{entrykey}}}}          \newbibmacro*{index:years}[4]{%         \begingroup          \protected@edef\theindexentry{%           \unexpanded{#1}\yearsindex{#2!#3\actualoperator\unexpanded{\citefield}{#4}{indextitle}}}%          \theindexentry          \endgroup}          % For authors we just redefine the field format (so that it     % includes title and year information     \DeclareIndexNameFormat{default}{%       \iffieldundef{year}         {\usebibmacro{index:name}%           {\index}%           {#1}%           {#3}%           {#5}%           {#7}%           {\thefield{indexsorttitle}}%           {\thefield{entrykey}}%           {}}        {\usebibmacro{index:name}%           {\index}%           {#1}%           {#3}%           {#5}%           {#7}%           {\thefield{indexsorttitle}}%           {\thefield{entrykey}}%           { (\thefield{year})}}}     % ... and modify the relevant bibmacro to add the extra information     \renewbibmacro*{index:name}[8]{%       \begingroup       \ifuseprefix         {\protected@edef\theindexentry{%            \unexpanded{#1}\authorsindex{%              \ifblank{#4}{}{#4 }%              \@firstofone #2% remove spurious braces              \ifblank{#5}{}{ #5}%              \ifblank{#3}{}{, #3}%              \actualoperator              \ifblank{#4}{}{\MakeCapital{#4} }%              #2%              \ifblank{#5}{}{ #5}%              \ifblank{#3}{}{, #3}!#6                 \actualoperator\unexpanded{\citefield}{indextitle}#8}}}%         {\protected@edef\theindexentry{%            \unexpanded{#1}\authorsindex{%              \@firstofone #2% remove spurious braces              \ifblank{#5}{}{ #5}%              \ifblank{#3#4}{}{,}%              \ifblank{#3}{}{ #3}%              \ifblank{#4}{}{ #4}!#6\actualoperator                 \unexpanded{\citefield}{#7}{indextitle}#8}}}%       \theindexentry       \endgroup}     \makeatother     \newcommand{\yearsindex}{{years}}     \newcommand{\authorsindex}{{authors}}          % undated entries     \newcommand{\undated}{n.d.}          \usepackage[colorlinks]{hyperref}          \begin{document}          \nocite{*}          \printbibliography     \printindex[authors]     \printindex[years]          \end{document}


title: tabular can't caption is separated

text: I'm creating a table like this:               \captionof{table}{caption}     \begin{tabular}{@{} *5l @{}}\toprule     \emph{header1} & \emph{header2} & \emph{header3} \\\midrule     item1 & v1  & v2   \\     item2 & v1  & v2   \\     item2 & v1  & v2   \\     \hline     \label{table:label}     \end{tabular}      This way the caption gets separated from the table and if it reaches the end of the page the table might go to the next page while its caption remains on the previous page. If I move the caption inside tabular I get an error:               You can't use `\hrule' here except with leaders.     \caption@hrule ->\hrule      and if I use \caption instead:               Package caption Error: \caption outside float      I've added these lines to use caption for my tables:               \usepackage[hypcap]{caption}     \captionsetup[table]{name=table}


title: How to set word wrap for enumerate items in booklet?

text: The code below is based on the code from booklet manual Chapter 2.   I used the `enumerate` environment. The problem is that words are stretching out of the paper. It won't break line automatically: ![enter image description here](http://i.stack.imgur.com/4Scrl.jpg) I don't know how to solve this. Any help, please. CODE:               \documentclass[a4paper,11pt]{memoir}       % typeblock size of 5.5+ by 4 inches       \settypeblocksize{5.5in}{4in}{*}       \addtolength{\textheight}{\onelineskip}       \setlrmargins{2in}{*}{*}       \setulmargins{2.25in}{*}{*}       \checkandfixthelayout       % \usepackage[noprint]{booklet}       \usepackage[print,1to1]{booklet} \nofiles       \pagespersignature{16} % 16 pages per signature       \ifpdf       \setpdftargetpages       \else       \setdvipstargetpages       \fi       \ifprintoption % tweak dvi output only for final printing       \special{!TeXDict begin /landplus90{true}store end}       \special{!TeXDict begin <</Tumble true>> setpagedevice end}       \fi       \begin{document}       %\pagestyle{empty}       % Want a blank sheet before the title page       %\hbox{}\cleardoublepage       % half-title page here       %\cleardoublepage       %\clearpage       % copyright page here       %\cleardoublepage       \pagestyle{plain}       \pagenumbering{roman}       \tableofcontents*       \cleardoublepage       \pagenumbering{arabic}       \pagestyle{headings}        \chapter{}             \begin{enumerate}               \item[\textbf{omnipotent:}] all-powerful,\\,almighty; omnidirectional,\\,omnipresent,\\,omniscient,\\,omnivorous        \end{enumerate}        % and so on         % want some blank endpapers to get enough pages into        % the last signature for easy binding       \clearpage        \hbox{}\clearpage\hbox{}\cleardoublepage               \end{document}


title: Illegal parameter number in definition of \abx@field@abstract?

text: I'm using TexMaker, and today I added one cite that (I think) apparently screwed up my files. This is my document:               \documentclass[spanish,11pt,a4paper]{report}          \usepackage[utf8]{inputenc} % Permite acentos y ñ en el código fuente     \usepackage{upgreek}     \usepackage[spanish]{babel}     ...          \subsubsection{Generación de electrostática}          El método de [...] microesferas \cite{tran2011,brandenberger1999}.      And this is the error that I get:               (No file specified) Error Line 1615     ! Illegal parameter number in definition of \abx@field@abstract.     <to be read again>     x     l.139 ... duras \cite{tran2011,brandenberger1999}.     You meant to type ## instead of #, right?     Or maybe a } was forgotten somewhere earlier, and things     are all screwed up? I'm going to assume that you meant ##.      And this was the cite:               @ARTICLE{Brandenberger1999,       author = {H. Brandenberger and D. Nüssli and V. Piëch and F. Widmer},       title = {Monodisperse particle production: A method to prevent drop coalescence         using electrostatic forces },       journal = {Journal of Electrostatics },            abstract = {The controlled [...] voltage electrode (400–1400 V) is presented (pat. pend.). The droplet [...] beads of 160–800 μm [...] },       }      Then I changed all those ü and ë and &#xa0, but it won't get fixed and now I can't compile my files. Please help?? (The [...] stands for regular text)


title: Model Railway planning

text: As there are so many fancy things which are able to do with LaTeX, is there a possibility to create layouts for model railroads? I know only special (mostly Windows) programs, to do that, e.g. http://www.sandiasoftware.com/ (the following picture is from that site) ![enter image description here](http://i.stack.imgur.com/dTuxf.gif) I think, with `tikz` this should be possible (for 2D).


title: AUCTeX -output-directory + copy *.pdf to working directory

text: Part I: Could someone please give me an example of how to configure AUCTeX to use the `-output-directory` option? I've tried inserting `-output-directory="/tmp"` in a variety of ways at different locations, but it's not working -- with two hyphens, with one hyphen, with double quotes, with single quotes, without any quotes, before the `%t`, after the `%t`, right before the closing single quote, . . . . Here is the generic `latexmk` code for the working directory in my `init.el` file:               (custom-set-variables      '(TeX-command-list (quote ( ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil (latex-mode) :help "Run LaTeX"))))     )      * * * Part II -- Extra Credit Then, I'd like to take one step further and copy the PDF back to the working directory with the following example. I'm on OSX with TeX Live, so `-aux- directory` is not supported. Configure `latexmk` so that the command it uses for `pdflatex` does the ordinary `pdflatex` command and then copies the output file where you want it. You'd invoke `latexmk` with the `-output-directory` option. An appropriate line in one of `latexmk`'s configuration files is               $pdflatex .= ' && cp "%D" "%R.pdf"';      You could also persuade it to display a message about the copying of the output file:               $pdflatex .= ' && (cp "%D" "%R.pdf"; echo Output file copied from "%D" to "%R.pdf" in current directory)';      (N.B. The second suggestion was all supposed to be on one line.) Then you invoke `latexmk` by something like the following:               latexmk -outdir=/tmp      * * * For anyone interested in synctex with the `-output-directory` option on an OSX box, add `-synctex=1` to the line of code proposed by `T. Verron` in the answer below:               ;; use Skim as default pdf viewer     ;; Skim's displayline is used for forward search (from .tex to .pdf)     ;; option -b highlights the current line; option -g opens Skim in the background          (setq TeX-PDF-mode t)          (setq TeX-view-program-selection '((output-pdf "Skim")))          (setq TeX-view-program-list         '(("Skim" "/Applications/Skim.app/Contents/SharedSupport/displayline -b -g %n /tmp/%o %b")))          (server-start); start emacs in server mode so that skim can talk to it      See also http://stackoverflow.com/questions/7899845/emacs-synctex-skim-how-to- correctly-set-up-syncronization-none-of-the-exi * * * **EDIT** : The following `stackoverflow` link contains an alternative method of using Emacs and `start-process` to run `latexmk` and copy the .pdf file back to the working directory (leaving the auxiliary files in the `/tmp` folder) -- if the latexmk compilation is successful, then Skim is opened (with forward sync) -- if the latexmk compilation generates errors, then the error buffer is displayed. http://stackoverflow.com/questions/18705774/if-latexmk- finishes-okay-then-show-pdf-else-display-errors


title: Add Overlays in beamer \tableofcontents items

text: I'm writing a presentation in beamer. I want to show semi-transparent overlays in the table of contents items. I mean, I want to show the current item text in black color and the next ones in gray. Thanks in advance.


title: Navigate a TeX code using emacs

text: Are there useful navigation shortcuts in `emacs` when editing a `TeX` source? For example _jump to the beginning/end of section_ , or similar thing for environment, etc. `C-v` and `M-v` are two coarse, and I am looking for smarter navigation tips. Something in the spirit of `C-M f` and `C-M b` which jump over balanced braces.


title: How I can write polymeric reaction in latex

text: Is it possible write this reaction in latex ? ![enter image description here](http://i.stack.imgur.com/5oUKh.png) I used this code, but the "image" of raction is very big. How I can reduce it ?                   \documentclass[12pt,twoside,a4paper,openright]{report}         \usepackage[portuguese]{babel}         \usepackage[utf8]{inputenc}         \usepackage[inner=3cm,outer=2cm,tmargin=2.0cm,bmargin=2.0cm, includefoot, includehead]{geometry}         \usepackage{chemfig}         \usepackage{chemmacros}         \usepackage{enumitem}                   \begin{document}         \newcommand\setpolymerdelim[2]{\def\delimleft{#1}\def\delimright{#2}}         \def\makebraces[#1,#2]#3#4#5{%         \edef\delimhalfdim{\the\dimexpr(#1+#2)/2}%         \edef\delimvshift{\the\dimexpr(#1-#2)/2}%         \chemmove{%         \node[at=(#4),yshift=(\delimvshift)]         {$\left\delimleft\vrule height\delimhalfdim depth\delimhalfdim         width0pt\right.$};%         \node[at=(#5),yshift=(\delimvshift)]         {$\left.\vrule height\delimhalfdim depth\delimhalfdim         width0pt\right\delimright_{\rlap{$\scriptstyle#3$}}$};}}         \setpolymerdelim()              \begin{enumerate}[label=(\arabic*)]     \setcounter{enumi}{3}      \item\setatomsep{1.8em}     \chemfig{R-O-Si(-[2]OR)(-[6]OR)-[@{downleft,0.9},2]O-Si(-[2]OH)(-[6]OR)-[@{downright,0.4},2]OH}          %\schemestart     %\arrow(.mid east--.mid west){->[\parbox{5cm}{\centering -m \si{H_2O}\\-k ROH}]}[,1.8]     %\schemestop     %\arrow(.mid east--.mid west){->[\parbox{5cm}{\centering -m \si{H_2O}\\-k ROH}]}[,1.8]     %\setchemrel{1pt}{}{6em}     \chemrel[-m {\si{H_2O}//-k ROH}]{->}     %\chemrel[$-\mathrm{m\,H_2O}$]{->}     %\arrow{->[\parbox{5cm}{\centering -m \si{H_2O}\\-k ROH}]}      \chemfig{-O-Si(-[2]O-[2]Si([2]-)([4]-)-)(-[6]O-[4]R)-O-Si(-[2]O-[8]H)(-[6]O-[6]Si([6]-)([4]-)-)-O-Si(-[2]O-[2]Si([2]-)([4]-)-)(-[6]O-[8]H)-O-Si([2]-)([6]-)([8]-)}          \makebraces[40pt,40pt]{n}{downleft}{downright}     \end{enumerate}              \end{document}      ![enter image description here](http://i.stack.imgur.com/CIfJe.png)


title: Beamer: tableofcontents with page numbers

text: How do I get page numbers / slide numbers in the tableofcontents in a beamer presentation?


title: How to print in a node the \coordindex multiplied by a value?

text: I would like to print in a node the \coordindex multiplied by a value. Is it possible? now:               node [                 some code...                   ] {$\coordindex$}      after (?)               node [                 some code...                   ] {$\coordindex * value $}      Thank you in advance


title: Helvetica-Light in Beamer disrupts the math fonts

text: I am trying to make the font of a Beamer presentation match that of a co- author who is using Powerpoint. The Powerpoint font is Helvetica Light. In XeLatex I used `\usepackage{fontspec}` and `\setmainfont{...}`, as well as a `\usefonttheme{professionalfonts}`. This seems to work. EXCEPT THAT, the math fonts are now broken: anything that was in `\mathbf{}` appears to be transformed to HelveticaLight also. Whereas math that is not `\mathbf` looks "normal" (I think serif, CM font). Inconsistent and ugly! How can I cause the `\mathbf{}` symbols to look as they would if I had not requested the helvetica font? Here is an example:               \documentclass{beamer}     \usepackage[scaled]{helvet}     % does not seem to work     \usetheme{Antibes}     \usecolortheme{dove}     \usefonttheme{professionalfonts}     \usepackage{fontspec}     \setmainfont[Ligatures=TeX]{HelveticaLight.ttf}     \usepackage{beamerprosper}          \begin{document}          \begin{slide} { Bad Fonts Mixture }     Here is the problem:     \[        \sum_k (d_k - \mathbf{b}^T \mathbf{x})^2     \]     The $\mathbf{b}^T \mathbf{x}$ is in helvetica light and looks bad next to the $d_k$.     \end{slide}          \end{document}


title: Proper page aspect ratio?

text: I have a question regarding the aspect ratio of my pages. I wonder if the given aspect ratio in my example is a good choice or if I should change any values to achieve a better print space. Experts, what do you think? :)               \documentclass[12pt,ngerman]{article}      \usepackage[a4paper,margin=2cm]{geometry}  \usepackage{setspace}     \usepackage[T1]{fontenc}   \usepackage{mathptmx}       \usepackage[scaled=.90]{helvet}   \usepackage{courier}      \onehalfspacing \lipsum          \begin{document} \setlength{\headheight}{15pt}     \setlength{\topmargin}{5pt} \setlength{\headsep}{15pt} \textheight =     635pt \setlength{\skip\footins}{10mm}           \lipsum          \end{document}


title: biblatex: Remove parentheses around year for articles

text: Two questions remain while I try to finish my dissertation. I hope all you experts can help me quickly:   * I use the following setup for `biblatex`:              \usepackage[backend=bibtex,bibstyle=authortitle,firstinits,terseinits,citestyle=authoryear]{biblatex} %      and have noticed that when I have a year entry for an article, it appears in the bibliography in parentheses, whereas when I have a book, or misc, or patent entry, it does not. How can I get rid of the parentheses in the article references?   * How do I properly add a footcite to the caption of an image? I tried the following:              \begin{figure}[h]     \centering     \includegraphics{images/img.JPG}      \caption{Caption goes here \protect\footnotemark }      \label{fig:img1}     \end{figure}     \footcitetext{source1}       When a floating image is moved to a new page, the footnote remains on the old page however. Have any of you an idea on how to footcite properly inside a caption? Thanks for all your help, you guys rock!


title: Particular bibliography style

text: I usually add bibliography to my tex files by adding the lines:               \bibliographystyle{ChemEurJ}     \bibliography{filename}      where 'ChemEurJ' is the style I usually use for the appearance of my bibliography and 'filename' is the .bib file in which I have all the articles, etc. that I want to cite. Coming to the problem, does anybody know if there exists a bibliography style that would give the following as result? > L. Elisa, F. Baldini, A. Giannetti, C. Trono and T. Carofiglio, Solid- > supported Zn(II) porphyrin tweezers as optical sensors for diamines, _Chem. > Comm._ **2010** , _46_ , 3678 I looked for it for a while and I couldn't find it. On the other hand there are so many bibliography styles that I could have missed it. Thanks for the help


title: I want to use the apa bibliography style

text: I am trying to use the APA style using apacite bibliography style. The bibliography is generated very well but my problem are the citation themselves in the actual document. They just show author names but not the year when I use the \cite command in the text. How can I solve this. I want to get something like this (author,year). But now, I am getting (author,)


title: Organizing a list of items into two columns

text: Is it possible in `LaTeX` to divide the following list of items into two columns:               \documentclass[12pt,letterpaper]{article}          \usepackage{enumitem}          \begin{document}          \section*{Section 01}     \begin{itemize}[noitemsep,nolistsep]         \item item 1         \item item 2         \item item 3         \item item 4         \item item 5     \end{itemize}          \end{document}      Here is the output: ![enter image description here](http://i.stack.imgur.com/AGZ3l.png) I would like to have items 1, item 2, item 3 in the left column while item 5 and item 6 on the right one. Would this possible using `LaTeX`? I am actually looking for something like the following image: ![enter image description here](http://i.stack.imgur.com/fwp4n.png)


title: tikzchainprevious undefined

text: I am using the following code for drawing a TikZ chain diagram:               \documentclass{beamer}          \usepackage[T1]{fontenc}         \usepackage{tikz}     \usetikzlibrary     {         arrows,         chains,         decorations.pathreplacing,         positioning,         shapes,         shapes.geometric,         scopes     }          \begin{document}          \begin{frame}         \frametitle{Test Frame}          \begin{tikzpicture}         [             overlay, remember picture,]             node distance=.8cm,             start chain=going below,         ]         \draw (current page.center) node (__m_statement)             [                 anchor=north,                 join,                 font=\bfseries\scriptsize,                 color=black,                 rectangle,                 very thick,                 draw=black,                 rounded corners,                 inner sep=5pt,             ]         {User Statement};          \end{tikzpicture}             \end{frame}          \end{document}      However, I get the following error when compiling both online at WriteLatex (https://www.writelatex.com/636783sbydyy) or locally with either pdflatex or xelatex:               Undefined control sequence. <argument> \tikzchainprevious l.43 \end{frame}      What is the TikZ library that I am missing? I could not find that library on the Internet.


Is it possible to create table of content, that is based on new command appearance, like this:               \mycomm{Circles and squares} %title of 1st chapter     \mycomm{Triangles and rectangles} %title of 2nd chapter      Every chapter has a title with some style (applied by mycomm). Can I use appearance of this style for creating table of contents? And can I apply some completely new style to table of contents? I think about table of content as a set of paragraphs (every entry is a paragraph = name of chapter + filler + page number). Possible? Here is a minimal document:               \documentclass{book}        \newcommand{\mycomm}[1]     {     \newpage     \vspace{55 mm}     \textbf{\huge{#1}}     \vspace{35 mm}     }          \begin{document}                   \mycomm{Circles and squares} %title of 1st chapter          bla bla     \mycomm{Triangles and rectangles} %title of 2nd chapter          bla bla     \end{document}      What have to be added to `\mycomm` to create table of content that will be based on this style? How to control the look of the table of content? I wish to set new command '\mycommtwo' and use it to style every entry in table of content, sometimes I wish to use different command, something like:               \newcommand{\mycommtwo}[1]     {     \textbf{\huge{#1}}     }          \newcommand{\mycommtwotwo}[1]     {     \textbf{\large{#1}}     }      I wish to control also fillers between name of element in table of content and page number and space between them. I know how to do it in InDesign, but I wish to switch to LaTeX just for fun


title: How can i generate the template like table?

text: I need to write in the following template : ![enter image description here](http://i.stack.imgur.com/TEBOI.jpg) Could you tell me how I can generate in the latex? Best, Aissan


title: Issue with algorithm2e "input" alignment

text: If you look at the image below you will see that on the 4th line of the input, the alignment resets for some reason and I'm not sure why. Could someone show me how to fix this? ![enter image description here](http://i.stack.imgur.com/iu3Vq.png)                   \begin{algorithm}[H]             \SetKwInOut{Input}{input}             \SetKwInOut{Output}{output}                  \Input{A set of men $M$ such that for all $m \in M$, $m$ is free and has a preference list containing each woman $w \in W$ \\             A set of women $W$ such that for all $w \in W$, $w$ is free and has a preference list containing each man $m \in M$}             \Output{A perfect matching between $M$ and $W$ with no strong instability}         \end{algorithm}


title: Sorting a table according to values in another table

text: I have two tables (A and B), both with a string valued column and an integer valued column. What i would like to actually have is a sorted table B sorted by the values of table A. The crucial point is that the rows are identified by the string value, not the index, and that B does not contain all rows that A has (otherwise i could just sort according to the string column first).               \documentclass{article}          \usepackage{pgfplots}     \usepackage{pgfplotstable}              \def\histocomp#1 sort on #2{              \pgfplotstableread{#2}\sortOnTable              \begin{tikzpicture}         \begin{axis}         \pgfplotstablesort[sort key=index,sort key from=\sortOnTable]\loadedtable\sortOnTable         \addplot+ [no markers] table[x expr=\coordindex, y index=1] \loadedtable;                   \pgfplotstableread{#1}\loadedtable          \pgfplotstablesort[sort key=index,sort key from=\sortOnTable]\loadedtable\loadedtable         \addplot+ [only marks] table[x expr=\coordindex, y index=1] \loadedtable;         \end{axis}         \end{tikzpicture}              }          \begin{document}     \histocomp{B} sort on {A}     \end{document}      A:               index values     foo 0.5     bar 0.2     baz 0.7      B:               index values     bar 0.8     baz 0.5      Is there such a thing as an outer join or something?


title: How to change the line spacing in my list of figures?

text: I am using the book documentclass and have a list of figures. After much trouble I noticed that there is a blank line to separate figures that are in different chapters, but not if they are within the same chapter. Since I changed the numbering of my figures to be {1, 2, 3, etc.} instead of {2.1, 2.2, 3.1, etc.} this looks silly and I'd rather have a blank line between each figure, no matter what. How do I do that? Similar:   * How to tweak the LOF and LOT without using any packages?   * The line spacing in the list of algorithms


title: Remove spacing between per-chapter figures in LoF

text: When I'm generating a List of Figures in my project, all figures are grouped by chapter. I would like to have the whole list without any additional new lines between different chapters. How it looks like:               Figure 1.1      Figure 1.2          Figure 2.1          Figure 3.1      Figure 3.2      How it should:               Figure 1.1      Figure 1.2     Figure 2.1     Figure 3.1      Figure 3.2      I tried to apply the following solutions but failed completely :   * http://tex.stackexchange.com/a/51074   * http://tex.stackexchange.com/a/51880 My main file:               \documentclass[12pt,oneside,titlepage,utf8x]{report}          \usepackage{times,a4wide,multirow,tabularx,graphicx}      \usepackage{psfrag,fancyhdr,longtable}          \usepackage[T1]{fontenc}     \usepackage{float}     \usepackage[utf8]{inputenc}          \usepackage{url}     \usepackage{color}     \usepackage{verbatim}     \usepackage{fancyvrb}     \usepackage{natbib}     \usepackage{relsize}          \usepackage{caption}     \captionsetup[longtable]{belowskip=10pt}          \usepackage[left=4cm,top=2cm,right=3cm,bottom=2.5cm]{geometry}          \renewcommand{\chaptermark}[1]{\markboth{\nouppercase{\thechapter.\ #1}}{}}     \pagestyle{fancy}     \headheight 30pt     \rhead{}     \lfoot{}     \cfoot{\thepage}     \rfoot{}          \setlength{\parindent}{2em}     \setlength{\parskip}{1em}     \linespread{1.3}           \begin{document}          \begin{titlepage}     \maketitle     \end{titlepage}          \tableofcontents          \chapter{First}     \label{sec:First}     \input{chapter1/chapter1}          \chapter{Second}     \label{sec:Second}     \input{chapter2/chapter2}          \chapter{Third}     \label{sec:Third}     \input{chapter3/chapter3}          \relsize{-1}     \listoffigures     \normalsize          \bibliography{praca_mgr}     \bibliographystyle{plain}     \nocite{*}          \end{document}


title: Undesired vertical space in List of Figures

text: How to get rid of that vertical space between caption titles? (space between the second line and the third line). The figures come from different files that have been \input'ted ; using \include does not change result. _Edit: problem is due to figures being in different chapters, not due to coming from different files. So answer is there. Thank you Werner._ ![enter image description here](http://i.stack.imgur.com/dJVYB.png) Minimal example is               \documentclass[12pt,letterpaper,oneside]{book}          \usepackage{blindtext}     %\usepackage{tocloft}     %\usepackage[nottoc]{tocbibind}     %\usepackage{chngcntr}     %\counterwithout{figure}{chapter}          %\usepackage[labelsep=newline,justification=centering]{caption}          \begin{document}          \listoffigures     \input{part1.tex}     \input{part2.tex}     \end{document}       where part1.tex has two figures and is               \blinddocument          \begin{figure}     \begin{center}       \end{center}     \caption{First input file, first figure}     \label{fig:TrueDistances1}     \end{figure}          \begin{figure}     \begin{center}       \end{center}     \caption{First input file, second figure}     \label{fig:TrueDistances2}     \end{figure}      while part2.tex is               \blinddocument          \begin{figure}     \begin{center}       \end{center}     \caption{Second input file, first figure}     \label{fig:TrueDistances3}     \end{figure}


title: Make custom tikzpicture section heading non-rigid

text: Trying to make a custom section heading but I don't know how to make it move fluidly with the text, only by commanding it to be in a specific location on the page. I want it to look like this: ![enter image description here](http://i.stack.imgur.com/4oih6.png) This is the code I have so far but it's meant to be implemented at the same spot every page:                   \documentclass[12pt]{article}              \usepackage[hmargin=0.5cm,bmargin=2.3cm,tmargin=2cm,centering]{geometry}         \usepackage[contents= ,color=boxgray,scale=1,opacity=1,angle=0]{background}         \usepackage{lipsum}         \usepackage{parskip}         \usepackage[absolute,overlay]{textpos}              \setlength{\TPHorizModule}{4cm}         \setlength{\TPVertModule}{\TPHorizModule}         \textblockorigin{5mm}{10mm} % start everything near the top-left corner              \definecolor{boxgray}{RGB}{59,59,59}         \definecolor{lightgray}{RGB}{235,235,235}              \usepackage{tikz}         \usepackage{tikzpagenodes}         \usepackage{atbegshi}         \tikzstyle{lw} = [line width=0.5pt]              \newcommand\Header{%             \begin{tikzpicture}[remember picture,overlay, fill]                 \path [fill=lightgray]                     ([yshift=9.8cm]current page.west) -- ([yshift=9.8cm,xshift=12cm]current page.west) -- ([yshift=9.3cm,xshift=12cm]current page.west) -- ([yshift=9.3cm]current page.west) -- cycle;                 \node[font=\bfseries\color{black},anchor=south west,                       xshift=1cm,yshift=9.8cm] at (current page.west)                       {\fontsize{40}{60}\selectfont\headertext};             \end{tikzpicture}%         }                   \pagestyle{empty}         % add header depending on the value of the page modulo 3         \AddEverypageHook{%           \ifnum\value{page}=1\relax             \backgroundsetup{contents={\Header}}           \else             \ifnum\value{page}=2\relax             \backgroundsetup{contents={\Header}}           \fi\fi           \BgMaterial         }              \begin{document}              \newcommand{\headertext}{Header 1}              \begin{textblock}{4}(0.3,1.2)             \lipsum[1-3]         \end{textblock}                   \end{document}      I'm sure it's an easy fix but can't figure out how to make the tikzpicture move with the sections of the text. If possible, I'd like to get it out of the header environment as well as the header may be changing with the pages. This is just the easiest way I knew how to do it. Any help would be appreciated. Thanks!


title: Exclude citations from other chapters, but make cross-references work

text: I'm writing up my PhD dissertation, and I tend to compile each chapter separately. Each chapter is in a separate document, and is included in the main LaTeX file. I use `\includeonly` to only include the chapter I need, together with the Bibliography (I'm using classicthesis). Nevertheless, I do want cross-references to work (something like "see Chapter 8"), so what I do now, is do a full run first (compiling the entire thesis), which produces all the .aux files needed for cross-referencing. Afterwards, I then limit compilation to the chapter I'm working on, and compile that one. That works great, but there's one caveat. It means that **all** citations from all other chapters are included as well, which gets a bit annoying after a while (a 20 page chapter quickly turns into a 35 page PDF with 15 pages of references). I would love to have just a single, self-contained PDF of a specific chapter, with the references that are cited in that chapter. I've experimented with `\makeatletter\@fileswfalse\makeatother` when doing the first full compilation, but that also prevents cross-referencing to other chapters and sections from working, so it doesn't solve my problem. Any ideas? Thanks in advance!


title: Which primitives does LaTeX2e rename/move?

text: TeX's primitives can be renamed by macro formats/packages: this allows new/altered features or behaviours. Usually this is done such that the originals are still available ('renamed'): certainly ConTeXt does this (for example `\normalend`). Which primitives does the LaTeX2e kernel move/rename?


title: Preventing an arbitrary block from being displayed on two different pages?

text: I have a collection of concert entries; two such entries are displayed below:               \textbf{Modest Mouse, Jimmy Eat World, Angels and Airwaves}\\     \textit{LIVE105 Not So Silent Night}\\     Bill Graham Civic Auditorium\\     San Francisco, CA\\     12/7/2007\\          \textbf{Buckethead, That 1 Guy}\\     Fox Theatre\\     Redwood City, CA\\     11/21/2008\\      I want to force each separate concert entry to be on the same page -- that is, I don't want, say, `12/7/2007` to spill over to page 2 if the `Modest Mouse` concert entry just so happens to be at the bottom of page 1. I've tried wrapping each block in `samepage` tags, like so:               \begin{samepage}     \textbf{Modest Mouse, Jimmy Eat World, Angels and Airwaves}\\     \textit{LIVE105 Not So Silent Night}\\     Bill Graham Civic Auditorium\\     San Francisco, CA\\     12/7/2007\\     \end{samepage}      However, this didn't work. What is the best way to achieve this?


title: label overlapping with arrow in tikz

text: First, the working code:               \documentclass[journal]{IEEEtran}     \usepackage{libertine}     \usepackage{cite}     \usepackage{url}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{mathtools}     \usepackage{setspace}     \usepackage{algorithm}     \usepackage{algorithmicx}     \usepackage{algpseudocode}     \usepackage[english]{babel}     \usepackage{tikz}     \usetikzlibrary{arrows}     \begin{document}     \begin{center}     \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,       thick,main node/.style={,fill=white!20,draw,font=\sffamily\small\bfseries}]            \node[main node] (dancing) {dancing};       \node[main node] (monkey) [below of=dancing] {monkey};          \path[every node/.style={font=\sffamily\small}]         (dancing) edge node [below] {test} (monkey)     ;     \end{tikzpicture}     \end{center}     \end{document}      As shown below, I get overlapping text with the arrow. ![dancing monkey](http://i.stack.imgur.com/1LTtB.png) Is there a way to change this? Can I also modify the size of the arrow for individual arrows in my graph? Thanks a lot!


title: Multiply cited reference with pages

text: How do I create a multiply references with pages? For example: (author year: **page** ; author year: **page** ) ?


title: Doing things to every page of a multi-page table

text: So, the designers did their job and specified coloured backgrounds and rounded corners for all tables. Like so: ![enter image description here](http://i.stack.imgur.com/E61gC.png) As described here, this requires doing nasty things like putting the whole table into a savebox, measuring the size of that, _then_ setting a clipping path, and _then_ painting the table. Now the question is: What if this were a multi-page table, printed with `longtable` or `supertabular`? Any chance of intercepting the part written on each page to do the same kind of nastiness to it? Preferably, of course, the exact nastiness would depend on whether this was the first or the last, or one of the intermediate chunks of the table.               \documentclass{article}     \usepackage[dvipsnames,table]{xcolor}     \usepackage{array}     \usepackage{environ}     \usepackage{tikz}          \newsavebox{\tablebox}     \definecolor{tablecolor}{named}{ForestGreen}          \NewEnviron{rndtable}[1]{%       \addtolength{\extrarowheight}{1ex}%       \rowcolors{2}{tablecolor!20}{tablecolor!40}%       \sffamily%       \newcommand{\header}[1]{%         \multicolumn{1}{c}{%           \cellcolor{tablecolor}\color{white}\bfseries##1}}       \savebox{\tablebox}{%         \begin{tabular}{#1}%           \BODY%         \end{tabular}}%       \begin{tikzpicture}         \clip[rounded corners=1ex] (0,-\dp\tablebox) -- (\wd\tablebox,-\dp\tablebox) -- (\wd\tablebox,\ht\tablebox) -- (0,\ht\tablebox) -- cycle;         \node at (0,-\dp\tablebox) [anchor=south west,inner sep=0pt]{\usebox{\tablebox}};         \draw[tablecolor,very thick,rounded corners=1ex] (0,-\dp\tablebox) -- (\wd\tablebox,-\dp\tablebox) -- (\wd\tablebox,\ht\tablebox) -- (0,\ht\tablebox) -- cycle;       \end{tikzpicture}     }          \begin{document}     \noindent     \begin{rndtable}{cccp{5cm}l}       \header{vote} &       \header{answer} &       \header{views} &       \header{question} &       \header{user} \\       1 & 1 & 20 & How can I improve this table (using tabularx)? & Jubobs 21.3k\\       0 & 0 & 3 & References alignment problem in IEEtrans & Prateek Jain 1\\       1 & 1 & 29 & Problem with cases environment when used in a stack & Steven B. Segletes 32.2k\\       1 & 0 & 85 & TikZ error for externalized graphics but output is correct & henry 1,033\\       0 & 0 & 12 & Working with leaflets & Claudio Fiandrino 33.1k\\     \end{rndtable}          \end{document}


title: Changing fraction style in LaTeX as generated by Matlab

text: A= [0.7577    0.7060    0.8235    0.4387    0.4898         0.7431    0.0318    0.6948    0.3816    0.4456         0.3922    0.2769    0.3171    0.7655    0.6463         0.6555    0.0462    0.9502    0.7952    0.7094         0.1712    0.0971    0.0344    0.1869    0.7547]     latex_table = latex(sym(A));     I save it as eqA.     equations1.tex         \newcommand{\eqA}{                 \left(                         \begin{array}{ccccc}                       \frac{6825116339432507}{9007199254740992} &                        \frac{6359497797823013}{9007199254740992} &                        \frac{3708524368810113}{4503599627370496} &                        \frac{987964467329731}{2251799813685248} &                        \frac{4411405500742427}{9007199254740992}\\                        \frac{6693542213068579}{9007199254740992} &                        \frac{71681197541747}{2251799813685248} &                        \frac{6258459855040489}{9007199254740992} &                        \frac{859193262592067}{2251799813685248} &                        \frac{1003370923741521}{2251799813685248}\\                        \frac{55201045594335}{140737488355328} &                        \frac{2494300503760379}{9007199254740992} &                        \frac{2856178200482939}{9007199254740992} &                        \frac{1723790560926853}{2251799813685248} &                        \frac{2910735031501795}{4503599627370496}\\                        \frac{2952009981953243}{4503599627370496} &                        \frac{415874915283285}{9007199254740992} &                        \frac{8558839330135289}{9007199254740992} &                        \frac{3581261978445933}{4503599627370496} &                        \frac{6389390375844301}{9007199254740992}\\                        \frac{770956303438939}{4503599627370496} &                        \frac{874885307559191}{9007199254740992} &                        \frac{77565677658637}{2251799813685248} &                        \frac{1683198784473707}{9007199254740992} &                        \frac{6797613319514473}{9007199254740992}                   \end{array}                           \right)         }          //latex     \documentclass{article}     \input{equations1}          \begin{document}         Here we have a nice matrix:         \[             \eqA{}         \]          \end{document}      I ' m getting right answer but its different format: How can I get original format like A. ![enter image description here](http://i.stack.imgur.com/vlZl4.png) Last but not least, how can I add horizontal and vertical lines and lable colume and rows of the table. The contents of the table should be updated every time by input equation1.


title: Citations never italicized

text: I have some citations which appear inside a theorem like               \begin{thm}[The Strong Perfect Graph Theorem]\cite[Theorem 8.3]{Cha-Les-Zha11} A graph      $G$ is perfect if and only if neither $G$ nor $\bar{G}$ contains an induced odd cycle     of length 5 or more.     \end{thm}      where thm is defined by               \newtheorem{thm}{Theorem}      This citation appears in italics in the PDF. But, if I were to do the exact same citation outside of a theorem, it would not appear in italics. Is there a way to force it to always be plain (not italicized)?


title: Subsection, subsubsection, etc. title outside (left of) the subsection, subsubsection, etc. content block

text: How could I get subsections, subsubsections, paragraphs, and subparagraphs (which I'll call "sections" from now on) that look like the one in this PDF file ? In this PDF example, the indentation between one level of section and the next is too much, but the important point I would like to keep is that **the name of the section** (actually only its numbering) **is detached to the left** and the **section content consists of one block to the right**. I guess there are some _minipages_ involved, but i'm not sure how to use them to get the right result. Thanks in advance !


title: Frame break with different subtitles

text: Is it possible to have a frame with continuation title and have a different subtitle per each frame break? Following the MWE:               \documentclass{beamer}          \setbeamertemplate{frametitle continuation}[from second]          \begin{document}          \begin{frame}[allowframebreaks]{Title}     \framesubtitle{Subtitle 1}          test 1          \framebreak     \framesubtitle{Subtitle 2}          test 2          \end{frame}          \end{document}      The problem is that beamer takes 'Subtitle 2' for all slides.