m-oldmath.mkxl /size: 4130 b    last modification: 2024-01-16 10:22
1%D \module
2%D   [       file=m-oldmath,
3%D        version=2022.06.17,
4%D          title=Math,
5%D       subtitle=Fallback to old stuff,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is therefore copyrighted
11%D by \PRAGMA. See mreadme.pdf for details.
12
13%D For the \type {\over} die|-|hards (for this occasion I checked out Outlaw Vern's
14%D updated review on that movie):
15
16\unprotect
17
18\mathgroupingmode \zerocount
19
20\ifdefined\eqalign \else
21
22    \permanent\protected\def\eqalign#1% rather plain, is this used at all ...
23      {\dontleavehmode
24       \mskip\thinmuskip\vcenter\bgroup % \vcenter \s!class \mathwrappercode \bgroup
25         \mathsurround\zeropoint        % \math_eqalign_set_defaults
26         \ialign
27           {\strut
28            \hfil
29            \mathbeginclass\mathordcode
30            \mathendclass  \mathordcode
31            \startforceddisplaymath\aligncontent\stopforceddisplaymath
32            \aligntab
33            \mathbeginclass\mathordcode
34            \mathendclass  \mathordcode
35            \startforceddisplaymath\aligncontent\stopforceddisplaymath
36            \hfil
37            \crcr
38            #1%
39            \crcr}%
40       \egroup\mskip\thinmuskip}        % \egroup
41
42\fi
43
44%D Obsolete:
45
46% \permanent\protected\def\displaylines#1%
47%   {\the\mathdisplayaligntweaks
48%    \tabskip\zeroskip
49%    \halign
50%      {\hbox to \displaywidth{%
51%         \normalstartimath\tabskip\zeroskip\everycr\emptytoks\hfil\displaystyle\alignmark\alignmark\hfil\normalstopimath}\crcr
52%         #1\crcr}}
53
54%D no longer defined:
55
56% \permanent\def\ialign % initialized \halign, to be used grouped!
57%   {\everycr\emptytoks
58%    \tabskip\zeroskip
59%    \halign}
60%
61% \permanent\def\oalign#1%
62%   {\leavevmode % plain tex uses this
63%    \vtop
64%      {\baselineskip\zeroskip
65%       \lineskip.25\exheight
66%       \ialign{\alignmark\alignmark\crcr#1\crcr}}}
67%
68% \permanent\def\ooalign % chars over each other
69%   {\lineskiplimit-\maxdimen
70%    \oalign}
71
72%D More old plain stuff:
73
74\permanent\protected\def\buildrel#1\over#2%
75  {\mathrel{\mathop{\kern\zeropoint#2}\limits^{#1}}}
76
77\permanent\protected\def\math_openup
78  {\afterassignment\math_openup_indeed\scratchdimen}
79
80\aliased\let\math_closeup\relax
81
82\def\math_openup_indeed
83  {\enforced\permanent\protected\edef\math_closeup
84     {\lineskip     \the\lineskip
85      \baselineskip \the\baselineskip
86      \lineskiplimit\the\lineskiplimit
87      \relax}%
88   \advanceby\lineskip     \scratchdimen
89   \advanceby\baselineskip \scratchdimen
90   \advanceby\lineskiplimit\scratchdimen}
91
92\permanent\protected\def\openup {\math_openup } % the low level ones are used elsewhere
93\permanent\protected\def\closeup{\math_closeup} % the low level ones are used elsewhere
94
95%D Who knows:
96
97\permanent\protected\def\choose{\atopwithdelims()} % used in korean test file, has to go
98\permanent\protected\def\brack {\atopwithdelims[]}
99\permanent\protected\def\brace {\atopwithdelims\{\}}
100
101%D We have better ways:
102
103\permanent\protected\def\cases#1%
104  {\left\{%
105   \mskip\thinmuskip
106   \vcenter
107     {\normalbaselines
108      \mathsurround\zeropoint
109      \ialign{%
110        \normalstartimath\alignmark\alignmark\hfil\normalstopimath
111        \aligntab
112        \quad\alignmark\alignmark\hfil
113        \crcr
114        #1%
115        \crcr}}%
116   \right.}
117
118\permanent\protected\def\matrix#1%
119  {\emptyhbox
120   \mskip\thinmuskip
121   \vcenter
122     {\normalbaselines
123      \mathsurround\zeropoint
124      \ialign{%
125        \hfil\normalstartimath\alignmark\alignmark\normalstopimath\hfil
126        \aligntab
127        \aligntab
128        \quad\hfil\normalstartimath\alignmark\alignmark\normalstopimath\hfil
129        \crcr
130        \mathstrut
131        \crcr
132        \noalign{\kern-\baselineskip}
133        #1\crcr
134        \mathstrut
135        \crcr
136        \noalign{\kern-\baselineskip}}}%
137   \mskip\thinmuskip}
138
139\permanent\protected\def\pmatrix#1%
140  {\left(\matrix{#1}\right)}
141
142\permanent\protected\def\root#1\of% #2%
143 %{\rootradical{#1}} % {#2}
144  {\Uradical \zerocount "221A{#1}} % {#2}
145
146\protect
147
148\endinput
149