On Feb 4, 2007, at 7:40 PM, Juan wrote:
dumping precompiled tex is a very old and useful technique you should try. You only need to bundle all the styles and headers you used to use for making some kind of LaTeX document and after that usepackages.. put
\dump
then you will be asked for the name of the format.fmt file. Put that file in the usual tex searched paths and vuala! you can use it in
pdflatex -f format.fmt source.tex
saving you not only many processor cycles but making your every day documents shorter and cleaner
Of course this means that if you want to send your files to someone else, you need to send them your .fmt file as well, unless you change the files. Is there a way to recover the source that the .fmt file was created from, or do you need to keep it around, and know what is in it in some other way?
It's a good idea, though not one I am likely to use any time soon personally. processor cycles are relatively cheap these days and it's hard to break old habits. Plus, I change my preambles all the time ;)
But most of the times you are already typesetting a document you have typeset before, so the absence of such files is not a very good indicator that a recompile is needed, especially if things like TOC don't need to be created. In any case, my point is that by telling TextMate to use latexmk.pl as per the instructions in the help file, it will compile the required number of times as you want.
And of course, you can always provide for it your very own script to do the compiling as you want it.
You are right, not every latex doc need to produce .toc files and then it is more difficult to discover that. You need to make a first typesetting, if no previous .aux and now is there one a second one will be necessary, and if no previous .toc file and one now appears, a third one will be necessary. In the meanwhile, you also will need to watch .bbl files from bibtex that should be run if some .bbl appears, etc.
Even if there is an .aux file, it might very well be out of date etc. There is a way to figure out what is going on, and latexmk.pl does exactly that as I've already mentioned. It does exactly the kind of work you have described, and compiles the right number of times. So if you want TM to do these multiple latex invocations, just tell it to use latexmk.pl and it will work just fine. This functionality is already there.
Haris