## LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

 Options: Use Classic View Use Monospaced Font Show Text Part by Default Show All Mail Headers Topic: [<< First] [< Prev] [Next >] [Last >>]

 Consistently active characters Will Robertson <[log in to unmask]> Fri, 17 Sep 2010 14:51:30 +0930 text/plain (36 lines) Hi, In, say, breqn and unicode-math, we have a need to occasionally assign meanings to characters that may or may not be active at the time they're defined. The usual method for doing this is to use the \lowercase trick with something like \def\foo{...   \lccode#1=\~   \lowercase{%     \def ~{...}   } } But this requires that ~ is naturally active; and that's not necessarily always a good assumption (well, in expl3 isn't definitely not). breqn uses a better technique: \edef\tmp{\catcode\z@=\the\catcode\z@} \catcode\z@=\active ...   as above but with ^^@ instead of ~ ... \tmp % restore catcode Do you think it would be a good addition to expl3 to formalise this sort of programming structure? I guess it would be something like \begin_active_char:n {^^@}   ... \end_active_char: which doesn't really gain us too much. What if ^^@ were *always* active as part of the expl3 syntax? Just thinking out loud, really. Comments, thoughts? -- Will