title: Installing new fonts for use with PDFlatex

text: I have been looking around the web for guides on how to install a new font for LaTeX with PDFlatex. There are plenty of guides, but I have a hard time trying to follow them. At the moment I have the following files and file structure:               -pwb(walbaum)       -fonts         -afm           -abobe             -walbaum               <18x .afm files>         -enc           <empty>         -map           <1x .map file>         -tfm           -abobe             -walbaum               <60x .tfm files>         -type1           -abobe             -walbaum               <18x .pfb files>         -vf           -abobe             -walbaum               <30x .vf files>       -tex         -latex           -abobe             -walbaum               <4x .fd files>               <1x .sty file>      So what is the next steps to be able to use the font? Where should I put the files, etc? And will I be able to use it for math equations? If you can explain it in a simple way, I would be glad. Bonus info: I am using TexMaker and PDFLatex on a Mac.


title: How to install a font in Windows?

text: > **Possible Duplicate:**   >  Manual font installation I'm using MiKTeX 2.9 with TeXworks 0.4.3 and have to use a specific font(Frutiger) provided by my university. The entire Latex template is available for download here: https://files.ifi.uzh.ch/ddis/oldweb/ddis/fileadmin/theses/general/DDIS- diploma-thesis-template-en.zip The standalone font file is available here: https://files.ifi.uzh.ch/ddis/oldweb/ddis/fileadmin/teaching/BaKoMa/frutiger.tar.gz According to the readme file, I have to install it like this:                Windows Installation Notes     ==========================          Usual location of texmf folder:          C:\texmf          1/ Copy the file frutiger.tar.gz into the parent directory of your texmf     folder (probably C:\).          2/ Unzip the file.          3/ Edit the file c:\texmf\miktex\config\updmap.cfg. (In case it     does not yet exist, create it as a new file.)  Add the line          Map frutiger.map          and save the file; then execute the following commands      in a command line window ("DOS shell"):          initexmf -u     updmap      I tried it without any success and googled for hours - looks like I'm lost... I would appreciate it a lot if someone could tell me what I'm doing wrong.


title: Font Installation in TeX Live 2013

