summaryrefslogtreecommitdiff
path: root/fonts/mathabx/texinputs/mathabx.tex
blob: 6ad0c8abb75e815c35ed0f828c50123394d45c8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% mathabx.tex. Version: May 18, 2005.
% Author: Anthony PHAN.
% matches the ``mathabx'' family.
% plain-TeX input file
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\ifx\mathabxversion\undefined\else\endinput\fi
\def\mathabxversion{January 28, 2004}%
%
\catcode`@=11
%
% proofing?
%

\ifx\proofmode\undefined
	\def\symbol@message#1{\relax}%
	\def\symbol@mark#1#2{\relax}%
	\def\check@definition#1{\relax}%
	\def\mathabx@undefine#1{\let#1=\undefined}%
	\def\mathabx@aliases#1#2{\@mathabx@aliases#1#2?\@end}
	\def\@mathabx@aliases#1#2#3\@end{\ifx#2?\else
		\let#2=#1\@mathabx@aliases#1#3\@end\fi}%
\else
	\def\symbol@message#1{\vskip\z@ plus\baselineskip
		\penalty-250\vskip\z@ plus-\baselineskip
		\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 other\fi}%
	\def\symbol@mark#1#2{\allowbreak
		\hbox to 0.05\hsize{$#1$\hss}%
		\hbox to 0.05\hsize{\unhbox0\hss}%
		\hbox to 0.4001\hsize{{\tt\string#1}%
		$^{\rm\symbolsp@cing{#2}}$\hfil}%
		\ignorespaces}%
	\def\check@definition#1{\ifx#1\undefined
		\setbox0\hbox{}%
		\else\setbox0=\hbox{$#1\relax$}\fi}%
	\def\mathabx@undefine#1{}%
	\def\mathabx@aliases#1#2{\setbox0=\lastbox
		\@mathabx@aliases#1#2?\@end
		\ifdim\wd0>0.4\hsize\hbox to 0.9001\hsize{\unhbox0\hfill}%
		\else\hbox to 0.4001\hsize{\unhbox0\hfill}\fi}%
	\def\@mathabx@aliases#1#2#3\@end{\ifx#2?\else
		\let#2=#1%
		\setbox0=\hbox{\unhbox0, \tt\string#2}%
		\@mathabx@aliases#1#3\@end\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