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

nicematrix package incompatible #179

Open mbertucci47 opened 4 months ago

mbertucci47 commented 4 months ago

The nicematrix package is incompatible with the tagging code. With math tagging loaded, the example

\begin{NiceTabular}{cc}
A & B \\
C & D
\end{NiceTabular}

errors with

! File ended while scanning use of \__math_grab_dollar:w.

Possibly related: #30

Without the math tagging code, that example produces parent-child warnings like

Package tagpdf Warning: Parent-Child 'StructTreeRoot/pdf' --> 'Table/pdf2'.
(tagpdf)                Relation is not allowed (struct 1, /StructTreeRoot -->
(tagpdf)                struct 5) on line 14

Full example:

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

\title{nicematrix tagging test}

\begin{document}

\begin{NiceTabular}{cc}
A & B \\
C & D
\end{NiceTabular}

\end{document}
mbertucci47 commented 2 months ago

I don't understand what's going on but the package author has added some code related to tagging, e.g. https://github.com/fpantigny/nicematrix/blob/3f1b1147cc1c083135a918d79905bde5e9faaa2d/nicematrix-code.dtx#L3597

fpantigny commented 1 day ago

I think that, with the current version of nicematrix (6.29b 2024-11-12) it works when the math tagging code is not used.

I will investigate to search where is the interaction with the math tagging code.