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

Aditya Mahajan adityam at umich.edu
Sat Feb 3 02:35:27 CET 2007


On Fri, 2 Feb 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

Another one: Nath defines \stackrel and \underset. I think that these 
should go to the core

\def\stackrel#1#2{\mathrel{\mathop{#2}\limits^{#1}}}

See the note below:

\def\overset#1#2{\mathrel{\mathop{#2}\limits^{#1}}}
\def\underset#1#2{\mathrel{\mathop{#2}\limits_{#1}}}



amsmath.sty goes into a lot of pains to define overset and underset, 
basically to decide whether to use mathrel or mathbin in the above. Do 
we need such an elaborate definition? This is amsmath's definition:


\def\binrel@#1{\begingroup
   \setboxz at h{\thinmuskip0mu
     \medmuskip\m at ne mu\thickmuskip\@ne mu
     \setbox\tw@\hbox{$#1\m at th$}\kern-\wd\tw@
     ${}#1{}\m at th$}%
   \edef\@tempa{\endgroup\let\noexpand\binrel@@
     \ifdim\wdz@<\z@ \mathbin
     \else\ifdim\wdz@>\z@ \mathrel
     \else \relax\fi\fi}%
   \@tempa
}

\newcommand{\overset}[2]{\binrel@{#2}%
   \binrel@@{\mathop{\kern\z@#2}\limits^{#1}}}
\newcommand{\underset}[2]{\binrel@{#2}%
   \binrel@@{\mathop{\kern\z@#2}\limits_{#1}}}


Aditya





More information about the dev-context mailing list