[latex3-commits] [latex3/latex2e] UF-firstaid-1393+tagging733: handle unnumbered theorems, latex3/tagging-project#736 (7955144ff)
github at latex-project.org
github at latex-project.org
Wed Oct 16 23:32:44 CEST 2024
Repository : https://github.com/latex3/latex2e
On branch : UF-firstaid-1393+tagging733
Link : https://github.com/latex3/latex2e/commit/7955144fff91dc37711c8b3cc80c6eb85126562c
>---------------------------------------------------------------
commit 7955144fff91dc37711c8b3cc80c6eb85126562c
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Wed Oct 16 23:32:44 2024 +0200
handle unnumbered theorems, latex3/tagging-project#736
>---------------------------------------------------------------
7955144fff91dc37711c8b3cc80c6eb85126562c
required/latex-lab/latex-lab-firstaid.dtx | 8 +-
.../testfiles-firstaid/test-amsthm-736.lvt | 20 +++
.../testfiles-firstaid/test-amsthm-736.tlg | 137 +++++++++++++++++++++
.../latex-lab/testfiles-firstaid/test-amsthm.tlg | 4 -
4 files changed, 163 insertions(+), 6 deletions(-)
diff --git a/required/latex-lab/latex-lab-firstaid.dtx b/required/latex-lab/latex-lab-firstaid.dtx
index 605b2ca49..118baccd7 100644
--- a/required/latex-lab/latex-lab-firstaid.dtx
+++ b/required/latex-lab/latex-lab-firstaid.dtx
@@ -181,9 +181,13 @@
\tagpdfparaOff
\mode_leave_vertical:
% \end{macrocode}
-% The anchor for links
+% The anchor for links. amsthm allows for unnumbered theorems so we have to test
+% for an empty counter.
+% \changes{v0.85h}{2024/10/16}{add test if counter is empty tagging/736}
% \begin{macrocode}
- \MakeLinkTarget{\l__block_thm_current_counter_tl}
+ \tl_if_empty:NTF \l__block_thm_current_counter_tl
+ {\MakeLinkTarget[theorem]{}}
+ {\MakeLinkTarget{\l__block_thm_current_counter_tl}}
\group_begin:
\normalfont
\the\thm at headfont \thm at indent
diff --git a/required/latex-lab/testfiles-firstaid/test-amsthm-736.lvt b/required/latex-lab/testfiles-firstaid/test-amsthm-736.lvt
new file mode 100644
index 000000000..8d7d0b68b
--- /dev/null
+++ b/required/latex-lab/testfiles-firstaid/test-amsthm-736.lvt
@@ -0,0 +1,20 @@
+% !Mode:: "TeX:DE:UTF-8:Main"
+
+\DocumentMetadata
+ {
+ testphase={phase-III,math,table,title,firstaid}
+ }
+\input{regression-test}
+\documentclass{article}
+\usepackage{amsthm}
+\usepackage{hyperref}
+
+\newtheorem*{theorem}{Theorem}
+
+\begin{document}
+\START\showoutput
+\begin{theorem}
+text
+\end{theorem}
+
+\end{document}
diff --git a/required/latex-lab/testfiles-firstaid/test-amsthm-736.tlg b/required/latex-lab/testfiles-firstaid/test-amsthm-736.tlg
new file mode 100644
index 000000000..39ad16f35
--- /dev/null
+++ b/required/latex-lab/testfiles-firstaid/test-amsthm-736.tlg
@@ -0,0 +1,137 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0
+.\hbox(0.0+0.0)x0.0
+..\pdfinterwordspaceon
+.\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
+.\vbox(0.0+0.0)x0.0, glue set - 14.99626fil
+..\kern 0.0
+..\kern 16.0
+..\kern -1.00374
+..\hbox(0.0+0.0)x0.0, glue set - 60.99626fil
+...\kern 0.0
+...\kern 62.0
+...\kern -1.00374
+...\pdfdest name{page.1} xyz
+...\pdfdest struct10 name{page.1} xyz
+...\penalty 10000
+...\glue 0.0 plus 1.0fil minus 1.0fil
+..\glue 0.0 plus 1.0fil minus 1.0fil
+.\glue(\lineskip) 0.0
+.\vbox(633.0+0.0)x407.0
+..\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-,4,-1,}
+....\marks4{b+,4,-1,}
+....\hbox(0.0+0.0)x345.0
+.....\hbox(0.0+0.0)x345.0
+....\pdfliteral page{EMC}
+....\marks4{e-,4,2,}
+....\marks4{e+,4,2,}
+....\pdfrunninglinkon
+...\glue 25.0
+...\glue(\lineskip) 0.0
+...\vbox(550.0+0.0)x345.0, glue set 531.94318fil
+....\hbox(0.0+0.0)x0.0
+....\write-{}
+....\pdfdest name{Doc-Start} xyz
+....\pdfdest struct10 name{Doc-Start} xyz
+....\glue(\topskip) 3.0989
+....\hbox(6.9011+0.0)x345.0, glue set 275.93791fil
+.....\hbox(0.0+0.0)x0.0
+.....\penalty 10000
+.....\hbox(0.0+0.0)x0.0
+......\hbox(0.0+0.0)x0.0, shifted -12.0
+.......\pdfdest name{theorem*.1} xyz
+.......\pdfdest struct13 name{theorem*.1} xyz
+.......\penalty 10000
+.....\write1{\new at label@record{mcid-1}{{tagabspage}{\__property_code_tagabspage: }{tagmcabs}{1}{tagmcid}{\__property_code_tagmcid: }}}
+.....\pdfliteral shipout page{/Caption <</MCID \flag_height:n {__tag/mcid}\flag_raise:n {__tag/mcid} >> BDC}
+.....\T1/cmr/bx/n/10 T
+.....\T1/cmr/bx/n/10 h
+.....\T1/cmr/bx/n/10 e
+.....\T1/cmr/bx/n/10 o
+.....\T1/cmr/bx/n/10 r
+.....\T1/cmr/bx/n/10 e
+.....\T1/cmr/bx/n/10 m
+.....\pdfliteral page{EMC}
+.....\write1{\new at label@record{mcid-2}{{tagabspage}{\__property_code_tagabspage: }{tagmcabs}{2}{tagmcid}{\__property_code_tagmcid: }}}
+.....\pdfliteral shipout page{/Caption <</MCID \flag_height:n {__tag/mcid}\flag_raise:n {__tag/mcid} >> BDC}
+.....\T1/cmr/bx/n/10 .
+.....\pdfliteral page{EMC}
+.....\glue 5.0 plus 1.0 minus 1.0
+.....\write1{\new at label@record{mcid-3}{{tagabspage}{\__property_code_tagabspage: }{tagmcabs}{3}{tagmcid}{\__property_code_tagmcid: }}}
+.....\penalty 10000
+.....\glue 0.0
+.....\pdfliteral shipout page{/text <</MCID \flag_height:n {__tag/mcid}\flag_raise:n {__tag/mcid} >> BDC}
+.....\T1/cmr/m/it/10 t
+.....\T1/cmr/m/it/10 e
+.....\T1/cmr/m/it/10 x
+.....\T1/cmr/m/it/10 t
+.....\pdfliteral page{EMC}
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\marks4{b-,1,6,Caption,,,}
+....\marks4{b+,1,6,Caption,,,}
+....\marks4{e-,1,6,}
+....\marks4{e+,1,6,}
+....\marks4{b-,2,6,Caption,,,}
+....\marks4{b+,2,6,Caption,,,}
+....\marks4{e-,2,6,}
+....\marks4{e+,2,6,}
+....\marks4{b-,3,8,text,,,}
+....\marks4{b+,3,8,text,,,}
+....\marks4{e-,3,8,}
+....\marks4{e+,3,8,}
+....\penalty -51
+....\glue 8.0 plus 2.0 minus 4.0
+....\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-,5,-1,}
+...\marks4{b+,5,-1,}
+...\glue(\baselineskip) 23.5849
+...\hbox(6.4151+0.0)x345.0
+....\hbox(6.4151+0.0)x345.0, glue set 170.00061fil
+.....\glue 0.0 plus 1.0fil
+.....\T1/cmr/m/n/10 1
+.....\glue 0.0 plus 1.0fil
+...\pdfliteral page{EMC}
+...\marks4{e-,5,2,}
+...\marks4{e+,5,2,}
+...\pdfrunninglinkon
+.\kern 0.0
+.\kern 0.0
+.\kern -633.0
+.\hbox(0.0+0.0)x0.0
+.\kern 633.0
+(test-amsthm-736.aux)
+Package tagpdf Info: Finalizing the tagging structure:
+(tagpdf) Writing out ~8 structure objects
+(tagpdf) with ~5 'MC' leaf nodes.
+(tagpdf) Be patient if there are lots of objects!
+Package tagpdf Info: writing ParentTree
+Package tagpdf Info: writing IDTree
+Package tagpdf Info: writing RoleMap
+Package tagpdf Info: writing ClassMap
+Package tagpdf Info: writing NameSpaces
+Package tagpdf Info: writing StructElems
+Package tagpdf Info: writing Root
diff --git a/required/latex-lab/testfiles-firstaid/test-amsthm.tlg b/required/latex-lab/testfiles-firstaid/test-amsthm.tlg
index f46da3efc..5c29a7b00 100644
--- a/required/latex-lab/testfiles-firstaid/test-amsthm.tlg
+++ b/required/latex-lab/testfiles-firstaid/test-amsthm.tlg
@@ -116,8 +116,6 @@ The sequence \g__tag_struct_tag_stack_seq contains the items (without outer brac
> {{theorem-like}{Sect}}
> {{Document}{Document}}
> {{Root}{StructTreeRoot}}.
-Package hyperref Warning: Counter '' or the representation '\theH`
-(hyperref) don't exist. No target created. on input line ....
Package tagpdf Info: Parent-Child 'Sect' --> 'Caption'.
(tagpdf) Relation is 1 (='0..n')
(tagpdf) Rolemapped from 'Sect/pdf2' --> 'Caption/pdf2' on line ...
@@ -197,8 +195,6 @@ The sequence \g__tag_struct_tag_stack_seq contains the items (without outer brac
> {{theorem-like}{Sect}}
> {{Document}{Document}}
> {{Root}{StructTreeRoot}}.
-Package hyperref Warning: Counter '' or the representation '\theH`
-(hyperref) don't exist. No target created. on input line ....
Package tagpdf Info: Parent-Child 'Sect' --> 'Caption'.
(tagpdf) Relation is 1 (='0..n')
(tagpdf) Rolemapped from 'Sect/pdf2' --> 'Caption/pdf2' on line ...
More information about the latex3-commits
mailing list.