title: How to wrap long text with \multicol in tables?

text: This is my code:               \documentclass[12pt,a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english,french]{babel}     \usepackage{geometry}     \geometry{a4paper, mag=1000, left=3.2cm, right=3.2cm, top=2.5cm, bottom=2.5cm, headsep=0.7cm,headheight = 15pt, footskip=1cm,twoside}     %\usepackage{anyfontsize}     \usepackage{fix-cm}          %TABLES     %     \usepackage{multirow}     %     \usepackage{hhline}     %     \usepackage{array}     %     \usepackage{booktabs}     %     \usepackage{tabu}     %     \usepackage{makecell}     \newcommand{\thickline}[1]{\Xhline{#1pt}}          \begin{document}          \begin{table}[h]          \caption{sd}          \begin{center}     \small     \begin{tabu}{|[2pt] >{\centering}p{3cm}  >{\centering}p{2.4cm} |[2pt] >{\centering} p{1.5cm} | >{\centering} p{3.2cm} | >{\centering} p{3.2cm}|[2pt]}     \tabucline[2pt]{-}       & {Items} &  Responses & Percentage based on total responses ($\rm N'=169$) & Percentage based on who responded to the question ($\rm N=52$)  \\\tabucline[2pt]{-}          \multirow{7}{*}{\parbox{2.5cm}{What is you general field of expertise regarding software development? }}&  Requirements elicitation / modelling /analysis & 25 & 14.8\,\% & 48.1\,\% \\     & Project management & 25 & 14.8\,\% & 48.1\,\%\\     & Architecture & 20 & 11.8 & 38.5\,\%\\     & Design & 29 & 17.2\,\% & 55.8\,\%\\     & Coding & 35 & 20.7\,\% & 67.3\,\%\\     & Testing & 23 & 13.6\,\% & 44.2.1\,\%\\     & Documentation & 12 & 7.1\,\% & 23.1\,\%\\     \tabucline[2pt]{-}     \end{tabu}     \end{center}     \end{table}     \end{document}      It gives this:![enter image description here](http://i.stack.imgur.com/yUfcb.jpg) As you can see command:               \multirow{7}{*}{\parbox{2.5cm}{What is you general field of expertise regarding software development? }}      does not work properly. How I can solve this problem? Thank You in advance!


title: How to remove vertical space between the last line and the body of table?

text: How to remove the vertical space between item2 and the last line?               \documentclass[]{article}     \usepackage{enumerate}     \begin{document}     \title{Title}     \author{Author}     \date{\today}     \maketitle     \begin{tabular}{p{8cm}}     \hline     \textbf{Algorithm 1} \\     \hline     \begin{enumerate}[1:]     \item item1     \item item2     \end{enumerate}\\     \hline     \end{tabular}     \end{document}      ![enter image description here](http://i.stack.imgur.com/NUkgL.png)


title: How can I plot two lines in the same style (using cycle lists) with pgfplots?

text: I am using cycle lists and the `\addplot+` command to plot lines in different styles. I would like to plot several things using each style, however, like this:               % Plot using style 1     \addplot+ coordinates {...};     \addplot coordinates {...};     \addlegendentry{Style 1}          % Plot using style 2     \addplot+ coordinates {...};     \addplot coordinates {...};     \addlegendentry{Style 2}      How can I do this?


title: Fonts too thin when A4 scaled down to A5 in printing

text: In my document I am using the same settings as in the MWE below. I need copies of the document in A4 and A5. Both have to be identical so I cannot optimise the appearance of both by using `a4paper` for the A4 copies and `a5paper` for the A5 copies. The A5 copies are hence produced simply by scaling them down on the printer. The _problem_ : The fonts in the A5 copies are so thin that in some cases the lower part of the little e, for example, is not even visible --> see the image at the bottom of the question (it's a scan of the print-out; the problem is visible, for instance, in the word "discrete"; of course, the low quality of the image is partially due to the scan quality but the problem with the e's is not due to the scan itself). NB: The copy shop is a professional one with over 25 years of experience so I don't think the problem is due to unprofessional handling of printers. My _question_ :   * I use PDFLaTeX. Should I rather use LaTeX + dvi2ps + ps2pdf? The lady in the copy shop says that using Ghostscript for ps -> pdf might produce better pdf's.   * Should I use different font settings?   * Is there any method to scale the A4 output down to A5 already in LaTeX? Would this improve the font quality in the A5 copies? Unfortunately, I do not have a laser printer anywhere near where I am right now. So I can't try and look whether the printing output improves when I change settings. * * *               \documentclass[11pt, a4paper]{book}          \usepackage[ngerman,english]{babel}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage{setspace}\setstretch{1.15}          \usepackage{lipsum}          \usepackage[       a4paper,       textwidth=16cm,       outer=2cm,       textheight=45\baselineskip,       headheight=\baselineskip,       includehead=true,       heightrounded,     ]{geometry}          \usepackage{microtype}          \usepackage[pdfproducer={LaTeX with hyperref},                 pdfcreator={PDFLaTeX}                 ]{hyperref}          \begin{document}     \lipsum     \end{document}      * * * ![enter image description here](http://i.stack.imgur.com/kTn9a.jpg) PS: I have prepared the document for A4. Due to time constraints changing everything to A5 + 10 pt and scaling up in the printer for A4 is not really an option, since this would mean I would have to go over all formulae in displays and make adjustments so that they fit into the new textwidth. (It's quite a long document.)


title: Edit TikZ Chains to add labels and maintain the option to add individual styles

text: I find a code that redefines the way one defines a chain (`\chainin`), and allows one to include labels in the chains. However, this code disables the style options (`by` and `with` keyword). However, I need to give individual styles to each chain. How can I add individual styles to each chain, and at the same time being able to tag the connections by adding a node, like: `node [left] {tag}`. So I'm aiming for something like this: `\chainin (node) [join=by myStyle, {node [left] {my Tag}}];`               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{shapes,chains,scopes,matrix}     % This code makes it able to include the tag     \makeatletter     \tikzset{join/.code=\tikzset{after node path={%     \ifx\tikzchainprevious\pgfutil@empty\else(\tikzchainprevious)%     edge[every join]#1(\tikzchaincurrent)\fi}}}     \makeatother          \begin{document}          \begin{tikzpicture}[auto,       decision/.style = {draw,                          diamond,                          text badly centered,                          fill          = blue!5,                          text width    = 15mm,                          node distance = 2.5cm,                          inner sep     = 0pt},       block/.style    = {draw,                          rectangle,                          text centered,                          rounded corners,                          fill           = blue!5,                          text width     = 20mm,                          minimum height = 10mm},       tip/.style      = {->,                          very thick,                          color = black!50}     ]          \matrix[row sep=1cm]{     \node [block] (blk) {A block here}; \\     \node [decision] (dec) {Is something?};\\     };          { [start chain]       \chainin (blk);       % By removing the 'by tip' style this compiles       \chainin (dec) [join=by tip, {node [left] {yes}}];     }     \end{tikzpicture}     \end{document}


title: Solving an unexpected interaction between ebgaramond and Franklin Gothic

text: Here's my MWE, and its output (XeLaTeX, TeXLive 2012 latest, Windows 7):               \documentclass{article}     \usepackage{fontspec}     \usepackage{ebgaramond}     %%% <== This one     \setsansfont[%         ]{ITC Franklin Gothic Std Book}     \newfontfamily\xffamily[%         BoldFont=*,         ]{ITC Franklin Gothic Std Book}     \usepackage{lipsum}     \begin{document}     \sffamily     \lipsum[39]     \xffamily     \lipsum[39]     \end{document}      ![enter image description here](http://i.stack.imgur.com/Uz0iG.png) The first paragraph is, unexpectedly, in bold type. (From the PDF, it's actually Franklin Gothic Std Demi). If I eliminate the call to `ebgaramond`, everything comes out in normal type. Although I know how to eliminate this (see the definition for `\xffamily`), I'd really like to know what's going on, as I really feel I _shouldn't need to._ Can anyone enlighten me as to what's going on? * * * **Update 1** `ebgaramond.sty` contains the following line:               \renewcommand{\bfdefault}{m}      If this line is removed, my problem goes away. However, I'd still like to understand what's happening here, especially as I don't think I'm invoking anything remotely bold. * * * **Update 2** I'm in touch with Bob Tennent, the maintainer of `ebgaramond.sty`, who is examining the case...


title: Theorem Numbering in beamer

text: I have separate tex files for my different lecture slides. I am trying to number my theorems by the lecture number. I am using the following:               \setbeamertemplate{theorems}[numbered]      But it starts from 1,2,.. in each lecture file. I want > 1.1,1.2,... for lecture 1 > > 2.1,2.2,... for lecture 2 and so on Is there a way to do this? Thanks.


title: Problem reading the value of \@itemdepth

text: I am a new LaTeX user. I am trying to format a generalized list. I have mush of it working. I am trying to get the value of the `\@itemdepth` so I can determine the amount of indenting being used at the current depth. I am getting an error that references the `\@itemdepth` variable when I try to use the `\@itemdepth` counter. I replace the variable reference with a number like 1 or 0 and the script will run. So it seems I am doing something wrong in this reference. I would appreciate any help that you can offer. The relevant part of the script is as follows: It runs as it is shown. When the #1 is replaced with `\@itemdepth`. It does not work. (thanks Peter and Gonzalo for the instructions on including this.)               \documentclass{article}     \usepackage{amssymb, amsmath}      \usepackage{ifthen}           \newlength{\hangparsindent}     \newcounter{hangparsindentedlevel}          \newenvironment{hangpars}[1][1]{        \ifthenelse {#1 = 1} {             \setlength {\hangparsindent}{0in}             }            {            \setlength {\hangparsindent}{-\leftmargini}            }           \begin{list}{}{        \setlength{\itemindent}{\hangparsindent}        \setlength{\listparindent}{\hangparsindent}        \setlength{\partopsep}{0in} \setlength{\parskip}{0in} \setlength{\topsep}{0in}        }       \item{}     }         {\end{list}}           \begin{document}          \begin{hangpars}[2]     test text 1.  test text 1. test text 1.  test text 1. test text 1.  test text 1. test text 1.  test text 1. test text 1.  test text 1.           \begin{hangpars}[1]     test text 2.  test text 2. test text 2.  test text 2. test text 2.  test text 2. test text 2.  test text 2. test text 2.  test text 2.      \end{hangpars}          test text 3.  test text 3. test text 3.  test text 3. test text 3.  test text 3. test text 3.  test text 3. test text 3.  test text 3.           \end{hangpars}          \end{document}


title: Reference name of description list item in LaTeX

text: (Repost from Stack Overflow) I'd like to refer to a description list item by name instead of number. To that effect, I've added labels to each item, but when referencing them I only get the name of the section, not of the list item. How can I change it to show a custom label for each item?               \section{Definitions}     \begin{description}         \item [Vehicle\label{itm:vehicle}] Something         \item [Bus\label{itm:bus}] A type of \nameref{itm:vehicle}         \item [Car\label{itm:car}] A type of \nameref{itm:vehicle} smaller than a \nameref{itm:bus}     \end{description}      The result is something like this: > **1 Definitions** > > **Vehicle** Something   >  **Bus** A type of Definitions   >  **Car** A type of Definitions smaller than a Definitions I'd like to have the following: > **1 Definitions** > > **Vehicle** Something   >  **Bus** A type of Vehicle   >  **Car** A type of Vehicle smaller than a Bus An alternative solution would be to use subsections _and display them as a definition list_. Anyone know how to do it? The best answer on Stack Overflow referenced a \makeatletter hack:               \makeatletter     \def\namedlabel#1#2{\begingroup        \def\@currentlabel{#2}%        \label{#1}\endgroup     }     \makeatother     ...     \section{Definitions}     \begin{description}         \item [Vehicle\namedlabel{itm:vehicle}{Vehicle}] Something         \item [Bus\namedlabel{itm:bus}{Bus}] A type of \ref{itm:vehicle}         \item [Car\namedlabel{itm:car}{Car}] A type of \ref{itm:vehicle} smaller than a \ref{itm:bus}     \end{description}      It works, with the caveat that the links lead back to the section header, not to the list item. It would be nice to use something native which doesn't break `\ref`.


title: Formatting Decimals

text: Suppose I have a long decimal (assume it is ~6 inches long when written out in 12 point font in LaTeX when I center it, so something like               0.123719283791283718927489749875289345793485723495234572935239452348952384573481234879      How would I make it look like               0.123 719 283 791 283 718        927 489 749 875 289 345        793 485 723 495 234 572        935 239 452 348 952 384        573 481 234 879      or some other way that makes the decimal look more visually appealing? Is there a package I could use?


title: Difference between \big[ and \bigl[

text: What is the difference between `\big[` (or equivalently `\big(`) and `\bigl[`? Is it always necessary to mention `l` (left) and `r` (right)?


title: Axis rotation and alignment

text: I have a problem to rotate an axis. Here is the code I use where the problem occurs : the two axis origins are not aligned.               \documentclass[a4paper,11pt,twoside]{article}     \usepackage[pdftex, active, floats, tightpage]{preview}     \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}          \begin{document}          \begin{figure}     \begin{tikzpicture}         [/pgfplots/y=5cm, /pgfplots/x=5cm]         \begin{axis}[         xmin=0.,xmax=2.,ymin=-1.,ymax=1.         , x=1cm, y=1cm         , xlabel={x}, ylabel={y}         , axis x line=bottom, axis y line=left         , anchor=origin         , ticks=none         , xlabel={}, ylabel={}         , clip=false         ]         \draw[red, solid] (axis cs:0,0) ellipse [x radius=1,  y radius=1];         \draw[black, thick] (axis cs:1.5, -1.) to[bend left=-20] (axis cs:1.41, -0.487);         \node at (axis cs:1.42,-0.73) [anchor=west] {$\theta$};         \node at (axis cs:2,-1) [anchor=north, black] {$x$};         \node at (axis cs:0,1) [anchor=east, black] {$y$};         \end{axis}              \begin{axis}[         xmin=0.,xmax=6.,ymin=-1.,ymax=1.         , x=1cm, y=1cm         , xlabel={x'}, ylabel={y'}         , axis x line=bottom, axis y line=left         , rotate=20         , anchor=origin         , ticks=none, color=green!80!black         , xlabel={}, ylabel={}         , clip=false         ]         \draw[red, dashed, thick] (axis cs:0,0) ellipse [x radius=1,  y radius=1];         \draw[blue, dashed](axis cs:4.,-2)--(axis cs:4.,0);         \node at (axis cs:6,-1) [anchor=north, green!80!black] {$n$};         \node at (axis cs:0,1) [anchor=east, green!80!black] {$t$};         \addplot [blue, mark=x, nodes near coords=$A$, every node near coord/.style={anchor=north west, yshift={0.3em}}] coordinates {(4.,-1)};         \addplot [blue, mark=x, nodes near coords=$B$, every node near coord/.style={anchor=west}] coordinates {(4.,-2)};         \addplot [blue, mark=x, nodes near coords=$C$, every node near coord/.style={anchor=west}] coordinates {(4.,0.)};         \end{axis}          \end{tikzpicture}     \end{figure}          \end{document}      BUT, if I remove the line :               \addplot [blue, mark=x, nodes near coords=$B$, every node near coord/.style={anchor=west}] coordinates {(4.,-2)};      the problem disapears and the axis are aligned ... Could someone tell me why please ? Thanks !


title: How does one \ref and \cite paragraphs in a mathematical text? (see picture)

text: How does one `\ref` and `\cite` partly mathematical "textblocks" that are in separated paragraphs? Very good example here: A Short Proof of Fleischner's Theorem, **page 4** ; there are textblocks (1) and (2) and they are referenced several times in the latter text. Here is a pic of the desired result: ![Example](http://i.stack.imgur.com/TGt1E.gif)


title: Equations making a new line and not lining up in multicol

text: Each equation should sit directly next to its listing ie to the right of the a) not underneath it, just wondering how to fix it, and if my markup can be improved efficiency wise. What it looks like currently: ![enter image description here](http://i.stack.imgur.com/qkCTT.jpg)               \documentclass[fleqn]{article}     \usepackage{amsmath}     \usepackage{multicol}     \usepackage{enumerate}     \begin{document}     \begin{enumerate}     \item \begin{equation*} \text{Factorise the following} \end{equation*}     \begin{multicols}{2}     \begin{enumerate}[(a)]         \item  \begin{equation*} \frac{d}{dx}\left( \int_{0}^{x},du\right)=f(x). \end{equation*}         \item  \begin{equation*} \frac{d}{dx}\left( \int_{0}^{x},du\right)=f(x). \end{equation*}         \item  \begin{equation*} \frac{d}{dx}\left( \int_{0}^{x},du\right)=f(x). \end{equation*}         \item  \begin{equation*} \frac{d}{dx}\left( \int_{0}^{x},du\right)=f(x). \end{equation*}         \item  \begin{equation*} \frac{d}{dx}\left( \int_{0}^{x},du\right)=f(x). \end{equation*}         \item  \begin{equation*} \frac{d}{dx}\left( \int_{0}^{x},du\right)=f(x). \end{equation*}     \end{enumerate}     \end{multicols}     \end{enumerate}


title: Better way to calculate coordinates in Tikz?

text: I am great fan of pgf and tikz in general to produce great looking figures. But I don't like the amount of time I have to put in to draw a complicated picture, because I have to provide all the coordinates of the points lines etc. Is there any wrapper which makes this simpler? Like in some cases, eg when you have to put text over or around arrows, there are ways to give relative position instead of exact coordinates. Are there any similar ways to draw other shapes with relative coordinates? Is there any external program that can convert figures with lines and shapes into coordinates?


title: tabular height savebox problem

text: I'd like to build a **tabular** and next to it a **graphics in the same height**.   I use the following code (for minimal working purposes, I used `\rule`) and do not understand, what is going wrong:               \documentclass{minimal}     \begin{document}         \newsavebox{\testbox}%         \newlength{\testheight}%         \savebox{\testbox}{%                 \begin{tabular}{cr}%                     \multicolumn{2}{c}{\underline{\underline{\textsc{Line 1}}}}\\ \\                     Line&2\\%                     Line&3\\%                     Line&4\\%                 \end{tabular}%             }%             \settoheight{\testheight}{\usebox{\testbox}}             \usebox{\testbox}\hfill\rule{3pt}{\the\testheight}\hfill\rule{3pt}{\the\testheight}     \end{document}      As `\savebox` if fragil, I also played around with the robust commands `\mbox` and/or `\sbox` \- without success.


title: MikTeX x86 vs MikTeX x86_64

text: I've found that MikTeX now have both x86 and x86_64 version. What's the difference between them? Are there are some limitations in the x86_64? Or they are completely interchangeably?


title: How to pass the abscissa of a node to the first 2 mandatory arguments of \psplot?

text: How to pass the abscissa of a node to the first 2 mandatory arguments of `\psplot`? I have tried `\psGetCenterNode` but it produced an error in PS interpreting phase.               \documentclass[border=12pt,pstricks]{standalone}     \usepackage{pstricks-add,pst-eucl}          \def\foo{x \psPi\space div 180 mul sin}     \def\goo{x \psPi\space div 180 mul cos}     \def\hoo{x}     \begin{document}     \begin{pspicture}[showgrid=bottom](0,-2)(5,2)         \psplot[linecolor=red]{0}{4.5}{\foo}         \psplot[linecolor=blue]{0}{4.5}{\goo}         \pstInterFF{\foo}{\goo}{0}{A}         \pstInterFF{\foo}{\goo}{4}{B}         %\psplot{A.x}{B.x}{\hoo} <== does NOT work!     \end{pspicture}     \end{document}


title: How to install MinionPro Tex Package

text: I would like to use MinionPro, but I can't install it.               http://jklukas.blogspot.se/2010/02/installing-minionpro-tex-package.html      Inspired by the guide guide above, I tried to enter the following in my terminal window at Mac OSX 10.9 (I use TeXMaker)               cd ~/Desktop          texmf_folder=~/Library/texmf/          curl -L http://mirror.ctan.org/fonts/mnsymbol.zip > mnsymbol.zip          unzip mnsymbol.zip     cd mnsymbol/tex     latex MnSymbol.ins     mkdir -p $texmf_folder/tex/latex/MnSymbol/     mkdir -p $texmf_folder/fonts/source/public/MnSymbol/     mkdir -p $texmf_folder/doc/latex/MnSymbol/     cp MnSymbol.sty $texmf_folder/tex/latex/MnSymbol/MnSymbol.sty     cd ..     cp source/* $texmf_folder/fonts/source/public/MnSymbol/     cp MnSymbol.pdf README $texmf_folder/doc/latex/MnSymbol/     mkdir -p $texmf_folder/fonts/map/dvips/MnSymbol     mkdir -p $texmf_folder/fonts/enc/dvips/MnSymbol     mkdir -p $texmf_folder/fonts/type1/public/MnSymbol     mkdir -p $texmf_folder/fonts/tfm/public/MnSymbol     cp enc/MnSymbol.map $texmf_folder/fonts/map/dvips/MnSymbol/     cp enc/*.enc $texmf_folder/fonts/enc/dvips/MnSymbol/     cp pfb/*.pfb $texmf_folder/fonts/type1/public/MnSymbol/     cp tfm/* $texmf_folder/fonts/tfm/public/MnSymbol/          sudo mktexlsr     sudo updmap-sys --enable MixedMap MinionPro.map          curl -L http://mirror.ctan.org/fonts/minionpro/scripts.zip > scripts.zip     mkdir minionpro-scripts     cd minionpro-scripts     unzip ../scripts.zip          find /Library/Fonts/ -iname '*minion*pro*otf' -exec cp -v '{}' otf/ ';'     sudo apt-get install lcdf-typetools     ./convert.sh          mkdir -p $texmf_folder/fonts/type1/adobe/MinionPro/     cp pfb/*.pfb $texmf_folder/fonts/type1/adobe/MinionPro/          # It turned out to be very important to get this 2.030 version; a mismatch gives missing characters!     cd ~/Desktop     curl -L https://lists.berlios.de/pipermail/minionpro-devel/attachments/20090814/4e956ea2/attachment.zip > enc-2.030-beta.zip     cd ~/Desktop     curl -L http://mirror.ctan.org/fonts/minionpro/metrics-full.zip > metrics-full.zip     cd ~/Desktop     curl -L http://mirror.ctan.org/fonts/minionpro/metrics-base.zip > metrics-base.zip     cd ~/Desktop     curl -L http://mirror.ctan.org/fonts/minionpro/metrics-opticals.zip > metrics-opticals.zip          cd $texmf_folder     unzip ~/Desktop/metrics-base.zip     unzip ~/Desktop/metrics-full.zip     unzip ~/Desktop/enc-2.030-beta.zip          sudo mktexlsr     sudo updmap-sys --enable MixedMap MnSymbol.map      When I try to put this in my terminal, almost everything works. But I can't find this one: `https://lists.berlios.de/pipermail/minionpro- devel/attachments/20090814/4e956ea2/attachment.zip > enc-2.030-beta.zip` And what should I do after this? In my TeXmaker? Can someone please help me. I would be so glad, if somebody could help me.


title: Internal Links like arXiv Documents

text: I am trying to have my LaTeX files have internal links like arXiv papers do, where they reference Theorem 3.2 and you click on it and it takes you there. I am using MiKTeX on Windows 7 compiling with pdfLaTeX + MakeIndex + BibTeX and have downloaded source files from ArXiv and compiled them, but my resultant PDF file does not have the internal links anymore. I tried changing the compiler type to pdfTeX (I think I read online somewhere that this might work) but I got the error                \documentclass[11pt]{amsart} undefined control sequence      Does anyone know how to do this? In particular, what do I have to do, to download a random arXiv paper and compile it on my computer and get the links to work? (Or does the submission process rewrite the tex code for their own compilation? so that there is no universal way to do what I'm asking?)


title: Area restricted by three functions

text: I am trying to shade the area restricted by the functions `y \sin x`, `x = \sin y` and `y = 2pi + x`. Now my problem is that I do not have access to `Pgfplots 1.10`so the libary `fillbetween` is not accessible to me. I have attempted to plot the area below using               \documentclass[a4paper,12pt]{standalone}      \usepackage{pgfplots}     %\pgfplotsset{compat=1.10}     %\usepgfplotslibrary{fillbetween}          \begin{document}     \pgfplotsset{every axis legend/.append style={     at={(0,0.99)},     anchor=north west}}      \begin{tikzpicture}     \begin{axis}[         xmin=-2.5*pi,xmax=pi,ymin=-pi,ymax=2.5*pi,         domain=-2pi:2pi,         samples=100,         xlabel={$x$},           ylabel={$y$},         yticklabels={,,},         xticklabels={,,},         axis lines=middle     ]     \addlegendentry{$y =x + 2\pi$}     \addplot[black,thick,black,domain=-2*pi:0] {x+2*pi} \closedcycle;     \addplot[fill=gray,opacity=0.1,thick,black,domain=-2*pi:0] {x+2*pi} \closedcycle;          \addplot[color=red,fill= white,thick,domain=-2*pi:0] {sin(deg(x))};     \addplot[color=blue,fill= white,thick,variable=\t, domain=0:2*pi] ({sin(deg(t))}, {t});          \addplot[color=red,fill=gray,opacity=0.2,thick,domain=-pi:0] {sin(deg(x))};     \addplot[color=blue,fill=gray,opacity=0.2,thick,variable=\t, domain=0:pi] ({sin(deg(t))}, {t});          \addlegendentry{$y =x + 2\pi$}     \addplot[color=red,thick,domain=-2*pi:0] {sin(deg(x))};     \addlegendentry{$y =x + 2\pi$}     \addplot[color=blue,thick,variable=\t, domain=0:2*pi] ({sin(deg(t))}, {t});     %\addlegendentry{$x = \sin y$}     ]\end{axis}     \end{tikzpicture}     \end{document}      ![TheBowler](http://i.stack.imgur.com/kxwjr.png) I have tried to mark the parts on the figure I am having problems with. All of them are related to how I am shading the figure. The idea I am using is to first fill in the entire triangular area under `x + 2\pi`, and then fill in white where needed.   * Why must i use `opacity=0.1` for the first function and `opacity=0.2` for the second function to obtain the same color gray? Is this a problem on my end?   * Why is the `x-axis` unneven, eg higher between -pi and 0 ? Same with `y-axis`.   * Labels, why are the first and last label correct, but the middle one is always gray? I think the labeling problem is a minor problem caused by how I fill the various parts of the figure. But still it is quite weird that the first and second legends are fine. So to summarize, is there a better method for shading the area gray? I have tried the method provided here filling area between 2 functions, with shading, but alas this crashes every time I try to invoke the sine function, and not sure how to handle the implicit function using this method.


title: pgfplot: Pin drawn on top of ybar stacked plot

text: I need to label some components of a stacked bar plot in pgfplot, and I would like the pin to be visible to the center (rather than the edge). I believe it is currently being drawn to the center of the bar (I can see it with no fill) but that it is being drawn under/before the bar. I haven't found a reasonable way to do this, and it feels like there should be one. My actual plot is more complicated than this, so I would rather not draw the entire thing in tikz. Here is the code and image showing the pin-to-center showing with no fill:               \documentclass{article}      \usepackage{pgfplots}     \pgfplotsset{compat=1.3}     \begin{document}           \begin{tikzpicture}             \begin{axis}[ybar stacked,               enlarge x limits=0.3,                 ymin=0]                    \addplot coordinates {(1,1)};               \addplot[] coordinates {(1,1)};                    \node[coordinate,pin=right :{A}] at (axis cs:1,0.5) {};               \node[coordinate,pin=right :{B}] at (axis cs:1,1.5) {};            \end{axis}           \end{tikzpicture}          \end{document}      ![Pinning label to bar plot](http://i.stack.imgur.com/54b5A.png) Apologies if I have completely missed something obvious!


title: What is the easiest way to generate a compact bibliography?

text: In a beamer presentation I want to use the `\nocite{*}` macro, so all entries in the `bib` file will be included, regardless whether I actually cited an entry or not. However, this yields a rather long list of references, since each entry yields many details. What is the easiest way to generate a compact list of references. In particular, each entry should contain: Title, author(s) (probably at most 2), year. It sounds like an easy task, but I couldn't find the right solution. ## Edit:   1. There is no particular reason for me not to use `biblatex`. It is an option.   2. Mostly, in the presentation's body there will be no citations. In case few would appear I'd like them to be formated with a number. Like: `On Foo Bar, see [1]`. Nevertheless, the list of reference _will_ be long as I will use the `\notice{*}` macro.   3. In the list itself, I'd like to have: Title, authors (at most 2, otherwise with "et al"), year.


title: Margin footnotes not working in memoir with polyglossia + Hebrew

text: I am working on typesetting my master's thesis, using XeLaTeX and `memoir`. Everything has been going quite well, until I wanted to add a small message in Hebrew in my preface. I am using the `polyglossia` package and although the little bit of Hebrew that I wanted came out just fine, it undid the `\footnotesinmargin` setting from `memoir`. If necessary I can do just fine without the Hebrew text, as long as `polyglossia` doesn't interfere with my footnotes while using English and French (which it doesn't seem to do). But I would still very much like to understand what causes this incompatibility. This relatively minimal example is part of my setup, with my margin and footnote commands. If I comment out `\setotherlanguage{hebrew}` everything is fine, but if I don't then the footnotes are sent to the bottom of the page.               \documentclass[a4paper]{memoir}          \usepackage{lipsum}               %% MISE EN PAGE %%          % Géométrie de la page     \settypeblocksize{54.3163pc}{*}{0.5}     \setbinding{1pc}     \setlrmargins{4.312pc}{*}{*}     \setulmargins{6.1pc}{*}{*}     \setheadfoot{0pt}{2.5\onelineskip}     \setmarginnotes{2pc}{12pc}{2\onelineskip}     \checkandfixthelayout          % Notes de bas de page     \footnotesinmargin     \footmarkstyle{#1~}     \setlength{\footmarkwidth}{-1sp}     \setlength{\footmarksep}{0pt}     \setlength{\footparindent}{0pt}     \renewcommand{\foottextfont}{\scriptsize\raggedright}          %% LANGUES %%          \usepackage{polyglossia}     \setmainlanguage[variant=usmax]{english}     \setotherlanguage{french}     \setotherlanguage{hebrew}          \begin{document}          \chapter{Test Chapter}          \lipsum[1]          And now some dummy text\footnote{Test footnote that should show up in the margin.} so that I can have a footnote.          \end{document}


title: Page number of the table of contents in the indexing

text: In my document page numbers in the contents are correct but when I click the hyperlink of list of tables and list of figures it goes to the acknowledgement page. Indexing is not proper. What shall I do? I am pasting the code below               \documentclass[pdftex,12pt,a4paper]{report}     \usepackage{fancyhdr}     \usepackage{overcite}     \usepackage{setspace}     \usepackage{hyperref}     \hypersetup{colorlinks,        citecolor=blue,       filecolor=red,      linkcolor=blue,      urlcolor=blue}          \begin{document}     \pagenumbering{roman}     \nonumber{\include{title}}     \setlength{\parindent}{1cm}     \setlength{\parskip}{0.5cm plus2mm minus2mm}     \setcounter{page}{2}     \include{dedication}     \include{certificate}     \include{abstract}     \fancyhead[CO]{\large{\textbf{Acknowledgement}}}     \include{ack}     \include{contents}     \include{tables}     \include{listfig}     \pagenumbering{arabic}     \fancyhf{}     \pagestyle{fancy}     \cfoot{\thepage}     \fancyhead[CO]{\large{\textbf{Chapter 1 : Introduction}}}     \include{chap1-Intro}     \fancyhead[CO]{\large{\textbf{Chapter 2 : Literature Review}}}     \include{chap2-Literature}     \fancyhead[CO]{\large{\textbf{Chapter 3 : Settlement Response of Geosynthetic Reinforced Granular fill Soft Soil}}}     \include{chap3-calculate_w}     \fancyhead[CO]{\large{\textbf{Chapter 4 : Determination of Equivalent Shear Modulus $G_e$ value for multilayer Geosynthetic System}}}     \include{chap4-equi_G}     \fancyhead[CO]{\large{\textbf{Chapter 5 : Conclusions and Scope for Future Studies}}}     \include{chap5-conclusion}     \fancyhead[CO]{\large{\textbf{Reference}}}     \include{Reference}          \end{document}


title: Customizing a list

text: I have several lists, I want all of them to have `{\labelwidth}{2cm}`, and `{\labelsep}{1cm}`. How can I do it, instead of writing the following everywhere?               \begin{list}{\stepcounter{enumi} Person \arabic{enumi}:\ }     {     \setlength{\labelwidth}{2cm}     \setlength{\labelsep}{1cm}     }     \end{list}      I tried this with no success               \let\oldlist\list     \renewcommand{\list}     {     \setlength{\labelwidth}{2cm}     \setlength{\labelsep}{1cm}     \oldlist     }      it is buggy, the item numbers seems mixed up. What is the correct way of doing it?


title: Animation in Enumerate list - Beamer

text: How do I animate an Itemize or Enumerate List. That is on pressing the enter key, The next Item should appear. How do I do that?               \documentclass{article}     \begin{document}     \begin{enumerate}     \item Hi     \item Hello     \end{enumerate}     \end{enumerate}


title: Math symbols in listings

text: Does anyone know how to write math symbols such as sums and integrals inside a listing?               \begin{lstlisting}          vl(i)= \sum\limits_{i=1}^N{Al(i,j)*xl(j)}  ;     i = 1,3          \end{lstlisting}      UPDATE: Minimal example               \documentclass{book}     \usepackage{xcolor}     \usepackage{listings}          \begin{document}     \begin{lstlisting}[backgroundcolor=\color{blue!40},numbers=none,language=XML,mathescape=true]     !-----------------------------------------------------           $vl(i)=\sum\limits_{i=1}^N{Al(i,j)*xl(j)} ;\quad i = 1,3$          !-----------------------------------------------------     \end{lstlisting}     \end{document}      ![enter image description here](http://i.stack.imgur.com/BdEdZ.png)


title: Expandable read from file

text: This question follows this Applying TikZ options stored in a file. I just wonder why the following fails to read the file. Please ignore the content of filecontents; although it works, it's just for developing a MNWE. The problem is with my use of `\input`.               \documentclass{article}     \usepackage{filecontents}     \begin{filecontents}{myaux.tex}     \documentclass{article}     \makeatletter     \def\chapno{1}     \def\exno{1.1}     \chardef\other=12     \newwrite\ans     \immediate\openout\ans=answers     \def\answer{%       \par\medbreak       \immediate\write\ans{}%       \immediate\write\ans{\string\ansno\chapno.\exno:}%       \copytoblankline     }     \def\copytoblankline{\begingroup\setupcopy\copyans}     \def\setupcopy{%       \def\do##1{\catcode`##1=\other}%       \dospecials       \catcode`\|=\other       \obeylines%     }     \def\ifnextisspace{%       \expandafter\futurelet\expandafter\next       \expandafter\ifn@xtisspace\string     }     \def\ifn@xtisspace{%       \ifx\next\@sptoken\expandafter\gobblespace         \else\expandafter\writetofile\fi     }     \@namedef{gobblespace} {\ifnextisspace}     \def\writetofile#1\@nil{\immediate\write\ans{#1}}          {\obeylines %       \gdef\copyans#1       {\def\next{#1}%         \ifx\next\@empty %           \let\next=\endgroup %         \else %           \expandafter\ifnextisspace\next\@nil %           \let\next=\copyans %         \fi %         \next %       }%     }          \answer xxx     yyy \ifx xx     \fi zzz          \begin{document}     x     \end{document}     \end{filecontents}          \makeatletter     \begingroup     \lccode`\A=1 \lccode`\B=1 \catcode`\A=7     \lowercase{\endgroup\def\catch@marker{AB}}     \edef\reserved@a{%       \long\def\noexpand\catchfile##1\catch@marker{%         \noexpand\unexpanded\noexpand\expandafter{##1}%       }%     }     \reserved@a     \def\catchfilecontent#1#2{%       \begingroup       \everyeof\expandafter{\catch@marker\noexpand}%       \makeatletter       \edef\reserved@a{\endgroup         \long\def\noexpand#1{%           \expandafter\catchfile\expandafter\@empty           \@@input #2         }%       }%       \reserved@a     }     \makeatother          % Test     \catchfilecontent\myauxfile{myaux.tex}          \begin{document}     x     \end{document}


title: How to split a figure over multiple pages using subfigure package

text: I am using `subfigure` package and would like to split a figure (that has a number of subfigures in it) into two pages, rather than one single page. I have seen few posts about how to do this with `subfig` package and the use of `\subfloat`. But that requires me to change to `subfig` package and change every `\subfigure` to `\subfloat` and so on. I would be thankful in you guys could help. Here is my code:               \begin{figure}[ht]     \centering     \subfigure{\includegraphics[width=0.19\textwidth]{figures/truck1}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/truckLSD1}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/truckEDL2}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/truckDu3}}     \subfigure{\includegraphics[width=0.19\textwidth]{figures/truckPWA}}\     \\      \subfigure{\includegraphics[width=0.19\textwidth]{figures/zebra}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/zebra}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/zebra}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/zebra}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/zebra}}\     \\      \subfigure{\includegraphics[width=0.19\textwidth]{figures/office}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/office}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/office}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/office}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/office}}\     \\      \subfigure{\includegraphics[width=0.19\textwidth]{figures/micro}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/micro}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/micro}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/micro}}\     \subfigure{\includegraphics[width=0.19\textwidth]{figures/micro}}\     \caption[XXXXXXXXXXXXXX.}     \label{fig:natural}     \end{figure}


