From a59007518be676407eb29246cc692df39011734a Mon Sep 17 00:00:00 2001 From: Ulrike Fischer Date: Mon, 10 Feb 2025 17:02:22 +0100 Subject: [PATCH] move bBigg@ definition --- required/latex-lab/changes.txt | 1 + required/latex-lab/latex-lab-unicode-math.dtx | 18 ++++++++++++++++-- .../lualatex/luamml/luamml-patches-amsmath.sty | 18 +++++++++--------- .../lualatex/luamml/luamml-patches-kernel.sty | 9 +++++---- texmf/tex/lualatex/luamml/luamml-pdf.sty | 2 +- texmf/tex/lualatex/luamml/luamml.sty | 2 +- 6 files changed, 33 insertions(+), 17 deletions(-) diff --git a/required/latex-lab/changes.txt b/required/latex-lab/changes.txt index cbb127b63..bfcf65eef 100644 --- a/required/latex-lab/changes.txt +++ b/required/latex-lab/changes.txt @@ -10,6 +10,7 @@ mathml structure elements are used. * use \@math@level to identify nested math * added latex-lab-unicode-math.dtx/ltx for unicode-math fixes + * redefine \bBigg@ if unicode-math is used. 2024-01-30 Ulrike Fischer * latex-lab-block.dtx, latex-lab-namespace.dtx: change tagging of verbatim. diff --git a/required/latex-lab/latex-lab-unicode-math.dtx b/required/latex-lab/latex-lab-unicode-math.dtx index eb364a44a..aacae47c5 100644 --- a/required/latex-lab/latex-lab-unicode-math.dtx +++ b/required/latex-lab/latex-lab-unicode-math.dtx @@ -67,8 +67,8 @@ % \begin{macrocode} \ProvidesExplFile {latex-lab-unicode-math.ltx} - {2024-12-09} - {0.1a} + {2025-02-00} + {0.1b} {unicode-math adaptions} % \end{macrocode} % \subsection{Sockets} @@ -81,6 +81,20 @@ } % \end{macrocode} % +% \subsection{Delimiters} +% +% Extensible delimiters set with \cs{bigl}, \cs{Bigl} etc use boxes in their +% definitions. This gives wrong structure Elements if used with luamml. +% We therefore redefine the internal amsmath command +% to make use of the luatex primitive. +% \changes{v0.1b}{2025-02-10}{redefine \cs{bBigg@}} +% \begin{macro}{\bBigg@} +% \begin{macrocode} +\def\bBigg@#1#2 + {{\ensuremath {\Uvextensible height~#1 \big@size axis~exact~#2}}} +% \end{macrocode} +% \end{macro} +% % \subsection{Roots} % Roots have two problems in tagging: At first, if mathml structure elements are % used the root symbol is given twice: as unicode char and through the \texttt{msqrt} diff --git a/texmf/tex/lualatex/luamml/luamml-patches-amsmath.sty b/texmf/tex/lualatex/luamml/luamml-patches-amsmath.sty index 6baf9499e..66ffdbec9 100644 --- a/texmf/tex/lualatex/luamml/luamml-patches-amsmath.sty +++ b/texmf/tex/lualatex/luamml/luamml-patches-amsmath.sty @@ -410,12 +410,12 @@ \def \arraystretch {1.2} \array {@{}l@{\quad \luamml_ignore:}l@{}} } - } %end package test - -\cs_set:Npn \bBigg@ #1 #2 { - { - \ensuremath { - \Uvextensible height~#1 \big@size axis~exact~#2 - } - } -} + \PackageInfo{luamml}{patching~\string\bBigg@} + \cs_set:Npn \bBigg@ #1 #2 { + { + \ensuremath { + \Uvextensible height~#1 \big@size axis~exact~#2 + } + } + } +} %end package test diff --git a/texmf/tex/lualatex/luamml/luamml-patches-kernel.sty b/texmf/tex/lualatex/luamml/luamml-patches-kernel.sty index 36824a8c7..bcd30646b 100644 --- a/texmf/tex/lualatex/luamml/luamml-patches-kernel.sty +++ b/texmf/tex/lualatex/luamml/luamml-patches-kernel.sty @@ -52,8 +52,13 @@ \finph@nt } } + \IfFileLoadedT {latex-lab-math.ltx} { + \RequirePackage{luamml-patches-lab-math} + } } +% This is not moved to latex-lab for now. It doesn't work properly with structure elements +% active: the content is outside of the math. \@ifpackageloaded {unicode-math} {} { \cs_new:Npn \__luamml_kernel_define_character:Nnn #1#2#3 { \cs_set:cpx { \cs_to_str:N #1 ~ } { @@ -77,7 +82,3 @@ \__luamml_kernel_define_character:Nnn \longleftrightarrow {3} {27f7} \__luamml_kernel_define_character:Nnn \longmapsto {4} {27fc} } - -\IfFileLoadedT {latex-lab-math.ltx} { - \RequirePackage{luamml-patches-lab-math} -} diff --git a/texmf/tex/lualatex/luamml/luamml-pdf.sty b/texmf/tex/lualatex/luamml/luamml-pdf.sty index d81751996..a97c626b0 100644 --- a/texmf/tex/lualatex/luamml/luamml-pdf.sty +++ b/texmf/tex/lualatex/luamml/luamml-pdf.sty @@ -246,7 +246,7 @@ \NewSocket{tagsupport/math/luamml/mtable/tag/save}{0} \NewSocket{tagsupport/math/luamml/mtable/tag/set}{0} } -\str_if_exist:cF { l__socket_tagsupport/math/luamml/mtable/tag/begin_plug_str } +\str_if_exist:cF { l__socket_tagsupport/math/display/tag/begin_plug_str } { \NewSocket{tagsupport/math/display/tag/begin}{0} \NewSocket{tagsupport/math/display/tag/end}{0} diff --git a/texmf/tex/lualatex/luamml/luamml.sty b/texmf/tex/lualatex/luamml/luamml.sty index a9da0fbf2..abc3579ea 100644 --- a/texmf/tex/lualatex/luamml/luamml.sty +++ b/texmf/tex/lualatex/luamml/luamml.sty @@ -241,7 +241,7 @@ } \AssignSocketPlug{tagsupport/math/luamml/mtable/tag/set}{luamml} -\str_if_exist:cF { l__socket_tagsupport/math/luamml/mtable/tag/begin_plug_str } +\str_if_exist:cF { l__socket_tagsupport/math/display/tag/begin_plug_str } { \NewSocket{tagsupport/math/display/tag/begin}{0} \NewSocket{tagsupport/math/display/tag/end}{0}