title: Sideways subfigure over several pages

text: I am trying to include "sideways" subfigures according to this question How to rotate a group of figures (subfigure) from Torbjørn T. I would like to put three graphics next to each other (for comparison reason) and continue this "threerow". And in case I need more than one page it should just continue for the next page. Something like that (in case 9 picture do not fit, then just 6 or even 3).               = = =     = = =      = = =       I guess it might be a problem with the package subfig because including it causes an error. Is there any problem due to other packages I use? here are my packages:               \documentclass[a4paper, 12pt]{article}     \usepackage[left=3cm, right=2cm, top=3cm, bottom=4cm]{geometry}     %Font encoding     \usepackage[T1]{fontenc}     %Font     \usepackage[utf8]{inputenc}     %Language     \usepackage[english]{babel}     %Mathematics     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{textgreek}     %Graphs and Diagrams     %\usepackage{subgraphic}     %\usepackage{subfig}     \usepackage{rotating}     \usepackage{tikz}     \usepackage[outdir=./]{epstopdf}     \usepackage{graphicx}     \usepackage{float}     \usepackage{pdfpages}     %Tables     \usepackage{multirow}     \usepackage{longtable}     \usepackage{booktabs}     \usepackage{tabulary}     \usepackage{tabularx}     \usepackage{fixltx2e}     \usepackage{threeparttable}     \usepackage[labelsep=newline,% line break after label        justification=raggedright,        singlelinecheck=off]{caption}     \usepackage{subcaption}     \usepackage{siunitx}     \usepackage{etoolbox}     \robustify\bfseries      \sisetup{detect-weight=true,detect-inline-weight=math}     \usepackage{fancybox}     \usepackage{array}     \usepackage{dcolumn}     \newcolumntype{d}[1]{D{.}{.}{#1}}     \newcommand\mc[1]{\multicolumn{1}{c}{#1}}     \usepackage{colortbl}     %Writing     \usepackage{txfonts}     \usepackage[doublespacing]{setspace}     %Misc     \usepackage{datetime}     \usepackage{tocvsec2}     %References     %\usepackage{hyperref}     %\usepackage{float}     \usepackage{natbib}     \usepackage{fancyref}          \begin{document}     \end{sidewaysfigure}      \centering     \begin{sidewaysfigure}       \caption[]{Caption for the three rotated figures. \label{fig:test}}         \begin{minipage}{\textheight}         \footnotesize test test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test testtest test test test          \bigskip         \end{minipage}       \subfloat[First figure]{\includegraphics[width=0.32\textheight]{aasc_full_dsue1.eps}\label{fig:a}} \quad        \subfloat[Second figure]{\includegraphics[width=0.32\textheight]{aasc_full_dsue2.eps}\label{fig:b}}\quad        \subfloat[Third figure]{\includegraphics[width=0.32\textheight]{aasc_full_dsue3.eps}\label{fig:c}} \quad          \subfloat[First figure]{\includegraphics[width=0.32\textheight]{aasc_full_dsue1.eps}\label{fig:d}} \quad        \subfloat[Second figure]{\includegraphics[width=0.32\textheight]{aasc_full_dsue3.eps}\label{fig:e}}\quad        \subfloat[Third figure]{\includegraphics[width=0.32\textheight]{aasc_full_dsue3.eps}\label{fig:f}}           \end{sidewaysfigure}     \clearpage     \begin{sidewaysfigure}       \ContinuedFloat             %%<-- put this in subsequest figures.       \centering       \subfloat[First figure]{\includegraphics[width=0.3\textheight]{aasc_full_dsue1.eps}\label{fig:d}} \quad       \subfloat[Second figure]{\includegraphics[width=0.3\textheight]{aasc_full_dsue3.eps}\label{fig:e}}\quad       \subfloat[Third figure]{\includegraphics[width=0.3\textheight]{aasc_full_dsue3.eps}\label{fig:f}}       \caption[]{Caption for the three rotated figures\label{fig:test}}       %%% Use empty optional argument in \caption[] for subsequest figures.     \end{sidewaysfigure}          \begin{table}[ht!]     \setlength\tabcolsep{0.1pt}  % default value: 6.0pt          \begin{threeparttable}     \caption{Summary Statistics}     \label{tab:SummaryStatistics}     \footnotesize     \begin{tabular*}{\textwidth}%       { @{\extracolsep{\fill}} l d{5.0} *{7}{d{2.3}} }     \toprule     Variables\tnote{a}      & \mc{\hphantom{$-$}N$\hphantom{^{**}}$} & \mc{\hphantom{$-$}Mean$\hphantom{^{**}}$} & \mc{\hphantom{$-$}St.\,Dev.$\hphantom{^{**}}$} & \mc{\hphantom{$-$}Min.$\hphantom{^{**}}$} & \mc{\hphantom{$-$}Q1$\hphantom{^{**}}$} & \mc{\hphantom{$-$}Median$\hphantom{^{**}}$} & \mc{\hphantom{$-$}Q3$\hphantom{^{**}}$} & \mc{\hphantom{$-$}Max.} \\ [0.5ex]     \midrule     \multicolumn{9}{l}{\itshape Earnings Surprise} \\ [0.5ex]     SUE1      & \mc{\hphantom{$-$}14070$\hphantom{^{**}}$} & \mc{$-$0.001$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.182$\hphantom{^{**}}$} & \mc{$-$7.450$\hphantom{^{**}}$} &\mc{$-$0.003$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.001$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.005$\hphantom{^{**}}$} & \mc{\hphantom{$-$}6.240} \\     SUE2      & \mc{\hphantom{$-$}14081$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.154$\hphantom{^{**}}$} & \mc{$-$7.440$\hphantom{^{**}}$} & \mc{$-$0.002$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.001$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.005$\hphantom{^{**}}$} & \mc{\hphantom{$-$}6.250} \\     SUE3      & \mc{\hphantom{$-$}12604$\hphantom{^{**}}$} & \mc{$-$0.001$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.134$\hphantom{^{**}}$} & \mc{$-$8.180$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.001$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.002$\hphantom{^{**}}$} & \mc{\hphantom{$-$}7.090} \\  [0.5ex]     \midrule     \multicolumn{9}{l}{\itshape Firm Characteristics} \\ [0.5ex]     CASC (in \%)      & \mc{\hphantom{$-$}12309$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.016$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.370$\hphantom{^{**}}$} & \mc{$-$0.803$\hphantom{^{**}}$} & \mc{$-$0.098$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.098$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.992} \\     BHAR (in \%)      & \mc{\hphantom{$-$}13885$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.325$\hphantom{^{**}}$} & \mc{\hphantom{$-$}10.315$\hphantom{^{**}}$} & \mc{$-$19.233$\hphantom{^{**}}$} & \mc{$-$6.571$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.168$\hphantom{^{***}}$} & \mc{\hphantom{$-$}6.984$\hphantom{^{**}}$} & \mc{\hphantom{$-$}21.034} \\     DVOLA      & \mc{\hphantom{$-$}13866$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$}  & \mc{\hphantom{$-$}0.004$\hphantom{^{**}}$} & \mc{$-$0.043$\hphantom{^{**}}$} & \mc{$-$0.001$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.001$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.104} \\     \begin{tabular}[c]{@{}l@{}}     Market Value of\\ \noindent\hspace*{3mm}Equity (in mio)     \end{tabular}      & \mc{\hphantom{$-$}14012$\hphantom{^{**}}$} & \mc{\hphantom{$-$}21467$\hphantom{^{**}}$} & \mc{\hphantom{$-$}40919$\hphantom{^{**}}$} & \mc{\hphantom{$-$}52$\hphantom{^{**}}$} & \mc{\hphantom{$-$}3329$\hphantom{^{**}}$} & \mc{\hphantom{$-$}8082$\hphantom{^{**}}$} & \mc{\hphantom{$-$}20408$\hphantom{^{**}}$} & \mc{\hphantom{$-$}510201} \\     LEVERAGE      & \mc{\hphantom{$-$}12756$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.299$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.203$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.144$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.252$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.420$\hphantom{^{**}}$} & \mc{\hphantom{$-$}1.000} \\     DLEVERAGE      & \mc{\hphantom{$-$}12107$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.001$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.042$\hphantom{^{**}}$} & \mc{$-$0.274$\hphantom{^{**}}$} & \mc{$-$0.017$\hphantom{^{**}}$} & \mc{$-$0.002$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.015$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.461} \\     UPGRADE      & \mc{\hphantom{$-$}14094$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.022$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.148$\hphantom{^{**}}$} &  \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}1.000} \\     DOWNGRADE      & \mc{\hphantom{$-$}14094$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.036$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.186$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}1.000} \\ [0.5ex]     \midrule     \multicolumn{9}{l}{\itshape Macroeconomic Variables} \\ [0.5ex]     SPOT      & \mc{\hphantom{$-$}14058$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.029$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.014$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.006$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.019$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.030$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.041$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.052} \\     DSPOT      & \mc{\hphantom{$-$}13489$\hphantom{^{**}}$} & \mc{$-$0.001$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.004$\hphantom{^{**}}$} & \mc{$-$0.016$\hphantom{^{**}}$} & \mc{$-$0.003$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{***}}$} & \mc{\hphantom{$-$}0.002$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.013} \\     SLOPE      & \mc{\hphantom{$-$}14058$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.014$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.010$\hphantom{^{**}}$} & \mc{$-$0.002$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.003$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.016$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.023$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.029} \\     DSLOPE      & \mc{\hphantom{$-$}13489$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.000$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.003$\hphantom{^{**}}$} & \mc{$-$0.011$\hphantom{^{**}}$} & \mc{$-$0.003$\hphantom{^{**}}$} & \mc{$-$0.001$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.002$\hphantom{^{**}}$} & \mc{\hphantom{$-$}0.012} \\ [1ex]     \bottomrule     \end{tabular*}     \begin{tablenotes}     \footnotesize     \item[a] A table-specific footnote     test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test      \end{tablenotes}     \end{threeparttable}     \end{table}      It appears first the six subfigures, then the table and the remaining subfigures. How can I avoid the table to "sneak" into my figures? \begin{table}[ht!] \setlength\tabcolsep{0.1pt} % default value: 6.0pt \caption{Earnings Surprises and Cumulative Returns} \label{tab:surprises} in case there are mutually exclusiv packages, what can I do (other than to use a different way of putting my graphics)? Thank you very much. EDIT: With the help of Harish Kumar I could make it almost work, still I am confronted with some issues. Additionally (maybe not appropriate for this answer), is it possible to avoid the linebreak after the caption just(!) for figures (I am required to do that for tables).


title: callout with multiple pointers

text: With `tikz` is there any way of having a `callout` shape that points to more than one place? I would like to use a `callout` shape to explain some parts of a graph. This `callout` shape would point to different elements in the graph, as the explanation is the same for a set of elements. Here is a minimal working example:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{automata,shapes,arrows}     \begin{document}     \begin{tikzpicture}[node distance=2cm, auto]       \node[state,initial]   (s0)               {$s_0$};       \node[state]           (s1) [right of=s0] {$s_1$};       \node[state,accepting] (s2) [right of=s1] {$s_2$};       \path[->]         (s0) edge node {a} (s1)         (s1) edge node {c} (s2)              edge [loop above] node {b} ();       \node[fill=green!20, rectangle callout, callout absolute pointer={(s0.south)}]            [below of=s0] {              \parbox{2cm}{Each circle is a \emph{state} of the automaton}};     \end{tikzpicture}     \end{document}      which produces the output ![explaining multiple elements](http://i.stack.imgur.com/HdmjA.png) I want the `callout` pointing to all three nodes of the automaton.


title: barchart in pgfplots looks really bad

text: ![enter image description here](http://i.stack.imgur.com/OGCeg.png) Problems:   * The bar value "90" is written over a black line, almost impossible to read   * The value "58" is written over an x tick, hard to ready   * Bar spacing is bad. There is too much space between the bars, and there is no space above/below the top and the bottom bar. Some of this might be my fault, but I would expect that this kind of mess should be automatically avoided by pgfplots. What am I doing wrong?               \documentclass[12pt]{article}          \usepackage[utf8]{inputenc}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7}          \begin{document}          \begin{figure}     \resizebox{\linewidth}{!}{     \begin{tikzpicture}     \begin{axis}[             xbar,                 xmin=0.0,                 xmax=91.6666666667,                 width=12cm,                 height={ 1cm + ( 3.0 * 1cm ) },         symbolic y coords={{Térritmus},{Mozgásritmus},{Formaritmus}},         xlabel={Pontérték \%},         ytick=data,         nodes near coords,         nodes near coords align = {horizontal}     ]     \addplot [draw=black, fill=cyan!40!black] coordinates {         (58.3333333333,{Térritmus})         (91.6666666667,{Mozgásritmus})         (90.0,{Formaritmus})          };     \end{axis}     \end{tikzpicture}     }     \caption{Ritmus}     \end{figure}          \end{document}


title: Packages to install once for all

text: I just upgraded my Ubuntu from 12.04 to 14.04. Then, I have manually installed `tex-common`, `texlive-base` and `texlive- latex-recommended`. And I realize that some packages do not exist anymore. For instance, `multirow`, `paralist`, `stmaryrd`, `subfigure`, etc. Could anyone tell me what I should install to have these packages the once for all?


title: Re-using the title of the previous Beamer slide

text: Is there a way to reference the title of the previous Beamer slide? Often, a sequence of slides have the same title, and I'd like to avoid having to repeat the title. I could define a macro for the title of each slide, but is there a way to grab the title of an arbitrary slide?


title: Beamer: title-page full page image

text: I need to create a full-slide image as the first and final slides, as well as having a separate theme for the title page. I've been given the first/last slides, the title page and the generic slides as `.jpg` files. They're called `firstpage.jpg`, `titlepage.jpg`, `slide.png` respectively. So far I can create the generic slide with this sty file (`beamerinnerthemecdt.sty`):               \mode<presentation>          \setbeamertemplate{background canvas}{\begin{tikzpicture}\node[opacity=.9]     {\includegraphics [width=\paperwidth]{slide.png}};     \end{tikzpicture}}          % Title page     \defbeamertemplate*{title page}{cdt}[1][]     { \begin{tikzpicture}       \titlegraphic{\includegraphics[width=\paperwidth]{titlepage.jpg}}       \end{tikzpicture}}          \mode     <all>      My colour theme is:               \mode<presentation>          % Settings     \setbeamercolor*{title page header}{fg=white}     \setbeamercolor*{author}{fg=white}     \setbeamercolor*{date}{fg=white}          \mode     <all>      and my outer theme is:               \mode<presentation>          % Frame title     \defbeamertemplate*{frametitle}{texsx}[1][]     {     \vskip1cm%       \begin{beamercolorbox}[wd=\paperwidth,ht=1.2cm]{frametitle}            \end{beamercolorbox}     }          \mode<all>      Here is an example presentation file:               \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \title{There Is No Largest Prime Number}     \date[ISPN ’80]{27th International Symposium of Prime Numbers}     \author[Euclid]{Euclid of Alexandria \texttt{euclid@alexandria.edu}}          \usetheme{cdt}          \begin{document}          \begin{frame}      \frametitle{There Is No Largest Prime Number}      \framesubtitle{The proof uses \textit{reductio ad absurdum}.}      \begin{theorem}     There is no largest prime number. \end{theorem}      \begin{enumerate}      \item<1-| alert@1> Suppose $p$ were the largest prime number.      \item<2-> Let $q$ be the product of the first $p$ numbers.      \item<3-> Then $q+1$ is not divisible by any of them.      \item<1-> But $q + 1$ is greater than $1$, thus divisible by some prime     number not in the first $p$ numbers.     \end{enumerate}     \end{frame}               \end{document}      This seems to work ok, but I can't get beamer to add the other slides as well. How would I go about defining the `.sty` files so that I had a first page, title page, generic slide and final (same as first) page slides. I.e. how do I get beamer to accept these images as backgrounds for the appropriate slide?


title: installing Luatex in Miktex

text: How to install Luatex win 32 luatex version in Miktex 2.7, see http://www.luatex.org/download.html , my operating system is Windows XP, it seems that the luatex package is not complete, it doesn't contain some files like .fmt files or something like that. please, if you've experienced the luatex or lualatex installation on windows, show me how to do that step by step. Thanks in advance


title: How to make certain macros defined in document class inaccessible from within an input file using it?

text: In C#, we can specify certain properties of a class to be private, read only, etc. I want to apply this methodology in writing LaTeX document class if it is possible. I can find articles pertaining to it neither on the internet nor in a book. The following is my simplified document class.               \ProvidesClass{pst-xport}[a cute document class for my own purpose.]     % .... others ....          \RequirePackage{pstricks}          \newcommand\Left{-1}     \newcommand\Right{1}          \newlength\LeftPadding\setlength{\LeftPadding}{1cm}     \newlength\RightPadding\setlength{\RightPadding}{1cm}          % it must be private     \newlength\PictureWidth          \AtBeginDocument     {         \setlength{\PictureWidth}{\dimexpr\Right\psxunit-\Left\psxunit\relax}         \paperwidth=\dimexpr\PictureWidth+\RightPadding+\LeftPadding\relax         % .... others ....     }               % .... others ....          % it must be private     \parindent=0pt          %%%%%%%%%%%%%%%%%%%%     %%%% INTERFACES %%%%     %%%%%%%%%%%%%%%%%%%%          \newcommand\SetPicture[2]     {         \renewcommand\Left{#1}         \renewcommand\Right{#3}     }               \newcommand\SetPadding[2]     {         \setlength{\LeftPadding}{#1}         \setlength{\RightPadding}{#3}     }          \newcommand\GetPaperWidth{\PictureWidth}     \endinput      We use this document class as follows.               \documentclass{pst-xport}          \SetPicture{-2}{2}     \SetPadding{0.5cm}{0.5cm}          % \parindent must not be accessible in this input file.     \parindent=10pt          % \PictureWidth must not be accessible in this input file.     \setlength{\PictureWidth}{10cm}          \begin{document}     \parbox{\GetPictureWidth}     {         I can find a tool to convert         PDF to EPS in my neither         bathroom nor kitchen.     }     \end{document}      ## Questions If it is possible, how to make certain macros defined in a document class inaccessible from outside?


title: Thermodynamic partial derivatives

text: Does anyone have any ideas how to make this: ![enter image description here](http://i.stack.imgur.com/bx6R8.png) look like this: ![enter image description here](http://i.stack.imgur.com/1bvRo.png) The only difference is the differentials are "pushed over" making it appear more compact and readable. I achieved the first picture by using               \left. \frac{\partial U}{\partial S} \right|_{V,N} \mathrm{d} S      (first term only) but I don't know how to push the dS over the subscript more. Can this even be done? I've tried `\overset` and using a custom fraction but neither look quite right.


title: Multiple captions for a single figure

text: How do I get `subfig`-like captions for a single figure? I've got images that have multiple panels each, and I'd like to make a caption for all the sub- panels, as well as be able to reference each sub-panel. Something like Fig 1A, 1B etc. **Update** This is what I've come up with, based on Werner's answer:               \documentclass[11pt]{article}     \usepackage{geometry}     \geometry{letterpaper}          \usepackage{graphicx}          \usepackage[labelformat=simple]{caption,subcaption}     \usepackage{hyperref}     \usepackage{varioref}          \renewcommand\thesubfigure{\Alph{subfigure}}          \begin{document}          Tofu gluten-free VHS locavore, viral williamsburg +1 cliche fanny pack leggings terry richardson cred photo booth artisan. Echo park locavore jean shorts shoreditch before they sold out, farm-to-table keytar high life banksy tofu sartorial marfa. Gentrify butcher leggings           \captionsetup{singlelinecheck=false}          \begin{figure}[htb]         \includegraphics[scale=1]{figure2}         \caption{This is a general heading for figure 1.}\label{fig:1}              \subcaptionbox{This is something about figure 1A.}[\linewidth]{\label{fig:1a}}         \subcaptionbox{This is more more more more more more more more more more text about figure 1B. Sustainable terry richardson craft beer homo, cardigan wayfarers blog commodo DIY quinoa sartorial american apparel nostrud.\label{fig:1b}}[\linewidth]  {}               \end{figure}          Here's a ref to fig \vref{fig:1b}.Skateboard tempor hoodie helvetica quis. Sustainable terry richardson craft beer homo, cardigan wayfarers blog commodo DIY quinoa sartorial american apparel nostrud. Williamsburg aute mcsweeney's wes anderson. Dolor eiusmod tempor assumenda stumptown, delectus irony laboris                \end{document}


title: spiral spring in tikz

text: I'm aware of the possibility to easily draw linear springs with tikz but what about spiral springs (torsion)? It looks like there is nothing ready and a long journey in pgf is necessary. I could reproduce the attached picture with tikz except for the spiral that looks not easy to achieve: ![airfoil](http://i.stack.imgur.com/7328G.png) Edit 1: new version with the spiral spring. ![airfoil](http://i.stack.imgur.com/yuuXt.png) Edit 2: code for image 2:               % to be compiled with: pdflatex --jobname=profile-f1 profile.tex     \documentclass[12pt]{book}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[frenchstyle,fulloldstylenums,partialup]{kpfonts}     \usepackage{tikz}     \usetikzlibrary{snakes}     \pgfrealjobname{profile}     \begin{document}     \beginpgfgraphicnamed{profile-f1}     \footnotesize     \begin{tikzpicture}[>=latex,scale=1]     \tikzstyle{spring}=[snake=zigzag,thick,line before snake=0.3cm,line after  snake=0.3cm,segment length=6,segment amplitude=5,join=round]%     \begin{scope}[rotate around={-13:(10,0)}]     % intrado     \draw[smooth,line width=1pt,fill=black!5] plot coordinates {(0,0)(0.0334,-0.0767)(0.1087,-0.1437)(0.2253,-0.2011)(0.3824,-0.2489)(0.5790,-0.2870)(0.8139,-0.3158)(1.0860,-0.3355)(1.3940,-0.3466)(1.7365,-0.3497)(2.1123,-0.3457)(2.5199,-0.3356) (2.9580,-0.3209)(3.4252,-0.3029)(3.9198,-0.2835)(4.4427,-0.2625)(4.9936,-0.2377)(5.5666,-0.2102)(6.1594,-0.1810)(6.7696,-0.1513)(7.3950,-0.1217)(8.0332,-0.0930)(8.6815,-0.0653)(9.3376,-0.0386)(9.9988,-0.0125)};     % extrado     \draw[smooth,line width=1pt,fill=black!5] plot coordinates {(0,0)(0.0095,0.0831)(0.0624,0.1691)(0.1590,0.2574)(0.2990,0.3467)(0.4824,0.4357)(0.7085,0.5225)(0.9765,0.6050)(1.2855,0.6812)(1.6341,0.7488)(2.0206,0.8055)(2.4433,0.8492)(2.8998,0.8778)(3.3879,0.8897)(3.9049,0.8833)(4.4459,0.8592)(5.0064,0.8210)(5.5876,0.7687)(6.1870,0.7023)(6.8016,0.6219)(7.4286,0.5277)(8.0650,0.4197)(8.7080,0.2980)(9.3544,0.1623)(10.0012,0.0125)};     % limits     \draw[line width=0.5pt,dashed,dash pattern=on 4pt off 1.5pt](3,-1)--(3,0);     \draw[line width=0.5pt,dashed,dash pattern=on 4pt off 1.5pt](1.75,-1)--(1.75,0);     \draw[line width=0.5pt,dashed,dash pattern=on 4pt off 1.5pt,rotate around={13:(3,0)}](-1,0)--(3,0);     % arrows     \draw[line width=0.5pt,<->](1.75,-1)--node[below]{$ec$}(3,-1);     \draw[line width=0.5pt,<-](3,0) +(180:3.5cm) arc (180:193:3.5cm);     \draw(3,0) +(186.5:3.7cm) node{$\alpha$};     % points     \fill(3,0)circle (2pt);     \draw(3,0)+(155:0.6cm) node{$EC$};     \fill(1.75,0) circle (2pt);     \draw(1.75,0)+(155:0.4cm) node{$AC$};     \begin{scope}[xshift=3cm,rotate=103]     \draw [domain=0:25.1327,variable=\t,smooth,samples=75,line width=1pt]plot ({\t r}:{0.0008*\t*\t});     \end{scope}     \draw[rotate around={13:(3,0)},line width=1pt](3,0.5)--node[right]{$k_\alpha$} (3,2);%     \begin{scope}[rotate around={13:(3,0)}]     \clip (2.75,2) rectangle (3.25,2.25);     \foreach \x in {2.5,2.6,...,5} {     \draw[gray,line width=0.2pt](\x,2)--+(55:2);}     \end{scope}%     \draw[line width=1pt,rotate around={13:(3,0)}] (2.75,2) -- (3.25,2);     \draw[fill=white,white] (8.25,0) --+(0:.5) arc (0:360:.5);     \draw[line width=1pt] (8.25,0) --+(120:.5) arc (120:195:.5);     \fill[fill=white] (8,-.25) rectangle (10,.5);     % winglet     \begin{scope}[rotate around={-30:(8.3,0)},xshift=7.9cm,scale=0.35,y=1.5cm]     % intrado     \draw[smooth,line width=1pt,fill=black!5] plot coordinates {(0,0)(0.0334,-0.0767)(0.1087,-0.1437)(0.2253,-0.2011)(0.3824,-0.2489)(0.5790,-0.2870)(0.8139,-0.3158)(1.0860,-0.3355)(1.3940,-0.3466)(1.7365,-0.3497)(2.1123,-0.3457)(2.5199,-0.3356) (2.9580,-0.3209)(3.4252,-0.3029)(3.9198,-0.2835)(4.4427,-0.2625)(4.9936,-0.2377)(5.5666,-0.2102)(6.1594,-0.1810)(6.7696,-0.1513)(7.3950,-0.1217)(8.0332,-0.0930)(8.6815,-0.0653)(9.3376,-0.0386)(9.9988,-0.0125)};     % extrado     \draw[smooth,line width=1pt,fill=black!5] plot coordinates {(0.0000,0.0000)(0.0095,0.0831)(0.0624,0.1691)(0.1590,0.2574)(0.2990,0.3467)(0.4824,0.4357)(0.7085,0.5225)(0.9765,0.6050)(1.2855,0.6812)(1.6341,0.7488)(2.0206,0.8055)(2.4433,0.8492)(2.8998,0.8778)(3.3879,0.8897)(3.9049,0.8833)(4.4459,0.8592)(5.0064,0.8210)(5.5876,0.7687)(6.1870,0.7023)(6.8016,0.6219)(7.4286,0.5277)(8.0650,0.4197)(8.7080,0.2980)(9.3544,0.1623)(10.0012,0.0125)};     \end{scope}     \draw[line width=0.5pt,dashed,dash pattern=on 4pt off 1.5pt,rotate around={-30:(8.3,0)}](8.3,0)--(12,0);     \draw[line width=0.5pt,dashed,dash pattern=on 4pt off 1.5pt,rotate around={-30:(8.3,0)}](8.3,0)--(8.3,-1);     \draw[line width=0.5pt,dashed,dash pattern=on 4pt off 1.5pt,rotate around={-30:(8.3,0)}](11.4,0)--(11.4,-1);     \draw[line width=0.5pt,rotate around={-30:(8.3,0)},<->](8.3,-1)--node[below]{$\vphantom{6}\varepsilon c$}(11.4,-1);     \fill(8.3,0)circle (2pt);     \begin{scope}[xshift=8.3cm,rotate=130]     \draw [domain=0:25.1327,variable=\t,smooth,samples=75,line width=1pt]plot ({\t r}:{0.00085*\t*\t});     \end{scope}     \draw(8.3,0)+(90:0.75cm) node{$k_\delta$};     \draw[line width=0.5pt,<-](8.3,0) +(330:3.2cm) arc (330:360:3.2cm);     \draw(8.3,0) +(345:3.4cm) node{$\delta$};     \draw[line width=0.5pt,dashed,dash pattern=on 4pt off 1.5pt](-1,0)--(12,0);     \end{scope}%     \end{tikzpicture}     \endpgfgraphicnamed%     \end{document}


title: Automagically scale Tikz-Picture AND use Externalization

text: I need to scale Tikz pictures automatically, and I do this using the following custom environment:               % Automagically scale a Tikz picture, so it has the desired (given) width.     % Does NOT scale line width/text width! Needs the package "environ"!     %     % Usage:     %     % \begin{myscaletikzwidth}{\textwidth}     %   \begin{tikzpicture}[scale=\tikzscale]     %     ..     %   \end{tikzpicture}     % \end{myscaletikzwidth}     %     \makeatletter     \newsavebox{\measure@tikzpicture}     \NewEnviron{myscaletikzwidth}[1]{%       \def\tikz@width{#1}%       \def\tikzscale{1}\begin{lrbox}{\measure@tikzpicture}%       \BODY       \end{lrbox}%       \pgfmathparse{#1/\wd\measure@tikzpicture}%       \edef\tikzscale{\pgfmathresult}%       \BODY     }     \makeatother      (I got that code from another topic on Stackexchange.) This code works perfectly fine, however it doesn't work anymore, when I turn on externalization (graphics will then be created in their original size). **How can I make auto-scaling work in conjunction with externalization?** I am using the modern externalization approach that has been introduced with newer Tikz versions ("\tikzexternalize"). Maybe some hack with writing "\def\tikzscale{MyDeterminedScaleFactor}" to an external file and inputting that file afterwards? Could you please help me with that?


title: How to handle % character in LaTeX?

text: I am working on special character handling and my text is having % as one the special character which is treated as comment and anything after that is not printed. I m using verb as suggested in my previous thread but still pblm. How to handle special characters in LaTeX? Below is my code.               \documentclass[11pt,table,a4paper]{article}     \usepackage{array,ragged2e}     \usepackage[scaled]{uarial}     \usepackage[T1]{fontenc}     \begin{document}     \begin{minipage}{0.3\linewidth}     \def\verbatim@font{\normalfont\ua1}      This is my sample text for checking % character. I found whereever there   is     % character it is treated as comment and nothing gets printed after this. How can i fix this pblm. I m using verb still getting same pblm. pls help me how can i fix this pblm.     \end{minipage}     \end{document}


title: How can I define a macro that adds a row to a table that has not yet been printed?

text: I want to generate a list of technical abbreviations and acronyms that I use. Currently, I'm defining all acronyms with a macro I have designed. Now, I want the macro to call another macro, called `\addtototaa`, each time it is called, which adds the abbreviation to a table. This other macro is defined as               \newrobustcmd{\addtototaa}[2]{\let\OldContent\TableoftaaBody%         \renewrobustcmd{\TableoftaaBody}{\OldContent #1 & #2 \\}}      And then I have the two additional macros               \newrobustcmd{\TableoftaaBody}{}     \newrobustcmd{\tableoftaa}[0]{\begin{longtabu}{l X}\TableoftaaBody\end{longtabu}}      where `\TableoftaaBody` acts as a storage container for the table contents and `\tableoftaa` prints the table. But when I try to compile the document I get               TeX capacity exceeded, sorry [input stack size=5000] \tableoftaa      if I call `\tableoftaa` (but not otherwise). Why do I get this error? I read on this blog post that this message can appear if you have an infinite recursive loop (I guess the function calls are put on the stack and that's why it's eaten up). Have I defined a recursive function here somewhere? By the way, `\addtototaa` is called 31 times before `\tableoftaa` is called, because that's how many acronyoms and abbreviations I have defined, and the two arguments I send to `\addtototaa` are always just literals, and no additional macros.


title: how can I make these diagrams with latex?

text: I need to prepare several diagrams with latex and the closest match to what I need to do are these two diagrams, can anyone provide hints how to do them? I'm familiar with TikZ but these diagrams look like advance level to me. Can anyone suggest a package/plugin etc to implement something like this? ![First](http://i.stack.imgur.com/xGj7Y.png) ![Second](http://i.stack.imgur.com/5cD0t.png)


title: Cyrillic monospaced font

text: I need to use Cyrillic (russian) monospaced font. I chose courier and added               \usepackage[T1]{fontenc}      and               {\fontfamily{pcr}\selectfont       blabla     }      and that "blabla" is displayed like usual text and there is warning:               LaTeX Font Warning: Font shape `T2A/pcr/m/n' undefined using `T2A/cmr/m/n' instead on input line 245.      How to fix this? At the end I would like to have cyrillic monospaced font with possibility to write bold or underlined words. **Update** here's minimal non-working example:               \documentclass[a4paper,11pt]{article}     \usepackage[cp1251]{inputenc}     \usepackage[russian]{babel}     \usepackage[T1]{fontenc}          \begin{document}     usual text          русский текст          {\fontfamily{pcr}\selectfont      curier?          курьер?     }          \end{document}


title: Drawing with TikZ

text: A colleague asked me to help produce drawings with TikZ to include them in a LaTeX document. Not being a specialist of TikZ, I was not able to help and I do not know if GeoGebra can reproduce these drawings. Any hints on how to solve this problem? ![enter image description here](http://i.stack.imgur.com/NT1SQ.jpg) ![enter image description here](http://i.stack.imgur.com/KL899.jpg)


title: How to patch a floating environment so that the patched command floats

text: I'm using `etoolbox` to patch some environments. I want to use `\AtBeginEnvironment{table}{\marginpar{foo}}` to put something in the margin by the float. But the marginpar is typeset where the environment is written, not where the float is output, if you see what I mean. How can I get something to float with the table?


title: Orientate page horizontally?

text: Is it possible to make on table to be oriented horizontally? I have a big table that I need to fit on one table and this is only way it can be done (except of using VERY small font).


title: Allow only certain commands in own environment

text: I would like to define an environment `myenv` and allow only certain predefined commands to be executed betwwen `\begin{myenv}` and `\end{myenv}`. For example I want text typed there to be ignored and also to give a list of commands which are allowed. Is there a way to achieve this? Thanks.


title: biblatex-chicago and biber problem: unprocessed references, left with citation keys in pdf

text: I'm trying desperately to learn LaTeX for writing humanities papers. I'm using TeXShop for Mac and I try to produce a biblatex-chicago style document using biber. I've tried to put together templates from various places online and I recently found this question which addressed a problem very similar to mine: Get biblatex-chicago working When I try to typeset the file given there, viz.:               \documentclass{article}     \usepackage[nopar]{lipsum} % for dummy text     \usepackage[american]{babel}     \usepackage[babel]{csquotes}     \usepackage[notes,natbib,isbn=false,backend=biber]{biblatex-chicago}       \begin{filecontents}{\jobname.bib}     @book{Saussure1995,     Author = {Ferdinand de Saussure},     Origyear = {1916},     Publisher = {Payot},     Title = {Cours de Linguistique G{\'e}n{\'e}rale},     Year = {1995}}          @book{Labov1972,     Address = {Philadelphia},     Author = {William Labov},     Publisher = {University of Pennsylvania Press},     Title = {Sociolinguistic Patterns},     Year = {1972}}          \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}               \lipsum[1]\autocite{Saussure1995}          \lipsum[2]\autocite{Labov1972}               \end{document}      My references don't get processed, but I just get the citation keys (Saussure1995, Labov1972) in the footnotes (at least they are created properly, so I guess the biblatex-chicago is working). The output tells me to:               LaTeX Warning: Writing file `./try.bib'.          (/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex-chicago/cms-american.lbx (/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/lbx/american.lbx (/usr/local/texlive/2012/texmf-dist/tex/latex/biblatex/lbx/english.lbx))) (./try.aux) No file try.bbl.          LaTeX Warning: Citation 'Saussure1995' on page 1 undefined on input line 26.          LaTeX Warning: Citation 'Labov1972' on page 1 undefined on input line 28.          [1{/usr/local/texlive/2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./try.aux)          LaTeX Warning: There were undefined references.          Package biblatex Warning: Please (re)run Biber on the file: (biblatex) try (biblatex) and rerun LaTeX afterwards.      And when I run               biber try.tex      (try.tex being the name of the file) in the terminal, I get:               INFO - This is Biber 0.9.9     INFO - Logfile is 'try.tex.blg'     ERROR - Cannot find control file 'try.tex.bcf'! - did you pass the "backend=biber" option to BibLaTeX?     INFO - ERRORS: 1      I am running Mac OS X Mountain Lion and TeXLive-2012, and I've updated all my packages through TeX Live Utility. I'd be very grateful for all the help I can get!


title: How to create bibliography for german thesis, preferably according to the german standard DIN~1505 with biblatex?

text: For my Ph. D. thesis I want to create a bibliography according to the suggestions given in the german standard **DIN 1505**. There exists a quite old style dinat.bst (see TeXFAQ) which I had used in a slightly modified version for my diploma thesis many years ago. I read a lot of positive things about `biblatex` and I'm currently planning to switch from my old `bibtex` to `biblatex` to hopefully better configure the bibliography. However it would be very helpful (and I'm quite sure somebody must have done this before me) to have a readily configured citation style which corresponds (or comes close to) to the DIN 1505 and which works with `biblatex` (even if it is not perfect). I did not find anything about that in the `biblatex` manual, but maybe I've overlooked it... * * * I found 2 documents defining the requirements: _(I'm sorry: they're both in German which makes sense, as it is a german standard.)_   * Das Literaturverzeichnis in wissenschaftlichen Arbeiten : Erstellung bibliographischer Belege nach DIN 1505 Teil 2 von Klaus F. Lorenzen (2nd ed, Jan 1997)   * Kurzreferenz Zitieren (v 1.0, 1999) _this is a short and simplified description_


title: Styling very long index entries to look more aesthetic

text: I wrote the following style for `makeindex`:               headings_flag 1     heading_prefix "{\\bfseries "     heading_suffix "}\\nopagebreak\n"     delim_0 " \\dotfill "     delim_1 " \\dotfill "     delim_2 " \\dotfill "      which works pretty good. It happens that I have some very long index entries, and their display is not what I expected. This is a MWE:               \documentclass{article}          \usepackage{makeidx}          \makeindex          \begin{document}     Hello.\index{Hello}     Hello again.\index{Hello again}     Hi there.\index{Hello there, this is a very long text here}     \printindex     \end{document}      When I run `makeindex mwe.idx -s mystyle.ist`, this is the output: ![Index 1](http://i.stack.imgur.com/b7FAi.png) To be honest, I was expecting something like this: ![Index 2](http://i.stack.imgur.com/qJrvJ.png) I tried to find some help on styles in _The LaTeX Companion_ book, but I could not assimilate much. I'm relying on the belief that I could solve this by using a proper `ist` file. Any ideas?


title: Rotating figures to point to the outside edge

text: I am writing my thesis in LaTeX `book` style. I have a large figure that I want to rotate to make it viewable sideways. I can do this with the `includegraphics` option `angle=90`. My question: Is there a way to automatically rotate through -90 degrees on even pages and 90 degrees on odd pages so that the lower edge of the figure is always at the outside edge of the book page?


title: hyphenation problem with the character &

text: How to produce the hyphenation of the word (BM&FBOVESPA) I tried to use `\hyphenation{BM\&F-BO-VES-PA}` in the preamble but did not work


title: List of <newfloat> with zero caption in text

text: new Float type: Illustration How to make a list of illustrations, with captions in the list, but for the illustrations to appear in the text with zero captioning - image only.


title: Double square brackets in TikZ with pgfmathparse?

text: Why can’t I use `\llbracket` in the following example?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes,graphs,graphs.standard,quotes}     \usepackage{stmaryrd}          \begin{document}     \begin{tikzpicture}          \def\a{{     "\llparenthesis"     ,"\llbracket" % With this line, it fails!     ,"\llparenthesis"     }}          \draw (0,1) node{$\llparenthesis$};     \draw (1,1) node{$\llbracket$};          \foreach \x in {0,1}     {\draw (\x, 0) node {$\pgfmathparse{\a[\x]}\pgfmathresult$};} % (*)          \end{tikzpicture}     \end{document}        1. Using `\llparenthesis` and `\llbracket` in normal draw works   2. Using `\llparenthesis` works when using it in `\pgfmathparse`, indexing from array, whereas `llbracket` in the same place doesn’t (line (*))   3. Both commands are from the `stmaryrd` package (not including the package doesn’t doesn’t allow 1.). Activating the commented line produces this error: > ! Package PGF Math Error: Unknown operator `4' or`44' (in '{ "\llparenthesis > " ,"\delimiter "444A471 " ,"\llparenthesis " }[0]'). See the PGF Math > package documentation for explanation.


title: Remove page numbering from a long table in landscape

text: I am trying to remove the page numbering from a very wide and long table in landscape. When I try using `\thispagestyle{empty}`, this removes only the page numbering on the part of the table filling the first page only, leaving the other page numbers overlapping the table contents. I have also tried using the package `floatpag` described here: Suppress page number for a single page that only contains one large table? But it makes no difference to the landscape page number position. Please help me. This is my script:               \documentclass[10pt]{article}     \usepackage[font=scriptsize]{caption}     \usepackage{graphicx}     \usepackage{pdflscape}     \newcounter{z}     \def\z{\stepcounter{z}[[[[[\thez]]]]]}     \makeatletter          \def\fudge#1#2{%     \addtolength\textheight{#1}%     \@colroom\textheight     \vsize\textheight     \@colht\textheight     \def\LS@rot{%      \setbox\@outputbox\vbox{\hbox{\kern-#2\rotatebox{90}{\box\@outputbox}}}}%     \clearpage}          \makeatother               \usepackage{longtable}     \usepackage{fancyhdr}     \pagestyle{myheadings}               \begin{document}          \begin{landscape}     \fudge{3cm}{1.5cm}% 3cm longer and raise by 1.5cm     \advance\LTcapwidth by 360pt      {\footnotesize  % Switch from 12pt to 11pt; otherwise, table won't fit     \setlength\LTleft{-100pt}            % default: \fill     \setlength\LTright{-30pt}           % default: \fill     \begin{longtable}{@{\extracolsep{\fill}}lllllllllllllll@{}}     \caption*{     \bf{All results}}     \tabularnewline \hline     col_1 & col_2 & col_3 & col_4 & col_5 & col_6 & col_7  & col_8 & col_9 & col_10 & col_11  & col_12 & col_13 & col_14 & col_15\\     This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\     This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\     This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\     This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\     This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\     This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\     This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\     This & is & a & long & and & wide & table & bla & bla & bla & bla & bla & bla & bla & bla \\     \hline       \end{longtable}}     \begin{flushleft} Results using a long and wide table \end{flushleft}     \end{landscape}          \end{document}


title: TeX Live 2012,  XeLaTeX, moderncv, error "Failed to convert input string to UTF16"

text: I'm getting this error from moderncv version 1.1.1. With earlier version everything was ok and I did not make any changes to my tex document. I don't use any special font. File encoding is set to utf-8. What is the problem?


title: 'Nudging' overset characters downwards

text: I am trying to make a vector-like symbol to use in a paper I'm writing. I am actually able to make almost exactly what I want in Mathematica, in which it looks like this: ![enter image description here](http://i.stack.imgur.com/Bn4Zs.png) In TeX I am using `$\overset{\rightharpoonup}{\Gamma_{\! G}}$`, which yields: ![enter image description here](http://i.stack.imgur.com/8k1Xa.png) The harpoon on top is set too high. Also, the high harpoon makes problems with line spacing, which should be evident from the following image: ![enter image description here](http://i.stack.imgur.com/J4Ga1.png) How do I "nudge" the `\rightharpoonup` down so it isn't set so high above the `\Gamma`?


title: Open pdf graphic in graphics editor by clicking link in LaTeX or output pdf?

text: It would be very handy to be able to open a linked graphic file (e.g: pdf) in a graphics editing program (e.g: Illustrator, Inkscape) simply by clicking on the link in the LaTeX editor or by clicking on the graphic in the output pdf. Are there any editors or pdf viewers that support this?


title: Is there a method just write `____` to get a underline hphantom, which width is 4em?

text: I need typography some fillblank items. I want write               \item We are ____ sure that his skills qualify him for the job.      instead of               \newcommand{\blanks}[1][4em]{\underline{\makebox[#1]{}}}     ...     \item We are \blanks sure that his skills qualify him for the job.      for readability. Could anybody help me? EDIT               \documentclass{article}     \usepackage{calc,url,graphicx}% or hyperref          % \newcommand*{\blanks}[1][4em]{\rule{#1}{.4pt}}          % \catcode`\_=\active          % \def_{\blanks[1em]}          % \everymath{\catcode`\_=8\relax}          % \newcommand*{\makeunderscorenormal}{\catcode`\_=8\relax}     % \newcommand*{\makeunderscoreweird}{\catcode`\_=\active}     % \newcommand*{\blank}[1]{\blanks[\widthof{#1}]}          \begin{document}     \includegraphics{a_b/1.png}     % We are ____ sure that his skills qualify him for the job.              % We are \blank{not} sure that his skills qualify him for the job.              % \url{http://www.tex_stackexchange.com}              $ 1_2 $     \end{document}      does work, while               \documentclass{article}     \usepackage{calc,url,graphicx}% or hyperref          \newcommand*{\blanks}[1][4em]{\rule{#1}{.4pt}}          \catcode`\_=\active          \def_{\blanks[1em]}          \everymath{\catcode`\_=8\relax}          \newcommand*{\makeunderscorenormal}{\catcode`\_=8\relax}     \newcommand*{\makeunderscoreweird}{\catcode`\_=\active}     \newcommand*{\blank}[1]{\blanks[\widthof{#1}]}          \begin{document}     \includegraphics{a_b/1.png}     We are ____ sure that his skills qualify him for the job.              We are \blank{not} sure that his skills qualify him for the job.              \url{http://www.tex_stackexchange.com}              $ 1_2 $     \end{document}      does not.


title: How can I change the text color in such a way that the effect transcends groups?

text: I'd like to have a command `\globalred` that makes all subsequent text red, even if the command is issued inside a group. For example, the output of the TeX file               \documentclass{article}     \begin{document}     a {\globalred b} c     \end{document}      should be  ![desired output](http://i.stack.imgur.com/Vx7IC.png), with a red `c`. I do have some very hacky solution, but it only works by redefining the `\set@color` and `\reset@color` commands from `pdftex.def` to what they where up to version 0.03t (or by using an old TeX installation before 2007):               \documentclass{article}     \usepackage[pdftex]{xcolor}     \makeatletter     \def\set@color  {\pdfliteral{\current@color}%                      \aftergroup\reset@color}     \def\reset@color{\pdfliteral{\current@color}}     \def\globalred  {\xdef\current@color{\xcolor@ {}{1 0 0 rg 1 0 0 RG}{rgb}{1,0,0}}%                      \set@color}     \makeatother     \begin{document}     a {\globalred b} c     \end{document}      This leads me to the following questions:   * Is there an "official" way to achieve what I want?   * Why doesn't `\set@color` from more recent `pdftex.def` versions act globally anymore, although I globally redefine `\current@color` with `\xdef`? (Is this a design choice or just an unforeseen side effect of the new implementation of `\set@color`?) Let me shortly explain how I came up with this: in my hacky code above, I'm roughly emulating what `beamer` does to produce transparent text. `beamer` aims to do this in a way that transcedes groups (see the user guide, pages 24 and 79), but it appears that it doesn't work anymore; at least for me, the example on page 79 gives strange output: ![strange output of itemize with pauses](http://i.stack.imgur.com/HzaA3.gif) The same problem (and hacky solution) came up in this question my mine.


title: Nested If and For in algorithm2e

text: I have the following code in algorithm2e with boxruled, vlined, and linesnumbered options. pdflatex gives me an empty line at the end of both the for loops inside the ifs. Can someone please suggest a way to get rid of the extra lines? Thanks.               \If {$\lfloor c\ (\log (n+1) - \log n) \rfloor > 1$}     {         $u \leftarrow {\tt SampleControl}$\;         $U \leftarrow \{ u \} \cup U_m$\;     }     ${\tt ConnectState}(z, S_{n+1}, U, P_n, Q_n, \delta_n)$\;     \eIf{$\min_{u \in U} \Delta t_{n+1} (z_{n+1}, u) \leq \delta_n$}     {   $\delta_{n+1} = \delta_n/2$\;         \For{$z \in S_{n+1}$}{             ${\tt ConnectState}(z, S_{n+1}, U, P_{n+1}, Q_{n+1}, \delta_{n+1})$\;     }}{ $\delta_{n+1} \leftarrow \delta_n$\;         \For{$z' \in Z_\mathrm{near}(z_{n+1})$}{             ${\tt ConnectState}(z', S_{n+1}, U, P_{n+1}, Q_{n+1}, \delta_{n+1})$\;     }}


title: How to add horizontal line after header and before footer?

text: How can I add horizontal line after header and before footer?               header     ---------          ---------     footer


title: How can I use ucharclasses to change the font for a special script and then restore to what it was before?

text: I would like to change the font in XeLaTeX when I enter a new Unicode block with a certain Script (e.g. Devanagari for Hindi languages). The `ucharclasses` package seems to do exactly that. However, when I leave the place where the different script is used and go back to what I had before (e.g. latin script) I loose the formatting (e.g. boldface) and the font size. To illustrate, try this:               \documentclass[10pt,a5paper,DIV12,BCOR8.25mm,twoside,parskip=half]{scrreprt}          \usepackage[Devanagari]{ucharclasses}     \usepackage{xltxtra}     \usepackage{fontspec}     \setmainfont[Mapping=tex-text]{Liberation Serif}     \setsansfont[Mapping=tex-text]{Liberation Sans}     \setmonofont[Mapping=tex-text]{Liberation Mono}     \newfontfamily\hindifont{Siddhanta}     \setTransitionsFor{Devanagari}{\hindifont}{\rm}               \begin{document}     \tableofcontents     \section{A latin script section}     Some latin script     \section{Devanagari: ताजा धनिया के साथ अनायास and so on}     A mixture \textbf{ of normal text and ताजा धनिया के साथ अनायास Devanagari script} in bold     \section{Some more latin script}     Some latin script     \end{document}      The output looks like this: ![Script changes](http://i.stack.imgur.com/wagqF.png) The `\setTransitionTo` correctly picks up the Devanagari script and changes the font to Siddhanta. However, when I come back to latin script, the boldface is gone and the fontsize is increased. The table of contents line shows the same problem. N.B. `\setTransitionsFor{...}{...}{...}` is what the documentation describes as `\setTransitions`. The doc seems to be wrong.


title: Centering contents name with [twocolumn] contents

text: I'm trying to make Table of Contents in two columns, but I'd like to center the contents name. Now I'm doing               \twocolumn     \tableofcontents      but these commands give something like this:               Contents name   section 3     section 1       section 4      section 2       section 5      while I'd like to obtain something like this:                   Contents name     section 1   section 3     section 2   section 4       I cant find out how can I achieve this...


title: displaying 3 references in resume on the same line

text: I am using the following template (from "References" section in a CV). The problem is that I only have 3 references so I would like to place them harmoniously into a single line. I was thinking about using multicols (that automatically sets the correct column width) but I do not know hox to proceed.               \documentclass[10pt]{article}     \usepackage{marvosym} % For cool symbols.     \usepackage{hyperref}          \begin{document}          \begin{tabular}{lr}     % Referee 1     \begin{minipage}[t]{2.5in}     Prof.\ X Y\\     Place A\\     Location B\\     Country and Postcode\\     \Telefon\ +00 1 234 5678\\     \Letter\ \href{mailto:X@A.ac.jp}{X\textrm{@}A.ac.jp}     \end{minipage}     &     % Referee 2     \begin{minipage}[t]{2.5in}     Prof.\ X Y\\     Place A\\     Location B\\     Country and Postcode\\     \Telefon\ +00 1 234 5678\\     \Letter\ \href{mailto:X@A.ac.jp}{X\textrm{@}A.ac.jp}     \end{minipage}     \\     \\ % Additional newline for spacing.     % Referee 3     \begin{minipage}[t]{2.5in}     Prof.\ X Y\\     Place A\\     Location B\\     Country and Postcode\\     \Telefon\ +00 1 234 5678\\     \Letter\ \href{mailto:X@A.ac.jp}{X\textrm{@}A.ac.jp}     \end{minipage}     \end{tabular}          \end{document}


title: crossing out whole slide with LaTeX beamer

text: Is there a way to draw a huge red cross (x) on top of a slide in LaTeX beamer? I want to discuss a position and then say that it is definitely wrong and mark this by crossing out the whole page. It would be great if this cross looked like drawn by hand.


title: Continued figures

text: %This is figure 1             \begin{figure}               \centering               \caption{blahblah}               \label{figure1}                  \vspace{0.5 cm}                  \begin{center}             \fontsize{10pt}{12pt}\selectfont Panel A             \end{center}             \includegraphics[scale=0.8]{s1.pdf}                  \vspace{1 cm}                  \begin{center}             \fontsize{10pt}{12pt}\selectfont Panel B             \end{center}             \includegraphics[scale=0.8]{s2.pdf}                       \end{figure}                       %This is Figure 1 continued             \begin{figure}             \vspace{-1.8cm}               \centering               \caption{blahblah}               \label{figure1cont}                  \vspace{0.5 cm}                  \begin{center}             \fontsize{10pt}{12pt}\selectfont Panel C: Bank $\Delta$\textit{CoJPoD}             \end{center}             \includegraphics[scale=0.8]{s3.pdf}                  \vspace{8 cm}                       \end{figure}               %This is figure 2     \begin{figure}       \centering       \caption{blahblah}       \label{figure2}          \vspace{0.5 cm}          \begin{center}     \fontsize{10pt}{12pt}\selectfont Panel A     \end{center}     \includegraphics[scale=0.8]{s4.pdf}          \vspace{1 cm}          \begin{center}     \fontsize{10pt}{12pt}\selectfont Panel B     \end{center}     \includegraphics[scale=0.8]{s5.pdf}          \end{figure}      * * * When I use the above, I get my first figure is called Figure 1, however the second figure (which is meant to be called Figure 1 (Cont.)) appears as Figure 2 on the next page and the final figure (which is meant to be called Figure 2) appears as Figure 3. I also tried using `subfig` package with `\ContinuedFloat`:                       %This is figure 1             \begin{figure}               \centering               \caption{blahblah}               \label{figure1}                  \vspace{0.5 cm}                  \begin{center}             \fontsize{10pt}{12pt}\selectfont Panel A             \end{center}             \includegraphics[scale=0.8]{s1.pdf}                  \vspace{1 cm}                  \begin{center}             \fontsize{10pt}{12pt}\selectfont Panel B             \end{center}             \includegraphics[scale=0.8]{s2.pdf}                       \end{figure}                       %This is Figure 1 continued             \begin{figure}             \vspace{-1.8cm}                   %Using ContinuedFloat here                 \ContinuedFloat               \centering               \caption{blahblah}               \label{figure1cont}                  \vspace{0.5 cm}                  \begin{center}             \fontsize{10pt}{12pt}\selectfont Panel C: Bank $\Delta$\textit{CoJPoD}             \end{center}             \includegraphics[scale=0.8]{s3.pdf}                  \vspace{8 cm}                       \end{figure}               %This is figure 2     \begin{figure}       \centering       \caption{blahblah}       \label{figure2}          \vspace{0.5 cm}          \begin{center}     \fontsize{10pt}{12pt}\selectfont Panel A     \end{center}     \includegraphics[scale=0.8]{s4.pdf}          \vspace{1 cm}          \begin{center}     \fontsize{10pt}{12pt}\selectfont Panel B     \end{center}     \includegraphics[scale=0.8]{s5.pdf}          \end{figure}      But all this does is it makes my first figure called "Figure 1", then my Figure 1 continued figure is named as "Figure 0" and the figure that's meant to be my Figure 2 called Figure 1. Any help would be appreciated.


title: Showcase of beautiful presentations in Beamer

text: I would like to know to what extent Beamer can produce professional presentations. The following following are the requirements :   1. The contribution must be a TeX solution to this question.   2. Usage of **user-defined packages** and **fonts** is allowed.   3. For drawing the diagrams (Smart Arts or 3D diagrams) `TikZ`, `pstricks` or `asymptote` can be used.    4. The submission should include a short description and a screenshot of the output.   5. There aren't sample layouts. The limit is your own imagination. ## Note 1: **   1. On 25th May 2014, I have decided to close my question and accept the showcases   2. I have decided to provide a bounty of 200 for the best solution ** ## Note 2: **BTW, I just wanted to know the fantastic features of beamer. So introduced a Showcase question similar toShowcase of beautiful typography done in TeX & friends and Showcase TeX Typography for TUG's Calendar and these are not a part of my assignments ;) **


title: Highlighting a Chunk of Code within a lstlisting by specifying the line number

text: This question in somehow related to http://stackoverflow.com/questions/1304315/highlighting-a-chunk-of-code- within-a-lstlisting but not exactly the same. I want to make some slides with animation where one can see the execution of a program. The code is printed with `lstlisting`. In order to make the code more readable, I want to highlight the line that is currently executed. The URL I show above has a solution where one modifies the code. Since I want to make animations, the code itself remains the same. Therefore it would be useful that I can just specify the line number and LaTeX will do the rest. Is there some way to do this?


title: Reference list, wrong language? ("and" between authors, and "in", ref text in a book)

text: In the title of the reference list is in the correct language. But between authors it says "and" and not "og". I'm using Norwegian.               @book{spenn,        author = {Berge,Anne and Jomisko,Anne and Næss,Eli},        year = {2006},        title = {Spenn studieforbedredende VG1},        publisher = {Cappelen},        pages={63},     language={norwegian}      }      This will give me: and between the authors. I can't use "og" in the bibtex file? And in this:               @incollection{nov1,        author={Morten Sangvik},        year={2003},        title={Jeg elsker deg},        booktitle={To ubesvarte anrop},        publisher={Dinamo forlag},     language={norwegian}      }      It says "in" and not "inn" which it should be in Norwegian? Thank you so much for any help :) Edit: I FIXED the "and" part, I could just use my native language for and in the bibtex file and it worked. But the "in" is still a problem, any suggestions?


title: Rotate voltmeter CircuiTikz

text: I'm using Latex and CircuiTikz to draw circuits but I can't rotate de voltmeter without making a disaster. Any idea? Here is an example.               \begin{circuitikz}     \draw     (0,0) to[ammeter] (3,0)           to (4,0)           to[lamp] (4,-2)           to (0,-2)           to[sV] (0,0);     \draw (3,0) to[voltmeter] (3,-2);     \end{circuitikz}      ![enter image description here](http://i.stack.imgur.com/bYsXY.png)


title: ConTeXt - Make text embody figure and respect margins

text: I am trying rewrite an already formatted layout to ConTeXt, but I face two major problems. Please have a look at the goal I am aiming at and at the source code below.   I have tried many suggestions from various manuals and the wiki, however, there is no way I can format the layout as depicted. Having tried   \startfiguretext, the text stays in it's narrow structure.   \placefigure does allow me to place the bold text in the first line only if the text above is the picture.   \starthangaround could work, but there is always an offset between the text area and the - invisible - frame. Not to mention, I do not get it it to the right hand side.   Either way, those paragraphs borders get violated easily, \hboxes are overfull constantly. Messing around with sloppypar or emergencystretch did not help. Any help is greatly appreciated. Thank you.   Link to Layout: http://www-user.tu- cottbus.de/~kitzmrob/desiredLayoutScreenshot.png                 \enableregime   [utf-8]     \setuppapersize         [A5][]     \setuplayout[           height=middle,                         location=middle,                         backspace=2.0cm,                                     leftmargin=1.5cm,                                    leftmargindistance=0.25cm,                         width=10.80cm,                                   rightmargin=1.5cm,                         rightmargindistance=0.25cm,                         topspace=0.35cm,                                     header=0.5cm,                                        headerdistance=1.15cm,                               footer=0.5cm,                         footerdistance=0.75cm,                         bottomspace=0.75cm,                 ]          \starttext          \starthangaround {         \framed         [%align=bottom, % unclear behavior                         frame=on,       % visible for demonstration                         width=.475\textwidth]         {\externalfigure [amIaCow?] [width=.475\textwidth]          % \crlf         % \placefloatcaption         % [figure]         % [ref:acow]         % {undesiredCaption}         }     }     {\bf Bold text \hfill Bold text}     \input montgomery     %\input davis     %\input zapf     %\input thuan     %\input knuth     %\input dawkins          \stophangaround          \stoptext


title: Compile only outline and comments/ Synopsis view

text: Since I am about to quit using orgmode for my PHD I am wondering whether something like a synopsis package exists (google didn't give me an answer about that). What I need: I have a short synopsis of every chapter, section subsection... for myself to structure the dosument. Normally I do not want to export these. From time to time I'd like to read my document in it's full structure with only the synopses in it. How it could be achieved (I am not into creating styles and doing wierd things in latex): \- write the synopsis as comments and only process headings and comments during \- have some special environment synopsis and porcess only outline and synopsis environment. Any packages out there? Ideas of yours?


title: How to use OpenType fonts with plain-LuaTeX?

text: Is it possible to have OpenType fonts with LuaTeX using the plain format? I have tried:               \font\test="texgyrepagellaregular"\test test\bye      but I get `! Font \test=texgyrepagellaregular not loadable: metric data not found or bad.`. `mtxrun --script fonts --list --all --pattern=pagella` shows the above font name when I followed the instructions at http://wiki.contextgarden.net/Fonts_in_LuaTeX. But on actually using the fonts, the page switches to speaking of ConTeXt instead of LuaTeX, which leaves me to wonder if it is possible to use OT-fonts with plain? ## UPDATE Even though this now works fine for fonts which are located in my home directory (OSX Lion, BasicTeX2012, `luatex-plain`-format constructed as instructed below), I am unable to use fonts which are located in the system directories. So while the above example works (with `texgyrepagellaregular`), as the `mtxrun`-script shows its location as `~/Library/Fonts`, the following doesn't:               \font\test="minionproregular"      presumably because `mtxrun` shows its location as `/Library/Fonts` (the same issue seems to be with fonts inside `/System/Library/Fonts`). Now, I added to my `~/.zshrc`:               export OSFONTDIR=/System/Library/Fonts:/Library/Fonts:$OSFONTDIR      after which I was able to update the fonts database with `mtxrun --script fonts --reload` (following these instructions), and indeed now the `mtxrun` listing does show all of the fonts. It's just that `luatex-plain` doesn't see them. How can I make `luatex-plain` see the fonts `mtxrun` sees?


title: Making a centrefold figure

text: I'm laying out a 16-page booklet that has a two-page MetaPost figure spanning the centrefold. The intention is that the centrefold is "outside" the flow of the text: the image is always on pages 8–9, while the text from page 7 continues on page 10. However, it's really not important that it's a figure: it could be arbitrary text in the centrefold and the problem would be the same. It's having the centrefold skipped by the normal text flow, while still having fixed content, that is the problem. Currently, my prototype is doing this by brute force:               Lorem ipsum dolor sit amet, consectetur adipiscing elit.     Duis eu ultricies ipsum. Morbi in nibh varius metus viverra     condimentum sit amet eu sem. Nulla facilisi.            % break this section manually to make the centrefold work…          % start the centrefold         \page[8]     \setupfooter[state=stop]          \setupbackgrounds[page][background={centrefold}]          \page[10]     \setupfooter[state=start]          % …and continue with the rest of the section          Vivamus tincidunt bibendum dapibus. Maecenas sollicitudin     arcu ornare arcu pellentesque suscipit.      I'm trying to generalise this into a template for a project that will have several similar documents. There must be a better way! Mustn't there? I've approached the problem from a few angles, but haven't made any headway for lack of knowing the codebase well enough to know what's possible:   * "Can a float be forced to appear on a certain page? Hmm, not that I can find…"   * "Can I insert a page retroactively into the pagination? No commands I can find. Could do it in Acrobat, but yuck…"   * "Can I use buffers and measures…? I really don't know where to start with that idea."   * "Can I suspend normal layout at the end of page 7, execute arbitrary commands, and continue layout? No idea…" I'm aware that often with a high-level problem like this might be many solutions using completely different combinations of ConTeXt's features. I'm just unfamiliar enough with the fine details of the available commands to know the _one_ feature that I could build this around. To compound the problem, I have two additional constraints and one possible saving grace:   * I have to have the text that flows across pages 7 and 10 split between paragraphs – I can't have a paragraph spanning the interrupting centrefold pages. I figure that's likely a separate problem, but given that I've no idea how the page interruption could be accomplished, I figure it deserves mention.   * I'm stuck using MKII for the time being for this document. However, if the only possible solution is a MKIV one, I could shelve this project until there's time for converting it to MKIV.   * The saving grace is that the section that needs to flow from page 7 to page 10 _always_ starts page 7 and _always_ ends on page 10. That might simplify a solution, as a solution doesn't need to be generalised beyond these four pages of the document. If I could hardcode "any text overflow from 7 goes to 10, figure starts on page 8" then I'd gladly do it.


title: How to illustrate and execute a MWE within another document

text: In Show output of a full LaTeX document I provided a partial solution to a similar question. The following code is an attempt to _simulate_ the running of a full MWE within another document as for example a tutorial for LaTeX. The code produces an output as per the image below: ![enter image description here](http://i.stack.imgur.com/xFNRY.png) The top part of the box is the code and the bottom part the LaTeX output. The code sandboxes the `begin{document}...\end{document}` macros in order to disable them within the example code and only just typeset them. **I am looking for a method to import packages or classes at this point and only run them locally within the example. How can this be achieved?** An approach would be to just let `ProvidesPackage` etc... to empty, disable the `\@preamblecmds` and use `globaldefs` to ensure that the code only runs within a group.               \documentclass{article}     \usepackage[listings]{tcolorbox}     \usepackage{amsmath,amsfonts,lipsum}     \begin{document}     \makeatletter     \gdef\@preamblecmds{}     \def\documentclass#1{}     \def\usepackage#1{}     \let\Document\document     \let\Enddocument\enddocument     \def\document{}     \def\enddocument{}     \gdef\after@@{\let\enddocument\Enddocument\let\document\Document}     \newenvironment{tex}{       \tcblisting{boxrule=1pt}}     {\endtcblisting\aftergroup\after@@}     % auto example     \begin{tex}     \documentclass{article}     \usepackage{amsmath}     \begin{document}      \section{Introduction}        Whence we conclude that $\gamma$ is a primitive root modulo $p$. But       \begin{align*}       \gamma^{p-1}-1 &=          g^{p-1} - 1 + \frac{p-1}{1!}g^{p-2}xp +             \frac{(p-1)(p-2)}{2!}g^{p-3}x^2p^2 + \ldots \\         &= p\left(kp + \frac{p-1}{1!}g^{p-2}x +             \frac{(p-1)(p-2)}{2!}g^{p-3}x^2p + \ldots\right).       \end{align*}     \end{document}     \end{tex}     \bigskip     \lipsum[1]     \end{document}


title: Centering piece-wise function equation in LibreOffice

text: I'm sorry if this is off-topic. I am using the TexMaths extension in LibreOffice and I'm attempting to center an equation. However, the equation simply gets displayed and I am unable to alter its horizontal position. So I tried to do this through LaTex but I am unable to get that to work as well. This is what I have so far:               \begin{center}     \[f(x) = \left\{       \begin{array}{ll}         sin(x) & : 0 \le x \le 2\pi\\         -2sin(\dfrac{x}{2}) & : 2\pi < x \le 6\pi\\         4sin(x + 2\pi) & : 6\pi < x \le 14\pi\\         sin(x) & : x \ge 14\pi       \end{array}     \right.     \]     \end{center}      But this still doesn't center it.


title: TeXstudio Newest Edition Crashes

text: I have upgraded to TeXStudio 2.6.6 via the package manager in Ubuntu 12.04 LTS since the one in the repository was way too old. However, when I launch the application and try to open a file or check Latex installation an error box appears as I added here. Furthermore, when I click OK the system crashes and I cannot open the terminal or close TeXStudio leaving me with no choice but to restart the computer by holding the power button. I have tried reinstalling and uninstalling multiple times with no solution and would greatly appreciate any help and suggestions provided. EDIT: The problem is solved I found a dictionary with featuring two files one with .aff extension and the other with .dic extension. However, I am still puzzled about how a missing dictionary in a program can crash the whole system. Thanks in advance ![Error message](http://i.stack.imgur.com/IgbdR.png)


title: Text box to insert a graphic

text: How can I use a text box to insert a graphic? I got the following code and I must modify it in order to insert a graphic. What should I do?               \begin{figure}[thpb]           \centering           \framebox{\parbox{3in}{We suggest that you use a text box to insert a graphic (which is ideally a 300 dpi TIFF or EPS file, with all fonts embedded) .     }}           %\includegraphics[scale=1.0]{figurefile}           \caption{Inductance of oscillation winding on amorphous            magnetic core versus DC bias magnetic field}           \label{figurelabel}        \end{figure}


title: Two tabulars in one Table but in different pages

text: ![enter image description here](http://i.stack.imgur.com/kOYiI.png)I would like to ask you how could I have in one table two parts (tabulars) BUT in different pages? I tried bigskip or pagebreak but it does't work Thank you in advance


title: What is the purpose of defining font synonyms and how are they accessed?

text: In ConTeXt, one can define a font synonym, as shown in this simple typescript example at the ConTeXt Wiki. In following the example given, I cannot see any way to access the individual levels. I can use `{\nimbus This is some text.}` or `texcommand=\nimus` to set the font to Nimbus, but `{\Sans This is some text.}` and `\textcommand=\Sans`, does not let me access the font. This becomes a problem, as, if I need to change the font within the document, instead of changing `Sans` to the new font, I must instead rename all appearances of `\nimbus` throughout my source files.   * Why is `definefontsynonym` used?   * Why do options like `\Sans` and `\SansBold` fail to work in the same way that `\nimubs` does?


title: change draw color in a clipped region in tikz/pgf

text: I use `\clip` to clip a rectangular region of a drawing in a `tikzpicture`. I would like to have the lines in the clipped region to have a different color than their color in the original drawing. Would there be a simpler way of doing this? Or if this is possible?               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[scale=0.5]     \clip[draw] (0,0) rectangle (2*1.732,-3);     \def\hexagonpath{ +(30:1) -- +(90:1) -- +(150:1) -- +(210:1) -- +(270:1) -- +(330:1) -- cycle }     \foreach \x in {0,...,3}         \foreach \y in {0,...,3} {             \ifodd\x                 \draw (0,0) ++(0,-1/2-3*\x/2) ++(30:1) ++(30:\y * 2) ++(0,-\y) \hexagonpath;              \else                 \draw (0,0) ++(0,-3*\x/2) ++(30:\y * 2) ++(0,-\y) \hexagonpath;             \fi         }     \end{tikzpicture}     \end{document}


title: hyperref, how to make 'pdfborder' larger, or add some margin between the border and the text

text: Using the `hyperref` package, is there a way to make the border around the link or whatever larger so that it is not tightly sticked to the text? Like adding some margin between the text and the box around it?


title: Why does Vim highlighting treat _a differently than _b in math mode?

text: I am not using vim-latex, just the regular vim syntax highlighting for latex. To make sure of this I tested this by running:               vim -u NONE -N      I notice that if I am in math mode "f_a" will display with "_a" being the same color as the inside of "f_{a}" but when typing "f_b" the underscore displays red while "b" is the same color as f. I noticed that all numbers behave like a, and also a few other letters, including x, v, u and i. What is special about these letters? Why does the syntax consider them different? Is there a flavor of TeX where the difference is meaningful? I am only familiar with LaTeX...


title: How Can I display the number before section in bookmark?

text: I want to make a bookmark. I tried               \documentclass[12pt]{book}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \usepackage[unicode]{hyperref}     \begin{document}     \pdfbookmark{\contentsname}{Contents}     \tableofcontents     \chapter{Chapter one}     \section{Section one}     \subsection{Some tex}     \section{Section two}     \subsection{Some tex}     \chapter{Chapter one}     \section{Section one}     \subsection{Some tex}     \section{Section two}     \subsection{Some tex}     \end{document}      I got ![enter image description here](http://i.stack.imgur.com/2A0YJ.jpg) I want to have the subsection has the form `1.1 Subection one`,... How can I make bookmark like this picture? ![enter image description here](http://i.stack.imgur.com/Mjpel.jpg)


title: Sideways table cut off

text: I'm trying to create a sideways table with the informs3 class. After running pdflatex the table is cut off at the top and not properly centered on the page. If I change the document class the sideways table looks fine. What seems to be the problem? The code is provided below. Many thanks               \documentclass[trsc,nonblindrev]{informs3}     \usepackage{rotating,booktabs}     ....     ....     \begin{sidewaystable}           \caption{Comparison between the best solutions obtained with BLS and MGCH, in terms of the individual  GAP objectives.  }     \medskip     \scriptsize \centering          \begin{tabular}{p{5cm} | c c  | c c | c c | c c | c c | c c}     \hline     Objective  & \multicolumn{2}{c}{\underline{$D_1$}} & \multicolumn{2}{c}{\underline{$D_2$}}&\multicolumn{2}{c}{\underline{$D_3$}} & \multicolumn{2}{c}{\underline{$D_4$}} & \multicolumn{2}{c}{\underline{$D_5$}} & \multicolumn{2}{c}{\underline{$D_6$}}\\           & BLS & MGCH & BLS & MGCH & BLS & MGCH & BLS & MGCH & BLS & MGCH & BLS & MGCH \\     \hline     Min.(avg.) idle time bewteen activities at the same gate (in min.) &    10(212.7) & 10(212.3) & \textbf{15}(199.6) &    10(163.7) & \textbf{15}(193.6) & 10(182.3) & \textbf{15}(192.0) &10(175.3)   & 10(175.1) &  10(144.9) & 10(177.6) & 10(161.2) \\     Min.(avg.) idle time bewteen activities at shadowing gates (in min.) &  20(503.9) & \textbf{25}(607.8)  & 40(419.7) &   40(422.8) & \textbf{45}(458.4) & 15(363.7) &    \textbf{30}(789.1) & 15(517.6) & 20(342.9) & 20(368.2) & \textbf{20}(412.9) & 10(411.9) \\     Min.(avg.) idle time bewteen activities at the same gate group (in min.) & \textbf{5}(93.4) & 0(91.6) & \textbf{5}(85.7) &  0(59.2) & \textbf{5}(81.4) & 0(76.7) & \textbf{5}(85.5) & 0(65.5) & \textbf{5}(69.6) & 0(56.8) & \textbf{5}(83.3) & 0(76.9) \\          \hline      \end{tabular} \label{objective values}          \begin{tabular}{c | c c  | c c | c c | c c | c c | c c}     \hline      Objective  & \multicolumn{2}{c}{\underline{$D_{1to6}$}} & \multicolumn{2}{c}{\underline{$P0.87$}}&\multicolumn{2}{c}{\underline{$P.97$}} & \multicolumn{2}{c}{\underline{$P1.03$}} & \multicolumn{2}{c}{\underline{$P1.14$}} \\      & BLS & MGCH & BLS & MGCH & BLS & MGCH & BLS & MGCH & BLS & MGCH  \\     \hline          Min.(avg.) idle time bewteen activities at the same gate (in min.) & 10 (321.6) & 10 (323.3) & 10 (204.9) & 10 (207.9) & \textbf{15} (209.8) &  10 (212.6) & 10 (208.8) & 10 (211.1) & 10 (203.9) & 10 (208.5) \\     Min.(avg.) idle time bewteen activities at shadowing gates (in min.) &  \textbf{15} (1633.7) & 10 (1453.3) & \textbf{25} (583.7) & 10 (554.9) & \textbf{20} (546.6) & 15 (534.2) &  \textbf{25} (491.9) & 15 (533.8) & \textbf{25} (489.3) &    10 (567.2) \\     Min.(avg.) idle time bewteen activities at the same gate group (in min.) &  \textbf{5} (65.1) & 0 (47.1) & \textbf{5} (94.6) &  0 (89.0) & \textbf{5} (80.9) &  0 (84.7) & \textbf{5} (99.5) &  0 (83.0) &  \textbf{5} (77.3) & 0 (79.9) \\          \hline      \end{tabular} \label{objective values}     \end{sidewaystable}


title: Customizing TOC to my needs (right-adjusting section numbers)

text: This is the code I'm currently using the customize the section headers in my table of contents:               \usepackage[dotinlabels]{titletoc}     \titlecontents{section}[1pc]     {\addvspace{0pc}}     {\thecontentslabel.\hspace{3mm}}     {}     {\normalsize\titlerule*[6pt]{.}\contentspage}     [\addvspace{0pt}]      And the result looks like this: ![enter image description here](http://i.stack.imgur.com/szvgj.png) **Question:** How can I modify this such that all the section titles will be properly "left-aligned", even the ones starting with section 10? I want the section number to appropriately "move to the left", as required to make this happen. How do I accomplish this?


title: Compiling Error - TeXworks OS X Mavericks

text: When i try to compile in TeXworks, I receive this error: kpathsea: Running mktexfmt pdflatex.fmt mktexfmt: No such file or directory I can't find the format file `pdflatex.fmt'! I've used TeXworks before, and this error began when I upgraded to Mavericks. I have read multiple other similar questions, but none of those answers has solved my problem, or I have been unable to do them because of my lack of understanding. I don't remember all the solutions I've tried, but here are some: • Reinstalled MacTeX, done this three times. • Run FixMacTeX2013.pkg • sudo texhash • echo /usr/texbin > TeX sudo mv TeX /etc/paths.d • I've tried to Path it, but I do not know how to do this, at all. • Various other stuff. Please, help me!


title: Rotate curly brace in tikz

text: I found this question that shows how to draw curly braces in tikz and to mirror them using decorations. But, how can they be rotated an arbitrary angle? .


title: Automatically generated plots with Mathematica

text: I am currently using Mathematica to generate several plots later included in a LaTeX document. The process of exporting each of the graphs to eps/pdf and including these in the document is quite cumbersome, so I wonder if there is a standard way to automate it. I would like to have an environment `mathematica` which can be used as follows.               \begin{mathematica}     Plot[Sin[x], {x, 0, 6 Pi}]     \end{mathematica}      Ideally, the output graphic should be cached to avoid starting the expensive Mathematica process every time.


title: Beamer and newenvironments

text: I'm trying to combine beamer overlays and newenvironments:               \newcounter{scount}     \setcounter{scount}{0}     \newenvironment{sitem}[1]        {%before        \def\data{#1}        \stepcounter{scount}        \onslide<\value{scount}->{\item \data}        \comment        }{        \endcomment        }      and:               \begin{itemize}       \begin{sitem}{data}asdf1\end{sitem}       \begin{sitem}{data}asdf2\end{sitem}       \begin{sitem}{data}asdf3\end{sitem}     \end{itemize}      But beamer seems to ignore the \onslide command and shows all data values at once instead of data for asdf1, asdf2, asdf3 after each other.


title: Problem with encapsulated text in shaded node with tikz

text: I'm working with the TikZ package and I noticed that even though I get a correct pdf file with this .tex file (found in this forum):               \documentclass{article}      \usepackage{tikz}     \begin{document}     \tikzstyle{ball} = [circle,shading=ball, ball color=red!80!white, minimum size=1cm]     \begin{tikzpicture}     \node [style=ball] {blah blah};     \end{tikzpicture}     \end{document}      if for example I change the colour from red to blue and I open the pdf file, keeping open the first one, there isn't the expected colour background, but if I close both the files and I open one of them the first one is correctly visualized, whereas the second is not... Could someone tell me the reason of this problem?... and how to solve it... PS: I'm working with MiKTeX and TeXnicCenter on Windows


title: LyX Problem when referencing. Just question mark [?]

text: I am very new to LyX (no LaTeX background whatsoever) and cannot manage to properly insert citations. The problem is, within LyX the citation seems ok `[Sayer`], but when I render the PDF, I only get `[?]`. I have found similar problems, but with that information I can't make it work. LyX: Question mark [?] instead of reference number after installing new .bst file   Question mark instead of citation number As I understand, the two possible problems are unicode related, and some communication problem between BibTeX and LyX. I can insert citations from LyX, which means that at least it knows where the DB is, and apparently "understands" it. It's just a test, but this is what the DB contains (no strange unicode)               @book{Sayer,       author={Natalie J. Sayer},       title={Lean for Dummies}     }      And... when I check the log `Document > LaTeX Log`, I get the following Warning:               LaTeX Warning: Citation `Sayer' on page 1 undefined on input line 124.      Which yes, makes all the sense of the world, but I don't know what to do next. **EDIT** I have realized that I get different mistakes if I try to create the PDF from the "parent" file or from the "child" (i.e.: lyx document within lyx doc). From the child doc, the PDF is created with that `[?]`, but from the parent doc, it does not even compile. Apparently there is one mistake per reference I have introduced in the children docs:                ...Mass-Production-vs.-Lean-Enterprise}\citep                                                       {Sayer}     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.      Maybe this helps.


title: How to get single-spaced list environments in a double-spaced document

text: I am writing a double-spaced document based on the book class. I set the spacing using `\linespread{1.6}`. Is there a way to get all `enumerate`, `itemize`, and `description` environments to be single-spaced rather than the default double-spaced? I do not mean the spacing between the items, but rather the spacing between the lines of a given item. I would prefer a method that doesn't require me to define my own environment; I want to use the already existing `enumerate` etc. I expected there to be a way in the `enumitem` package to do it, but I don't see any information about line spacing in the documentation. Any ideas?


title: \url{} links with percent (%) signs and overfull hbox error

text: I have looked at the first comment to this question on % in urls and found that I didn't need to type `\` ahead of each `%`. However, in WinEdt 7.1, everything from the first `%` in the first URL is now greyed out and I do not know if this is why I am getting an error with the `overfull \hbox` when I compile to PDF. The problem in LaTeX is               proposal P293 (see \url{http://www.foodstandards.govt.nz/code/proposals/documents/Reanalysis%20of%20Nutriti.pdf} and \url{http://www.foodstandards.govt.nz/code/proposals/documents/P293_SD3.pdf} for the full analysis reports of the experiments).      The auto linebreak for the second URL should be after `/code` and not after `/proposals` as `/proposals` is going past the right hand margin in my document. How can I force the linebreak to occur in the correct place in the second URL and still have the link work correctly? The start of my report class is               \documentclass[11pt,PhD]{muthesis}     \usepackage[english]{babel}     \usepackage{amsmath,amsthm}     \usepackage{amsfonts}     \usepackage[a4paper,layout=a4paper,             bindingoffset=4cm,left=0cm,right=2cm,             head=2.5cm, bmargin=2cm]{geometry}      \usepackage{microtype}     \usepackage{verbatim}     \usepackage{graphicx}     \usepackage{url}      \usepackage[round]{natbib}     \usepackage{listings}     \usepackage{booktabs}      \usepackage{multirow}      \RequirePackage[l2tabu, orthodox]{nag}     \usepackage{cleveref}


title: How to make Kile's spell checker ignore comments and \todo?

text: I use Kile as my Latex editor. I really like Kile, but one of the things that I do find unbearable is the fact that does not seem to be a line or a command to force the spell checker to ignore a certain piece of text, like a \todo{text} tag written in a foreign language. Is there any solution for this?


title: How can I do this without the cases?

text: How can I do this without the cases?               $\begin{cases}       \dfrac{\partial u(x,y)}{\partial x}=2x=\dfrac{\partial v(x,y)}{\partial y} \\       \dfrac{\partial u(x,y)}{\partial y}=-2y=- \dfrac{\partial v(x,y)}{\partial x}       \end{cases}       \forall (x,y)\in \mathbb{R}^2$


title: Towards a \ucshape and \textuc command for uppercase text (XeTeX, LuaTeX)

text: While we have `\textit` and `\textsc`, `\itshape` and `\scshape` etc., there's no `\textuc` and `\ucshape` to typeset its argument in uppercase. There is `\MakeUppercase`, but -- as uppercase is not a font style -- it's not a font selection command and cannot be used like one. That's why it's of no use in, e.g., formatting headings. There's the seamus-egreg workaround, but that has its limitations, for example when exotic languages are used: `\section{daß}` produces »DAß« rather than »DASS«, etc. Traditionally, the only way towards a proper `\textuc`/`\ucshape` seemed to be via creating a virtual font in which all lowercase letters are replaced by uppercase ones. While I've seen a couple of people suggesting that approach, I don't think anyone has ever done it, probably because it's tedious and inflexible, as it's always tied to one specific font. My question is if it might be a good idea to rethink that issue now that we have Xe and Lua, where we can use OpenType Fonts and, via fontspec, OpenType feature files. In those feature files, we can define substitution rules that can be switched on and off. In OpenType, an f_i ligature, for example, is produced via such a substitution rule, saying »whenever in the code you come across an `f` followed by an `i`, replace the two by the glyph `f_i` in the output«. To tentatively answer my own question: yes, it might be. Consider the following example. [edit: now including a comparison with the `\MakeTextUppercase` command from the `textcase` package barbara mentioned.]               \documentclass{scrartcl}     \usepackage{fontspec,blindtext,microtype,filecontents,textcase}          \begin{filecontents*}{universalcaps.fea}     languagesystem DFLT dflt;     languagesystem latn dflt;          feature caps {          lookup ligatures {       sub f_i by F I;       sub f_l by F L;       sub f_f_l by F F L;       sub f_f_i by F F I;       sub f_f by F F;       sub f_j by F J;       sub f_f_j by F F J;       sub f_t by F T;       sub f_f_t by F F T;     } ligatures;          lookup eszett {       sub germandbls by S S;     } eszett;          lookup single {       sub [a-z] by [A-Z];       sub agrave by Agrave;       sub aacute by Aacute;       sub acircumflex by Acircumflex;       sub atilde by Atilde;       sub adieresis by Adieresis;       sub aring by Aring;       sub ccedilla by Ccedilla;       sub egrave by Egrave;       sub eacute by Eacute;       sub ecircumflex by Ecircumflex;       sub edieresis by Edieresis;       sub igrave by Igrave;       sub iacute by Iacute;       sub icircumflex by Icircumflex;       sub idieresis by Idieresis;       sub eth by Eth;       sub ntilde by Ntilde;       sub ograve by Ograve;       sub oacute by Oacute;       sub ocircumflex by Ocircumflex;       sub otilde by Otilde;       sub odieresis by Odieresis;       sub ugrave by Ugrave;       sub uacute by Uacute;       sub ucircumflex by Ucircumflex;       sub udieresis by Udieresis;       sub yacute by Yacute;       sub thorn by Thorn;       sub ydieresis by Ydieresis;       sub oe by OE;       sub ae by AE;       sub scaron by Scaron;       sub zcaron by Zcaron;     } single;          } caps;     \end{filecontents*}          \setmainfont[FeatureFile=universalcaps.fea]{TeX Gyre Termes}     \setsansfont[FeatureFile=universalcaps.fea]{TeX Gyre Heros}          \newcommand*{\ucshape}{\addfontfeature{RawFeature=+caps}}     \newcommand{\textuc}[1]{{\ucshape #1}}          \setkomafont{section}{\ucshape}          \begin{document}     \section{Lorem Ipsum}          \textuc{\blindtext     àéîàáâãäåæ çèéêëìíîï ðñòóôõö ùúûüýþÿœš     fi ff fl ffi ffl fj ffj}          \MakeTextUppercase{daß}     \textuc{daß}          \begin{titlepage}     \ucshape     \begin{center}     John Doe\par     {\huge Title}     \end{center}     \end{titlepage}          \end{document}      This will create a feature file, adding to whatever font is loaded a new feature called `caps` that can be turned on and off like any other. Note that this will work with TrueType fonts as well, `{Georgia}` etc; `fontspec` seems to transfer what's in the .fea file to even non-OpenType fonts.   * Are there any potential drawbacks that I may not have had in mind? I'm still thinking it seems too simple to be true. (While it may be simple, it may of course still be a lot of work to take are of all lowercase glyphs in advanced multi-language fonts).   * Has anyone else ever done or seen something like that? I find it hard to believe I should be the first to come up with that idea...   * If noone has done it so far, would it be a good idea to turn it into a little package?


title: select shorthands in biblatex

text: I have a large `.bib` database in which lots of entries have `shorthands` fields defined. When I want to limit the usage of those shorthands only to the most cited texts, I generaly create a copy of the bibliography database to the working directory and either delete the unwanted shorthands or change the field to something like `XXXshorthand`, in order to hide it from bibtex/biber. Now I'd like to automate that process. I imagine two ways of accomplishing that:   1. Somenthing like `\includeonly` command, that I can set at the preamble, adding the entries that are allowed to have shorthands (I don't know if it is possible or how to do it, but it would check if the bib entry is equal to the ones listed and if not add a `\clearfield{shorthand}` to them).   2. A very different approach, but one that might be more general than that, is to check if a given entry is cited more than three or five times (something definable by the user) and if so allowing it to use its shorthands. So the question is if it is possible and if so, how? **EDIT** Folowing @ienissei's comment, which pointed to an answer by @lockstep, I've able, so far to both ignore `shorthandintro` (which prints the string `citedas` —in english, "henceforth cited as..."— and the shorthand in the first citation) and to make subsequent citations (up to three) to ignore the shorthand and use the `cite:short` bibmacro. Here's a MWE of what I did so far, drawn on the top of the one provided by the mentioned answer:               \documentclass{article}     \usepackage[style=verbose-trad3,citecounter=true]{biblatex}     \usepackage{filecontents}       \begin{filecontents}{\jobname.bib}           @misc{A01,             author = {Author, A.},             year = {2001},             title = {Alpha},             shorthand = {AL},           }           @misc{B02,             author = {Buthor, B.},             year = {2002},             title = {Bravo},             shorthand = {BR},           }       \end{filecontents}     \addbibresource{\jobname.bib}          % Command to tell how much citations activate the use of shorthands       \newcommand{\shthreshold}[1]{\newcommand{\SHthreshold}{#1}}       \shthreshold{3}          \renewbibmacro*{cite}{%       \usebibmacro{cite:citepages}%       \global\togglefalse{cbx:loccit}%       \ifciteseen         {\ifciteibid            {\ifloccit         {\usebibmacro{cite:ibid}}         {\iffieldundef{shorthand}            {\usebibmacro{cite:opcit}}             {\ifnumgreater{\value{citecounter}}{\SHthreshold}%             {\usebibmacro{cite:shorthand}}             {\usebibmacro{cite:short}}}}}            {\iffieldundef{shorthand}         {\usebibmacro{cite:short}}         {\usebibmacro{cite:shorthand}}}}         {\usebibmacro{cite:full}}}          \renewbibmacro*{cite:full}{%       \usebibmacro{cite:full:citepages}%       \printtext[bibhypertarget]{%         \usedriver           {\DeclareNameAlias{sortname}{default}}           {\thefield{entrytype}}}%       \ifnumgreater{\value{citecounter}}{\SHthreshold}{         \usebibmacro{shorthandintro}}{}}          \begin{document}     \printshorthands     Some text \autocite{B02}. Some text \autocite{B02}. Some text \autocite{B02}.      Some text \autocite{A01}. Some text \autocite{A01}. Some text \autocite{A01}.      Some text \autocite{B02}. Some text \autocite{B02}. Some text \autocite{B02}.      \printbibliography     \end{document}      It works perfectly well, except that it still prints the entry in the list of shorthands. **EDIT2** : I change the code, because it wasn't working with entries witout shorthands. The problem was with the `\iffieldundef{shorthand}`.


title: Change font to computer modern for includegraphics

text: Is it possible to change the font to computer modern for an included pdf in LaTeX? I know its possible to save texified text with Inkscape, but i'm looking for a solution with just LaTeX. "Example":               \forcepdffont{cmodern}     \includegraphics{img.pdf}


title: Create box around text without creating a paragraph and with line breaking

text: I want to draw a box (no rounded corners, keep it simple ^^) around one or multiple words. There are two special things: 1) the box should support line break and 2) the box should not cover multiple lines. I added a figure to make my requirements more clear. I tested `fbox` and all its derivates, but all of them create a paragraph for the framed word. Thank you! ![Illustrative example](http://i.stack.imgur.com/XI6s0.gif)