title: pgfplots, change legende image style

text: I'd like to plot data marks and a linear regressions for two data sets in the same plot and add a legend entry for one data/regression pair: Here is my current state:               \documentclass{article}     \usepackage{pgfplotstable}     \pgfplotstableread[col sep = comma]{       x,   y1,      y2,       1,    1.0,     3.0,       2,    2.2,     6.3,       4,    3.9,    10.0,       8,    8.1,    25.0,       } \data      \begin{document}       \begin{figure}        \centering        \begin{tikzpicture}          \begin{axis}[legend pos=north west,               legend image post style={solid}            ]            \addplot[only marks,mark=o,color=red] table [x=x, y=y1] {\data};            \addplot[no markers,color=red,forget plot] table [x=x, y={create col/linear regression={y=y1}}] {\data};            \addlegendentry{y1}            \addplot[only marks,mark=square,color=blue] table [x=x, y=y2]{\data};            \addplot[no markers,color=blue,forget plot] table [x=x, y={create col/linear regression={y=y2}}] {\data};            \addlegendentry{y2}          \end{axis}        \end{tikzpicture}       \end{figure}      \end{document}      It creates the following image: ![Legend without lines :\(](http://i.stack.imgur.com/W8Wxh.png) I'd like to have a line and a mark for each single legend entry, but currently only the marks appear. How can I draw the lines as well? When I change the described plots to the line plots (i.e. moving the 'forget plot' option one line up), I guess I can not add different marks according to each entry in the legend, can I? Thanks, Juhui


title: Wrong vertical text position with Tikz

text: This is driving me nuts. The "Job5" and "Job6" text is slightly verticaly higher than the rest of text. I'm suspecting the "inner sep", but I need that for the fit. How can I re-adjust the text?               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{fit}          \begin{document}     \begin{tikzpicture}[auto,         singlejob/.style = {rectangle, minimum height = 1cm, minimum width = 2cm, fill=blue!20, thick, outer sep=0pt, inner sep=0pt, align=center, anchor=mid, text centered},         doublejob/.style = {rectangle, minimum height = 1cm, minimum width = 4.1cm, fill=blue!20, thick, inner sep = 0pt, align=center, anchor=mid, text centered}     ]         \matrix[column sep=0.1cm, row sep=0.1cm, ampersand replacement=\& ] {             \node[rectangle, minimum height = 1cm, minimum width = 1cm ] { $Resc_1$ };\&             \node[draw, singlejob] {$Job_1$};\& \node[draw, singlejob] {$Job_2$};\&             \node[draw, singlejob] {$Job_3$};\& \node[draw, singlejob] {$Job_4$};\\                  \node[rectangle, minimum height = 1cm, minimum width = 1cm ] { $Resc_2$ };\&             \node[singlejob] (j51) {}; \& \node[singlejob] (j52) {}; \&             \node[singlejob] (j61) {}; \& \node[singlejob] (j62) {}; \\         };         \node[draw,doublejob] (outer) [fit=(j51) (j52)] {$Job_5$};         \node[draw,doublejob] (outer) [fit=(j61) (j62)] {$Job_6$};     \end{tikzpicture}     \end{document}      ![result of compiling the above code](http://i.stack.imgur.com/ZEjQD.png) * * * Smaller example (added by Andrew Stacey). The problem appears to be to do with how the `fit` library expands its nodes:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{fit}          \begin{document}          \begin{tikzpicture}     \node[draw,inner sep=0pt,fit={(0,0) (1,-2)}] (a) {a};     \node[draw,minimum width=1cm,minimum height=2cm,anchor=north west] (b)     at (1.5,0) {a};     \draw[ultra thick,red] (a.base) -- (b.base);     \end{tikzpicture}          \end{document}      ![text positioning in fitted nodes](http://i.stack.imgur.com/SPErG.png)


title: pdfTeX warning: has been referenced but does not exist, replaced by a fixed one, with German Umlaut

text: I'm new to LaTeX, and have been given a LaTeX draft for writing a thesis. Everything works fine except for this warning:               see the transcript file for additional information)pdfTeX warning (dest): name{ehrenw\366rtliche\040erkl\344rung.1} has been referenced but does not exist, replaced by a fixed one      Here is the position in the code:               \refstepcounter{dummy}       \pdfbookmark[1]{Ehrenwörtliche Erklärung}{ehrenwörtliche erklärung}       \chapter*{Ehrenwörtliche Erklärung}       \thispagestyle{empty}`      When I don't use German Umlauts(ä,ö,ü), i.e.               \pdfbookmark[1]{Ehrenwoertliche Erklaerung}{ehrenwoertliche erklaerung}      it works fine! I don't get any warnings and the link works. I've been Googling for 2 weeks for similar warnings, and trying things out but none worked. Any one with similar experience or ideas how to get this fixed. I'm using MAC 10.8 with MacTeX-2012


title: Completely expandable loop macro that also works in tabular

