[latex3-commits] [latex3/latex2e] latexlab/tagging-9: correct target setting in theorems (a23fc73b)

github at latex-project.org github at latex-project.org
Sat Sep 2 20:51:22 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : latexlab/tagging-9
Link       : https://github.com/latex3/latex2e/commit/a23fc73b344cf80939aa73b9278334c8101c6076

>---------------------------------------------------------------

commit a23fc73b344cf80939aa73b9278334c8101c6076
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sat Sep 2 20:51:22 2023 +0200

    correct target setting in theorems


>---------------------------------------------------------------

a23fc73b344cf80939aa73b9278334c8101c6076
 required/latex-lab/latex-lab-block.dtx             |  27 +-
 .../testfiles-block/blocks-theorem-04.luatex.tlg   | 385 ++++++++++++++++++++
 .../testfiles-block/blocks-theorem-04.lvt          |  37 ++
 .../testfiles-block/blocks-theorem-04.tlg          | 392 +++++++++++++++++++++
 4 files changed, 839 insertions(+), 2 deletions(-)

diff --git a/required/latex-lab/latex-lab-block.dtx b/required/latex-lab/latex-lab-block.dtx
index 639f5deb..7210ef3b 100644
--- a/required/latex-lab/latex-lab-block.dtx
+++ b/required/latex-lab/latex-lab-block.dtx
@@ -1389,20 +1389,42 @@
 %    \end{macrocode}
 %  \end{macro}
 %
+%  \begin{macro}{\@thm}
+%  \cs{@thm} executes \cs{refstepcounter} too early for hyperref
+%  and structure destinations: the generated target is outside the structure
+%  and can be separated from the theorem by a page break. We therefore move
+%  the anchor setting into \cs{@begintheorem}. \cs{@begintheorem} doesn't
+%  currently get the name of the counter as argument, so we store it in variable
+%  for now, to be able to pass it along.
+%    \begin{macrocode}
+\tl_new:N \l_@@_thm_current_counter_tl
+\def\@thm#1#2{%
+  \@kernel at refstepcounter{#1}
+  \tl_set:Nn \l_@@_thm_current_counter_tl{#1}
+  \@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}}
+%    \end{macrocode}
+%  To avoid that hyperref overwrites the definition again we must its patch:     
+%    \begin{macrocode}
+\def\hyper at nopatch@thm{}
+%    \end{macrocode}
+%  \end{macro}
+%  
 %  \begin{macro}{\@begintheorem,\@opargbegintheorem}
 %
 %    The \cs{@thm} command expands to either \cs{@beginthorem} or
 %    \cs{@opargbegintheorem}. For the moment we stick with this as it
-%    will help with the transion. But instead of using a
+%    will help with the transition. But instead of using a
 %    \env{trivlist} we use a blockenv and some tagging for the title
 %    (as a Caption).
 %    We do not want potential tagging from \cs{textbf} here,
-%    so we use \cs{bfseries} to set the font.
+%    so we use \cs{bfseries} to set the font. The commands set also the link targets
+%    which should be inside the main structure.
 %    \begin{macrocode}
 \def\@begintheorem#1#2{
   \UseInstance{blockenv}{theorem}{}
   \tagpdfparaOff
   \mode_leave_vertical: 
+  \MakeLinkTarget{\l_@@_thm_current_counter_tl} 
   \tag_struct_begin:n{tag=Caption}
    \group_begin:
    \bfseries
@@ -1432,6 +1454,7 @@
   \UseInstance{blockenv}{theorem}{}
   \tagpdfparaOff
   \mode_leave_vertical:  
+  \MakeLinkTarget{\l_@@_thm_current_counter_tl}
   \tag_struct_begin:n{tag=Caption}
    \group_begin:
    \bfseries 