text: I have the `.afm` and `.pfb` files for the Garamond Light Condensed fonts, I follow the instructions available here for installation. When I try to use them in my document they are not found by `pdflatex`; my log file contains               LaTeX Font Info:    Try loading font information for T1+pgm on input line 60.     LaTeX Font Info:    No file T1pgm.fd. on input line 60.      and               LaTeX Font Warning: Font shape `T1/pgm/m/n' undefined      I am using TeX Live 2013 on Ubuntu, installed with TeX tools rather than apt- get. This worked fine in TeX Live 2012. Why doesn't it work in TeX Live 2013?


title: Installing font (stix), sty not found

text: When I tried `usepackage{stix}` I got an error `.sty not found`. Assumed `stix` was not installed with TeX Live when I downloaded it last year. I use TeX Live 2012 on Windows (Vista) with pdfLaTeX. So now my first try at installing a font. I got the zip from CTAN and put the resulting "stix" folder in my `C:\program files\texlive\texmf-local\` directory. Then basic installation: `texhash`, `updmap`, `texhash`. Still same error, no `stix.sty`. I think my install failed. Either the "stix" folder is in the wrong place/format (but I'm the only user+admin on this pc) or `updmap --enable Map=stix.map` went wrong. Any ideas on how to solve this problem? I would like to at least be able to install a font from CTAN but not spend hours reading expert font/texlive documentation ...


title: Installing Lucida Bright font for use with TeXLive (Windows 7)

text: I've purchased Lucida bright from the TeX User Group (TUG) back in 2007. The link provided in the email I received back then still works, it downloads `lucida-basic.zip`. I also have installed a complete TeXLive 2012 distribution onto my Windows 7 PC, everything installed using all defaults (except a different location, on my `E:` drive instead of `C:` which is a modestly sized SSD). I use TeXWorks for editing my LaTeX files and calling pdfLaTeX, BibTex, and MakeIndex. That's all I used. The installation instructions that came with the font are very unclear about how to install on windows. What is clear though is that those instruction assume that I use MiKTeX, which I don't. Has anyone had any success installing Lucida Bright onto their Windows TeXLive distribution? How did you do it?


title: color a text line in a code {lstlisting}

text: I try to use the package `xcolor` into a `lstlisting` code as follows:               \begin{lstlisting}          \color{red}{text...}          \end{lstlisting}      but I can't color the "text..." comments. Someone could help me, please? Thanks!


title: MinionPro package conflicts with {esint}

text: I am using `MinionPro` font but it conflicts with `esint` package. The compiler always complains:               LaTeX Error: Too many math alphabets used in version normal.      Therefore I am forced to use the integral `minionint` provided by the font .               \usepackage[footnotefigures, minionint]{MinionPro}       \usepackage[T1]{fontenc}     %\usepackage{esint}  %     \usepackage{bm}        \usepackage{ngerman}     % ngerman: "a "s "o "u       So how to solve this issue by not using `esint` to achieve the same `\iint \iiint` integrals that the `esint` package produces. **Update:** As `MininoPro` will call `Mnsymbol` package by default, and `Mnsymbol` conflicts with `amssymb` package if `esint` been used. The solution is just commenting on `amssymb`.


title: tabular vertical align based on lowest line in a cell, not on the base line

text: I want to make an enumeration that looks like this               1.   This is some very long          sentence that might need          several lines. Does the          next cell line up with           the last line of this          paragraph?                 yes/no          2.   Did it work again?         yes/no      It seems that there is no easy way to do this in LaTeX. If I could just have a tabu(lar(x)) environment that works like this that would be great. But ideally I would like to have something like this with the output above:               \documentclass{article}     \usepackage[english]{babel}     \usepackage{lipsum}     \usepackage{array}          \newcommand{\yesno}[1]     {         \begin{tabular}{@{}b{.7\linewidth}b{.3\linewidth}@{}}             #1 & yes/no         \end{tabular}     }          \begin{document}              \begin{enumerate}             \item \yesno{\lipsum*[1]}             \item \yesno{\lipsum*[1]}         \end{enumerate}          \end{document}      Here I would like to give an extra option to the tabular environment that says that it has to align it's most upper line with the rest. Now I know there are some problems with putting a table inside an enumeration, so I don't mind if I have to make my own environment with my own enumeration. The hardest part is to get the alignment the way I want it.


title: picinpar in list environment

text: I want to use pininpar package inside a list environment. But as it can be seen from attached files, it doesn't work properly. Any help is appreciated.               \documentclass{article}     \usepackage{picinpar,graphicx}     \usepackage[a4paper,textwidth=18cm]{geometry}          \begin{document}          \fbox{     \begin{minipage}[t][11cm]{0.47\textwidth}      \parbox{0.95\textwidth}       {%       \begin{figwindow}[0,l,%         \fbox{\includegraphics[width=30mm]{1046.jpg}},%                       {This is a runner.}]        \begin{itemize}        \item       a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       item     \item       a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       item     \item       a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       item     \end{itemize}     \end{figwindow}     }       \end{minipage}     }     \hfill     \fbox{     \begin{minipage}[t][11cm]{0.47\textwidth}      \parbox{0.95\textwidth}       {%       \begin{figwindow}[0,l,%         \fbox{\includegraphics[width=30mm]{1046.jpg}},%                       {This is a runner}]       a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       item            a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       item            a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       a very long long longlong long longlong long long       item          \end{figwindow}     }       \end{minipage}     }          \end{document}


title: Gradient background for Beamer slides?

text: I'm trying to create a background gradient for a set of Beamer slides. This question seems to be doing more or less what I want but the answer does not work for me. If I paste the answer into a file I get this error:               ! Undefined control sequence.     <recently read> \backgroundsetup           l.4 \backgroundsetup                         {     ? x     No pages of output.     Transcript written on bg.log.      The linked question also doesn't do quite what I want because I would like the gradient to start in the center. I'm going for an effect like this. I prefer answers using tikz since I have worked with that.


title: What's the difference between \ref and \autoref?

text: I've always used `\ref` for referring to labelled items, but a LaTeX template I downloaded uses `\autoref` instead. What is the difference?


title: Animate code blocks beamer

text: I am trying to swap code blocks as animation. But I cannot put `verbatim` inside `\onslide` or `\visible`. I tried using a `savebox`, the problem is the second code blockis typesetted below the first one. I want the code blocks to show in same location. My code:               \documentclass{beamer}          \usepackage{fancyvrb}          \begin{document}          \begin{frame}[fragile]{Object}         \begin{center}          \onslide<2>{     \begin{Verbatim}[frame=single, fontsize=\fontsize{7pt}{8pt}\selectfont]     class int(object)      |  int(x[, base]) -> integer      |      |  Convert a string or number to an integer, if possible.  A floating point      |  argument will be truncated towards zero (this does not include a string      |  representation of a floating point number!)  When converting a string, use      |  the optional base.  It is an error to supply a base when converting a      |  non-string.  If base is zero, the proper base is guessed based on the      |  string content.  If the argument is outside the integer range a      |  long object will be returned instead.         \end{Verbatim}     }     \onslide<3>{     \begin{Verbatim}[frame=single, fontsize=\fontsize{7pt}{8pt}\selectfont]     class int(object)      |  int(x[, base]) -> integer      |         \end{Verbatim}         }         \end{center}     \end{frame}          \end{document}


title: minted and Unicode: symbols missing

text: Code:               \documentclass{article}     \usepackage{minted}          \begin{document}         \begin{minted}[mathescape,                        linenos,                        numbersep=5pt,                        gobble=2,                        frame=lines,                        framesep=2mm]{csharp}           string title = "This is a Unicode π in the sky"           /*           Defined as $\pi=\lim_{n\to\infty}\frac{P_n}{d}$ where $P$ is the perimeter           of an $n$-sided regular polygon circumscribing a           circle of diameter $d$.           */           const double pi = 3.1415926535         \end{minted}     \end{document}      And the result: ![enter image description here](http://i.stack.imgur.com/ZZ3rI.png) Note the missing π in the `title` variable. Using latest versions of packages from MikTeX distribution with XeLaTeX.


title: Lines missing in the graph

text: The code               \pgfplotsset{mystyle/.style={mark=none}}     \begin{figure}[t!]     \resizebox{.4\textwidth}{!}{\begin{tikzpicture}         \begin{axis}[title=QWS Dataset,             legend pos=outer north east,             ytick={0,0.2,...,1},             legend pos=outer north east,             legend style={draw=none},             xtick={0,1,...,10},             scaled ticks=false,             log ticks with fixed point={1000 sep=},             axis x line=bottom,             axis y line=left,             axis line style=-,             minor tick style={draw=none},             ylabel = Fitness,            cycle list={                     black,thick,densely dotted\\                     blue,densely dashed\\                     red,solid\\                 },             xlabel = Number of Generations,              every axis legend/.append style={xshift=-10pt}             ]             %manman             \addplot+[mystyle] plot  coordinates{(1,0.1)(2,0.1)(3,0.1)(4,0.1)(5,0.1)(6,0.1)(7,0.1)(8,0.1)(9,0.1)(10,0.1)};         \addplot+[mystyle] plot  coordinates{(1,0.5)(2,0.5)(3,0.5)(4,0.5)(5,0.5)(6,0.5)(7,0.5)(8,0.5)(9,0.5)(10,0.5)};         \addplot+[mystyle] plot  coordinates{(1,0.8)(2,0.8)(3,0.8)(4,0.8)(5,0.8)(6,0.8)(7,0.8)(8,0.8)(9,0.8)(10,0.8)};     \legend{FV,FC,TAS}         \end{axis}     \end{tikzpicture}}     \caption{Experiment Results}\vspace{-5mm}     \end{figure}       the graph ![enter image description here](http://i.stack.imgur.com/Znwje.png) I wish to have three lines, but why only two lines are there?


title: Problems with URL's size

text: I would like to change the font size of the URLs in my latex document. I did:               \begin{document}     ...     \usepackage{url}          Figure 1: \scriptsize{\url{my url}}\\     Figure 2: \scriptsize{\url{my url}}     ...      The problem is that these commands make the font size of the "Figure 2" also in `\scriptsize` and I don't want that. Can someone help me?


title: How to align text inside pie chart?

text: I'm creating pie chart using code below:               \begin{center}     \begin{pspicture}(-5,-4)(4,4)     \psset{unit=1.2}     \psChart[userColor={black!10,black!40},chartSep=10pt,shadow,shadowsize=3pt]{\above,\below}{}{3}     \bfseries%     \rput(psChartI1){TEXTA \above \%}\rput(psChartI2){TEXTB \below \%}     \end{pspicture}     \end{center}      Currently TEXTA & TEXTB are aligned towards circumference, is there any way to center align this text? UPDATE: (with MWE);               \documentclass{article}     \usepackage{pstricks-add}     \usepackage{pgfplots, pgfplotstable}     \usepackage{datatool}     \usepackage{tikz}     \begin{document}     \begin{center}     \begin{pspicture}(-5,-4)(4,4)     \psset{unit=1.2}     \psChart[userColor={black!10,black!40},chartSep=10pt,shadow,shadowsize=3pt]{30,70}{}{3}     \bfseries%     \rput(psChartI1){TEXTA 30 \%}\rput(psChartI2){TEXTB 70 \%}     \end{pspicture}     \end{center}     \end{document}


title: Table Line above?

text: \begin{center}     \captionof{table}{Register Table} \label{tab:title}      \begin{tabulary}{1.2\textwidth}{| p{3cm} || C | p{3cm} | C | C p{1cm} | }     Procedure        & Expected Outcome         & Pass or Fail           \\ \hline     1. Click on Register button when one or more fields are empty   & An error message should     error beside affected fields       & yes  \\ \hline               \end{tabulary}       \end{center}      Struggling with organising this table, i.e. getting the very top line to draw on top of the rows? Also any ideas on why the pass or fail column text is positioned to the far left when I need it in the center?


title: Reusing the current argument's number with xparse

text: I read in xparse's documentation that `\l__xparse_current_arg_int` referred to "the number of the current argument being set up". I'm having trouble understanding how to access and use it, however. For example, how would you rely on that variable to produce ordered lists (i.e., exactly what replacing `itemize` with `enumerate` would yield) in the following example?               \documentclass{article}     \usepackage{xparse}     \NewDocumentCommand\mylist{>{\SplitList{;}}m}         {         \begin{itemize}             \ProcessList{#1}{ \insertitem }         \end{itemize}         }     \newcommand\insertitem[1]{\item #1}          \begin{document}          Here's a list: \mylist{a;b;c;d;e;f;g}          \end{document}      I was hoping that a simple `\item[\l__xparse_current_arg_int]` would work, but it doesn't.


title: Fixed right margin of longtable

text: I have several equations in my paper, with variables explained below in the form of `longtable` (so it can be split into two pages). I want my table to be as wide as the text. I try to use `\LTright` but it doesnt work (`\LTleft` works fine)...(why???) I can define the width of the last column with `p{xcm}` but thanks to second column every table differs in the width and I dont want to test the width for every single table. I want to have the margin between table and right edge of the paper fixed.               \documentclass[a4paper, 12pt,titlepage]{report}          \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[utf8]{inputenc}     \usepackage[czech]{babel}     \usepackage{fullpage}     \usepackage{listings}     \usepackage{palatino, url, multicol}     \usepackage{graphicx}     \setlength{\parindent}{1cm}     \usepackage{indentfirst}     \setcounter{secnumdepth}{3}     \usepackage{mdframed}     \usepackage[usenames,dvipsnames]{xcolor}     \definecolor{light-gray}{gray}{0.85}     \setcounter{tocdepth}{3}     \usepackage{titlesec}     \titleformat{\chapter}[display]          {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}       \titlespacing*{\chapter}{0pt}{-20pt}{40pt}     \usepackage{multirow}     \usepackage{hhline}     \usepackage{enumerate}     \usepackage{here}     \usepackage{longtable}     \usepackage[bottom]{footmisc}     \usepackage[font={small,it}]{caption}     \usepackage{ctable}          \usepackage[left=3.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}          \begin{equation}       EVA = NOPAT - WACC \cdot Capital     \end{equation}          \setlength\LTleft{-0.2cm}     \setlength\LTright{-10cm} %I want 2.5 cm of the margin     \begin{longtable}{llll}       kde:  & NOPAT &=& Zisk z operativní činnosti podniku po dani (ang. "net operating profit after taxes") \\        & WACC &=& Průměrné vážené náklady kapitálu \\        & Capital &=& Aktiva potřebná k hlavnímu provozu podniku   \\     \end{longtable}     \setlength{\parindent}{1cm}          \lipsum[1]          \end{document}


title: How to break a long expression in the denominator of a fraction?

text: I used the split command to break my equation but I receive the error:               ! Missing } inserted.     <inserted text>                      }     l. \end {split}      The code in `.tex` file is as follows:               \begin{equation} \label{eq:5}      \begin{split}      A =1-&\frac{h_{FS}p_{I}p_{DN}p_{FS} +h_{F}p_{I}p_{DN}p_{F} + h_{UNC}p_{I}p_{UN}}{h_{G}+h_{V}+p_{I}(h_{I}+h_{DMC}p_{DM}+h_{UNC}p_{UN}+h_{UMC}p_{UM}+h_{DNC}p_{DN}+h_{FS}p_{DN}p_{FS} +\\      &h_{GD}p_{DN}p_{GD} + h_{F}p_{DN}p_{F})}       \end {split}     \end{equation}      Actually, I can see the produced equation in the PDF and it's   correct but this error exists. I want to submit my source file to a journal, but the PDF cannot be generated in the submission process. Any help is really appreciated.


title: Bytefield: Word Group below blocks

text: I would like to get an effect similar to bytefield's letf/right word groups on the bottom of a bytefield. I didn't see any obvious way to do this in the bytefield documentation. My Latex macro knowledge is not particularly strong, is there a good way to extend bytefield to support a bottom/top word group? Exact request best explained by MWE:               \documentclass{article}     \usepackage[layout=letterpaper,margin=1in]{geometry}     \usepackage[endianness=big]{bytefield}     \bytefieldsetup{boxformatting={\centering\footnotesize}}     \begin{document}          A 32-bit piece of data is divided into a header and some subfields. The     header is further subdivided into two parts          \begin{center}     \begin{bytefield}[bitwidth=1.2em]{32}       \bitheader{0-31} \\       \bitbox{4}{Header.A}       \bitbox{4}{Header.B}       \bitbox{20}{Subfield 1}       \bitbox{4}{Subfield 2}     \end{bytefield}     \end{center}          \noindent     Word groups are the right look / style, but only go on the left/right?          \begin{center}     \begin{bytefield}[bitwidth=1.2em]{32}       \begin{leftwordgroup}{Header}         \bitheader{0-31} \\         \bitbox{4}{Header.A}         \bitbox{4}{Header.B}         \bitbox{20}{Subfield 1}         \bitbox{4}{Subfield 2}       \end{leftwordgroup}     \end{bytefield}     \end{center}          \noindent     I would like the brace / label below the whole header section, e.g.:     %     \begin{verbatim}          +-----------------------------------------     | Header.A | Header.B |      Subfield 1...     +-----------------------------------------     \                    /      ---------\/---------             Header          \end{verbatim}          \end{document}      ![MWE Rendered](http://i.stack.imgur.com/iphjy.png)


title: multirow that has more lines than the rows it spans

text: I am sorry if this is already has been asked, but I can't found any solution. When I have multirow, that has bigger height that all rows is spanned, this is doesn't stretch the height of row. In the example here the text started with 'Unproperly height' doesn't automatically set properly height of row.               \documentclass[a4paper,oneside]{book}     \usepackage[pdfborder={0 0 0}, breaklinks=true, pdftex=true]{hyperref}     \usepackage[paper=a4paper, left=1.5cm, right=1cm, top=1.7cm, bottom=2.5cm]{geometry}     \usepackage{ltablex}     \usepackage{calc}     \usepackage[utf8]{inputenc}     \usepackage{multirow}     \usepackage{color}     \usepackage{colortbl}          %For tables     \newdimen{\newtblsparewidth}     \newdimen{\newtblstarfactor}     \setlength{\extrarowheight}{5pt}     \definecolor{Blue}{rgb}{0,0,1}     \definecolor{White}{rgb}{1,1,1}     \arrayrulewidth=1pt          \setlength{\parskip}{1.7ex}          \begin{document}          \section{Section}     This section defines options.          \setlength{\newtblsparewidth}{\linewidth-2\tabcolsep-2\tabcolsep-2\tabcolsep-2\tabcolsep}     \setlength{\newtblstarfactor}{\newtblsparewidth / \real{3}}          \begin{tabularx}{\linewidth}{X|X|l|}     \multicolumn{1}{|>{\columncolor{Blue}\color{White}}m{0.33\newtblsparewidth}}{\centering \textbf{Name}} & \multicolumn{1}{|>{\columncolor{Blue}\color{White}}m{0.33\newtblsparewidth}}{\centering \textbf{Possible values}} & \multicolumn{1}{|>{\columncolor{Blue}\color{White}}m{0.33\newtblsparewidth}|}{\centering \textbf{Description}} \\ *\nobreakhline     \multicolumn{1}{|m{0.33\newtblsparewidth}}{Enabled} &      \multicolumn{1}{|m{0.33\newtblsparewidth}}{Boolean} &      \multicolumn{1}{|m{0.33\newtblsparewidth}|}{Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been}     \\ \hline     \multicolumn{1}{|m{0.33\newtblsparewidth}}{Has user} &      \multicolumn{1}{|m{0.33\newtblsparewidth}}{Integer} &      \multicolumn{1}{|m{0.33\newtblsparewidth}|}{\multirow{2}{0.33\newtblsparewidth}{\textbf{Unproperly height} Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem      Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.      It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.     }} \\ \cline{1-2}     \multicolumn{1}{|m{0.33\newtblsparewidth}}{Not User} &      \multicolumn{1}{|m{0.33\newtblsparewidth}|}{Integer} &      \multicolumn{1}{|l|}{} \\ \hline          \multicolumn{1}{|m{0.33\newtblsparewidth}}{Pass} &      \multicolumn{1}{|m{0.33\newtblsparewidth}}{String} &      \multicolumn{1}{|m{0.33\newtblsparewidth}|}{Lorem Ipsum is simply dummy text of the printing and typesetting industry. .} \\ \hline          \end{tabularx}          \end{document}      This text is override the next row. Here is same in pdf http://web- engineering.com.ua/mtest4.pdf How I can force row auto height i this case?


title: beamer: How to place images behind text (z-order)

text: When writing a beamer presentation, I often use textblocks containing a single includegraphics to place pictures freely on a slide, e.g.               \begin{textblock*}{0.51\textwidth}(10.8mm,56.8mm)       \includegraphics[width=50mm]{picture}     \end{textblock*}      Unfortunately, images are alwyas placed above the textbody of the slide with respect to the z-order, i.e. the pictures overlap and cover the text. Sometimes this is very inconvenient, especially if the picture itself is not square-shaped. I read about using beamer background templates as a solution, but this not work in my case. Our corporate beamer style also uses background templates which interferes with this solution. Moreover, using textblocks does not seem to work inside a beamer background template. I also read about wrapping everything in tikz to get the correct z-order. But this additional layer code is also very inconvient when you need it on every other slide. So, is there an easier solution to place pictures anywhere on the slide and have them behind the text?


title: TikZ images won't compile externally

text: I have a number of large plots which exhaust memory when I try to compile them with `xelatex`, so I am using `lualatex` instead, which is able to compile them without major difficulty. However, I am unable to get my documents to compile externally. I normally use Texmaker as my editor and build with `xelatex`, but the problems with externalization happen also when I run `pdflatex --shell-escape` or `xelatex -shell-escape` from the command line. If I run `pdflatex --shell-escape <filename>.tex`, pdflatex runs with \write18 enabled:               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)      \write18 enabled.     entering extended mode     (./external.tex      ...but terminates with this error:               ===== 'mode=convert with system call': Invoking 'lualatex --shell-escape -halt-     on-error -interaction=batchmode -jobname "external-figure0" "\def\tikzexternalr     ealjob{external}\input{external}"' ========     This is LuaTeX, Version beta-0.76.0-2013052800 (rev 4627)       \write18 enabled.     Syntax Error: Couldn't read xref table     Syntax Warning: PDF file is damaged - attempting to reconstruct xref table...     Syntax Error: Couldn't find trailer dictionary     Syntax Error: Couldn't read xref table          !pdfTeX error: pdflatex (file ./external-figure0.pdf): xpdf: reading PDF image      failed      ==> Fatal error occurred, no output PDF file produced!      If I run `xelatex --shell-escape <filename>.tex`, xelatex also runs with \write18 enabled:               This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013) (format=xelatex 2013.9.6)  18 SEP 2013 18:14     entering extended mode      \write18 enabled.      %&-line parsing enabled.     **external.tex     (./external.tex      ... but in this case, lualatex stops with this error:               ===== 'mode=convert with system call': Invoking 'lualatex --shell-escape -halt-     on-error -interaction=batchmode -jobname "external-figure0" "\def\tikzexternalr     ealjob{external}\input{external}"' ========     This is LuaTeX, Version beta-0.76.0-2013052800 (rev 4627)       \write18 enabled.     Syntax Error: Couldn't find trailer dictionary     Syntax Error: Couldn't read xref table     ! Unable to load picture or PDF file 'external-figure0.pdf'.     <to be read again>                         }     l.34 \end{tikzpicture}          ?       and waits for input. Here is my MWE:               \documentclass[tikz]{standalone}     \usepackage{pgfplots}     \usepgfplotslibrary{external}      \pgfplotsset{compat=newest}          \tikzset{external/system call={lualatex --shell-escape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}}     \tikzexternalize          \begin{document}     \begin{tikzpicture}          \begin{axis}[     height=9cm,     width=9cm,     grid=major,     ]     \addplot {-x^5 - 242};     \addlegendentry{model}     \addplot coordinates {     (-4.77778,2027.60977)     (-3.55556,347.84069)     (-2.33333,22.58953)     (-1.11111,-493.50066)     (0.11111,46.66082)     (1.33333,-205.56286)     (2.55556,-341.40638)     (3.77778,-1169.24780)     (5.00000,-3269.56775)     };     \addlegendentry{estimate}     \end{axis}     \end{tikzpicture}     \end{document}      I'm using Tex Live 2013. I also had this problem in Tex Live 2012. It's not clear to me what's wrong here.


title: How to include pdf and stretch it over whole page

text: I want to include a pdf which has to cover the whole page with larger margins, but there needs to be room to put a caption under it. The pdf file is a table.               \begin{figure}[ht]     \begin{center}     \includegraphics[width=1.5\textwidth,height=1.5\textheight,keepaspectratio]{(IminusA)inverse.pdf}     \end{center}     \end{figure}      However, the pdf file does not fit on the page and it shows only a part of it. Does anyone knows how to solve this problem?


title: Songs package: Vertical spacing between songs

text: I am wondering whether it is possible to remove any extra vertical spacing between songs such that all songs have the same distance between each other. In the attached example it can be seen how the two songs are separated. I would like them to be close to each other with a fixed distance. The problem only appears for \songpos{0}. ![Example of vertical spacing](http://i.stack.imgur.com/fygfa.png) Minimal working example: \documentclass[a5paper,10pt]{article} \usepackage[latin1]{inputenc} \usepackage[danish]{babel} \usepackage[T1]{fontenc} \usepackage[top=2cm, bottom=2cm, left=1.2cm, right=1.2cm]{geometry} \usepackage[lyric]{songs} %change between chorded, lyric, slides, rawtext \usepackage{setspace} \usepackage{enumitem} \usepackage{fancyhdr} \pagestyle{fancy} \renewcommand{\sectionmark}1{% \markboth{\MakeUppercase{#1}}{}} \fancyhead[L]{\textit{\MakeUppercase{Morgenbøn i Nordvest}}} \songcolumns{2} \columnsep=.5cm \setdescription{style=sameline,leftmargin=8mm} \songpos{0} \newindex{titleidx}{titlfile} \newauthorindex{authidx}{authfile} \newscripindex{scripidx}{scrpfile} \setlength{\cbarwidth}{0pt} %removes vertical line to the left of a chorus \setlength{\sbarheight}{0pt} %removes horizontal lines after a song %\renewcommand\makeprelude{% %\resettitles %\setstretch{.8}\large\bfseries %\begin{minipage}[t]{6mm} %\thesongnum. %\end{minipage} %\begin{minipage}[t]{5cm} %\flushleft\large\bfseries\songtitle %\par %\vspace{1mm}\setstretch{1}\normalfont\tiny\showrefs %\tiny\bfseries\showauthors %\end{minipage} %} % %\renewcommand\makepostlude{} \begin{document} \begin{songs}{titleidx,authidx,scripidx} \beginsong{Gud er din hvile}[ by={}] \beginchorus \chordsoff Gud er din hvile, Kristus din styrke, Ånden er nær som en trofast ven. Herren har hørt dig, nådig berørt dig, Herren vil rejse dig op igen \endchorus \chordson \endsong \beginsong{I min Gud har jeg fundet styrke}[ by={}] \beginchorus \chordsoff I min Gud har jeg fundet styrke I min Herre bor min sang. For han skænker frelse og fred. På ham jeg stoler, min frygt forgår, På ham jeg stoler, min frygt forgår. \endchorus \chordson \endsong \beginsong{Jesus, Guds søn}[ by={Henrik E. Frederiksen, Jacques Berthier}] \beginchorus \chordsoff Jesus, Guds søn, du lys i mit indre lad ikke mørket få magten i mit sind Jesus, Guds, søn, du lys i mit indre luk mig op for din kærligheds Ånd \chordson \endchorus \endsong \beginsong{Jesus remember me}[ by={}] \beginchorus \chordsoff Jesus remember me when you come into your kingdom. Jesus, remember me when you come into your kingdom \endchorus \chordson \endsong \beginsong{Jordens mørke er ikke mørke}[ by={}] \beginchorus \chordsoff Jordens mørke er ikke mørke, Gud, for dig: som dagens klare lys bliver natten. \chordson \endchorus \endsong \beginsong{Kom til os}[ by={Henrik E. Frederiksen, Jacques Berthier}] \beginchorus [Em]Kom til [Bm/D]os, Gud [C]Hel[Am6]lig[B]ånd, [Em]tænd i vor [C]ånd din [C6]kærligheds [B]flamme. [Em]Kom til [Am]os, Gud [D]Hellig[G]ånd, [C]kom til [Am]os, [Em]Gud [Bsus]Hel[B]lig[Em]ånd. \endchorus \endsong \beginsong{Lovpris Gud, min sjæl}[ by={Henrik E. Frederiksen, Jacques Berthier}] \beginchorus \chordsoff Lovpris Gud, min sjæl for helligt er hans navn Lovpris Gud, min sjæl, han leder mig til liv \chordson \endchorus \endsong \beginsong{Lær al din uro}[] \beginchorus [Am]Læg al din [Dm7]uro, [G]læg al [Cmaj7]bekymring, [F]for i Guds [Dm6]nærhed [Esus4]mangler [E]du [Am]intet. [Am]Læg al din [Dm7]uro, [G]lær al [Cmaj7]bekymring: [F]Du har [Dm6]alt [E]i [Am]Gud. \endchorus \endsong \beginsong{O Lord, hear my prayer}[ by={Jacques Berthier, Henrik E. Frederiksen}] \beginchorus O Lord, hear my prayer, O Lord, hear my prayer. When I call answer me. O Lord, hear my prayer, Lord, hear my prayer. Come and listen to me. \endchorus \endsong \beginsong{Syng lovsang hele jorden}[ by={Jacques Berthier, Estrid Hessellund og Sindre Eide}, cr={1989}] \beginchorus \chordsoff Syng lovsang hele jorden Syng lovsang for vor Gud Syng lovsang hele jorden Syng lovsang for vor Gud \chordson \endchorus \endsong \beginsong{Tag hånd om mig, Gud}[] \beginchorus Tag [Eb]hånd [Bb]om mig, [Cm]Gud, dig jeg [Fm]stoler [Bb]på, du [Gm]viser mig [Fm]vej [Eb/G]til [Ab]li[Eb]vet. [Cm/Eb]Hos [Bb/D]dig er [Cm]glæ[Eb/Bb]de, [Ab]fuld[-/C]kommen [Eb/Bb]glæ[Bb]de. \endchorus \endsong \beginsong{Vent på Herren}[] \beginchorus \chordsoff Vent på Herren, vær ved godt mod Han vil altid lede din fod Bed til Gud din Himmelske Far Bed frimodigt, du skal få svar Evigt lovet være Hans navn For vor tro den tryggeste havn Lad ej sorg i hjertet slå rod Vent på Herren vær ved godt mod \chordson \endchorus \endsong \beginsong{Wait for the Lord}[] \beginchorus \chordsoff Wait for the Lord, whose day is near. Wait for the Lord: keep watch, take heart! \chordson \endchorus \endsong \end{songs} \end{document}


title: Can I install llncs with tlmgr?

text: llncs is a package created by Springer, available from the Springer authors' instructions page. tlmgr doesn't find it online. I have installed it many times by hand, and find it annoying. I have to download the zip file and copy everything into the right place. Is there a way to "point" tlmgr to the downloaded zip file and let it do the installation work for me, the way yum does for downloaded rpms?


title: How to use \date{\today} without using \maketitle?

text: I am making my own title page. I'd like Latex to display the date automatically using `\date{\today}` but this does not work, since I am not doing `\maketitle` So instead of setting the date manually myself and worry about updating it, is there a way to make Latex use `\date{\today}` in my own title page? MWE               \documentclass[12pt,notitlepage]{article}%     %\usepackage{datetime} did not help     \newcommand*{\myTitle}{\begingroup      \centering      \vspace*{\baselineskip}           {\LARGE My Title}% Title     \vspace*{1\baselineskip}         \scshape % Small caps     My project         \vspace*{1\baselineskip}     University of Main Street\\[\baselineskip]          \vspace*{5\baselineskip}           Written by \\[\baselineskip]     {\Large John Due\par}          \vspace*{1\baselineskip}     \scshape     \date{\today}     %\date{\currenttime}  does not work          \endgroup}          \begin{document}     \pagestyle{empty}      \myTitle     \clearpage          This is my report     \end{document}      ![Mathematica graphics](http://i.stack.imgur.com/pbjzz.png) I googled and gave up after 15 minutes search.


title: Drawing picture from math's test

text: In Finnish matriculation examination there were the following problem. How can one draw those pictures using LaTeX?   1. A square ABCD is in coordinate system such that AB is on the x-axis and A=(0,0), B=(1,0). We rotate the square around B such that BC is on the x-axis, next around C, D such that A touches again the x-axis. Draw the picture of position of A with respect to the time.   2. A regular hexagon ABCDEF is in coordinate system such that AB is on the x-axis and A=(0,0), B=(1,0). We rotate the hexagon around B such that BC is on the x-axis, next around C, D and so on until A touches again the x-axis. Draw the picture of position of A with respect to the time. Hand drawn diagrams are on http://www.mafyvalmennus.fi/images/uploads/pmyo14.pdf pages 32 and 33 (or 34 and 35 depending how to count those pages).


title: How to expand equation to textwidth?

text: I have an equation like so:               \begin{equation}         \label{eq:helper_params}         \tilde{B} = \begin{bmatrix} CB\\B \end{bmatrix}, \tilde{I} = \begin{bmatrix} I_p\\0 \end{bmatrix},         \tilde{Q} = \begin{bmatrix} Q_e & 0\\0 & Q_x \end{bmatrix}, \tilde{A} = \begin{bmatrix} \tilde{I}\quad \tilde{F} \end{bmatrix}     \end{equation}      which produces this: * * * ![enter image description here](http://i.stack.imgur.com/48P2S.png) * * * I would like to automatically expand the space between each matrix such that the whole equation fills the textwidth (or linewidth or any other predefined similar constant). I want to achieve something similar to this: * * * ![enter image description here](http://i.stack.imgur.com/fhlpA.png) * * * Are there any mechanisms for this goal?


title: marvosym symbols not working

text: I wanted to use some symbols from `marvosym` but they don't seem to work in my distribution.               \documentclass{article}     \usepackage[english]{babel}     \usepackage{marvosym}          \begin{document}          $\Bat$     $\Bicycle$     $\Coffeecup$      $\Frowny$      $\Heart$     $\Industry$      $\Football$     $\Mobilefone$     $\Smiley$     $\Womanface$     $\Gentsroom$     $\Ladiesroom$     $\Taurus$     $\Sagittarius$     $\WomanFace$     $\ManFace$     $\Yingyang$     \end{document}       I get a PDF output like: ![enter image description here](http://i.stack.imgur.com/IxGiH.png) Log highlights:                 This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2013.12.5)            ...            ("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"       Package: fontenc 2005/09/27 v1.99g Standard LaTeX package       ("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"       File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file       LaTeX Font Info:    Redeclaring font encoding T1 on input line 43.       ))            ...            ("C:\Program Files\MiKTeX 2.9\tex\latex\marvosym\marvosym.sty"       Package: marvosym 2011/07/20 v2.2 Martin Vogel's Symbols font definitions       )            ...            LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.       LaTeX Font Info:    ... okay on input line 6.       LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.       LaTeX Font Info:    ... okay on input line 6.       LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.       LaTeX Font Info:    ... okay on input line 6.       LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.       LaTeX Font Info:    ... okay on input line 6.       LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.       LaTeX Font Info:    ... okay on input line 6.       LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.       LaTeX Font Info:    ... okay on input line 6.       LaTeX Font Info:    External font `cmex10' loaded for size       (Font)              <7> on input line 8.       LaTeX Font Info:    External font `cmex10' loaded for size       (Font)              <5> on input line 8.       LaTeX Font Info:    Try loading font information for U+mvs on input line 8.            ("C:\Program Files\MiKTeX 2.9\tex\latex\marvosym\umvs.fd")       Missing character: There is no ý in font cmr10!       Missing character: There is no ® in font cmr10!       Missing character: There is no § in font cmr10!       Missing character: There is no Œ in font cmr10!       Missing character: There is no © in font cmr10!       Missing character: There is no þ in font cmr10!       Missing character: There is no á in font cmr10!       Missing character: There is no è in font cmr10!       Missing character: There is no þ in font cmr10!       Missing character: There is no ÿ in font cmr10!      I'm using TeXstudio 2.6.6. My MiKTeX package manager has a load-on-demand setup so maybe I'm missing packages with other fonts? At the moment I'm pretty clueless how to solve these missing character errors (I presumed they would be installed with the package). Any ideas how can I solve this? (I hope the question is not too localised but I do have a pretty standard setup.)


