3

i'm trying to export a TikZ picture to .eps using the following on Win7 (MikTeX), compiling with pdflatex:

\documentclass{article}
\usepackage{tikz}

\usetikzlibrary{external}
\tikzset{external/system call={pdflatex \tikzexternalcheckshellescape -halt-on-error 
-interaction=batchmode -jobname "\image" "\texsource" &&
pdftops -eps "\image".pdf}}
\tikzexternalize[shell escape=-enable-write18]

\begin{document}
\begin{tikzpicture}
\draw (0,0) circle (1cm);
\end{tikzpicture}
\end{document}}

For some reason, this does not yield any .eps file (the figure will only be exported as .pdf) - can somebody help me with this?

1 Answers1

1

Before \begin{document}, add \pgfrealjobname{file_name}

Before \begin{tikzpicture}, add \beginpgfgraphicnamed{file_name} and after \end{tikzpicture}, add \endpgfgraphicnamed

In the folder containing the file: hold the Shift key and right click > Open command window here

In the newly opened PowerShell window, type:

  1. latex --jobname=file_name-f1 nfile_name.tex
  2. dvips file_name-f1.dvi
  3. ps2eps file_name-f1.ps
AndréC
  • 24,137
AlMa
  • 560