title: a tikzpicture on pages without chapter and index

text: I would get the result of the output below               \documentclass[11pt, a4paper]{book}     \usepackage{geometry}     \geometry{%     papersize={19.7cm,27cm},     centering,     textwidth=380pt,     textheight=650pt}          \usepackage{fancyhdr}     \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}          \usepackage{tikz}     \parindent=0pt     \pagestyle{empty}          \begin{document}     \chapter{Title of chapter}     \section{and section}     Bla bla bla. In this page the pagestyle would be empty.     \newpage     \begin{tikzpicture}[remember picture,overlay]         \fill[lightgray] (-90pt,1cm) rectangle (0pt,2.5cm); %riquadro ad inizio pagina         \draw[gray] (-90pt,1cm)--(470pt,1cm);   %linea sotto riquadro ad inizio pagina         \fill[lightgray] ({\textwidth/2-30pt},-23.45cm) rectangle ({\textwidth/2+30pt},-24.45cm);   %riquadro per la pagina         \draw[gray] (-90pt,-23.45cm)--(470pt,-23.45cm); %linea di fondo pagina         \node at (0,1.25cm) [left]{\sffamily\chaptername\ \thechapter};         \node at (0,1.25cm) [right]{\slshape\sffamily\leftmark};         \node at (380pt,1.25cm) [left] {\slshape\sffamily author};         \node at ({\textwidth/2},-23.9cm) {\bfseries\sffamily\thepage};     \end{tikzpicture}          Here there is some text (here the number of the page is even);          \newpage          \begin{tikzpicture}[remember picture,overlay]         \fill[lightgray] (380pt,1cm) rectangle (470pt,2.5cm);   %riquadro (destro) ad inizio pagina         \draw[gray] (-90pt,1cm)--(470pt,1cm);   %linea sotto riquadro ad inizio pagina         \fill[lightgray] ({\textwidth/2-30pt},-23.45cm) rectangle ({\textwidth/2+30pt},-24.45cm);   %riquadro per la pagina         \draw[gray] (-90pt,-23.45cm)--(470pt,-23.45cm); %linea di fondo-pagina         \node at (380pt,1.25cm) [right]{\sffamily\chaptername\ \thechapter};         \node at (380pt,1.25cm) [left]{\slshape\sffamily\leftmark};         \node at (0pt,1.25cm) [right]{\slshape\sffamily\rightmark};         \node at ({\textwidth/2},-23.95cm) {\bfseries\sffamily\thepage};     \end{tikzpicture}          And here there is some text too (here the number of the page is odd).     \end{document}      but on every page of the document. I already notice that there is a discussion about my question, but there I cannot obtain sufficient information on the use of `everypage` package, or something that put me on the right track to solve this problem.


title: Nomenclature not aligned

text: I have a nomenclature section in my paper where I defined my symbols. For example:               \documentclass[twocolumn,10pt]{asme2e}     \addtolength{\textwidth}{-1pt}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{amssymb}     \special{papersize=8.5in,11in}     \begin{document}     \begin{nomenclature}     \entry{$\hat{q}$}{Continuum scale conserved quantity}     \entry{$\hat{f}^0$}{Continuum scale source density function}     \end{nomenclature}     \end{document}      My code compiles properly, but the space between the symbol and its corresponding definition seems to be constant such that the definitions are not all aligned in one column. How can I modify it to ensure that the descriptions begin at the same point?


title: Getting \emph back to normal after loading ulem

text: I'm typesetting a manuscript that is required to turn all `\emph` into underlines. But then I want to use the original definition of `\emph` for the list of references. How do I get `\emph` to behave like normal again?


title: How can I change the spacing around definitions with amsthm?

text: I am wondering how I may change spacing around definition environments. I have seen the answer posted for the same question about theorems,               \makeatletter     \def\thm@space@setup{%       \thm@preskip=\parskip \thm@postskip=0pt     }     \makeatother      but am not sure how to edit this to work for definition environment.


title: Change the side of the same tcolorbox rule depending on the page side

