[dev-context] \rm in pmod, bmod, etc

Taco Hoekwater taco at elvenkind.com
Sat Feb 3 09:06:02 CET 2007

Aditya Mahajan wrote:
> On Fri, 2 Feb 2007, Aditya Mahajan wrote:
>>Hi Hans and Taco,
>> Do you think it makes sense to replace {\rm mod} in the definition of
>>bmod and pmod (in math-pln.tex) by \mfunction{mod}?
> Another request: I am thinking of updating the nath module, and I 
> notice that nath.sty goes into considerable length to make math 
> commands "robust" (whatever that means). Basically
> \def\makerobust#1{%
>   \expandafter\let\csname @o@\expandafter\gobbleoneargument\string #1\endcsname=#1
>   \unexpanded\def#1{\csname @o@\expandafter\gobbleoneargument\string #1\endcsname}}
> % Making composed math symbols robust:
> \makerobust\cong
> \makerobust\notin
> If I understand correctly, this can be achieved by replace
> \def\cong to \undexpanded\def\cong in math-pln.

The \makerobust command is simply

    \let\@o at cong=\cong
    \unexpanded\def\cont{\@o at cong}

> I do not understand expansion very well, but is there a disadvantage 
> of not defining math characters to be unexpandable to begin with?

Every (or almost every, let's be a bit careful) macro in math mode
could be make unexpandable.


More information about the dev-context mailing list