On Monday, January 31, 2011 11:56:42 PM UTC-8, Guenter Milde wrote:
>
> On 2011-01-31, John H Palmieri wrote:
>
> > 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
>
> I suggest using the Python package "rubber"
> (https://launchpad.net/rubber) instead. This makes integration into
> Sphinx easier and saves us a dependency on Perl.
>
I'll take a look at rubber. I actually think it might better if Sphinx
didn't include any extra scripts, but the Makefile should test to see if
rubber (or latemk) is present and use it if so. I'm very far from an expert
in Makefiles, but this sort of testing shouldn't be too hard. Here's one
way which seems to work, and I would not be at all surprised if there were
better ways:
TRY_LATEXMK = $(shell command -v latexmk)
%.pdf: %.tex
ifneq (,$(TRY_LATEXMK))
latexmk -pdf $(LATEXOPTS) '$<'
else
pdflatex $(LATEXOPTS) '$<'
pdflatex $(LATEXOPTS) '$<'
pdflatex $(LATEXOPTS) '$<'
-makeindex -s python.ist '$(basename $<).idx'
pdflatex $(LATEXOPTS) '$<'
pdflatex $(LATEXOPTS) '$<'
endif
--
John
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en.