title: tikzpicture : hide only one "plot" from legend

text: Found the answer: pgfplots: prevent single plot from being listed in legend I plot multiple things to one tikzpicture. Because the plotting order is important to me, to avoid overlaying of the hatch over plotted lines, I need to plot the hatches first. But now I don’t want to show the labels for all the hatch-plots (only for one). How can I leave / hide some plots form legend or do I need to use a secondary axe?               \documentclass[a4paper]{article}     \usepackage{pgfplots}     \usepgflibrary{shapes.geometric}     \usetikzlibrary{patterns,arrows}     \begin{document}          \definecolor{plotrangecolor}{HTML}{D8D8D8} %{D8D8D8}          %%     %% http://tex.stackexchange.com/questions/29359/pgfplots-how-to-fill-the-area-under-a-curve-with-oblique-lines-hatching-as-a     %%        \tikzset{     hatch distance/.store in=\hatchdistance,     hatch distance=10pt,     hatch thickness/.store in=\hatchthickness,     hatch thickness=2pt     }               \makeatletter     \pgfdeclarepatternformonly[\hatchdistance,\hatchthickness]{flexible hatch}     {\pgfqpoint{0pt}{0pt}}     {\pgfqpoint{\hatchdistance}{\hatchdistance}}     {\pgfpoint{\hatchdistance-1pt}{\hatchdistance-1pt}}%     {     \pgfsetcolor{\tikz@pattern@color}     \pgfsetlinewidth{\hatchthickness}     \pgfpathmoveto{\pgfqpoint{0pt}{0pt}}     \pgfpathlineto{\pgfqpoint{\hatchdistance}{\hatchdistance}}     \pgfusepath{stroke}     }                    \begin{tikzpicture}     \begin{axis}[         xmin=1, xmax=15,         domain=1:15,         ymin=0, ymax=1.1,         no markers,         enlargelimits=false,         xlabel={x},         ylabel={y},          legend style={             cells={anchor=west},             legend pos=south east         }         ]          \addplot[mark=none,       domain=2:4,       pattern=flexible hatch,       hatch distance=10pt,       hatch thickness=0.5pt,       draw=none,       pattern color=plotrangecolor,       area legend] {2} \closedcycle;          \addplot[mark=none,       domain=8:14,       pattern=flexible hatch,       hatch distance=10pt,       hatch thickness=0.5pt,       draw=none,       pattern color=plotrangecolor,       area legend] {2} \closedcycle;               \addplot  coordinates {(1,1) (4,0.4) (7,0.6) (8,0.5)     (14,0.2)};     \addplot  coordinates {(1,0.2)  (3,0.3)  (5,0.7)  (9,1)      (14,0.5)};               \addlegendentry{ range }        \addlegendentry{ dont show this}            \addlegendentry{value 1}       \addlegendentry{value 2}                    \end{axis}     \end{tikzpicture}          \end{document}      ![Output of the Example](http://i.stack.imgur.com/obcIB.png)


