11
votes
1answer
108 views

Replacing # characters with luatex

The minimal example below should replace all # characters with another symbol. This works well if I use \# to escape it, but the user should later be able to enter it directly, e.g. to enter hash ...
4
votes
1answer
112 views

\scantokens in LuaTeX

The eTeX \scantokens command appears to work differently in LuaTeX than it does in eTeX, pdfTeX and XeTeX. Compiling the following test file with any engine other than LuaTeX performs \show+, which ...
4
votes
3answers
203 views

Automatically fixing catcode output

Using the following macro to redefine catcodes for lua blocks to make programming lua inside tex files more natural has a fault: \def\lua{% \bgroup \catcode`\\=12 \catcode`\{=12 ...