% MATHCODES % The mathcodes for the letters A, ..., Z, a, ..., z are changed to % generate text italic rather than math italic by default. This makes % multi-letter identifiers look better. The mathcode for character c % is set to "7000 (variable family) + "400 (text italic) + c. % %\def\@setmcodes#1#2#3{{\count0=#1 \count1=#3 % \loop \global\mathcode\count0=\count1 \ifnum \count0<#2 % \advance\count0 by1 \advance\count1 by1 \repeat}} %\@setmcodes{`A}{`Z}{"7441} %\@setmcodes{`a}{`z}{"7461} \@ifundefined{selectfont} {} {\newmathalphabet{\textit} \addtoversion{normal}{\textit}{cmr}{m}{it} \addtoversion{bold}{\textit}{cmr}{bx}{it} \everymath{\textit} \everydisplay{\textit} } % The symbol @ is set to be active and to denote a thin space % This requires some manipulation of the category codes to make @ % temporarily an active character when the ``def'' is encountered. % This code works only in a .sty file \makeatletter \mathcode`\@="8000 \catcode`\@=13 \def @{\,} \catcode`\@=11 \makeatother