title: Auto-coalesce same values into \multirow

text: I am generating a pgfplotstable from a data file. In that file, within the `Class` column, subsequent rows with the same value should automatically be coalesced/collapsed/joined to form a `\multirow{n}{*}{value}`. With `n` being the number of subsequent rows with that same value in column `Class`. The number `n` cannot be predicted when a value is first encountered. How do I automate this?   If some value (e.g. Mammal) is encountered again later, that row should _not_ be moved up towards any previously encountered version. MWE:   ![rendering](http://i.stack.imgur.com/4MIBl.png)               \documentclass{standalone}          \usepackage{filecontents}     \usepackage{pgfplotstable}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{color}          \begin{filecontents}{data.csv}     Class,Genus     Mammal,Dog     Mammal,Cat     Mammal,Mouse     Bird,Chicken     Bird,Duck     Insect,Fly     Mammal,Bear     \end{filecontents}          \begin{document}     \pgfplotstabletypeset[         col sep=comma,         string type,         every head row/.style={before row={             \multicolumn{2}{c}{\textcolor{red}{Not what I want:}}\\\toprule},             after row=\midrule},         every last row/.style={after row=\bottomrule},     ]{data.csv}          \pgfplotstabletypeset[         col sep=comma,         string type,         every head row/.style={before row={             \multicolumn{2}{c}{\textcolor{green}{What I want to automate:}}\\\toprule},             after row=\midrule},         every last row/.style={after row=\bottomrule},     ]{     Class,Genus     \multirow{3}{*}{Mammal},Dog     %multirow should be extended automatically with each new Mammal row that's printed     ,Cat     ,Mouse     \multirow{2}{*}{Bird},Chicken     %multirow should be extended automatically with each new Bird row that's printed     ,Duck     Insect,Fly     Mammal,Bear     }     \end{document}


title: Greek numbering

text: I wish to use numbering like 1\alpha, 1\beta,... in some subequations. I know that this is obtainable by redefining the \theequation like the following (which gives lower-case Roman numerals, 1.i, 1.ii,...)               \begin{subequations}     \renewcommand{\theequation}{\theparentequation{}.\roman{equation}}     \begin{align}       a1 &= b1 \\       a2 &= b2     \end{align}     \end{subequations}      The problem is I don't know the equivalent of \roman that will yield the Greek alphabet. A related question (which might subsume the above) is: can someone complete the set of commands               \arabic, \alph, \Alph, \roman, \Roman, ...


title: Center-align multicols with equal horizontal spacing

text: I use multicols within an enumerate environment to make sub-questions; however, I've encountered annoying default: for some reason the spacing between the elements is not even, nor does it appear to be centered on the page. MWE is below. I've tried using \setlength{\columnsep} and manually inputting horizontal spacers at the problem points, but neither resolves the issue. Ideally, I'd like to be able to set this globally for the document and not have to hack it each time. Thanks in advance!               \documentclass[9pt]{amsart}     \usepackage[lmargin=.7in,rmargin=.9in,tmargin=1in,bmargin=1in]{geometry}                     \geometry{letterpaper}     \usepackage{amsmath}     \usepackage{multicol}          \begin{document}     \begin{enumerate}                 \begin{multicols}{5}                     \item $(3^{\pi})^{\pi} = \underline{\qquad}$ ; \\                     \item $(e^{\pi})^{1/\pi} = \underline{\qquad}$ ; \\                     \item $100^{3} \cdot 10^{5} = \underline{\qquad}$ ; \\                     \item $(4^x)^2\cdot 4^{x^2} = \underline{\qquad}$ ; \\                     \item $\bigl((5^2)^3\bigr)^4 = \underline{\qquad}$ ; \\             \end{multicols}         \end{enumerate}      \end{document}


title: Rotating package + sidewaystable + pagenumbering not rotated expected

text: This question is similar to: Set up sidewaysfigure to have the bottom of the figure toward the spine but that question doesn't give me the result I'm looking for. Instead, I want my tables to be rotated such that the top of the figure is always near the spine. But I believe I've run into an incompatibility related to the `rotating` package and page numbering styles. There's an example below, which I'm compiling using two passes of `pdflatex`. The result is that Table 1 is rotated with the top away from the spine. If I comment out "Line A" (see example), then the table is rotated as expected. In other words, changing the page numbering style is also causing my tables to rotate different ways, and that's not what I want. In my case, all pages will alternate, regardless of the number on the page. That is, the first page in the PDF will be on the right of the spine when the book is open, the second page to the left, etc, regardless of the numbering in the resulting PDF, and I'm not allowed to include blank pages. This format is bad, but it's imposed by another authority and is not negotiable. How can I continue to include line A and still get the table rotated as desired? Thanks!               \documentclass[10pt,twoside,letterpaper,oldfontcommands,openany]{memoir}          \usepackage{rotating} % Rotating table     \pagenumbering{roman}  % This makes the page numbers Roman (i, ii, etc)     \title{Test title}     \author{Test author}          \begin{document}     Test title page          \clearpage\pagenumbering{arabic} % Line A.  Toggle this          \chapter{Test chapter}          \begin{sidewaystable}     \centering     \begin{tabular}{|l|}     \hline     A \\     \hline     a \\     \hline     \end{tabular}     \caption{Table 1}     \end{sidewaystable}          \begin{sidewaystable}     \centering     \begin{tabular}{|l|}     \hline     B \\     \hline     b \\     \hline     \end{tabular}     \caption{Table 2}     \end{sidewaystable}          \end{document}


title: In math mode, I have access to \veebar, but not \barvee? Why?

text: As the title notes, I have access to $\veebar$, but $\barvee$ produces an undefined control sequence error. These are the math related packages I am loading:               \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{amsfonts}     \usepackage{amssymb}


title: In math mode, how can I type a symbol that is the vertical reflection of \check{-}?

text: This is what `\check{-}` looks like: $\check{-}$ I'd like to type something that is a vertical reflection of that: a "hat" accent below a horizontal bar. How can I put a hat accent below the `-`?


title: Translation not working when using siunitx + glossaries + polyglossia + xindy + LuaLaTeX

text: I'm trying to move to a modern LaTeX setup, by using LuaLaTex, polyglossia, glossaries + xindy. When I create a German document with a glossary, the title of the glossary correctly changes to "Glossar", the German translation of glossary. If I add `\usepackage{siunitx}` to load siunitx, translation will break - the title of the glossary will change back to "Glossary". Example (compile with lualatex + makeglossaries + lualatex):               \documentclass{article}          \usepackage{fontspec}     \usepackage{polyglossia}     \setdefaultlanguage{german}          \usepackage{siunitx}          \usepackage[xindy]{glossaries}     \makeglossaries          \newglossaryentry{a}{name = ä, description = A Umlaut}          \begin{document}     \printglossaries     Testing the entry: \gls{a}.     \end{document}      Removing the line to load `siunitx` will fix this problem, as will loading `translator` explicity (before loading `siunitx`) with `\usepackage[german]{translator}`. I believe this happens because `siunitx.sty` loads `translator` without any language options with `\RequirePackage { translator }`. I'm not an expert, so I'm not sure if this behaviour is to be expected. But from a user's perspective, it seems siunitx breaks translation. Is this a bug? If so, in which package, and who should I report this to? * * * One other thing: xindy will report `Cannot locate xindy module for language german in codepage utf8`, and will switch to language `general`, unless I add `\GlsSetXdyCodePage{duden-utf8}`. Is this a bug?


title: \autoref with links that include only the number, but not the text, and have counter-dependent colors

text: I would like the functionality of `hyperref`'s `\autoref`, but in a way that **the link border box covers only the number** and not the preceding text (e.g. "section"). This is normally possible with the package `cleveref` (so this would normally answer my question already), but as an added twist, I'd like **the link color to be dependent on the type of counter** , say different shades of green for chapters, sections, and subsections, and different shades of purple for my tables and figures. Here is a minimal, self-explanatory example:               \documentclass{memoir}       \setsecnumdepth{subsubsection}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{hyperref}       \renewcommand*{\tableautorefname}{table}       \renewcommand*{\figureautorefname}{figure}          \begin{document}          \chapter{The only chapter}     \label{theonlychapter}          Text.          \begin{table}     \caption{The only table\label{theonlytable}}     \centering     \begin{tabular}{lll}       1 & 2 & 3 \\       4 & 5 & 6 \\       7 & 8 & 9 \\     \end{tabular}     \end{table}          \begin{figure}     \caption{The only figure\label{theonlyfigure}}     \centering     A figure.     \end{figure}          \section{The only section}     \label{theonlysection}          Text.          \subsection{The only subsection}     \label{theonlysubsection}          Text.          See \autoref{theonlychapter}. See \autoref{theonlysection}. See \autoref{theonlysubsection}. See \autoref{theonlytable}. See \autoref{theonlyfigure}.          colors: \textcolor{PineGreen}{chapter}, \textcolor{ForestGreen}{section}, \textcolor{LimeGreen}{subsection}, \textcolor{Violet}{table}, \textcolor{Mulberry}{figure}          \end{document}      Whether the solution uses `hyperref` or `cleveref` doesn't matter to me, but I need to load `hyperref` in my document independently.


title: which bibliographystyle would be adequate for LNAI?

text: For my bibliographystyle within a paper, `splncs` was used:               \bibliographystyle{splncs}      An editor sent me: `the references are not in LNAI style` Subsequently, I already merged the cites. For instance: `\cite{A0,B0}` instead of `\cite{A0} \cite{B0}` Does `splncs` style matters for LNAI?


title: \overprint inside \itemize problem -- shaky frames

text: I'm having troubles with a presentation. I want to create something like this               \documentclass{beamer}     \usepackage{ulem} % To strikeout text          \begin{document}     \begin{frame}     \begin{itemize}     \onslide<1->{     \item item 1     \item item 2     \item item 3}     \begin{overprint}     \onslide*<2>{\item item 4}     \onslide<3>{\item \sout{item 4} $\to$ Actually we'll going to put here another item: item 5}     \end{overprint}     \end{itemize}     \end{frame}     \end{document}      but the frames move up and down in a strange way. Can you please help me to make the frames stay fixed?


title: Trashing Beamer aux files in TeXShop

text: When asked to "Trash Aux Files” after typesetting a Beamer presentation, TeXShop does not remove `.nav` and `.snm`. Is there a way to tell TeXShop to remove those files as well? Is there a user-editable list of the aux files that TeXShop removes?


title: Insert custom space into document

text: I want to insert a custom space at a given point. But am not sure how to implement it in the following MWE (needs to run in `XeLaTeX`).               \documentclass[pagesize=pdftex, fontsize=10]{scrbook}     \usepackage[paperwidth=11.2cm, paperheight=17.4cm, top=1.6cm,bottom=1cm, left=1cm, right=1cm]{geometry}     \usepackage{calc}          \begin{document}     \newlength\myspace     \setlength{\myspace}{\widthof{\normalsize{Help my of ek help myself.}}}     \showthe\myspace     \def\text{Text mooooved over here.}     \edef\abc{\text}     \abc     \end{document}      This is what I've tried but it doesn't work. Since the `\abc` is actually defined by `edef` outside in a `.sty`. file i can't add the `\hspace` immediately in front of the `\abc` as it would break the rest of my rather complex document.               \documentclass[pagesize=pdftex, fontsize=10]{scrbook}     \usepackage[paperwidth=11.2cm, paperheight=17.4cm, top=1.6cm,bottom=1cm, left=1cm, right=1cm]{geometry}     \usepackage{calc}          \begin{document}     \newlength\myspace     \setlength{\myspace}{\widthof{\normalsize{Help my of ek help myself.}}}     \showthe\myspace     \def\text{Text mooooved over here.}     \edef\abc{\hspace{\myspace}\text}     \abc     \end{document}


title: Prepend different stuffs to starred and unstarred \chapter commands

