I am putting a presentation together using beamer. I have a few tikz/pgf pictures that I externalize. Yet the figures are not put back into the document correctly. They are not in the right spot on the slides and the captions are missing. The externalization did produce the figures correctly as far as I can tell. I have the same problem when using the hyperref package in article class documents. As far as I know beamer uses hyperref in itself?
I am unsure how to circumvent this issue, any ideas?
Here's a simple working example
\documentclass[red]{beamer}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzexternalize
\tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"; dvips -o "\image".ps "\image".dvi}}
\tikzset{external/force remake}
\begin{document}
\frame{
\begin{figure}
\centering
\tikzsetnextfilename{MyFig}
\begin{tikzpicture}
\begin{axis}[xmin=0,xmax=5,
ymin=1,ymax=6,
domain=0:5]
\addplot [red] {x*x-2*x+3};
\end{axis}
\end{tikzpicture}
\label{fig:MyFig}
\caption{This text is missing}
\end{figure}
}
\end{document}
I compile with, with TeXLive:
latex -interaction=nonstopmode -shell-escape %.tex; dvips -o %.ps %.dvi; ps2pdf %.ps
\begin{frame}...\end{frame}instead of\frame{...}– Aaron Jun 12 '12 at 4:10MyFig.pshas a wrong bounding box. In fact,MyFig.dvicontains two bounding box instructions: the first is wrong, the second is correct... might be something between beamer and tikzexternal. – Christian Feuersänger Jun 18 '12 at 20:10