diff --git a/required/latex-lab/testfiles-block/blocks-theorem-04.luatex.tlg b/required/latex-lab/testfiles-block/blocks-theorem-04.luatex.tlg
new file mode 100644
index 00000000..0e919581
--- /dev/null
+++ b/required/latex-lab/testfiles-block/blocks-theorem-04.luatex.tlg
@@ -0,0 +1,385 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+==> theorem-like-env-start
+==> use instance: displayblock-0
+Package tagpdf Info: Parent-Child 'Document' --> 'Sect'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Document' --> 'theorem-like' on line ...
+Package tagpdf Info: Parent-Child 'Sect' --> 'Caption'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'Caption' on line ...
+Package tagpdf Info: Parent-Child 'Caption' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Caption' --> 'MC' on line ...
+Package tagpdf Info: Parent-Child 'Caption' --> 'Lbl'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Caption' --> 'Lbl' on line ...
+Package tagpdf Info: Parent-Child 'Lbl' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Lbl' --> 'MC' on line ...
+Package tagpdf Info: closing structure 6 tagged /Lbl
+Package tagpdf Info: Parent-Child 'Caption' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Caption' --> 'MC' on line ...
+Package tagpdf Info: closing structure 5 tagged /Caption
+Package tagpdf Info: Parent-Child 'Sect' --> 'Part'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'text-unit' on line ...
+==> increment P on input line ...
+Package tagpdf Info: Parent-Child 'Sect' --> 'P'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'text' on line ...
+Package tagpdf Info: Parent-Child 'P' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'P' --> 'MC' on line ...
+==> increment /P on input line ...
+Package tagpdf Info: closing structure 8 tagged /text
+Package tagpdf Info: closing structure 7 tagged /text-unit
+==> blockenv common ending on input line ...
+==> block-end on input line ...
+Package tagpdf Info: closing structure 4 tagged /theorem-like
+==> theorem-like-env-start
+==> use instance: displayblock-0
+Package tagpdf Info: Parent-Child 'Document' --> 'Sect'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Document' --> 'theorem-like' on line ...
+Package tagpdf Info: Parent-Child 'Sect' --> 'Caption'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'Caption' on line ...
+Package tagpdf Info: Parent-Child 'Caption' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Caption' --> 'MC' on line ...
+Package tagpdf Info: Parent-Child 'Caption' --> 'Lbl'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Caption' --> 'Lbl' on line ...
+Package tagpdf Info: Parent-Child 'Lbl' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Lbl' --> 'MC' on line ...
+Package tagpdf Info: closing structure 11 tagged /Lbl
+Package tagpdf Info: closing structure 10 tagged /Caption
+Package tagpdf Info: Parent-Child 'Sect' --> 'Part'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'text-unit' on line ...
+==> increment P on input line ...
+Package tagpdf Info: Parent-Child 'Sect' --> 'P'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'text' on line ...
+Package tagpdf Info: Parent-Child 'P' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'P' --> 'MC' on line ...
+Package tagpdf Info: text has been pushed to the mc stack
+Package tagpdf Info: Parent-Child 'P' --> 'Link'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'P' --> 'Link' on line ...
+Package tagpdf Info: Parent-Child 'Link' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Link' --> 'MC' on line ...
+Package tagpdf Info: closing structure 14 tagged /Link
+Package tagpdf Info: text has been removed from the mc stack
+Package tagpdf Info: Parent-Child 'P' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'P' --> 'MC' on line ...
+==> blockenv common ending on input line ...
+==> increment /P on input line ...
+Package tagpdf Info: closing structure 13 tagged /text
+Package tagpdf Info: closing structure 12 tagged /text-unit
+==> block-end on input line ...
+Package tagpdf Info: closing structure 9 tagged /theorem-like
+Package tagpdf Info: -1 has been pushed to the mc stack
+Package tagpdf Info: -1 has been removed from the mc stack
+Package tagpdf Info: -1 has been pushed to the mc stack
+Package tagpdf Info: -1 has been removed from the mc stack
+tagpdf: INFO TAG-NOT-TAGGED: this has not been tagged, using artifact
+tagpdf: INFO TAG-NOT-TAGGED: this has not been tagged, using artifact
+tagpdf: INFO TAG-NOT-TAGGED: this has not been tagged, using artifact
+tagpdf: INFO TAG-NOT-TAGGED: this has not been tagged, using artifact
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0, direction TLT
+.\hbox(0.0+0.0)x0.0, direction TLT
+.\hbox(0.0+0.0)x0.0, direction TLT
+..\kern-72.26999
+..\vbox(0.0+0.0)x0.0, glue set 72.26999fil, direction TLT
+...\kern-72.26999
+...\hbox(0.0+0.0)x0.0, direction TLT
+....\pdfliteral page <lua data reference ...>
+....\latelua0{ltx.__pdf.backend_ThisPage_gpush(tex.count["g_shipout_readonly_int"])}
+....\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, direction TLT
+..\kern0.0
+..\kern16.0
+..\kern-1.00374
+..\hbox(0.0+0.0)x0.0, glue set - 60.99626fil, direction TLT
+...\kern0.0
+...\kern62.0
+...\kern-1.00374
+...\pdfdest name{page.1} xyz
+...\pdfdest 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, direction TLT
+..\glue 16.0
+..\vbox(617.0+0.0)x345.0, shifted 62.0, direction TLT
+...\vbox(12.0+0.0)x345.0, glue set 12.0fil, direction TLT
+....\glue 0.0 plus 1.0fil
+....\pdflinkstate 1
+....\hbox(0.0+0.0)x345.0, direction TLT
+.....\hbox(0.0+0.0)x345.0, direction TLT
+....\pdflinkstate 0
+...\glue 25.0
+...\glue(\lineskip) 0.0
+...\vbox(550.0+0.0)x345.0, glue set 507.94574fil, direction TLT
+....\latelua0{ltx.__pdf.Page.Resources.ExtGState=true}
+....\latelua0{ltx.pdf.Page_Resources_gpush(tex.count["g_shipout_readonly_int"])}
+....\write-{}
+....\pdfdest name{Doc-Start} xyz
+....\pdfdest name{Doc-Start} xyz
+....\glue(\topskip) 2.5
+....\hbox(7.5+2.5)x345.0, glue set 104.19038fil, direction TLT
+.....\localpar
+......\localinterlinepenalty=0
+......\localbrokenpenalty=0
+......\localleftbox=null
+......\localrightbox=null
+.....\hbox(0.0+0.0)x0.0, direction TLT
+.....\penalty 10000
+.....\hbox(0.0+0.0)x0.0, direction TLT
+......\hbox(0.0+0.0)x0.0, shifted -12.0, direction TLT
+.......\pdfdest name{thm.0.1} xyz
+.......\pdfdest name{thm.0.1} xyz
+.......\penalty 10000
+.....\pdfliteral page <lua data reference ...>
+.....\pdfliteral page <lua data reference ...>
+.....\OT1/cmr/bx/n/10 T
+.....\OT1/cmr/bx/n/10 h
+.....\OT1/cmr/bx/n/10 e
+.....\discretionary (penalty 50)
+......< \OT1/cmr/bx/n/10 -
+.....\OT1/cmr/bx/n/10 o
+.....\discretionary (penalty 50)
+......< \OT1/cmr/bx/n/10 -
+.....\OT1/cmr/bx/n/10 r
+.....\OT1/cmr/bx/n/10 e
+.....\OT1/cmr/bx/n/10 m
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.50331 plus 1.91666 minus 1.27777
+.....\pdfliteral page <lua data reference ...>
+.....\pdfliteral page <lua data reference ...>
+.....\OT1/cmr/bx/n/10 0
+.....\OT1/cmr/bx/n/10 .
+.....\OT1/cmr/bx/n/10 1
+.....\pdfliteral page <lua data reference ...>
+.....\pdfliteral page <lua data reference ...>
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.50331 plus 1.91666 minus 1.27777
+.....\OT1/cmr/bx/n/10 (
+.....\OT1/cmr/bx/n/10 I
+.....\OT1/cmr/bx/n/10 t
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.50331 plus 1.91666 minus 1.27777
+.....\OT1/cmr/bx/n/10 h
+.....\OT1/cmr/bx/n/10 a
+.....\OT1/cmr/bx/n/10 s
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.50331 plus 1.91666 minus 1.27777
+.....\OT1/cmr/bx/n/10 a
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.50331 plus 1.91666 minus 1.27777
+.....\OT1/cmr/bx/n/10 n
+.....\OT1/cmr/bx/n/10 a
+.....\OT1/cmr/bx/n/10 m
+.....\OT1/cmr/bx/n/10 e
+.....\OT1/cmr/bx/n/10 )
+.....\pdfliteral page <lua data reference ...>
+.....\pdfliteral page <lua data reference ...>
+.....\TU/lmr/m/n/10  
+.....\glue 1.67
+.....\write1{\newlabel{thm:B}{{0.1}{\thepage }{It has a name}{thm.0.1}{}}}
+.....\penalty 10000
+.....\glue 0.0
+.....\OT1/cmr/m/it/10 A
+.....\kern-0.25557 (font)
+.....\OT1/cmr/m/it/10 n
+.....\discretionary (penalty 50)
+......< \OT1/cmr/m/it/10 -
+.....\OT1/cmr/m/it/10 o
+.....\OT1/cmr/m/it/10 t
+.....\OT1/cmr/m/it/10 h
+.....\OT1/cmr/m/it/10 e
+.....\OT1/cmr/m/it/10 r
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.24774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 t
+.....\OT1/cmr/m/it/10 h
+.....\OT1/cmr/m/it/10 e
+.....\discretionary (penalty 50)
+......< \OT1/cmr/m/it/10 -
+......= \kern-0.51112 (font)
+.....\OT1/cmr/m/it/10 o
+.....\discretionary (penalty 50)
+......< \OT1/cmr/m/it/10 -
+.....\OT1/cmr/m/it/10 r
+.....\kern-0.51112 (font)
+.....\OT1/cmr/m/it/10 e
+.....\OT1/cmr/m/it/10 m
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.24774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 .
+.....\kern1.53333
+.....\OT1/cmr/m/it/10 .
+.....\kern1.53333
+.....\OT1/cmr/m/it/10 .
+.....\kern1.53333
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\penalty -51
+....\glue 10.0 plus 3.0 minus 5.0
+....\glue -12.5 plus -3.0 minus -5.0
+....\penalty -51
+....\glue 2.5
+....\glue 10.0 plus 3.0 minus 5.0
+....\glue -10.0 plus -3.0 minus -5.0
+....\glue 6.0 plus 1.0 minus 4.0
+....\glue(\parskip) 4.0 plus 2.0 minus 1.0
+....\glue(\parskip) 0.0
+....\glue(\baselineskip) 2.55556
+....\hbox(6.94444+1.94444)x345.0, glue set 82.23514fil, direction TLT
+.....\localpar
+......\localinterlinepenalty=0
+......\localbrokenpenalty=0
+......\localleftbox=null
+......\localrightbox=null
+.....\hbox(0.0+0.0)x0.0, direction TLT
+.....\penalty 10000
+.....\hbox(0.0+0.0)x0.0, direction TLT
+......\hbox(0.0+0.0)x0.0, shifted -12.0, direction TLT
+.......\pdfliteral page <lua data reference ...>
+.......\pdfliteral page <lua data reference ...>
+.......\pdfdest name{thm.0.2} xyz
+.......\pdfdest name{thm.0.2} xyz
+.......\penalty 10000
+.....\pdfliteral page <lua data reference ...>
+.....\pdfliteral page <lua data reference ...>
+.....\OT1/cmr/bx/n/10 L
+.....\OT1/cmr/bx/n/10 e
+.....\OT1/cmr/bx/n/10 m
+.....\OT1/cmr/bx/n/10 m
+.....\OT1/cmr/bx/n/10 a
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.50331 plus 1.91666 minus 1.27777
+.....\pdfliteral page <lua data reference ...>
+.....\pdfliteral page <lua data reference ...>
+.....\OT1/cmr/bx/n/10 0
+.....\OT1/cmr/bx/n/10 .
+.....\OT1/cmr/bx/n/10 2
+.....\pdfliteral page <lua data reference ...>
+.....\pdfliteral page <lua data reference ...>
+.....\TU/lmr/m/n/10  
+.....\glue 1.67
+.....\OT1/cmr/m/it/10 A
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.24774 plus 1.53178 minus 1.02322
+.....\OT1/cmr/m/it/10 l
+.....\OT1/cmr/m/it/10 e
+.....\OT1/cmr/m/it/10 m
+.....\OT1/cmr/m/it/10 m
+.....\OT1/cmr/m/it/10 a
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.24774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 n
+.....\OT1/cmr/m/it/10 e
+.....\kern-0.51112 (font)
+.....\OT1/cmr/m/it/10 e
+.....\kern-0.51112 (font)
+.....\OT1/cmr/m/it/10 d
+.....\OT1/cmr/m/it/10 e
+.....\kern-0.51112 (font)
+.....\OT1/cmr/m/it/10 d
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.24774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 f
+.....\OT1/cmr/m/it/10 o
+.....\OT1/cmr/m/it/10 r
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.24774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 t
+.....\OT1/cmr/m/it/10 h
+.....\OT1/cmr/m/it/10 e
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.24774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 p
+.....\OT1/cmr/m/it/10 r
+.....\kern-0.51112 (font)
+.....\OT1/cmr/m/it/10 o
+.....\kern-0.51112 (font)
+.....\OT1/cmr/m/it/10 o
+.....\OT1/cmr/m/it/10 f
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.24774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 o
+.....\OT1/cmr/m/it/10 f
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.24774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 T
+.....\OT1/cmr/m/it/10 h
+.....\OT1/cmr/m/it/10 e
+.....\discretionary (penalty 50)
+......< \OT1/cmr/m/it/10 -
+......= \kern-0.51112 (font)
+.....\OT1/cmr/m/it/10 o
+.....\discretionary (penalty 50)
+......< \OT1/cmr/m/it/10 -
+.....\OT1/cmr/m/it/10 r
+.....\kern-0.51112 (font)
+.....\OT1/cmr/m/it/10 e
+.....\OT1/cmr/m/it/10 m
+.....\penalty 10000
+.....\TU/lmr/m/n/10  
+.....\glue(\spaceskip) 0.24774 plus 1.53333 minus 1.0222
+.....\pdfliteral page <lua data reference ...>
+.....\pdfliteral page <lua data reference ...>
+.....\pdfstartlink(*+*)x* attr{/Contents (ref) /Border [0 0 1] /H /I /C [0.701176 0.4 0.414118] /StructParent 1 } action struct name{thm.0.1} goto name{thm.0.1}
+.....\OT1/cmr/m/it/10 0
+.....\OT1/cmr/m/it/10 .
+.....\OT1/cmr/m/it/10 1
+.....\pdfendlink
+.....\write1{\newlabeldata{__tag_objr_page_1}{{tagabspage}{\__ref_attribute_tagabspage: }}}
+.....\pdfliteral page <lua data reference ...>
+.....\pdfliteral page <lua data reference ...>
+.....\OT1/cmr/m/it/10 .
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\penalty -51
+....\glue 10.0 plus 3.0 minus 5.0
+....\glue -1.94444
+....\glue 0.0 plus 1.0fil
+....\glue 0.0 plus -1.0fil
+....\glue 0.0 plus 1.0fil
+....\glue 0.0
+....\glue 0.0 plus 0.0001fil
+...\pdfliteral page <lua data reference ...>
+...\pdfliteral page <lua data reference ...>
+...\pdflinkstate 1
+...\glue(\baselineskip) 23.55556
+...\hbox(6.44444+0.0)x345.0, direction TLT
+....\hbox(6.44444+0.0)x345.0, glue set 170.0fil, direction TLT
+.....\glue 0.0 plus 1.0fil
+.....\pdfliteral page <lua data reference ...>
+.....\pdfliteral page <lua data reference ...>
+.....\OT1/cmr/m/n/10 1
+.....\glue 0.0 plus 1.0fil
+...\pdfliteral page <lua data reference ...>
+...\pdfliteral page <lua data reference ...>
+...\pdflinkstate 0
+.\kern0.0
+.\kern0.0
+.\kern-633.0
+.\hbox(0.0+0.0)x0.0, direction TLT
+.\kern633.0
+.\pdfliteral page <lua data reference ...>
+(blocks-theorem-04.aux)
+Package tagpdf Info: closing structure 1 tagged /Document
diff --git a/required/latex-lab/testfiles-block/blocks-theorem-04.lvt b/required/latex-lab/testfiles-block/blocks-theorem-04.lvt
new file mode 100644
index 00000000..b2417127
--- /dev/null
+++ b/required/latex-lab/testfiles-block/blocks-theorem-04.lvt
@@ -0,0 +1,37 @@
+
+\DocumentMetadata{
+  testphase=phase-III
+  ,uncompress
+%  ,pdfversion=2.0
+  ,debug={
+%  para,
+  log=vv}
+}
+
+\DebugBlocksOn
+
+
+\documentclass{article}
+
+\input{regression-test}
+
+\newtheorem{thm}{Theorem}[section]
+\newtheorem{lem}[thm]{Lemma}
+
+\usepackage{hyperref}
+
+\begin{document}
+
+\START \showoutput
+
+\begin{thm}[It has a name]
+  \label{thm:B}
+   Another theorem \ldots 
+
+\end{thm}
+
+\begin{lem}
+  A lemma needed for the proof of Theorem~\ref{thm:B}.
+\end{lem}
+
+\end{document}
diff --git a/required/latex-lab/testfiles-block/blocks-theorem-04.tlg b/required/latex-lab/testfiles-block/blocks-theorem-04.tlg
new file mode 100644
index 00000000..979ee5df
--- /dev/null
+++ b/required/latex-lab/testfiles-block/blocks-theorem-04.tlg
@@ -0,0 +1,392 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+==> theorem-like-env-start
+==> use instance: displayblock-0
+Package tagpdf Info: Parent-Child 'Document' --> 'Sect'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Document' --> 'theorem-like' on line ...
+Package tagpdf Info: Parent-Child 'Sect' --> 'Caption'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'Caption' on line ...
+Package tagpdf Info: Parent-Child 'Caption' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Caption' --> 'MC' on line ...
+Package tagpdf Info: Parent-Child 'Caption' --> 'Lbl'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Caption' --> 'Lbl' on line ...
+Package tagpdf Info: Parent-Child 'Lbl' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Lbl' --> 'MC' on line ...
+Package tagpdf Info: closing structure 6 tagged /Lbl
+Package tagpdf Info: Parent-Child 'Caption' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Caption' --> 'MC' on line ...
+Package tagpdf Info: closing structure 5 tagged /Caption
+Package tagpdf Info: Parent-Child 'Sect' --> 'Part'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'text-unit' on line ...
+==> increment P on input line ...
+Package tagpdf Info: Parent-Child 'Sect' --> 'P'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'text' on line ...
+Package tagpdf Info: Parent-Child 'P' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'P' --> 'MC' on line ...
+==> increment /P on input line ...
+Package tagpdf Info: closing structure 8 tagged /text
+Package tagpdf Info: closing structure 7 tagged /text-unit
+==> blockenv common ending on input line ...
+==> block-end on input line ...
+Package tagpdf Info: closing structure 4 tagged /theorem-like
+==> theorem-like-env-start
+==> use instance: displayblock-0
+Package tagpdf Info: Parent-Child 'Document' --> 'Sect'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Document' --> 'theorem-like' on line ...
+Package tagpdf Info: Parent-Child 'Sect' --> 'Caption'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'Caption' on line ...
+Package tagpdf Info: Parent-Child 'Caption' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Caption' --> 'MC' on line ...
+Package tagpdf Info: Parent-Child 'Caption' --> 'Lbl'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Caption' --> 'Lbl' on line ...
+Package tagpdf Info: Parent-Child 'Lbl' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Lbl' --> 'MC' on line ...
+Package tagpdf Info: closing structure 11 tagged /Lbl
+Package tagpdf Info: closing structure 10 tagged /Caption
+Package tagpdf Info: Parent-Child 'Sect' --> 'Part'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'text-unit' on line ...
+==> increment P on input line ...
+Package tagpdf Info: Parent-Child 'Sect' --> 'P'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Sect' --> 'text' on line ...
+Package tagpdf Info: Parent-Child 'P' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'P' --> 'MC' on line ...
+Package tagpdf Info: text has been pushed to the mc stack
+Package tagpdf Info: Parent-Child 'P' --> 'Link'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'P' --> 'Link' on line ...
+Package tagpdf Info: Parent-Child 'Link' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'Link' --> 'MC' on line ...
+Package tagpdf Info: closing structure 14 tagged /Link
+Package tagpdf Info: text has been removed from the mc stack
+Package tagpdf Info: Parent-Child 'P' --> 'MC'.
+(tagpdf)             Relation is 1 (='0..n')
+(tagpdf)             Rolemapped from: 'P' --> 'MC' on line ...
+==> blockenv common ending on input line ...
+==> increment /P on input line ...
+Package tagpdf Info: closing structure 13 tagged /text
+Package tagpdf Info: closing structure 12 tagged /text-unit
+==> block-end on input line ...
+Package tagpdf Info: closing structure 9 tagged /theorem-like
+The sequence \g__tag_mc_main_marks_seq is empty
+> .
+Completed box being shipped out [1]
+\vbox(633.0+0.0)x407.0
+.\hbox(0.0+0.0)x0.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
+.\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-,10,-1,}
+....\marks4{b+,10,-1,}
+....\hbox(0.0+0.0)x345.0
+.....\hbox(0.0+0.0)x345.0
+....\pdfliteral page{EMC}
+....\marks4{e-,10,1,}
+....\marks4{e+,10,1,}
+....\pdfrunninglinkon
+...\glue 25.0
+...\glue(\lineskip) 0.0
+...\vbox(550.0+0.0)x345.0, glue set 507.94574fil
+....\hbox(0.0+0.0)x0.0
+....\pdfinterwordspaceon
+....\write-{}
+....\pdfdest name{Doc-Start} xyz
+....\pdfdest struct10 name{Doc-Start} xyz
+....\glue(\topskip) 2.5
+....\hbox(7.5+2.5)x345.0, glue set 104.19038fil
+.....\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{thm.0.1} xyz
+.......\pdfdest struct13 name{thm.0.1} xyz
+.......\penalty 10000
+.....\write1{\newlabeldata{mcid-1}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{1}{tagmcid}{0}}}
+.....\pdfliteral page{/Caption /l3pdf1 BDC}
+.....\write1{\newlabeldata{l3pdf1}{{abspage}{\__ref_attribute_abspage: }}}
+.....\OT1/cmr/bx/n/10 T
+.....\OT1/cmr/bx/n/10 h
+.....\OT1/cmr/bx/n/10 e
+.....\OT1/cmr/bx/n/10 o
+.....\OT1/cmr/bx/n/10 r
+.....\OT1/cmr/bx/n/10 e
+.....\OT1/cmr/bx/n/10 m
+.....\glue 3.83331 plus 1.91666 minus 1.27777
+.....\pdfliteral page{EMC}
+.....\write1{\newlabeldata{mcid-2}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{2}{tagmcid}{1}}}
+.....\pdfliteral page{/Lbl /l3pdf2 BDC}
+.....\write1{\newlabeldata{l3pdf2}{{abspage}{\__ref_attribute_abspage: }}}
+.....\OT1/cmr/bx/n/10 0
+.....\OT1/cmr/bx/n/10 .
+.....\OT1/cmr/bx/n/10 1
+.....\pdfliteral page{EMC}
+.....\write1{\newlabeldata{mcid-3}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{3}{tagmcid}{2}}}
+.....\pdfliteral page{/Caption /l3pdf3 BDC}
+.....\write1{\newlabeldata{l3pdf3}{{abspage}{\__ref_attribute_abspage: }}}
+.....\glue 3.83331 plus 1.91666 minus 1.27777
+.....\OT1/cmr/bx/n/10 (
+.....\OT1/cmr/bx/n/10 I
+.....\OT1/cmr/bx/n/10 t
+.....\glue 3.83331 plus 1.91666 minus 1.27777
+.....\OT1/cmr/bx/n/10 h
+.....\OT1/cmr/bx/n/10 a
+.....\OT1/cmr/bx/n/10 s
+.....\glue 3.83331 plus 1.91666 minus 1.27777
+.....\OT1/cmr/bx/n/10 a
+.....\glue 3.83331 plus 1.91666 minus 1.27777
+.....\OT1/cmr/bx/n/10 n
+.....\OT1/cmr/bx/n/10 a
+.....\OT1/cmr/bx/n/10 m
+.....\OT1/cmr/bx/n/10 e
+.....\OT1/cmr/bx/n/10 )
+.....\pdfliteral page{EMC}
+.....\write1{\newlabeldata{mcid-4}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{4}{tagmcid}{3}}}
+.....\pdfliteral page{/text /l3pdf4 BDC}
+.....\write1{\newlabeldata{l3pdf4}{{abspage}{\__ref_attribute_abspage: }}}
+.....\glue 5.0
+.....\write1{\newlabel{thm:B}{{0.1}{\thepage }{It has a name}{thm.0.1}{}}}
+.....\penalty 10000
+.....\glue 0.0
+.....\OT1/cmr/m/it/10 A
+.....\kern-0.25557
+.....\OT1/cmr/m/it/10 n
+.....\OT1/cmr/m/it/10 o
+.....\OT1/cmr/m/it/10 t
+.....\OT1/cmr/m/it/10 h
+.....\OT1/cmr/m/it/10 e
+.....\OT1/cmr/m/it/10 r
+.....\glue 3.57774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 t
+.....\OT1/cmr/m/it/10 h
+.....\OT1/cmr/m/it/10 e
+.....\kern-0.51112
+.....\OT1/cmr/m/it/10 o
+.....\OT1/cmr/m/it/10 r
+.....\kern-0.51112
+.....\OT1/cmr/m/it/10 e
+.....\OT1/cmr/m/it/10 m
+.....\glue 3.57774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 .
+.....\kern 1.53333
+.....\OT1/cmr/m/it/10 .
+.....\kern 1.53333
+.....\OT1/cmr/m/it/10 .
+.....\kern 1.53333
+.....\pdfliteral page{EMC}
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\marks4{b-,1,5,Caption,,,}
+....\marks4{b+,1,5,Caption,,,}
+....\marks4{e-,1,5,}
+....\marks4{e+,1,5,}
+....\marks4{b-,2,6,Lbl,,,}
+....\marks4{b+,2,6,Lbl,,,}
+....\marks4{e-,2,6,}
+....\marks4{e+,2,6,}
+....\marks4{b-,3,5,Caption,,,}
+....\marks4{b+,3,5,Caption,,,}
+....\marks4{e-,3,5,}
+....\marks4{e+,3,5,}
+....\marks4{b-,4,8,text,,,}
+....\marks4{b+,4,8,text,,,}
+....\marks4{e-,4,8,}
+....\marks4{e+,4,8,}
+....\penalty -51
+....\glue 10.0 plus 3.0 minus 5.0
+....\glue -12.5 plus -3.0 minus -5.0
+....\penalty -51
+....\glue 2.5
+....\glue 10.0 plus 3.0 minus 5.0
+....\glue -10.0 plus -3.0 minus -5.0
+....\glue 6.0 plus 1.0 minus 4.0
+....\glue(\parskip) 4.0 plus 2.0 minus 1.0
+....\glue(\parskip) 0.0
+....\glue(\baselineskip) 2.55556
+....\hbox(6.94444+1.94444)x345.0, glue set 82.23514fil
+.....\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{thm.0.2} xyz
+.......\pdfdest struct22 name{thm.0.2} xyz
+.......\penalty 10000
+.....\write1{\newlabeldata{mcid-5}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{5}{tagmcid}{4}}}
+.....\pdfliteral page{/Caption /l3pdf5 BDC}
+.....\write1{\newlabeldata{l3pdf5}{{abspage}{\__ref_attribute_abspage: }}}
+.....\OT1/cmr/bx/n/10 L
+.....\OT1/cmr/bx/n/10 e
+.....\OT1/cmr/bx/n/10 m
+.....\OT1/cmr/bx/n/10 m
+.....\OT1/cmr/bx/n/10 a
+.....\glue 3.83331 plus 1.91666 minus 1.27777
+.....\pdfliteral page{EMC}
+.....\write1{\newlabeldata{mcid-6}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{6}{tagmcid}{5}}}
+.....\pdfliteral page{/Lbl /l3pdf6 BDC}
+.....\write1{\newlabeldata{l3pdf6}{{abspage}{\__ref_attribute_abspage: }}}
+.....\OT1/cmr/bx/n/10 0
+.....\OT1/cmr/bx/n/10 .
+.....\OT1/cmr/bx/n/10 2
+.....\pdfliteral page{EMC}
+.....\write1{\newlabeldata{mcid-7}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{7}{tagmcid}{6}}}
+.....\pdfliteral page{/text /l3pdf7 BDC}
+.....\write1{\newlabeldata{l3pdf7}{{abspage}{\__ref_attribute_abspage: }}}
+.....\glue 5.0
+.....\OT1/cmr/m/it/10 A
+.....\glue 3.57774 plus 1.53178 minus 1.02322
+.....\OT1/cmr/m/it/10 l
+.....\OT1/cmr/m/it/10 e
+.....\OT1/cmr/m/it/10 m
+.....\OT1/cmr/m/it/10 m
+.....\OT1/cmr/m/it/10 a
+.....\glue 3.57774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 n
+.....\OT1/cmr/m/it/10 e
+.....\kern-0.51112
+.....\OT1/cmr/m/it/10 e
+.....\kern-0.51112
+.....\OT1/cmr/m/it/10 d
+.....\OT1/cmr/m/it/10 e
+.....\kern-0.51112
+.....\OT1/cmr/m/it/10 d
+.....\glue 3.57774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 f
+.....\OT1/cmr/m/it/10 o
+.....\OT1/cmr/m/it/10 r
+.....\glue 3.57774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 t
+.....\OT1/cmr/m/it/10 h
+.....\OT1/cmr/m/it/10 e
+.....\glue 3.57774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 p
+.....\OT1/cmr/m/it/10 r
+.....\kern-0.51112
+.....\OT1/cmr/m/it/10 o
+.....\kern-0.51112
+.....\OT1/cmr/m/it/10 o
+.....\OT1/cmr/m/it/10 f
+.....\glue 3.57774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 o
+.....\OT1/cmr/m/it/10 f
+.....\glue 3.57774 plus 1.53333 minus 1.0222
+.....\OT1/cmr/m/it/10 T
+.....\OT1/cmr/m/it/10 h
+.....\OT1/cmr/m/it/10 e
+.....\kern-0.51112
+.....\OT1/cmr/m/it/10 o
+.....\OT1/cmr/m/it/10 r
+.....\kern-0.51112
+.....\OT1/cmr/m/it/10 e
+.....\OT1/cmr/m/it/10 m
+.....\penalty 10000
+.....\glue 3.57774 plus 1.53333 minus 1.0222
+.....\pdfliteral page{EMC}
+.....\write1{\newlabeldata{mcid-8}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{8}{tagmcid}{7}}}
+.....\pdfliteral page{/Link /l3pdf8 BDC}
+.....\write1{\newlabeldata{l3pdf8}{{abspage}{\__ref_attribute_abspage: }}}
+.....\pdfstartlink(*+*)x* attr{/Contents (ref) /Border [0 0 1] /H /I /C [0.701176 0.4 0.414118] /StructParent 1 } action goto name{thm.0.1}
+.....\OT1/cmr/m/it/10 0
+.....\OT1/cmr/m/it/10 .
+.....\OT1/cmr/m/it/10 1
+.....\pdfendlink
+.....\write1{\newlabeldata{__tag_objr_page_1}{{tagabspage}{\__ref_attribute_tagabspage: }}}
+.....\pdfliteral page{EMC}
+.....\write1{\newlabeldata{mcid-9}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{9}{tagmcid}{8}}}
+.....\pdfliteral page{/text /l3pdf9 BDC}
+.....\write1{\newlabeldata{l3pdf9}{{abspage}{\__ref_attribute_abspage: }}}
+.....\OT1/cmr/m/it/10 .
+.....\pdfliteral page{EMC}
+.....\penalty 10000
+.....\glue(\parfillskip) 0.0 plus 1.0fil
+.....\glue(\rightskip) 0.0
+....\marks4{b-,5,10,Caption,,,}
+....\marks4{b+,5,10,Caption,,,}
+....\marks4{e-,5,10,}
+....\marks4{e+,5,10,}
+....\marks4{b-,6,11,Lbl,,,}
+....\marks4{b+,6,11,Lbl,,,}
+....\marks4{e-,6,11,}
+....\marks4{e+,6,11,}
+....\marks4{b-,7,13,text,,,}
+....\marks4{b+,7,13,text,,,}
+....\marks4{e-,7,13,}
+....\marks4{e+,7,13,}
+....\marks4{b-,8,14,Link,,,}
+....\marks4{b+,8,14,Link,,,}
+....\marks4{e-,8,14,}
+....\marks4{e+,8,14,}
+....\marks4{b-,9,13,text,,,}
+....\marks4{b+,9,13,text,,,}
+....\marks4{e-,9,13,}
+....\marks4{e+,9,13,}
+....\penalty -51
+....\glue 10.0 plus 3.0 minus 5.0
+....\glue -1.94444
+....\glue 0.0 plus 1.0fil
+....\kern 0.0
+....\hbox(0.0+0.0)x0.0
+....\glue 0.0
+....\glue 0.0 plus 0.0001fil
+...\pdfrunninglinkoff
+...\pdfliteral page{/Artifact BMC}
+...\marks4{b-,11,-1,}
+...\marks4{b+,11,-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-,11,1,}
+...\marks4{e+,11,1,}
+...\pdfrunninglinkon
+.\kern 0.0
+.\kern 0.0
+.\kern -633.0
+.\hbox(0.0+0.0)x0.0
+.\kern 633.0
+(blocks-theorem-04.aux)
+Package tagpdf Info: closing structure 1 tagged /Document





More information about the latex3-commits mailing list.