text: For the unnumbered sections units of documents built with a personal class (which inherits from the `book` class), I'd like to use:   * not the starred form of the corresponding commands,   * instead the `tocvsec2` package's `\setsecnumdepth{none}` and `\resetsecnumdepth` switches. This has several advantages:   1. no need to use the star form for each sections, subsections, etc. of a unnumbered chapter,   2. no need to use the cryptic `\addcontentsline{toc}{...}{...}` command for each of the unnumbered sections units supposed to appear in the table of contents,   3. no trouble with the headers of unnumbered chapter and sections (which, with starred form, are the ones of the previous numbered chapter and sections). This is shown in the two following MCEs: the first one with the traditional star commands (headers problem not solved),               \documentclass{book}     \usepackage{tocvsec2}     \usepackage{lipsum}     \begin{document}     %     \tableofcontents     %     \chapter{Numbered chapter}     \lipsum[1-10]     \section{Numbered section}     \lipsum[1-10]     %     \chapter*{Unnumbered chapter}     \addcontentsline{toc}{chapter}{Unnumbered chapter}     \lipsum[1-10]     \section*{Unnumbered section}     \addcontentsline{toc}{section}{Unnumbered section}     \lipsum[1-10]     %     \chapter{Numbered chapter (bis)}     \lipsum[1-10]     \section{Numbered section (bis)}     \lipsum[1-10]     %     \chapter*{Unnumbered chapter (bis)}     \addcontentsline{toc}{chapter}{Unnumbered chapter (bis)}     \lipsum[1-10]     \section*{Unnumbered section (bis)}     \addcontentsline{toc}{section}{Unnumbered section (bis)}     \lipsum[1-10]     %     \end{document}      and the second one with the `tocvsec2` package features.               \documentclass{book}     \usepackage{tocvsec2}     \usepackage{lipsum}     \begin{document}     %     \tableofcontents     %     \chapter{Numbered chapter}     \lipsum[1-10]     \section{Numbered section}     \lipsum[1-10]     %     \setsecnumdepth{none}%     %     \chapter{Unnumbered chapter}     \lipsum[1-10]     \section{Unnumbered section}     \lipsum[1-10]     %     \resetsecnumdepth%     %     \chapter{Numbered chapter (bis)}     \lipsum[1-10]     \section{Numbered section (bis)}     \lipsum[1-10]     %     \setsecnumdepth{none}%     %     \chapter{Unnumbered chapter (bis)}     \lipsum[1-10]     \section{Unnumbered section (bis)}     \lipsum[1-10]     %     \end{document}      But, in order to let my personal class be as simple as possible, I'd like to provide both the traditional syntax (with the star form for the unnumbered sections units) and the `tocvsec2` package's features. (In fact, it should be enough to redefine the `\chapter` command.) All my attempts for this failed, e.g.:               \documentclass{book}     \usepackage{lipsum}     \usepackage{tocvsec2}     %     \makeatletter%     \let\chapter@ORI\chapter%     \renewcommand\chapter{%       \@ifstar{\starred@chapter}{\unstarred@chapter}%     }     \newcommand{\starred@chapter}{\setsecnumdepth{none}\chapter@ORI}%     \newcommand{\unstarred@chapter}{\resetsecnumdepth\chapter@ORI}%     \makeatother%     %     \begin{document}     %     \tableofcontents     %     \chapter{Numbered chapter}     \lipsum[1-10]     \section{Numbered section}     \lipsum[1-10]     %     \chapter*{Unnumbered chapter}     \lipsum[1-10]     \section{Unnumbered section}     \lipsum[1-10]     %     \chapter{Numbered chapter (bis)}     \lipsum[1-10]     \section{Numbered section (bis)}     \lipsum[1-10]     %     \chapter*{Unnumbered chapter (bis)}     \lipsum[1-10]     \section{Unnumbered section (bis)}     \lipsum[1-10]     %     \end{document}      or:               \documentclass{book}     \usepackage{xpatch}     \usepackage{lipsum}     \usepackage{tocvsec2}     %     \makeatletter%     \xpretocmd{\@chapter}{\resetsecnumdepth}{}{}%     \xpretocmd{\@schapter}{\setsecnumdepth{none}}{}{}%     \makeatother%     \begin{document}     %     \tableofcontents     %     \chapter{Numbered chapter}     \lipsum[1-10]     \section{Numbered section}     \lipsum[1-10]     %     \chapter*{Unnumbered chapter}     \lipsum[1-10]     \section{Unnumbered section}     \lipsum[1-10]     %     \chapter{Numbered chapter (bis)}     \lipsum[1-10]     \section{Numbered section (bis)}     \lipsum[1-10]     %     \chapter*{Unnumbered chapter (bis)}     \lipsum[1-10]     \section{Unnumbered section (bis)}     \lipsum[1-10]     %     \end{document}      Do you see a clever way for redefining the unstarred and starred forms of the `\chapter` command?


title: Issue with custom styles

text: I am in the middle of writing a much needed report template and have hit more than a wall and cannot seem to figure out why some of the macros aren't loading. The two main files are massive and I can't post the full things but will gladly edit with anything else necessary or email if needed! When I compile the document I am getting the following errors:               line 97: Undefined control sequence \tableofcontents     line 100: Undefined control sequence \listoffigures     line 103: Undefined control sequence \listoftables     line 1: Undefined control sequence \begin{abstract}     line 1: Undefined control sequence \begin{thebibliography}{1}      In my preamble, I have the following code...               \NeedsTeXFormat{LaTeX2e}     \documentclass{report}          % Use the My Style (Listing of options here)     %\usepackage[]{MYreport} % for final copy     \usepackage[draft]{MYreport} % for working copy      I thought that adding `documentclass{report}` would load all of the default macros unless I redefined them in my .sty file. When looking at the .sty file, this is how it reads at the top:               % Report class loaded in main document to act as a base so we don't need to create EVERYTHING     \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{MYreport}[2014/05/23 Technical Reports]     \typeout{My Technical Report Style, $Revision: 1.0 $, by B*** D. L*** (***@***.com)}          \DeclareOption{nodraft}{\sei@nodraft}     \DeclareOption{draft}{\sei@draft}      ... and the very end reads:               \ExecuteOptions{nodraft}     % Set the page margins     \my@setmargins     \ProcessOptions     \AtBeginDocument{\pagestyle{plain}}      Does anyone know where I should begin to look or why all of these defaults are not loading? I will edit with any and all requests for code to get this back on track. It really is appreciated.


title: HSV shading of cone in pgfplots

text: How can I shade the surface of a cone according to the HSV color space? I'd like to create a drawing similar to this from Wikipedia: ![](http://upload.wikimedia.org/wikipedia/commons/f/f1/HSV_cone.jpg) So far, I have this code:               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}          \begin{document}     \begin{tikzpicture}      \begin{axis}[       axis lines=center,       axis on top,       domain=0:1,       y domain=0:2*pi,       xmin=-1.5, xmax=1.5,       ymin=-1.5, ymax=1.5, zmin=0.0,       samples=30]       \addplot3 [surf, shader=interp] ({x*cos(deg(y))},{x*sin(deg(y))},{x});      \end{axis}     \end{tikzpicture}     \end{document}      This results in a cone like this: ![cone](http://i.stack.imgur.com/kAi5im.png) Does anybody know, how to colorize the surface according to the HSV formulars like in the upper image?


title: minitoc and hyperref

