2

I frequently use standalone to incorporate tikz images in my documents. I have some really large tikz plots which I would like to include in my beamer presentation, but I am getting "Tex capacity exceeded" errors. First I tried unsuccessfully to "externalize" my tikz plot using standalone and the external library, but after reading this question, I have abandoned that effort and have been trying to accomplish the same thing just with standalone.

I use xelatex exclusively and I want standalone to do this also. The manual says I can set the LaTeX compiler in the package options:

build={build options}

This option allows to set the options used for building images from standalone files. See section 5.4, especially Table 3 for further details.

When I try to do this, though, like this:

\usepackage[build={latex=xelatex}]{standalone}

I get this error message:

! LaTeX Error: Unknown option `build' for package `standalone'.

This is a complete mystery to me, as I have tried other package options taken from the same section of the manual in my MWE (such as obeyclassoptions) and it has built successfully. Note that even if the syntax for the definition is incorrect, it's telling me that it doesn't recognize build in the first place. (Please correct my syntax if it is wrong.)

Here is my MWE:

\documentclass{beamer}

\usepackage[build={latex=xelatex}]{standalone}

\usepackage{pgfplots}

\pgfplotsset{width=7cm,compat=1.8}

\begin{document}

\begin{frame}{A slide}
Bla and bla.
\end{frame}

\begin{frame}{Another slide}
\input{testplot.tex}
\end{frame}

\end{document}

Here is the code for testplot.tex, taken from the pgfplots manual:

\documentclass{standalone}

\usepackage{pgfplots}

\pgfplotsset{width=7cm,compat=1.8}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
xlabel=$x$,
ylabel={$f(x) = x^2 - x +4$}
]
\addplot {x^2 - x +4};
\end{axis}
\end{tikzpicture}

\end{document}

Keep in mind that my ultimate goal is to include my giant tikz plot and not have XeLaTeX quit on me due to insufficient memory, so please let me know if this is not possible with standalone. Doing it with external alone didn't work, though. The compile dies without errors but without giving me a readable document, either.

  • 1
    I would compile the image testplot.tex on its own and generate a stand-alone PDF as output. Then use \includegraphics[..]{testplot} inside your beamer presentation. This way the two processes are separate and inclusion should be straight forward. – Werner Jul 11 '13 at 16:44
  • 1
    There is an open issue about this bug, at the standalone repository. – Twonky Jan 24 '14 at 16:27
3

enter image description here

It works for me with xelatex if I just remove the offending option

\usepackage[]{standalone}
  • Are you sure the plot was compiled with xelatex? Here's what my logs are telling me: xelatex is compiling the main document, but the standalone docs are being compiled with pdflatex. – Stephen Bosch Jul 11 '13 at 18:14
  • @StephenBosch actually the logs suggest it's all run in one pass with no internal job at all What do you see in your log? – David Carlisle Jul 11 '13 at 18:42
  • hrm, it appears that I am no longer able to reproduce this pdflatex phenomenon. Still, I would like to know why the build={} option to standalone isn't working. – Stephen Bosch Jul 12 '13 at 10:42
  • @StephenBosch I don't see a build option in the source (although I didn't look too hard) but it is in the doc (and I get the same error) ping Martin:-) – David Carlisle Jul 12 '13 at 12:20
  • I figured you might say that :) – Stephen Bosch Jul 12 '13 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.