diff --git a/luamml-patches-amsmath.sty b/luamml-patches-amsmath.sty index fa6ec7e..f8933c4 100644 --- a/luamml-patches-amsmath.sty +++ b/luamml-patches-amsmath.sty @@ -406,10 +406,3 @@ } } } - -\cs_set:Npn \env@cases { - \let \@ifnextchar \new@ifnextchar - \left \lbrace - \def \arraystretch {1.2} - \array {@{}l@{\quad \luamml_flag_ignore:}l@{}} -} diff --git a/luamml-patches-kernel.sty b/luamml-patches-kernel.sty index e03a991..457d14d 100644 --- a/luamml-patches-kernel.sty +++ b/luamml-patches-kernel.sty @@ -34,6 +34,13 @@ \__luamml_kernel_phantom:Vnn \g__luamml_kernel_phantom_int } +\cs_set:Npn \env@cases { + \let \@ifnextchar \new@ifnextchar + \left \lbrace + \def \arraystretch {1.2} + \array {@{}l@{\quad \luamml_flag_ignore:}l@{}} +} + \@ifpackageloaded {unicode-math} {} { \cs_new:Npn \__luamml_kernel_define_character:Nnn #1#2#3 { \cs_set:cpx { \cs_to_str:N #1 ~ } { diff --git a/testfiles-lua/cases.mlr b/testfiles-lua/cases.mlr new file mode 100644 index 0000000..78aa953 --- /dev/null +++ b/testfiles-lua/cases.mlr @@ -0,0 +1,161 @@ + + + + + + 𝑎 + = + 𝑏 + + + + + + + + ( + + + + + + 1 + + + 0 + + + 0 + + + + + 0 + + + 1 + + + 0 + + + + + 0 + + + 0 + + + 1 + + + + + + ) + + = + + { + + + + + 1 + + + if  + + 𝑎 + = + 𝑏 + + + + + + 2 + + + else + + + + + + + + + 𝑥 + = + + + + 𝑏 + ± + + + + 𝑏 + 2 + + + 4 + 𝑎 + 𝑐 + + + + + 2 + 𝑎 + + + . + + + 𝑏 + + + + + 𝑎 + + + 𝑐 + _ + + + 𝑏 + _ + + + 𝑐 + + + + + + s + i + n + + ( + 𝑥 + ) + + + s + i + n + + ( + 𝑥 + + + 2 + 𝜋 + ) + = + 0 + diff --git a/testfiles-lua/cases.mlt b/testfiles-lua/cases.mlt new file mode 100644 index 0000000..a0bfb14 --- /dev/null +++ b/testfiles-lua/cases.mlt @@ -0,0 +1,43 @@ +\RequirePackage{pdfmanagement-testphase} +\DeclareDocumentMetadata{ + uncompress, + pdfversion = 2.0, +} +\documentclass{article} +\usepackage[l3build]{luamml-demo} +\usepackage{tagpdf} +\tagpdfsetup{ + activate-all, + interwordspace=true, +} + +\begin{document} +\tagstructbegin{tag=Document} +\LuaMMLTagAF{} { +\[ + \left(\begin{matrix} + 1 & 0 & 0 \\ + 0 & 1 & 0 \\ + 0 & 0 & 1 + \end{matrix}\right) + = + \begin{cases} + 1 & \mbox{if $a=b$}\\ + 2 & \mbox{else} + \end{cases} +\] +} +\LuaMMLTagAF{} { +\[ + x = \frac{-b \pm \sqrt{b^2-4ac}}{2a}. +\] +} +\LuaMMLTagAF{} { +\[ + \sum_a\underline c\dot bc' +\] +} + +Es gilt \LuaMMLTagAF{}{$\sin(x)-\sin(x+2\pi)=0$}. +\tagstructend +\end{document} diff --git a/testfiles-lua/test_xml.mlt b/testfiles-lua/test_xml.mlt index a732ade..3c72240 100644 --- a/testfiles-lua/test_xml.mlt +++ b/testfiles-lua/test_xml.mlt @@ -24,8 +24,8 @@ \end{pmatrix} = \begin{cases} - 1 & $if $a=b\\ - 2 & $else$ + 1 & \text{if $a=b$}\\ + 2 & \text{else} \end{cases} \] }