title: How do I vertically center a single cell within a table?

text: I can't find a way to vertically center a single line within a table cell. Take a look at this screenshoot: ![enter image description here](http://i.stack.imgur.com/0HxP8.png) I'd like to vertically center the text within the bottom right cell and I just can't find a way to do it. I tried `\usepackage{array}` but I couldn't figure out how to apply the `\centering\arraybackslash`, which seems to align things vertically within cells, just to this single cell. (I'm also not sure why the right border is missing for this cell.) Here is the LaTeX code that generates this table:               \documentclass{article}          \usepackage[left=1cm,top=1cm,right=1cm,bottom=1cm,nohead,nofoot]{geometry}          \usepackage[pdftex]{hyperref}     \usepackage{verbatim}     \usepackage{listings}     \usepackage{array}          \hypersetup{colorlinks}          \lstset{basicstyle=\ttfamily}          \pagestyle{empty}          % -----------------------------------------------------------------------          \begin{document}          \begin{tabular}{|p{5.5cm}|p{12.2cm}|}     \hline     \large\textbf{Redirection} & \large\textbf{Description} \\     \hline     \verb|> file| & Redirect standard output (stdout) to a file. \\     \hline     \verb|1> file| & Same as \verb|> file|. \verb|1| is the default file descriptor for stdout. \\     \hline     \verb|2> file| & Redirect standard error (stderr) to a file. \verb|2| is the default file descriptor for stderr. \\     \hline     \verb|>> file| & Append stdout to a file. \\     \hline     \verb|2>> file| & Append stderr to a file. \\     \hline     \verb|&> file| & Redirect stdout and stderr to a file. \\     \hline     \verb|>file 2>&1| & Another way to redirect both stdout and stderr to a file. This \textbf{is not} the same as \verb|2>&1 >file|. \textbf{Redirection order matters!} \\     \hline     \verb|> /dev/null| & Discard stdout. \\     \hline     \verb|2> /dev/null| & Discard stderr. \\     \hline     \verb|&> /dev/null| & Discard stdout and stderr. \\     \hline     \verb|< file| & Redirect the contents of the file to the stdin. \\     \hline     \verb|<< EOL| \\     \verb|foo| \\     \verb|bar| \\     \verb|baz| \\     \verb|EOL| & Redirect a bunch of lines to the stdin. \\     \hline     \end{tabular}          \end{document}


title: No pagebreaks between questions and answers

text: I'm working on a homework set, and one of my answers to a multi-part question has become very long. I've been keen on keeping problems and solutions as much on the same page as possible, and my current solution (of putting both the question and its solution in a `minipage`) turns out to be rather less than optimal, as it forces everything too strictly to be on the same page, and moves a question to its own page even when it's not strictly necessary. What I'd like is something like the following:               1. Question       a) Subquestion #1          Solution     ---page break here if necessary---       b) Subquestion #2          Solution     ---page break here if necessary---     2. Question     ...      I've been doing `minipage` around the whole question/subquestion/solution block, but this obviously forces everything onto the same page. I've played around with `samepage` and `nobreak` and `nopagebreak` and even putting each individual block described above in its own `minipage`, which seems to really mess up enumeration and all sorts of spacing. `nopagebreak` seems to not want to work at all for some reason for me. What's a good way to a do this? Thanks in advance, and please let me know if I've been vague at all.


title: TeXLive - no  latex binary after installation

text: I have installed TeXLive 2012 on Ubuntu 12.04 via `install-tl` and chose a minimal set of packages, so that I could later `tlmgr install ...` everything I would need with dependencies automatically resolved. During installation I chose a subdirectory of the `home` directory (user install) and not `/usr/...` After installation I've updated the path env. var. so the command `tlmgr` works, however `latex` or `pdflatex` commands don't exist. I've tried `tlmgr install latex` and it downloaded and installed some 3 packages, but still no `latex` command in bash (other tex binaries like `bibtex` exist in `/texlive/bin/i386-linux/`, but no `latex`).


title: Acronyms in upper/lower case

text: > **Possible Duplicate:**   >  How to render individual acronyms in lower case when used inline, but mixed > case in the list of acronyms? I'm using the acronym package. When I use an acronym in full, I want it to be all lower case; and when used in the acronym list I want the first letter of each word to be capitalised. For example, in text: > Lorem ipsum dolor sit amet, voltage controlled oscillator (VCO), sed do > eiusmod tempor... In acronym list: > VCO - Voltage Controlled Oscillator I copied the code fragment from this issue which is similar to give the acronym in lower case in text. However, it only capitalises the first letter of the first word i.e. VCO - Voltage controlled oscillator. In addition, some of my acronyms are hyphenated and need capitalisation such as Phase-Locked Loop; and some are hyphenated but do not require capitalisation such as Analog-to-Digital Converter. Therefore, what I'm thinking is that I should write the acronym definition list how I want it (i.e. capitals, hyphens etc), and then have a code fragment that parses the acro-definitions and makes them words lower case. But I don't know how to do that or its even possible. My preamble is:               \usepackage[printonlyused]{acronym}          \usepackage{regexpatch}     \makeatletter     \xpatchcmd*{\AC@@acro}{] #3}{] \MakeUppercase #3}{}{}     \makeatother          \makeindex      Note, the acronyms are defined in a separate file that is then included in the frontmatter section:               \input{./Frontmatter/acronyms}          % Print the acronyms page      And within that, the acronym is simply defined using:               \begin{acronym}     \acro{vco}[VCO]{voltage controlled oscillator}     \end{acronym}


title: pgfplots - How to draw zero line for y (from xmin to xmax) when one uses symbolic x coords?

text: Based on the code provided by Jake:               \draw[very thin] (axis cs:\pgfkeysvalueof{/pgfplots/xmin},0) -- (axis cs:\pgfkeysvalueof{/pgfplots/xmax},0);      I am drawing a zero line for y-values for bar plots. Yet it does not work if one uses `symbolic x coords=...`. One could write `\draw[very thin] (axis cs:Fx,0) -- (axis cs:Fz,0);`, but this does not suffice. Using `Fx.west` or `Fx.left` does not work. ## MWE               \documentclass[     a4paper     ]{scrartcl}          \usepackage{     amsmath,     tikz,     pgfplots,     pgfplotstable     }          \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \begin{filecontents}{force-stats.txt}     Stats,Min,MinStdDev,MinCIP95,Max,MaxStdDev,MaxCIP95     Fx,-70.35,0.5,0.6,60,1,0.5     Fy,-40,0.5,0.6,50,1.91,1.5     Fz,-20,0.42,0.6,40,4,0.5     \end{filecontents}          \pgfplotstableread[col sep=comma]{force-stats.txt}{\tableabcdef}          \begin{document}     \begin{center}     \begin{tikzpicture}[font=\small]     \begin{axis}[     scale only axis=true,     width=5cm,     height=7cm,     %     xlabel={Force components},     ylabel={Force in N},     %     ybar,     %     xmajorgrids=true,     ymajorgrids=true,     %     enlarge x limits={0.3},     enlarge y limits={0.2},     %     symbolic x coords={Fx,Fy,Fz},     %     xtick=data,     nodes near coords,     xticklabels={{\(F_{x}\)},{\(F_{y}\)},{\(F_{z}\)}},     ]     %the following line will not work     %\draw[very thin] (axis cs:\pgfkeysvalueof{/pgfplots/xmin},0) -- (axis cs:\pgfkeysvalueof{/pgfplots/xmax},0);     \addplot+[nodes near coords align={above}] plot [error bars/.cd, y dir=both, y explicit] table [col sep=comma, x=Stats, y=Max, y error=MinCIP95] {\tableabcdef};     \addplot+[nodes near coords align={below}] plot [error bars/.cd, y dir=both, y explicit] table [col sep=comma, x=Stats, y=Min, y error=MinCIP95] {\tableabcdef};     \end{axis}     \end{tikzpicture}     \end{center}     \end{document}


title: Why should \lst@definelanguage be preferred over \lstdefinelanguage in a style file?

text: The `listings` manual (v1.5b, subsection 4.18) recommends using `\lst@definelanguage` instead of `\lstdefinelanguage` in a style file: > Where should I put my language definition? If you need the language for one > particular document, put it into the preamble of that document. Otherwise > create the local file `lstlang0.sty` or add the definition to that file, but > use `\lst@definelanguage` instead of `\lstdefinelanguage`. [...] However, I can't find a reason for this distinction between `\lst@definelanguage` and `\lstdefinelanguage` in either the manual or the developer guide. Is the distinction important? You may be wondering why I'm asking this question... Well, I've managed to get everything working in my style file using `\lstdefinelanguage`. That said, I'd like to follow the guidelines laid out in the `listings` documentation as closely as possible. However, if I simply substitute `\lst@definelanguage` for `\lstdefinelanguage`, I run into problems. Here is an MWE:               \documentclass{article}          \usepackage{filecontents}          % --- generate the style file ---     \begin{filecontents*}{mystyle.sty}     \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{mystyle}          \DeclareOption*{\OptionNotUsed}       \ProcessOptions\relax          \RequirePackage{listings}          \def\mylanguage{Mylanguage}     \expandafter\expandafter\expandafter\lstdefinelanguage%     \expandafter{\mylanguage}{keywords={foo}}          \endinput     \end{filecontents*}     % --- end of style file ---          \usepackage{mystyle}          \begin{document}     \begin{lstlisting}[language=Mylanguage]     foo bar baz     \end{lstlisting}          \end{document}      Everything is hunky-dory with the code above, but if I simply replace `\lstdefinelanguage` by `\lst@definelanguage`, the `listings` packages throws two errors:               Couldn't load requested language.      and               language mylanguage undefined.      This seems to contradict the manual's claim that `\lstdefinelanguage` and `\lst@definelanguage` have the same syntax; at least, based on my simple test, they don't seem equivalent when in comes to expansion of their first argument. Should I use `\lst@definelanguage` instead of `\lstdefinelanguage` and how can I get the former to work in my MWE?


title: cleveref & varioref : Missing \endcsname inserted

