title: pdfpages 2-page layout issue

text: I'm trying to use {pdfpages} to create a framed, 2-page, landscape layout. I'm having trouble with the layout. I want the pdf to take up the **entire** page. Can someone give me some tips? How do I remove the borders at the top and bottom of this page?               \documentclass[letterpaper]{book}     \usepackage{pdfpages}     \usepackage{geometry}     \begin{document}     \pagestyle{empty}          \includepdf[pages=-,nup=1x2,landscape,frame]{stitch}     \end{document}      ![enter image description here](http://i.stack.imgur.com/pAI5T.png)


title: How to resume the enumerate on different slides in beamer?

text: > **Possible Duplicate:**   >  How to Continue Enumerate Across Columns in Beamer It seems to be a simple question but I can't find the way out and can't find the solution on Internet as well. I try to resume enumerate in the next slide in beamer but it does not work (I have tried to use enumitem but does not work as well). How can I fix it?               \documentclass{beamer}     \usepackage{enumerate}     \usetheme{default}     \setbeamertemplate{footline}[page number]          \begin{document}     \maketitle          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Example 1     \begin{frame}[fragile]     \frametitle{Example 1}          \begin{enumerate}     \item What is the apple?     \end{enumerate}     \end{frame}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Example 1     \begin{frame}[fragile]     \frametitle{Example 1}          \begin{enumerate}     \item What is the orange?     \vfill     \item What is the watermelon?     \vfill     \end{enumerate}     \end{frame}


title: How to make two list of tables?

text: I'm writing abook about **Matlab** and I do want to have two lists of tables; one of them for tables which are related to `.m` files and the other one list of tables which are related to other subjects. How can I do make these two lists of tables?


title: How do I combine several tex files into one?

text: In my paper I have several tex files, mainly produced by some other tools (.bbl by bibtex, .eps_tex by inkscape etc.). I would like to combine them into a single tex file as required by my publisher. If possible, I'd like to automate it, so that even if any of my references of figures changes I still have an up-to-date version of the manuscript. Is it possible to do that in LaTeX, or are there any third-party tools for that?


title: Rescaling many images which are scaled with \includegraphics

text: In a LaTeX document I have about 70 images which are scaled using the graphicx-package and `\includegraphics[scale=0.8]{foo.pdf}` where the scaling factor varies. Now I would like to rescale them all with a common factor, like               \newcommand*{\factor}{0.75}     \includegraphics[scale=\factor * 0.8]{foo.pdf}      except that is no LaTeX syntax. Can anyone provide a smart solution?


title: Using lettrine with mathptmx

text: I found a template that uses the `lettrine` package with `mathpazo`. I want to use `mathptmx`, but when I use `lettrine` to make a large first letter, the _second_ letter appears capitalized. The trick seems to be that the template uses the `[sc]` option for `mathpazo`, but I cannot find a comparable option for `mathptmx`. How can I have a large first letter with a lower-case second letter using `mathptmx`?               \documentclass[twoside]{article}         \usepackage{mathptmx}      % I get the expected behavior if I use \usepackage[sc]{mathpazo} instead     \usepackage{lettrine}          \begin{document}         \section{Title}     \lettrine[nindent=0em,lines=3]{O} nce         \end{document}


title: Installing xcolor

text: I get the error:               ! Package hyperref Error: This color specification is not supported     (hyperref)                without package `xcolor' in     (hyperref)                `linkbordercolor=111'.          See the hyperref package documentation for explanation.      I installed it from http://www.ukern.de/tex/xcolor.html under the location:               /usr/local/texlive/2011basic/texmf/tex/latex/xcolor      And put the `.pro` file under:               /usr/local/texlive/2011basic/texmf/dvips/xcolor      Still getting the error. Any clues? EDIT: http://ctan.unsw.edu.au/macros/latex/contrib/xcolor/xcolor.pdf > Usually, you will have to run some kind of ﬁlename database update in order > to make the ﬁles known and quickly searchable to the TEX system


title: Adding address to article

text: I'm using this template, and editing it on writeLaTeX. I'd like to add my address to the title section underneath my email and phone number. I've tried using "\address", but this produces this message: `Undefined control sequence. l.35 \address {Test address}`. I've also tried modifying the "namesection" part of the class file without any luck. What am I doing wrong?


title: Beamer: Overfull hbox in headline

text: I try to redefine the header of my frames, but for some mysterious reason I get an overfull hbox of 1.6 points or slightly more:               \documentclass{beamer}     \usepackage{times}          \setbeamertemplate{headline}{\relax      \hbox{\relax        \begin{beamercolorbox}[wd=.25\paperwidth]{section in head/foot}%        \end{beamercolorbox}%        \begin{beamercolorbox}[wd=.75\paperwidth]{section in head/foot}%        \end{beamercolorbox}      }%     }%          \begin{document}     \begin{frame}\frametitle{Normal}     \end{frame}     \begin{frame}[fragile]\frametitle{Fragile}     \end{frame}     \end{document}        * The problem must be related to the font I use, since if I remove the `\usepackage{times}` directive, the overfull `hbox` is of different size.    * I tried changing out the relative sizes of the two `beamercolorbox`es, but then the deader does not cover the entire frame, which is very obvious when the header is of a different color.


title: How to encode the name of the LOOM programming language?

text: What symbols are used to write LOOM as shown in the image below? (The cutout is from a paper by Bruce et al., presented at the ECOOP conference in 1997.) ![enter image description here](http://i.stack.imgur.com/T3ch1.png)


title: Generate a parse tree for TeX

text: If I google for parse tree and TeX. All I'm getting are how to draw parse trees in TeX. I want to know if there are programs that can parse TeX, and output a parse tree that's easy to manipulate.


title: Line direct below frame title in beamer presentation

text: In `beamer`, the content of one slide is middle aligned. I want to keep most of the content in this way, but put one single line direct below title. So that I can put reference or a brief describe in this line. A single line well separated with the main content. I am a new user, I can not put image to explain where I want to put the line, I hope I am well explained.


title: Vertically aligned equation number with underbrace

text: I would like to vertically aling an equation number for the following MWE:               \documentclass{scrartcl}     \usepackage{amsmath}          \usepackage{mathtools}     \begin{document}     \begin{align}     \begin{aligned}     a &= b \\       &= \underbrace{d+e}_{\substack{\text{Long}\\\text{text}}}     \end{aligned}     \end{align}          \begin{equation}     \begin{multlined}     a+b+c+d+e+f+{}\\     g+h+i+\underbrace{i+j}_{\substack{\text{Long}\\\text{text}}}     \end{multlined}     \end{equation}     \end{document}      In both cases `underbrace` increases the size of the second line and thus, the equation number is not exactly between the two lines. How do I fix this? This question can be understood as a follow up question of A vertically centered equation number on a multline environment. ![Result of working example](http://i.stack.imgur.com/Xx2Od.png)


title: Drawing a triangle with smooth curves in the middle

text: I need to draw a picture like this. ![picture](http://i.stack.imgur.com/IGIzR.png) I made it by using Paint so it is not very clear. I need the smooth curves inside the triangle as well as the straight lines that connect the curves and the circle to be dashed. The symbol that appears two times is `\epsilon`.


title: Centering TikZ picture inside poster box

text: I would like to center a tikzpicture inside a posterbox (`baposter`)               \headerbox{Vorgehensweise}{name=definitions,column=3,below=problem,span=3}{          \usetikzlibrary{shapes.geometric, arrows,calc,calc,shapes.callouts,shapes.arrows,fit,backgrounds,positioning}          \tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30]               \tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=orange!30]     \tikzstyle{decision} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30]     \tikzstyle{pro} = [rectangle, minimum width=10cm, minimum height=5cm, text centered, draw=black, fill=orange!40]     \tikzstyle{brown} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=brown!30]     \tikzstyle{blue} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!20]          \begin{minipage}{10em}     \centering     \begin{tikzpicture}[->,>=stealth',scale=1.3, every node/.style={scale=1.13},anchor=center]          \node (start) [startstop] {Theoretische Exploration und Verortung};               \node  (pro1) [pro,below= 0.3cm of start] {};     \node at ($(pro1) + (0,1.9)$)    {\textbf{Empirische Exploration}};          \node (qual) [decision, below left of=pro1, yshift=1.8cm, xshift=-1.076cm ] {Quant. Erfassung mittels Fragebögen};     \node (quant) [decision, below right of=pro1, yshift=0.3cm, xshift=1.2cm] {Qual. Erfassung mittels Interviews};     \node (dec1) [blue, below of=pro1, yshift=-1.cm] {Modellierung der ÜNOLS};     \node (dec2) [brown, below of=dec1, yshift=-0.3cm] {Konsequenzen und Perspektiven};     %\tikzstyle{arrow} = [thick,->,>=stealth]     \tikzstyle{arrow} = [thick,->,>=stealth]                 \path (qual.south) edge [bend right] node {} (dec1.west)             (start) edge  node {} (pro1)             (qual.east) edge [bend left]  node {} (quant.north)             (quant) edge [bend left     ] node {} (dec1.east)             (pro1) edge  node {} (dec2);     %\draw [arrow] (start) -- (pro1);     %\draw [arrow] (qual.east) -- (quant.north);     %\draw [arrow] (qual.south) --  (dec1.west);     %\draw [arrow] (quant) --  (dec1.east);     %\draw [arrow] (pro1) -- (dec2);     \end{tikzpicture}          \end{minipage}          }      The picture stays flushed left ... minipage and `\centeing` doesnt help. Do you have any ideas? Thanks! :)


title: Fit text into given box by adjusting the fontsize

text: I would like to fit text (potentially several paragraphs) into a box of given size. This should be done by adjusting the fontsize of the contained text. _Clarification edit:_ The given dimensions are the **maximum** space the result should occupy. There is no need to fill the box fully, but under no circumstances should the dimensions be exceeded. Something like               \fitbox{<width>}{<height}{Some text to be squeezed into a box \par With paragraphs}      or               \begin{fitbox}{<width>}{<height>}     Some text to be squeezed into a box          With paragraphs     \end{fitbox}      There are a number of questions here that ask the same in the title, but then only target to constrain the _width_ or the _height_. I want to constrain both. Also, I would like the text only the be adjusted in the fontsize, not scaled disproportionally in one direction. @TH solves this for another question by fitting text on a page. Unfortunately, my TeX knowledge is too limited to adapt that to a box. See here: Fitting and centering text (both!) in a constrained area For a page-fitting, his solution looks great to me. Maybe that's a starting point. * * * **Edit: comparing the solutions from Werner and Martin** I've used XeLaTeX from TeXLive 2011 to compare the solutions from Werner and Martin below. The font is a TrueType Times New Roman vector font. The `fitbox`es are contained in a `framebox` to help comparison. Case 1 is a box of 2cm x 2cm. Case 2 is the same text in a box of 8cm x 2cm. ![Fitbox Comparison](http://i.stack.imgur.com/Fgy2c.png) Both boxes can be stacked next to each other horizontally and only consume the space they should. However, in Case 1 the box with Martin's approach is too high, while Werner's box fits the content correctly. * * * **Edit 2: some more tests show: both suggestions can fail** After some more tests, the case illustrated below fails for both suggestions from Werner and Martin. That means, the question is still open. ![Current Approaches fail with Overfull hbox](http://i.stack.imgur.com/u4dtB.png) As Werner points out in a comment to his answer, the reason is that TeX cannot hyphenate the pattern. At the same time, it finds it acceptable to set it into the box and run over the edge. After some research I believe that the algorithm after each line would have to check for `\badness` and if that exceeds 10000 reduce the font size further. At least the TeX pearl from Paweł Jackowski points in that direction. Has anyone the insights and experience to put these pieces and the excellent work from Werner and Martin together into something that works and really stays inside the given box? * * * **Edit 3: Another idea that might help to solve this** Another approach that might help would be a way to measure the width of the longest word (or box) of the paragraph, let's say it is _wl_. The associated font size is _f_. The maximum desired box width as given by the user is _wmax_. Then, the upper bound for the font size could be calculated by > _fmax_ = _f_ * _wmax_ / _wl_ This, of course, assumes that everything works out proportionally, which probably isn't entirely true considering inter word and inter character spacing. But it should be sufficiently good to keep the text in the `fitbox` horizontally. Since this can only shrink the fontsize (it's an upper bound), the vertical condition if met before would still be met afterwards. That means, this could be applied after the suggestion of @Werner as a check and adjustment if required. Does anyone have the TeX experience to stick that in?


title: Align siunitx numbers in a tabu table

text: The minimal example below gives me a strange offset in numbers with exponential numbers. I think tabu and siunitx are getting in each others way. Is anyone aware of a workaround?               \documentclass[parskip=half]{scrartcl}          \usepackage{siunitx}     \usepackage{tabu,booktabs}          \begin{document}          \newcolumntype Z{X[c,m]{%     S[%     tight-spacing = true,     round-mode=places,     round-precision=2,     ]     }}     \tabucolumn Z     \begin{tabu} to \linewidth {X[l,m,1.2]ZZZZZ}     \hline     Water vapour* & 18.01534 & -2.418379e+8 & 1.886964e+5 &     2.605& 572.4\\     \hline     \end{tabu}          \end{document}      ![enter image description here](http://i.stack.imgur.com/hGTPi.png)


title: vertical alignment of multirow tables in lyx

text: After having searched a lot, I still didn't find an option to align multirow cells vertically correctly in Lyx' native tables. There seem to be some solutions but I haven't found any for use with Lyx native tables without individually adjusting the vertical displacement. I created an example file to show what I mean and the corresponding rendering. The code in Lyx is as followed:               \begin{table}     \begin{centering}     \begin{tabular*}{1\textwidth}{@{\extracolsep{\fill}}>{\raggedright}m{0.2\textwidth}>{\raggedright}m{0.4\textwidth}>{\raggedright}m{0.3\textwidth}}     \toprule      \addlinespace     \textbf{Typ} & \textbf{Technologie} & \textbf{Materialien}\tabularnewline\addlinespace     \midrule      \addlinespace     Extrusion & Fused Deposition Molding (FDM) & Thermoplaste (z.B. PLA, ABS), HDPE, eutektische Metalle, Gummi, Ton,     Knetmasse\tabularnewline\addlinespace     \midrule      \addlinespace     Draht & Electron Beam Freeform Fabrication (EBF) & fast jede Metalllegierung\tabularnewline\addlinespace     \midrule      \addlinespace     \multirow{5}{0.2\textwidth}{Granulate } & Direct metal laser sintering (DMLS) & fast jede Metalllegierung\tabularnewline\addlinespace     \cmidrule{2-3}      \addlinespace      & Electron-beam melting (EBM) & Titanlegierungen\tabularnewline\addlinespace     \cmidrule{2-3}      \addlinespace      & Selective laser melting (SLM) & Titanlegierungen, Kobalt-Chrom-Legierungen, stainless-steel, Aluminium\tabularnewline\addlinespace     \cmidrule{2-3}      \addlinespace      & Selective heat sintering (SHS) & thermoplastisches Pulver\tabularnewline\addlinespace     \cmidrule{2-3}      \addlinespace      & Selective laser sintering (SLS) & Thermoplasten, Metallpulver, keramische Pulver\tabularnewline\addlinespace     \midrule      \addlinespace     \multirow{2}{0.2\textwidth}{Pulverbett mit Inkjetkopf} & Plaster based 3D printing (PP) & Gips mit Wasser als Binder\tabularnewline\addlinespace     \cmidrule{2-3}      \addlinespace      & kein einheitlicher Name findbar & Sand/Kunststoff mit Binder\tabularnewline\addlinespace     \midrule      \addlinespace     Laminiert & Laminated object manufacturing (LOM) & Papier, Metallfolie, Plastikfilm\tabularnewline\addlinespace     \midrule      \addlinespace     \multirow{2}{0.2\textwidth}[-2mm]{Photoaktivierte Polymerisation} & Stereolithographie (SLA) & \multirow{2}{0.3\textwidth}{Photopoylmere}\tabularnewline\addlinespace     \cmidrule{2-2}      \addlinespace      & Digital Light Processing (DLP) & \tabularnewline\addlinespace     \bottomrule     \end{tabular*}     \par\end{centering}          \protect\caption{Übersicht über verschiedene additive Fertigungsverfahren in Anlehnung     an \cite{wikipedia20143Dprinting}. \label{tab:=0000DCbersicht =0000FCber verschiedene additive Fertigungsverfahren}}     \end{table}      Focus on the word "granulate" ![example rendering of Table Code](http://i.stack.imgur.com/2Chay.png) You can download the working example here: Working Lyx example In this question here, they showed how to use the second optional argument but isn't there an automatic way?


title: How to put on every page ornament symbol

text: I would like to use somehow command `\eachpageornament` to place ornament border on every page of my document. I can do that using that new command on each page, but suppose our document have 200 pages, then there is problem. I found this (not exactly) code here http://altermundus.com/pages/downloads/packages/pgfornament/ornaments.pdf. It is on 12 page. On page 11 they are talking on some other solution, but I failed (because I am pretty new to LaTeX) to implement that way. You can show me that way if it is easier.               \documentclass{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[object=vectorian]{pgfornament}     \usepackage{lipsum}          \newcommand{\eachpageornament}{%     \begin{tikzpicture}[remember picture, overlay]     \node[anchor=north west] at (current page.north west){%     \pgfornament[width=2cm]{63}};     \node[anchor=north east] at (current page.north east){%     \pgfornament[width=2cm,symmetry=v]{63}};     \node[anchor=south west] at (current page.south west){%     \pgfornament[width=2cm,symmetry=h]{63}};     \node[anchor=south east] at (current page.south east){%     \pgfornament[width=2cm,symmetry=c]{63}};     \end{tikzpicture}     }          \begin{document}          \eachpageornament          \lipsum          \eachpageornament          \lipsum          \eachpageornament          \lipsum          \eachpageornament          \end{document}       You have to compile twice to see effect. And I would like, if it is possible to do this for article A4, not scrartcl.


title: Conditionally change font color of number passed from pythontex

text: I would like to color numbers red if they are less than zero. In my final report, these number will be generated from a python script. To use the pythontex package, I first run `xelatex doc.tex`, then `pythontex doc.tex`, and then `xelatex doc.tex` one last time for the python script to run and its contents imported into my document. Unfortunately, during this process, the first xelatex command throws an error because `\py{2-4}` hasn't been generated yet, so the `\colorme` command I created is being passed a `?` as an argument and not a number. Is there anyway around this? All I want to do is change the color of the number based on whether its greater than zero or not?               \documentclass{article}          \usepackage{xcolor}     \usepackage{pythontex}          \newcommand{\colorme}[1]{\ifnum #1 > 0             #1         \else             \textcolor{red}{#1}         \fi     }               \begin{document}              \colorme{5} %success         \colorme{-1} %success         \colorme{\py{2-4}} %fails          \end{document}


title: Is it possible to embed (attach) a file password protected in a PDF?

text: The situation is the following, for certain short latex files, I embed the source in the PDF it self. That can save me time in an emergency if I need to modify the source of a PDF without having to look for the original source (which can be in a different computer far away). This is no rocket science, I simply do:               \documentclass{article}     \usepackage{embedfile}     \embedfile{myself.tex}      However in certain situations I don't want other people that have the PDF to look at the Latex source, (for example because of all the comments. Think of a CV) Of course I can encrypt the embedded file               zip myself.zip --encrypt myself.tex      and use               \embedfile{myself.zip}      (note: in reality I have to change the extension .zip to something else because Acrobat refuses to open embedded zip files) But then I have to run the external command each time ( ~~and also suffer from the interactive zip password input~~ ). Something like this would be ideal if exists but I am open to other possibilities:               \embedfile[password=aaa]{myself.tex} %not working code      I don't want the ultimate security but only a layer of hiding of the embedded file. This can be also useful for embedding other related material, like original graphics or original data tables, etc. not just tex sources.


title: Cylinder with non circle bottom, TikZ

text: Hi i try to plot a cylindrical domain, where the bottom of the cylinder is not a circle or ellipse. My knowledge is very poor and all my previous attempts failed. Failed attempt:               \documentclass{article}     \usepackage{tikz}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \begin{document}     \begin{tikzpicture}          \draw plot [smooth cycle] coordinates{(0,0) (1,-.5) (1.2,1.5) (0,1) (-.5,.5) (-.7,.2)};          \draw plot [smooth cycle] coordinates{(3,2) (4,1.5) (4.2,3.5) (3,3) (2.5,2.5) (2.3,2.2)};               \draw (1,-.5)--(4,1.5);          \draw (1.2,1.5)--(4.2,3.5);          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/VtwCj.png)


title: Handling LaTeX errors

text: I have bash script that generates several tex files when it is run and then uses `latex` and `dvipdfm` to generate a pdf file. The only problem I have is that when something fails `latex` will halt the process and ask for input on the errors. In this case I am generating more than one pdf and `latex` is called several times for each one. So I end up with the same errors several times and I have to mash through it. Since this is being integrated into the build process for something else I would like to find a way to just let the script die with just a single message. To recap I would like to have latex terminate when there is an error so that when people other than my self run this they are stuck trying to kill this script.


title: How to draw a text of several lines framed with tikz?

text: I am drawing a diagram with `tikzpicture`. The main idea is to draw several boxes of texts framed, and link them with lines... What I know is using `\filldraw` to draw boxes, `\node` to write one line of text, and `\draw` to make a line. But I have to adjust every coordinator of every element... So my question is: 1) Is it possible to write a text of several lines? 2) Is it possible to frame a text of serveral lines? Could anyone help? Thank you very much!


