Take the 2-minute tour ×

I am trying to typeset a longer document with lots of packages. Now it seems that pre-compiling the header can speed up the edit-compile-revise cycle quite a bit. I tried to follow the guideline from How to speed up pdflatex for a very large document on MacOS X? but it does not work on my system and I am not sure what I am doing wrong.

My preamble.tex looks as follows:

\def\preambleloaded{Precompiled preamble loaded.}

and the main.tex file:


test test test

Now after compiling the preamble with

lualatex -ini -job-name="main" "&lualatex preamble.tex\dump"

a main.fmt file is created and lualatex runs without errors. Compiling the main file with

lualatex -shell-escape main.tex

gives the message right at the beginning that the preamble was not included:

LaTeX2e <2011/06/27>
LuaTeX adaptation of babel <v3.8l-luatex-1.4> and hyphenation patterns for engl
ish, loaded.

The only difference that I can think of at the moment is that I am using LuaLaTeX on Windows 7 instead of pdftex on Mac OS X as in the linked question. Any hint how to fix this is very appreciated.

share|improve this question
Don't you need: lualatex -shell-escape "&main main.tex" ? –  Taco Hoekwater May 10 '12 at 14:14
@TacoHoekwater: Thank you! That works nicely. Could you convert your comment into an answer and maybe add a sentence what the difference is so that I can accept it? –  Alexander May 10 '12 at 15:04
add comment

1 Answer

up vote 6 down vote accepted

You need:

lualatex -shell-escape "&main main.tex"

otherwise the newly generated main.fmt file is not used at all.

share|improve this answer
add comment

Your Answer


