Debian Codegraph @

texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx

raw
1 %%
2 %% This is file `latex-lab-amsmath.ltx',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% latex-lab-amsmath.dtx (with options: `kernel')
8 %%
9 %% This is a generated file.
10 %%
11 %% Copyright 2021-2025 LaTeX Project
12 %%
13 %% This file was generated from file(s) of the `LaTeX-lab Bundle'.
14 %% ------------------------------------------------------------------------------------
15 %%
16 %% It may be distributed and/or modified under the
17 %% conditions of the LaTeX Project Public License, either version 1.3c
18 %% of this license or (at your option) any later version.
19 %% The latest version of this license is in
20 %% http://www.latex-project.org/lppl.txt
21 %% and version 1.3c or later is part of all distributions of LaTeX
22 %% version 2008 or later.
23 %%
24 %% This file may only be distributed together with a copy of the LaTeX
25 %% `LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle'
26 %% without such generated files.
27 %%
28 %% The newest sources can be found below
29 %%
30 %% https://github.com/latex3/latex2e/required/latex-lab
31 %%
32 %% where one can also log issues in case there are any.
33 %%
34 %%
35 %% File: latex-lab-amsmath.dtx
36 \ProvidesFile{latex-lab-amsmath.ltx}
37 [2025-09-29 v0.1i amsmath adaptions]
38 \RequirePackage{tagpdf-base}
39 \ExplSyntaxOn
40 \AddToHook{begindocument}
41 {
42 \def\measuring@true{\let\ifmeasuring@\iftrue\tag_suspend:n{\measuring}\luamml_ignore:}
43 }
44 \def\maketag@@@#1
45 {%
46 \ifmeasuring@
47 \hbox{\m@th\normalfont#1}%
48 \else
49 \UseTaggingSocket{math/display/tag/begin}
50 \hbox{\m@th\normalfont#1
51 \UseTaggingSocket{math/luamml/mtable/tag/save}
52 }%
53 \UseTaggingSocket{math/display/tag/end}
54 \fi
55 }
56 \def\maketag@@@notag#1{\hbox{\m@th\normalfont#1}}
57 \DeclareRobustCommand{\eqref}[1]
58 {\textup{\let\maketag@@@\maketag@@@notag\tagform@{\ref{#1}}}}
59 \def\common@align@ending {
60 \math@cr \black@\totwidth@
61 \UseExpandableTaggingSocket {math/luamml/mtable/finalize} {\@currenvir}
62 \egroup
63 \ifingather@
64 \restorealignstate@
65 \egroup
66 \nonumber
67 \ifnum0=`{\fi\iffalse}\fi
68 \else
69 \dollardollar@end
70 \fi
71 \ignorespacesafterend
72 }
73 \renewenvironment{align}{%
74 \start@align\@ne\st@rredfalse\m@ne
75 }{%
76 \common@align@ending
77 }
78 \renewenvironment{align*}{%
79 \start@align\@ne\st@rredtrue\m@ne
80 }{%
81 \common@align@ending
82 }
83 \renewenvironment{alignat}{%
84 \start@align\z@\st@rredfalse
85 }{%
86 \common@align@ending
87 }
88 \renewenvironment{alignat*}{%
89 \start@align\z@\st@rredtrue
90 }{%
91 \common@align@ending
92 }
93 \renewenvironment{flalign}{%
94 \start@align\tw@\st@rredfalse\m@ne
95 }{%
96 \common@align@ending
97 }
98 \renewenvironment{flalign*}{%
99 \start@align\tw@\st@rredtrue\m@ne
100 }{%
101 \common@align@ending
102 }
103 \renewenvironment{xalignat}{%
104 \start@align\@ne\st@rredfalse
105 }{%
106 \common@align@ending
107 }
108 \renewenvironment{xalignat*}{%
109 \start@align\@ne\st@rredtrue
110 }{%
111 \common@align@ending
112 }
113 \renewenvironment{xxalignat}{%
114 \start@align\tw@\st@rredtrue
115 }{%
116 \common@align@ending
117 }
118 \math_register_halign_env:nn {align}{}
119 \math_register_halign_env:nn {align*}{}
120 \math_register_halign_env:nn {alignat}{}
121 \math_register_halign_env:nn {alignat*}{}
122 \math_register_halign_env:nn {flalign}{}
123 \math_register_halign_env:nn {flalign*}{}
124 \math_register_halign_env:nn {xalignat}{}
125 \math_register_halign_env:nn {xalignat*}{}
126 \math_register_halign_env:nn {xxalignat}{}
127 \def\align@preamble{%
128 &\hfil
129 \strut@
130 \setboxz@h
131 {
132 \@lign
133 $
134 \m@th\displaystyle{##}
135 \ifmeasuring@
136 \luamml_ignore:
137 \else
138 \UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd} }
139 \fi
140 $
141 }%
142 \ifmeasuring@
143 \savefieldlength@
144 \else
145 \UseTaggingSocket{math/luamml/mtable/finalizecol}{box}
146 \fi
147 \set@field
148 \tabskip\z@skip
149 &\setboxz@h
150 {
151 \@lign
152 $
153 \m@th\displaystyle{{}##}
154 \ifmeasuring@
155 \luamml_ignore:
156 \else
157 \UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd} }
158 \fi
159 $
160 }%
161 \ifmeasuring@
162 \savefieldlength@
163 \else
164 \UseTaggingSocket{math/luamml/mtable/finalizecol}{box}
165 \fi
166 \set@field
167 \hfil
168 \tabskip\alignsep@
169 }
170 \def\math@cr@@@align{%
171 \ifst@rred\nonumber\fi
172 \if@eqnsw \global\tag@true \fi
173 \global\advance\row@\@ne
174 \add@amps\maxfields@
175 \omit
176 \kern-\alignsep@
177 \iftag@
178 \setboxz@h{\@lign\strut@{\make@display@tag}}%
179 \place@tag
180 \fi
181 \UseTaggingSocket{math/luamml/mtable/tag/set}
182 \ifst@rred\else\global\@eqnswtrue\fi
183 \global\lineht@\z@
184 \cr
185 }
186 \def\gather@#1{%
187 \ingather@true \let\split\insplit@
188 \let\tag\tag@in@align \let\label\label@in@display
189 \chardef\dspbrk@context\z@
190 \intertext@ \displ@y@ \Let@
191 \let\math@cr@@@\math@cr@@@gather
192 \gmeasure@{#1}%
193 \global\shifttag@false
194 \tabskip\z@skip
195 \global\row@\@ne
196 \halign to\displaywidth\bgroup
197 \strut@
198 \setboxz@h
199 {
200 $\m@th\displaystyle{##}
201 \UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd} }
202 $
203 }%
204 \UseTaggingSocket{math/luamml/mtable/finalizecol}{box}
205 \calc@shift@gather
206 \set@gather@field
207 \tabskip\@centering
208 &\setboxz@h{\strut@{##}}%
209 \place@tag@gather
210 \UseTaggingSocket{math/luamml/mtable/tag/set}
211 \tabskip \iftagsleft@ \gdisplaywidth@ \else \z@skip \span\fi
212 \crcr
213 #1%
214 }
215 \def\endgather{
216 \math@cr
217 \black@ \totwidth@
218 \UseExpandableTaggingSocket{math/luamml/mtable/finalize} {gather}
219 \egroup
220 \dollardollar@end
221 \ignorespacesafterend
222 }
223 \renewenvironment{gather*}
224 {
225 \start@gather\st@rredtrue
226 }
227 {
228 \math@cr
229 \black@\totwidth@
230 \UseExpandableTaggingSocket{math/luamml/mtable/finalize} {gather}
231 \egroup
232 \dollardollar@end
233 \ignorespacesafterend
234 }
235 \math_register_halign_env:nn {gather}{}
236 \math_register_halign_env:nn {gather*}{}
237 \renewcommand{\start@aligned}[2]{
238 \RIfM@
239 \else
240 \nonmatherr@ {\begin{\@currenvir}}
241 \fi
242 \savecolumn@ % Assumption: called inside a group
243 \UseTaggingSocket{math/luamml/annotate/false}{}{ \alignedspace@left }
244 \ams@start@box {#1} \bgroup
245 \maxfields@ #2 \relax
246 \ifnum \maxfields@ > \m@ne
247 \multiply \maxfields@ \tw@
248 \let \math@cr@@@ \math@cr@@@alignedat
249 \alignsep@ \z@skip
250 \else
251 \let \math@cr@@@ \math@cr@@@aligned
252 \alignsep@ \minalignsep
253 \fi
254 \Let@ \chardef \dspbrk@context \@ne
255 \default@tag
256 \spread@equation % no-op if already called
257 \global \column@ \z@
258 \ialign \bgroup
259 & \column@plus
260 \hfil
261 \strut@
262 $
263 \m@th
264 \displaystyle
265 {##}
266 \UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd} }
267 $
268 \UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
269 \tabskip \z@skip
270 & \column@plus
271 $
272 \m@th
273 \displaystyle
274 {
275 {}
276 ##
277 }
278 \UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd} }
279 $
280 \UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
281 \hfil
282 \tabskip\alignsep@
283 \crcr
284 \ams@return@opt@arg
285 }
286 \renewenvironment{gathered}[1][c]{%
287 \RIfM@\else
288 \nonmatherr@{\begin{gathered}}%
289 \fi
290 \UseTaggingSocket{ math/luamml/annotate/false } {}{ \alignedspace@left }
291 \ams@start@box{#1}\bgroup
292 \Let@ \chardef\dspbrk@context\@ne \restore@math@cr
293 \spread@equation
294 \ialign\bgroup
295 \hfil\strut@$\m@th\displaystyle##
296 \UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd} }
297 $
298 \UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
299 \hfil
300 \crcr
301 \ams@return@opt@arg
302 }{%
303 \endaligned
304 }
305 \def\endaligned
306 {
307 \crcr
308 \UseExpandableTaggingSocket{math/luamml/mtable/innertable/save}
309 \egroup
310 \restorecolumn@
311 \egroup
312 \UseTaggingSocket{math/luamml/mtable/innertable/finalize}
313 }
314 \renewenvironment{multline*}{\start@multline\st@rredtrue}
315 {%
316 \iftagsleft@ \@xp\lendmultline@ \else \@xp\rendmultline@ \fi
317 \ignorespacesafterend
318 }
319 \math_register_halign_env:nn {multline}{}
320 \math_register_halign_env:nn {multline*}{}
321 \def\multline@#1{%
322 \Let@
323 \@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}%
324 \chardef\dspbrk@context\z@
325 \restore@math@cr
326 \let\tag\tag@in@align
327 \global\tag@false \global\let\raise@tag\@empty
328 \mmeasure@{#1}%
329 \let\tag\gobble@tag \let\label\@gobble
330 \tabskip \if@fleqn \@mathmargin \else \z@skip \fi
331 \totwidth@\displaywidth
332 \if@fleqn
333 \advance\totwidth@-\@mathmargin
334 \fi
335 \halign\bgroup
336 \hbox to\totwidth@{%
337 \if@fleqn
338 \hskip \@centering \relax
339 \else
340 \hfil
341 \fi
342 \strut@
343 $\m@th\displaystyle{}##\endmultline@math
344 \hfil
345 }%
346 \crcr
347 \if@fleqn
348 \hskip-\@mathmargin
349 \def\multline@indent{\hskip\@mathmargin}% put it back
350 \else
351 \hfilneg
352 \def\multline@indent{\hskip\multlinegap}%
353 \fi
354 \iftagsleft@
355 \iftag@
356 \begingroup
357 \ifshifttag@
358 \rlap{\vbox{%
359 \normalbaselines
360 \hbox{%
361 \strut@
362 \make@display@tag
363 }%
364 \vbox to\lineht@{}%
365 \raise@tag
366 }}%
367 \multline@indent
368 \else
369 \setbox\z@\hbox{\make@display@tag}%
370 \dimen@\@mathmargin \advance\dimen@-\wd\z@
371 \ifdim\dimen@<\multlinetaggap
372 \dimen@\multlinetaggap
373 \fi
374 \box\z@ \hskip\dimen@\relax
375 \fi
376 \endgroup
377 \else
378 \multline@indent
379 \fi
380 \else
381 \multline@indent
382 \fi
383 \ifmeasuring@ \else
384 \UseTaggingSocket{math/luamml/mtable/aligncol} {left}
385 \fi
386 #1%
387 \ifmeasuring@ \else
388 \UseTaggingSocket{math/luamml/mtable/aligncol} {right}
389 \fi
390 }
391 \def\endmultline@math
392 {
393 \UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd} }
394 $
395 \UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
396 }
397 \def\rendmultline@{%
398 \iftag@
399 \UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd} }
400 $
401 \UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
402 \let\endmultline@math\relax
403 \ifshifttag@
404 \hskip\multlinegap
405 \llap{\vtop{%
406 \raise@tag
407 \normalbaselines
408 \setbox\@ne\null
409 \dp\@ne\lineht@
410 \box\@ne
411 \hbox{\strut@\make@display@tag}%
412 }}%
413 \else
414 \hskip\multlinetaggap
415 \make@display@tag
416 \fi
417 \UseTaggingSocket{math/luamml/mtable/tag/set}
418 \else
419 \hskip\multlinegap
420 \fi
421 \hfilneg
422 \math@cr
423 \UseExpandableTaggingSocket {math/luamml/mtable/finalize} {multline}
424 \egroup
425 \dollardollar@end
426 }
427 \def\lendmultline@{%
428 \hfilneg
429 \hskip\multlinegap
430 \math@cr
431 \UseExpandableTaggingSocket {math/luamml/mtable/finalize} {multline}
432 \egroup
433 \dollardollar@end
434 }
435 \def\env@cases{%
436 \let\@ifnextchar\new@ifnextchar
437 \left\lbrace
438 \def\arraystretch{1.2}%
439 \array{@{}l@{\quad}l@{\luamml_ignore:}}%
440 }
441
442 \renewenvironment {smallmatrix} {
443 \UseTaggingSocket{ math/luamml/annotate/false } {} { \null\, }
444 \vcenter \bgroup
445 \Let@
446 \restore@math@cr
447 \default@tag
448 \baselineskip 6 \ex@
449 \lineskip 1.5 \ex@
450 \lineskiplimit \lineskip
451 \ialign \bgroup
452 \hfil
453 $
454 \m@th
455 \scriptstyle
456 ##
457 % No \scriptsize here since we want to add the mstyle nodes
458 \UseTaggingSocket{math/luamml/save/nn}{ {} {mtd} }
459 $
460 \UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
461 \hfil
462 &&
463 \thickspace
464 \hfil
465 $
466 \m@th
467 \scriptstyle
468 ##
469 % No \scriptsize here since we want to add the mstyle nodes
470 \UseTaggingSocket{math/luamml/save/nn}{ {} {mtd} }
471 $
472 \UseTaggingSocket{math/luamml/mtable/finalizecol}{last}
473 \hfil
474 \crcr
475 }{%
476 \crcr
477 \UseExpandableTaggingSocket{math/luamml/mtable/smallmatrix/save}
478 \egroup
479 \egroup
480 \UseTaggingSocket{math/luamml/mtable/innertable/finalize}
481 \UseTaggingSocket{ math/luamml/annotate/false } {}{ \, }
482 }
483 \cs_new:Npn\__math_split_debug_typeout:n#1{\use_none:n{#1}}
484 \bool_new:N\l__math_gathersplit_bool
485 \renewenvironment{split}{%
486 \__math_split_debug_typeout:n {begin~split}
487 \if@display
488 \ifinner
489 \@xp\@xp\@xp\split@aligned
490 \else
491 \ifst@rred \else \global\@eqnswtrue \fi
492 \fi
493 \else
494 \let\endsplit\@empty \@xp\collect@body\@xp\split@err
495 \fi
496 \collect@body\gather@split
497 }{\__math_split_debug_typeout:n{end~split}%
498 \crcr
499 \UseExpandableTaggingSocket{math/luamml/mtable/innertable/save}%
500 \egroup
501 \egroup
502 \iftagsleft@ \@xp\lendsplit@ \else \@xp\rendsplit@ \fi
503 }
504 \def\gather@split#1#2#3{
505 \__math_split_debug_typeout:n{gather@split}%
506 \@xp\endgroup \reset@equation % math@cr will handle equation numbering
507 \iftag@
508 \toks@\@xp{\df@tag}%
509 \edef\split@tag{%
510 \gdef\@nx\df@tag{\the\toks@}%
511 \global\@nx\tag@true \@nx\nonumber
512 }%
513 \else \let\split@tag\@empty
514 \fi
515 \bool_set_true:N\l__math_gathersplit_bool
516 \spread@equation
517 \vcenter\bgroup
518 \gather@{\split@tag
519 \begin{split}#1\end{split}}%
520 \def\endmathdisplay@a{%
521 \__math_split_debug_typeout:n{endmathdisplay@a}
522 \__math_split_debug_typeout:n{finalize~innertable~endmathdisplay@a}
523 \math@cr
524 \black@ \totwidth@
525 \egroup
526 \egroup
527 \UseExpandableTaggingSocket{math/luamml/mtable/innertable/finalize}%
528 }%
529 }
530 \def\insplit@{\__math_split_debug_typeout:n{insplit@}%
531 \global\setbox\z@\vbox\bgroup
532 \Let@ \chardef\dspbrk@context\@ne \restore@math@cr
533 \default@tag % disallow use of \tag here
534 \ialign\bgroup
535 \hfil
536 \strut@
537 $\m@th\displaystyle {##}%
538 \UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd} }%
539 $%
540 \UseTaggingSocket{math/luamml/mtable/finalizecol}{last}%
541 &$\m@th\displaystyle {{}##}%
542 \UseTaggingSocket{math/luamml/save/nNn}{ {} \displaystyle {mtd} }%
543 $%
544 \UseTaggingSocket{math/luamml/mtable/finalizecol}{last}%
545 \hfill % Why not \hfil?---dmj, 1994/12/28
546 \crcr
547 }
548 \def\lendsplit@{%
549 \global\setbox9\vtop{\unvcopy\z@}%
550 \ifinalign@
551 \setbox\@ne\vbox{%
552 \unvcopy\z@
553 \global\setbox8\lastbox
554 }%
555 \setbox\@ne\hbox{%
556 \unhcopy8%
557 \unskip
558 \setbox\tw@\lastbox
559 \unskip
560 \global\setbox\thr@@\lastbox
561 }%
562 \__math_split_debug_typeout:n{lendsplit@/aligncase}
563 \ifctagsplit@
564 \__math_split_debug_typeout:n{lendsplit@/aligncase/centertags}
565 \gdef\split@{%
566 \hbox to\wd\thr@@{}%
567 &\vcenter{\vbox{\moveleft\wd\thr@@\box9}}%
568 \__math_split_debug_typeout:n{finalize~innertable~aligncase}
569 \UseTaggingSocket{math/luamml/mtable/innertable/finalize}%
570 }%
571 \else
572 %TODO, not correct yet.
573 \__math_split_debug_typeout:n{lendsplit@/aligncase/tbtags}
574 \gdef\split@{%
575 \hbox to\wd\thr@@{}%
576 &\vbox{\moveleft\wd\thr@@\box9}%
577 \__math_split_debug_typeout:n{finalize~innertable~aligncase}
578 \UseTaggingSocket{math/luamml/mtable/innertable/finalize}%
579 }%
580 \fi
581 \else
582 \ifctagsplit@
583 \bool_if:NTF \l__math_gathersplit_bool
584 {
585 \__math_split_debug_typeout:n{lendsplit/equationcase/centertags}
586 \gdef\split@%
587 {\UseTaggingSocket{math/luamml/annotate/false}{}{\vcenter{\box9}}}
588 }
589 {
590 \__math_split_debug_typeout:n {lendsplit/gathercase/centertags}
591 \gdef\split@{\vcenter{\box9}%
592 \__math_split_debug_typeout:n {finalize~innertable~gathercase}
593 \UseTaggingSocket{math/luamml/mtable/innertable/finalize}}
594 }
595 \else
596 % TODO tbtags not correct yet.
597 \bool_if:NTF \l__math_gathersplit_bool
598 {
599 \__math_split_debug_typeout:n {lendsplit/equationcase/tbtags}
600 \gdef\split@%
601 {\UseTaggingSocket{math/luamml/annotate/false}{}{\box9}}
602 }
603 {
604 \__math_split_debug_typeout:n {lendsplit/gathercase/tbtags}
605 \gdef\split@{
606 \box9%
607 \__math_split_debug_typeout:n {finalize~innertable~gathercase}
608 \UseTaggingSocket{math/luamml/mtable/innertable/finalize}}
609 }
610 \fi
611 \fi
612 \aftergroup\split@
613 }
614 \def\rendsplit@{%
615 \ifinalign@
616 \global\setbox9 \vtop{%
617 \unvcopy\z@
618 \global\setbox8 \lastbox
619 \unskip
620 }%
621 \setbox\@ne\hbox{%
622 \unhcopy8
623 \unskip
624 \global\setbox\tw@\lastbox
625 \unskip
626 \global\setbox\thr@@\lastbox
627 }%
628 \ifctagsplit@
629 \gdef\split@{%
630 \hbox to\wd\thr@@{}
631 &\vcenter{\vbox{\moveleft\wd\thr@@\boxz@}}%
632 \__math_split_debug_typeout:n {rendsplit/aligncase/centertags}
633 \__math_split_debug_typeout:n {finalize~innertable~aligncase}
634 \UseTaggingSocket{math/luamml/mtable/innertable/finalize}
635 }%
636 \else
637 \__math_split_debug_typeout:n{rendsplit@/aligncase/tbtags}
638 %TODO tbtags is not correct yet
639 \global\setbox7 \hbox{\unhbox\tw@\unskip}%
640 \gdef\split@{%
641 \global\@tempcnta\column@
642 &\setboxz@h{}%
643 \savetaglength@
644 \global\advance\row@\@ne
645 \vbox{\moveleft\wd\thr@@\box9}%
646 \crcr
647 \noalign{\global\lineht@\z@}%
648 \add@amps\@tempcnta
649 \UseTaggingSocket{math/luamml/annotate/false}{}{\box\thr@@}
650 &\box7
651 \__math_split_debug_typeout:n {finalize~innertable~aligncase}
652 \UseTaggingSocket{math/luamml/mtable/innertable/finalize}%
653 }%
654 \fi
655 \else
656 \ifctagsplit@
657 \bool_if:NTF \l__math_gathersplit_bool
658 {
659 \__math_split_debug_typeout:n {rendsplit/equationcase/centertags}
660 \gdef\split@%
661 {\UseTaggingSocket{math/luamml/annotate/false}{}{\vcenter{\boxz@}}}
662 }
663 {
664 \__math_split_debug_typeout:n {rendsplit/gathercase/centertags}
665 \gdef\split@{\vcenter{\boxz@}%
666 \__math_split_debug_typeout:n {finalize~innertable~gathercase}
667 \UseTaggingSocket{math/luamml/mtable/innertable/finalize}}
668 }
669 \else
670 \bool_if:NTF \l__math_gathersplit_bool
671 {
672 \__math_split_debug_typeout:n {rendsplit/equationcase/tbtags}
673 \gdef\split@{%
674 \UseTaggingSocket{math/luamml/annotate/false}{}{\boxz@}}
675 }
676 {
677 \__math_split_debug_typeout:n {rendsplit/gathercase/tbtags}
678 \gdef\split@{%
679 \boxz@
680 \UseTaggingSocket{math/luamml/mtable/innertable/finalize}}
681 }
682 \fi
683 \fi
684 \aftergroup\split@
685 }
686 \def\intertext@{%
687 \def\intertext##1{%
688 \ifvmode\else\\\@empty\fi
689 \noalign{%
690 \penalty\postdisplaypenalty\vskip\belowdisplayskip
691 \vbox{
692 \ifmeasuring@\tag_suspend:n{\measuring}\fi
693 \normalbaselines
694 \ifdim\linewidth=\columnwidth
695 \else \parshape\@ne \@totalleftmargin \linewidth
696 \fi
697 \tag_mc_end_push:
698 \tagpdfsetup{para/tag=P}%
699 \tagpdfparaOn
700 \noindent\ignorespaces##1\par
701 \tag_mc_begin_pop:n{}}%
702 \penalty\predisplaypenalty\vskip\abovedisplayskip%
703 }%
704 }}
705 \AddToHook{package/amstext/after}
706 {
707 \tag_if_active:T
708 {
709 \sys_if_engine_luatex:TF
710 {
711 \def\text@#1{{
712 \tag_socket_use:nnn {math/luamml/hbox}{}
713 {{%
714 \ifcase\mathstyle
715 \hbox{{#1}}\or
716 \hbox{{#1}}\or
717 \hbox{{#1}}\or
718 \hbox{{#1}}\or
719 \hbox{{\let\f@size\sf@size\selectfont#1}}\or
720 \hbox{{\let\f@size\sf@size\selectfont#1}}\or
721 \hbox{{\let\f@size\ssf@size\selectfont#1}}\or
722 \hbox{{\let\f@size\ssf@size\selectfont#1}}\or
723 \ERROR
724 \fi
725 \check@mathfonts
726 }}}}
727 }
728 {
729 \def\text@#1
730 {{
731 \int_gincr:N\g__math_mathchoice_int
732 \tag_suspend:n{\text@}
733 \mathchoice
734 {
735 \__math_tag_if_mathstyle:en{mathchoice-\int_use:N\g__math_mathchoice_int}{0}
736 \textdef@\displaystyle\f@size{#1}
737 }
738 {
739 \__math_tag_if_mathstyle:en{mathchoice-\int_use:N\g__math_mathchoice_int}{2}
740 \textdef@\textstyle\f@size{\firstchoice@false #1}
741 }
742 {
743 \__math_tag_if_mathstyle:en{mathchoice-\int_use:N\g__math_mathchoice_int}{4}
744 \textdef@\textstyle\sf@size{\firstchoice@false #1}
745 }
746 {
747 \__math_tag_if_mathstyle:en{mathchoice-\int_use:N\g__math_mathchoice_int}{6}
748 \textdef@\textstyle \ssf@size{\firstchoice@false #1}
749 }
750 \check@mathfonts
751 }}
752 }
753 }
754 }
755 \AddToHook{package/amsbsy/after}
756 {
757 \def\pmb@@#1#2#3{\leavevmode\hbox_set:Nn\l__math_tmpa_box{xxx#3}
758 \dimen@-\box_wd:N\l__math_tmpa_box
759 \kern-.5\ex@\box_use:N\l__math_tmpa_box
760 \tag_mc_end:\tag_mc_begin:n{artifact}
761 \tag_mc_reset_box:N\l__math_tmpa_box
762 \kern\dimen@\kern.25\ex@\raise.4\ex@\box_use:N\l__math_tmpa_box
763 \kern\dimen@\kern.25\ex@\box_use_drop:N\l__math_tmpa_box
764 \tag_mc_end:\tag_mc_begin:n{}
765 }
766 \def\pmb@#1#2{\hbox_set:Nn\l__math_tmpa_box{$\m@th#1{#2}$}
767 \setboxz@h{$\m@th#1\mkern.5mu$}\pmbraise@\wdz@
768 \binrel@{#2}
769 \dimen@-\box_wd:N\l__math_tmpa_box
770 \binrel@@{
771 \mkern-.8mu\box_use:N\l__math_tmpa_box
772 \tag_mc_end:\tag_mc_begin:n{artifact}
773 \tag_mc_reset_box:N\l__math_tmpa_box
774 \kern\dimen@\mkern.4mu\raise\pmbraise@\box_use:N\l__math_tmpa_box
775 \kern\dimen@\mkern.4mu\box_use_drop:N\l__math_tmpa_box
776 \tag_mc_end:\tag_mc_begin:n{}
777 }
778 }
779 }
780 \ExplSyntaxOff
781 \endinput
782 %%
783 %% End of file `latex-lab-amsmath.ltx'.