text: I'm trying to make this box looking a bit better by placing the rule on the right on odd pages and on the left on even pages. Here's an example:               \documentclass{article}     \usepackage{graphicx}     \usepackage{lipsum}     \usepackage[breakable,skins]{tcolorbox}     \usepackage{ifoddpage}          \newenvironment{boxWarning}[1]{%       \checkoddpage       \ifoddpage         \def\myrule {rightrule}         \def\posiz {east}       \else         \def\myrule {leftrule}         \def\posiz {west}       \fi         \begin{tcolorbox}[breakable,enhanced,arc=0mm,colback=gray!5,colframe=gray, \myrule=12mm,         overlay={%            \node[anchor=north \posiz,outer sep=2pt] at (frame.north \posiz) {%                \includegraphics[width=8mm]{img/attenzione.png}%            };%         }]%         #1%       }%     {\end{tcolorbox}}          \usepackage{lipsum}     \begin{document}     \begin{boxWarning}     \lipsum[2]     \end{boxWarning}     \newpage     \begin{boxWarning}     \lipsum     \end{boxWarning}     \end{document}      As you can see, a problem arises when the box is displayed on two pages: the side rule remains on the same side on both pages. Another "fine tuning" could be to not display again the icon on the second page. Here's the icon


title: Mapsto vs. rightarrow

text: This is perhaps half a math question and half a typesetting one. In what circumstances do I use `\mapsto` and when `\rightarrow`? I feel like the standard seems to be: when you're specifying the operator you use `\rightarrow`, but if you're just saying that one domain maps to another you use `\mapsto`. Is that correct? e.g. I would say `Q\times\Gamma\mapsto Q` but `\delta:Q\times\Gamma\rightarrow Q`.


title: \vspace in beamer

text: I'm trying to produce some padding around a table in a beamer slide. I've tried using `\vspace{10mm}` but that doesn't seem to produce anything. Other vertical spacing commands such as `\bigskip` don't seem to work either. I've searched but I can't seem to find any solution to this. I assume beamer manages its own vertical spacing, but surely there must be some way to override this? The minimal example below shows the problem with the table being too close to the text above and below:               \documentclass[t]{beamer}          \usecolortheme{rose}     \begin{document}          \begin{frame}{Results: School children}         \begin{block}{Hypothesis}             School closures may cause significant reductions in disease spread         \end{block}              \begin{block}{Results}         Worst case scenarios:         \bigskip         \begin{tabular}{|c|c|c|}     \hline \textbf{\% School Closure} & \textbf{Clinical Attack Rate} & \textbf{Mortality per 100,000} \\      \hline 0 & 30.6\% & 614 \\      \hline 100 & 0.6\% & 4 \\      \hline      \end{tabular} \\         With 100\% school closure starting early (0.1\% of population symptomatic) mortality is reduced \textbf{below normal levels for US seasonal flu}              \end{block}     \end{frame}          \end{document}


title: PGFPlots: Mathematical expressions

text: # Question Is there a way to include mathematical expressions in PGFPlots, for example, `[domain=1/3:e^5/3]`? PGFPlots is fairly useful, however the ability to put mathematical expressions directly into Tikz makes life much easier. The only way around this problem that I know of is to define a bunch of constants above the before entering the `axis environment`. I find this a little obnoxious. ![enter image description here](http://i.stack.imgur.com/o17rA.png) # MWE               \documentclass{memoir}          \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{amsmath}          \usetikzlibrary{calc, positioning}          \begin{document}          \begin{tikzpicture}[domain=1/3:e^5/3,x=0.1cm, scale=1]              % Axes         \draw[help lines]   (-0.2 cm,0) -- (e^5/3+0.2,0) node[right] {$x$};         \draw[help lines]   (0,-0.2) -- (0,6) node[above] {$y$};         \draw[gray, thick]  (e^5/3,5) -- (-0.075/0.1,5) node[left] {$y=5$};         \draw[gray, thick]  (e^5/3,4) -- (-0.075/0.1,4) node[left] {$y=4$};              % Curves         \draw[blue, thick] plot[id=lnx] (\x,{ln(3*\x)}) node[right] {$\ln 3x$};     \end{tikzpicture}          \end{document}


title: Small digits for small caps?

text: I want to typeset "FP6" as small caps. Putting `{\sc fp6}` does the right thing on the letters, but the digit 6 is much taller, and the result looks ugly. What is the best workaround to make digits an appropriate height to go with small caps? (In case it's relevant, I'm using the `iopart` class, which I think uses Computer Modern.)


title: XeLaTeX hang when using specific math symbols

text: I am using XeLaTeX in conjunction with `amsmath` and `unicode-math` for my reports. After a while, I ran into a weird problem in which compilation would just hang indefinitely. I found out the culprit was me using `\pm` or `\times` symbols (there might of course be others) in a math environment. Does anybody know why this occurs and how to fix it? Edit: Okay, after stripping down my list of packages I observed that compilation breaks as soon as I use the `inputenc` package, for example:               \documentclass[11pt,titlepage]{report}          \usepackage[T1]{fontenc}     \usepackage{fontspec} % XeLaTeX required!     \usepackage[latin1]{inputenc} % <------ This package breaks compilation!!!     \usepackage{mathtools}     \usepackage{unicode-math}          \setmainfont[Ligatures=TeX]{Myriad Pro}     \setmathfont{Asana Math}     \setmonofont{Consolas}          \begin{document}     $\pm$     \end{document}      Not being able to use this package would be a real shame though, because we dutch people sure like our accents at times...


title: Why does this Tikz tower look OK standalone but not when included as a figure in article?

text: I built two towers in Tikz. Because the document they will be included in takes a while to compile and because my Tikz skills are somewhat limited (so I need to compile often to check if I've done something crazy), I used `standalone` while working on the figure. Here is a minimised version of the towers with colouring and labelling removed:               \documentclass[tikz]{standalone}     \usetikzlibrary{calc,positioning}          \pagestyle{empty}          \begin{document}          \begin{tikzpicture}       [         rounded corners=1pt,         node distance=0pt,         rock/.style={draw, thick, minimum width=5mm, minimum height=5mm, outer sep=0pt},         rock1/.append style={rock, minimum width=10mm},         rock2/.append style={rock, minimum width=15mm},         rock3/.append style={rock, minimum width=2.5mm, minimum height=10mm, yshift=2.5mm},         rock4/.append style={rock, minimum width=12.5mm},         rock5/.append style={rock, minimum height=10mm, yshift=2.5mm},         rock6/.append style={rock, minimum width=2.5mm},         rock7/.append style={rock, minimum width=7.5mm, minimum height=10mm, yshift=2.5mm},         rock8/.append style={rock, minimum width=2.5mm, minimum height=15mm, yshift=5mm},         rock9/.append style={rock, minimum width=7.5mm},         key/.style={draw, thick, minimum width=2.5mm, minimum height=2.5mm},         keytxt/.style={font=\sffamily},       ]              \node (rbase1) [rock1] {};         \node (rbase2) [rock2, base right=of rbase1] {};         \node (rbase3) [rock3, base right=of rbase2] {};         \node (rbase4) [rock4, base right=of rbase3, yshift=-2.5mm] {};         \node (rbase5) [rock5, base right=of rbase4] {};         \node (rbase6) [rock, base right=of rbase5, yshift=-2.5mm] {};         \node (r1r4) [rock6, left=of rbase3, yshift=2.5mm] {};         \node (r1r3) [rock5, left=of r1r4] {};         \node (r1r2) [rock1, left=of r1r3, yshift=-2.5mm] {};         \node (r1r1) [rock, left=of r1r2] {};         \node (r1r5) [rock1, right=of rbase3, yshift=2.5mm] {};         \node (r1r6) [rock3, right=of r1r5] {};         \node (r2r1) [rock4, left=of r1r3, yshift=2.5mm] {};         \node (r2r2) [rock, right=of r1r3, yshift=2.5mm] {};         \node (r2r3) [rock5, right=of r2r2] {};         \node (r2r2) [rock, right=of r2r3, yshift=-2.5mm] {};         \node (r3r1) [rock1, above=of r2r1, xshift=1.25mm] {};         \node (r3r2) [rock7, right=of r3r1] {};         \node (r3r3) [rock8, right=of r3r2, yshift=-2.5mm] {};         \node (r3r4) [rock, right=of r2r3, yshift=2.5mm] {};         \node (r4r1) [rock, above=of r3r1] {};         \node (r4r2) [rock, right=of r4r1, rock3] {};         \node (r4r3) [rock9, right=of r3r3] {};         \node (r5r1) [rock6, above=of r4r1, xshift=1.25mm] {};         \node (r5r2) [rock3, right=of r4r2, yshift=2.5mm] {};         \node (r5r3) [rock3, right=of r5r2, yshift=-2.5mm] {};         \node (r5r4) [rock6, right=of r5r3, yshift=-2.5mm] {};         \node (r5r5) [rock5, right=of r3r3, yshift=5mm] {};         \node (r6r1) [rock3, left=of r5r2, yshift=2.5mm] {};         \node (r6r2) [rock5, right=of r5r3, yshift=2.5mm] {};         \node (r7r1) [rock5, right=of r6r1, yshift=2.5mm] {};         \node (r7r2) [rock3, right=of r6r2, yshift=2.5mm] {};         \node (r8r1) [rock3, right=of r7r1, yshift=2.5mm] {};         \node (r8r2) [rock3, right=of r8r1, yshift=-2.5mm] {};         \node (r9r1) [rock6, left=of r8r1, yshift=2.5mm] {};         \node (r10r1) [rock, above=of r8r1] {};         \node (r11r1) [rock6, above=of r10r1] {};              \node (ebase1) [rock, right=of rbase6, xshift=30mm] {};         \node (ebase2) [rock5, base right=of ebase1] {};         \node (ebase3) [rock1, base right=of ebase2, yshift=-2.5mm] {};         \node (ebase4) [rock6, base right=of ebase3] {};         \node (ebase5) [rock3, base right=of ebase4] {};         \node (ebase6) [rock1, base right=of ebase5, yshift=-2.5mm] {};         \node (ebase7) [rock2, base right=of ebase6] {};         \node (e1e1) [rock3, right=of ebase2, yshift=2.5mm] {};         \node (e1e2) [rock1, right=of e1e1, yshift=-2.5mm] {};         \node (e1e3) [rock6, right=of ebase5, yshift=2.5mm] {};         \node (e1e4) [rock3, right=of e1e3] {};         \node (e1e5) [rock3, right=of e1e4, yshift=-2.5mm] {};         \node (e1e6) [rock, right=of e1e5, yshift=-2.5mm] {};         \node (e1e7) [rock1, right=of e1e6] {};         \node (e2e1) [rock5, right=of e1e1, yshift=2.5mm] {};         \node (e2e2) [rock1, right=of e2e1, yshift=-2.5mm] {};         \node (e2e3) [rock9, right=of e1e5, yshift=2.5mm] {};         \node (e2e4) [rock, right=of e2e3] {};         \node (e3e1) [rock, right=of e2e1, yshift=2.5mm] {};         \node (e3e2) [rock8, right=of e3e1] {};         \node (e3e3) [rock7, right=of e3e2, yshift=-5mm] {};         \node (e3e4) [rock1, right=of e3e3, yshift=-2.5mm] {};         \node (e4e1) [rock9, left=of e3e2] {};         \node (e4e2) [rock6, right=of e3e3, yshift=2.5mm] {};         \node (e4e3) [rock, right=of e4e2] {};         \node (e5e2) [rock3, left=of e3e2, yshift=5mm] {};         \node (e5e1) [rock3, left=of e5e2, yshift=-2.5mm] {};         \node (e5e3) [rock6, right=of e3e2, yshift=5mm] {};         \node (e5e4) [rock5, right=of e5e3] {};         \node (e5e5) [rock, right=of e5e4, yshift=-2.5mm] {};         \node (e6e1) [rock, right=of e5e2, yshift=2.5mm] {};         \node (e6e2) [rock3, right=of e5e4, yshift=2.5mm] {};         \node (e7e3) [rock3, left=of e6e2, yshift=2.5mm] {};         \node (e7e2) [rock3, left=of e7e3, yshift=-2.5mm] {};         \node (e7e1) [rock9, left=of e7e2, yshift=-2.5mm] {};         \node (e8e2) [rock5, left=of e7e2, yshift=2.5mm] {};         \node (e8e1) [rock6, left=of e8e2, yshift=-2.5mm] {};         \node (e9e1) [rock6, right=of e8e2, yshift=2.5mm] {};         \node (e10e1) [rock, above=of e8e2, xshift=1.25mm] {};         \node (e11e1) [rock6, above=of e10e1] {};          \end{tikzpicture}          \end{document}      I finally got the output to look reasonable: ![standalone towers](http://i.stack.imgur.com/RV0Sr.png) The next step was to include the figure in the document:               \documentclass[12pt]{article}     \usepackage{standalone}     \usepackage{tikz}     \usetikzlibrary{calc,positioning}          \begin{document}          \begin{figure}       \centering         \input{standalone-tower}     \end{figure}          \end{document}      However, now the towers do not look quite right: ![input towers](http://i.stack.imgur.com/tVJa5.png) I can (and have) tweaked the left hand tower to make it look more-or-less OK but neither tower looks as good as it did standalone. I have two questions:   1. What causes the misalignment when the code is `\input` but not when compiled standalone?   2. How could or should I have gone about constructing the original towers to ensure that they would give the same results when compiled in the main document as when compiled standalone?


title: Cartesian Coordinate Rotations - Better looking code?

text: This is one of my first attempts with TiKZ-3D, so my knowledge is limited. Is there a better or more organized way to accomplish the following?...               \documentclass[letterpaper]{article}     \usepackage{amscd, mathtools}  %amsmath, mathrsfs, xcolor, comment     \usepackage{tikz}     \usepackage{tikz-3dplot}     \newcommand{\Centr}[1]{\hspace{2mm}#1\hspace{2mm}}  %For centering "0" and "1" in right justified arrays     \begin{document}     \pagenumbering{gobble}     \tdplotsetmaincoords{67}{14} %\phi \theta     % 1:BEGIN ABOUT Z     \noindent  %This seems weird!     \begin{tikzpicture}[scale=3.0,tdplot_main_coords]       \coordinate(O) at (0,0,0);       % Draw XYZ Coordinate System       \draw[orange, thick, ->] (0,0,0) -- (1,0,0) node[midway, below] {$x$};       \draw[orange, thick, ->] (0,0,0) -- (0,1,0) node[near end, left]{$y$};       \draw[orange, thick, ->] (0,0,0) -- (0,0,1) node[midway, left]  {$z$}         node[at end, left]{$\gamma$};       % We draw the rotation vector in two parts, so that the arc-arrow will appear..       % ..behind, then in front of the rotation vector.       % Draw the tail of P...       \draw[cyan, thick, -] (0,0,0) -- (.46,.46,.46) node[at end,below right,green]         {$0^{\circ}$};       % Now draw the arc-arrow which will write over the P-line       \tdplotsetrotatedcoords{0}{0}{0} % {last about z}{second about y} {first about z}       \tdplotdrawarc[tdplot_rotated_coords,thick,->,orange]{(0,0,.9)}{0.1}{-45}{270}{}{}       %Draw \gamma circle arrow       \tdplotsetrotatedcoords{45}{54.74}{0} % {last about z}{second about y} {first about z}       \tdplotdrawarc[tdplot_rotated_coords,thick,->,green]{(0,0,.8)}{0.1}{250}{0}{}{}       % From the center of the arc-arrow we draw the second part of P.       % Now the arc-arrow looks like it's coming from behind P, then over P..       \draw[cyan, thick, ->] (.46,.46,.46) -- (.577,.577,.577) node[near end,right]{$P_0$};       % Draw a box with dotted lines..       \draw[dashed] (1,0,1) -- (1,0,0) -- (1,1,0) -- (0,1,0)       -- (0,1,1) -- (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1);       \draw[dashed] (.577,.577,.577) -- (1,1,1) -- (1,1,0);       \node [below right, text width=4cm,align=left] at (.81,4)         {         \begin{equation*}           \begin{bmatrix*}             x'\\             y'\\             z'           \end{bmatrix*}  %^{'} Tick on inside is more legible.           =\begin{bmatrix*}[r]           \cos\gamma& -\sin\gamma& \Centr{0}\\           \sin\gamma& \cos\gamma& \Centr{0}\\           \Centr{0}& \Centr{0}& \Centr{1}           \end{bmatrix*}            \begin{bmatrix*}             x\\             y\\             z           \end{bmatrix*}         \end{equation*}         \textbf{Inverse:}         \begin{equation*}           \begin{bmatrix*}             x\\             y\\             z           \end{bmatrix*}=           \begin{bmatrix*}[r]             \cos\gamma& \sin\gamma& \Centr{0}\\             -\sin\gamma& \cos\gamma& \Centr{0}\\             \Centr{0}& \Centr{0}& \Centr{1}           \end{bmatrix*}           \begin{bmatrix*}             x'\\             y'\\             z'           \end{bmatrix*}   %^{'}         \end{equation*}         };     \end{tikzpicture}          % 2:BEGIN ABOUT Y     \vspace{8mm}     \noindent  % Seems silly I should need this!     \begin{tikzpicture}[scale=3.0,tdplot_main_coords]       % Draw ZXY Coordinate System       \draw[orange, thick, ->] (0,0,0) -- (1,0,0) node[midway, below] {$z$};       \draw[orange, thick, ->] (0,0,0) -- (0,1,0) node[near end, left]{$x$};       \draw[orange, thick, ->] (0,0,0) -- (0,0,1) node[midway, left]  {$y$}       node[at end, left]{$\beta$};       % We draw the rotation vector in two parts, so that the arc-arrow will appear..       % ..behind, then in front of the rotation vector.       % Draw the tail of P...       \draw[cyan, thick, -] (0,0,0) -- (.46,.46,.46) node[at end, below right, green {$120^\circ$};       % Now draw the arc-arrow which will write over the P-line       \tdplotsetrotatedcoords{0}{0}{0} % {last about z}{second about y} {first about z}       \tdplotdrawarc[tdplot_rotated_coords,thick,->,orange]{(0,0,.9)}{0.1}{-45}{270}{}{}       %Draw \beta arc-arrow       \tdplotsetrotatedcoords{45}{54.74}{0} % {last about z}{second about y} {first about z}       \tdplotdrawarc[tdplot_rotated_coords,thick,->,green]{(0,0,.8)}{0.1}{250}{0}{}{}{anchor=south west,green}{$120^\circ$}       % From the center of the arc-arrow we draw the second part of P.       % Now the arc-arrow looks like it's coming from behind P, then over P..       \draw[cyan, thick, ->] (.46,.46,.46) -- (.577,.577,.577) node[near end, right {$P_1$};       % Draw a box with dotted lines..       \draw[dashed] (1,0,1) -- (1,0,0) -- (1,1,0) -- (0,1,0)       -- (0,1,1) -- (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1);       \draw[dashed] (.577,.577,.577) -- (1,1,1) -- (1,1,0);       \node [below right, text width=4cm,align=left] at (0.75,4.25)         {         \begin{equation*}           \color{lightgray}           \begin{bmatrix*}             z'\\             x'\\             y'           \end{bmatrix*}=           \begin{bmatrix*}[r]             \cos\beta& -\sin\beta& \Centr{0}\\             \sin\beta& \cos\beta& \Centr{0}\\             \Centr{0}& \Centr{0}& \Centr{1}           \end{bmatrix*}           \begin{bmatrix*}             z\\             x\\             y           \end{bmatrix*} % {\color{black}\Longrightarrow}         \end{equation*}         \vspace{-0.5mm}         \begin{equation*}           \begin{bmatrix*}             x'\\             y'\\             z'           \end{bmatrix*}=           \begin{bmatrix*}[r]             \cos\beta& \Centr{0}& \sin\beta\\             \Centr{0}& \Centr{1}& \Centr{0}\\             -\sin\beta& \Centr{0}& \cos\beta           \end{bmatrix*}           \begin{bmatrix*}             x\\             y\\             z           \end{bmatrix*}         \end{equation*}         \textbf{Inverse:}         \begin{equation*}           \begin{bmatrix*}             x\\             y\\             z           \end{bmatrix*}=           \begin{bmatrix*}[r]             \cos\beta& \Centr{0}& -\sin\beta\\             \Centr{0}& \Centr{1}& \Centr{0}\\             \sin\beta& \Centr{0}& \cos\beta           \end{bmatrix*}           \begin{bmatrix*}             x'\\             y'\\             z'           \end{bmatrix*}         \end{equation*}         };     \end{tikzpicture}          % 3:BEGIN ABOUT X     \vspace{8mm}     \noindent     \begin{tikzpicture}[scale=3.0,tdplot_main_coords]       % Draw YZX Coordinate System       \draw[orange, thick, ->] (0,0,0) -- (1,0,0) node[midway, below] {$y$};       \draw[orange, thick, ->] (0,0,0) -- (0,1,0) node[near end, left]{$z$};       \draw[orange, thick, ->] (0,0,0) -- (0,0,1) node[midway, left]  {$x$}       node[at end, left]{$\alpha$};       % We draw the rotation vector in two parts, so that the arc-arrow will appear..       % ..behind, then in front of the rotation vector.       % Draw the tail of P...       \draw[cyan, thick, -] (0,0,0) -- (.46,.46,.46) node[at end, below right, green {$240^\circ$};       % Now draw the arc-arrow which will write over the P-line       \tdplotsetrotatedcoords{0}{0}{0} % {last about z}{second about y} {first about z}       \tdplotdrawarc[tdplot_rotated_coords,thick,->,orange]{(0,0,.9)}{0.1}{-45}{270}{}{}            \tdplotsetrotatedcoords{45}{54.74}{0} % {last about z}{second about y} {first about z}       \tdplotdrawarc[tdplot_rotated_coords,thick,->,green]{(0,0,.8)}{0.1}{250}{0}       {}{}       % From the center of the arc-arrow we draw the second part of P.       % Now the arc-arrow looks like it's coming from behind P, then over P..       \draw[cyan, thick, ->] (.46,.46,.46) -- (.577,.577,.577) node[near end, right]{$P_2$};       % Draw a box with dotted lines..       \draw[dashed] (1,0,1) -- (1,0,0) -- (1,1,0) -- (0,1,0)       -- (0,1,1) -- (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1);       \draw[dashed] (.577,.577,.577) -- (1,1,1) -- (1,1,0);       \node [below right, text width=4cm,align=left] at (0.75,4.25)         {         \begin{equation*}           \color{lightgray}           \begin{bmatrix*}             y'\\             z'\\             x'           \end{bmatrix*}=           \begin{bmatrix*}[r]             \cos\alpha& -\sin\alpha& \Centr{0}\\             \sin\alpha& \cos\alpha& \Centr{0}\\             \Centr{0}& \Centr{0}& \Centr{1}           \end{bmatrix*}           \begin{bmatrix*}             y\\             z\\             x           \end{bmatrix*} % {\color{black}\Longrightarrow}         \end{equation*}         \vspace{-0.5mm}         \begin{equation*}           \begin{bmatrix*}             x'\\             y'\\             z'           \end{bmatrix*}=           \begin{bmatrix*}[r]             \Centr{1}& \Centr{0}& \Centr{0}\\             \Centr{0}&  \cos\alpha& -\sin\alpha\\             \Centr{0}& \sin\alpha& \cos\alpha           \end{bmatrix*}           \begin{bmatrix*}             x\\             y\\             z           \end{bmatrix*}         \end{equation*}         \textbf{Inverse:}         \begin{equation*}           \begin{bmatrix*}             x\\             y\\             z           \end{bmatrix*}=           \begin{bmatrix*}[r]             \Centr{1}& \Centr{0}& \Centr{0}\\             \Centr{0}&  \cos\alpha& \sin\alpha\\             \Centr{0}& -\sin\alpha& \cos\alpha           \end{bmatrix*}           \begin{bmatrix*}             x'\\             y'\\             z'           \end{bmatrix*}         \end{equation*}         };     \end{tikzpicture}          \end{document}


title: different fonts for two languages

text: I use Sanskrit 2003 for my bilingual document. But the English so generated result in a very uneven and poorly looking document. I can not modify the text in between `\begin{document}` and `\end{document}` as it is generated by a software. So I can modify the preamble of a template only. How can I use Bookman or Garamond for English and Sanskrit 2003 for Hindi? I am at present using folllowing lines in preamble               \setmainfont[Script=Devanagari]{Sanskrit 2003}     \setsansfont[Script=Devanagari]{Sanskrit 2003}     \setmonofont[Script=Devanagari]{Sanskrit 2003}


title: Help on imsart.cls: correctly creating list of figures

text: I am having trouble generating List of Figures correctly with the class "imart.cls". The basic command "\listoffigures" creates the following, see, snapshot: ![enter image description here](http://i.stack.imgur.com/DSr9V.png) Could you please help saparate "List of Figures" from the itemization? Thanks a lot! Here are the codes:               \documentclass[preprint,aos]{imsart}          \usepackage{float,geometry,graphicx}          \begin{document}          \listoffigures          Figure 1:          \begin{figure}[H]          \begin{center}          \includegraphics[height=0.3\textheight, width=1\textwidth]{ListOfFigs.pdf}     \caption[Wrong formatting: eg 1]{Wrong formatting.}          \end{center}          \label{Figc4e}          \end{figure}          Same Figure:          \begin{figure}[H]          \begin{center}          \includegraphics[height=0.2\textheight, width=1\textwidth]{ListOfFigs.pdf}     \caption[Wrong formatting: same eg]{Wrong formatting.}          \end{center}          \label{Figc4e}          \end{figure}          \end{document}


title: How to include files in subfolders

text: I have arranged 700 individual files in 18 different folders, as shown in the attached image. This was open source project to get it typed page by page. The number of pages varies for each folder. Now my trouble is how to integrate into one file in book layout. When I was creating document in this fashion, I thought I would manually put all in one folder and run it, which I can still do but just wanted to know if there is any easier way to do it. Thanks for your help. ![enter image description here](http://i.stack.imgur.com/NoWW9.png)


title: Equivalent color for \colorbox{gray} as for \cellcolor[gray]{0.8}

text: In my table I have used `\cellcolor[gray]{0.8}` and I would like to mark some words in my text with the same color. I have tried `\colorbox{gray}`, but the resulting box in the text is too dark. How can I get the same grey-color as in the table?


title: How to optimize pdf with many links and simple pages

text: So... I can play tic-tac-toe (naughts and crosses) in a pdf: each board configuration is one page, and each cell of the board is a link which goes to the page corresponding to playing that move. The resulting pdf file contains 6046 pages and is 3MB large. My pdf viewer is a bit slow to display it. What are ways I could reduce the size of such a pdf, which has a large number of simple pages and about 50000 links? I am also interested in ways to speed up compilation. (To produce the pdf, run `pdflatex` on the following.)               \documentclass[12pt]{article}     \usepackage[paperwidth=48pt,paperheight=48pt,margin=0pt]{geometry}     \usepackage[hidelinks]{hyperref}     \newcount\0 \newcount\1 \newcount\2     \newcount\3 \newcount\4 \newcount\5     \newcount\6 \newcount\7 \newcount\8     \newcount\p     \def\here{\the\numexpr\0+3*(\1+3*(\2+3*(\3+3*(\4+3*(\5+3*(\6+3*(\7+3*\8)))))))}     \def\cell#1#2{\ifnum#1=\p\c#1\else\hyperlink{\here+\p*#2}{\c#1}\fi}     \def\c#1{\hbox to 14.5pt{\hfil\ifcase#1\or x\else o\fi\hfil}}     \def\|{\hskip-.2pt\vrule width.4pt\hskip-.2pt}%     \def\-{\noalign{\hrule height.4pt}}%     \def\mk#1{\p#1       \hypertarget{\here}{%         \hbox to 48pt{\hfil\vbox to 48pt{\vfil             \everycr{}\tabskip 0pt\relax             \halign{&\strut##\cr               \cell\0  {1}\|&\cell\1   {3}\|&\cell\2   {9}\cr\-%               \cell\3 {27}\|&\cell\4  {81}\|&\cell\5 {243}\cr\-%               \cell\6{729}\|&\cell\7{2187}\|&\cell\8{6561}\cr}%             \vfil}\hfil}}\newpage}     \begin{document}     \def\ter#1#2{#1=0 #2\relax #1=1 #2\relax #1=-1 #2\relax}     \ter\0{\ter\1{\ter\2{\ter\3{\ter\4{\ter\5{\ter\6{\ter\7{\ter\8{%       \ifcase\numexpr\0+\1+\2+\3+\4+\5+\6+\7+\8\relax\mk{1}\or\mk{-1}\fi}}}}}}}}}     \end{document}


title: Initials in the bibliography. firstinits/uniquename not working correctly in biblatex?

text: Consider two MWEs (minimum working examples):               \RequirePackage{filecontents}     \begin{filecontents}{\jobname.bib}     @article{Delbaen1998,     year={1998},     title={Title3},     author={Delbaen, F.},     }     @article{Delbaen1994,     year={1994},     title={Title2},     author={Delbaen, Freddy},     }     @article{Delbaen1993,     year={1993},     title={Title1},     author={Delbaen, Freddy},     }     \end{filecontents}          \documentclass{article}     \usepackage[latin9]{inputenc}     \usepackage[style=authoryear     ,uniquename=init     ,firstinits=true     ,backend=biber]{biblatex}     \bibliography{\jobname}          \begin{document}          \cite{Delbaen1993,Delbaen1994,Delbaen1998}          \printbibliography     \end{document}      ![MWE1](http://i.stack.imgur.com/Lu92o.png) and               \RequirePackage{filecontents}     \begin{filecontents}{\jobname.bib}     @article{Delbaen1998,     year={1998},     title={Title3},     author={Delbaen, Freddy},  % <----- THIS IS THE ONLY DIFFERENCE !     }     @article{Delbaen1994,     year={1994},     title={Title2},     author={Delbaen, Freddy},     }     @article{Delbaen1993,     year={1993},     title={Title1},     author={Delbaen, Freddy},     }     \end{filecontents}          \documentclass{article}     \usepackage[latin9]{inputenc}     \usepackage[style=authoryear     ,uniquename=init     ,firstinits=true     ,backend=biber]{biblatex}     \bibliography{\jobname}          \begin{document}          \cite{Delbaen1993,Delbaen1994,Delbaen1998}          \printbibliography     \end{document}      ![MWE2](http://i.stack.imgur.com/oweo0.png) The effect of the option `uniquename=init` is that a name with the same initials uniquely identifies a citation. The option`firstinits=true` makes the bibliography display only initials. Somehow I think, that these two names (Freddy Delbaen and F. Delbaen) should also be considered to be "the same" in the bibliogrpahy. This would mean, that sorting and dashes in the first MWE should be as in the second example. How can I achieve this, without manually editing my bibtex database? (Do you think this should be expected behavior?)


title: Gantt chart is going to beyond the page boundary

text: I draw a gantt chart under the figure but it is going to beyond the boundary of page. I show my code below;               \begin{figure}[h]     \begin{center}               \begin{landscape}     \scalebox{0.6}{     \begin{gantt}[xunitlength=1cm,fontsize=\large,titlefontsize=\large,drawledgerline=true]{13}{32}     \begin{ganttitle}       \titleelement{\Large \textbf{September}}{4}       \titleelement{\Large \textbf{October}}{4}       \titleelement{\Large \textbf{November}}{4}       \titleelement{\Large \textbf{December}}{4}       \titleelement{\Large \textbf{January - 14}}{4}       \titleelement{\Large \textbf{February}}{4}       \titleelement{\Large \textbf{March}}{4}       \titleelement{\Large \textbf{April}}{4}          \end{ganttitle}          \begin{ganttitle}     \titleelement{\LARGE \textbf{Weeks}}{32}     \end{ganttitle}          \begin{ganttitle}       \numtitle{1}{1}{4}{1}       \numtitle{1}{1}{4}{1}       \numtitle{1}{1}{4}{1}       \numtitle{1}{1}{4}{1}       \numtitle{1}{1}{4}{1}       \numtitle{1}{1}{4}{1}       \numtitle{1}{1}{4}{1}       \numtitle{1}{1}{4}{1}     \end{ganttitle}     \ganttbar{Litreature Review}{2}{17}     \ganttbar{Project Plan}{5}{10}     \ganttbar{Field Survey}{15}{3}     \ganttbar{Data Collection}{20}{3}     \ganttbar{Database Design}{15}{5}     \ganttbar{Framework Design}{}{}     \ganttbar{Prototype}{}{}     \ganttbar{Implementation}{}{}     \ganttbar{Testing}{}{}     \ganttbar{Deployment}{}{}     \end{gantt}     }     \end{landscape}     \end{center}      \end{figure}      The output of this code is give in the image.......   ![enter image description here](http://i.stack.imgur.com/B090t.png)      Please tell me how can I set my gantt chart in boundary of page.


title: Bleed correction for chapterthumbs in KOMA

text: I want to send a dissertation document with chapterthumbs to the printing house. The document is written in `KOMA-Script` and a good solution for bleed correction is found here. Since `chapterthumbs` are sitting at the edge of the pages in black I want to make sure that there is a bleed correction for that too before sending out the document. Otherwise, due to imprecise cutting process (which is expected), unwanted white margins could appear at the edge of the pages where `chapterthumbs` are sitting. **Question**   How to provide a bleed correction for the chapterthumbs themselves, i.e. extend their black color to the bleed correction area as in the image below? **Output** ![enter image description here](http://i.stack.imgur.com/r8l6V.png) Consider the MWE below, where chapterthumbs are provided and bleed correction using `crop` package. What is missing is bleed correction for the chapterthumbs themselves. **MWE Code**               \documentclass[paper=a4, twoside=semi]{scrbook} % A4 is 210mm x 297mm     \usepackage[cross,center,width=216mm,height=303mm]{crop} % bleed is 6mm     \usepackage{blindtext}     \usepackage{calc}%     \usepackage{chapterthumb}% package should be installed in the same active folder     \usepackage{etoolbox}%     \usepackage{nameref}%     \usepackage{totcount}     \regtotcounter{chapter}%     %=====================Bibliography=============================     \usepackage{biblatex}     \usepackage{filecontents}     \begin{filecontents}{jobname.bib}     @article{rand_objective_1971,         title = {Objective criteria for the evaluation of clustering methods},         volume = {66},         pages = {846},         number = {336},         journaltitle = {Journal of the American Statistical Association},         author = {Rand, William M.},         date = {1971}     }          \end{filecontents}     \addbibresource{jobname.bib}     %=========================Chapter thumbs========================     \AtBeginDocument{%     \ifnumequal{\number\totvalue{chapter}}{0}{%     \renewcommand{\chapterthumbwidth}{\paperheight}%     \renewcommand{\chapterthumbskip}{\paperheight}%     }{%     \typeout{There are \number\totvalue{chapter} chapter in this document}%     \renewcommand{\chapterthumbskip}{\paperheight/\number\totvalue{chapter}}%     \renewcommand{\chapterthumbwidth}{\paperheight/\number\totvalue{chapter}}%     }%     }%          \lohead[\putchapterthumb]{\putchapterthumb}     \addtokomafont{chapterthumb}{\bfseries}          \newrobustcmd{\SetChapterThumbHeader}{%     \lohead[\putchapterthumb]{\putchapterthumb}%     }%          \newrobustcmd{\ClearChapterThumbHeader}{%     \lohead[]{}%     }%          \newrobustcmd{\refcommand}[1]{%     \nameref*{#1}%     }%          \newtoggle{UseChapterThumb}%     \toggletrue{UseChapterThumb}%          \renewcommand*{\chapterthumbformat}{\refcommand{chapter::title::\number\value{chapter}}}%          \makeatletter          \newcounter{totalchaptercounter}%          \newrobustcmd{\CreateUniqueChapterLabel}[1]{%      \refstepcounter{totalchaptercounter}%     \label{chapter::title::\number\value{totalchaptercounter}}%     }%               \let\LaTeXStandardChapter\chapter%          \newcommand{\chapter@noopt}[1]{%     \iftoggle{UseChapterThumb}{\SetChapterThumbHeader}{\ClearChapterThumbHeader}     \LaTeXStandardChapter{#1}%     \CreateUniqueChapterLabel{#1}%     }%          \newcommand{\chapter@opt}[2][]{%     \iftoggle{UseChapterThumb}{\SetChapterThumbHeader}{\ClearChapterThumbHeader}     \LaTeXStandardChapter[#1]{#2}%     \CreateUniqueChapterLabel{#2}% Must appear after chapter title is done     }%               \newcommand{\unstarredchapter}{%     \@ifnextchar[{\chapter@opt}{\chapter@noopt}%     }%          \newcommand{\starredchapter}[1]{%     \ClearChapterThumbHeader% Clear the headers -> no chapterthumb here      \LaTeXStandardChapter*{#1}%        }%          \renewcommand{\chapter}{%     \@ifstar{\starredchapter}{\unstarredchapter}%     }%               \let\LaTeXStandardTOC\tableofcontents%     \renewcommand{\tableofcontents}{%     \begingroup%     \renewcommand{\chapter}{\LaTeXStandardChapter}%     \LaTeXStandardTOC%     \endgroup%     }%               \let\LaTeXStandardLOF\listoffigures%     \renewcommand{\listoffigures}{%     \begingroup%     \renewcommand{\chapter}{\LaTeXStandardChapter}     \LaTeXStandardLOF%     \endgroup     }%          \let\LaTeXStandardLOT\listoftables%     \renewcommand{\listoftables}{%     \begingroup%     \renewcommand{\chapter}{\LaTeXStandardChapter}     \LaTeXStandardLOT%     \endgroup     }%               \let\LaTeXStandardPrintBibliography\printbibliography%               \newrobustcmd{\commonprintbibliographysetup}[1][]{%     \iftoggle{UseChapterThumb}{\SetChapterThumbHeader\refstepcounter{chapter}}{\ClearChapterThumbHeader}     \LaTeXStandardPrintBibliography[#1]     \iftoggle{UseChapterThumb}{%     \immediate\write\@auxout{%     \string\newlabel{chapter::title::\number\value{chapter}}{{\thepage}{\thepage}{Bibliography}{}}%     }%     }{}%     }%                    \newrobustcmd{\printbibliography@@noopt}{%     \commonprintbibliographysetup[]%     }%          \newrobustcmd{\printbibliography@@opt}[1][]{%     \commonprintbibliographysetup[#1]%     }          \renewcommand{\printbibliography}{%     \@ifnextchar[{\printbibliography@@opt}{\printbibliography@@noopt}%     }%          \makeatother     %==================================================     \title{Title of the Dissertation}     \author{Author Name}      \publishers{Faculty Name}          \begin{document}     \maketitle     \pagestyle{plain}     \pagenumbering{roman}     \tableofcontents     \listoffigures     \listoftables     \cleardoublepage          \chapter*{Acknowledgments}     \addcontentsline{toc}{chapter}{Acknowledgments}          \chapter*{Abstract}     \addcontentsline{toc}{chapter}{Abstract}     \cleardoublepage     \lohead[\putchapterthumb]{\putchapterthumb}     \mainmatter     \pagestyle{scrheadings}          \chapter{Introduction}     \begin{figure}     \caption{dummy figure}     \end{figure}          \chapter{Materials \& Methods}           \chapter{Results}      \begin{table}     \caption{dummy table}     \end{table}          \chapter{Discussion}     In his reference \parencite{rand_objective_1971}, the author did a nice job.     \backmatter     \cleardoublepage     \printbibliography[heading=bibintoc]     \end{document}      **Update1: MWE based on Symbol's solution**   I wonder what might cause this inequality in the crosses. ![enter image description here](http://i.stack.imgur.com/GQeRY.png)


title: Appending options to hyperref

text: I am trying to append options to `hyperref` inside a package (say `append.sty`) I'm writing. More precisely, in the package I load the `hyperref` package and I tune it:               \NeedsTeXFormat{LaTeX2e}[1994/06/01]     \ProvidesPackage{append}     [2011/01/11 v0.01]          \RequirePackage{kvoptions}     \RequirePackage{kvsetkeys}     \SetupKeyvalOptions{       family=APP,       prefix=APP@,       setkeys=\kvsetkeys     }     \define@key{APP}{hyperref}{%     \PassOptionsToPackage{#1}{hyperref}%     }     \ProcessKeyvalOptions*          \RequirePackage{hyperref}     \hypersetup{colorlinks,linkcolor=blue}     \endinput      Note the `\hypersetup` macro. The defined option `hyperref` should pass additional setups from the user when she loads the package; for example:               \documentclass{article}     \usepackage[hyperref={pdfauthor=My Name}]{append}     \begin{document}     Hello world.... \url{www.foo.bar}     \end{document}      This approach is based on this answer. The problem is that in the resulting PDF, the author's entry in the metadata is: "MyName" (without the space). If I understand correctly, this problem occurs since `\PassOptionsToPackage` acts like `\usepackage[OPTIONS]{package}`, and in the case of the package `hyperref` this is a problem and `\hypersetup` has to be used. **How could I solve this issue?** Here are two attempts of mine to tackle the issue: I tried to change `append.sty` as follow:               \NeedsTeXFormat{LaTeX2e}[1994/06/01]     \ProvidesPackage{append}     [2011/01/11 v0.01]          \RequirePackage{kvoptions}     \RequirePackage{kvsetkeys}     \SetupKeyvalOptions{       family=APP,       prefix=APP@,       setkeys=\kvsetkeys     }     \DeclareStringOption{hyperref}     \ProcessKeyvalOptions*          \RequirePackage{hyperref}     \hypersetup{colorlinks,linkcolor=blue,\APP@hyperref}     \endinput      But this yields an error: > ! Package kvsetkeys Error: Undefined key `pdfauthor=My Name'. My second attempt is:               \NeedsTeXFormat{LaTeX2e}[1994/06/01]     \ProvidesPackage{append}     [2011/01/11 v0.01]          \RequirePackage{kvoptions}     \RequirePackage{kvsetkeys}     \SetupKeyvalOptions{       family=APP,       prefix=APP@,       setkeys=\kvsetkeys     }     \define@key{APP}{hyperref}{%       \def\in@hyperref{#1}     }     \ProcessKeyvalOptions*          \RequirePackage{hyperref}     \hypersetup{colorlinks,linkcolor=blue,\in@hyperref}     \endinput      and I get the same error... EDIT: A third attempt suggests that the problem is the way I try to pass options to `hyperref`.               \NeedsTeXFormat{LaTeX2e}[1994/06/01]     \ProvidesPackage{append}     [2011/01/11 v0.01]          \def\in@hyperref{pdfauthor=My Name}     \RequirePackage{hyperref}     \hypersetup{colorlinks,linkcolor=blue,\in@hyperref}     \endinput      Surprisingly, the following works:               \NeedsTeXFormat{LaTeX2e}[1994/06/01]     \ProvidesPackage{append}     [2011/01/11 v0.01]          \def\in@hyperref{My Name}     \RequirePackage{hyperref}     \hypersetup{colorlinks,linkcolor=blue,pdfauthor=\in@hyperref}     \endinput


title: Use markers as clip path

text: I want to plot a line, where the markers knock out a piece of the line instead of being displayed (it would be useful if there was a way to leave a bit of space around a marker, too). Drawing the marks white doesn't always work, i.e. when anything is behind the plot. Is there a way to add the markers to the plot's clip path, so it will be transparent in the knocked-out parts instead of white?               \documentclass{minimal}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}         \begin{axis}[height=3cm, width=10cm]             \addplot[fill=blue!20,draw=none,mark=none] coordinates{(0,0) (0,5) (5,5) (5,0)};             \addplot[mark=square*, mark options={scale=2, fill=white, draw=white},                 samples=10] {x};             \addplot[only marks,samples=10] {x + 2*rand};         \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/eo1ZT.png)


title: Citing many long URLs (shortening and numbering)

text: In my thesis I have to quote a lot from a single weblog. The URLs are mostly of this structure:   * `blogname.providername.com/stories/123456`   * `blogname.providername.com/stories/some-random-text-taken-from-the-first-words-of-the-blogpost`   * `blogname.providername.com/topics/some-topic` or if it is a comment   * `blogname.providername.com/stories/123456/#123456` I quote probably several dozen of these very long URLs mainly within one chapter, normally in the footnotes. The problem is that the footnotes get almost unreadable, bloated and hard to typeset properly (line breaks etc.). Because of that I thought of shortening them and citing them in an appendix (next to the bibliography). The idea is to use something along the lines of “see URL-1, 2012-03-01” and in the next citation “see URL-2, 2010-07-20”, so they are numbered sequentially. And in the appendix there would be > URL-1: blogname.providername.com/stories/123456 > > URL-2: blogname.providername.com/stories/327162/#123456 The questions are:   * would it be useful to quote them via `bibtex`/`biblatex`-Database? Or is there a better way, because the list in the appendix should be separated from the ‘normal’ bibliography   * how to number them automatically as they are quoted? For regular bibliography management I use `biblatex` and `biber`. I quote other URLs as well, so the bibliography driver for URLs shouldn’t be modified generally. BTW: the URLs have to be put into `\url{}`, because of hyperlinking them via hyperref and mainly because some of them include hash keys, which cause problems otherwise. Does anyone have an idea how to do this? Any hints where and how to start would be welcome. **Edit1** : Regarding jon’s hint: This discussion might be showing the right direction, but I don’t get it to work yet. I tried using the following new definition of a numeric cite command. > \newbibmacro*{numcite}{% \printtext[bibhyperref]{% > \printfield{prefixnumber}% \printfield{labelnumber}% }} > > \DeclareCiteCommand{\numcite}[\mkbibbrackets] {\usebibmacro{prenote}} > {\usebibmacro{citeindex}% \usebibmacro{numcite}} {\multicitedelim} > {\usebibmacro{postnote}} But then I would still need a redefinition for my subbibliography. And I don’t know if that is possible. **Edit2** : minimal working example (see my comment)               %!TEX encoding = UTF-8 Unicode          \begin{filecontents}{mybib.bib}          @book{HorkheimerAdorno-DdA,         Author = {Max Horkheimer and Theodor W. Adorno},         Location = {Frankfurt am Main},         Publisher = {Fischer Taschenbuch Verlag},         Subtitle = {Philosophische Fragmente},         Title = {Dialektik der Aufklärung},         Year = {1988}}          @online{url-blog-example,         Url = {http://blogname.provider.com/stories/some-random-text-from-the-beginning-of-the-blog-entry/#8360558},         Keywords = {Blogurl},         Year = {22.9.2010}}          @online{url-blog-another-example,         Url = {http://blogname.provider.com/stories/some-more-but-different-random-text-from-the-beginning-of-the-blog-entry/#1239877},         Keywords = {Blogurl},         Year = {13.4.2004}}               \end{filecontents}          \documentclass[12pt]{scrartcl}          \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage[babel,german=quotes]{csquotes}          \usepackage{hyperref,lipsum}               \usepackage[style=authortitle-dw]{biblatex}     \addbibresource{mybib.bib}               \begin{document}          \lipsum*[1]\footcite[34]{HorkheimerAdorno-DdA} \lipsum*[2]\footnote{Cf. \cite{url-blog-example} and cf. \cite{url-blog-another-example}.}                \printbibheading     \printbibliography[notkeyword=Blogurl,heading=subbibliography,title={Main Sources}]     \printbibliography[keyword=Blogurl,heading=subbibliography,title={Blog Citations}]                    \end{document}


title: Table of Contents inside an Appendices Environment

text: I am trying to create a table of contents inside the appendices environment, however I am unable to do so. In the example below I want a table of contents for Section1. I have tried the minitoc but am having no luck. Any suggestions? Thanks               \documentclass[12pt,a4paper]{article}     \usepackage[titletoc, title]{appendix}          \begin{document}     ...     \tableofcontents\newpage     \listoffigures\newpage     \listoftables\newpage     ...     \begin{appendices}     \section{Section1}     ...     %Want the toc here     ...     \subsection{subSec}     ...     \subsubsection{subsubSec}     ...     \section{Section2}     ...     \end{appendices}     \end{document}


title: How can I change the font size of a fraction in an index?

text: I have, as part of an equation, the object               a^{5} \left(\frac{b}{c}\right)^{\frac{2}{3}}      The problem is that the `2` and `3` are very small (compared to the `5`) and I would like all sub/superscripts to be the same size just as all body text is the same size. Is there a way of defining the font size inside the `equation` environment?


title: Using biblatex-publist to add talks to a CV

text: I use the biblatex-publist style to put my publications on my CV. I'd like to do something similar for my talks. The problem is that they get printed only with the year, and I'd like the date too. Here is a MWE:               % !TEX program = xelatex     \documentclass{memoir}          \usepackage{csquotes}     \usepackage[backend=biber, bibstyle=publist]{biblatex}     \omitname[Thomas]{Hodgson}     \addbibresource{talks_mwe.bib}          \begin{document}          \section{Talks}     \begin{refsection}[talks_mwe]     \nocite{*}     \printbibliography[heading=none]     \end{refsection}          \end{document}      And some BibLaTeX records:               @misc{one,     Author = {Hodgson, Thomas},     Title = {One},     Year = {2013-01-01}}          @misc{two,     Author = {Hodgson, Thomas},     Title = {Two},     Year = {2012-01-01}}      That does what I want, but the date is in ISO format. I'd like it to be more readable and preferably in the British Day-Month-Year style. I suppose that there are two parts to this question: (i) Is there an easy way, without altering bib latex-publist, to have the date print differently (while being sorted as it is now)? (ii) As a bonus, could it work from the 'date' field in BibLaTeX, because it seems neater to do that than to make the 'year' field something that's not a year.


title: Customize xindy index layout

text: I am making a songbook, using the `songs` package. The book is in norwegian, and thus we need the norwegian letters æ,ø,å to be indexed after z. As far as i understand, this is only possible with the xindy package. Creating the index is no problem, but I want to customize how it looks. As pr. now, it looks like this: ![Current layout](http://i.stack.imgur.com/hLkxu.png) Using makeindex, I was able to make it look correct ![Correct layout](http://i.stack.imgur.com/oc6Ml.png) Here is the code for makeindex `\usepackage[makeindex]{imakeidx} % Normal LaTeX indexing \makeindex[columns=1, title=Sangregister,program=makeindex,intoc=true,options=-s idxconf.ist] % Properties of index` This is for xindy               \usepackage[texindy]{imakeidx}      \def\xindylangopt{-M lang/norwegian/latin1-test }     \makeindex[columns=1,name=master,title =Sangregister,intoc=true,options=\xindylangopt]      The layout-options, is in the file `idxconf.ist`, which works on `makeindex` looks like this               headings_flag 1     heading_prefix "{\\bfseries "     heading_suffix "}\\nopagebreak\n"     delim_0 " \\dotfill "     delim_1 " \\dotfill "     delim_2 " \\dotfill "      Is it possible to use the idxconf.ist file with xindy? If not, how do I customize xindy to look like the last picture. Here is a minimum working example: xindy:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[norsk]{babel}     \usepackage[texindy]{imakeidx}     \def\xindylangopt{-M lang/norwegian/latin1-test}     \makeindex[columns=1,name=xindytest,title =Sangregister,  options=\xindylangopt]     \begin{document}     start     \index{a}\index{æ}\index{ø}\index{å}     end     blabla     \printindex     \end{document}      makeindex, which looks correct, but æøå is treated as symbols.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[norsk]{babel}     \usepackage[makeindex]{imakeidx}     \makeindex[columns=1, title=Sangregister,program=makeindex,intoc=true,options=-s idxconf.ist] % Egenskaper til indeks     \begin{document}     start     \index{a}\index{æ}\index{ø}\index{å}     end     blabla     \printindex     \end{document}


title: Probability beamer theme

text: I'm trying to present my thesis in stochastic area with some beautiful Beamer theme I found useful website http://latex.simon04.net/. ![enter image description here](http://i.stack.imgur.com/Wzdm6.png) But as my thesis is in stochastic (probability) I search if there are any themes which contain style or background like this ![enter image description here](http://i.stack.imgur.com/eNyRK.jpg) ![enter image description here](http://i.stack.imgur.com/HetqF.jpg) Could someone indicate me of any probability theme if it exists


title: Run questions and solutions in esami

text: I am using the `esami` package to generate two files: (1) one that contains a single multiple choice question and (2) one file that contains the same question with the MCQ answer as well as the detailed solution. I am having the following issues: (1) Where can I put additional solution text when writing the test questions so that it will appear when I generate the solutions file? I suspect that `esami` may only be able to provide one letter answers to MCQs, but I wanted to be sure. For example, here is the question mini-ma-03:               \newproblem{          \FPsetpar{a}{1}{4}\FPsetpar{b}{0}{9}          \item  $\angle A$ is a complement of $\angle B$.  If the measure of $\angle A$ is $\FPsv{a+b}^\circ$, what is the measure of $\angle B$?          \vspace{10 mm}          \begin{answers}{1}\bChoices[random]         \Ans1 $\FPsv{90-(a+b)}^\circ$ \eAns         \Ans0 $\FPsv{90+(a+b)}^\circ$ \eAns         \Ans0 $\FPsv{180-(a+b)}^\circ$ \eAns  \eFreeze         \Ans0 $\FPsv{180+(a+b)}^\circ$ \eAns         \eChoices\end{answers}     }      I would like to provide a detailed solution in addition to the answer choice. For example,               If $\angle A$ is complementary to $\angle B$, then $\angle A + \angle B = 90^{\circ}$, etc      would be inserted as red text in the solution version. (2) My second issue is I am manually running two files (one with solutions and one without). My concern is that the variables a and b will not always match between the two since the variables are randomly generated. Here is the MWE of the shell tex file used to run mini-ma-03:               \documentclass[a4paper,UKenglish]{article}     \usepackage[autopston,prova,twocolumns,xyz,nosolutions,fillb]{esami}          % +=============================+     % |         DEFINITIONS         |     % +=============================+          \def\examname{Practice ISEE: Exam 1}                                                                      \def\numcompiti{1}%%% The number of the versions     \date{2013/07/23}%%% THE DATE IN THE FORMAT YYYY/MM/DD     \def\Data{\longdate}%%% or \shortdate: the date in the heading          \begin{document}          \pagestyle{esame}     \whiledo{\thevers<\numcompiti}{\stepvers          \FPeval\seme{round((\thenomefile+(3*\thevers)):0)}          \randomi=\seme     \permuta          \begin{large}          \begin{test}     \begin{questions}     \esercizi{mini-ma-03}     \end{questions}     \end{test}          \closevers     }          \end{large}          \end{document}      Then I run this:               \documentclass[a4paper,UKenglish]{article}     \usepackage[autopston,twocolumns,xyz,solutions,fillb]{esami}          % +=============================+     % |         DEFINITIONS         |     % +=============================+          \def\examname{Practice ISEE: Exam 1}                                                                      \def\numcompiti{1}%%% The number of the versions     \date{2013/07/23}%%% THE DATE IN THE FORMAT YYYY/MM/DD     \def\Data{\longdate}%%% or \shortdate: the date in the heading          \begin{document}          \pagestyle{esame}     \whiledo{\thevers<\numcompiti}{\stepvers          \FPeval\seme{round((\thenomefile+(3*\thevers)):0)}          \randomi=\seme     \permuta          \begin{large}          \begin{test}     \begin{questions}     \esercizi{mini-ma-03}     \end{questions}     \end{test}          \closevers     }          \end{large}          \end{document}      Can I run this in one file instead of two?


title: Tikzscale, trim axis left/right, and externalizing

text: `tikzscale` and `trim axis` do not play well together, with the produced figure being larger than requested because it ignores the size of the labels. I was wondering whether it is possible to use both `tikzscale` to get exact sizing of the figure and the `trim axis left` and `trim axis right` parameters in the `tikzpicture` environment so that the figure captions are centered with respect to the axis rather than the axis+labels. It'd be great to retain the ability to do this even when the figures are externalized, if possible. Here is what currently happens: ![enter image description here](http://i.stack.imgur.com/C0nWd.png) And here's a MWE: # Main file:               \documentclass{article}          \usepackage{tikz,pgfplots,tikzscale}          \begin{document}       This is just some random text that will span over two lines. This is just some random text that will span over two lines.       \begin{figure}[h!]         \centering         \begin{tikzpicture}[trim axis left,trim axis right]         \begin{axis}[%           xlabel={x},           ylabel={y},           width=\textwidth,           height=0.25\textwidth,]         \addplot {x};         \end{axis}         \end{tikzpicture}%         \caption{No tikzscale and trim axis left/right}       \end{figure}            This is just some random text that will span over two lines. This is just some random text that will span over two lines.       \begin{figure}[h!]         \centering         \includegraphics[width=\textwidth,axisratio=4]{no-trim.tikz}         \caption{tikzscale only}       \end{figure}            This is just some random text that will span over two lines. This is just some random text that will span over two lines.       \begin{figure}[h!]         \centering         \includegraphics[width=\textwidth,axisratio=4]{trim.tikz}         \caption{tikzscale and trim axis left/right}       \end{figure}     \end{document}      # no-trim.tikz               \begin{tikzpicture}     \begin{axis}[%       xlabel={x},       ylabel={y},]     \addplot {x};     \end{axis}     \end{tikzpicture}%      # trim.tikz               \begin{tikzpicture}[trim axis left,trim axis right]     \begin{axis}[%       xlabel={x},       ylabel={y},]     \addplot {x};     \end{axis}     \end{tikzpicture}%      # Edit: Jake suggested that the question would be better phrased as how to move the captions so that they are aligned to the axis of the figure rather than the opposite. So, assuming that the typical scenario is the one in Figure 2, what would I have to change to center the caption with respect to the axis? Again, I'll be producing tens of figures like this so an automated solution is what I'm aiming for (that's why I assumed that the way to go was with `trim axis left` and `trim axis right`).


title: Formatting citations in bibtex4word

text: I am using bibtex4word to manage my references in Word 2010. I am using "agsm/(l3yshp;" as the style, so that my references appears in by surname-year format. The citations work well once they are at the end of a sentence (e.g. the existing research focused on X (Han et al., 2003) ). However, if the sentence has to contain the names of the researchers specifically (e.g. Han et al. (2003) showed the importance of X) then I have to manually adjust the citation as it alwalys prints the citations in brackets. The problem is, whenever I print such an adjusted citation (either as a print-out or as a pdf), the citation prints _without_ my manual adjustment. On their web-page, a similar question is posed with the title 'Parentheses adjacent to a citation disappear when I refresh the bibliography', but I could not make it work?!


title: NFSS-like selection of font weights using fontspec and xelatex

text: OK, so I have mastered fontspec to the extent that I can say `\setromanfont[Mapping=tex-text,Ligatures=Common,Numbers=OldStyle]{Sabon LT Std}` and indeed, for effect, I can say stuff like `\newfontfamily{\ultrablack}[UprightFont={Syntax LT Std Ultra Black}]{Syntax LT Std}` and lo! and behold! I can relatively easily switch between fonts and weights. Relatively. but say that I would like to be able to do the proper nfss thing: `\fontfamily{pxt}\fontseries{c}\fontshape{n}\fontsize{12pt}{14.4pt}\selectfont` There are selectors, indeed, to specify `UprightFont`, `Bold`, `BoldItalic` and `Italic`, but not to specify `SemiBold`, `UltraBlack` or `Light Condensed`. Unless I am missing something. Any and all pointers or advice welcome. Thank you.


title: Correct detect cell in row before breaking page in table

text: For my task I use Cals package. I create table spread for many pages with row breaking at the end of pages. In this package It describes row dispatch. But It works only rows, and doesn't detect cell in which break happens. When new page started, content always inserted to the first cell even so breaking actions took place in the second cell. The main problem how to right detect in which cell breaks row and how to typeset content to the right cell. Does this package allow to split row to cells at the end of the page and correct start row (include cells )in next page? Code:               \makeatletter     \let\oldDispatch=\cals@row@dispatch     \newbox\rowBefore     \newbox\rowAfter          \newbox\decorationCopy     \newdimen\splitHeight          \def\cals@row@dispatch{%     \cals@ifbreak\iftrue       \splitHeight=\pagegoal \advance\splitHeight -\pagetotal       \ifdim \splitHeight>50pt % break inrow only if at least 100pt left         \advance\splitHeight -5pt         \setbox\rowBefore=\hbox{}         \setbox\rowAfter=\hbox{}         \def\next{%          \setbox0=\lastbox           \ifvoid0             \def\next{\global\setbox\rowBefore=\box\rowBefore                       \global\setbox\rowAfter=\box\rowAfter                                              }%           \else             \setbox2=\vsplit0 to\splitHeight             \setbox\rowBefore=\hbox{\box2 \unhbox\rowBefore}%             \setbox\rowAfter=\hbox{\box0 \unhbox\rowAfter}%           \fi           \next}        \setbox0=\hbox{\unhbox\cals@current@row \next}              \setbox\decorationCopy=\copy\cals@current@cs         \setbox\cals@current@row=\box\rowBefore         \ht\cals@current@cs=\ht\cals@current@row         \oldDispatch         \cals@issue@break              \setbox\cals@current@row=\box\rowAfter         \cals@reheight@cells\cals@current@row         \setbox\cals@current@cs=\box\decorationCopy              %                 \ht\cals@current@cs=\ht\cals@current@row        %\let\cals@current@context=b       \fi     \fi     \oldDispatch}          \begin{myenv}     \colwidths{{6.6cm}{10.97cm}}     \hrule width\hsize \vskip0pt     \brow \cell {\vspace{-15pt} \subsubsection{Very long text}}\cell { Very long text     } \erow     \end{myenv}


title: How to make a column with an adaptive width?

text: I have two questions in creating the following table: 1) How to make the first sub-column (with title No.) adaptive in width? Now it has the same width with the second sub-column, but I'd like to make the No. column narrower. 2) How to vertically center the Employee column title "Employee"?               \documentclass{article}     \usepackage{array}     \begin{document}     \begin{tabular}     { *2{>{\centering}m{2cm}| }     >{\centering\arraybackslash}m{2cm}|      *2{>{\centering}m{1.6cm}| }      >{\centering\arraybackslash}m{2cm}|     >{\centering\arraybackslash}m{1.7cm}}     \hline     \multicolumn{2}{c|}{ Location} & Production &     \multicolumn{2}{c|}{Ratio in Year} & Employees & Profit \\     \cline{1-1}\cline{2-1}\cline{4-1}\cline{5-1}      No. & coordinates& (lb.) & 1983 & 1984 && \$ \\ \hline     1 & -2 36 27 & 28000 & 0.35 & 0.31 & 17 & 542800\\ \hline     \end{tabular}     \end{document}      ![enter image description here](http://i.stack.imgur.com/x7P8N.png)


title: How to typeset this integral?

text: I want to typeset the integral               $$ \int{\dfrac{1}{\cos^2\left(5 - \dfrac{3x}{4}\right)}}\,\mathrm{d}x$$      I tried               \documentclass[12pt,a4paper]{article}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \begin{document}     $$ \int{\dfrac{1}{\cos^2\left(5 - \dfrac{3x}{4}\right)}}\,\mathrm{d}x$$     \end{document}      and I get ![enter image description here](http://i.stack.imgur.com/uWlzu.jpg) The integration symbol not high enough. How to typeset this integral?


title: What can *I* do to help the LaTeX3 Project

text: First, I appreciate this may not be the right place for this question, so absolutely no offence if it gets closed. I'm very much an end-user, rather than a programmer, of LaTeX, and I watch with awe and wonder, and often complete bewilderment, as, bit by bit, more LaTeX3 questions or answers flow by here in TeX.SX. But always with the thoughts "I wish _I_ could do that" and "I'd love to help, but...". So:   1. In what ways could a strict end-user or almost-noob help the LaTeX3 project? (And yes, "keep out the way" is an absolutely understandable answer.)   2. What's an **appropriate** reading list for someone at my level of skill who doesn't necessarily want to delve into the bowels?   3. What else do I need to know?


title: Hyperlinks in zref

text: I use the great package `zref` to create my own referencing system. Can I make hyperlinks for pdftex (and tex4ht)? See the following code. I'd like to make the `\showref` command clickable, so that I jump to the place where I use the `\setdest` command. Is this (easily) possible?               \documentclass{article}     \usepackage{zref}     \makeatletter     \zref@newlist{zoo}     \zref@newprop{animal}{\currentanimal}     \zref@addprop{zoo}{animal}     \newcommand\setdest[2]{\def\currentanimal{#2}\zref@labelbylist{#1}{zoo}}     \newcommand\showref[1]{\zref@extract{#1}{animal}}     \makeatother          \begin{document}     \section{My favorite pets}     \setdest{label}{Cat}          See the animal \showref{label}.     \end{document}


title: Diagram / Infographic of TeX & friends?

text: So, I recently delved into LaTeX for a project at work. But I’m come from the XML+XSL world, and some of LaTeX’s design is kind of difficult for me to grok. (I’m not interested in debating the design decisions of separation of semantics from presentation. I’m just saying that my brain is used to thinking in a very different way, and I’m having a hard time forming a mental model of how LaTeX-and-friends all work together to accomplish their task.) I’m a visual thinker. Is there a diagram that describes what the typical LaTeX processing flow is? For example, imagine an article written in LaTeX, which makes use of BibTeX references. I know there are also `.sty` files in the processing, somewhere. I also spotted some `.aux` files. And while browsing the packages installed by TeX Live I recall reading that some packages can even define their own filetypes for custom functionality. Among these types of files, what are the most popular formats? So when I open a LaTeX document in my GUI editor and hit _Typeset_ , and up pops a PDF—what has just taken place? (And more importantly, what are the responsibilities of each component in the processing chain?)


title: Twist a single line matrix in TikZ

text: I have a single line matrix made with TikZ:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix}     \begin{document}     \begin{tikzpicture}     \node [matrix,fill=white!20,draw=blue] (my matrix) at (3,2)     {     \node(a) {40}; & \node{AE}; & \node{B0}; & \node(b) {05}; & \node(b) {05};\\     };     \end{tikzpicture}     \end{document}      Is there a way to "twist" this matrix along a curve (I would like to illustrate something like a flow ...) and to "open it" at both ends?


title: breqn package incompatibility

text: Edit: For clarity about what this post is asking, I have placed the specific questions at the beginning of the post. I would like to understand the technical details of the incompatibilities of `breqn.sty` (v0.98a) with other packages in TexLive2009. These incompatibilities appear to vanish in subsequent editions of TexLive, and I would like to know what changes have been made to the remediate the incompatibilities? Lastly, what does the obscure and unhelpful error message cited below signify? * * * Background to contextualize the above questions: On an amd64 linux system running TexLive 2009, I find that the package `breqn` (v0.98a) must be the last package loaded, otherwise it interferes with loading of certain other packages, in particular `listings` (v1.4), `xcolor` (v2.11), and `graphicx` (v1.0f). Below, I include an example document that generates an error.               \documentclass{article}     \usepackage{breqn}     \usepackage{listings}     \begin{document}     Null.     \end{document}      The output (including the error message) produced upon compilation of this document with `pdflatex` is:               This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)     entering extended mode     (./breqn.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, nohyphenation, loaded.     (/usr/share/texmf-texlive/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/size10.clo))     (/usr/share/texmf-texlive/tex/latex/mh/breqn.sty     (/usr/share/texmf-texlive/tex/latex/mh/flexisym.sty     (/usr/share/texmf-texlive/tex/latex/mh/cmbase.sym)     (/usr/share/texmf-texlive/tex/latex/mh/mathstyle.sty))     (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)     (/usr/share/texmf-texlive/tex/latex/tools/calc.sty))     (/usr/share/texmf-texlive/tex/latex/listings/listings.sty     ! Missing number, treated as zero.     <to be read again>                         ^     l.44 \lst@InputCatcodes          ?      When I compile the same code on a mac osx 10.6 system running MacTeX-2011, the code compiles without error, regardless of when `breqn.sty` is loaded. The following excerpt from the `breqn` manual (Section 6.1) does specify that such incompatibilities may occur: > As it pushes the envelope of what is possible within the context of LaTeX > 2ε, the `breqn` package will tend to break other packages when used in > combination with them, or to fail itself, when there are any areas of > internal overlap; successful use may in some cases depend on package loading > order.


title: BibTeX doesn't produce any .bbl files on Mac OS

text: I am trying to use BibTeX on my Mac to produce some simple citation references. I copied some example code from online tutorials into a `.tex` file and a `.bib` file. The first LaTeX run on TeXShop gives me a PDF without any references. An `.aux` file is generated and valid. But I am failing at the next step. Normally BibTeX should run on the recently produced `.aux` file and generate an `.bbl` file which LaTeX uses in his second compile run, right? It doesn't. There is no `.bbl` file produced and I am getting no messages about it. It appears that the step "BibTeX runs on the `.aux` file to generate an `.bbl` file" never starts. I am using TeXShop on Mac OS. Any ideas? How do I even start the BibTeX thing on Mac OS? When I'm working on Windows in TeXnicCenter it does this step by itself.


title: How to align numbers to en-dash in a table?

text: `dcolumn` and `siunitx` packages can be used for aligning numbers to decimal point in a table. How can I align the range values (separated using en-dash `--`) to en-dash '--', in a table? so they appear like this:               A        1--2      B       10--50      C      500--1000      D    0.001--0.5       I use the following code for generating a table:               \begin{table}     \centering     \begin{tabular}[!hb]{@{}lc@{}}     \toprule     AA & BB \\     \midrule      A & 1--2 \\     B & 10--50 \\     C & 500--1000 \\     D & 0.001--0.5 \\     \bottomrule     \end{tabular}     \end{table}


title: Too much space after integral sign with unicode-math and lualatex

text: (I had a feeling this was a duplicate, but couldn't find an older question about it. Forgive me if I'm just bad at searching.) Consider the minimal example               \documentclass{article}     \usepackage{mathtools}     \usepackage{unicode-math}     \setmathfont{lmmath-regular.otf}     \begin{document}     \begin{equation*}       \int f(x) \, \mathrm{d}x     \end{equation*}     \end{document}      When compiled with `lualatex` the space between the integral sign and `f(x)` is too large, larger than what I get if I compile with `xelatex` (or if I'm not using `unicode-math`).   * With `lualatex`:  ![enter image description here](http://i.stack.imgur.com/nPwrF.png)   * With `xelatex`:  ![enter image description here](http://i.stack.imgur.com/P4rZm.png)   * Without `unicode-math`:  ![enter image description here](http://i.stack.imgur.com/KAFAH.png) I'm using a recently updated TeXlive 2011, and the same thing happens with `Asana-Math.otf` or `xits-math.otf` as math font. Can this be corrected somehow?


title: Using lstlistings in two columns

text: My goal is to display source code (awk, Python, R and SAS) and text (their output) side-by-side. Both are loaded from external files, and can be pretty long sometimes (pagebreaking is inevitable), the source code should be syntax highlighted. The source code should stay on the left side, and the output should stay on the right side, even if there is a pagebreak. I'm using the listings package for its syntax highlighting. I can't find an environment to behave right when there's a pagebreak. Some of what I've tried already:   1. **multicols** : this environment is fine, until there's a pagebreak (left side breaks to the right side and messes up everything)   2. **minipage** : no pagebreak yet


title: short names do not seem to work in tocloft package for added lists

text: I added a new list (requirements) but the short names do not appear in the List of Requirements (LOR). Instead, all that appears in the LOR is the initial '[' The setup code is:               \usepackage{subfig}     \usepackage[titles,subfigure]{tocloft}% to define requirements list for TOC,F,T     \newcommand{\listrequirementsname}{LIST OF REQUIREMENTS}     \newlistof[subsubsection]{requirement}{rqt}{\listrequirementsname}     \newcommand{\requirement}[1]{%     \refstepcounter{requirement}     \par\noindent\textbf{Rqt \therequirement. #1}     \addcontentsline{rqt}{requirement}{\protect\numberline{\therequirement}#1}\par}      The usage is:               \requirement[short name]{Interface 1 Connector hfjdkh jfdhf kjfd fjdjf jfd jfdj fjdfj fjda jfjdafih eiufhda fdaf fda oif}      The output in the LOR is: > 3.2.1.1.1 [ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . > . . . . 8 And the output in the actual requirement is: > Rqt 3.2.1.1.1. [   >  short name]Interface 1 Connector hfjdkh jfdhf kjfd fjdjf jfd jfdj fjdfj > fjda jfjdafih eiufhda fdaf fda oif


title: Beamer: changing background color leaves white lines above and below title

text: It must be simple but I don't find the last missing bit. I'm making a beamer presentation where I want single slides with a different background color. However, when I set the background color using `\setbeamercolor{normal text}{bg=red}` or `\setbeamercolor{background canvas}{bg=red}`, there are still two white horizontal lines surrounding the frame title and I cannot find out how to change the color of those or how to remove them. Even using `[plain]` for the frame does not get rid of those. Below is a working example.               \documentclass[handout]{beamer}     \usepackage{color}     \usecolortheme{rose}     \useoutertheme{smoothbars}     \useoutertheme{infolines} % header and footer     \setbeamertemplate{headline}{} % no header line     \begin{document}      \begin{frame}       \frametitle{slide 1}       first      \end{frame}     {     \setbeamercolor{normal text}{bg=yellow!20}      \begin{frame}       \frametitle{slide 2}       second      \end{frame}     }     \end{document}


title: Place image on a new page without top margin?

text: I have an article:               \documentclass[a4paper,12pt,oneside]{article}      Now in a section I have a figure:               \begin{figure}     \centering     \includegraphics[scale=0.65]{images/rlexample.png}     \caption{---}     \label{rlexample}     \end{figure}      This figure is pretty big, so I would like to show them in a single page without the classic top margin. Is there anyway to specify a negative top margin just for showing this figure? ## Solution Thanks to Prof. @egreg the solution is (with pagenumber hiding)               \begin{figure}     \centering     \vspace*{-3cm}     \includegraphics[scale=0.6]{images/rlexample.png}     \caption{---}     \label{rlexample}     \end{figure}          \thispagestyle{empty}


title: How do I typeset something like this (math - image below)?

text: ![enter image description here](http://i.stack.imgur.com/mP6Ga.png) I figured that that the exam class allows me to align the two parts of the lemma using the the `\part` command and also I could align the two lines of equation (3.11) using `\begin{align*}`, `\end{align*}` but there are a few problems this way. First, there's more gap than normally is between all lines and also I don't know how to get the equation number to appear on the left the way it is image. I'd like it if the answers avoided the exam class and worked in the article class instead because it seems to me like that's messing things up for me. Edit: Here's the code:               \documentclass[12pt, a4paper]{exam}     \usepackage{lipsum}     \usepackage{amsmath, amsthm}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{xcolor}     \usepackage{enumitem}     \usepackage{multicol}     \usepackage{lipsum}     \usepackage{xfrac}% http://ctan.org/pkg/xfrac     \usepackage{multicol}          \begin{document}     \renewcommand{\thepartno}{\roman{partno}}     \noindent     \textbf{Lemma 3.4.}     \begin{parts}     \part\textit{For every $\alpha$ there is a cardinal number greater than $\alpha$.}     \part \textit{If $X$ is a set of cardinals, then $\sup X$ is a cardinal} \\     \end{parts}     \noindent\textit{Proof.} (i)     For any set $X$, let     \begin{align*}              h(X) = & \text{the least} \ \alpha \ \text{such that there is no one-to-one} \\                    & \text{function of} \ \alpha \ \text{into} \ X      \end{align*}     \end{document}


title: Parallel loop [python-like zip] in Tikz

text: An easy way to write axis labels in Tikz is:               \foreach \x/\xtext in {-1,-0.5,0.5,1}     \draw[very thin,gray] (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\xtext$};      Is it possible to have something similar but where `\x` and `\xtext` do not get the values from the same list as follows ?               \foreach \x in {-1,-0.5,0.5,1}/\xtext in {-10,-5,5,10}     \draw[very thin,gray] (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\xtext$};


title: Changing AUCTeX processor in the file itself

text: I'm using AUCTeX 11.86 in Emacs 23.3.1, under Linux (Ubuntu 12.04.1). Some of my files I compile with LaTeX, a few with XeLaTeX. I'd just like to be able to enter C`-c C-c` to compile, and have the file itself tell AUCTeX which processor to use. Is there a variable I can set in a file which will allow me to do this?


title: How do I prevent LaTeX from creating en-dash and em-dash?

text: All over the internet, there's this question on how to make LaTeX do the en- dash and em-dash. I have the opposite problem. I have some text from which I am generating HTML and LaTeX outputs. The original text has nothing to do with LaTeX and therefore `--` and `---` are needed to be written as they are, as opposed to being converted to en and em dashes. Putting it in `\texttt` should probably solve it, but this could happen in normal text and I'd like to know if there is any other solutions. P.S. I am writing the LaTeX files with a software, so in fact for example a thing like `\dash{}` instead of every `-` is easier for me, if such a thing exists that is!


title: overfull hbox in the chapter

text: What is the preferred way of fixing an overfull hbox problem when it complains about the chapter title. MWE (complains about the `\chapter{Chapter title}` line):               \documentclass[12pt,twoside]{book}     \textwidth 150mm     \usepackage[Bjornstrup]{fncychap}          \oddsidemargin 5mm     \evensidemargin 5mm     \topmargin 0mm     \headheight 0mm     \textheight 225mm          \begin{document}     \chapter{Chapter title}     lorem impsum.          \end{document}      Looking at the different threads on TeX.se I could not find the answer. Since I have many chapters, I would appreciate a more general solution.


title: \hat over italic letters is not centered horizontally

text: When using               $\hat{a}$      in LaTeX, the hat is actually aligned slightly left of the a's true head… Is there any common way to fix this? As I think that this is a common issue, I didn't screenshot it, but if you want, let me know.


title: Overlay diagrams in TikZ

text: I want to join the vertices labeled as (1), b, abc, and ac but could not succeed. I'd highly appreciate if you point me out what I'm doing wrong and what is the solution. Thanks ![enter image description here](http://i.stack.imgur.com/N9Aja.png)               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}     \begin{tikzpicture}[scale = 4, fill opacity = 1.0, thick,                             line cap = round, line join = round]         %% Define coordinate labels.         % t(op) and b(ottom) layers         \path \foreach \layer/\direction in {b/{0, 0, 0}, t/{0, 1, 0}} {             (\direction)             \foreach \point/\label in {{0, 0, 0}/ll, {1, 0, 0}/lr, {1, 0, -1}/ur, {0, 0, -1}/ul} {                 +(\point) coordinate (\layer\label)             }             ($(\layer ll)!0.5!(\layer ur)$) coordinate (\layer md)         };                        % Put text next to the labels as requested.         % Funilly enough we need to set fill opacity to 1.         \draw \foreach \text/\label/\anchor in {%             $\left(1\right)$/bll/east,             $b$/bul/east,             $c$/tll/east,             $bc$/tul/east,             $a$/blr/west,             $ab$/bur/west,             $ac$/tlr/west,             $abc$/tur/west} {             (\label) node[anchor=\anchor, fill opacity = 1] {\text}         };         % Draw  cube.         \fill (0, 0, -1) circle (0.5pt);         \foreach \direction in {(0, 0, 1), (0, 1, 0), (1, 0, 0)} {             \draw[dashed, black] (bul) -- + \direction;         }                   \fill[red!60,   opacity=0.5]  (tll) -- (tul)  -- (bur) -- (blr);         \fill[blue!60, opacity=0.5]  (bll)   -- (bul)   -- (tur) -- (tlr);                             \draw (bll) -- (blr) -- (tlr) -- (tll) -- cycle;         \draw (blr) -- (bur) -- (tur) -- (tlr) -- cycle;         \draw (tll) -- (tlr) -- (tur) -- (tul) -- cycle;              \foreach \point in {bll, blr, bur, tll, tlr, tul, tur} {             \fill[fill opacity=1] (\point) circle (0.75pt);         }               \node[below] at (1.0, -0.2, 0.0) {$AC$};          \end{tikzpicture}     \end{document}


title: Why does \@gobble take one argument

text: I understand what `\@gobble`, `\@gobbletwo` etc. do, but I don't understand why `\@gobble` allows for an argument. I believe that the definition of the macro is `\long\def\@gobble#1{}`. Why is this argument needed? In this answer for instance David Carlisle defines `\global\advance\rowc\@ne\@gobble{##}&&%`. Does it mean that only `##` are gobbled?


title: MiKTeX (x64) on WIndows 8 Qt Error

text: I recently installed MiKTeX (x64) on WIndows 8 and fully upgraded it. In multiple occasions, such as invoking xetex, it prompts an error               Qt: Untested Windows version 6.2 detected!      Also the GUI of Texworks and auto-install dialog all revert back to old style theme. What is this problem and how to fix it?


title: How to break inline formulas?

text: I would like to obtain a split formula like this: Latex example on Wikipedia, that is to say with a sort of tab after the "equals" sign, but for an inline formula (between `\(` and `\)` ). Or, as an alternative, I'd like to align a formula like this on the left (when I use suggestions into that Wikipedia example, I always get a centered formula). Thank you in advance.


title: Macro that repeats input of items in enumerate environment

text: My objective is to create Multiple Choice Answer Sheet. I have managed to create the circled letter environment using tikz but my question is that if one can create a macro that will repeat the itemization input `\item abcdtest` as it is the same by looking like `\mcquestion{n}` where n will be the number of MC items that you want. In short I want to replace:               \begin{enumerate}     \item \abcdtest     \item \abcdtest     \item \abcdtest     \item \abcdtest     \item \abcdtest     \item \abcdtest     \item \abcdtest     \item \abcdtest     \end{enumerate}      with `\mcquestion{8}` for example. Here is the sample code I have so far. Any insight into the matter will help.               \documentclass{article}     \usepackage{amsmath,amssymb}     \usepackage{tikz}          \newcommand\abcdtest{%     \noindent\lower1.5ex\hbox{%     \begin{tikzpicture}     \foreach \i in {1,...,4}         {         \path (\i cm,0cm) coordinate (C\i);         \draw (C\i) circle (0.35cm);         }     \foreach \j/\k in {1/A,2/B,3/C,4/D}     {     \draw (\j cm,0cm) node {\k};     }     \end{tikzpicture}}}     \begin{document}     %-----------------------------------------------------------------     \begin{enumerate}     \item \abcdtest     \item \abcdtest     \end{enumerate}     \end{document}


title: How to produce annotated text, where an original text is contrasted with my comments?

text: Assume someone sends me a (plain text or LaTeX source) text document. I'm in the position to comment on the text and suggest improvements. I'd like to produce a LaTeX document featuring the original text and my suggestions side by side. The layout should clearly indicate what the original text was and there should be no limit on the amount of text I can add. Does there exist a convenient solution? Here's an example/mockup:               We conclude that $A=B$.     \annotate{Please cite a proper definition of both A and B.     Also note, that the A.B.'s infamous paper uses a notation which contradicts     C.D.'s use of the term A.}     This is trivial.     \annotate{Are you kidding me? Where's the proof?}      Can this be rendered as:               We conclude that $A=B$.    Please cite a proper definition                                of both A and B.                                Also note, that the A.B.'s infamous paper                                uses a notation which contradicts                                C.D.'s use of the term A.     This is trivial.           Are you kidding me? Where's the proof?


title: How to make appendix and hyperref packages work together with cyrillic (non ASCII) characters?

text: I have a LaTeX document with `hyperref` and `appendix` packages that fails to build. But if I switch off either `appendix` or `hyperref` everything works fine.               \documentclass[14pt]{article}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english,russian]{babel}     \usepackage[toc,page,title,titletoc]{appendix}     \usepackage{hyperref}     \begin{document}          \hypersetup{pdftex, colorlinks=true, linkcolor=blue, citecolor=blue, filecolor=blue, urlcolor=blue, pdftitle=, pdfauthor=, pdfsubject=, pdfkeywords=}          \renewcommand{\appendixtocname}{Приложения}     \renewcommand{\appendixpagename}{Приложения}     \renewcommand{\appendixname}{Приложениe}          \tableofcontents     \pagebreak     \section{тест}          \begin{appendices}               \renewcommand{\thesection}{\arabic{section}.}          \section{Тест}     \pagebreak     \section{Схема устройства}               \end{appendices}          \end{document}      Generated error:               ./test.out     ! Undefined control sequence.     <argument> \T                2A\CYRP \T 2A\cyrr \T 2A\cyri \T 2A\cyrl \T 2A\cyro \T 2A\cyrz...      Is there any possibility to use them together?


title: pgfplots: labels and width issues in non-boxed 3d plot with oblique projection

text: ## Update april 2013 The bug has been fixed with `pgfplots` version 1.8 (requires `\pgfplotsset{compat=1.8}`). * * * When I try to add the axes labels to this code, I get a `division by zero` error. I think the error is responsive to the choice of the unit vectors directions (see after).               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7} % *EDIT*: this improves scale uniformly.          \begin{document}     \begin{tikzpicture}     \begin{axis}[axis lines=center,                  % *EDIT*: this here respects your choice of unit vectors.                  %         scale uniformly computes one common scaling factor                  %         and chooses limits such that the image fulfills the                   %         prescribed width/height as best as possible.                  x={(-0.3535cm,-0.3535cm)}, y={(1cm,0cm)}, z={(0cm,1cm)},                  scale mode=scale uniformly,                  xlabel={$x$}, ylabel={$y$}, zlabel={$z$},                 ]          \addplot3 coordinates {(0,0,0) (0.5,-0.5,0.8)};     \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/nsYep.png) Now look at this code with a different choice of unit vectors. The axes labels are drawn (I get no error), but far away from their axis and overlapped. Moreover, the actual width is about 5 cm and not 10 cm as it should be (`scale only axis` won't help here).               \documentclass[tikz]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7} % *EDIT*: this improves scale uniformly.          \begin{document}     \begin{tikzpicture}     \begin{axis}[width=10cm,                  axis lines=center,                  xmin=0, xmax=1, ymin=-1, ymax=1, zmin=0, zmax=1,                        % *EDIT*: this here respects your choice of unit vectors.                  %         scale uniformly computes one common scaling factor                  %         and chooses limits such that the image fulfills the                   %         prescribed width/height as best as possible.                  x={(0.94cm,-0.34cm)}, y={(0.766cm,0.643cm)}, z={(0cm,1cm)},                  scale mode=scale uniformly,                  xlabel={$x$}, ylabel={$y$}, zlabel={$z$},                 ]          \addplot3 coordinates {(0,0,0) (0.5,-0.5,0.8)};     \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/vgdAN.png)


title: How can I refer to label created by new command?

text: I have several pairs of graphs. I need to display these graphs in latex. I am using the following which works Great.               \begin{figure}       \centering       \begin{subfigure}{.5\textwidth}         \centering         \fbox{\includegraphics[width=.8\linewidth]{4-byVar1.png}}         \caption{``Here's a question?'' (by Var1)}         \label{fig:4-byVar1}       \end{subfigure}%       \begin{subfigure}{.5\textwidth}         \centering         \fbox{\includegraphics[width=.8\linewidth]{4-byVar2.png}}         \caption{``Here's a question?'' (by Var2)}         \label{fig:4-byVar2}       \end{subfigure}       \caption{``Here's a question?''}       \label{fig:comboFig-4}     \end{figure}      However, that's a lot of code to repeat for each such pair of figures. I created a               \newcommand      to do the work for me, but it seems that when I try to ref a figure created by my newcommand, i get an error (fig undefined). **Can anyone recommend how I can refer to a label created by a newcommand?** The newcommand I created looks like this               \newcommand{\graphPairs}[2]{       \begin{figure}         \centering         \begin{subfigure}{.5\textwidth}           \centering           \fbox{\includegraphics[width=.8\linewidth]{#2-byCar1.png}}           \caption{#1 (by Var 1)}           \label{fig:#2-byVar1}         \end{subfigure}%         \begin{subfigure}{.5\textwidth}           \centering           \fbox{\includegraphics[width=.8\linewidth]{#2-byVar2.png}}           \caption{#1 (by Var 2)}           \label{fig:#2-byVar2}         \end{subfigure}         \caption{#1}         \label{fig:comboFig-#2}       \end{figure}     }


title: Is there an easier way to type math symbols than adding them with LaTex?

text: I want to add math symbols to my texts, but i can't get Latex to work, are there other ways to type math symbols?


title: Single .tex file, multiple .bib files

text: I am writing a collaborative document in which each author edits a `main.tex` file and provides a `<author>.bib` file (no `\include`, no `\input` ... I know it's not the ideal choice but it was not my decision). What we are having issues with is that we can't manage to have multiple bibliographies at the end of each chapter (`chapterbib` requires to use `\include`, it mention something in the manual to have a single file, but it is not very clear to me how to do it) A minimal example is like this:               % main.tex     \documentclass[a4paper,11pt,oneside,openright]{book}     \usepackage{natbib}     \usepackage{chapterbib}          \begin{document}     \chapter{Author 1}     \section{author 1 section}     ..something     \addcontentsline{toc}{section}{\bibname}     \bibliographystyle{unsrtnat}     \pagestyle{plain}     \bibliography{author_1}          \chapter{Author 2}     \section{author 2 section}     ..something     \addcontentsline{toc}{section}{\bibname}     \bibliographystyle{unsrtnat}     \pagestyle{plain}     \bibliography{author_2}          \end{document}      author_1.bib               @article{lagrange1772essai,       title={Essai sur le probleme des trois corps},       author={Lagrange, J.L.},       journal={{\OE}uvres},       volume={6},       pages={229--324},       year={1772}     }      author_2.bib               @article{euler1741solutio,       title={Solutio problematis ad geometriam situs pertinentis},       author={Euler, L.},       journal={Commentarii academiae scientiarum Petropolitanae},       volume={8},       pages={128--140},       year={1741}     }      It might happen that author_1.bib and author_2.bib contain the same reference (with the same id key probably). Any hint how to do that?


title: How to put \hyperdef{category}{name}{} at the same position as \label{name}?

text: I am using the `hyperref` package that comes without the `destlabel` option (I tried to use the most recent version of `hyperref`, but it doesn't work with my LaTeX version). So to be able to create named destinations in my PDF whose names are fixed, I use `\hyperdef{cat}{name}{}`. However, it is placed at a different location than a corresponding `\label{name}`. The following illustrates my problem               \subsection{General Introduction}     \label{foo}\hyperdef{bar}{foo}{}      The end result I get is (sorry for the ASCII art)               {Here is the \label destination in the PDF}     7.9.5 General Introduction     {Here is the \hyperdef destination in the PDF}      I would like to have the `\hyperdef` to be at the position that the `\label` takes. How can I make this happen?