title: Author not showing with IEEEtran and natbib

text: I am using a template for a conference. See file icmcsmc2014.sty. They define IEEEtran as bibtex environment. Now I really want to display the name of the author on some citations. Normally I would use \citet, however IEEEtran does not allow this. Based on this post I tried adding                    \usepackage[numbers]{natbib}      Now citet is recognised, but it displays "author?". I think it is a clash with the stylesheet of so. ![enter image description here](http://i.stack.imgur.com/b7awy.png) Any ideas? A second issue I am having is that the title of the references is not displayed, but printed in small below the empty title with the number. Here is a minimal working example and the sty file that comes alongs with it. Sorry I didn't see an upload button and was unsure on how to attach the sty file. I will also put the min working example here:               \documentclass{article}                    \usepackage{icmcsmc2014}           \usepackage[numbers]{natbib}                    \begin{filecontents}{paper_test.bib}     @article{herremans2013composing,       title={Composing Fifth Species Counterpoint Music With A Variable Neighborhood Search Algorithm},       author={Herremans, Dorien and S{\"o}rensen, Kenneth},       journal={Expert Systems with Applications},       volume={40},       number={16},       pages={6427--6437},       year={2013},       publisher={Pergamon}     }     \end{filecontents}               \usepackage{times}     \usepackage{ifpdf}     \usepackage[english]{babel}     % \usepackage{cite}     %   \usepackage{multibib}                    % ***************************************** the document starts here ***************     \begin{document}                    \section{Introduction}          Here I want the author name to occur with citet as it is said by \citet{herremans2013composing}.          %   \bibliographystyle{IEEEtran}     %   \bibliographystyle{natbib}       \bibliography{paper_test}               \end{document}


title: What do the pgfkeys key handlers .get and .store in do?

text: When I need to retrieve the value of a key in a macro, I use the key handlers `.get` and `.store in`. Here is what is written in the _pgfkeys_ documentation: > Key handler key `/.get= macro` Executes a `\let` command so that macro > contains the contents stored in key . > Key handler key `/.store in= macro` This handler has the following effect: > When you write `key = value` , the code `\def macro { value }` is executed. > Thus, the given value is “stored” in the macro . I don't really understand the differences between these two handlers. Actually, I would expect `.store in` to be sufficient, and yet I need both. Why? ## Code Below is typically what I write (without understanding it...) when I use `pgfkeys`:               \documentclass[margin=.5cm]{standalone}     \usepackage{pgfkeys}          \newcommand{\DisplayKey}[1]{     \pgfkeys{       /a/.initial=1,       /a/.get=\aKey,       /a/.store in=\aKey,     }     \pgfkeys{#1}     a is \aKey     }          \begin{document}     \DisplayKey{a=7}     \end{document}      ## Output ![enter image description here](http://i.stack.imgur.com/BKlBD.png)


title: Add variable tick in axis

text: Consider the following code where I detect the crossing of a function to a given threshold. I am plotting the line from the intersection to the x-axis, and storing the intersection in `\p1` I would like to add a second axis environment identical to the first one with only an additional tick at `\x1`               \documentclass{article}          \usepackage{pgfplots,tikz}     \usetikzlibrary{intersections,calc}          \begin{document}          \begin{tikzpicture}     \begin{axis}[         clip=true,         axis x line=bottom,         axis y line=left,         grid = major,             grid style={dashed},         xmin=1,         xmax=64,         samples =32,         ymax = 1.6,         ymin  = -0.2,         xlabel={\emph{sample number}},         xlabel style={at={(1,-0.1)}, anchor=south},         legend cell align=left,         legend pos=outer north east,       ]     \addplot[name path global=one,blue,mark=+,domain=1:64] {exp(-log10(2)/(8^2/4)*(\x-32)^2)};     \addplot[name path global=two,red,domain=1:64] {0.5};     \path [name intersections={of=one and two, name=i}];     \path let \p1=($(i-1)$) in (\x1,\y1);     \draw[dashed] (i-1) -- ($(axis cs:0,-0.2)!(i-1)!(axis cs:64,-.2)$);          \legend{Sampled signal,Threshold}     \end{axis}          \begin{axis}[         clip=true,         axis x line=bottom,         axis y line=left,         xmin=1,         xmax=64,         samples =32,         ymax = 1.6,         ymin  = -0.2,         xtick=\empty,         ytick=\empty,         extra x ticks={\x1},         extra x tick labels={$t_{step}$},       ]     \end{axis}     \end{tikzpicture}           \end{document}      My attempt to use `\x1` directly in the axis environment is failing. ![enter image description here](http://i.stack.imgur.com/h7lx7.png)


title: Menu Selection in LaTeX

text: I want to create a menu selection for different documents, what I mean for example is to run latex over the terminal, and the terminal prompt you if you want to create a diploma, a letter, a book, etc. Later using the \typein command fill the documents previously done. I already know how to use the \typein command. But the menu I have no idea, is this even possible in LaTeX?


title: can't access a previously defined node

text: I have the following code snippet. In that i define the node (B) with the `coordinate` operation. Unfortunately i can't access the node later on. LuaLatex exits with the error message:               Package pgf Error: No shape named B is known.      * * *               \documentclass{standalone}          \usepackage{tikz}          \usetikzlibrary{calc}          \begin{document}              \begin{tikzpicture}[>=latex]                  \tikzset{%                 auto/.pic={%                     \draw[fill=black!20] (0,10pt)                         node[fill=black!20,anchor=south,                                 draw,rectangle,                                 minimum width=3cm,                                 minimum height=0.75cm] (-A) {};                          \draw[fill=black]                         ($(-A.south west)!0.2!(-A.south east)$) circle (10pt);                     \draw[fill=black]                          ($(-A.south west)!0.8!(-A.south east)$) circle (10pt);                 }             }                  % define node (B)             \draw[rotate=30,every node/.style={rotate=30}]                  (0,0) coordinate (A) --                  (4,0) pic (Auto) {auto} --                  (8,0) coordinate (B);                  \draw[->, line width=1pt]                  (Auto-A.center) -- +(0,-2) node[midway,right]{$\vec F$};                  % can't access (B)             \draw (A) -- (B);              \end{tikzpicture}          \end{document}


title: TikZ: How can I write my code more concisely?

text: I am learning how to use TikZ and want to learn ways to write more concise TikZ code. I feel I use many more lines than others may need to achieve the same results. In particular, I want to learn a technique or practice for writing concise code that I can use for all my TikZ documents. As an example, consider this image: ![enter image description here](http://i.stack.imgur.com/Nj2Mq.png) … which was created with the code below (the spacing is supplied for readability). Note that you may have to update TikZ and pgf to run this code, as the `angles` and `quotes` libraries are relatively new as of May 2014. * * *               \documentclass[tikz]{standalone}%          \usetikzlibrary{calc}     \usetikzlibrary{intersections}     \usetikzlibrary{angles}     \usetikzlibrary{quotes}          \begin{document}     \begin{tikzpicture}       \coordinate (A) at (0, 0);       \coordinate (B) at (3, 0);       \coordinate (C) at (3, 2);            \draw[name path = tri] (A) -- (B) -- (C) -- cycle pic["$\alpha$", -stealth,       draw, angle radius = 1cm, angle eccentricity = 1.25] {angle = B--A--C};            \path[name path = line] (0, 1.4) -- +(2.9, 0);       \path[name intersections = {of = line and tri, by = P1}];            \path (P1) -- ($(P1)!.25cm!-90:(A)$) coordinate (cylinder);       \path[name path = line2] (cylinder) -- +(1.05, 0);       \path[name intersections = {of = line2 and tri}];            \draw (cylinder) circle[radius = 0.25cm];       \draw[dashed, gray] (cylinder) -- (intersection-1);       \draw[stealth-stealth] (3.15, 2) -- ($(intersection-1) + (.15, 0)$);       \draw (3.1, 2) -- (3.2, 2);       \draw ($(intersection-1) + (.1, 0)$) -- +(.1, 0);       \draw (cylinder) -- +(45:.25);            \pgfmathsetmacro{\angle}{atan(2/3)};       \pgfmathsetmacro{\ppi}{\angle + 180}            \begin{scope}[rotate = \angle]         \clip ($(cylinder) + (0, .4)$) rectangle ($(cylinder) + (-.4, 0)$);              \draw[name path global = rotation] (cylinder) circle[radius = .395cm];       \end{scope}            \path[name path = line3] (cylinder) -- +(\ppi:.4);       \path[name intersections = {of = line3 and rotation, by = P2}];     \end{tikzpicture}     \end{document}      * * *


title: How to overlay graphs using includegraphics or pstricks?

text: I have a figure (eps file included using `\includegraphics`) inside a `postscript` environment where I use PSTricks to add labels and extra lines. I want to add another eps file smaller in the top right so it is on the top of the other figure. Can I use `\includegraphics` or something similar (possibly in PSTricks) to put a new eps file partially on top of the other one, in the same `postscript` environment? I want the result to look a bit like this: ![Graph with a second graph overlayed in the corner.](http://i.stack.imgur.com/fPkyW.png)


title: \bibliographystyle doesn't apply

text: `\bibliographystyle` doesn't seem to be applied.   I want to get > Майоров С.А., Новиков Г.И. Принципы организации цифровых машин. - Л.: > Машиностроение, 1974. - 432 с. but I'm getting > Новиков Г.И. Майоров С.А. Принципы организации цифровых машин. > Машиностроение, Л., 1974. instead. Style used to format as showed on the first example is in `gost71u.bst` file. I even tried to copy this file to directory where `.tex` file located. Here is the code               \makeatletter     \bibliographystyle{unsrt}     \renewcommand{\@biblabel}[1]{#1.}     \makeatother          \begin{document}              % blah blah              \phantomsection         \addcontentsline{toc}{section}{Список литературы}         \bibliographystyle{gost780u}         \renewcommand{\bibname}{Список литературы}         \bibliography{cites}          \end{document}      Also there are some extra styles: `gost780s`, `gost71s`, `gost780u`, but they are not applying too. I'm using the sequence of commands described there: at first I'm running pdflatex and then — bibtex. And it worked only once.


title: BibTeX: DLMF web site with organizational author (NIST)

text: A BibTeX question (using BibDesk). I am having trouble working out how to make BibTeX handle the new Digital Library of Mathematical Functions (DLMF) web page. No authors or editors are listed. DLMF itself suggests (http://dlmf.nist.gov/help/cite) > When referring to the web site from a print publication, it is recommended > to use the following format. > > Digital Library of Mathematical Functions. Release date. National Institute > of Standards and Technology from http://dlmf.nist.gov/. > > where the Release date can be found at the bottom of all DLMF pages. None of book, webpage, url, ... does it like this. Also, if I put NIST or DLMF in the author field, with or without braces, I get "NIST, " in the refernce list, i.e., it is expecting a first initial. This is going to be a very highly cited web page. It is the replacement for the venerable Abramowitz & Stegun and will be the standard reference for mathematical functions.


title: Preview on OS 10.7 does not display links in PDFs correctly

text: I would like links to appear as coloured underlines in my documents. The following short example produces a pdf that displays the link correctly in Acrobat, but not in Preview. In Preview it shows up as a box: ![](http://i.stack.imgur.com/g2zJN.png) Is there a way I can get Preview to display the link as an underline using commands in `\hypersetup`?               \documentclass{article}          \usepackage{hyperref}     \usepackage{xcolor}     \hypersetup{%         colorlinks=false,         pdfborderstyle={/S/U/W 1}     }               \begin{document}          \url{www.google.com}          \end{document}


title: How can I left-align \name?

text: I am working on a resume using `\documentclass{res}` but I'd like it to left- align the name and address while using the `\name` and `\address` commands. I have tried using `\begin{tabular}...` and `\begin{ncolumn}{2}...` but this causes the name to not show up at all. Is there a way to do this? My document has the following structure:               \documentclass{res}           \newsectionwidth{0pt}     \setlength{\textheight}{10.2in}     \topmargin=-.5in     \oddsidemargin=-.5in          \begin{document}          %Name and address commands are placed here     \name{John Q. Doe}     \address{Address 1\\1111 Anywhere St\\Anytown, USA 00000\\(555) 555-1111}     \address{\empty}          \begin{resume}     % Rest of resume is here and rendering correctly     \end{resume}     \end{document}      The example I followed had the following code, which placed one address on either side.               \address{Address 1\\1111 Anywhere St\\Anytown, USA 00000\\(555) 555-1111}     \address{Address 2\\9999 Anywhere St\\Anytown, USA 00000\\(555) 555-9999}      With a minor modification this did what I wanted               \address{Address 1\\1111 Anywhere St\\Anytown, USA 00000\\(555) 555-1111}     \address{\empty}      Thus I tried the following, but it still only placed the name in the center               \name{John Q. Doe}     \name{John Q. Doe} %Would be changed to \empty if it worked      This doesn't render the name at all               \begin{tabular}{p{3.5in}l}     \name{ John Q. Doe}      1111 Anywhere St       & \empty\\     Anytown, USA 00000     & \empty\\     (555) 555-1111         & \empty     \end{tabular}


title: Pages w/o side bar (package beamer)

text: Hope this is not an FAQ. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294912 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=294913 The submitter uses a theme, which is designed to have side bars (`Berkeley`). Now he wants to have a page w/o side bar and writes:               \begin{frame}[plain]       \begin{center}        lot of text to see the effect: lorem ipsum....       \end{center}     \end{frame}      He expects that the text is centered now, but this is not the case; the side bar is still regarded when placing the text. Same for images:               \begin{frame}[plain]        \resizebox{\textwidth}{!}{%          \includegraphics{image}        }     \end{frame}      Minimal example for testing can be provided. Before opening a useless ticket @the beamer maintainers: FAD or bug? Of course it works fine when using a theme not having side bars (e.g. `Madrid`). Many thanks! Hilmar


title: Problem with fontsize when using longtable

text: I am using `longtable` package to make my large table span two pages. However I have set the font size with `\fontsize` to my table to be quite small. The only problem is that when the table is finished, the text below it are also the small size.               \fontsize{9}{11}\selectfont     \centering     \begin{longtable}{| p{.20\textwidth} | p{.80\textwidth} |}      \hline     foo & bar \\ \hline      foo & bar \\ \hline     foo & bar \\ \hline     foo & bar \\ \hline     foo & bar \\ \hline     foo & bar \\ \hline     foo & bar \\ \hline     foo & bar \\ \hline     foo & bar \\ \hline     foo & bar \\ \hline     foo & bar \\ \hline     \caption{Your caption here}     \label{tab:myfirstlongtable}     \end{longtable}      (The above code was for test purposes as I was working from a tutorial)


title: natbib's \citet does not work

text: I am writing a paper using the springer journal LaTeX template. For some references I want to use in-text citation like this: ![enter image description here](http://i.stack.imgur.com/NM3NC.png) but for some reason, when I try this in my document I get the following: ![enter image description here](http://i.stack.imgur.com/uoczK.png) I can't seem to figure out where the problem lies. I tried using \citeauthor and \citeyear, but that does not solve the problem unfortunately. Below is a MWE:               \documentclass[]{article}     \usepackage[numbers, sort, comma, square]{natbib}          \begin{document}               bla bla bla \citet{aaronson1998}.                    \bibliographystyle{unsrt}     \bibliography{bibfile}           \end{document}      BiBTeX entry:               @article{aaronson1998,       title={Translation, validation, and norming of the {D}utch language version of the      {SF}-36 Health Survey in community and chronic disease populations},       author={Aaronson, Neil K and Muller, Martin and Cohen, Peter DA and Essink-Bot,          Marie-Louise and Fekkes, Minne and Sanderman, Robbert and Sprangers, Mirjam AG and      te Velde, Adrienne and Verrips, Erik},       journal={Journal of Clinical Epidemiology},       volume={51},       pages={1055--1068},       year={1998},       publisher={Oxford; New York: Pergamon Press, c1988-}         }


title: Beamer output without frames

text: I'm trying to get `beamer` to output the contents of the frames without the actual frames. The idea is to have the handouts produced as normal A4/Letter papers. I already have my content arranged in sections, subsections and proper itemization etc.


title: Code not wrapping in listings even though breaklines=true

text: I read that enabling breaklines in listings will make the included code wrap, but it does not in my case. Maybe something is interfering with this function? Full code is shown below:               \ifdefined\docdefined     \else         \documentclass[a4paper,twoside,12pt, openright]{report}         \input{include_start}         \begin{document}     \fi          \definecolor{dkgreen}{rgb}{0,0.6,0}     \definecolor{gray}{rgb}{0.5,0.5,0.5}     \definecolor{mauve}{rgb}{0.58,0,0.82}          % START DOCUMENT          \begin{appendices}     \makeatletter          \chapter{GUI Code}     %%%%%%%%%%%%%%%%%    XML     \section{Code XML}          \lstset{language=XML,      numbers=left,      frame=single,      commentstyle=\color{dkgreen},      basicstyle={\scriptsize\ttfamily},      keywordstyle=\color{blue},      %identifierstyle=\color{blue},      stringstyle=\color{mauve},     captionpos=t,     showstringspaces=false,     breaklines=true,     breakatwhitespace=true,     tabsize=3,     caption={\protect\filename@parse{\lstname}\protect\filename@base\text{.}\protect\filename@ext},     }          \begin{frame}          \lstinputlisting{C:/Users/hab/SW/GUI/android/AndroidManifest.xml}              \end{frame}          \end{appendices}          % END DOCUMENT     \ifdefined\docdefined     \else         \input{include_end}         \end{document}     \fi


title: TikZ figure in parts-environment

text: I'd like to have a TikZ figure in a `parts`-environment, but the figure appears above part (a) instead of below. How can I get the picture to follow the (a)? Thanks for your help!               \documentclass[addpoints,12pt]{exam}          \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{amsmath, amssymb, amsmath}     \usepackage{pgf,tikz}     \usetikzlibrary{arrows}     \usepackage{siunitx}          \begin{document}          \begin{questions}         \question             Find $x\in \mathbb{Q}$.             \begin{parts}                 \part                      \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]                             \clip(-2.0992637227845954,-1.7878880377249167) rectangle (7.801609010358657,5.493825659968799);                            \draw [domain=-2.0992637227845954:7.801609010358657] plot(\x,{(--6.6108--1.8599999999999999*\x)/3.96});                            \draw [domain=-2.0992637227845954:7.801609010358657] plot(\x,{(--3.4032-0.72*\x)/4.2});                            \draw [domain=-2.0992637227845954:7.801609010358657] plot(\x,{(--7.455599999999999-2.58*\x)/0.23999999999999977});                            \draw (2.75,1.5) node {\rotatebox{60}{$\parallel$}};                            \draw [domain=-2.0992637227845954:7.801609010358657] plot(\x,{(--13.01549181869475-2.58*\x)/0.23999999999999977});                            \draw (4.85,1.8) node {\rotatebox{60}{$\parallel$}};                            \draw (3,3.15) node[anchor=north west] {$\SI{1.5}{cm}$};                            \draw (5.114713103302678,2.140850515449367) node[anchor=north west] {$x$};                            \draw (0.28281626204234456,1.9263504220289323) node[anchor=north west] {$\SI{3}{cm}$};                        \end{tikzpicture}                    \part             \end{parts}      \end{questions}          \end{document}      Here's a picture: ![enter image description here](http://i.stack.imgur.com/ltiSs.png)


title: What is the easiest method to construct a bezier curve for the half part of a symmetric bezier curve?

text: Consider the following symmetric (about vertical axis) bezier curve constructed by 4 points `A`, `B`, `C`, and `D`. Now I want to construct another bezier curve (named `L`) for just either the left or right part of it.               \documentclass[pstricks,border=24pt]{standalone}     \usepackage{pst-eucl}     \begin{document}          \begin{pspicture}[showgrid=false](-3,-1)(3,3)         \pstGeonode             (3,3){A}             (1,1){B}             (-1,1){C}             (-3,3){D}         \psbezier(A)(B)(C)(D)         \psline[linecolor=red](0,3)(0,-1)     \end{pspicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/sRcuw.png) Without solving a polynomial equation first, how can I construct the bezier curve `L`? Answers with PSTricks (preferred) or TikZ or Asymptote are welcome. Note that I hate a trial and error method!


title: Is there a default / official / standard Vim indentation file for TeX, or just best practices for TeX source indentation?

text: If you see here, the author mentions an "official version" of an indentation script from Johannes Zellner. The link is broken and while there are traces of Zellner all over the interwebs, I can't find the script. Maybe there is a more up to date, somehow "official" (e.g. endorsed by TUG or some community, such as this one!) script for TeX indentation in Vim? (Or more particularly, in Vim+Latex-Suite, not that that really should make a difference?) If not, I'll probably customize Tanzler's script, in which case, my question becomes "what are the best practices for TeX source indentation"? I'm inclined to do               First sentence of new paragraph         continuation of first sentence.         Second sentence of paragraph             continuation of second sentence.         Third sentence of paragraph             continuation.         \begin{environment}             \item First item                     continuation of first item             \item Second item         \end{environment}      etc., but if there are established best practices for TeX source indentation, I will follow them instead. EDIT: Screenshots illustrating @J.C.Salomon 's explanation. My original way: ![My way of indentation--diff highlights too many changes](http://i.stack.imgur.com/0EI2h.png) Suggested better way: ![His way--only relevant changes are highlighted](http://i.stack.imgur.com/KlHCX.png)


title: processkv or keyval package keys does not allow 0 key

text: Either the processkv or keyval package does not seem to allow the 0 key. When I do 0=val I get errors when trying to process the key but when I do 1=val everything works. Any ideas? In parcolumns it processes the keyvalues using:               \expandafter\processkeyvalues\expandafter{\the\toks@}\pc@setsinglecolwidth%      and the key is simply defined as               \define@key{parcolumns}{colwidths}{\toks@{#1}}      Which calls calls the following macro to act on the key-value pairs:               \def\pc@setsinglecolwidth#1#2{%         \@ifundefined{pc@column@width@\number#1}{%             \PackageError{parcolumns}{`#1' is not a valid column width number!}{\@ehc}%         }{%             \csname pc@column@width@\number#1\endcsname=#2\relax%         }%     }      The error message is from the package error. It is not creating the `\pc@column@width@0` value for some reason but all other positive values work(well, up to the number of columns). The way I understand the code is `processkv` simply processes each key-value pair and calls the macro, in this case `\pc@setsinglecolwidth`, on each key- value pair. Hence I see no reason why '0' doesn't work. Since I couldn't find anything in parcolumns that is treating 0 as special I see no reason why the error would be in parcolumns (hence the only other place would be `processkv` and `keyval`? Works:               \begin{parcolumns}[nofirstindent,distance=0pt,colwidths={1=30pt}]{6}%      Doesn't Work:               \begin{parcolumns}[nofirstindent,distance=0pt,colwidths={0=30pt}]{6}%


title: Compiling problem

text: I have had the problem of compiling my document with the following table in it:               \begin{table}[!h]     \centering\small     \caption{Thickness measurements on the two tubes.}     \label{tab:Thickness_measurement}         \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lll}             \toprule             Tube & Avareage thickness (mm) & Standard deviation (mm) \\             \midrule             [89$^\circ$$_2$/12.7$^\circ$$_1$/89$^\circ$$_2$] & 2.08 & 0.034 \\             \midrule             [55$^\circ$$_n$] & 0.254 & 0.027 \\             \bottomrule         \end{tabular*}     \end{table}      I'm using MiKTeX and I don't get any error messages or anything peculiar in my log, I just click the compile button and it just starts working and keeps at it forever until I abort it. I've managed to make it work by replacing `[89$^\circ$$_2$/12.7$^\circ$$_1$/89$^\circ$$_2$]` with some random text, say `f` as in this table:               \begin{table}[!h]     \centering\small     \caption{Thickness measurements on the two tubes.}     \label{tab:Thickness_measurement}         \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lll}             \toprule             Tube & Avareage thickness (mm) & Standard deviation (mm) \\             \midrule             f & 2.08 & 0.034 \\             \midrule             [55$^\circ$$_n$] & 0.254 & 0.027 \\             \bottomrule         \end{tabular*}     \end{table}      This is probably rather vague, but does anyone know what can be wrong?


title: How to use Arabic text inside addcontentsline

text: I am using arabxetex package. I need my TOP be all in Arabic script including page numbers. \addcontentsline works with Latin [English] text, but not with Arabic.               \phantomsection     \addcontentsline{toc}{section}{-- TEXT-- }      When I use something like this inside the TEXT brackets:               \begin{arab}[utf]     ببي     \end{arab}      It gives me error. Need your help. As per request, here I am adding complete working minimal code:               \documentclass[a4paper]{article}     \usepackage{hyperref}     \usepackage{multicol}     \usepackage{fancyhdr}     \makeatletter     \makeatother     \usepackage{hyperref}     \hypersetup{         colorlinks,         citecolor=black,         filecolor=black,         linkcolor=black,         urlcolor=black     }     \usepackage[margin=0.08in, paperwidth=3.56in, paperheight=5.95in]{geometry}     \usepackage{arabxetex}     \usepackage{setspace}         \renewcommand*\contentsname{}          \begin{document}     \tableofcontents     \newpage          \phantomsection     \addcontentsline{toc}{section}{AAA} % Instead of AAA, I need Arabic text ننن     \begin{arab}[utf]     نتنتنهه     \end{arab}          \newpage     \phantomsection     \addcontentsline{toc}{section}{BBB} % Instead of BBB, I need Arabic text ههه     \begin{arab}[utf]     منسة     \end{arab}          \end{document}


title: Variable chapter references

text: I'm looking to typeset certain references à la `varioref` thus so: if I reference chapter 3 from within chapter 2, I'd like the output to look like "...in the next chapter---" rather than "...in chapter 3 on page XXX...", similarly for sections, parts, etc. Does anyone know of such a package or how I may go about tweaking `varioref` to suit my needs?


title: How to create multilingual (English, Japanese) and multi-format bibliographies with biblatex and biber

text: As a follow-up to this thread, I would like to know if it is possible to extend this further to change the citation format depending on whether kanji or romanization is selected.   * Japanese entries printed in kanji would use proper Japanese quotes and such (ideally, while still printing Ibid. or 前掲 depending on the paper language) Using the example in that thread:   * 柳田聖山編『禪學叢書』（中文出版社、1975）、第1巻、1頁。 alongside other entries in English in Chicago format, or whatever:   * Yanagida Seizan, ed., Zengaku sôsho (Collected Materials for the Study of Zen), Tokyo: Chūbun shuppansha, 1975. It is my understanding that babel would have to be used since polyglossia has compatibility issues with biblatex. So, as far as I understand, the language specification in biblatex is for hyphenation, while punctuation is reliant on the main text language using csquotes. Changing punctuation based on the language of the bib entry seems different. Is this possible?


title: How to upload a tds.zip file to CTAN

text: From the `ctanify` documentation (great tool, by the way) I got the impression that just including a *.tds.zip file when doing a CTAN upload is sufficient. Well, obviously not, since the tds.zip file just ended up on the scrapheap instead of http://www.ctan.org/tex-archive/install/macros/latex/contrib. Excerpt from the `ctanupload` log:               # 2011-10-09 19:50:46     contribution = caption     version = 3.2c     ...     # caption.tar.gz (5089187):     # drwxrwxr-x axel/axel         0 2011-10-09 19:49 caption/     ...     # -rw-rw-r-- axel/axel      1991 2011-10-09 19:49 caption/caption.ins     # -rw-rw-r-- axel/axel      2276 2011-10-09 19:49 caption/README     # -rw-rw-r-- axel/axel   2568077 2011-10-09 19:49 caption.tds.zip               # Response:          #      # Your upload to CTAN has succeeded.     # ==================================     ...      Do I have to do a separate CTAN upload for the tds.zip file? Or did I miss something? I have searched for this topic on SX, and I'm aware of http://dante.ctan.org/upload, http://www.tex.ac.uk/cgi- bin/texfaq2html?label=uploads, How to upload my packages or document classes to CTAN?, CLI tool to upload to CTAN, and How can I contribute to CTAN?, but didn't find an answer.


title: Latex distribution new installed, error undefined control sequence always occurs when moderncv is used

text: I installed protext distribution on another pc and tried to edit my cv. Unfortunately this error message does appear and I do not know why?               *geometry* driver: auto-detecting     *geometry* detected driver: pdftex     ABD: EveryShipout initializing macros     ("E:\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"     ("E:\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))     ! Undefined control sequence.     <recently read> \@lastname           l.247 \makelettertitle      This is my reduced code:               \documentclass[11pt,a4paper]{moderncv}     \moderncvtheme[green]{classic}                    \usepackage[ngerman]{babel}        \usepackage[utf8]{inputenc}                       \usepackage{floatflt}     \usepackage{fancyhdr}      \usepackage{geometry}     \geometry{a4paper,left=2cm,right=1cm, top=2cm, bottom=1.5cm,headheight=21pt}      \usepackage{tikz}      \usepackage{wrapfig}     \usepackage{lipsum}      \usepackage{footmisc}     \usepackage{xparse}     \usepackage{setspace}     \usepackage{pbox}     \usepackage[firstyear=1996,lastyear=2014.34]{moderntimeline}     \usepackage{eurosym}      \usepackage{pdfpages}          % distance of entries to date column          \setlength{\separatorcolumnwidth}{2.5em}          % Suppress final dot in \cventry     \renewcommand*\cventry[7][.25em]{%       \cvitem[#1]{#2}{%         {\bfseries#3}%         \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%         \ifthenelse{\equal{#5}{}}{}{, #5}%         \ifthenelse{\equal{#6}{}}{}{, #6}%         \strut%         \ifx&#7&%           \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}          % New page style     \fancypagestyle{myfancy}{     \fancyhead[L]{\parbox[t]{.3333\textwidth}{\sffamily\footnotesize     adress\\adress}}     \fancyhead[C]{\parbox[t]{.3333\textwidth}{\fixedphonesymbol\sffamily\footnotesize phone}}     \fancyhead[R]{\parbox[t]{.3333\textwidth}{\emailsymbol\sffamily\footnotesize  mail}}     }     \makeatletter     \let\ps@plain\ps@myfancy     \let\ps@empty\ps@myfancy     \makeatother     \pagestyle{myfancy}          % Redefinitions of \makecvtitle, opening and closing to     % have the desired formatting for first and family names     \makeatletter     \renewcommand*{\makecvtitle}{%       % recompute lengths (in case we are switching from letter to resume, or vice versa)       \recomputecvlengths%       % optional detailed information (pre-rendering)       \def\phonesdetails{}%       \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number         \protected@edef\phonesdetails{\phonesdetails\protect\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%       \def\socialsdetails{}%       \collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link         \protected@edef\socialsdetails{\socialsdetails\protect\makenewline\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%       \newbox{\makecvtitledetailsbox}%       \savebox{\makecvtitledetailsbox}{%         \addressfont\color{color2}%         \begin{tabular}[b]{@{}r@{}}%           \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%             \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty             \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%           \phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict           \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%           \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%           \socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict           \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%         \end{tabular}       }%       % optional photo (pre-rendering)       \newbox{\makecvtitlepicturebox}%       \savebox{\makecvtitlepicturebox}{%         \ifthenelse{\isundefined{\@photo}}%         {}%         {%           \hspace*{\separatorcolumnwidth}%           \color{color1}%           \setlength{\fboxrule}{\@photoframewidth}%           \ifdim\@photoframewidth=0pt%             \setlength{\fboxsep}{0pt}\fi%           \framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%       % name and title       \newlength{\makecvtitledetailswidth}\settowidth{\makecvtitledetailswidth}{\usebox{\makecvtitledetailsbox}}%       \newlength{\makecvtitlepicturewidth}\settowidth{\makecvtitlepicturewidth}{\usebox{\makecvtitlepicturebox}}%       \ifthenelse{\lengthtest{\makecvtitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvtitlenamewidth=0pt)         {\setlength{\makecvtitlenamewidth}{\textwidth-\makecvtitledetailswidth-\makecvtitlepicturewidth}}%         {}%       \begin{minipage}[b]{\makecvtitlenamewidth}%         \namestyle{\@firstname}\par\smallskip\namestyle{\@lastname}%         \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%       \end{minipage}%       \hfill%       % optional detailed information (rendering)       \llap{\usebox{\makecvtitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of makecvtitlenamewidth is forced       % optional photo (rendering)       \usebox{\makecvtitlepicturebox}\\[2.5em]%       % optional quote       \ifthenelse{\isundefined{\@quote}}%         {}%         {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%       \par}% to avoid weird spacing bug at the first section if no blank line is left after \makecvtitle     \renewcommand*{\makeletterclosing}{       \@closing\\[3em]%       {\bfseries\@firstname\ \@lastname}%       \ifthenelse{\isundefined{\@enclosure}}{}{%         \\%         \vfill%         {\color{color2}\itshape\enclname: \@enclosure}}}     \renewcommand*{\makelettertitle}{%       % recompute lengths (in case we are switching from letter to resume, or vice versa)       \recomputeletterlengths%       % sender contact info       \hfill%       \begin{minipage}{.5\textwidth}%         \raggedleft%         \addressfont\textcolor{color2}{%           {\bfseries\upshape\@firstname\\\@lastname}\@firstdetailselementfalse%           \ifthenelse{\isundefined{\@addressstreet}}{}{\makenewline\addresssymbol\@addressstreet%             \ifthenelse{\equal{\@addresscity}{}}{}{\makenewline\@addresscity}% if \addresstreet is defined, \addresscity and addresscountry will always be defined but could be empty             \ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%           \collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number             \makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%           \ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%           \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%           \ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%         \end{minipage}\\[1em]       % recipient block       \begin{minipage}[t]{.5\textwidth}         \raggedright%         \addressfont%         {\bfseries\upshape\@recipientname}\\%         \@recipientaddress%       \end{minipage}       % date       \hfill% US style     %  \\[1em]% UK style     12 March 2014, place\\[2em]% US       % opening       \raggedright%       \@opening\\[1.5em]%       % ensure no extra spacing after \makelettertitle due to a possible blank line     %  \ignorespacesafterend% not working       \hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}          \makeatother          \makeatletter     \renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}     \makeatother               % for timeline          \makeatletter     \pgfmathsetmacro\tl@textstartabove{\tl@width-2pt}     \NewDocumentCommand\tldatelabelcventryn{O{center}O{color1}mmmmmmm}{%     \pgfmathsetmacro\tl@endyear{\tl@lastyear}%     \pgfmathsetmacro\tl@startfraction{(#3-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%     \pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%      \cventry{\tikz[baseline]{%          \useasboundingbox (0,-1.5ex) rectangle (\hintscolumnwidth,1ex);          \fill [\tl@runningcolor] (0,0)             rectangle (\hintscolumnwidth,\tl@runningwidth);          \fill [#2] (0,0)             ++(\tl@startfraction*\hintscolumnwidth,0pt)             node [tl@startyear,yshift=5pt,anchor=#1] {#4}             node {$\bullet$};        }     }     {#5}{#6}{#7}{#8}{#9}     }     \newcommand\tllabelcventryn[9][color1]{%       \gdef\Argi{#1}%       \gdef\Argii{#2}%       \gdef\Argiii{#3}%       \gdef\Argiv{#4}%       \gdef\Argv{#5}%       \gdef\Argvi{#6}%       \gdef\Argvii{#7}%       \gdef\Argviii{#8}%       \gdef\Argix{#9}%       \auxtllabelcventryn     }     \def\auxtllabelcventryn#1{%       \gdef\Argx{#1}%     \pgfmathsetmacro\tl@endyear{ifthenelse(\Argiii==0,\tl@lastyear,\Argiii)}     \pgfmathsetmacro\tl@startfraction{(\Argii-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%     \pgfmathsetmacro\tl@endfraction{(\tl@endyear-\tl@firstyear)/(\tl@lastyear-\tl@firstyear)}%      \cventry{\tikz[baseline=0pt]{          \fill [\tl@runningcolor] (0,0)             rectangle (\hintscolumnwidth,\tl@runningwidth);          \useasboundingbox (0,-1.5ex)             rectangle (\hintscolumnwidth,1ex);          \fill [\Argi] (0,0)             ++(\tl@startfraction*\hintscolumnwidth,0pt)             node [tl@startyear,anchor=north east] {\Argiv} node [tl@startyear,above] {\Argv}             rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width-1pt);          \pgfmathsetlength{\pgf@xa}{\Argiii} \ifdim\pgf@xa=0pt             \shade [left color=\Argi] (\tl@startfraction*\hintscolumnwidth,0)                 rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width);          \else             \fill [\Argi] (\tl@startfraction*\hintscolumnwidth,0)                 rectangle (\tl@endfraction*\hintscolumnwidth,\tl@width);          \fi          }     }     {\Argvi}{\Argvii}{\Argviii}{\Argix}{\Argx}%     }     \makeatother     %     \tltextstart[north]{\scriptsize}     \tltextend[south]{\scriptsize}          \firstname{prr}     \familyname{sr}     \title{Curriculum vit\ae{}}                   \address{}{}       \photo[128pt]{picture}                                       \newenvironment{changemargin}[2]{%     \begin{list}{}{%     \setlength{\leftmargin}{#1}%     \setlength{\rightmargin}{#2}%     }%     \item[]}     {\end{list}}          \begin{document}          This is my cv.          \end{document}      When I run this I get the error:               *geometry* driver: auto-detecting     *geometry* detected driver: pdftex     ABD: EveryShipout initializing macros     ("E:\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"     ("E:\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))     ! Undefined control sequence.     <argument> ...a \@parboxrestore \fixedphonesymbol                                                        \sffamily \footnotesize ph...     l.238 \end{document}      I do not know where the problem is? I installed everything correctly and updated the package moderncv. Is gettitlestring.sty causing the error? What should I do? When I run this code:               \documentclass[11pt,a4paper]{moderncv}     \moderncvtheme[green]{classic}                    \usepackage[ngerman]{babel}        \usepackage[utf8]{inputenc}                       \usepackage{floatflt}     \usepackage{fancyhdr}      \usepackage{geometry}     \geometry{a4paper,left=2cm,right=1cm, top=2cm, bottom=1.5cm,headheight=21pt}      \usepackage{tikz}      \usepackage{wrapfig}     \usepackage{lipsum}      \usepackage{footmisc}     \usepackage{xparse}     \usepackage{setspace}     \usepackage{pbox}     \usepackage[firstyear=1996,lastyear=2014.34]{moderntimeline}     \usepackage{eurosym}      \usepackage{pdfpages}          \begin{document}          This is my cv.          \end{document}      I get the error message:               Package hyperref Message: Driver (autodetected): hpdftex.          ("E:\MiKTeX 2.9\tex\latex\hyperref\hpdftex.def"     ("E:\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))          Package hyperref Warning: Option `pdfpagelabels' has already been used,     (hyperref)                setting the option has no effect on input line 20.          ! Undefined control sequence.     <argument> \@firstname                             {}~\@familyname {}     l.20 \begin{document}      Whats wrong with my latex? Ok, I now think this is a problem with the moderncv package, when I run this:               \documentclass[11pt,a4paper]{moderncv}          \begin{document}     test          \end{document}      I get the error:               Package hyperref Message: Driver (autodetected): hpdftex.          ("E:\MiKTeX 2.9\tex\latex\hyperref\hpdftex.def"     ("E:\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))          Package hyperref Warning: Option `pdfpagelabels' has already been used,     (hyperref)                setting the option has no effect on input line 3.          ! Undefined control sequence.     <argument> \@firstname                             {}~\@familyname {}     l.3 \begin{document}          ?


title: Fancy Chapter Headings - onesided version?

text: I would like to create titles of my single sided thesis like the one given in books (and can be seen in the following link), I tried to change the code given by Martin in the following link, but didn't get the desired output Fancy Chapter Headings This is Martin's code:               \documentclass{book}     \usepackage{graphics}          \usepackage{titlesec}     \titleformat{\chapter}[display]       {\normalfont\Large\raggedleft}       {\MakeUppercase{\chaptertitlename}%         \rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}       {10pt}{\Huge}     \titlespacing*{\chapter}{0pt}{30pt}{20pt}          \usepackage{lipsum}     \setcounter{chapter}{2}     \begin{document}          \chapter{Implementation}     \lipsum     \end{document}      Here is what it currently looks like: ![enter image description here](http://i.stack.imgur.com/4YoJe.png) I am trying to change the printed output from right to left side, how should i modify the code? I just want to write the black box then chapter number, ENTER then Chapter Name in Centre.


title: Using animate in beamer with multiple eps pictures

text: I have a set of 23 pictures that, when combined, give a nice animation. But I don't want to make 23 separate frames for it. I read that there is an option using the `animate` package but I can't seem to find any example where I could see how to do that (the official `animate` PDF isn't helping :( ). Could someone make a MWE so that I could see how to do that?


title: What is a BANG float?

text: This question follows up on What is the exact purpose of \ftype@<TYPE>?. The LaTeX kernel source refers to a `BANG float` in the `ltoutput.dtx`, but there is no explanation for it. Anybody knows what it is?


title: bibliography entry missing

text: I have got a problem with BibTeX: For exhibition catalogues I have used the `misc` entrytype in Jabref and for sorting I have added a key = `{Ausst.Kat. place}`. This works fine. Only one entry always misses in my bibliography and it is always another one! Instead there appear only three letters in parentheses like for example `[Kan]` instead of `[Ausst.Kat. Kanazawa 2004]`. After compiling I get an error message:               the literal stack isn't empty for Kanazawa2004 while executing --- line 2227 of file natdin.bst


title: moderncv LaTeX error: File `suffix.sty' not found

text: I'm a LaTeX noob and i'm trying to create CV with `moderncv` package. I installed it via Tex Live Utility and then tried to start creating my own cv with `cv_7.tex` template (http://www.latextemplates.com/template/moderncv-cv- and-cover-letter) with TeXWorks. When run the template I get this:               (./moderncv.cls     Document Class: moderncv 2012/10/31 v1.2.0 modern curriculum vitae and letter d     ocument class     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/base/size11.clo)     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/etoolbox/etoolbox.sty     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/etex-pkg/etex.sty))     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/base/ifthen.sty)     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/xcolor/xcolor.sty     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/latexconfig/color.cfg)     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/pdftex-def/pdftex.def     (/usr/local/texlive/2012basic/texmf-dist/tex/generic/oberdiek/infwarerr.sty)     (/usr/local/texlive/2012basic/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/base/fontenc.sty     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/base/t1enc.def))     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/lm/lmodern.sty)     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/url/url.sty)     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/graphics/graphicx.sty     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/graphics/keyval.sty)     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/graphics/graphics.sty     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/graphics/trig.sty)     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/latexconfig/graphics.cfg)))     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty)     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/tools/calc.sty)     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/xargs/xargs.sty     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/xkeyval/xkeyval.sty     (/usr/local/texlive/2012basic/texmf-dist/tex/generic/xkeyval/xkeyval.tex)))     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/microtype/microtype.sty     (/usr/local/texlive/2012basic/texmf-dist/tex/latex/microtype/microtype.cfg))     (./moderncvcompatibility.sty)          ! LaTeX Error: File `suffix.sty' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: sty)          Enter file name:       I tried to find this suffix style from TexLive Utility but I can't seem to find it! Any solutions?


title: This is bibliography code is not compiling why?

text: \begin{thebibliography}{6}     \bibitem{3} C Kabele, {\em Transistos},  Journal of the American Society for Naval Engineers, {\bf 65}, 707--714, 1953.     \bibitem{2} J M Early, {\em Out to Murray Hill to Play: An Early History of Transistors},  IEEE Transactions on Electron Device, {\bf 48}, 2001.     \bibitem{4} R Nelson, {\em The Link Between Science and Invention: The Case of the Transistor}, The Rate and Direction of Inventive Activity: Economic and Social Factors, 549--584, 1962.     \bibitem{1} S Soni and V Dagolia, {\em The Transistor Amplifier}, International Journal of Electrical & Communication Engineering for Applied Research, {\bf 1}, 1--20, 2012.     \end{thebibliography}


I want each cell in a tabular to have 4 equal paddings of exactly 15pt each. How to make 4 equal paddings (left, right, top, bottom) in a table cell?               \documentclass{article}     \usepackage{array,calc,longtable,ragged2e,pstricks}     \psset{linecolor=red}     \tabcolsep=1pt     \arrayrulewidth=1pt          \newcolumntype{A}[1]{>{\Centering}m{#1\linewidth-2\tabcolsep-1.5\arrayrulewidth}}          \def\pic{\begin{pspicture}(4,3)\psframe*(4,3)\end{pspicture}}          \begin{document}     \begin{longtable}{|*2{A{0.5}|}}\hline     \pic&\pic\tabularnewline\hline     \end{longtable}     \end{document}      ![alt text](http://i.stack.imgur.com/VA8qF.png) * * * Herbert's solution below apparently does not support displayed equations. Please compile with `xelatex` or `latex-dvips-ps2pdf`.               \documentclass{article}     \usepackage{array,amsmath,longtable,ragged2e,pst-node,varwidth}     \psset{linecolor=blue}     \tabcolsep=1pt     \arrayrulewidth=1pt     \newsavebox\TBox          \def\picB{\begin{pspicture}(4,3)\psframe*(4,3)\end{pspicture}}          \newenvironment{saveTBox}       {\begin{lrbox}{\TBox}\varwidth{\linewidth}}       {\endvarwidth\end{lrbox}%        \fboxrule=0pt\fboxsep=15pt\fbox{\usebox\TBox}}          \newcolumntype{B}{@{}>{\saveTBox}c<{\endsaveTBox}@{}}          \begin{document}          \begin{longtable}{|B|B|B|}\hline         \[\rnode[r]{A}{y=f(x)}\] & \rnode[l]{B}{$\displaystyle y=f(x)$} & \picB          \ncline{A}{B}\tabularnewline\hline     \end{longtable}          \end{document}      ![enter image description here](http://i.stack.imgur.com/MUJaL.png)


title: \if@ statement explanation

text: I'm trying to tweak some `.cls` to fit my needs, and I'd really appreciate it if someone could explain me these statements:               \if@radseminar%     ...     \else     ...     \fi      If I understand correctly, it will match `@radseminartrue`, right? How can I use OR statement? For example, I tried               \if{@radtehnicka% or @radseminar%}      but it didn't match either.


title: Superscript citations without brackets with the `revtex4-1` document class

text: Is it possible to achieve citations that are superscript and don't have brackets using the `revtex4-1` document class? An example of how they should look: > Afirmation3,4


title: article vs. report

text: \section{Section title here}}     \subsection*{The subsection without numbers, but want it to appear in TOC}     \addcontentsline{toc}{subsection}{The subsection without numbers, but want it to appear in TOC}      This is how I am avoiding subsection numbering and only showing section numbering. But I want subsection to appear in ToC so using the line below. All the above I did under `\documentclass{article}` however when I change it to `\documentclass{report}` it started showing up numbers again. I would appreciate if you can guide me to understand this a bit more. I can get by with `article`; however, I am interested to know the difference. How can I achieve same in `\documentclass{report}`.


title: How to change how suspension points (dot dot dot) look with LaTeX?

text: ## What I want to do I know it is bad, but I would like to redefine how `\ldots` and its equivalents (the Unicode character `…` for instance) are rendered by TeX. Indeed, in my opinion, with LaTeX, the suspension points don't look great... I know that this is the way it should looks, but I prefer how they generally look on electronic documents. ## Examples ![enter image description here](http://i.stack.imgur.com/exZEp.png) ![enter image description here](http://i.stack.imgur.com/OrSDO.png) ## My questions   * Is this already done somewhere?   * So far, I have tried this, but the result is not satisfactory and I'm afraid that some typographic rules (the French ones for instance... actually, I intend to use the French rules) won't always be applied (imagine some dots in a bracket...). Can you help me to improve it?              \documentclass{article}     \usepackage[utf8]{inputenc}     \DeclareUnicodeCharacter{2026}{...}     \renewcommand{\ldots}{...}          \begin{document}     With \LaTeX, the suspension points don't look great\ldots I know that this is the way it should looks, but I prefer how they generally look on electronic documents.     \end{document}


title: How to make Tikz Node Content fit?

text: I'm trying to make a decision tree with Tikz, but the text in my nodes overlap. Does anyone know how to fix that? Thanks so much!               \begin{tikzpicture}           \node {{Lorem ipsum dolor sit amet, consectetur adipisicing elit.}}               child {                   node {Yes}                   child {                    child {                           node {\begin{tabular}{c}                       Lorem ipsum dolor sit amet\\                      consectetur adipisicing elit, \\                       sed do eiusmod tempor incididunt \\                       ut labore et dolore magna aliqua.                       \end{tabular}}                           child {                       node {No}                       child { node {Lorem ipsum dolor sit amet}                           child { node {Lorem ipsum dolor sit amet}                           }                       }                   }                           child {                       node {Yes}                       child { node {Lorem ipsum dolor sit amet}                           child { node {Lorem ipsum dolor sit amet}                           }                       }                   }               }                   }           }           ;       \end{tikzpicture}      Here is a picture of my TeX: ![enter image description here](http://i.stack.imgur.com/KPDhv.jpg)


title: Does some one know how to create a specific kind of block on Beamer?

text: I would like to create a block in Beamer exactly as the one illustrated below. Does someone know how to do it? ![enter image description here](http://i.stack.imgur.com/E5OMl.png)


title: Game proofs for cryptography

text: ![An example of a cryptographic game](http://i.stack.imgur.com/3z2qH.png) In cryptography a lot of security definitions (IND-CPA, IND-CCA etc.) are represented as games between an adversary and a challenger. Is there an existing package or a simple way to achieve this effect?


title: Pre-defined color cycles à la RColorBrewer?

text: When I have multiple line plots in `pgfplots`, the colors of the lines cycle through a few colors (my guess is the colors are blue, red, black and dark khaki) before repeating with different marks. See below: ![enter image description here](http://i.stack.imgur.com/mky7Z.png) However, in my opinion these default colors are not very nice. For example, compare the colors used by Color Brewer for qualitative data. Based on the following link, I know enough about how to define my own line color styles in `pgfplots`. For example,               \definecolor{s1}{RGB}{228, 26, 28}     \definecolor{s2}{RGB}{55, 126, 184}     \definecolor{s3}{RGB}{77, 175, 74}     \definecolor{s4}{RGB}{152, 78, 163}     \definecolor{s5}{RGB}{255, 127, 0}     \pgfplotscreateplotcyclelist{set1}{         s1,every mark/.append style={fill=s1},mark=*\\         s2,every mark/.append style={fill=s2},mark=*\\         s3,every mark/.append style={fill=s3},mark=*\\         s4,every mark/.append style={fill=s4},mark=*\\         s5,every mark/.append style={fill=s5},mark=*\\     }      Before defining my own color schemes, I was wondering if someone had already done this as a LaTeX/`pgfplots` package? If not, would this be a useful feature that could be incorporated in a future version of `pgfplots`?