Debian Codegraph @

texmf-dist/tex/plain/zztex/zzmathv3.tex

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %
3 % Module: ZzTeX New Mathematics Facilities
4 %
5 % Synopsis: This file provides the mathematics facilities for "new math"
6 % version 3, which supercedes version 2.
7 %
8 % Author: Paul C. Anagnostopoulos
9 % Created: 7 June 2003
10 %
11 % Copyright 1989--2020 by Paul C. Anagnostopoulos
12 % under The MIT License (opensource.org/licenses/MIT)
13 %
14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15
16 % Math Spaces
17 % ---- ------
18
19
20 \setmathspaces{4mu plus .25mu minus .5mu}
21 {4mu plus .25mu minus .5mu}
22 {4mu plus .25mu minus .5mu}%
23
24 % Math Font Selections
25 % ---- ---- ----------
26
27
28 \outer\def \ComputerModernmathfonts {%
29 \input zzcmmath\relax
30 \setmathpunctuationstyle{\mit}{\rm}}
31
32 \outer\def \Lucidamathfonts #1{% {arrows?}
33 \setflag \zusemar = #1\relax
34 \input zzlucida\relax
35 \setmathpunctuationstyle{\mit}{\rm}}
36
37 \outer\def \MathTimefonts #1{% {text face is Times?}
38 \input zzmtime\relax
39 \if #1%
40 \setmathpunctuationstyle{\mit}{\rm}%
41 \else
42 \setmathpunctuationstyle{\rm}{\rm}%
43 \fi}
44
45 \outer\def \Stonemathfonts {%
46 \setmathpunctuationstyle{\rm}{\rm}}
47
48 % Punctuation Style
49 % ----------- -----
50
51
52 % Here we deal with the style for comma, period, semicolon, and colon.
53 % The default punctuation style for all four is \rm.
54
55
56 % This macro defines the math characters \zmperiod, \zmcomma,
57 % colon, and semicolon to use the specified style.
58 % If the style is \mit, then it's different.
59
60 \def \setmathpunctuationstyle #1#2{% {\style1}{\style2}
61 {\zmstyfam = \name{#1fam}%
62 \if \eqlp{\zmstyfam}{\mitfam}%
63 \definemathchar {`.} \classord \mitfam {3A}
64 \definemathchar {`,} \classpunc \mitfam {3B}
65 \else
66 \definemathchar {`.} \classactive \rmfam {00}
67 \definemathchar {`,} \classactive \rmfam {00}
68 \definemathchar {\zmperiod} \classord \zmstyfam {2E}
69 \definemathchar {\zmcomma} \classpunc \zmstyfam {2C}
70 \fi
71 \zmstyfam = \name{#2fam}%
72 \definemathchar {`;} \classpunc \zmstyfam {3B}
73 \definemathchar {`:} \classrel \zmstyfam {3A}}}
74
75 % When period and comma are active in math, this is what they do.
76
77 {
78 \catcode `\. = \catactive
79 \gdef .{\mathpalette\zmactperiod{}}
80
81 \catcode `\, = \catactive
82 \gdef ,{\mathpalette\zmactcomma{}}
83 }
84
85 \def \zmactperiod #1#2{%
86 \mathord{\hbox to .275em{\hfil $#1\zmperiod$\kern .06em\hfil}}}
87
88 \def \zmactcomma #1#2{%
89 \mathpunct{\hbox to .331em{\kern .045em $#1\zmcomma$\hfil}}}
90
91 % Dot-Related Commands
92 % ----------- --------
93
94
95 \def \cdotp {\mathpunct{\vcenter{\hbox{$.$}}}}
96
97 \def \ldotp {\mathpunct{.}}
98
99 \def \cdots {\mathinner{\cdotp\cdotp\cdotp}}
100
101 \def \ddots {%
102 \vbox{\baselineskip = 4pt \lineskiplimit = 0pt
103 \hbox{.}%
104 \hbox{\kern .4em .}%
105 \hbox{\kern .8em .}%
106 \vskip -.25ex}}
107
108 \def \ldots {\mathinner{\ldotp\ldotp\ldotp}}
109
110 \def \vdots {%
111 \vbox{\baselineskip = 4pt \lineskiplimit = 0pt
112 \hbox{.}%
113 \hbox{.}%
114 \hbox{.}%
115 \vskip -.25ex}}
116
117 % Colon Commands
118 % ----- --------
119
120
121 \def \maps {\mathpunct{:}}
122
123 \let \colon = \maps