Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am facing a problem with the placement of my externalized TikZ/pgf/pgfplots figures. The externalization works well and the external figure is included into my document. The placement of the figure as well as the caption are not working correctly when I incorporate both the eso-pic and hyperref packages. The caption is then missing, and the figure placed on the next page disregarding the centering. A minimal working example is below

\documentclass{article}

\listfiles
\usepackage{graphicx}
\usepackage{eso-pic}
\usepackage{pgfplots}
\usetikzlibrary{external}
\tikzexternalize
\tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"; dvips -o "\image".ps "\image".dvi}}
\usepackage{hyperref}

\begin{document}

This is a test.

\begin{figure}[h]
\centering
\begin{tikzpicture}
    \begin{axis}[
        xmin=0,xmax=5,
        ymin=0,ymax=3,
    ]
    \draw [ultra thick,gray] (axis cs:0.5,0.5) to[out=80,in=200] (axis cs:1.5,2) to[out=-180+200,in=160] (axis cs:3,2) to[out=-180+160,in=110] (axis cs:4,1);
    \end{axis}
\end{tikzpicture}
\caption{This is my Figure}
\end{figure}

So is this.

\end{document}

I compile the document using TeXLive2011 and the commands

latex --shell-escape minimal.tex ; dvips minimal.dvi ; ps2pdf minimal.ps

Any suggestions how to avoid this issue is welcome!

share|improve this question
3  
Not a solution but maybe you can avoid eso-pic? TikZ can also place items absolutely on a page. –  Alexander Aug 4 '13 at 8:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.