latex3 / tagging-project

Issues related to the tagging project
https://latex3.github.io/tagging-project/
LaTeX Project Public License v1.3c
39 stars 15 forks source link

cases package incompatible #347

Open mbertucci47 opened 3 months ago

mbertucci47 commented 3 months ago

The cases package errors with the math tagging code. The example

\DocumentMetadata
  {
    lang=en-US,
    pdfversion=2.0,
    pdfstandard=ua-2,
    testphase={phase-III,math,title,table,firstaid},
  }
\documentclass{article}

\usepackage{cases}

\title{cases tagging test}

\begin{document}

\begin{numcases}{|x|=}
x, & for $x \geq 0$\\
-x, & for $x < 0$
\end{numcases}

\end{document}

errors with

! File ended while scanning use of \__math_grab_dollardollar:w.
<inserted text> 
\par 
mbertucci47 commented 3 months ago

I just noticed latex-lab-mathpkg.ltx contains

\AddToHook{package/cases/after}{
  \RegisterMathEnvironment{subnumcases}
}

and adding

\RegisterMathEnvironment{numcases}

to the example above makes the error go away, but the tagging is still wrong (as it also is for subnumcases).