title: How to vertically align some text in a table?

text: ## EDIT I was given the following code for a table template (modified in order to take into account David's remarks below) :               \documentclass[12pt, a4paper, final]{article}      \usepackage{array}     \usepackage{multirow}     \usepackage{booktabs}          % This command computes and creates a vertical space     % depending on the number of rows to compensate for.     % It makes use of the counter verticalcompensationrows     % and the length \verticalcompensationlength which equals     % \aboverulesep plus \belowrulesep     \newlength{\verticalcompensationlength}     \setlength{\verticalcompensationlength}{\aboverulesep}     \addtolength{\verticalcompensationlength}{\belowrulesep}     \newcounter{verticalcompensationrows}     \newcommand{\verticalcompensation}[1]{%     \setcounter{verticalcompensationrows}{#1}%     \addtocounter{verticalcompensationrows}{-1}%     \vspace*{-\value{verticalcompensationrows}\verticalcompensationlength}%     }          % This command reimplements \multirow to compensate     % for the vertical offset, but looses some functionality     % of the \multirow command (not discussed here).     \newcommand{\multirowbt}[3]{%     \multirow{#1}{#2}{\verticalcompensation{#1}#3}%     }          \begin{document}     \begin{tabular}{lp{13cm}}     \toprule     \multicolumn{2}{c}{Table title or something else ...}  \\     \midrule     \multirowbt{4}{*}{My name} & A bit of text  \\     \cmidrule{2-2}      & A bit more text A bit more text A bit more text A bit more text  \\     \cmidrule{2-2}      & A bit more text A bit more text A bit more text A bit more text \\     \cmidrule{2-2}      & A bit more text A bit more text A bit more text A bit more text \\     \midrule     \multirowbt{3}{*}{Your name} & Some text \\     \cmidrule{2-2}      & More text More text More text \\     \cmidrule{2-2}      & More text More text More text \\     \bottomrule     \end{tabular}     \end{document}      It outputs the table shown in Figure 1 below : ![enter image description here](http://i.stack.imgur.com/knln0.png) However, when I have some text that covers more than one line, the vertical aligned in column 1 is no longer OK, as demonstarated by TABLE 2. In his answer below, David gives a solution to this problem using \raisebox. This works, but it requires me to change the amount the box has to be shifted for each column of each table. I was wondering whether anyone knew of a way to get Latex to center this content automatically.


