7

I know I am greedy...

I have tried for quite a while to get TikZ's externalization facilities to work nicely with mylatex, without any luck.

My document currently looks like

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize{filename}
\begin{document}
Some text.
\end{document}

I first compile it with

pdfetex -shell-escape --output-format pdf --jobname=filename-pdf --ini \&latex mylatex.ltx filename.tex

which builds a filename-pdf.fmt format file, which I then use

latex -shell-escape --output-format pdf &filename-pdf filename.tex

If I remove the two lines referring to externalization, this scheme works. With them, no output is generated. (If instead of \tikzexternalize{filename} I say \tikzexternalize the second run uses filename-pdf as jobname for the pdflatex runs used to compile externalized images, which does not work...)

Any ideas?

  • Related question: Precompiled preamble with TikZ/Externalize – diabonas May 30 '11 at 10:30
  • Does the .fmt file have to be filename-pdf.fmt? If I use --jobname=filename instead of -jobname=filename-pdf in the first call (and therefore &filename in the second, obviously), everything works fine. – diabonas May 30 '11 at 11:20
  • @diabonas Could you turn your comment into an answer? – Torbjørn T. Dec 3 '11 at 22:52
  • @TorbjørnT. No problem, done :-) – diabonas Dec 4 '11 at 17:39
5

The problem here are the different jobnames of the format file and the main document. To resolve this, simply name your format file filename.fmt instead of filename-pdf.fmt and all will be fine:

filename.tex

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize{filename}
\begin{document}
Some text.
\end{document}

Compile the format file with

pdfetex -shell-escape --output-format pdf --jobname=filename --ini \&latex mylatex.ltx filename.tex

This creates filename.fmt. Afterwards, run the compilation of your document with

latex -shell-escape --output-format pdf &filename filename.tex

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.