title: How to achieve links in a part ToC in a beamer presentation?

text: I red \tableofcontents from \part commands in Beamer, and it was very helpful. However, I wanted the part titles to be links pointing to the pages the part began. The example without this works just fine:                   \documentclass{beamer}         \usepackage[T1]{fontenc}         \usepackage[latin1]{inputenc}         \usepackage[english]{babel}         \usepackage{tikz}         \usetikzlibrary{arrows,shapes,decorations.pathreplacing}         \usepackage{amsfonts}         \usepackage{amssymb}         \usepackage{kerkis}         \usetheme{Darmstadt}              \makeatletter         \AtBeginPart{%           \addtocontents{toc}{\protect\beamer@partintoc{\the\c@part}{\beamer@partnameshort}{\the\c@page}}%         }         %% number, shortname, page.         \providecommand\beamer@partintoc[3]{%           \ifnum\c@tocdepth=-1\relax             % requesting onlyparts.             \makebox[6em]{Part #1:} #2             \par           \fi         }         \define@key{beamertoc}{onlyparts}[]{%           \c@tocdepth=-1\relax         }         \makeatother%              \begin{document}              \title[Short Title]{Long Title}         \subtitle[Short Subtitle]{Long Subtitle}         \date{\today}         \author{Tom B.}         \subject{Math. Questions.}              \begin{frame}[t]             \titlepage         \end{frame}              \begin{frame}[t]             \frametitle{Overview}             \tableofcontents[onlyparts]         \end{frame}                  \part{Beginners}              \begin{frame}[t,shrink=0]             \frametitle{\insertpart}             \tableofcontents[subsectionstyle=hide]         \end{frame}                      \section[Nat Num]{Natural Numbers}              \begin{frame}[t]             \frametitle{\insertsection}             \tableofcontents[sectionstyle={show/hide}]         \end{frame}                          \subsection{Add}              \frame{easy example for calculating with natural numbers...}                          \subsection{Subtract}              \frame{easy example for calculating with natural numbers...}                          \end{document}      I thought I just use `\ref` and `\label` to achieve this. So I changed one line:               \makebox[6em]{Part #1:} \ref{#2}      And I added one other after the `\part` command (and I thought about using `\AtBeginPart` for automation):               \part{Beginners}     \label{\insertpart}      But if I compile this (MikTeX 2.9, pdfTeX 3.1415926-1.40.11), I get 74 errors. Could anyone be so kind to explain to me why, and even better, tell me how to fix it, or provide an alternative to achieve linked parts? Edit: Hmm, the problem appears to be `\includepart`. When I use               \makebox[6em]{Part #1:} \textcolor{green!30!blue}{\hyperlink{#2}{#2}}      and               \frame{\partpage \hypertarget{Beginners}{}}      instead it works. As I don't intend to put lots of parts, it is not too much of a pain to set them manually, but it is not very neat. Also, it seems to clash whenever I use `\insertpart`. The beamer manual states that it is a useful command for `\partpage`, so probably you can only use `\insertpage` when redefining `\partpage`?


title: Calculate the intersection between a path enclosed by a `scope` and another path

text: I have constructed a circle using the `through` package. I would like to create a coordinate at the intersection of this circle and another line. Is there a way to do this? I tried to name the path created with `circle through`, but could not get that to work. Here is the code. I would like to calculate the intersection of the red circle and the dashed line or path named "p0." The red circle is constructed to pass through the point "x1." I believe the problem has something to do with the `scope' command.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{intersections,through}     \begin{document}     \begin{tikzpicture}     \coordinate (x1) at (.4,1.2);     \draw[name path=p0,dashed] (0,.8) node[left] {$p_{0}$} -- ++(2.7,0);          \begin{scope}     \node [draw,red] at (2.4,1.9) [circle through=(x1)] {};     \end{scope}          \end{tikzpicture}     \end{document}      Interestingly, the following code, does not compile, where I try to name the path as advised by @Qrrbrbirlbel:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{intersections,through}     \begin{document}     \begin{tikzpicture}     \coordinate (x1) at (.4,1.2);     \draw[name path=p0,dashed] (0,.8) node[left] {$p_{0}$} -- ++(2.7,0);          \begin{scope}     \node [draw,red, name path=p1] at (2.4,1.9) [circle through=(x1)] {};     \end{scope}          \fill[name intersections={of=p0 and p1}] (intersection-1) circle (2pt) node[below left] {$x$};     \end{tikzpicture}     \end{document}      However, the code does work if there is another item drawn in between the end of the `scope` command and the attempt to calculate an intersection. The following code is essentially the one posted by @Qrrbrbirlbel, which works even with the `scope` command. The only difference is that we draw the "x1" node before trying to create an intersection.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{intersections,through}     \begin{document}     \begin{tikzpicture}     \coordinate (x1) at (.4,1.2);     \draw[name path=p0,dashed] (0,.8) node[left] {$p_{0}$} -- ++(2.7,0);          \begin{scope}     \node [draw,red, name path=p1] at (2.4,1.9) [circle through=(x1)] {};     \end{scope}          \fill[black] (x1) circle (2pt) node[left] {$x_{1}$};          \fill[name intersections={of=p0 and p1}] (intersection-1) circle (2pt) node[below left] {$x$};     \end{tikzpicture}     \end{document}


title: How to make "L" shaped arrows with curved edge

text: I simplified this example from here, however what I am looking is an "L" shaped arrow that curves when it gets to the same height as A which can be seen in the below figure. The red curve is the one that I want. ![enter image description here](http://i.stack.imgur.com/OtBwx.png) Here is the code that I have right now for the black arrow.               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}       \node[anchor=east] at (0,0) (text) {A};       \node[anchor=west] at (5,5) (description) {B};       \draw (description) edge[out=180,in=0,->] (text);     \end{tikzpicture}     \end{document}


title: Lyx cross refernce to figures not working when there is a new line between caption and label

text: When I put a new line between the caption and label of a figure float, the cross referencing is shown as "Figure ??" in the resulting PDF file. The hyperlink in the PDF however, works just fine. After removal of the newline between the caption and label, the cross referencing is shown properly, i.e. "Figure 1.1". Does that newline somehow disassociates the label from the caption ? My understanding is that, as long as they are all withing the same float, it should work. The screen shots are bellow: ![without new line, this works](http://i.stack.imgur.com/ussBk.png) ![with a new line, this doesn't work](http://i.stack.imgur.com/cZvbo.png) before edit on Jan 10: I'm writing a thesis containing several chapters. The master document's documentclass is book(KOMA-script). The chapters are inserted as branches of the master document. Cross referencing to figures are working fine for all chapters except one. In this faulty chapter, the cross references appear as "Figure ??". However, the hyper link within the resulting PDF document works. I've already checked this, this is not exactly the problem I'm facing.


title: mptopdf package for graphicx

text: I'm writing up some mathematics notes in LaTeX using Texmaker, and want to include some diagrams (from image files). When I include the graphicx package, I keep getting a pop-up entitled 'Package Installation', saying that 'tex\context\base\supp-pdf.mkii' is missing, and asking me to install mptopdf, whenever I compile the file to pdf. If I click install, the pdf compiles and loads fine (at least it seems to), but it prompts me again to install the next time as well! I could just uncheck the box about 'show this dialog', but I feel it might be better to address the issue properly. Any suggestions? ![Here's a screenshot of the pop-up](http://i.stack.imgur.com/b1b0y.png) ![This error message appears briefly in the log \(was hard to screenshot!\)](http://i.stack.imgur.com/t8T4i.png) Here's my preamble:               \documentclass[a4paper,12pt]{article}          \usepackage{amsthm}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}     \usepackage{graphicx}     \newtheorem{theorem}{Theorem}[section]     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{proposition}[theorem]{Proposition}     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{definition}{Definition}      One line where I want an image is               \includegraphics[width=10cm]{trianglesymettries.png}      But I get the pop-up even without this line. (It only stops if I remove '\usepackage{graphicx}'.) I'm editing using Texmaker 4.0.4, with the MiKTeX 2.9 distribution on Windows 8.


title: How to execute a command only on the next run?

text: Let's say I have a command `\foo` that I want to execute only on the next run of TeX. How do I create a command `\onceFoo` that does this? (It is also permitted to execute `\foo` if the `aux` file has been compromised.) Minimal (non-)working example:               \documentclass{article}     \def\foo{First execution}     \def\onceFoo{This doesn't work.}     \begin{document}     testing: \onceFoo     \end{document}      The desired output is               testing: First execution      on the first run of `latex`, and               testing:      on every subsequent run. If the file above (with the correct definition of `\onceFoo`) has been run several times, and the line `new testing: \onceFoo` is added, then the desired output is               testing: new testing: First execution      on the first subsequent run, and               testing: new testing:      on all runs thereafter. * * * Motivation: I would like to create a command that clears certain useful files and recomputes them. Normally, this command should be used for a single run to remove corrupted information (or for testing); afterwards, the command should be removed from the source file. However, some users (notably I) are likely to forget to remove the command, since it does not actually break anything--it only produces a significant drop in efficiency, because many things must be recalculated. Thus, I would like a second version of this command that affects only the first run after it is added.


title: Embedded fonts - Verification: Different tools give different answers

text: I want to produce a PDF file that has all fonts embedded. I prefer to avoid the detour of postscript/dvi and use pdflatex instead. My PDF is basically a publication containing only OmniGraffle figures and Matplotlib plots. OmniGraffle does embed fonts in its output and I tweaked Matplotlib to do this too. Now I have two PDFs:   * "v1": My old one. I thought it did not have all fonts embedded as this was indicated by Adobe Reader.   * "v2". The new pdf after making sure each figure itself (pdf/eps) has all fonts embedded. What puzzles me is that the command line tool `pdffonts`from the `xpdf` packet shows that both documents have all fonts embedded. However, Adobe Reader shows that PDF "v1" has some fonts that are not marked as "embedded" or "embedded (subset)" and only "v2" has all fonts embedded. Which tool is right and what does it mean? Output of `pdffonts` of file "v1":               name                                 type              emb sub uni object ID     ------------------------------------ ----------------- --- --- --- ---------     YVQUYJ+NimbusSanL-Bold               Type 1            yes yes no       5  0     RFXWRS+NimbusSanL-Regu               Type 1            yes yes no       6  0     KSUZRI+NimbusRomNo9L-Medi            Type 1            yes yes no       7  0     AFESAY+CMR9                          Type 1            yes yes no       8  0     RGQDWF+CMBX9                         Type 1            yes yes no       9  0     WQHQIA+NimbusRomNo9L-Regu            Type 1            yes yes no      10  0     OKJZSU+CMBXTI10                      Type 1            yes yes no      11  0     FUQITS+CMSY9                         Type 1            yes yes no      12  0     GUDTZQ+CMTI9                         Type 1            yes yes no      13  0     WWZKWK+Helvetica-Bold                TrueType          yes yes no      20  0     WSJVMY+CMEX10                        Type 1            yes yes yes     23  0     ICHZZX+HelveticaNeue                 TrueType          yes yes no      24  0     WSJVMY+CMEX10                        Type 1            yes yes yes     26  0     WJYTBK+NimbusRomNo9L-ReguItal        Type 1            yes yes no      81  0     AZNHSE+CMMI9                         Type 1            yes yes no      82  0     VHIYAC+CMR6                          Type 1            yes yes no      83  0     DIUTNF+CMMI6                         Type 1            yes yes no      84  0     FLUOTV+CMSY6                         Type 1            yes yes no      85  0     RVPZIX+CMMI5                         Type 1            yes yes no      86  0     UVMOBZ+CMBX6                         Type 1            yes yes no      91  0     BitstreamVeraSans-Roman              Type 3            yes no  no      93  0     THPNLT+CMEX9                         Type 1            yes yes no     133  0     BitstreamVeraSans-Roman              Type 3            yes no  no     136  0     RSRDYI+wasy9                         Type 1            yes yes no     184  0     LOHQHD+Helvetica                     TrueType          yes yes no     195  0     HAQIGV+Helvetica-Bold                TrueType          yes yes no     196  0     Cmmi10                               Type 3            yes no  no     278  0     BitstreamVeraSans-Roman              Type 3            yes no  no     279  0      Output of `pdffonts` of file "v2":               name                                 type              emb sub uni object ID     ------------------------------------ ----------------- --- --- --- ---------     YVQUYJ+NimbusSanL-Bold               Type 1            yes yes no       5  0     EDVTZM+NimbusSanL-Regu               Type 1            yes yes no       6  0     KSUZRI+NimbusRomNo9L-Medi            Type 1            yes yes no       7  0     AFESAY+CMR9                          Type 1            yes yes no       8  0     DWJEZG+CMCSC10                       Type 1            yes yes no       9  0     QJCAMK+CMBX9                         Type 1            yes yes no      10  0     GULYAI+NimbusRomNo9L-Regu            Type 1            yes yes no      11  0     YDOJNG+NimbusRomNo9L-ReguItal        Type 1            yes yes no      12  0     OKJZSU+CMBXTI10                      Type 1            yes yes no      13  0     BWVALK+CMSY9                         Type 1            yes yes no      14  0     CFSIIM+CMTI9                         Type 1            yes yes no      15  0     WWZKWK+Helvetica-Bold                TrueType          yes yes no      22  0     WSJVMY+CMEX10                        Type 1            yes yes yes     25  0     ICHZZX+HelveticaNeue                 TrueType          yes yes no      26  0     WSJVMY+CMEX10                        Type 1            yes yes yes     28  0     AJQTGA+CMMI9                         Type 1            yes yes no      83  0     VHIYAC+CMR6                          Type 1            yes yes no      84  0     DIUTNF+CMMI6                         Type 1            yes yes no      85  0     FLUOTV+CMSY6                         Type 1            yes yes no      86  0     RVPZIX+CMMI5                         Type 1            yes yes no      87  0     UVMOBZ+CMBX6                         Type 1            yes yes no      92  0     BitstreamVeraSans-Roman              CID TrueType      yes no  yes     94  0     THPNLT+CMEX9                         Type 1            yes yes no     110  0     BitstreamVeraSans-Roman              CID TrueType      yes no  yes    113  0     RSRDYI+wasy9                         Type 1            yes yes no     125  0     IXWXMR+MSAM10                        Type 1            yes yes no     126  0     VSGEIH+Helvetica                     TrueType          yes yes no     136  0     ZBYQCO+Helvetica-Bold                TrueType          yes yes no     137  0     BitstreamVeraSans-Roman              CID TrueType      yes no  yes    228  0     Cmmi10                               CID TrueType      yes no  yes    229  0      I am using pdffonts 3.03 and Adobe Reader 11.0.2 on Windows 7.


title: Automating quoting across LaTeX documents

text: I occasionally face the following situation when writing LaTeX documents. (This question is probably not LaTeX specific, though). Suppose I have a document, say `orig.tex`. Then I quote from that document in another document, say `new.tex`. So, for example... `orig.tex` is               \documentclass{article}          %% orig.tex     \begin{document}          Here is some text. {This is some text I want to quote.} Here is yet     more text. The quick brown fox ran over the lazy dog.          {I want to quote all the text in this para. Some more text to get this       line to wrap.          And this para as well, in one quotation.}          \end{document}      and `new.tex` is               %% new.tex     \documentclass{article}     \usepackage{quoting}     \begin{document}          Quotation one from orig.tex is     \begin{quoting}     This is some text I want to quote.     \end{quoting}          Quotation two from orig.tex is          \begin{quoting}       I want to quote all the text in this para. Some more text to get       this line to wrap.            And this para as well, in one quotation.     \end{quoting}          \end{document}      However, the problem is that after I have copied in these quotations to `new.tex`, I may change the text in `orig.tex`. I want LaTeX to automatically copy the text across from `orig.tex` to `new.tex`. Each quotation could be associated with some kind of label. The curly braces in `orig.tex` mark the quotation start and end points. This is a stand-in for proper macro or function usage. This will cause some clutter in the original document, but I can remove these markers after the `new.tex` has been sent off. Till then, I want these two documents to stay in sync. For simplicity, let's assume these quotations are non-overlapping, as this would add extra complexity to the problem. However, as shown in the example, they may cross line and paragraph breaks. The closest thing in terms of functionality that I am aware of is the xr package by our very own David Carlisle :-), but I don't know if it can be adapted for use here. UPDATE: Apparently this question wasn't as clear as it should have been. I just used `{}`'s in `orig.tex` because I wasn't sure what kind of syntax to use, but I was thinking of something along the lines of some macro like `\c` (for cut) in `orig.tex`, thus,               ...\c[label]{some text to quote}      and then another macro `\p` for paste, which inserts that text in `new.tex`, thus.               ...\p[label]...      UPDATE2: Thanks to Peter Grill, David Carlisle, and Aditya for their answers. I have tested both Peter's macro solution and David's solution. A choice between the two of them would have been difficult. However, Peter's approach uses the standalone package, which seems to have some bad interactions with the custom class I'm using, Springer's `svmult.cls`. I was on a deadline and didn't want to take the time to figure this out, so I went with David's solution, which has no package dependencies, and worked for me. I think this code is worth packaging - I'm surprised it does not exist as a package already. Handling multiple input files would be a desirable feature, though. I haven't tested Aditya's solution, but plan to do so.


title: Can we use a single frame to create the following effect?

text: I want to create a slide to show how the clipping works as shown in the following animation. ![enter image description here](http://i.stack.imgur.com/6xZuJ.gif) I used two frames, the last frame is needed because I want to hide the unwanted (trimmed) parts of cropped areas of the previous slides. I want to avoid using two frames and repeating the codes. Can we force `beamer` to delay the clipping code and hiding the previous painting? I am new to `beamer`, only knows `\pause`. :-)               \documentclass{beamer}     \usepackage{pstricks-add}     \usepackage[active,tightpage]{preview}     \PreviewBorder=0pt     \PreviewEnvironment{pspicture}          \begin{document}          \begin{frame}         \begin{pspicture}(6,6)             \pnode(0,0){A}             \pnode(6,0){B}             \pnode(6,6){C}             \pnode(0,6){D}             \pnode(1,1){P}             \pnode(5,1){Q}             \pnode(3,5){R}             \pspolygon*[linecolor=red](A)(B)(Q)(P)\pause             \pspolygon*[linecolor=green](B)(C)(R)(Q)\pause             \pspolygon*[linecolor=blue](C)(D)(R)\pause             \pspolygon*[linecolor=yellow](D)(A)(P)(R)         \end{pspicture}     \end{frame}          \begin{frame}         \begin{pspicture}(6,6)               \pnode(0,0){A}             \pnode(6,0){B}             \pnode(6,6){C}             \pnode(0,6){D}             \pnode(1,1){P}             \pnode(5,1){Q}             \pnode(3,5){R}             \psclip{\pscircle[linestyle=none,dimen=middle](3,3){3}}                 \pspolygon*[linecolor=red](A)(B)(Q)(P)                 \pspolygon*[linecolor=green](B)(C)(R)(Q)                 \pspolygon*[linecolor=blue](C)(D)(R)                 \pspolygon*[linecolor=yellow](D)(A)(P)(R)             \endpsclip         \end{pspicture}     \end{frame}     \end{document}


title: Kha with descender (the "ҳ" symbol)

text: So, using pdfLaTeX, I need to write the Kha with descender symbol (which looks like ҳ). Taken from Wikipedia: ![enter image description here](http://i.stack.imgur.com/Ijnfr.png) It comes up with Afghan history, if anyone's curious why I need it... I know this can be done with XeLaTeX, but I'd prefer **avoiding XeLaTeX** if possible (I'm also using microtype). Using Babel for one character seems excessive...what other options are there?


title: Suppress quotes or other markup in \citetitle

text: I'd like to extract the title from a bibtex file and use it in the main document text. I'm using `\citetitle`, but this adds the title plus whatever markup is defined for the bibliography style I'm using. How do I get the article title as-is, without anything attached? My minimal working example:               \documentclass{article}     \usepackage[style=authoryear-comp]{biblatex}     \usepackage{filecontents}     \begin{filecontents}{refs_local.bib}     @Article{fubar,       author =       {J. Doe},       title =        {A fabulous finding},       journal =  {Journal of Improbable Results},       year =         2010,       volume =   42,     }     \end{filecontents}     \addbibresource{refs_local.bib}     \begin{document}%     Test: {\bfseries \sffamily \citetitle*{fubar}}\\     \rule{\textwidth}{0.4mm}     \printbibliography     \end{document}      The generated document (cropped): ![Compiled document](http://i.stack.imgur.com/ep7Qb.png) The desired document would not affect layout of the References, but would show the text **A fabulous finding** in the main document without any quotes. Do I need to define my own citation command to get this effect, or is there a more low-level way to extract information directly from bibtex fields?


title: how to add parameters to shape which internally use 'append after command'

text: years ago Mark Wibrow provided me the following code to adding text in inside border of a (rectangle) shape on this comp.text.tex thread:               \documentclass[tikz,border=5mm]{standalone}     %%% code from ctt, December 1999     \makeatletter     \def\tikzsavelastnodename#1{\let#1=\tikz@last@fig@name}     \makeatother         \tikzset{     BOX/.style = {rectangle,         minimum width=33mm,         minimum height=22mm,         draw,         thick,         text=red,         append after command={\pgfextra{\tikzsavelastnodename\tikzsavednodename}},#1%                              },     add text/.style args = {#1:#2}{append after command={%         node[anchor=#1]  at (\tikzsavednodename.#1) {#2}}                             },                 }     %%% example of use     \begin{document}     \begin{tikzpicture}       \node[BOX,             add text=north:lorum,             add text=south west:ipsum,             add text=east:dolor             ]   (a)             {box};         \end{tikzpicture}     \end{document}      Its work fine, but I wonder, if it is possible extend definition of BOX with more parameters, for example for set shape width, shape fill or even give a name to shape in a way, that the BOX can be used for example as:               \node[box=<desired parameter>, ...           add text=south:lorum] (<node name>) at (<coordinate>) {text in box};       or even better               \node[box=<desired parameter>, ...           add text=south:lorum] (<node name>) at (<coordinate>) {text in box};       where desired parameters will influence on the box appearing (for example, change the shape width, shape fill etc). I haven't clue how to do this, because BOX implicite already use two (if I understand correctly above example), consequently my rude (I'm not familiar with with more than elementary use of keys) experiments so far fails ...


title: Hide solution when using xlop

text: I'm using `xlop` to display primary school style addition/subtraction/mul/div problems. When using `\opadd{1}{2}` for example, It will solve the equation. How do you hide the solution so it is suitable to give to a student to work out the problems?


title: Abstract and titlepage

text: I compile my code and the abstract shows up before the titlepage, but I want it after the title page.               \documentclass[12pt, oneside]{report}          \usepackage[margin=1in]{geometry}     \geometry{letterpaper}          \usepackage{graphicx}     \usepackage{setspace}     \usepackage{indentfirst}     \usepackage{amssymb}          \title{Thesis}     \author{by Me}     \date{April 15th, 2013}                \begin{document}          \begin{abstract}          stuff and nonsense          \end{abstract}          \maketitle          \tableofcontents


title: Splitting tables longer than a certain size in ConTeXt

text: Is there any way in ConTeXt to provide a 'one size fits all' table setup that allows large tables to span pages (> 75% of page height for example) but tries to keep smaller tables together by not splitting them? Our content is coming from another system so manually assigning `[split=yes]` to every long table is not an option. We can do some pre-processing of the data, but row counting can't be used as some tables have only three rows, but enough content to require a split.               \placetable[split]{Title}{     \bTABLE[split=yes]     % ... table content - Large tables need to span, Small tables often span pages but shouldn't     \eTABLE     }      I can't seem to find any orphan penalties for splitting table rows, but I feel this could help.


title: Indent every \subsubsection element

text: I need to indent every `\subsubsection` element in my thesis. I think that the solution is something like this               \renewcommand{\subsubsection}{some-magic-here}      but i'm new of Latex and I have no idea in what kind of magic. ;) Could anyone help me?


title: breaking a section between two pages

text: I have a document with below Section command, if the size of items inside the section increase to more than a page it moves the whole section to next page, but I want to break the section between two pages, any hint?               \renewcommand*{\section}[1]{%       \par\addvspace{2.5ex}%       \phantomsection{}% reset the anchor for hyperrefs       \addcontentsline{toc}{section}{#1}%       \parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}%       \hspace{\separatorcolumnwidth}%       \parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#1}}%       \par\nobreak\addvspace{1ex}\@afterheading}


title: Pgfmath array problem

text: I have a problem with pgfmath array :   * it work if defined outside pgfkeys,   * doesn't work inside. What is the problem ?               \documentclass[tikz]{standalone}     \usetikzlibrary{calc}          \tikzset{tag/.style={align=center}}          \makeatletter     \pgfkeys{/DiagCirc/.cd,         value list/.store in=\Value@list,         tags/.store in=\T@gs,         tags=,         percent corr/.store in=\C@rrP,         percent corr=,         diagram/.code={%         % Calcul de la somme         \pgfmathsetmacro\S@m{0}         \foreach \i/\y in \Value@list {\xdef\S@m{\S@m+\i}}           \pgfmathsetmacro\S@m{\S@m}              \ifx\hfuzz\T@gs\hfuzz         \else             \foreach \V/\N [count=\j from 0] in \Value@list {%                  % works             \pgfmathtruncatemacro\P{round(\V/\S@m*100)+\CorrP[\j]}                  % doesn't work             %\pgfmathtruncatemacro\P{round(\V/\S@m*100)+\C@rrP[\j]}                  \node[tag] at (\j,0) {\T@gs} ;             }         \fi%              } % fin du diagram code     }     \makeatother               \begin{document}     \begin{tikzpicture}          \def\CorrP{{-1,0,0,0,0}}          \path[/DiagCirc/.cd,     value list={1236/R+L+D,149/A,740/N+F,346/C,75/E},     percent corr={{-1,0,0,0,0}},     tags=\P\,\%,     diagram] ;               \end{tikzpicture}     \end{document}


title: Bar graph swallowing one group of entries

text: If followed an example from sharelatex.com for a simple bar graph.               \begin{tikzpicture}     \begin{axis}[         x tick label style={             /pgf/number format/1000 sep=},         ylabel=Year,         enlargelimits=0.05,         legend style={at={(0.5,-0.1)},         anchor=north,legend columns=-1},         ybar interval=0.7,     ]     \addplot          coordinates {(2012,408184) (2011,408348)              (2010,414870) (2009,412156) (2008,415 838)}; % 2008 coordinate given, but does not show     \addplot          coordinates {(2012,388950) (2011,393007)              (2010,398449) (2009,395972) (2008,398866)}; % same here     \legend{Men,Women}     \end{axis}     \end{tikzpicture}      This plots fairly nicely (as one can see on the website too). After copying and adjusting it to my needs, I realized that it swallows the last coordinate. This seems curious to me. Is this intended? If not, how to fix this properly (i.e. not adding a dummy coordinate)?


title: How to provide a Makefile to Texlipse?

text: gurus, The question can probably be formulated in a couple of ways. When I created my Latex project in Texlipse, I told Eclipse to put all PDFs in the _out_ folder, and all sources including my _main.tex_ file in the _src_ folder. All temporary files are stored in _tmp_. However, Texlipse complains about page numbering (let us skip the exact problem here) which are solved by running pdflatex, bibtex and then pdflatex again three times: The following Makefile generates a well-formed PDF with good page numbering.               all: pdf          pdf:         pdflatex main         bibtex main         pdflatex main         pdflatex main         pdflatex main      I would like Texlipse to automatically do the building in that sequence to properly generate my PDF. I couldn't figure out how to configure Texlipse's _Builder_ to do this. Lastly, on a side note, although I do not want to use the _Makefile_ all the time, I would nevertheless want my Makefile to be in the root folder where _src_ , _out_ , _tmp_ are located. I want to configure the options for pdflatex to find all the sources in _src_ , and output the PDF in _out_ and put all temporary files in _tmp_. How can I do that? That said, if I have a proper Makefile that does the job neatly and cleanly, how can I just tell Texlipse to use that Makefile when I want it to _Build Automatically_? Many thanks for the support.


title: Decrease the space between two type of footnotes

text: I’m using two types of footnotes in my document, but when I use the two types in the same page, the space between the two blocks is too large (the paper size small, so it is problematic). Is there a way to reduce the space between the two blocks of notes? My minimal example working is               \documentclass[twoside,book]{memoir}     \usepackage{fontspec}     \usepackage{lipsum}     \usepackage[perpage,multiple]{footmisc}     \usepackage[xetex,         papersize={138mm,215mm},         total={115mm,180mm}]{geometry}          \paragraphfootnotes      \renewcommand*{\footnoterule}{}     \footmarkstyle{\textbf{#1--} }     \setlength{\footmarkwidth}{0ex}     \setlength{\footmarksep}{1em}     \renewcommand{\thefootnote}{\Alph{footnote}}          \newfootnoteseries{G}     \plainfootstyle{G}     \footmarkstyleG{\textbf{#1--}}          \begin{document}     \lipsum*[1]{}\footnote{Short footnote}          \lipsum*[2]{}\footnote{Another short footnote}          \lipsum*[4]{}\footnoteG{\lipsum*[3]{}}          \lipsum[5]\lipsum[6]{}     \end{document}


title: Too much space before digit "1"

text: In many fonts, the digit `1` contains a lot of empty space on its left side. Maybe this is desirable inside a number like 512, but it looks wrong to me when the `1` appears at the beginning of a word, as in the example below. Is there any way to have LaTeX automatically detect when `1` is at the beginning of the word and remove the unwanted padding? ![numeral-one](http://i.stack.imgur.com/KHmxn.png)               \documentclass[12pt]{article}     \begin{document}     \noindent     The article appears in vol.\ 16 of the encyclopedia. \\     The article appears in vol.\ sixteen of the encyclopedia.     \end{document}


title: Error message and newline

text: In the following, why is the exclamation mark (`!`) repeated in the error message?               \def\error#1#2{%       \begingroup       \errhelp{#2}%       \errmessage{^^J! package Error: #1^^J}%       \endgroup     }     \error{Stop now.}{Hi, don't go on.}               !      ! package Error: Stop now.


title: What's the correct way to place theorems and pictures side by side?

text: Okay so I have a definition using the `amsthm` `theorem` environments, and a `tikzpicture` which I want to see side by side. The material inside the definition is not too big, so I expect the final height of the two to be about the same. `wrapfig` does not work inside the `definition` environment because it's a list. I could not get `cutwin` to work, it puts the picture right after "Definition." and the text below. Then I tried `tabularx` (`tabular` gives me some `missing \item` error) which seems to approximate what I want the best, but somehow places the two on different rows, even though the code is like the following:               \documentclass{article}          \usepackage{tabularx,amsthm,tikz}     \newtheorem{definition}{Definition}          \begin{document}          \begin{tabularx}{\textwidth}{X r}     \begin{definition}     Blah blah blah      \end{definition} & \begin{tikzpicture}     \draw (0,0) grid (1,1);     \end{tikzpicture}\\     \end{tabularx}          \end{document}      Is there a good way of doing this? (P.S. I'm not sure what tags are appropriate for this.)


title: Plot - quarters in axis?

text: I am new to TEX How can I plot this variable and keep the quarters in the x axis ?               date    variable     1993Q1  0.71957432     1993Q2  0.622643199     1993Q3  0.557352546     1993Q4  0.78844216     1994Q1  0.677342246     1994Q2  0.752843835     1994Q3  0.823435891     1994Q4  0.869172377     1995Q1  0.822971248     1995Q2  0.759768686     1995Q3  0.662193784     1995Q4  0.744474674     1996Q1  0.665910923     1996Q2  0.776898876     1996Q3  0.923927404     1996Q4  0.840678042     1997Q1  0.735450535     1997Q2  0.850306776


title: Exclude certain plot points from smoothing

text: 1. How do I exclude certain coordinates from being smoothed by the "smooth" option in a PGF plot?   2. How do I avoid that `\closedcycle` jumps to zero? Here is my example:               \documentclass{minimal}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[utf8]{inputenc}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}          \begin{document}     \begin{tikzpicture}      \begin{axis}[     axis lines=center,     xtick=\empty,     ytick=\empty,     plot a/.style={semithick,red,smooth},     plot b/.style={semithick,blue,smooth},     plot error/.style={thick,orange,smooth},     ]          \addplot[plot a] coordinates {     (1.400,0.484) (1.450,0.464) (1.500,0.442) (1.550,0.419) (1.600,0.395) (1.650,0.370)     (1.700,0.346) (1.750,0.321) (1.800,0.297) (1.850,0.273) (1.900,0.249) (1.950,0.227)     (2.000,0.205) (2.050,0.185) (2.100,0.166) (2.150,0.148) (2.200,0.131) (2.250,0.116)     (2.300,0.102) (2.350,0.089) (2.400,0.077) (2.450,0.067) (2.500,0.057) };          \addplot[plot b] coordinates {     (1.400,0.111) (1.450,0.120) (1.500,0.130) (1.550,0.139) (1.600,0.150) (1.650,0.160)     (1.700,0.171) (1.750,0.183) (1.800,0.194) (1.850,0.206) (1.900,0.218) (1.950,0.230)     (2.000,0.242) (2.050,0.254) (2.100,0.266) (2.150,0.278) (2.200,0.290) (2.250,0.301)     (2.300,0.312) (2.350,0.323) (2.400,0.333) (2.450,0.343) (2.500,0.352) };          \addplot[plot error] coordinates{     (2.300,0.312) (2.250,0.301) (2.200,0.290) (2.150,0.278) (2.100,0.266) (2.050,0.254)     (2.000,0.242) (1.950,0.230) (1.946,0.2287) (1.950,0.227) (2.000,0.205) (2.050,0.185)     (2.100,0.166) (2.150,0.148) (2.200,0.131) (2.250,0.116) (2.300,0.102) } \closedcycle;          \end{axis}     \end{tikzpicture}     \end{document}      ![Resulting plot](http://i.stack.imgur.com/TErvP.png) The problems are twofold:   1. The left corner of the orange triangle is plotted wrongly due to smoothing. (One can see that more easily, if one zooms into the resulting PDF.) I need the `smooth` option such that the orange plot follows the blue plot (first half) and the red plot (second half) correctly. But the point at which the orange plot stops following the blue plot and starts following the red plot must no be smoothed, because it is a non-differentiable point. Is there any option how single points of a plot can be excluded from smoothing?   2. The orange plot is terminated by `\closedcycle` because I want to use the `fill` option later. But this makes the plot jump to zero first as one can see from the picture. Is there any option to close a plot by a straight line from the end to the start point?


title: Bibliography style with elsarticle

text: I have trouble getting the form of citations I need. Once I cite I want to see authors' names and not numbers. The unconventional thing is that I have to use the documentclass elsarticle (This is editor's request), which always produce numbers. Here is it what I have               \documentclass{elsarticle}     \usepackage{natbib}     \usepackage[colorlinks=true,linkcolor=black, citecolor=blue, urlcolor=blue]{hyperref}          \begin{document}          \bibliographystyle{plainnat}     \bibliography{references}          \end{document}      Can someone help me on this? Here's an expanded MWE.               \documentclass{elsarticle}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{amsmath, mathtools}     \usepackage{natbib}     \usepackage[colorlinks=true,linkcolor=black, citecolor=blue, urlcolor=blue]{hyperref}     \usepackage{changes}     \usepackage{appendix}     \usepackage{filecontents}     \usepackage{multirow}     \usepackage{booktabs}                    \begin{document}          \section{The Model}          The main environment modifies that of \cite{Diamond1965}, into two main dimensions          \newpage          \bibliographystyle{elsarticle-harv}     \bibliography{references}                    \end{document}


title: ltablex and booktabs

text: I need a table which is larger than one page and it should have a fixed size. To improve the look, I use booktabs. However, the foot of the table is not nice on all pages, except on the last page. ![enter image description here](http://i.stack.imgur.com/V0rwa.png) Here is my MWE               \documentclass{scrartcl}     \usepackage{booktabs}     \usepackage{ltablex}     \usepackage{blindtext}     \begin{document}     \begin{tabularx}{\linewidth}{XX}     left & right\\\toprule     \endhead     \bottomrule     \endfoot     \blindtext & \blindtext\\*\midrule     \blindtext & \blindtext\\*\midrule     \blindtext & \blindtext\\     \end{tabularx}     \end{document}      Is there a possibility to detect, if a row will be the last row on a page? Than I would be able to avoid the double line. Like the following pseudo code               is row last row of the page than \bottomrule else \midrule      I would like to have only a `\bottomrule` at the end of each page but no double line ![enter image description here](http://i.stack.imgur.com/ygQI5.png)


title: AUCTeX style for siunitx

text: Is there any `AUCTeX` style for `siunitx`? If not are there any simple tricks which make it more easy to type `siunitx` commands in `emacs`. For example if I type `C-c C-m SI` it inserts just `\SI{}` with one pair of braces and not two. In particular it doesn't give a prompt to insert the arguments.


title: Glossary with entries without reference

text: Is there a command so that the glossary will also display elements without links (an equivalent of `\nocite` in BibTeX)?


title: No cleveref in beamer?

text: I am trying to get a math beamer presentation to work and it seems that `cleveref` is causing problems. The MWE below gives the error > Paragraph ended before \@ynthm was complete In the documentation of `cleveref`, one finds the following remark: > The beamer document class rededefines the \label command in a particularly > devious way that breaks cleveref's optional argument to that command. What optional argument? Does that mean that `cleveref` and `beamer` are simply incompatible? Is there any way around that problem? MWE:               \documentclass{beamer}          \makeatletter     \let\th@plain\relax     \makeatother          \usepackage{ntheorem}     \usepackage{cleveref}          \theoremstyle{plain}          \newtheorem{MainThm}{Main Theorem}          \crefname{MainThm}{Main Theorem}{Main Theorems}          \mode<presentation>{\usetheme{Frankfurt}}          \begin{document}     \begin{frame}{Test}         \begin{MainThm}             blabla         \end{MainThm}     \end{frame}     \end{document}


title: Really big table troubles

text: I have a really big problem here. I have to insert a big table in a document. No matter how I tried to make it smaller, my boss does not want it to be changed. He made it using word, and I have to insert it in latex document. I tried using ltxtable, but it creates 116 errors... yeah, 116... Here is the code I use for the table :               \begin{longtable}{|X|X|X|X|X|}%     \tiny     \hline     Problèmes & Exigences de conception de l'ATL  & Principes de conception de l'ATL & \multicolumn{2}{|c|}{Approche logicielle d'implantation}\\     \hline     Complexité & Masquer aux développeurs d'applications la connaissance et la complexité du choix des solutions protocolaires à invoquer.\newline Masquer aux développeurs d'applications la complexité d'utilisation des solutions protocolaires qui seront invoquées. & Abstraction Sémantique & \multirow{4}{\hsize}{Approche orientée services} & Approche basée sémantique\\     \cline{1-3} \cline{5-5}     Dépendance & Permettre une adaptation de la solution protocolaire retenue en réponse à une évolution du contexte machine/réseau, ou bien à une modification de l’expression du service requis par l’application, c’est à dire :\newline     \begin{itemize}       \item être doté d’une capacité d’autonomie dans la prise de connaissance du contexte et de ces évolutions, en plus de celle liée au choix et à la mise en \oe uvre des solutions protocolaires à invoquer;       \item être doté d’une capacité d’autonomie dans le choix et la mise en œuvre des adaptations de la solution protocolaire en cours;       \item offrir aux développeurs d’applications la possibilité de modifier les caractéristiques du service requis durant le temps d’exécution de l’application.     \end{itemize} & Abstraction Autonomie & & Approche autonomique\\     \cline{1-3} \cline{5-5}     Manque d'extensibilité & Permettre son intégration au sein de son pool de services et de solutions protocolaires, en vue de la mise à disposition du service correspondant et de l’utilisation de la solution protocolaire. & Extensibilité & & \multirow{2}{\hsize}{Approche basée composants}\\     \cline{1-3}     Manque de configurabilité & Gérer la nature composable des différents protocoles et mécanismes protocolaires, chaque protocole pouvant se voir adjoindre des mécanismes externes. & Configurabilité & & \\     \hline     \caption{Synthèse des problèmes, exigences, principes et approches de conception de l'ATL}     \label{syntheseapproches}     \end{longtable}      Which I insert in the main document using :               \LTXtable{\textwidth}{Tables/synthese_approches}      I know this is crappy. There is a lot of text which is very wide and I don't have much time, unfortunately. A pdf of the "model" made with Word can be found there: http://homepages.laas.fr/gdugue/bigTable.pdf I know this problem may get on the nerves of some of you or make you at least raise an eyebrow, and for this I apologize in advance. Many many thanks for your help, I've been trying to work my way through this for days with no light of hope.


title: Non-ASCII character in label

text: Here's my MWE:               \documentclass[norsk]{article}     \usepackage{babel}     \usepackage[utf8]{inputenc}     \begin{document}          \begin{figure}            \caption{Skjærgårdsøl}       \label{Skjærgårdsøl}     \end{figure}          \end{document}      This gives the following error message:               (/opt/local/share/texmf-texlive/tex/latex/base/omsenc.dfu))) (./test.aux     ! Missing \endcsname inserted.     <to be read again>                         \OT1\ae      l.3 ... {\ae }rg\IeC {\r a}rds\IeC {\o }l}{{1}{1}}               LaTeX Warning: Label `Skj\IeC {\ae }rg\IeC {\r a}rds\IeC {\o }l' multiply defined.      I use TeXLive 2013 for Macintosh, the code is written using Emacs 24.3.1 for MacOS X, pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/MacPorts 2013_2). I'd very much like to not have to use workarounds when labels are generated - is there a way to make æøåÆØÅ work with labels?


title: How to modify eqnarray?

text: I'm currently writing a maths undergrad dissertation using Texmaker, and when I use `eqnarray`. It keeps justifying all of the equations to the right but still in the center? How do I change this so that they align on the left (but still in the center)? I.e. so all the equals signs align? For example:               \documentclass[11pt]{article}     \usepackage{amsmath}          \begin{document}        \begin{eqnarray}         \dfrac{d }{dx} \dfrac{y'}{\sqrt{1+(y')^2}} = 0\\         \Rightarrow \dfrac{d }{dx} \dfrac{f'(x)}{\sqrt{1+(f'(x))^2}}=0\\         \Rightarrow \displaystyle\int_b^a \dfrac{d }{dx} \dfrac{f'(x)}{\sqrt{1+(f'(x))^2}} \,dx= constant = C\\         \Rightarrow f'(x) = \dfrac{C}{\sqrt{1-C^2}} = m\\         \Rightarrow \quad f(x) = mx+ \text{constant}       \end{eqnarray}     \end{document}


title: Table-caption rotated wrongly

text: How can the table-description in tufte-handouts be placed correctly with sideways-tables and xtable? See following minimal reproducible example where the figure-description is corrrect (stolen from tikzDevice-manual), but the table-description is not. I have been struggling with finding a solution, but without success. I need the table- and figure-descriptions to be placed consistently.               \documentclass{tufte-handout}     \usepackage{rotating}     \usepackage{tikz}          \begin{document}     <<plotchunk, echo=FALSE, message=FALSE, results=FALSE, warning=FALSE, error=FALSE>>=     library(tikzDevice)     tikz("tikz-example.tex",     width = 3.25, height = 3.25)     plot(1, 1, main = "Hello \\TeX !")     @     \begin{figure}     \centering     \input{tikz-example.tex}     \caption{This figure-description is where it should be, and with the correct direction}     \end{figure}     <<tablechunk, results='asis', echo=FALSE>>=     library(xtable)     example.df <- data.frame(matrix(0, nrow=10, ncol=20))     x.small <- xtable(example.df, label=NULL, caption="This is the table description that should not be sideways, but placed similarly as the figure-description")     digits(x.small) <- 0     print(x.small,include.rownames=FALSE,floating.environment="sidewaystable")     @     \end{document}      If the sideways-table can be rotated 180 degrees, that would be great too, but not necessary.


title: Emulating a shell environment

text: I'm trying to define a new environment, which emulates a shell. The way I would like to use it:               \begin{shell}     \item{echo foo}{foo}     \item{echo bar}{bar}     \end{shell}      Which should produce:               This is my shell prompt     1> echo foo     foo     2> echo bar     bar      What I have so far:               \newcommand{shellprompt}{This is my shell prompt}     \newenvironment{shell}{       \shellprompt       \begin{enumerate}[\hspace{15px} 1\textgreater]         \let\olditem\item         \renewcommand\item{\olditem}       }{       \end{enumerate}     }      How do I redefine the `\item` command so it accepts a second parameter and prints it on a second line? **Bonus** : How do I wrap everything (prompt + items) in a `verbatim` environment?


title: UTF-8 (but not in current font) character in newcommand

text: I'm trying to define a new single-character LaTeX command (to insert a 1 pt space with \kern1pt) and want to use one of the characters obtained through the AltGr key on a US International keyboard layout. I've chosen the Unicode U+00A6 '¦', aka 'Broken Bar' character. This is my preamble               \documentclass[11pt,english]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{textcomp}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{babel}      and this is my newcommand definition               \expandafter\newcommand\csname u8:\detokenize{¦}\endcsname{\kern1pt}      and the error I get:               ! LaTeX Error: Command \u8:┬ª already defined.     .              Or name \end... illegal, see p.192 of the manual.      So, trying to understand what is going on, I replaced '¦' with '∙', the Unicode U+2219 'Bullet Operator' character. I first made sure that LaTeX complained, in insertions in normal text, as loudly with '∙' as it does with '¦', (it does) and then changed my newcommand definition thus:               \expandafter\newcommand\csname u8:\detokenize{∙}\endcsname{\kern1pt}      This time I got no errors, so I proceeded to use my new macro               a\∙b      and got this error:               ! Undefined control sequence.     l.530 a\Ô     .        êÖb      Trying to fix that, I added this to my preamble,               \DeclareUnicodeCharacter{2219}{\textsurd}    % Recognise `∙' character in input      and got this error instead:               ! LaTeX Error: Command \u8:ÔêÖ already defined.     .              Or name \end... illegal, see p.192 of the manual.      Can someone please save me hours sifting through the newunicodechar package manual? (And I remind that it's a '¦', not '∙' that I need to use.)


title: Is example-image-a compatible with DVI mode?

text: I could not get the expected result when compiling the following with `latex- dvips-ps2pdf`. The unexpected result is just a single blank page with a page number 1. :-)               \documentclass{article}     \usepackage{graphicx}          \begin{document}          \includegraphics{example-image-a}          \end{document}      Is `example-image-a` compatible with `latex` (i.e. DVI mode)? Is there an EPS version for that image? Loading `mwe` package did not help as well. ## Log from `latex.exe`               This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)     entering extended mode     (F:\test.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat     vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm     an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,      romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis     sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u     senglishmax, welsh, loaded.     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo"))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\mwe\mwe.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphics.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\dvips.def")))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\lipsum\lipsum.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\blindtext\blindtext.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\xspace.sty"))) (F:\test.aux     ) <example-image-a.eps> [1] (F:\test.aux) )     Output written on test.dvi (1 page, 284 bytes).     Transcript written on test.log.


title: cannot use \caption under minipage

text: I am using following code to import two images next to each other. When `\caption{}` is used, LaTeX gives me error **caption outside float**.               \begin{minipage}{.5\textwidth}     \centering     \includegraphics[width=0.5\textwidth]{fig1.eps}     \caption{text for fig1}     \label{fig:fig1}                 \end{minipage}     \begin{minipage}{.5\textwidth}     \centering     \includegraphics[width=0.5\textwidth]{fig2.eps}     \caption{text for fig2}     \label{fig:fig2}                 \end{minipage}      When I remove the `\caption` from both places, the code compiles correctly.               \begin{minipage}{.5\textwidth}     \centering     \includegraphics[width=0.5\textwidth]{fig1.eps}     \label{fig:fig1}                 \end{minipage}     \begin{minipage}{.5\textwidth}     \centering     \includegraphics[width=0.5\textwidth]{fig2.eps}     \label{fig:fig2}                 \end{minipage}      But both the codes do not generate any label naming the figure. (something like **Figure 21** ). Am I missing anything?


title: TikZ Externalize fails with multiple files

text: I've recently been having trouble getting TikZ to compile figures. I say recently, because a month ago, I wasn't having any problems. I'm not aware of any file corruption or updates that would have caused a change, and I'm at a loss as to what is causing this problem. (I've tried reinstalling the modules, so the source of the problem is more insidious.) Here's the problem: After fixing a problem with the auxlock file used by tikzexternalize (see this question), I am continuing to have trouble with this feature. I should note that if I disable externalization, I am having no trouble at all, except that, for long documents, the compile times become ludicrously long (hence, my desire to use externalize). The error I receive is that lualatex has segfaulted during the convert-with- system-call, and PDF output has failed to generate. I should also note that, if I prepare trivial plots, I have no problem. I'm not sure that its practical to create a MWE for this problem, since to some extent, it depends on conflicts specific to my project. (I have for instance, already discovered a conflict between TikZ and enumerate, also mentioned here.) I recently limped my way through the compile process by creating a minimal script to contain the all the TikZ inputs I'm using and uncommenting them one at a time. You see, it seems that something is wrong with the optimization routine that isn't allowing tikzpictures to be skipped appropriately. If, however, the figure is already compiled and has a pdf, the skipping works as it should. This means that, in order to compile all the figures, I have to comment out all TikZ references after the one being compiled. This is a tedious process for more than a few figures. Once the figures are compiled, they slide seamlessly into my main document. But since TikZ externalize is successfully integrating externalized images, and TikZ is compiling fine when externalization is invoked, and TikZ externalize even creates images successfully as long as no other TikZ image to be rendered is present, I am truly baffled as to how it fails when an ordinary document with multiple TikZ references is compiled. I apologize that this question isn't clearer, but the nature of the problem is quite opaque to me. If there are any useful details I can provide, I would be happy to provide them.


title: Optimizing code for dimension arrows (CAD) in TikZ

text: In Engineering it is customary to denote small dimensions with arrows as shown below (in binding correction and trim top): ![enter image description here](http://i.stack.imgur.com/gbuXl.jpg) Variants exist such as ![enter image description here](http://i.stack.imgur.com/iFYxn.jpg) Currently they are all hardcoded as for example:                \draw (0, \trystockheight@cx + 3mm) -- ++ (0,1cm)            ++ (\lefttrim,-1cm) -- ++(0,1cm) ++(-1cm-\lefttrim,-0.5cm)[->,>=latex]            -- ++(0.5cm+\lefttrim,0);             \draw (0, \trystockheight@cx + 3mm)             ++ (0,0.5cm) -- ++ (\lefttrim,0)             ++(1cm,0cm)[|->,>=latex]-- ++(-1cm,0cm)             node[right] at ++(1cm,0)             {\bindingcorrectionname\ \convert@cx{\lefttrim} $(\delta_b)$ };      What is an efficient was to generalize and draw such arrows, taking into account that labels can be left or right etc. My apologies to anyone that might need a MWE, but the current code is quite longish to cut down to a minimal.


title: Why is pdflatex automatically loading a ConTeXt package and crashing

text: If I process the following MWE with pdflatex (TeXLive 2012, Linux)               \documentclass{article}     \usepackage{color}     \def\mymacro#1{#1}     \begin{document}     \pdfinfo{/Title (Some text \textbf{This macro causes problems})}     Hello world     \end{document}      I get an error from ../texmf-dist/tex/context/base/supp-pdf.mkii. That seems to be a ConTeXt file. The error is > >     ! TeX capacity exceeded, sorry [input stack size=5000]. >     \@@mpstopdf@@unprotect ... \@@mpstopdf@@unprotect >                                \unprotect \let \@@mpstopd... >     l.34     \def\unprotect >   >     !  ==> Fatal error occurred, no output PDF file produced! >   It also happens if I load `xcolor`, but not if I load `graphicx` or any other package I have tried. While it is not specific to `\textbf`, I don't get the problem with `\mymacro`. What is going on?


title: Table and Figure side-by-side with Table caption above, Figure caption below

text: A continuation of this question. I'm fighting a page-limit in a single-column layout and I need to put a Figure and a Table side-by-side and provide them with independent captions. However, the style guide for the publishers (LNCS) wants Figure captions below and Table captions above (probably something to do with this). ======================================================= If I adapt @lockstep's `floatrow` example from this question accordingly to have a Table caption above ...               \documentclass{article}          \usepackage{floatrow}     % Table float box with bottom caption, box width adjusted to content          %% **********************************     %% just adding \captop to original example     %% **********************************     \newfloatcommand{capbtabbox}{table}[\captop][\FBwidth]          \usepackage{blindtext}               \begin{document}          \blindtext          \begin{figure}     \begin{floatrow}     \ffigbox{%       \rule{3cm}{3cm}%     }{%       \caption{A figure}%     }     \capbtabbox{%       \begin{tabular}{cc} \hline       Author & Title \\ \hline       Knuth & The \TeX book \\       Lamport & \LaTeX \\ \hline       Knuth & The \TeX book \\       Lamport & \LaTeX \\ \hline       Knuth & The \TeX book \\       Lamport & \LaTeX \\ \hline       \end{tabular}     }{%       \caption{A table}%     }     \end{floatrow}     \end{figure}          \end{document}      ======================================================= The problem becomes clear ... ![enter image description here](http://i.stack.imgur.com/I59dL.jpg) ======================================================= The `floatrow` doesn't correctly line up the Table and Caption. I reluctantly tried to use `vspace` to solve the problem, but it didn't work out. Any suggestions on how to get these two to align? I'm happy to accept any alignment that ensures that the Table and Figure fit within the same "box". (A similar-ish question was asked here, but specific for `subfig` and with a very localised problem it seems.)


title: LaTeX error when inserting code listing in LyX

text: I am currently making a presentation in LyX. After I have inserted some XML code in a code listing, I am getting this error:               Paragraph ended before \lst@next was complete.     Paragraph ended before \lst@next was complete.     LaTeX Error: \begin{lstlisting} on input line 228 ended by \end{beamer@framep     Missing } inserted.     Extra }, or forgotten \endgroup.      What's the problem? Have I to escape some characters or something? I am pretty new to LyX. EDIT: Here is a little code snippet. Because I am working with LyX, the code is generated and looks a little bit confusing, I think. I hope you can read it.               \begin_layout BeginFrame     \lang english     Güte der Ergebnisse     \end_layout     \begin_layout Standard     \lang english     \begin_inset listings     inline false     status open     \begin_layout Plain Layout     <server>      \end_layout     \begin_layout Plain Layout     <name>MyServer</name>      \end_layout     \begin_layout Plain Layout     <version>1</version>      \end_layout     \begin_layout Plain Layout     <functionality>0</functionality>      \end_layout     \begin_layout Plain Layout     <platform>Win</platform>      \end_layout     \begin_layout Plain Layout     </server>      \end_layout     \begin_layout Plain Layout     </ddsml>      \end_layout     \end_inset     \end_layout     \begin_layout EndFrame     \start_of_appendix     \end_layout


title: German character not rendered to pdf

text: I just started using LaTeX, and need to use the character "ü". I already have this in main file :               %%% Sprach- und zeichensatzspezifische Pakete     \usepackage[latin9]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{ngerman}     \usepackage{array}      where I believe the `latin9` `inputenc` will allow me to show **ü** in the PDF file. However, when I type `pdflatex main`, I get the PDF file, where the word _für_ is rendered as **fÃŒr** There is no error, and the package is already there (if not, for sure it will prompt me for error message). How to render this "ü" in PDF? Would appreciate any answer.


title: BibLaTeX Biber in TeXnicCenter does not produce bibliography

text: I recently changed to `backend=biber` after some problems with encoding in `bibtex8` ( Biblatex encoding ). Everything seemed to work fine until I added some references and updated the bibliography file. The new references remained undefined. I removed all "additional" files (like `.aux` etc.) from the project folder and ran LaTeX three times. All the references were now undefined and even no `.blg` file is produced. So I had a look in the internet and found someone with a similar problem in a German LaTeX community. He used to work with Texmaker, and apparently the problem was that `biber` was trying to get the information from `.aux` file instead of `.bcf` file. That user changed this manually in Texmaker and everything started working. However, another user suggested that within TeXnicCenter (which I am using) this doesn't need to be done as this is already indicated by `%tm`. Now I am completely lost as to how to fix the problem. Here is an MWE:               \documentclass{scrartcl}          \usepackage[british]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage[style=authoryear-comp, maxnames=1, doi=false, url=false, bibencoding=utf8, backend=biber]{biblatex}               \bibliography{litthesis}          \begin{document}          This is my text \parencite{Hong2006}          \newpage          \printbibliography     \end{document}      And here is the bibliography:               @article{Hong2006,     author = {Hong, Seungpyo and Leroueil, Pascale R and Janus, Elizabeth K and Peters, Jennifer L and Kober, Mary-Margaret and Islam, Mohammad T and Orr, Bradford G and Baker, James R and Holl, Mark M Banaszak},     title = {Interaction of polycationic polymers with supported lipid bilayers and cells: nanoscale hole formation and enhanced membrane permeability.},     journal = {Bioconjug Chem},     volume = {17},     number = {3},     pages = {728-734},     year = {2006}     }      Here is what's written in the `.log`-file:               Package biblatex Info: Trying to load bibliographic data...     Package biblatex Info: ... file 'mwe.bbl' not found.          No file mwe.bbl.      Does anyone have an idea what's going wrong?


title: Problem with table of contents

text: I got a problem with the table of contents. I can not see the list of figures or tables include it. They are not present, even when they are before the Introduction and have the roman numeration. What can I do to include them?


title: MiKTeX Portable can't open Beamer theme

text: I have a Beamer theme called `beamerthemeMittweida.sty` that's not available in a package. At home I just copied the `.sty` to `Miktex\tex\latex\beamer`, then updated all packages and I was able to use the theme. At work I copied the file in the same directory but when I run pdfLaTeX it can't find it. I already used the "Refresh FNDB" function in the MiKTeX settings but still doesn't work. Due to some proxy/firewall stuff I can't use the update function at work. The log:               ...     (D:\Miktex\tex\latex\beamer\base\beamerbasethemes.sty))     (D:\Miktex\tex\latex\beamer\base\themes\theme\beamerthemedefault.sty     (D:\Miktex\tex\latex\beamer\base\themes\font\beamerfontthemedefault.sty)     (D:\Miktex\tex\latex\beamer\base\themes\color\beamercolorthemedefault.sty)     (D:\Miktex\tex\latex\beamer\base\themes\inner\beamerinnerthemedefault.sty)     (D:\Miktex\tex\latex\beamer\base\themes\outer\beamerouterthemedefault.sty)))          ! LaTeX Error: File `beamerthemeMittweida.sty' not found.          Type X to quit or  to proceed,     or enter new name. (Default extension: sty)          Enter file name:       EDIT: the .tex file I'am using:               \documentclass[smaller]{beamer}          \usetheme{Mittweida}          \author[Name]{Name des Vortragenden}     \title[Kurztitel]{Titel des Vortrags}     \subtitle{Untertitel}     \institute[Fachgruppe o.\"a.]{Organisationseinheit}     %\date{}          \begin{document}     \maketitle          \begin{frame}{Inhalt}     \transdissolve<1>     Folieninhalt     \end{frame}          \end{document}


title: Latexmk with makeglossaries and auxdir and outdir?

text: How can I use `glosseries` with latexmk if I use `outdir` and `auxdir` parameters? I keep getting the `.gls` not found... Here is my latexmk build script:               latexmk -outdir=out -auxdir=out -g -f -bibtex -dvi- -pvc -pdflatex="xelatex -synctex=0 %O %S" -pdf $1      If I remove the auxdir and outdir param, everything works fine. Any help appreciated. EDIT: Stop up-voting the answer unless you checked it yourself and it works! Because it does not work for me.


title: Widow word on a page? I thought LaTeX wouldn't do that

text: Just had a surprise. I have a section in an article followed by a figure. The text flows over a page and ... one more word on the next page (which also includes the figure). Yes, I added a ~ before that word to make it fit on the first page but I thought LaTeX wouldn't do this (leave widow words, not even sentences)! Is there anything in particular that needs to be enabled to avoid this? I used MikTeX 2.8 with output to PDF (both pdftex and pdflatex produced the same problem).


title: How to eliminate unnecessary page break in LaTeX?

text: I have couple of lines (text) followed by table. I want both the text and table to appear in same page, now text appears in one page and table in next page. How to change it? I have tried using `\vspace{-5cm}`but of no use, is there a better way? Example:               \chapter{bbbb : aaaa}     \label{cccc}          \begin{footnotesize}     \sf     \section{eeee}     \label{fffff}          \#Print Out Time:          3/15/2010 2:06:07 PM                                    \\      \#Ref:                     xyz     ..............            \begin{tabular}{lllrl}     ........          \end{tabular}


title: Continue a sentence without page break

text: > **Possible Duplicate:**   >  Widow _word_ on a page? I thought LaTeX wouldn't do that.   >  How to eliminate unnecessary page break in LaTeX? I have the following problem: In the end of my document, the last 2 lines appear on an empty new page. However, it looks esthetically ugly, and I would like the 2 lines to continue on the previous page, and end the document with a full page, even with the price of smaller margin or more condensed text. How can I achieve that?


title: Controlling `\subsection` output at `.toc` file

text: Consider the following simple code               \documentclass[12pt]{article}     \usepackage [english] {babel}     \begin{document}          \tableofcontents         \section{One}         \subsection{Two}         \subsection{Three}     \end{document}      It will produce the `.toc` file with the following inside               \select@language {english}     \contentsline {section}{\numberline {1}One}{1}     \contentsline {subsection}{\numberline {1.1}Two}{1}     \contentsline {subsection}{\numberline {1.2}Three}{1}      Then if I will format my table of contents with `tocloft` package I will always have a deal with numbers of sections formatted as `<section>.<subsection>`. My question is if it is possible to control output of `\subsection` command into `.toc` file to obtain in `.toc` file numbers of subsections formatted as `<subsection>`:               \select@language {english}     \contentsline {section}{\numberline {1}One}{1}     \contentsline {subsection}{\numberline {1.1}Two}{1}     \contentsline {subsection}{\numberline {1.2}Three}{1}      (P.S. I use `titlesec` and `titleloft` packages and then if there are no proper easy solution I would like to have a solution that doesn't affect work of these packages).


title: How to find error when the only error you are getting is an "Emergency Stop" in line 0?

text: How does one go about finding the problem with a document when the only errors is "Emergency Stop" in line 0. I have a rather long document and I fixed all of the other problems it told me to fix but this one persists. Any ideas?


title: Drawing a brush stroke like outline

text: I'm trying to reproduce the following picture with TikZ: ![enter image description here](http://i.stack.imgur.com/VFroW.png) Which is basically a circle with a variable width outline (the red line in the pic) that looks like a brush stroke. Can someone kindly give me a pointer to where to start?


title: Is there a workaround for this limitation of \patchcmd?

text: The `\patchcmd` command of the well-known `etoolbox` package has a minor limitation: Patching seems to fail whenever `\patchcmd` is used in the argument of another command and the search/replacement texts themselves include references to arguments. For example:               \documentclass{article}          \usepackage{etoolbox}          \def\test#1{#1test}          \ifdefparam{\test}{%       \patchcmd{\test}{#1}{#1-}{\typeout{juhu!}}{\typeout{oje!}}%     }{%     }          \show\test          \begin{document}          \end{document}      Here, the problem can easily be solved using the following trick:               \documentclass{article}          \usepackage{etoolbox}          \def\test#1{#1test}          \ifdefparam{\test}\iftrue\iffalse       \patchcmd{\test}{#1}{#1-}{\typeout{juhu!}}{\typeout{oje!}}     \fi          \show\test          \begin{document}          \end{document}      But the question remains: Is there a generally applicable workaround for this limitation of `\patchcmd`?