title: Charter for text, normal math font for math

text: I want to use Charter (http://www.tug.dk/FontCatalogue/charter/) as my font for all the text, but I want to use the normal math-font for my math. Can this be achieved?


title: Prohibit see-through text with gibberish on backside of page?

text: I'd like to have the backside of my LaTeX pages printed with "gibberish" to prevent someone from holding the letter against a lamp and reading the see- through text. Kind of like the PIN letters have that banks send out when one gets a new debit-/credit card that has a new PIN going with it (somehow similar to this). So, what I'd do if I knew how to is set up multiple "frames", each pretty much the size of the page itself, fill those with random letters and numbers, print them ontop of each other and misalign each by a few pixels, then print these on every second page... Any help, as always, is highly appreciated. This is what I go with now:               %Fontsize, Layout, papersize, type of document     \documentclass[12pt,oneside,a4paper]{scrartcl}          %margins     \renewcommand{\familydefault}{\sfdefault}     \usepackage{helvet}     \usepackage[left=0cm,right=0cm,top=1cm,bottom=1cm]{geometry}     \usepackage[cm]{fullpage}     \usepackage[nopar]{lipsum}          %header and footer (leaving this out yields a funny, ragged bottom)     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}          %top line     \renewcommand{\headrulewidth}{0.5pt}          %footer centered     \fancyfoot[C]{\thepage}     %bottom line     \renewcommand{\footrulewidth}{0.5pt}          \newsavebox{\gibber}          \begin{document}          \savebox{\gibber}{\parbox{\linewidth}{\lipsum\lipsum}}     \vspace*{8cm}     \raisebox{0pt}[0pt][0pt]{\usebox{\gibber}}     \raisebox{-3pt}[0pt][0pt]{\usebox{\gibber}}\\     \raisebox{-5pt}[0pt][0pt]{\usebox{\gibber}}\\     \raisebox{-9pt}[0pt][0pt]{\usebox{\gibber}}\\     \hspace*{8pt}\raisebox{-12pt}[0pt][0pt]{\usebox{\gibber}}          \end{document}


title: Trouble with titlesec

text: I've been using `titlesec` for quite some time now and want to "pimp up my style" ;) I've read How to change header to list first section on page and not last section and tried to adapt the code for my purposes. I'm writing a twocolumn, twosided layout and would like my header to be formatted such that the header shows the context (i.e. section and subsection number and title) of the current two visible pages.   * On **left** pages the header should list:       * print the section/subsection "enclosing" the _first_ line of that page, if there's no subsection enclosing the first line print only the section      * section _or_ subsection _or_ section **and** subsection may be printed on a previous page   * On **right** pages the header should list:       * print the section/subsection "enclosing" the _last_ line of that page, if there's no subsection enclosing the last line print only the section     * section _or_ subsection _or_ section **and** subsection may be printed on a previous page Let's have a look at my MWE:               \documentclass[twoside]{article}     \usepackage[bf,pagestyles,raggedright]{titlesec}% http://ctan.org/pkg/titlesec     \usepackage{lipsum}% http://ctan.org/pkg/lipsum          %% to be used when odd pages are on the RIGHT HAND SIDE     \newpagestyle{main}{%       \headrule       \sethead[\thepage]% even-left         []% even-center         [\bfseries{\scriptsize \bottitlemarks\thesubsection$\:$\bottitlemarks\subsectiontitle} $\quad$ \bfseries{\bottitlemarks\thesection$\:$\bottitlemarks\sectiontitle}]% even-right         {\bfseries{\toptitlemarks\thesection$\:$\toptitlemarks\sectiontitle} $\quad$ \bfseries{\scriptsize \toptitlemarks\thesubsection$\:$\toptitlemarks\subsectiontitle}}% odd-left         {}% odd-center         {\thepage}% odd-right     \setfoot[]% even-left         [\thepage]% even-center         []% even-right         {}% odd-left         {\thepage}% odd-center         {}% odd-right     }          \newpagestyle{TitleMarks}{%       \headrule       \sethead[E:Top is~\toptitlemarks\thesection:\toptitlemarks\thesubsection]% even-left         [E:First is~\firsttitlemarks\thesection:\firsttitlemarks\thesubsection]% even-center         [E:Bottom is~\bottitlemarks\thesection:\bottitlemarks\thesubsection]% even-right         {O:Top is~\toptitlemarks\thesection:\toptitlemarks\thesubsection}% odd-left         {O:First is~\firsttitlemarks\thesection:\firsttitlemarks\thesubsection}% odd-center         {O:Bottom is~\bottitlemarks\thesection:\bottitlemarks\thesubsection}% odd-right     \setfoot[][\thepage][]{}{\thepage}{}     }               \pagestyle{main}          \twocolumn          \begin{document}     \section{One}     \lipsum[1]     \section{Two}     \lipsum[1]     \subsection{TwoOne}     \lipsum[1-3]     \subsection{TwoTwo}     \lipsum[1-4]     \section{Three}     \lipsum[1]     \end{document}        And the result (don't mind the strange font for the title/header, that's an artifact of combining two pages in inkscape): ![result3](http://i.stack.imgur.com/MmZB7.png) On page one it states "2 Two" instead of "1 One" (section enclosing first line of text) [This depends on the "length" of secion one, once a part of section one continues into the second column the header switches to "1 One". **Edit:** After some further testing I've come to the conclusion that this a result of using **twocolumn** style, switching to onecolumn text resolves this part of the problem. However, this is not an option for me.] and on page two it prints "2.2 TwoTwo 2 Two" instead of "2.1 TwoOne 2 Two" (i.e. the section&subsection enclosing the first line of that page). **Edit2:** Some further investigation yielded a sort-of-solution for the first problem described above. When using the `fixltx2e` package the header displays "0 Contents" (when there's a ToC) for `\toptitlemarks` and a "1 One" for `\firsttitlemarks` (which is sort-of what I expect yet not the results I'd like to have. Of course it is kind of pointless to tell the reader that on the page just before page one there's the ToC, i.e. this would require either using two pagestyles [one for page one which used `\firsttitlemarks` instead of `\topttitlemarks` and another one for all other pages]). However **I can not use`fixltx2e`** because I need `dblfloatfix` which conflicts with the former (well, more precisely, the former doesn't work anymore when both are loaded) -> this is no solution for me! Is it possible to change that?


title: When to break lines?

text: I am very new to LaTeX. A newline in the input file does not mean anything to LaTeX. An empty line in the input file means a new paragraph. Trouble is, when I view my sources with different text editors on different displays, they look very different (and always bad). So I find myself chopping lines to the about 80-th character or so. This brings the MS Word problem - introduce a line, or even a single word, and you need to edit the whole following paragraph in order that it is nicely positioned on the display (talking about the .tex file). Using `\--soft-wrap` wraps lines around, but is not pleasing to the eye, plus a single move of the cursor could scroll a whole screen - hardly intuative. _How do I write .tex source file, so that anyone - using an IDE or just any editor, can view and edit them comfortable?_


title: How to define a new environment with a fancy box (tikz) around sample source-code (listings)?

text: This is what I want to do:               \documentclass{beamer}          \begin{document}          \begin{frame}[fragile]{Frame 1}              Some \structure{Python} code here:              % I want to define a new "pythoncode" environment, so I can use it like this:         \begin{pythoncode}[hello.py]         #!/usr/bin/env python         def main():             print "Hello, World!"         if __name__ == '__main__':             main()         \end{pythoncode}          \end{frame}          \end{document}      But I want to customize the source-code box beyond what `listings` package allow me. Jan Hlavacek suggested me to use `tikz` package for that, and pointed me to a few examples. Okay, that's great! Tikz gives me enough power and freedom for customization! All I need now is creating a new environment, so that I can use this environment just like in the code above. However, I'm having trouble mixing `tikz` with `listings` inside a new environment. I've tried the following code, but it doesn't work (I get _Missing \endcsname inserted._ ):               \usepackage{listings}     \usepackage{tikz}     \usepackage{environ}          \tikzstyle{sourcecodebox} = [         draw=blue, very thick,         rectangle, rounded corners,         inner sep=10pt     ]     \tikzstyle{sourcecodetitle} = [         fill=black, text=white,         rectangle, rounded corners     ]     \NewEnviron{pythoncode}[1]{         \begin{tikzpicture}         \node[sourcecodebox](box){             \begin{lstlisting}[                 language=Python,                 basicstyle=\ttfamily\footnotesize,                 escapeinside={(*@}{@*)},                 %numbers=left,                 breaklines=true,                 breakatwhitespace=true,                 showspaces=false,                 showstringspaces=false,                 frame=shadowbox,                 frameround=rrrt,                 rulecolor=\color{black},                 rulesepcolor=\color{gray}             ]             \BODY             \end{lstlisting}         };         \node[sourcecodetitle] at (box.north west) {#1};         \end{tikzpicture}     }      Related questions:   * Defining a new environment whose contents go in a TikZ node - It suggests using the `environ` package.   * define a new environment to combine tikzpicture and lstlisting - The question title looks similar, but in fact the question is very different. That question is solved using `showexpl` package.


title: \tableofcontents and \listoffigures -- suppress header after first page

text: I have set the top and bottom margins of a book class document like this:               \setlength{\topmargin}{0in}     \setlength{\headheight}{0in}     \setlength{\headsep}{0in}     \setlength{\textheight}{8.5in}     \setlength{\footskip}{.5in}      and now the header of the \tableofcontents and \listoffigures clashes with (i.e. is printed over) the top line of text. I need to either suppress the headers for these pages (which are currently _CONTENTS_ and _LIST_ _OF_ _FIGURES_ ), or move them up the page a little bit. How is this done? Thanks.


title: How do I set the minimum width of a subfigure?

text: I have:               \subfigure[blah blah blah.]     {     \begin{tikzpicture}[/MyStyle]         ... some stuff...     \end{tikzpicture}      }      But "some stuff" is not that wide and the text in the subfigure produces a lot of underfull hboxes. I want to make the subfigure wider. How do I do that?


title: Multiple authors emails problem

text: I have multiple authors emails on my paper with the same domain and i need to divide the line below on two lines as it is too long, any help?               \documentclass{llncs}          \begin{document}     \title{any title}     \author{John kamdreen,John kamdreen,John kamdreen,John kamdreen,%       John kamdreen,John kamdreen,John kamdreen}     \institute{Center John kamdreen John kamdreen Research\\       $\left\{John.kamdreen,John.kamdreen,John.kamdreen,John.kamdreen,%       John.kamdreen,John.kamdreen,John.kamdreen\right\}$@dalton.edu.au}     \maketitle     \end{document}       The document class is available from the publisher.


title: Combining rows and columns in array

