[NTG-context] Bad interaction between new interpretation of underscore and modules

Mathieu Boespflug 0xbadcode at gmail.com
Thu Jan 13 17:18:29 CET 2011


Hi all,

today's beta introduced a really strange problem. Consider two source files:

definitions.tex:
\startmodule[definitions]
\def\lambdax{\lambda_x}
\stopmodule[definitions]

main.tex:
\usemodule[definitions]
\starttext
blah $\lambdax$ blah.
\stoptext

This results in the following compile error:

! Undefined control sequence.
\lambdax ->\lambda_x

l.5 blah $\lambdax
                  $ blah.
?

However, if you change "\usemodule[definitions]" into "\input
definitions" instead, then there is no compile error! My understanding
is that the underscore is a valid character for macro names now
outside of math mode, which is what is causing the problem. But I
really don't understand what magic is going on in the modules code to
trigger this.

I would be very interested in an explanation of what is going on.

Many thanks,

Mathieu


More information about the ntg-context mailing list