diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx')
-rw-r--r-- | Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx | 80 |
1 files changed, 77 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx index c2431ca4eff..cab7e10f301 100644 --- a/Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx +++ b/Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx @@ -34,7 +34,7 @@ %% %% File: latex-lab-amsmath.dtx \ProvidesFile{latex-lab-amsmath.ltx} - [2023-01-05 v0.1a amsmath adaptions] + [2024-02-12 v0.1b amsmath adaptions] \RequirePackage{tagpdf-base} \ExplSyntaxOn \AddToHook{package/amsmath/after} @@ -43,7 +43,7 @@ \def\intertext##1{% \ifvmode\else\\\@empty\fi \noalign{% - \penalty\postdisplaypenalty\vskip\belowdisplayskip + \penalty\postdisplaypenalty\vskip-\belowdisplayskip \vbox{ \ifmeasuring@\tag_stop:\fi \normalbaselines @@ -51,13 +51,87 @@ \else \parshape\@ne \@totalleftmargin \linewidth \fi \tag_mc_end_push: - \tagpdfsetup{paratag=Span}% + \tagpdfsetup{para/tag=P}% + \tagpdfparaOn \noindent\ignorespaces##1\par \tag_mc_begin_pop:n{}}% \penalty\predisplaypenalty\vskip\abovedisplayskip% }% }} } +\AddToHook{package/amstext/after} + { + \tag_if_active:T + { + \sys_if_engine_luatex:TF + { + \def\text@#1{{% + \ifcase\mathstyle + \hbox{{#1}}\or + \hbox{{#1}}\or + \hbox{{#1}}\or + \hbox{{#1}}\or + \hbox{{\let\f@size\sf@size\selectfont#1}}\or + \hbox{{\let\f@size\sf@size\selectfont#1}}\or + \hbox{{\let\f@size\ssf@size\selectfont#1}}\or + \hbox{{\let\f@size\ssf@size\selectfont#1}}\or + \ERROR + \fi + \check@mathfonts + }} + } + { + \def\text@#1 + {{ + \int_gincr:N\g__math_mathchoice_int + \tag_stop: + \mathchoice + { + \__math_tag_if_mathstyle:en{mathchoice-\int_use:N\g__math_mathchoice_int}{0} + \textdef@\displaystyle\f@size{#1} + } + { + \__math_tag_if_mathstyle:en{mathchoice-\int_use:N\g__math_mathchoice_int}{2} + \textdef@\textstyle\f@size{\firstchoice@false #1} + } + { + \__math_tag_if_mathstyle:en{mathchoice-\int_use:N\g__math_mathchoice_int}{4} + \textdef@\textstyle\sf@size{\firstchoice@false #1} + } + { + \__math_tag_if_mathstyle:en{mathchoice-\int_use:N\g__math_mathchoice_int}{6} + \textdef@\textstyle \ssf@size{\firstchoice@false #1} + } + \check@mathfonts + }} + } + } + } +\AddToHook{package/amsbsy/after} + { + \def\pmb@@#1#2#3{\leavevmode\hbox_set:Nn\l__math_tmpa_box{xxx#3} + \dimen@-\box_wd:N\l__math_tmpa_box + \kern-.5\ex@\box_use:N\l__math_tmpa_box + \tag_mc_end:\tag_mc_begin:n{artifact} + \tag_mc_reset_box:N\l__math_tmpa_box + \kern\dimen@\kern.25\ex@\raise.4\ex@\box_use:N\l__math_tmpa_box + \kern\dimen@\kern.25\ex@\box_use_drop:N\l__math_tmpa_box + \tag_mc_end:\tag_mc_begin:n{} + } + \def\pmb@#1#2{\hbox_set:Nn\l__math_tmpa_box{$\m@th#1{#2}$} + \setboxz@h{$\m@th#1\mkern.5mu$}\pmbraise@\wdz@ + \binrel@{#2} + \dimen@-\box_wd:N\l__math_tmpa_box + \binrel@@{ + \mkern-.8mu\box_use:N\l__math_tmpa_box + \tag_mc_end:\tag_mc_begin:n{artifact} + \tag_mc_reset_box:N\l__math_tmpa_box + \kern\dimen@\mkern.4mu\raise\pmbraise@\box_use:N\l__math_tmpa_box + \kern\dimen@\mkern.4mu\box_use_drop:N\l__math_tmpa_box + \tag_mc_end:\tag_mc_begin:n{} + } + } + } \ExplSyntaxOff \endinput %% |