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

Taco Hoekwater taco at elvenkind.com
Sat Feb 3 10:37:05 CET 2007



It is cleaner when renamed a little:

Taco Hoekwater wrote:
> 
> \def\binrel@#1%
   \def\preparebinrel#1%
>    {\begingroup
>     \setbox0=\hbox
>        {\thinmuskip 0mu
>         \medmuskip -1mu
>         \thickmuskip -1mu
>         \setbox2=\hbox{$#1\mathsurround0pt$}%
>         \kern -wd2
>         ${}#1{}\mathsurround0pt$}%
>     \edef\@tempa
>       {\endgroup
>        \let\noexpand\binrel@@
          \let\noexpand\currentbinrel
>        \ifdim\wd0<0pt
>          \mathbin
>        \else \ifdim\wd0>\z@
>           \mathrel
>        \else
>           \relax
>        \fi\fi }%
>     \@tempa  }

And:

\unexpanded\def\overset#1#2%
    {\preparebinrel{#2}%
     \currentbinrel{\mathop{\kern\z@#2}\limits^{#1}}}

Best, Taco




More information about the dev-context mailing list