title: How secure is sharelatex?

text: **Background:** One of my co-authors faced problem of compiling the paper that I had built using TexStudio and MikteX 2.9 on his Mac Machine running TexLive. **ShareLaTeX Role:** So, one solution is to use ShareLaTeX. But the first problem pops in mind is how safe is uploading unpublished article to a publicly accessible portal? **What I did:** I googled security and data breach of ShareLaTex and found nothing except some words from the ShareLaTex community about their word to ensure that our data are safe; perhaps this would not be enough. **My 1st Question:** To what extent can I trust ShareLaTeX and put my ready- to-publish content there? **My 2st Question:** Is there any alternate way of sharing LaTeX with others around the globe without changing the underlying platform?


title: Statement of Purpose Template

text: I am trying, loosely based on this answer to make a template for my Statement of Purpose. How could I remove the empty extra line between the horizontal rule and the text? Moreover, how could be the first letter be of larger font in the title? Any other suggestion is more than welcomed.               \documentclass{article}          \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}          \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}     \newcommand{\Hrule}{\rule{\linewidth}{0.3mm}}          \makeatletter% since there's an at-sign (@) in the command name     \renewcommand{\@maketitle}{       \parindent=0pt% don't indent paragraphs in the title block       \begin{center}         \MakeUppercase{\Large \bf \@title}         \HRule%       \end{center}%       \textit{\@author \hfill \@date}       \par     }     \makeatother% resets the meaning of the at-sign (@)          \title{Statement of Purpose}     \author{name}     \date{Ph.D. Applicant}          \begin{document}          \maketitle% prints the title block          Emergency medicine has always been a passion of mine\ldots          \end{document}


title: Bibliography Autokey Generation in batch mode

text: Is it possible to generate the bibtex keys for many bibliography entries at the same time or in a batch mode? I am using Jabref for the bibliograpy database and get the bibtex key while inputting the data. The problem is that when I am taking the bibtex entries from other sources, there citation key format varies from source to source. Jabref reads the text file but the keys are very different or dont follow any pattern. It is best to have a consistent citation key format and it will be very helpful if there is a way to use the key format I am using on all the entries rather than generating the key for each entry individually. Thanking in advance for any solution.


title: Using \autoref with tcolorbox

text: Is there a way to refer to a _tcolorbox_ created theorem (created with `\newtcbtheorem`) using _hyperref_ 's `\autoref`? I've tried to set `\<name>autorefname`, as I would have done it for a theorem created with `\newtheorem`, but it does not seem to work for `\newtcbtheorem`:               \documentclass{article}     \usepackage{hyperref}     \usepackage{tcolorbox}     \tcbuselibrary{theorems}          % tcolorbox theorem     \newtcbtheorem{evidence}{Evidence}{}{ev}     \newcommand{\evidenceautorefname}{Evidence}          % classic theorem     \newtheorem{classicevidence}{Evidence}     \newcommand{\classicevidenceautorefname}{Evidence}          \begin{document}     Find the most important text     in~\autoref{ev:one} % Does not work correctly     and in~\autoref{ev:two}. % Works as expected          \begin{evidence}{This is the evidence}{one}         Nothing really important to show here.     \end{evidence}          \begin{classicevidence}         \label{ev:two}         This is the classic evidence.     \end{classicevidence}     \end{document}


title: Conditional alignment of labels in pgfplots bar chart

text: I'm trying to make a bar chart with pgfplots. I'd like the labels to be plotted inside the bars, except when there is not enough space. In that case the label should be shown next to the bar. I've included some code to reproduce the chart i'm making. With percentages under 3% there is not enough space to align the node left. For those nodes i'd like it to align right. The data file data.dat will be generated from outside latex and data values may differ in future, so i'm looking for a general solution. Any help would be very much appreciated.               \documentclass[a4paper, 9pt]{report}     \usepackage{filecontents}      \usepackage{pgfplots, pgfplotstable}     \begin{document}     \begin{filecontents}{data.dat}     rownum value value2 label     1 10 1.1 Cluster~A     2 14 6 Cluster~B     3 17 7 Cluster~C     4 15 2.2 Cluster~D     5 19 4 Cluster~E     6 18 11 Cluster~F     \end{filecontents}     \begin{figure}[h]     \caption{A caption.}     \begin{tikzpicture}       \begin{axis}[         xbar,         y dir=reverse,         axis y line*=none,          axis x line*=none,         major tick length=0,         xmin=0,         xmax=50,         enlarge x limits={abs=0.00005},         scale only axis, width=10cm,         ytick={1,...,6},         xtick={0, 10, ..., 50},         xticklabel=\pgfmathprintnumber{\tick}\,\%,         yticklabel style={text width=3cm, align=right},         yticklabels from table={data.dat}{label},         xmajorgrids,         major grid style={black},         tick style={black},         bar width=4mm,         y=12mm,          enlarge y limits={abs=0.6},          nodes near coords={\pgfmathprintnumber[precision=0]\pgfplotspointmeta\%},         nodes near coords align=left       ]       \addplot [draw=lime , fill=lime] table [x=value, y=rownum] {data.dat};        \addplot [draw=orange , fill=orange] table [x=value2, y=rownum] {data.dat};        \end{axis}     \end{tikzpicture}     \end{figure}     \end{document}


title: Caption under table

text: Is it in any way possible to make a caption right under my table? I've tried `\caption{table 1}`, but that does not work, nothing changes. And how do I get the text aligned to the left in the column? Here is my code:               \begin{center}         \begin{tabular}{| c || c | c | c | c | c | c |}         \hline         \thead{\makecell{Ønskede\\ egenskaber}} & \thead{Holdbarhed} & \thead{Pris} & \thead{\makecell{Billigt\\ og nemt}} & \thead{Miljøvenligt} & \thead{Udseende} &  \\          \hline \hline         \textbf{\makecell{Vægtning\\ (V) 1 - 5 \\ \fontsize{0}{.}}} & 4 & 3 & 5 & 3 & 2 & \textbf{\makecell{Sum\\ (P$\cdot$V)}} \\          \hline         \textbf{\makecell{Energibar\\ (P) 1 - 5\\ \\ P$\cdot$V \\ \fontsize{0}{.}}} & \makecell{3 \\ \\ \textbf{12}} & \makecell{4\\ \\ \textbf{12}} & \makecell{2\\ \\ \textbf{10}} & \makecell{3\\ \\ \textbf{9}} & \makecell{4\\ \\ \textbf{8}} & \makecell{\\ \\ \textbf{51}} \\          \hline         \textbf{\makecell{Fitnessapparat\\ med display\\ (P) 1 - 5\\ \\ P$\cdot$V \\ \fontsize{0}{.}}} & \makecell{\\ 5\\ \\ \textbf{20}} & \makecell{\\ 4 \\ \\ \textbf{12}} & \makecell{\\ 5 \\ \\ \textbf{25}} & \makecell{\\ 4\\ \\ \textbf{12}} & \makecell{\\ 2\\ \\ \textbf{4}} & \makecell{\\ \\ \\ \textbf{73}} \\         \hline         \textbf{\makecell{Vindmølle\\ med solceller\\ (P) 1 - 5\\ \\ P$\cdot$V \\ \fontsize{0}{.}}} & \makecell{\\ 3\\ \\ \textbf{12}} & \makecell{\\ 1\\ \\ \textbf{3}} & \makecell{\\ 2\\ \\ \textbf{10}} & \makecell{\\ 5\\ \\ \textbf{15}} & \makecell{\\ 3\\ \\ \textbf{9}} & \makecell{\\ \\ \\ \textbf{49}} \\         \hline         \end{tabular}     \caption{Tabel 1}     \end{center}


title: Define "edge types" for graphs and inheritance?

text: I'm really new to TikZ (but not to LaTeX) because currently I write an important work in which I want to use some nice scalable graphics.   My current state is that I can define node types with `\tikzset`. I would like to do the same for edges, so I need edge types, in graphs because I need different kinds of edges. I'd like to start with a minimal example of what I have done so far:               \documentclass{scrartcl}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{arrows.meta}     \usetikzlibrary{shapes}     \usetikzlibrary{graphs}     \usetikzlibrary{quotes}          \begin{document}     \tikzset{         role/.style = {rounded rectangle, minimum size=6mm, very thick, draw=blue!50,top color=white,bottom color=blue!20, font=\ttfamily\scriptsize,align=center,text=black},         hv coll/.style = {to path={-| (\tikztotarget)}},         vh coll/.style = {to path={|- (\tikztotarget)}},     }          \begin{tikzpicture}[node distance=5mm and 5mm,thick,black!50,graphs/every graph/.style={edges=rounded corners}]         % nodes         \node[role] (n1) {Node 1};         \node[role] (n2) [below left=of n1] {Node 2};         \node[role] (n3) [below right=of n1] {Node 3};         \node[role] (n4) [below right=of n2] {Node 4};         % connections         \graph [use existing nodes] {             n1 ->[hv coll] n3 ->[vh coll] n4;             n1 ->[hv coll] n2 -> ["label" near end,font=\tiny] n3;             n2 ->[vh coll] n4;         };     \end{tikzpicture}          \end{document}      Here the edges are all equal. I'd like to have edges similar to the UML edges: composition, association, inheritance and own other edges. What I tried between nodes `n1` and `n3` is the following: `n1 {diamond}->[hv coll] n3` But here I get this error: `No shape named n1 {diamond} is known` Furthermore I'd like to know how to define such edges in `\tikzset` so that I could use a defined edge name (such as e.g. `comp` for the composition edge). Then I need to define the font for edge labels, too, because it must be avoided to repeat the specification `near end,font=\tiny` (seen for the label between nodes `n2` and `n3`) for each and every edge. That was the first part of my question regarding edge types. Then I'd like to know if TikZ has an inheritance concept. For example: the style `hv` is meant to draw edges first horizontal and then vertical. Assume a new edge type `comp`, how can I define something like `hv comp` without copying/merging the separate definitions (`hv`and `comp`)? This question is interesting, too, in general. So, e.g., can node types inherit from other node types.


title: Stitch differently-sized pages together

text: I am producing the cover of a journal in LaTeX. I have separate files for the frontcover, backcover and spine. I would like to combine these into a single seamless PDF that has the height of an A5 sheet of paper but width (2*A5width+1cm) (the spine is 1cm wide). I have tried using `pdfpages`, but it adds space around the spine as though it was an A5 sheet:               \documentclass{article}     \usepackage{pdfpages}     \usepackage[a5paper,margin=0.7in]{geometry}     %\usepackage{}% A local style file for this specific journal; I don't think the other packages are relevant.          \geometry{paperwidth={2\paperwidth+1cm}}     \begin{document}          \includepdfmerge[nup=3x1]{backcover,spine,frontcover}          \end{document}


title: Typeset an upright ell

text: The `$\ell$` character in math-mode is clearly slanted to match the usual slant of math-mode characters. Is there a way to typeset an upright version, that won't look slanted amid other upright-math-mode characters?


