Compiling a preamble, i.e. the part before \begin{document}
takes up to a few seconds each time you recompile your document. If you don't change that part very often, you can precompile it to a separate file and save you these seconds.
- Open your .tex document and copy all text that appears before the
\begin{document}
line to a new file (call it preamble.tex). - In the same direcory create a batch file precompile.bat (or shell script if your are on Linux/Mac) and paste the following line there
pdflatex -ini "&pdflatex preamble.tex\dump"
Save and run this file. It creates the format file preamble.fmt - Go back to your .tex document, delete all lines you've copied on step 1 (all the lines before
\begin{document}
) and insert the following line instead (at the very beginning of you file):
%&preamble
(preamble
here comes from the name of your preamble.fmt)
No comments:
Post a Comment