+----[ Andrew Ford <A.Ford@ford-mason.co.uk> (09.Jun.2006 07:41): |
[snipped] | >> Have you looked at PDF::Template?
| > Or if you are comfortable with Latex...
| > http://search.cpan.org/~andrewf/Template-Latex-2.16/lib/Template/Latex.pm
| Note that Template-Latex currently only runs latex (or pdflatex) once on
| the source, which means that features like table of contents and
| forward references, which require repeated runs, will not work, neither
| will it run bibtex or makeindex, so you don't get bibliographies or an
Mmm ... maybe Template-Latex can be changed to run latexmk
instead of pdflatex? http://www.phys.psu.edu/~collins/software/latexmk-jcc/
latexmk is a wrapper and will run "LaTeX the correct number
of times to resolve cross references, etc; it also runs
auxiliary programs (bibtex, makeindex if necessary, ..."
I know that this brings another dependency ... but
i) latexmk is a single script.
ii) it's written in Perl
iii) it only depends on LaTeX (of course) and a few basic
perl modules (all bundled with Perl, AFAIK, no need to
install them separately)
iv) it is licensed under GNU-GPL v2
v) it knows how to deal with different OSs to get
information about files that have changed (for example an
.aux file) and decide if latex has to be run again
Given the above, it would not be too farfetched to think of
using latexmk as an external dependency or including the
functionality (at least the relevant pieces) of latexmk into
Template-Latex ... sounds attractive? doable? | That said pdflatex can generate very nice PDFs -- I have
| typeset an illustrated cookery book with LaTeX, generating camera ready
| copy that was used directly by our publisher's printers, and we also
| generate nicely typeset price lists with Catalyst, DBI and TT2.
| I have just taken over as maintainer of the module and will be adding
| functionality (that I had as a patch to an earlier version of TT2) to
| run bibtex and makeindex if it is detected that they are needed, and to
| re-run latex to resolve forward references and table of contents. I
| hope to have a new version out in a week or so which will be "all
| singing and dancing".
Check latexmk. It's been doing exactly this for quite a
while now, and has already been stress tested by many latex
users (the algorithm for deciding how many times to run
latex has evolved, based on feedback from users).
Even if you decide not to use it, taking a look at how it
does its job might save you some time :)
Catalyst mailing list