[Catalyst] How create a PDF report? (suggestion for Template-Latex)

Andrew Ford A.Ford at ford-mason.co.uk
Fri Jun 9 17:05:26 CEST 2006


Thanks for that information.  I have just had a look at latexmk -- I 
don't think I want to add it as a dependency, especially as latexmk is a 
3,800 line script, and aspects such as dealing with previewers are 
irrelevant in the Template Toolkit plugin environment.  However I will 
look closely at what the script does -- especially the logic for 
determining the logic for determining the minimum set of actions that 
need to be performed.

Regards
Andrew

Fernan Aguero wrote:
> +----[ Andrew Ford <A.Ford at 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 
> | index. 
>
> 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".
> | 
> | Regards
> | Andrew
> |
> +----]
>
> 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 :)
>
> Cheers,
>
> Fernan
>   

-- 
Andrew Ford,  Director    Pauntley Prints / Ford & Mason Ltd            
A.Ford at ford-mason.co.uk   South Wing Compton House                      
pauntley-prints.co.uk     Compton Green, Redmarley  Tel: +44 1531 829900
ford-mason.co.uk          Gloucester GL19 3JB       Fax: +44 1531 829901
refcards.com cronolog.org Great Britain          Mobile: +44 7785 258278





More information about the Catalyst mailing list