| 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 |
\if #1% |
| 46 |
\setmathpunctuationstyle{\mit}{\rm}% |
| 47 |
\else |
| 48 |
\setmathpunctuationstyle{\rm}{\rm}% |
| 49 |
\fi} |
| 50 |
|
| 51 |
\outer\def \Stonemathfonts {% |
| 52 |
\setmathpunctuationstyle{\rm}{\rm}} |
| 53 |
|
| 54 |
% Punctuation Style |
| 55 |
% ----------- ----- |
| 56 |
|
| 57 |
|
| 58 |
% Here we deal with the style for comma, period, semicolon, and colon. |
| 59 |
% The default punctuation style for all four is \rm. |
| 60 |
|
| 61 |
|
| 62 |
% This macro defines the math characters \zmperiod, \zmcomma, |
| 63 |
% colon, and semicolon to use the specified style. |
| 64 |
% If the style is \mit, then it's different. |
| 65 |
|
| 66 |
\def \setmathpunctuationstyle #1#2{% {\style1}{\style2} |
| 67 |
{\zmstyfam = \name{#1fam}% |
| 68 |
\if \eqlp{\zmstyfam}{\mitfam}% |
| 69 |
\definemathchar {`.} \classord \mitfam {3A} |
| 70 |
\definemathchar {`,} \classpunc \mitfam {3B} |
| 71 |
\else |
| 72 |
\definemathchar {`.} \classactive \rmfam {00} |
| 73 |
\definemathchar {`,} \classactive \rmfam {00} |
| 74 |
\definemathchar {\zmperiod} \classord \zmstyfam {2E} |
| 75 |
\definemathchar {\zmcomma} \classpunc \zmstyfam {2C} |
| 76 |
\fi |
| 77 |
\zmstyfam = \name{#2fam}% |
| 78 |
\definemathchar {`;} \classpunc \zmstyfam {3B} |
| 79 |
\definemathchar {`:} \classrel \zmstyfam {3A}}} |
| 80 |
|
| 81 |
% When period and comma are active in math, this is what they do. |
| 82 |
|
| 83 |
{ |
| 84 |
\catcode `\. = \catactive |
| 85 |
\gdef .{\mathpalette\zmactperiod{}} |
| 86 |
|
| 87 |
\catcode `\, = \catactive |
| 88 |
\gdef ,{\mathpalette\zmactcomma{}} |
| 89 |
} |
| 90 |
|
| 91 |
\def \zmactperiod #1#2{% |
| 92 |
\mathord{\hbox to .275em{\hfil $#1\zmperiod$\hfil}}} |
| 93 |
|
| 94 |
\def \zmactcomma #1#2{% |
| 95 |
\mathpunct{\hbox to .331em{\kern .045em $#1\zmcomma$\hfil}}} |
| 96 |
|
| 97 |
% Dot-Related Commands |
| 98 |
% ----------- -------- |
| 99 |
|
| 100 |
|
| 101 |
\def \cdotp {\mathpunct{\vcenter{\hbox{$.$}}}} |
| 102 |
|
| 103 |
\def \ldotp {\mathpunct{.}} |
| 104 |
|
| 105 |
\def \cdots {\mathinner{\cdotp\cdotp\cdotp}} |
| 106 |
|
| 107 |
\def \ddots {% |
| 108 |
\vbox{\baselineskip = 4pt \lineskiplimit = 0pt |
| 109 |
\hbox{.}% |
| 110 |
\hbox{\kern .4em .}% |
| 111 |
\hbox{\kern .8em .}% |
| 112 |
\vskip -.25ex}} |
| 113 |
|
| 114 |
\def \ldots {\mathinner{\ldotp\ldotp\ldotp}} |
| 115 |
|
| 116 |
\def \vdots {% |
| 117 |
\vbox{\baselineskip = 4pt \lineskiplimit = 0pt |
| 118 |
\hbox{.}% |
| 119 |
\hbox{.}% |
| 120 |
\hbox{.}% |
| 121 |
\vskip -.25ex}} |
| 122 |
|
| 123 |
% Colon Commands |
| 124 |
% ----- -------- |
| 125 |
|
| 126 |
|
| 127 |
\def \maps {\mathpunct{:}} |
| 128 |
|
| 129 |
\let \colon = \maps |