[Templates] Re: Latex filter enhancements

[prev] [thread] [next] [Date index for 2004/07/10]

From: Alexander Klenin
Subject: [Templates] Re: Latex filter enhancements
Date: 09:45 on 10 Jul 2004
>From: Andrew Ford <A.Ford@xxxxxxxxxx.xx.xx>

>I am just delving into Template::Filters to add an enhancement to the 
>latex/pdf filter, namely to rerun latex/pdflatex if there are undefined 
>references after the first run. 
Yes, I have also used CGI and TT with latex filter in a 
similiar scenario, and the enhancements you listed below 
would be very welcome ;)

>* set the TEXINPUTS environment variable to include the directory the 
>template was found in, so that file inclusion (in latex) picks up files 
>in that directory (the template is copied to a temporary directory and 
>latex is run in that directory so that temporary files can be cleaned up 
>after the template has been filtered).
Or perhaps a more generic mechanism for setting arbitrary 
environment variable. Also of value would be a possibility 
to set some TeX variables, like \graphicspath{} from 
graphics package, but I do not see a good way to implement 
this.

[...]
>"tmpdir" to specify a 'temporary' directory for debugging -- this would 
>not be deleted by tt2 after processing the template, so that one could 
>go in and sort out latex problems
Also sometimes I wished for an 'output_errors' option 
which would output TeX errors to a given file (or instead 
of normal template output), so that it can be easier 
obtained remotely.
A warning when the filter output is written to a text-mode 
stream would be useful for a newbies, who (like me) forget 
to put binmode=>1 in process directive.

>I am still at the planning stage for this and would 
>welcome comments and suggestions.
I am not a TT developer, but from the general spirit of TT 
I would suggest to investigate the idea of generic 
Template::Filter::External.
Such a filter could set environment varialbes, write 
per-filter text to a temp file, execute one or more 
external programs, than read their output and return it as 
a filtered text.
After that, latex filter can be implemented as a special 
case. Another application which immediately comes on mind 
is DocBook and other similiar document generators. Still 
other is an auto-packaging feature for generating archived 
downloads on demand.
---
Professional hosting for everyone - http://www.host.ru

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Re: Latex filter enhancements
Alexander Klenin 09:45 on 10 Jul 2004

Re: [Templates] Re: Latex filter enhancements
Andrew Ford 20:20 on 10 Jul 2004

Re: [Templates] Re: Latex filter enhancements
Andrew Ford 13:05 on 15 Jul 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52