title: What is the best way to name nodes in TikZ?

text: I found there are several ways to name a node (please relate to the MWE for the different numbers) but I am wondering if there are other (rather "simple") ways of doing this:   1. My current 'best practice', it works with 2 `node` commands in a `\draw` command.   2. My second way of doing this, it's very useful when paths based on names of nodes shall be produced, which again is usefull when an axis is scaled individually and therefor all other measures within a scope.   3. The initial attempt which actually does not work as intended and lead to nr. 2. Would anyone happen to have some advice to simplify the code? Or what else could be done? I'd appreciate anyh ints! ![Display](http://i.stack.imgur.com/sYm1X.png) **MWE** :               \documentclass[     a4paper     ]{scrartcl}          \usepackage{     lmodern,     booktabs,     tikz     }     \usepackage[T1]{fontenc}          \begin{document}     \begin{center}     \begin{tikzpicture}[font=\sffamily\small]         %         \draw[style=help lines,step=0.5cm] (0,0) grid (6.2,6.2);         %         \draw[->,thick] (-0.1,0) -- (6.5,0) node[anchor=west]{x}; %X-Achse         \draw[->,thick] (0,-0.1) -- (0,6.5) node[anchor=south]{y}; %Y-Achse         %         \foreach \x in {0,1,...,6} \draw [thick](\x cm,-2pt) -- (\x cm,2pt);         \foreach \y in {0,1,...,6} \draw [thick](-2pt,\y) -- (2pt,\y);         %         \foreach \x in {0,1,...,6} \draw (\x cm, 0 cm) node[anchor=north]{\x};         \foreach \y in {0,1,...,6}  \draw (0 cm, \y cm) node[anchor=east]{\y};         %         \begin{scope}[color=black]         %1.         \filldraw (2,1) circle (0.08cm) node (A) {} node[anchor=north,fill=white,yshift=-0.1cm]{A};         %2.         \filldraw (4,2) circle (0.08cm) node[anchor=west,fill=white] (B) {B};         %3.         \filldraw (3,5) circle (0.08cm) node[anchor=south,fill=white,yshift=0.1cm]{C};         \node (C) at (3,5) {};         \end{scope}         \draw[very thick] (A.center) -- (B.center) -- (C.center) -- cycle;     \end{tikzpicture}     \end{center}


title: Labels in tikzcd?

text: For some reason the tikzcd documentation that comes with TeXLive says nothing about the following:   1. How do I specify whether or not a label is below/above an arrow?   2. How do I specify the size of diagrams (e.g. if I need a longer arrow to fit a large label)?   3. How can I specify multiple labels (e.g. both above and below) an arrow?


title: Biblatex: Combining Dynamic Compare Command with a '\citetitle' Command

text: In How to create a \citejournal, \citebooktitle, \cite… command in biblatex? Gonzalo Medina and Audrey provided code that works like `\citeauthor{}`e.g. when you put in your document it creates just the title of a book or a journal ... This problem occurs for the `\citeauthor`command as well. In Automatic _Vgl._ & automatic quote indenting (depending on quote length) lockstep creates a quotation command based on previous contribitions by lockstep and Martin Scharrer that   1. Whenever it exceeds a certain number of lines in the output (preferably 3), it will be typeset indented.   2. The citation will automatically be typeset without "Vgl." -- regardless of whether it is the short or the long form.   3. When the output is a paraphrase or summary (in other words: when the output is no citation) it is typeset with the prenote "Vgl".   4. It works in biblatex. The main purpose is to automize both the _vgl._ (engl. compare) and the line indention. **The problem:** Unfortunately, when you combine both codes the prenote _vgl._ will precede each `\citeauthor`, `\citetitle` etc. command in the output. You will get _vgl. Author_ instead of _Author_. Is there anyone who could fix this problem globally?               \documentclass{article}          \usepackage[ngerman]{babel}          \usepackage[style=authoryear,autocite=footnote,backend=bibtex]{biblatex} % Here, Philip added "autocite=footnote,backend=bibtex"          %-------------------     \NewBibliographyString{compare}     \DefineBibliographyStrings{ngerman}{%       compare = {vgl\adddot},     }          \newbool{withintextquote}          \renewbibmacro*{multiprenote}{%       \renewbibmacro*{prenote}{%         \iffieldundef{prenote}           {}           {\printfield{prenote}%            \setunit{\prenotedelim}}}%       \iffieldundef{multiprenote}{%         \ifbool{withintextquote}{%         }{%           \bibstring{compare}\addspace         }%         }         {\printfield{multiprenote}%          \setunit{\prenotedelim}}}          \renewbibmacro*{prenote}{%       \iffieldundef{prenote}{%         \ifbool{withintextquote}{%         }{%           \bibstring{compare}\addspace         }%         }         {\printfield{prenote}%          \setunit{\prenotedelim}}}          \makeatletter     \newcommand{\cquotation}[1]{%         \begingroup         \booltrue{withintextquote}%         % \settowidth doesn't like paragraphs         \setbox\@tempboxa\hbox{%             \def\par{\hspace{3\linewidth}}% If a paragraph is included force long form             %\let\par\space  % Ignore paragraphs             \let\footnote\@empty% make sure autocite does not do anything here; this is new             \let\autocite\@empty             #1}%         \ifdim\wd\@tempboxa>3\linewidth             \begin{quote}                 \itshape                 #1             \end{quote}         \else             {\itshape #1}%         \fi         \endgroup}     \makeatother          %-------------------          \DeclareCiteCommand{\citejournal}       {\usebibmacro{prenote}}       {\usebibmacro{citeindex}%         \usebibmacro{journal}}       {\multicitedelim}       {\usebibmacro{postnote}}          \DeclareCiteCommand{\citebooktitle}       {\usebibmacro{prenote}}       {\usebibmacro{citeindex}%         \usebibmacro{booktitle}}       {\multicitedelim}       {\usebibmacro{postnote}}          \DeclareCiteCommand{\citeintitle}% Based on \citetitle from biblatex.def       {\boolfalse{citetracker}%        \boolfalse{pagetracker}%        \usebibmacro{prenote}}       {\ifciteindex          {\indexfield{indextitle}}          {}%        \iffieldundef{journaltitle}          {\iffieldundef{booktitle}             {\iffieldundef{maintitle}               {\printfield[citetitle]{labeltitle}}% Behave like \citetitle if no "main" title               {\printtext[maintitle]{\printfield[titlecase]{maintitle}}}}             {\printtext[booktitle]{\printfield[titlecase]{booktitle}}}}          {\printtext[journaltitle]{\printfield[titlecase]{journaltitle}}}}       {\multicitedelim}       {\usebibmacro{postnote}}            \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @Article{yoon,       author = {Yoon, Myeong S. and Ryu, Dowook and Kim, Jeongryul and Ahn, Kyo Han},       title = {Palladium pincer complexes with reduced bond angle strain: efficient catalysts         for the Heck reaction},       journaltitle = {Organometallics},       volume = {25},       number = {10},       date = {2006},       pages = {2409--2411}}     @InProceedings{salam,       author = {Salam, Abdus},       editor = {Svartholm, Nils},       title = {Weak and Electromagnetic Interactions},       booktitle = {Elementary Particle Theory},       booksubtitle = {Relativistic Groups and Analyticity},       booktitleaddon = {Proceedings of the Eighth Nobel Symposium},       eventdate = {1968-05-19/1968-05-25},       venue = {Aspen{\"a}sgarden, Lerum},       publisher = {Almquist \& Wiksell},       location = {Stockholm},       date = {1968},       pages = {367--377}}     @InProceedings{moraux,       author = {Moraux, Paul},       editor = {Lloyd, G. E. R. and Owen, G. E. L.},       title = {Le \emph{De Anima} dans la tradition gr{\`e}cque},       subtitle = {Quelques aspects de l'interpretation du trait{\'e}, de Theophraste {\`a}         Themistius},       shorttitle = {\emph{De Anima} dans la tradition gr{\`e}cque},       booktitle = {Aristotle on Mind and the Senses},       booktitleaddon = {Proceedings of the Seventh Symposium Aristotelicum},       eventdate = {1975},       publisher = cup,       location = {Cambridge},       date = {1979},       pages = {281--324}}     @InCollection{pines,       author = {Pines, Shlomo},       editor = {Twersky, Isadore},       indextitle = {Limitations of Human Knowledge According to Al-Farabi, ibn Bajja, and         Maimonides, The},       title = {The Limitations of Human Knowledge According to Al-Farabi, ibn Bajja, and         Maimonides},       shorttitle = {Limitations of Human Knowledge},       booktitle = {Studies in Medieval Jewish History and Literature},       publisher = hup,       location = {Cambridge, Mass.},       date = {1979},       pages = {82--109}}     \end{filecontents}          \begin{document}          This is a paraphrase \autocites{yoon}{yoon} % Added by Philip          This is a paraphrase \autocites{yoon}{yoon} % Added by Philip          \cquotation{This is a short direct quotation. \autocite{yoon}}          \cquotation{This is a long direct quotation. This is a long direct         quotation. This is a long direct quotation. This is a long direct         quotation. This is a long direct quotation. This is a long direct         quotation. This is a long direct quotation. This is a long direct         quotation.\autocite{yoon}}          This is a paraphrase \autocite{yoon}          This is a paraphrase with prenote \autocite[siehe hierzu auch][]{yoon}          This is a paraphrase \autocite{yoon}     This is a paraphrase \autocite{yoon}          This is a paraphrase \autocites{yoon}{yoon} % Added by Philip          This is a paraphrase \autocites{yoon}{yoon} % Added by Philip          \cquotation{This is a short direct quotation. \autocite{yoon}}     This is a paraphrase \autocite{yoon}          \noindent     \citeintitle{yoon} versus \citejournal{yoon} \\\\     \citeintitle{salam} versus \citebooktitle{salam} \\\\     \citeintitle{moraux} versus \citebooktitle{moraux} \\\\     \citeintitle{pines} versus \citebooktitle{pines}     \printbibliography          \end{document}      Note1: The _vgl._ code used here is slightly refined by moewe based on the version of lockstep. It avoids strange numbering and a undesired output of the prenote _vgl._ in `autocite=footnote` setting in biblatex (the link Biblatex: Problems with _vgl._ and numbering in dynamic quotation command). Note2: For the `\citeauthor{}` the problem could be fixed by replacing the command by `\citeauthor[\unspace][]{}`. As this affects the readability, a global solution would be prefered. However, maybe a global solution may build on this.


title: .eps and .pdf image in one document

text: I want to include both pdf and eps image in one latex document. I created a svg image in Inkscape. The .pdf version of the same is exactly like the .svg image. but the .eps version some part of image is missing. All the other images in my document are .eps except for this 2-3 files which i mentioned above. I tried many software to convert the pdf to eps but the result is always same. Those parts are still missing. Is it possible to incorporate .eps and .pdf in one document ? How? or what other solution can you give me for my problem


title: Converting all numbers in document to set number of decimal places

text: I have a table which I need to automatically format all numbers to two decimal places. Is this possible? Or do I need to format the entire document? EDIT: I have applied the code suggested in an answer but unfortunately it doesn't seem to work for my specific table! Anyone have any ideas on how to adapt it accordingly? \documentclass{article} \usepackage{siunitx} \begin{document}               \sisetup{     table-number-alignment = center,     table-figures-integer = 1,     table-figures-decimal = 2     }          \begin{table}[thb]          \caption{\label{labelname}Table Caption}          \scriptsize     {\centering \begin{tabular     {lr@{\hspace{0cm}}c@{\hspace{0cm}}rr@{\hspace{0cm}}c@{\hspace{0cm}}r@{\hspace{0.1cm}}cr@{\     space{0cm}}c@{\hspace{0cm}}r@{\hspace{0.1cm}}cr@{\hspace{0cm}}c@{\hspace{0cm}}r@{\hspace{0     1cm}}cr@{\hspace{0cm}}c@{\hspace{0cm}}r@{\hspace{0.1cm}}cr@{\hspace{0cm}}c@{\hspace{0cm}}r     {\hspace{0.1cm}}cr@{\hspace{0cm}}c@{\hspace{0cm}}r@{\hspace{0.1cm}}cr@{\hspace{0cm}}c@{\hs     ace{0cm}}r@{\hspace{0.1cm}}c}          \\     \hline     Dataset & \multicolumn{3}{c}{ConjunctiveRule }& \multicolumn{4}{c}{DecisionTable } &     \multicolumn{4}{c}{DTNB } & \multicolumn{4}{c}{JRip} & \multicolumn{4}{c}{NNge} &     \multicolumn{4}{c}{OneR} & \multicolumn{4}{c}{PART} & \multicolumn{4}{c}{Ridor} \\     \hline     Number correct & 9.5900 & $\pm$ & 1.16 & 9.5600 & $\pm$ & 1.22 &         & 9.5600 & $\pm$ &     1.22 &         & 9.5000 & $\pm$ & 1.24 &         & 8.9500 & $\pm$ & 1.34 &         & 9.6000     & $\pm$ & 1.16 &         & 9.3000 & $\pm$ & 1.34 &         & 9.1700 & $\pm$ & 1.42 &        \\               \end{tabular} \scriptsize \par}     \end{table}     \end{document}


title: Is there any opposite of newpage?

text: Is there any command which is the opposite of `\newpage`/`\pagebreak`/`\clearpage`, i.e. which goes back a page instead of going forward, similarly to the way you can use `\vspace` to move the _current vertical position_ in a page?


title: Forcing the dash in French initials in bibliography

text: How one writes "Smith, J.-M.," in bibliography? I want the dash not to disappear! If I write the full name, e.g. Jean-Michel Smith, then BibTeX treats it properly and generates Smith, J.-M. I have tried Smith, J.-M., Smith, J.{-}M. If you wonder why, in some cases I dont know what the initial stands for, and still prefer to respect the formatting of names.


title: Easier than "latex bibtex latex latex"?

text: The process for inserting references into a Latex document consists of running:               latex     bibtex     latex     latex      This is necessary because each step produces auxiliary files that the next step uses (i.e., the first latex command generates an .aux file with the citations need, the bibtex command generates a .bbl file, the third command incorporates these references into the document, and the fourth is necessary to ensure that the insertion of these references still produces correct formatting). Is there an easier way to do this? This strange sequence of commands is difficult for a beginner and makes me wonder if other sequences of commands like this are necessary for other Latex-related tasks. I'm hoping the sources I've come across are outdated. Is there a less quirky and error-prone way of including references in my articles?


title: Chemfig: colour entire atom or section of atom

text: I have a molecule (in this case a copolymer) where I would like to hilight the monomers by colouring a number of atoms. Is there a more efficient way to do this than colouring each atom and bond individually? `chemfig` syntax can get rather verbose. A Google search for "copolymer" turns up this, which is essentially what I'm trying to achieve. ![enter image description here](http://i.stack.imgur.com/2bguu.png)


title: How to change example block body text size in beamer?

text: If I compile the following code, I get a slide where the normal block body text size is tiny as written in the code, while the body text size of example and alert block doesn't change. I've also tried other combinations of `\setbeamerfont`, but none of them are able to change the body text size of example and alert blocks.               \documentclass[aspectratio=169]{beamer}     \usetheme{Frankfurt}          \setbeamerfont{block title}{size=\Huge}          \setbeamerfont{block body}{size=\tiny}     \setbeamerfont{block title example}{size=\Huge}     \setbeamerfont{block body example}{size=\tiny}          \begin{document}          \begin{frame}       \begin{exampleblock}{Title}         Test       \end{exampleblock}       \begin{alertblock}{Title}         Test       \end{alertblock}       \begin{block}{Title}         Test         \begin{itemize}           \item Item         \end{itemize}       \end{block}     \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/nDHor.png)


title: Have command's output dependent on where (body or section title) it is called

text: I am using               \newcommand{\PRODUCT}{\textsf{PRODUCT}}      to format a product name consistently throughout my document. However, I realized that this should not happen in (((sub-)sub-)sub-)section titles, but there really should just the text be printed without formatting, as in               \newcommand{\PRODUCT}{PRODUCT}      How can I have a command result in different outputs depending on where it is used in the document?


title: How can I compare the width of a paragraph to 45% of the linewidth?

text: Here's my pseudo latex code to try and show what I'm trying to do in my memo latex class:               \newcommand\headername{%should be the @memoto, or if too long, an abbreviated subject         \ifthenelse{\lengthtest{\settowidth{\@memoto}>.45*\linewidth}}             {\emph{dummy text here}}             {\@memoto}     }      I'm probably missing some calculation package or other, but I'm looking for some kind of test to see if \@memoto is longer than 45% of the linewidth. How do I do this? (ultimately I will use this latex class within LyX, but I hope this is general enough to be answered without regard to LyX)


title: vspace or line space in text of wrap fig

text: I am using wrap fig and want to insert a line break within the text. However, `\vspace` or `\linebreak` or `\break` don't lead to any change. Here is a sample of my LaTeX code               \begin{figwindow}[0,r,%            {\includegraphics[height=2in]{PascoSynthesizer.eps}},%            {\label{fig:label} Caption             }]     \textbf{Electronic Output}:\\     A sum of nine harmonics of sine waves with a\\ fundamental of 440 Hz plus a second output of the fundamental. \\     \vspace{0.3in}     \textbf{Controls:}\\         \end{figwindow}


title: Need *.aux file in separate folder

text: When compiling with `pdflatex` we need the `*.aux` files in a separate folder.


title: How to hide auxilliary files under Linux?

text: `pdflatex` generates a lot of files that are of no use to me but are important to `pdflatex` (.aux, .fls, .log, .nav, .toc etc). How can I hide these files, e.g by putting them in some other, global directory? I don't want to see them when using LaTeX normally. `latexmk` has the `-auxdir` option, but it only works with MiKTeX.


title: TeXwork and --output-directory

text: When I use `xelatex.exe --output-directory=./tmp` TeXwork PDF preview will not work. Is there any solution?


title: Is it possible to make a picture transparent in beamer?

text: Here is my `MWE`.               \documentclass [11 pt, xcolor=pdftex,x11names,table]{beamer}          \usetheme{Madrid}         \setbeamercovered{transparent=15}     \begin{document}     \begin{frame}         \frametitle{Test}              \begin{block}<1->{(test)}             test                 \end{block}         \begin{block}<2->{Problem}     text comes here         \vspace{-1.7 cm}             \begin{flushright}                 \makebox[0.26\textwidth]{\includegraphics[width=0.26\textwidth]{TEST.jpg}}\\             \end{flushright}         \end{block}          \end{frame}          \end{document}      The problem I have is that picture that is supposed to be shown in slide 2 is shown in slide 1 as well. Is it possible to solve the problem while you keep `transparent=15`?


title: How to add line number for the last line of abstract?

text: I'm writing a paper and line numbers are needed. I've used the `\usepackage{lineno}`, and add `\begin{linenomath*}\end{linenomath*}`around abstract. However, there is no line number on the last line of abstract. How to deal with it? Thank you!


title: Using the suggested LyX sectioned nomenclature, why do deleted nomenclature entries still appear in the output?

text: I'm using the suggested LyX Nomenclature with Sections. When deleting a nomenclature entry, this stays somewhere hidden in the document and it is displayed in the output. Funny thing is that if trying to export to LaTeX (plain) the nomenclature entry does not appear in the LaTeX output. Any solution for this? LaTex preamble:               \usepackage{ifthen}     \renewcommand{\nomgroup}[1]{%     \ifthenelse{\equal{#1}{A}}{\item[\textbf{Roman Symbols}]}{%     \ifthenelse{\equal{#1}{B}}{\item[\textbf{Greek Symbols}]}{%     \ifthenelse{\equal{#1}{C}}{\item[\textbf{Abbreviations}]}{%     \ifthenelse{\equal{#1}{S}}{\item[\textbf{Subscripts}]}{%     \ifthenelse{\equal{#1}{Z}}{\item[\textbf{Mathematical Symbols}]}     {}     }% matches mathematical symbols     }% matches Subscripts     }% matches Abbreviations     }% matches Greek Symbols     }% matches Roman Symbols      LyX content: Nomenclature (added from insert>list/TOC>Nomenclature) Hello World. (insert here a nomenclature entry)


title: WinEdt 6.0 compilation fails (Windows 8)

text: I am using `Windows 8`. I have installed `WinEdt 6.0` and `MiKTeX 2.9` on my system. When I compile `.tex` file using **PDF TeXify** button, I do not get pdf output, rather `WinEdt` displays the following message:               PDFTeXify failed to create a pdf file. For possible explanations start the command from     command prompt ....       It also does not create any `.aux`, `.log`, etc files corresponding to the `.tex` file. I spent quite some time without any success. How can I solve this issue?


title: Automatic frame titles and subtitles

text: Is there a way to automatically use the section name as the frame title and the subsection name as the frame subtitle? I think this question is related, but when I tried to hack that solution to change the substitution from `\insertsubsectionhead` to `\insertsectionhead` as follows, my frame title simply disappeared:               \addtobeamertemplate{frametitle}{        \let\insertframetitle\insertsectionhead}{}      (later)               \section{Introduction}          \begin{frame}        \frametitle{}          . . .       Does it matter where that template manipulation appears? I have it in my preamble right after I choose my theme. Bottom line: I have no idea how these internals work, so worst case I'll just continue duplicating the sections and subsection names into the frame titles and subtitles. I like the idea of keeping that connection back to the outline in every frame.


title: How does one vertically center the heading for a 'part' in ConTeXt?

text: My best effort thus far has been to simply add a big blank as a before perameter:               \setuphead[part][placehead=yes, alternative=middle,before={\blank[12*big,force]},         header=empty]      Obviously, this might work for a given paper size, but seems inelegant as a solution. Have I missed an easier method for doing this?


title: Page margin, header and footer configuration

text: This is how my letter looks like               \documentclass[a4paper, 11pt]{letter}          \usepackage{fontspec}     \usepackage{fancyhdr}               \newcommand{\DocumentTitle}{Motivation Letter}     \newcommand{\Author}{John Smith}          \setmainfont{Times New Roman}     \newfontfamily\hdrfont[ LetterSpace=5.0, WordSpace=1.0, Scale=0.9, Color=FFFFFF ]{Arial}          \usepackage[hmargin=1in,vmargin=1.8in]{geometry}     \linespread{1.2}          \pagestyle{fancy}     \fancyhf{} % clear all header and footers     \setlength{\headheight}{0.5in}     \fancyhead[L]{\hdrfont\textbf{\DocumentTitle} \\ \emph{\Author}}     \fancyhead[R]{\hdrfont\thepage}     \fancyfoot[L]{\hdrfont\textbf{\DocumentTitle} \\ \emph{\Author}}     \fancyfoot[R]{\hdrfont\thepage}          \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}          \begin{document}     \name{ \Author }     \signature{ \Author }     \begin{letter}{}     \renewcommand{\today}{ February 16, 2009 }               \opening{To Whom It May Concern,}     \thispagestyle{fancy}     \closing{Respectfully,}     My Letter     \end{letter}          \end{document}      What like the pdf looks like               --------------------------------------- PAGE BEGIN                                             H     --------------------------------------- HEADER RULE                                             M1     To Whom It May Concern,---------------- TEXT BEGIN     My Letter     Respectfully,-------------------------- closing                                             S     John Smith----------------------------- signature     --------------------------------------- TEXT END                                             M2     --------------------------------------- FOOTER RULE                                             F     --------------------------------------- PAGE END      I want that `H = F` `M1 = M2` and length `S` is too big. But now, `H != F` and `M1 != M2`. How I can achieve that?


title: Place framed text at top of page

text: I have chapters (using the standard "report" class), and I would like to place a frame of text - which gives succinct meta-details on the chapter - at the top of the first page of the chapter. What I have succeeded in doing do far is this: ![enter image description here](http://i.stack.imgur.com/mnEhT.png) My problem is that the only way I've managed to do things is with TikZ absolute positioning (I know about various packages, such as textpos, and I have not been able to get them to work satisfyingly). What is lacking with solution is that I have not been able to precisely control where the frame is - or rather, I must specify _too_ precisely where it must be (using absolute coordinates), whereas I would just like it to be _exactly_ vertically aligned with the body of the text, and just have to give the absolute distance from the top. I.e., something like:               \myboxedtext{1cm}{Text}      puts a framed box of text of the same width as the body of the text, and aligned with the body of the text, at 1cm from the top. How could I do that? I have tried combining raisebox with pagetotal but to no avail... **EDIT:** and I'd like to avoid using TikZ (or any unstable solution that requires I compile multiple times).


title: How do I layer nodes/boxes in a drawing?

text: I'm trying to make a diagram that shows relations of elements in a system, but I don't know how to layer anything. So far I've got:               \documentclass{book}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows,positioning}          \begin{document}          \tikzstyle{narrow} = [draw, fill=blue!20, text width=2cm, text centered, minimum height=1cm]     \tikzstyle{wide}   = [draw, fill=orange!20, text width=7.5cm, text centered, minimum height=1.75cm, rounded corners]     \tikzstyle{tall}   = [draw, fill=green!20, text width=1.75cm, text centered, minimum height=7cm, rounded corners]     \tikzstyle{squar} = [draw, fill=yellow!10, text width=4.75cm, text centered, minimum height=3.75cm, rounded corners]          \def\blockdist{5}     \def\edgedist{5}          \begin{tikzpicture}       \node (lib)     [tall]   {Library};       \node at (3,-1) (tman)    [narrow] {tmon};       \node (ksman)   [narrow] [right=.75cm of tman]   {ksmon};       \node (stsp)    [narrow] [right=.75cm of ksman]  {stosp};       \node (deamon)  [wide]   [below=.75cm of ksman]  {base};       \node (imgan)   [narrow] [above=.75cm of tman]   {img-analysis};       \node (thrman)  [narrow] [above=.75cm of imgan]  {thermal-analysis};       \node (scrpts)  [squar]  [right=.75cm of thrman] {Scripts};     \end{tikzpicture}          \end{document}      There are three things I'm trying to accomplish:   1. How can I put a box around/behind the "ksmon" and "stosp" nodes?   2. How can I put a box around/behind the one created above and the "tmon" node?   3. How can I put nodes in/on top of the "Scripts" nodes?


title: citet and citep behaves like cite

text: I am new with LaTeX so please bare with me. If its matter editor that I am using is TeXMaker, the TeXLive is installed. Why `\citep` and `\citet` did not display citation as a "Goossens et al. (1993)" or "(Goossens et al., 1993)" but just as a simple number in brackets `[1]` (exactly same like `\cite`)?               \documentclass[11pt]{article}               % old citation style (used by \cite)     %\usepackage{cite}          % package used by \citep and \citet     \usepackage[sort&compress,square,comma,authoryear]{natbib}          % makes color citations     \usepackage[dvips,dvipdfm,colorlinks=true,urlcolor=blue,citecolor=red,linkcolor=red,bookmarks=true]{hyperref}          % document begin     \begin{document}          % author and title     \title{My Article}     \author{Author Name}     \date{Today}     \maketitle          Blablabla said by \cite{lamport94} cite example. Blablabla said by \cite[p.~215]{impj} cite example. Blablabla said by \cite{fo,norman,lamport94} multiple cite example. Blablabla said by \nocite{lamport94} nocite example.     Blablabla said by \citep{lamport94} citep example. Blablabla said by \citet*{impj} citet example. Blablabla said by \citet{impj} citet example.          % this must be set to use natbib (citep, citet)     \bibliographystyle{plainnat}          % number 99 determines how much citation can be included in file (maximum 99)     \begin{thebibliography}{99}          \bibitem{lamport94}       Leslie Lamport,       \emph{\LaTeX: A Document Preparation System}.       Addison Wesley, Massachusetts,       2nd Edition,       1994.             \bibitem{notes} John W. Dower {\em Readings compiled for History       21.479.}  1991.            \bibitem{impj}  The Japan Reader {\em Imperial Japan 1800-1945} 1973:       Random House, N.Y.            \bibitem{norman} E. H. Norman {\em Japan's emergence as a modern       state} 1940: International Secretariat, Institute of Pacific       Relations.            \bibitem{fo} Bob Tadashi Wakabayashi {\em Anti-Foreignism and Western       Learning in Early-Modern Japan} 1986: Harvard University Press.          \end{thebibliography}                    \end{document}     % http://en.wikibooks.org/wiki/LaTeX/Bibliography_Management


title: How can we fix subfigure in multicols enviroment

text: I am using `{multicols*}{2}` and want to show nonfloating subfigures and have tried following method, but no success, rather it does not show anything. Could you please guide me about the solution.               \begin{multicols*}{2}     \begin{figure}     \centering     \subfigure[$\text{Participant Overlap}(PO)=60\%$]{\includegraphics[width=3.5in]{TSp0802060fresh3.eps} \label{fig:TSa}}%     \subfigure[$\text{Participant Overlap}(PO)=100\%$]{\includegraphics[width=3.5in]{TSp08020100fresh3.eps} \label{fig:TSc}}\\     \subfigure[$\text{Participant Overlap}(PO)=60\%$]{\includegraphics[width=3.5in]{TLp0802060fresh3.eps} \label{fig:TLa}}%     \subfigure[$\text{Participant Overlap}(PO)=100\%$]{\includegraphics[width=3.5in]{TLp08020100fresh3.eps} \label{fig:TLc}}%     \caption{Sample values of TS and TL selected from Table \ref{tab:TS},\ref{tab:TL} for depiction.}     \label{fig:TSTL}     \end{figure}     \end{multicols*}


title: normal coordinate system in tikz using parallel curves

text: I have a wavey looking curve and would like to show the corresponding normal coordinate system, which is defined by arclength along the curve and (signed) distance from the curve. So there should be lines normal to the curve (for arclength) and curves parallel to the original curve (for distance from the curve). I am using the solution from Easy curves in TikZ to draw my wavey curve and How to draw tangent line of an arbitrary point on a path in TikZ to get the normal lines. I can draw a single parallel line using `double distance=1cm` from How to raise a generic curve. Problem with \pgfdeclaredecoration, but I'm not sure how to get a whole set of parallel lines. Eventually I would also like nodes that label the lines/curves `s=1`, `s=2`, ..., `r=1`, `r=2`,...,`r=0`,`r=-1`,... Here is my current code:               \documentclass[10pt]{amsart}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}          \tikzstyle{tangent}=[decoration={markings,% switch on markings             mark= at position #1 with {               \coordinate (tangent point-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);               \coordinate (tangent unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);               \coordinate (tangent orthogonal unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1); }}, postaction=decorate]          \tikzstyle{use tangent}=[         shift=(tangent point-#1),         x=(tangent unit vector-#1),         y=(tangent orthogonal unit vector-#1)]               \tikzset{forcedist/.style={decorate, decoration={markings,     mark=between positions 0 and 1 step 0.0999 with {\draw[<-] (0,-#1) -- (0,#1); }}}}%Here     \tikzset{use tangent/.default=1}          \begin{document}     \begin{figure}       \begin{tikzpicture}[scale=.75]           \draw [cyan, double distance = 1cm, tangent=0.001,tangent=0.1,tangent=0.2,tangent=0.3,tangent=0.4,tangent=0.5,tangent=0.6,tangent=0.7,tangent=0.8,tangent=0.9,tangent=0.999] plot [smooth, tension=1] coordinates { (0,.5) (3,2) (7,1) (10,3)};           \foreach \i in {1,...,11} { \draw [very thin,gray,use tangent=\i] (0,-4) -- (0,4); }       \end{tikzpicture}     \end{figure}     \end{document}      ![Valid XHTML](http://i1294.photobucket.com/albums/b611/Hanmyo/sample_image.png)


title: psfragfig pdflatex image shifted and cropped

text: Some images inserted with `psfragfig`, are shifted to one side (right) and partially placed off the document. (see image, bottom figure is the one I'm talking about). ![](http://s16.postimg.org/46omdlep1/Capture_d_cran_2013_05_28_8_18_42_PM.png) It occurs with TexShop whether I use `pdflatex` (using `\--shell-escape`) or Tex+DVI. The code I'm using to insert is :               \begin{figure}         \centering         \psfragfig{./figures/chapter1/intrinsic_error} % Generated by script_errors.m         \caption{Blah...}         \label{intrinsic_error}     \end{figure}      As you can guess, the image was generated by Matlab, using subplot and a tool called `matlabfrag` which generated the `.tex` file along with the `.eps` file. However, I have no problem with single-plot images inserted with the same code. Maybe `matlabfrag` is messing with the alignment properties in an incorrect way, but is there a workaround to simply shift the image back to the left with some `psfragfig` options ? Or should I use another tool to insert ? Thanks for your help Update : working example . The above would be inserted in : Here is a working example... It's a PhD thesis, so not sure if the sample will be "enough" to understand my pb.               \documentclass[braunschweig]{thesis}          \usepackage[style=base,textfont={small,it},labelfont={it,bf}]{caption}     \usepackage[tight,scriptsize]{subfigure}     \usepackage{epstopdf}     \usepackage{lscape}          \usepackage{amsmath}     \usepackage{txfonts}     \usepackage{pstool}               \begin{document}          \end{document}


title: Bad formating with align + cases and long equations

text: This is what I have so far: > ![formatted badly](http://i.stack.imgur.com/cTqbo.png) Formatting in section 1 is a joke. I can't even read the cases. Under section 2 I cheated with a manual line break `\\\` and a `parbox`. Still the result disgusts me. What I would like to achieve is, that the equation number stays in front of the equation. Too long equation are broken automatically after `\textwidth` has been reached and that the cases text starts right after the comma and behaves like normal text in regard to line breaks and text length. I don't know if other math environments are better suited for this (I am pretty used to `align`) and if i can somehow control the cases environment better. _Small sidenote: When breaking the equation manually before the`\right]` it won't get typesetted anymore_               \documentclass{article}     \usepackage[leqno]{amsmath}          \begin{document}          \section{Unformated Solution}         \begin{align}                  E_{h,betr} =                 \begin{cases}                     \left[ \left(Q_{h,li0} + Q_{h,li} \times GHZ \right) + f_{h,rech} + E_{e,hilf,spez} \times f_{e,prim} \right] \times A_{ebf} \times f_{h,red}, &wenn Lebenszyklus des Gebäudes kein Vielfaches des Lebenszyklus der Heizung ist \\                     \left[ \left(Q_{h,li0} + Q_{h,li} \times GHZ \right) + f_{h,rech} + E_{e,hilf,spez} \times f_{e,prim} \right] \times A_{ebf} \times f_{h,red} + E_{h,erst} + E_{h,ent}, wenn Lebenszyklus des Gebäudes ein Vielfaches des Lebenszyklus der Heizung ist                 \end{cases}         \end{align}          \section{Formated Solution}          \begin{align}                  E_{h,betr} =                 \begin{cases}                     \left[ \left(Q_{h,li0} + Q_{h,li} \times GHZ \right) + f_{h,rech} + E_{e,hilf,spez} \times f_{e,prim} \right] \times \\ A_{ebf} \times f_{h,red}, &\parbox[t]{0.3\textwidth}{wenn Lebenszyklus des Gebäudes kein Vielfaches des Lebenszyklus der Heizung ist} \\                     \left[ \left(Q_{h,li0} + Q_{h,li} \times GHZ \right) + f_{h,rech} + E_{e,hilf,spez} \times f_{e,prim} \right] \times \\ A_{ebf} \times f_{h,red} + E_{h,erst} + E_{h,ent}, &\parbox[t]{0.3\textwidth}{wenn Lebenszyklus des Gebäudes ein Vielfaches des Lebenszyklus der Heizung ist}                 \end{cases}         \end{align}     \end{document}


title: How can you make custom counter display types?

text: I'm a comp sci prof working on an exam for my students in LaTeX, using the exam class. I like to throw in a few in-jokes here and there. Unfortunately, the class breaks if you try to use 0-indexing on the questions (i.e. set the `\thequestion` counter to an initial value of -1). So...I thought I'd bypass the problem by making a custom counter _display_ , like `\alph`,`\roman`, etc., that just outputs the arabic number one less than the counter. However, this requires some heavy-duty variable evaluation. I'd like to do something like this:               \renewcommand{\thequestion}{\arabic{question - 1}}      But I don't understand function evaluation in LaTeX very well. Does anybody have an idea, or can at least point me where to start?


title: Custom text style for outlines (enumerate) levels

text: I'm using the `outlines` package, and I'm curious to know how to modify the font properties of the text at different levels. For example, how can I make text beside `\1` bold and small-caps and slightly larger than the normal size? And how can I make text beside `\2` bold? That is, I want to change this:               \begin{outline}[enumerate]     \1 Cat         \2 Tiny cat         \2 Medium cat     \1 Dog         \2 Big dog             \3 Types of big dogs     \end{outline}      to this:               \begin{outline}[enumerate]     \1 \textsc{\textbf{ \LARGE Cat}}         \2 \textbf{Tiny cat}         \2 \textbf{Medium cat}     \1 \textsc{\textbf{ \LARGE Dog}}         \2 \textbf{Big dog}             \3 Types of big dogs     \end{outline}      But without having to specify the font options for every item. Here's a working example:               \documentclass[11pt,a4paper]{article}             \usepackage{outlines}          \begin{document}          \begin{outline}[enumerate]     \1 Cat         \2 Tiny cat         \2 Medium cat     \1 Dog         \2 Big dog             \3 Types of big dogs     \end{outline}          \begin{outline}[enumerate]     \1 \textsc{\textbf{ \LARGE Cat}}         \2 \textbf{Tiny cat}         \2 \textbf{Medium cat}     \1 \textsc{\textbf{ \LARGE Dog}}         \2 \textbf{Big dog}             \3 Types of big dogs     \end{outline}          \end{document}


title: Hyperref adds vertical space to listings

text: When I input a listing with `\lstinputlisting` from the `listings` package, I get an additional vertical space, when I use this in combination with the `hyperref` package. As the picture shows, a certain amount of space is added to the listing. The output is: ![enter image description here](http://i.stack.imgur.com/EtLTS.png) And the code for this is: _MWE without hyperref:_               \documentclass{article}          \usepackage{filecontents}     \usepackage{listings}     %\usepackage{hyperref}          \begin{document}          \begin{filecontents*}{\jobname.temp}     Line of code     \end{filecontents*}          Without hyperref:          \fboxsep=0pt\fbox{\lstinputlisting[nolol]{\jobname.temp}}          \end{document}      _MWE with hyperref:_               \documentclass{article}          \usepackage{filecontents}     \usepackage{listings}     \usepackage{hyperref}          \begin{document}          \begin{filecontents*}{\jobname.temp}     Line of code     \end{filecontents*}          With hyperref:          \fboxsep=0pt\fbox{\lstinputlisting[nolol]{\jobname.temp}}          \end{document}      I played around a lot with settings and even altering the `listings` package code a bit, but I was'nt able to figure out how to get rid of this space. I want the same output, if `hyperref` is loaded or not using the same source code.


title: tabularx and tablefootnote multiple footnotes from one \tablefootnote

text: In my tablularx environment I have a footnote that I'd like to have placed at the bottom of the page. Using both the `tabularx` and `tablefootnote` packages all is well. However I get served a bit too much. Please find the code I use attached aswell as the result                   \documentclass[a4paper,oneside,11pt]{report}         \usepackage[english]{babel}         \usepackage{a4wide}         \usepackage{eurosym}         \usepackage{csquotes}         \usepackage{tablefootnote}         \usepackage{tabularx}         \usepackage[T1]{fontenc}              \begin{document}              \begin{table}           \centering           \caption[Firm Details]{Firm Details. Source Author}           \label{tab:firmsDescriptions}            \footnotesize         \begin{tabularx}{1.1\textwidth}{lXXXX}           % \toprule               \textbf{FirmName}           & CapGemini      & T-Systems & WiPro &Infosys\\               \textbf{Economy}  & DE  & DE  & EE  & EE\\               \textbf{Industry Type}     & ICT Services     & ICT Services & ICT Services & ICT Services\\               \textbf{Home Country}    & France             & Germany & India& India\\               \textbf{Employees}          & 100.000+       &  48.000 & 135.000 &150,000+\\               \textbf{Revenue}             & \euro~10Bn    & \euro~9Bn & \euro 4.6Bn          &\euro 5.6Bn\tablefootnote{original figure in US\$~(7.4Bn) recalculated using exchange rate USD EUR of 1.3 } \\          \textbf{Description}  \textbf{Description}   Capgemini is a listed company at the Euronext stock exchange in Paris. The  main business of Capgemini are ICT and consulting services. The latter was acquired via a takeover of Ernst\& Young Consulting. The name came to be from a merger between CAP, Sogeti and Gemini inc. Now Sogeti is wholly owned daughter of Capgemini. Typical clients are found in large manufacturing companies, banking and insurance, but also the public sector and healthcare.  &           T-systems is a subsidiary of Deutsche Telekom AG. Although a subsidiary it does serve other customers than DT. The main activities are IT consulting and IT services. These include minting the IT application landscape and building new applications specific for the client. Typical clients are found in large manufacturing companies, banking and insurance, but also the public sector.&           WiPro is an Indian ICT services company, that unlike others started of as an company that manufactured oils, soaps and waxes as the `Western India Vegetable Products' This heritage is still maintained in its company logo of a sunflower. In 1981 WiPro diversifies into IT services. The business is now known for.       Their main clients other MNE that are located in the financial services, healthcare, manufacturing and telecommunications domains.&           In 1981 Infosys Consultants was established. In 1992 the name was changes to Infosys Technologies. Infosys is a NYSE listed global consulting and IT services company stemming from India. Similar to other Indian IT services firms the clients are MNE that are located in the financial services, healthcare, manufacturing and telecommunications domains \\           \end{tabularx}         \end{table}         \end{document}      To my supprise this is my result ![tablefootnote](http://i.stack.imgur.com/A3bm8.png) How do i get rid of the -1 and 0 footnotes? I thought I have defined just the one.


title: How does XeTeX typeset (math) symbols which are input as unicode?

text: I'm considering moving to Xe(La)TeX for the main reason that it allows me to use unicode in my LaTeX code, making said code easier to read, especially the math. But I'm confused on how XeTeX typesets symbols based on my input. I see three possibilities:   1. Unicode chars are made active and XeTeX outputs the TeX symbols we know and trust.   2. Unicode chars are piped (directly) through to the final (pdf, ps, dvi) document.   3. A combination of the two. With one of the advertised points of XeTeX being direct access to system UTF-8 fonts, I'm guessing (2) has a lot to do with it. **Beautiful Typesetting** But TeX has always been about beautiful typesetting, and a lot of effort has gone into making symbols and their spacing look good. Do we still get the same benefits with unicode output? (Do the symbols look the same? Nicer? Worse?) I believe some symbols do not come directly from a font, but have been painstakingly crafted in TeX itself. **Specifics** There are specific math constructs that get special treatment in TeX but also have unicode symbols. For example, for `\cap` and `\bigcap` there are respectively ∩ and ⋂. Do they both behave accordingly? What about √? Or are there packages that implement this sort of thing? Are most unicode math symbols interpreted correctly with regard to math spacing? (`\mathbin`, `\mathrel`, `\mathop`, `\mathopen`, `\mathclose`) Do math delimiters derived from unicode ⦃⦄ ⦅⦆ scale vertically as they should? Are Combining Diacritical Marks handled appropriately? **Portability** Will the output be different when the code is compiled on different systems? Will my generated pdf/ps/dvi look different when viewed on different systems? Or are all relevant fonts automatically included? **`unicode-math`** Finally, what role does `unicode-math` play in this story?


title: How to "force" LaTeX to respect the page width

text: In a document I write, I use the following for setting the page proportions:               \documentclass[12pt,a4paper]{report}     \setlength\textwidth{145mm}     \setlength\textheight{247mm}     \setlength\oddsidemargin{15mm}     \setlength\evensidemargin{15mm}     \setlength\topmargin{0mm}     \setlength\headsep{0mm}     \setlength\headheight{0mm}      However, sometimes I want certain blocks of text not to be broken into several lines. In math mode, I use simply                ${1+1+1=3}$      that is, composed brackets around the block. In normal text, I use               \mbox{crucial-expression}      However, in both cases, when the block comes inconveniently at the end of the line, it is often compiled so that the block exceeds the prescribed line width. I would like to force Latex somehow to put the block on the next line instead and stretch the preceding text to the whole line. In particular, I would rather not use \newline, because then the text on the upper line ends before the prescribed line width. (Moreover, I would like to do it in a way that dos not change the above setting of the page proportions, if possible.) I am sorry if this is a duplicate of some sort, I was not able to find anything related here (maybe because of my poor terminology concerning typing). Thanks in advance for any tips.


title: Unwanted blank page prepended to large table

text: Problem-ku:               A page-long table     Gets a blank page prepended     I do not want this      The table is very large (69x20) but fits on one page. Here's the code I'm using at the beginning and end of the mega-table. **Before** :               \newgeometry{left=1cm,top=1.5cm}     \bibpunct{}{}{;}{n}{}{,}     \begin{table}[H]       \footnotesize       \begin{center}         \tabcolsep=0.11cm         \begin{tabular}{ |r||l|l|l||l|l|l|l||l|l|l|l||l|l||l|l|l||l|l|l|}           \hline      **After** :                    \hline         \end{tabular}\\             \caption{The caption\\$^{1}$\footnotesize{A footnote}}         \label{tab:BigFrameworkChart}       \end{center}     \end{table}     \bibpunct{[}{]}{,}{n}{}{,}     \restoregeometry      How the heck do I get rid of this extra page?


title: inputenc.sty error

text: LaTeX Error: File `latin.def' not found.     Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: def)     Enter file name:     ! Emergency stop.      i would like to compile on file but it gives me this error message:               l.131 \endinput     ^^M     *** (cannot \read from terminal in nonstop modes)     Here is how much of TeX's memory you used:     522 strings out of 495029     6951 string characters out of 6181523     50216 words of memory out of 5000000     3804 multiletter control sequences out of 15000+600000     3940 words of font info for 15 fonts, out of 8000000 for 9000     14 hyphenation exceptions out of 8191     23i,0n,19p,211b,36s stack positions out of 5000i,500n,10000p,200000b,80000s     No pages of output.


title: left align using alignat?

text: I want to align some equations on the left side in a document. And additionally I want to have some aligned text behind every equation. Also the equations need to be numbered. With the code below my goal is almost achieved. I just need to bring the text aligned to the right... How do I do that? Thanks               \documentclass[a4paper, 11pt]{book}     \usepackage{amsmath}     \begin{document}     \begin{flalign}         &u_\mathrm{L} = L \cdot \frac{\text{d}i_\mathrm{L}}{\text{d}t} \quad(\text{Differentialform}) &\label{eq:2_19} \\         &i_\mathrm{L} = \frac{1}{L} \cdot \int\limits_t u_\mathrm{L} \text{d}t + i_\mathrm{L}(t=0) \quad (\text{Integralform}) &\label{eq:2_20}     \end{flalign}     \end{document}


title: Page breaking up for caption of a table

text: Using the following I get problem by page break up.               \IfFileExists{FILE}{%     \begin{center}     \captionof{table}{Grenzwertverletzung [AL9]}     \begin{tabular}{ll}      AL9&  \input{FILE} \\     \end{tabular}     \end{center}}{}               \IfFileExists{FILE}{%     \begin{center}     \captionof{table}{Caption is [AR07]}     \begin{tabular}{ll}      AR07&  \input{FILE} \\     \end{tabular}     \end{center}}{}      ![enter image description here](http://i.stack.imgur.com/FFy6e.jpg)


title: How to make the last word in a sequence the first?

text: I am looking for a macro that would take a string (better to say -- a sequence of words) and output the last word at the fist place before remaning part of the sequence. I want to put this macro into the definition of an environment intended to typeset personal information for a person:               \newenvironment{person}[2]%     {% begin definition         \section*{#2}\label{#1}         \addcontentsline{toc}{section}{#2}     }{% end definition     \clearpage     }      So that instead of               \addcontentsline{toc}{section}{#2}      there should be               \addcontentsline{toc}{section}{\reverseit{#2}}      The `\reverseit` macro should produce **Alfv\'{e}n Hannes** from **Hannes Alfv\'{e}n** and **Allen James van** from **James van Allen**. It should also handle exceptional case when its argument consist of a single word (eg, **Aristotle** ). **Is is possible to compose such a macro within framework of TeX or, say, using Lua or LaTeX3?** A receipt proposed as an answert to How can I reverse the order of letters/tokens? solves my problem only in the case of a sequence which consists of two words.


title: Machine Readable list of LaTeX Commands and Symbols

text: I am looking for a list of LaTeX symbols and commands which is in a nice machine readable format (json/xml/csv). Something similar to The Comprehensive LaTeX Symbol List. Can anyone point me in the direction where I could find something similar or perhaps build it up myself?


title: Table inside description list

text: I'm trying to put a table inside a list environment but without success. I'd like to have the table inside the item (matching `\linewidth`) and not floating in the next page.               \begin{description}         \item[Lorem ipsum] \hfill \\             Lorem ipsum dolor sit amet...         \item[Lorem ipsum] \hfill \\             \begin{table}[h]                 \centering                 \caption{Foobar}                 \label{tab:foobar}                 \begin{tabular}{@{}ll@{}}                     \toprule                     \textbf{foo} & \textbf{bar} \\                     \midrule                     Lorem ipsum & foo \\                     Lorem ipsum & bar \\                     \bottomrule                 \end{tabular}             \end{table}     \end{description}      How can this be achieved?


title: scrpage2: footer on chapter-starting pages

text: I am using `scrpage2` and have defined the header and footer. Is it possible to display the footer also on pages where the chapter begins? I guess this has to work. Header is not necessary on those pages (assuming this would look ugly and who needs header on chapter beginning?) But I don't know what I have to define to have a footer on chapter beginning pages.


title: How to horizontally top-align multiple \tikzpicture's without using \hspace?

text: The use case I'm having is the following:               \documentclass{article}          \usepackage{amsmath}     \usepackage[showframe]{geometry}     \usepackage{qtree}          \begin{document}          \Tree [.A B C [.D E ] ]     \Tree [.F [.G H ] I ]     \Tree [.J [.K [.L M M ] N ] O ]     \Tree [.F [.G H ] I ]          \end{document}      which due to `qtree`s clever horizontal alignment produces ![qtree](http://i46.tinypic.com/snp642.png) Now, as `qtree` is limited to 5 branches, I'm using `tikz-qtree` and therefore essentially a tikzpicture:               \documentclass{article}          \usepackage{amsmath}         \usepackage[showframe]{geometry}         \usepackage{tikz}     \usepackage{tikz-qtree}          \begin{document}          \begin{center}     \begin{tikzpicture}         \Tree [.A B C [.D E ] ]     \end{tikzpicture}     \begin{tikzpicture}         \Tree [.F [.G H ] I ]     \end{tikzpicture}     \begin{tikzpicture}         \Tree [.J [.K [.L M M ] N ] O ]     \end{tikzpicture}     \begin{tikzpicture}         \Tree [.F [.G H ] I ]     \end{tikzpicture}     \end{center}          \end{document}      which produces ![tikz-qtree](http://i46.tinypic.com/2lks5lz.png) How can I achieve the same spacing as in `qtree`? So that each space between two `tikzpicture`s and to the borders is the same, without using any manual measurements. Also, alignment should be at the top, not bottom.


title: Bibligraphy driver: \printfield ends unit/block

text: I am using this custom bibliography driver for `incollection` (based on `standard.bbx`):               \DeclareBibliographyDriver{incollection}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/translator+others}%       \setunit{\labelnamepunct}\newblock       \usebibmacro{title}%       \newunit       \printlist{language}%       \newunit\newblock       \usebibmacro{byauthor}%       \newunit\newblock       \usebibmacro{in:}%       \usebibmacro{byeditor+others}%       \newunit\addcomma     %  \usebibmacro{maintitle+booktitle}%       \printtext[booktitle]{%         \printfield[titlecase]{booktitle}%         \setunit{\subtitlepunct}%         \printfield[titlecase]{booksubtitle}} (\printfield{pages})%       \newunit\newblock       \printfield{edition}%       \newunit       \iffieldundef{maintitle}         {\printfield{volume}%          \printfield{part}}         {}%       \newunit       \printfield{volumes}%       \newunit\newblock       \usebibmacro{series+number}%       \newunit\newblock       \printfield{note}%       \newunit\newblock       \usebibmacro{publisher+location+date}%     %  \newunit\newblock     %  \usebibmacro{chapter+pages}%       \newunit\newblock       \iftoggle{bbx:isbn}         {\printfield{isbn}}         {}%       \newunit\newblock       \usebibmacro{doi+eprint+url}%       \newunit\newblock       \usebibmacro{addendum+pubstate}%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \newunit\newblock       \iftoggle{bbx:related}         {\usebibmacro{related:init}%          \usebibmacro{related}}         {}%       \usebibmacro{finentry}}      I modified it to   * separate `byeditor+others` and `maintitle+booktitle` with a comma instead of a period   * print the pages of the section in the title block (before the period after title/subtitle) The first thing works, the second doesn't. It produces something like               In <editors>, <title> (. S. 23–38).      Obviously, there is a dot I don't want, it should look like this:               In <editors>, <title> (S. 23-38).      What am I doing wrong? `\printfield{pages}` seems to finish the last block (or unit?) and inserts a dot. How can I solve this?


title: Using Greek letters with the Nath package

text: I'd like to use the Nath package together with a math font which supports Greek letters, while retaining the default font for the non-Greek letters. Is this possible? I tried compiling the following document with xelatex.               \documentclass[a4paper,12pt]{article}     \usepackage{unicode-math}     \setmathfont[range=\mathbfsfit/{greek,Greek}]{lmmath.otf}     \RequirePackage{nath}     \begin{document}     $$\tilde{T}α$$     \end{document}      It gave me an error:               Nath as of 21 March 2003      Implementing NAtural maTH notation     ) (./test2.aux) (/usr/share/texmf/tex/latex/tipa/t3cmr.fd)     ! Internal error: bad native font flag      If I remove the range option to setmathfont, or the tilde, the document compiles.


title: Reduce Space Between Characters in New Command

text: I'm not satisfied with the new command I've made. My code:               \newcommand{\ps}[2]{\mbox{P}_{#1}\left(#2\right)}     $\ps{Y}{y}$ %example      My problem is that there's too much space between the subscripted Y and the left parenthesis. Does anyone know how to get these two closer together?


title: Easiest way to get \not\longrightarrow to look good

text: I'm currently using `\longrightarrow` to mean "tends to [some limit]", and sometimes I need to use its negation. I see that there is an `\nrightarrow`, but unfortunately it doesn't make a matching pair with `\longrightarrow`, and `\not\longrightarrow` looks quite bad. What's the easiest way to adjust the position of the little slash so that I can define a `\nlongrightarrow`? The solution from this related question looks excellent but seems to be overkill for my purposes.


title: Tufte book fullwidth across pages

text: How to switch between two margin sizes? tells a few things about this issue. But how to solve it? MikTex, XeLatex.               \documentclass[nols,a4paper,twoside,symmetric,justified,marginals=raggedouter]{tufte-book}          \usepackage{lipsum}     \begin{document}          \begin{fullwidth}     \lipsum     \lipsum     \end{fullwidth}          \end{document}


title: LaTeX: non-verse text in verse environment.

text: I'm writing text in LaTeX in the verse environment. But there are some parts the should not be in verse inside the verse. The way I've done it so far is to define a new environment that begins with `\end{verse}` and ends with `\begin{verse}`. My sense of What Is Blatantly Obvious tells me this is Very Wrong. What's the right way if doing it? Here is an example:               \newcommand[1]{\description}{\end{verse}{\itshape#1\/}\begin{verse}}          \begin{document}     \begin{verse}     This is     In verse!          \description{But this is not.}          But this is     Again!          \end{verse}     \end{document}      This actually works, but is it done the right way? What I'd really like to do is place a box inside the verse environment that's positioned and justified the "standard" way. But I'm not sure how to do that.


title: Is it worth defining \ensuretext ?

text: We already have `\ensuremath` to make sure the argument get enclosed in math mode. Is it worth defining `\ensuretext` ?


title: Inverse search jumps to wrong position in tex-file if using crop package

text: When using `pdflatex` I generate a `synctex` file for inverse search. So far, pointing and clicking in the PDF viewer (SumatraPDF) brings me to the correct line in the TeX editor (TeXnicCenter). However, if I use the `crop` package, almost all line numbers that the inverse search gives are wrong (by offsets of some lines). Clicking in the PDF brings me too far in `tex` source. This is quite annoying and definitely not how it should be. Example ( **updated** ):               \documentclass[a4paper]{article}     \usepackage[a3,frame,center]{crop} %without this package inverse search works fine!     % (We let "crop" print on a3 paper to be able to see the produced frame.)     \usepackage{lipsum}          \begin{document}     \section{The first lipsum}     \lipsum     % the cursor should be placed around this line by the inverse search of     % the  ***last lines***  of above lipsum text in the PDF     \section{The second lipsum}     \lipsum     % but the cursor appears at the next line!     \section{The third lipsum}     \lipsum     \end{document}      Any ideas how to solve it? BTW, where is `synctex` maintained? FYI, for this example, `\listfiles` outputs ( **updated** )               *File List*     article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)         crop.sty    2003/05/20 v1.9 crop marks (mf)       color.sty    2005/11/14 v1.0j Standard LaTeX Color (DPC)       color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)     ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live       lipsum.sty    2011/04/14 v1.2 150 paragraphs of Lorem Ipsum dummy text     supp-pdf.mkii     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)       ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf       grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)     kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live      Just to note, the following files are not used by the _updated_ example: `geometry.sty`, `ifvtex.sty`, `ifxetex.sty`, `crop.cfg`, `atbegshi.sty`. And the versions of some files changed. The old versions were: `ifpdf.sty(v2.1)`, `pdftex.def(v0.05d)`, `lipsum(v1.1)`, `ltxcmds(v1.7)`, `pdftexcmds.sty(v0.9)`, `grfext.sty(v1.0)`, `kvoptions.sty(v3.7)`, `kvsetkeys.sty(v1.9)`, `etexcmds.sty(v1.3)`.


title: Can I specify that I only want the .sty file from a .dtx?

text: I've been trying to be good and make my proto-packages `.dtx` files (in particular, the files in the TeX-SX Package but that's not particularly relevant). My workflow goes a bit like this:   1. Hack a few macros with tests in a `.tex` file   2. Fork the macro bit into a `.sty` file and the tests stay in a `.tex` file   3. Munge the macros into something reasonable   4. Convert the tests into something approximating documentation   5. Convert the `.sty` file to a `.dtx`   6. Add the documentation   7. Announce it somewhere and ask for testers At this point, I enter the "add feature and fix bugs" stage. Editing the `.dtx` is a little less intuitive than the `.sty` (having to remember the `macrocode` stuff, but I'm getting used to it), but I don't usually want to rebuild the documentation every time - I usually have a separate test file that tests only those bits that I'm editing. So whilst I'm okay at adding `pdflatex file.dtx` to generate the new `.sty` file, it's a bit much that it generates the documentation as well. Not only is it a waste of _time_ but also can hide any errors in the `.sty` bit under a wreath of information about the documentation bit. So: how do I tell `pdflatex` to _only_ generate the `.sty` file when I run `pdflatex file.dtx`? (Incidentally, if anyone happens to suggest any improvements on my workflow, I'll be very grateful.)


title: amsmath align within list

text: In the code below, the equation within the itemize environment is too wide for the page, but I don't get an overfull hbox warning (which I find annoying because it's sometimes useful to know exactly how wide an overfull hbox is). I'd like to know how to get the compiler to produce the 'usual' overfull hbox warning in these circumstances. I'm also curious as to why this happens. Any help will be much appreciated.               \documentclass[a4paper,12pt,draft]{article}       \usepackage{amsmath}       %       \begin{document}       The text that appears here shows the complete page width.     No doubt the long equation displays ok now.       \begin{align}       A + Bz + Cz^2 + Dz^3 + Ez^4 + Fz^5 + G z^6 + H z^7 + I z^8 + J z^9 + K z^{10} = 0.       \end{align}       %       \begin{itemize}       \item The text that appears here shows the width within the list.     The equation below will overspill the right     margin, without producing a warning.       \begin{align}       A + Bz + Cz^2 + Dz^3 + Ez^4 + Fz^5 + G z^6 + H z^7 + I z^8 + J z^9 + K z^{10} = 0.       \end{align}       \end{itemize}       \end{document}


title: Nodes vertical distance in a legend of a tikzpicture

text: I have a figure drawn using `tikz`. I am trying to add a legend, which consists in two types of arrows with different meanings. My problem is how to add the correct vertical space between the nodes with arrows. In the MWE, I have the a reference node and the text within it is separated by `\\\`. How can I align the nodes with arrows with latter keeping the same vertical space between the text of nodes `(n2)` and `(n3)` as within `(n1)`?               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}     \begin{tikzpicture}         \node[align=right,inner ysep=0pt] (n1) {BLA\\ BLB};         \draw[->,red,align=center] ($(n1.north east)+(1cm,0cm)$) -- ++(0:8pt) node[at end,anchor=west] (n2) {BLA BLA};         \draw[<-,red] ($(n1.north east)+(1cm,-\baselineskip)$) -- ++(0:8pt) node[at end,anchor=west] (n3) {BLA BLB};     \end{tikzpicture}     \end{document}


title: How to include PDF pages without a newpage before the first page?

text: I am using pdfpages which works quite well. But this time, I want to include a 5 page pdf and the first page should be scaled down a bit such that above the first page is enough space for a subsection (in the LaTeX document). Using just               \usepackage{pdfpages}     ...          \subsection{Interesting Letter}     \includepdf{letter.pdf}      does not work, because includepdf inserts a newpage command before the first page. I looked at the pdfpages manual but could not find options relating to that. I hacked this command, which kind of works:               \newcommand{\insertrep}[1]{%     \hspace*{-2.4cm}     \fbox{\includegraphics[page=1,scale=0.8]{#1}}     \includepdf[scale=0.8,pages=2-,frame]{#1}     }          \subsection{Interesting Letter}     \insertrep{letter.pdf}      The subsection is printed on the same page as the first page of the pdf, but an empty page is inserted before the section ... The empty page vanishes if I scale the first page to 0.5 - which is too small ... It seems that \includegraphics inserts an empty page before the graphic, if the inserted graphic violates the margins of the page. Besides, the hspace value does not always fit. Thus, my question: How to solve this right?


title: Is it possible to arrange minipages in this specific way?

text: I am trying to arrange two tables and a formula using minipages, to get something like this: ![What I want](http://i.stack.imgur.com/3gm7Z.png) So far, the closest I got was, with the code below: ![What i got](http://i.stack.imgur.com/QeQAU.png)                 \documentclass[paper=a4, fontsize=11pt]{scrartcl}       \usepackage{float}                      \begin{document}            \begin{table}[H]           \begin{minipage}[b]{0.40\linewidth}                 \caption{Short table}                 \qquad                 \begin{tabular}{c c c c}                   A & B & C & D \\ \hline                   7 & 4 & 7 & 1 \\                   4 & 3 & 4 & 9 \\                   5 & 5 & 9 & 2 \\                \end{tabular}          \end{minipage}          \qquad \quad          \begin{minipage}[b]{0.55\linewidth}                 \caption{This table continues to the right}                 \begin{tabular}{c c c c}                       E  & F & G & H    \\ \hline                       3  & 1 & 1 & 1   \\                       6  & 4 & 4 & 1   \\                       9  & 8 & 7 & 9   \\                       12 & 2 & 1 & 8   \\                       15 & 8 & 1 & 7   \\                       18 & 8 & 1 & 4   \\                       21 & 9 & 1 & 5   \\                       24 & 5 & 2 & 4                    \end{tabular}               \end{minipage}          \begin{minipage}[b]{0.45\linewidth}              \[R_{LED}=\frac{1.31+1.39+1.32}{3}=1.34k\Omega\]         \end{minipage}        \end{table}             \end{document}      I appreciate any help you can give


title: How to install Beamer in Windows XP using LyX

text: I installed LyX on Windows XP, but when I attempt to load a file which uses beamer it says MikTeX does not have it! What to do? > (I have MikteX 2.7) I am trying to update MikTeX, but when searching and trying to install `beamer` I get this error:               Server was unable to process request. ---> MiKTeX 2.7 is not supported any more. Visit http://miktex.org/2.7/ for details.


title: Using the correct indefinite article with acronyms and their full forms

text: I am using the `acronym` package so as to automatically expand acronyms when they are first used. For example, I can simply type `\ac{RMS}`, and LaTeX automatically expands this to "Resource Management System (RMS)" or "RMS". However, a problem occurs when using indefinite articles. The most common style, Abbreviation verbalised, requires the use of " **a** Resource" and " **an** RMS". Is there an easy way to deal with this in LaTeX? Otherwise, have you seen articles where they use Word verbalised style?


title: Figure spans two columns, but text going over half the image

text: I am using the float package to force an image to right below where the authors section normally is on a journal paper. Using [H] I get the image to show up in the right place, but the text does not properly wrap around the image in the second column. Adding a caption to the image, it seems that LaTeX is not recognizing the figure as spanning two columns since it is forcing the caption to wrap into a single column. ![Here is a screenshot of what the attached code produces](http://i.stack.imgur.com/fOHPv.png) The document style I am using is based on sig-alternate.cls which is a document style for producing two-column camera-ready pages for ACM conferences (a link to this document, image, and my document is below). Here is the most basic document I could create that reproduces the issue: * * *               \usepackage{float}          \begin{document}          \title{Hello World!}          \maketitle          % Figure issue here!     \begin{figure}[H]     \centering             \includegraphics[width=1\textwidth]{DSC_6703d.jpg}         \caption{This image should span the entire page and the image does, but LaTeX doesn't think it does!}     \end{figure}          \begin{abstract}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non accumsan odio. Aliquam non urna rhoncus nunc viverra tempor. Curabitur gravida volutpat urna in feugiat. Vestibulum aliquet, nunc a adipiscing adipiscing, erat metus semper sapien, ac vestibulum nunc lorem vitae justo. In nec mauris sem. Sed lectus elit, interdum et placerat tincidunt, varius porttitor augue. Sed sit amet enim magna, ut dapibus ipsum. Nunc semper elementum tellus nec consectetur. Duis at odio orci, ut vulputate est.     \end{abstract}          \section{Introduction}     Mauris sit amet ipsum sed felis mattis tincidunt id et neque. Praesent lorem nunc, ullamcorper eget interdum sit amet, commodo vitae felis. Suspendisse id dolor condimentum libero condimentum dapibus vel non neque. Aenean libero urna, vulputate ac porttitor vitae, mattis convallis metus. Suspendisse enim quam, ultricies eget gravida at, eleifend non libero. Pellentesque a arcu lectus, vitae condimentum leo. In congue cursus diam, vitae sodales mauris viverra quis. Nullam in lectus et justo egestas vestibulum. Ut elementum congue mauris scelerisque condimentum. Sed in ipsum lacus, eget iaculis sem. Nulla semper enim eu nibh ornare ultrices. Curabitur hendrerit euismod massa vitae pulvinar.          Mauris sit amet ipsum sed felis mattis tincidunt id et neque. Praesent lorem nunc, ullamcorper eget interdum sit amet, commodo vitae felis. Suspendisse id dolor condimentum libero condimentum dapibus vel non neque. Aenean libero urna, vulputate ac porttitor vitae, mattis convallis metus. Suspendisse enim quam, ultricies eget gravida at, eleifend non libero. Pellentesque a arcu lectus, vitae condimentum leo. In congue cursus diam, vitae sodales mauris viverra quis. Nullam in lectus et justo egestas vestibulum. Ut elementum congue mauris scelerisque condimentum. Sed in ipsum lacus, eget iaculis sem. Nulla semper enim eu nibh ornare ultrices. Curabitur hendrerit euismod massa vitae pulvinar.          \end{document}      * * * ![The image used in the above document](http://i.stack.imgur.com/SKLRB.jpg) Also worth noting - if I use figure* instead of figure, when I run QuickBuild in TexMaker or PDFLaTeX, the process hangs indefinitely. The above document, figure, and document class can be downloaded here: http://cl.ly/0R1K0g3W2v2T


title: How to pass a \def parameter to an inner command (StrSubstitute)?

text: I'm attempting to create 2 macros to simulate an array list as in Java for example. I'm using **xstring StrSubstitute** for this purpose, but I'm having a problem. Below is the code, it's a bit long as it contains the macros plus the test document. The currently active StrSubstitute line is working as it is specifying the recipient of the substitution explicitly (`\Cities`). The 1st commented StrSubstitute line (using `\csname #1\endcsname`) on the other hand causes the following TeX error :               ! Extra \endcsname.     <argument> \csname testAL\endcsname           l.21 \addElementToArrayList{testAL}{Paris}      The 2nd commented line (using just `#1`) causes the following error:               ! Missing control sequence inserted.     <inserted text>                  \inaccessible      l.21 \addElementToArrayList{testAL}{Paris}      I tried to read some TeX resources, but I am not able to make it work and I find lots of possibilities (`\def`, `\edef`, `\noexpand`...)               \documentclass[a4paper,10pt]{article}     \usepackage[utf8x]{inputenc}     \RequirePackage{xstring}    %will use this package for the internal list structure          \def\ARRAYENDSENTINEL{@@}   %indicates array end     \def\ARRAYSEPARATOR{,}      %element separator          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %Macro to create a new list:     %Parameters: <list name>     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \def\newArrayList#1{%           \expandafter\def\csname#1\endcsname{\ARRAYENDSENTINEL}     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %Macro to append element on a list:     %Parameters: <list name>, <element to add>     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \def\addElementToArrayList#1#2{       \StrSubstitute[1]{\csname #1\endcsname}{\ARRAYENDSENTINEL}{\ARRAYSEPARATOR #2\ARRAYENDSENTINEL}[\Cities] %working       %\StrSubstitute[1]{\csname #1\endcsname}{\ARRAYENDSENTINEL}{\ARRAYSEPARATOR #2\ARRAYENDSENTINEL}[\csname #1\endcsname] %NOT working!       %\StrSubstitute[1]{\csname #1\endcsname}{\ARRAYENDSENTINEL}{\ARRAYSEPARATOR #2\ARRAYENDSENTINEL}[#1] %NOT working either!     }          %opening     \title{Testing ArrayList}     \author{}          \begin{document}     \maketitle          \newArrayList{Cities}          Contents of Cities: \textbf{[\Cities]}          \addElementToArrayList{Cities}{Paris}          Contents of Cities: \textbf{[\Cities]}          \addElementToArrayList{Cities}{London}          Contents of Cities: \textbf{[\Cities]}          \addElementToArrayList{Cities}{Rome}          Contents of Cities: \textbf{[\Cities]}               \end{document}


title: How do I make a bibtex style file compatible with natbib author citations

text: I'm trying to convert my manuscript to PloS Comp Bio style. They provide a BibTeX style file. This works fine for inline citations with `\usepackage[numbers,sort&compress]{natbib}` (i.e. `\citep{FooYear}` -> [1]). However, this style file does not seem to be compatible with the natbib `\citet` command. Whenever I use this I get `\citet{FooYear}` -> "(author?) [1]" (the reference to the author's name is unresolved). What I want is to display a reference to the author (i.e. "Foo & Smith [1]". Obviously, I could fix this manually, but I have quite a large number of cases in the manuscript. If I use a different BibTeX style then the citations work fine but then the bibliography is not formatted correctly. ## Minimum example As suggested below here is a minimum example.               \documentclass{article}     \usepackage[numbers]{natbib}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @misc{A01,        author = {Test, A. and Foo, B.},        year = {2001},        title = {Alpha},     }     @misc{A02,        author = {Alex, A. and Bar, B.},        year = {2005},        title = {Alpha},     }     \end{filecontents}          \begin{document}          % These citations will work but in the apalike bibstyle they will not be sorted     % in citation order (the first citation is [2]).     \citep{A01}, \citep{A02}, \citet{A02}           % The author name will be undefined with the unsrt bibtex style     \citeauthor{A02}, \citet{A01}          \bibliography{\jobname}     \bibliographystyle{unsrt}     %\bibliographystyle{apalike}          \end{document}


title: How to typeset a reference to a footnote?

text: I want to enter in a footnote a reference to another footnote (in this case it's on the same page above). I found out how I can create the reference, so that it is formatted like a "normal" footnote number (http://tex.stackexchange.com/questions/16866/how- can-i-use-footnotemark-with-a-ref-argument), but **how should I typeset it?** Is it ok like in the picture below (in english "see footnote" with a `space`between the word "footnote" and the footnotemark? Or how could that be done better?   * Maybe without the space?   * .. or even not as a footnotemark, but as a normal number (in normalsize)? ![example](http://i.stack.imgur.com/4KhUE.png)


title: Generating loops to produce edges for network graph of 4X4 knights problem

text: I want to simplify the huge list of edges in the following code, but I'm not sure how to calculate them or produce the loop over them. The result should show the network graph of the 4X4 chess board knight problem. The below code functions with the following includes, but it's not very clean. Please help me to create a loop to produce the edges between legal knight move squares. ![enter image description here](http://i.stack.imgur.com/CsNts.png)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows, shapes, backgrounds,fit}     \usepackage{tkz-graph}     \begin{document}     \begin{tikzpicture}     \SetVertexNormal[Shape = rectangle, FillColor  = lightgray, LineWidth = 2pt]     \SetUpEdge[lw = 1.5pt, color = black]     \foreach \y in {1,2,3,4}         \foreach \x / \a in {1/a,2/b,3/c,4/d}              {\Vertex[L=\y \a,x=2*\x,y=2*\y]{\x\y}}          \Edge(11)(23)     \Edge(11)(32)     \Edge(14)(33)     \Edge(14)(22)     \Edge(41)(33)     \Edge(41)(22)     \Edge(44)(32)     \Edge(44)(23)     \Edge(21)(33)     \Edge(21)(42)     \Edge(21)(13)     \Edge(24)(12)     \Edge(24)(32)     \Edge(24)(43)     \Edge(31)(12)     \Edge(31)(23)     \Edge(31)(43)     \Edge(34)(13)     \Edge(34)(22)     \Edge(34)(42)     \Edge(12)(33)     \Edge(22)(43)     \Edge(32)(13)     \Edge(42)(23)     \end{tikzpicture}     \end{document}


title: lyx newcommand and newtheorem

text: I have two simple problems with preamble (Lyx 2.0.0rc3 on Ubuntu 11.04 or Debian Wheezy)   1. If I put in preamble the line              \newcommand{\gra}{\alpha}      then within the math formula when I type \gra I see \gra, not the greek symbol alpha (output is fine) I only get the symbol if I include a math macro in the Lyx file   2. If I put in preamble the line               \newtheorem{assm}{Assumption}      I can only enter the new environment by inserting Latex code with Ctrl-L (and it looks bad anyway), while I want to enter it just as I do with the default ones like "Theorem". Possibly I would also like to have the new environment in the pull-down menu (again output is fine)


title: How can I nicely show an absolute value with the "divides" function, |?

text: Right now, I am using `\lvert`,`\rvert`, and `\mid` to display ![enter image description here](http://i.stack.imgur.com/h8hOH.png)               \documentclass[border=3pt]{standalone}     \usepackage{amsmath}     \begin{document}     $\lvert x \rvert \mid y$     \end{document}      Is there a better way to do this?


title: Keeping the same style inside a scaled plot

text: I have a graph with three different curves, two of which are very small compared to the other. I therefore decided to add a magnification of such curves inside my graph, in the following way:               \documentclass{scrbook}     \usepackage{classicthesis}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}         \begin{semilogxaxis}[          xlabel={x},          ylabel={y},          xmin=1000, xmax=800000,          ymin=0, ymax=25,          enlargelimits,          width=.8\columnwidth,          every axis legend/.append style={nodes={right}},          cycle list name=black white]          \addplot          coordinates{          (1846,     0.15)          (2304,     0.9)          (2846,     1.5)          };          \addplot          coordinates{          (1846,     0.3)          (2304,     0.9)          (2846,     1.5)          };          \addplot          coordinates{          (632,      19)          (916,      22)          (1764,     15)          (5106,     5)          (8146,     4)          (66026,    3)          (407900,   2.5)          (802932,   2)          };          \draw[black,dashed,thick] (axis cs:1500,-0.8) rectangle (axis cs:3500,2.2);          \coordinate (pt) at (axis cs:150000,11);          \legend{{Small curve \#1},{Small curve \#2},{Big curve}}          \end{semilogxaxis}     \node at (pt) {         \begin{tikzpicture}[baseline,trim axis left,trim axis right]         \begin{semilogxaxis}[          tiny,          xmin=1700, xmax=3000,          ymin=0, ymax=1.7,          enlargelimits,     %    cycle list name=black white,          /pgfplots/log ticks with fixed point,          /pgfplots/xtick={1700,2200,2700}]          \addplot[every mark/.append style={fill=gray},mark=*]          coordinates{          (1846,     0.15)          (2304,     0.9)          (2846,     1.5)          };          \addplot[every mark/.append style={fill=gray},mark=square]          coordinates{          (1846,     0.3)          (2304,     0.9)          (2846,     1.5)          };         \end{semilogxaxis}         \end{tikzpicture}};     \end{tikzpicture}          \end{document}      My question is: Is it possible to keep the same format in the magnified graph? I tried to specify it by hand, but it doesn't respect the filling. Specifying the `cycle list name` doesn't work, too. In addition, but is not mandatory, I would appreciate a solution that avoid to specify the coordinates inside the magnified graph.


title: How to use the command \autoref to implement the same effect when use the command \eqref?

text: For example, the first equation of Section 1 in a tex file is numbered in the form (1.1), When we use the commands `\autoref` and `\eqref` for referring it, the compiled pdf file will show Equation 1.1 and (1.1), respectively. Now the problem is that how can I just use the command `\autoref` to implement the same effect when use the command `\eqref`. By the way, please do not use the package `cleveref`!


title: Memoir header problem with \chapter*

text: I'm using memoir, when I use `\chapter*` the header is copied from the previous section. How can I fix that? MWE:               \documentclass{memoir}          \usepackage{lipsum}     \setcounter{secnumdepth}{3}          \copypagestyle{ruledsmallhd}{ruled}     \makeevenhead{ruledsmallhd}{\footnotesize\scshape\leftmark}{}{}     \makeoddhead{ruledsmallhd}{}{}{\footnotesize\scshape\rightmark}     \makeheadrule{ruledsmallhd}{0px}{0px}          \begin{document}          \pagenumbering{roman}     \pagestyle{ruledsmallhd}          \cleardoublepage     \maxtocdepth{subsection}     \tableofcontents          \cleardoublepage     \chapter*{Introduction}     \addcontentsline{toc}{chapter}{Introduction}          \lipsum          \end{document}


title: Exam environment: Alignment of subparts' label

text: Is it possible to change the alignment of the `subparts` labels in the `exam` class? I have changed my labels with the `\renewcommand\subpartlabel{(\thesubpart)}` so that it shows (i), (ii), etc. in brackets as I want. However instead of my desired left-aligned `subparts` labels it is right-aligning them. Is it possible to change this so that the (i), (ii), (iii) etc. labels are left-aligned?


title: Altering the scrlttr2 format the Indian Style

text: I have written my letter to the Head of the Department to grant On-Duty.I want to format it to the Indian way of writing, I want to add "To" and I want to remove the text underlined(the address part repeated), place and date at the right corner or at the bottom and in the 6th , the "th" must appear as a superscript.How to achieve these? Here is the code:                  \documentclass[pagenumber=false,parskip=half,fromalign=right,foldmarks=true,addrfield=true     ,subject=afteropening]{scrlttr2}     \usepackage[english]{babel}     \renewcommand*{\raggedsignature}{\raggedright}          \setkomavar{fromname}{Subham Soni.S}     \setkomavar{fromaddress}{6th Semester \\ B.Tech Computer Science and Engg. \\ Pondicherry Engineering College \\ Puducherry$-$605 014}     \setkomavar{signature}{\textsc{Subham Soni.S}}     \setkomavar{subject}{Request for grant of On$-$Duty regarding,}          \date{\today}     \begin{document}     \begin{letter}{Head of the Department \\ Computer Science and Engineering \\ Pondicherry Engineering College \\ Puducherry$-$605 014 }     \opening{Respected Sir,}     I Subham Soni.S of 6th semester pursuing my B.Tech degree in Computer Science and Engineering request you to grant me \emph{On$-$Duty} on 9-Jan-2014 and 10-Jan-2014 because I attended the National Workshop on Intelligent Information Retrieval(NWIIR) conducted by the Department.      \closing{Sincerely,}     \end{letter}     \end{document}![enter image description here][1]


title: Multiple bib references in the same footnote with the opcit package

text: I am new to LaTeX and I am hoping to use it in the field of the humanities. I have a problem when I try to add multiple bibliographic references in the same footnote using the opcit package. It seems to be working with one reference only. When I add two others `\cite{Gerbier2003,Parel1992,Gaille2003}` the result is an empty footnote. No error message appear in the console. I am using XeTeX with the polyglossia, fontspec and babelbib packages. Any idea of what could be the problem? Thank you.


title: Locking boxes vertical position

text: The `fbox`es and `section` titles generated with this code:               \documentclass{article}     \usepackage[left=6cm,right=6cm,top=3cm,bottom=3cm]{geometry}     \usepackage{blindtext}          \begin{document}          \vspace*{1cm}     \begin{flushright}     \fbox{\parbox[c][5.1cm][c]{0.5 \textwidth}{%     \emph{{{Some very smart quote weakly related to next section's content.}}\\\vspace{-0.6cm}     \begin{flushright}     \textbf{\emph{--- {Some Brilliant Author}}}     \end{flushright}     }}}     \end{flushright}     \vspace{0.2cm}     \section{This section is SHORT.}     \blindtext[1]          \clearpage     \vspace*{1cm}     \begin{flushright}     \fbox{\parbox[c][5.1cm][c]{0.5 \textwidth}{%     \emph{{{Some shorter quote.}}\\\vspace{-0.6cm}     \begin{flushright}     \textbf{\emph{--- {Some Brilliant Author}}}     \end{flushright}     }}}     \end{flushright}     \vspace{0.2cm}     \section{This section is LONG.}     \blindtext[3]          \end{document}      are in a slightly different position relative to the page if you zoom enough. My tests tell me it is due to the `\vspace`s (at least when I use the 0.2cm and the 1cm ones at the same time) so, is there any way to get that positioning while not making it an _adaptative_ element? My aim is to get every section title page the same appearance, with the title in the same vertical position (as when you have just the naked sections), and the quote box in the same position too. This layout is what made me wonder about this other problem.


title: Biblatex uses opening parenthesis as the initial with firstinits

text: Some authors use parentheses around a first name. When using biblatex with firstinits, that opening parenthesis ends up as being the "initial" used. Is there some way to make biblatex to use the actual initial instead (without removing the parenthesis in the bib file itself)? Test case:               \documentclass{article}     \usepackage[firstinits]{biblatex}     \addbibresource{test.bib}     \begin{document}     \textcite{gil}     \printbibliography     \end{document}      with test.bib:               @inproceedings{gil,       author =       {Joseph (Yossi) Gil and Tali Shragai},       title =        {Are We Ready for a Safer Construction Environment?},       year =         {2009},       booktitle =    {Proc. ECOOP 2009 European Conference on                       Object-Oriented Programming},       pages =        {495--519},       doi =          {10.1007/978-3-642-03013-0_23},       number =       {5653},       series =       {Lecture Notes in Computer Science},     }      In the resulting bibliography, the first author's name is rendered as `J. ( Gil`. I would like it to be `J. Y. Gil` or perhaps even `J. Gil`


title: How to overlay tikz matrix in beamer?

text: **Background:** I encounter some unexpected situations while overlaying a tikz `matrix` in Beamer. The latex code is given at the end ( _note:_ you can also read and copy it at ShareLatex:TikzMatrixOverlay). There are two tikz matrices and the first one without overlay is for comparison. The second matrix with overlay is not satisfying in the following ways: >   1. The `|[red]|` instruction for the (2,1) cell (second row, first column) > does not work; notice that the `|[red]|` instruction for the (3,2) cell does > work. >   2. I cannot replace the `\only<4>{4444 & 4444 & 4444} \\\` by > `\only<4>{4444 & 4444 & 4444 \\\\}`. Otherwise, I will get the `Missing > \endgroup inserted` error. >   3. If I use `\only<4>{4444 & 4444 & 4444} \\\` (as the source code > indicated), an extra empty cell (in the fourth row) is shown during the > overlay. > Notice that you can also see the comments in source code and the image below for the three problems. ![tikz-matrix- overlay](http://i.stack.imgur.com/cgGJB.png) **Problem:** Therefore, my problem is how to fix these three problems. Specifically, >   1. To enable the `|[red]|` instruction for the (2,1) cell; >   2. To eliminate the extra empty cell (in the fourth row) during the > overlay; >   3. To overlay the tikz matrix row by row. >               \documentclass{beamer}     \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{document}          \begin{frame}[fragile]{TikzMatrixOverlay}       \begin{tikzpicture}            % matrix without overlay for comparison       \matrix [align = center, matrix of nodes, nodes = {text width = 16mm, draw}]       {         1 & 1 & 1 \\         |[red]| 22 & 22 & 22 \\         333 & |[red]| 333 & 333 \\         4444 & 4444 & 4444 \\       };            % matrix with overlay       \matrix [align = center, xshift = 6.0cm, matrix of nodes, nodes = {text width = 16mm,   draw}]       {         1 & 1 & 1 \\         \only<2->{|[red]| 22 & 22 & 22 \\} % Problem 1: the |[red]| instruction does not work.         \only<3->{333 & |[red]| 333 & 333 \\} % this |[red]| instruction does work.         \only<4>{4444 & 4444 & 4444} \\   % Problem 2: it cannot be: \only<4>{4444 & 4444 &     4444 \\}       };       \end{tikzpicture}     \end{frame}          \end{document}


title: \index after mathmode

text: I want to create a range index for some part of my document. But when I do the following:               \documentclass{article}          \makeindex          \begin{document}              \index{test|(}         Some Text         \[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, \ldots \]         \index{test|)}              \paragraph{Test2:} More Text after too much space.          \end{document}      there is too much vertical space in front of the paragraph "Test2". I tried using `\leavevmode` or `\ignorespace` as recommended in » \index causing spurious whitespace « but that did not work. Please notice also that I'm putting this construction into an abstract environment definition, so the specifics of the section to be indexed or what comes after may change. So to make that clearer, the example above would take the form:               \documentclass{article}          \newenvironment{idx}[1]{%         \index{#1|(}%         \def\currentidx{#1}}%         {\index{\currentidx|)}}          \makeindex          \begin{document}              \begin{idx}{test}             Some Text             \[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, \ldots \]         \end{idx}              \paragraph{Test2:} More Text after too much space.          \end{document}


title: Custom \chapter definition

text: Can someone tell me why               \let\stdchapter\chapter     \renewcommand{\chapter}[1]{\stdchapter{#1}}      isn't safe to do? Nevermind why I'm asking, I have workarounds so this is more about LaTeX not behaving the way I thought it would. The `\let` command should backup the original `\chapter` definition as `\stdchapter`, and redefining `\chapter` to expand to `\stdchapter` should make it do exactly what it did in the first place. However, LaTeX fails to process my document if I make this change (error message: "`LaTeX Error: Something's wrong--perhaps a missing \item.`"). **UPDATE:** Here's minimal code needed to reproduce the problem:               \documentclass[a4paper]{report}     \usepackage[american]{babel}     \let\stdchapter\chapter     \renewcommand{\chapter}[1]{\stdchapter{#1}}     \begin{document}     \tableofcontents     \end{document}


title: Can I create one command for quoting?

text: I would like to get this result: ![enter image description here](http://i.stack.imgur.com/7PL58.png) I currently use this piece to get the result:               \glqq{\textit{Analysis II}}\grqq{}      Can I create a single command like the following to get the desired result?               \quoteitalic{Analysis II}