[Dev-luatex] .BEILMOPS or how I stopped worrying and love Open Source
Jonathan.Sauer at silverstroke.com
Wed Dec 12 10:15:58 CET 2007
> >> when using lpeg an dmatching, keep in mind that \unexpanded has the
> >> side effect of introducing spaces
> > Oh. I used \unexpanded, because sometime someone on this mailing
> > noted that it was faster than \detokenize.
> Should make no difference, I guess. \detokenize should
> introduce the same spaces, using the same algorithm.
Well, currently it makes a difference, three actually:
1. \unexpanded introduces "IMPOSSIBLE."
2. \unexpanded introduces spaces after control sequences.
3. \unexpanded ignores \par's, while \detokenize does not. So empty
lines in \directlua are no problem with \unexpanded, but result
in a (Lua) parse error when \detokenize is used.
At least in the context of \directlua.
Also, in terms of speed: \unexpanded only marks all tokens as
unexpandable, while \detokenize creates new character tokens. So the
latter should be somewhat slower.
> >> btw, if you change \unexpanded by \detokenize you get the desired
> >> result
> > I know.
> Oops. Why would that be?
Because of a bug? :-)
> David Kastrup, Kriemhildstr. 15, 44793 Bochum
More information about the dev-luatex