% mathabx.tex. Version : September 30, 2002.
% by : Anthony PHAN.
% matches the ``math'' family.
%
\catcode`@=11
%
% proofing?
%
\ifx\proofmode\undefined
	\def\symbol@message#1{\relax}%
	\def\symbol@mark#1#2{\relax}%
	\def\check@definition#1{\relax}%
\else
	\def\symbol@message#1{\medbreak{\noindent\bf #1}%
		\nobreak\smallskip\noindent\ignorespaces}%
	\def\symbolsp@cing#1{(\ifcase\number#1 ord\or op%
		\or bin\or rel\or open\or close\or punct%
		\or var\else ???\fi)}%
	\def\symbol@mark#1#2{$#1$ {\tt\string#1}\
		\symbolsp@cing{#2},\ \ignorespaces}%
	\def\check@definition#1{\ifx#1\undefined\else($#1\relax$) \fi}%
\fi
%
% Symbols declarations: \LaTeX-like commands
%
\def\hexnumber@#1{\ifcase\number#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\else F\fi}%
\def\hexnumber@@#1{{\count0=#1
	\count1=#1
	\divide\count0 by 16
	\hexnumber@\count0
	\multiply\count0 by 16
	\advance\count1 by -\count0
	\hexnumber@\count1}}%
%
\def\DeclareMathSymbol#1#2#3#4{\check@definition{#1}%
	\count255=#2\multiply\count255 by 16
	\advance\count255 by \csname#3fam\endcsname
	\multiply\count255 by 256\advance\count255 by #4
	\ifcat\noexpand#1\relax\mathchardef#1=\count255
	\else\expandafter
		\mathcode\expandafter`\csname#1\endcsname=\count255
	\fi\symbol@mark{#1}{#2}}%
%
\def\gobble@quotes#1{\ifx#1"\else#1\fi}%
%
\def\@DeclareMathDelimiter#1#2#3#4#5#6{%
	\edef#1{\noexpand\delimiter\noexpand"\gobble@quotes#2%
	\expandafter\hexnumber@\csname#3fam\endcsname\gobble@quotes#4%
	\expandafter\hexnumber@\csname#5fam\endcsname\gobble@quotes#6 }%
	\symbol@mark{#1}{#2}}%
%
\def\@xDeclareMathDelimiter#1#2#3#4#5{%
	\count255=\csname#2fam\endcsname
	\multiply\count255 by 256\advance\count255 by #3
	\multiply\count255 by 16
	\advance\count255 by \csname#4fam\endcsname
	\multiply\count255 by 256\advance\count255 by #5
	\expandafter\delcode\expandafter`\csname#1\endcsname=\count255
	\symbol@mark{#1}{8}}%
%
\def\DeclareMathDelimiter#1{\check@definition{#1}%
	\ifcat\noexpand#1\relax
	\def\Large@stuff{\noexpand\delimiter}%
	\expandafter\@DeclareMathDelimiter
	\else\expandafter\@xDeclareMathDelimiter\fi#1}%
%
\def\DeclareMathRadical#1#2#3#4#5{%\check@definition{#1}%
	\edef#1{\noexpand\radical\noexpand"%
	\expandafter\hexnumber@\csname#2fam\endcsname\gobble@quotes#3%
	\expandafter\hexnumber@\csname#4fam\endcsname\gobble@quotes#5 }%
	\symbol@mark{#1.}{8}}%
%
\def\DeclareMathAccent#1#2#3#4{%\check@definition{#1}%
        \edef#1{\noexpand\mathaccent\noexpand"%
	\expandafter\hexnumber@\csname#3fam\endcsname\gobble@quotes#4 }%
	\symbol@mark{#1.}{8}}%
%
% loading math fonts
%
\font\twelvematha=matha10 at 12pt
\font\tenmatha=matha10  \font\ninematha=matha9
\font\eightmatha=matha8 \font\sevenmatha=matha7
\font\sixmatha=matha6   \font\fivematha=matha5
\newfam\mathafam
\font\twelvemathb=mathb10 at 12pt
\font\tenmathb=mathb10  \font\ninemathb=mathb9
\font\eightmathb=mathb8 \font\sevenmathb=mathb7
\font\sixmathb=mathb6   \font\fivemathb=mathb5
\newfam\mathbfam
\font\tenmathx=mathx10
\newfam\mathxfam
%\chardef\mathxfam=4
%\let\tenex=\tenmathx
%
% Initialization
% (make changes in your own file if you want different sizes)
%
\textfont\mathafam=\tenmatha  \scriptfont\mathafam=\sevenmatha
\scriptscriptfont\mathafam=\fivematha
\textfont\mathbfam=\tenmathb  \scriptfont\mathbfam=\sevenmathb
\scriptscriptfont\mathbfam=\fivemathb
\textfont\mathxfam=\tenmathx  \scriptfont\mathxfam=\tenmathx
\scriptscriptfont\mathxfam=\tenmathx
%\def\dagesh#1{{\fam\mathbfam#1}}%
\def\mathafont{\fam\mathafam\tenmatha}%
\def\mathbfont{\fam\mathbfam\tenmathb}%
\let\mathabx@matha=\relax
\let\mathabx@mathb=\relax
\let\mathabx@mathx=\relax
\let\end@mathabx=\relax
\input mathabx.dcl
\catcode`@=12
\let\proofmode=\undefined
\endinput


