Hello,
Okay, this is weird (and long), but it gets clearer near the end:
It turned out that this bug was related to having a non-zero value for hash_extra in texmf.cnf. The current svn trunk should run OK.
To quote an old Tugboat column: "Hey, it works!" :-) However, there still is another little thing concerning \par inside \unexpanded and \detokenize inside \directlua. The following PlainTeX example: --------------------------------------------------------------------- \def\example{} \directlua0{texio.write_nl("1: \detokenize{\par}")} \directlua0{texio.write_nl("2: \unexpanded{\par}")} \directlua0{texio.write_nl("3: \par")} \directlua0{texio.write_nl("4: \luaescapestring{\detokenize{\par}}")} \directlua0{texio.write_nl("5: \luaescapestring{\unexpanded{\par}}")} \directlua0{texio.write_nl("6: \luaescapestring{\par}")} \immediate\write16{7: \detokenize{\par}} \immediate\write16{8: \unexpanded{\par}} \immediate\write16{9: \meaning\par} \directlua0{texio.write_nl("A: \detokenize{\if}")} \directlua0{texio.write_nl("B: \unexpanded{\if}")} \directlua0{texio.write_nl("C: \detokenize{\example}")} \directlua0{texio.write_nl("D: \unexpanded{\example}")} \end --------------------------------------------------------------------- results in: --------------------------------------------------------------------- luatex weird_par.tex This is LuaTeX, Version snapshot-0.20.1-2007121218 (Web2C 7.5.6) (weird_par.tex 1: par 2: 3: 4: \par 5: \par 6: \par 7: \par 8: \par 9: \par A: if B: if C: example D: example ) No pages of output. Transcript written on weird_par.log. --------------------------------------------------------------------- So the primitive \par is gobbled if inside \directlua unless is has been detokenized using \detokenize or escaped using \luaescapestring, but neither are the primitive \if nor the macro \example (the backslashes are gobbled, because Lua interprets `\p' as `p', `\i' as `i' and `\e' as `e' when inside a string [not documented, but an implementation artefact]). This only happens when inside \directlua, inside \write the result is the same. This means that if I use \directlua alone or with \unexpanded, I can have empty lines in the Lua source, since they are ignored. If I use \detokenize, however, they result in a \par and consequently a parse error (unless in a Lua string, then they result in an inserted "par "). Is this a bug? A feature? I attached my texmf.cnf ("user" overrides "base") in case this phenomenon is related to the configuration.
Best wishes, Taco
Jonathan