title: Is there a generic workflow for solving 'Option clashes' errors?

text: A brief search shows over 20 questions related to package specific option clashes. Maybe the experts can help here - **is there a generic workflow for solving this, that is commonly used?** Last night my document still compiled, today I did some minor changes and suddenly my glossary, index and citations don't show up because of an option clash. Is there a way to check package inclusion orders or even maybe a package that handles package inclusion order? Currently I'm jumping around in my .log file but not having any fun with that. A cat, grep, sort sequence on all my includes yield a list of packages alphabetically so it's easy to detect doubles and work towards fixing this.               cat *filenames_here* | grep 'usepackage' | sort > dump_package_depend.txt      Is there a LaTeX/better/systematic way to do this?


title: Set math fonts to predefined color

text: I am trying to define math text is some predefined color as in my preamble:               \setbeamercolor{math text}{pmsGreen}     \everymath{\color{pmsGreen}}     \everydisplay{\relax \ifx \\\@eqncr \else \color{pmsGreen}\fi }      NB: I have not understood the last line, just found it somewhere. But the problem is while mathmode is in pmsGreen, text inside eqnarray is still in default color. How can I manage this? EDIT: A minimal example:                \documentclass[10pt,a4paper,xcolor=dvipsnames,xcolor=table]{beamer}     \definecolor{pmsGreen}{RGB}{0,156,121}          \mode<presentation>     {     \usetheme{Darmstadt}     \usetheme{Warsaw}     \setbeamercovered{transparent}     }     \setbeamercolor{math text}{pmsGreen}     \everymath{\color{pmsGreen}}     \everydisplay{\relax \ifx \\\@eqncr \else \color{pmsGreen}\fi }     \DeclareMathOperator{\Tr}{Tr}     \DeclareMathOperator{\im}{Im}          \begin{document}     $1=2$     \begin{eqnarray}       1=2\\       2=3     \end{eqnarray}     \end{document}      NB: I have seen examples where the sample code shows the output as well, dont know how to do that.


