2

The image is not cropped when building it with latex -> dvips. How could I get the resulting image from dvips cropped?

\documentclass{article}

\usepackage{pgfplots}
\pgfplotsset{compat=newest}

\usetikzlibrary{external}
\tikzexternalize[mode=list and make]

\tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource" && dvips "\image".dvi -o "\image".eps}}

\begin{document}
    Hello
    \begin{figure}[htbp]
        \tikzsetnextfilename{test_fig}
        \centering
        \begin{tikzpicture}
            \fill(0,0) rectangle (4,4);
        \end{tikzpicture}
        \caption{My fig.}
    \end{figure}
\end{document}

The eps figure looks like this: enter image description here

1 Answer 1

1

Add ps2epsi to external/system call. It fixes the bounding box:

\tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource" && dvips "\image".dvi -o "\image".ps && ps2epsi "\image".ps "\image".eps}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .