% MTMACS.TEX  VERSION 1.1.2	(1997 Nov 1)
% COPYRIGHT (C) 1992, 1993, 1996, 1997 BY TEXPLORATORS CORPORATION
% ALL RIGHTS RESERVED

% Revision notice: Official final release 1993/Aug/18
% Revision notice: Allow file names with underscores in \special 1993/Nov/14
% Revision notice: Minor correction in \Calligraphic 1996/Dec/8
% Revision notice: Changed TFM file names to lower case 1997/Nov/1

\expandafter\ifx\csname subscript character \string_\endcsname\relax
  \else\endinput\fi

\expandafter\edef\csname qqcode\string @\endcsname{\the\catcode`\"}
\expandafter\edef\csname atcode\string @\endcsname{\the\catcode`\@}
\catcode`\@=11
\catcode`\"=12   
\expandafter\ifx\csname dag@HX\endcsname\relax\def\dag@HX{B2}\fi
\expandafter\ifx\csname ddag@HX\endcsname\relax\def\ddag@HX{B3}\fi
\expandafter\ifx\csname S@HX\endcsname\relax\def\S@HX{A7}\fi
\expandafter\ifx\csname P@HX\endcsname\relax\def\P@HX{B6}\fi
\expandafter\ifx\csname bar@HX\endcsname\relax\def\bar@HX{16}\fi
\expandafter\ifx\csname grave@HX\endcsname\relax\def\grave@HX{12}\fi
\expandafter\ifx\csname acute@HX\endcsname\relax\def\acute@HX{13}\fi
\expandafter\ifx\csname check@HX\endcsname\relax\def\check@HX{14}\fi
\expandafter\ifx\csname breve@HX\endcsname\relax\def\breve@HX{15}\fi
\expandafter\ifx\csname hat@HX\endcsname\relax\def\hat@HX{5E}\fi
\expandafter\ifx\csname dot@HX\endcsname\relax\def\dot@HX{C7}\fi
\expandafter\ifx\csname tilde@HX\endcsname\relax\def\tilde@HX{7E}\fi
\expandafter\ifx\csname ddot@HX\endcsname\relax\def\ddot@HX{7F}\fi
\mathchardef\Gamma="0130
\mathchardef\Delta="0131
\mathchardef\Theta="0132
\mathchardef\Lambda="0133
\mathchardef\Xi="0134
\mathchardef\Pi="0135
\mathchardef\Sigma="0136
\mathchardef\Upsilon="0137
\mathchardef\Phi="0138
\mathchardef\Psi="0139
\mathchardef\Omega="017F
\mathchardef\varGamma="0100
\mathchardef\varDelta="0101
\mathchardef\varTheta="0102
\mathchardef\varLambda="0103
\mathchardef\varXi="0104
\mathchardef\varPi="0105
\mathchardef\varSigma="0106
\mathchardef\varUpsilon="0107
\mathchardef\varPhi="0108
\mathchardef\varPsi="0109
\mathchardef\varOmega="010A
\mathchardef\varkappa="017E
\mathcode`\(="412E
\mathcode`\)="512F
\delcode`\(="12E300
\delcode`\)="12F301
\mathcode`\.="013A
\mathcode`\,="613B
\mathchardef\ldotp="613A
\let\mit=\undefined
\ifx\amstexloaded@\relax
 \let\oldnos=\undefined
\fi
\mathchardef\triangleleft="2247
\mathchardef\triangleright="2246
\def\vec{\mathaccent"0245 }
\ifx\amstexloaded@\relax
 \def\t#1#2{{\edef\next@{\the\font}\textfontii\accent"41 \next@#1#2}}
\else
 \def\t#1{{\edef\next{\the\font}\the\textfont2\accent"41\next#1}}
\fi
\mathchardef\comp="2242
\mathcode`\+="2243
\mathcode`\=="3244
\mathchardef\Relbar="3248
\mathcode`\;="6249
\ifx\amstexloaded@\relax\else
 \def\accentclass@{7}\let\noaccents@\relax
\fi
\def\grave{\ifnum\fam=\m@ne\mathaccent"024A \else
  \mathaccent"\accentclass@0\grave@HX\relax\fi}
\def\acute{\ifnum\fam=\m@ne\mathaccent"024B \else
 \mathaccent"\accentclass@0\acute@HX\relax\fi}
\def\check{\ifnum\fam=\m@ne\mathaccent"024C \else
 \mathaccent"\accentclass@0\check@HX\relax\fi}
\def\breve{\ifnum\fam=\m@ne\mathaccent"024D \else
 \mathaccent"\accentclass@0\breve@HX\relax\fi}
\def\bar{\ifnum\fam=\m@ne\mathaccent"024E \else
 \mathaccent"\accentclass@0\bar@HX\relax\fi}
\def\hat{\ifnum\fam=\m@ne\mathaccent"024F \else
 \mathaccent"\accentclass@0\hat@HX\relax\fi}
\def\dot{\ifnum\fam=\m@ne\mathaccent"0250 \else
 \mathaccent"\accentclass@0\dot@HX\relax\fi}
\def\tilde{\ifnum\fam=\m@ne\mathaccent"0251 \else
 \mathaccent"\accentclass@0\tilde@HX\relax\fi}
\def\ddot{\ifnum\fam=\m@ne\mathaccent"0252 \else
 \mathaccent"\accentclass@0\ddot@HX\relax\fi}
\def\widebar{\mathaccent"0253 }
\mathchardef\dagger="20\dag@HX
\mathchardef\ddagger="20\ddag@HX
\ifx\amstexloaded@\relax             
 \def\dag{\ifmmode\mathchar"00\dag@HX\relax\else
   $\mathchar"00\dag@HX$\fi}
 \def\ddag{\ifmmode\mathchar"00\ddag@HX\relax\else
  $\mathchar"00\ddag@HX$\fi}
 \def\S{\ifmmode\mathchar"00\S@HX\relax\else
  $\mathchar"00\S@HX$\fi}
 \def\P{\ifmmode\mathchar"00\P@HX\relax\else
  $\mathchar"00\P@HX$\fi}
\else            
 \def\dag{\edef\next@{0\dag@HX}\expandafter\mathhexbox\next@}
 \def\ddag{\edef\next@{0\ddag@HX}\expandafter\mathhexbox\next@}
 \def\S{\edef\next@{0\S@HX}\expandafter\mathhexbox\next@}
 \def\P{\edef\next@{0\P@HX}\expandafter\mathhexbox\next@}
\fi
\def\vdots{\vbox{\baselineskip4\p@\lineskiplimit\z@
 \kern6\p@\hbox{$\m@th.$}\hbox{$\m@th.$}\hbox{$\m@th.$}}}
\def\ddots{\mathinner{\mkern1mu\raise7\p@\vbox{\kern7\p@
 \hbox{$\m@th.$}}\mkern2mu
 \raise4\p@\hbox{$\m@th.$}\mkern2mu\raise\p@\hbox{$\m@th.$}\mkern1mu}}
\def\hbar{{\mathchoice
 {\hbox{\lower.07em\hbox{$\mathchar"\bar@HX$}}}
 {\hbox{\lower.07em\hbox{$\mathchar"\bar@HX$}}}
 {\hbox{\lower.049em\hbox{$\scriptstyle\mathchar"\bar@HX$}}}
 {\hbox{\lower.035em\hbox{$\scriptscriptstyle\mathchar"\bar@HX$}}}%
  \mkern-6.3muh}}
\def\angle{{\vbox{\ialign{$\m@th\scriptstyle##$\crcr
      \not\mathrel{\mkern14mu}\crcr
      \noalign{\nointerlineskip}
      \mkern2.5mu\leaders\hrule height.48\p@\hfill\mkern2.5mu\crcr}}}}
\ifx\amstexloaded@\relax
 \def\varinjlim{\mathop{\vtop{\ialign{##\crcr
  \hfil\the\textfont\z@ lim\hfil\crcr
  \noalign{\nointerlineskip}\rightarrowfill\crcr
  \noalign{\nointerlineskip\kern-\ex@}\crcr}}}}
 \def\varprojlim{\mathop{\vtop{\ialign{##\crcr
  \hfil\the\textfont\z@ lim\hfil\crcr
  \noalign{\nointerlineskip}\leftarrowfill\crcr
  \noalign{\nointerlineskip\kern-\ex@}\crcr}}}}
 \def\varliminf{\mathop{\underline{\vrule height\z@ depth.2ex width\z@
  \hbox{\the\textfont\z@ lim}}}}
 \def\varlimsup{\mathop{\overline{\hbox{\the\textfont\z@ lim}}}}
 \def\spdot{^{\hbox{\raise\ex@\hbox{\the\textfont\z@.}}}}
 \def\spddot{^{\hbox{\raise\ex@\hbox{\the\textfont\z@..}}}}
 \def\spdddot{^{\hbox{\raise\ex@\hbox{\the\textfont\z@...}}}}
 \def\spddddot{^{\hbox{\raise\ex@\hbox{\the\textfont\z@....}}}}
\fi
\ifx\amstexloaded@\relax
 \mathchardef\dotacc"0250
 \def\dddot@#1#2{\setbox\z@\hbox{$#1#2$}\setbox\tw@\hbox{$#1\infty$}%
  \dimen@\ht\tw@\ifdim\ht\z@<\dimen@\dimen@\ht\z@\fi
  \setbox\tw@\hbox{$#1#2\mathchar"012D$}\dimen@ii\wd\tw@
  \advance\dimen@ii-\wd\z@ 
  \setbox\z@\hbox{$#1\rhook$}\advance\dimen@ii-\wd\z@
  \vbox{\offinterlineskip\ialign{\hfil$#1##$\hfil\cr
   \kern\dimen@ii\dotacc\mkern-2.5mu\dotacc\mkern-2.5mu\dotacc\cr
   \noalign{\vskip-\dimen@}#2\cr}}}
 \def\dddot{\mathpalette\dddot@}
 \def\ddddot@#1#2{\setbox\z@\hbox{$#1#2$}\setbox\tw@\hbox{$#1\infty$}%
  \dimen@\ht\tw@\ifdim\ht\z@<\dimen@\dimen@\ht\z@\fi
  \setbox\tw@\hbox{$#1#2\mathchar"012D$}\dimen@ii\wd\tw@
  \advance\dimen@ii-\wd\z@ 
  \setbox\z@\hbox{$#1\rhook$}\advance\dimen@ii-\wd\z@
  \vbox{\offinterlineskip\ialign{\hfil$#1##$\hfil\cr
   \kern\dimen@ii\dotacc\mkern-2.5mu\dotacc\mkern-2.5mu\dotacc
    \mkern-2.5mu\dotacc\cr
   \noalign{\vskip-\dimen@}#2\cr}}}
 \def\ddddot{\mathpalette\ddddot@}
\fi
\newcount\uproot@
\newcount\leftroot@
\ifx\amstexloaded@\relax\else  
 \def\nonmatherr@#1{\errmessage{\noexpand#1allowed only in math mode}}
\fi
\def\uproot#1{\relax\ifmmode\uproot@#1\relax\else\nonmatherr@\uproot\fi}
\def\leftroot#1{\relax\ifmmode\leftroot@#1\relax\else\nonmatherr@\leftroot\fi}
\def\root#1\of#2{\setbox\rootbox\hbox{$\m@th\scriptscriptstyle{#1}$}%
 \mathpalette\r@@t{#2}}
\def\r@@t#1#2{\setbox\z@\hbox{$\uproot@\z@\leftroot\z@\m@th#1\sqrt{#2}$}%
 \dimen@\ht\z@\advance\dimen@-\dp\z@
 \dimen@ii\dimen@
  \ifdim\dimen@>30\p@\advance\dimen@ii-\sixt@@n\p@\else
  \ifdim\dimen@>24\p@\advance\dimen@ii-8\p@\else
  \ifdim\dimen@>18\p@\advance\dimen@ii-6\p@\else
  \ifdim\dimen@>12\p@\advance\dimen@ii-4\p@\else
  \ifdim\dimen@>10\p@\advance\dimen@ii-\tw@\p@\fi\fi\fi\fi\fi
 \setbox\tw@\hbox{$\m@th#1\mskip\uproot@ mu$}\advance\dimen@ii by1.667\wd\tw@
 \mkern-\leftroot@ mu\mkern5mu\raise.6\dimen@ii\copy\rootbox
 \mkern-8mu\mkern\leftroot@ mu\box\z@\leftroot\z@\uproot\z@}
\def\space@.{\futurelet\space@\relax}
\space@. %
\expandafter\let\csname subscript character \string_\endcsname_
\catcode`\_=\active
\def_{\ifmmode\expandafter\sb@\else
 \expandafter\csname subscript character \string_\endcsname\fi}
\let\sb_
\ifnum\catcode`\^^A=8 \catcode`\^^A\active\let^^A_\fi
\def\sb@#1{\csname subscript character \string_\endcsname
 {\futurelet\next\sb@@#1}}
\def\sb@@{%
 \ifx\next\space@\def\next@. {\futurelet\next\sb@@}\else
  \def\next@.{%
   \ifx\next j\mkern-\tw@ mu\else
   \ifx\next f\mkern-\tw@ mu\else
   \ifx\next p\mkern-\@ne mu
   \fi\fi\fi}%
 \fi
 \next@.}
\def\jadjust{\mkern-\tw@ mu}
\ifx\laxread@\undefined\else\Nonexpanding_\fi  
\def\FONT@#1#2{\expandafter\ifx\csname#1#2\endcsname\relax
 \expandafter\expandafter\expandafter\global
  \expandafter\font\csname#1#2\endcsname=#1#2\fi
 \def\next@{\let\next@}%
 \expandafter\next@\csname#1#2\endcsname}
\def\PSZ@{\edef\nextiii@{ at \the\dimen@}}
\def\MTMI#1#2#3{%
 \dimen@#1\relax\PSZ@
 \FONT@{mtmi}\nextiii@\textfont\@ne\next@\skewchar\next@45
 \ifx\amstexloaded@\relax
  \setbox\z@\hbox{\next@\char46}%
  \ht\Mathstrutbox@\ht\z@
  \dp\Mathstrutbox@\dp\z@
  \setbox\z@\hbox{\next@ x}%
  \ex@.2326\ht\z@
 \fi
 \dimen@#2\relax\PSZ@
 \FONT@{mtmi}\nextiii@\scriptfont\@ne\next@\skewchar\next@45
 \dimen@#3\relax\PSZ@
 \FONT@{mtmi}\nextiii@\scriptscriptfont\@ne\next@\skewchar\next@45\relax}
\def\MTSY#1#2#3{%
 \dimen@#1\relax\PSZ@
 \FONT@{mtsy}\nextiii@\textfont\tw@\next@\skewchar\next@48
 \dimen@#2\relax\PSZ@
 \FONT@{mtsy}\nextiii@\scriptfont\tw@\next@\skewchar\next@48
 \dimen@#3\relax\PSZ@
 \FONT@{mtsy}\nextiii@\scriptscriptfont\tw@\next@\skewchar\next@48\relax}
