[Dev-luatex] Example: Sorting in LuaTeX

Jonathan Sauer Jonathan.Sauer at silverstroke.com
Wed Aug 15 12:53:28 CEST 2007


> > yesterday I experimented a little with \directlua, and I decided to 
> > code a sorting routine, since sorting in TeX (as i.e. 
> > implemented in the experimental LaTeX 3 code or in Bernd
> > Raichle's paper "Sorting in TeX's mouth") is quite slow.
> Yes, excellent example and nicely emphasizing my comment 
> during Taco's talk in San Diego: "Doing [list processing] in 
> TeX is great for your ego,

I concur. It is a great feeling when you finally found an
elegant (well, relatively elegant, we're talking about TeX's
macro language) way of implementing a macro.

BTW: Is there a transcript of the video available? The video
itself is a little bit too large for me (and possibly others)
to download. Also, I find it easier to read a text than to
listen to a talk. Faster, too.

> but..."

No buts! ;-)

> > In any case: Imagine the possibilities when using Lua not only for 
> > manipulating the node list, but also for parsing user input!
> Using lua to parse user input is convenient, think of key=val 
> processing which is currently jumping through hoops to remove 
> spaces and the correct number of braces etc.

Yes, but until LuaTeX is out of beta and widespread, it will be
necessary to keep an implementation in TeX. So unless it really
speeds things up, or makes better error handling possible, I do
not see much use in parsing user input in Lua.

Or am I forgetting something?


More information about the dev-luatex mailing list