text: I want to create a document with table of contents for the main part and the appendix and hyperrefs for the generated pdf. My attempt so far:               \documentclass[12pt]{article}     \usepackage[pdfpagelabels=true]{hyperref}     \usepackage[toc,page,header]{appendix}     \usepackage{minitoc}          % Make the "Part I" text invisible     \renewcommand \thepart{}     \renewcommand \partname{}               \begin{document}          \begin{titlepage}     cover sheet     \end{titlepage}          \doparttoc     \faketableofcontents     \part{}     \parttoc     \newpage          \section{Section 1}     \newpage     \section{Section 2}     \newpage     \section{Section 3}     \newpage     \section{Section 4}     \newpage               \newpage               \begin{titlepage}     appendix     \end{titlepage}          \appendix     \pagenumbering{Roman}     \setcounter{page}{2}          \part{Appendix}     \parttoc     \newpage          \section{Appendix 1}     \newpage     \section{Appendix 2}          \end{document}      I have trouble with the following aspects:   * The language of the document is German, how can the table of contents be renamed? ("Table of contents" -> "Inhaltsverzeichnis")   * The hyperrefs in the PDF are messed up because of the included part for the minitoc. The sections should be at the first level, the appendix is correct. ![enter image description here](http://i.stack.imgur.com/DcOjg.png)


title: "Double headed" vector

text: I want to have a double headed vector. I tried `\overleftright`, but the appearance is all but pretty. I would like to get the same kind of symbol, but with `\vec` appearance. Is it possible?


title: How can I start newpage after using tikz to create page border line?

text: I have created front page of paper with border line around the paper. But the problem is like the image below![I want to start "Part A \(10 marks at new page\)](http://i.stack.imgur.com/plXem.png). I hope any one can help me. Thank you!               \documentclass{exam}          \usepackage{fullpage}     \usepackage[flushleft]{threeparttable}     \usepackage{array}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage[a4]{crop}     \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}     \begin{figure}          \pagestyle{empty}     \begin{tikzpicture}[overlay,remember picture]     \draw[line width=1pt,rounded corners=0pt,]           ($ (current page.north west) + (1cm,1cm) $)         rectangle         ($ (current page.south east) + (-1cm,1cm) $);       \end{tikzpicture}          \begin{center}     \hspace{2.5cm} \includegraphics[scale=0.3]{upm.png}     \newline     \newline     \newline     \begin{center}     \titlepage \bfseries FAKULTI SAINS \\ \vspace{1cm} Peperiksaan Akhir \\  Semester Kedua 2013/2014 \\               \vspace{1cm}          \begin{tabular}{>{\raggedright\arraybackslash}m{23mm}@{:}m{12.3cm}}     \hline      \multicolumn{2}{c}{} \\     KURSUS  &   STATISTIK BAGI SAINS GUNAAN \\     KOD     &   MTH3003 \\       \multicolumn{2}{c}{} \\     \hline     \hline     \hline     \multicolumn{2}{c}{} \\     PROGRAM & BS(K) \\     \multicolumn{2}{c}{} \\     TARIKH     & 20 JUN 2014 \\     \multicolumn{2}{c}{} \\     MASA          & 8.30-10.30 PAGI \hfill JANGKAMASA \hfill : 2 JAM \\          \end{tabular}\\     \vspace{0.8cm}          \begin{flushleft}     ARAHAN KEPADA CALON:     \mdseries   \begin{enumerate}             \item  Jawab Semua Soalan \newline \textit{Answer all question}             \end{enumerate}     \end{flushleft}          \bfseries     \begin{center}     \begin{tabular}{>{\raggedright\arraybackslash}m{23mm}@{:}m{5cm}m{30mm}@{:}m{5cm}}     \hline     \hline     \multicolumn{4}{c}{}\\     \multicolumn{4}{c}{SLIP KEHADIRAN}\\     \multicolumn{4}{c}{}\\     No. Matrik & &Program & \\     \multicolumn{2}{c}{} \\     No. Meja   & & Tandatangan &\\     \end{tabular}     \\     \vspace{2cm}     \mdseries      Kertas soalan ini mengandungi 14 halaman tidak termasuk helaian pertama\\     \vspace{4.5cm}     Hak Cipta Terpelihara UPM \\     \end{center}     \end{center}     \end{center}                    \textbf{Part A (10 marks)}     \begin{questions}          \question          A test of the breaking strengths of two different types of cables was conducted using samples of \\     $n_1 = n_2 = 100$          \end{questions}     \end{figure}     \end{document}


title: Font shape errors in .cls file template

text: I'm using a LaTeX template I found here which looks lovely, but won't accept any in-line formatting, such as \textbf{bolded text}. When I generate the pdf I get errors such as:               No file T1xjgi.fd      and               Font shape `OML/zifg/k/n' undefined(Font) using `OML/cmm/m/it' instead      and               Font shape `T1/xifg/k/n' undefined(Font) using `T1/xifg/m/n' instead      I also suspect that the formatting specified in the .cls document isn't being applied all the time. I've been searching through the .cls document and I believe the error is somewhere in the top-ish area, but I'm at a a loss for where it is:               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{erdc}     [2009/07/22 v1.1 Typesetting Technical Information Reports of     the Engineer Research and Development Center (ERDC),     US Army Corps of Engineers]     \long\def\erdc@size@warning#1{%       \ClassWarning{erdc}{Size-changing option #1 will not be         honored}}%     \DeclareOption{8pt}{\erdc@size@warning{\CurrentOption}}%     \DeclareOption{9pt}{\erdc@size@warning{\CurrentOption}}%     \DeclareOption{10pt}{\erdc@size@warning{\CurrentOption}}%     \DeclareOption{11pt}{\erdc@size@warning{\CurrentOption}}%     \DeclareOption{12pt}{\erdc@size@warning{\CurrentOption}}%     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}     \ProcessOptions\relax     \LoadClass[12pt,twoside]{report}     \RequirePackage{graphicx,color,caption,longtable}     \RequirePackage{dcolumn}     \RequirePackage{natbib}     \renewcommand{\bibfont}{\fontsize{10pt}{12pt}\selectfont}     \setlength{\bibhang}{0.5in}     \setlength{\bibsep}{12pt}     \RequirePackage{amsmath}     \RequirePackage[originalcommands]{ragged2e}     \setlength\RaggedRightParindent{\parindent}     \RaggedRight     \renewcommand\normalsize{%        \@setfontsize\normalsize\@xiipt{16}%        \abovedisplayskip 16\p@ \@plus3\p@ \@minus7\p@        \abovedisplayshortskip \z@ \@plus3\p@        \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@        \belowdisplayskip \abovedisplayskip        \let\@listi\@listI}     \normalsize     \usepackage{mathgifg}     \usepackage{courier}     \def\@laboratoryfont{%       \sffamily\bfseries\fontsize{22pt}{25pt}\selectfont}     \def\@reportnumfont{%       \sffamily\bfseries\fontsize{18pt}{22pt}\selectfont}     \def\@programfont{%       \sffamily\fontseries{k}\itshape\normalsize\selectfont}     \def\@titlefont{%       \sffamily\fontseries{h}\fontsize{20pt}{25pt}\selectfont}     \def\@distributionfont{%       \sffamily\fontseries{k}\fontsize{9pt}{11pt}\selectfont}     \def\@eqtagfont{\sffamily\bfseries\footnotesize}     \RequirePackage[letterpaper, top=1in, bottom=0.7in,       left=1.5in, right=1.5in]{geometry}      Any help is greatly appreciated. The template is linked above if you want to take a better look.


title: Bad segment length evaluation in Tikz l-system

text: I would like to draw a fractal tree with Tikz `lindenmayersystems` library. Here is the code I use:               \documentclass[tikz]{standalone}     \usepackage{tikz}          \usetikzlibrary{lindenmayersystems}          \begin{document}     \begin{tikzpicture}     \pgfdeclarelindenmayersystem{starTree}{       \rule{X -> F--FFFF-X+X+X+X+X-FFFF--F}       \rule{F -> FF}     }          \draw [draw=blue!50!black]       [l-system={starTree, step=10pt, right angle=40, left angle=60, axiom=X, order=2}]       lindenmayer system;     \end{tikzpicture}     \end{document}      It works pretty well for small order value, as order=2: ![Result at order 2](http://i.stack.imgur.com/s43ld.png) But when I increase the order, an error become visible and my figure is not symmetric any more (compare horizontal lines at the top). Here is result for 4th order. ![Result at order 4](http://i.stack.imgur.com/zfsSM.png) It seems that the program preserves the angles but make a small error when evaluating segment lengths. With increasing number of segments, the error become more and more visible. Does anyone know how to avoid that issue? Thanks! ## Update : Complementary observation Using only 45-degree angles in a similar figure, branches now are parallel lines and the problem _does not show up_ (despite a greater number of segments than in previous case). Here is the code:               \begin{tikzpicture}     \pgfdeclarelindenmayersystem{starTree}{       \rule{X -> F--FFFF-X+X+X+X+X+X+X-FFFF--F}       \rule{F -> FF}     }          \draw [draw=blue!50!black]       [l-system={starTree, step=10pt, right angle=45, left angle=45, axiom=X, order=4}]       lindenmayer system;     \end{tikzpicture}      and its result: ![Result with 45-degree angles at 4th order](http://i.stack.imgur.com/9a6Zl.png)


title: Using same font for \texttt and \Verb

text: I would like to configure my document to use exactly the same font for `\texttt` and `\Verb`. I got as far as this, which still misses making `\ttdefault` smaller:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{fancyvrb}     \usepackage{relsize}     \fvset{fontfamily=fvm}     \fvset{fontsize=\relsize{-2}}     \renewcommand{\ttdefault}{fvm} % needs to be smaller...     \begin{document}          $\langle$ \Verb!foobar123! $\rangle$          $\langle \texttt{foobar123} \rangle$          \end{document}      ![enter image description here](http://i.stack.imgur.com/8pzIi.png) So how to I apply the `relsize{-2}` by default to `\texttt`?


title: \newlist vs. \newenvironment for defining an individual list style

text: as far as I know, there are two ways of defining an individual list style: 1) Use the `enumitem` package and the `\newlist` and `\setlist` commands 2) Define an individual environment like the following example:               \newenvironment{exampleEnumeration}     {\begin{enumerate}[leftmargin=*, itemsep=2pt, parsep=0pt]}     {\end{enumerate}}       Now my question is: which way should I prefer? Is it only a difference in convenience or are there more imporant aspects I'm not aware of? Thank you!


title: LaTeX command for equal (=)

text: Is there a LaTeX command for the equal (`=`) sign? I'd like to overwrite the command so that all equal signs in my document are colored green. But it seems I cannot do it with just the symbol `=`, which is not a command.


title: Strange behaviour of \addcontentsline

text: Using an up-to-date TeXlive 2012 (with all updates) this small document will produce a strange AUX file:               \documentclass{book}     \usepackage[list=on]{subcaption}           % Suppress writing the definition of \caption@xref to the AUX file (does not help)     \makeatletter     \let\caption@@@xlabel\@empty     \makeatother          % Show the order of \addcontentsline use     \let\xxxxx\addcontentsline     \renewcommand\addcontentsline[3]{%       \typeout{#1 - #2}%       \xxxxx{#1}{#2}{#3}}          \begin{document}      \listoffigures      \begin{figure}       \centering       \subcaptionbox{\label{A}}{A}       \subcaptionbox{\label{B}}{B}       \caption{X}     \end{figure}     \end{document}      As you see from the output of the redefined `\addcontentsline` the order of the usage of `\addcontentsline` by the `caption` package is:               lof - figure     lof - subfigure     lof - subfigure      But the AUX file contains afterwards:               \relax      \@writefile{lof}{\contentsline {subfigure}{\numberline {a}{\ignorespaces \caption@gobble  {A}\relax }}{1}}     \@writefile{lof}{\contentsline {subfigure}{\numberline {b}{\ignorespaces \caption@gobble  {B}\relax }}{1}}     \newlabel{A}{{1a}{1}}     \newlabel{sub@A}{{a}{1}}     \newlabel{B}{{1b}{1}}     \newlabel{sub@B}{{b}{1}}     \@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces X\relax }}{1}}      So the order of code lines within the AUX file does not correspond to the order of the usage of `\addcontentsline`. Does anybody know what is going on here and how to fix this? P.S.: For a reason I don't understand yet the example document works fine when using v3.2f of my `caption` package but fails with version v3.3 -- although I haven't changed the algorithm for delaying the sub-figure LOF entries.


title: Proper way to section a text

text: In WYSIWYG editors you press the return key to start a new section. In HTML terms a section of a text would be between `<p><\p>`. So what is the proper way to do the same in TEX? I know there is `\section`. But how to section text of such section properly. Example: Desired Output: >   1. Title > > Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy > eirmod tempor invidunt ut labore et dolore magna aliquyam > > erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea > rebum. Stet clita kasd gubergren, > > no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor > sit amet, consetetur sadipscing elitr, sed diam > > So there is a section with title `Title` which holds a text which is separeted in three (abstract) sections. Is it the proper way to wrap `\begin{flushleft}...\end{flushleft}` around each section? Or is there a more elegant way?


title: TeXnic Center Running a file while the PDF is Open

text: I am having trouble with running the `.tex` file, while the `PDF` output is open. It does not allow me to run the file while it is open, thus I need to close it in order to run the `.tex` file. Is there any way to overcome this? p.s: I am doing it in Dropbox. Can this be the reason?


title: Merging Symbols in Mathmode

text: I want to create boxes (`\Box`) and diamonds (`\Diamond`) with letter and other symbols insider them. I've achieved something, but the result is ok-ish:               $\Box \!\!\! _ {^{_ {^{_{^a}}}}}$     $\Diamond \!\!\! _ {^{_ {^{_{^a}}}}}$     $\Box\!\!\! _{^{ _{^\heartsuit}}}$      Does anyone have a good tip to make it looks better?


title: Annoying space before the first item in an enumeration which starts a theorem

text: Consider the following example:               \documentclass{article}     \newtheorem{Theorem}{Theorem}     \begin{document}     \begin{Theorem}     On the other hand, this one has only one claim.     \end{Theorem}     \begin{Theorem}     \begin{enumerate}     \item First claim     \item Second claim     \end{enumerate}     \end{Theorem}     \end{document}      Typesetting it results in: ![enter image description here](http://i.stack.imgur.com/owIaT.png) Notice there is extra horizontal space before the first item in the list of the second theorem. > Is there a sensible way to get rid of that? Ideally, the solution would work with `amsthm`, `thmtools`, `enumitem`. _N.B.:_ this is related to Is it possible to skip the first line in a theorem environment? but not quite the same.


title: TikZ: using the ellipse command with a start and end angle instead of an arc

text: Consider the code below:               \documentclass[convert = false]{standalone}     \usepackage{tikz}     \usetikzlibrary{arrows}     \begin{document}     \begin{tikzpicture}       \draw[-latex] (0, 0) ellipse [x radius = 3cm, y radius = 2cm, start angle = 30,       end angle = 150];     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ADuDe.png) This code produces no compiling errors but it doesn't acknowledge the start and angle or the arrow option. I could use the command `arc`, but then to have the `arc` centered at the origin, I would need to define the `arc` starting coordinate as               \coordinate (P) at ($(0, 0) + (30:3cm and 2cm)$);      And then draw the arc:               \documentclass[convert = false]{standalone}     \usepackage{tikz}     \usetikzlibrary{arrows}     \usetikzlibrary{calc}     \begin{document}     \begin{tikzpicture}       \draw[-latex] (0, 0) ellipse [x radius = 3cm, y radius = 2cm,       start angle = 30, end angle = 150];            \coordinate (P) at ($(0, 0) + (30:3cm and 2cm)$);            \draw[thick, red, -latex] ($(0, 0) + (30:3cm and 2cm)$(P) arc       (30:150:3cm and 2cm);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Tzeqd.png) This isn't terribly difficult but is there a way to use the `ellipse` command to achieve the desired result?


title: ! Package pgfkeys Error | compiling a standalone picture as \includestandalone{fig}

text: I have two tikz pictures in external files (fig1.tex and fig2.tex): **fig1.tex**               \documentclass[a4paper,class=minimal,border=0pt]{standalone}          \usepackage{tikz}     \usetikzlibrary{plotmarks}     \usetikzlibrary{arrows,shapes}     \usetikzlibrary{plothandlers}     \usetikzlibrary{positioning}     \usetikzlibrary{calc}               \begin{document}          \resizebox{18cm}{!}{      \begin{tikzpicture}     % \draw[help lines] (-3,-3) grid (10,10);  %%%% help grids line     %  axis       \draw[rotate=90][->] (-1,0) -- (4,0)node[left] {\Large$\phi$} ;       \draw[->] (-2,0) -- (7,0) node[above] {\Large$\lambda$};       \draw(0,0) rectangle (5,2.5);           %  node point         \filldraw[color=blue] (0,0) circle (0.1);         \node [below right]  at (0,0) {\large$E(0,0)$} ;         \filldraw[color=blue] (5,0) circle (0.1);         \node [below right]  at (5,0) {\large$E(0,1)$} ;         \filldraw[color=blue] (0,2.5) circle (0.1);         \node [below right]  at (0,2.5) {\large$E(1,0)$} ;         \filldraw[color=blue] (5,2.5) circle (0.1);         \node [below right]  at (5,2.5) {\large$E(1,1)$} ;          % p and q point     \draw[loosely dashed] (0,1.3) -- (2.1,1.3)  ;     \node [left]  at (0,1.3) {\Large$p$} ;     \draw[loosely dashed]  (2.1,0) -- (2.1,1.3) ;     \node [below] at (2.1,0) {\Large$q$};          % IPP point     \filldraw[color=red] (2,1.2) rectangle (2.2,1.4) ;     \node [right]  at (2.1,1.3) {\large$E(p,q)$} ;                    \end{tikzpicture} } % end resizebox     \end{document}         * **fig2.tex** example:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{through}     \usetikzlibrary{calc}               \begin{document}     \begin{tikzpicture}     % Works     \coordinate (A) at (1,2);     \coordinate (B) at (2,2);     % Works     \node [draw] at (2,2) [circle through={(B)}] {};     \node [draw] at (3,5) [circle through={(B)}] {};     \node [draw] at (A) [circle through={(2,2)}] {};          \end{tikzpicture}     \end{document}      now I am trying include them to my **main.tex** file:   * **main.tex** xxxx               \documentclass[11pt,DIV10,a4paper, titlepage,parskip=half,headings=normal,listof=totoc,bibliography=totoc,final]{scrreprt}     \usepackage{pgf}     \usepackage{tikz}     \usetikzlibrary{external}     \usepackage{standalone}     \begin{document}     % Works     \begin{figure}[ht]     \centering     \includestandalone{try}     \caption{Geometry of ionospheric pirce point}\label{fig:figure2}     \end{figure}          \begin{figure}[ht]     \centering     \includestandalone{bivariate_interpolation}     \caption{Geometry of ionospheric pirce point}\label{fig:figure2}     \end{figure}          \end{document}      and I am using **Makefile** file to compile them:   * **Makefile** # Generic make file for LaTeX: requires GNU make               TEXFILE = _main.tex          .PHONY: dvi ps pdf clean          pdf:    $(TEXFILE:.tex=.pdf)     ps: $(TEXFILE:.tex=.ps)     dvi:    $(TEXFILE:.tex=.dvi)          %.dvi: %.tex         ( \         latex $<; \         latex $<; \         latex $<; \         bibtex $(TEXFILE:.tex=.aux); \         bibtex $(TEXFILE:.tex=.aux); \         bibtex $(TEXFILE:.tex=.aux); \         makeglossaries $(TEXFILE:.tex=.acn); \         latex $<; \         latex $<; \         latex $<; \         )     %.ps: %.dvi         dvips -q $< -o $(<:.dvi=.ps)          %.pdf: %.ps         ps2pdf -dPDFSETTINGS=/prepress $<              @rm -f \         $(TEXFILE:.tex=.aux) \         $(TEXFILE:.tex=.log) \         $(TEXFILE:.tex=.idx) \         $(TEXFILE:.tex=.lof) \         $(TEXFILE:.tex=.lot) \         $(TEXFILE:.tex=.nlo) \         $(TEXFILE:.tex=.out) \         $(TEXFILE:.tex=.dvi) \         $(TEXFILE:.tex=.ps) \         $(TEXFILE:.tex=.nav) \         $(TEXFILE:.tex=.toc) \         $(TEXFILE:.tex=.snm) \         $(TEXFILE:.tex=.bbl) \         $(TEXFILE:.tex=.blg) \         $(TEXFILE:.tex=.ilg) \         $(TEXFILE:.tex=.ind) \         *~       Everything works correctly with **fig1.tex** , but when I am trying to compile it with **fig2. tex** I have an error:               ! Package pgfkeys Error: I do not know the key '/tikz/circle through'      But when I am trying to compile my **fig2.tex** directly from console by using comments:               pdflatex -synctex=1 -interaction=nonstopmode "fig2".tex       It works ! I don't have any ideas what I am doing wrong. I am using pgfv2.10 (opensuse) Can somebody help me? greetings


title: fncychap: vertical space between text and heading too large - shift left heading - improving on fix?

text: To reduce space between the table of contents heading and the first entry in the table of contents the following solution is used:               \addtocontents{toc}{\vskip-40pt The heading to display}      However, this produces the undesired effect that in the table of contents the words "The heading to display" is shifted to the right by 11 characters which is the size of the text "\vskip-40pt". How can this text be vertically left aligned with the other headings?               \documentclass[a4paper,12pt,twoside]{book}     \usepackage[Bjornstrup]{fncychap}          \begin{document}                 \addcontentsline{toc}{section}{\vskip-60pt The heading to display}              \tableofcontents                         \addcontentsline{toc}{section}{Abstract}        % Add another entry to the contents page                  \chapter{Test chapter}         Here is some text in the chapter.         \section{A section}         text in a section.         \end{document}      This post follows the suggested solution in: fncychap package - vertical gap/space between text and heading too large - how to reduce?


title: Running head in LaTeX book is wrong

text: I have a book with 14 chapters, two appendices (each chapter and appendix in a separate file), and a bibliography and index. This is set up as:               Preamble          \mainmatter          include chapters          \appendix          include appendices          \backmatter     \bibliographystyle{plain}     \bibliography{mybibfile}     \small     \printindex      This works fine - except that the running head in the bibliography and index has the title of the last appendix on each odd numbered page. This is clearly wrong. How do I fix this up? I hadn't even noticed this until it was picked up by the proofreaders. I am using the `emptypage.sty` file to ensure that empty pages have no running head (as required by my publishers). I'm using a class file provided by the publishers; the relevant section is               \newdimen\bibindent     \setlength\bibindent{1.5em}     \newenvironment{thebibliography}[1]          {\chapter*{\bibname}%           \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%            \addcontentsline{toc}{chapter}{\bibname}           \list{\@biblabel{\@arabic\c@enumiv}}%                {\settowidth\labelwidth{\@biblabel{#1}}%                 \leftmargin\labelwidth                 \advance\leftmargin\labelsep                 \@openbib@code                 \usecounter{enumiv}%                 \let\p@enumiv\@empty                 \renewcommand\theenumiv{\@arabic\c@enumiv}}%           \sloppy           \clubpenalty4000           \@clubpenalty \clubpenalty           \widowpenalty4000%           \sfcode`\.\@m}          {\def\@noitemerr            {\@latex@warning{Empty `thebibliography' environment}}%           \endlist}      This looks like it should work, but it doesn't.


title: fncychap package - reduce vertical gap/space between header and chapter heading

text: The package fncychap, using `\chapter` places the chapter heading 1/3 down the page. How can we place it closer to the top? That is; the words "Test Chapter" closer to the header "My Header" in the minimal working example (MWE) below?               \documentclass[twoside,a4paper,11pt,Final]{book}     \usepackage{fancyhdr}     \usepackage[Bjornstrup]{fncychap}          \begin{document}              \fancyhf{}          \pagestyle{fancy}               \fancyfoot[RE,RO]{Page Number: \thepage}         \fancyhead[RE,RO]{My Header: \thesection}              \let\cleardoublepage\clearpage              \chapter{Test Chapter}         \thispagestyle{fancy}         Some writing in the chapter.          \end{document}


title: xelatex compilation of pstricks fails

text: I just needed to compile the following lines (minimal example)               \documentclass{standalone}     \listfiles     \usepackage{pstricks}     \begin{document}     Ein     \begin{pspicture}(-5,-3)(5,8)     \psline(0,1)(2,3)     \end{pspicture}     Test     \end{document}      But that went wrong. I'm sorry - but I can only ask for help here - because I'm not able to see any problem in there.   As `tug.org/PSTricks` reads, it should work fine directly with XeLaTeX.   I'm using TexLive2010.   For further description, here is the output of `xelatex test | grep pstricks`               (/home/ebeling/usr/local/texlive/2010/texmf-dist/tex/latex/pstricks/pstricks.st     (/home/ebeling/usr/local/texlive/2010/texmf-dist/tex/generic/pstricks/pstricks.     (/home/ebeling/usr/local/texlive/2010/texmf-dist/tex/generic/pstricks/pst-fp.te     (/home/ebeling/usr/local/texlive/2010/texmf-dist/tex/xelatex/xetex-pstricks/pst     (/home/ebeling/usr/local/texlive/2010/texmf-dist/tex/generic/pstricks/config/xd     (/home/ebeling/usr/local/texlive/2010/texmf-dist/tex/xelatex/xetex-pstricks/pst     (/home/ebeling/usr/local/texlive/2010/texmf-dist/tex/generic/pstricks/config/xd     (/home/ebeling/usr/local/texlive/2010/texmf-dist/tex/generic/pstricks/pst-fp.te     Error: /invalidfileaccess in --run--     Operand stack:        (/home/ebeling/usr/local/texlive/2010/texmf-dist/dvips/pstricks/pstricks.pro)   (r)     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1878   1   3   %oparray_pop   1877   1   3   %oparray_pop   1861   1   3   %oparray_pop   1755   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   1878   1   3   %oparray_pop   --nostringval--     Dictionary stack:        --dict:1161/1684(ro)(G)--   --dict:0/20(G)--   --dict:70/200(L)--     Current allocation mode is local     Current file position is 82     GPL Ghostscript 8.71: Unrecoverable error, exit code 1          ** WARNING ** Filtering file via command -->ps2pdf -dCompatibilityLevel=1.5 -sPAPERSIZE=a0 -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode '/tmp/dvipdfmx.XXSJ7G06' '/tmp/dvipdfmx.XXaj80iD'<-- failed.     ** WARNING ** Image format conversion for PSTricks failed.     ** WARNING ** Interpreting special command pst: (ps:) failed.     ** WARNING ** >> at page="1" position="(160.635, 85.5393)" (in PDF)     ** WARNING ** >> xxx "pst:  tx@Dict begin STP newpath /ArrowA { moveto } def /ArrowB "     pstricks.sty    2010/09/18 v0.48 LaTeX wrapper for `PSTricks' (RN,HV)     pstricks.tex    2011/01/30 v2.17 `PSTricks' (tvz,hv)      The other lines do not show up more details.   Thanks for any help.


title: Converting to mixture of HTML (chapter/section headers) and PDF (individual chapters/sections)

text: I have a large collection of notes that currently consists of a large number of individual "chapters" that I manually number and keep track of. E.g. visit http://www.stat.sfu.ca/~cschwarz/CourseNotes with a manually created and maintained HTML index. I would like to create a "superdocument" that includes all the individual chapters and use this to automatically create both an HTML index structure with "leaves" in PDF. For example, at the highest level, you would get an HTML document that looks like: > This is my large set of course notes.   >  1. This is Chapter 1   >  2. This is Chapter 2   >  3. This is Chapter 3 where each of the "This is Chapter x" is a pointer to the PDF document for Chapter x. This looks like a combination of `latex2html` type of conversions for the chapter/section headers and creation of separate pdf files for each chapter type of problem. Ideally, you would have control on the level of the HTML index created (e.g. shows all level 1 and 2 headings) and the level of leaf where the PDF is created (e.g. at the chapter level, or the section level). Cross references across the leaf boundaries would be nice, but not essential, i.e. a reference in Section 15.3 to Section 13.2 would jump to the "leaf" containing Section 13.2. Is the a package that will do this? Am I asking too much from LaTeX? Other suggestions on automating the workflow? I've read the suggestions on separate PDF files for each chapter and this is a start, but the creating of main index would still have to be done manually. Addendum: Hmmm... I think I can see a potential workflow for this. If I can split the final pdf document in a convenient way (e.g. a chapter boundaries) this gets me part of the way there, and I think that a post-processing of the `*.toc` file could generate me the html code ?? Not sure how to link the two yet. I think I noticed a question/answer on how to split the final pdf file ... time for more research ...


title: Clear tableofcontents page in book or report

text: How do I clear the `\tableofcontents` page in book or report?               \documentclass[a4paper]{book}     \usepackage{lipsum}     \begin{document}          % i need clear this page     {\thispagestyle{empty} %but is not work     \tableofcontents}          \chapter{Book tableofcontents without page number}          \lipsum          \end{document}


title: Undefined color error for URL, when compiling with XeLaTeX

text: I've defined a different color for hyperlink using `\hypersetup` command with `urlcolor`. When I am compiling it with XeLaTeX I am getting `undefined color` error for the URL link, but it works fine when I compile with LaTeX (the color of the link changes). Similar error have been discussed before here and here, but my problem seems to be a bit different. Below is a simplified example of code I am trying to compile:               \documentclass[10pt, a5paper]{article}     \usepackage{fontspec}     \PassOptionsToPackage{pdftex,usenames,dvipsnames}{color}     \usepackage[bookmarks, colorlinks, breaklinks]{hyperref}     \hypersetup{linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=MidnightBlue}      \begin{document}     \begin{center}     \href{http://tex.stackexchange.com/}{http://tex.stackexchange.com/}     \end{center}     \end{document}


title: Put small title under name in a signature

text: I want to put a descriptive name under the name in a signature: I currently have:               \def\sig#1{\vbox{\hsize=5.5cm         \kern2cm\hrule\kern1ex         \hbox to \hsize{\strut\hfil #1 \hfil}}}          \newcommand\signatures[4]{%     \hbox to \hsize{\hfil #1, \today\hfil}     \hbox to \hsize{\quad\sig{#2}\hfil\hfil\sig{#3}\quad}     \hbox to \hsize{}}               \signatures{Institution}{Name 1}{Name 2}{}      which is : ![enter image description here](http://i.stack.imgur.com/abBKr.png) But I want: ![enter image description here](http://i.stack.imgur.com/NUfi9.png) What should be added to the code to show that? I call it using               \signatures{Institution}{Name 1}{Name 2}{}


title: AMSMath \implies and a superscript symbol

text: I would like to have a superscript symbol attached to the implies-arrow, i.e., something like that               \[ \implies^f \]      However, this does not work. A similar question was asked here: question But just for a text above the arrow. So this does not solve my problem. Does someone has an idea how to solve this? I would like to have the same arrow length as the AMSMath implies arrow has.


title: Changing baseline to top for pspicture

text: I tried to align text with the top of a figure. The `pstricks` manual says that I can specify an option to the `pspicture` environment, but this somehow does not work. I get an error message. `! Package xkeyval Error: ``1' undefined in families ``,pstricks,pst-node'.`               \documentclass{article}          \usepackage{pstricks,pst-node}          \begin{document}          Test {\begin{pspicture}(2.6,0)(7.4,4.3)     %\psgrid     \rput[B](3,0){\rnode{Peter}{Peter}}     \rput[B](6,0){\rnode{schlaeft}{sleeps}}     %     \rput[B](6,2){\rnode{v}{V[\begin{tabular}[t]{@{}l@{}}                               subj ,\\                               comps ]                               \end{tabular}}}     \rput[B](3,2){\rnode{np1}{1 NP[{nom}]}}     %     \rput[B](4.5,4){\rnode{vp}{V[\begin{tabular}[t]{@{}l@{}}                                  subj \\                               comps  ]                               \end{tabular}}}     %     \psset{angleA=-90,angleB=90,arm=0pt}     %     \ncdiag{v}{schlaeft}     \ncdiag{np1}{Peter}     \ncdiag{vp}{np1}\ncdiag{vp}{v}     %     \end{pspicture}          \end{document}


title: Undefined control sequence with \green and \red

text: The following is table.tex:               \documentclass{article}      \usepackage{color}     \begin{document}     \pagestyle{empty}     \begin{tabular}{ l | r }       Problem & Expansions \\        \hline         {\green Unit} Grid & \green 382,536 \\         {\red Life} Grid & \red 994,437 \\         \hline         {\green Unit} Pancake & \green 69 \\         {\red Sum} Pancake & \red 3,711 \\       \end{tabular}     \end{document}      When I do:               latex table      I get this error:               ! Undefined control sequence.     l.14       {\green                        Unit} Grid & \green 382,536 \\      I get similar errors for the other uses of `\red` and `\green`. Doing `\usepackage{color}` with `\red` and `\green` works with other documents, I don't understand why it doesn't work in this context.


title: How to apply \looseness=-1 to ALL the paragraphs?

text: I'm writing a short document of (3-4 pages), and try to condense it into the allowed space. Putting `\looseness=-1` at the end a paragraph helps quite a lot. Is there a way to tell LaTeX to treat **every** paragraph as if there is a `\looseness=-1` at its end, or must I put the command after each and every paragraph by myself?


title: How to improve table of contents?

text: I want to improve my table of contents so that I have larger writing (but with different sizes for section, subsection etc..), better spacing between lines and to add 'page' above the numbers.., maybe also removing the dots. I have tried playing with the `tocloft` package and I managed to add 'page' below the 1st number but not above... Can someone help me? Here is my code and preamble.               \documentclass[12pt]{report}     \usepackage{graphicx}     \usepackage{geometry}     \usepackage{fixltx2e}     \usepackage{grffile}     \usepackage[font=small,labelfont=bf]{caption}     \usepackage{floatrow}     \usepackage{amsmath}     \usepackage{longtable}     \usepackage{tocbibind}     \usepackage{fancyhdr}     \usepackage{titlesec}     \usepackage{epstopdf}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{tabularx}     \usepackage{tabu}     \usepackage{ragged2e}     %\usepackage[justification=centering]{caption}     \usepackage[titles]{tocloft}     \usepackage{caption}     \usepackage{tocloft}          \newcolumntype{L}{>{\RaggedRight\arraybackslash}X}          \titleformat{\section}       {\normalfont\fontsize{14}{12}\bfseries}{\thesection}{1em}{}     \makeatletter     \renewcommand{\paragraph}{%       \@startsection{paragraph}{4}%       {\z@}{1.2ex \@plus 1ex \@minus .2ex}{-1em}%       {\normalfont\normalsize\bfseries}%     }     \renewcommand{\baselinestretch}{1.0}     \makeatother     \setcounter{secnumdepth}{3}     \begin{document}     \sloppy          {\newgeometry{left=0.98in,right=0.98in,top=0.98in,bottom=0.78in}     %\addtocontents{toc}{~\hfill\textbf{Page}\par}     \setcounter{tocdepth}{3}     \tableofcontents\thispagestyle{empty}\setlength{\cftbeforechapskip}{2ex}\setlength{\cftbeforesecskip}{0.5ex}     \newpage     \setcounter{page}{1}     \renewcommand{\thesection}{\arabic{section}}


title: How to typeset imperial/US customary units, especially in combination with SI/metric units

text: I am just working on a document (a series of exercises for one of my classes), which uses both the SI and US customary unit systems (different exercises use different systems). I am trying to typeset the units in a consistent way. I am using the excellent `siunitx` package, and add the US units manually, however, it feels sort of strange to write things like `\DeclareSIUnit\inch{in}`. Does anybody have any good way of handling a situation like this? (I could just use ConTeXt, but I want to take advantage of the `beamer` class.)


title: Fontifying certain commands using AUCTeX

text: One thing I've noticed when using AUCTeX recently is that sometimes some commands are not fontified by default such as `\maketitle` and the fontifying for something like `\setlength{\droptitle}{-5em}` is incorrect as it fontifies `\droptitle` as if it were an argument. I was wondering if there's a way to handle the first so that all statements that begin with `\` are fontified as a LaTeX command and possibly change the way it handles `\setlength`, it's not really a big deal for me it's just that the way it gets handled in Emacs sometimes confuses me when they show up as white text compared to the rest of the commands. Essentially if it has a `\` in front of it I would like the way that Emacs highlights it by default (which it usually does and treats all things that start with `\` as commands and highlights it appropriately).


title: tikz and beamer: shape rectangle split example from manual

text: The pgf manual has an example using the shape `rectangle split` on page 450 that is not working with the `beamer` class:               \documentclass{beamer}          \usepackage{tikz}     \usetikzlibrary{shapes.multipart}          \begin{document}          \begin{frame}{Testing}            \begin{tikzpicture}[my shape/.style={ rectangle split, rectangle split parts=#1, draw, anchor=center}]         \node [my shape=5] at (0,1) {           a\nodepart{two}b\nodepart{three}c\nodepart{four}d\nodepart{five}e};         \node [my shape=5, rectangle split horizontal] at (2,2) {           1\nodepart{two}2\nodepart{three}3\nodepart{four}4\nodepart{five}5};         \node [my shape=3] at (3,0.5) {           A\nodepart{two}B\nodepart{three}C};         \node [my shape=4, rectangle split horizontal] at (1.5,0.5) {           1\nodepart{two}2\nodepart{three}3\nodepart{four}4};       \end{tikzpicture}          \end{frame}          \end{document}      When this document is compiled with pdflatex, it gives the following error message:               ! Illegal parameter number in definition of \test.     <to be read again>                         1     l.19   \end{tikzpicture}      Is this a known bug? With the `article` class no error is found in the `tikzpicture` environment.


title: Graphics with wrong sizes in table

text: I want to make a table from images of specific size (`2cm`) in PDF format. But in case of using `article` document class I got larger images. I tried to use `minimal` class and got right sizes, but invisible table borders. There is my code:               \documentclass[a4paper]{minimal}          \usepackage[a4paper]{geometry}     \usepackage{graphicx}          \newcommand{\ABTile}{\includegraphics[height=2cm, width=2cm]{./AB.png}}     \newcommand{\AvTile}{\includegraphics[height=2cm, width=2cm]{./Av.png}}          \begin{document}         \begin{tabular}{|p{\tileSize}|p{\tileSize}|}             \hline             \ABTile    & \ABTile \\             \AvTile    & \AvTile \\             \hline         \end{tabular}     \end{document}      Result with article class (pdf) Result with minimal class (pdf) Is there any way to make table with right size?


title: R, Sweave, Hmisc: pretty-print numbers

text: I'm creating a LaTeX tables based on a matrix in R using the 'latex' function of the Hmisc package.               dat = matrix(c(1000, 100, 10000, 10000), 2)     latex(dat, file='')      This works (as expected) perfectly. Additionally I would like to use               prettyNum(dat, '.')      to format the numbers in a more readable way. For example:                100 -->   100      1000 --> 1.000      Is there a simple way to combine these functions without breaking the (automatic!) table alignment ('r' for numbers instead of 'l' for character)?


title: How to color only a "tilde" accent on a letter?

text: I would like to color only a "tilde" on my letters. I read how to do this with Umlauts or other accent, but for my expression it seems different I think. Here is my expression :               \widetilde{E}^w      So, is there a way to color only the tilde and not the E^w ? Someone already has implemented it?


title: Align position of decimal point within table of numbers, text and percentage values

text: I have asked sthg similar with a MWE today answered by David C., but this is a more difficult follow-up question. Also I have just made a new account :) The Question is simple: I want the numbers to be aligned to the decimal point, AND if there is no decimal point in a column, align them in another good way. In the MWE below, you will see the problem. The value 0 is directly over 0%; but the problem is that the '%' of '0%' is right below '0', so '0%' is actually more left than it should be. You would expect the 0 to be right below the other 0 and the % one position further on the right. So I would like to align all values to the decimal point, but if there is none in a column, like eg in column 3 of the following MWE, there has to be another alignment. I hope I have described the problem well enough. If not, just look at the output of the MWE and check where the %-units are positioned. It's fine in the first column, but wrong in the 2nd one. Also let me know if the width of the columns can be adjusted. Here is the MWE. (Note that the mix of %- and decimal notation is intended. In some rows of my final table I will use %, whereas in others I will not)               \documentclass[a4paper, 12pt]{scrreprt}     \usepackage{setspace}     \usepackage{booktabs}     \usepackage{floatrow}     \floatsetup[table]{capposition=top}     \usepackage{dcolumn}     \newcolumntype{Y}{D..{6.4}}          \begin{document}          \begin{table}[htpb]     \begin{tabular}{lYYYY}     \toprule     \multicolumn{1}{l}{Test 1} & \multicolumn{2}{c}{Test 2} & \multicolumn{2}{c}{Test 3} \\     Observations successful &     \multicolumn{1}{c}{no} &      \multicolumn{1}{c}{yes}  &     \multicolumn{1}{c}{maybe} &     \multicolumn{1}{c}{no}  \\     adsadad & 546546.546 & 4646 & 45.646 & 456.456 \\     AAA & 235.25\% & 22\% & 232.34\% & 234.25\% \\     CCC3 & 0.0033 & 0 & 0.0031 & 23 \\     CCC4 & 0.0033 & 0\% & 0.0031 & 0 \\     \bottomrule          \end{tabular}     \end{table}          \end{document}


title: kprefix in \krddefinekeys seems to be not optional

text: Maybe I misunderstood something but the following example doesn’t compile with out a optional argument defining the `kprefix`               \documentclass{article}          \usepackage{keyreader}          %   [KV]------\/     \krddefinekeys*{CL}[my]{%        cmd/test//;     }          \krdsetkeys{CL}{test=x}          \begin{document}     \mytest     \end{document}      It stops with the error text               ! Package xkeyval Error: Key 'test' undefined in families 'CL'.      But if one inserts the `[KV]` it works. Is this optional argument mandatory?


title: Can you make the "graphic" option of LTXinputExample able to render all pages of a multi-page PDF file?

text: I have a source code named `source.tex` which produces a PDF file consisting of more than one page. The source code will be displayed by `LTXinputExample` as a formatted text and the corresponding output is provided by the existing PDF file via `graphic` option. The problem is that `graphic` only shows the first page, the remaining pages are ignored. I want all pages to be shown in matrix form.               \documentclass{article}     \usepackage{filecontents}     \begin{filecontents*}{source.tex}     \documentclass[tikz]{standalone}     \begin{document}     \tikz \draw[blue] (0,0) circle (1);     \newpage     \tikz \draw[red] (0,0) circle (1);     \end{document}     \end{filecontents*}          \immediate\write18{pdflatex source}          \usepackage{showexpl}     \lstset     {         frame=single,     }          \begin{document}     \LTXinputExample[graphic=source,pos=b,width=4cm,justification=\centering]{source.tex}     \end{document}      Can you make the `graphic` option of `LTXinputExample` able to render all pages of a multi-page PDF file? ## Edit: Could you merge the Doctor Herbert's solution with the following to get the better layout?               \documentclass{book}     \usepackage[a4paper,margin=25mm,showframe=false]{geometry}     \usepackage{graphicx}     \usepackage{listings}          \newcount\x     \newcommand\IncludeOutput[1]{% #1: filename without extension          \lstinputlisting[frame=single]{"#1.tex"}       \pdfximage{"#1.pdf"}%         \loop             \ifnum\x<\pdflastximagepages                 \advance\x by 1                 \noindent\hfill                 \fbox{\includegraphics[width=0.5\dimexpr\linewidth-4\fboxrule-1cm,page=\x]{"#1"}}%                                   \ifnum\x<\pdflastximagepages                 \advance\x by 1                 \hfill                 \fbox{\includegraphics[width=0.5\dimexpr\linewidth-4\fboxrule-1cm,page=\x]{"#1"}}%             \fi             \hfill\null\par         \repeat     }          \begin{document}         \IncludeOutput{DummyText}         And more text follows\dots     \end{document}      ![enter image description here](http://i.stack.imgur.com/9Eg6x.gif)


title: Beamer with ignorenonframetext ignores \maketitle command too. Why?

text: I am trying to follow workflow from BEAMER manual (ref. 21.2.2). I want to use the same TeX code to produce both presentation and article. So, I have created three files as advised: main.tex, main.beamer.tex, main.article.tex. I am able to compile article but I fail to do a correct presentation. LaTeX code `\maketitle` just simply doesn't work in main.beamer.tex. Have a look at the code: **main.tex**               \usepackage[T1,T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[russian]{babel}     \usepackage{graphics}          \usetheme{Warsaw}     \setbeamercovered{transparent}          \begin{document}          \title[Свободные ГИС]{Свободные ГИС}     \subtitle{опыт применения}     \author[Владимир Наумов]{Владимир Наумов}     \institute{Консалтинговый центр}     \date{\today}          % [1] Первый титульный слайд     \begin{frame}     \maketitle     \end{frame}          %\beamerdefaultoverlayspecification{<+->}          % [2] Слайд с содержанием доклада (актуально если доклад больше 10-15 минут)     \begin{frame}     \frametitle{О чём этот доклад}     \tableofcontents     \end{frame}     \end{document}     Оценка воздействия на окружающую среду (ОВОС) - выявление, анализ и учет прямых, косвенных и иных последствий воздействия на окружающую среду планируемой хозяйственной и иной деятельности в целях принятия решения о возможности или невозможности ее осуществления.      **main.beamer.tex**               %\documentclass{beamer}     \documentclass[ignorenonframetext]{beamer}     %\beamertemplatenavigationsymbolsempty     \input{main.tex}      When I run `pdflatex` with edited main.beamer.tex (documentclass without ignorenonframetext option) it works well. The option `ignorenonframetext` should ignore only text outside frames, as far as I know. But in my case it also ignores the text intended for the title frame. What is the reason that beamer (with `ignorenonframetext` option) suppresses the text usually made with `\maketitle ` command?


title: appendix package:toc and title options output not exactly expected

text: I'm trying to use the `subappendices` environment from the `appendix` package (ftp://ftp.tex.ac.uk/pub/archive/macros/latex/contrib/appendix/appendix.pdf) in order to put appendices after each chapter or so (with side content related to the chapter and such). The content layout and basic usage of the package work just fine, but I have issues with options, namely `toc` and `page`. My goal is to have appendices somewhat separated from the rest of the content both in the toc and in the main matter, which, to my understanding is achieved by calling those two options. Unfortunately, adding these options doesn't seem to change anything. I'm running Kile on mint KDE and texlive (2012), and I install the texlive- latex-* packages from the command line package manager. Here's my code (I removed content but left all the other packages in case the problem would come from conflicts or w/e):               \documentclass[a4paper,11pt]{report}     \usepackage[english,frenchb]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{helvet}     \renewcommand{\familydefault}{\sfdefault}          \usepackage{fixltx2e}          \usepackage{float}     \usepackage{graphicx}     \usepackage{wrapfig}     \usepackage{subcaption}          \usepackage[chapter]{algorithm}     \usepackage{algorithmic}     \algsetup{linenodelimiter=}     \renewcommand{\algorithmiccomment}[1]{\##1}          \usepackage{amsmath}          \usepackage{perpage}     \MakePerPage{footnote}          \bibliographystyle{alpha}          \usepackage[titletoc,title,toc,page]{appendix}          \usepackage{lipsum}          \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}          \title{title}     \author{me}          \begin{document}       \selectlanguage{english}     \begin{abstract}       \lipsum[1]     \end{abstract}          \selectlanguage{frenchb}     \begin{abstract}       \lipsum[2]      \end{abstract}          \tableofcontents          \chapter{Introduction}     \lipsum[1]     \section{Intérêt du projet}     \lipsum[2]          \begin{subappendices}     \section{Code de ceci}     \lipsum[3]     \section{Détails de cela}     \lipsum[4]     \end{subappendices}          \chapter{Next}     \lipsum[6]     \section{section}     \lipsum[5]          \end{document}      And here's what I get: not putting a appendices header before listing appendices: ![not putting an "appendices" header before listing appendices](http://imgur.com/H8NArtB.png) not putting an "appendices" title/page before starting the appendices content: ![not putting a appendices title/page before starting the appendices content](http://imgur.com/SHNr8Sm.png) N.B. : Note that I'm using the exact same preamble as the first answer of Appendix in LaTeX which seems to succesfully output what was intended, unlike what I get.


title: Make \maketitle span only one column in a twocolumn document

text: I want to write a landscape two column document. Does anyone know if there's a possibility to use the `\maketitle` command such that the title is only in the left column and does not span the whole page?


title: page flipping effect

text: There are commercial software that create the look of an analog page flipping effect from a PDF document. Is there a similar animation in TeX? (Not to be confused with flippdf package which gives a mirror image for printing machines.)


title: Am I using textcomp correctly?

text: In a previous question of mine I was told to use the `textcomp` package if I wanted Old Style Numbers with `tgtermes`. I wanted to know if there were options I could use with it, so I went to it's ctan page, which has the following note: > The package supports the Text Companion fonts, which provide many text > symbols (such as baht, bullet, copyright, musicalnote, onequarter, section, > and yen), in the TS1 encoding. > > Note that the package has been adopted as part of the LaTeX distribution; > the reference here is to the original package, which is now little used (if > at all). Does that mean I'm using it wrong? I just loaded it as I would any other package:               \usepackage{textcomp}      Is this wrong? If so, how should I be loading it? If correct, where do I look to get documentation on it?


title: Small capitals if available, normal (large) capitals if not

text: In French, it is customary to typeset centuries and other numbers in Roman numerals in small capitals if available, or normal (large) capitals if not. If I use `\textsc{vi}` to typeset "6", I risk it being typeset as "vi" if small capitals are not available. Is there a way to use small capitals if available, and normal (large) capitals otherwise? (Both with pdfLaTeX and XeLaTeX)


title: Teach me how to use \loop...\repeat constructs, etc

text: The following code snippet is a part of the solution given here:               \def\IncludeOutput#1{       \parskip=2mm       \def\examplename{#1}       \pdfximage{\Directory/\examplename.pdf}%       \edef\lastpdfpage{\the\pdflastximagepages}       \repeat\for{pag}\by{0} % We advance manually the counter in the loop body       \until{\ifnum\pag>\lastpdfpage}       \do{         \noindent\hfill\fbox{%         \includegraphics[width=0.45\textwidth,page=\number\pag]{\Directory/\examplename.pdf}}%         \hfill%         \advance\pag by 1         \ifnum\pag>\lastpdfpage\hfill\par% If odd number of pages         \else% If even number of pages, output the last one            \fbox{%              \includegraphics[width=.45\textwidth,page=\number\pag]{\Directory/\examplename.pdf}}%            \hfill\hbox{}\par % Next pair of images         \fi%         \advance\pag by 1       }     }      I want to use `\loop...\repeat` constructs in the code snippet above instead of the current looping constructs which are defined in `\input{repeat}`. I am not familiar with `\loop...\repeat`, especially for nested loops and conditional statements such as checking whether the number is odd or even, checking whether a number is greater or equal to another number.


title: Alignment of equation numbering in amsbook

text: I use `\documentclass{amsbook}`. When I add an equation within an enumeration, the equation number appears further to the left than the item number, which is not so pleasant. How to make the equation number aligned with the paragraph?               ... (1) This is an item in the list          (1) x = y+z      I want it to be:               ... (1) This is an item in the list          ........ (1) x = y+z


title: combine and newtheorem

text: I'm having trouble marrying `combine` and `amsthm` packages. Minimal example: ## `compilation.tex`               \documentclass[colclass=amsart]{combine}          \usepackage[utf8]{inputenc}          \begin{document}     \pagestyle{combine}     \tableofcontents     \clearpage          \begin{papers}          \coltoctitle{Paper title}     \coltocauthor{Paper author}     \import{paper1}          \end{papers}          \end{document}      ## `paper1.tex`               \documentclass[12pt]{amsart}     \usepackage{amsthm}     \usepackage[utf8]{inputenc}          \newtheorem{theorem}{Theorem}[section]          \begin{document}          \begin{theorem}     Theorem statement     \end{theorem}     \end{document}      When I try to process it like that:               > pdflatex -halt-on-error -interaction nonstopmode compilation.tex      ...I get the following:               (/usr/share/texmf-texlive/tex/latex/base/ot1enc.dfu)     (/usr/share/texmf-texlive/tex/latex/base/omsenc.dfu)))          LaTeX Warning: Unused global option(s):         [colclass=amsart].          (./compilation.aux) (/usr/share/texmf-texlive/tex/latex/amsfonts/umsa.fd)     (/usr/share/texmf-texlive/tex/latex/amsfonts/umsb.fd) (./compilation.toc)     [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] (./paper1.tex     ! Missing \endcsname inserted.     <to be read again>                         \relax      l.5 \newtheorem{theorem}{Theorem}[section]          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on compilation.log.      What could be causing this?


title: Ledpar prints ledmac-footnotes on new blank page if \lemma{} is used

text: As you can see from the minimal example below, ledmac-footnotes are printed on a new blank page, if the \lemma{}-command is used.               \documentclass{book}     \usepackage{ledmac,ledpar}       \setcounter{firstlinenum}{1}         \setcounter{linenumincrement}{1}     \begin{document}          \begin{pages}     \begin{Leftside}     \beginnumbering     \pstart     \edtext{This is a sample text.}{\lemma{This is \ldots\ text}}     {\Bfootnote{A secondary footnote}}      The sample text continues.          There is a new line, too.          And \edtext{at the bottom \dots}{\lemma{bottom}}     {\Afootnote{there is a critical apparatus}}     \pend          \endnumbering     \end{Leftside}          \begin{Rightside}     \beginnumbering          \pstart     On this page there is supposed to be the translation of the left page.     \pend          \endnumbering     \end{Rightside}          \Pages     \end{pages}          \end{document}      In order to get my footnotes on the page where they ought to be, I have to remove the \lemma{}-command, which in fact is quite regrettable because, for the work I'd like to do, lemmata would be very handy. Have you any idea how this problem could be solved?


title: Create B-Lymphocyte picture

text: I would like to create B-Lymphocyte picture (antigen) and i would like to know if someone could give me a start point (e.g. online examples, etc.). Here are some examples of what i would like to create: ![Antigens](http://i.stack.imgur.com/R4hnL.png) ![Antibody](http://i.stack.imgur.com/ddG4A.png) Regards


title: Tikz/PGF package to generate flow diagrams

text: I'm looking for something able to generate the following type of diagrams: ![enter image description here](http://i.stack.imgur.com/QI9Zz.png) Thoughts? Addendum: Maybe I was not clear. I'm looking for a package that, with minimal effort, is able to produce block&arrows diagrams, such as the above. Of course I could generate the "exact" above diagram with some effort, but that is not the point, sorry :-)


title: How can I add a blank page before the title of a book in tex or lyx?

text: I was trying to make a little booklet in Lyx. I want to export it to .pdf and then use to brochure-print function of adobe reader. Anyway I need to put an extra blank page in before the title page so that the book starts with a "left" (even) page which is blank and can later be glued into the binding. I hope you dont punish me for using Lyx... Thanks for the help!


title: change the font of a sentence in latex to Calligra

text: How can I change the font of a specific sentence in LaTeX to Calligra. I don't want the whole document to be affected. Only a particular sentence. I checked different fonts from here: http://www.tug.dk/FontCatalogue/allfonts.html Then tried different commands (like below), but none of them worked.               {\fontfamily{Calligra}\selectfont the font is temporarily changed}      It seems that latex can not find the Calligra font.


title: Using \label command in a custom command

text: I have some big equations that I wanted to separate out of the text of my document to make the source code easier to read. The idea was to declare a command for each equation in a separate file, include the file in the preamble of my document, and then just call the command for that equation in the appropriate place in the text. Here's a single-file example:               \documentclass{article}          \newcommand{\testCommand}{         \begin{equation} \label{eq1}             a = b + c         \end{equation}     }          \begin{document}         \testCommand         \cite{eq1}     \end{document}      The problem with this is that I get undefined reference errors when I try to cite the equation. I'm assuming that the compiler must go through and find labels before it expands commands or something. Anyway, I was just wondering if there is a way to make this work. I would also appreciate some insight on what's going on under the hood that causes this to happen.


title: Adjusting bottom margin

text: I added the preamble:               \usepackage[inner=2.5cm,outer=3cm,bottom=2cm,top=2cm]{geometry}      But it produces weird spacings like this: ![](http://i.stack.imgur.com/lVyRi.png) It seems the problem occurs because the bottom margin is forced to be _exactly_ `2cm`. So, is it possible to specify the bottom margin to be _at least_ `2cm`?


this is an easy question, but I couldn't find the answer just from other similar questions. A lot of people often get an error in the form:                   LaTeX Error: Command \XYZ already defined.                       Or name \end... illegal, see p.192 of the manual.      usually, the problem is that they are using something that is defined in 2 different packages, so LaTeX is confused about what to do with the command. My symptoms are similar: after lines               88     \begin{definition}     89     The distribution of a random variable $X$ is usually described by giving its {\bf distribution function}, $f(x) = P(X \leq x)$.     90     \end{definition}      my TeXShop is saying:                  89:LaTeX Error: Command \c@T already defined.                        Or name \end... illegal, see p.192 of the manual.      So, I tried to find where could command \c@T be defined. I'm only using                   \usepackage{amssymb,amsmath}         \usepackage{changepage}       and I don't really see how they could both define command c@T. I looked at the list of all commands in LaTeX, at http://www- sop.inria.fr/marelle/tralics/doc-c.html#cmd-citetype, and I haven't even found such command, but it looked like some kind of counting is the problem. So, I admit that I also have                   \begin{document}         \newenvironment{definition}[1][Definition]         \newcounter{definition}      which might be the place where I defined something in the wrong way, but I don't see why wouldn't this problem come up in the previous definitions. If anyone had patience to solve this old problem again and explain it to me, I would really appreciate it.


title: Add text before and after bibitem with BibTeX

text: This is a follow up to Adding information to bibitems in which `\@lbibitem` is tweaked to allow the addition of text before the BibTeX entry. This works fine, however I want to be able to add text before _and_ after an entry, e.g. to add a (`*`) at the beginning to indicate required reading and some text after the entry to indicate specific `section`s or bookchapters: > *William Easterly. Can the west save Africa? Journal of Economic Literature, > pages 373–447, 2009. Please read sections 2-4 Here is a slightly adapted minimum example from the answer linked above:               \documentclass[a4paper,10pt]{article}     \usepackage[round]{natbib}     \usepackage{datatool}     \usepackage{etoolbox}          %% database for personal temporary notes     \DTLnewdb{bibnotes}          %% command for pre notes     \def\bibpre#1#2{%       \DTLnewrow{bibnotes}       \DTLnewdbentry{bibnotes}{pre}{#1}       \DTLnewdbentry{bibnotes}{mynote}{#2}     }          % command for post notes     \def\bibpost#1#2{%       \DTLnewrow{bibnotes}       \DTLnewdbentry{bibnotes}{post}{#1}       \DTLnewdbentry{bibnotes}{mynote}{#2}     }          %% patching the output     \makeatletter     %% if natbib is loaded     %% this does not work as intended as notes are always placed before the bib entry     \patchcmd{\@lbibitem}%       {\item[\hfil\NAT@anchor{#2}{\NAT@num}]}%       {%         \item[\NAT@anchor{#2}{\NAT@num}\hfil]%         \DTLforeach[\DTLiseq{\pre}{#2}]{bibnotes}{\pre=pre,\mynote=mynote}{\mynote}%         \DTLforeach[\DTLiseq{\post}{#2}]{bibnotes}{\post=post,\mynote=mynote}{\mynote}%           }{}{\message{^^JPatching failed^^J}}%          % \apptocmd{\@lbibitem}%     %   {\DTLforeach[\DTLiseq{\post}{#2}]{bibnotes}{\post=post,\mynote=mynote}{\mynote}}     %   {}{\message{^^Japptocmd failed^^J}}%          \makeatother          \begin{document}          \citet{easterly2009can,frankel1999does}          %% comments to be displayed before/after bibtex entry     \bibpre{easterly2009can}{*}     \bibpost{frankel1999does}{please read ch.\ 4}     \bibpre{frankel1999does}{*}          \bibliographystyle{plainnat}     \bibliography{bib}     \end{document}      The `bib.bib` file I used is               @Article{ easterly2009can,         Author = "William Easterly",         Title = "Can the West Save Africa?",         Journal = "Journal of Economic Literature",         Pages = "373--447",         year = 2009     }          @Article{ frankel1999does,         Author = "J.A. Frankel and D. Romer",         Title = "Does trade cause growth?",         Journal = "American Economic Review",         Pages = "379--399",         year = 1999     }      This results in > References > > *William Easterly. Can the west save africa? Journal of Economic Literature, > pages 373–447, 2009. > > *please read ch. 4J.A. Frankel and D. Romer. Does trade cause growth? Amer- > ican Economic Review, pages 379–399, 1999. I found that changing the order of commands in `\patchcmd{\@lbibitem}` gives an error message and `\apptocmd{\@lbibitem}` also adds notes before the bib entry, not after.


title: Why isn't the arc drawn on the good plane using tikz-3dplot in Tait-Bryan convention

text: As some people on tex.sx, I used the tikz-3dplot and changed some commands to use Tait-Bryan convention instead of the default Euler convention. As you can see on the following picture, the rotation works fine and the rotated xy-plane (magenta one) and the xz-plane (the black one) are drawn properly (each of them, centered in (0,0,0) touches the top of their two respective unit vectors. ![The rotations](http://i.stack.imgur.com/kbHno.png) Nevertheless, the third plane, yz (the red one) is not on the good plane. The workaround to draw this plane (the cyan one) was to make a 3d scope.               %Using directly the 3d library instead     \tdplotsetrotatedcoords{\yaw}{\pitch}{\roll}     \begin{scope}[tdplot_rotated_coords,canvas is yz plane at x=0]     \draw[dashed,cyan,->,thick]  (0:1) arc (0:350:1);     \end{scope}      This clearly shows that the rotation does its work, it's in the yz plane and the 0 stands on the y axis. The rotation is in the good direction. So, this might be because of the redefinition of the thetaplane command :               %Instead of permuting the coordinates as does Jeff, I rotate the planes as in the previous command.     \renewcommand{\tdplotsetrotatedthetaplanecoords}[1]{%       \tdplotresetrotatedcoordsorigin         \tdplotsetrotatedcoords{\tdplotalpha + #1}{\tdplotbeta}{\tdplotgamma+90}     }      So, am I doing something wrong ? Anyway, there is my code with all the renewcommand :               \documentclass{standalone}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{tikz}     \usepackage{tikz-3dplot-mod}     \usepackage{pgfplots}     \usepgfplotslibrary{external}           %You get back to Euler convention by commenting out the following lines.     %Redefine all the tikz-3dplot according to Tait-Bryan convention     %This performs the calculation to define the main coordinate frame orientation style, and is also used to transform a coordinate from the main coordinate frame the the screen coordinate frame     %In comparison to genuine tikz-3dplot, this changes the orientation, so z points downwards when turnen around x-axis by 90 degres     \renewcommand{\tdplotcalctransformmainscreen}{%       %         \tdplotsinandcos{\sintheta}{\costheta}{\tdplotmaintheta}%         \tdplotsinandcos{\sinphi}{\cosphi}{\tdplotmainphi}%         %         \tdplotmult{\stsp}{\sintheta}{\sinphi}%         \tdplotmult{\stcp}{\sintheta}{\cosphi}%         \tdplotmult{\ctsp}{\costheta}{\sinphi}%         \tdplotmult{\ctcp}{\costheta}{\cosphi}%         %         %determine rotation matrix elements for display transformation         %it's line major meaning that rab_ is the  first line, second column         \pgfmathsetmacro{\raarot}{\cosphi}%         \pgfmathsetmacro{\rabrot}{-\sinphi}%         %NOTE: \rac is zero for this rotation, where z^c always points vertical on the page         \pgfmathsetmacro{\racrot}{0}%         \pgfmathsetmacro{\rbarot}{\ctsp}%         \pgfmathsetmacro{\rbbrot}{\ctcp}%         \pgfmathsetmacro{\rbcrot}{-\sintheta}%         %NOTE: third row of rotation matrix not needed for display since screen z is always flat on the page.  It is, however, needed when performing further transformations using the Euler transformation.         \pgfmathsetmacro{\rcarot}{\stsp}%         \pgfmathsetmacro{\rcbrot}{\stcp}%         \pgfmathsetmacro{\rccrot}{\costheta}%         %     }          %determines the rotation matrix for transformation from the rotation coordinate frame to the main coordinate frame.  This also defines the rotation to produce the rotated coordinate frame.     %In comparison to genuine tikz-3dplot, it does a zyx rotation sequence according to Tait-Bryan convention.     \renewcommand{\tdplotcalctransformrotmain}{%       %perform some trig for the Euler transformation         \tdplotsinandcos{\sinalpha}{\cosalpha}{\tdplotalpha}       \tdplotsinandcos{\sinbeta}{\cosbeta}{\tdplotbeta}       \tdplotsinandcos{\singamma}{\cosgamma}{\tdplotgamma}       %         \tdplotmult{\sasb}{\sinalpha}{\sinbeta}       \tdplotmult{\sasg}{\sinalpha}{\singamma}       \tdplotmult{\sasbsg}{\sasb}{\singamma}       %         \tdplotmult{\sacb}{\sinalpha}{\cosbeta}       \tdplotmult{\sacg}{\sinalpha}{\cosgamma}       \tdplotmult{\sasbcg}{\sasb}{\cosgamma}       %         \tdplotmult{\casb}{\cosalpha}{\sinbeta}       \tdplotmult{\cacb}{\cosalpha}{\cosbeta}       \tdplotmult{\cacg}{\cosalpha}{\cosgamma}       \tdplotmult{\casg}{\cosalpha}{\singamma}       %         \tdplotmult{\cbsg}{\cosbeta}{\singamma}       \tdplotmult{\cbcg}{\cosbeta}{\cosgamma}       %         \tdplotmult{\casbsg}{\casb}{\singamma}       \tdplotmult{\casbcg}{\casb}{\cosgamma}       %         %determine rotation matrix elements for Euler transformation         \pgfmathsetmacro{\raaeul}{\cacb}       \pgfmathsetmacro{\rabeul}{\casbsg - \sacg}       \pgfmathsetmacro{\raceul}{\sasg + \casbcg}       \pgfmathsetmacro{\rbaeul}{\sacb}       \pgfmathsetmacro{\rbbeul}{\sasbsg + \cacg}       \pgfmathsetmacro{\rbceul}{\sasbcg - \casg}       \pgfmathsetmacro{\rcaeul}{-\sinbeta}       \pgfmathsetmacro{\rcbeul}{\cbsg}       \pgfmathsetmacro{\rcceul}{\cbcg}       %DEBUG: display euler matrix elements         %\raaeul\ \rabeul\ \raceul         %         %\rbaeul\ \rbbeul\ \rbceul         %         %\rcaeul\ \rcbeul\ \rcceul     }               %determines the rotation matrix for transformation from the main coordinate frame to the rotated coordinate frame.     %In comparison to genuine tikz-3dplot, it does a zyx rotation sequence according to Tait-Bryan convention.     %It's the transposed of the matrix calculated in tdplotcalctransformrotmain     \renewcommand{\tdplotcalctransformmainrot}{%       %perform some trig for the Euler transformation         \tdplotsinandcos{\sinalpha}{\cosalpha}{\tdplotalpha}       \tdplotsinandcos{\sinbeta}{\cosbeta}{\tdplotbeta}       \tdplotsinandcos{\singamma}{\cosgamma}{\tdplotgamma}       %         \tdplotmult{\sasb}{\sinalpha}{\sinbeta}       \tdplotmult{\sasg}{\sinalpha}{\singamma}       \tdplotmult{\sasbsg}{\sasb}{\singamma}       %         \tdplotmult{\sacb}{\sinalpha}{\cosbeta}       \tdplotmult{\sacg}{\sinalpha}{\cosgamma}       \tdplotmult{\sasbcg}{\sasb}{\cosgamma}       %         \tdplotmult{\casb}{\cosalpha}{\sinbeta}       \tdplotmult{\cacb}{\cosalpha}{\cosbeta}       \tdplotmult{\cacg}{\cosalpha}{\cosgamma}       \tdplotmult{\casg}{\cosalpha}{\singamma}       %         \tdplotmult{\cbsg}{\cosbeta}{\singamma}       \tdplotmult{\cbcg}{\cosbeta}{\cosgamma}       %         \tdplotmult{\casbsg}{\casb}{\singamma}       \tdplotmult{\casbcg}{\casb}{\cosgamma}       %         %determine rotation matrix elements for Euler transformation         \pgfmathsetmacro{\raaeul}{\cacb}       \pgfmathsetmacro{\rabeul}{\sacb}       \pgfmathsetmacro{\raceul}{-\sinbeta}       \pgfmathsetmacro{\rbaeul}{\casbsg - \sacg}       \pgfmathsetmacro{\rbbeul}{\sasbsg + \cacg}       \pgfmathsetmacro{\rbceul}{\cbsg}       \pgfmathsetmacro{\rcaeul}{\sasg + \casbcg}       \pgfmathsetmacro{\rcbeul}{\sasbcg - \casg}       \pgfmathsetmacro{\rcceul}{\cbcg}       %         %DEBUG: display euler matrix elements         %\raaeul\ \rabeul\ \raceul         %         %\rbaeul\ \rbbeul\ \rbceul         %         %\rcaeul\ \rcbeul\ \rcceul     }          %\tdplotsetthetaplanecoords{\phi}     %this places the rotated coordinate system such that it's x'-y' plane coincides with a "theta plane" for the main coordinate system:  This plane contains the z axis, and lies at angle \phi from the x axis.     %#1: user-specified \phi angle from x-axis     %Since the rotation sequence changed, we also have to redefine the theta plane. We basically turns the zx-plane to the theta plane and flip the xy plane of 90° to make him coincide with the theta plane.     \renewcommand{\tdplotsetthetaplanecoords}[1]{%       %         \tdplotresetrotatedcoordsorigin         \tdplotsetrotatedcoords{#1}{0}{90}%     }          %%\tdplotsetrotatedthetaplanecoords{\phi'}     %%this places the rotated coordinate system into the "theta plane" for the current rotated coordinate system, at user-specified angle \phi'.  Note that it replaces the current rotated coordinate system     %%#1: user-specified \phi' angle from x'-axis     %Instead of permuting the coordinates as does Jeff, I rotate the planes as in the previous command.     \renewcommand{\tdplotsetrotatedthetaplanecoords}[1]{%       \tdplotresetrotatedcoordsorigin         \tdplotsetrotatedcoords{\tdplotalpha + #1}{\tdplotbeta}{\tdplotgamma+90}%         %    \message{DEBUG theta plane coords : #1 : \racrc, \rbcrc}     }          \begin{document}          \def\roll{30}     \def\pitch{50}     \def\yaw{40}     \def\xMainRot{100}     \def\zMainRot{30}     \tdplotsetmaincoords{\xMainRot}{\zMainRot}     \begin{tikzpicture}[scale=4,tdplot_main_coords,every node/.append style={transform shape}]     %     \draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};     \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};     \draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south east]{$z$};     %     \tdplotsetrotatedcoords{\yaw}{\pitch}{\roll}     \draw[thick,color=magenta,tdplot_rotated_coords,->] (0,0,0) -- (1,0,0) node[anchor=north]{$x$};     \draw[thick,color=magenta,tdplot_rotated_coords,->] (0,0,0) -- (0,1,0) node[anchor=west]{$y$};     \draw[thick,color=magenta,tdplot_rotated_coords,->] (0,0,0) -- (0,0,1) node[anchor=south west]{$z$};     %     %Drawing the three planes of the new frame     \tdplotdrawarc[tdplot_rotated_coords,dashed,color=magenta]{(0,0,0)}{1}{0}{360}{anchor=north,transform shape}{}     \tdplotsetrotatedthetaplanecoords{0}     \tdplotdrawarc[tdplot_rotated_coords,dashed,color=black]{(0,0,0)}{1}{0}{360}{transform shape}{}     \tdplotsetrotatedcoords{\yaw}{\pitch}{\roll}     \tdplotsetrotatedthetaplanecoords{90}     \tdplotdrawarc[tdplot_rotated_coords,dashed,color=red]{(0,0,0)}{1}{0}{360}{transform shape}{}     %     %Using directly the 3d library instead     \tdplotsetrotatedcoords{\yaw}{\pitch}{\roll}     \begin{scope}[tdplot_rotated_coords,canvas is yz plane at x=0]     \draw[dashed,cyan,->,thick]  (0:1) arc (0:350:1);     \end{scope}     %NOTE: the rotation does its work, it's in the yz plane and the 0 stands on the y axis and the rotation is in the good direction.     \end{tikzpicture}     \end{document}


title: Undefined control sequence error when trying to add \frontmatter and \mainmatter commands

text: I am writing a book, and dividing the book's chapters into separate `.tex` files. I would like to do the same for my appendices, but when I try to do so I get an error message. First, here is my preamble file:               \documentclass[fontsize=12pt]{scrreprt}     \usepackage{lipsum}     \usepackage{tabularx}     \usepackage{xcolor,fix-cm}          \usepackage{lmodern}     \usepackage[left=1.50cm,      right=1.50cm,      top=1.95cm,      bottom=2.50cm]{geometry}          \usepackage{amssymb}     \usepackage{framed}     \usepackage{indentfirst}     \usepackage{changes}     \usepackage[pagestyles]{titlesec}      And now, here is the 'main' file: prayerbook:               \input{preamble}          \begin{document}          \frontmatter     \include{toc}          \mainmatter     \include{chapter4}     \include{chapter5}     \include{chapter6}     \include{chapter7}          \backmatter     \include{appendix7}     \end{document}      When I omit the commands `\frontmatter`, `\mainmatter`, etc; I do not get the error message which is the following: `Undefined control sequence` at the line with the command.