title: Optionally not printing page number citations using Biblatex and Biber

text: my question: Is it possible to optionally leave page number citations out when compiling a document? For Example when I write `\parencite[see][225-226]{7.01:1}`. I would like the corresponding citation to look like sth. "(see Herbst-Damm & Kulik, 2005)". My minimal example:               \documentclass[]{article}     \usepackage[english, american]{babel}     \usepackage[autostyle=true]{csquotes}          \usepackage[         backend=biber,         style=apa,     ]{biblatex}          \addbibresource{biblatex-apa-test-references.bib}          \usepackage[]{hyperref}     \hypersetup{         colorlinks=true,     }          \DeclareLanguageMapping{american}{american-apa}          %% ##############################     \begin{document}         Lorem ipsum dolor sit amet \parencite[see][225-226]{7.01:1}.         At vero eos et accusam et justo duo dolores et ea rebum \parencites[see][143-168]{7.01:13a}[226]{7.01:1}.              \printbibliography[]     \end{document}      Is this possible? Maybe be using a macro (I have no experience programming them).


title: Combining multiple .eps files into a single figure

text: I have 13 graphs that I am generating with gnuplot and I want to combine them into a single figure that spans two columns of a paper. An example of what I want to do is shown in the following image from this paper. ![example image](http://i.stack.imgur.com/bYAx5.png) I don't have the source code for that paper and I don't even know if they used Latex, but I figure the picture might be helpful to explain what I want to do. Essentially I want to have a bunch of graphs that I generate with gnuplot grouped together in one figure in Latex. I have used `subfigure` in the past for putting two images next to each other but I'm not sure how I would go about aligning a large number of images. Alternatively I could see if gnuplot can generate a single eps file that has all the plots that I need. However, I would prefer to do the grouping in latex because otherwise I would have to regenerate all the plots even if I only wanted to update one. But if latex does not have a good way to do what I'm asking then I can look at alternatives. The reason for my question right now is to see if anyone has a recommendation of a good way to do what I want.


title: Using environment argument in new macro definition

text: I'd like to be able to define an environment that takes a single argument and be able to use that argument to redefine an existing macro such that the argument of the environment gets used automatically as the argument of the macro. Like so...               \newcommand{\argmacro}[1]{<do something with #1>}          \newenvironment{myenvironment}                    {\renewcommand{\arglessmacro}{\argmacro{<the sole argument of myenvironment>}}}                    {}      I'd basically like to define some text as the 'subject' of an environment such that I can perform my usual macros without having to duplicate the text each time I want to call it. Is there a clean way to reference the argument of myenvironment within the renewcommand definition? Thanks!


title: How to insert headlines into the itemize environment (and lists in general)

text: > **Possible Duplicate:**   >  Is there a standard way to title a list of bullets? Very often I feel the need to insert a headline into the `itemize` environment. I repeatedly wonder whether there is something like a (non- obligatory) caption-argument or a `\caption` command like in the `figure` environment or something similiar for the that environment (and for lists in general) too. I guess that I could create something in a headline look with the `\textbf` command, but that feels so inelegant. So my questions:   * if there is a more elegant way to insert a headline: How to do it?   * if not: why? And does anyone who is stronger in LaTeX programming than me is willing to create one? I dream of something like that:              \begin{Headline}{list/itemize etc}       \item[1-n]     \end{list/itemize}      but I guess you have better ideas. The typeset result should look like this: **Directors**   * Hitchcock   * Cameron   * etc.


title: Use of \citet with bibliographystyle unsrt

text: While I use `\citet{Titterington}` and I use `\bibliographystyle{unsrt}` which all websites say is supposed to produce a citation in the main body like Titterington[1], for me produces a citation in the main body that looks like (author?)[1].


title: Proportional font, word-wrapping verbatim

text: How can I get a `xelatex`-compatible `verbatim`-like environment which uses a proportional font and applies word wrapping? I would like to able to put in something like this... > Proposition 2.3.13. > > Suppose that f : M_1 -> M_2 is a map between metric spaces. Then f is > continuous iff for every set U open in M_2, f^-1(U) is open in M_1. > > Proof > > Suppose that f is continuous, and let U be an open subset of M_2. We are > required to prove that f^-1(U) is open in M_1. Let x \in f^-1(U). Then f(x) > \in U, and since U is open in M_2 there exists ε>0 such that B_ε(f(x)) > \subset U. By Definition 2.3.6, there exists δ>0 such that f(B_δ(x)) \subset > B_ε(f(x)). Hence f(B_δ(x)) \subset U, so B_δ(x) \subset f^-1(U), and we have > shown that f^-1(U) is open in M_1. ... and get out output like this: ![enter image description here](http://i.stack.imgur.com/pUucb.png) (In case you're wondering why I want to do this, the text is input to a program and so needs to be represented literally: it would be misleading to e.g. typeset `_1` as a subscript, because it can't be entered into the computer that way.)\ **Edit:** unfortunately there is one small problem with the answer below. Single-newlines aren't preserved. This is my fault for not making it clear with the MWE that I wanted this -- sorry. Could anyone tell me how to modify the `vb` environment to preserve newlines? Here's a new MWE...               \documentclass[a4paper,10pt]{article}     \usepackage[T1]{fontenc}          \makeatletter          \begingroup     \lccode`\~`\\     \lowercase{\endgroup     \def\vb{%     \par     \parindent\z@     \parskip1\baselineskip plus 2pt\relax     \let\do\@makeother\dospecials%     \let\@xobeysp\space     \catcode`\ \active     \catcode`\\\active     \let~\scanendvb     }}     \def\scanendvb#1#2#3#4#5#6#7{%     \def\x{#1#2#3#4#5#6#7}%     \ifx\x\endvbstr     \expandafter\@firstoftwo     \else     \expandafter\@secondoftwo     \fi     {\end{vb}}{\char`\\#1#2#3#4#5#6#7}}          \edef\endvbstr{end\string{vb\string}}          \makeatother     \def\endvb{\par}               \begin{document}     \begin{vb}     Definition 2.1.2.     A _metric space_ M = (A, d) consists of a non-empty set A together with a map d : A\times A -> \bfR such that:         (M1a) d(x, y)\geq 0 for all x, y in A.         (M1b) d(x, y) = 0 <=>  x = y  for all x, y in A.         (M2) d(x, y) = d(y, x) for all x, y in A.         (M3) d(x, y)+d(y, z)\geq d(x, z) for all x, y, z in A.     The elements of A are called the _points_ of the metric space M, and d is called a _metric_ on A. We sometimes also call d the _metric_ of M.     \end{vb}     \end{document}


title: Text justification in mla-paper package

text: What command should I use to justify the entire text, both right and left, in mla-paper style package.


title: How to map value to color using TikZ?

text: I am trying to draw rectangles, each of which has a corresponding value, which will be mapped into a color from a color map based on the value. This is how I want the write the code. What is missing is the mapping from `\myvalue` to `\mycolor`.               \documentclass{standalone}          \usepackage{colortbl}     \usepackage{pgfplots}     \usepackage{pgfplotstable}          \pgfplotsset{compat=1.9}          \newcommand*{\ListOfRectanglesColor}{%       0/0/1/1/blue,       1/1/2/2/red,     }          \newcommand*{\ListOfRectanglesValues}{%       0/0/1/1/0.3,       1/1/2/2/0.6,     }          \begin{document}     \begin{tikzpicture}       \foreach \sXa/\sYa/\sXb/\sYb/\mycolor in \ListOfRectanglesColor {         \fill[\mycolor] (\sXa, \sYa) rectangle (\sXb, \sYb);       }       %\foreach \sXa/\sYa/\sXb/\sYb/\myvalue in \ListOfRectanglesColor {       %  what code will define \mycolor as a color based on \myvalue?       %  and a specified color map?       %  \fill[\mycolor] (\sXa, \sYa) rectangle (\sXb, \sYb);       %}     \end{tikzpicture}     \end{document}      **Edited in response to comment** **Question:** How do I map values to colors? I would appreciate it if the TeX code were commented so that I could understand how the code works. For simplicity, the mapping function will be of the form               \valuetocolor{value-min}{value-max}{color-min}{color-max}{value}      The floating point numbers `value-min` and `value-max` will be mapped to two defined colors `color-min` and `color-max` respectively. We can assume that `value-min` ≤ `value-max`. I want to map the floating point number `value` to the linear interpolated value between `color-min` and `color-max`. More precisely, let `λ` be the value such that `value = λ value-min + (1 - λ) value-max`. Then I want `\valuetocolor{value-min}{value-max}{color-min}{color- max}{value}` to return the color `λ color-min + (1 - λ) color-max`. * * * **Related TeX.SX Question** I am aware that there is a related question Need some help getting started with TikZ, groupplots and color mapping of matrix where there is TeX code that accomplishes a mapping from value to color for a more complicated color map. Unfortunately, with my limited TeX/PGF knowledge, I can't understand how the code works.


title: C# tool to render latex in Winforms or PNG/BMP/etc?

text: I'm searching in vain to find a control or DLL which allows me to render Latex code within a C# winforms project. (Most search terms seem to assume I'm trying to render C# code within Latex...) I plan to build Expressions & convert to Latex code then render on screen on the fly. Any suggestions?


title: Extending the line drawn above footnotes

text: By default the line drawn where the footer begins is small in size. How can I make it bigger and make it match with the document text area size?


title: Custom arrow tip with `arrows.meta` TikZ library

text: In the spirit of this question, how do I make a custom arrow tip using the new `arrows.meta` TikZ library? I would like to make a semicircular tip that accepts the `open` option, ideally, and perhaps other options like length (or radius or whatever the Circle arrow tip accepts). * * * I made some improvements to the accepted answer so that semicircle is totally consistent with Circle.               \pgfdeclarearrow{       name=semicircle,       defaults={         length  = +2.39365pt +3.191538,         line width = +0pt 1 1,       },       setup code={         % Cap the line width at 1/2th of the length         \pgf@x.5\pgfarrowlength         \ifdim\pgf@x<\pgfarrowlinewidth           \pgfarrowlinewidth\pgf@x         \fi         \pgfutil@tempdima.5\pgfarrowlength\advance\pgfutil@tempdima by-.5\pgfarrowlinewidth         \pgfutil@tempdimb.5\pgfarrowlength\advance\pgfutil@tempdimb by.5\pgfarrowlinewidth         \ifpgfarrowreversed             \pgfarrowssetlineend{.5\pgfarrowlength\advance\pgf@x by-.5\pgfarrowlinewidth}         \else              \pgfarrowssetlineend{.5\pgfarrowlinewidth}         \fi         \pgfarrowssettipend{\pgfutil@tempdimb}         % The hull:         \pgfarrowsupperhullpoint{0pt}{.5\pgfarrowlength}         \pgfarrowsupperhullpoint{0.20710678118\pgfarrowlength}{.5\pgfarrowlength}         \pgfarrowsupperhullpoint{0.5\pgfarrowlength}{0.20710678118\pgfarrowlength}         % The following are needed in the code:         \pgfarrowssavethe\pgfarrowlinewidth         \pgfarrowssavethe\pgfarrowlength         \pgfarrowssavethe\pgfutil@tempdima         \pgfarrowssavethe\pgfutil@tempdimb       },       drawing code = {         \pgfsetdash{}{+0pt}         \ifpgfarrowroundjoin\pgfsetroundjoin\else\pgfsetmiterjoin\fi         \ifdim\pgfarrowlinewidth=\pgflinewidth\else\pgfsetlinewidth{+\pgfarrowlinewidth}\fi         \pgfpathmoveto{\pgfpoint{.5\pgfarrowlinewidth}{\pgfutil@tempdima}}         \pgfpathlineto{\pgfpoint{.5\pgfarrowlinewidth}{-\pgfutil@tempdima}}         \pgfpatharc{-90}{90}{\pgfutil@tempdima}         \pgfpathclose         \ifpgfarrowopen\pgfusepathqstroke\else\ifdim\pgfarrowlinewidth>0pt\pgfusepathqfillstroke\else\pgfusepathqfill\fi\fi       },       parameters = {         \the\pgfarrowlinewidth,%         \the\pgfarrowlength,%         \ifpgfarrowopen o\fi%         \ifpgfarrowroundjoin j\fi%       },     }


title: Different headheight for first page

text: I'm writing a document using the Koma-Script class `scrartcl` (3.09a). I want to have a header and a footer on every page, but the header of the first page should be different from the others. So using `\newpagestyle` from the `scrpage2` package I define two page styles, `MyFirstPageStyle` and `MyPageStyle`, and I use them like this:               \pagestyle{MyPageStyle}     \thispagestyle{MyFirstPageStyle}      Since the header of the first page is quite big, it overlaps with the content of the first page. I could fix this by passing `[headinclude=true, headheight=2cm]` as class options. But this also affects the headers of all other pages, where the header is just one line in height. So my question is how can I set `headheight` for the first page only, without affecting the other pages? To make more clear how it should look in the end: The white space between the top of the header and the top of the page should be the same for all pages. But the header of the first page is larger, so the content of the first page should move down a little bit. Full minimal example:               \documentclass{scrartcl}          \usepackage[ngerman]{babel}     \usepackage{cmap}     \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}          \usepackage[headsepline,footsepline]{scrpage2}          \usepackage{graphicx}     \usepackage{calc}     \usepackage{lastpage}          \newpagestyle{MyTitlePageStyle}     {       {}       {}       {         \begin{minipage}{\textwidth-5.5cm}           \normalfont\sffamily\Large\bfseries           DigSig1 Praktikum 1 - Lösungen \\           Signalabtastung / Zeitdiskretisierung         \end{minipage}         \hfill         \begin{minipage}{5cm}           \includegraphics[width=\textwidth]{HSR}         \end{minipage}       }     }     {       {}       {}       {         \normalfont         HRO, \today         \hfill         \pagemark{}/\pageref{LastPage}       }     }          \newpagestyle{MyPageStyle}     {       {}       {}       {         \normalfont         DigSig1 Praktikum 1 - Lösungen         \hfill         Signalabtastung / Zeitdiskretisierung       }     }     {       {}       {}       {         \normalfont         HRO, \today         \hfill         \pagemark{}/\pageref{LastPage}       }     }          \pagestyle{MyPageStyle}     \thispagestyle{MyTitlePageStyle}          \begin{document}          content          \end{document}      With the code provided above, the header of the first page overlaps with the content of the first page. When I use               \documentclass[headinclude=true, headheight=2cm]{scrartcl}      instead, it looks fine for the first page, but it also increases the white space above the headers of the following pages, which I don't want.


title: What is the correct way to write the abbreviation of "the first"?

text: I want to write 1st. What is the correct way to do so?   * `1\textsuperscript{st}`   * `\mbox{1\textsuperscript{st}}`   * `\mbox{1$^\text{st}$}`   * `$1^\text{st}$`


title: Typesetting "nth" in LaTeX

text: > **Possible Duplicates:** > >   * What's the quickest and easiest way to write "2nd" "3rd" etc in LaTeX >   * 1st, 2nd and i-th? > Is there a standard/best practice for typesetting "nth" in LaTeX? Right now I've got `$n$th`, but that looks a bit weird, with the math-mode _n_ right next to the standard-text th. I've also considered `$n^\text{th}$` (which really seems like too much work). I'm sure there's some ridiculously simple solution--I just haven't found it yet. Can you please clue me in?


title: How to draw an unbalanced curly brace in TikZ?

text: How can I draw curly braces where the "pinch" is not in the middle of brace, i.e. one of the "legs" is longer than the other, using TikZ?


title: How to show latex commands in text mode

text: Sorry for the basic question. What I want to do is to show the latex command and, right after that, the output. But how can I show latex formulas without obtaining errors for not using the math mode environment. The problem is if I put the $ $ the formula appears and not the command. If I dont use the $ $ I get an error. I have tried also to put inside a \text{}. No good either. Any suggestions? Thanks in advance.


title: generating LaTeX tabular code during compilation

text: I use LaTeX for scientific reporting in brain imaging (fMRI). I have a `tabular` array in LaTeX, that contains quite a lot of rows and columns, which both are brain regions and in the each intersecting cell there is some data about their connections. The content of this `tabular` array is defined separately in another .tex file that is loaded using `\input` command. In this another .tex file the content of each cell of the `tabular` array is defined separately using hundreds of `\newcommand` commands. In `tabular` array there is no other content except these `\newcommand` commands. `tabular` array is inside `\begin{spreadtab}` to permit some basic calculations of cells values (although this is not a requirement). Everything works fine so far. So, the `\newcommand` definitions look like this:               \newcommand{\origREGIONONEdestREGIONONE}{ NA } % NA for cells on the diagonal.     \newcommand{\origREGIONONEdestREGIONTWO}{ - } % this is the default case.      ...               \newcommand{\origREGINOTWOdestREGIONTWO}{ NA }     \newcommand{\origREGIONTWOdestREGIONONE}{ \ref{Spielberg1981} }     \newcommand{\origREGIONTWOdestREGIONTHREE}{ bilateral \ref{Cameron1989} }      ... There is a specific `\newcommand` definition for all column x row intersections. The `tabular` array code looks like this (a 3x3 example but in reality it is bigger than 20x20):               \tiny     \begin{table}         \scalebox{0.6}{             \begin{spreadtab}{{tabular}{*{3}{c}}}                 \hline                 \to/from :={} & REGIONONE :={} & REGIONTWO :={} & REGIONTHREE :={} \\                 \hline                 to REGIONONE :={} & \origREGIONONEdestREGIONONE :={} & \origREGIONTWOdestREGIONONE :={} &\origREGIONTHREEdestREGIONONE :={} \\                 to REGIONTWO :={} & \origREGIONONEdestREGIONTWO :={} & \origREGIONTWOdestREGIONTWO :={} &\origREGIONTHREEdestREGIONTWO :={} \\                 to REGIONTHREE :={} & \origREGIONONEdestREGIONTHREE :={} & \origREGIONTWOdestREGIONTHREE :={} &\origREGIONTHREEdestREGIONTHREE :={} \\                 \hline             \end{spreadtab}         } % end scalebox         \caption{A table of connections between brain regions 1, 2 & 3}         \begin{enumerate}             \item \cite{Spielberg1981}\label{Spielberg1981}             \item \cite{Cameron1989}\label{Cameron1989}         \end{enumerate}     \end{table}     \normalsize      Now what I want is to be able to generate a similar `tabular` definition dynamically according to a list or an array of strings (or using any possible datatype): in MATLAB syntax it would be: `ListOfBrainRegions = { 'BRAINREGIONABC', 'BRAINREGIONDEF', 'BRAINREGIONXYZ' }` In Python syntax: `ListOfBrainRegions = [ 'BRAINREGIONABC', 'BRAINREGIONDEF', 'BRAINREGIONXYZ' ]` The list or array would be translated into a code like this inside `spreadtab` (or without `spreadtab` if it causes some problems):                           \hline                 \to/from :={} & REGIONABC :={} & REGIONDEF :={} & REGIONXYZ :={} \\                 \hline                 to REGIONABC :={} & \origREGIONABCdestREGIONABC :={} & \origREGIONDEFdestREGIONABC :={} &\origREGIONXYZdestREGIONABC :={} \\                 to REGIONDEF :={} & \origREGIONABCdestREGIONDEF :={} & \origREGIONDEFdestREGIONDEF :={} &\origREGIONXYZdestREGIONDEF :={} \\                 to REGIONXYZ :={} & \origREGIONABCdestREGIONXYZ :={} & \origREGIONDEFdestREGIONXYZ :={} &\origREGIONXYZdestREGIONXYZ :={} \\                 \hline      So, how should I define `ListOfBrainRegions` in LaTeX? And then how can I generate LaTeX code during compiling of a .tex file? If I was to program this in some other programming language, for example in MATLAB, Common Lisp or awk the task (generating program code) would not be difficult at all. It seems that LaTeX does not have built-in arrays, `if` ... `elseif` ... `else` commands nor `for` or `while` loops, although some packages provide some added functionality. So, how this could be implemented? Or, which LaTeX commands, packages and/or extra tools should I use for this task? Thank you for any help :)


title: Powerdot and enumerate - no worky?

text: Thanks to the site for the tip about replacing prosper with powerdot. That fixed some of my problems (margins are there now). Unfortunately it also seems to have created another one. Namely the enumerate-environment no longer works. Here's the source code to the first slide               \documentclass{powerdot}          \usepackage{lmodern}     \usepackage[utf8]{inputenc}     %\usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[Finnish]{babel}     \usepackage{amsmath,amssymb,enumerate}          \begin{document}          \begin{slide}{Propositioiden totuustauluista}     \begin{enumerate}     \item Propositioista eri tavoin kombinoimalla  muodostettujen     propositioiden totuusarvoja voidaan tutkia ns. totuustaulun avulla     \item Totuustaulussa on yksi vaakarivi kutakin `alkeispropositioiden'     totuusarvojen kombinaatiota kohti.     \item Jos alkeispropositioita on $n$ kappaletta, rivej\"a tulee $2^n$ kappaletta.     \item Sarakkeilla on otsikkorivill\"a kerrottu, mink\"a proposition totuusarvo     kyseisell\"a sarakkeella on.     \end{enumerate}     \end{slide}     \end{document}      This gives a               LaTeX Warning: Reference `lastslide' on page 1 undefined on input line 28       and more seriously               ! Undefined control sequence.     \enit@endenumerate ->\enit@after                                     \endlist \ifx \enit@series \relax \else \if ...     l.28 \end{slide}      Can someone diagnose this problem? I first tried to update/install prosper packages. Only when I learned that I need to move to powerdot, did I install powerdot (or rather let the automatic installation do it for me). Should I have uninstalled something in between? When I replace _enumerate_ with _itemize_ , the error messages disappear. The LaTeX warning disappears on the second run, so presumably it is just about something in the .aux file, and unrelated to my problem. System: Windows 7, WinEdt 7.0, MiKTeX 2.9


title: Which TeX primitives can be recovered after their initial definitions are overwritten?

text: This is mostly an academic question out of curiosity, but I think it may give some interesting answers. The question is, given a TeX file beginning with `\def\someprimitive{}`, for which values of `\someprimitive` is it possible to recover its primitive meaning afterwards? For example, `\def\relax{}` is not catastrophic because `\csname` can be used to get at the primitive meaning:               \def\relax{}     \expandafter\let\expandafter\relax\csname PleaseGiveMeBackRelax\endcsname     \meaning\relax      Relaxing (no pun intended) the requirements a bit, one could ask if it is possible to recreate a macro which for all practical purposes does the same as the original:               \def\gdef{}     \def\gdef{\global\def}      (at least, I can't think of a situation where this doesn't work, but of course it depends on `\global` and `\def` not being redefined later on). The question can be interpreted with respect to your favorite TeX engine and associated set of primitives. But relying on a format which creates an alias for a primitive is probably cheating (such as plain TeX's `\endgraf = \par`).


title: How to add new auto-complete options in TeXnicCenter?

text: When I type "ite" in TeXnicCenter, I see the autocomplete option:               \begin{itemize}         \item      \end{itemize}       Pressing `ctrl`+`space` will activate the auto-completion. How do I add additional auto-completion options? In particular, I would like "ali" to activate               \begin{align}          \end{align}      upon pressing `ctrl`+`space`.


title: How does plain TeX \insert work?

text: My question is about Plain TeX command `\insert`. I understood that every insert series has a dedicated box. But I didn't understand if the use of `\insert` adds content to the box, or if the box is constructed at the end of the page, from a list. If the second answer is true, my question is: are the elements in the list of `insert` (for one series) concatened in one `hbox`, or are they concatened in `vbox`, with a paragraph break between them. My problem is for the some change in `ledmac`. Actually, `ledmac` provide some "paragraphed" notes, which are ultimately producted by               \insert\paragraphednote     \bgroup     \hbox{content of my note}     \egroup      That puts all notes in the same paragraph. But as you know, an `hbox` can't be broken. An so, it's problematic. But if I just put the content without `\hbox`, my notes are not in the same paragraph, but I obtain one paragraph per note. I hope to be clear. You find the real code on github


title: tagging credit after gathering accumulation of equations

text: need help I need to put these three equations in three lines covered by a big parenthesis on the right side with the tag (Tolman 1939)               $$KP=e^{-\lambda} \Big( \frac {\nu'}{r}+ \frac {1}{r^2}\Big)-\frac {1}{r^2}$$          $$ KP= e^{-\lambda} \Big(\frac {\nu ''}{2}-\frac {\lambda ' \nu '}{4} + \frac {(\nu')^2}{4} + \frac {\nu' -\lambda'}{2r}\Big)$$           $$K \rho c^2= e^{-\lambda}\Big (\frac {\lambda '}{r}-\frac {1}{r^2}\Big) +\frac {1}{r^2}$$


title: How to create specific chapter style in book documentclass

text: I am using the `book` documentclass for my thesis. The chapter titles are the normal ones but I would like to know is it is possible to change them to something more fancy, preferable without changing the documentclass. In particular, I am interested to those chapter titles which, on the first page of every chapter, they have a solid black line on top (i.e., in the header), above which and flushed left is written "Chapter x" while, directly below that line and flushed right is the chapter name/title. I have seen various theses written in this style although I cannot find which one it is. I am aware of `fncychap`, `memoir` etc but the styles of those packages - at least the ones which I have seen - do not appeal to me. If anyone is familiar with the style I described and knows a smooth way to do it within the documentclass `book`, I would be glad to know it. If, for any reason whatsoever, this is incompatible with documentclass `book`, I would also like to know alternative solutions.