text: I am trying to write some kind of _blockmatrix_ ![enter image description here](http://i.stack.imgur.com/r4TfG.png)               \[A_n=     \left(        \begin{array}{cc|cc}         && 0 & 0 \\         & A_{n-2}&n-2&0 \\         \hline\\         0&-n+2&1&n-1 \\         0&0&-n+1&1         \end{array}     \right)     \]      How can I achieve that the entry in the upper left corner is written in center? Or rephrased: How is it possible two combine the columns (1,1)(1,2)(2,1) and (2,2)?


title: Reversing page order from a point onward

text: In my document, I want pages from a specific point onward to appear in reverse page order, i.e. the last page should come first, then the penultimate page, etc. How can I do it? (I don't want to reverse content - only the order in which pages appear)


title: XeLaTeX warning: Redefining document command \oldstylenums with arg. spec. 'm'

text: I updated my MiKTeX to the newest version a few days ago, and after this when I compile documents with the `fontspec` package included, there's a warning. For example:               \documentclass{article}     \usepackage{fontspec}          \setmainfont{Adobe Garamond Pro}          \begin{document}       Hello, world!     \end{document}      Build Output shows:               *************************************************     * LaTeX warning: "xparse/redefine-command"     *      * Redefining document command \oldstylenums with arg. spec. 'm' on line 107.     *************************************************      Why this happens? How to solve it?


title: Making a 3D colored pyramid in tikz

text: I am trying to recreate the following image in tikz ![enter image description here](http://i.stack.imgur.com/zPNfz.png) Sorry for not including a MWE, but I have problems getting started drawing this. I tried simply writing in the coordinates, but even that turned out wrong. (The point in the middle should have coordinates (2,3,0)) Does anyone have any hints or suggestions? My main problem is setting it up, and perhaps the coloring Here is a very crappy MWE... Did not include it before, because it is so bad               \documentclass[10pt,a4paper]{minimal}     \usepackage{tikz}     \begin{document}     \center     \begin{tikzpicture}     \draw[thick,-stealth] (0,0,0)--(0,0,6);      \draw[thick,-stealth] (0,0,0)--(0,6,0);     \draw[-stealth] (0,0,0)--(6,0,0);     \coordinate[label=$O$] (O) at (0,0,0);     \coordinate[label=$A1$] (A1) at (0,0,5);     \coordinate[label=$A2$] (A2) at (0,5,0);     \coordinate[label=$A3$] (A3) at (5,0,0);     \coordinate[label=$B1$] (B1) at (3,0,0);     \coordinate[label=$B2$] (B2) at (0,0,2);     \coordinate[label=$B3$] (B3) at (3,0,2);     \coordinate[label=$C2$] (C2) at (0,3,2);     \coordinate[label=$C3$] (C3) at (3,2,0);          \draw[fill=blue,opacity=0.3] (A1)--(C2)--(B3);     draw[fill=black,opacity=0.3] (O)--(B2)--(B3)--(B1)     \draw[fill=red,opacity=0.3] (A3)--(C3)--(B3);     \draw[fill=red,opacity=0.3] (B3)--(B1)--(C3);     \draw[fill=blue,opacity=0.3] (C2)--(B2)--(B3);     \draw[fill=brown,opacity=0.3] (B3)--(C2)--(A2)--(C3);     \end{tikzpicture}     \end{document}      ![My attempt](http://i.stack.imgur.com/WF2o8.png)


title: Table is too wide to fit in one page

text: \documentclass{article}     \usepackage{booktabs}     \usepackage{dcolumn}          \begin{document}          \begin{table}[htbp]\centering     \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}     \caption{Cross-sectional regression}     \begin{tabular}{l*{10}{D{.}{.}{-1}}}     \toprule                 &\multicolumn{1}{c}{(1)}         &\multicolumn{1}{c}{(2)}         &\multicolumn{1}{c}{(3)}         &\multicolumn{1}{c}{(4)}         &\multicolumn{1}{c}{(5)}         &\multicolumn{1}{c}{(6)}         &\multicolumn{1}{c}{(7)}         &\multicolumn{1}{c}{(8)}         &\multicolumn{1}{c}{(9)}         &\multicolumn{1}{c}{(10)}         \\     \midrule     rec                 &    -0.00887         &     -0.0302         &      -0.260         &      -0.203         &      -0.196         &      -0.142         &      -0.224         &      0.0137         &      -0.231         &      0.0640         \\                 &    [0.0523]         &    [0.0803]         &     [0.157]         &     [0.120]         &     [0.136]         &     [0.126]         &     [0.117]         &     [0.122]         &     [0.460]         &     [0.224]         \\     \addlinespace     Constant            &     -0.0912\sym{***}&    -0.00939         &       0.124\sym{***}&      0.0729\sym{**} &       0.112\sym{***}&       0.131\sym{***}&       0.148\sym{***}&       0.121\sym{***}&       0.235\sym{**} &       0.149\sym{***}\\                 &    [0.0100]         &    [0.0148]         &    [0.0290]         &    [0.0231]         &    [0.0264]         &    [0.0249]         &    [0.0237]         &    [0.0252]         &    [0.0817]         &    [0.0406]         \\     \midrule     Observations        &        8088         &        7153         &        6154         &        5313         &        4591         &        3983         &        3553         &        3186         &        2818         &        2441         \\     Adjusted \(R^{2}\)  &      -0.000         &      -0.000         &       0.000         &       0.000         &       0.000         &       0.000         &       0.001         &      -0.000         &      -0.000         &      -0.000         \\     \bottomrule     \multicolumn{11}{l}{\footnotesize Standard errors in brackets}\\     \multicolumn{11}{l}{\footnotesize \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)}\\     \end{tabular}     \end{table}     \end{document}      This is the code I used when trying to use to create a table. When I run it and print out the PDF, the table is way too wide to fit on one page. I've been checking out similar questions to mine and tried what's suggested in those answers, but I haven't really gotten it to work.. Any suggestions?


title: Apply \cftpagenumbersoff to multiple sectioning levels

text: This is probably a very basic question, apologies for lacking better knowledge of LaTeX syntax. I want to use `\cftpagenumbersoff` from the `tocloft` package to hide the page numbers (and dots) of some (but not all) sectioning levels, say `section` and `subsection`. I know that in the preamble I could write               \usepackage{tocloft}     \cftpagenumbersoff{section}     \cftpagenumbersoff{subsection}      But I was wondering if I could write something like               \usepackage{tocloft}     \cftpagenumbersoff{section,subsection}      instead (which does not work). I know this only saves me a single line, yet I would love to know what the correct (and efficient) way of putting this would be - if it is possible. Thanks! * * * Just to explain my motivation: I saw an example where               \uspepackage[titles,subfigure]{tocloft}      was used, so I thought it might also be possible to have multiple arguments in the `{}` part, e.g. separated by a comma.


title: bibtex comment out lines

text: I have a bibtex file contains the following line:               @inproceedings{Cai03,     author = {Cai, Deng and Yu, Shipeng and Wen, Ji-Rong and Ma, Wei-Ying},     title = {Extracting Content Structure for Web Pages Based on Visual Representation},     % booktitle = {Proceedings of the 5th Asia-Pacific Web Conference on Web Technologies and Applications},     series = {APWeb'03},     year = {2003},     % isbn = {3-540-02354-2},     % location = {Xian, China},     pages = {406--417},     % numpages = {12},     % url = {http://dl.acm.org/citation.cfm?id=1766091.1766143},     % acmid = {1766143},     % publisher = {Springer-Verlag},     % address = {Berlin, Heidelberg},     }      It can only display the `author` and `title` of the paper after texified. So I am wondering how to also display `series`, `year` and `pages`.


title: Rectangle fitting some text and scaled circuit from circuitikz

text: I am trying to draw rectangle with some text on the left and with electrical schema on the right (all inside one rectangle) I am using following packages:               \usepackage{circuitikz}     \usepackage{tikz}     \usetikzlibrary{positioning,fit,shapes}      The scheme i want to place into the rectangle is something like this:               \documentclass[12pt,oneside,a4paper]{article}     \usepackage{graphicx}     \DeclareGraphicsExtensions{.pdf,.png,.jpg}          \usepackage{circuitikz}     \usepackage{tikz}     \usetikzlibrary{positioning,fit,shapes}          \begin{document}          \begin{circuitikz} [ european resistors ]     \draw[help lines, dotted] (-5,-5) grid (10,6);                % \scalebox{0.6}{     \draw (4, 2)      to [vR, *-*]  ++(-2,-2)     to node (l1) {} ++(0,0)     to [vR, *-*] ++(2,-2)     to [short, -o] ++(0, -1)     to node (b1) {} ++(0,0)     to [short] ++(0, 1)     to [vR, *-*]  ++(2,2)     to node (r1) {} ++(0,0)     to [vR, *-*]    ++(-2,2)     to [short,-o]   +(0, 1)     to node (t1) {} ++(0,0)     ;      % }     \node[fit=(t1) (b1) (l1) (r1), draw, black, rectangle, inner sep=10pt]{};               \end{circuitikz}          \end{document}      ![enter image description here](http://i.stack.imgur.com/eRh1p.png) But when i want to scale it with some factor (0.6) it accidentally scales nodes, but don't do the same with outer rectangle.               \documentclass[12pt,oneside,a4paper]{article}     \usepackage{graphicx}     \DeclareGraphicsExtensions{.pdf,.png,.jpg}          \usepackage{circuitikz}     \usepackage{tikz}     \usetikzlibrary{positioning,fit,shapes}          \begin{document}          \begin{circuitikz} [ european resistors ]     \draw[help lines, dotted] (-5,-5) grid (10,6);                \scalebox{0.6}{     \draw (4, 2)      to [vR, *-*]  ++(-2,-2)     to node (l1) {} ++(0,0)     to [vR, *-*] ++(2,-2)     to [short, -o] ++(0, -1)     to node (b1) {} ++(0,0)     to [short] ++(0, 1)     to [vR, *-*]  ++(2,2)     to node (r1) {} ++(0,0)     to [vR, *-*]    ++(-2,2)     to [short,-o]   +(0, 1)     to node (t1) {} ++(0,0)     ;      }     \node[fit=(t1) (b1) (l1) (r1), draw, black, rectangle, inner sep=10pt]{};          \end{circuitikz}          \end{document}      ![enter image description here](http://i.stack.imgur.com/A5E8d.png) And i really have no idea how to put text inside this pseudo fitting rectangle. I am relatively new to the world of `tikz`, so please give me an advice how to accomplish my task: to place text with scaled scheme inside ? To compound the problem, i need to draw several boxes (with text and scaled schemas) like the above, so i will be very disappointed, if there is not some convenient method of grouping block of nodes (and connections between them) as a single node and to use it further (as a sort of a variable) in other connections.


title: Different width of frame across page bounadries with mdframed

text: When a `mdframed` frame begins with a display math, and the break occurs just at the end of the display math environment, the widths of the frame are different across the page break boundary: ![enter image description here](http://i.stack.imgur.com/c1ip8.png) Also note the inconsistent spacing on the first few lines of the second page. ## Notes:   * The page geometry changes were to allow for a better image to show the problem.   * I encounter this problem with Version `2012/04/08 v1.5`, but apparently the earlier version `2012/03/04 v1.4` works just fine. ## References:   * mdframed : Bug with page break?   * Inconsistent horizontal width of mdframed with only display math content ## Code:               \documentclass{article}     \usepackage[bottom=0.2cm,top=0.2cm]{geometry}     \usepackage{amsmath}     \usepackage{lipsum}     \usepackage{mdframed}     \newmdenv[%         leftmargin=0.5cm,         rightmargin=0.5cm,         backgroundcolor=yellow,%         ]{Myframe}%          \begin{document}     \vspace*{24.75cm}     \begin{Myframe}         \begin{align*}             e &= mc^2\\             F &= ma         \end{align*}         \lipsum[1]     \end{Myframe}     \end{document}


title: Align to the Right - Itemized Items

text: I am using the following template for a document. The only problem I have is the last digit of the number "1900" does not line up with the "s" in the word "apples" on the right side of the file (please refer to the screenshot at the bottom). It seems "1900" would need one extra space to the right to exactly line up with the word "Apples". I don't know how to make that happen.               \documentclass[9pt]{article}     \usepackage{fullpage}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage[usenames]{color}          \leftmargin=0.25in     \oddsidemargin=0.25in     \textwidth=6.0in     \topmargin=-0.25in     \textheight=9.25in          \raggedright          \pagenumbering{gobble}          \def\bull{\vrule height 0.8ex width .7ex depth -.1ex }     % DEFINITIONS          \newenvironment{changemargin}[2]{%       \begin{list}{}{%         \setlength{\topsep}{0pt}%         \setlength{\leftmargin}{#1}%         \setlength{\rightmargin}{#2}%         \setlength{\listparindent}{\parindent}%         \setlength{\itemindent}{\parindent}%         \setlength{\parsep}{\parskip}%       }%       \item[]}{\end{list}     }          \newcommand{\lineover}{         \begin{changemargin}{-0.05in}{-0.05in}             \vspace*{-8pt}             \hrulefill \\             \vspace*{-2pt}         \end{changemargin}     }          \newcommand{\header}[1]{         \begin{changemargin}{-0.5in}{-0.5in}             \scshape{#1}\\         \lineover         \end{changemargin}     }          \newcommand{\contact}[4]{         \begin{changemargin}{-0.5in}{-0.5in}             \begin{center}                 {\Large \scshape {#1}}\\ \smallskip                 {#2}\\ \smallskip                  {#3}\\ \smallskip                 {#4}\smallskip             \end{center}         \end{changemargin}     }               % END DEFINITIONS          \begin{document}          \header{I Eat Apples}     \begin{body}         \vspace{14pt}         \textbf{One Apple} \hfill {Jan 1900}         \vspace*{-4pt}         \begin{itemize} \itemsep -0pt  % reduce space between items             \item Two Apples \hfill{Apples}         \end{itemize}     \end{body}          \end{document}      ![enter image description here](http://i.stack.imgur.com/g88TT.jpg)


title: Problem with the package nomencl

text: I'm writing a report for the university, using a format that I found in the web. The problem is when I compile the `.tex` manuscript, the nomenclature does not appear in the output. Additionally, the ToC does not show the nomenclature page. The instructions used in the application Terminal.app. are:               pdflatex 00_file.tex     makeindex 00_file.nlo -s nomencl.ist -o 00_file.nls     bibtex 00_file     pdflatex 00_file.tex     pdflatex 00_file.tex      The `00_file.tex` contains:                \documentclass[12pt,a4paper,twoside,openright,english]{book}           \usepackage{mathrsfs}      \usepackage{latexsym}      \usepackage{alltt}      \usepackage[explicit]{titlesec}      \usepackage{titletoc}      \usepackage{tikz}      \usepackage{epigraph}      \usepackage{xpatch}      \usepackage{lmodern}      \usepackage{graphicx}      \usepackage{natbib}      \usepackage{pdfpages}      \usepackage[activeacute]{babel}      \usepackage[utf8]{inputenc}       \usepackage{amsmath}      \usepackage{amssymb}      \usepackage{multicol}      \usepackage{wrapfig}      \usepackage{nomencl}      \usepackage[nottoc]{tocbibind}      \usepackage{hyperref}                                 \newlength\ChapWd      \settowidth\ChapWd{\huge\chaptertitlename}           \definecolor{myblue}{RGB}{0,0,122}           \titleformat{\chapter}[display]        {\normalfont\filcenter\sffamily}        {\tikz[remember picture,overlay]          {          \node[fill=myblue,font=\fontsize{60}{72}\selectfont\color{white},anchor=north east,minimum size=\ChapWd]             at ([xshift=-120pt,yshift=-50pt]current page.north east)             (numb) {\thechapter};          \node[rotate=90,anchor=south,inner sep=0pt,font=\huge] at (numb.west)  {\chaptertitlename};          }        }{0pt}{\fontsize{33}{40}\selectfont\color{myblue}#1}[\vskip10pt\Large***]      \titlespacing*{\chapter}        {0pt}{50pt}{10pt}                \makeatletter      \xpatchcmd{\ttl@printlist}{\endgroup}{{\noindent\color{myblue}\rule{\textwidth}{1.5pt}}\vskip30pt\endgroup}{}{}      \makeatother           \newcommand\DoPToC{%      \startcontents[chapters]      \printcontents[chapters]{}{1}{\noindent{\color{myblue}\rule{\textwidth} {1.5pt}}\par\medskip}%      }           \setlength\epigraphrule{0pt}      \renewcommand\textflush{flushright}      \renewcommand\epigraphsize{\normalsize\itshape}           \textwidth=14cm                      \graphicspath{{images/}}             \makenomenclature                     \begin{document}      \include{01_title}           \frontmatter           \setcounter{secnumdepth}{3}       \setcounter{tocdepth}{3}          \tableofcontents                       \printnomenclature                    \listoffigures            \listoftables             \include{03_Experimental}           \backmatter           \begin{multicols}{2}       \begin{tiny}       \bibliographystyle{abbrvnat}      \renewcommand{\bibname}{References}      \bibliography{10_references}       \end{tiny}      \end{multicols}           \end{document}      The `01_title.tex` includes:                \setlength{\unitlength}{1 cm}      \thispagestyle{empty}      %\begin{picture}(5,2)      %\put(0,0){\includegraphics[width=3cm,height=4cm]{UNAM.jpg}}      %\end{picture}      \\      \\      \begin{center}      \normalfont\filcenter\sffamily{{\Huge University}\\[0.5cm]      {\LARGE Institute}}\\[1.25cm]      {\Large Tiltle 1}\\[2.3cm]      {\LARGE \textbf{Notes}}\\[3.5cm]      {\large My name}\\[1.5cm]      Program \\[0.5cm]      City - \today      \end{center}      The `03_Experimental.tex` has:                \chapter{Experimental}      \DoPToC      The velocity profile at the test zone without any room model must resembles the atmospheric boundary layer given by \citep{daniels}            \begin{equation}\label{Uprofile}      u_z=u_r \left(\dfrac{z}{z_r} \right)^{\alpha},      \end{equation}%      \nomenclature{$z$}{Coordinate z [$m$]\nomrefpage}%      \nomenclature{$u_z$}{Velocity [$m/s$]\nomrefpage}%      \nomenclature{$u_r$}{Reference velocity [$m/s$]\nomrefpage}%      \nomenclature{$z_r$}{Reference height [$m/s$]\nomrefpage}%      \nomenclature{$\alpha$}{Exponent profile [$-$]\nomrefpage}%           \noindent where $u_z$ is the velocity at a $z$ height, $u_r$ is the reference velocity, $z_r$ is the reference height and $\alpha$ is the exponent profile.           \newpage      \thispagestyle{empty}      Finally the `10_references.bib` possess:                @book{daniels,         author = "Daniels, K",         publisher = "Birkkäuser Verlay",         title = "The Technology of Ecological Building: Basics Principles, Examples and Ideas",         address = "Germany.",         year = "1997"      }      This is the modified `00_file.tex`, with the `intoc` option for getting the nomenclature into the table of contents:                \documentclass[12pt,a4paper,twoside,openright,english]{book}           \usepackage[explicit]{titlesec}      \usepackage{titletoc}      \usepackage{tikz}      \usepackage{epigraph}      \usepackage{xpatch}       \usepackage{amsmath}      \usepackage[intoc]{nomencl}      \usepackage[nottoc]{tocbibind}                                \newlength\ChapWd      \settowidth\ChapWd{\huge\chaptertitlename}           \definecolor{myblue}{RGB}{0,0,122}           \titleformat{\chapter}[display]        {\normalfont\filcenter\sffamily}        {\tikz[remember picture,overlay]          {          \node[fill=myblue,font=\fontsize{60}{72}\selectfont\color{white},anchor=north east,minimum size=\ChapWd]             at ([xshift=-120pt,yshift=-50pt]current page.north east)             (numb) {\thechapter};          \node[rotate=90,anchor=south,inner sep=0pt,font=\huge] at (numb.west)  {\chaptertitlename};          }        }{0pt}{\fontsize{33}{40}\selectfont\color{myblue}#1}[\vskip10pt\Large***]      \titlespacing*{\chapter}        {0pt}{50pt}{10pt}                \makeatletter      \xpatchcmd{\ttl@printlist}{\endgroup}{{\noindent\color{myblue}\rule{\textwidth}{1.5pt}}\vskip30pt\endgroup}{}{}      \makeatother           \newcommand\DoPToC{%      \startcontents[chapters]      \printcontents[chapters]{}{1}{\noindent{\color{myblue}\rule{\textwidth} {1.5pt}}\par\medskip}%      }           \setlength\epigraphrule{0pt}      \renewcommand\textflush{flushright}      \renewcommand\epigraphsize{\normalsize\itshape}           \textwidth=14cm                           \makenomenclature                     \begin{document}           \frontmatter           \tableofcontents                       \listoftables      \printnomenclature                    \mainmatter           \chapter{Experimental}      \DoPToC           \begin{equation}\label{Uprofile}      u_z=u_r \left(\dfrac{z}{z_r} \right)^{\alpha},      \end{equation}%      \nomenclature{$z$}{Coordinate z [$m$]\nomrefpage}%      \nomenclature{$u_z$}{Velocity [$m/s$]\nomrefpage}%      \nomenclature{$u_r$}{Reference velocity [$m/s$]\nomrefpage}%      \nomenclature{$z_r$}{Reference height [$m/s$]\nomrefpage}%      \nomenclature{$\alpha$}{Exponent profile [$-$]\nomrefpage}%           \noindent where $u_z$ is the velocity at a $z$ height, $u_r$ is the reference velocity, $z_r$ is the reference height and $\alpha$ is the exponent profile.           \newpage      \thispagestyle{empty}           \end{document}      I will appreciate enormously all help to resolve this issue. Thanks to everybody. * * * This is the minimum example:                \documentclass[12pt,a4paper,twoside,openright,english]{book}           \usepackage[explicit]{titlesec}      \usepackage{titletoc}      \usepackage{tikz}      \usepackage{epigraph}      \usepackage{xpatch}       \usepackage{amsmath}      \usepackage[intoc]{nomencl}      \usepackage[nottoc]{tocbibind}                                \newlength\ChapWd      \settowidth\ChapWd{\huge\chaptertitlename}           \definecolor{myblue}{RGB}{0,0,122}           \titleformat{\chapter}[display]        {\normalfont\filcenter\sffamily}        {\tikz[remember picture,overlay]          {          \node[fill=myblue,font=\fontsize{60}{72}\selectfont\color{white},anchor=north east,minimum size=\ChapWd]             at ([xshift=-120pt,yshift=-50pt]current page.north east)             (numb) {\thechapter};          \node[rotate=90,anchor=south,inner sep=0pt,font=\huge] at (numb.west)  {\chaptertitlename};          }        }{0pt}{\fontsize{33}{40}\selectfont\color{myblue}#1}[\vskip10pt\Large***]      \titlespacing*{\chapter}        {0pt}{50pt}{10pt}                \makeatletter      \xpatchcmd{\ttl@printlist}{\endgroup}{{\noindent\color{myblue}\rule{\textwidth}{1.5pt}}\vskip30pt\endgroup}{}{}      \makeatother           \newcommand\DoPToC{%      \startcontents[chapters]      \printcontents[chapters]{}{1}{\noindent{\color{myblue}\rule{\textwidth} {1.5pt}}\par\medskip}%      }           \setlength\epigraphrule{0pt}      \renewcommand\textflush{flushright}      \renewcommand\epigraphsize{\normalsize\itshape}           \textwidth=14cm                           \makenomenclature                     \begin{document}           \frontmatter           \tableofcontents                       \listoftables      \printnomenclature                    \mainmatter           \chapter{Experimental}      \DoPToC           \begin{equation}\label{Uprofile}      u_z=u_r \left(\dfrac{z}{z_r} \right)^{\alpha},      \end{equation}%      \nomenclature{$z$}{Coordinate z [$m$]\nomrefpage}%      \nomenclature{$u_z$}{Velocity [$m/s$]\nomrefpage}%      \nomenclature{$u_r$}{Reference velocity [$m/s$]\nomrefpage}%      \nomenclature{$z_r$}{Reference height [$m/s$]\nomrefpage}%      \nomenclature{$\alpha$}{Exponent profile [$-$]\nomrefpage}%           \noindent where $u_z$ is the velocity at a $z$ height, $u_r$ is the reference velocity, $z_r$ is the reference height and $\alpha$ is the exponent profile.           \newpage      \thispagestyle{empty}           \end{document}


title: How to bring the footnote back to the footer of the page when using thmtools

text: I use `thmtools` for my theorems. But when I use it, my footnotes done with `\footnote{foo}` don't appear in the footer, they are in the footer of the theorem. I declare my theorem like this               \declaretheorem[shaded={bgcolor=red},sibling=definition]{lemma}      This is the way I use them               \begin{lemma}       Lorem ipsum\footnote{bar}.         \end{lemma}


title: How can I align captions with each level of a tree drawn with tikz-qtree?

text: I have drawn a binary tree using the TikZ-qtree package. 1) I now would like to align captions on the right of tree with each of its level---and I would like the placement to be automatic (ideally I only have to specify that I want it at Xpx from the right border of the tree, and the vertical positioning is taken care of by itself). 2) I would like to be able to draw several brackets in the tree ranging some of the (contiguous) nodes. Ideally, again, I would only specify the nodes, and not have to take care about positioning at all!! Here is the code I have at the moment:               \documentclass{article}          \usepackage{tikz, pgf}     \usepackage{tikz-qtree}          \def\tn#1{{\bf #1}}              \begin{document}       \begin{tikzpicture}         \Tree [.0                  [.0                    [.0                     [.{\tn 0} ]                     [.{\tn 1} ] ]                   [.1                      [.{\tn 2} ]                     [.{\tn 3} ] ] ]                 [.1                   [.2                      [.{\tn 4} ]                     [.0                        [.{\tn 0} ]                       [.{\tn 1} ] ] ]                   [.3                      [.1                       [.{\tn 2} ]                       [.{\tn 3} ] ]                     [.2                       [.{\tn 4} ]                       [.0 \edge[roof]; {... } ] ] ] ] ]       \end{tikzpicture}     \end{document}      And here is an illustration of what I aim to do: ![Using a bitmap editing tool, this is what I would like to get \(approximatively\)](http://i.stack.imgur.com/6ENNb.png) Any help much appreciated.


title: Macros with binary trees as arguments

text: I would like to have some macros which have binary trees as arguments. For the purpose of these macros, a binary tree is either `root` or it is `{branch1}{branch2}` for two binary trees `branch1` and `branch2` and these macros should be defined recursively. My thought was that such a macro would look like               \newcommand{\macro}[1]{\bintree@induction{#1}{\macro@root{#1}}{\macro@branches{#1}}     \newcommand{\macro@root}[1]{%describes what to do in the case of a root                                 <some code>}     \newcommand{\macro@branches}[1]{%describes what to do in the case of branches.                                     %Can use {\bintree@branchone #1} and {\bintree@branchtwo #1}                                     %here to access the branches                                     <some code>}          \newcommand{\bintree@induction}[3]{       \ifx{}{\bintree@root #1}       %the binary tree is of the form {branch1}{branch2}       #3       \else       %the binary tree is of the form root       #2       \fi}          %when it finds two branches, it gobbles both of them     \newcommand{\bintree@root}{\@ifnextchar\bgroup{\@bintree@root}{}}     \newcommand{\@bintree@root}[1]{\@ifnextchar\bgroup{\@gobble}{#1}}          %To define the macro recursively, we will usually need to handle the two     %branches. Here's the mechanism that selects them.     %This selects the first branch if there is one; all else it does is irrelevant     \newcommand{\bintree@branchone}{\@ifnextchar\bgroup{\@bintree@branchone}{}}     \newcommand{\@bintree@branchone}[1]{#1\@gobble}          %Gobbles the first branch, takes the second out of its braces     \newcommand{\bintree@branchtwo}{\@ifnextchar\bgroup{\@bintree@branchtwo}{}}     \newcommand{\@bintree@branchtwo}[1]{\@ifnextchar\bgroup{\@@bintree@branchtwo}{}}     \newcommand{\@@bintree@branchtwo}[1]{#1}      But this doesn't work. I believe it's because `\bintree@root #1` isn't truly empty in the case the argument `#1` is of the form `{branch1}{branch2}`. How can I accomplish this? Below I attach a MWE where I need this. There I've found some workarounds, but I don't see how I can define a macro by induction on binary trees in general in a similar way. So my question is: _how I can do the macro`\bintree@induction` correctly._ If anybody knows of a different approach to this problem I'd be very pleased to know about that too. I have the feeling my code is very clumsy with the overuse of all the `@`'s. * * *               \documentclass{article}     \usepackage{amsmath}     \usepackage{comment}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%% General induction on binary trees.     %%%% This is used for the macro \jhom@dom@wk below only. For the others     %%%% I found an ad hoc method to get things working...          \makeatletter     \newcommand{\bintree@induction}[3]{       \ifx{}{\bintree@root #1}       %the binary tree is of the form {branch1}{branch2}       #3       \else       %the binary tree is of the form root       #2       \fi}          %when it finds two branches, it gobbles both of them     \newcommand{\bintree@root}{\@ifnextchar\bgroup{\@bintree@root}{}}     \newcommand{\@bintree@root}[1]{\@ifnextchar\bgroup{\@gobble}{#1}}          %To define the macro recursively, we will usually need to handle the two     %branches. Here's the mechanism that selects them.     %This selects the first branch if there is one; all else it does is irrelevant     \newcommand{\bintree@branchone}{\@ifnextchar\bgroup{\@bintree@branchone}{}}     \newcommand{\@bintree@branchone}[1]{#1\@gobble}          %Gobbles the first branch, takes the second out of its braces     \newcommand{\bintree@branchtwo}{\@ifnextchar\bgroup{\@bintree@branchtwo}{}}     \newcommand{\@bintree@branchtwo}[1]{\@ifnextchar\bgroup{\@@bintree@branchtwo}{}}     \newcommand{\@@bintree@branchtwo}[1]{#1}     \makeatother          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \newcommand{\jterm}[3]{#1 \vdash #3:#2}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%     %%%% To get a feeling of how the command works, here are a few examples.     %%%% \ctxext{A}{B} will print A.B     %%%% \ctxext{{A}{B}}{C} will print (A.B).C     %%%% \ctxext{{{A}{B}}{C}}{{D}{E}} will print ((A.B).C).(D.E)          \makeatletter     \newcommand{\ctxext}[2]{\@ctxext@ctx #1.\@ctxext@type #2}     \newcommand{\@ctxext}{\@ifnextchar\bgroup{\@@ctxext}{}}     \newcommand{\@ctxext@ctx}{\@ifnextchar\ctxext{\@ctxext@nested}{\@ifnextchar    \ctxwk{\@ctxwk@nested}{\@ctxext}}}     \newcommand{\@ctxext@type}{\@ifnextchar\ctxext{\@ctxext@nested}{\@ifnextchar\subst{\@subst@nested}{\@ctxext}}}     \newcommand{\@@ctxext}[1]{\@ifnextchar\bgroup{\@ctxext@parens{#1}}{#1}}     \newcommand{\@ctxext@parens}[2]{(\ctxext{#1}{#2})}     \newcommand{\@ctxext@nested}[3]{\@ctxext@parens{#2}{#3}}     \makeatother          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%          \makeatletter     \newcommand{\ctxwk}[2]{\langle\@ctxwk@act #1\rangle\@ctxwk@pass #2}     \newcommand{\@ctxwk}{\@ifnextchar\bgroup{\@@ctxwk}{}}     \newcommand{\@@ctxwk}[1]{\@ifnextchar\bgroup{\ctxwk{#1}}{#1}}     \newcommand{\@ctxwk@act}{\@ctxwk}     \newcommand{\@ctxwk@pass}{\@ifnextchar\ctxext{\@ctxext@nested}{\@ifnextchar\subst{\@subst@nested}{\@ctxwk}}}     \newcommand{\@ctxwk@parens}[2]{(\ctxwk{#1}{#2})}     \newcommand{\@ctxwk@nested}[3]{\@ctxwk@parens{#2}{#3}}     \makeatother          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \makeatletter     \newcommand{\jhom}[3]{\jterm{\jhom@dom@ext{#1}}{\jhom@dom@wk{#1}{#2}}{#3}}          %%%% First define \jhom@dom@ext     \newcommand{\jhom@dom@ext}[1]{\@jhom@dom@ext #1}     \newcommand{\@jhom@dom@ext}{\@ifnextchar\bgroup{\@@jhom@dom@ext}{}}     \newcommand{\@@jhom@dom@ext}[1]{\@ifnextchar\bgroup{\@@@jhom@dom@ext{#1}}{#1}}     \newcommand{\@@@jhom@dom@ext}[2]{\ctxext{\jhom@dom@ext@nested #1}{\ctxwk{\jhom@dom@ext{#1}}{\jhom@dom@ext@nested #2}}}          %%%% The later occurences of context extension should be with parentheses     \newcommand{\jhom@dom@ext@nested}{\@ifnextchar\bgroup{\@jhom@dom@ext@nested}{}}     \newcommand{\@jhom@dom@ext@nested}[1]{\@ifnextchar\bgroup{\@@jhom@dom@ext@nested{#1}}{#1}}     \newcommand{\@@jhom@dom@ext@nested}[2]{\@ctxext@parens{\jhom@dom@ext@nested #1}{\ctxwk{\jhom@dom@ext{#1}}{\@jhom@dom@ext@nested #2}}}          %%%% Now define \jhom@dom@wk. Here I don't see how I can do something similar as     %%%% before. Hence try the more general approach that doesn't really work...     \newcommand{\jhom@dom@wk}[2]{\bintree@induction{#1}{\jhom@dom@wk@root{#1}{#2}}                                 {\jhom@dom@wk@branches{#1}{#2}}}     \newcommand{\jhom@dom@wk@root}[2]{\ctxwk{\bintree@root #1}{#2}}     \newcommand{\jhom@dom@wk@branches}[2]{\ctxwk{\jhom@dom@ext{\bintree@branchone #1}}{\jhom@dom@wk{\bintree@branchtwo #1}{#2}}}     \makeatother          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}     The following output          \begin{align*}     & \jhom{\Gamma}{\Delta}{f}\\     & \jhom{{\Gamma_1}{\Gamma_2}}{\Delta}{f}\\     & \jhom{{{\Gamma_{11}}{\Gamma_{12}}}{\Gamma_2}}{\Delta}{f}\\     & \jhom{{\Gamma_1}{{\Gamma_{21}}{\Gamma_{22}}}}{\Delta}{f}     \end{align*}     should be the same as     \begin{align*}     & \jterm{\Gamma}{\Delta}{f}\\     & \jterm{\ctxext{\Gamma_1}{\ctxwk{\Gamma_1}{\Gamma_2}}}{\ctxwk{\Gamma_1}{{\Gamma_2}{\Delta}}}{f}\\     & \jterm{\ctxext{{\Gamma_{11}}{\ctxwk{\Gamma_{11}}{\Gamma_{12}}}}                     {\ctxwk{\ctxext{\Gamma_{11}}{\ctxwk{\Gamma_{11}}{\Gamma_{12}}}}                            {\Gamma_2}}}       {\ctxwk{\ctxext{\Gamma_{11}}{\ctxwk{\Gamma_{11}}{\Gamma_{12}}}}{{\Gamma_2}{\Delta}}}{f}\\     & \jterm{\ctxext{\Gamma_1}{\ctxwk{\Gamma_1}{\ctxext{\Gamma_{21}}{\ctxwk{\Gamma_{21}}{\Gamma_{22}}}}}}{\ctxwk{\Gamma_1}{{\ctxext{\Gamma_{21}}{\ctxwk{\Gamma_{21}}{\Gamma_{22}}}}{\Delta}}}{f}     \end{align*}               \end{document}


title: Passing multiple arguments from ProcessList (xparse) to a macro. Result to be used in tabular

text: I am making a macro that will take user input of a grading scheme and place it into a tabular environment. I would like the syntax to be as simple as possible and decided on:               \tabulate{ eval1,%1 ; eval2,%2 ; ... ; evaln,%n}      as the input scheme, e.g.               \tabulate{Midterm 1,15\% ; Midterm 2,20\%}      Having asked question about building a table from a macro previously, I know that I should (need to?) use toks to build the rows of the table. My first attempt was the following:               \documentclass{article}     \usepackage{xparse}          \makeatletter     \newtoks\@tabtoks     \newcommand\addtabtoks[1]{\@tabtoks\expandafter{\the\@tabtoks#1}}     \newcommand*\resettabtoks{\@tabtoks{}}     \newcommand*\printtabtoks{\the\@tabtoks}     \makeatother          \DeclareDocumentCommand \tabulate%     { > { \SplitList { ; } } m }%     {\ProcessList {#1} {\mycommand}}     \def\mycommand#1,#2{\addtabtoks{#1&#2\\ }}      It took me a while to sort of figure out why this didn't work: the #1 is passed from ProcessList to mycommand as a single token and can't be read as individual tokens? Question: Is my understanding of why the above doesn't work reasonably correct? If not, could someone please clarify? Based on that fuzzy understanding, I came up with a solution that works but deviates from my desired input scheme (this is the almost working example):               \documentclass{article}     \usepackage{xparse}          \makeatletter     \newtoks\@tabtoks     \newcommand\addtabtoks[1]{\@tabtoks\expandafter{\the\@tabtoks#1}}     \newcommand*\resettabtoks{\@tabtoks{}}     \newcommand*\printtabtoks{\the\@tabtoks}     \makeatother          \DeclareDocumentCommand \tabulate%     { > { \SplitList { ; } } m }%     {\ProcessList {#1} {\mycommand}}     \newcommand{\mycommand}[1]{     \def\temp{#1}     \expandafter\mycommandTwo\temp     }     \def\mycommandTwo#1,#2{\addtabtoks{#1&#2\\ }}          %{\ProcessList {#1} {\mycommand}}     %\def\mycommand#1,#2{\addtabtoks{#1&#2\\ }}               \begin{document}          \resettabtoks     \tabulate{Midterm 1,{15\%};Midterm 2,{20\%};Midterm 3,{25\%}}          \begin{tabular}{cc}         \printtabtoks     \end{tabular}          \end{document}      Again, based on my fuzzy understanding, I stored the argument from ProcessList in a macro that gets expanded and can therefore be read as individual tokens by mycommandTwo. Depending on whether I understood the initial problem correctly, this may not be the correct interpretation. My problem is that without grouping the percentages as above, ie. `{15\%}` rather than just `15\%` I don't get the output that I want. I'm not sure why that is the case. Could anyone help me understand why the percentages need to be grouped and/or suggest a possible fix/improvement on what I currently have. My previous attempt involved parsing the csv `eval,%`, prepending each entry with an `&`, and then deleting the first `&` in the resulting list but I couldn't make it work. Thanks in advance! Edit 1: Thinking about it now, I would prefer to insulate the user from even needing to enter the `\` prior to the `%`'s, although I suspect that would require more knowledge than I have.


title: Using indexing packages with memoir

text: Friends, as you probably know, I have a quite complex document for cataloging songs. `:)` As my normal workflow, I use the `book` document class with some dozens of packages loaded. I've been playing with `memoir` in other documents for a while and obtained very nice results. The idea of a "batteries-included" class is tempting and some of its features make much of my stuff very easy to achieve. So everything was settled for migration, except for one thing: indices. This particular document of mine requires several indices, up to 30. As we know, with a setting this crazy TeX can run out of registers in a blink of an eye. I've been using either `splitidx` or `imakeidx` to output the indices in only one big `.idx` file and then use the `splitindex` command line app to, well, split indices. `:)` `memoir` has a built-in indexing support. As far as I went in the documentation, there's no mention of a limitation of number of indices, but it seems it's implied there, since we also define the index extension. I could not find any references on relying on an external indexing package, and it's known that `imakeidx` is not compatible with `memoir`. Sob! **Edit:** From version 1.1 on, `imakeidx` now supports `memoir`, yay! `:)` I beseech for your wisdom, o `memoir` power users: how can I use a indexing package with `memoir` or, if possible, make it provide support for 16+ indices? `:)` **Edit:** Terribly sorry, I should've made a M(n)WE. `:)`               \documentclass{memoir}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \makeindex[aaa]     \makeindex[bbb]     \makeindex[ccc]     \makeindex[ddd]     \makeindex[eee]     \makeindex[fff]     \makeindex[ggg]     \makeindex[hhh]     \makeindex[iii]     \makeindex[jjj]     \makeindex[kkk]     \makeindex[lll]     \makeindex[mmm]     \makeindex[nnn]     \makeindex[ooo]     \makeindex[ppp]     \makeindex[qqq]     \makeindex[rrr]     \makeindex[sss]     \makeindex[ttt]     \makeindex[uuu]     \makeindex[vvv]     \makeindex[www]     \makeindex[xxx]     \makeindex[yyy]     \makeindex[zzz]          \begin{document}          Hello world.          \end{document}      which blows up the evil               Writing index file lll.idx      ! No room for a new \write .     \alloc@ ...else \errmessage {No room for a new #2}                                                       \fi \fi      l.49 \makeindex[mmm]          ?


title: Why is LaTeX refusing to create a new page to place content?

text: Ihave stumbled upon strange behavior (at least for me). I am generating a document composed of a set of blank framed boxes, each with a text attached above, and it will always be most likely necessary to span more than page. But as soon as the number of boxes-texts warrants a new page, pdfLaTeX simply refuses to do so, throwing a "Missing $ inserted" error. I'm attaching my source, trying as much as possible to keep it short. The `companylogo` is placed next to this .tex file (But curious enough, it does not appear in the output). Thank you.               \documentclass[12pt,lettersize,twoside,twocolumn]{article}          \usepackage[utf8]{inputenc}     \usepackage[spanish,es-tabla]{babel}  % The original content is written in spanish.     \usepackage[fixlanguage]{babelbib}     \usepackage{amssymb,amsmath}     \usepackage{graphicx}        \usepackage{array}        \usepackage{caption}     \usepackage{subcaption}     \usepackage{rotating}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{calc}     \usepackage{stfloats}     \usepackage{fixltx2e}          % Document margins     \usepackage[top=1cm, bottom=1cm, left=1cm, right=1cm]{geometry}          % Headers Config.     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead{}     \renewcommand{\headrulewidth}{0.4pt}     \setlength{\headheight}{2.5cm}      \addtolength{\textheight}{-2.22cm}     \fancyhead[LO,RE]{\includegraphics[height=2.22cm]{companylogo}}     \fancyhead[LE,RO]{}          % Footers Config.     \fancyfoot{}     \renewcommand{\footrulewidth}{0pt}     \fancyfoot[C]{\thepage}      % Use dot as decimal point     \decimalpoint     % Enable page-broken equations     \allowdisplaybreaks[2]     % Command macros     \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}     \newcommand{\emptybox}[2]{\fbox{\begin{minipage}{#1}\hfill\vspace{#2}\end{minipage}}}     \newcommand{\elembox}[1]{\begin{center}#1 \\ \emptybox{3cm}{3cm} \end{center}}          \title{SomeTitle}          % Remove author and date info from title     \makeatletter     \renewcommand{\@maketitle}{      \vspace{-2cm}      \begin{center}%       {\LARGE \@title}%      \end{center}%      \par} \makeatother          \begin{document}     \maketitle          \elembox{1206 (1)}     \elembox{2512 (2)}     \elembox{0805 (1)}     \elembox{carbon-resistor-0.5W (1)}     \elembox{oar-5 (1)}     \elembox{1206 (2)}     \elembox{0603 (2)}     \elembox{2416 (1)}     \elembox{oar-5 (1)}     \elembox{carbon-resistor-0.5W (1)}     \elembox{qfn40 (1)}     \elembox{dip44 (2)}     % Up to this many \elemboxes this compiles. but if you uncomment the one below, BOOM.          % \elembox{dip8 (2)}     % More \elemboxes to follow, but starting from the one above, pdfLaTeX throws the error.          \end{document}


title: Specifying dimensions of text

text: For a submission requirement I need that my document exactly fills a box of m x n inches. Does anybody know how I can specify this in LaTeX?


title: alignment problem with the + sign in chemfig (zero width arrow)

text: I created two molecules in chemfig and would like to place a + mark vertically aligned in the middle between the two molecules. There is an example of this demonstrated in the manual (see the code), but i'm unable to reproduce it using my own alignment. How can I achieve the result I wanted (also tikz hacks are welcome, althought I prefer to stay within chemfig)               \documentclass{article}     \usepackage{chemfig}     \begin{document}     %my molecules, the + sign should be alligned in middle just as the manual example     \schemedebug{true}     \schemestart[][west]     \chemname{\chemfig{C(=O)(-[4]H)-[6]C(-H)(-[4]OH)-[6]CHOH}}{\footnotesize{L-glyceraldehyde}}     \arrow{0}[,0]\+     \chemname{\chemfig{COO\textsuperscript{-}-[6]C(=O)-[6]CH}}{\footnotesize{pyruvate}}     \schemestop          \bigskip     %example taken from the chemfig manual (page 67)     % + sign is correctly aligned to the middle.     \schemedebug{true}     \schemestart[][west]     \chemfig{C(<[:40])(<[:160])=[6]C(<[:-130])<[:-20]}     \arrow{0}[,0]\+     \chemfig{\lewis{246,Br}-\lewis{026,Br}}     \schemestop     \end{document}


title: Section break that displays content iff it occurs in middle of a page

text: I'm trying to create a section break that will display a separator when it occurs in the middle of a page, but display nothing if it lies at the top or bottom of a page, where there's nothing to be separated. The closest I've been able to find is \pfbreak of the memoir class, but this does the inverse of what I want (displays content at the top or bottom, but not in the middle of a page). I was hoping to pull the code out of the file here (from line 10858, \def\pfbreakOutput seems to be the part of interest) but getting the behaivor I want looks to involve redesigning the output routine, which is well above my head. Can anyone either suggest a way of changing this to get an \inversepfbreak command as described, or an alternative way of going about this? Another possibility might be setting up \label{end-of-section} and \label{start-of-next-section}; I would imagine it is possible to do a string comparison on their \pageref's and show/hide the content based on this. I don't think this is will be a good solution though, since you can't determine the page until it has been processed, after which the page breaks will all change anyway if I start adding/removing page separators. Thanks! Christopher


title: Can I redefine an environment to generate an error?

text: I know how to use `\renewenvironment` to redefine an environment, but instead of changing formatting, I'd like to have any use of the environment generate an error (log and abort). Is there a way to do this?


title: Placing a bar/graphic before the section headers

text: I've used the titlesec package to produce section headers like this: ![screenshot](http://i.imgur.com/YA7vApXm.png)   Click for a full-resolution version. Using this minimal code:               \documentclass{article}     \usepackage[compact]{titlesec}     \usepackage{blindtext}     \usepackage{tikz}\usetikzlibrary{shapes.misc}          \newcommand\secbar {         \tikz[baseline, trim left=3.2cm]          {             \fill [white] (3cm,0.1ex) rectangle +(0.2cm,1.1ex);             \draw [gray!95, fill=gray!80] (0cm,0.1ex) rectangle (3cm,1.1ex);                 }     }     \newcommand\subsecbar {         \tikz[baseline, trim left=2.2cm]          {             \fill [white] (2cm,0.1ex) rectangle +(0.2cm,1.1ex);             \fill [blue!40] (0cm,0.1ex) rectangle (2cm,1.1ex);               }          \titleformat{\section}{\large}{}{0cm}{\secbar}     \titleformat{\subsection}{\large}{}{0cm}{\subsecbar}          \begin{document}     \section{A section}     \subsection{A subsection}     \end{document}      However, I'd like the use the memoir package, which is incompatible with titlesec. I know that memoir has its own commands to alter sections. For example, `\setsechook{Hello}` will place "Hello" before the section header. However, it also places a newline after "Hello". I haven't made able to make much progress looking at the memoir documentation. Can someone guide me to reproducing the same section header commands as above but using the memoir package and without titlesec?


title: How do you put multiple paragraphs in a caption?

text: I have a really long caption for a figure in a LaTeX document. I would like to break the caption into a few paragraphs. How do I do that? As per the request below, I removed everything I could while still getting the errors I mentioned in my comment. The resulting file is this:               \documentclass{article}          \usepackage[pdftex]{graphicx}     \usepackage{hyperref}          \graphicspath{{./Figures/}}          \begin{document}          \begin{figure}     \includegraphics{NodesEdgesExample2.pdf}     \caption{     Paragraph 1.            Paragraph 2.          Paragraph 3.     }     \label{fig:AltNavigationConcept}     \end{figure}          \end{document}      We're building it in TeXnicCenter, and I verified that another person in my research lab also gets the same errors on his computer with the above code.


title: Convert string to file name and use in \href

text: I have a bunch of individual .tex files and want to be able to click on a link in one PDF file and have the appropriate PDF file open. These are small files, so don't really need to index into them, just have them open. The file name to open can (in most cases) be determined from the descriptive link text -- algorithm below. There will be a few cases where the file name can not be easily determined, so for that I want to also be able to manually specify it. So, I define:               \NewDocumentCommand{\CrossReference}{O{\NoValue} m}      where               #1 = optional file name (determined from #2 if not provided)     #2 = link text      I have the case where I manually specify the file name working in the MWE below. However, since the file names can easily be determined, I would like to not have to provide it. That is where `\ConvertToFileNameWithPath` is supposed to do its job. ## File Naming Algorithm: If the file name is not specified, it is obtained form the given link text by:   1. Change all characters to lower case.   2. Replace any blanks with a dash.   3. Add the `.pdf` extension ## Notes:   1. For the MWE below to work (ie, to test that the links are click able), the file `equation-of-circle.pdf` must exist in the current directory.   2. Eventually, the macro `\ConvertToFileNameWithPath` will search for this file name in a particular list of directories -- will tackle that next. So that will be step 4 in the above algorithm.   3. I did look at the `xr` package and not sure it is appropriate for this case, mostly due to **Note 2** (there may be multiple files with the same name). ## References/Failed Attempts:   * I attempted to adapt Joseph Wright's answer at Are there purely expandable variants of \MakeUppercase?, but was not successful. Also on the same question it mentions that `\tl_expandable_lowercase:n` is now available so that should certainly help. But not understanding `expl3`, I can't get much further than this.   * My start at this is based on Bruno Le Floch's answer to my question: Text being output when none should be. Not that I was able to get very far with this, but perhaps this might help others figure this out.   * I also attempted to use a sequence of `\StrSubstitute{\Temp}{A}{A}[\Temp]`, `\StrSubstitute{\Temp}{B}{b}[\Temp]` to make the conversion, but this runs into expansion issues, and using `\tl_expandable_lowercase:n` should be easier. ## Code: When the text above and below the `\hrule` is that same then this should be working: assuming of course you have `equation-of-circle.pdf` in the current directory, and can open it via lines 1 and 3. Currently I can only open it via line 1 where I have manually specified the file name: ![enter image description here](http://i.stack.imgur.com/n22A0.png)               \documentclass{article}     \usepackage{xparse}     \usepackage{xcolor}     \usepackage{hyperref}               %\ExplSyntaxOn -- am guessing that this will be needed...     \DeclareExpandableDocumentCommand{\ConvertToFileNameWithPath}{o m}{%         % This will eventually also locate a file in a given path          \IfNoValueTF{#1}{% file name not specified so need to figure it out             % ????????? What goes here ???????             ./#2.pdf% Need to convert #2 to a file name. ????????         }{% We were given, the file name -- Even I can handle this case             ./#1.pdf%         }%       }     %\ExplSyntaxOff          \NewDocumentCommand{\CrossReference}{O{\NoValue} m}{%         % #1 = optional file name (determined from #2 if not provided)         % #2 = link text         \edef\PdfFileName{\ConvertToFileNameWithPath[#1]{#2}}%         \IfFileExists{\PdfFileName}{%             \href{run:\PdfFileName}{#2}%         }{%             \fcolorbox{red}{yellow}{#2}%             \footnote{Unable to locate \PdfFileName}%         }%     }%          \begin{document}     Manual References: \CrossReference[equation-of-circle]{Equation of Circle}%          Manual References: \CrossReference[non-existant-file]{Non Existant File}%          \medskip\hrule\medskip          Automatic References: \CrossReference{Equation of Circle}%          Automatic References: \CrossReference{Non Existant File}%     \end{document}


title: Page name "title page" instead of "1" in biblatex

text: I have a title page, which should not have a real "page number". Therefore, after the title page, I set the pagecounter to 1 with               \setcounter{page}{1}      Of course, internally, the title page still has the number 1, which normally does not matter (since it does not display it). Now I got a problem: on the title-page, I have an image and I need to give credits to the artist with a small text like "image courtesy of bla..." and I'd like to use biblatex for this, because, well... it's a source, and it's quite convienent to use. But since the internal page number where it occurs is 1, in the bibliography it appears as if it was one page 1. Is there any way to let "(see title page)" instead of "(see page 1)" be shown? Since page is a counter, I cannot set it to a string, obviously (I tried anyway and it, of course, didn't work).


title: Should one Share their Latex Documents on GitHub

text: I am not sure if this question exactly fits here, but this is the best to my judgement. I understand GitHub is mainly for posting hobby (or commercial) programming projects . I was wondering, does it make sense to share Latex related documents on GitHub public profiles.


title: Congruence relation instead of arrow

text: \[     \begin{tikzpicture}      \matrix(m)[          matrix of math nodes,          column sep=1cm       ]{0 & E[m]/mE(K) & H^1(G_{\bar{K}/K},E[m])) &  H^1(G_{\bar{K}/K},E)[m] & 0.\\         &  &  & WC(E/K) &  \\};     \foreach[count=\i,evaluate={\j=int(\i+1)}]\text in {{},{$\delta$},${}$,{}}     \path[-angle 90,font=\scriptsize](m-1-\i)edge node[above]{\text}(m-1-\j);     \end{tikzpicture}     \]      I have this so far. How do I add in a congruence relation symbol `$\cong$` between `$H^1(G_{\bar{K}/K},E)[m]$` and `$WC(E/K)$` while not changing anything else?


title: Need help in order to rewrite a proof environment

text: I have the following document (that I have shortened considerably), and have several proofs that are of type: "Let x be in set A then go on iff this is true iff this is true, etc and end with therefore foo foo foo." To be honest, I am not quite sure what I want the end result to look like, but there has to be a better way than what I have. Below is my curtailed document. Please help.               \documentclass[12pt,a4paper,oneside]{report}      \usepackage[left=2.00cm,right=2.00cm,top=2.45cm,bottom=2.5cm]{geometry}        \usepackage{amsmath,amssymb,amsthm,amscd,amstext}          \def  \st    {\backepsilon}     \DeclareMathOperator{\dom}{dom}     \DeclareMathOperator{\rng}{rng}          \begin{proof}     \begin{align*}       Let y \in \rng{R^{-1}} &\iff \exists x \in Y \st (x,y) \in R^{-1}.\\       &\iff \exists x \in Y \st (y,x) \in R.\\       &\iff y \in \dom{R}.     \end{align*}     $\therefore \rng{R^{-1}} = \dom{R}.$     \end{proof}     \end{document}


title: Fancy cover page

text: Can I get help creating a fancy cover page like this one: ![enter image description here](http://i.stack.imgur.com/J31XT.png) I have the logo in an SVG file: ![enter image description here](http://i.stack.imgur.com/2xMa9.png) PS: I'm using LyX on Ubuntu * * * I have the fancy footer working, but no hope of doing the rest by myself.               \usepackage{hyperref}     \usepackage{lipsum}     \usepackage{fancyhdr}     \usepackage{xcolor}     \usepackage{etoolbox}     \pagestyle{fancy}     \makeatletter     \definecolor{curry}{RGB}{29,109,136}     %\fancyfoot[RO, LE] {\color{black} \thepage}     \patchcmd{\@fancyfoot}{\rlap}{\color{curry}\rlap}{}{}     \makeatother     \fancyhead[LE,LO]{}     \fancyfoot[C]{\color{black} {\hfill \thepage}\\     \color{curry} \fontsize{10}{11} \selectfont CEPWC Working Paper Series No. 13 July 2013.\\     Available at \url{ http://curry.virginia.edu/research/centers/cepwc/publications}.\\     Curry School of Education | Frank Batten School of Leadership and Public Policy | University of Virginia}     \renewcommand{\headrulewidth}{0.0pt}     \renewcommand{\footrulewidth}{0.0pt}     \fancyhead[R]{Martinez, Lessons from a MOOC}


title: Biblatex and books in multiple series

text: In `biblatex`, as far as I can see, there is only the possibility to have a book or other similar item (leaving aside articles because they are handled differently) in a single series. I have a book that is counted in two different publication series. Here is a MWE for that book:               \documentclass{article}     \usepackage{filecontents}          \begin{filecontents}{jobname.bib}     @book{Liverani2005:Barkat,     title = {Aghram Nadharif},     subtitle = {The Barkat Oasis (Sha'abiya of Ghat, Lybian Sahara) in Garamantian Times},     editor = {Liverani, Mario},     location = {Firenze},     publisher = {All'insegna del giglio},     date = {2005},     series = {Arid zone archaeology monographs},     number = {5},     series = {Archaeology of Libyan Sahara},     number = {2},     isbn = {9788878144712},      }     \end{filecontents}          \usepackage[style=authoryear,isbn=false,backend=biber]{biblatex}     \bibliography{jobname}          \begin{document}     \nocite{*}     \printbibliography     \end{document}      When you compile this as it is, only the second series is displayed in the output. I realize that since the fields share a name, biblatex/biber probably can't recognize that there should be two different series printed. The second series/number combination overwrites the first. Is there any way such that both series can be displayed in the output? I imagine one would have to define new fields like `series1, number1, series2, and number2` to make this work, but I am too inexperienced with biblatex to figure out a way to make this work.


title: emacs keystroke remapping fails under TeX mode

text: I've remapped **Ctrl-j** to **next-line** with `(global-set-key "\C-j" 'next- line)` but this doesn't work under **TeX mode** where **Ctrl-j** "insert two hard returns (standard end of paragraph) and check syntax of paragraph". Is there a work around?


title: Moving Table to Left and Adding Space to Columns

text: In the following table, the numbers take up too much room. I do not want to landscape the table because there are too many rows. So, I'd like to do both of the following:   1. Create more space between some of the columns. Especially if some columns don't require as much width, I'd like to know whether it is better that I manually set this space in order to optimize.   2. Shift the table to both the left and right in the process. When I adjust the `\textwidth`, that just moves it to the right. I'd like the table to still remain centered within the page.  I'd like for the contents to be centered within each column as they are with the current code. I see a similar posting, but I don't know how to incorporate the results and if that is exactly what I'm trying to do: Adding space between columns in a table               \documentclass[12pt,english]{article}     \usepackage{longtable}     \usepackage{fullpage}     \usepackage{times}     \usepackage[flushleft]{threeparttable}     \usepackage[font=large,labelfont=bf,tableposition=top,textfont=bf]{caption}     \usepackage{tabularx}     \usepackage{booktabs}     \newcolumntype{C}{>{\centering\arraybackslash}X}          \begin{document}          \clearpage \newpage     \begin{table}[!ht]     \caption{Table Title}     \def\arraystretch{1.05}     \vspace{-0.2cm}     \begin{threeparttable}     \small     \begin{tabularx}{\textwidth}{l*{10}{C}}     \hline \hline \addlinespace      & (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) \\       Variable Name & 1234566 & 6543216 & 2233456 & 6655432 & 1830349 & 1234532 & 2532534 & 838285 & 123456 & 1285838 \\     \hline \hline \addlinespace      \end{tabularx}     \begin{tablenotes}     \vspace{0.1cm}     \footnotesize{          \item \noindent \hspace{-1.8mm} Notes:            \noindent Sources:       }     \end{tablenotes}     \end{threeparttable}     \end{table}          \end{document}


title: Aligning Decimal Points in Table

text: I want to align two numbers in two different rows the decimal point. I do see a link for that here: Aligning numbers by decimal points in table columns However, I don't understand how to incorporate that into my code. What follows is a reduced version of my code.               \documentclass[12pt,english]{article}     \usepackage{longtable}     \usepackage{fullpage}     \usepackage{times}     \usepackage[flushleft]{threeparttable}     \usepackage[font=large,labelfont=bf,tableposition=top,textfont=bf]{caption}     \usepackage{tabularx}     \usepackage{booktabs}     \newcolumntype{C}{>{\centering\arraybackslash}X}          \begin{document}          \clearpage \newpage     \begin{table}[!ht]     \caption{Table Title}     \def\arraystretch{1.05}     \vspace{-0.2cm}     \begin{threeparttable}     \small     \begin{tabularx}{\textwidth}{l*{10}{C}}     \hline \hline \addlinespace     & (1)  \\       Variable Name & 0.1234566  \\     & (0.1234566) \\     \hline \hline \addlinespace      \end{tabularx}     \begin{tablenotes}     \vspace{0.1cm}     \footnotesize{          \item \noindent \hspace{-1.8mm} Notes:            \noindent Sources:       }     \end{tablenotes}     \end{threeparttable}     \end{table}          \end{document}


title: How to include a picture over two pages, left part on left side, right on right (for books)?

text: When writing a long book (from 300 to over a 1000 pages), there is often need to include large pictures and one wishes to have them displayed over two pages, left half on the left page, right half on the right page. If one cuts the picture in two halves and includes them both separately, there is a large possibility that they will not end up each on their respective page (i.e. next to each other). If there are many many pictures to be added (from 50 to up to 200 pictures per book), splitting each picture in two halves manually is not acceptable, especially if a tiny change in font size shifts the whole document, resulting in a big mess with pictures: the left part now appears on the right page side and vice versa. **Question:** How can I create a command `\twopagepicture{position = t or b}{width = l or p}{mypicture.jpg}` with the following properties:   * t ... top of page    * b ... bottom of page    * l ... line width    * p ... page width the **left half of the picture is displayed on the left page** ( _nearest to the place/text where the command was called_ ) and the **right half on the NEXT (right) page**. For example `\twopagepicture{t}{l}{mypicture.jpg}` is supposed to do this: ![enter image description here](http://i.stack.imgur.com/KvYF2.jpg) And `\twopagepicture{t}{p}{mypicture.jpg}` is supposed to do this: ![enter image description here](http://i.stack.imgur.com/vsTG1.jpg) By the way, I'm using memoir with a lot of packages:               \documentclass[a4paper,twoside, openodd, final]{memoir}     \usepackage[english]{babel}     \usepackage[top=2.4cm, bottom=2cm, left=2cm, right=2cm]{geometry}     \usepackage{bookman}     \usepackage[pdfpagelayout=TwoPageRight]{hyperref}     \usepackage{longtable}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{verbatim}     \usepackage{color}     \usepackage{tabularx}     \usepackage{multirow}     \usepackage{wrapfig}     \usepackage{fancybox}     \usepackage{framed}     \usepackage{lettrine}     \usepackage{tocloft}     \usepackage{pdfpages}     \usepackage{watermark}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \makechapterstyle{LOTRchapter}{ \renewcommand{\chapterheadstart}{\vspace*{\beforechapskip}\hrule\medskip}           %%                                     \renewcommand{\chapnamefont}{    \fontsize{10mm}{15mm}\selectfont \bfseries}        %%                                     \renewcommand{\chapnumfont}{     \fontsize{10mm}{15mm}\selectfont \bfseries}        %%                                     \renewcommand{\chaptitlefont}{   \fontsize{10mm}{15mm}\selectfont \bfseries}        %%                                     \renewcommand{\printchaptername}{\fontsize{10mm}{15mm}\selectfont \bfseries Chapter}%%                                     \renewcommand{\chapternamenum}{ }                                                   %%                                     \renewcommand{\printchapternum}{\chapnumfont \thechapter}                           %%                                     \renewcommand{\afterchapternum}{. \\}                                               %%                                     \renewcommand{\afterchaptertitle}{\par\nobreak\medskip\hrule\vskip \afterchapskip}  %%                                   }    %definiramo izgled chapterjev (deluje samo v memoir class-u)                     %%     \chapterstyle{LOTRchapter}  %uporabimo pravkar definirani stil chapterjev                                           %%     %%------------------------------------------------------------------------------------------------------------------%%     \setlength{\parindent}{0.75cm}     %zacetni zamik paragrafov                                                        %%     \setlength{\parskip}{0ex}          %vertikalni razmik med paragrafi (stevilo vrstic)                                %%                                        %\par ... nov paragraf                                                           %%     \def\thechapter{\arabic{chapter}}  %stevilcenje chapterjev z arabskimi stevilkami                                   %%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}         \includepdf[pages={-}]{Cover.pdf}         \leftwatermark{ \put(-56.1,-795){\includegraphics[width=\paperwidth, height=\paperheight]{Background-22.jpg}}}         \rightwatermark{\put(-56.1,-795){\includegraphics[width=\paperwidth, height=\paperheight]{Background-11.jpg}}}


title: Images on multiple pages

text: > **Possible Duplicate:**   >  How to include a picture over two pages, left part on left side, right on > right (for books)? I need to insert a really big diagram and i need to split it in two pages. Is it supported in any way? If not, how can i be sure the two pages will be perfectly aligned and that they will be printed in facing pages? Is there any kind of template?


title: How do I make a figure that spans a spread of two pages?

text: > **Possible Duplicate:**   >  How to include a picture over two pages, left part on left side, right on > right (for books)? I have a huge TikZ graphic inside a `figure` environment. I would like it to cover a spread so that the figure is cut in half, and the left half goes on an even (left-hand) page and the right half goes on the next (odd/right-hand) page. I want the regular page margins to apply, and all the rest of the document layout, too. I need to use the IEEE two-column paper format. I know I could just manually remake the TikZ graphic into two parts and place each part in a new `figure` environment, and then resort to trickery to force the figures onto the pages I want. But it would be much cleaner and easier to update the graphic if I could make it independently of how it is positioned on the page. Also, if I decide to replace the TikZ graphic with, say, an EPS or PDF (or encounter the same issue another time when I have such an image), I'd like the solution to be independent of what I happen to have inside the `figure`. So, how can I make a `figure` that spans a spread of two pages?


title: How to make custom page frame using LaTeX?

text: I need to make questionnaire template for automatic processing with queXF. To do this I need to produce pages like this: ![Example of page with frame](http://i.stack.imgur.com/zTlBR.png) The queXF requirements for the pages are   * unique barcode for each page (done by using barcode as page number with help of packages `fancyhdr`, `pst-barcode`, `pstricks-add`)   * page frame for orientation **I need** to draw the frame on each page like on the example page above (note that the frame is related to page, but not to text). I see two ways for achieving this:   * to set an image background   * to draw separate lines (preferred) Is it possible to do using LaTeX?


title: Changing bibliography format

text: I am using `natbib` for referencing. My current format is "Author, Title, Journal, Vol-pp, Year". What change should I make to bring year right after the author as in "Author, Year, Title, Journal, Vol-pp"?


title: Letting graphics overflow over page edge

text: I have an image in PDF format, which I want to show in a much larger format than what fits on the page. For the overflowing parts of the image, I just want it to disappear over the edge. I tried `\includegraphics[width=2\textwidth]{myimage}`, but instead of just overflowing the way I want it to, it jumps to the next page. To complicate things further, the image will overflow the top and right edges of the page, but below the image there will be some space where I want text that complies with the page margins of the rest of the document. Is there any way to tell LaTeX that I don't care what happens with parts of this image that overflow boundaries?


title: Automatically created labels in Structure of TexStudio

text: I wrote a command for a document with many figures and tables which belong to each other. Every figure/table has the same caption just one parameter changes and the labels are automatically created. The problem is now, that these labels are not in the label list of TexStudio which would be nice.               \documentclass{article}     \usepackage{hyperref}          \DeclareRobustCommand{\captionf}[1]{Parameter of #1\label{fig:Parameter#1} %     \global\def \captiont {Description of \autoref{fig:Parameter#1}}     }          \begin{document}          \begin{figure}[ht]     \centering     lalala     \caption{\captionf{lalala}}     \end{figure}          \begin{table}[ht]     \centering     \begin{tabular}{cc}     la & lu \\     \end{tabular}     \caption{\captiont}     \end{table}          \end{document}      Does somebody knows a solution to this?


title: How to create A/B with LaTeX/LyX?

text: I want to create `frac` with this style: ![ab](http://i.stack.imgur.com/3sdQY.gif) Is this possible? I try to find another way, alternative to `xfrac`.


title: Override properties of a predefined listing style

text: I use the `listings` package and I want to override an attribute of the HTML style. Unfortunately my code overrides the whole HTML style and not just a single property:               \lstloadlanguages{HTML}     \lstdefinelanguage{HTML}{ndkeywords={charset, window, document}}      Does anyone know how I can only override `ndkeywords`?


title: Available fonts in MacTeX

text: How can I find out the list of fonts available in MacTeX? In particular, those fonts (say called FONT) which can be used as soon as the command `\usepackage{FONT}` appears in the preample. Also, how can I find out the list greek fonts available in MacTeX?


title: How to insert searchable value for PDF reader?

text: In a dictionary a headword can consist of special characters like in this example : **Eyja·fjalla··jök|ull**. I would like to achieve that the user in PDF reader in PDF file can search for **Eyjafjallajökull** (the headword without the special characters).


title: Including sample output as whole pages

text: What would be the best way to include sample LaTeX output, in the form of (reduced) whole pages, into another document that discusses its typesetting? I am thinking of creating one ( **"example"** ) document with all the examples, and tagging each one with `\label`; in the **main** document, I would fetch the labels with the help of the xr package and include the appropriate page range with pdfpages. A first problem: I can expect to know the number of pages to include for each example, but how can I tell `pdfpages` to include from `\pageref{exampleA}` to `\pageref{exampleA}+1`? (Presumably there's some package that can calculate `\pageref{exampleA}+1` in a form that I can pass to `pdfpages`. But which one?) So far so good. This has the advantage that it's easy for the example document to use a different style than the documentation; but I need to manually ensure that the examples are generated with the same code that I describe in the main document. This is **not essential,** but could be handy. Perhaps I could also include latex code from the example document into the main document by somehow retrieving and line ranges (how?) and passing them to `\lstinputlisting` of the listings package), but I'd expect that to be more trouble than it's worth. Can anyone recommend a better workflow? Are there better-suited packages that I am unaware of? To summarize: I'm interested in the best way to show whole pages as sample output in a document that discusses its typesetting. Including PDF pages from another document, and including source lines from another TeX file, are possible approaches but not **necessarily** the best ones: I'm open to alternatives.


title: biblatex: Handling secondary ("quoted in") citations

text: > **This question and the answer became part of a package:**   >  `biblatex-musuos` How can I qoute secondary quotes which I’ve taken form another book. ## Example Jon Doe writes a book an cites Fred Bloggs in it. Now I read the book of Doe an want to cite his cite of Bloggs. So my bibliography entry must look like > Bloggs, Fred: A nice old book, 1850, p. 35. Quoted in Doe, John: A bad new > Book, 2011, p. 67. Doe’s book should not be listed separately in the bibliography. I know that there’s a `bibstring` `quotedin` containing “quoted in” (p. 159 of `biblatex`’s manual) but I don’t know if theres a (predefined) way to use it … ## Update It seems that there’s no predefined way, so I decided to use `userc` for crossreferences like this. This works for the bibliography but not for cite commands. At the moment I create the “in text cite” manually. It would be great to have a macro like               \QIautocite[<prenote a>][<postnote a>]{<author a>}[<prenote b>][<postnote b>]{<author b>}      that expands to the above given example. That’s my new code, which gives the right results for bibliography and “in text cite” but the latter not automatically …               \RequirePackage{filecontents}     \begin{filecontents}{\jobname.bib}     @BOOKLET{autora,       title = {A nice old book},       userc={autorb},       author = {Fred Bloggs},       year = {1850},     }     @BOOKLET{autorb,       title = {A bad new book},       author = {Jon Doe},       year = {2011},     }     \end{filecontents}          \documentclass[ngerman]{scrartcl}          \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}          \usepackage{babel,csquotes,blindtext}          \usepackage[%         bibstyle=authortitle,         citestyle=verbose-ibid,     ]{biblatex}     \addbibresource{\jobname.bib}          \NewBibliographyString{bibcitedas}     \DefineBibliographyStrings{german}{%       bibcitedas = {{zitiert als}{zit. als}},     }          % Put the 'quoted in text' behind the bibentry.     \renewbibmacro*{finentry}{%       \ifbibliography{%         \iffieldundef{userc}{}{%           \newunit\bibstring{quotedin}\addspace\fullcite{\thefield{userc}}         }       }{}%       \finentry%     }          \begin{document}     \blindtext     \begin{quotation}         \blindtext\footnote{\cite[36]{autora}. Zit. nach \cite[89]{autorb}}     \end{quotation}     \blindtext\footnote{\cite[36]{autora}. Zit. nach \cite[89]{autorb}}          \printbibliography     \end{document}      ## Example 2 In addition to my comment (Hi @Audrey. This works fine :-) but theres a little thing …) on Audrey’s answer: If I use the `quotecite` command like this               \quotecite[1]{reese}[5]{weinberg}     \quotecite[1]{reese}[5]{weinberg}     \pagebreak     \quotecite[1]{reese}[5]{weinberg}     \quotecite[1]{reese}[5]{weinberg}      the footnotes should look like > 1 Reese [full cite], p. 1. Zit. nach Weinberg [full cite], p. 65   >  2 Ebd.   >  ———— page break ————   >  3 Rese [short cite], p 1. Zit nach Weinberg [short cite], p. 65   >  4 Ebd. Everything works like expected except footnote 3 which is > 3 Rese [short cite], p 1. Zit nach Weinberg [ **full** cite], p. 65 at the moment ## Update 2 Since it seems not possible to react to `autocite` I created a new plain command with               \DeclareMultiCiteCommand{\quoteciteplain}[\cbx@qcwrapperplain]{\cbx@quotecite}{\cbx@qcdelim}          \newrobustcmd{\cbx@qcwrapperplain}[1]{%       \global\toggletrue{cbx@isquote}%       #1%       \global\togglefalse{cbx@isquote}%       \global\togglefalse{cbx@iflastibid}%       \global\togglefalse{cbx@ifquoteepost}%       \global\togglefalse{cbx@ifquoterpost}}


title: Soul letterspacing in memoir sections with \setsecheadstyle

text: I realize I have asked almost the same question earlier. There, the answer involved `xparse` or `titlesec`. Titlesec however gets into conflicts with memoir's pagestyles (running header settings, `\leftmark` and so on), and a new command `\Section` with xparse bypasses the useful mechanisms of memoir for the default `\section`. I tend to think it shouldn't be too difficult use `memoir`'s `\setsecheadstyle`, but somehow I'm not getting the command definition right. So I'm trying to add `soul` letterspacing to the `\section` formatting in a `memoir` document. The docs recommend `\setsecheadstyle`.               \newcommand\sectionFmt[1]{%       \MakeUppercase{\soSection{#1}}%     }     \setsecheadstyle{\sectionFmt}      It errors out with `! A <box> was supposed to be here.` However, `\textit{#1}` works fine. It seems I'm just not passing the argument properly. How to do this right? MWE:               \documentclass{memoir}          \makeatletter          \usepackage{soul}     \sodef\soSection{}{.1em}{.5em plus.1em}{.1em plus.1em minus.1em}          \newcommand\sectionFmt[1]{%       % This errors out with: '! A <box> was supposed to be here.'       \MakeUppercase{\soSection{#1}}%       % But \textit{} works.       %\MakeUppercase{\textit{#1}}%     }          \setsecheadstyle{\sectionFmt}          \makeatother          \begin{document}          And most conclusive of all, there are the two hideous results which the doctor     obtained from a certain pair of formulae during his final investigations.          \section{Monstrous Implications}          Results which virtually proved the authenticity of the papers and of their     monstrous implications at the same time that those papers were borne forever     from human knowledge.          -- The Case of Charles Dexter Ward, H.P. Lovecraft          \end{document}


title: TeXlive on Ubuntu, and equivs?

text: I've just installed TeXLive from CTAN on Ubuntu 14.04, and following the instructions set up a local "equivs" so that Ubuntu thinks that TeXLive is properly installed. However, when I use apt-get, such as               apt-get maxima      The system informs me that one of the NEW packages to be installed is `texlive-binaries`, which is one of the package listed in my equivs file. What's going on here and how do I fix things so that the system really and truly believes that texlive-binaries are installed?