[luatex] macros to invoke lua in LaTeX

Reinhard Kotucha reinhard.kotucha at web.de
Sat Mar 7 02:11:20 CET 2009


On 6 March 2009 Ulrike Fischer wrote:

 > Am Fri, 6 Mar 2009 01:08:53 +0100 schrieb Reinhard Kotucha:
 > 
 > >  > > Regarding namespaces: It's a good idea at first glance.  But
 > >  > > I don't think there is any need to be concerned about macro
 > >  > > packages people write in the future.  Macro writers have to
 > >  > > read the specifications anyway.  They have to read the
 > >  > > TeXbook if they want to support Knuth's tex, they have to
 > >  > > read the pdfTeX manual if they want to support pdftex, and
 > >  > > they have to read the LuaTeX manual if they want to support
 > >  > > Luatex.  Same for e-TeX, XeTeX, Omega, and derivates.
 > >  > 
 > >  > Another reason for prefixes. As package author I wouldn't want
 > >  > to check all engines for name clashes.
 > > 
 > > You have to check anyway.  At least if you want to support all
 > > engines.  
 > 
 > I have to know the exact names of the new primitive commands only if
 > I want to use them. To write a package that can be used with all
 > engines without a clash it is enough to know how to avoid the names.
 > That's easy with pdftex: simply don't use commands starting with
 > \pdf. It's also easy with XeTeX: avoid commands starting with
 > \XeTeX. But with luatex you are right. I will have to check
 > everytime a new version is released if there is a conflict.  
 > 
 > > e-TeX provides new primitives, why can't luatex do the same?
 > 
 > Nobody is denying luatex the right to declare new primitives. The
 > only question is if the names of this new primitives should use some
 > namespace.

Hi Ulrike,
I'm not against namespaces.  But since we are talking about
primitives, I think that in this case the gain is not very high.

I'm sure that most clashes happen between different packages, not
between a particular package and the underlying engine(s).  Yes, if
you are using an engine which is still under construction, you have to
check from time to time whether primitives had been renamed or new
ones had been added.  But I assume that LuaTeX becomes more stable
soon.  The idea of LuaTeX is to provide new functionality by Lua code
instead of new primitives.  Maybe some new primitives have to be added
after version 1.0, but thanks to Lua, I expect that the number of them
will be very small.

The LaTeX packages are much more problematic than the engines.  It's
much more work to check all of them, if possible at all.  It would be
more worthwhile to introduce namespaces here.  Some package authors
already made a first attempt.  Unfortunatetly there are no
instructions how a unique prefix should look like.

There had been a discussion about namespaces on the LaTeX-3 mailing
list a few years ago.  It was Hans Aberg who proposed namespaces, if I
remember correctly.  As far as I remember, he had not been able to
convince the LaTeX team.  I don't remember the details.  If you are
interested, dig out the mail archives.

In short:  I'm not against namespaces at all.  But I think they
make more sense in macro packages than in primitives.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the luatex mailing list