text: I read the excellent question Difference between ref, varioref and cleveref. Decision for a thesis and various doc on the net (the varioref package documentation) and tried to use it... but with many errors An exemple :               \documentclass{article}     \usepackage[a4paper]{geometry}     \geometry{top=25mm,bottom=25mm,inner=25mm,outer=20mm,,marginparwidth=1cm,marginparsep=10pt}          \usepackage[ansinew]{inputenc}     \usepackage[french]{babel}     \usepackage[lmodern]     \usepackage[T1]{fontenc}     \usepackage{microtype}          \usepackage{color,xcolor}               \ifpdf%             \usepackage[pdftex,pagebackref=true,hyperindex=true,colorlinks=true]{hyperref}             \hypersetup{pdfstartview={FitH}, bookmarksnumbered={true}}     \else%             \usepackage[hypertex=true,hyperindex=true,colorlinks=false]{hyperref}     \fi          \usepackage{cleveref}     \usepackage{varioref}           \usepackage{lipsum}               \begin{document}     \section{Bla bla}\label{sec:bla}     \lipsum[1]          \newpage     \section{Second bla bla}     Test section 1 :      \begin{itemize}         \item with \verb"\ref" : \ref{sec:bla}         \item with \verb"\vref" : \vref{sec:bla}               = error "!Missing \verb"\endcsname" inserted"          \item with \verb"\cref" : \cref{sec:bla}               = error "!Missing \verb"\endcsname" inserted"            \end{itemize}          \newpage      \section{Third bla bla}     Test section 1 :      \begin{itemize}         \item with \verb"\ref" : \ref{sec:bla}         \item with \verb"\vref" : \vref{sec:bla}               = error "!Missing \verb"\endcsname" inserted"          \item with \verb"\cref" : \cref{sec:bla}               = error "!Missing \verb"\endcsname" inserted"            \end{itemize}     \end{document}      I get the error `!Missing \endcsname inserted` and more other after... (same error with vref as for cref. How is it possible to resolve this ? I don't find an answer on this forum nor on the net. I will use those packages (`vref` and `cref`) for my customized environnements, for exemple with such a macro-box :               \newtheorem{theoreme}{{\sffamily Théorème}}[section]          \newcommand{\boxthm}[2]     {{\colorbox{yellow}{\begin{minipage}{0.98\linewidth}           \begin{theoreme}\label{thm:#1}             {\sffamily ~\\#2}           \end{theoreme}     \end{minipage}}}\\~}      I presume that if I can resolve the problem for a section, I also get the tip for all my macro-boxes (thm, definitions, algorithms, lemma, examples, ...) ?


title: How to place multiple figures at the left and caption at the RHS

text: Please correct my code so that I can get the figures at the left side and caption at the right side.                  \documentclass{article}         \usepackage{float,subfigure}             \usepackage[demo]{graphicx}             \usepackage{sidecap}          \begin{document}         \begin{figure}[b]         \sidecaption         \begin{subfigure}             \includegraphics[width=7cm,height=2.5cm]{n1.eps}\\               \includegraphics[width=7cm,height=2.5cm]{n2.eps}\\                \includegraphics[width=7cm,height=2.5cm]{n3.eps}         \end{subfigure}                 \caption{\small (Color online) Graphical illustration for $\rho =0.2$.}                 \label{fig:1}         \end{figure}         \end{document}


title: Append character at autobreaks in listing

text: I'm writing a LaTeX document for a hands-on workshop which uses shell/bash commands. I'm making use of the `listings` package to format the chunks of code. Some of the commands are rather long so I'm making use of `breaklines` and `breakatwhitespace`. Here's my MWC:               \documentclass{book}          \usepackage{listings}     \usepackage{color}     \usepackage{xcolor}          \definecolor{darkgreen}{rgb}{0,0.9,0}          \lstset{%         columns=fullflexible,         aboveskip=5pt,         belowskip=10pt,         basicstyle=\small\ttfamily,         numbers=left,         numberstyle=\tiny\color{black!85},         stepnumber=1,          numbersep=13pt,         backgroundcolor=\color{black!5},         showspaces=false,         showstringspaces=false,         showtabs=false,         xleftmargin=20pt,         xrightmargin=10pt,         framesep=5pt,         framerule=3pt,         frame=leftline,         rulecolor=\color{darkgreen},         tabsize=2,         breaklines=true,         breakatwhitespace=true,     }          \begin{document}          \begin{lstlisting}     cd ~/     time velveth run_25 25 -fmtAuto -create_binary -shortPaired -separate SRR022863_1.fastq.gz SRR022863_1.fastq.gz -shortPaired2 -separate SRR022852_1.fastq.gz SRR022852_2.fastq.gz     time velvetg run_25     \end{lstlisting}          \end{document}      This is displayed as: ![Current Styling](http://i.stack.imgur.com/gd5IH.png) However, I'd like to the listing to include a line continuation character (`\`) at the ends of autobroken lines. Is there a way that listing can do this? This is what I'd like the listing to look like (with or without line numbers on the indented lines) without explicitly putting in the backslash: ![Required Styling](http://i.stack.imgur.com/qECco.png)


title: Tex4ht under MiKTeX: How to convert multiple tex files

text: I'm using MiKTeX 2.9 and installed the miktex-tex4ht-base2.9 in order to convert my LaTeX files into HTML. I just updated everything before starting so I should have the latest packages for everything. I am also using Windows 7. My LaTeX file contains other LaTeX files via the `\include` command. It is a book with chapters that are stored in a separate folder with their own tex files. For example, I have Main.tex with Chapter1.tex, Chapter2.tex... and so forth which are included in the whole document using `\include`. Is it possible to call `htlatex Main.tex` and it will compile all the required files or is there some step by step procedure to do each file? When I tried it, I got 100s of errors (pdflatex compiles without any errors and I have an output pdf file, htlatex even worked on a simple single file so I know htlatex is working properly). I would have pasted the errors but there are just so many and most of them relate to missing curly brackets for a section or missing an `end{document}` which is why I am thinking it has something to do with the `\include` command. I have pasted below some errors,               ?     ! Extra }, or forgotten \endgroup.     l.22 ...lax }}\par \let \reserved@d =*\def \par }}                                                       {section.1}{}}     ?     ! Extra }, or forgotten \endgroup.     l.22 ...t \reserved@d =*\def \par }}{section.1}{}}      Below is the first error I recieve after running `htlatex Main.tex`               ! Undefined control sequence.     <argument> )Qfigure.\theHfigure          l.40 \:CrossWord{)Qfigure.\theHfigure }{1}{5}                                                  %      This is the main.tex file,               \documentclass[11pt,a4paper,oneside]{article}          \usepackage{hyperref}     \usepackage[all]{hypcap}    %for going to the top of an image when a figure reference is clicked     \usepackage{draftwatermark}     \usepackage{url}          \usepackage{fullpage}          \SetWatermarkText{INTERNAL}     \SetWatermarkFontSize{5cm}     \SetWatermarkScale{4.5}     \SetWatermarkLightness{0.9}          %For toggling between print pdf and electronic pdf     %change the reference style.     \newif\ifelectronic          %\electronicfalse     \electronictrue          \ifelectronic     \newcommand{\xyzref}[1]{\nameref{#1}}     \else     \newcommand{\xyzref}[1]{\ref{#1}}     \fi          %For switching between stand alone APPlication and plugin     \newif\ifapp          %\apptrue     \appfalse          %to NOT print the subsection numbers in the table of contents     \newcounter{sectocnonumdepth}     \setcounter{sectocnonumdepth}{2}          \renewcommand{\familydefault}{\sfdefault}          \hypersetup{colorlinks=true}          \usepackage{listings}          \begin{document}          \ifapp         \title{\textbf{XYZ Quick Start} \\ (For stand-alone application users)}     \else         \title{\textbf{XYZ Plug-in Quick Start} \\ (For Plug-in users)}     \fi          \author{Company XYZ}     \maketitle          \tableofcontents          \input{Chapters/Chap1}     \input{Chapters/Chap2}     \input{Chapters/Chap3}     \input{Chapters/Chap4}          \end{document}      Below is a sample chapter,               \section{Creating a New Project}     \label{sec:newProject}          %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~          \begin{enumerate}     \item Go to `File' menu.     \item Select `New'.          \ifapp  %if its the standalone          \item And click the XYZ Project option. Note: If you do not see this option then check whether you are in the XYZ perspective via Window$\rightarrow$Open Perspective.          \else %if its plugin          \item Select `Project...'.     \item A New Project dialog will open which will ask you to select a project wizard\index{Wizard}. Choose the XYZ project under the XYZ category (see figure \ref{fig:XYZWizard}) and then click `Next'.     \begin{figure}[hp]         \centering             \includegraphics[width=0.50\textwidth]{Images/XYZWizard.PNG}         \caption{Eclipse New Project Dialog}         \label{fig:XYZWizard}     \end{figure}          \fi          \item Give the project a name. You can either choose the default workspace location, or browse for another location. The Mod-Dat-Run style folder structure just creates the three respective folders in your project, if you check it (figure \ref{fig:XYZWizard2}); You can always create the folders later. These folders are independent of the files you put in them.     \begin{figure}[hp]         \centering             \includegraphics[width=0.50\textwidth]{Images/XYZWizard2.PNG}         \caption{XYZ New Project Wizard Dialog}         \label{fig:XYZWizard2}     \end{figure}          \ifapp          \else     \item After clicking `Finish', Eclipse will ask you if you want to change to the XYZ perspective, click yes.          \fi          \item The project has been created and you will be able to see it in the Project Explorer.          \end{enumerate}


title: Asana Math + XeLaTeX: missing math upon resaving or editing in Adobe Acrobat Pro

text: Related to this question: Asana-math + LuaTeX : missing greeks/arrows I experienced similar problems with a PDF produced by XeLaTeX (v0.9998) with MiKTeX 2.9 and Adobe Acrobat Pro IX or XI: The PDF produced by XeLaTeX and opened in Adobe Acrobat looks good and all fonts are embedded including Asana Math. However, after saving with another name or after editing (for example, extracting pages), a lot of Asana Math is replaced by questionmark symbols. The only solution that worked so far is replacing Asana Math by XITS Math. PS. I was not sure to post this as a new question or an answer to the question mentioned above. It was assumed in Asana-math + LuaTeX : missing greeks/arrows that this is a bug in Adobe. If so, the issue has not been solved, even when using the newest versions of Adobe Acrobat, MiKTeX and XeLaTeX.


title: Change border color of a  \boxed equation?

text: I recently asked this question. The solution worked for me but I have a problem. cropped images are as small as possible. I would like to have a gif that bounds to borders of `box` of the equation. so I add `\boxed` to all my equations. Now sizes are good but I don't know how do I remove black borders around equation. Probably changing its color to white will help. [?]


title: Multiple holes in arrows in xypic

text: I am trying to make a diagram where two arrows will be crossing one arrow. I have the current code for putting in one hole:                \Omega \ar[r]|(.35)\hole^-{d} \ar[d]^-{e_*}      which seems to work just fine. But I can't quite seem to find a way to put in multiple holes using this command, and I haven't been able to figure out the (seemingly) more complicated approach using "Paths". What can I do? Thanks! Edit: I also need to be able to position the hole where I need it, because the arrows passing through are curved and coming from the same source. Here is the code so far:               $\xymatrix@R=1.25cm@C=1cm{     \cdots \ar[r]& \Omega_c^{k-1}(\bbR^n\times\bbR)\ar[r]^-{d} \ar[d]^-{\pi_*} \ar @/_15pt/ [ddl]_(.25)K \ar @/_35pt/ [dd]_(.7){\id} & \Omega_c^{k}(\bbR^n\times\bbR)\ar[r]^-{d} \ar[d]^-{\pi_*} \ar @/_10pt/ [ddl]_(.25)K \ar @/_35pt/ [dd]_(.7){\id}& \Omega_c^{k+1}(\bbR^n\times\bbR)\ar[r]^-{d} \ar[d]^-{\pi_*} \ar @/_10pt/ [ddl]_(.25)K \ar @/_35pt/ [dd]_(.7){\id}& \cdots \\     \cdots \ar[r]|(.5)\hole& \Omega_c^{k-2}(\bbR^n)\ar[r]|(.35)\hole^-{d} \ar[d]^-{e_*} & \Omega_c^{k-1}(\bbR^n)\ar[r]|(.35)\hole^-{d} \ar[d]^-{e_*}& \Omega_c^{k}(\bbR^n)\ar[r]^-{d} \ar[d]^-{e_*}& \cdots \\     \cdots \ar[r]& \Omega_c^{k-1}(\bbR^n\times\bbR)\ar[r]^-{d} & \Omega_c^{k}(\bbR^n\times\bbR)\ar[r]^-{d} & \Omega_c^{k+1}(\bbR^n\times\bbR)\ar[r]^-{d} & \cdots     }$


title: Update failure, failure to compile and now unable to remove

text: I use MiKTeX 2.9 along with LyX in Windows 7. Last week I downloaded and updated LyX and it worked fine. After that I tried to update MiKTeX, but it failed or was not properly completed. Since then LyX can't compile documents in PDF. Specifically, when I try to compile a document, after several minutes LyX generates a message that reads > The command pdflatex 'document name' has not yet completed. Do you want to > stop it? Two options are offered, "Stop it" and "Let it run". When I choose "Let it run", exactly the same message is generated after a while. When I choose "Stop it", it generates the following message: > File does not exist: `C:\Users\choix129\AppData\Local\Temp\lyx_tmpbuf0\file > name.pdf` So I thought I'd rather uninstall the MiKTeX from the computer and reinstall it completely. Then I went to the control panel and chose MiKTeX 2.9. Then I encounter a message: > Windows API error 2: The system cannot find the file specified. Once I click "OK", then I find a message suggesting > This program might not have uninstalled correctly. If this program didn't > uninstall correctly, try uninstalling using settings that are compatible > with this version of Windows. So I click the option "Uninstall using recommended setting" but then it doesn't generate any more feedback. So I find myself badly stuck. Could any of you please help me out? Any comments would be greatly appreciated. Thank you in advance.


title: How do you count number of word occurrences?

text: How do you count the number of word occurrences in your tex files? The reason I do this is to easier recognize words I use too much in a text. At the moment I use the following one-liner in the bash.               cat *.tex | sed 's/[[:space:]|[:punct:]]\+/\n/g' | sort | uniq -c | sort -n      What it does is, output all .tex-Files with `cat`, substitute the whitespaces and punctuations with a line-break using `sed`, `sort` the output, count the unique words and `sort` it again after the number output by `uniq -c`. One of the problems I have with that approach is, that words that belong together but are divided by a whitespace are counted separately. So for example "New York" you get k occurrences of New and n occurrences of York, mixing with other occurrences of New and York. **EDIT:** Another problem is of course, how do you recognize word inflection such as declension and conjugation? But that's probably something way out of scope of a one-liner, or does anyone have an idea how to cope with that? **EDIT2:** As Hendrik and Joseph pointed out, that's not really TeX-related, but perhaps somebody finds it useful :)


title: Proper way to quote verses before a section

text: I'm typesetting a book which — sometimes — has quoted verses in the beginning of sections. My first idea was to use something like `epigraph` to quote them, but then there's some very long quotes (up to 2 big paragraphs). What would you recommend doing to get something quite homogenous between sections with only a single verse, and sections with 2 big paragraphs? Edit: I've found a solution that is not too ugly (but I'd like an honest opinion):                 \begin{multicols}{2}       \epigraphsize       Élisabeth fut remplie d’Esprit Saint et s’écria d’une voix forte: Tu es bénie entre les femmes, et le fruit de ton sein est béni. Comment m’est  -il accordé que la mère de mon Seigneur vienne chez moi? Car voici: aussitôt que la voix de ta salutation a frappé mes oreilles, l’enfant a tre  ssailli d’allégresse dans mon sein. Heureuse celle qui a cru à l’accomplissement de ce qui lui a été dit de la part du Seigneur.            Et Marie dit: Mon âme exalte le Seigneur et mon esprit a de l’allégresse en Dieu, mon Sauveur, parce qu’il a jeté les yeux sur la bassesse de s  a servante.       Car voici: désormais toutes les générations me diront bienheureuse.       Parce que le Tout-Puissant a fait pour moi de grandes choses. Son nom est saint, et sa miséricorde s’étend d’âge en âge sur ceux qui le craigne  nt Il a déployé la force de son bras; Il a dispersé ceux qui avaient dans le coeur des pensées orgueilleuses, Il a fait descendre les puissants   de leurs trônes, élevé les humbles, rassasié de biens les affamés, renvoyé à vide les riches. Il a secouru Israël, son serviteur, et s’est sou  venu de sa miséricorde, — comme il l’avait dit à nos pères —, envers Abraham et sa descendance pour toujours.             \rule[.5ex]{\epigraphwidth}{\epigraphrule}            \raggedleft{\ibibleverse{Lc}(1:41-55)}       \end{multicols}      It kind of emulates `epigraph` but it typesets the text on two columns on the whole width of the page: ![The current state of things](http://i.stack.imgur.com/FUILu.png) In comparison, short quotes typeset with `epigraph` render like this: ![Simple epigraph](http://i.stack.imgur.com/MnKaE.png)


title: automatic generation of list of tables in book/report writing

text: I am writing a thesis using document class -book. The list of table is not generated automatically like the list of figure and table of contents. Please help me out.


title: XeTeX compiling

text: How can I create a PDF file from .tex file using `xetex.exe`? What should I enter to console? I tried different combinations like `xetex -pdf filepath` and so but it doesn't work.


title: Width of nested tabularx environments

text: I am trying to create a RPG "character sheet" using LaTeX. For those unfamiliar with the madness of nested boxes, underlined whitespace etc. involved, this here gives a good impression (except that I want mine to look better, of course. ;-) ) I started with a `\begin{tabularx{\textwidth}}{|X|X|X|}`, and tried to nest `tabular` and `tabularx` ennvironments in that, intending to use `\hrulefill` to get the underlines. The problem is, I'd like to make the nested tables as wide as the enclosing table cell allows, but don't know how to get to that value. `0.33\textwidth` is only a rough guesstimate, and does not take into account cell padding and the like. After looking at the `tabularx` documentation, I tried `\TX@cell@width`, but that gave me an error ("undefined control sequence"). Is there a way to get a value like `\cellwidth` or something, for the width definition of a nested `tabularx`? Or a package specialized for this kind of work? (I tried the MiKTeX package manager looking for something like it, but came up empty.) **Edit:** Ups... forgot the MWE...               \documentclass{scrbook}          \usepackage{tabularx}          \begin{document}          \begin{tabularx}{\textwidth}{|X|X|X|}     \hline     { \begin{tabularx}{\TX@col@width}{lX}  %% <-- this does *not* work...     Name: & \hrulefill\\     Race: & \hrulefill\\     Profession: & \hrulefill\\     \end{tabularx} } &     \Large\textbf{Character Sheet} &     Empty so far\\     \hline     \end{tabularx}     \end{document}


title: Alignment accross multiple arrays/vectors

text: I want to align multiple vectors (horizontal arrays), each on a separate line. Specifically, some values are negative and some positive, and some have a decimal part and some not. I want to align everything (i.e. values 1st value of all arrays etc) at the decimal place, like this:                ab=[-0.1  3    2.4]       xyz=[ 3   -2.7 -2  ]        I have almost achieved this using a single large matrix, with each row containing one vector. Aligning at the decimal point was initially manual, by breaking up each number into the integer and decimal part and putting each in a separate column, but then I found about the dcolumn package that makes it much easier. However, since I am using one big array to ensure correct horizontal alignement across multiple lines, I cannot have a \left[ part in one column and a \right] in another. The result is that the brackets are input just by '[' and ']' and are a bit small, rather that being automatically enlarged. I would like to know if there is any other way to force the same horizontal alignment on multiple arrays (within the same 'align' block if required) without using one big matrix. Maybe some way to nest matrices? I have though about using tabular or tabularx for each vector and set the same column widths on all of them. While this would align the start and end of the vectors, I am 99% certain the values of each column would not be aligned. Otherwise, some way to have a '\left[ ...\right]' block span multiple columns of an array would be usefull. Thanks in advance


title: Use of marginpar: problems with Underfull \hbox

text: I'm using the latex commnad `\marginpar{}`, however for some reason I get the warning:               Underfull \hbox <badness 10000> in paragraph ...         each time I create a comment on the margin. Is there any way to avoid this? This is how I use `\marginpar{}`:               \setlength{\marginparwidth}{1.2in}     \let\oldmarginpar\marginpar\reversemarginpar      \renewcommand\marginpar[1]{\-\oldmarginpar[\footnotesize #1]  {\raggedright\footnotesize #1}}      How could I modify the above? I read that `\makebox[0pt]{}` might help - but don't understand how?


title: Making one PDF file from multiple PDFs or Tex?

text: I am creating a lab manual that contains a dozen or so different labs. I want to create each lab as their own compilable standalone document and in a main.tex file I would like to put them all in order. I have looked into the `\input`, `\include`, and `\import` commands. `\input` is clearly not what I want. `\include` has not worked for reasons about preamble commands located not in the preamble. The answer may be in `\impor`t somewhere and I don't know how to use it. (It would be great if someone could show me.) Also I could combine the PDFs with a shell script but if that is the answer I am not sure how to combine the PDFs.


title: Problem with nesting environments

text: I have a problem with nesting environments. I have created a MWE for this. I have environment {env1} which I want to contain environments {env2} and {env3} in the following way. What's wrong with the following code?               \documentclass{article}          \newenvironment{env1}{}{}     \newenvironment{env2}{}{}     \newenvironment{env3}{}{}          \newenvironment{test1}%     {\begin{env1} \begin{env2}}%     {\end{env2}}          \newenvironment{test2}%     {\begin{env3}}%     {\end{env3} \end{env1}}               \begin{document}              \begin{test1}             This is test1         \end{test1}              \begin{test2}             This is test2         \end{test2}          \end{document}      **Edit:** It seems that in order to solve this problem I need to give the details of my lengthy code... (wanted to avoid it because of the length) So here it is: I tried to apply Patrick's patch, as it looked closest to what I wanted. Unfortunately it doesn't work. In my code, env1=block, env2=exercise*, env3=solution*, test1=exercise, test2=solution. The "exercise" and "solution" macros are designed to ease writing when the block of exercises consists of only 1 exercise and 1 solution, and it automatically build the block around the exercise* and solution*.               \documentclass{article}     \usepackage{color}          \newcommand{\thickline}{\noindent\textcolor{blue}{\rule{\textwidth}{5pt}}}          \newenvironment{block}     {\bigskip\par\thickline\nopagebreak\par%     \begin{minipage}{\dimexpr\textwidth-\parindent\relax}\small}     {\end{minipage}\par\smallskip\nopagebreak\thickline\bigskip}          \newenvironment{exercise*}[1]     {\medskip\smallskip\par\noindent\textbf{Exercise (#1):}}     {\bigskip}          \newenvironment{solution*}     {\par\noindent\textbf{Solution:}}     {\medskip\smallskip}          %***Patrick's solution:*** (doesn't seem to work, see below)     \newenvironment{exercise}[1]%         {\csname block\endcsname \begin{exercise*}{#1}}%         {\end{exercise*}}          \newenvironment{solution}%     {\begin{solution*}}%     {\end{solution*} \csname endblock\endcsname}     %**************          \begin{document}     %This works. (using the 3 environments)         \begin{block}             \begin{exercise*}{hmmm}                 First exercise             \end{exercise*}                  \begin{solution*}                 First Solution             \end{solution*}         \end{block}              %This doesn't work (Patrick's definitions with csname):         \begin{exercise}{hmmm}             exercise         \end{exercise}              \begin{solution}             solution         \end{solution}         %************          \end{document}      **Edit 2** In case the block consists of more than one exercise, I want them to be separated by a thin line, defined by               \newcommand{\thinline}{\noindent\textcolor{red}{\rule{\textwidth}{2pt}}}      and the thick lines would come at the beginning and end of the block. So if there are 2 exercises in the block, for example, it would look like: \thickline **Exercise (First exercise):** This is exercise 1 **Solution:** Solution 1 \thinline **Exercise (Second exercise):** This is exercise 2 **Solution:** Solution 2 \thickline


title: Palatino fonts and the number 713

text: I have some trouble using Palatino fonts (psnfss2e distribution} for numerals in text and tables. I load the package as `\usepackage[sc,osf]{mathpazo}` which sets the font to   oldstyle numerals in text and small caps. The oldstyle numerals look good with text having the letters match the lowercase characters. However, in tables they don't look very good. How can I apply a different font as a default for tables? What would be a suitable font to match? The font also looks particularly ugly (the seven and one seem to have been designed by a different person!) as you can see in the image below. Is there a way to apply a different font to all numbers, but keep the font for characters only? ![alt text](http://i.stack.imgur.com/oAVyn.png) Below is a minimal with different font samples for convenience.               \documentclass[11pt]{article}      \usepackage{graphicx}      %\usepackage{mathptmx,courier}     \usepackage[scaled=0.92]{helvet}     \usepackage[sc,osf]{mathpazo}     \normalfont     \usepackage{pifont,tabularx,varioref,url}     \usepackage[T1]{fontenc}     \usepackage{textcomp}     \usepackage{ragged2e}     \newif\ifutopia     \utopiatrue      \newlength{\rightwidth}        \rightwidth=10cm     \newlength{\leftwidth}       \leftwidth=\textwidth       \addtolength{\leftwidth}{-\rightwidth}       \addtolength{\leftwidth}{-1em} % ?     \newcommand{\sample}[5]{%       \parbox[b]{\leftwidth}{%         {\raggedright\footnotesize         #1\\         #3/#4\par}}       \hfill       \parbox[t]{\rightwidth}{       {\fontfamily{#2}\fontsize{#3}{#4}\selectfont #5         \scalebox{5}{fonj 713} \begin{tabular}{l}\Large \MakeUppercase{fontj 713} fontj 713\end{tabular}       \par}}       \medskip}     \begin{document}     \sample{Times scale5x}{ptm}{10}{12pt}{}          \sample{Palatino pplj scale 5x}{pplj}{10}{12.4pt}{}          \sample{Bookman scale 5x}{pbk}{9.6}{11.5pt}{}          \sample{Charter scale 5x}{bch}{10}{12.4pt}{}          \sample{New Century Schoolbook scale5x}{pnc}{9.6}{12pt}{}          \ifutopia       \sample{Utopia scale 5x}{put}{9.6}{12pt}{}     \fi          \sample{Helvetica scale 5x}{phv}{10}{12pt}{}     \end{document}


title: Creating TikZ Node Using Macro

text: I'm trying to create a linked list using TikZ. I currently have this:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{chains,shapes}          \newcommand{chainlabel}[2]{\path [<-, draw, shorten >=10pt] #1 |- node [at end] {#2} ++(-1,1);}          \begin{document}     \begin{tikzpicture}[every node/.style={rectangle split, rectangle split parts=2, rectangle split horizontal}, node distance=1em, start chain,       every join/.style={->, shorten <=-4.5pt}]           \node[draw, on chain, join] { 1  };      \node[draw, on chain, join] { 7  };      \node[draw, on chain, join] { 5  };      \node[draw, on chain, join] { 2  };      \node[draw, on chain, join] {};           \chainlabel{chain-1.one north}{head};     \end{tikzpicture}                 \end{document}      The problem is with the `chainlabel` command. I'm getting all kinds of errors about missing control sequences. I have read somewhere that there needs to be some sort of `expandafter` somewhere but I'm not sure how to work with it. p.s. The idea behind chainlabel is that we can pass a coordinate to the command and a label and it will label the node with the provided text.


title: TikZ: Can't crop the bounding box

text: I've written this code for TikZ to make a sketch of the Stern Gerlach experiment. Since the weight of the image is determined by the drawing itself and not by the annotations (the nodes), I thought I could use `[use as bounding box]` so that the `\centering` command will center the main body of my drawing instead of the drawing and all it's annotations. (I want the nodes to be ignored when centering) I've drawn a box around what I would like to see centered and I used the `[use as bounding box]` command to make sure this will be the bounding box. Something is amiss it seems as the figure is still centered considering the nodes. This is very frustrating, since I've tried out the `[use as bounding box]` command in a much simpler drawing to see if it actually works (and it does!). here's my code:                \documentclass[a4paper]{article}           \usepackage{tikz}      \usepackage{tikz-3dplot}           \tikzset{       vlak/.style={fill=lightgray!80,draw=none,opacity=1},       obj/.style={fill=lightgray,draw=none},       opp/.style={fill=lightgray,opacity=0.6,draw=none},       rand/.style={thick,draw=gray},       vector/.style={>=stealth',draw=black,line width=0.55pt}       }                     \begin{document}           \tdplotsetmaincoords{75}{140}           \begin{figure}[htp]      \centering      \begin{tikzpicture}[tdplot_main_coords,scale=0.7]       \newcommand{\nodin}[1]{coordinate(#1)node{#1}}%draw nodes on coordinates, I alter                                                                   %this later to hide the nodes                 \draw[vlak,rand](0,-2,0)--(0,2,0)\nodin{A}--(0,2,2)\nodin{B}--(0,1,2)\nodin{C}--(0,1,1)\nodin{Q}--(0,-1,1)\nodin{D}--(0,-1,2)\nodin{E}--(0,-2,2)\nodin{F}--cycle;            \draw[vlak,rand](F)++(-6,0,0)--(F)--(E)--++(-6,0,0)--cycle;       \draw[vlak,rand](D)++(-6,0,0)--(D)--(E)--++(-6,0,0)--cycle;            \draw[vlak,rand](0,-1,3)--(0,0,2)\nodin{G}--(0,1,3)\nodin{H}--(0,1,4)\nodin{I}--(0,-1,4)\nodin{J}--cycle;       \draw[vlak,rand](G)++(-6,0,0)--(G)--(H)--++(-6,0,0)--cycle;       \draw[vlak,rand](H)++(-6,0,0)--(H)--(I)--++(-6,0,0)--cycle;       \draw[vlak,rand](J)++(-6,0,0)--(J)--(I)--++(-6,0,0)--cycle;       \draw[vlak,rand](Q)++(-6,0,0)--(Q)--(D)--++(-6,0,0)--cycle;            \foreach \x in{0,2,4,6}{        \draw[vector,->] (-\x,0,2)--(-\x,1,1);        \draw[vector,->] (-\x,0,2)--(-\x,0.5,1);        \draw[vector,->] (-\x,0,2)--(-\x,0,1);        \draw[vector,->] (-\x,0,2)--(-\x,-0.5,1);        \draw[vector,->] (-\x,0,2)--(-\x,-1,1);        }                 \draw[vlak,rand](0,-2,0)--(0,2,0)\nodin{A}--(0,2,2)\nodin{B}--(0,1,2)\nodin{C}--(0,1,1)\nodin{Q}--(0,-1,1)\nodin{D}--(0,-1,2)\nodin{E}--(0,-2,2)\nodin{F}--cycle;            \draw(-9,0,1.8)\nodin{R};                 \draw[vlak,rand](R)++(0,-0.5,-0.5)--++(0,0,1)\nodin{R3}--++(0,1,0)\nodin{R2}--++(0,0,-1)\nodin{R1}--cycle;       \draw[vlak,rand](R1)++(-1,0,0)--(R1)--(R2)--++(-1,0,0)--cycle;       \draw[vlak,rand](R3)++(-1,0,0)--(R3)--(R2)--++(-1,0,0)--cycle;            \tdplotsetrotatedcoords{0}{90}{0}       \tdplotdrawarc[tdplot_rotated_coords,fill=black,rand]{(R)}{0.1}{0}{360}{}{}       \draw[thick](R)--(-5,0,1.8)\nodin{M};            \draw[thick](M)--(5,0,2)\nodin{M1};       \draw[thick](M)--(5,0,1.6)\nodin{M2};            \draw[vlak,rand](C)++(-6,0,0)--(C)--(B)--++(-6,0,0)--cycle;       \draw[vlak,rand](A)++(-6,0,0)--(A)--(B)--++(-6,0,0)--cycle;                 \draw(5,0,0)\nodin{S};       \draw[opp,rand](S)--++(0,2,0)--++(0,0,3.6)--++(0,-4,0)--++(0,0,-3.6)--cycle;            \draw(5,0,1.8)\nodin{K};            \foreach \x in{0.025,0.05,...,1}{        \tdplotdrawarc[tdplot_rotated_coords,fill=black!80,opacity=0.15*\x,draw=none]{(K)}{1-     \x}{0}{360}{}{}        }            \tdplotdrawarc[tdplot_rotated_coords,fill=black]{(M1)}{0.03}{0}{360}{}{}       \tdplotdrawarc[tdplot_rotated_coords,fill=black]{(M2)}{0.03}{0}{360}{}{}       \draw[->](S)++(3,0,4)node[left]{klassiek}to[out=0,in=130](5,-0.6,2.4);            \draw[->,shorten >=0.8pt](S)++(3,0,2)node[left]{kwantummechanisch}to[out=0,in=150](M1);       \draw[->,shorten >=0.8pt](S)++(3,0,2)to[out=0,in=220](M2);            \draw(R1)++(-1,0,2.5)\nodin{R4};       \draw(S)++(2,0,0)\nodin{S1};            \draw[use as bounding box](S1)rectangle(R4);           \end{tikzpicture}\caption{Het Stern-Gerlach Experiment}\label{}\end{figure}      \end{document}           \tikzend{}{}      \end{document}      any help as to why this happens would be appreciated.


title: Using subcaption with graphicx: How to solve the "Missing number treated as zero" problem?

text: I'm trying to use the subcaption package to build composite figures. When I try to include an image using `\includegraphics{}`. I get the error beneath. I know this is very similar to Subfloat with subcaption package: Missing number, treated as zero but that question did not have an accepted answer and the proposed solution was confusing. Any clear explanations of why this problem occurs and how to fix it are very welcome. :) Error:               ! Missing number, treated as zero.     <to be read again>                         \let      l.54 \includegraphics                          {./Figures/For_testing/test.png}      MWE:               \documentclass{article}     \usepackage[demo]{graphicx}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}          \begin{figure}     \centering     \begin{subfigure}     \includegraphics{anything}     \phantomsubcaption     \end{subfigure}     \\     \begin{subfigure}     \includegraphics{anything2}     \phantomsubcaption     \end{subfigure}     \caption{Test Caption}     \end{figure}          \end{document}


title: How do I put a "#" into a token list without getting two?

text: Consider this plain TeX file:               \newtoks\t     \t={#}     \showthe\t     \bye      If you compile it (with `tex` of `pdftex`), then in the output you get               > ##.     l.3 \showthe\t      Why do I get _two_ of the `#`s? (The background: I want to build the body of a macro definition in a token list, and the macro takes one argument that I want to put into the token list as `#1`. The idea is to use `\edef\macro#1{\the\t}`.)


title: How to reference ranges rather than separate numbers?

text: I would like to do the following: Just type something like               ... we describe this in sections \mycoolref{winter,spring,summer,fall} ...      and it will be typeset as something like > ... we describe this in sections 2.1 to 2.4. One might say that I could just type               ... we describe this in sections \ref{winter} to \ref{fall} ...      But the tricky thing is that I might decide to change the order of my `winter`, `spring`, `summer`, `fall` sections later, and I don't want to have to change my references because of this. One could imagine a fancy command that takes a set of labels and generates a compact description that consists of ranges if possible, like > 2.1, 2.3 to 2.8, and 2.12 Or, does such a macro exist?


title: How to reference \paragraph?

text: It is well-known that `\section` environment may be assigned a label `\label{refname}` and then the refname may be used in order to reference this section:               \section{My nice section}     \label{sec:my-nice-section}     Definitely the section is nice!          \section{My another section}     In the section \ref{sec:my-nice-section} we have discovered that it is nice.      Is there such possibility for `\paragraph` that we can assign it a label and then reference it?


title: Moving from pdfLaTeX to XeTeX - what do I need to know?

text: I've used pdfLaTeX for some time, but have encountered problems wanting to use other fonts than the defaults. I've been recommended to use XeTeX instead, as this supports usage of system fonts directly without having to convert and fiddle with them to get them to work under pdfLaTeX. I generated PDF documents directly using `pdflatex`, where all graphics are also PDF documents. Here's a list of the packages I used in my last TeX document:               \usepackage[sortcites=true]{biblatex}     \usepackage{babel}     \usepackage{csquotes}     \usepackage{url}     \usepackage{fullpage}     \usepackage{titlesec}     \usepackage{listings}     \usepackage[usenames, dvipsnames]{color}     \usepackage{subfig}     \usepackage{graphicx}     \usepackage{tikz-timing}     \usepackage{lscape}     \usepackage{booktabs}     \usepackage{threeparttable}      I've also used `microtype` and I've heard there's something iffy about that in XeTeX. Under these circumstances, what do I need to know to successfully (and with as little pain as possible) transition from pdfLaTeX to XeTeX? Are there some packages I cannot use anymore? Or some features that doesn't work in XeTeX? Do I need to change some syntax in the document itself, or rewrite some stuff? I still want to generated PDf documents as final output, of course, and use PDF documents as graphics. Will that be a problem? I should probably also mention that I run MiKTeX 2.8 on my Windows machine, and latest Ubuntu on my laptop. I write and generate documents on both machines.


title: Remove section name from header in LaTeX

text: I am trying to remove section names in headers. I am using `fancyhdr` package. When I try to specify new text in `\lhead{}`, text is just overlayed on section name. P.S. 3 hours of googling did not help. Here is the section of code that I want to make work.               \usepackage{fancyhdr}     \pagestyle{fancy}     \lhead{Student ID: 1123123/1}     \chead{University}     \rhead{}     \lfoot{}     \cfoot{}     \rfoot{Page \thepage\ of \pageref{LastPage}}      UPDATE: `\fancyhf{}` is not working - nothing changes. _Edit by Speravir – Example taken fromhttp://pastebin.com/W6V9GUCs   (link given by OP in comment to Gonzalo’s answer): _               \documentclass{report}     \usepackage[a4paper]{geometry}     \usepackage{fancyhdr}     \usepackage{lastpage}     \usepackage{fullpage, graphicx, wrapfig, subcaption, setspace}     \usepackage[T1]{fontenc}     \usepackage[font=small, labelfont=bf]{caption}     \usepackage{fourier}     \usepackage[protrusion=true, expansion=true]{microtype}     \usepackage[english]{babel}          \newcommand{\HRule}[1]{\rule{\linewidth}{#1}}     \onehalfspacing          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % HEADER & FOOTER     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \pagestyle{fancy}     \fancyhf{}     \fancyhead[L]{Student ID: 1123123/1}     \fancyhead[C]{University}     \fancyfoot[R]{Page \thepage\ of \pageref{LastPage}}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % TITLE PAGE     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \title{ \normalsize \textsc{SUBTITLE}             \\ [2.0cm]             \HRule{0.5pt} \\             \LARGE \textbf{\uppercase{TITLE}}             \HRule{2pt} \\ [0.5cm]             \normalsize \today     }          \date{}          \author{\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\             SID:  \\              University \\             Department of Life Sciences     }          \maketitle          \pagebreak               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % BODY     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \section*{\textsc{SECTION}}          \end{document}


title: hvFloat: wrong page number via addcontentsline

text: I'm still typesetting a book where I have about 10 pictures in every huge part and I want to add their captions to the ToC, not on a separate list of figures. Fot that, I'm using `\addcontentsline` to add some of the caption text as section entry of ToC.   Some pictures will have to be put horizontally, so I have to rotate them together with the caption. While I tried to adjust options of **hvFloat** (v1.1, 2012/03/04) package to my needs, I discovered that the command `\addcontentsline` produces wrong page numbers, no matter where it is placed - before `\hvFloat` or after. Neither did adding of `\clearpage` help. But if LoF is produced, the page numbers there are correct.   I'm currently using the `sidewaysfigure` environment, because until now, all of horizontal figures take the whole page, so I can do that. But the question of why this command does not work properly with `\hvFloat` is still open. Does the package cause it?   Besides, when I've tried to place a vertical figure with `\hvFloat` which also should fill the page, an additional empty page before the float was produced. If I specify `floatPos=h` (or anything else, for that matter), it will move on a page after ToC.   And the images themselves do not fit perfectly inside the layout frame, because they are shifted - does the package create an additional white space before or around the float? And if I choose the `nonFloat`-option, it shifts outside the layout frame by some centimeters.   Here comes the MWE:               \documentclass[fontsize=11pt,russian,open=any]{scrbook}           \usepackage[T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{fancyhdr}      \usepackage[paperwidth=14.8cm, paperheight=21.0cm, top=1.1cm, bottom=1.8cm, twoside, inner=0.9cm, outer=1.8cm, bindingoffset=0.5cm, footskip=1cm, headsep=0cm, headheight=0cm, voffset=0cm, hoffset=0cm, marginparsep=0cm, marginparwidth=0cm]{geometry}     \usepackage{graphicx}     \usepackage{microtype}     \usepackage{tocloft}      \usepackage{caption}      \usepackage{floatpag}      \usepackage{showframe}     \usepackage{hvfloat}     \usepackage{lipsum}     \usepackage{rotating}          \renewcommand{\baselinestretch}{0.95}          \setlength{\intextsep}{0pt}     \setlength{\belowcaptionskip}{0pt}     \setlength{\abovecaptionskip}{0mm}          \captionsetup[figure]{labelformat=empty}          \floatpagestyle{empty}          \graphicspath{{Pictures/}}     \DeclareGraphicsExtensions{.pdf,.tiff,.tif,.png,.jpg}          \renewcommand{\footnoterule}{%     \kern -1pt     \hrule width 4.5cm height 0.5pt     \kern 4pt     }          \pagestyle{fancy}     \fancyhf{}      \fancyfoot[EC,OC]{\thepage}     \renewcommand{\headrulewidth}{0pt}           \fancypagestyle{plain}{%     \fancyhf{}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     }          \renewcommand{\cftsecdotsep}{2}      \cftsetindents{section}{5mm}{4mm}      \setlength{\cftparskip}{0.2\baselineskip}      \cftsetpnumwidth{10mm}     \cftsetrmarg{1.5cm}           \begin{document}          \lipsum          \clearpage          \newgeometry{top=0.75cm, bottom=0.75cm, twoside, inner=0.7cm, outer=1cm, bindingoffset=0.5cm, footskip=0cm, headsep=0cm, headheight=0cm, voffset=0cm, hoffset=0cm, marginparsep=0cm, marginparwidth=0cm}          \begin{sidewaysfigure}     \centering     \captionsetup{width=14cm}     \includegraphics[width=1\textheight]{Newsize90.pdf}     \caption[]{\emph{...Picture via "sidewaysfigure", captionskip=0 on both sides, size is ok...\\if second line appears, picture with capture will shift to the left, outside the frame}}     \addcontentsline{toc}{section}{\emph{...Picture inserted and rotated via sidewaysfigure environment, size is ok. Page number in ToC is CORRECT...}}     \end{sidewaysfigure}          \clearpage          \restoregeometry          \lipsum           \clearpage          \newgeometry{top=0.75cm, bottom=0.75cm, twoside, inner=0.7cm, outer=1cm, bindingoffset=0.5cm, footskip=0cm, headsep=0cm, headheight=0cm, voffset=0cm, hoffset=0cm, marginparsep=0cm, marginparwidth=0cm}          \addcontentsline{toc}{section}{\emph{...Picture rotated via hvFloat, size is ok, but shifted down by 1mm, page number in ToC is WRONG...}}     \hvFloat[floatPos=p, capWidth=1.1, capPos=b, rotAngle=90, objectPos=l]{figure}{     \includegraphics[width=1\textheight]{Newsize90.pdf}}[rotated - LoF page number is CORRECT]{\emph{...Picture rotated via hvFloat, size is ok, but shifted down by 1mm \\if second line appears, only caption moves to the right, outside the frame...}}{}          \clearpage          \restoregeometry          \lipsum           \clearpage          \newgeometry{top=0.75cm, bottom=0.75cm, twoside, inner=0.7cm, outer=1cm, bindingoffset=0.5cm, footskip=0cm, headsep=0cm, headheight=0cm, voffset=0cm, hoffset=0cm, marginparsep=0cm, marginparwidth=0cm}          \addcontentsline{toc}{section}{\emph{...Picture not rotated, placed via hvFloat, size fits, empty page before float is produced, ToC page number is WRONG...}}          \captionsetup{aboveskip=1mm, width=11.8cm}     \hvFloat{figure}{\includegraphics[width=1\textwidth]{Newsize.pdf}}[not rotated - LoF page number is CORRECT]{\emph{...Picture not rotated, placed via hvFloat, size fits, but fig+cap seem to be placed at the center of page; empty page before float is produced...}}{}          \newpage\null\thispagestyle{empty}\newpage          \tableofcontents          \listoffigures          \end{document}      All files created by my TeXstudio 2.6.0 together with both pictures I used are in this zip-file.


title: How do I horizontally align equations with graphical calculus?

text: I have a graphical proof in category theory that I wrote with TikZ and the align environment (Thanks to Henri's answer in this question). The diagrams on each line have a recurring feature, a vertical line labelled with "A". I would like these lines to be horizontally aligned. ![Graphical calculus](http://i.stack.imgur.com/ah0ZB.png)               \documentclass{article}          \usepackage{amsmath}     \usepackage{tikz}     \usetikzlibrary{knots}     \usetikzlibrary{positioning}     \usepackage{mathtools}          \begin{document}              \tikzset{dot/.style={circle,fill,inner sep=1pt},diagram/.style={knot=black,thick}}         \newcommand{\tikzb}[1]{\tikz[baseline=(B.base)]{#1}}         \newcommand{\qdim}[1]{\left<#1\right>}         \newcommand{\Aid}{\draw[diagram] (0,-1.5) -- node[right] (B) {A} (0,1.5);}         \newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right|\left. \vphantom{#1} #2 \right>}         \pgfkeys{/encircle/.cd,label/.initial=$\Omega_{\mathcal{C}}$,angle/.initial=20}         \newcommand{\encircle}[2][]{%             \pgfkeys{/encircle/.cd,#1}             \draw[diagram] (1,0) arc (0:\pgfkeysvalueof{/encircle/angle}:1 and 0.4) node[above] {\pgfkeysvalueof{/encircle/label}} arc (\pgfkeysvalueof{/encircle/angle}:180:1 and 0.4);             #2             \draw[diagram] (-1,0) arc (-180:0:1 and 0.4);         }              \begin{align}             & & \tikzb{\draw[diagram] (0,-1.5) -- node[right] (B) {X} (0,1.5);}             \tikzb{\encircle{\Aid}}\\             & = \sum_{Y \in \Lambda_\mathcal{C}} \qdim{Y}             & \tikzb{\draw[diagram] (0,-1.5) -- node[right] (B) {X} (0,1.5);}             \tikzb{\encircle[label=Y]{\Aid}}             & \qquad \text{By the definition of $\Omega_{\mathcal{C}}$} \\             & = \sum_{\mathclap{\substack{Y \in \Lambda_\mathcal{C} \\ Z \in \Lambda_\mathcal{C} \\ \iota_i \in \mathcal{C}(Z, X \otimes Y) \\ \braket{\iota_i}{\iota_j} = \delta_{i,j}}}} \qdim{Y}\qdim{Z}             & \tikzb{                 \draw[diagram] (-1,-1.5) to[out=90, in=245] node[left] {X} (-0.7,-0.3) coordinate[dot,label={right:$\iota_i^*$}] (A) to node[left] (B) {Z} (-0.7,0.3) coordinate[dot,label={right:$\iota_i$}] (C) to[out=115,in=270] (-1,1.5);                 \draw[diagram] (1,0) to[out=90,in=65] (C);                 \Aid                 \draw[diagram] (A) to[out=295,in=270] (1,0) node[right] {Y};             }             & \qquad \text{Insertion of a further $\Omega_{\mathcal{C}}$}         \end{align}     \end{document}      You don't need the `knots` tikz library necessarily to compile this code. I tried adding &'s in the tikz code, to no avail.


title: Cutting out shape to reveal what's behind

text: The following MWE displays the desired output, but the question is whether (and how) the same result can be achieved by somehow redefining lines (1) and (2) to "cut out" the inner square, so that line (3) is redundant. I appreciate that this picture is simple, but one can easily imagine more complicated cases.               \documentclass{article}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}     \draw (-1,-1)--++(4,4);     \draw[fill=white] (0,0)--++(2,0)--++(0,2)--++(-2,0)--++(0,-2); % (1)     \draw (0.5,0.5)--++(1,0)--++(0,1)--++(-1,0)--++(0,-1); % (2)     \draw (0.5,0.5)--++(1,1); % (3)     \end{tikzpicture}          \end{document}


title: 45 degrees line and blank spots

text: Trying to show the how discontinuous an equation is, I would like to graph the following diagram. ![enter image description here](http://i.stack.imgur.com/nFcwI.png) How do we make the 45 degrees line? Also, how do we make the blank spots? My code so far is:               \begin{tikzpicture}     \draw[thick, ->] (0,0)--(5,0) node[below]{$p_1$};     \draw[thick, ->] (0,0)--(0,5) node[left]{$p_2$};     \draw[Blue,-] (1,5)--(1,1.1);     \draw[Blue, -] (1,1)--(3.5,3.4);     \draw[Blue, -] (3.5,3.5)--(5,3.5);     \draw[dotted] (0,1) node[left]{$c$}--(1,1);     \draw[dotted] (1,0) node[below]{$c$}--(1,1);     \draw[dotted] (0,3.5) node [left]{$\frac{A+Bc}{2}$}--(3.5,3.5);     \draw[dotted] (3.5,0) node [below]{$\frac{A+Bc}{2}$}--(3.5,3.5);     \fill[Blue] (1,1.1) circle (1.5pt);     \fill[Blue] (3.5,3.4) circle (1.5pt);     \end{tikzpicture}


title: Error message using amsart class with parskip package

text: I am trying to use Macvim combined with the Vimlatex package. It seems that when I use the amsart article class combined with the parskip package gives me an error. When I use TexShop for example, the document compiles without any errors. I also compiled the document using the terminal, once again no problems. It only occurs when I compile my .tex document using the ,ll command from within vim. Here is the error message I get:               **Error Message**:/usr/local/texlive/2013/texmf-dist/tex/latex/parskip/parskip.sty|| LaTeX Warning: Command \@starttoc  has changed. Check if current package is valid.      I am using Macvim 7.4 on Max OS X, Mavericks, if that's important. Macvim automatically takes me to the parskip.sty as well and I can't even get back to my original editing session. This is so frustrating. I am fairly new to Vim btw :) Can anybody help me with this?


title: Problems for use differents fonts in a document with XeTeX

text: I'm working a document using the `scrartcl`class with the following options and packages:               \documentclass[10pt,letterpaper,DIV=14,titlepage=false,twocolumn=on]{scrartcl}     %\usepackage[DIV=14]{typearea}     \usepackage[spanish,activeacute,mexico]{babel}     \usepackage[english=british,french=quotes,german=quotes,spanish=mexican]{csquotes}     \usepackage{ucs}     \usepackage{hyperref}     \hypersetup{         bookmarks=true,         % show bookmarks bar?         unicode=true,           % non-Latin characters in Acrobat’s bookmarks         pdftoolbar=true,        % show Acrobat’s toolbar?         pdfmenubar=true,        % show Acrobat’s menu?         pdffitwindow=false,     % window fit to page when opened         %pdfstartview={FitH},   % fits the width of the page to the window         pdftitle={Document},    % title         pdfauthor={Me},     % author         pdfsubject={Fortation},   % subject of the document         pdfcreator={Listopad},   % creator of the document         pdfproducer={Balerdi}, % producer of the document         %pdfkeywords={keyword1} {key2} {key3}, % list of keywords         pdfnewwindow=true,      % links in new window         colorlinks=true,       % false: boxed links; true: colored links         linkcolor=teal,          % color of internal links (change box color with linkbordercolor)         citecolor=green,        % color of links to bibliography         filecolor=red,      % color of file links         urlcolor=blue,           % color of external links         anchorcolor=magenta, % color for anchor texto         filecolor=cyan, % color for urls which open local files         menucolor=orange, % color for acrobat menu items         runcolor=violet, % color for run links (launch annotations)     }     \usepackage{url}     \usepackage{fontspec} %      \defaultfontfeatures{Mapping=tex-text}     \usepackage{xunicode}     \usepackage{xltxtra}     \setmainfont{Constantia}      \setsansfont{Corbel}     \setmonofont{Consolas}          \renewcommand{\familydefault}{\sfdefault}     \pagestyle{plain}          \usepackage[usenames,dvipsnames,x11names,table]{xcolor}     \usepackage[per-mode=symbol]{siunitx}     \sisetup{     %output-decimal-marker = {,},     detect-weight= true,      range-units = brackets,     list-final-separator = { \translate{and} },     list-pair-separator = { \translate{and} },     range-phrase = { \translate{to (numerical range)} },     }     \usepackage{array}     \usepackage{makeidx}     \usepackage{graphicx}     %\usepackage[grid=true,gridcolor=cyan,subgridcolor=orange,gridunit=pt]{eso-pic}% dibuja la reticula de las paginas          \usepackage{scrpage2}     \pagestyle{scrheadings}     \ohead{\textbf{Me} -- Document}     \ihead{\texttt{http://listopad.org.mx}}              \usepackage[stable,bottom]{footmisc}     \raggedbottom     \clubpenalty=10000     \widowpenalty=10000     %\setlength{\parskip}{3pt plus 2pt minus 2pt}          \parskip0.4\baselineskip          \begin{document}          \end{document}      This works fine compiling with `XeLaTeX`my problem is how to use correctly in the same document those three fonts, because I can only load Cobel, all the document appears with Corbel, but not with Cosntantia and Consolas. I use this preamble and works fine every time I want to compose a document with this class (remember that the `KOMA Script` classes can use by default serif and sans serif fonts for headers and other stuff) with only one typeface, sucha as Myriad, but I don't know why it doesn't work when I add another font as `\setmainfont`.


title: Beamer reactions numbering issue

text: Using the `reactions` environment in `Beamer` along with `\begin{itemize}[<+->]` causes the reactions to be renumbered when uncovering. In the following example the reactions are labelled 1-3 on the intial slide as required, but on uncovering the text in the list they are subsequently renumbered 4-5, 7-9, 10-12 and 13-15. Is there a quick fix to this without removing the `[<+->]` of `\begin{itemize}[<+->]` ;) I tried putting `\numberwithin{reaction}{chapter}` `frame` and `slide` in place of `chapter` as suggested by this Chemmacros is not resetting the reactions counter in the new chapter. I guess I need to replace `chapter` by the correct counter identifier...               \documentclass{beamer}     \usepackage{chemfig}     \usepackage{chemmacros}     \begin{document}     \chemsetup[chemformula]{font-shape=sf}     \begin{frame}     \begin{reactions}      Cl-Cl ->[$\Delta$][$h\nu$] 2 "\Lewis{0.,Cl}"  \label{react:init}\\     R3H + Cl "\Lewis{0.,\vphantom{H}}" -> R3 "\Lewis{0.,\vphantom{H}}" + HCl    \label{react:propagation}     \end{reactions}     \begin{itemize}[<+->]     \item Initiation is cleavage of \ch{Cl-Cl} bond, Reaction~\ref{react:init}     \item 1st reaction is that of \ch{ Cl "\Lewis{0.,\vphantom{H}}"} with a hydrogen, Reaction~\ref{react:propagation1}     \item Once the carbon radical is formed \ch{ R3 "\Lewis{0.,\vphantom{H}}" }, subsequent bonding to the halogen \ch{Cl-Cl} can only occur at the radical site, Reaction~\ref{react:prop2}     \item Formation of \ch{HCl} is common to all reactants so determining factor must be the dissociation of the \ch{R-H} bond     \item Therefore not all \ch{C-H} bonds are equal     \end{itemize}     \end{frame}     \end{document}


title: How to change text on answerline in exam class

text: How to replace text on answerline As per exam class manual; i'm able to add answerline for MCQ using tex mentioned below               \begin{questions}     \question     Who’s buried in Grant’s tomb?     \answerline     \question     What was the color of George Washington’s white horse?     \answerline     \question     Which is heavier: A pound of feathers, or a pound of lead?     \answerline     \end{questions}      which gives output as ![enter image description here](http://i.stack.imgur.com/5YSNz.png) I'm looking for option to get it updated as ![enter image description here](http://i.stack.imgur.com/nSEXg.png) Can you please suggest; how to achieve this?


title: Problem in using tcolorbox with c++ #if #endif directives

text: I am using `tcolorbox` to highlight a `c++` code in my document. Could someone shed light on why it the compiler complains about the `#if` directive? The error I get is:               Extra }, or forgotten $ \PY{c+cp}{\PYZsh{}if VTK_MAJOR_VERSION <= 5}      When I comment the directives everything works fine. The following is the MWE.               \documentclass[11pt,letterpaper]{article}          \usepackage[left=1.00in, right=1.00in, top=1.00in, bottom=1.00in]{geometry}          \usepackage{tcolorbox}     \tcbuselibrary{minted,skins,breakable}          \newtcblisting{cppcode}[1][]{       listing engine=minted,       breakable,       colback=bg,       colframe=black!70,       listing only,       minted style=colorful,       minted language=c++,       minted options={linenos=true,numbersep=3mm,texcl=true,#1},       left=5mm,enhanced,       overlay={\begin{tcbclipinterior}\fill[black!25] (frame.south west)                 rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}}     }     \definecolor{bg}{rgb}{0.85,0.85,0.85}          \begin{document}          \begin{cppcode}[]     #if VTK_MAJOR_VERSION <= 5         streamLine->SetInput( sgrid );         streamLine->SetSource( seeds->GetOutput() );     #else            streamLine->SetInputData( sgrid );         streamLine->SetSourceConnection( seeds->GetOutputPort() );     #endif     \end{cppcode}          \end{document}


title: Need help with creating an template of a PDF

text: I have found this PDF and thought it would be a great idea to make a template of it. I am not so good to LaTeX so it would be nice if you could help me. Here the link to the CV-document: Link to CV PDF It's 4 boxes - three are colors and one is a picture. I know how to make a colored box:               \usepackage{framed, color}      \colorbox{green}{Text}      But how did I get them in the right position, with the right color? And how did I get the image in this position? And how to get the green line in the left box? And should I use this to manipulate with the font size?                   \documentclass[11pt]{report}     \usepackage{mathptmx}     \usepackage{anyfontsize}     \usepackage{t1enc}     ...     {\fontsize{50}{60}\selectfont Foo}{\fontsize{5}{6}\selectfont bar!}      {\Huge Foo}{\tiny bar!} It would be great if you would help me with that. I will learn a lot of it and will be able to make such layouts in future. So please help the LaTeX-beginner :-) Minimal example:               \documentclass[a4paper, 10pt]{memoir}          \usepackage{framed, color}%to make boxes and colours          \usepackage{t1enc}          \usepackage{anyfontsize}%manipulate with font size          \pagestyle{empty}          \usepackage[left=0cm,right=0cm,top=0cm,bottom=0cm]{geometry}               \begin{document}          %\begin{figure}     %\includegraphics[?????]{•}     %\end{figure}               \colorbox{grey}{Marie Muster}          \colorbox{grey}{\textsc{\textbf{Bewerbung}} als \textsc{\textbf{Assistentin}}\\ im \textbf{Bereich Biochemie}}          \colorbox{olive}{Am Musterweg 22\\     12345 Musterstadt\\     Telefon 0 25 06 / 12 34 56\\     E-mail: Marie.Muser@Provider.de}          \end{document}      The minimal example is really small - but that is because I am a new LaTeX user and have read a lot but don't understand so much. I would be great with help but please don't use XeLaTeX or anything like that. I am just learning common LaTeX :-) ... and it would be nice if I could learn from this project (and when someone would help me).


title: TeX Live 2013: TrueType fonts

text: In the list of changes in TeX Live 2013 it says > Prefer TrueType/OpenType fonts to Type1 when the names are the same. But are not Type1 fonts _better_ since they are **vector** fonts? Can someone clarify why TrueType/OpenType are better?


title: Lines don't wrap in my list of tables

text: On my "List of Tables" page, the descriptions of tables don't wrap. Instead, the text proceeds on the same line all the way to the far-right margin of the page (past the point where the page number of tables is usually set), where it is truncated. This has worked very well on another report, but something in my styling is different here. I would rather not attempt to create shortened descriptions for the list of tables; this is a fragile solution, broken by any number of general formatting adjustments. I am using the ociamthesis style file, and invoking a list of tables with:               \documentclass[a4paper,titlepage]{ociamthesis}          ...          \begin{document}          ...          \begin{romanpages}     \tableofcontents     \listoftables     \listoffigures     \end{romanpages}      What can I change to encourage correct wrapping of the table descriptions?


title: How can I map HTML named entities to LaTeX commands?

text: Specifically, I would like to be able to complete this table:               symbol    html entity    LaTeX command      \deg        °       \begin{alltt}\deg{alltt}      So that I have an entry for every HTML named entity listed in the official specs. I appreciate that there may not be mappings for all of them, but the more the merrier. _I need this to check the conformance of a source document which is destined to be published in both HTML and LaTeX; the source document may already contain HTML named entities. Hence I need a chart of mappings to provide the conversions, or to issue conformance warnings for those that do not map._


title: How can I install uarial.sty on a mac?

text: I'm using TexShop (2.43 on 10.6) to manage LaTeX, but have the following error:               ! LaTeX Error: File 'uarial.sty' not found.      I tried to use the approach in this question with               \usepackage{listings}      But apparently, uarial.sty isn't already installed. It is definitely a CTAN package, and I don't see any relevant packages in TeX Live's download list. What package should I look for in the download list, as the downloads are taking forever? Or is there some other way I should be using? I attempted to install the non-free fonts. To do so, I've done this:   1. Downloaded install-getnonfreefonts from the link @MarcoDaniel provided.   2. created the following script to avoid having to edit my own path: > #!/bin/bash > > #script to run the font installer once it's in the directory export > PATH=/usr/local/texlive/2010/bin/x86_64-darwin:$PATH > > exec texlua ~/Downloads/install-getnonfreefonts   1. Ran that script as sudo, got this output:                   Detected System: x86_64-darwin         Detected Installation: /usr/local/texlive/2010         Installing texmf/scripts/getnonfreefonts/getnonfreefonts.pl ...          [done]         Installing texmf/doc/man/man1/getnonfreefonts.1 ...                      [done]         Installing texmf/doc/man/man1/getnonfreefonts-sys.1 ...                  [done]         Installing texmf/doc/man/man1/getnonfreefonts.man1.pdf ...               [done]         Installing texmf/doc/man/man1/getnonfreefonts-sys.man1.pdf ...           [done]         md5sum: cdc91dd4b6bea936a013a16836421a0b getnonfreefonts.pl ...            [ok]         md5sum: f850d910dd96ee27cecdb3772047d247 getnonfreefonts.1 ...             [ok]         md5sum: fb2b0f7699db8e627d4e26b730e94928 getnonfreefonts-sys.1 ...         [ok]         md5sum: 415b51f7c80a4abe8d0a667a04c9d525 getnonfreefonts.man1.pdf ...      [ok]         Fixing File Permissions ...                                              [done]         Creating symlinks in 'bin/universal-darwin' ...                          [done]         Creating symlinks in 'bin/x86_64-darwin' ...                             [done]         texhash: Updating /usr/local/texlive/2010/texmf/ls-R...          texhash: Done.        1. Restarted TeXShip   2. Rebuilt the file, no joy.


title: Errors using \acrodef or \newacro

text: Using the package `acronym`, I get a error defining acronyms with `\acrodef` or `\newacro` instead of `\acro`:               ! LaTeX Error: Something's wrong--perhaps a missing \item.     See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                             l.11 \end{acronym}     ?      It is possible to ignore this error, but I need a compiling file for submission at a conference. This is an example, triggering that error:               \documentclass{scrartcl}     \usepackage[printonlyused]{acronym}     \begin{document}     This is an example; \ac{IHE}.\\     And \ac{IHE} again!          \begin{acronym}[IHE]     \acrodef{IHE}{\emph{Integrating the Health Enterprise}}     \end{acronym}     \end{document}


title: How to use LaTeX template for SIAM papers?

text: I need to prepare a paper for SIAM. I downloaded the latest template from SIAM website--`siamltex1213.zip` from http://www.siam.org/journals/auth-info.php. I am using a Basic TexWorks to open the `docultex.tex`. However, there are two errors like:               ! Package hyperref Error: Wrong DVI mode driver option `pdfmark' (hyperref)     because pdfTeX or LuaTeX is running in PDF  mode.          See the hyperref package documentation for explanation.      Type  H <return>  for immediate help.  ...                                            l.3925 \ProcessKeyvalOptions{Hyp}      And also:               ! Package hyperref Error: Wrong DVI mode driver option `dvips',     (hyperref)                because pdfTeX or LuaTeX is running in PDF mode.      How do I fix this??


title: I found the title of my reference is not in italic, and the surname is after the forename

text: I used the Harvard style reference. I don't know why the title of book is in italic, but the title of the article is not. Besides, how can I put the surname before the forename? Do I have to cite every item and thus they can appear in the reference? How to add editors to the reference when referencing the book? Thanks so much. I am quite a beginner. Here is the bibliography code.               \begin{filecontents}{mybib.bib}     @article{Brockwell1,     author      = {Brockweill, P.J. and Gani, J. and Resnick, S.I.},     year        = {1982},     title       = {Birth, immigration and catastrophe process},     journal     = {Advances in Applied Probability},     volume      = {14},     pages       = {709-731},     }          @article{Brockwell2,     author      = {Brockweill, P.J.},     year        = {1986},     title       = {The extinction time of a general birth and death process with catastrophes},     journal     = {Journal of Applied Probability},     volume      = {23},     pages       = {851-858},     }          @book{Catastrophemodel,     author = {Patel, C.C.},     title = {Catastrophe modeling: a new approach to managing risk},     publisher = {Springer},     year = 2005,     }          @article{Pakes,     author      = {Pakes, A.G. and Trajstman, A.C. and Brockwell, P.J.},     year        = {1979},     title       = {A stochastic model for a replicating population subjected to mass emigration due to population pressure},     journal     = {Mathematical Biosciences},     volume      = {45},     number      = {1},     pages       = {137-157},     }     \end{filecontents}      and the main codes.               \documentclass[12pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{filecontents}          \usepackage[round]{natbib}     \begin{document}     Based on a birth-death process, a catastrophe process, in addition, involves catastrophes and emigrations, leading to the decline or growth of the populations subject to those factors. In past decades, the interest in developing and analysing the catastrophe process has been engaged, and emphasis and focus have been placed on mathematical models for that subject, especially the semi-stochastic models, i.e. models with deterministic growth and random catastrophes. For example, \citet{Pakes} proposed a semi-stochastic model which showed the expected time to extinction approaches $\infty$ as the initial size of the population approaches 0.          \newpage     \bibliographystyle{plainnat}       \bibliography{mybib}     \end{document}      ![enter image description here](http://i.stack.imgur.com/KhzES.png)


title: CSS based LaTeX formatting?

text: I've done ab bit of web-searching and found nothing. Are there any attempts on using CSS for LaTeX formatting? For example:               body { font-family: Helvetica,Arial,sans-serif; }     section { font-size: 16pt; }     /* or: */     h1 { font-size: 16pt; }      I know that this approach is limited compared to the classic approach, but it could be a nice attempt. So are there any published papers or code pieces? I'd like to write in the preamble of my LaTeX document: `\usestylefile{foo.css}` and have the text rendered as written in the given style file (and its linked style files).


title: How to label or dimension a circle radius in TikZ?

text: I have a circle in the picture... How to add dimension of radius... form center of the circle to any point on the circle? Rotation is not giving what i want...               \documentclass[10pt]{article}     \usepackage{tikz}          \begin{document}           \begin{tikzpicture}[scale=1.0]          \draw [step=1.0,thin,gray!40] (0,-3) grid (6,3);          \fill[blue] (3,0) circle (2pt) node [black,,below left] {$C$};     %     \draw[thick] (3,0) circle(3);          \draw[|->|] (3,0) -- (6,0)  node [midway,fill=white] {3$a$};     \draw[|->|,rotate=45] (3,0) -- (6,0)  node [midway,fill=white] {3$a$};          \end{tikzpicture}          \end{document}


title: Redefine label in enumerate list

text: First: Some days ago I posted this question on The LaTeX Community but I have not gotten an answer so I post it here. Consider the following MWE:               \documentclass[danish]{article}     \usepackage{babel}     \usepackage{mathtools}     \usepackage{enumitem}     \usepackage{hyperref}          \mathtoolsset{showonlyrefs}     \newcommand*{\hv}[1]{\label{eqn:#1}\stackrel{\mathclap{(#1)}}{=}}     \newcommand*{\fk}[1]{\item[\eqref{eqn:#1}]}          \begin{document}          We have     \begin{align}       \Delta y       &\hv{1} m(x_{0}+h) - m(x_{0})\\       &\hv{2} \frac{f(x_{0}+h)}{g(x_{0}+h)} - \frac{f(x_{0})}{g(x_{0})}\\       &\hv{3} \frac{f(x_{0}+h) \cdot g(x_{0})}{g(x_{0}+h) \cdot g(x_{0})} - \frac{f(x_{0}) \cdot g(x_{0}+h)}{g(x_{0}) \cdot g(x_{0}+h)}\\       &= \dots     \end{align}     Explanations:     \begin{enumerate}       \fk{1} A       \fk{2} B       \fk{3} C     \end{enumerate}          \end{document}      Issues:   1. This way of refering to the lines in the align expression seems wierd. Is there a better way of doing this?   2. I will like the labels `(1)`, `(2)`, ... to be printed above `=` only and not flushed right too. I there a way of doing this? Ad 2. I have tried putting `\notag` at the end of each line but then I get the following error:               Package amsmath Error: Multiple \label's: label 'eqn:1' will be lost.


title: How may I left-align the following array?

text: I would not like it to be centred.               \documentclass[11pt,a4paper]{article}     \usepackage{blindtext}     \usepackage{mathtools}          \begin{document}     \[a^{'}_{ij}=\left\{\begin{array}{lr}     a_{ij}&\: \text{($i\neq r$;\: $i\neq s$)}\\     a_{sj}&\: \text{($i=r$)}\\     a_{rj}&\: \text{($i=s$)}     \end{array}\right.\]\\     \end{document}


title: how to highlight certain environments in emacs

text: For example, I want to highlight the `theorem` and `lemma` environments, but leave the `proof` environment unchanged. I tried to search the variables in font locking but no luck.


title: Change separator in Bibtex bibliography from comma to period

text: I've been editing a Bibtex style, the standard `agsm.bst`, to match my university's requirements. I've managed to get everything correct, except that the style separates the year, title, and journal with commas: > Schuster-Böckler, B., Schultz, J. and Rahmann, S. (2004), HMM Logos for > visualization of protein families, _BMC Bioinformatics_ 5(1),7. I need the output to use a full stop (period) as the separator: > Schuster-Böckler, B., Schultz, J. and Rahmann, S. (2004). HMM Logos for > visualization of protein families. _BMC Bioinformatics_ 5(1),7. I'm fairly sure this isn't defined in the style file. Where is this behaviour defined, and how can I change it?


title: Node at every point of a polyline

text: Right now I have a code like this:               ...                      mnode/.style={circle,draw=black,fill=black,inner sep=0pt,minimum size=2pt},     ...          \draw (0,0) node[mnode]{}        -- (1,1) node[mnode]{}        -- (2,2) node[mnode]{};      Albeit the real line is much longer. Can I do something to avoid specifying `node[mnode]{}` after every point?


title: Set first paragraph no indentation after re-definition of section

text: I'm trying to avoid the indentation of the first paragraph that is introduced by the `SciTePress.sty` style. I think that the problem is the redefinition of `\section` within the style. Because, if I remove it the first paragraph after section header isn't indented. My question is, how can I change the behavior of the `\section` command to "no indent after section"? I think that I have to redefine it within my code, because I can't change the given style. Also, can I make the section title uppercase at the same time in the same redefinition? **MWE**               \documentclass[a4paper,twoside]{article}               \usepackage{calc}     \usepackage{amssymb}     \usepackage{amstext}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{multicol}     \usepackage{pslatex}     \usepackage{apalike}     \usepackage{SciTePress}     \usepackage[small]{caption}          \usepackage{lipsum}               \begin{document}          \title{\uppercase{Authors' Instructions}  \subtitle{Preparation of Camera-Ready Contributions to SciTePress Proceedings} }          \author{\authorname{First Author Name\sup{1}, Second Author Name\sup{1} and Third Author Name\sup{2}}     \affiliation{\sup{1}Institute of Problem Solving, XYZ University, My Street, MyTown, MyCountry}     \affiliation{\sup{2}Department of Computing, Main University, MySecondTown, MyCountry}     \email{\{f\_author, s\_author\}@ips.xyz.edu, t\_author@dc.mu.edu}     }          \keywords{\lipsum[1]}          \abstract{\lipsum[2]}          \onecolumn \maketitle \normalsize \vfill          \section{\uppercase{Introduction}}          \lipsum[3-5]          \end{document}      **SciTePress.sty**               \typeout{Conference Style for SciTePress for LaTeX 2e -- version of March 2011}     %Modified by L. Medina:     %   - title, authors, keywords and abstract: commands redefinition     %   - spaces above and below captions: redefinition          %Modified by V. Pedrosa:     %   - title, authors, keywords and abstract: spacing is now automatic          %%Page Setup          \pagestyle{empty}     \setlength\paperheight{297mm}     \setlength\paperwidth{210mm}               \setlength\topmargin{-0.91in} \setlength\oddsidemargin{0.02362in}     \setlength\evensidemargin{0.02362in}          \setlength\textheight{8.74in} \setlength\textwidth{6.221in}     \setlength\columnsep{0.8cm}     \newlength\titlebox %\setlength\titlebox{2in}     \setlength\headheight{0pt} \setlength\headsep{36pt}     \thispagestyle{empty} \pagestyle{empty}          \flushbottom \twocolumn \sloppy          \def\addcontentsline#1#2#3{}                    %%First Section     \def\title#1{\gdef\@title{ #1 \\[15pt]{\textmd {\textbf }}\\}}     \newcommand{\subtitle}[1]{\\ \fontsize{13}{15}\selectfont \textit{#1 } }          \def\keywords#1{\gdef\@keywords{\small Keywords: \hspace{0.388cm} \begin{minipage}[t]{5.45in} \fontsize{9}{11}\selectfont \vspace{-0.22cm} #1 \\ \end{minipage}}}     %\gdef\@mykeywords{}     \def\abstract#1{\gdef\@abstract{\ \\ \small Abstract: \hspace{0.6cm} \begin{minipage}[t]{5.45in}  \fontsize{9}{11}\selectfont \vspace{-0.22cm} #1 \end{minipage} }}          %%%%%%%     \def\sup#1{$^{#1}$}          \newcommand{\authorname}[1]{\fontsize{11}{13}\selectfont #1 \\ }%\addtocounter{authorcounter}{1}}     \newcommand{\affiliation}[1]{\begin{minipage}[t]{6.2in} \centering \fontsize{9}{11}\selectfont \textit{ #1} \end{minipage} \\}     \newcommand{\email}[1]{\fontsize{9}{11}\selectfont  \textit{#1} \\[12pt]}               %%%%%%%     \def\maketitle{\par     \begingroup     % to make the footnote style local to the title     \def\thefootnote{\fnsymbol{footnote}}     \twocolumn[          \centering {\LARGE\bf \@title \par}     \vskip -0.07in          \centering\@author     \vskip 0.51in          \@keywords     \vskip 0.02in          \@abstract          \vspace{32pt}          ]               \@thanks     \endgroup          \let\maketitle\relax \let\@maketitle\relax     \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}                    %%Paper Contents and References          \def\pubnote#1{\thispagestyle{myheadings}     \pagestyle{myheadings}     \markboth{#1}{#1}     \setlength\headheight{10pt}  \setlength\headsep{10pt}     }          % sections with less space     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Remove this definition and the indentation returns!     \def\section{\@startsection{section}{1}{\z@}{24pt plus 2pt minus 1pt}     {12pt plus 2pt minus 1pt}{\Large\bf\raggedright}}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \def\subsection{\@startsection{subsection}{2}{\z@}{-2.0ex plus     -0.5ex minus -.2ex}{12pt plus 2pt minus 1pt}{\large\bf\raggedright}}     \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.0ex plus     -0.5ex minus -.2ex}{12pt plus 2pt minus 1pt}{\normalsize\bf\raggedright}}               % Footnotes     \footnotesep 6.65pt %     \skip\footins 9pt plus 4pt minus 2pt     \def\footnoterule{\kern-3pt \hrule width 5pc \kern 2.6pt }          % Lists and paragraphs     \parindent 0.5cm     \topsep 4pt plus 1pt minus 2pt     \partopsep 1pt plus 0.5pt minus 0.5pt     \itemsep 2pt plus 1pt minus 0.5pt     \parsep 2pt plus 1pt minus 0.5pt     \leftmargin 15pt \leftmargini\leftmargin \leftmarginii 10pt     \leftmarginiii 5pt \leftmarginiv 5pt \leftmarginv 5pt \leftmarginvi     5pt \labelwidth\leftmargini\advance\labelwidth-\labelsep \labelsep     5pt     \def\@listi{\leftmargin\leftmargini}     \def\@listii{\leftmargin\leftmarginii     \labelwidth\leftmarginii\advance\labelwidth-\labelsep     \topsep 2pt plus 1pt minus 0.5pt     \parsep 1pt plus 0.5pt minus 0.5pt     \itemsep \parsep}     \def\@listiii{\leftmargin\leftmarginiii     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep     \topsep 1pt plus 0.5pt minus 0.5pt     \parsep \z@ \partopsep 0.5pt plus 0pt minus 0.5pt     \itemsep \topsep}     \def\@listiv{\leftmargin\leftmarginiv     \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}     \def\@listv{\leftmargin\leftmarginv     \labelwidth\leftmarginv\advance\labelwidth-\labelsep}     \def\@listvi{\leftmargin\leftmarginvi     \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}     \abovedisplayskip 7pt plus2pt minus5pt%     \belowdisplayskip \abovedisplayskip     \abovedisplayshortskip 0pt plus3pt%     \belowdisplayshortskip 4pt plus3pt minus3pt%          %%%%%%     \setlength{\abovecaptionskip}{4pt}%plus3pt minus3pt}%     \setlength{\belowcaptionskip}{-4pt}%plus3pt minus3pt}     %%%%%%     % Less leading in most fonts (due to the narrow columns)     % The choices were between 1-pt and 1.5-pt leading     \def\normalsize{\@setfontsize\normalsize\@xpt{11}}   % 10 point on 11     \def\small{\@setfontsize\small\@ixpt{10}}    % 9 point on 10     \def\smalll{\@setfontsize\smalll\@viiipt{10}}    % 9 point on 9     \def\footnotesize{\@setfontsize\footnotesize\@ixpt{10}}  % 9 point on 10     \def\scriptsize{\@setfontsize\scriptsize\@viipt{10}}  % 7 point on 8     \def\tiny{\@setfontsize\tiny\@vipt{7}}    % 6 point on 7     \def\large{\@setfontsize\large\@xipt{12}}    % 11 point on 12     \def\Large{\@setfontsize\Large\@xiipt{14}}    % 12 point on 14     \def\LARGE{\@setfontsize\LARGE\@xivpt{16}}    % 14 point on 16     \def\huge{\@setfontsize\huge\@xviipt{20}}    % 17 point on 20     \def\Huge{\@setfontsize\Huge\@xxpt{23}}    % 20 point on 23          \setlength{\topmargin}{-1.1cm} \addtolength{\textheight}{-0.1cm}     \setlength{\headsep}{1.9cm}     \setlength{\footskip}{1.7cm}          \renewcommand{\large}{\fontsize{12}{15}\selectfont}     \renewcommand{\Large}{\fontsize{13}{15}\selectfont}     \renewcommand{\normalsize}{\fontsize{10}{11.5}\selectfont}     \renewcommand{\refname}{REFERENCES}          \newcommand{\F}{\mathcal{F}}     \newcommand{\I}{\mathcal{I}}     \newcommand{\D}{\mathcal{D}}     \newcommand{\T}{\mathcal{T}}     \newcommand{\R}{\mathcal{R}}     \newcommand{\rr}{\mathfrak{r}}     \newcommand{\code}[1]{\textsf{#1}}          \renewcommand\floatpagefraction{.9}     \renewcommand\topfraction{.9}     \renewcommand\bottomfraction{.9}     \renewcommand\textfraction{.1}


title: difficulty with datatool + keyval

text: I want to define a command with key arguments, which stores something in a table with help of the package datatool. My attempt is :               \documentclass[12pt]{scrartcl}     \usepackage{keycommand}     \RequirePackage{datatool}     \begin{document}       % declare a new table     \DTLnewdb{table}       % define the command     \newkeycommand{\myCom}[op=1]{%     \DTLnewrow{table}     \DTLnewdbentry{table}{option}{\commandkey{op}}     }     %call 4 times the command     \myCom[op=2]      \myCom[op=3]     \myCom[op=4]     \myCom[op=5]     % display the content of the table     \DTLdisplaydb{table}      I would expect "2 3 4 5", but i get "5 5 5 5". This is actually a common problem that i encounter regularly with datatools (that somehow "only the last operation is taken into account"), which shows probably that i still don't know how to use it properly... What am i doing wrong here ?


title: Multi-column spacing of many equation-like environments

text: I suppose I have a pretty simple question. I want to write down a logic inference system. A good example can be found on page 9 in this document: ![enter image description here](http://i.stack.imgur.com/rBtfN.png) **What environment** would you advise me to use to get a similar effect? In particular I would like to get nice multicolumn alignment (like in a table) and some standard spacing around every element. I don't care particularly about the border around the whole thing. I tried using `tabular` however it produces too little spacing. This probably could be fixed, but feels like a hack. **EDIT** : I think I might have been misunderstood. I don _not_ ask how to write down inference rules themselves. I already know how to do it and I use `bussproofs` package for that. What I need is a way to put all those rules that I have in one table with nice spacing in it. Therefore I ask about an _environment_ that would be suitable for something like that. **EDIT(2)** : Ok, If someone thinks that `tabular` is the right approach, could you please tell me how to add some padding (margin) to all of the cells - both horizontal and vertical. I realize this might be a trivial question, however I have just spent half an hour looking for an answer.


title: bibtex with multiple aliases for the same reference

text: Is this something that I can do with `bibtex`? I have a few different manuscripts with some other collaborators and it would be easier for me if I could make `\cite{foo}` and `\cite{bar}` point to the same thing. Of course there are ways to work around this by changing `\cite{foo}` to `\cite{bar}` everywhere in the manuscripts, or by duplicating `bibtex` entries in the `.bib` file, but I would rather not do these things.


title: Add space after LaTeX command

text: I'd like to call a command from LaTeX, which looks like this:               bash -c "\myCommand -Tpdf #2.dot > #2.pdf"      `\myCommand` is replaced by string variable, however the space after is also removed so I get `something-Tpdf` which is of course not understood by bash. How can I force LaTeX to leave a space in this string? `\myCommand{}` doesn't help


title: translation entry in biblatex

text: I have the following reference: > V.L. Ginzburg and L.D. Landau, Zh. Eksp. Teor. Fiz. **20** (1950) 1064 which was translated in: > L. D. Landau, _Collected papers_ (Oxford: Pergamon Press, 1965) 546 Is there a good way to make an (one?) entry in a `bib(la)tex` file that gives something similar to: > V.L. Ginzburg and L.D. Landau, Zh. Eksp. Teor. Fiz. **20** (1950) 1064; > English translation: L. D. Landau, _Collected papers_ (Oxford: Pergamon > Press, 1965) 546 There is a `translator` field in `biblatex`, but it is not enough, since year, magazine etc. are different, too. My solution so far is `\cite[][English translation: L. D. Landau, Collected papers (Oxford: Pergamon Press, 1965) 546]{citekeyoriginal}`. Is there a better way? I am using the `numeric-comp` biblatex style.


title: How to include abstract into titlepage?

text: I don't want to have the abstract on a separate page but rather under the title. Also I then want to end the page and don't begin with the actual document. This is my minimal example:               \documentclass[a4paper,12pt,abstracton,titlepage]{scrartcl}          \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage{lmodern}          \titlehead{University}     \title{Title}     \subject{Subject}     \author{Author}          \begin{document}          \maketitle          \begin{abstract}     ...     \end{abstract}          \newpage          \tableofcontents     ...         \end{document}      I tried to use `\let\endtitlepage\relax` which was suggested in another question but it doesn't change anything. If I don't use titlepage then it's not centered vertically which I understand because the document is supposed to start right after it. So, how can I get this layout without creating a custom titlepage?