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 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?

share|improve this question
    
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
add comment

1 Answer

up vote 1 down vote accepted

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
share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.