title: matlab2tikz not maintaining subplot dimensions

text: The following Matlab script gives me the two plots of the time series object T204               a1=subplot(3,1,[1,2])     plot(T204)          a2=subplot(3,1,3)     plot(T204)      It looks like this in Matlab: ![enter image description here](http://i.stack.imgur.com/AdvDj.png) Then I use matlab2tikz:               matlab2tikz('TEST.tikz', 'height', '\figureheight', 'width', '\figurewidth','mathmode', 'false');      and I use the following code to implement it in Latex:                     begin{figure}           \centering           \setlength\figureheight{4cm}            \setlength\figurewidth{13cm}           \input{path/TEST.tikz}           \end{figure}       The Latex document then looks like this: ![enter image description here](http://i.stack.imgur.com/1jnXz.png) As you can see the twoo plots have the seem size. Is there a way to fix this without messing with the .tikz-file of every single figure ? I will have to build quite a few figures this way... thanks a lot !


title: Access relative slide number in Beamer

text: Is there a quick way to access the relative slide number in Beamer? I'm trying to simplify the following syntax:               \documentclass{beamer}          \begin{document}     \begin{frame}       $        t = \only<1> 0            \only<2> 1            \only<3> 2       $     \end{frame}     \end{document}


title: How to prevent a beamer block from overlapping with a pspicture?

text: Here is what I have tried but with no success.               \documentclass[10pt,compress,mathserif,smaller,fleqn]{beamer}     \usetheme{Antibes}          \usepackage{pstricks}     \usepackage{color}     \usepackage{listings}     \usepackage{amsthm} % pour les maths     \usepackage{amsmath} %%     \usepackage{amssymb} %%     \usepackage{mathrsfs} %%     \usepackage[utf8]{inputenc}          \setbeamertemplate{navigation symbols}{}          \begin{document}          \section*{Table des matières}     \frame{\tableofcontents}          \section{Architecture du syst\`eme}     \subsection{Deux types d'architectures}     \frame{     \begin{columns}         \begin{column}{0.45\textwidth}             \begin{minipage}{\textwidth}                 \begin{block}{L'architecture centralis\'ee}                     Le principe d'une \alert{architecture centralis\'ee} repose sur un serveur auquel se connecte tous les clients.                 \end{block}                 \input{client-server.tex}             \end{minipage}%         \end{column}         \begin{column}{0.45\textwidth}             \begin{minipage}{\textwidth}                 \begin{block}{L'architecture d\'ecentralis\'ee}                     Dans une \alert{architecture d\'ecentralis\'ee} chaque n\oe ud du r\'eseau est \`a la fois client et \`a la fois serveur.                 \end{block}             \end{minipage}%         \end{column}     \end{columns}     }     \end{document}      The image overlaps with the first block and the second block is a bit below the first. What I wanted to do was to have two definitions with a schema centered below each definition. But I could not manage to do it. I would be very glad if someone can explain me how to do it. Here is the code in the file client-server.tex


title: Height of a tabular cell & bounding boxes

text: Is it possible to calculate the height of a `tabular` cell to be reused as a value for vertical offset of the bounding box, similarly to how `Hy@raisedlink` takes you one line above of where the actual `hypertarget` is declared?               \documentclass{article}      \usepackage{marginnote}     \usepackage{pgfplots}     \usepackage{pbox}     \usepackage[heightrounded]{geometry}     \usepackage[toc,titletoc,page]{appendix}          % User-defined colors     \definecolor{dgreen}{RGB}{0,100,0}     \definecolor{violet}{RGB}{238,130,238}          % Cross-references     \usepackage[pageanchor]{hyperref}     \hypersetup{colorlinks=true,             linkcolor=red,             hypertexnames=false,             pdfhighlight=/N,             pdfstartview={XYZ null null 1.00}             }%     \makeatletter     \newcommand{\target}[1]{\Hy@raisedlink{\hypertarget{#1}{}}}     \makeatother % Fancier cross-referencing to text          \begin{document}          \subsection{I can see the sun}          \subsubsection{Many large aircraft}          \marginnote{\linebreak\linebreak\linebreak\hyperlink{hist}{Appendix \texttt{hist()} $\rightarrow$}}[-.5cm]          xxxxxxxxxxxx          \subsubsection{Computations}          \newpage     \begin{appendices}          \section{\textbf{\textcolor{blue}{R}abooF}}          \noindent Fooba\textcolor{blue}{\textbf{R}}.          \noindent \begin{tabular}[h]{l l l c c}      \\     \textcolor{blue}{\textbf{R}} code & Syntax & xatnyS & Vecto\textbf{\textcolor{blue}{R}} & xxxxxxxxxxx\\     \\     \hline     \\     \texttt{hist()} & \pbox{20cm}{\vspace*{1.5ex} \texttt{\textcolor{blue}{hist(}\textcolor{cyan}{<z>},} \\ \vspace{1.25ex} \\  \texttt{\textcolor{dgreen}{breaks=}\textcolor{red}{<y>},} \\ \\ \vspace{3.5ex} \\ \texttt{\textcolor{violet}{freq=}\textcolor{purple}{<x>}\textcolor{blue}{)}} \\ \\} & \pbox{3.5cm}{Positronic tales \\ \hypertarget{appendix.rcommand.breaks}{}\vspace{0ex} \\ My reckoning \\ \\ \texttt{\textcolor{purple}{TRUE}}: truly a wondrous appearance \texttt{\textcolor{purple}{FALSE}}: connect to your inner self\target{hist}} & & $\leftarrow$ \\     \end{tabular}     \end{appendices}     \newpage          xxxxxxxxxxxx          \end{document}


title: Emacs keyboard shortcut to insert \label{} \\ and a new line in math mode.

text: So, I'm using emacs with auctex to edit my latex documents. It's been a while since last time I used it, but I still remember my shortcuts. Except one. While editing equations inside and align environment, you have to add `\\\` at the end of each line, and add a label if you want reference that line specifically. I remember that emacs had a keyboard shorcut for that. You would use the shorcut and emacs automatically added `\label{numer} \\\` followed by a line break. What shortcut is that? I tried `Alt`+`Enter`, but that simply inserts a new line followed by a `\item`. EDIT: Seems that C-c-( key should be doing the trick, but it just inserts a label for me. I got both auctex and emacs from the repositories. My emacs version is 32.1.1. If I use C-h a and type in "LaTeX-amsmath-env-alignat" (or even just "amsmath") it doesn't find any matches, so I guess it's not defined. The major/minor modes I use for editing latex documents are "LaTeX/S Ref".


title: TikZ tree beside table

text: I would like to place a TikZ tree beside a table. The document type is apa. So the tree has four branches and therefore I want to place a 4 x 6 table to the left of the tree. The height of the branches shall match the heigth of the rows. Here is my code.               \documentclass[doc,apacite]{apa}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          %%%%Tikz%%%%%%     \usepackage{tikz}     \usetikzlibrary{trees}     %%%%%%%%%%%%%%          %%%%Table%%%%%     \usepackage{ctable} % needed for \cmidrule{}     \usepackage{multirow} % needed for \multirow{}     %%%%%%%%%%%%%          \begin{document}            \begin{minipage}[t]{150pt}              % Overall layout of the tree         \tikzstyle{level 1}=[level distance=2.0cm, sibling distance=3.5cm]         \tikzstyle{level 2}=[level distance=3.0cm, sibling distance=3.0cm]         \tikzstyle{level 3}=[level distance=3.0cm, sibling distance=3.0cm]              % Styles for bags and leafs         \tikzstyle{bag} = [text width=4em, text centered]         \tikzstyle{end} = [circle, minimum width=3pt,fill, inner sep=0pt]              \begin{tikzpicture}[grow=right, sloped]         \node{}             child {                 node{U2}                             child {                         node[label=right:                             ]{D2} {}                                 child {node[end, label=right:                                 {R1}] {}                                 edge from parent                                 node[above] {$1-R$}                                 node[below]  {}}                                 child {node[end, label=right:                                 {R2}] {}                                 edge from parent                                 node[above] {$R$}                                 node[below]  {}}                         edge from parent                         node[above] {$1-D$}                         node[below]  {}                     }                     child {                         node[end, label=right:                             {D1}] {}                         edge from parent                         node[above] {$D$}                         node[below]  {}                     }                     edge from parent                      node[above] {}                     node[below]  {$1-u$}             }             child {                 node{U1}                             child{                         node[end, label=right:                             {$T$}] {}                         edge from parent                         node[above] {}                         node[below]  {}                     }                 edge from parent                              node[above] {$u$}                     node[below]  {}             };         \end{tikzpicture}              \end{minipage}              \hfill         \begin{minipage}[t]{150pt}              %\begin{table}[h]         \begin{tabular}{|l|l|l|l|l|l|l|}          &  &  &  &  &  & \\ \hline          &  &  &  &  &  & \\ \hline          &  &  &  &  &  & \\ \hline          &  &  &  &  &  &          \end{tabular}         %\end{table}              \end{minipage}          \end{document}      I hope someone can help my. I have spent hours with it.


title: French babel trouble: 1\ier{}, 2\ieme{}, etc

text: I'm having an issue with French babel. Whenever I use any of the 1`\ier{}`, 2`\ieme{}` and so on constructs (to obtain 1er, 2e, etc.), the spacing following it behaves very strangely. So, for example, if I use:   * `1\ier asdf` then the output in the PDF will be: "1erasdf" (notice the missing space between "er" and "asdf")   * `1\ier~asdf` then the output in the PDF will be: "1er asdf" (with a protected space in between)   * `1\ier~ asdf` then the output in the PDF will be: "1er asdf" (there are **two** spaces between "er" and "asdf", one protected and one normal; can't display properly here because of SE formatting limitations) I don't want to use `~` every time I need these constructs (2nd and 3rd examples above), so my **question** : Is the first example above a bug or a user error? And what is the proper way to avoid such output glitches? I'm using TeX Live 2009 on Ubuntu 12.04 (with LyX).


title: Placing a tikzpicture next to an align

text: I have a `tikzpicture` with an accompanying explanation in a math `align` environment. The `tikzpicture` is small enough that I'd like the explanation to appear next to (specifically, to the right) the `tikzpicture`. Here's the code that I have:               \begin{center}     \begin{tikzpicture}[xscale=.5, yscale=.5]     \draw [->,thick] (0,0) --(3,4) node [right] {$\bar{u}$};     \draw [->,thick] (0,0) --(5,0) node [below] {$\bar{v}$};     \draw [->,thick] (0,0) --(0,4) node [left] {$\bar{w}$};     \draw [->,thick] (0,0) --(3,0) node [below] {$Pr_{\bar{v}}\bar{u}$};     \draw [dashed] (3,0) --(3,4);     \draw [thin] (2.5,0) --(2.5,.5) --(3,.5);     \end{tikzpicture}     \end{center}          \begin{align*}     Pr_{\bar{v}}\bar{u} &= \frac{\langle\bar{u},\bar{v}\rangle}{\langle\bar{v},\bar{v}\rangle}\bar{v} = \lambda\bar{v} \\     \bar{w}+Pr_{\bar{v}}\bar{u} &= \bar{u}\\     \bar{w} &= \bar{u}-Pr_{\bar{v}}\bar{u} \\     \bar{w} &= \bar{u}-\lambda\bar{v}     \end{align*}      I attempted to use `minipage`, `multicols`, and `wrapfig` but none produced a desirable result. This was probably due to user error since I'm pretty new at this. It'd be helpful if someone were able to produce something close to a standard to solve this problem (if one exists). ![enter image description here](http://i.stack.imgur.com/tB9Hm.png)


title: Grouped BarChart

text: I would like to have all 4 graphs on one page (one panel) by using minipage. Also is it possible that I can have my graphs standing vertical instead of horizontal? Thank you.               \documentclass{article}     \usepackage{pgfplots,float,amsmath,caption}     \begin{document}     \begin{figure}[H]     \centering     \resizebox{13cm}{!}{%     \begin{tikzpicture}%[font=\normalsize]     \begin{axis}     [xbar,width=22cm,height=12cm,bar width=20pt,enlargelimits=0.20,     nodes near coords,     nodes near coords align=horizontal,      %xmajorgrids = true,     point meta=x * 1, % The displayed number.     xlabel={\textbf{Percentage of Cost}},     tick align=outside,     xtick={0,5,...,100},      ytick={1,...,5},     yticklabels={Penalty Cost, Fixed Cost, Operating and Maintenance Cost, Purchase Cost}]     %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \addplot[draw=red,fill=red!50]     coordinates {(0,1) (4.1,2) (16.8,3) (54.4,4)};     \addlegendentry{\text{MRI Scanning Machine}}          %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \addplot[draw=blue, fill=blue!50]      coordinates {(14.5,1) (4.6,2) (1.3,3) (4.3,4)};     \addlegendentry{\text{CT Scanning Machine}}          %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \end{axis}     \end{tikzpicture}     }     \captionsetup{font={footnotesize}}     \caption{Cost Analysis for No Technological Change and No Deterioration} \label{Fig: 3}     \end{figure}     %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \begin{figure}[H]     \centering     \resizebox{13cm}{!}{%     \begin{tikzpicture}%[font=\normalsize]     \begin{axis}     [xbar,width=22cm,height=12cm,bar width=20pt,enlargelimits=0.20,     nodes near coords,     nodes near coords align=horizontal,     point meta=x * 1, % The displayed number.     xlabel={\textbf{Percentage of Cost}},     tick align=outside,     xtick={0,5,...,100},      ytick={1,...,5},     yticklabels={Penalty Cost, Fixed Cost, Operating and Maintenance Cost, Purchase Cost}]     %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \addplot[draw=red,fill=red!50]     coordinates {(26.9,1) (3.5,2) (9.0,3) (34.4,4)};     \addlegendentry{\text{MRI Scanning Machine}}          %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \addplot[draw=blue, fill=blue!50]      coordinates {(18.6,1) (3.3,2) (0.9,3) (3.4,4)};     \addlegendentry{\text{CT Scanning Machine}}          %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \end{axis}     \end{tikzpicture}     }     \captionsetup{font={footnotesize}}     \caption{Cost Analysis for 10\%~Deterioration and No Technological Change} \label{Fig: 4}     \end{figure}          %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------          \begin{figure}[H]     \centering     \resizebox{13cm}{!}{%     \begin{tikzpicture}%[font=\normalsize]     \begin{axis}     [xbar,width=22cm,height=12cm,bar width=20pt,enlargelimits=0.20,     nodes near coords,     nodes near coords align=horizontal,     point meta=x * 1, % The displayed number.     xlabel={\textbf{Percentage of Cost}},     tick align=outside,     xtick={0,5,...,100},      ytick={1,...,5},     yticklabels={Penalty Cost, Fixed Cost, Operating and Maintenance Cost, Purchase Cost}]     %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \addplot[draw=red,fill=red!50]     coordinates {(0.0,1) (11.5,2) (22.3,3) (60.8,4)};     \addlegendentry{\text{MRI Scanning Machine}}          %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \addplot[draw=blue, fill=blue!50]      coordinates {(0.0,1) (1.2,2) (2.3,3) (1.9,4)};     \addlegendentry{\text{CT Scanning Machine}}          %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \end{axis}     \end{tikzpicture}     }     \captionsetup{font={footnotesize}}     \caption{Cost Analysis for 10\%~Technological Change and 10\%~Deterioration} \label{Fig: 5}     \end{figure}          %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \begin{figure}[H]     \centering     \resizebox{13cm}{!}{%     \begin{tikzpicture}%[font=\normalsize]     \begin{axis}     [xbar,width=22cm,height=12cm,bar width=20pt,enlargelimits=0.20,     nodes near coords,     nodes near coords align=horizontal,     point meta=x * 1, % The displayed number.     xlabel={\textbf{Percentage of Cost}},     tick align=outside,     xtick={0,5,...,100},      ytick={1,...,5},     yticklabels={Penalty Cost, Fixed Cost, Operating and Maintenance Cost, Purchase Cost}]     %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \addplot[draw=red,fill=red!50]     coordinates {(0.0,1) (9.8,2) (31.6,3) (49.6,4)};     \addlegendentry{\text{MRI Scanning Machine}}          %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \addplot[draw=blue, fill=blue!50]      coordinates {(0.0,1) (2.6,2) (1.8,3) (4.6,4)};     \addlegendentry{\text{CT Scanning Machine}}          %-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     \end{axis}     \end{tikzpicture}     }     \captionsetup{font={footnotesize}}     \caption{Cost Analysis for 10\%~Technological Change and Deterioration} \label{Fig: 6}     \end{figure}     \end{document}


title: Todonotes: group list-of-todos by section

text: This is a follow up question to group list-of-todos by chapter. egreg's solution works great with `classicthesis` and `scrreprt`, and I've been trying to do the same without `classicthesis` and for `scrartcl`, i.e. add group the list of todos by section. The code below is directly based on egreg's code and almost works, although it always adds the title of the last section as well, even when there is no todonote. So this is the first thing I need help fixing, and secondly there is probably an easier way to do this rather than using code based on `classicthesis`. I'm not wed to `tocloft`, but I quite like it for customisations (which are not in this MWE).               \documentclass{scrartcl}          \usepackage{todonotes,tocloft,xpatch,hyperref}          % This is based on classicthesis chapter definition     \let\oldsec=\section     \renewcommand*{\section}{\secdef{\Sec}{\SecS}}     \newcommand\SecS[1]{\oldsec*{#1}}%     \newcommand\Sec[2][]{\oldsec[\texorpdfstring{#1}{#1}]{#2}}%          % http://tex.stackexchange.com/a/61267/11984     \makeatletter     \xapptocmd{\Sec}{\addtocontents{tdo}{\protect\todoline{\thesection}{#1}{}}}{}{}     \newcommand{\todoline}[1]{\@ifnextchar\Endoftdo{}{\@todoline{#1}}}     \newcommand{\@todoline}[3]{%       \@ifnextchar\todoline         {}         {\contentsline{section}{\numberline{#1}#2}{#3}{}{}}%     }     \let\l@todo\l@subsection     \newcommand{\Endoftdo}{}          \AtEndDocument{\addtocontents{tdo}{\string\Endoftdo}}     \makeatother               \begin{document}     \listoftodos          \tableofcontents          \section{My first Section}\todo{Section 1 note}     \subsection{A first Subsection}     \subsubsection{A first subsubsection}\todo{Section 1, section 1, subsection note}     \subsection{Another subsection}\todo{Section 1, section 1, subsection note 2}     \section{My second Section}     \subsection{Another subsection}\todo{Section 2, subsection 1 note}     \subsection{Another subsection}\todo{Section 2, subsection 2 note}     \section{A section without notes}     \subsection{A subsection without notes}     \subsubsection{A subsubsection without notes}     \end{document}      ![enter image description here](http://i.stack.imgur.com/r8oQn.png)


title: Do footnotes help or hinder readability?

text: When I read a text the first time, I usually also read all the footnotes, since they may be important to understanding. This interrupts my reading flow, and I think simple parentheses would have been easier. With footnotes, you can simply ignore them if you already know them very easily, but I am not really sure if ignoring parentheses is that hard either. What is a general rule for parentheses and footnotes?


title: How create this flowchart?

text: I want create this flowchart. Please help me. ![enter image description here](http://i.stack.imgur.com/Avckm.jpg)


title: How can I access the depth of a given sectioning command?

text: In the LaTeX Wikibook, we can see a table that gives the depths of the sectioning commands: part: -1   chapter: 0   section: 1   subsection: 2 etc. Is there any way to access this information dynamically through either LaTeX2e or L3? Maybe something like               \section_depth { section } :=> 1      * * * ### EDIT From what Marco said in the comments, this information may be useful:               $ texdef --tex latex @startsection          \@startsection:     macro:#1#2#3#4#5#6->\if@noskipsec \leavevmode \fi \par \@tempskipa #4\relax      \@afterindenttrue \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse \fi      \if@nobreak \everypar {}\else \addpenalty \@secpenalty \addvspace \@tempskipa \fi \@ifstar      {\@ssect {#3}{#4}{#5}{#6}}{\@dblarg {\@sect {#1}{#2}{#3}{#4}{#5}{#6}}}


title: Stacking plots in animation using fill between library (with dynamic calculation of intersection segments?)

text: As a followup question to Filling the area under a graph based on intersection with another graph, I'm looking to create the following effect:   * Fill based on the coordinates of the intersection between the two graphs.   * Plots stacked, so area under the `normal`-curve, but between the two graphs (under `normal` but above `skew`) should be `cyan!20`. The area under the other curve should be `green!20`.   * None of those graphical anomalies... problem is though, that the first intersection of the graph disappears within the animation and the `intersection segments` key is completely static (it will _always_ use the n-th intersection of the n-th path, bugger!). I've fiddled around with the `domain` key, but I'm getting very underwhelming results. :-( The intended result I can only reproduce at specific points, not for the entire animation: ![http://i.imgur.com/gvvNzc4.png?1](http://i.stack.imgur.com/0S7zB.png) Christian Feuersänger suspects a bug, so I've moved the original animation code downward.               \documentclass{article}     \usepackage{tikz,pgfplots}     \pgfplotsset{compat=newest}     \usepgfplotslibrary{fillbetween}     \usetikzlibrary{intersections}     \usepackage{animate}     \pgfmathdeclarefunction{normal}{2}{%       \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%     }     \makeatletter     \pgfmathdeclarefunction{erf}{1}{%       \begingroup         \pgfmathparse{#1 > 0 ? 1 : -1}%         \edef\sign{\pgfmathresult}%         \pgfmathparse{abs(#1)}%         \edef\x{\pgfmathresult}%         \pgfmathparse{1/(1+0.3275911*\x)}%         \edef\t{\pgfmathresult}%         \pgfmathparse{%           1 - (((((1.061405429*\t -1.453152027)*\t) + 1.421413741)*\t            -0.284496736)*\t + 0.254829592)*\t*exp(-(\x*\x))}%         \edef\y{\pgfmathresult}%         \pgfmathparse{(\sign)*\y}%         \pgfmath@smuggleone\pgfmathresult%       \endgroup     }     \makeatother     \pgfmathdeclarefunction{skew}{3}{%             \pgfmathparse{(exp(-((x-#1)^2)/(2*(#2)^2))*((erf((#3*(x-#1))/(sqrt(2)*#2)))+1))/(sqrt(2*pi)*#2)}%     }     \begin{document}     \begin{tikzpicture}     \begin{axis}[           hide y axis,           axis lines*=center,            axis on top,           no markers,            domain=-1:18,            samples=20,           xlabel=\empty,            ylabel=\empty,           every axis x label/.style={at=(current axis.right of origin),anchor=west},           every axis y label/.style={at=(current axis.above origin),anchor=south},           height=5cm, width=12cm,           xmin = -1, xmax=18,           xtick=, ytick=\empty,           enlargelimits=false,            clip=false       ]       \addplot [name path=normal,very thick,cyan!85!black!50] {normal(10,3.416969)};       \addplot [name path=skew,very thick,red!85!black!50] {skew(1,4,10)};       \path [name path=lower, name intersections={of=skew and normal}, intersection segments={of=skew and normal,sequence=B1 -- A2}];       \path[name path=axis]     (axis cs:\pgfkeysvalueof{/pgfplots/xmin},0) --     (axis cs:\pgfkeysvalueof{/pgfplots/xmax},0);       \addplot [draw=green!80,fill=green!20] fill between [of=lower and axis, soft clip={(intersection-2) rectangle (axis cs:\pgfkeysvalueof{/pgfplots/xmax},0)}];     \end{axis}     \end{tikzpicture}     \end{document}      * * * * * * * * *               \documentclass{article}     \usepackage{tikz,pgfplots}     \pgfplotsset{compat=newest}     \usepgfplotslibrary{fillbetween}     \usetikzlibrary{intersections}     %\usetikzlibrary{calc}     \usepackage{animate}     %\usepackage{fp}     \pgfmathdeclarefunction{normal}{2}{%       \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%     }     \makeatletter     \pgfmathdeclarefunction{erf}{1}{%       \begingroup         \pgfmathparse{#1 > 0 ? 1 : -1}%         \edef\sign{\pgfmathresult}%         \pgfmathparse{abs(#1)}%         \edef\x{\pgfmathresult}%         \pgfmathparse{1/(1+0.3275911*\x)}%         \edef\t{\pgfmathresult}%         \pgfmathparse{%           1 - (((((1.061405429*\t -1.453152027)*\t) + 1.421413741)*\t            -0.284496736)*\t + 0.254829592)*\t*exp(-(\x*\x))}%         \edef\y{\pgfmathresult}%         \pgfmathparse{(\sign)*\y}%         \pgfmath@smuggleone\pgfmathresult%       \endgroup     }     \makeatother     \pgfmathdeclarefunction{skew}{3}{%             \pgfmathparse{(exp(-((x-#1)^2)/(2*(#2)^2))*((erf((#3*(x-#1))/(sqrt(2)*#2)))+1))/(sqrt(2*pi)*#2)}%     }     \newcommand*{\power}[1]{     \begin{tikzpicture}     \begin{axis}[           hide y axis,           axis lines*=center,            axis on top,           no markers,            domain=-1:18,            samples=20,           xlabel=\empty,            ylabel=\empty,           every axis x label/.style={at=(current axis.right of origin),anchor=west},           every axis y label/.style={at=(current axis.above origin),anchor=south},           height=5cm, width=12cm,           xmin = -1, xmax=18,           xtick=, ytick=\empty,           enlargelimits=false,            clip=false       ]       \addplot [name path=normal,very thick,cyan!85!black!50] {normal(0.125*#1,3.416969)};       \addplot [name path=skew,very thick,red!85!black!50] {skew(1,4,10)};       \path [name path=lower, name intersections={of=skew and normal}, intersection segments={of=skew and normal,sequence=B1 -- A2}];       \path[name path=axis]     (axis cs:\pgfkeysvalueof{/pgfplots/xmin},0) --     (axis cs:\pgfkeysvalueof{/pgfplots/xmax},0);       \addplot [draw=cyan!80,fill=cyan!20, stack plots=y] fill between [of=normal and skew,domain=(intersection-2):\pgfkeysvalueof{/pgfplots/xmax}] ;       \addplot [draw=green!80,fill=green!20, stack plots=y] fill between [of=lower and axis, soft clip={(intersection-2) rectangle (axis cs:\pgfkeysvalueof{/pgfplots/xmax},0)}];     \end{axis}     \end{tikzpicture}     }     \begin{document}     \begin{animateinline}[controls,loop,palindrome]{32}       \multiframe{94}{ik=32+1}{         \power{\ik}         }         \end{animateinline}     \end{document}


title: How to list and navigate to tables in Texstudio

text: Is there an option of navigating to tables from the "structure" list in Texstudio. In LED, which I used before, there was a similar structure list with all figures and tables listed under the name of section. I now that in Texstudio I can navigate by labels, but as all labels are listed together, it is not very convenient. Kuba


title: Bibliography style changed when changed computer

text: I'm writing a book. I recently changed computer, I installed TexShop and the MacTex distribution (just like in the other computer). I use the same set of folders to run the source file from the same external HDD, which contains the same agu08.bst file. Everything runs smoothly, like if I didn't change computers, but one thing: citation style has changed. Instad of [ _Name et al._ , 2000; _OtherName_ , 2005] now it shows [Number1;Number2]. Ideas? Example below:               \usepackage[square,authoryear]{natbib}     \bibpunct{[}{]}{;}{a}{,}{,~}          \begin{document}          \citep{citation1,citation2}          \phantomsection     \addcontentsline{toc}{chapter}{Bibliography}     \bibliographystyle{agu08}     \bibliography{./thebiblio}          \end{document}      Thanks!


title: Enumerating listings in LaTeX breaks the list

text: Why is enumerating listings in LaTeX causing numbers in the list to be displayed in the wrong place? The following code prints the first and third list numbers in the correct place, but prints the second list number in the same place as the third and doesn't print the fourth at all.               \documentclass[titlepage]{article}     \usepackage{listings}     \begin{document}     \begin{enumerate}     \item     \begin{lstlisting}     SELECT * FROM foo;     \end{lstlisting}     \item     \begin{lstlisting}     SELECT * FROM bar;     \end{lstlisting}     \item     \begin{lstlisting}     SELECT * FROM foobar;     \end{lstlisting}     \item     \begin{lstlisting}     SELECT * FROM barfoo;     \end{lstlisting}     \end{enumerate}     \end{document}


title: What are the consideration when choosing either newcommand or newenvironment?

text: The first time I learnt LaTeX, I thought `\newcommand` properly fits for inline mode and `\newenvironment` for displayed mode. Later I noticed it is not correct. So the question is What is the rule of thumb when deciding whether we should use one over the other one?


title: simple process synchronization diagram

text: I've drawn a few process synchronization diagrams in OpenOffice but I would like a more elegant solution than that. What I'm trying to create is a process synchronization diagram like the one in the following picture. I've browsed texample.net, but couldn't find anything close to what I want to do. Can somebody share his/her wisdom with me? ![CBCAST](http://i.stack.imgur.com/mvCbX.jpg)


title: Problem with animate package and PSTricks

text: For some reason I haven't been able to discern yet, the code appended below returns the error message `\begin{pspicture} on input line [...] ended by \end{animateinline` when I try to compile over `pdfLaTeX`:               \documentclass{memoir}          \usepackage{xifthen,ifpdf,ifxetex}     \usepackage[pdfcrop = { --hires }]{auto-pst-pdf}          \ifpdf     \else\usepackage{pstricks}     \fi          \usepackage{animate}          \begin{document}     \psset{xunit = 1cm, yunit = 1cm}     \begin{animateinline}[%       begin = {\begin{pspicture}(0,0)(1,1)},       end = {\end{pspicture}}%     ]{2}      \psline(0,0)(0.5,0.5)     \newframe*     \psline(0,0)(1,1)     \end{animateinline}     \end{document}      Anyone replicates this behavior or hints at what is wrong in my code? I'm on Windows Xp and MikTeX 2.9. In all those cases where I have been using the `animate` package without a `pspicture` environment, I had no trouble at all.


title: What is the cause of the error "Package keyval Error: orientation undefined"

text: When I try to compile the following code on Windows using MikTeX and TexWorks, I get the error "Package keyval Error: orientation undefined". I understand that it is referring to line 69, which has a `\end{frame}`. What I do not know is why is this LaTeX code not compiling on Texworks on Windows XP? It works on Kile on an Ubuntu box. * * *               \documentclass[12pt]{beamer}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}     % \usepackage{beamerthemebars}     % \usetheme{Berkeley}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{caption}     \usepackage{multicol}     \usepackage{rotating}     \usepackage{fontenc}     \usepackage{graphicx}     \usepackage{geometry}     \usepackage{fancybox}     \usepackage{empheq}     \usepackage{tikz} % for pictures and text as overlay     \usepackage{pgfpages}     % \usepackage{collect}     % \setbeameroption{show notes on second}               \title{EEE C383 Communication Systems}          \author{Ananth Saradhi}                    \AtBeginSection     {         \begin{frame}{Review of Previous Class}         \end{frame}              \begin{frame}         \date{\today}            \frametitle{Where are We ?}            \tableofcontents[currentsection]         \end{frame}              \begin{frame}         \begin{center}             \usebeamerfont{section title}\insertsection             \date{\today}             \author{Ananth Saradhi}         \end{center}              \end{frame}          }          \usebackgroundtemplate{\includegraphics[width=1.0\paperwidth,height = 1.0     \paperheight, orientation= landscape]{lecture_template.pdf}}               \includeonly{lecture - 3}          \begin{document}     \beamerdefaultoverlayspecification{<+->} % adds pause after every ``item``          \setbeamertemplate{frametitle}[default][center]                    \begin{frame}{Introduction}               \end{frame} % This is line 69.....               \begin{frame}{History of Electronic Communication}      %insert timeline from timetoast.com               \end{frame}                    \begin{frame}{Communication system}      % Insert three block diagram of a comunication  system           \begin{itemize}       \item Information       \item Source       \item Channel       \item Destination      \end{itemize}          \end{frame}          \end{document}      * * * Errors: * * *               lectures.tex     69     Package keyval Error: orientation undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.69 \end{frame}


title: How to typeset an independent and identical normal distribution (iidN) in LaTex?

text: Is there an elegant way of writing "iidN()" in LaTex, other than just writing it "iidN()"? That is, is there a macro for "iid" and/or for normal distribution "N" symbols?


title: the space between the section title and the page margin is too much

text: I face a large space between the start edge of the page and the section, please forgive me as I am new user for Latex. The problem is the distance from the paper's edge to the text body is too large


title: Macro that inserts arguments into an environment

text: I'm having a bit of an issue trying to get a piece of code up and running. I'm working on extending python.sty file for embedding python into a LaTex document (adding persistent data and the ability to pass the results of LaTex commands to Python). At the high level, this style file provides functions that let you do:               \begin{python}     print r"Raw output, goes right into the Tex file."     \end{python}      I'm looking to make a simple function that allows passing data from Tex/Latex to the body of that python code but I'm running into real fun times with fragility issues. Foolishly, I assumed that something along these lines would work:               \xdef\internalSetPythonVariable#1#2{\PythonPersistenceInternalName["#1"] = r"#2"}     \xdef\setPythonVariable#1#2{\begin{python}\internalSetPythonVariable{#1}{#2}\end{python}}      Clearly, that one wouldn't work because the python environment messes with all the commands inside- so that was out. But I thought, "Fine, I'll just make sure that the stuff inside the python environment is all text by the time we even START that stupid environment." So I tried something like this:               \xdef\internalSetPythonVariable#1#2{\PythonPersistenceInternalName["#1"] = r"#2"}     \xdef\setPythonVariable#1#2{\expandafter\begin{python}\internalSetPythonVariable{#1}{#2}\end{python}}      However, the expandafter doesn't seem to want to work on the \begin stuff and now I'm a bit stuck. I keep getting the ever-so-helpful "! Argument of \reserved@a has an extra }" error. In general, I think this is a fairly simple issue in concept: I want to be able to evaluate everything inside an environment to text before the environment ever starts. To note, there don't seem to be many other ways to accomplish this. By the time the environment is running in full gear, it's treating everything as fully text-only (no macros, no anything). Additionally, since I'm using these functions to read/write variables, I need them to be one-liners that take arguments. And it would seem rather silly to have to make a whole new environment that accepts optional params just for this purpose. So does anybody know how to get those args fully expanded before things start? I've tried fiddling with it like crazy and gotten nowhere. With that said, if I can accomplish this- I'm hoping avoid having to ever do mundane junk with TeX again (see: conditionals, loops, non-typesetting macros).


title: \pounds and \textsterling produces a dollar sign?

text: I'm just trying to put a "£" sign in my document, but I can't get it to work. My packages:               \usepackage[math]{iwona}              \usepackage{amsmath,amsfonts}     \usepackage{graphicx}     \usepackage{algorithm,algorithmic}     \usepackage{xspace}     \usepackage{subfigure}     \usepackage{url}     \usepackage{lscape}     \usepackage{listings}      `\pounds` and `\textsterling` both produce a dollar sign ("$"). I'm using `pdflatex`.


title: Derivatives: enter "evaluated at" vertical bar with multiple values as subscripts

text: Sorry for the long title, but how do I enter evaluated at (for a derivative), with multiple valuation criteria at the bottom of the the big `|` line? Thanks!


title: Why is LyX not allowing numbered chapters in my book?

text: LyX v2.0.6 on Linux. Document class is `book` (extra font sizes). **Scenario** I have a master document including two child documents (so far), both of which are the same document class as the master. The first child has some non- numbered chapters (chapter*). The second child document begins with Part I, after which I want to begin numbered chapters. I begin a new paragraph (hit Return) and select Chapter from the style drop- down. I get a big bold "Chapter 1". So far, so good. **Problem** Almost anything I do after that makes the Chapter heading disappear. For example, I pasted in text for the first paragraph of the chapter but it appeared in Chapter style. Changing it to Standard made the chapter heading disappear. Then I inserted another line above the paragraph and changed that to a chapter. Then, when I press the down arrow to continue editing my text, the heading disappears again. **My question** How can I have a book that consists of Parts with numbered chapters in LyX? **Update** The chapters stay if they have a non-empty name. I don't really want to name them, but it seems I can use a hard space (ctrl+space). Am I thereby Doing It Wrong, or is this an appropriate workaround for the situation?


title: Font issue with overline in equation

text: I have the following code, which produces different font sizes, when an `overbar` is included to the variables.               \documentclass[11pt]{article}     \begin{document}     \begin{eqnarray*}     \vec{x}=\frac{\bar{\vec{x}}}{\bar{L}}     & t = \frac{\bar{t}}{\bar{L}/\bar{a}_0}     \end{eqnarray*}     \end{document}      The result is ![enter image description here](http://i.stack.imgur.com/aHSXG.png) How to maintain uniform fontsize for variable `t` even with `overbar`?


title: Bug in the parencite command of the biblatex-chicago package?

text: I want to use the package `biblatex-chicago` for citations. I have a file with the following content:               \documentclass[11pt]{report}     \usepackage[authordate,backend=biber]{biblatex-chicago}     \bibliography{myBibliography}     \begin{document}     \noindent     \textcite{doe:2013}\\     \parencite[see][p.\ 2]{doe:2013}     \printbibliography     \end{document}      This is the content of the file `myBibliography.bib`:               @article{doe:2013,      author               = {Doe, John},      month                = {5},      title                = {The Title},      yournaltitle         = {The Journal},      year                 = {2013},      }      Typesetting yields > Doe (2013)   >  (seep. 2) However, one should get > Doe (2013)   >  (see Doe 2013, p. 2) Can anybody reproduce this result? Is this due to a bug in the `biblatex-chicago` package?


title: Countability of the rationals: a pictorial diagram

text: I am trying to reproduce the diagram below: ![enter image description here](http://i.stack.imgur.com/YUTzd.png) I'm wondering what I should use to generate this. I can make the matrix, that's simple, but getting the arrows right is what's difficult... It would be interesting to use this example, where the S_{ij}'s are circled nodes, and then some nodes just aren't connected, and the ellipses and the S_i:'s are nodes, but they wouldn't be circled. I'm looking here, and I think this would work too, but I don't yet know how to interpret the (m-i-j) symbolism, or how to connect arrows to nodes. * * * So far, I've got the following: ![enter image description here](http://i.stack.imgur.com/IKPzo.png)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows}     \begin{document}     \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,       thick,main node/.style={circle,fill=blue!20,draw,font=\sffamily\Large\bfseries}]          \node[main node] (1) {$S_{11}$};     \node[main node] (2) [right of=1] {$S_{12}$};     \node[main node] (3) [below of=1] {$S_{21}$};     \node[main node] (4) [below of=3] {$S_{31}$};     \node[main node] (5) [below of=2] {$S_{22}$};     \node[main node] (6) [right of=2] {$S_{13}$};     \node[main node] (7) [right of=6] {$S_{14}$};     \node[main node] (8) [below of=6] {$S_{23}$};     \node[main node] (9) [below of=5] {$S_{32}$};     \node[main node] (10) [below of=4] {$S_{41}$};          \node[main node] (11) [right of=10] {$S_{42}$};     \node[main node] (12) [right of=11] {$S_{43}$};     \node[main node] (13) [right of=12] {$S_{44}$};     \node[main node] (14) [right of=9] {$S_{33}$};     \node[main node] (15) [right of=14] {$S_{34}$};     \node[main node] (16) [right of=8] {$S_{24}$};            \path[every node/.style={font=\sffamily\small}]     (1) edge node [right] {} (2)     (2) edge node [right] {} (3)     (3) edge node [right] {} (4)     (4) edge node [right] {} (5)     (5) edge node [right] {} (6)     (6) edge node [right] {} (7)     (7) edge node [right] {} (8)     (8) edge node [right] {} (9)     (9) edge node [right] {} (10);          \end{tikzpicture}     \end{document}


title: How to use ISO-690-2 format for BibTex?

text: For a thesis (template Easy Thesis) it is required to use ISO 690-2. I would like to use it in connection with `BibTex`. Is there a package, setting or extension to do this? I use English language, so it is no need for special adaptions. Thank you :)


title: Controlling indentation document-wide

text: Being new to LateX (I have been playing around for less than a week), Im looking for an end-all method to format the indentation for an entire document. This would include:   * subsection indentation,   * paragraph indentation (first line and hanging),   * list indentation,   * list item indentation (first line and hanging),   * table indentation,    * float indentation,   * paragraph indentation which includes a wrapped figure/picture, So far I just cant seem to get all of these things to work all at the same time. One method I tried using was encapsulating all my paragraphs in:               {\leftskip=0.3in        first paragraph       second paragraph       list       third paragraph (embedded picture)     }      However that left me unable to indent first lines and lists. Another method I tried was this               \newenvironment{zz}                            {\list{}{\leftmargin=0.3in \rightmargin=0in}%                     \item\relax}                     {\endlist}          begin{zz}       first paragraph       second paragraph       list       third paragraph (imbedded picture)     end{zz}      But now my text flows right over my pictures. (also, if someone could point out why `\list{}` does anything without a `\begin` starting it that would be very handy). the methods I am fiddling with right now feel very crude. Is there a way to declare a global formatting for all paragraphs based upon its "Level of Depth"? Lastly, I cannot find a good resource that is just a reference database of commands, their options, the arguments they take, and how to use/what to use them for. For lack of a better description, something similar to how for java programming, you can find almost anything on http://docs.oracle.com/javase/6/docs/api/java/util/package-summary.html. Help would be greatly appreciated.


title: Section anchors invisible in main body, but visible in table of contents?

text: I'm writing up my PhD thesis using the `memior` class. This thesis starts off by using chapters and sections as one normally would. Later on in the thesis though, I insert many pdfs into this document using `pdfpages`. I want to treat each one of these pdfs as a separate section of a chapter, but I don't want the section titles to appear in the main text, because each time that happens, an ugly page is created between the pdfs which is empty except for the section name. I need to be able to but a `\label` in each of these sections so I can refer to them, and I also want the table of contents to list them with the appropriate section number and correctly link to them. This is similar to a couple of other questions, but in those cases it seems the problem can be solved by simply using `\addcontentsline{toc}{chapter}{#1}` and `\phantomsection`. In my case though, that solution prevents the sections from receiving numbers in the table of contents, and prevents `\label` from assigning each section a unique section number within a chapter.


title: Unexpected interaction between microtype and \parindent

text: The `microtype` package (or more likely the pdfTeX microtypographic extensions) have a strange interaction with `\parindent` that bit me.               \documentclass{article}     \usepackage{microtype}     \begin{document}     0:\vrule\strut\par     1:\vrule\strut\par     \parindent0pt     0:\vrule\strut\par     1:\vrule\strut\par     \microtypesetup{protrusion=false}     0:\vrule\strut\par     1:\vrule\strut\par     \end{document}      ![enter image description here](http://i.stack.imgur.com/TSa4n.png) The colon after the second `1` is typeset slightly to the left of the one after the 0, but only when `microtype`'s protrusion is on and `\parindent` is 0. Indeed, changing the `\parindent` to .00001 pt causes the rules to line up. This seems like a bug to me, but it's possible that I just don't understand what is supposed to happen here. The two work arounds are to either disable protrusion where I need this to line up, or change the `\parindent` to a small, nonzero value. Is there a better option?


title: Citation MWE example doesn't work

text: I have a problem with apa6, apacite, etc. In the process of creating a mwe, I ran across code here on this site as a mwe, but it doesn't work. When compiled (Texpad on a Mac, using Bibtex), it produces [?] as the citation. Here's the code:               \documentclass{article}          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}       @book{Knu86,         author = {Knuth, Donald E.},         year = {1986},         title = {The \TeX book},       }     \end{filecontents}          \begin{document}          Doesn't work. \cite{Knu86}          \bibliography{\jobname}     \end{document}      Thanks for any help on the mwe so I can post my real problem.


title: What symbol should one use for a set complement?

text: What symbol should I use for a set complement? It seems that the `\complement` isn't quite appropriate: it seems taller (perhaps a unary operator to appear before a set?). I guess for now `\mathsf{c}` works.


title: Intersections with border of matrix node

text: Consider the following code:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{matrix,intersections,calc}          \begin{document}          \begin{tikzpicture}        \matrix (m) [matrix of math nodes,row sep={4em,between origins},column sep={5em,between origins},nodes={anchor=base}]{           |[draw,inner sep=5pt,name path=border1]| \frac{A}{B}& E \\           C & D \\ };        \draw[->,name path=line1] (m-1-1.base west) -- (m-2-2.north east);        \fill [name intersections={of=line1 and border1},green] (intersection-1) circle (1.5pt) (intersection-2) circle (1.5pt);        \fill [red] ($(m-1-1.base)+(intersection-1)$) circle (1.5pt) ($(m-1-1.base)+(intersection-2)$) circle (1.5pt);     \end{tikzpicture}          \end{document}      with result: ![result picture](http://imgur.com/RKPcV.png) It aims to find (in green) the intersection of the rectangular border (drawn, and named 'border1') of the top left node (m-1-1) with the only arrow in the diagram. However, as you can see, the intersection points in green do not lie on the border of (m-1-1). Instead, only the shifts of the green points by the point (m-1-1.base), which are drawn in red, do lie on the border. This indicates that the path named 'border1' is not placed on the top left node, but instead placed somewhere at the centre of the whole picture. More precisely, it seems that the actual border of the node (m-1-1) is 'border1' shifted by (m-1-1.base). So a few questions relating to this, and how to solve my problem:   1. Why is 'border1' what it is, instead of being the actual border of (m-1-1)?   2. Is it possible to do something different so as to obtain the actual border of the node (instead of the border shifted to the centre of the picture), in a manner that we can then use it to calculate intersections?   3. Given the path 'border1' (after it has been drawn), how can we create a copy of it which is shifted by (m-1-1.base), which we can then use to compute intersections? (By the way, what if we don't know that the node is anchored at (m-1-1.base)?)


title: Check equality between colors

text: Consider the following: `\colorlet{mycolour1}{black}` AND `\colorlet{mycolour2}{black}` How do I use a command like `\ifthenelse{\equal{mycolour1}{mycolour2}}{TRUE}{FALSE}` In other words, how can I check equality between two colors?


title: How can I make the document as wide as possible in LaTeX

text: I am new to LaTeX and don't know much about it. I am generating PDF from the LaTeX source files. My column are very wide and I want that PDF should expand to fit the data. Does not matter how long the page is. I am trying this. I am also setting the size to A1 but its not working               \documentclass[11pt, a1paper]{report}     \usepackage{booktabs}     \usepackage{tabularx}          \begin{document}     \begin{table}         \centering         \caption{Table shows the commulative oxygen levels at 2 minute time intervals. The displacement is measured in \textbf{cm}}         \begin{tabularx}{\textwidth}{@{}>{\bfseries}c*{9}{X}@{}}         \toprule         \hline                  \textbf{ number }                     &                       \textbf{ name }                     &                       \textbf{ job }                     &                       \textbf{ status }                     &                       \textbf{ date }                     &


title: Reusing an image without duplicating it

text: PGF has a nice feature, declaring an image and re-using it again and again. With a PDF backend, it reduces the size of the output, as the image is embedded in the file only once. However, the PGF manual clearly states that LaTeX users should prefer `\includegraphics` to this mechanism. Is it possible to mimic this feature, i.e., reusing an image without increasing the file size, using LaTeX's native graphics packages? Would putting the image in a box do this effect?


title: Using TikZ inside a figure caption

text: I have a PNG plot with a couple of black patches in it, and I'd like to refer to it in the `\caption` of of the `figure`. According to the TikZ manual, I'd have to               \tikz \fill[black] (1ex,1ex) circle (1ex);      which which works perfectly outside a `\caption`. Using this inside a `\caption`, though, leaves me with the compile error               ! Use of \use@pgflibrary doesn't match its definition.     \pgfutil@ifnextchar ...1\def \pgfutil@reserved@a {                                                   #2}\def \pgfutil@reserved@...     l.375 ...blah blah.}          ?      The following produces the compile error               \documentclass{article}     \usepackage{tikz}          \begin{document}     \tikz \fill[orange] (1ex,1ex) circle (1ex);     \begin{figure}     \caption{\tikz \fill[orange] (1ex,1ex) circle (1ex);}     \end{figure}     \end{document}      Any hints here?


title: tikzpicture within figure caption

text: Has anyone an idea how to use tikzpicture WITHIN a figure caption? What I want is, plot a blue circle withing a figure caption, like:               \begin{figure}[ht]     %...     \caption{CaptionText \begin{tikzpicture} \draw[thick, color=blue, fill=blue] plot[mark=*, mark options={scale=1.3}] (0,0); \end{tikzpicture} CaptionText.}     \end{figure}      Within regular text, this works fine with               RegularText \begin{tikzpicture} \draw[thick, color=blue, fill=blue] plot[mark=*, mark options={scale=1.3}] (0,0); \end{tikzpicture} RegularText


title: Space between paragraphs (local)

text: I would like to increase the space between two paragraphs only, not for the whole document. For example I want to have something like this Paragraph1: One paragraph here Paragraph2: Space between the 1st paragraph and this one, the default option from. Paragraph3: the 3rd paragraph to have larger/smaller space from the 2nd, than the 2nd has from 1st (for my purpose I want to be larger).


title: Relative image path in renewed \maketitle

text: To minimize the amount of copy-pasting I have to do between documents/projects, I've decided to create a separate file in which I renew the `\maketitle` command. This file (`title.tex`) should then be used as input for any project (in this case `main.tex`): File `main.tex`:               \documentclass{article}     \input{/path/to/title}     \begin{document}         \maketitle     \end{document}      File `title.tex`:               \usepackage[utf8]{inputenc}     \usepackage{geometry,graphicx}     \geometry{a4paper}     \renewcommand{\maketitle}{         \includegraphics{image}     }      This doesn't work because the path provided for `\includegraphics` is relative. Making the path absolute would solve the problem, but that wouldn't make the file as portable as I would like. Is there any way I can keep using a relative path for my image?


title: Unexpected output using tikz/textpos

text: The following code (MWE)               \documentclass[a4paper]{article}          \usepackage{tikz}     \usepackage[absolute]{textpos}          \usetikzlibrary{external}     \tikzexternalize          \begin{document}          \begin{textblock}{4}[0,0](1.3,2.5)     \begin{center}     SOME TITLE TEXT SOME TITLE TEXT\\     SOME TITLE TEXT SOME TITLE TEXT     \end{center}     \end{textblock}     \thispagestyle{empty}     \mbox{} \clearpage  %flush this page          \begin{figure}     \begin{tikzpicture}       \path[draw] (20mm,150mm) -- (20mm,250mm);       \path[draw] (100mm,150mm) -- (100mm,250mm);     \end{tikzpicture}          \end{figure}          \end{document}      is expected to produce two pages; the first one containing eg some title text and the second one two parallel lines. Instead in the second page the first one is appended (take a look at the picture) ![enter image description here](http://i.stack.imgur.com/eKYPV.png) I am using `pdflatex` from MikTeX 2.9 (updated) and compiling with `-enable- write18`. What's wrong?


title: Table looking like a block

text: The goal is to create a table that has the same style than a block of the used theme in order to have a consequent style trough the document. this can be done by the following two methodes shown in the code. the last tweak although is to add nice horizontal and vertical lines separating the "cells". I tried this using tabular, but the vertical line is separated, is there any way to get this perfect / do this at all ?               \documentclass{beamer}       \usetheme{Berlin}       \setbeamertemplate{blocks}[rounded][shadow=true]          \usepackage[USenglish]{babel}       \usepackage{times}       \usepackage{tikz}       \usepackage{parskip}            \begin{document}                % Methode 1                                                  \begin{frame}[t]          \tikzset{blocknode/.style={inner sep=0,text width=0.5\textwidth,below right}}          \begin{block}{\tikz{\node[blocknode] {asdf}; \node[blocknode] at (0.5\textwidth,0) {qwertz};}}     \begin{tikzpicture}     \node[blocknode] {\begin{itemize}\item a\item b\end{itemize}};     \node[blocknode] at (0.5\textwidth,0) {\begin{itemize}\item c\item d\end{itemize}};     \end{tikzpicture}     \end{block}          % Methode 2     \begin{block}{     \begin{center}     \begin{tabular}{p{0.45\textwidth}|p{0.45\textwidth}}       1 & 2 \\     \end{tabular}     \end{center}}          \begin{center}     \begin{tabular}{p{0.45\textwidth}|p{0.45\textwidth}}       \begin{itemize}\item 3\end{itemize} &       \begin{itemize}\item 4\end{itemize}\\ \hline       \begin{itemize}\item 5\end{itemize} &       \begin{itemize}\item 6\end{itemize} \\ \hline       \begin{itemize}\item 7\end{itemize} &       \begin{itemize}\item 8\end{itemize} \\     \end{tabular}     \end{center}     \end{block}          \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/FAhRz.jpg)


title: Highlight terms in equation mode

text: I am trying to add a green box around the first two terms in my equation (`beta_0` and `b_i`). I also want to add a circle around the second term (`b_i`). Is it possible to do this in LaTeX? My code is below which produces the equation. Any help would be great.               \begin{equation}              \mathbf{Y_{ij}} = \beta_{0} +\mathbf{ b_i} + \beta_1x_1 + \ldots + \beta_nx_n + \mathbf{\epsilon_{ij}}          \end{equation}


title: Turning off text wrapping inside .bbl files

text: BibTeX does linebreaking on the .bbl files it write outs. How do I turn that off, or adjust it? It is breaking lines inside long URLs with spaces in the bibliography, causing them to stop working. Here’s is a MWE.               \documentclass{article}     \usepackage[spaces,obeyspaces]{url}     \usepackage{hyperref}     \usepackage{filecontents}     \begin{document}          \begin{filecontents}{foo.bst}          ENTRY {         url       }       {}       {}          FUNCTION {misc}     {         "\url{" url "}" * * write$ newline$         "\par" write$ newline$     }          READ          ITERATE {call.type$}          \end{filecontents}          \begin{filecontents}{foo.bib}     @misc{key1,         url = "http://example.com"     }          @misc{key2,         url = "http://example.com/this is a long url that contains more spaces than BibTeX can handle"     }     \end{filecontents}          \nocite{*}          \section{Bibliography}          \bibliographystyle{foo}     \bibliography{foo}          \end{document}      Clicking the first link opens a browser, but the second does not. Here is a line-numbered version of the .bbl file it spits out:               1 \url{http://example.com}     2 \par     3 \url{http://example.com/this is a long url that contains more spaces than     4   BibTeX can handle}     5 \par      btxhak.pdf claims that “write$ does reasonable line breaking” …


title: Add documentation to TL install

text: I installed the Tex Live 20130407 on my system. To save disk space, I did not install the documentation, because I thought that `texdoc` can download those files I ask it. However, issuing               texdoc caption      throws an error: > Sorry, no documentation found for caption. If you are unsure about the name, > try searching CTAN's TeX catalogue at > http://ctan.org/search.html#byDescription. So, how can I:   * either **add the documentation to already existing TL install** ;   * or **make`texdoc` download the documentation when I ask for them**?


title: Lyx and List of Acronyms

text: I need to generate the List of Acronyms for a report class document, i used this method to make the acronym: > insert -> nomenclature entry then I write the symbol and the description. Example:               Symbol: API     Description: Application Programming Interface      But when I did this: > insert -> List / TOC -> Nomenclature in the place where I want the list of acronyms to appear nothing happens. What am I doing wrong here, and how to insert an abbreviation table into my document? ### Update: I know about this Question but what I want is not an abbreviation table after each chapter; I want one in the beginning of the document after the table of contents.


title: Odd vertical gap with multicol, scrreprt and parskip=half

text: I'm having a weird vertical gap in one of my documents, which only is there when I use `multicol` together with `\documentclass[parskip=half]{scrreprt}`. **Minimal example**               \documentclass[parskip=half]{scrreprt}     \usepackage{multicol}     \begin{document}          \begin{multicols}{2}             \subsubsection{title}             this \\             is \\             a long \\             text     \vfill     \columnbreak             \subsubsection{title}             foo     \end{multicols}          \end{document}      **Output** ![enter image description here](http://i.stack.imgur.com/IuajH.png) I'd expect the "foo" to be at the top line of the left column, not on the bottom. What's going wrong there?


title: System of equations with tag which has subscript

text: Suppose I have an equation               u_t = F(x)     u(0) = u_0      I want to put a brace around on the left hand side of both lines and give it a tag with a subscript (eg. P_w) AND I want to be able to refer to this later (by using \eqref) by giving it a label. Problems:   1. I don't know how to tag something with a subscript in it   2. I don't know how to put it on the LHS Help appreciated.


title: Beamer: Visualize overlay borders in handout mode

text: I want to display the slide areas of a frame in handout mode. A possible solution could look like this:               \begin{frame}  % presentation mode         On slide 1 \\         \pause         On slide 2     \end{frame}     \begin{frame}  % handout mode         \fbox{On slide 1}$_{1-2}$    \\         On slide 2     \end{frame}      My motivation is to know from my printed handout where I drew the overlay. Does anybody know an option or package offering this or something similar?


title: Plots not perfectly aligned vertically

text: I created this two plots using `pgfplots` package and put in the page using `subfig` package. ![enter image description here](http://i.stack.imgur.com/wuWvo.png) This is a part of the code I used to create it.                 \begin{figure}[htp]     \centering             \begin{tikzpicture}[scale=0.8]                 \begin{axis}[height=7cm,                              x post scale=1.4,                              xmin=0,xmax=6000,ymin=0,ymax=3500,                              grid=both,                              ylabel=Throughput (kbit/s),                              /pgf/number format/.cd,                              use comma,                              1000 sep={},                              legend pos = north west,                              legend cell align=left,                              name=main plot]                     \addplot[smooth,thick,blue!70]                         table[x=load,y=throughput]                         {./immagini/throughput_blue.txt};                     \addplot[smooth,thick,green!70]                         table[x=load,y=throughput]                         {./immagini/throughput_green.txt};                     \legend{{\footnotesize Network Coding}, {\footnotesize No Network Coding}}                 \end{axis}                           \begin{axis}[height=3.8cm,                              x post scale=1.4,                              xmin=0,xmax=6000,ymin=0,ymax=2,                              grid=both,                              xlabel= Carico offerto totale (kbit/s),ylabel= Guadagno codifica,                              /pgf/number format/.cd,                              use comma,                              1000 sep={},                              at={(main plot.below south west)},yshift=-0.1cm,                              anchor=north west]                     \addplot[smooth,thick,red!70]                         table[x=load,y=gain]                         {./immagini/throughput_red.txt};                 \end{axis}             \end{tikzpicture}     \caption{Confronto throughput per lo scenario \emph{mobile cloud}}     \label{fig:throughput_nc}     \end{figure}      The problem is, as you can see, the plots are not aligned vertically. I don't undestand the reason.where is the mistake?


title: incollection: wrong bibliography entry

text: I'm using biblatex and the following entry in my `*.bib` file leads to a wrong bibliography entry. If I skip the maintitle, booksubtitle and bookauthor it seems that everything works but unfortunately with less information in the bibliography. I appreciate any help! This is the structure of the collection. It's a multi-volume book (volume = 19).   Collection title is "Der Controller Berater".   Title of the volume is Balanced Scorecard.   Volume subtitle is Best-Practice-Lösungen für die Unternehmenssteuerung.   Title of the work in the volume is Balanced Scorecard im Kontext des modernen Performance Measurement.               @incollection{GleBSC,     author = {Gleich, Ronald and Quitt Anna},     title = {Balanced Scorecard im Kontext des modernen Performance Measurement},     maintitle = {Der Controlling-Berater}     booktitle = {Balanced Scorecard},     booksubtitle = {Best-Practice-Lösungen für die Unternehmenssteuerung}     bookauthor = {Karliiiii}     publisher = {Haufe-Lexware},     year = {2012},     chapter = {},     pages = {},     address = {Freiburg},     editor = {Gleich, Ronald and Klein, Andreas},     volume = {19},     otherinfo = {}      Bibliography: > [5] Ronald Gleich und Quitt Anna. „Balanced Scorecard im Kontext des > modernen Performance Measurement“. In: Der Controlling-Berater.


title: Does JabRef add all references to the bibliograpy in LaTeX?

text: Does cited articles/books in JabRef add all of the references to bibliography in LaTeX even though you did not cite them in the thesis? Because I have one JabRef file and I want to add bibliography to end of the each chapter, but it adds all of the references to the each chapters.


title: Uppercase name in BibLaTeX authortitle citestyle

text: How can I make an author's name **uppercase** in BibLaTeX `authortitle` citestyle? The statement `\DeclareNameFormat{author}{\MakeUppercase{#1}}` changes the cited references but not the citations in footnotes.               \documentclass{article}     \usepackage[backend=biber, citestyle=authortitle]{biblatex}     \usepackage{filecontents}          \DeclareNameFormat{author}{\MakeUppercase{#1}}          \begin{filecontents}{sample.bib}     @article{myArticle,     author={Author},     title={Title},     journal={Journal},     year={2000},     volume={1}}     \end{filecontents}          \addbibresource{sample.bib}          \begin{document}     First sentence \autocite [3] {myArticle}.     \printbibliography     \end{document}


title: maths nested superscripts and subscripts displayed incorrectly inline

text: I am having a strange bug when using nested superscripts and subscripts in inline math (displaystyle works fine). This behaviour is the same independently of the font used or the compiler (orginally with `luaLaTeX` with `unicode-math` but also occurs with plain `pdfLaTeX`               \documentclass{standalone}     \begin{document}          Some text is \(\omega_{m_{ij}}^r\) and \(\omega_{m_{ij}}^{r_{ij+1}}\)          \end{document}      ![enter image description here](http://i.stack.imgur.com/3EnHQ.png) Any ideas how to fix this? EDIT: compare with the output with `\everymath{\displaystyle}` ![enter image description here](http://i.stack.imgur.com/0sujQ.png)


title: Distinct formatted page numbers with glossaries and Xindy

text: This is somewhat related to this question, but using Xindy as a backend, not `makeindex`. I am attempting to create an index using `glossaries`, and in this index some page numbers have a special meaning. These are therefore typeset in italic. Unfortunately, when the same item is referenced both with its special meaning and as a regular item, in that order, the page number in the index is not italic. The following MWE illustrates the problem:               \documentclass{article}     \usepackage{hyperref}     \usepackage[xindy]{glossaries}          \newglossaryentry{test}{name={Test},description={\nopostdesc}}     \makeglossaries          \begin{document}       \glsadd[format=hyperit]{test}       \glsadd{test}       \printglossary[style=index]     \end{document}      The result of this MWE is ![result of MWE](http://i.stack.imgur.com/elDqT.png) while I would like the page number to be either italic (i.e., the formatted page number always has priority) or displayed once for each formatting. **Is this possible using Xindy as a backend?** I did try a method in which I defined a fake counter for the special entries, thinking that this would result in separate entries:               \documentclass{article}     \usepackage{hyperref}     \usepackage[xindy]{glossaries}          \newcounter{fakepage}     \GlsAddXdyCounters{fakepage}     \newglossaryentry{test}{name={Test},description={\nopostdesc}}     \makeglossaries          \begin{document}       \setcounter{fakepage}{\thepage}       \glsadd[format=hyperit,counter=fakepage]{test}       \glsadd{test}       \printglossary[style=index]     \end{document}      Unfortunately, this resulted in wierd errors from Xindy and a result identical to that of the first MWE.


title: Retain line breaking behaviour inside macro

text: I use a macro which just wraps its argument in a pair of delimiters (brackets). It interferes with the way LaTeX would normally wrap an inline math expression. The following illustrates:               \documentclass{article}          \newcommand{\collapse}[1]{\{{#1}\}}     \newcommand{\apply}[2]{#1[#2]}          \begin{document}     Here's a regular paragraph to indicate the point at which text would     normally wrap.          word word word word word word word word word word word word $\collapse{\apply{(T + T')}{D + D'}} > C$,     \end{document}      I don't want the {(T + T )[D + D ]} > C to run off the edge of the page but rather to wrap onto the next line. If I inline the 'collapse' macro, then indeed it wraps as one would expect. Is this easy to achieve whilst still retaining my 'collapse' macro? I have tried /allowbreak, but with no success. This is probably relevant: line break in macro


title: Change the title size in scrartcl

text: I'd like to use a smaller title. I'm using the `scrartcl` documentclass from the KOMA-Script bundle. I can change it's color font but not it's size.               \setkomafont{title}{\normalfont\bfseries\small}      Everything works exept the size.


title: line spacing document class article

text: I want to have more space between the lines in my document which uses documentclass `article`. But if I use something like this blog says, it causes following error:               ! LaTeX Error: Too many unprocessed floats.     See the LaTeX manual or LaTeX Companion for explanation.        Type  H <return>  for immediate help.      ...                                                        l.539 \begin{figure}[h]          You've lost some text.  Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.          ! Undefined control sequence.     \latex@xfloat ...vf \fi \global \setbox \@currbox                                                    \color@vbox \normalcolor \...     l.539 \begin{figure}[h]          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! Missing number, treated as zero.     <to be read again>                     \vbox      l.539 \begin{figure}[h]          A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)     ...      How to fix it? **EDIT** : using XeLaTeX


title: Customizing pgfuml (distances)

text: I'm using pgfuml to create some sequence diagrams. As you can already see in the examples on the pgf-uml Homepage, diagramms get very crammed if you insert many descriptions. Text and arrows overlap and are hard to read because they overleap each other. I'm no experienced Latex user and I can't figure out how to change the pgf- umlsd.sty a little bit so the diagrams get a bit straightened and better to read. Can somebody tell me how to fix this, e.g. increase the space between elements? For example: on the examples page is shown:               <-----------------            Update()     ----------------->      How could I increase the distance between these arrows to straighten the diagram?


title: help with Bibtex and TeXshop

text: Hi I've just switched from PC to Mac and I'm having a bear of a time getting TeXShop or TeXWorks to recognize my .bib or .bst files. I've tried a bunch of things suggested on the web, including here (though several suggests re setting PATHs is over my head). When I was PC, I could just leave the bib and bst files in the same directory and then use texify.exe (pdfLaTex+MakeIndex+Bibtex) to do everything at one click, but I doesn't work now. I've tried the latex+bibtex+latex+latex sequence but still get the same errors on not finding my bib and bst files. I've also tried putting my .bst and .bib files in the subfolders under `~/Library/texmf/bibtex`, all of which I had to create. I've tried compiling the .tex file again on my PC (since I'm running the article folder on my Dropbox) and it still works fine there. BTW: the same problem exists when I use TeXWorks on Mac, not just TeXShop. I used TeXWorks on my PC. Please help. It's been 3 days now of complete wasted time!


title: How to create a section heading sensitive macro or environment?

text: I have a `\comments` macro that inserts three centered asterisks (`* * *`) and changes font size and color. A corresponding `\nocomments` macro adds another break with centered asterisks and restores standard font size and color. I would like the `\comments` macro to be section heading sensitive, that is, after `\chapter`, `\section`, `\subsection` and their friends I would like to suspend output of the tree asterisks and _only_ change font size and color. In other words, directly after a heading, the macro should change font size and color, but in _all other_ cases also output the 'anonymous break' (`* * *`). I have tried looking into core latex constructs such as `\if@nobreak`, but it seems that a solution to this is not that simple. And yes, this could be done with a `\newenvironment` as well, but since I use **pandoc** as front-end, using simple macros bypasses **pandoc** 's automatic detection of environments. Anyway, a solution for macros will probably work with environments too. A not-so-well-working example:               \documentclass{article}          \usepackage{xcolor}          \newcommand{\comments}{%       \begingroup       \color{blue}            % The following line should be suspended if `\begincomments' is used       % directly after a sectioning command such as `\section' or       % `\subsection'. This is just yet another of my attempts that does       % not work.       \if@noskipsec\else         \begingroup\centering * * *\par\endgroup       \fi            \small       \setlength{\parindent}{0mm}       \setlength{\parskip}{.5\baselineskip}     }     \newcommand{\nocomments}{%       \begingroup\centering * * *\par\endgroup            \endgroup     }          \begin{document}          \section{Section header}          \comments          Some comments about what will be written in this section, but is not     yet written. It should not start with three asterisks.          \nocomments          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do     eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad     minim veniam, quis nostrud exercitation ullamco laboris nisi ut     aliquip ex ea commodo consequat. Duis aute irure dolor in     reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla     pariatur. Excepteur sint occaecat cupidatat non proident, sunt in     culpa qui officia deserunt mollit anim id est laborum.          \comments          More comments. This should, however, start with three asterisks.          \nocomments          \end{document}


title: Problems to get two graphics in different pages with standalone

text: In the following MWE I get a single page with the two graphics within:               \documentclass[multi]{standalone}          \standaloneenv{pspicture}     \usepackage[dvipsnames, svgnames, prologue]{xcolor}     \colorlet{BaseColor}{Crimson}     \usepackage{pstricks}          \begin{document}     \begin{pspicture}(0.5,0.5)     \psline[linecolor = BaseColor](0.5,0.5)     \end{pspicture}     \begin{pspicture}(1,1)     \psline(1,1)     \end{pspicture}     \end{document}      On the other hand, I get the graphics split in two pages if I say:               \documentclass[pstricks,multi]{standalone}          \standaloneenv{pspicture}     %\usepackage[dvipsnames, svgnames, prologue]{xcolor}     %   \colorlet{BaseColor}{Crimson}     %\usepackage{pstricks}          \begin{document}     \begin{pspicture}(0.5,0.5)     \psline(0.5,0.5)  % linecolor key not used anymore. See below     \end{pspicture}     \begin{pspicture}(1,1)     \psline(1,1)     \end{pspicture}     \end{document}      My problem about the last MWE is that if I pass the `pstricks` option to `standalone`, there is a clash with the options I need for the `xcolor` package. I have the same problem (a single page) if I use the option `class = memoir`. How can these issues be solved? EDIT: Well, I solved the problem about the splitting in two pages by just typing the line `\standaloneenv{pspicture}` after loading the `pstricks` package, but I do not get any actual graphics on the pdf file either through `dvi -> ps -> pdf` or `dvi -> pdf`. This is due to the `linecolor` I am using. The problem with `class = memoir` remains, too. I don't get any contents if I use that option -- the pages are there at the correct bounding box sizes, though, but they are empty. Is it possible to solve these issues?


title: Wrong placement (and/or size) of picture / plot with groupplot of table (... and discontinuity)?

text: Consider this MWE:               \documentclass{article}     % \documentclass{standalone}          \usepackage{pgfplots}     \pgfplotsset{compat=1.5.1}     \usetikzlibrary{pgfplots.groupplots}     \usepackage{pgfplotstable}          \pagecolor{yellow!15}          \begin{document}          \pgfplotstableset{     % %define how the '0', '1' column shall be filled:     create on use/0/.style={create col/set list={0,1,...,200}},%     create on use/1/.style={create col/expr={1+0.005*\pgfplotstablerow+1*sin(40*\pgfplotstablerow)}},     }     % %create a new table with 11 rows and column ’0’:     \pgfplotstablenew[header=false,columns={0,1}]{201}\mytable          %%show it (debug):     %%I do not know the key '/pgfplots/table/create col/output empty row'     %\pgfplotstabletypeset[%header=false, %     %  empty cells with={---}, %     %  /pgfplots/table/every head row/.style={}, %     %]\mytable          \begin{tikzpicture}     \begin{groupplot}[       group style={         group name=my fancy plots,         group size=2 by 1, % cols by rows         yticklabels at=edge left,         %xticklabels at=edge bottom,         %vertical sep=0pt,         horizontal sep=0pt,       },       height=6cm,       ymin=0, ymax=3.5,       domain=0:150, % x domain       axis y line=middle,       axis x line=middle,       ylabel style={anchor=west},     ]          \nextgroupplot[       xmin=0, xmax=50,       axis y line=left,       axis x line=bottom,       x axis line style=-,     ]     \addplot[mark=*,mark options={blue}] table[ %       x index=0,       y index=1,       skip rows between index={11}{200}, % passes, but no effect?     ]\mytable;          \nextgroupplot[xmin=140, xmax=190,       axis y line=none, % none here, because:       axis x discontinuity=parallel,       axis x line=bottom,     ]     \addplot[mark=*,mark options={blue}] table[ %       x index=0,       y index=1,       skip rows between index={11}{200}, % passes, but no effect?     ]\mytable;          \end{groupplot}     \end{tikzpicture}          \end{document}      If you compile this with `group size=1 by 1,`, the code will compile as expected (minus a warning), in either `article` or `standalone` class (that is, there will be a single, centered plot). But if you compile the MWE as is (`group size=2 by 1,`), in `article` class you get something like: ![test04a](http://i.stack.imgur.com/10LDX.png) In my original work case where I noticed this, the plot was so much displaced to the right - that all I got when I opened the PDF was a blank page! Yet I found it suspicious that the PDF page was 80+ KB, so I tried `standalone`, and in this MWE, it confirms that, indeed, the whole plot is rendered as it should - just displaced: ![test04b](http://i.stack.imgur.com/szHvZ.png) (In my original work case, the `standalone` PDF measures 15821.4 x 175.365 pts; 5581 × 62 mm - that's like 5+ meters width!! compared to regular, expected, less than US Letter (216 × 279 mm)..) In this case, the `standalone` output PDF for this MWE (for me) measures 593.274 x 140.828 pts (or 209 × 50 mm). Apparently, this is a problem to do with the size of the bounding box of the plot, not so much the size of the plot (contents) it(them)self(ves). It is also related to the discontinuity in the ranges: if you use (xmin=0,xmax=50 & xmin=50,xmax=100), then there is less of displacement, than if you use (xmin=0,xmax=50 & xmin=140,xmax=190). So, what is the reason for this - and how can I get a correctly sized and placed pgfplot, when using a 2x1 groupplots with table data?


title: Always scale and clip background image so it fills the page

text: I have learned from other answers how to use an image file as background and make it transparent. Since my background files do not necessarily have the exact page dimensions (they are provided by users), I want to scale and clip them to fit. I have found, however, that using               \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio,clip]{#1}      does not always scale correctly; landscape-oriented images are scaled so widths fit and then not clipped at all if they are very flat, so a white bar remains. For example, this is using a 1600x750 image on a US Letter landscape page:               \documentclass[landscape]{article}     \usepackage{eso-pic,graphicx}     \pagestyle{empty}     \begin{document}       \AddToShipoutPicture*{%         \put(0,0){%           \parbox[b][\paperheight]{\paperwidth}{%             \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio,clip]{test.png}%           }%         }%       }%       \phantom{lorem ipsum}     \end{document}      ![enter image description here](http://i.stack.imgur.com/TQm4n.png) How can I tell `includegraphics` to always scale the shorter dimension to fit?