Skip to content

Commit

Permalink
move bBigg@ definition
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed Feb 10, 2025
1 parent f492e16 commit a590075
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 17 deletions.
1 change: 1 addition & 0 deletions required/latex-lab/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
* latex-lab-block.dtx, latex-lab-namespace.dtx: change tagging of verbatim.
Expand Down
18 changes: 16 additions & 2 deletions required/latex-lab/latex-lab-unicode-math.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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}
Expand Down
18 changes: 9 additions & 9 deletions texmf/tex/lualatex/luamml/luamml-patches-amsmath.sty
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 5 additions & 4 deletions texmf/tex/lualatex/luamml/luamml-patches-kernel.sty
Original file line number Diff line number Diff line change
Expand Up @@ -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 ~ } {
Expand All @@ -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}
}
2 changes: 1 addition & 1 deletion texmf/tex/lualatex/luamml/luamml-pdf.sty
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion texmf/tex/lualatex/luamml/luamml.sty
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit a590075

Please sign in to comment.