text: Since I normally use `tikz` in my documents, I mostly use the `\foreach \x in \list` loop to repeat things. However, this famously fails in `tabular` environments and also everywhere where things must be expanded. Now most of the time I just want to repeat things a handful of times, let's say not more than 50 iterations and no nested loops or stuff like that. Consequently, performance is usually not an issue. Based on these observations I've written a (probably grossly inefficient) loop macro that uses a C-like `for` syntax. It works in `tabular` environments to generate multiple columns in a single line or - with some additional care - to generate multiple rows: ![Some tables generated using loops](http://i.stack.imgur.com/N829h.png) Now there are clearly some issues with this loop, but at the moment it "works for me" most of the time. Still I'd like to improve it, so these are the points that bug me the most:   1. Each iteration's loop body is completely expanded using `\edef`. This ensures that the loop counter is expanded to its value during that iteration. However this also requires the user to protect some things using `\noexpand`, like `\pgfmathparse` or `\\` and `\hline` in the tables below. Also it would require double protection (3 `\noexpand`s?) for nested loops.   2. Obviously it's not completely expandable because it uses `\def` and `\edef`, so it's not possible to use the loop inside, say, another `\edef` in order to define a macro that has a regular structure (although of course it's perfectly possible to `\def` a macro that expands to a loop invocation). For problem 1 it would be great to have a way to expand _only_ the loop counter anywhere it's used in the loop body, but leave everything else alone. For problem 2 (if at all possible) my guts tell me that I'd probably have to sacrifice some functionality, like the flexible loop counters and conditions (e.g. `\repeat{\i}{5}{some code using \i}` instead of the C-like syntax). However I don't really know how to approach these problems. Can anyone give me some pointers in the right direction? Is it at all possible to achieve both, selective expansion and complete expandability? Finally, here's the code:               \documentclass{article}          \begin{filecontents*}{myforloop.sty}     \usepackage{pgf}     \usepackage{pgffor}     \usepackage{ifthen}          % Example:     % \for (\i = 0; \i < 10; \i = \i + 1) {     %    some code using \i     % }          \def\for(#1=#2;#3;#4=#5)#6{%         \def\forloopresult{}%                        Macro to store the result         \pgfmathtruncatemacro{#1}{#2}%               Set initial value of counter         \def\forloopinner{%                          Recursive loop macro             \pgfmathparse{int(#3)}%                  Calculate loop condition             \ifthenelse{1=\pgfmathresult\relax}{%    if loop condition is true:                 \toks@=\expandafter{\forloopresult}%   Get tokens from result macro                 \edef\forloopresult{\the\toks@#6}%     Append expanded code to result                 \pgfmathtruncatemacro{#1}{#5}%         Set new counter value                 \forloopinner%                         Recurse             }{%                                      else:                 \forloopresult%                        Expand to result             }%         }%         \forloopinner%                               Start looping     }     \end{filecontents*}     \usepackage{myforloop}          \newcommand\N{5}% Number of loop iterations          \begin{document}     \begin{tabular}{|r|*{\N}{r|}}         \hline         $x$:   \for(\x=0; \x<\N; \x=\x+1) {&\x}\\\hline         $e^x$: \for(\x=0; \x<\N; \x=\x+1) {%             & \noexpand\pgfmathparse{exp(\x)}\noexpand\pgfmathresult%         }\\\hline     \end{tabular}          \vspace{1em}          \begin{tabular}{|l|l|}     \hline     $x$ & $e^x$ \\\hline     \for(\x=0; \x<\N; \x=\x+1) {%         \x & \noexpand\pgfmathparse{exp(\x)}\noexpand\pgfmathresult         \noexpand\\\noexpand\hline     }     \end{tabular}     \end{document}


title: Include an image in title page using powerdot

text: I want to include an image at the center of the title page of my `powerdot` presentation. Incidentally, I want the same image to appear as a logo on all the other slides (positioned bottom centre), except on the title page. How do I achieve this? So far I did the following, which did not work:                    \title{Hardware Evaluation}          \author{\bf{Priya} }          \titlegraphic{\includegraphics[scale=1.0]{Logo.eps}}              \pdsetup{         palette=Sea,         randomdots,         dprop={dotstyle=ocircle,linewidth=.01pt},         dmindots=5,dmaxdots=5,         dminsize=100pt,dmaxsize=200pt,         dbright=50,         logohook=c,         logopos={.500\slidewidth,.060\slideheight},         logocmd={\includegraphics[scale=.03]{Logo.eps}}        }      Can someone help me place Logo.eps as a centre image on the title slide and as a logo (bottom centre) on the remainder slides. Thank You.


title: How to write \StrGobbleLeft output to an external file?

text: I have not learnt how the TeX expansion works behind the scene. Shortly speaking, how to write `\StrGobbleLeft` output to an external file?               \documentclass{article}     \usepackage{filecontents}     \begin{filecontents*}{rawdata.txt}     beamerthemeAnnArbor.sty     beamerthemeAntibes.sty     beamerthemeBergen.sty     beamerthemeBerkeley.sty     beamerthemeBerlin.sty     beamerthemeBoadilla.sty     beamerthemeboxes.sty     beamerthemeCambridgeUS.sty     beamerthemeCopenhagen.sty     beamerthemeDarmstadt.sty     beamerthemedefault.sty     beamerthemeDresden.sty     beamerthemeEastLansing.sty     beamerthemeFrankfurt.sty     beamerthemeGoettingen.sty     beamerthemeHannover.sty     beamerthemeIlmenau.sty     beamerthemeJuanLesPins.sty     beamerthemeLuebeck.sty     beamerthemeMadrid.sty     beamerthemeMalmoe.sty     beamerthemeMarburg.sty     beamerthemeMontpellier.sty     beamerthemePaloAlto.sty     beamerthemePittsburgh.sty     beamerthemeRochester.sty     beamerthemeSingapore.sty     beamerthemeSzeged.sty     beamerthemeWarsaw.sty     beamerthemebars.sty     beamerthemeclassic.sty     beamerthemecompatibility.sty     beamerthemelined.sty     beamerthemeplain.sty     beamerthemeshadow.sty     beamerthemesidebar.sty     beamerthemesplit.sty     beamerthemetree.sty     \end{filecontents*}          \usepackage{xstring}          \begin{document}     % writer     \newwrite\writer     \immediate\openout\writer=list.txt\relax     % reader     \newread\reader     \openin\reader=rawdata.txt\relax     \makeatletter     \loop         \read\reader to \x         \unless\ifeof\reader             \filename@parse{\x}             \immediate\write\writer{\StrGobbleLeft{\filename@base}{11}}     \repeat     \makeatother     \closein\reader     \immediate\closeout\writer     \end{document}


title: create pdf figures from pdf_tex and pdf files

text: I am writing an academic article and I saved all my figures in svg format. Then I converted (after a few cosmetic stuffs) it to pdf_tex/pdf so that they fit the paper . The problem is that my editor asks me the figures in pdf format. How can I convert all my pdf_tex/pdf files in selftcontained pdf figures so that the rendering when including the generated pdf will be the same ?


title: Macro parameter character in \input file

text: I would like to include some paragraphs from external .tex files in my document, very similar to what `\lipsum` does. As far as I understood it until now is using `\input` equivalent to directly typing text and commands. However, when running the MWE below               \begin{filecontents}{myTextFile.tex}     \ifthenelse{#2=1}{first paragraph}{}     \ifthenelse{#2=2}{second paragraph}{}     \end{filecontents}          \documentclass{report}     \usepackage{ifthen}     \newcommand\myParagraphs[2]{\input{#1}}          \begin{document}     \myParagraphs{myTextFile.tex}{2}     \end{document}      I get the error message > You can't use `macro parameter character #' in horizontal mode. Thus, '#2' is not known in _myTextFile.tex_. How can I make #2 known there, or is there an easier way to define `\myParagraphs{<file>}{<paragraph no>}`


title: Using Lua in listed elements (List of Figures, List of Tables, List of Content)

text: I am not sure if I use the wrong approach or if this is an issue in LuaLaTex in general. I tried to integrate some internationalization (I18n) to our documentation framework using Lua. Long story, short: I want to read the caption of general sections like 'references', 'appendix' and other from a resource file. But using a luaexec in \chapter or \section writes useless entries to .aux and therefore also in .toc .lof and .lot files. This is my small sample:               \documentclass[]{article}     \usepackage{luacode}          \newcommand{\intString}[1]{\luaexec{tex.print("#1")}}          \begin{document}     \section{\intString{test}} %this breaks     \intString{lofCaption}  % this works          \cleardoublepage     \addcontentsline{toc}{chapter}{\intString{lofCaption}} % this breaks     \protect\listoffigures          \cleardoublepage     \addcontentsline{toc}{chapter}{\intString{lotCaption}} % this breaks     \protect\listoftables     \end{document}      I have no idea why this causes some entries like this in my .aux file:               \@writefile{toc}{\contentsline {section}{\numberline {1}\begingroup \escapechar 92 \newlinechar 10 \edef \\{\\}\edef \nobreakspace  {}{~}\let \%=%\let \#=#\endgroup test}{1}}      It looks like during creation of .aux file the lua code is neither executed nor written to the .aux but replaced by something looking like a reference. Does anyone know if this is a malfunction of LuaLaTeX or if there is a mistake on my part? Thank you for your attention.


title: AVG: Biber listed as a trojan in TexLive 2014?

text: A few days ago I installed TexLive 2014 on Windows. I just compiled a document today to test it and Biber is recognized as a Trojan Horse by AVG Free. The message says: BackDoor.Generic18.ALDX. From my research online, this seems to be fairly strange since I could not find any other similar questions on that topic. What could then be wrong? If I ignore the threat, it pops up again at the next compilation.


title: Shaded environment using WinEdt

text: I am currently using WinEdt 5.5 on a Win7 machine. I am using the `shaded` option to highlight a block of Mathematica code:               \documentclass[a4paper,11pt,twoside,english]{book}     \usepackage{xcolor}     \usepackage{framed}     \colorlet{shadecolor}{gray!30}     \usepackage{listings}     \begin{document}     \begin{shaded}     \begin{lstlisting}[language=Mathematica]     mycode     \end{lstlisting}     \end{shaded}     \end{document}      Everytime I compile using PDFTeXify I just found black rectangle instead of any color I try to set. Compiling with TeXify (DVI output) everything is fine. Since I need a PDF what should I try?


title: Does a Japanese (La)TeX user really type commands start with the yen symbol(￥) as escape character instead of \?

text: Recently, I've found that the Japanese use `JIS X 0201` encoding as an alternative to ASCII. One of the biggest difference between them is the `JIS X 0201` replace the backslash(`\`) with Japanese yen symbol(`￥`）. This adaption of backslash leads to Microsoft Windows in Japanese locale uses `￥` in its directory path, e.g., `C:￥user￥Alice￥document` Again, when using TeX, I guess, the Japanese should use `￥` as the command escape character to replace the missing `\` in Japanese locale. Is this true? I think Japanese (La)TeX users may be helpful for this question. :-) Thanks at first!


title: Where can I translate the Bergen beamer style?

text: I would like to use the Bergen theme with orchid color scheme. It works well, but I have "Who?" and "Where?" on my title page - I would like to translate them to my language. How could I do this the easiest way (a quick and dirty solution is enough).


title: Paralist environment

text: I'm using `paralist` environment in this form:               \begin{compactenum}[(a)]     \item  Results with no change in the statement (except the     replacement of $[a,\infty]$ for $[a,b]$):     \begin{compactitem}     \item Theorem  (Linearity and Positivity).     \item Theorem (Additivity).      \item Lemma  (Cauchy Criterion).      We remark that in some cases a     change or supplementary argument is demanded in the proof.     \end{compactitem}     \item Results with a minor change in the statement:     \begin{compactitem}\setlength{\itemsep}{0pt}     \item Theorem (Second Mean Value Theorem). \item     Theorem  (Integration by Substitution).     \end{compactitem}     \end{compactenum}      I would like to ask how to put the sentence: _"We remark that in some cases a change or supplementary argument is demanded in the proof"_ on the same level as _"Result with no change..."_. ![enter image description here](http://i.stack.imgur.com/TYKn5.png)


title: Decision Tree with Tikz

text: I am trying to draw a decision tree. I have gotten very close to the end result with this:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{trees,shapes,snakes}     \begin{document}     \tikzstyle{level 1}=[level distance=1.5cm, sibling distance=2.5cm]     \tikzstyle{level 2}=[level distance=1cm, sibling distance=2cm]     \tikzstyle{level 3}=[level distance=1cm, sibling distance=1.5cm]     \tikzstyle{bag} = [rectangle, text width=4em, text centered, draw]     \tikzstyle{decision} = [rectangle, minimum height=8pt, minimum width=8pt, fill, inner sep=0pt]     \tikzstyle{choice} = [circle, minimum width=8pt, fill, inner sep=0pt]     \tikzstyle{end} = [regular polygon, regular polygon sides=3, minimum width=8pt, fill, inner sep=0pt]          \begin{tikzpicture}[grow=right,child anchor=west]     \tiny     \node[bag]{Decision}     child {         node[decision]{}         child {             node[bag]{Option 1}                 child{                     node[choice]{}                     child {                         node[bag]{Outcome 1}                         child {                             node[end]{}                         }                     }                     child {                         node[bag]{Outcome 2}                         child {                             node[end]{}                         }                     }                 }         }         child {             node[bag]{Option 2}                 child{                     node[choice]{}                     child {                         node[bag]{Outcome 3}                         child {                             node[end]{}                         }                     }                     child {                         node[bag]{Outcome 4}                         child {                             node[end]{}                         }                     }                 }             }         };     \end{tikzpicture}     \end{document}      The only issue I'm having is that I cannot find a way to rotate the last node (end), shaped as a triangle, as it should point towards its parent, not upwards. Any ideas?


title: Can use `animate` with `onslide` in Beamer

text: I saw one example.               \documentclass{beamer}     \usepackage{animate,tikz}     \begin{document}       \begin{frame}     \begin{center}         \begin{animateinline}[autoplay,loop]{1}           \multiframe{15}{i=0+1}{%             \tikz{\path node {\Huge\bf \i};}           }%         \end{animateinline}     \end{center}       \end{frame}     \end{document}       I want to use this variable to `\onslide<\i->{...}` or not. What easy way to use `animate` with `onslide` or `only` in beamer and tikz.


title: Copying title style

text: I want to know how to have the same title/author and section style as this (link) I tried with `book` document class and               \chapter*{...}           [...]          \section{..}      but it's not the same thing.


title: TikZ externalization with floatrow package

text: When using the TikZ externalization library within a `\ffigbox` from the floatrow package, the external image is created two times. The reason is, that the argument of `\ffigbox` gets parsed two times. Obviously the result is as expected, but I would nevertheless like to prevent the generation of those unnecessary duplicates. How can one achieve that? Here's a MWE to start with:               \documentclass{article}          \usepackage{floatrow}          \usepackage{tikz}     \usetikzlibrary{external}     \tikzexternalize          \begin{document}       \ffigbox{\tikz{\node{a};}}{}     \end{document}


title: How to join underbrace/overbrace between nodes

text: I draw the following horizontal line with node and want to draw underbrace/overbrace between some nodes. Please let me know how to do that.               %draw horizontal line        \draw (0,0) -- (8,0);          %draw vertical lines     \foreach \x in {0,2.3,4,8}        \draw (\x cm,3pt) -- (\x cm,-3pt);          %draw nodes     \draw (0,0) node[below=3pt] {$ \underline{c} $} node[above=3pt] {$   $};     \draw (2.3,0) node[below=3pt] {$ c_A^{*} $} node[above=3pt] {$ $};     \draw (4,0) node[below=3pt] {$ c_B^{*} $} node[above=3pt] {$ $};     \draw (8,0) node[below=3pt] {$\overline{c} $} node[above=3pt] {$ $};


title: MATLAB like command box

text: hello i am trying to set up style for script box. so far i got `\begin{script*} >> help \end{script*}` working and displaying ![enter image description here](http://i.stack.imgur.com/rSQW0.png) i want final version to look some what similar to this picture ![enter image description here](http://i.stack.imgur.com/6DKGM.png) and have second comment that will use more or less same environment for example ![enter image description here](http://i.stack.imgur.com/7HeKi.png) i'm sure that it can be done with latex, but i don't have enough experience and knowledge. any help will be appreciated thank you! **[UPDATE]** HERE is the final version that i have decide to stay with, it uses tikz and mdframed ![enter image description here](http://i.stack.imgur.com/d5x5y.png)               \documentclass{article}     \usepackage[dvipsnames]{xcolor}     \usepackage{listings}     \definecolor{topBlue}{RGB}{42,93,147}     \definecolor{bottomBlue}{RGB}{10,60,113}     \definecolor{sideline}{RGB}{235,235,237}     \definecolor{frameBlue}{RGB}{17,74,135}     \usepackage{tikz}          \usepackage[framemethod=TikZ]{mdframed}     \usetikzlibrary{calc,shapes.geometric}          \newcommand{\triangcirc}{\tikz{     \node[draw=frameBlue,inner ysep=4pt,           color=frameBlue,           top color=topBlue,           bottom color=bottomBlue,           text=white,           align=flush left,           font=\textbf\textsf,           text width=\textwidth] (a) {Command Window};     \node[circle,white,draw,inner sep=3pt] (c) at ([xshift=-3mm]a.east) {};     \node[isosceles triangle,           white,           fill,           rotate=-90,           anchor=apex,           isosceles triangle apex angle=60,           inner sep=1.2pt] (t) at ([yshift=1.5pt]c.south) {};}}          \mdfdefinestyle{commandline}     {leftmargin=0pt, rightmargin=0pt,innerleftmargin=-0.5pt,innerrightmargin=7.5pt,      middlelinecolor=frameBlue,      middlelinewidth=1.2pt,      frametitlerule=false,      backgroundcolor=white,      frametitle={\triangcirc},      frametitleaboveskip=-0.5pt,      frametitlebelowskip=0pt,      singleextra={\draw[sideline,line width=12pt]            ($(O)+(7pt,1pt)$) -- ($(O|-P)+(7pt,-\mdfframetitleboxtotalheight)-(0,1pt)$);           \node[inner sep=0pt,color=black]at ($(O)+(7pt,9pt)$) {$\scriptstyle f\!x$}; }     }          \lstnewenvironment{script} {\lstset{language=Matlab,xleftmargin=5mm,basicstyle=\footnotesize,,breaklines=true,aboveskip=-2pt,belowskip=0pt}} {}     \surroundwithmdframed[style=commandline]{script}          \begin{document}     \begin{script}     >> help sin      sin    Sine of argument in radians.         sin(X) is the sine of the elements of X.              See also asin, sind.              Overloaded methods:            sdpvar/sin            codistributed/sin            gpuArray/sin              Reference page in Help browser            doc sin          >>      \end{script}          \end{document}      and THANKS FOR BOTH ANSWERS!!!


title: Debugging Advice: TeX Capacity Exceeded with TeXLive2011 (but not with TeXLive2010)

text: I have a feeling that this is going to be rather embarrassing when I eventually get to the bottom of this problem, but since I have been struggling with this for some time I am posting this question that is more about advice on debugging a problem rather than a specific code fix. Sadly I have not able to come up with a proper MWE that reproduces the problem. This is the closest I have been able to get after unwrapping all my macros. Am hoping that there are some clues here that might help shed some light as to where I should be looking. ## Background: This original (complete) version of this figure, and associated text compiled fine as a `standalone` file with TeXLive2010 and produced the 6 graphs as desired. However, I was **_not_** able to successfully incorporate this `standalone` file in a larger document (> 100 pages). At that time, I attempted to produce a MWE, but was only able to reduce it to a complex collection of figures in a specific order (ie, changing just the order or the figures seems to produce results, yet a different order would terminate with error -- I think they were `TeX Capacity` related errors as well). As this MWE was very large I did not post it here, and thought I would wait until TeXLive2011 was ready. So as a work around I continued with this one collection of figures **not** in my document. This was quite some time ago, and much of my code has changed so not sure if this current form would still exhibit that behavior with the large document with TeXLive2010. Now, with TeXLive2011 it seems I can reproduce the problems with just this one figure being used 6 times. Removing any one of these instances produces the output, so all 6 are required for me to be able to reproduce the problem. ## Summary of Code: The code given below compiles as provided and produces 6 graphs with both TeXLive2010 and TeXLive2011 (updated as of mid Oct 2011). The file `01R28-Fig.tex` is a standalone file that graphs the following functions (the colors here correspond to the colors of the graphs): ![enter image description here](http://i.stack.imgur.com/dfJak.png) The main file uses the standalone figure twice (two different domains) for three values of `a={3,4,5}` and adjusts the values of `xmin`, `xmax`, etc. There is some code in here that should really have absolutely no effect. I left this in as this is what my macros would have included, and removing some of these _sort_ of alleviates the issues. For instance each path is labelled using `name path global=`. Since I removed the portion of the code that accessed the paths this should really not have an effect, but it does. Also minor things such as changing the color has a dramatic effect. Ok, so if this code compiles, what exactly is the problem? Well, if I uncomment the `\usepackages{MyPackages}` I run into problems. This file contains not only the packages that I include but all my macros and other setup information. Unfortunately, I have not been able to reduce the contents of `MyPackages` to something that could be posted. I have attempted to reduce the code from `MyPackages` by removing what wasn't needed. Really, none of it is needed here (as this MWE compiles), but with it included I get **TeX Capacity exceeded**. If I attempt to copy and paste it into this file, the problems go away. If I comment out seemly unrelated pieces of code within the files that are included by `MyPackages`, things seem to work. To me this is an indication of some memory corruption, so am wondering what else I should try... The only TeXLive2011 specific thing I am aware of in `MyPackages` is that I needed to add a `\ifdefined\newmdenv` (in order to be able to run this with TeXLive2010) as that appears to only be available with TeXLive2011. Following `\usepackage{MyPackages}`, I have included several `\def` commands which can be used to enable/disable potions of the code . ## TeXLive2010: (with `\usepackage{MyPackages}` uncommented): Now, this MWE as posted here works just fine with both TeXLive2010 and TeXLive2011 releases. But with the `MyPackages` included I get the following behavior: With TeXLive2010, **I do get the desired output** after several errors (and hitting _RETURN_ after each). In an attempt to make this somewhat readable, I have included these error messages in the **Appendix A** below. This seems to be a problem with `enumitem`, but the lists in this file seem pretty basic so don't understand how something in the preamble could have an effect. But nonetheless, I do get the proper output with TeXLive2010. Also, if I re-run (leaving the .aux files), I get the same messages (except for the _"rerunfilecheck Warning"_ no longer showing up). ## TeXLive2011: (with `\usepackage{MyPackages}` uncommented): But, when I switch to using TeXLive2011 things go bizarre. First time (ie, after removing any .aux files) I run it I get a fatal error:               ./01R28-Fig.tex:138: TeX capacity exceeded, sorry [main memory size=3000000].     <to be read again>                         \unhbox      l.138 \end{tikzpicture}          ./01R28-Fig.tex:138:  ==> Fatal error occurred, no output PDF file produced!     Transcript written on 01R28-V6.log.      and no ouptput is produced. But I do obtain the desired output as follows:   * Upon a subsequent run (with the .aux files left as produced by the fatal error above), **I do get the desired output** after several errors similar, but different to those produced by TeXLive2010. I have included these error messages in the **Appendix B** below. All the subsequent items below also do require me to skip past these errors, and all are initial runs (with any .aux files removed).   * If I change just the two instances of `violet` to `red` for GraphF, **I do get the desired output**. What could I possibly do in the preamble that a minor color change would result in a drastically different results?   * Using `\def\NumOfSamples{400}` instead of 500, **I do get the desired results**.   * The only effect of commenting `\def\SuppressSpuriousNode{}`, has on the code is that this `\node at (axis cs: 2,4) [cyan] {\GraphLabelF};` gets added. Again, with this commented out, **I do get the desired results**.   * Each of the three graphs and the two axis are labelled via `name path global`. Commenting out **any one** of the following which removes the `names path global`:     1. `\def\AddNamePathOfAxis{}` which removes the `name path global` from both axis,     2. `\def\AddNamePathOfGraphF{}`     3. `\def\AddNamePathOfGraphG{}` also results in the file **producing the desired output**.   * Disabling any **one** of the figures by commenting out `\def\ShowFigureA{}`...`\def\ShowFigureF{}` again **produces the desired output**. Disabling **all six figures** still produces the `enumitem` errors and yields: ![enter image description here](http://i.stack.imgur.com/scSbd.png) This is to illustrate why I have not been able to minimize the content in `MyPackages`. In one of the files that `MyPackages` includes I have this macro:               \newcommand{\KERN}{}      If I comment this line, I get the **desired output**. This macro is only used in an environment that is not used in this document and the command really can't do much besides add a single space in the worst case, yet it drastically alters the behavior. Any ideas as to where I should look? if you really want to solve a code problem, what should I have in the `MyPackages` that could duplicate some this behavior? :-) The change in color is the most perplexing one to me. And yes the lines do show in red. * * * Here is the code:               \RequirePackage{etoolbox}     \documentclass{standalone}          \usepackage{standalone}     \usepackage[shortlabels]{enumitem}     \usepackage{xcolor}     \usepackage{xparse}     \usepackage{pgfplots}     \usetikzlibrary{calc,intersections}%     \usepackage{filecontents}          %\usepackage{MyPackages}% The problem is in here somewhere          \def\NumOfSamples{500}% Compiles with 100,200,300, or 400          \def\ShowFigureA{}% These control which of the 6 figures are drawn.     \def\ShowFigureB{}% Commenting out any of these results (i.e.,     \def\ShowFigureC{}% disabling a figure), results in the desired     \def\ShowFigureD{}% output being produced.     \def\ShowFigureE{}%      \def\ShowFigureF{}%           \def\SuppressSpuriousNode{}%  Compiles if ANY of these are     \def\AddNamePathOfAxis{}%     commented out.     \def\AddNamePathOfGraphF{}%     \def\AddNamePathOfGraphG{}%               %%-----------------------------------------------------------------     %%-----------------------------------------------------------------     %%-----------------------------------------------------------------          \begin{filecontents}{01R28-Fig.tex}     \documentclass{standalone}     \usepackage{xcolor}     \usepackage{xparse}     \usepackage{pgfplots}     \usetikzlibrary{calc,intersections}%          \begin{document}     \providecommand*{\A}{3}%     \providecommand*{\NumOfSamples}{500}%          \pgfmathdeclarefunction{log}{2}{\pgfmathparse{ln(#2)/ln(#1)}}% log_#2 (#1)          \pgfmathdeclarefunction{GivenF}{1}{\pgfmathparse{(#1)^(\A)}}     \pgfmathdeclarefunction{GivenG}{1}{\pgfmathparse{(\A)^(#1)}}     \pgfmathdeclarefunction{GivenH}{1}{\pgfmathparse{log(\A,(#1))}}          \NewDocumentCommand{\GraphFunction}%      {O{Style_w} O{Style_w} m m m g}{%      % [GraphStyle] [LabelStyle] {x-min}{x-max} {f(x)} {<label>}         \addplot[%                 mark=none,                 domain=#3:#4,                 samples=\NumOfSamples,% Adjust value above                 #1             ]             ({x},{#5})             node [#2] {#6}             ;     }          \begin{tikzpicture}     %--------------------------------------------------------------     % These are only needed for this file to be compilable standalone     % These are to be set prior to including this figure to customize this     \providecommand*{\XAxisMin}{-1.0}     \providecommand*{\XAxisMax}{3.0}     \providecommand*{\YAxisMin}{-2.0}     \providecommand*{\YAxisMax}{10}          \providecommand*{\DomainMinF}{\XAxisMin}     \providecommand*{\DomainMaxF}{2.2}          \providecommand*{\DomainMinG}{\XAxisMin}     \providecommand*{\DomainMaxG}{2.1}          \providecommand*{\DomainMinH}{0.1}     \providecommand*{\DomainMaxH}{\XAxisMax}          %--------------------------------------------------------------          \newcommand*{\GraphLabelF}{$y = x^{\A}$}     \newcommand*{\GraphLabelG}{$y = \A^x$}     \newcommand*{\GraphLabelH}{$y = \log_{\A} x$}          \begin{axis}[xmin=\XAxisMin, xmax=\XAxisMax, ymin=\YAxisMin, ymax=\YAxisMax]               %^^^^^^^^^^^^^^^^^^^^^^^^^%     % Compiles if \AddNamePathOfAxis is supressed:     %     i.e., the `name path global` settings are disabled.      %^^^^^^^^^^^^^^^^^^^^^^^^^%     \ifdefined\AddNamePathOfAxis         \tikzstyle{XAxisNameStyle}=[name path global=XAxisPath]% Craps out with         \tikzstyle{YAxisNameStyle}=[name path global=YAxisPath]% these settings     \else         \tikzstyle{XAxisNameStyle}=[]%  Compiles with these settings         \tikzstyle{YAxisNameStyle}=[]%  i.e., axis are not named     \fi          \addplot [% Name the x axis         XAxisNameStyle,          gray, thick         ]         coordinates{(\XAxisMin,0.0) (\XAxisMax,0.0)};               \addplot [% Name the y-axis         YAxisNameStyle,         gray, thick         ]         coordinates{(0,\YAxisMin) (0,\YAxisMax)};                    %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%     % Compiles if we disable the `name path global` setting for GraphF      %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%     \ifdefined\AddNamePathOfGraphF% Craps out with these settings         \tikzstyle{GraphFNameStyle}=[name path global=GraphF]%     \else%                          Compiles with these settings         \tikzstyle{GraphFNameStyle}=[]%     \fi          \GraphFunction[smooth, violet, very thick,                      GraphFNameStyle,% Bizarre: Need comma or % here          ]          [violet, right]          {\DomainMaxF}{\DomainMinF}          {GivenF(x)}{\GraphLabelF}               %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%     \ifdefined\SuppressSpuriousNode% Compiles if this is node is suppressed     \else         \node at (axis cs: 2,4) [cyan]  {\GraphLabelF};     \fi     %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%               %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%     % Compiles if we disable the `name path global` setting for GraphG      %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%     \ifdefined\AddNamePathOfGraphG%  Craps out with these settings         \tikzstyle{GraphGNameStyle}=[name path global=GraphG]%     \else%                           Compiles with these settings         \tikzstyle{GraphGNameStyle}=[]%     \fi               \GraphFunction[smooth, orange, very thick,                       GraphGNameStyle,% Bizarre: Need comma or % here          ]          [orange, above right]          {\DomainMaxG}{\DomainMinG}          {GivenG(x)}{\GraphLabelG}          \GraphFunction          [smooth, magenta, very thick]          [magenta, above right, xshift=1.5ex]          {\DomainMaxH}{\DomainMinH}          {GivenH(x)}{\GraphLabelH}          \end{axis}     \end{tikzpicture}     \end{document}     \end{filecontents}% 01R28-Fig          %%-----------------------------------------------------------------     %%-----------------------------------------------------------------     %%-----------------------------------------------------------------               \usepackage{standalone}     \usepackage[shortlabels]{enumitem}     \usepackage{xcolor}     \usepackage{xparse}     \usepackage{pgfplots}     \usetikzlibrary{calc,intersections}%     \usepackage{filecontents}          \newcommand*{\InsertFigure}{\input{01R28-Fig}}          \begin{document}     \begin{enumerate}[(i)]     \item $a=3$          {% Group to keep settings local     \newcommand*{\A}{3}          \ifdefined\ShowFigureA     \begin{minipage}{0.90\linewidth}         \pgfmathsetmacro{\XAxisMin}{-1.8}         \pgfmathsetmacro{\XAxisMax}{3.5}         \pgfmathsetmacro{\YAxisMin}{-5.0}         \pgfmathsetmacro{\YAxisMax}{50}              \pgfmathsetmacro{\DomainMinF}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxF}{\XAxisMax}         \pgfmathsetmacro{\DomainMinG}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxG}{\XAxisMax}         \pgfmathsetmacro{\DomainMinH}{0.001}         \pgfmathsetmacro{\DomainMaxH}{\XAxisMax}              \pgfplotsset{             width=0.80\linewidth, height=6.0cm,             xtick={-1,0,1,2,3}, scale only axis,             ytick={0,10,...,40},             yticklabel style={text width=\widthof{$-20$},align=right},             xticklabel style={text width=\widthof{$2.4$},align=center}         }         \InsertFigure     \end{minipage}     \fi% end \ifdefined\ShowFigureA          \ifdefined\ShowFigureB     \bigskip     \begin{minipage}{0.90\linewidth}         \pgfmathsetmacro{\XAxisMin}{2.4}         \pgfmathsetmacro{\XAxisMax}{3.1}         \pgfmathsetmacro{\YAxisMin}{12.0}         \pgfmathsetmacro{\YAxisMax}{30.0}              \pgfmathsetmacro{\DomainMinF}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxF}{\XAxisMax}         \pgfmathsetmacro{\DomainMinG}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxG}{\XAxisMax}         \pgfmathsetmacro{\DomainMinH}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxH}{\XAxisMax}              \pgfplotsset{             width=0.80\linewidth, height=6.0cm,              xtick={2.5,2.6,2.7,2.8,2.9,3.0}, scale only axis,             ytick={15,20,25},             yticklabel style={text width=\widthof{$-20$},align=right},             xticklabel style={text width=\widthof{$2.4$},align=center}         }              \InsertFigure     \end{minipage}     \fi% end \ifdefined\ShowFigureB     }     %-----------------------------------------------------------               \bigskip     \item $a=4$          {% Group to keep settings local     \newcommand*{\A}{4}          \ifdefined\ShowFigureC     \begin{minipage}{0.90\linewidth}         \pgfmathsetmacro{\XAxisMin}{-1.5}         \pgfmathsetmacro{\XAxisMax}{1.5}         \pgfmathsetmacro{\YAxisMin}{-0.5}         \pgfmathsetmacro{\YAxisMax}{4}              \pgfmathsetmacro{\DomainMinF}{-1.45}         \pgfmathsetmacro{\DomainMaxF}{2.2}         \pgfmathsetmacro{\DomainMinG}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxG}{2.2}         \pgfmathsetmacro{\DomainMinH}{0.5}         \pgfmathsetmacro{\DomainMaxH}{\XAxisMax}              \pgfplotsset{             width=0.85\linewidth, height=6.0cm,              xtick={-1.0,-0.5,0,0.5,1.0}, scale only axis,             ytick={0,1,2,3},             yticklabel style={text width=\widthof{$400$},align=right},             xticklabel style={text width=\widthof{$-4.5$},align=center}         }         \InsertFigure     \end{minipage}     \fi% end \ifdefined\ShowFigureC          \ifdefined\ShowFigureD     \bigskip     \begin{minipage}{0.90\linewidth}         \pgfmathsetmacro{\XAxisMin}{1.5}         \pgfmathsetmacro{\XAxisMax}{4.5}         \pgfmathsetmacro{\YAxisMin}{0}         \pgfmathsetmacro{\YAxisMax}{400}              \pgfmathsetmacro{\DomainMinF}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxF}{4.5}         \pgfmathsetmacro{\DomainMinG}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxG}{4.4}         \pgfmathsetmacro{\DomainMinH}{5.0}% Won't plot H here, since this         \pgfmathsetmacro{\DomainMaxH}{5.1}% is beyond \XAxisMax              \pgfplotsset{             width=0.85\linewidth, height=6.0cm,              xtick={2.0,2.5,3.0,3.5,4.0}, scale only axis,             ytick={0,100,200,300},             yticklabel style={text width=\widthof{$400$},align=right},             xticklabel style={text width=\widthof{$4.5$},align=center}         }         \InsertFigure     \end{minipage}     \fi% end \ifdefined\ShowFigureD     }               %-----------------------------------------------------------     \bigskip     \item $a=5$          {% Group to keep settings local     \newcommand*{\A}{5}%          \ifdefined\ShowFigureE     \begin{minipage}{0.90\linewidth}         \pgfmathsetmacro{\XAxisMin}{-1.5}         \pgfmathsetmacro{\XAxisMax}{2.5}         \pgfmathsetmacro{\YAxisMin}{-5}         \pgfmathsetmacro{\YAxisMax}{25}              \pgfmathsetmacro{\DomainMinF}{-1.4}         \pgfmathsetmacro{\DomainMaxF}{2.2}         \pgfmathsetmacro{\DomainMinG}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxG}{2.2}         \pgfmathsetmacro{\DomainMinH}{0.0001}         \pgfmathsetmacro{\DomainMaxH}{\XAxisMax}              \pgfplotsset{             width=0.80\linewidth, height=6.0cm,              xtick={-1,0,1,2,3}, scale only axis,             yticklabel style={text width=\widthof{$3,400$},align=right},             xticklabel style={text width=\widthof{$-5.00$},align=center}         }         \InsertFigure     \end{minipage}     \fi% end \ifdefined\ShowFigureE          \ifdefined\ShowFigureF     \bigskip     \begin{minipage}{0.90\linewidth}         \pgfmathsetmacro{\XAxisMin}{4.95}         \pgfmathsetmacro{\XAxisMax}{5.05}         \pgfmathsetmacro{\YAxisMin}{2800}         \pgfmathsetmacro{\YAxisMax}{3400}              \pgfmathsetmacro{\DomainMinF}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxF}{\XAxisMax}         \pgfmathsetmacro{\DomainMinG}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxG}{\XAxisMax}         \pgfmathsetmacro{\DomainMinH}{\XAxisMin}         \pgfmathsetmacro{\DomainMaxH}{\XAxisMax}              \pgfplotsset{             width=0.80\linewidth, height=6.0cm,              xtick={4.95,5.00,5.05}, scale only axis,             yticklabel style={text width=\widthof{$3,400$},align=right},             xticklabel style={text width=\widthof{$5.00$},align=center}         }         \InsertFigure     \end{minipage}     \fi% end \ifdefined\ShowFigureF     }     \end{enumerate}     \end{document}      * * * ## Appendix A: TeXLive2010 `enumitem` errors               (/usr/local/texlive/2010/texmf-dist/tex/latex/microtype/mt-eur.cfg)     (./01R28-Fig.tex) (./01R28-Fig.tex) (./01R28-Fig.tex) (./01R28-Fig.tex)     (./01R28-Fig.tex) (./01R28-Fig.tex)     ./01R28-V6.tex:364: Undefined control sequence.     \enit@endenumerate ->\enit@after                                       \endlist \enit@toks \expandafter {\enit@sav...     l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Undefined control sequence.     \enit@endenumerate ...expandafter {\enit@savekeys                                                        }\xdef \enit@afterlist {\d...     l.364 \end{enumerate}          ?      Preview: Tightpage -32891 -32891 32891 32891     [1{/usr/local/texlive/2010/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     (./01R28-V6.aux)          >Package rerunfilecheck Warning: File `01R28-V6.out' has changed.     (rerunfilecheck)                Rerun to get outlines right     (rerunfilecheck)                or use package `bookmark'.      * * * ## Appendix B: TeXLive2011 `enumitem` errors               ./01R28-Fig.tex) (./01R28-Fig.tex) (./01R28-Fig.tex) (./01R28-Fig.tex)     (./01R28-Fig.tex) (./01R28-Fig.tex)     ./01R28-V6.tex:364: Undefined control sequence.     \enit@endenumerate ->\enit@after                                       \endlist \ifx \enit@series \relax \else \if...     l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Undefined control sequence.     \enit@endenumerate ...\else \ifnum \enit@resuming                                                        =\@ne \enit@setresumekeys ...     l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Missing number, treated as zero.     <to be read again>                         =     l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Undefined control sequence.     \enit@setresumekeys ...xpandafter {\enit@savekeys                                                        }\xdef \enit@afterlist {#2...     l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Undefined control sequence.     \enit@setresumekeys ...it@toks }\ifnum \enit@type                                                        =\z@ #3\def \enit@noexcs {...     l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Missing number, treated as zero.     <to be read again>                         =     l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Undefined control sequence.     <argument> enit@resume@series@\enit@series           l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Undefined control sequence.     \enit@endenumerate ...t \fi \ifnum \enit@resuming                                                        =\thr@@ \enit@setresumekey...     l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Missing number, treated as zero.     <to be read again>                         =     l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Undefined control sequence.     \enit@setresumekeys ...xpandafter {\enit@savekeys                                                        }\xdef \enit@afterlist {#2...     l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Undefined control sequence.     \enit@setresumekeys ...it@toks }\ifnum \enit@type                                                        =\z@ #3\def \enit@noexcs {...     l.364 \end{enumerate}          ?      ./01R28-V6.tex:364: Missing number, treated as zero.     <to be read again>                         =     l.364 \end{enumerate}          ?      Preview: Tightpage -32891 -32891 32891 32891     [1{/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     (./01R28-V6.aux)


title: metapost macro for drawing filled circle not working

text: The following macro draws a black circle only on the first invocation. The remaining three circles are unfilled. Where am I going wrong?               def big(expr z) =      begingroup     save a;     path a;     a = fullcircle scaled 3mm;     fill a withcolor black;     draw a shifted z;     endgroup     enddef;          beginfig(1)          big(origin); %black circle drawn     big((1cm,0)); % unfilled circle     big((2.5cm,0)); % unfilled circle     big((3cm,0)); % unfilled circle          endfig;     end;


title: ConTeXt: How to place a short caption under a wrapped figure?

text: This is a follow-up question to a previous ConTeXt solution. That solution dealt with wrapped figures in a ConTeXt document generated from Pandoc Markdown. ![without short caption](http://i.stack.imgur.com/kVOwK.png) Now, I would like to extend that solution to allow for a short caption below a wrapped figure. Moreover, I would like to have the short caption typeset differently, say small-sized bold sans-serif. Below is a minimal working example that shows how the layout of the original solution gets messed up when adding the short caption text. What do I need to change to the description definition to allow for short captions under wrapped figures?               \setuptolerance[horizontal, tolerant, stretch]          \setuppapersize [A4][A4]     \setuplayout    [width=middle,  backspace=1.5in, cutspace=1.5in,                      height=middle, topspace=0.75in, bottomspace=0.75in]          \setuppagenumbering[location={footer,center}]          % Inter-paragraph spacing     \setupwhitespace[medium]          % Break at hyphens     \setbreakpoints[compound]          \setupexternalfigures[location=default]          % Remaining code is for descriptions with a left floating figure     % http://tex.stackexchange.com/a/133372/26348          \startsetups placefigure       \setupexternalfigure         [wfactor=fit]     \stopsetups          % Floats do not have "before=" nor a setup key     \appendtoks \setups{placefigure} \to \everyinsidefloat          \definemeasure[pageheight][\dimexpr(\pagegoal-\pagetotal-2\lineheight)]          \define[1]\startdescription{        \setbox\scratchbox\vbox{\setupexternalfigure[width=4cm]#1}%        \ifdim\ht\scratchbox>\dimexpr\measure{pageheight}\relax           \page        \fi        \startplacefigure[location={left,high,none}]          \box\scratchbox        \stopplacefigure        }          \define\stopdescription{\endgraf}               \starttext     \input douglas.tex          \startdescription{{\externalfigure[cow]}Short caption}       \input linden.tex     \stopdescription          \input bryson.tex     \stoptext      ![with short caption](http://i.stack.imgur.com/TTwjU.png)


title: Table and \tikzexternalize

text: It might not be a usual thing to do but I need to put some tikz pictures in a Table with externalization. I did               \documentclass{report}     \usepackage{tabu}     \usepackage{tikz}     \usetikzlibrary{external}     \tikzexternalize     %\tikzexternaldisable     %     \begin{filecontents}{A.tikz}       \begin{tikzpicture}         \draw (0,0) rectangle (2,2);       \end{tikzpicture}     \end{filecontents}     \begin{filecontents}{B.tikz}       \begin{tikzpicture}         \draw (0,0) rectangle (2,2);       \end{tikzpicture}     \end{filecontents}          %     \begin{document}     \begin{table}     \begin{tabu}{cc}         \tikzsetnextfilename{A}         \input{A.tikz}         &         \tikzsetnextfilename{B}         \input{B.tikz}         \end{tabu}     \end{table}          \end{document}      It works if I disable tikzexternal. Any suggestion?


title: Including PDF pages from URL

text: Does anyone know a way of including an external PDF document from a URL? When using pdfpages the following will not work:               \includepdf[pages=-]{http://www.mydomain.com/myfile.pdf}      My reason for asking is that I would like to avoid putting PDF files in my git repository.


title: vim-latex problem on Windows

text: I'm using vim with cygwin on Windows XP. I have Miktex install and I can compile files using Texmaker for example. However, I'd like to use vim with the vim-latex suite. When I type               :echo Tex_CompileRule_dvi      It just gives me an error. However when I type               :!latex -interaction=nonstopmode %      I'm able to compile it. So it seems that vim doesn't recognise that I have vim-latex installed on my machine. Any suggestions? Thanks


title: How to avoid connecting discontinuities in graphs when plotting data?

text: I would like to plot a graph that has a discontinuity in the sense that it jumps from 180 degree to -180 degree at one point. Unfortunately, the points at 180 and -180 get connected. See the figures below.   (By now you might have guessed I am trying to do a lat-lon plot of a satellite ground-track.) Plot MWE:   ![Plot according to MWE](http://i.stack.imgur.com/BzpX1.png) Plot with real data:   ![enter image description here](http://i.stack.imgur.com/d1tdk.png) **How can I _automatically_ avoid the line that connects these two points?** A MWE is provided below.               \documentclass{scrartcl}          \usepackage{mwe}     \usepackage{pgfplots}         \pgfplotsset{compat=1.7}          \begin{document}         \begin{tikzpicture}             \begin{axis}[%                 ytick={-90,-45,...,90},                 xtick={-180,-135,...,180},                 axis equal,                 grid,                 enlargelimits=false,]             \addplot+[mark=,] table  {                 % A few points read off from above by eye...                   87   0                  100  75                  135  80                  180  82                 -180  82                 -135  75                  -90  35                  -45 -75                    0 -82                   45 -75                   90 -35                  100   0             };         \end{axis}         \end{tikzpicture}     \end{document}


title: Adding header and footer to the front page (and other pages) of an article

text: I am beginner in LaTeX, and I have been unable to find a solution to what looks a simple problem. I use the `article` class for a paper. I have received a rectangular logo, about `40 mm` high and as wide as the text, to be placed on top of every page for the conference. Also every page should have a "RESTRICTED DISTRIBUTION" and a page number at the bottom. The following code adds neither header nor footer, but the text of the front page is OK. If I remove the `\maketitle`, the header appears (but not the footer) and the title is removed.... Other attempts add the header and footer, but move all the text, abstract, etc to the second page. I have been trying a number of things. What it the correct solution?               \documentclass[11pt, a4paper, english]{article}     \usepackage[top=20mm, bottom=30mm, left=18mm, right=18mm]{geometry} %Layout of page     \usepackage[english]{babel}     \usepackage{fancyhdr, lipsum}     \usepackage[draft]{graphicx}%          \fancypagestyle{titlepage}{     \setlength{\headheight}{175pt}     \fancyhf{}     \centering     \fancyhead[C]{\includegraphics[width= \textwidth]{AbstractHeader.jpg}}     \fancyfoot[R]{\bfseries{\thepage}}     \fancyfoot[C]{RESTRICTED DISTRIBUTION}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     } %     \begin{document}     \begin{titlepage}     \thispagestyle{titlepage}          \title{Using \LaTeX for industrial documents}     \author{Do \underline{\large{NOT}} list authors in this document}     \maketitle      \begin{abstract}      \lipsum[1]     \end{abstract}     \section{Background}     \lipsum[2]     \end{titlepage}     \end{document}


title: hyperref package, breaklinks option

text: When I compile with LaTeX + dvips, I get the following warning message:               Package hyperref Warning: You have enabled option `breaklinks'.       (hyperref)                But driver `hdvips.def' does not suppport this.       (hyperref)                Expect trouble with the link areas of broken links.        Right now, I am using the `report` document class and call the `hyperref` package with the following commands (I am using MikTeX 2.9 and WinEdt 7.0 on Windows 7)               \usepackage[breaklinks]{hyperref}       \usepackage[hyphenbreaks]{breakurl}      The document compiles (using LaTeX+dvips) and the links spanning two lines appear to break correctly, but I receive the warning message. Is this a problem? How can I fix it? I tried to add the following package and compile using pdflatex (instead of LaTeX + dvips)                \usepackage[pdf]{pstricks}       but it produced the following warning message:                >>> Loading package auto-pst-pdf <<<             Package pstricks Warning: ************************************       (pstricks)                Option pdf needs a "pdflatex -shell-escape <file>"       (pstricks)                or a "pdflatex -enable-write18 <file>"       (pstricks)                (if you are using MikTeX)       (pstricks)                ************************************.        I also get the following error, which prevented me from being able to compile with pdflatex:                Package ifplatform Warning:           shell escape is disabled, so I can only detect \ifwindows             ! Package auto-pst-pdf Error:          "shell escape" (or "write18") is not enabled:          auto-pst-pdf will not work!      Alternatively, I tried using the `epstopdf` package (and compiled with pdflatex), but that package is not compatible with the `psfrag` package. I am looking for a way to fix the breaklinks warning message (see above), without losing the ability to use eps figures and the `psfrag` package.


title: Missing \endscname inserted citation

text: I am new to LaTeX, and I have encountered an error that I couldn't fix myself.               Error: "Missing \endcsname inserted Три \cite{Бідюк2009}"      Неre is a simple document to recreate an error.               \documentclass[a4paper, 14pt, oneside]{report}          \usepackage{extsizes}     \usepackage[utf8]{inputenc}     \usepackage[T1,T2A]{fontenc}     \usepackage[english, russian, ukrainian]{babel}     \usepackage{indentfirst}     \usepackage{misccorr}          \begin{document}     Один \cite{Congdon2006}          Два \cite{Koch2007}          Три \cite{Бідюк2009}     \bibliographystyle{plain}     \bibliography{sources}          \end{document}      The bibliography document (`source.bib`):               % Encoding: UTF8          @BOOK{Congdon2006,       title = {Bayesian Statistical Modelling},       publisher = {John Wiley \& Sons},       year = {2006},       author = {Peter Congdon},       pages = {573},       edition = {2},       owner = {Georgii},       timestamp = {2012.04.01}     }          @BOOK{Koch2007,       title = {Introduction to Bayesian Statistics},       publisher = {Berlin: Springer-Verlag},       year = {2007},       author = {Karl-Rudolf Koch},       pages = {249},       owner = {Georgii},       timestamp = {2012.04.02}     }          @ARTICLE{Бідюк2009,       author = {Петро Іванович Бідюк},       title = {Адаптивне прогнозування фінансово-економічних процесів на основі принципів системного аналізу},       journal = {Наукові вісті НТУУ КПІ},       year = {2009},       volume = {5},       pages = {54--61},       owner = {Georgii},       timestamp = {2012.04.01}     }      Both documents are encoded in UTF-8.


title: Problem with XYZ-Coordinate Systems

text: Perhaps I made a mistake with the syntax but I think I found a problem.               \documentclass[11pt]{scrartcl}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}[x = {(sin(-60) cm,-cos(-60) cm)},                         y = {(0.866 cm,-0.5 cm)},                         z = {(0cm,1cm)},                         scale = 4]        \draw[->] (0,0,0) -- (1,0,0);      \draw[->] (0,0,0) -- (0,1,0);      \draw[->] (0,0,0) -- (0,0,1);       \draw circle (1);        \end{tikzpicture}           \end{document}       I can use `cos(60)` for the second coordinate but I can't use `sin(60)` for the first one. The question is how to work around this problem. What is the better way ?. I can use something like `\xcoord` with `\pgfmathsetmacro\xcoord{sin(-60)}` but perhaps there is a better way.


title: Chapter without number in memoir

text: I want one of the chapters in my `memoir` book to be unnumbered. I want it to have a chapter heading, show up in the table of contents, etc.-- the only difference being that it is not given a number. Is there an easy way to do this?


title: Identifying relative location of label

text: How can I obtain information about the location of a label relative to other text?   * Whether the label is on a previous page or the current page (i.e. appears in some previous lines, but on the same page).   * If the label is on a previous page; how many pages prior? E.g. 1 page before, 5 pages before. It would be helpful to obtain some value, such as 0 for current page, 1 for the previous page, 2 for two pages previous, as that could be placed into an if-then.


title: Modify footer used by elsarticle.cls

text: I would like to modify the footer used by Elsevier's `elsarticle.cls` without editing the class file directly. I would like to eliminate the footer on the first page that states "Preprint submitted to Elsevier" (or the journal you specify with the optional `\journal{}` command). Obviously I can just delete it from the class file but this change won't carry over to others without me providing an explicit modification of the class file. I tried adding the modified lines of the class file to my `.tex` before the documentclass declaration, but they are ignored:               \def\ps@pprintTitle{%     \let\@oddhead\@empty     \let\@evenhead\@empty     \def\@oddfoot{\footnotesize\itshape     % line below modified from elsarticle.cls      \ifx\@journal\@empty Elsevier     \else\@journal\fi\hfill\today}%     \let\@evenfoot\@oddfoot}     \documentclass{elsarticle}      Is there any way to remove that footer without editing the `.cls` file?


title: Why does tikz neither draw nor externalize my picture?

text: I'm trying to generate a gif from a tikz picture, using tikz's `external` library. Ultimately, my plan is to   * Convert a picture to gif   * write a node style that converts the nodes' coordinates to pixel offsets in a map file   * use them together on a web page. If somebody has done this before, I'm glad to get a pointer. However, I have adapted the example from the tikz documentation which uses `convert` in a system call. The only difference to the original example is that I don't add code to `include external` and that I changed the desired output format to `gif`:               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{external}          \tikzset{       gif export/.style={         external/system call/.add=         {}         {; convert -density 300 -transparent white "\image.pdf" "\image.gif" },         %         /pgf/images/external info,       }     }     \tikzexternalize     \tikzset{gif export}          \begin{document}       \begin{tikzpicture}         \draw (0,0) node[draw,minimum width=1in] {TestNode};       \end{tikzpicture}     \end{document}        * The resulting main.pdf is empty,   * the externalization library creates an empty main-figure0.pdf and main-figure0.dpth   * an additional file called `}` is created, but I don't know what I can do with it. I have the impression that the closing `}` after `"\image.gif"` is causing problems. When I change that line to end with               "\image.gif"},      (no space between `gif` and `}`), the resulting converted file is called `main-figure0.gif}` and also empty. but I have no idea how I can fix this.


title: grid for textpos layout

text: This could be a too obvious question. I'm trying to lay things out on a page and I'm having to recompile a lot. I'd like to layout a grid using `\TPHorizmodule` and `\TPVertmodule` (from the `textpos` package) as the reference which will help me lay out my document. I've seen some 'grid' suggestions but I'm struggling to understand them. Any help gratefully received.


title: Why is TeX ignoring texmf.cnf?

text: I got the following error:               TeX capacity exceeded, sorry [main memory size=3000000]      while compiling a TikZ path containing ~10,000 points. So i decided to increase this memory limit of TeX. I edited the /usr/share/texmf/web2c/texmf.cnf file. Now it contains the following lines:               main_memory.latex = 30000000          main_memory.pdflatex = 30000000          main_memory.xelatex = 30000000      But the pdflatex or xelatex dies with the same error, and it says, that the main memory size is still 3,000,000. I was searching for other `texmf.cnf` files, and there is one here: `/etc/texmf/web2c/texmf.cnf`. But it's just a link, the changes what i made, appeared also in that file. So why does TeX ignore it? I'm using TeX Live 2010/Arch Linux.


title: How can I control the font size of each chapter's and section's title separately?

text: My question is how can I control the font size of each chapter's and section's title? I tried `\Large`, `\normalsize` `\small` etc. But i am not satisfied, since I would like to control the font size exactly to a number, such as font size 16, 16.5, 17, etc. Could anyone tell how to achieve this? Thanks!!


title: latex dynamic subsection nesting

text: I need to find a command/environment that allows me to nest a [sub]section one level deeper than the level of the parent [sub]section. For example, given this syntax,               \section{Foo}         \createanestedsection{Bar}     \subsection{Zoo}         \createanestedsection{Bar}      I'd like to obtain this output:               1. ...... Foo     1.1 ..... Bar     1.2 ..... Zoo     1.2.1 ... Bar      Is there anything like that available ? Regards, R


title: How to customize numbering in IEEEeqnarraybox?

text: I want a equation like this ![](http://i.stack.imgur.com/zu4xm.png) Code is below But now I can't number equations like the above as without using `\cdot` and `(1)` etc. manually. I'm so confused. Please help. Thank you.               \begin{equation*}      \left\{\,       \begin{IEEEeqnarraybox}[          \IEEEeqnarraystrutmode          \IEEEeqnarraystrutsizeadd{2pt}           {2pt}         ][c]{rCl}     f(t) & = & g(t)\\     f'(t)&=&g'(t) \end{IEEEeqnarraybox} \right. \quad     \Longleftrightarrow \quad \left\{\,       \begin{IEEEeqnarraybox}[          \IEEEeqnarraystrutmode          \IEEEeqnarraystrutsizeadd{7pt}           {7pt}         ][c]{rCl}        e^t & = & a\sqrt{t}\qquad\cdots (1)        \\        e^t & = & \frac{a}{2\sqrt{t}}\qquad\cdots (2)       \end{IEEEeqnarraybox}      \right.      \label{eq:example_left_right2}     \end{equation*}


title: Excluding the number that appears before sections and using roman numbers in table of content

text: Whenever I have `\section{something}` a number appears before it, like > 1.Something How can I exclude this number? And for table of content, I have something like               \setcounter{tocdepth}     \tableofcontents      This works perfectly fine, but I would like to add roman number in some-places in table of content and would like to include, some titles, before `\tableofcontents` command is called into table of content. For example:               \section{example}          \setcounter{tocdepth}     \tableofcontents      How to include example in the table of content, with roman number in the page column? My MWE is as follow:               \documentclass[12pt,oneside, paper=a4,pagesize=pdftex, liststotoc, bibtotoc]{scrartcl}     %Einstellungen der Seitenrnder     \usepackage[left=3.0cm,right=3.0cm,top=3cm,bottom=3cm,includeheadfoot]{geometry}     \usepackage{graphicx}     %Umlaute ermglichen     \usepackage[latin1]{inputenc}     \usepackage{color}     %\usepackage[printonlyused]{acronym}     \usepackage{cite}     \usepackage{multirow}     \usepackage{booktabs}     \usepackage{setspace}     \usepackage{amssymb}     \usepackage{wrapfig}     \usepackage[tight,TABTOPCAP]{subfigure}     \usepackage{float}     \usepackage{epstopdf}     \definecolor{orange}{rgb}{1,0.5,0}     \usepackage[T1]{fontenc}     \usepackage{algorithmic}     \usepackage{amsmath}     %-------------------------------------------------------------------------      % macros - newly defined by htrsek     \newcommand{\todo}[1]{\textcolor{red}{\textbf{TODO: #1}}}     \newcommand{\comment}[2]{\textcolor{orange}{\textbf{\textit{\textless Comment (#1): #2\textgreater}}}}     \newcommand{\inprogress}[3]{\textcolor{blue}{\textbf{InProgress: #1}}}     \newcommand{\translate}[4]{\textcolor{green}{\textbf{(#1)}}}     \newcommand{\flexWARE}{\textsuperscript{flex}WARE }     \newcommand{\thedate}{\today}     %[BC] Using the listing package for source code embedding.     \usepackage{listings} \lstset{numbers=left, numberstyle=\tiny, numbersep=5pt} \lstset{language=Perl}            %PDF Kram     \usepackage[%         pdftitle={something},% Titel des PDF Dokuments.         pdfauthor={someone},%Autor des PDF Dokuments.         pdfsubject={something},%Thema des PDF Dokuments.         pdfcreator={MiKTeX, LaTeX, hyperref, KOMA-Script},%Erzeuger des PDF Dokuments.         pdfkeywords={project title},% auch fr PDF          pdfpagemode=UseOutlines,% Inhaltsverzeichnis anzeigen beim          %pdfdisplaydoctitle=true,%Dokumenttitel statt Dateiname          pdflang=en%Sprache des Dokuments.     ]{hyperref}          \definecolor{LinkColor}{rgb}{0,0,0.5}     \definecolor{hellgelb}{rgb}{1,1,0.8}     \definecolor{colKeys}{rgb}{0,0,1}     \definecolor{colIdentifier}{rgb}{0.4,0.4,0.4}     \definecolor{colComments}{rgb}{0,0.5,0}     \definecolor{colString}{rgb}{1,0,0}     \definecolor{blue}{rgb}{0,0,1}          \hypersetup     {         colorlinks=true,%        Aktivieren von farbigen Links im Dokument (keine Rahmen)         linkcolor=LinkColor,%    Farbe festlegen.         citecolor=LinkColor,%    Farbe festlegen.         filecolor=LinkColor,%    Farbe festlegen.         menucolor=LinkColor,%    Farbe festlegen.         urlcolor=LinkColor,%     Farbe von URL's im Dokument.         bookmarksnumbered=true%  Überschriftsnummerierung im PDF Inhalt anzeigen.     }     %Zeilenabstand 1.2     \linespread{1.2}     %Kopf- und Fusszeile     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     %Kopfzeile links bzw. innen     \fancyhead[L]{\textsf{someone}}     %Kopfzeile rechts bzw. aussen     \fancyhead[R]{\textsf{\nouppercase{\leftmark}}}     %Linie oben     \renewcommand{\headrulewidth}{0.5pt}     %Fusszeile links bzw. innen     \fancyfoot[L]{\textsf{Something}}     %Fusszeile rechts bzw. aussen     \fancyfoot[R]{{\textsf{\pagemark}}}     %Linie unten     \renewcommand{\footrulewidth}{0.5pt}     \setlength{\parindent}{0pt}          %Setup for listings.     \lstset{basicstyle=\small}     \lstset{language=C}          \newtheorem{Def}{Definition}     \begin{document}     \thispagestyle{empty}          \newpage     \pagenumbering{arabic}          \thispagestyle{empty}     \mbox{}          \newpage     \renewcommand{\thepage}{\roman{page}}     \section*{Affirmation}     \newpage     \section*{Abstract}          \newpage          \section*{Acknowledgements}          \newpage                    \setcounter{tocdepth}{3}     \tableofcontents               \newpage                         \end{document}               As it can be seen affirmation, abstract come before the table of content. And I would want my table of content to look something like this: ![Table of content](http://i.stack.imgur.com/NJW95.png) Edit: My document class is `scrartcl` and I don't use frontmatter.


title: Justification in table

text: How to justify a table column like:               \begin{table}{j j}     ab cd & ef gh\\     ij kl & mn op     \end{table}      where `j` stands for justified column, i.e. both right and left are aligned. Thanks...


title: Make defined words appear standalone in left margin

text: I've seen this in textbooks before, so I imagine it's possible. What I would like is for a defined word to show up in the left margin for easy identification when scrolling through a document. For example, with the following sentence I would like the word "bijection" to appear in the left margin, bolded.               A function $f:A \rightarrow B$ is called a \textbf{bijection} or bijective function if     it is both surjective and injective.      I have just wrapped it in `\textbf` for now, but this is find-replaceable in my current document. I imagine this could be done with an indexing package, but haven't found a solution yet. Any help would be appreciated.


title: Removing subtotal from invoice

text: I'm trying to create invoices with the invoice package, however I'm running into a problem. In some cases I only have one project with multiple fees. This creates a rather... ugly looking document with the end of it being a Sub total of the fees, a sub total of the project (both exactly the same), a sum of the fees (again the same as before) and then the total. Is there any way to get rid of all these subtotals?               \documentclass[11pt]{letter}      \usepackage{invoice}      \address{123 derp }      \signature{D}      \date{10-10-2012}      \begin{document}       \begin{letter}{ }        \opening{Invoice no. }         \begin{invoice}{USD}{0}          \ProjectTitle{}            \Fee{herp} {50} {2}            \Fee{derp}{50}{5}            \hline         \end{invoice}        \end{letter}      \end{document}      (also sorry for the stupid tags. I have no idea what to file this under other than invoice and I don't have the rep to create a tag for it)


title: pgfplot vs gnuplot

text: I am writing a document containing many plots. I have used gnuplot in the past and I love it. It's powerful and you can do anything you want. But when I import a graph generated from gnuplot, the fonts and the canvas size need to be calculated and remain fixed once the PDF is generated. So in the main document, if you decide to scale the picture, the fonts are scaled too. So I have to go back and change my settings in gnuplot files. This is an issue because often you want to have a document in draft mode with a larger font size, and a different version in smaller font size. Or perhaps you decide to scale pictures and put 3 of them side by side instead of 2. Here I have to go back, calculate, and change canvas/font size in 200 gnuplot files ! In Tikz you can use option [scale=...] it does not scale fonts, but it does scale line thickness. So you scale a graph, fonts are good, lines become too thick or thin. There are workarounds though ... Pgfplot package seem to be the best solution to me, with many obvious advantages. If I use pgfplots for my graphs, does it slow down the LaTeX compile time, or increase the PDF size (Mb) a lot? It seems to me it takes a lot of memory and increases output file size too (high resolution graphics?). I afraid I invest on pgfplot and at the end it turns out there are problems with it, and waste my time. Please report on your experience with pgfplot/gnuplot for plotting 2D scientific graphs (not very fancy). The pros and cons of each, and in particular limitations/issues of pgfplot, and whether it worth investing/switching. Suggestions to solve gnuplot problem are also welcome.


title: How to compile TeX ---> HTML use TeX4ht?

text: I have problem compile TeX ---> HTML use TeX4ht and my MWE like this               \documentclass{article}     \usepackage[html]{tex4ht}     \title{Simulation of Energy Loss Straggling}     \author{Maria Physicist}     \begin{document}     \maketitle     \section{Landau theory}     \label{sec:phys332-l}     Integral Riemann-Stieltjes menyisakan topik yang menarik. Didalam paper ini kita akan menyelidiki modifikasi integral Riemann yang didefinisikan pada sebarang himpunan. Kasus khusus integral ini kali pertama didefinisikan oleh Coppin dan Vance dimana integralnya didefinisikan atas dense subset interval yang memuat titik-titik ujung interval itu. Coppin dan Vance telah menunjukkan syarat perlu dan cukup untuk $f$ terintegral $g$ pada dense subset dari $[a,b]$ dimana $f{\mid}_M$ dan ${\mid}_M$ tidak mempunyai persekutuan titik kontinu. Vance memberikan karakterisasi fungsional terbatas. Dia telah membuktikan representasi teorema untuk fungsi quasi kontinu didefinisikan pada selang tertutup. Misalkan $\Delta$ didefinisikan himpunan semua dense subset dari $[a,b]$ yang memuat $a$ dan $b$. Coppin memberikan syarat dimana $f$ terintegral $g$ pada $M'$ di $\Delta$ dibuktikan $f$ terintegral $g$ di $M$ di $\Delta$ dan $M\subset M'$. Dia menunjukkan bahwa jika $f$ terintegral $g$ pada suatu anggota uncountable $\Delta$, maka $f$ teintegral $g$ pada banyak uncountable $\Delta$. Tambahan, Dia telah membuktikan bahwa  jika $M$ anggota countable $M$ dari $\Delta$, maka ada fungsi bernilai real  $f$ dan $g$ dengan daerah asal $[a,b]$ dengan demikian bahwa $f$ terintegral $g$ pada $M$ dan tidak ada anggota $\Delta$ lainnya. Coppin menambahkan hasilnya dengan menunjukkan bahwa $f$ terintegral $g$ pada $M$ di $\Delta$ dan $f{\mid}_M$ dan $g{\mid}_M$ yang tidak mempunyai titik persekutuan yang diskontinu jika dan hanya jika $f$ terintegral pada setiap himpunan bagian $M \in \Delta$ juga terbukti bahwa jika $M \in \Delta$, $f$ dan $g$ fungsi yang didefinisikan pada $[a,b]$ yang mempunyai persekutuan dari kanan(kiri) di $z$ dan $f$ terintegral $g$ pada $M$, maka $f$ terintegral pada $M\cup \{z\}$ dan $\int_{M\cup \{z\}}f dg=\int_{M}f dg$ yang menunjukkan bahwa jika $f$ dan $g$ fungsi dengan daerah asal $[a,b]$ dan $f$ dan $g$ tidak mempunyai titik persekutuan yang kontinu dari kiri(kanan), maka himpunan $\{w:w=\int_{M} f dg \bigvee M \in \Delta \}$ terhubung.\\     Di paper ini, kita akan belajar integral Siteltjes atas sebarang himpunan. Kita akan membandingkan integral ini dengan partisi penghalus integral Stieltjes.     \section{Definisi Permulaan}     Kita akan memberikan definisi dan penetapan yang digunakan di paper ini. \\     Secara umum, selang $M$ adalah himpunan ${[a,b]_M}=[c,d]\cap M$ dimana $c,d \in M$ dan $c<d$. Dua interval dikatakan nonovelapping jika dan hanya jika $A\cap B$ tidak memuat selang. Koleksi interval tak kosong dikatakan nonoverlapping jika dan hanya jika setiap dua anggota yang berbeda adalah nonoverlapping. Di paper ini, semua fungsinya terbatas.     \begin{thebibliography}{10}     \bibitem{bib-LAND}     L.Landau.     On the Energy Loss of Fast Particles by Ionisation.     Originally published in \emph{J. Phys.}, 8:201, 1944.     Reprinted in D.ter Haar, Editor, \emph{L.D.Landau, Collected     papers}, page 417. Pergamon Press, Oxford, 1965.     \end{thebibliography}     \end{document}      And the Result like this : ![Blank Page](http://i.stack.imgur.com/NMrDU.png) I compile my document with WinEdt 8.0 (LaTeX --> Html) like this : ![LaTeXtoHTML](http://i.stack.imgur.com/mxklE.png) How to fix produce LaTeX to HMTL document ?


title: Automatic linebreak on specific character

text: Based on my old question Push long words in a new line, I search for a possibility to allow linebreak on specific character. For example in my case I want to break on "_" (underscore).               \documentclass{scrartcl}          \begin{document}     \section{Test}     Finally there is a simple solution using \textsc{\textbf{XMLResource.OPTION\_RECORD\_UNKNOWN\_FEATURE}} option. And the     text must go on \ldots.     \par     \end{document}


title: Extra intervals before and after flushright environment

text: I am preparing questionnaire template in LaTeX. **I have** the following code (simplified):               \documentclass{article}     \begin{document}     \framebox{\parbox{4cm}{         \textbf{3. How often do you have a headache?}\\         \textit{(Choose one option)}\begin{flushright}             never 0                  seldom 1                  often 2         \end{flushright}                 }}     \end{document}      **Output** looks like this: ![enter image description here](http://i.stack.imgur.com/6emNT.png) **My questions are:**   * Why I get the blank lines(marked by red color on picture for convenience) before and after the flushright environment ?   * How to remove them?


Here I am back again with a new question. I try to make a poster with beamerposter. Now I would like to draw a arrow with tikz, but I get this error message `pgfkeys: I do not know the key '/tikz/triangle 60'` Here is the code I am using               \documentclass[final,hyperref={pdfpagelabels=false}]{beamer}     \usepackage[orientation=portrait,size=a0,scale=1.4]{beamerposter}     \usetheme{}          \usepackage[english]{babel}          \usepackage{tikz}     \usetikzlibrary{arrows,calc,automata,shapes.arrows}          \usepackage{graphicx}          \begin{document}          \begin{frame}[t]            \begin{columns}[t]            \begin{column}{.02\textwidth}\end{column}            \begin{column}{.465\textwidth}                 \begin{block}{TITLE}              \begin{tikzpicture}[baseline={([yshift=-15pt]current bounding box.north)},line width=6pt]             \draw[->,stealth'](0,0)--(1.2,0);              \end{tikzpicture}            \end{block}            \end{column}            \end{columns}          \end{frame}          \end{document}      Does anybody know why I get this error? Thanks a lot!


title: How to say "this is a good place for a page break"?

text: How do I tell LaTeX, _"if you need to put a page break, this is a good place to put it"_  ?


title: Leftalign labels with enumitem

text: I'm using the `enumitem` package to define a legal list:               \usepackage{enumitem}     \newlist{legal}{enumerate}{10}     \setlist[legal]{label*=\arabic*.}      The output for a list looks like this:               1. foo       1.1 bar         1.1.1 bla       1.2 baz         1.2.1 blubb     2. fuuu      But that gets somewhat clobbered if you have many items and deep nesting. So I want all the labels to align on the leftmost side but keep the indentation for the items themselves like so:               1. foo     1.1    bar     1.1.1      bla     1.2    baz     1.2.1      blubb     2. fuuu      I guess this would make searching for an entry in that list easier. Any ideas on how to achieve that? I have already tried the `align` option of the `enumitem` package but that didn't work as intended.


title: tikz Multi-segment Line of Varying Thickness

text: I'm drawing a multi-segment line with TikZ as below:               \begin{figure*}     \center     \begin{tikzpicture}         \draw[->] (0.25,0) --(0.75,1.2) -- (1.25,1.5) -- (1.75,0.7) -- (2.25,1.1) -- (2.75,0.5) -- (3.25,1.5) -- (4.25,1.8);     \end{tikzpicture}     \end{figure*}      I'd like a few of the segments of the line to be thick, and the rest to be thin. Or, put another way, I'd like the line to be thick from `(0.25,0)` up until `(1.75,0.7)`. If I just do `\draw[thick] ...` the whole line becomes thick, which is not what I want. Any thoughts? Thanks!


title: PDF viewer with auto update for WinEdt

text: Is there a PDF viewer featuring auto update for WinEdt? [WinEdt V 5.5 on WinVista machine] I find WinEdt very comfortable to work with but the fact that one has to re- open Acrobat after every compilation and jump to the correct page is a big nuisance!


title: Embed video in PDF with beamer under Ubuntu

text: I'm stuck in embedding a video into a PDF presentation with beamer. The problem is not the actual tex code, but the fact that I'm using Linux Ubuntu 10.04. The video is not reproduced, with evince it looks like it is not even present, with Acrobat Reader it says I need a media player that for my OS doesn't exist. With Okular also it doesn't work. I searched in the web, I saw that this problem is quite popular, but no solution works for me. The only way I manage to play the video is using the multimedia package and making a hyperref to the video, but it's not embedded, it plays outside the PDF.


title: Revision Control - Footers and markings

text: I'm fairly new to TeX and I've been looking around for ways to mark revisions as in this document. Each page has a footer showing when it was last changed (either by the text changing or being moved) and the most recent revision(s) on any page are highlighted with a bar to the left. I expect much of this would have to be done manually, but is there a way to mark a paragraph as "updated July 2011" and have (La)TeX somehow pick out the most recent for a page? I'm probably being too optimistic, but perhaps someone will have a solution which works!


title: Preventing whitespaces between sections after using \linespread{2}

text: I'm working on my thesis and there is something rather strange going on in terms of whitespacing. All is well if I do not use the linespread command. However, as soon as I do use it, sections seem to be pushed to the next page and that creates a massive whitespace between different sections. See the image below: ![screenshot of document](http://i.stack.imgur.com/dCD2j.png) All is okay on the first page, but then on page 2 there is a massive whitespace, presumably because LaTeX pushed the next section (1.2.1) to the next page. Now I don't know enough of the terminology and thus probably have not exhausted my search, but I've tried setting parskip and that didn't work. This is using a standard template without any packages loaded. I'm using the 'book' template - for some reason when I use the 'article' template the spacing seems fine. Any help would be appreciated!


title: Storing contents of environment within align

text: Now we are at it here is another one that has been puzzling me.               \documentclass[a4paper]{article}     \usepackage{amsmath,environ}     \def\storer#1{\def\data{#1}}     \makeatletter     \newenvironment{test}{\Collect@Body\storer}{%       \begin{pmatrix}       \data       \end{pmatrix}     }     \makeatother     \begin{document}     This works     \begin{equation*}      \begin{test}       a & b \\ c & d      \end{test}     \end{equation*}     This does not     \begin{align*}     \begin{test}       a & b \\ c & d     \end{test}     \end{align*}     \end{document}      Reason, I'd like to make scalable matrices, i.e. I do not want to add `\scalebox{...}{....}` around matrices, that is not a good user interface. Currently I'm using a solution that make use of `lrbox` and `varwidth`, it works but it is not pretty. Joseph Wright mentioned that it may have something to do with the double typesetting witchcraft that `align` is doing Ideas?


title: Lyx Modify Document Class

text: I have spent the last few hours trying to modify article.cls to conform to my professor's paper requirements (title above abstract, page numbers don't start until the second page of the introduction), but this LaTex code is wildly unfamiliar to me, and I don't see how I can accomplish what I need to. Can someone direct me towards a reference/tutorial/documentation of creating and modifying LaTex document classes for Lyx?


title: TexShop does not save my file when compiling

text: I have TeXShop 3.26 running on a MacBook Pro with MacOS 10.9.1 and the TeXLive-2013 distribution. Since a few days ago (after I updated to Mavericks) TeXShop does not automatically save my file when I typeset it (the red button on the upper left corner always has the dark spot). I think this is very unusual, but I am not able to find out what the problem is. Thanks!


title: \nullfont in mathmode

text: I made some experiments with TikZ like               \documentclass{minimal}     \usepackage{tikz}     \begin{document}       \tikz \color{blue}  $(a+b)^n$ $n \choose r$; % \tikz Test ; gives nothing     \end{document}      We get a blue result but in a box with null dimensions. The pgfmanual gives : > Next, the contents of the environment is processed and the graphic commands > therein are put into a box. Non-graphic text is suppressed as well as > possible, but non-pgf commands inside a {tikzpicture} environment should not > produce any “output” since this may totally scramble the positioning system > of the backend drivers. The suppressing of normal text, by the way, is done > by temporarily switching the font to \nullfont. You can, however, “escape > back” to normal TEX typesetting. This happens, for example, when you specify > a node. So my first idea is that `\nullfont` works only in text mode and not in math mode. I would like to know if my first thought is correct? and what is the equivalent of `\nullfont` in mathmode?


title: Problem inserting .pdf_tex file from Inkscape

text: I am trying to insert an image from Inkscape. I saved it as a pdf, checking the PDF + Latex option.   Inside my Latex file, I wrote the following code :               \begin{figure}         \centering         \def\svgwidth{\columnwidth}         \input{topo4serv.pdf_tex}       \end{figure}      but when i try to compile using pdflatex, it gives me the following error message:               ERROR: Undefined control sequence.            --- TeX said ---       <argument> \includegraphics                                   [width=\unitlength ]{topo4serv.pdf}     l.52 ...raphics[width=\unitlength]{topo4serv.pdf}}                                                        %      In the output pdf file the text of the svg file is there but not the shapes...   If someone has an answer i would be very grateful.


title: Shorthand for numbered equation environment

text: Is there any shorthand for numbered equation environment?


title: How to remove empty pages in document class article

text: Between sections/section or sections/subsection I have empty pages if a pre- section or pre-subsection does fill one page. My document class:               \documentclass[9pt]{article}      How can I avoid this? Thanks for help. Here is the minimal example, which produces an emtpy page between chapter 1 and 2:               \begin{document}     \section{Chapter1}     \begin{table}[H]     \begin{tabular}{ll}     \hline     x & y  \\      \hline     1 & 2  \\ \hline     \end{tabular}     \end{table}          \section{Chapter2}     \begin{figure}[H]     \setkeys{Gin}{width=1.4\textwidth}     \includegraphics[angle=90]{figure.pdf}     \end{figure}     \end{document}      If I change width to 1.3 or change angle to 0 there is no empty page between chapter 1 and 2.


title: Using \citep{} leads to "! Missing \endcsname inserted." error

text: When I am trying to compile my document I get the following error `! Missing \endcsname inserted.` if there's a ":" in my cite key. This is my MWE:               \documentclass[12pt,a4paper,twoside]{article}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage[francais,french]{babel}     \usepackage[T1]{fontenc}\usepackage{amsmath}     \usepackage[authoryear]{natbib}     \setlength{\bibsep}{0pt}     \begin{document}     Blablablabla \citep{Organization:2003aa}.     \bibliographystyle{biblio}     \bibliography{Biblio}     \end{document}      The error only appears when the bibdex cite key contains ":" if I replace the ":" by a dash it works fine. The bst file I used was customized by myself last year, I used it for another paper it worked fine. Thanks in advance for your help.


title: Arbitrary Paper Size in ConTeXt?

text: I would like to typeset a document into a single-page PDF that may be a meter long. Clearly this is not a A4, A5, A6 page size. Is it possible to specify arbitrary page sizes, like with the geometry class in LaTeX?


title: Consolidate BibTeX crossrefs into new .bib file

text: I have three BibTeX files set up:   * `main.bib`, which contains all the main reference entries for papers. These use `crossref` to reference entries in...   * `crossrefs.bib` which contains all the details of conferences and journals. This draws upon...   * `strings.bib`, which contains string definitions of things like conference names. This works fine when compiling latex documents. However, I wish to convert all my citations into `xml` format to be imported into MS Word – this is causing me some troubles. The method I have used to convert my `bib` files to `xml` is:   * Import all `.bib` files into JabRef   * Export as `xml` format However, the crossrefs remain as crossrefs in the exported file. When used in MS Word, therefore, only the title and author of each paper is visible in each citation. I would like all the entries to be consolidated, such that each entry in my main file contains all the details from `crossrefs.bib` and `strings.bib`. Is there a script (or JabRef option/alternative) which will perform this consolidation of crossrefs and strings? * * * **EDIT** The BibTeX files are set up as in this answer. In JabRef the entries look like this: ![enter image description here](http://i.stack.imgur.com/D6f4j.png) The crossrefs haven't been populated but I believe JabRef does understand cross-referencing. An example entry from the `xml` output is as follows:               <b:Source>     <b:SourceType>ConferenceProceedings</b:SourceType>     <b:BIBTEX_Entry>inproceedings</b:BIBTEX_Entry>     <b:Tag>jia-cvpr-2013</b:Tag>     <b:Title>{3D}-Based Reasoning with Blocks, Support, and Stability</b:Title>     <b:Author>     <b:Author>     <b:NameList>     <b:Person>     <b:Last>Chen</b:Last>     <b:First>Tsuhan</b:First>     </b:Person>          ...snip...          </b:NameList>     </b:Author>     </b:Author>     <b:BIBTEX_CrossRef>cvpr-2013</b:BIBTEX_CrossRef>     </b:Source>      As you can see, the crossref remains, and Word cannot resolve this. It appears in the bibliography as so: ![enter image description here](http://i.stack.imgur.com/8O3Kh.png) (The braces {} also remain, but this is less of an issue...) I imagine a solution to this problem would also help people who have begun their BibTeX files with crossrefs but now want to revert to a non-crossref solution!


title: How to modify \part style in memoir

text: A beginner question: I would like to print `\part` with roman numbers as it follows: > I. Teil or > I. rész Someone could please explain me how to do it?


title: LaTeX 3 read/write to file like toc

text: I tried to reimplement some kind of a toc facility. I write `wout`s argument into a file and try to reinclude this. So the Problem is, that `\ior_str_gto:NN` seems to stop at linebreaks. Please consider the following example:               \documentclass{report}     \usepackage[latin1]{inputenc}     \usepackage{ expl3, l3keys2e, xfrac, xparse}          \ExplSyntaxOn          \iow_new:N\iow_out     \ior_new:N\ior_out           \file_if_exist:nTF {myout.out} {            \ior_open:Nn\ior_out{myout.out}         \ior_str_gto:NN\ior_out\tl_get_out         \ior_close:N\ior_out }         { \typeout{no file! rerun}         }          \iow_open:Nn\iow_out{myout.out}          \DeclareDocumentCommand\wout { m } {      \iow_now:Nx\iow_out{#1}     }     \DeclareDocumentCommand\rout {  } {      \tl_use:N\tl_get_out     }          \ExplSyntaxOff     %     %     \begin{document}     \wout{bla}     \wout{blub}     \rout     \end{document}      The Question is: How can i make `\ior_to_gstr` to read in the whole file? and: is there a better way to implement such a function using l3?


title: list of occurences of references

text: I need a list like the `list of figures` for `\ref` entries in the text to instances of a custom `Theorem` environment. Here's a MWE with a handbuilt example. The solution should add features to this code I built using the answer to write contents of an environment to document and toc.               \documentclass[12pt]{book}          \usepackage{amsthm}     \usepackage{environ}     \usepackage{hyperref}          \newcommand{\gref}[1]{%        [Goal~\ref{goal:#1}]     }          \makeatletter     \newcommand\l@goal[1]{%     \addpenalty{\@highpenalty}%     \vskip \z@ \@plus \p@      \begingroup     \parindent\z@     \rightskip\@pnumwidth     \parfillskip-\@pnumwidth      \leavevmode #1\nobreak\hfil\nobreak\null\par      \penalty\@highpenalty     \endgroup}          \newcommand{\egregaddtocontents}[1]{%       \addtocontents{toc}{\protect\l@goal{#1}}}          % arrange goal numbering by chapter     \newtheorem{Goal}{Goal}[chapter]          \NewEnviron{goal}[1]{%     \begin{Goal}     \label{goal:#1}     %{\em label:} #1 %comment in/out to restore/suppress printing label     \normalfont{}\noindent     \BODY     \egregaddtocontents{\BODY}     }     [\end{Goal}]     \makeatother          \begin{document}          \tableofcontents{}          \chapter{First}          \begin{goal}{firstfirst}     learn more \LaTeX     \end{goal}          \begin{goal}{firstsecond}     spend time on content, not \LaTeX     \end{goal}          stuff          \chapter{Second}          \begin{goal}{secondfirst}     have fun in any case     \end{goal}          Chapter contents here, referring to some goals:     \section{whatever}          Reference to a chapter 1 goal: \gref{firstsecond}          Reference to a chapter 2 goal: \gref{secondfirst}           \section{another}          Second reference to a chapter 2 goal: \gref{secondfirst}          \chapter*{List of Goal References}          Built by hand, should be automated. Format not yet specified.          \begin{itemize}     \item \gref{firstfirst}      learn more \LaTeX          \item \gref{firstsecond}      spend time on content, not \LaTeX     \begin{itemize}     \item Section 2.1, page 5 [link to that page]     \end{itemize}           \item \gref{secondfirst}      have fun in any case     \begin{itemize}     \item Section 2.1, page 5 [link to that page]     \item Section 2.2, page 5 [link to that page]     \end{itemize}          \end{itemize}     \end{document}      Here's the list from the MWE. The format is `\itemize` but that's just temporary - the solution should allow me to change it easily. ![handbuilt list of goals](http://i.stack.imgur.com/h5xV7.png) Perhaps there's already a package that does the job. If not, perhaps build on top of or cannibalize code that creates the index and the list of figures, since I require features from both.