Debian Codegraph @

texmf-dist/tex/generic/tex4ht/amsmath.4ht

raw
1 % amsmath.4ht (2025-12-11-13:10), generated from tex4ht-4ht.tex
2 % Copyright 1997-2009 Eitan M. Gurari
3 % Copyright 2009-2025 TeX Users Group
4 %
5 % This work may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License, either
7 % version 1.3c of this license or (at your option) any
8 % later version. The latest version of this license is in
9 % https://www.latex-project.org/lppl.txt
10 % and version 1.3c or later is part of all distributions
11 % of LaTeX version 2005/12/01 or later.
12 %
13 % This work has the LPPL maintenance status "maintained".
14 %
15 % The Current Maintainer of this work
16 % is the TeX4ht Project <https://tug.org/tex4ht>.
17 %
18 % If you modify this program, changing the
19 % version identification would be appreciated.
20 \immediate\write-1{version 2025-12-11-13:10}
21
22 \HRestore\cases
23 \HRestore\matrix
24 \HRestore\pmatrix
25 \append:def\a:display{\@displaytrue}
26 \expandafter\append:defIII\csname
27 c:$$:\endcsname{\append:def\a:display{\@displaytrue}}
28
29
30
31 \def\above:tbinom#1#2#3#4{\a:tbinom}
32 \def\:temp{%
33 \expandafter \ifx\csname a:tbinom\endcsname\relax \else
34 \ifx\a:tbinom\empty \else
35 \Configure{abovewithdelims}{\above:tbinom}{}%
36 \fi\fi
37 \o:tbinom:}
38 \HLet\tbinom\:temp
39 \NewConfigure{tbinom}{1}
40 \def\above:dbinom#1#2#3#4{\a:dbinom}
41 \def\:temp{%
42 \expandafter \ifx\csname a:dbinom\endcsname\relax \else
43 \ifx\a:dbinom\empty \else
44 \Configure{abovewithdelims}{\above:dbinom}{}%
45 \fi\fi
46 \o:dbinom:}
47 \HLet\dbinom\:temp
48 \NewConfigure{dbinom}{1}
49 \def\above:binom#1#2#3#4{\a:binom}
50 \def\:temp#1{%
51 \def\:temp{%
52 \expandafter \ifx\csname a:binom\endcsname\relax \else
53 \ifx\a:binom\empty \else
54 \Configure{abovewithdelims}{\above:binom}{}%
55 \fi\fi
56 #1}}
57 \expandafter\:temp\expandafter{\csname o:binom :\endcsname}
58 \expandafter\HLet\csname binom \endcsname\:temp
59 \NewConfigure{binom}{1}
60 \pend:def\subequations{\SkipRefstepAnchor }
61 \NewConfigure{boldsymbol}{2}
62 \pend:defI\boldsymbol{\a:boldsymbol}
63 \append:defI\boldsymbol{\b:boldsymbol}
64 \def\hdots@for#1#2{\multicolumn{#2}c%
65 {\m@th \hdots:for{#1}\hfil}}
66 \def\hdots:for#1{\[email protected]\mkern-#1\dotsspace@
67 \xleaders\hbox{$\m@th\mkern#1\dotsspace@.\mkern#1\dotsspace@$}%
68 \hfill
69 \mkern-#1\dotsspace@}
70 \NewConfigure{hdotsfor}[1]{\def\a:hdotsfor##1{#1}}
71 \let\a:hdotsfor=\hdots:for
72 \def\:tempc{\a:hdotsfor}
73 \HLet\hdots:for\:tempc
74 \expandafter\ifx \csname tmp:muskip\endcsname\relax
75 \csname newmuskip\endcsname \tmp:muskip
76 \fi
77 \expandafter\def\csname tmspace \endcsname#1#2#3{%
78 \ifmmode
79 \bgroup
80 \tmp:muskip #1#2\edef\mathglue{\the\tmp:muskip}%
81 \tmp:dim #1#3\edef\textspace{\the\tmp:dim}\a:tmspace
82 \egroup
83 \else \kern #1#3\fi \relax
84 }
85 \edef\:tempc{\noexpand\protect
86 \expandafter\noexpand\csname tmspace \endcsname}
87 \HLet\tmspace=\:tempc
88 \NewConfigure{tmspace}{1}
89 \Configure{tmspace}{\mskip\mathglue}
90 \HRestore\over
91 \def\:tempc{\pic:gobble\a:over \o:@@over: \pic:gobble\b:over}
92 \HLet\@@over\:tempc
93 \HRestore\atop
94 \def\:tempc{\pic:gobble\a:atop \o:@@atop: \pic:gobble\b:atop}
95 \HLet\@@atop\:tempc
96 \def\::above{\pic:gobble\a:above \o:@@above:\tmp:dim
97 \pic:gobble\b:above }
98 \def\:above{\afterassignment\::above}
99 \def\:tempc{\Protect\:above \tmp:dim=}
100 \HLet\@@above\:tempc
101 \HRestore\abovewithdelims
102 \def\::abovewithdelims#1#2{\pic:gobble\a:abovewithdelims
103 \o:@@abovewithdelims:#1#2\tmp:dim\pic:gobble\b:abovewithdelims}
104 \def\:abovewithdelims#1#2{\def\:temp{\::abovewithdelims#1#2}%
105 \afterassignment\:temp\tmp:dim}
106 \def\:tempc{\Protect\:abovewithdelims }
107 \HLet\@@abovewithdelims\:tempc
108 \NewConfigure{abovewithdelims}{2}
109 \HRestore\overwithdelims
110 \def\:overwithdelims#1#2{\pic:gobble\a:overwithdelims
111 \o:@@overwithdelims:#1#2\pic:gobble\b:overwithdelims}
112 \def\:tempc{\Protect\:overwithdelims}
113 \HLet\@@overwithdelims\:tempc
114 \NewConfigure{overwithdelims}{2}
115 \HRestore\atopwithdelims
116 \def\:atopwithdelims#1#2{\pic:gobble\a:atopwithdelims
117 \o:@@atopwithdelims:#1#2\pic:gobble\b:atopwithdelims}
118 \def\:tempc{\Protect\:atopwithdelims}
119 \HLet\@@atopwithdelims\:tempc
120 \NewConfigure{atopwithdelims}{2}
121 \let\ltx@label\lb:l
122 \let\Mathaccent:\mathaccent@
123 \def\mathaccent@#1#2{\ifx \EndPicture\:UnDef
124 \DN@{\Picture+{}\Mathaccent:{#1}{#2}\EndPicture}%
125 \else\DN@{\Mathaccent:{#1}{#2}}\fi\next@}
126 \def\:temp#1{{\a:boxed\leavevmode
127 \vbox{\m@th$\displaystyle#1$}\b:boxed}}
128 \HLet\boxed\:temp
129 \NewConfigure{boxed}{2}
130 \newcommand\:temp:xrightarrow[2][]{\a:xrightarrow {\o:xrightarrow:[#1]{#2}}\b:xrightarrow}
131 \HLet\xrightarrow\:temp:xrightarrow
132 \NewConfigure{xrightarrow}{2}
133 \newcommand\:temp:xleftarrow[2][]{\a:xleftarrow {\o:xleftarrow:[#1]{#2}}\b:xleftarrow}
134 \HLet\xleftarrow\:temp:xleftarrow
135 \NewConfigure{xleftarrow}{2}
136 \def\:amsmathrobust#1{\def#1{\protect#1}}
137 \Configure{writetoc}{
138 \:amsmathrobust\prod
139 \:amsmathrobust\coprod
140 \:amsmathrobust\bigvee
141 \:amsmathrobust\bigwedge
142 \:amsmathrobust\biguplus
143 \:amsmathrobust\bigcap
144 \:amsmathrobust\bigcup
145 \:amsmathrobust\prod
146 \:amsmathrobust\sum
147 \:amsmathrobust\bigotimes
148 \:amsmathrobust\bigoplus
149 \:amsmathrobust\bigodot
150 \:amsmathrobust\bigsqcup
151 }
152 \def\:tempc#1{\a:eqref\o:eqref:{#1}\b:eqref}
153 \NewConfigure{eqref}{2}
154
155 \def\equation{\bgroup \@fleqnfalse
156 %
157 \ifx \EndPicture\:Undef
158 \def\endequation{%
159 \let\tagform@=\:gobble
160 \if@eqnsw \expand:after{%
161 %
162 \o:endequation:\b:equation\equ:no}%
163 \else \expand:after{%
164 \ifx\df@tag\@empty \expand:after{\o:endequation:\egroup}%
165 \else
166 \global\let\df:tag=\df@tag
167 \expand:after{\o:endequation: \expandafter\b:equation\ifdefined\ams:delete:tag\else\df:tag\fi%
168 \global\let\ams:delete:tag\@undefined
169 }\fi
170 }\fi
171 \c:equation\egroup
172 }%
173 \expandafter\a:equation
174 \else
175 \def\endequation{\o:endequation:\egroup}%
176 \fi
177 \o:equation:}
178 \expandafter\let\csname o:equation*:\expandafter
179 \endcsname \csname equation*\endcsname
180 \expandafter\let\csname o:endequation*:\expandafter
181 \endcsname \csname endequation*\endcsname
182 \expandafter\def\csname equation*\endcsname{\bgroup
183 \ifx \EndPicture\:Undef
184 \expandafter\def\csname endequation*\endcsname {%
185 \csname o:endequation*:\endcsname\egroup%
186 \csname b:equation*\endcsname\egroup
187 }%
188 \csname a:equation*\endcsname
189 \else
190 \expandafter\def\csname endequation*\endcsname{\csname
191 o:endequation*:\endcsname\egroup}%
192 \fi
193 \csname o:equation*:\endcsname}
194 \NewConfigure{equation*}[2]{
195 \expandafter\c:def \csname a:equation*\endcsname {#1\bgroup \let \@eqnnum \empty }%
196 \expandafter\c:def \csname b:equation*\endcsname {#2}%
197 }
198 \expandafter\def\csname genfrac \endcsname#1#2#3#4{%
199 \def\@tempa{#1#2}%
200 \edef\@tempb{\@nx\@genfrac\@mathstyle{#4}%
201 \expandafter\noexpand\csname @@\ifx @#3@over\else above\fi
202 \ifx\@tempa\@empty \else withdelims\fi\endcsname}%
203 \@tempb{#1#2#3}}
204 \def\:tempc#1#2#3#4#5{{\a:genfrac#1\b:genfrac{\c:genfrac#4#2#3\relax
205 {\d:genfrac#5\e:genfrac}}\f:genfrac}}
206 \HLet\@genfrac\:tempc
207 \NewConfigure{genfrac}{6}
208 \HRestore\frac
209 \def\:temp#1#2{{\a:frac\begingroup
210 #1\endgroup\b:frac \@@over \c:frac #2\d:frac}}
211 \expandafter\HLet\csname frac \endcsname\:temp
212 \def\math@cr@@[#1]{\ifnum0=`{\fi \iffalse}\fi\math@cr@@@
213 \o:noalign:{\vskip#1\relax}}
214 \catcode`\#13 \catcode`\!6
215 \def\reg:align!1!2{%
216 \ifx \ifinany@\:Undef\else \inany@true\fi
217 \inalign@true \ifx \displaybreak@\:UnDef
218 \chardef\dspbrk@context\z@
219 \else
220 \displaybreak@
221 \fi
222 \intertext@
223 \ifingather@\else\displ@y@\fi\Let@ \let\math@cr@@@\math@cr@@@align
224 \ifxxat@\else \let\tag\tag@in@align \fi
225 \let\label\label@in@display !1% set st@r
226 \ifst@rred\else \global\@eqnswtrue \fi \measure@{!2}%
227 \global\row@\z@ \tabskip\eqnshift@
228 \Configure{PauseMkHalign}
229 {\Configure{PauseMkHalign}{}{}{}{}\expandafter\clean:span}{}{}{}%
230 %
231 \SaveMkHalignConf:g{\align:type}\HRestore\noalign
232 \MkHalign#{\span
233 &\@lign$\m@th\displaystyle{{\HCode{}}%
234 #}$%
235 &\@lign$\m@th\displaystyle{{\HCode{}}%
236 #}$%
237 }!2%
238 }
239 \catcode`\#=6 \catcode`\!=12
240 \def\clean:span#1\c:halign{%
241 \TeXhalign \bgroup \:span}
242 \ifx \ifinany@\:Undef
243 \def\:tempc{%
244 \math@cr
245 \EndMkHalign \RecallMkHalignConfig \csname b:\align:type\endcsname
246 \ifingather@ \restorealignstate@ \egroup \nonumber
247 \ifnum0=`{\fi\iffalse}\fi%
248 \else $$\fi
249 \global\@ignoretrue
250 }
251
252 \else
253 \def\:tempc{%
254 \math@cr
255 \EndMkHalign \RecallMkHalignConfig \csname b:\align:type\endcsname
256 \ifingather@ \restorealignstate@ \egroup \nonumber
257 \ifnum0=`{\fi}%
258 \else $$\fi
259 \global\@ignoretrue
260 }
261
262 \fi
263 \HLet\endalign\:tempc
264 \def\:tempc{\pic:MkHalign{\align:type}}
265 \HLet\align@\:tempc
266 \def\Config:alg#1#2#3#4#5#6#7{%
267 \expandafter\c:def\csname a:#7\endcsname{\global
268 \let\sv:amps\add:amps #1}%
269 \expandafter\c:def\csname b:#7\endcsname{#2\global
270 \let\add:amps\sv:amps}%
271 \expandafter\c:def\csname c:#7\endcsname{#3}%
272 \expandafter\c:def\csname d:#7\endcsname{#4}%
273 \expandafter\c:def\csname e:#7\endcsname{\expandafter\align:td
274 \expandafter{\csname f:#7\endcsname}{#5}{#6}}%
275 }
276 \def\align:td#1#2#3{\iftag@
277 \ifnum \add:amps>0
278 \gHAdvance\add:amps -1 \gHAdvance\HCol -1
279 \global\let#1\empty
280 \ifnum \add:amps=0 \gHAdvance\HCol1 #2\gdef#1{#3}\fi
281 \else #2\gdef#1{#3}\fi
282 \else \gHAssign\add:amps\HCol\relax #2\gdef#1{#3}\fi}%
283
284 \def\:tempc#1{%
285 \expandafter\pend:def\csname #1\endcsname{\def\align:type{#1}}%
286 \NewConfigure{#1}[6]{\Config:alg{##1}{##2}{##3}{##4}{##5}{##6}{#1}}%
287 \Configure{#1}{}{}{}{}{}{}%
288 \def\:temp{#1}\def\:tempa{align}\ifx \:temp\:tempa\else
289 \@xp\let\csname reg:#1\endcsname\reg:align
290 \@xp\let\csname end#1\endcsname\endalign
291 \fi }
292 \:tempc{alignat}
293 \:tempc{alignat*}
294 \:tempc{xalignat}
295 \:tempc{xalignat*}
296 \:tempc{xxalignat}
297 \:tempc{align}
298 \:tempc{align*}
299 \:tempc{flalign}
300 \:tempc{flalign*}
301 \pend:defIII\start@align{\Configure{$$}{}{}{}}
302 \catcode`\#13 \catcode`\!6
303 \def\reg:start@aligned!1!2{%
304 \savecolumn@
305 \vcenter \bgroup
306 \maxfields@!2\relax
307 \ifnum\maxfields@>\m@ne
308 \multiply\maxfields@\tw@
309 \let\math@cr@@@\math@cr@@@alignedat
310 \else
311 \let\math@cr@@@\math@cr@@@aligned
312 \fi
313 \Let@ \chardef\dspbrk@context\@ne
314 \default@tag
315 \global\column@\z@
316 \SaveMkHalignConf:g{start@aligned}\HRestore\noalign
317 \MkHalign#{&\column@plus $\m@th\displaystyle{{\HCode{}}#}$%
318 &\column@plus $\m@th\displaystyle{{\HCode{}}#}$}%
319 }
320 \catcode`\#=6 \catcode`\!=12
321 \def\al:gned#1{%
322 \Configure{start@aligned}{\csname a:#1\endcsname}%
323 {\csname b:#1\endcsname}{\csname c:#1\endcsname}%
324 {\csname d:#1\endcsname}{\csname e:#1\endcsname}%
325 {\csname f:#1\endcsname}\pic:MkHalign{#1}}
326 \NewConfigure{start@aligned}{6}
327 \def\:tempc{\crcr\EndMkHalign
328 \RecallMkHalignConfig \restorecolumn@
329 \egroup \b:start@aligned}
330 \HLet\endaligned\:tempc
331 \def\reg:aligned{\reg:start@aligned}
332 \NewConfigure{aligned}{6}
333 \def\Hlcr{z}
334 %% \Hlcr macro stores math environment optional possitionig argument
335 %% and can be used for custom setup. For example:
336 %% \Configure{gathered}
337 %% {\HCode{<\a:mathml mtable\space displaystyle="true"
338 %% \mml:class="gathered"%
339 %% \if t\Hlcr\space\a:mathml align="axis 1"\fi%
340 %% \if b\Hlcr\space\a:mathml align="axis -1"\fi%
341 %% >}}
342 %% {}...
343
344 \def\:temp#1{%
345 \def\Hlcr{#1}%
346 \let\@testopt\alignsafe@testopt
347 \expandafter\al:gned\expandafter{\@currenvir}{#1}}
348 \HLet\start@aligned\:temp
349
350 \def\reg:alignedat{\reg:start@aligned}
351 \NewConfigure{alignedat}{6}
352 \def\gathered:a[#1]{\def\Hlcr{#1}\pic:MkHalign{gathered}[#1]}
353 \def\:temp{%
354 \kernel@ifnextchar[{\gathered:a}{\gathered:a[c]}%
355 }
356 \HLet\gathered\:temp
357 \catcode`\#13 \catcode`\!6
358 \def\reg:gathered[!1]{%
359 \RIfM@\else
360 \nonmatherr@{\begin{gathered}}%
361 \fi
362 \null \vcenter\bgroup
363 \Let@ \chardef\dspbrk@context\@ne \restore@math@cr
364 \SaveMkHalignConf:g{gathered}%
365 \MkHalign#{$\m@th\displaystyle{\HCode{}}#$}%
366 }
367 \catcode`\#=6 \catcode`\!=12
368 \def\:tempc{\crcr\EndMkHalign
369 \RecallMkHalignConfig \egroup\b:gathered}
370 \HLet\endgathered\:tempc
371 \def\:temp{\pic:MkHalign{gathered}}
372 \expandafter\HLet\csname \string\gathered\endcsname\:temp
373 \NewConfigure{gathered}{6}
374 \catcode`\#13 \catcode`\!6
375 \def\reg:multline!1{%
376 \ifx \ifinany@\:Undef\else \inany@true\fi
377 \Let@
378 \@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}%
379 \ifx \displaybreak@\:UnDef
380 \chardef\dspbrk@context\z@
381 \else
382 \displaybreak@
383 \fi
384 \restore@math@cr \let\tag\tag@in@align
385 \global\tag@false \global\let\raise@tag\@empty
386 \let\tag\gobble@tag \ifst@rred \let\label\@gobble \else
387 \stepcounter{equation}%
388 \def\label{\let\cnt:currentlabel\@currentlabel
389 \def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel
390 \the\c@equation\else \@currentlabel\fi}%
391 \anc:lbl r{equation}\ltx@label}%
392 \edef\@currentlabel{\the\c@equation}%
393 \fi
394 %
395 \ifst@rred
396 \expandafter\let\csname e:multline*\endcsname\empty
397 \expandafter\let\csname f:multline*\endcsname\empty
398 \fi
399 \SaveMkHalignConf:g{multline\ifst@rred *\fi}\HRestore\noalign
400 \MkHalign#{\hbox{$\m@th\displaystyle{\HCode{}}%
401 #$}}!1%
402 }
403 \catcode`\#=6 \catcode`\!=12
404 \def\:tempc{\ifst@rred\else
405 \e:multline\csname a:multline-num\endcsname
406 \tagform@\theequation\csname b:multline-num\endcsname\f:multline
407 \fi
408 \math@cr \EndMkHalign
409 \RecallMkHalignConfig \csname b:multline\ifst@rred *\fi\endcsname
410 $$\global\@ignoretrue }
411 \HLet\endmultline\:tempc
412 \def\:tempc{\pic:MkHalign{multline\ifst@rred *\fi}}
413 \HLet\multline@\:tempc
414 \NewConfigure{multline}{6}
415 \NewConfigure{multline-num}{2}
416 \@xp\let\csname reg:multline*\endcsname\reg:multline
417 \@xp\let\csname endmultline*\endcsname\endmultline
418 \NewConfigure{multline*}{4}
419 \catcode`\#13 \catcode`\!6
420 \def\reg:gather!1{%
421 \ingather@true \ifx \ifinany@\:Undef
422 \let\split\insplit@ \chardef\dspbrk@context\z@
423 \else
424 \inany@true
425 \fi
426 %
427 \let\tag\tag@in@align \let\label\label@in@display
428 \intertext@ \displ@y@
429 \Let@ \let\math@cr@@@\math@cr@@@gather
430 \global\shifttag@false \global\row@\@ne
431 \SaveMkHalignConf:g{gather\ifst@rred *\fi}\HRestore\noalign
432 \MkHalign#{\hbox{$\m@th\displaystyle{{\HCode{}}%
433 #}$}%
434 &\hbox{{\HCode{}}%
435 #}%
436 }!1%
437 }
438 \catcode`\#=6 \catcode`\!=12
439 \def\:tempc{\math@cr \EndMkHalign
440 \RecallMkHalignConfig \csname b:gather\ifst@rred *\fi\endcsname
441 $$\global\@ignoretrue }
442 \HLet\endgather\:tempc
443 \def\:tempc{\pic:MkHalign{gather\ifst@rred *\fi}}
444 \HLet\gather@\:tempc
445 \NewConfigure{gather}{6}
446 \@xp\let\csname reg:gather*\endcsname\reg:gather
447 \@xp\let\csname endgather*\endcsname\endgather
448 \NewConfigure{gather*}{6}
449 \def\:tempc{%
450 \def\intertext##1{%
451 \ifvmode\else\\\@empty\fi
452 \noalign{%
453 \penalty\postdisplaypenalty\vskip\belowdisplayskip
454 \vbox{\normalbaselines
455 \ifdim\linewidth=\columnwidth
456 \else \parshape\@ne \@totalleftmargin \linewidth
457 \fi
458 \a:intertext \noindent##1\b:intertext\par}%
459 \penalty\predisplaypenalty\vskip\abovedisplayskip%
460 }%
461 }}
462 \HLet\intertext@=\:tempc
463 \NewConfigure{intertext}{2}
464 \HLet\leftroot\:gobble
465 \HLet\uproot\:gobble
466 \catcode`\#13 \catcode`\!6
467 \def\reg:smallmatrix{%
468 \vcenter\bgroup \Let@\restore@math@cr\default@tag
469 \SaveMkHalignConf:g{smallmatrix}%
470 \MkHalign#{$\m@th\scriptstyle#$&&%
471 $\m@th\scriptstyle#$}%
472 }
473 \catcode`\#=6 \catcode`\!=12
474 \def\:tempc{\crcr\EndMkHalign
475 \RecallMkHalignConfig \egroup\b:smallmatrix}
476 \HLet\endsmallmatrix\:tempc
477 \def\:temp{\pic:MkHalign{smallmatrix}}
478 \HLet\smallmatrix\:temp
479 \NewConfigure{smallmatrix}{6}
480 \pend:defI\substack{\a:substack}
481 \append:defI\substack{\b:substack}
482 \NewConfigure{substack}{2}
483 \catcode`\#13 \catcode`\!6
484 \def\reg:subarray!1{%
485 \vcenter\bgroup
486 \Let@ \restore@math@cr \default@tag
487 \baselineskip\fontdimen10 \scriptfont\tw@
488 \advance\baselineskip\fontdimen12 \scriptfont\tw@
489 \lineskip\thr@@\fontdimen8 \scriptfont\thr@@
490 \let\e:subarray\empty \let\f:subarray\empty
491 \everycr{}\SaveMkHalignConf:g{subarray}%
492 \MkHalign#{$\m@th\scriptstyle#$}%
493 }
494 \catcode`\#=6 \catcode`\!=12
495 \def\:tempc{\crcr\EndMkHalign
496 \RecallMkHalignConfig \egroup\b:subarray}
497 \HLet\endsubarray\:tempc
498 \def\:temp#1{\def\Hlcr{#1}\pic:MkHalign{subarray}{#1}}
499 \HLet\subarray\:temp
500 \NewConfigure{subarray}{4}
501 \NewConfigure{split}{6}
502 \catcode`\#13 \catcode`\!6
503 \def\:tempc{%
504 \vbox\bgroup
505 \ifx \ifinany@\:Undef
506 \chardef\dspbrk@context\@ne
507 \fi
508 %
509 \Let@ \restore@math@cr \default@tag \everycr{}\a:split
510 \SaveMkHalignConf:g{split}\HRestore\noalign
511 \MkHalign#{ $\m@th\displaystyle{{\HCode{}}%
512 #}$%
513 &$\m@th\displaystyle{{\HCode{}}%
514 #}$%
515 }}
516 \HLet\insplit@\:tempc
517 \catcode`\#6 \catcode`\!12
518 \def\:tempc{%
519 \crcr\EndMkHalign \b:split \egroup }
520 \HLet\endsplit\:tempc
521 \NewConfigure{equations}[2]{\def\pic:equa{#1}\def\pic:equb{#2}}
522 \def\str:pic{\ifx \EndPicture\:UnDef
523 \expandafter\Picture\pic:equa{ \pic:equb}%
524 \else \let\EndPicture\empty \fi
525 \let\halign\TeXhalign}
526 \def\make@df@tag@@#1{%
527 \gdef\df@tag{\maketag@@@{#1}\def\@currentlabel{#1}\gdef\ams:delete:tag{}%
528 \let\cnt:currentlabel\@currentlabel
529 \def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel
530 \expandafter\the\csname c@equation\endcsname\else \@currentlabel\fi}%
531 %
532 \anc:lbl r{}%
533 }}
534 \ExplSyntaxOn
535 \def\make@df@tag@@@#1{\gdef\df@tag{\tagform@{\tl_rescan:nn{}{#1}}%
536 \toks@\@xp{\p@equation{#1}}\edef\@currentlabel{\the\toks@}%
537 \let\cnt:currentlabel\@currentlabel
538 \def\:@currentlabel{\ifx \cnt:currentlabel\@currentlabel
539 \expandafter\the\csname c@equation\endcsname\else \@currentlabel\fi}%
540 %
541 \anc:lbl r{}%
542 }}
543 \ExplSyntaxOff
544
545 \:CheckOption{new-accents} \if:Option \else
546 \HLet\Hat\hat
547 \HLet\Check\check
548 \HLet\Tilde\tilde
549 \HLet\Acute\acute
550 \HLet\Grave\grave
551 \HLet\Dot\dot
552 \HLet\Ddot\ddot
553 \HLet\Breve\breve
554 \HLet\Bar\bar
555 \HLet\Vec\vec
556
557 \fi
558 \expandafter\def\csname [ \endcsname{\st:Math}
559 \expandafter\def\csname ] \endcsname{\ed:Math}
560 \let\:tempc\measure@
561 \pend:defI\:tempc{\bgroup
562 \RecallTeXcr \HRestore\noalign \let\EndPicture\empty
563 \let\halign\TeXhalign \let\span\:span
564 \expandafter\HRestore\csname begin \endcsname
565 \expandafter\HRestore\csname end \endcsname
566 \a:measure@ }
567 \append:defI\:tempc{\egroup}
568 \HLet\measure@\:tempc
569 \NewConfigure{measure@}{1}
570 \HLet\savealignstate@\empty
571 \renewcommand{\n:smash:}[2][tb]{%
572 \def\smash@{#1}%
573 \ifmmode\@xp\o:mathpalette:\@xp\mathsm@sh\else
574 \@xp\makesm@sh\fi{#2}}
575 \let\:tempc\maketag@@@
576 \pend:defI\:tempc{\a:maketag}
577 \append:defI\:tempc{\b:maketag}
578 \NewConfigure{maketag}{2}
579 \HLet\maketag@@@\:tempc
580 \MathSymbol\mathrel{@cdots}
581 \MathSymbol\mathop{doteq}
582 \def\n:doteq:{\expandafter\:same \math:sym\mathop{doteq}\nolimits}
583 \HLet\dotsb@=\@cdots
584 \HLet\intdots@=\@cdots
585 \HRestore\cdots
586 \MathSymbol\mathop{iint}
587 \def\n:iint:{\expandafter\:same \math:sym\mathop{iint}\nolimits}
588 \MathSymbol\mathop{iiint}
589 \def\n:iiint:{\expandafter\:same \math:sym\mathop{iiint}\nolimits}
590 \MathSymbol\mathop{iiiint}
591 \def\n:iiiint:{\expandafter\:same \math:sym\mathop{iiiint}\nolimits}
592 \MathSymbol\mathop{idotsint}
593 \def\n:idotsint:{\expandafter\:same \math:sym\mathop{idotsint}\nolimits}
594 \def\:tempc#1{\a:underrightarrow
595 \o:underrightarrow:{#1}\b:underrightarrow}
596 \HLet\underrightarrow\:tempc
597 \NewConfigure{underrightarrow}{2}
598 \def\:tempc#1{\a:underleftarrow
599 \o:underleftarrow:{#1}\b:underleftarrow}
600 \HLet\underleftarrow\:tempc
601 \NewConfigure{underleftarrow}{2}
602 \def\:tempc#1{\a:overleftrightarrow
603 \o:overleftrightarrow:{#1}\b:overleftrightarrow}
604 \HLet\overleftrightarrow\:tempc
605 \NewConfigure{overleftrightarrow}{2}
606 \def\:tempc#1{\a:underleftrightarrow
607 \o:underleftrightarrow:{#1}\b:underleftrightarrow}
608 \HLet\underleftrightarrow\:tempc
609 \NewConfigure{underleftrightarrow}{2}
610
611 \def\:tempc#1#2#3{\a:underarrow@
612 \hbox{$\m@th#2#3$}\b:underarrow@
613 \hbox{#1#2}\c:underarrow@
614 }
615 \HLet\underarrow@\:tempc
616 \def\:tempc#1#2#3{\a:overarrow@
617 \hbox{#1#2}\b:overarrow@
618 \hbox{$\m@th#2#3$}\c:overarrow@
619 }
620 \HLet\overarrow@\:tempc
621 \NewConfigure{underarrow@}{3}
622 \NewConfigure{overarrow@}{3}
623 \def\:temp#1#2{\a:overset\binrel@{#2}%
624 \binrel@@{\mathop{\kern\z@#2}\limits^{#1}}\b:overset}
625 \HLet\overset\:temp
626 \NewConfigure{overset}{2}
627 \def\:temp#1#2{\a:underset\binrel@{#2}%
628 \binrel@@{\mathop{\kern\z@#2}\limits_{#1}}\b:underset}
629 \HLet\underset\:temp
630 \NewConfigure{underset}{2}
631
632 \MathSymbol\mathop{dotsc}
633 \MathSymbol\mathop{dotso}
634 \MathSymbol\mathrel{longleftarrow}
635 \MathSymbol\mathrel{longrightarrow}
636
637 \ifx \ifinany@\:Undef
638 \let\:tempc\gather@split
639 \append:defIII\:tempc{%
640 \def\endmathdisplay@a{%
641 \math@cr \EndMkHalign
642 \RecallMkHalignConfig \csname b:gather\ifst@rred *\fi\endcsname
643 \egroup
644 }%
645 }
646 \HLet\gather@split\:tempc
647
648 \else
649 \:warning{ams files too old for TeX4ht}
650 \fi
651 \Hinput{amsmath}
652 \endinput
653