title: Issue with subequation enviroment

text: I use the following code               \begin{subequations}      \begin{equation}        \mid H(j\omega) \mid = \frac{\omega CR}{\sqrt{1+(\omega CR)^2}}        \label{subeqn:amplitude}      \end{equation}      \begin{equation}        \angle H = 90^o - arctan(\omega CR)        \label{subeqn:phase}      \end{equation}     \end{subequations}      However I get 5 errors   1. Extra `\else`   2. Missing `\endcsname` inserted   3. Incomplete `\iffalse`; all text was ignored after line 329(This is line "`\begin{equation}`")   4. Emergency stop   5. Fatal Error occurred;no output pdf file produced. I already use `amsmath` in my preamble. My minimal Example is               \documentclass[12pt,a4paper]{article}     \usepackage{amsmath}     \begin{document}     \begin{subequations}      \begin{gather}        \lvert H(j\omega) \rvert = \frac{\omega CR}{\sqrt{1+(\omega CR)^2}}        \label{subeqn:amplitude}      \\      \angle H = 90^\circ - \arctan(\omega CR)      \label{subeqn:phase}     \end{gather}     \end{subequations}          \end{document}      Typing the aforementioned code produces no error. So I believe that there must be sth wrong in the preamble, which is               \documentclass[12pt,a4paper]{article}     \usepackage[english,greek]{babel}     \usepackage[iso-8859-7]{inputenc}     \usepackage{kerkis}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{units}     \usepackage{array}     \usepackage{framed} % ãéá ãêñé background ðßóù áðü êÜðïéá paragraphs     \usepackage{extarrows}     \usepackage{cancel}     \usepackage[pdftex]{graphicx}      %\usepackage[twoside,pdftex,total={16.4cm,24cm}, left=2.9cm, top=3.2cm, headsep=1.4cm]            {geometry}     %\usepackage[top=3.2cm, bottom=3.4cm, left=2.9cm, right=2.9cm,headsep=0.8cm]{geometry}     \usepackage[margin=2.8cm]{geometry}     \usepackage[Bjornstrup]{fncychap}      \usepackage{fancybox}     \usepackage{fancyhdr}     \usepackage{colortbl}     \usepackage{xcolor}     \usepackage{footmisc}     \usepackage{subfiles}     \usepackage{float}     \usepackage{slashbox}     %\usepackage{float}     %\restylefloat{figure}     %_________________________________________________________________________________________          \usepackage{hyperref}     \usepackage{subfigure}     \renewcommand{\labelitemi}{$\circ$}     \usepackage{wrapfig}     \usepackage{color}     %\usepackage[usenames,dvipsnames]{color}     \definecolor{Darkgreen}{rgb}{0,0.4,0}     \definecolor{Darkblue}{rgb}{0,0,0.4}     \newcommand{\HRule}{\rule{\linewidth}{0.8mm}}     \usepackage{rotating}     %\usepackage[landscape]{geometry}     \usepackage{lscape}     \usepackage{cancel}     \usepackage{fancyvrb}     %\usepackage{yannisgr}     \usepackage{listings}     %\lstset{ %     %language=matlab,                % choose the language of the code     %basicstyle=\footnotesize,       % the size of the fonts that are used for the code     %numbers=left,                   % where to put the line-numbers     %numberstyle=\footnotesize,      % the size of the fonts that are used for the line-     numbers     %stepnumber=1,                   % the step between two line-numbers. If it is 1 each    line will be numbered     %numbersep=5pt,                  % how far the line-numbers are from the code     %backgroundcolor=\color{white},  % choose the background color. You must add     \usepackage{color}     %showspaces=false,               % show spaces adding particular underscores     %showstringspaces=false,         % underline spaces within strings     %showtabs=false,                 % show tabs within strings adding particular    underscores     %frame=single,           % adds a frame around the code     %tabsize=2,          % sets default tabsize to 2 spaces     %captionpos=b,           % sets the caption-position to bottom     %breaklines=true,        % sets automatic line breaking     %breakatwhitespace=false,    % sets if automatic breaks should only happen at   whitespace     %escapeinside={\%*}{*)}          % if you want to add a comment within your code     %}     \usepackage{textcomp}     \definecolor{listinggray}{gray}{0.9}     \definecolor{lbcolor}{rgb}{0.9,0.9,0.9}     \lstset{     backgroundcolor=\color{lbcolor},     tabsize=4,     rulecolor=,     language=matlab,         basicstyle=\scriptsize,         upquote=true,         aboveskip={1.5\baselineskip},         columns=fixed,         showstringspaces=false,         extendedchars=true,         breaklines=true,         prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},         frame=single,         showtabs=false,         showspaces=false,         showstringspaces=false,         identifierstyle=\ttfamily,         keywordstyle=\color[rgb]{0,0,1},         commentstyle=\color[rgb]{0.133,0.545,0.133},         stringstyle=\color[rgb]{0.627,0.126,0.941},     }     %\usepackage{subeqn}          %_________________________________________________________________________________________               \definecolor{mygray}{gray}{.75}%{.9, .9, .9}     \definecolor{lightgray}{gray}{.8}%{.9, .9, .9}     \definecolor{shadecolor}{gray}{.90} %gia framed package     %\definecolor{mygray}{rgb}{.9, .9, .9} %enallaktika !! anti gia panw     \newcommand*\mygraybox[1]{\colorbox{mygray}{\hspace{1em}#1\hspace{1em}}}          %\renewcommand{\topfraction}{0.85}%gia na min uparxoun 2 figures se mia selida kai   tipota allo     \renewcommand{\textfraction}{0.1}     \renewcommand{\floatpagefraction}{0.75}          \newcommand{\kai}{\quad \text{êáé} \quad}     \newcommand{\kkai}{\qquad \text{êáé} \qquad}          \linespread{1.1}     \newcommand{\sw}{\selectlanguage{english}}     \newcommand{\sq}{\selectlanguage{greek}}     \newcommand{\eng}[1]{\latintext#1\greektext}     \newcommand{\gre}[1]{\greektext\latintext#1}      \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}          \begin{comment}        \let\origdoublepage\cleardoublepage       \newcommand{\clearemptydoublepage}{%       \clearpage       {\pagestyle{empty}\origdoublepage}%     }     \let\cleardoublepage\clearemptydoublepage               \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}     \fancyhf{} % delete current setting for header and footer     \fancyhead[LE,RO]{\bfseries\thepage}     \fancyhead[LO]{\rightmark}     \fancyhead[RE]{\leftmark}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}     \addtolength{\headheight}{0.5pt} % make space for the rule      %Ôï ÷ù ïñßóåé 0.8 áð ôï  package     \fancypagestyle{plain}{%     \fancyhead{} % get rid of headers on plain pages     \renewcommand{\headrulewidth}{0pt} % and the line}          \newtheorem{thm}{Èåþñçìá}[chapter]     \newtheorem{cor}[thm]{Ðüñéóìá}     \newtheorem{lem}[thm]{ËÞììá}     \newtheorem{parad}{ÐáñÜäåéãìá}[chapter]     \newtheorem{defgr}{Ïñéóìüò}[chapter]     \end{comment}          \parskip 3mm     \footskip = 15mm


title: Place a background relative to the position of an environment

text: I am trying to place a background that extends the entire page width and whose height depends on the height of the environment contained. For example, the following code provides something to what I am looking for:               \documentclass[letterpaper]{article}     \usepackage{xcolor}     \usepackage{amsmath,amssymb,calc}     \usepackage{framed}     \setlength{\parindent}{0pt}               \newenvironment{test}[1]{%     \def\FrameCommand{\fboxsep=\FrameSep\colorbox{green!15}}%     \MakeFramed {\advance\hsize -\width \FrameRestore}}%     {\endMakeFramed}          \begin{document}     \begin{test}     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibu-     lum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.     Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec     vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et ne-     tus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus     rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu     tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium     quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean     faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Cur-     abitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue     eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim     rutrum.     \end{test}          \end{document}      ![enter image description here](http://i.stack.imgur.com/KoO2e.png) But of course this frame only extends to the text width. I want to cover the entire margins on both sides while keeping whatever environment within the `\textwidth`. I was thinking of using the `TikZ` or its affiliate the `background` package. I would reall appreciate solutions within the scope of the `framed` package, `mdframed` package, `TikZ` or `background` package.


title: Rotating text by -90 degrees

text: Using `lscape` from the `graphics` package, one can rotate all of the text within `\begin{landscape}` and `\end{landscape}` by 90 degrees, while permitting the text to break across pages. Is there a way to rotate the text in the same manner, but -90 degrees? Update: The desired result is to rotate all of the text within the body of the page, but not the page itself, and not the footnotes. The use is connected with this question: Vertical Chinese text with XeTeX, however, using a `minipage` is not a good option, as the long material does not properly wrap at the end of the page. However, the `lscape` solution rotates the text 90 degrees in the wrong direction. Here is an example of the code using `lscape` which rotates the text 90 degrees:               \documentclass{article}     \usepackage{lscape}     \begin{document}         \begin{landscape}             This is some text.         \end{landscape}     \end{document}      Note, with the above code that footnotes and headers are not changed. When compiled with `xelatex`, and viewed in a PDF reader, the page is not turned to landscape mode. I hope this behavior can be copied, but with -90 rotation of the text only.


title: Aligning an enumeration item to the top of a tikzpicture

text: I've drawn a tree using pgf/tikz and am trying to place it in an enumerated list. A snippet of my complete code is as follows:               \subsection*{Problem 2}     \begin{enumerate}[1)]     \item Max heap     \item     \begin{tikzpicture}[level/.style={sibling distance=50mm/#1}]     \node [circle,draw] (z){98}       child {node [circle,draw] (a) {80}         child {node [circle,draw] (b) {23}           child {node [circle,draw] (c) {18}}           child {node [circle,draw] (d) {21}}         }         child {node [circle,draw] (g) {48}}       }       child {node [circle,draw] (j) {79}         child {node [circle,draw] (k) {76}}         child {node [circle,draw] (l) {29}}     };     \end{tikzpicture}     \end{enumerate}      My problem is the list number is aligned with the bottom of the tikzpicture. How would I go about aligning it with the top of the tikzpicture?


title: Can one "fold" part of the paragraphs in LyX

text: By "folding", I mean condense some part of the codes, and by one click , you can unfold them.


title: How do I print a syntax-highlighted LaTeX source file?

text: I want to print an example source file so that I can study it. How do I print it with syntax highlighting? I'm currently using TeXShop in MacTeX; apparently it doesn't have this ability. What program do you recommend to do this?


title: Chapters only on even pages, sections without pagebreaks?

text: I'm having a few questions about KOMA script configuration and would love if you guys could help me out:   1. How can I make all chapters only appear on even pages?   2. How can I make all sections NOT have pagebreaks after each other?


title: Using character literals with \ifcase

text: Is there a way to implement a switch-like macro in LaTeX or do I have to nest ifs? Something that would look like:                \ifcase#1        \case a{}        \or\case b{}        \or\case c{}      \fi      If not, could you please point me to a solution. Preferably, something that could run on vanilla-LaTeX?


title: Why does the switch to ClearSans font fails in LuaLateX?

text: At the moment I am experimenting with a sans-serif font for figures and a serif font for the rest of the document. When compiling this MWE with `pdflatex` everything seems to work smoothly. Switching to `lualatex` (on Texlive 2014) leads to error messages (`Font shape OT1/ClearSans(0)/m/sl undefined`) that some characters cannot be found and they are replaced by the standard serif font. Why is the font handling different in this case and how can I fix this?               \documentclass{article}          \usepackage{pgfplots}          \usepackage{ClearSans}          \usepackage[eulergreek]{sansmath}          \pgfplotsset{         tick label style = {font=\sansmath\sffamily},         every axis label = {font=\sansmath\sffamily},         legend style = {font=\sansmath\sffamily},         label style = {font=\sansmath\sffamily},         /tikz/font=\sansmath\sffamily     }          \begin{document}          \begin{figure}         \begin{sansmath}             \begin{tikzpicture}                     \begin{axis}                             \addplot [blue] coordinates { (0,0) (1,2) };                     \end{axis}                     \node at (4, 1) { $\Delta T_{\mathrm S} + 25 + \alpha + \beta + a^2$};                     \node at (2, 5) {normal sans serif text};             \end{tikzpicture}          \end{sansmath}     \caption{Some caption text.}     \end{figure}               text text text...          \begin{equation}     a^2 + b^2 = c^2     \end{equation}          \end{document}


title: How to customize bibliography style in beamer while using biblatex?

text: I want to customize the appearance of `\footfullcite` in my beamer presentation. I would like it to look something like this, M. A. Zeb et. el., Phys. Rev. Lett., 108, 2012. I don't want to have the title and the page number etc. And in text reference to appear inline instead of a superscript enclosed in square brackets. I have tried these guidelines but it doesn't seem to work. I have saved the following               \AtEveryBibitem{%     \clearfield{title}%     \clearfield{pagetotal}%     }      in `biblatex.cfg` and saved it in `/Users/ruawan/Library/texmf/tex/latex/biblatex`. Here is the input               \documentclass[13pt,xcolor=dvipsnames]{beamer}          \usepackage{multirow}     \usepackage{fixltx2e}     \usepackage{amsmath}     \usepackage{braket}     \usepackage{tikz}     \usepackage{graphicx}     \usepackage[style=numeric,backend=biber]{biblatex}          \usetikzlibrary{positioning}     \newtheorem{theor}{Theorem}     \usetheme{umbc2}      \usecolortheme[named=RawSienna]{structure}      \usefonttheme[onlylarge]{structurebold}     \setbeamerfont{frametitle}{family=\rmfamily,shape=\itshape}      \setbeamercovered{transparent}     \setbeamertemplate{frametitle}[default][center]      \addbibresource{HinGe.bib}          \begin{document}          \begin{frame}     \frametitle{Previous Work}     \framesubtitle{Simple metals and beyond}     Simple metals have been reasonably well understood \footfullcite{maz01}.     \begin{itemize}     \item Linear response treatment by Lindhard.     \item The full non-linear treatment by Echenique, Ritchie, and Nieminen.     \item For simple metals the electronic stopping power is proportional to the projectile velocity in low-speed regime\footfullcite{maz02}.     \item Insulators, semiconductors, and noble metals are relatively poorly understood.     \end{itemize}     \end{frame}     \end{document}      Here is the output, ![enter image description here](http://i.stack.imgur.com/Ps3lt.png) Can you please point out the bug?


title: Tone marks above Chinese characters in latex

text: My aim is to put tone marks above Chinese characters in latex. I have tried `\v{好}`, but this puts the carron accent (3rd tone) in the space left of the character rather than above it. I have also found that `$\stackrel{\vee}{\textrm{你}}$` works well but cannot find equivelent symbols for the other tones. I have tried `--`, `\diagup` and `\diagdown`, but they look really out of place The standard unicode symbols for the tones are 02C9, 02CA, 02C7, 02CB and 02D9, but think that these are the same as using `\v` ect. Does anyone have any suggestions? Thank-you. The purpose of this is to have them automatically generated to help people learning chinese. I've written the software for that, so just need to output it in a nice format. P.S. To use Chinese characters in Latex               \documentclass[12p]{article}     \usepackage{CJKutf8}          \begin{document}     \begin{CJK*}{UTF8}{gbsn}     你     \end{CJK*}     \end{document}


title: How can I collect the contents of a LaTeX environment in a macro without the grouping?

text: It's a bit of a long story as to why I need to do this, but please bear with me. I have a fairly complicated custom class which expects documents to begin with a command:               \coverandabstract{Abstract text goes here}      What this does is lay out a (one column) cover page, basically a custom maketitle, then switches to two column layout with different page dimensions on page two, beginning with an abstract that spans both columns. Now, I want to be able to draft the document in Markdown and convert to this class (and other formats) via Pandoc. The most cross-format way of representing the abstract is as a blockquote, which gets converted to a quote environment.               \begin{quote}     Abstract text goes here     \end{quote}      So what I need to do is find a way of converting the first, and only the first, quote environment into the `\coverandabstract` command. Now one way of doing this would be to use the environ package:               \usepackage{environ}     \let\oldquote=\quote     \let\endoldquote=\endquote     \makeatletter     \renewenvironment{quote}%       {\Collect@Body\coverandabstract}%       {\let\quote=\oldquote        \let\endquote=\endoldquote}     \makeatother      The problem is that the class is based on memoir, and changing the page layout means using `\checkandfixthelayout`. This doesn't work properly if called within an environment, probably as a result of the grouping. This means the above technique ruins the layout for the remainder of the document. So is there a way of passing the contents of an environment to a command without having it wrapped in a TeX group?


title: Creating unique surveys with SDAPS

text: I have successfully run through the tutorial for using SDAPS with a LATEX survey to generate forms with tick boxes that a participant can fill out and I can scan and extract the data. However, I cannot figure out how to generate unique surveys with a different bar code on each one. Has anyone else done this? I can just get one survey. In the tutorial for the software, I read the following: ' If we make each printout unique using a "Questionnaire-ID" then we would need to use the "stamp" command to create the printable document. You can try this by setting the "print_questionnaire_id" option before creating the survey directory.' I'm not sure if this "print_questionnaire_id" is in the LATEX or outside the latex when creating the PDFS...


title: TikZ: Replacing the values (labels) on x-axis with names

text: I managed to create a simple linear plot with pgfplots-manual (chapter 4.5.1) ![enter image description here](http://i.stack.imgur.com/QTN3Y.jpg) Now I want to replace the values of x-axis (1,2,3,4) with text, e.g.Test A, Test B, Test C, Test D. How can I do such a configuration? MWE:                   \documentclass[12pt,ngerman]{article}         \usepackage{pgfplots}         \pgfplotsset{width=7cm,compat=1.10}              \begin{document}              \begin{tikzpicture}         \begin{axis}             [             xlabel={Test},             ylabel={Mean}             ]         \addplot+[sharp plot] coordinates         {(0,18.26) (1,21.47) (2,24.58) (3,24.95)};         \end{axis}         \end{tikzpicture}              \end{document}


title: Wrong section Number

text: I'm having troubles with sections number...Each section continues the numeration of the precedent one, although a new chapter has started. here is a MWE               \documentclass[12pt,a4paper]{report}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[italian]{babel}     \usepackage{remreset,siunitx,array,textgreek,booktabs,etoolbox,geometry}     \usepackage{graphicx,wrapfig,lscape,rotating,amsmath}     \geometry{letterpaper}     \sisetup{text-micro=\textmu}          \title{\Huge\textbf{Title}}     \author{di \textbf{Author}}     \date{date}          \makeatletter       \renewcommand \thesection {\@arabic\c@section}       \@removefromreset{section}{chapter}     \makeatother          \begin{document}     \maketitle           \chapter*{C1}     \section{S1.1}     blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah          \section{S1.2}     blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah   blah blah blah     \chapter*{C2}     \section{S2.1}     blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      \section{S2.2}     blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah           \chapter*{C3}     \section{S3.1}     blah blah blahblah blah blahblah blah blahblah blah blahblah blah blahblah       How can I solve this problem?


title: Remove chapter number on algorithm numbers (scrbook)

text: I write my bachelor thesis using a document class provided by our institute based on `scrbook`. I write pseudo-codes using `algorithm2e` which I put in the appendix since otherwise they would "interrupt" reading the text where I refer to them (they cover 4 pages). My thesis has 7 chapters, excluding References and Appendix. The algorithms are numbered in their caption as `7.1`, `7.2` and so on. I want them to be numbered `1`, `2`, ... After googling, I found out how to _add_ chapter numbers to the captions, however, I didn't write any of this (by myself, at least). How can I tell `algorithm2e` _not_ to include the chapter numbers, as the appendix shouldn't be treated as part of my last chapter? As chapter numbers may have been explicitly enabled in the document class I'm using: Which command(s) in the class file can be the problem? Note that all types of floats with captions (figures, theorems, ...) have a chapter number (but this is OK in general, except for my algorithms in the appendix). I use the following options:               \usepackage[ruled,vlined,linesnumbered]{algorithm2e}


title: Labels above tikz tree forks

text: I have an upward-growing tree showing the flow of a proof, as follows:               \documentclass{article}      \usepackage{tikz}     \usetikzlibrary{trees}          \begin{document}     \resizebox{\textwidth}{!}{%     \begin{tikzpicture}[edge from parent path=       {(\tikzparentnode.north) .. controls +(0,1) and +(0,-1)                                         .. (\tikzchildnode.south)}]       \node {L5. $(A)\rightarrow(A)$} [grow'=up] %node[above]{MP}         [sibling distance=60mm]         child {node {L3. $(A)\rightarrow((A)\lor(A))$}           child {node {P2. $(x)\rightarrow((x)\lor(y))$}}         }         child {node {$((A)\rightarrow((A)\lor(A)))\rightarrow((A)\rightarrow(A))$}           child {node {L4. $((\lnot(A))\lor((A)\lor(A)))\rightarrow((\lnot(A))\lor(A))$} edge from parent[dashed]                 [sibling distance=80mm]               child {node {L1. $((A)\lor(A))\rightarrow(A)$} edge from parent[solid]                    child{node {P1. $((x)\lor(x))\rightarrow(x)$}}}               child {node {L2. $(((A)\lor(A))\rightarrow(A))\rightarrow(((\lnot(A))\lor((A)\lor(A)))\rightarrow((\lnot(A))\lor(A)))$} edge from parent[solid]                   child{node {P2. $(x)\rightarrow((x)\lor(y))$}}}}         };     \end{tikzpicture}     }     \end{document}      ![Tree diagram](http://i.stack.imgur.com/cwy79.png) I want to place a short, small label ("MP") immediately above the "L5." and "L4." forks (above the brackets, not between the bracket and the statement), but adding nodes in all the places I've tried breaks the graph in various ways. Am I just adding the nodes wrongly, or do labels like that need to be treated separately from the tree (through explicit placement, etc.)? Thanks in advance.


title: Equation formatting (alignment)

text: According the question I have written the file but I got something wrong. Can you please check?               \documentclass{article}     \usepackage{amsmath}          \begin{document}     \begin{align}     &\begin{aligned}     & \ddot\phi_3&+\phi_3+2g_2p_1 \cos(\tau+\alpha)[p_2\cos(\tau + \alpha) + q_2\sin(\tau + \alpha)\\     &  + \frac{g_2}{6}p_1^2[\cos(2\tau + 2\alpha) - 3]]+g_3p^3_1\cos^3(\tau+\alpha)-\cos(\tau+\alpha) [-p_1 (\nabla \alpha)^2+\Delta p_1]\\     &-\sin(\tau+\alpha) [p_1\Delta \alpha+2\nabla \alpha \nabla p_1]\qquad+\omega_2p_1\cos(\tau+\alpha)=0     \end{aligned}\nonumber\\     &\begin{aligned}     & \ddot\phi_3&+\phi_3+g_2p_1 p_2 [1+\cos2(\tau+\alpha)] + g_2p_1 q_2\sin2(\tau+\alpha)  \\      & + \frac{2 g_2^2 p_1^3}{6} \cos(\tau +\alpha)[2\cos^2(\tau+\alpha)-4] \\     & + g_3p_1^3[\frac{1}{4}(3\cos(\tau +\alpha)+\cos3(\tau+\alpha))]\\       & -\cos(\tau+\alpha)\left[\Delta p_1--p_1 (\nabla \alpha)^2\right]  \\       & +\sin(\tau+\alpha)\left[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha\right]\\      & + \omega_2p_1\cos(\tau+\alpha) =0     \end{aligned}\nonumber\\     &\begin{aligned}     & \ddot\phi_3&+\phi_3+g_2p_1 p_2 + g_2p_1 p_2  \cos2(\tau+\alpha)] + g_2p_1 q_2\sin2(\tau+\alpha)\\      &  + \frac{2 g_2^2 p_1^3}{3} \cos^3(\tau +\alpha)-\frac{8 g_2^2 p_1^3}{6} \cos(\tau +\alpha) \\      & +g_3p_1^3[\frac{1}{4}(3\cos(\tau +\alpha)+\cos3(\tau+\alpha))]\\      &  -\cos(\tau+\alpha)[\Delta p_1--p_1 (\nabla \alpha)^2] \\      & +\sin(\tau+\alpha)\left[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha\right]+\omega_2p_1\cos(\tau+\alpha)=0     \end{aligned}\\     &\begin{aligned}      & \ddot\phi_3&+\phi_3+g_2p_1 p_2 + g_2p_1 p_2  \cos2(\tau+\alpha)] + g_2p_1 q_2\sin2(\tau+\alpha) \\       &  + \frac{2 g_2^2 p_1^3}{3}[\frac{1}{4}(3\cos(\tau +\alpha)+cos3(\tau+\alpha))] -\frac{8 g_2^2 p_1^3}{6} \cos(\tau +\alpha) \\       & +g_3p_1^3[\frac{1}{4}(3\cos(\tau +\alpha)+\cos3(\tau+\alpha))] \\      &  -\cos(\tau+\alpha)[\Delta p_1-p_1 (\nabla \alpha)^2] \\      &+\sin(\tau+\alpha)[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha]+\omega_2p_1\cos(\tau+\alpha)=0     \end{aligned} \\     &\begin{aligned}         &\ddot\phi_3&+\phi_3+\sin(\tau+\alpha)[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha] \\         & -\cos(\tau+ \alpha)\left[\Delta p_1 -p_1 (\nabla \alpha)^2+\frac{5}{6}g_2^2p_1^3- \frac{3}{4}g_3p_1^3-p_1 +\omega_2 p_1\right] \\         & +\frac{ p_1^3}{12}(2g_2^2+3g_3)\cos3(\tau + \alpha) \\         & +g_2 p_1 [p_2+ p_2 \cos2(\tau +\alpha)+q_2 \sin2(\tau+\alpha)] =0     \end{aligned}\nonumber\\     &\begin{aligned}\label{eq10}        & \ddot\phi_3&+\phi_3+\sin(\tau+\alpha)[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha] \\         & -\cos(\tau+ \alpha)[\Delta p_1-p_1 (\nabla \alpha)^2 + \lambda p_1^3-p_1+\omega_2 p_1] \\         & +\frac{p_1^3}{12}(2g_2^2+3g_3)\cos3(\tau + \alpha) \\         & +g_2 p_1 [p_2+ p_2 \cos2(\tau +\alpha)+q_2 \sin2(\tau+\alpha)]=0     \end{aligned}     \end{align}     \end{document}


title: header and footer in scrbook

text: I am having a problem with the scrbook class. Since I am quite new to it I spent quite some time researching but somehow haven't found a way to resolve it. I am trying to write a LaTeX document for uni and would like to have headers and footers on each page. The essential lines in my document are as follows:               \documentclass[10pt,twoside,a4paper,fleqn,ngerman]{scrbook}          \usepackage[utf8]{inputenc}          \usepackage[left=1cm,right=1cm,top=1cm,bottom=1cm, includeheadfoot]{geometry}          \usepackage[automark,headsepline]{scrpage2}          \deftripstyle{pagestyle}[0.5pt][0.3pt]{\pagemark}{}{\titleinfo}{\pagemark}{\today}{\authorinfo}     \pagestyle{pagestyle}               \newcommand{\titleinfo}{Model}     \newcommand{\authorinfo}{D. Wright}          \begin{document}          \chapter{Chapter}          \end{document}      Somehow it doesn't seem to work. I get the following output: ![test file](http://i.stack.imgur.com/Aclbx.png) When I change the `\documentclass` to `article` or `scrartcl` I do get the headers and footers on each page but not in `book`, or `scrbook` (which would be the one that I would like to work with). Can anybody help me out?


title: Is there a way to get reverse numbering on the enumerate environment?

text: To build a list of publications, I wish to show the most recent on top of the list, while keeping the numbering similar. This can be achieved manually by doing something like:               \begin{enumerate}     \item[42] pub num 42     \item[41] pub num 41     \item[...]     \item[1] pub num 1     \end{enumerate}      but is there a more principled approach?


title: Line segments with text in the middle in TikZ

text: Another exam, another image. I am trying to create the following image in TikZ ![Exam curtains](http://i.stack.imgur.com/M7EyB.png) Now. I am looking for some feedback on my code. I am trying to learn TikZ as fast as I can, but still I feel I am doing things in an overly complicated or hugely inefficient way. My main problem is finding the best way to create the line segments on the left. How do I do this? Breaking them up and placing text in between just is meh. My attempt is below. Please pay little attention to it as it really sucks.               \documentclass[10pt,a4paper]{article}     \usepackage[dvipsnames*,svgnames]{xcolor}     \usepackage{tkz-euclide}     \usetkzobj{all}     \usepackage{mathtools}          \begin{document}          \begin{tikzpicture}[scale=5]     \tkzDefPoint(-0.1,0){P}     \tkzDefPoint(0,0){O}     \tkzDefPoint(1.2,0){A}     \tkzDefPoint(0,0.8){B}     \tkzDefPoint(0,1.6){C}     \tkzDefPoint(1.2,0){G}     \tkzDefPoint(1.2,.83){U}     \tkzDefPointBy[rotation= center B angle 110](C) \tkzGetPoint{D}     \tkzDefPointBy[rotation= center O angle  35](G) \tkzGetPoint{E}     \tkzDefMidPoint(B,E) \tkzGetPoint{M1}     \tkzDefMidPoint(C,E) \tkzGetPoint{M2}     \tkzMarkAngle[thick,scale=0.5,fill=black!20!white](A,O,E)     \tkzMarkAngle[thick,scale=0.4,fill=black!20!white](E,B,C)     \tkzDrawSegment[thick](P,A)     \draw[thick](-0.6,0)--(-0.4,0);\draw[thick](-0.6,1.6)--(-0.4,1.6);     \draw[thick](-0.1,0.8)--(-0.3,0.8);\draw[thick](-0.1,1.6)--(-0.3,1.6);     \draw[thick](-0.2,1.6)--(-0.2,1.3);\draw[thick](-0.2,0.8)--(-0.2,1.1);     \draw[thick](-0.5,0.0)--(-0.5,0.6);\draw[thick](-0.5,0.8)--(-0.5,1.6);     \tkzDrawSegment[ultra thick,Goldenrod,dashed](O,U)     \tkzDrawSegments[ultra thick](O,C B,E)     \tkzDrawSegment[ultra thick,Magenta](C,E)     \tkzLabelPoint[left=-.55](-0.2,1.2){$0.8$ m} ;     \tkzLabelPoint[left=-.65](-0.5,0.7){$\stackrel{\text{\large Vindu}}{1.6     \text{m}}$} ;     \tkzLabelPoint[above=0.2](M1){Arm} ;     \tkzLabelPoint[below left](M1){$0.8$m} ;     \tkzLabelPoint[above=0.2,right, Magenta](M2){$\mathit{\mathbf{L}}$} ;     \tkzLabelPoint[above=1,Magenta](M2){\bfseries Markiseduk} ;     \tkzLabelPoint[below=1.75,left,Goldenrod](E){\bfseries Solstr\aa le} ;     \tkzLabelAngle[pos=0.3](A,O,E){$u$}     \tkzLabelAngle[pos=0.225](E,B,C){$v$}     \end{tikzpicture}          \end{document}        My result... ![Here is my attemp to TikZ](http://i.stack.imgur.com/kIoyz.png)


title: tikz shape fill not working

text: I am trying to define a shape as the attached yellow filled one. However, when I place the lines inside, the fill does not work properly and the rectangle's green background shows through. I have two questions: 1) How can I fix this in the code below? 2) Is there a way to define this as a shape that I can use as a regular shape? I am afraid I don't know tikz or pgf sufficiently to be able to do that. Any assistance would be greatly appreciated.               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{shapes,positioning}          \begin{document}      \begin{tikzpicture}          \node\[rectangle,draw,fill=green,minimum width=1cm,minimum height=1cm\] (test) at (0,0) {};      \draw\[fill=yellow\] (0,0) -- (0,0.6) -- (0.4,0.6) -- (0.4,0) -- (0.2,-0.1) -- (0,0) -- cycle      (0,0.2) -- (0.2,0.15) -- (0.4,0.2)      (0,0.4) -- (0.2,0.35) -- (0.4,0.4)     node (ar1) {};          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/nQzxB.jpg)


title: how to link a margin graphic to a URL

text: I am trying to create a margin graphic that is linked to a url. So when I click it in the pdf document, the url will open in a browser. I cannot figure out how to do that. My try below does not work out.               \marginpar{      \href{http://www.arxiv.org}{      \includegraphics[width=\marginparwidth]{pics/infosymbol_2.jpg}}     }       Any ideas? Thank in advance! Mark PS: An error occurred. For some reason it now works out. So this post may be considered obsolete and can be deleted, I guess.


title: How to setup "smart citation commands"?

text: The `biblatex` package comes with a bunch of example files. One of them is called _18-numeric-hybrid.tex_. It contains the following text: > We define a dedicated citation command for online references which uses > numerical labels instead of the author-year scheme. Instead of defining a > dedicated command, it is also possible (and usually preferable) to build > smart citation commands which are able to switch citation styles depending > on the entry type (or other criteria). Can anyone give me a hint how I can implement such a smart citation command the best way?


title: How can I get rid of the LaTeX warning: Float too large for page?

text: In my document, I have figures that have a rather long caption. The code I use to include them looks like this:               \begin{figure}       \begin{center}         \includegraphics[width=\textwidth]{../fig.pdf}         \caption[Short caption]{Fairly long text...}       \end{center}     \end{figure}      For some of the figures, I keep getting warnings like this one:               LaTeX Warning: Float too large for page by 2.38557pt on input line 339.      I can't see anything wrong with the figures in the output document, but it makes the compilation output harder to read because it is full of such warnings. What am I doing wrong, and how can I get rid of these warnings?


title: Tight horizontal lines around a block of text

text: I wish to create a block of text with tight horizontal lines above and below, e.g. * * * This is a paragraph. * * * The following example seems to produce more space between the paragraph and the horizontal line below than the horizontal line above.               \noindent\rule{\linewidth}{0.4pt}          \noindent This is a paragraph, possibly with more than 1 line of text.\\ \noindent\rule{\linewidth}{0.4pt}      As far as I understand, this behaviour is due to the way rules are formatted in LaTeX. I would prefer a solution that gives me the same space between the paragraph and both lines and have the lines fairly close to the paragraph. Ideally, the solution should not make use of any additional packages and be robust to changes in font, font size, text formatting, and line spacing. I have read that \offinterlineskip may solve this problem, but wanted to check if this is indeed the preferred solution and how to implement it to avoid breaking anything else.


title: \titleformat is causing the section title to appear twice in Table of Contents

text: Here is how it shows: ![image](http://imgur.com/S2GTtLY.png) The section appears twice. Ideally I'd like it to be   1. BACKGROUND AND RATIONALE with that dot and no bold. Here is the `\titleformat` that is causing this behavior:               \titleformat{\section}%     [hang]% <shape>     {\clearpage\centering\bfseries\fontsize{14pt}{14}\selectfont}% <format>     {\thesection.\quad}% <label>     {0pt}% <sep>     {}% <before code>


title: Drawing divided table

text: Can anyone recommend any tutorial/library or just explain how can I draw this type of table, divided into few part with arrows? Like on this picture: ![enter image description here](http://i.stack.imgur.com/o1TJB.png)


title: Handling _ in macros

text: So I have a big number of figures with _ in their names. I want to include them in my document and I want to print the filename for the file. Something like:               \foreach \dataset in {CPD, EPAFHM, FDA, cas_N6512, cox2, dhfr, screen_U251} {         \foreach \height in {0,1,2,3,4,5} {                 \begin{minipage}{0.5\textwidth}                 \includegraphics[width=0.45\textwidth]{heatmaps/\dataset\height Bit.pdf}                 AUC for bit fingerprint of height \height for dataset \dataset.                 \end{minipage}         }     }      It works great for the graphics but of course the `_` should really be `\_` when it comes to printing. How can I fix this? I have looked at this question but it does not seem to be quite the same thing. Also, if I try the `underscore` package it works for the text but not for the graphics.


title: Long division of polynoms with equivalence classes

text: I know of the `polynom` package for typesetting long divisions of polynoms. What I want to do is to typeset a long division of two polynoms that contain not numbers but equivalence classes based on the modulo. By that I mean that I use sets of numbers where the division with rest by a predefined number yields the same number (e.g. if this number is 3, both 4 and 7 will be in the same class [1]) instead of actual numbers. Anyway, with a package where I enter the calculation manually what non-numbers I calculate on would not be relevant. `polynom` can't calculate those. Is there a package that does this, either manually or automatically like `polynom`?


How to draw circles around multiple row cells and column cells as shown in attached figures. I am using Professional lay out tables... i.e. Tables in tabular environment, Table below ![enter image description here](http://i.stack.imgur.com/Qmazl.png) I am also attaching my table of interest here where I want to highlight as shown in picture               \documentclass{article}     \usepackage{booktabs,multirow}          \begin{document}     \centering     \begin{tabular}{c c cc c } % centered columns (5 columns)     \toprule     &&\multicolumn{3}{c}{\textbf{J}}  \\           \cmidrule(l){2-5}     &&\multicolumn{2}{c}{\textbf{$M_J=1$}}& $\textbf{$M_J=2$}$  \\           \cmidrule(l){2-4}      &\textbf{I} & $\textbf{J=1}$ &$\textbf{J=2}$ & \\             \bottomrule     \multirow{2}{*}{\textbf{ $ M_I=1$ } }&I=1 &      $n_{1111}$   &   $n_{1211}$  &  $n_{1+11}$\\     &I=2 &      $n_{2111}$   &   $n_{2211}$  &  $n_{2+11}$\\      \textbf{ $ M_I=2$ } &  &       $n_{+121}$   &   $n_{+221}$  & $n_{++22}$\\     \bottomrule     \end{tabular}     \end{document}


title: How to draw an ellipse with FeynMF?

text: How to draw an ellipse with controllable parameters? The formula for ellipse is `(x^2)/(a^2) + (y^2)/(b^2) = 1`. Parameters `a` and `b` are called semi-major and semi-minor axis, respectively. In other words, `2a` is the width whereas `2b` is the height of an ellipse.


title: Squeezing table of contents without hard coding the vertical space or the font

text: I have a table of contents that is 1 page+1 line long. I would like to squeeze it into one page only. I know I could add a line to the page (although how?) or to reduce the font size or the space between lines but I would prefer a more general solution. Something I will be able to use also in the future if, say, I will have a situation of 1page+2lines. Below is what I get now: ![enter image description here](http://i.stack.imgur.com/ufyR3.png) * * * ## EDIT The question was put on hold. I am not searching for any of the solutions in the suggested link, what I am searching for is a dynamical way of fixing ToC in one page. The accepted solution in the link reduces the vertical space between chapter ToC entries from `1.0em` to `0.8em`. And it works for one line. I am searching for a general way of adjusting ToC in one page, that will work **without** me **hard coding** the vertical space; that is, have TeX calculate the necessary space to shrink by so that the contents are flush with the top and bottom margins.


title: .bat file execution from a .tex document during compilation

text: Is there a way to execute a `.bat` file directly from a latex document when I compile that document? I would something like this:               \documentclass{article}          \begin{document}     \chapter{test}     bla bla bla     ecc...     \executebat{C:\...\...\...}     \end{document}


title: \write and \\ command

text: Why I get some errors with the code below, and how can I fix that behaviour?               \documentclass{article}          \begin{document}     \newwrite\indexist     \immediate\openout\indexist=classic.ist     \immediate\write\indexist{\\}     \immediate\write\indexist{\catcode`\{=11{\catcode`\{=2 text}     \immediate\write\indexist{other text\catcode`\}=11}\catcode`\}=2}     \immediate\closeout\indexist     \end{document}


title: fancyvrb and \overfullrule

text: I know I can use `\overfullrule=5pt` to get overfull lines marked with a black marker, but using the `Verbatim` environment from the `fancyvrb` package the overfull lines are not marked. For example,               \documentclass{article}     \usepackage{fancyvrb}          \overfullrule=5pt          \begin{document}     \mbox{Overfull line marked without using the Verbatim environment from the fancyvrn package.}          \begin{Verbatim}     Overfull line not marked using the Verbatim environment from the fancyvrb package.     \end{Verbatim}     \end{document}      Note: I know I can use the `BVervatim` environment to mark the overfull lines, but it changes all the code layout in my document. Is it possible to use the `Verbatim` environment and to get the overfull lines marked?


title: IEEEeqnarray vs. hyperref -> reference jumps to the beginning of the section

text: I'm using the package `IEEEtrantools` in an `scrreprt` document class environment. My problem is that, when using `IEEEeqnarray` together with `hyperref`, the link jumps to the beginning of the section and not to the referred equation. How can I make the link jumping to the equation? Example:               \documentclass{scrreprt}     \usepackage[retainorgcmds]{IEEEtrantools}     \usepackage{hyperref}          \begin{document}     \section{The equation}     \newpage     \begin{IEEEeqnarray}{c}         \frac{1}{v(E)}\frac{\partial}{\partial t}\Psi(\mathbf{r},\mathbf{\Omega},E,t)       + \mathbf{\Omega} \cdot \nabla \Psi(\mathbf{r},\mathbf{\Omega},E,t)       + \Sigma_t(\mathbf{r},E,t) \Psi(\mathbf{r},\mathbf{\Omega},E,t)       = S(\mathbf{r},\mathbf{\Omega},E,t)       \IEEEeqnarraynumspace       \label{eq:Boltzmann}     \end{IEEEeqnarray}     \newpage     Referencing (\ref{eq:Boltzmann})...     \end{document}


title: Error compiling algpseudocode example

text: Compiling this piece of code (which I took from the guide of the algorithmicx package) I get a lot of errors and do not understand why. I think it is probably some stupid typo I can't see but this is driving me mad.. Here is the code               \documentclass{article}     \usepackage{algpseudocode}          \begin{document}          \algnewcommand\algorithmicto{\textbf{to}}     \algrenewtext{For}[3]%        {\algorithmicfor\ #1 \gets #2 \algorithmicto\ #3 \algorithmicdo}     \begin{algorithmic}[1]     \State $p \gets 1$     \For{i}{1}{n}          \State $p \gets p * i$     \EndFor     \end{algorithmic}          \end{document}      And here is the log:               LOG FILE :     This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2012.10.21) 16 DEC 2012 21:46     entering extended mode     **test2.tex     (C:\Users\Antonio\Dropbox\AlgoComplessità\2-StringMatching\test\test2.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,     croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat     vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm     an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,     romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis     sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u     senglishmax, welsh, loaded.     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     (C:\Users\Antonio\AppData\Roaming\MiKTeX\2.9\tex\latex\algorithmicx\algpseudoco     de.sty     Package: algpseudocode     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\ifthen.sty"     Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)     )     (C:\Users\Antonio\AppData\Roaming\MiKTeX\2.9\tex\latex\algorithmicx\algorithmic     x.sty     Package: algorithmicx 2005/04/27 v1.2 Algorithmicx     Document Style algorithmicx 1.2 - a greatly improved `algorithmic' style     \c@ALG@line=\count87     \c@ALG@rem=\count88     \c@ALG@nested=\count89     \ALG@tlm=\skip43     \ALG@thistlm=\skip44     \c@ALG@Lnr=\count90     \c@ALG@blocknr=\count91     \c@ALG@storecount=\count92     \c@ALG@tmpcounter=\count93     \ALG@tmplength=\skip45     )     Document Style - pseudocode environments for use with the `algorithmicx' style     ) (C:\Users\Antonio\Dropbox\AlgoComplessità\2-StringMatching\test\test2.aux)     LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4.     LaTeX Font Info: ... okay on input line 4.     LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4.     LaTeX Font Info: ... okay on input line 4.     LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4.     LaTeX Font Info: ... okay on input line 4.     LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4.     LaTeX Font Info: ... okay on input line 4.     LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4.     LaTeX Font Info: ... okay on input line 4.     LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4.     LaTeX Font Info: ... okay on input line 4.     LaTeX Font Info: External font `cmex10' loaded for size     (Font) <7> on input line 9.     LaTeX Font Info: External font `cmex10' loaded for size     (Font) <5> on input line 9.     ! Missing $ inserted.     <inserted text>     $     l.10 \For{i}{1}{n}     I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.     ! LaTeX Error: Command \item invalid in math mode.     See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.     ...     l.11 \State     $p \gets p * i$     Try typing <return> to proceed.     If that doesn't work, type X <return> to quit.     ! LaTeX Error: Something's wrong--perhaps a missing \item.     See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.     ...     l.11 \State     $p \gets p * i$     Try typing <return> to proceed.     If that doesn't work, type X <return> to quit.     ! LaTeX Error: Something's wrong--perhaps a missing \item.     See the LaTeX manual or LaTeX Companion for explanation.     Type H <return> for immediate help.     ...     l.11 \State     $p \gets p * i$     Try typing <return> to proceed.     If that doesn't work, type X <return> to quit.     ! Missing $ inserted.     <inserted text>     $     l.11 \State $p \gets     p * i$     I've inserted a begin-math/end-math symbol since I think     you left one out. Proceed, with fingers crossed.     ! Missing \endcsname inserted.     <to be read again>     \ALG@currentblock@2     l.12 \EndFor     The control sequence marked <to be read again> should     not appear between \csname and \endcsname.     ! Extra \endcsname.     \ALG@makenobeginrepeat ...LG@thisblock \endcsname     \relax \def \ALG@thisblock...     l.12 \EndFor     I'm ignoring this, since I wasn't doing a \csname.     ! Missing number, treated as zero.     <to be read again>     \ALG@b@2@EndFor@0     l.12 \EndFor     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)     ! Missing number, treated as zero.     <to be read again>     \ALG@currentblock@2     l.13 \end{algorithmic}     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)     ! Missing = inserted for \ifnum.     <to be read again>     \ALG@currentblock@2     l.13 \end{algorithmic}     I was expecting to see `<', `=', or `>'. Didn't.     ! Missing number, treated as zero.     <to be read again>     \ALG@currentblock@2     l.13 \end{algorithmic}     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)     [1     {C:/Users/Antonio/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]     (C:\Users\Antonio\Dropbox\AlgoComplessità\2-StringMatching\test\test2.aux) )     Here is how much of TeX's memory you used:     727 strings out of 494045     10030 string characters out of 3148380     55788 words of memory out of 3000000     4092 multiletter control sequences out of 15000+200000     4247 words of font info for 16 fonts, out of 3000000 for 9000     715 hyphenation exceptions out of 8191     27i,4n,17p,252b,184s stack positions out of 5000i,500n,10000p,200000b,50000s     <C     :/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmbx10.pfb><C:/Progra     m Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi10.pfb><C:/Program Files/     MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb><C:/Program Files/MiKTeX 2.     9/fonts/type1/public/amsfonts/cm/cmr8.pfb><C:/Program Files/MiKTeX 2.9/fonts/ty     pe1/public/amsfonts/cm/cmsy10.pfb>     Output written on test2.pdf (1 page, 45710 bytes).     PDF statistics:     26 PDF objects out of 1000 (max. 8388607)     0 named destinations out of 1000 (max. 500000)     1 words of extra memory for PDF output out of 10000 (max. 10000000)


title: Align all equal signs in the document

text: Is there a way to align all the equal signs in all equations all over the document? I write a theses (`scrbook`) and like all equal signs to line up. At least in a chapter if not possible for the whole document. The `\begin{align}` or `\begin{eqnarray}` just do that for the small group. And to use `\intertext` for a whole chapter is unpractikal. Example how it is at the moment:               \begin{align}         F_L^{\rightarrow}   & =     q ( E_{eFeld}^{\rightarrow} + v^{\rightarrow} \times B^{\rightarrow} )         \end{align}          much text              \begin{align}         F_{Lx}  & =     q ( E_{eFeld} + v_{gx} * B )         \end{align}              little text              \begin{align}         T   & =     F_{L1} - F_{L2}                                         \\             & =     q ( E_{eFeld} + v_{g1} * B - E_{eFeld} - v_{g2} * B )   \\             & =     q*B ( v_{g1} - v_{g2} )                  \end{align}                                   \subsection{new subsection}              very little text              \begin{align}         P_{Photon}  & =     hf * nAc                \\                     & =     \frac{E_{Photon}}{t}             \end{align}              more text              \begin{align}         F_{0}       & =     2nhfA               \\                     & =     \frac{2 P_{Photon}}{c}           \end{align}      And I would like to have something like:               A  = b+C          Text          A  = longe equation          **New Headline**          B  = also nice equation      And so on. I guess you get what I want. Can you help me? Thank you


title: Subfigure moves figures on the top of page

text: I tried to put two figures in one row and I found that subfigure package could help me. But code:               \documentclass[11pt, a4paper, draft]{article}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}     \section{Example }     Lorem ipsum          \begin{figure}             \centering             \begin{subfigure}[b]{0.3\textwidth}                     \centering                     \includegraphics[width=\textwidth]{./2pol-hist}                     \caption{A gull}             \end{subfigure}                  \begin{subfigure}[b]{0.3\textwidth}                     \centering                     \includegraphics[width=\textwidth]{./2pol-hist}                     \caption{A tiger}             \end{subfigure}             \caption{Pictures}     \end{figure}          \end{document}      reorganize my document, placing figures on the top of page. Why figures aren't below the section, as I specified in latex code?


title: Bibtex could not find .tex.aux

text: I'm getting the following error message from bibtex.               $ bibtex test.tex     I couldn't open file name `test.tex.aux'      What is causing this? [NB. I'm about to write an answer to this question.]


title: Environment code undefined

text: Why do I get `! LaTeX Error: Environment code undefined.` when I use:               \documentclass[10pt,a4wide]{article}     \usepackage{a4wide}     \usepackage[utf8]{inputenc}     \usepackage[portuguese]{babel}     \usepackage{graphicx}     \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}          \begin{document}     \begin{minipage}{7cm}            \begin{code}            module Dir where          import TeX     import Data.List          \end{code}          \end{minipage}\hfill     \begin{minipage}{7cm}          \begin{code}          module DirV where          import TeX     import Data.List          \end{code}          \end{minipage}      ![With code](http://i.stack.imgur.com/43tei.png) ![With verbatim](http://i.stack.imgur.com/E6XfC.png)


title: Include pdfTeX in Inno Setup whitout install MiKTeX

text: I have developped a little tool in matlab to fill directly some `.tex` files and then compile them in a pdf file (I use the command `pdflatex` to compile). It is well working on my computer because I have MiKTeX installed. Now I would like to make a installer (using Inno Setup) to share this tool but I need to include the compiler in the setup. Does someone know if there is a way to only install pdfTeX for the furure users of my tool or do I need to require them to install the whole MiKTeX?


title: Why can I not vertically align the text in the 3rd table column?

text: I'm trying to make a table which lists some math functions. I've been searching the net on how to center the equations in the cells both vertically and horizontally. And I think I've found an answer to it, except that no matter what I do the equations in the 3rd column won't align, and just stays on the top. I use the `array` package. What am I doing wrong?                   \begin{table}[H]         \centering         \newcolumntype{A}{ >{\centering\arraybackslash} m{1cm} }         \newcolumntype{B}{ >{\centering\arraybackslash} m{4cm} }         \newcolumntype{C}{ >{\centering\arraybackslash} m{2cm} }         \begin{tabular}{|A|B|C|}         \hline              $n$ & $a_{n}$ & $\frac{k_{0}^{n}}{n!}a_{0}$ \\[2ex]              \hline              1 & $k_{0}a_{0}$ & $\frac{k_{0}^{1}}{1}a_{0}$ \\[2ex]              \hline              2 & $\frac{k_{0}}{2}a_{1}=\frac{k_{0}}{2}k_{0}a_{0}$          & $\frac{k_{0}^{2}}{2 \cdot 1}a_{0}$ \\[2ex]              \hline              3 & $\frac{k_{0}}{3}a_{2}=\frac{k_{0}}{3}\frac{k_{0}}{2}k_{0}a_{0}$          & $\frac{k_{0}^{3}}{3 \cdot 2 \cdot 1}a_{0}$ \\[2ex]              \hline              4 & $\frac{k_{0}}{4}a_{3}=\frac{k_{0}}{4}\frac{k_{0}}{3}         \frac{k_{0}}{2}k_{0}a_{0}$          & $\frac{k_{0}^{4}}{4 \cdot 3 \cdot 2 \cdot 1}a_{0}$ \\[2ex]              \hline         \end{tabular}         \end{table}


title: Datatool DTLifnull not working

text: Considering the following database:               Name,ID,Gender,Years in Service     ,382473856,M,15     Francesca Joestar,461276432,F,10     Chan Ker Mei,463724631,F,5     Hikaru Yagami,154954739,M,10      The fist line has the field "Name" empty. The following code does not work. In fact the function:               \DTLifnull{\name}{Mister X}{\name}      gives always the result FALSE. Why?               \documentclass[16pt]{scrartcl}     \usepackage[left=3cm,right=3cm,top=6cm,bottom=5cm]{geometry}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{tgschola}     \usepackage{fourier-orns}     \usepackage{graphicx}     \usepackage{wallpaper}          \usepackage{datatool}     \DTLloaddb{names}{namelist.csv}          \begin{document}     \linespread{2}\selectfont     \pagestyle{empty}     \TileWallPaper{\paperwidth}{\paperheight}{old-border}          \DTLforeach{names}{     \name=Name, \ID=ID, \gender=Gender, \yr={Years in Service}}{     {\centering         {\LARGE\bfseries Certificate of Appreciation}\par         {\LARGE\decofourleft\quad{\decoone}\quad\decofourright}\par         \vskip2em         We thank\par         {\large\bfseries\MakeUppercase{\DTLifnull{\name}{Mister X}{\name}}}\par         {\large (ID: \ID)}\par         for having been with\par         {\large XYZ Company}\par         {for \emph{\LARGE\yr} glorious years}\par         \vskip1em         We commend \DTLifeq{\gender}{M}{him}{her} on \DTLifeq{\gender}{M}{his}{her} excellent service.\par         }              \vfill              \hfill         \begin{minipage}{.4\textwidth}         Managing Director\par         \vskip1cm         \rule{8em}{.5pt}         \vskip-1em         (MD's Name)\par         \end{minipage}              \pagebreak     }     \end{document}


title: From paralist to enumitem, using tabto too

text: This is a follow up question to the one I asked a while back: Horizontal enumeration in multiple columns . There I was using `paralist` and now I feel it is better to switch to `enumitem` (since I can use the `resume` option). The environment `tabbedenum` using `paralist` worked perfectly for my needs, but transferring this to `Tabbedenum` based on `enumitem` no longer works. Could this be because of the star (i.e. if `\enumerate` is short for `\begin{enumerate}` then what works for `\begin{enumerate}*`)? That's why I tried by defining the environment `Inparaenum`. Could the problem be based on the optional options? In fact, could `Tabbedenum` be defined with the optional options too, so that the syntax would be: `\begin{Tabbedenum}[label=\emph{\alph*})]{3}`? Below is a MWE.               \documentclass{article}     \usepackage{tabto}     \usepackage{paralist}          \newenvironment{tabbedenum}[1]      {\NumTabs{#1}\inparaenum\let\latexitem\item       \def\item{\def\item{\tab\latexitem}\latexitem}}      {\endinparaenum}          \usepackage[inline]{enumitem}     \newenvironment{Inparaenum}{\begin{enumerate*}[label=\emph{\alph*})]}{\end{enumerate*}}          \newenvironment{Tabbedenum}[1]      {\NumTabs{#1}\Inparaenum\let\latexitem\item       \def\item{\def\item{\tab\latexitem}\latexitem}}      {\endInparaenum}          \begin{document}          \begin{tabbedenum}{3}     \item hello world     \item hello world     \item hello world     \item hello world     \item hello world     \item hello world     \end{tabbedenum}          \begin{Tabbedenum}{3}     \item hello world     \item hello world     \item hello world     \item hello world     \item hello world     \item hello world     \end{Tabbedenum}          \end{document}


title: pdflatex generates unwanted transparencies

text: `pdfLaTeX` generates PDF-page with transparency operators. Minimal example:               \documentclass{report}     \usepackage{graphicx}          \begin{document}      \includegraphics{image.pdf}     \end{document}      `image.pdf` is PDF 1.4, but no transparency operators is used. If i try to generate PostScript, i get clear result without unwanted rasterization. This works fine (`pdftops` is from `poppler-utils`):               $ pdftops image.pdf      But when i try to compile `minimal.tex` and generate PostScript out of `minimal.pdf`, i get rasterized image in ps-file. The same with printing.               $ pdflatex minimal.tex && pdftops minimal.pdf      Also i tried to convert `image.pdf` to PDF 1.2 with `ghostscript`:               $ pdf2ps image.pdf - | ps2pdf12 - image12.pdf      When i include `image12.pdf` instead of `image.pdf`, i get correct result from `pdfLaTeX` (`minimal.pdf` can be correctly converted to PostsScript or to be printed). So, can i force `pdfLaTeX` to import PDF 1.4 files with PDF 1.2 compatibility?


title: Scan () and Sweave Help

text: I used `x=scan()` for my data set and I do not know what the proper code is to put it in my sweave file. I have tried looking on the internet for help, but I could not find anything. I did try               <<>>=       "x=scan()       10 12 1 4 47 33 18 22 13 14"       @      but there is an error that says x not found when I try to use it.


title: pgfplots log ticks with fixed point: only for one axis?

text: I recently learned about the `log ticks with fixed point` option in pgfplots, which I like very much. However, it seems like if I add it to the options of an axis like so               \begin{axis}[%       max space between ticks=10pt,       xmin=0.05,xmax=50,        ymin=0.0000001,ymax=1000000000,       ymode=log,       xmode=log,       xscale=1.205,       yscale=2.21,       x tick label style={yshift=-0.5em,log ticks with fixed point},       y tick label style={xshift=-0.2em},       xlabel absolute,       xlabel={$p\bar{p}/pp$ collisions -- $\sqrt{s}$ [TeV]},       ylabel style={at={(ticklabel cs:0.5)},yshift=-2em},       xlabel style={at={(ticklabel cs:0.5)},yshift=2em},       ylabel={$\sigma$ [nb] or events/sec for $\mathcal{L} = 10^{33}\textrm{cm}^{-2}\textrm{s}^{-1}$}]      \end{axis}      it always acts on both axis (x and y). Is there a way to only have it act on one axis (in this case: x axis?).


title: Turn marginpar into a regular paragraph

text: I'm writing notes for a university course. My content goes into a file called `content.tex` and then use two other files (called `notes.tex` and `kindle.tex`) to define styles and use the LaTeX `import` command to print the content. This works really well, since I can have two differently formatted `.pdf` files coming from the same source. However, I use the `marginpar` environment in my source quite a lot, and I disabled it for the Kindle formatted output.(to save screen space). Is there a way to redefine the marginpar environment in my `kindle.tex` so that they appear as regular (or maybe highlighted) paragraphs? Thanks


title: titlesec: why is contents a section?

text: I've been playing around with the `titlesec` package combined with the `scrartcl` class. I find the headings titles of `scrartcl` a bit ugly, but I do like the fact that I can scale font sizes to 8pt. Anyway that's not the point. I'm defining sections to be of the form > 1.8 --- Sectionname. But Contents is treated like a Section, and I am thus left with the most ugly > \--- Contents. How to fix that? Am I using the `titlesec` package improperly? MWE:                 \documentclass{article}        \usepackage[compact]{titlesec}     \titleformat{\section}[block] % section         {\scshape}         {\thesection}         {0pt}{\filcenter \hspace{.3em}---\hspace{.3em}}[]     \titlespacing*{\section}         {0em} %left         {0em} %before         {1em} %after/below         \begin{document}          \tableofcontents           \section{this a secti}             ion.           \end{document}      p.s. I also found myself doing things like `\renewcommand{\abstractname}{\normalfont\scshape Abstract}`, am I a bad person?


title: Equation position changing

text: Kindly have a look at the LaTeX code below:               \documentclass[10pt,a4paper,xcolor=dvipsnames,xcolor=table]{beamer}     \pdfpageattr{/Group <</S /Transparency /I true /CS /DeviceRGB>>}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %                  PACKAGES     \usepackage{mathrsfs,amsmath,amsfonts,amssymb,makeidx}          \begin{document}     \begin{frame}       \[QQ=RR\]\pause         \begin{itemize}         \item Retarded         \item \only<2>{Exp1}           $A=B$\\           \only<2>{$B=C$}\pause         \item $C=D$\\           \only<3>{         where {           \begin{align}             P&=Q \nonumber\\             Q &=0&\nonumber           \end{align}         }           }           \pause         \item Exp2            \[W=U\]       \end{itemize}     \end{frame}     \end{document}      The problem is, as I alter the materials, as expected, LaTeX fits it what it thinks is best withing the page. So, the equations keep jumping up and down (look at eqn 1). What I want is to keep the position of those equation within the page fixed. New materials will come and go at the bottom, but will not alter the position of displayed equations. Is this possible?


title: centering a part of an equation

text: I am using `\vdots` in my equation, and I need it to be centered. As shown in the figure it is automatically left indented. I am not able to bring the dots to the center. I am providing MWE also. ![enter image description here](http://i.stack.imgur.com/gWgwB.png)               \documentclass[12pt,letter]{report}               \usepackage{graphicx,cite,epsfig,amssymb,amsmath,endnotes,algorithm,algorithmic}          \begin{document}     \begin{align}        &X_{1} \rightarrow\mathcal{N}\left(A\right) \nonumber \,,\\       &X_{2} \rightarrow\mathcal{N}\left(B\right) \nonumber \,,\\      \vdots \nonumber      \\&X_{A-1} \rightarrow\mathcal{N}\left(C\right) \nonumber\,, \\     &X_{A} \rightarrow\mathcal{N}\left(D\right) \nonumber \,, \\       &X \rightarrow\mathcal{N}\left(E\right)\,.       \end{align}             \end{document}


title: Missing Hindi font

text: When I tried the following Tex file I got The font Lohit Hindi can not be found, although I installed the Typeset Devanagari. Same if I use sanskrit font or any other font from this type set. Any idea will be greatly appreciated.               \documentclass[10pt]{report}     \usepackage[letterpaper,top=2.0cm,bottom=2.0cm,left=0.5cm,right=1cm]{geometry}     \usepackage{booktabs}     \usepackage{array}     \usepackage{fancyhdr}     \usepackage[iso]{datetime}     \usepackage{lastpage}          \usepackage{polyglossia}     \setdefaultlanguage{english}     \setotherlanguage{Lohit Hindi}          \usepackage{fontspec}     \setmainfont{Times New Roman}     \newfontfamily\devanagarifont[Scale=MatchUppercase]{Sanskrit}     \newfontfamily\devtransl[Mapping=DevRom]{Times New Roman}                         \pagestyle{fancy}     \fancyhf{}     \setlength\headheight{0.5pt}     \chead{\textbf{\huge{Inform}}}     \lhead{\textbf{Test1}}     \rhead{\textbf{\normalsize{Sets}}}     \rfoot{\today \hspace{0.5pt} \currenttime}     \cfoot{Page \thepage\ of \pageref{LastPage}}\lfoot{Some}          \renewcommand{\headrulewidth}{1pt}          \usepackage{supertabular}     \begin{document}     \fontsize{8}{10}\selectfont     \tablehead     {     \toprule     & \multicolumn{1}{p{24.5mm}}{\textbf{\foreignlanguage{sanskrit}{ग्रोस वोलयूम}}}     & \multicolumn{1}{p{21mm}}{\textbf{नेट वाल्यूम}}     & \multicolumn{1}{p{16mm}}{\textbf{लेवल}}     & \multicolumn{1}{p{21mm}}{\textbf{तापमान}}     & \multicolumn{1}{p{16mm}}{\centering{\textbf{ऊलाज}}}     & \multicolumn{1}{p{42mm}}{\centering{\textbf{लास्ट अपडेटड}}}\\          & \multicolumn{1}{p{24.5mm}}{\centering{\textbf{गैलन}}}     & \multicolumn{1}{p{21mm}}{\centering{\textbf{गैलन}}}     & \multicolumn{1}{p{16mm}}{\textbf{सेन्टीमीटर}}     & \multicolumn{1}{p{21mm}}{\centering{\textbf{सेन्टीग्रेड}}}     & \multicolumn{1}{p{16mm}}{\centering{\textbf{गैलन}}} & \\     \toprule     }          \begin{supertabular}{p{35mm}*{6}{r}}     \\ \multicolumn{7}{l}{\textbf {3001}}\\\\     \textbf{टेंक  2} & \multicolumn{6}{l}{SET1}\\     PROD 2& \multicolumn{6}{l}{(4,011 अधिकतम)}\\     \multicolumn{1}{r}{\textbf{प्रोडक्ट}} & 2,495.40 & 2,479.66 & 145.55 & 20.53 & 1,313.07 & 19/04/2012 15:00:23 \\     \multicolumn{1}{r}{\textbf{Water}} & 1.79 & & 1.00 & & & \\\\      \textbf{टेंक  3} & \multicolumn{6}{l}{SET2}\\     PROD 3& \multicolumn{6}{l}{(4,011 अधिकतम)}\\     \multicolumn{1}{r}{\textbf{प्रोडक्ट}} & 2,593.08 & 2,578.51 & 150.40 & 20.01 & 1,213.86 & 19/04/2012 15:00:23 \\     \multicolumn{1}{r}{\textbf{SET3}} & 3.32 & & 1.51 & & & \\\\      \toprule[2pt]\\     \end{supertabular}     \end{document}


title: Energy level diagrams with TeX

text: Do you have any experience with creating `energy level diagrams` with TeX as shown below ? What software/packages would you recommend me ? I've heard about TikZ, but I don't have any experience with it and I would prefer something easy to handle or more WISIWYG. I would like to illustrate `Hund rules`, `Zeeman splitting` and some related physical effects with option to customize pictures. Hopefully this isn't too much off-topic question. Cheers. ![enter image description here](http://i.stack.imgur.com/UgKP3.gif) ![enter image description here](http://i.stack.imgur.com/jfpo1.gif) ![enter image description here](http://i.stack.imgur.com/g5Fgs.jpg) **Examples for Energy level diagrams Links** : http://hyperphysics.phy-astr.gsu.edu/hbase/atomic/imgato/mulelec2.gif http://mxp.physics.umn.edu/s05/projects/s05rb/images/Image173.gif http://www.webexhibits.org/causesofcolor/images/content/15z.jpg


title: How to fix in ConTeXt problems after pages and warning 'no GlyphToUnicode entry has been inserted yet!'

text: Is the warning `no GlyphToUnicode entry has been inserted yet!` exclusive of pdftex or is it caused by patches loaded by mkii or by using 'cont-sys.rme' instead of cont-sys.tex? The funny thing is, that after running it multiple times, the message disssappears, albeit with the problems after pages warning that I just learned to ignore. A couple of years ago, both Oberdiek and Hagen commented about it, and their comments were somehow unrelated. Hagen for example was fixing a situation where mkii files needed to be loaded. Bottom line is that it did not address this problem. When I run it directly in the terminal no problems whatsoever appear, which makes me wonder whether the problem is with auctex instead. I assume that the 'no Glyphtounicode' warning is corrected by using luatex or xetex. So the question that stands is: should the warning 'problems after n pages' be ignored, or is there a way around to fix it? Here are the results from the terminal               mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)     mkiv lua stats  > loaded patterns: en::2, load time: 0.000     mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.001 seconds loading     mkiv lua stats  > callbacks: 137 direct, 182 indirect, 319 total     mkiv lua stats  > randomizer: resumed with value 0.88086526369716     mkiv lua stats  > lxml preparation time: 0.000 seconds, 0 nodes, 15 lpath calls, 0 cached calls     mkiv lua stats  > result saved in file: example4.pdf, compresslevel 3, objectcompreslevel 3     mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf (experimental), lmroman12-regular.otf     mkiv lua stats  > fonts load time: 0.192 seconds      mkiv lua stats  > luatex banner: this is luatex, version beta-0.76.0-2013070317  (tex live 2013) (rev 4627)     mkiv lua stats  > control sequences: 37355 of 65536 + 100000     mkiv lua stats  > current memory usage: 37 MB (ctx: 36 MB)     mkiv lua stats  > runtime: 0.656 seconds, 1 processed pages, 1 shipped pages, 1.524 pages/second          system          | total runtime: 4.405      With XeTeX engine, here are the changes to context.el so `C-c C-c` returns the viewer:               ;; Various     (defun TeX-ConTeXt-sentinel (process name)       "Cleanup TeX output buffer after running ConTeXt."       (cond ((TeX-TeX-sentinel-check process name))         ((save-excursion            ;; in a full ConTeXt run there will multiple texutil            ;; outputs. Just looking for "another run needed" would            ;; find the first occurence            (goto-char (point-max))            (re-search-backward "TeXUtil " nil t)            (re-search-forward "another run needed" nil t))          (message (concat "You should run ConTeXt again "                   "to get references right, "                   (TeX-current-pages)))         (setq TeX-command-next TeX-command-default)         ((re-search-forward "removed files :" nil t)          (message "sucessfully cleaned up")         (re-search-forward "^ ?TeX\\(Exec\\|Util\\)" nil t) ;; strange regexp --pg          (message (concat name ": successfully formatted "                   (TeX-current-pages)))          (setq TeX-command-next TeX-command-default))         (re-search-forward "^ ?TeX\\(Exec\\|Util\\)"  nil t)         (t          (message (concat name ": problems after "                   (TeX-current-pages)))          (setq TeX-command-next TeX-command-Show)))))


title: Why does \vfill not work inside minipage?

text: Perhaps the answer is trivial, and I am facing the scenario as part of a larger macro. I faced a situation where I found that `\vfill` does not work inside `minipage` environment. The extracted code from the bigger picture can be minimized to the following.               \documentclass{article}          \begin{document}          \begin{minipage}{0.7\textwidth}       As far as the laws of mathematics refer to reality, they are not       certain; and as far as they are certain, they do not refer to       reality.\vfill            Mathematics, rightly viewed, possesses not only truth, but supreme       beauty - a beauty cold and austere, like that of       sculpture.     \end{minipage}          \end{document}      The `\vfill` above behaves as if it is not there. Perhaps the design is such that `minipage`s shall remain as _mini_ pages and will not fill up the whole page. But I would like to know the answer. And while we are on the issue, is there a way I can make `\vfill` work in a situation like the above. Use of `minipage` in my macro is (almost) unavoidable.


title: Simple (rectangular) diagrams labelled with mathematical expressions

text: I am looking to typeset a diagram vaguely similar to this one: ![Standard Paper Sizes](http://www.papersizes.org/images/a-series-paper- sizes-1.jpg) The differences, for my diagram, are that I don't need an "A0" overlay - and... rather than sizes in mm, and A-numbers, I want math expressions, in latex, neatly typeset and centred. I've considered using Xfig - but positioning the maths expressions is tedious/tricky/manual. I've considered using Inkscape - but that makes it hard to include the mathematical expressions at all. I've considered using TikZ - but I can't find any example diagrams of this (approximate) style. I have a preference to implement this using only Latex (i.e. not use a GUI graphics tool to draw it) but I'm not sure where to start. By any chance, can anyone point me at a suitable example?


title: Modify article citation style using biber and verbose-trad1

text: I'm using the style `verbose-trad1` in biber for my bibliography but I need to change the way it presents the Journal title and Number. They must be between parenthesis !               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{csquotes}                        \usepackage[style=verbose-trad1,     backend=biber,     bibencoding=inputenc,                language=french,                     natbib=true,                         sortcites=true,     autopunct=true,                          hyperref=true,                               block=space,     citetracker=true,     ibidpage=true,     ibidtracker=context,     idemtracker=true,     pagetracker=true,     url=false,     ]{biblatex}          \usepackage{filecontents}          \begin{filecontents*}{articles.bib}          @article{Buis:2001aa,         Address = {Paris},         Author = {Pierre Buis},         Journal = {Cahiers Evangile},         Keywords = {Bible, AT, Lévitique},         Number = {116},         Publisher = {Cerf},         Title = {Le Lévitique : la Loi de sainteté},         Year = {2001},         }     \end{filecontents*}               \begin{document}          \fullcite{Buis:2001aa}          \end{document}      ![Actual result](http://i.stack.imgur.com/2Nyuz.png) Nevertheless, I'd like to have the following : ![enter image description here](http://i.stack.imgur.com/fGh4J.png)


title: Lines are not equally spaced in XeLaTeX

text: I've just move from LaTeX to XeLaTeX, and when I first use it, I found this abnormality :               \documentclass[12pt]{article}     \usepackage{polyglossia}     \XeTeXlinebreaklocale "th_TH"     \XeTeXlinebreakskip = 0pt plus 1pt     \newfontfamily{\thai}[Script=Thai]{Norasi}     \begin{document}     {\thai น้องบางคนอาจเคยพบสมการกำลังสามเหล่านี้ และได้พยายามแก้ตามทฤษฎีที่ได้เรียนมาโดย ตั้งสมมติฐาว่าค่า $x$      ที่เป็นไปได้ทั้งหมดคือ ตัวประกอบที่เป็นไปได้ทั้งหมดของ $d$  หารด้วยตัวประกอบที่เป็นไปได้ทั้งหมดของ     $a$  หลังจากที่น้องได้ทำการแทนค่าที่เป็นไปได้ทั้งหมดเหล่านี้แล้วพบว่าสมการก็ยังไม่เป็นจริง หลายคนอาจสรุปทันทีว่าคำตอบ     ของสมการนี้เป็นจำนวนเชิงซ้อน (กรณีนี้รวมถึงสมการที่มีกำลังมากกว่าสามด้วยนะครับ) นั่นเป็นความเข้าใจผิดอย่างเต็มที่เลยครับ     ที่ว่าเข้าใจผิดอย่างเต็มที่ก็เพราะว่าในทฤษฎีกล่าวไว้แต่เพียงว่า คำตอบที่เป็นไปได้ทั้งหมดเหล่านี้ล้วนแต่เป็นคำตอบที่เป็นไปได้ทั้งหมด     ของจำนวนตรรกยะเท่านั้น จึงยังไม่ได้ครอบคลุมกรณีที่คำตอบจะเป็นจำนวนอตรรกยะ}          \LaTeX{} is a document preparation system and document markup language. It is widely used for     the communication and publication of scientific documents in many fields, including     mathematics, physics, and computer science. It also has a prominent role in the preparation     and publication of books and articles that contain complex multilingual materials, such     as Sanskrit and Arabic, including critical editions. \LaTeX{} uses the \TeX{} typesetting     program for formatting its output, and is itself written in the \TeX{} macro language.     \LaTeX{} is not the name of a particular editing program, but refers to the encoding     or tagging conventions that are used in \LaTeX{} documents.  (From Wikipedia, the     free encyclopedia)     \end{document}      The code above is a 2-paragraph article. One in Thai, and the other in English. And this is the result : ![enter image description here](http://i.stack.imgur.com/rBgxi.png) You can clearly see that line spacing between line 3 and 4 is narrower than others. I think this is because Thai characters have upper and lower punctuation. Can anybody help me on this? Thanks.


title: multiple equations in a single line, numbering problem

text: I have two relatively short equations which I want to fit in one line. Using the multicols and miniage I am getting : equation1, (1) equation2. (2) The numbers are on the right side of each equations but I want something like that: equation1, equation2 (1),(2) Where the both numbers are together on the far right. I've just spent the last hour looking for the answer and still no idea.


title: Removing some lines in table

text: \documentclass{article}     \usepackage{rotating}     \begin{document}     \begin{table}[h]     \centering     \begin{tabular}{|c|c|c|c|}     \hline     &     \begin{sideways}ABCD\end{sideways} &     \begin{sideways}EFGH\end{sideways} &     \begin{sideways}IJKL\end{sideways} \\ \hline     AA & 2 & 3 & 4 \\     BB & 2 & 3 & 4 \\     CC & 2 & 3 & 4 \\     DD & 2 & 3 & 4 \\ \hline     \end{tabular}     \caption{Tmp}     \label{tab:tmp}     \end{table}     \end{document}      How can I remove lines like in images below? ![enter image description here](http://i.stack.imgur.com/BR47c.png) Also, how can I raise the first horizontal line a little up? The final result should be: ![enter image description here](http://i.stack.imgur.com/nFkQC.png)


title: Colored strings by listings package

text: I'm trying to type my C++ homework by LaTeX in order to prepare it as a pdf file. I want to have my keywords in blue, my numbers in violet and my strings in reddish brown. I could do the two first by looking up the documentation and other questions here, but I have no idea how to change the color of my strings.               \documentclass{article}          \usepackage{etoolbox}     \usepackage{xcolor}     \usepackage{listings}          \newtoggle{InString}{}% Keep track of if we are within a string     \togglefalse{InString}% Assume not initally in string          \newcommand*{\ColorIfNotInString}[1]{\iftoggle{InString}{#1}{\color{violet}#1}}%     \newcommand*{\ProcessQuote}[1]{#1\iftoggle{InString}{\global\togglefalse{InString}}{\global\toggletrue{InString}}}%     \lstset{literate=%         {"}{{{\ProcessQuote{"}}}}1% Disable coloring within double quotes         {'}{{{\ProcessQuote{'}}}}1% Disable coloring within single quote         {0}{{{\ColorIfNotInString{0}}}}1         {1}{{{\ColorIfNotInString{1}}}}1         {2}{{{\ColorIfNotInString{2}}}}1         {3}{{{\ColorIfNotInString{3}}}}1         {4}{{{\ColorIfNotInString{4}}}}1         {5}{{{\ColorIfNotInString{5}}}}1         {6}{{{\ColorIfNotInString{6}}}}1         {7}{{{\ColorIfNotInString{7}}}}1         {8}{{{\ColorIfNotInString{8}}}}1         {9}{{{\ColorIfNotInString{9}}}}1     }          \begin{document}     \lstset{language=C++ , keywordstyle=\color{blue}\bfseries ,commentstyle=\color{white}, stringstyle=\ttfamily, showstringspaces=false}     \begin{lstlisting}[basicstyle=\ttfamily]     #include<iostream>     using namespace std ;      for (col = 1 ; col<= 5 ; col++)           cout << "Enter your number : " ;            cin >> a[row][col] ;      \end{lstlisting}     \end{document}      This is the output which I get: ![Output that I get.](http://i.stack.imgur.com/hozVs.jpg) Where I want "Enter your number " in reddish-brown. So what should I do for that?


title: LuaLaTeX + unicode-math + semantic package

text: I am trying to use `lualatex` with the `unicode-math` and `semantic` packages. I have some problems with the `semantic` package - when I load full version or with the `shorthand` option I get "Invalid math code" errors. The following code works correctly:               \documentclass{scrreprt}     \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}     \setmainfont{TeX Gyre Termes}          \usepackage{amsmath}     \usepackage{unicode-math}     \setmathfont{Asana Math}          \usepackage[inference]{semantic}          \begin{document}     $$     \inference{a = b}{c}{d}     $$     \end{document}      And this one causes errors:               \documentclass{scrreprt}     \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}     \setmainfont{TeX Gyre Termes}          \usepackage{amsmath}     \usepackage{unicode-math}     \setmathfont{Asana Math}          \usepackage[inference,shorthand]{semantic}          \begin{document}     $$     \inference{a = b}{c}{d}     $$     \end{document}      Is there any way to make it work? Or maybe there is a way to create semantic bracket symbols to use with unicode-math? (like \ldbrack \rdbrack in `mathabx` package).


title: Creating LyX Layouts – No indents for first paragraphs

text: Based on `article.cls`, I created my own Document Class with a new Environment, called "Body." It shows up right when compiled, but it doesn't appear in LyX correctly. It's supposed to have the same indenting style as "Standard" (i.e. the first paragraph is not indented, all following ones are). But I can only get all indented paragraphs or none! Here is the (abbreviated) code for Body in its `.layout` file:               Style Body         Category        MainText         Margin          Static         LatexType       Environment         LatexName       Body              NextNoIndent    1         ParIndent       MM         TopSep          0.5         BottomSep       0.5     End      Am I missing something? It's impossible to find documentation on layouts for LyX! How do I make only the first paragraph not indent in LyX?


title: Arrayjob vs array conflict

text: I'm using the `arrayjob` package (to have an array data stucture) and I just added the more known `array` to have a vertically centered table (text+pictures). I get an error and seems it seems the `array` package is executing the `\newarray` command (defined by `arrayjob`). Usage (to declare a new array named `\Correct`):               \usepackage{arrayjob}     \usepackage{array}          \documentclass{article}     \begin{document}     \newarray\Correct  % This line triggers the error     \end{document}      Error: > `! Package array Error: Illegal pream-token (C): 'c' used. even though I did not find a `\newarray` command in the `array` documentation. Anyone has seen this problem? Any ideas can be done to solve it? (TeXlive in Debian)


title: How can I get this title page?

text: ![another half](http://i.stack.imgur.com/KfDGQ.jpg)![doc format](http://i.stack.imgur.com/gbMas.png) I want my university title page but I wonder if can I get this. As I was trying a lot with many classes but I am not getting the correct format. Could someone help me to get this? I don't know how to get the correct format exactly the same as the requirement. So I included in tags. I hope I get an excuse for this.               \newenvironment{alwayssingle}{%            \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn            \else\newpage\fi}            {\if@restonecol\twocolumn\else\newpage\fi}          \newenvironment{custom}{}          %define title page layout     \renewcommand{\maketitle}{%     \pagenumbering{roman} % Sasa Tomic     \setcounter{page}{0}  % Sasa Tomic     \begin{alwayssingle}         \renewcommand{\footnotesize}{\small}         \renewcommand{\footnoterule}{\relax}         \thispagestyle{empty}     %  \null\vfill       \begin{center}        \begin{flushleft} { \Large {\bfseries {\@university}} \par} \end{flushleft}         \begin{flushleft} {{\Large \@collegeordept} \par} \end{flushleft}         \begin{flushleft} {{\Large Author: \@author} \par} \end{flushleft}         \begin{flushleft} {{\Large E-mail address: sagh0901@student.miun.se} \par}         \end{flushleft}         \begin{flushleft} {{\Large Study programme: Msc Computer Science} \par}         \end{flushleft}         \begin{flushleft} {{\Large Examiner: Blah Blah} \par} \end{flushleft}         \begin{flushleft} {{\Large Tutors: Andreas Nordgren, email} \par}         \end{flushleft}         \begin{flushleft} {{\Large Scope: ??? words inclusive of appendices} \par}         \end{flushleft}         \begin{flushleft} {{\Large Date: \@degreedate} \par} \end{flushleft}          {\large \ {{\@crest} \par} \vspace*{25mm}}          {\large {M.Sc. Thesis within Computer Engineering 30hp points} \par}           { \Large {\bfseries {\@title}} \par}           {\normalsize {Subtitle} \par}           {\Huge {\@author} \par}       \end{center}          \end{alwayssingle}}


title: Japanese tikz-qtree

text: I'm having trouble using the example code from tikz-qtree to typeset a Japanese syntax tree. Here's my MWE:               \documentclass[10pt,letterpaper]{article}          \usepackage{xeCJK}     \setCJKmainfont{MS Mincho}% for \rmfamily          \usepackage{tikz}     \usepackage{tikz-qtree}     \usepackage{tikz-qtree-compat}     \tikzset{every leaf node/.style={font=\ja}}          \begin{document}     \begin{tikzpicture}       \Tree [ .VP [ .V\1 いる ] ]     \end{tikzpicture}     \end{document}      And I get this error: > ! Undefined control sequence. > > \tikz@textfont ->\ja I am using XeLaTeX in a just-updated distribution of MiKTeX on Windows 7. Anyone know how to fix this?


title: Uneven columns in two-column paper format

text: I am writing a paper in two-column format. I avoid using the `multicol` package as I deal with quite a bit of within-column figures and would rather have them float. However, I am facing a problem that I can't resolve. The pages that contain the single-column figures as opposed to the ones which spread over the two-columns, end up having uneven columns at the end of the page. One of the columns is always one row (line) shorter than the other. This is, however, not true if the page just contains text or has a figure spread over both columns. I was wondering if anybody has ever experienced something similar or knows how to resolve this?


title: How do remove the two extra pages at the beginning of the pdf after using hyperref package?

text: I notice when I use the hyperref package, it creates two extra pages in the beginning of my pdf. I did find the info to remove the first page, but the second one is still there with just a '2' in the footer. I need to remove that page as well. Here's the code for the main book file. The packages, halfletter and moonfonts, are ones I wrote to help me with the required page size and typography. This book is unusual fiction and the typography is not conventional. So what am I missing to clear those extra pages? Here's the code for the main document:               \documentclass[12pt,openany]{book}     \usepackage{halfletter}     \usepackage{moonfonts}     \usepackage{hyperref}     \usepackage{atbegshi,multido,graphicx}     \AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}}     \usepackage[linktoc=all,pagebackref=true]{hyperref}     \hypersetup{         colorlinks=false,         linktoc=all}          \title{Nazi, Monkey, SÃÂ©ance}     \author{Tom Baker}     \pagestyle{plain}     \begin{document}     \frontmatter     \thispagestyle{empty}     \include{title}     \pagenumbering{roman}     \include{legal}     \clearpage     \tableofcontents     \mainmatter     \pagenumbering{arabic}     \include{authorsnote}     \include{system}     \include{myhometown}     \include{dog}     \include{library}     \include{federalreserve}     \include{patrolcar}     \include{soitwasnt}     \include{tigers}     \include{thesetigers}     \include{parsecsinoblivion}     \include{prey}     \include{inalltheirstrange}     \include{somewherehefancied}     \include{toughworld}     \include{heiswithhismother}     \include{reddeath}     \include{thatstone}     \include{youdigthis}     \include{shesfucking}     \include{skymaiden}     \include{bubwasplugging}     \include{ratman}     \include{dogeats}     \include{theywalkedback}     \include{sherriffsmutz}     \include{goatheadalbino}     \include{itwas}     \include{shewas}     \include{filmbegins}     \include{communistprop}     \include{graveyardmadonna}     \include{iwascertainly}     \include{irummaged}     \include{houseofsevensisters}     \include{itwassomesort}     \include{prisonlaundry}     \include{thisisdevil}     \include{nazimonkey}     \include{iamatchurch}     \include{imhungry}     \include{hehijacked}     \include{eclipse}     \include{onenight}     \include{andihave}     \include{ouryoungcouple}     \include{festival}     \include{runningdown}     \include{shereached}     \include{itwasnight}     \include{therewerepeople}     \include{happens}     \include{imsneaking}     \include{inmidst}     \include{somethingmightly}     \include{didherface}     \include{hotelroom}     \include{ourlittle}     \include{sherriffwas}     \include{theylookedlike}     \include{drivedown}     \include{ilookup}     \include{threedaysearlier}     \include{otherstuff}     \include{theyexplain}     \include{movie}     \include{somother}     \include{goingdown}     \include{shewent}     \include{butwhichdoors}     \include{sohereiam}     \include{severallargedogs}     \include{itwassummer}     \include{hesaw}     \include{stevemccloud}     \include{butthatcouldnt}     \include{timefordinner}     \include{whisperingonwind}     \include{shadow}     \include{hefelt}     \include{aftermuch}     \include{manseemed}     \include{screambrought}     \include{hereachedup}     \include{itisyoungwoman}     \include{sitting}     \include{guninhishand}     \include{lukegotout}     \include{theycorresponded}     \include{heknewclemwas}     \include{itisdark}     \include{helookedup}     \include{itsthatdamn}     \include{hesatatedge}     \include{hegrabbed}     \include{hereyeswork}     \include{shestoopslow}     \include{nullwashustled}     \include{nullisntsure}     \include{towakeup}     \include{backathouse}     \include{thiscousin}     \include{cloudsdarken}     \include{murdervictim}     \include{yeahisuppose}     \include{whitewalls}     \include{iknewhim}     \include{ihadnopart}     \include{thisgirl}     \include{heturned}     \include{firsttime}     \include{yesterdaytheyinvaded}     \include{okaysothisis}     \include{amidtallgrasses}     \include{reallybadidea}     \include{nextiwas}     \include{earliertheyhadbeen}     \include{largeempty}     \include{itslikedisneyland}     \include{exactlyhowmuch}     \include{twoyounggirls}     \include{poolwassituation}     \include{outofpool}     \include{hetookher}     \include{facecries}     \include{theyhadcollected}     \include{whenigotback}     \include{sceneshifts}     \include{butnow}     \include{turninghemoves}     \include{placeissmall}     \include{houseitself}     \include{hegotup}     \include{herolledover}     \include{theylie}     \include{theyhadbeenwaiting}     \include{okaysowegot}     \include{itwaslater}     \include{oneofthem}     \include{whentheyfound}     \include{heremembered}     \include{shewassomesort}     \include{nullwent}     \include{heavoided}     \include{theyweresitting}     \include{decapitationritual}     \include{hebrooded}     \include{later}     \include{wekeep}     \include{latertheymade}     \include{hesrollingaround}     \include{sotheystart}     \include{somewhere}          \end{document}


title: Subfigures side by side not working

text: I am trying to set two figures side by side while using the `picture` environment instead of `includegraphics` as shown in most examples here. Unfortunately they are displayed stacked and I do not know what I am doing wrong. Who can help?               \documentclass[10pt,a4paper,landscape,twocolumn]{article}     \usepackage{geometry}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{float}          \begin{document}          \setlength{\unitlength}{2.0cm}     \begin{figure}     \centering          \begin{subfigure}[b]{0.5\linewidth}     \centering     \begin{picture}(1,2)     \put(0,0){\circle*{0.1}}     \put(0,1){\circle*{0.1}}     \put(1,0){\circle*{0.1}}     \put(1,1){\circle*{0.1}}     \put(0.5,1.75){\circle*{0.1}}     \put(0.5,0.5){\circle*{0.1}}     \thicklines     \put(0,0){\vector(0,1){1}}     \put(0,1){\vector(2,3){0.5}}     \put(0.5,1.75){\vector(2,-3){0.5}}     \put(1,1){\vector(0,-1){1}}     \put(1,0){\vector(-1,0){1}}     \put(0,0){\vector(1,1){0.5}}     \put(0.5,0.5){\vector(1,1){0.5}}     \put(1,1){\vector(-1,0){1}}     \put(0,1){\vector(1,-1){0.5}}     \put(0.5,0.5){\vector(1,-1){0.5}}     \end{picture}     \caption{Euler-Path}     \end{subfigure}     \begin{subfigure}[b]{0.5\linewidth}     \centering     \begin{picture}(1,2)     \put(0,0){\circle*{0.1}}     \put(0,1){\circle*{0.1}}     \put(1,0){\circle*{0.1}}     \put(1,1){\circle*{0.1}}     \put(0.5,1.75){\circle*{0.1}}     \put(0.5,0.5){\circle*{0.1}}     \thicklines     \put(0,0){\vector(0,1){1}}     \put(0,1){\vector(2,3){0.5}}     \put(0.5,1.75){\vector(2,-3){0.5}}     \put(1,1){\vector(0,-1){1}}     \put(1,0){\vector(-1,1){0.5}}     \put(0.5,0.5){\vector(-1,-1){0.5}}     \end{picture}     \caption{Hammilton-Cycle}     \end{subfigure}          \caption{House of Santa Clause}     \end{figure}          \end{document}


title: Left/right scripts with horizontal centering

text: I have been using               \newcommand{\lrscript}[3]{\raisebox{.5ex}{\llap{\scriptsize$#2$}}#1\raisebox{.5ex}{\rlap{\scriptsize$#3$}}}      to produce the middle segment of things like this: ![\\begin{array}{c}\[\\Gamma\]\\\\lrscript{\\vdots}{\\pi}{\\exists\\text{-free}}\\\\hline\\phi\\end{array}](http://i.stack.imgur.com/fetdE.png) Produced with               \[     \begin{array}{c}     [\Gamma]\\     \lrscript{\vdots}{\pi}{\exists\text{-free}}\\     \hline     \phi     \end{array}     \]      which uses the `amsmath` package. It works fine most of the time but I prefer to avoid manually raising boxes when I can, so I keep wondering if there is a smarter way to reach this kind of horizontal and vertical alignment. (Note that this command is often deeply nested in more complex constructs.)


title: How can I use bibtex with google docs to produce RTF files for journal submission?

text: Our project quite happily uses google docs to collaborately edit documents and store a bunch of them. We also quite happily use ConTeXt to produce internal publications in pdf format. Unfortunately, when dealing with humanities journals, the requirement is "all Word, all the time." Therefore, given that we have a trival output of a BibTeX citations DB in Mendeley (that also provides for group collaboration on citations), a fair amount of ConTeXt expertise and awareness in the group, and a document in google docs, what is a simple and reliable workflow to somehow use BibTeX citations to do in-line citations in _arbitrary_ journal format X (::muttermuttermutter::) and optimally, basic header and footnote typesetting?


title: Reasons for saving a box?

text: I've been reading through a number of answers that use `\newsavebox` to save the contents of a box. As far as I can tell it's a workaround for fragility of some kind. Is that right? If not, what is the point of saving a box?