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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Windows there is a nice little tool called latexdaemon that can handle "precompiling the preamble" (and thus speeding up compilation) automatically. It doesn't require any additional setup: one can simply run latexdaemon --ini=pdflatex mytexfile.tex, and from there on it'll recompile the tex file each time it changes with the custom format file optimization (which I don't completely understand). It also provides a console where one can force recompilation manually, or force full recompilation (without the custom format file).

I am looking for similar tools that run on OS X.

On this site I have found several questions about precompiling the preamble, but none of them automate the process: they all require splitting the preamble into a separate file manually. I am looking for a tool that will spare me this trouble, and will let me start working on a new tex file with a single command, without the necessity to manually create multiple files and set up things each time.

Update: I tried to figure out how latexdaemon works, and the relevant bit for generating the format file is here. Looking at that code makes it clear that it's way above my level of (very basic) LaTeX knowledge though.

I think the main question which I haven't been able to solve on my own was how to generate and use a format file without splitting off the preamble into a separate file.

share|improve this question
Let us know if this is indeed a duplicate of the question I linked to above, and if not, please edit your question to include why it is not a duplicate. – Peter Grill Dec 6 '12 at 22:50
@PeterGrill : The difference is here : "They all require splitting the preamble into a separate file." However, I think it's a wrong cause of concern. You'll most likely be using that preamble many times, or with slight modifications, and splitting the static reusable content (most of the preamble) from the dynamic content (the rest of the preamble + the document) makes this reuse easier. – T. Verron Dec 6 '12 at 22:54
@T.Verron: Good point. – Peter Grill Dec 6 '12 at 22:58
mylatex and its more recent update mylatexformat don't require the preamble to be in a separate file. – David Carlisle Dec 6 '12 at 23:07

If using the original mylatex then a command line such as

 pdflatex -ini &pdflatex mylatex.ltx tst.tex 

should make a format that loads the preamble from tst.tex. Depending on your command line shell you may need to quote the & as \&.

share|improve this answer
Putting the "&pdflatex" bit in quotes also works, and should work on Windows as well. – Szabolcs Dec 8 '12 at 0:39

Your Answer


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.