[latex3-commits] [latex3/latex2e] tagging-11-math: avoid tagging of fakemath, tagging issue 5 (935346c9)
github at latex-project.org
github at latex-project.org
Mon Sep 11 16:44:39 CEST 2023
Repository : https://github.com/latex3/latex2e
On branch : tagging-11-math
Link : https://github.com/latex3/latex2e/commit/935346c9e89909596dc4e820cda31354b2a88759
>---------------------------------------------------------------
commit 935346c9e89909596dc4e820cda31354b2a88759
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Sep 11 16:44:39 2023 +0200
avoid tagging of fakemath, tagging issue 5
>---------------------------------------------------------------
935346c9e89909596dc4e820cda31354b2a88759
required/latex-lab/changes.txt | 11 +-
required/latex-lab/latex-lab-math.dtx | 24 +++-
.../latex-lab/testfiles-math/mathcapture-002.tlg | 3 -
.../latex-lab/testfiles-math/mathcapture-017.lvt | 11 ++
.../latex-lab/testfiles-math/mathcapture-017.tlg | 155 +++++++++++++++++++++
5 files changed, 193 insertions(+), 11 deletions(-)
diff --git a/required/latex-lab/changes.txt b/required/latex-lab/changes.txt
index 0811c708..e447d813 100644
--- a/required/latex-lab/changes.txt
+++ b/required/latex-lab/changes.txt
@@ -1,10 +1,15 @@
2023-09-04 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
- * label-lab-new-or-1.dtx latex-lab-new-or-2.dtx
+ * latex-lab-math.dtx: fix below display skip, tagging issue #11
+ * latex-lab-math.dtx: allow to use it without tagging.
+ * latex-lab-math.dtx: avoid tagging as math if fakemath is detected, tagging issue #5.
+
+2023-09-04 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * label-lab-new-or-1.dtx latex-lab-new-or-2.dtx
fix position of kernel hook in \@makecol (tagpdf issue #58)
2023-09-04 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
- * documentmetadata-support.dtx: add debug key to load tagpdf-debug.
- * new latex-lab-namespace.dtx with role mappings
+ * documentmetadata-support.dtx: add debug key to load tagpdf-debug.
+ * new latex-lab-namespace.dtx with role mappings
2023-09-01 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
diff --git a/required/latex-lab/latex-lab-math.dtx b/required/latex-lab/latex-lab-math.dtx
index 8bd26847..3fdb96f8 100644
--- a/required/latex-lab/latex-lab-math.dtx
+++ b/required/latex-lab/latex-lab-math.dtx
@@ -310,11 +310,25 @@
{
\@@_process:nn { math } {#1} % $
% fairly simple this one
- \tagmcend %end P-chunk, in code: \tag_mc_end_push:
- \@kernel at math@begin
- #1 $
- \@kernel at math@end
- \tagmcbegin{} % restart P-chunk (whatsits in pdftex)
+% \end{macrocode}
+% We do not want math tagging in fakemath or when measuring,
+% so we imitate the test inside
+% \cs{@@_process:nn} for now, see https://github.com/latex3/tagging-project/issues/5
+% \begin{macrocode}
+ \legacy_if:nTF { measuring@ }
+ { #1 $ }
+ {
+ \tl_if_in:nnTF {#1} { \m at th }
+ { #1 $ }
+ {
+ \tagmcend %end P-chunk, in code: \tag_mc_end_push:
+ \@kernel at math@begin
+ #1 $
+ \@kernel at math@end
+ \tagmcbegin{} % restart P-chunk (whatsits in pdftex)
+ }
+ }
+
}
}
% \end{macrocode}
diff --git a/required/latex-lab/testfiles-math/mathcapture-002.tlg b/required/latex-lab/testfiles-math/mathcapture-002.tlg
index 868134f9..fa3023eb 100644
--- a/required/latex-lab/testfiles-math/mathcapture-002.tlg
+++ b/required/latex-lab/testfiles-math/mathcapture-002.tlg
@@ -11,9 +11,6 @@ Math env math
==> increment /P on input line ...
==> @endpe=false on input line ...
==> increment P on input line ...
-====>first-result=macro:->
-====>first-tmpmathcontent=macro:->
-====>formula has no subparts
==> increment /P on input line ...
==> @endpe=false on input line ...
==> increment P on input line ...
diff --git a/required/latex-lab/testfiles-math/mathcapture-017.lvt b/required/latex-lab/testfiles-math/mathcapture-017.lvt
new file mode 100644
index 00000000..d530fbda
--- /dev/null
+++ b/required/latex-lab/testfiles-math/mathcapture-017.lvt
@@ -0,0 +1,11 @@
+\DocumentMetadata{testphase={phase-III,math}}
+\input{regression-test}
+\documentclass{article}
+\usepackage{url}
+\begin{document}
+\START\showoutput
+
+\url{https://www.latex-project.org} %ok only text.
+
+$a=b$
+\end{document}
diff --git a/required/latex-lab/testfiles-math/mathcapture-017.tlg b/required/latex-lab/testfiles-math/mathcapture-017.tlg
new file mode 100644
index 00000000..5151b1c7
--- /dev/null
+++ b/required/latex-lab/testfiles-math/mathcapture-017.tlg
@@ -0,0 +1,155 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+====>first-result=macro:->a=b
+====>first-tmpmathcontent=macro:->
+====>formula has no subparts
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0
+.\hbox(0.0+0.0)x0.0
+..\kern -72.26999
+..\vbox(0.0+0.0)x0.0, glue set 72.26999fil
+...\kern -72.26999
+...\hbox(0.0+0.0)x0.0
+....\glue 0.0 plus 1.0fil minus 1.0fil
+...\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue 16.0
+.\vbox(617.0+0.0)x345.0, shifted 62.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\pdfrunninglinkoff
+...\pdfliteral page{/Artifact BMC}
+...\marks4{b-,5,-1,}
+...\marks4{b+,5,-1,}
+...\hbox(0.0+0.0)x345.0
+....\hbox(0.0+0.0)x345.0
+...\pdfliteral page{EMC}
+...\marks4{e-,5,1,}
+...\marks4{e+,5,1,}
+...\pdfrunninglinkon
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(550.0+0.0)x345.0, glue set 527.9436fil
+...\hbox(0.0+0.0)x0.0
+...\pdfinterwordspaceon
+...\write-{}
+...\glue(\topskip) 3.05556
+...\hbox(6.94444+2.22223)x345.0, glue set 177.25133fil
+....\write1{\newlabeldata{mcid-1}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{1}{tagmcid}{\__ref_attribute_tagmcid: }}}
+....\pdfliteral shipout page{/text <</MCID \flag_height:n {__tag/mcid}\flag_raise:n {__tag/mcid} >> BDC}
+....\hbox(0.0+0.0)x15.0
+....\mathon
+....\OT1/cmtt/m/n/10 h
+....\OT1/cmtt/m/n/10 t
+....\OT1/cmtt/m/n/10 t
+....\OT1/cmtt/m/n/10 p
+....\OT1/cmtt/m/n/10 s
+....\glue(\thickmuskip) 0.0
+....\OT1/cmtt/m/n/10 :
+....\penalty 500
+....\glue(\thickmuskip) 0.0
+....\OT1/cmtt/m/n/10 /
+....\glue(\medmuskip) 0.0
+....\OT1/cmtt/m/n/10 /
+....\penalty 700
+....\glue(\medmuskip) 0.0
+....\OT1/cmtt/m/n/10 w
+....\OT1/cmtt/m/n/10 w
+....\OT1/cmtt/m/n/10 w
+....\glue(\medmuskip) 0.0
+....\OT1/cmtt/m/n/10 .
+....\penalty 700
+....\glue(\medmuskip) 0.0
+....\OT1/cmtt/m/n/10 l
+....\OT1/cmtt/m/n/10 a
+....\OT1/cmtt/m/n/10 t
+....\OT1/cmtt/m/n/10 e
+....\OT1/cmtt/m/n/10 x
+....\OT1/cmtt/m/n/10 -
+....\hbox(0.0+0.0)x0.5, shifted 1.49998
+.....\kern0.0
+....\OT1/cmtt/m/n/10 p
+....\OT1/cmtt/m/n/10 r
+....\OT1/cmtt/m/n/10 o
+....\OT1/cmtt/m/n/10 j
+....\OT1/cmtt/m/n/10 e
+....\OT1/cmtt/m/n/10 c
+....\OT1/cmtt/m/n/10 t
+....\glue(\medmuskip) 0.0
+....\OT1/cmtt/m/n/10 .
+....\penalty 700
+....\glue(\medmuskip) 0.0
+....\OT1/cmtt/m/n/10 o
+....\OT1/cmtt/m/n/10 r
+....\OT1/cmtt/m/n/10 g
+....\mathoff
+....\pdfliteral page{EMC}
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\marks4{b-,1,5,text,,,}
+...\marks4{b+,1,5,text,,,}
+...\marks4{e-,1,5,}
+...\marks4{e+,1,5,}
+...\glue(\parskip) 0.0 plus 1.0
+...\glue(\parskip) 0.0
+...\glue(\baselineskip) 2.83333
+...\hbox(6.94444+0.0)x345.0, glue set 307.08923fil
+....\write1{\newlabeldata{mcid-2}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{2}{tagmcid}{\__ref_attribute_tagmcid: }}}
+....\pdfliteral shipout page{/text <</MCID \flag_height:n {__tag/mcid}\flag_raise:n {__tag/mcid} >> BDC}
+....\hbox(0.0+0.0)x15.0
+....\mathon
+....\pdfliteral page{EMC}
+....\write1{\newlabeldata{mcid-3}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{3}{tagmcid}{\__ref_attribute_tagmcid: }}}
+....\pdfliteral shipout page{/Formula <</MCID \flag_height:n {__tag/mcid}\flag_raise:n {__tag/mcid} >> BDC}
+....\OML/cmm/m/it/10 a
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\OT1/cmr/m/n/10 =
+....\penalty 500
+....\glue(\thickmuskip) 2.77771 plus 2.77771
+....\OML/cmm/m/it/10 b
+....\mathoff
+....\pdfliteral page{EMC}
+....\write1{\newlabeldata{mcid-4}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{4}{tagmcid}{\__ref_attribute_tagmcid: }}}
+....\pdfliteral shipout page{/text <</MCID \flag_height:n {__tag/mcid}\flag_raise:n {__tag/mcid} >> BDC}
+....\pdfliteral page{EMC}
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\marks4{b-,2,7,text,,,}
+...\marks4{b+,2,7,text,,,}
+...\marks4{e-,2,7,}
+...\marks4{e+,2,7,}
+...\marks4{b-,3,8,Formula,,,}
+...\marks4{b+,3,8,Formula,,,}
+...\marks4{e-,3,8,}
+...\marks4{e+,3,8,}
+...\marks4{b-,4,7,text,,,}
+...\marks4{b+,4,7,text,,,}
+...\marks4{e-,4,7,}
+...\marks4{e+,4,7,}
+...\glue 0.0 plus 1.0fil
+...\glue 0.0 plus -1.0fil
+...\kern 0.0
+...\hbox(0.0+0.0)x0.0
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\pdfrunninglinkoff
+..\pdfliteral page{/Artifact BMC}
+..\marks4{b-,6,-1,}
+..\marks4{b+,6,-1,}
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0
+...\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+....\glue 0.0 plus 1.0fil
+....\OT1/cmr/m/n/10 1
+....\glue 0.0 plus 1.0fil
+..\pdfliteral page{EMC}
+..\marks4{e-,6,1,}
+..\marks4{e+,6,1,}
+..\pdfrunninglinkon
+.\kern 0.0
+.\kern -633.0
+.\hbox(0.0+0.0)x0.0
+.\kern 633.0
+(mathcapture-017.aux)
More information about the latex3-commits
mailing list.