From 1fb7f97255b3cf9ef59e0cad5e1eaea0411a4e9f Mon Sep 17 00:00:00 2001 From: Ulrike Fischer Date: Thu, 3 Oct 2024 00:16:12 +0200 Subject: [PATCH] Resolve tagging issue 711 (#1483) * disable paratagging in inline math too, latex3/tagging-project#711 * update test * add test for latex/tagging-project#711 --- required/latex-lab/changes.txt | 4 +++ required/latex-lab/latex-lab-math.dtx | 9 ++++--- .../testfiles-math/mathcapture-019.tlg | 26 +------------------ .../testfiles-math/mtag-006-gh711.lvt | 14 ++++++++++ .../testfiles-math/mtag-006-gh711.tlg | 0 5 files changed, 25 insertions(+), 28 deletions(-) create mode 100644 required/latex-lab/testfiles-math/mtag-006-gh711.lvt create mode 100644 required/latex-lab/testfiles-math/mtag-006-gh711.tlg diff --git a/required/latex-lab/changes.txt b/required/latex-lab/changes.txt index c48d7edd9..8dbe56d1d 100644 --- a/required/latex-lab/changes.txt +++ b/required/latex-lab/changes.txt @@ -1,3 +1,7 @@ +2024-10-02 Ulrike Fischer + * latex-lab-math.dtx (subsection{Sockets}): + disable paratagging in inline math (tagging/711) + 2024-09-30 Ulrike Fischer * latex-lab-footnotes.dtx: remove unneeded NonStruct structure. diff --git a/required/latex-lab/latex-lab-math.dtx b/required/latex-lab/latex-lab-math.dtx index 449326a87..429e22773 100644 --- a/required/latex-lab/latex-lab-math.dtx +++ b/required/latex-lab/latex-lab-math.dtx @@ -19,8 +19,8 @@ % for those people who are interested or want to report an issue. % % -\def\ltlabmathdate{2024-09-30} -\def\ltlabmathversion{0.6f} +\def\ltlabmathdate{2024-10-02} +\def\ltlabmathversion{0.6g} % %<*driver> \documentclass{l3doc} @@ -1192,7 +1192,10 @@ \socket_new_plug:nnn {tagsupport/math/inline/formula/begin} {default} - { +% \end{macrocode} +% \changes{v0.6g}{2024-10-02}{disable paratagging, issue \#711} +% \begin{macrocode} + { \tagpdfparaOff \tag_socket_use:n{math/content} \tag_socket_use:n{math/struct/begin} % \end{macrocode} diff --git a/required/latex-lab/testfiles-math/mathcapture-019.tlg b/required/latex-lab/testfiles-math/mathcapture-019.tlg index 4848e256e..40f411f06 100644 --- a/required/latex-lab/testfiles-math/mathcapture-019.tlg +++ b/required/latex-lab/testfiles-math/mathcapture-019.tlg @@ -44,18 +44,6 @@ x+\begin {minipage}[t]{1cm}some\\thing\end {minipage} ====>first-result=macro:->x+\begin {minipage}[t]{1cm}some\\thing\end {minipage} ====>first-tmpmathcontent=macro:-> ====>formula has no subparts -Package tagpdf Warning: Parent-Child 'P/' --> 'Div/pdf2'. -(tagpdf) Relation is not allowed (struct 16, /text --> struct -(tagpdf) 18) on line ... -Package tagpdf Warning: Parent-Child 'P/' --> 'text-unit/user'. -(tagpdf) Relation is not allowed (struct 18, /Div --> struct -(tagpdf) 19) on line ... -Package tagpdf Warning: Parent-Child 'P/' --> 'text/user'. -(tagpdf) Relation is not allowed (struct 19, /text-unit --> -(tagpdf) struct 20) on line ... -Package tagpdf Warning: Parent-Child 'P/' --> 'text/user'. -(tagpdf) Relation is not allowed (struct 16, /text --> struct -(tagpdf) 21) on line ... ----------------------------------- Math env math \protect \shortstack {a\\b} @@ -74,22 +62,10 @@ Math env math ====>first-result=macro:->\protect \parbox {2cm}{a\\b}Z ====>first-tmpmathcontent=macro:-> ====>formula has no subparts -Package tagpdf Warning: Parent-Child 'P/' --> 'Div/pdf2'. -(tagpdf) Relation is not allowed (struct 16, /text --> struct -(tagpdf) 25) on line ... -Package tagpdf Warning: Parent-Child 'P/' --> 'text-unit/user'. -(tagpdf) Relation is not allowed (struct 25, /Div --> struct -(tagpdf) 26) on line ... -Package tagpdf Warning: Parent-Child 'P/' --> 'text/user'. -(tagpdf) Relation is not allowed (struct 26, /text-unit --> -(tagpdf) struct 27) on line ... -Package tagpdf Warning: Parent-Child 'P/' --> 'text/user'. -(tagpdf) Relation is not allowed (struct 16, /text --> struct -(tagpdf) 28) on line ... [1 ] (mathcapture-019.aux) Package tagpdf Info: Finalizing the tagging structure: -(tagpdf) Writing out ~28 structure objects +(tagpdf) Writing out ~26 structure objects (tagpdf) with ~29 'MC' leaf nodes. (tagpdf) Be patient if there are lots of objects! Package tagpdf Info: writing ParentTree diff --git a/required/latex-lab/testfiles-math/mtag-006-gh711.lvt b/required/latex-lab/testfiles-math/mtag-006-gh711.lvt new file mode 100644 index 000000000..67d02aac7 --- /dev/null +++ b/required/latex-lab/testfiles-math/mtag-006-gh711.lvt @@ -0,0 +1,14 @@ +\DocumentMetadata{testphase={phase-III,math,table}} +\input{regression-test} +\RequirePackage{tagpdf-debug} +\documentclass{article} +\begin{document} + +$ + a = + \mbox{\LaTeX \begin{tabular}{l}a\end{tabular}} + \begin{tabular}{l}b\end{tabular} + \parbox{3cm}{some text} +$ + \ShowTagging{debug/structures} +\end{document} diff --git a/required/latex-lab/testfiles-math/mtag-006-gh711.tlg b/required/latex-lab/testfiles-math/mtag-006-gh711.tlg new file mode 100644 index 000000000..e69de29bb