\def\MTEX#1{%
 \dimen@#1\relax\PSZ@
 \FONT@{mtex}\nextiii@
 \textfont\thr@@\next@
 \scriptfont\thr@@\next@
 \scriptscriptfont\thr@@\next@
 \setbox\z@\hbox{\next@ B}\p@renwd\wd\z@
 \ifx\amstexloaded@\relax
  \buffer@\fontdimen13 \next@
  \buffer\buffer@
 \fi}
\def\SIFS@#1{\def\next@##1##2 ##3\next@{\def\nextiv@{##1##2}}%
 \edef\nextii@{\noexpand\next@#1\space\noexpand\next@}\nextii@}
\def\MathRoman#1#2#3#4{%
 \SIFS@{#1}%
 \dimen@#2\relax\PSZ@
 \FONT@\nextiv@\nextiii@\textfont\z@\next@
 \dimen@#3\relax\PSZ@
 \FONT@\nextiv@\nextiii@\scriptfont\z@\next@
 \dimen@#4\relax\PSZ@
 \FONT@\nextiv@\nextiii@\scriptscriptfont\z@\next@}
\def\MathBold#1#2#3#4{%
 \SIFS@{#1}%
 \dimen@#2\relax\PSZ@
 \FONT@\nextiv@\nextiii@\textfont\bffam\next@
 \dimen@#3\relax\PSZ@
 \FONT@\nextiv@\nextiii@\scriptfont\bffam\next@
 \dimen@#4\relax\PSZ@
 \FONT@\nextiv@\nextiii@\scriptscriptfont\bffam\next@}
\def\MathItalic#1#2#3#4{%
 \SIFS@{#1}%
 \dimen@#2\relax\PSZ@
 \FONT@\nextiv@\nextiii@\textfont\itfam\next@
 \dimen@#3\relax\PSZ@
 \FONT@\nextiv@\nextiii@\scriptfont\itfam\next@
 \dimen@#4\relax\PSZ@
 \FONT@\nextiv@\nextiii@\scriptscriptfont\itfam\next@}
%\def\MathOblique#1#2#3#4{%
% \SIFS@{#1}%
% \dimen@#2\relax\PSZ@
% \FONT@\nextiv@\nextiii@\textfont\slfam\next@
% \dimen@#3\relax\PSZ@
% \FONT@\nextiv@\nextiii@\scriptfont\slfam\next@
% \dimen@#4\relax\PSZ@
% \FONT@\nextiv@\nextiii@\scriptscriptfont\slfam\next@}
\def\alloc@@#1#2#3#4#5{\global\advance\count1#1by\@ne
 \ch@ck#1#4#2\allocationnumber=\count1#1
 \global#3#5=\allocationnumber}
\def\MathBoldItalic#1#2#3#4{%
 \ifx\bfitfam\undefined
  \alloc@@8\fam\chardef\sixt@@n\bfitfam
 \fi
 \SIFS@{#1}%
 \dimen@#2\relax\PSZ@
 \FONT@\nextiv@\nextiii@\textfont\bfitfam\next@
 \dimen@#3\relax\PSZ@
 \FONT@\nextiv@\nextiii@\scriptfont\bfitfam\next@
 \dimen@#4\relax\PSZ@
 \FONT@\nextiv@\nextiii@\scriptscriptfont\bfitfam\next@\relax
 \ifx\amstexloaded@\relax
  \def\bolditalic{\relax\ifmmode\expandafter\bolditalic@\else
   \expandafter\nonmatherr@\expandafter\bolditalic\fi}%
  \def\bolditalic@##1{{\bolditalic@@{##1}}}%
  \def\bolditalic@@##1{\fam\bfitfam\relax##1}%
  \def\textdef@@##1{\textdef@##1\rm\textdef@##1\bf\textdef@##1\sl
    \textdef@##1\it\textdef@##1\bfit}%
 \else
  \def\bfit{\fam\bfitfam}%
 \fi}
\def\Calligraphic#1#2#3{%
 \ifx\Calfam\undefined
  \alloc@@8\fam\chardef\sixt@@n\Calfam
  \ifx\amstexloaded@\relax
   \def\Cal@@##1{\noaccents@\fam\Calfam##1}%
  \else
  \def\cal{\fam\Calfam}%
  \fi
 \fi
% \SIFS@{#1}%
% \FONT@\nextiv@\empty\textfont\Calfam\next@\skewchar\next@48
 \FONT@{#1}\empty\textfont\Calfam\next@\skewchar\next@48
% \SIFS@{#2}%
% \FONT@\nextiv@\empty\scriptfont\Calfam\next@\skewchar\next@48
 \FONT@{#2}\empty\scriptfont\Calfam\next@\skewchar\next@48
% \SIFS@{#3}%
% \FONT@\nextiv@\empty\scriptscriptfont\Calfam\next@\skewchar\next@48\relax}
 \FONT@{#3}\empty\scriptscriptfont\Calfam\next@\skewchar\next@48\relax}
\def\MathPiSix#1#2#3#4{%
 \ifx\MathPiSixfam\undefined
  \alloc@@8\fam\chardef\sixt@@n\MathPiSixfam
  \ifx\amstexloaded@\relax\else
   \def\Bbb{\relax\ifmmode\expandafter\Bbb@\else
    \expandafter\nonmatherr@\expandafter\Bbb\fi}%
   \def\Bbb@##1{{\Bbb@@{##1}}}%
  \fi
 \def\Bbb@@##1{\noaccents@\fam\MathPiSixfam##1}%
 \fi
 \SIFS@{#1}%
 \dimen@#2\relax\dimen@.95\dimen@\PSZ@
 \FONT@\nextiv@\nextiii@\textfont\MathPiSixfam\next@
 \dimen@#3\relax\dimen@.95\dimen@\PSZ@
 \FONT@\nextiv@\nextiii@\scriptfont\MathPiSixfam\next@
 \dimen@#4\relax\dimen@.95\dimen@\PSZ@
 \FONT@\nextiv@\nextiii@\scriptscriptfont\MathPiSixfam\next@}
\def\MathPiTwofrak#1#2#3#4{%
 \ifx\MathPiTwofrakfam\undefined
  \alloc@@8\fam\chardef\sixt@@n\MathPiTwofrakfam
  \ifx\amstexloaded@\relax\else
   \def\frak{\relax\ifmmode\expandafter\frak@\else
    \expandafter\nonmatherr@\expandafter\frak\fi}%
   \def\frak@##1{{\frak@@{##1}}}%
   \let\goth\frak
  \fi
 \fi
 \def\frak@@##1{\fam\MathPiTwofrakfam\relax##1}%
 \SIFS@{#1}%
 \dimen@#2\relax\dimen@.88\dimen@\PSZ@
 \FONT@\nextiv@\nextiii@\textfont\MathPiTwofrakfam\next@
 \dimen@#3\relax\dimen@.88\dimen@\PSZ@
 \FONT@\nextiv@\nextiii@\scriptfont\MathPiTwofrakfam\next@
 \dimen@#4\relax\dimen@.88\dimen@\PSZ@
 \FONT@\nextiv@\nextiii@\scriptscriptfont\MathPiTwofrakfam\next@}
% \def\hexnumber@#1{\ifcase#10\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or
\def\hexnumber@#1{\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or
 9\or A\or B\or C\or D\or E\or F\fi}
\def\MathPiTwoScript#1#2#3#4{%
 \ifx\MathPiTwoScriptfam\undefined
  \alloc@@8\fam\chardef\sixt@@n\MathPiTwoScriptfam
  \edef\MathPiTwoScriptfam@{\hexnumber@\MathPiTwoScriptfam}%
  \def\Script{\relax\ifmmode\expandafter\Script@\else
   \expandafter\nonmatherr@\expandafter\Script\fi}%
  \def\Script@##1{{\Script@@{##1}}}%
  \def\Script@@##1{\noaccents@
   \count@=`##1\advance\count@-65 
   \edef\next@{\ifcase\count@21\or40\or23\or24\or25\or5E\or
         26\or2A\or28\or29\or5F\or2B\or7D\or31\or32\or33\or34\or35\or
         36\or37\or38\or39\or30\or2D\or3D\or5D\fi}%
   \mathchar"0\MathPiTwoScriptfam@\next@\relax}%
 \fi
 \SIFS@{#1}%
 \dimen@#2\relax\dimen@.95\dimen@\PSZ@
 \FONT@\nextiv@\nextiii@\textfont\MathPiTwoScriptfam\next@
 \dimen@#3\relax\dimen@.95\dimen@\PSZ@
 \FONT@\nextiv@\nextiii@\scriptfont\MathPiTwoScriptfam\next@
 \dimen@#4\relax\dimen@.95\dimen@\PSZ@
 \FONT@\nextiv@\nextiii@\scriptscriptfont\MathPiTwoScriptfam\next@}
\catcode`\"=\qqcode@
\catcode`\@=\atcode@

% Addition to allow file names with underscores in \special 93/Nov/14

\let\oldspecial=\special
\def\special{\catcode`\_=8 \morespecial}
\def\morespecial#1{\oldspecial{#1}\catcode`\_=\active}
