Debian Codegraph @

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

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %
3 % Module: ZzTeX New Mathematics Facilities
4 %
5 % Synopsis: This file provides the mathematics facilities for "new math"
6 % version 5.
7 %
8 % Author: Paul C. Anagnostopoulos
9 % Created: 24 September 2003
10 %
11 % Copyright 1989--2020 by Paul C. Anagnostopoulos
12 % under The MIT License (opensource.org/licenses/MIT)
13 %
14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15
16 % Document Parameters
17 % -------- ----------
18
19
20 \delimitershortfall = 2pt
21
22 % Math Spaces
23 % ---- ------
24
25
26 \setmathspaces{4mu plus .25mu minus .5mu}
27 {4mu plus .25mu minus .5mu}
28 {4mu plus .25mu minus .5mu}%
29
30 % Math Font Selections
31 % ---- ---- ----------
32
33
34 \outer\def \ComputerModernmathfonts {%
35 \input zzcmmath\relax
36 \setmathpunctuationstyle{\mit}{\rm}}
37
38 \outer\def \Lucidamathfonts #1{% {arrows?}
39 \setflag \zusemar = #1\relax
40 \input zzlucida\relax
41 \setmathpunctuationstyle{\mit}{\rm}}
42
43 \outer\def \MathTimefonts #1{% {text face is Times?}
44 \input zzmtime\relax
45 \setmathucgreekstyles{\mit}{\boldgreekunavailable}%
46 \if #1%
47 \setmathpunctuationstyle{\mit}{\rm}%
48 \else
49 \setmathpunctuationstyle{\rm}{\rm}%
50 \fi}
51
52 \outer\def \Stonemathfonts {%
53 \setmathpunctuationstyle{\rm}{\rm}}
54
55 % Greek Letter Style
56 % ----- ------ -----
57
58
59 \def \zmucgreekstyler {}
60 \def \zmucgreekstyleb {}
61
62
63 % Note the "s" at the end of the name, versus \setmathucgreekstyle.
64
65 \def \setmathucgreekstyles #1#2{% {regular-style}{bold-style}
66 \gdef \zmucgreekstyler {#1}%
67 \gdef \zmucgreekstyleb {#2}%
68 \definemathchar \Alpha \classvarfam \rmfam {41}%
69 \definemathchar \Beta \classvarfam \rmfam {42}%
70 \zdefucgreekchar \Gamma {30}%
71 \zdefucgreekchar \Delta {31}%
72 \definemathchar \Epsilon \classvarfam \rmfam {45}%
73 \definemathchar \Zeta \classvarfam \rmfam {5A}%
74 \definemathchar \Eta \classvarfam \rmfam {48}%
75 \zdefucgreekchar \Theta {32}%
76 \definemathchar \Iota \classvarfam \rmfam {49}%
77 \definemathchar \Kappa \classvarfam \rmfam {4B}%
78 \zdefucgreekchar \Lambda {33}%
79 \definemathchar \Mu \classvarfam \rmfam {4D}%
80 \definemathchar \Nu \classvarfam \rmfam {4E}%
81 \zdefucgreekchar \Xi {34}%
82 \definemathchar \Omicron \classvarfam \rmfam {4F}%
83 \zdefucgreekchar \Pi {35}%
84 \definemathchar \Rho \classvarfam \rmfam {50}%
85 \zdefucgreekchar \Sigma {36}%
86 \definemathchar \Tau \classvarfam \rmfam {54}%
87 \zdefucgreekchar \Upsilon {37}%
88 \zdefucgreekchar \Phi {38}%
89 \definemathchar \Chi \classvarfam \rmfam {58}%
90 \zdefucgreekchar \Psi {39}%
91 \zdefucgreekchar \Omega {7F}}
92
93 \def \zdefucgreekchar #1#2{% {\name}{code}
94 \gdef #1{%
95 \if \eqlp{\fam}{-1}%
96 {\zmucgreekstyler \mathchar "70#2}%
97 \else\if \eqlp{\fam}{\bffam}%
98 {\zmucgreekstyleb \mathchar "70#2}%
99 \else
100 \error{invgrkstyle}{The current math family precludes using bold Greek}%
101 \fi\fi}}
102
103 % Punctuation Style
104 % ----------- -----
105
106
107 % Here we deal with the style for comma, period, semicolon, and colon.
108 % The default punctuation style for all four is \rm.
109
110
111 % This macro defines the math characters \zmperiod, \zmcomma,
112 % colon, and semicolon to use the specified style.
113 % If the style is \mit, then it's different.
114
115 \def \setmathpunctuationstyle #1#2{% {\style1}{\style2}
116 {\zmstyfam = \name{#1fam}%
117 \if \eqlp{\zmstyfam}{\mitfam}%
118 \definemathchar {`.} \classord \mitfam {3A}%
119 \definemathchar {`,} \classpunc \mitfam {3B}%
120 \else
121 \definemathchar {`.} \classactive \rmfam {00}%
122 \definemathchar {`,} \classactive \rmfam {00}%
123 \definemathchar {\zmperiod} \classord \zmstyfam {2E}%
124 \definemathchar {\zmcomma} \classpunc \zmstyfam {2C}%
125 \fi
126 \zmstyfam = \name{#2fam}%
127 \definemathchar {`;} \classpunc \zmstyfam {3B}%
128 \definemathchar {`:} \classrel \zmstyfam {3A}}}
129
130 % When period and comma are active in math, this is what they do.
131
132 {
133 \catcode `\. = \catactive
134 \gdef .{\mathpalette\zmactperiod{}}
135
136 \catcode `\, = \catactive
137 \gdef ,{\mathpalette\zmactcomma{}}
138 }
139
140 \def \zmactperiod #1#2{%
141 \mathord{\hbox to .275em{\hfil $#1\zmperiod$\hfil}}}
142
143 \def \zmactcomma #1#2{%
144 \mathpunct{\hbox to .331em{\kern .045em $#1\zmcomma$\hfil}}}
145
146 % Dot-Related Commands
147 % ----------- --------
148
149
150 \def \cdot {\mathbin{\vcenter{\hbox{$.$}}}}
151
152 \def \cdotp {\mathpunct{\vcenter{\hbox{$.$}}}}
153
154 \def \ldotp {\mathpunct{.}}
155
156 \def \cdots {\mathinner{\cdotp\cdotp\cdotp}}
157
158 \def \ddots {%
159 \vbox{\baselineskip = 4pt \lineskiplimit = 0pt
160 \hbox{.}%
161 \hbox{\kern .4em .}%
162 \hbox{\kern .8em .}%
163 \vskip -.25ex}}
164
165 \def \ldots {\mathinner{\ldotp\ldotp\ldotp}}
166
167 \def \vdots {%
168 \vbox{\baselineskip = 4pt \lineskiplimit = 0pt
169 \hbox{.}%
170 \hbox{.}%
171 \hbox{.}%
172 \vskip -.25ex}}
173
174 % Colon Commands
175 % ----- --------
176
177
178 \def \maps {\mathpunct{:}}
179
180 \let \colon = \maps