The perl script latexmk (
http://www.phys.psu.edu/~collins/software/latexmk-jcc/) runs LaTeX the 
'correct' number of times on a given document. It shouldn't be too hard to 
get Sphinx to use it instead of running LaTeX: if latexmk is installed, then 
I think it should be enough to change the file texinputs/Makefile as 
follows:

-# The number of LaTeX runs is quite conservative, but I don't expect it
-# to get run often, so the little extra time won't hurt.
 %.dvi: %.tex
- latex $(LATEXOPTS) '$<'
- latex $(LATEXOPTS) '$<'
- latex $(LATEXOPTS) '$<'
- -makeindex -s python.ist '$(basename $<).idx'
- latex $(LATEXOPTS) '$<'
- latex $(LATEXOPTS) '$<'
+ latexmk -dvi $(LATEXOPTS) '$<'
 
 %.pdf: %.tex
- pdflatex $(LATEXOPTS) '$<'
- pdflatex $(LATEXOPTS) '$<'
- pdflatex $(LATEXOPTS) '$<'
- -makeindex -s python.ist '$(basename $<).idx'
- pdflatex $(LATEXOPTS) '$<'
- pdflatex $(LATEXOPTS) '$<'
+ latexmk -pdf $(LATEXOPTS) '$<'

Would this be a good idea?  I suppose there would be two choices: include 
latexmk with Sphinx, or test for its presence in the Makefile and if 
present, use it.

I'm asking because in Sage, one of our Sphinx documents (generated using 
autodoc) is over 5000 pages long, running pdflatex on it three times instead 
of five (for instance) is significant.

-- 
John

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to