summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/plain/zztex/zzmathv6.tex
blob: c47f22ae2dd4a386a9a295d5e2e7591307c261e8 (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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Module:    ZzTeX New Mathematics Facilities
%
% Synopsis:  This file provides the mathematics facilities for "new math"
%            version 5.
%
% Author:    Paul C. Anagnostopoulos
% Created:   24 September 2003
%
% Copyright 1989--2020 by Paul C. Anagnostopoulos
% under The MIT License (opensource.org/licenses/MIT)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%                       Document Parameters
%                       -------- ----------


\delimitershortfall = 2pt

%                       Math Spaces
%                       ---- ------


\setmathspaces{4mu plus .25mu minus .5mu}
              {4mu plus .25mu minus .5mu}
              {4mu plus .25mu minus .5mu}%

%                       Math Font Selections
%                       ---- ---- ----------


\outer\def \ComputerModernmathfonts {%
  \input zzcmmath\relax
  \setmathpunctuationstyle{\mit}{\rm}}

\outer\def \Lucidamathfonts #1{%                        {arrows?}
  \setflag \zusemar = #1\relax
  \input zzlucida\relax
  \setmathpunctuationstyle{\mit}{\rm}}

\outer\def \MathTimefonts #1{%                          {text face is Times?}
  \input zzmtime\relax
  \setmathucgreekstyles{\mit}{\boldgreekunavailable}%
  \if #1%
    \setmathpunctuationstyle{\mit}{\rm}%
  \else
    \setmathpunctuationstyle{\rm}{\rm}%
  \fi}

\outer\def \Stonemathfonts {%
  \setmathpunctuationstyle{\rm}{\rm}}

%                       Greek Letter Style
%                       ----- ------ -----


\def \zmucgreekstyler {}
\def \zmucgreekstyleb {}


% Note the "s" at the end of the name, versus \setmathucgreekstyle.

\def \setmathucgreekstyles #1#2{%               {regular-style}{bold-style}
  \gdef \zmucgreekstyler {#1}%
  \gdef \zmucgreekstyleb {#2}%
\definemathchar  \Alpha   \classvarfam \rmfam {41}%
\definemathchar  \Beta    \classvarfam \rmfam {42}%
\zdefucgreekchar \Gamma                       {30}%
\zdefucgreekchar \Delta                       {31}%
\definemathchar  \Epsilon \classvarfam \rmfam {45}%
\definemathchar  \Zeta    \classvarfam \rmfam {5A}%
\definemathchar  \Eta     \classvarfam \rmfam {48}%
\zdefucgreekchar \Theta                       {32}%
\definemathchar  \Iota    \classvarfam \rmfam {49}%
\definemathchar  \Kappa   \classvarfam \rmfam {4B}%
\zdefucgreekchar \Lambda                      {33}%
\definemathchar  \Mu      \classvarfam \rmfam {4D}%
\definemathchar  \Nu      \classvarfam \rmfam {4E}%
\zdefucgreekchar \Xi                          {34}%
\definemathchar  \Omicron \classvarfam \rmfam {4F}%
\zdefucgreekchar \Pi                          {35}%
\definemathchar  \Rho     \classvarfam \rmfam {50}%
\zdefucgreekchar \Sigma                       {36}%
\definemathchar  \Tau     \classvarfam \rmfam {54}%
\zdefucgreekchar \Upsilon                     {37}%
\zdefucgreekchar \Phi                         {38}%
\definemathchar  \Chi     \classvarfam \rmfam {58}%
\zdefucgreekchar \Psi                         {39}%
\zdefucgreekchar \Omega                       {7F}}

\def \zdefucgreekchar #1#2{%                            {\name}{code}
  \gdef #1{%
    \if \eqlp{\fam}{-1}%
      {\zmucgreekstyler \mathchar "70#2}%
    \else\if \eqlp{\fam}{\bffam}%
      {\zmucgreekstyleb \mathchar "70#2}%
    \else
      \error{invgrkstyle}{The current math family precludes using bold Greek}%
    \fi\fi}}

%                       Punctuation Style
%                       ----------- -----


% Here we deal with the style for comma, period, semicolon, and colon.
% The default punctuation style for all four is \rm.


% This macro defines the math characters \zmperiod, \zmcomma,
% colon, and semicolon to use the specified style.
% If the style is \mit, then it's different.

\def \setmathpunctuationstyle #1#2{%                    {\style1}{\style2}
  {\zmstyfam = \name{#1fam}%
   \if \eqlp{\zmstyfam}{\mitfam}%
     \definemathchar {`.} \classord  \mitfam {3A}%
     \definemathchar {`,} \classpunc \mitfam {3B}%
   \else
     \definemathchar {`.} \classactive \rmfam {00}%
     \definemathchar {`,} \classactive \rmfam {00}%
     \definemathchar {\zmperiod} \classord  \zmstyfam {2E}%
     \definemathchar {\zmcomma}  \classpunc \zmstyfam {2C}%
   \fi
   \zmstyfam = \name{#2fam}%
   \definemathchar {`;} \classpunc \zmstyfam {3B}%
   \definemathchar {`:} \classrel  \zmstyfam {3A}}}

% When period and comma are active in math, this is what they do.

{
\catcode `\. = \catactive
\gdef .{\mathpalette\zmactperiod{}}

\catcode `\, = \catactive
\gdef ,{\mathpalette\zmactcomma{}}
}

\def \zmactperiod #1#2{%
  \mathord{\hbox to .275em{\hfil $#1\zmperiod$\hfil}}}

\def \zmactcomma #1#2{%
  \mathpunct{\hbox to .331em{\kern .045em $#1\zmcomma$\hfil}}}

%                       Dot-Related Commands
%                       ----------- --------


\def \cdot {\mathbin{\vcenter{\hbox{$.$}}}}

\def \cdotp {\mathpunct{\vcenter{\hbox{$.$}}}}

\def \ldotp {\mathpunct{.}}

\def \cdots {\mathinner{\cdotp\cdotp\cdotp}}

\def \ddots {%
  \vbox{\baselineskip = 4pt \lineskiplimit = 0pt
        \hbox{.}%
        \hbox{\kern .4em .}%
        \hbox{\kern .8em .}%
        \vskip -.25ex}}

\def \ldots {\mathinner{\ldotp\ldotp\ldotp}}

\def \vdots {%
  \vbox{\baselineskip = 4pt \lineskiplimit = 0pt
        \hbox{.}%
        \hbox{.}%
        \hbox{.}%
        \vskip -.25ex}}

%                       Colon Commands
%                       ----- --------


\def \maps {\mathpunct{:}}

\let \colon = \maps