[latex3-commits] [git/LaTeX3-latex3-hyperref] cleanup-patches: make Ref test clearer (d5526ed)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Apr 12 19:14:42 CEST 2022


Repository : https://github.com/latex3/hyperref
On branch  : cleanup-patches
Link       : https://github.com/latex3/hyperref/commit/d5526ed3b4ed97016b1bddf9b623be79341865b7

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

commit d5526ed3b4ed97016b1bddf9b623be79341865b7
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Apr 12 19:14:42 2022 +0200

    make Ref test clearer


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

d5526ed3b4ed97016b1bddf9b623be79341865b7
 .../refstarred-hyperref-noimplicit.luatex.tlg      | 75 +++++++++++++---------
 testfiles-3/refstarred-hyperref-noimplicit.lvt     |  2 +-
 testfiles-3/refstarred-hyperref-noimplicit.tlg     | 71 ++++++++++++--------
 .../refstarred-hyperref-showkeys.luatex.tlg        | 75 +++++++++++++---------
 testfiles-3/refstarred-hyperref-showkeys.lvt       |  2 +-
 testfiles-3/refstarred-hyperref-showkeys.tlg       | 71 ++++++++++++--------
 testfiles-3/refstarred-hyperref.luatex.tlg         | 75 +++++++++++++---------
 testfiles-3/refstarred-hyperref.lvt                |  2 +-
 testfiles-3/refstarred-hyperref.tlg                | 71 ++++++++++++--------
 testfiles-3/refstarred-nameref-showkeys.luatex.tlg | 75 +++++++++++++---------
 testfiles-3/refstarred-nameref-showkeys.lvt        |  2 +-
 testfiles-3/refstarred-nameref-showkeys.tlg        | 71 ++++++++++++--------
 testfiles-3/refstarred-nameref.luatex.tlg          | 75 +++++++++++++---------
 testfiles-3/refstarred-nameref.lvt                 |  2 +-
 testfiles-3/refstarred-nameref.tlg                 | 71 ++++++++++++--------
 15 files changed, 445 insertions(+), 295 deletions(-)

diff --git a/testfiles-3/refstarred-hyperref-noimplicit.luatex.tlg b/testfiles-3/refstarred-hyperref-noimplicit.luatex.tlg
index 64ae1f5..e5595dc 100644
--- a/testfiles-3/refstarred-hyperref-noimplicit.luatex.tlg
+++ b/testfiles-3/refstarred-hyperref-noimplicit.luatex.tlg
@@ -1,23 +1,14 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-> \ref=robust macro:
-->\protect \ref  .
-> \ref =\long macro:
-->\@ifstar \@refstar \T at ref .
-<argument> \ref  
-l. ...\ShowCommand\ref
-> \Ref=robust macro:
-->\protect \Ref  .
-> \Ref =macro:
-->\@ifstar \@Refstar \T at Ref .
-<argument> \Ref  
-l. ...\ShowCommand\Ref
-> \pageref=robust macro:
-->\protect \pageref  .
-> \pageref =\long macro:
-->\@ifstar \@pagerefstar \T at pageref .
-<argument> \pageref  
-l. ...\ShowCommand\pageref
+> \ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@refstar }{\T at ref }.
+> \Ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@Refstar }{\T at Ref }.
+> \pageref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@pagerefstar }{\T at pageref }.
 Completed box being shipped out [1]
 \vbox(633.0+0.0)x407.0, direction TLT
 .\hbox(0.0+0.0)x0.0, direction TLT
@@ -52,15 +43,15 @@ Completed box being shipped out [1]
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 8.2512
-...\hbox(9.7488+0.0864)x345.0, glue set 292.72803fil, direction TLT
+...\hbox(9.7488+0.0864)x345.0, glue set 292.49762fil, direction TLT
 ....\localpar
 .....\localinterlinepenalty=0
 .....\localbrokenpenalty=0
 .....\localleftbox=null
 .....\localrightbox=null
-....\hbox(6.5232+0.0864)x22.2768, direction TLT
+....\hbox(9.4464+0.0)x22.50719, direction TLT
 .....\glue 0.0
-.....\TU/lmr/bx/n/14.4 a
+.....\TU/lmr/bx/n/14.4 1
 .....\glue 14.4
 ....\TU/lmr/bx/n/14.4 T
 ....\kern-1.35359 (font)
@@ -73,22 +64,34 @@ Completed box being shipped out [1]
 ...\write1{\@writefile{toc}{\protect \contentsline {section}{\protect \numberline \ETC.}
 ...\penalty 10000
 ...\glue 9.913 plus 0.86198
-...\write1{\newlabel{sec:test}{{a}{\thepage }{Test}{Doc-Start}{}}}
+...\write1{\newlabel{sec:test}{{sect: 1}{\thepage }{Test}{Doc-Start}{}}}
 ...\penalty 10000
 ...\penalty 10000
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
-...\glue(\baselineskip) 4.7536
-...\hbox(7.16+1.93)x345.0, glue set 318.60999fil, direction TLT
+...\glue(\baselineskip) 4.8636
+...\hbox(7.05+1.93)x345.0, glue set 271.63fil, direction TLT
 ....\localpar
 .....\localinterlinepenalty=0
 .....\localbrokenpenalty=0
 .....\localleftbox=null
 .....\localrightbox=null
-....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 s
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
-....\TU/lmr/m/n/10 A
+....\TU/lmr/m/n/10 S
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
 ....\glue(\spaceskip) 3.33 plus 2.08124 minus 0.888
@@ -99,18 +102,30 @@ Completed box being shipped out [1]
 ....\glue(\rightskip) 0.0
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
-...\glue(\baselineskip) 2.91
-...\hbox(7.16+1.93)x345.0, glue set 303.60999fil, direction TLT
+...\glue(\baselineskip) 3.02
+...\hbox(7.05+1.93)x345.0, glue set 256.63fil, direction TLT
 ....\localpar
 .....\localinterlinepenalty=0
 .....\localbrokenpenalty=0
 .....\localleftbox=null
 .....\localrightbox=null
 ....\hbox(0.0+0.0)x15.0, direction TLT
-....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 s
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
-....\TU/lmr/m/n/10 A
+....\TU/lmr/m/n/10 S
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
 ....\glue(\spaceskip) 3.33 plus 2.08124 minus 0.888
diff --git a/testfiles-3/refstarred-hyperref-noimplicit.lvt b/testfiles-3/refstarred-hyperref-noimplicit.lvt
index 916b7f8..2a82727 100644
--- a/testfiles-3/refstarred-hyperref-noimplicit.lvt
+++ b/testfiles-3/refstarred-hyperref-noimplicit.lvt
@@ -5,7 +5,7 @@
 
 \begin{document}
 xxx
-\renewcommand\thesection{\alph{section}}
+\labelformat{section}{sect: #1}
 \START \showoutput
 \ShowCommand\ref
 \ShowCommand\Ref
diff --git a/testfiles-3/refstarred-hyperref-noimplicit.tlg b/testfiles-3/refstarred-hyperref-noimplicit.tlg
index 5877a5e..f2d641f 100644
--- a/testfiles-3/refstarred-hyperref-noimplicit.tlg
+++ b/testfiles-3/refstarred-hyperref-noimplicit.tlg
@@ -1,23 +1,14 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-> \ref=robust macro:
-->\protect \ref  .
-> \ref =\long macro:
-->\@ifstar \@refstar \T at ref .
-<argument> \ref  
-l. ...\ShowCommand\ref
-> \Ref=robust macro:
-->\protect \Ref  .
-> \Ref =macro:
-->\@ifstar \@Refstar \T at Ref .
-<argument> \Ref  
-l. ...\ShowCommand\Ref
-> \pageref=robust macro:
-->\protect \pageref  .
-> \pageref =\long macro:
-->\@ifstar \@pagerefstar \T at pageref .
-<argument> \pageref  
-l. ...\ShowCommand\pageref
+> \ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@refstar }{\T at ref }.
+> \Ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@Refstar }{\T at Ref }.
+> \pageref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@pagerefstar }{\T at pageref }.
 Completed box being shipped out [1]
 \vbox(633.0+0.0)x407.0
 .\hbox(0.0+0.0)x0.0
@@ -47,10 +38,10 @@ Completed box being shipped out [1]
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 8.12001
-...\hbox(9.87999+0.0)x345.0, glue set 290.92673fil
-....\hbox(6.39998+0.0)x24.07497
+...\hbox(9.87999+0.0)x345.0, glue set 290.70172fil
+....\hbox(9.27998+0.0)x24.29997
 .....\glue 0.0
-.....\OT1/cmr/bx/n/14.4 a
+.....\OT1/cmr/bx/n/14.4 1
 .....\glue 16.19998
 ....\OT1/cmr/bx/n/14.4 T
 ....\kern-1.35
@@ -63,17 +54,29 @@ Completed box being shipped out [1]
 ...\write1{\@writefile{toc}{\protect \contentsline {section}{\protect \numberline \ETC.}
 ...\penalty 10000
 ...\glue 9.90276 plus 0.86108
-...\write1{\newlabel{sec:test}{{a}{\thepage }{Test}{Doc-Start}{}}}
+...\write1{\newlabel{sec:test}{{sect: 1}{\thepage }{Test}{Doc-Start}{}}}
 ...\penalty 10000
 ...\penalty 10000
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 5.16669
-...\hbox(6.83331+1.94444)x345.0, glue set 318.61105fil
-....\OT1/cmr/m/n/10 a
+...\hbox(6.83331+1.94444)x345.0, glue set 271.61101fil
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
-....\OT1/cmr/m/n/10 A
+....\OT1/cmr/m/n/10 S
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
 ....\glue 3.33333 plus 2.08331 minus 0.88889
@@ -85,12 +88,24 @@ Completed box being shipped out [1]
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 3.22224
-...\hbox(6.83331+1.94444)x345.0, glue set 303.61105fil
+...\hbox(6.83331+1.94444)x345.0, glue set 256.61101fil
 ....\hbox(0.0+0.0)x15.0
-....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
-....\OT1/cmr/m/n/10 A
+....\OT1/cmr/m/n/10 S
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
 ....\glue 3.33333 plus 2.08331 minus 0.88889
diff --git a/testfiles-3/refstarred-hyperref-showkeys.luatex.tlg b/testfiles-3/refstarred-hyperref-showkeys.luatex.tlg
index cc3ef69..2bd086c 100644
--- a/testfiles-3/refstarred-hyperref-showkeys.luatex.tlg
+++ b/testfiles-3/refstarred-hyperref-showkeys.luatex.tlg
@@ -1,23 +1,14 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-> \ref=robust macro:
-->\protect \ref  .
-> \ref =\long macro:
-->\@ifstar \@refstar \T at ref .
-<argument> \ref  
-l. ...\ShowCommand\ref
-> \Ref=robust macro:
-->\protect \Ref  .
-> \Ref =macro:
-->\@ifstar \@Refstar \T at Ref .
-<argument> \Ref  
-l. ...\ShowCommand\Ref
-> \pageref=robust macro:
-->\protect \pageref  .
-> \pageref =\long macro:
-->\@ifstar \@pagerefstar \T at pageref .
-<argument> \pageref  
-l. ...\ShowCommand\pageref
+> \ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@refstar }{\T at ref }.
+> \Ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@Refstar }{\T at Ref }.
+> \pageref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@pagerefstar }{\T at pageref }.
 LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <7> on input line ....
 LaTeX Font Info:    External font `cmex10' loaded for size
@@ -74,15 +65,15 @@ Completed box being shipped out [1]
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
 ....\glue(\baselineskip) 8.2512
-....\hbox(9.7488+0.0864)x345.0, glue set 292.72803fil, direction TLT
+....\hbox(9.7488+0.0864)x345.0, glue set 292.49762fil, direction TLT
 .....\localpar
 ......\localinterlinepenalty=0
 ......\localbrokenpenalty=0
 ......\localleftbox=null
 ......\localrightbox=null
-.....\hbox(6.5232+0.0864)x22.2768, direction TLT
+.....\hbox(9.4464+0.0)x22.50719, direction TLT
 ......\glue 0.0
-......\TU/lmr/bx/n/14.4 a
+......\TU/lmr/bx/n/14.4 1
 ......\glue 14.4
 .....\TU/lmr/bx/n/14.4 T
 .....\kern-1.35359 (font)
@@ -122,13 +113,13 @@ Completed box being shipped out [1]
 ..........\rule(*+*)x0.4
 .........\rule(0.4+0.0)x*
 .....\kern11.0
-....\write1{\newlabel{sec:test}{{a}{\thepage }{Test}{section.1}{}}}
+....\write1{\newlabel{sec:test}{{sect: 1}{\thepage }{Test}{section.1}{}}}
 ....\penalty 10000
 ....\penalty 10000
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
-....\glue(\baselineskip) 4.7536
-....\hbox(7.16+1.93)x345.0, glue set 278.60999fil, direction TLT
+....\glue(\baselineskip) 4.8636
+....\hbox(7.05+1.93)x345.0, glue set 231.62999fil, direction TLT
 .....\localpar
 ......\localinterlinepenalty=0
 ......\localbrokenpenalty=0
@@ -156,7 +147,13 @@ Completed box being shipped out [1]
 ........\mathoff
 .......\glue 0.0 plus 1.0fil minus 1.0fil
 .....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.1}
-.....\TU/lmr/m/n/10 a
+.....\TU/lmr/m/n/10 s
+.....\TU/lmr/m/n/10 e
+.....\TU/lmr/m/n/10 c
+.....\TU/lmr/m/n/10 t
+.....\TU/lmr/m/n/10 :
+.....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+.....\TU/lmr/m/n/10 1
 .....\pdfendlink
 .....\TU/lmr/m/n/10 ,
 .....\glue 20.0
@@ -182,7 +179,13 @@ Completed box being shipped out [1]
 .........\rule(0.39998+0.0)x*
 ........\mathoff
 .......\glue 0.0 plus 1.0fil minus 1.0fil
-.....\TU/lmr/m/n/10 A
+.....\TU/lmr/m/n/10 S
+.....\TU/lmr/m/n/10 e
+.....\TU/lmr/m/n/10 c
+.....\TU/lmr/m/n/10 t
+.....\TU/lmr/m/n/10 :
+.....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+.....\TU/lmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0, direction TLT
 .....\pdfendlink
 .....\TU/lmr/m/n/10 ,
@@ -217,8 +220,8 @@ Completed box being shipped out [1]
 .....\glue(\rightskip) 0.0
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
-....\glue(\baselineskip) 2.91
-....\hbox(7.16+1.93)x345.0, glue set 263.60999fil, direction TLT
+....\glue(\baselineskip) 3.02
+....\hbox(7.05+1.93)x345.0, glue set 216.62999fil, direction TLT
 .....\localpar
 ......\localinterlinepenalty=0
 ......\localbrokenpenalty=0
@@ -246,7 +249,13 @@ Completed box being shipped out [1]
 .........\rule(0.39998+0.0)x*
 ........\mathoff
 .......\glue 0.0 plus 1.0fil minus 1.0fil
-.....\TU/lmr/m/n/10 a
+.....\TU/lmr/m/n/10 s
+.....\TU/lmr/m/n/10 e
+.....\TU/lmr/m/n/10 c
+.....\TU/lmr/m/n/10 t
+.....\TU/lmr/m/n/10 :
+.....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+.....\TU/lmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0, direction TLT
 .....\TU/lmr/m/n/10 ,
 .....\glue 20.0
@@ -271,7 +280,13 @@ Completed box being shipped out [1]
 .........\rule(0.39998+0.0)x*
 ........\mathoff
 .......\glue 0.0 plus 1.0fil minus 1.0fil
-.....\TU/lmr/m/n/10 A
+.....\TU/lmr/m/n/10 S
+.....\TU/lmr/m/n/10 e
+.....\TU/lmr/m/n/10 c
+.....\TU/lmr/m/n/10 t
+.....\TU/lmr/m/n/10 :
+.....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+.....\TU/lmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0, direction TLT
 .....\TU/lmr/m/n/10 ,
 .....\glue(\spaceskip) 3.33 plus 2.08124 minus 0.888
diff --git a/testfiles-3/refstarred-hyperref-showkeys.lvt b/testfiles-3/refstarred-hyperref-showkeys.lvt
index 45ae180..44a7fd3 100644
--- a/testfiles-3/refstarred-hyperref-showkeys.lvt
+++ b/testfiles-3/refstarred-hyperref-showkeys.lvt
@@ -6,7 +6,7 @@
 
 \begin{document}
 xxx
-\renewcommand\thesection{\alph{section}}
+\labelformat{section}{sect: #1}
 \START \showoutput
 \ShowCommand\ref
 \ShowCommand\Ref
diff --git a/testfiles-3/refstarred-hyperref-showkeys.tlg b/testfiles-3/refstarred-hyperref-showkeys.tlg
index 9d4de6f..97803cd 100644
--- a/testfiles-3/refstarred-hyperref-showkeys.tlg
+++ b/testfiles-3/refstarred-hyperref-showkeys.tlg
@@ -1,23 +1,14 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-> \ref=robust macro:
-->\protect \ref  .
-> \ref =\long macro:
-->\@ifstar \@refstar \T at ref .
-<argument> \ref  
-l. ...\ShowCommand\ref
-> \Ref=robust macro:
-->\protect \Ref  .
-> \Ref =macro:
-->\@ifstar \@Refstar \T at Ref .
-<argument> \Ref  
-l. ...\ShowCommand\Ref
-> \pageref=robust macro:
-->\protect \pageref  .
-> \pageref =\long macro:
-->\@ifstar \@pagerefstar \T at pageref .
-<argument> \pageref  
-l. ...\ShowCommand\pageref
+> \ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@refstar }{\T at ref }.
+> \Ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@Refstar }{\T at Ref }.
+> \pageref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@pagerefstar }{\T at pageref }.
 LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <7> on input line ....
 LaTeX Font Info:    External font `cmex10' loaded for size
@@ -69,10 +60,10 @@ Completed box being shipped out [1]
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
 ....\glue(\baselineskip) 8.12001
-....\hbox(9.87999+0.0)x345.0, glue set 290.92673fil
-.....\hbox(6.39998+0.0)x24.07497
+....\hbox(9.87999+0.0)x345.0, glue set 290.70172fil
+.....\hbox(9.27998+0.0)x24.29997
 ......\glue 0.0
-......\OT1/cmr/bx/n/14.4 a
+......\OT1/cmr/bx/n/14.4 1
 ......\glue 16.19998
 .....\OT1/cmr/bx/n/14.4 T
 .....\kern-1.35
@@ -112,13 +103,13 @@ Completed box being shipped out [1]
 ..........\rule(*+*)x0.4
 .........\rule(0.4+0.0)x*
 .....\kern 11.0
-....\write1{\newlabel{sec:test}{{a}{\thepage }{Test}{section.1}{}}}
+....\write1{\newlabel{sec:test}{{sect: 1}{\thepage }{Test}{section.1}{}}}
 ....\penalty 10000
 ....\penalty 10000
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
 ....\glue(\baselineskip) 5.16669
-....\hbox(6.83331+1.94444)x345.0, glue set 278.611fil
+....\hbox(6.83331+1.94444)x345.0, glue set 231.61095fil
 .....\vbox(0.0+0.0)x0.0, glue set - 11.92859fil
 ......\glue 0.0 plus 1.0fil minus 1.0fil
 ......\hbox(11.92859+0.0)x0.0, glue set - 34.40048fil
@@ -141,7 +132,13 @@ Completed box being shipped out [1]
 ........\mathoff
 .......\glue 0.0 plus 1.0fil minus 1.0fil
 .....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.1}
-.....\OT1/cmr/m/n/10 a
+.....\OT1/cmr/m/n/10 s
+.....\OT1/cmr/m/n/10 e
+.....\OT1/cmr/m/n/10 c
+.....\OT1/cmr/m/n/10 t
+.....\OT1/cmr/m/n/10 :
+.....\glue 4.44444 plus 3.33331 minus 0.55556
+.....\OT1/cmr/m/n/10 1
 .....\pdfendlink
 .....\OT1/cmr/m/n/10 ,
 .....\glue 20.00003
@@ -167,7 +164,13 @@ Completed box being shipped out [1]
 .........\rule(0.39998+0.0)x*
 ........\mathoff
 .......\glue 0.0 plus 1.0fil minus 1.0fil
-.....\OT1/cmr/m/n/10 A
+.....\OT1/cmr/m/n/10 S
+.....\OT1/cmr/m/n/10 e
+.....\OT1/cmr/m/n/10 c
+.....\OT1/cmr/m/n/10 t
+.....\OT1/cmr/m/n/10 :
+.....\glue 4.44444 plus 3.33331 minus 0.55556
+.....\OT1/cmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0
 .....\pdfendlink
 .....\OT1/cmr/m/n/10 ,
@@ -203,7 +206,7 @@ Completed box being shipped out [1]
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
 ....\glue(\baselineskip) 3.22224
-....\hbox(6.83331+1.94444)x345.0, glue set 263.611fil
+....\hbox(6.83331+1.94444)x345.0, glue set 216.61095fil
 .....\hbox(0.0+0.0)x15.0
 .....\vbox(0.0+0.0)x0.0, glue set - 11.92859fil
 ......\glue 0.0 plus 1.0fil minus 1.0fil
@@ -226,7 +229,13 @@ Completed box being shipped out [1]
 .........\rule(0.39998+0.0)x*
 ........\mathoff
 .......\glue 0.0 plus 1.0fil minus 1.0fil
-.....\OT1/cmr/m/n/10 a
+.....\OT1/cmr/m/n/10 s
+.....\OT1/cmr/m/n/10 e
+.....\OT1/cmr/m/n/10 c
+.....\OT1/cmr/m/n/10 t
+.....\OT1/cmr/m/n/10 :
+.....\glue 4.44444 plus 3.33331 minus 0.55556
+.....\OT1/cmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0
 .....\OT1/cmr/m/n/10 ,
 .....\glue 20.00003
@@ -251,7 +260,13 @@ Completed box being shipped out [1]
 .........\rule(0.39998+0.0)x*
 ........\mathoff
 .......\glue 0.0 plus 1.0fil minus 1.0fil
-.....\OT1/cmr/m/n/10 A
+.....\OT1/cmr/m/n/10 S
+.....\OT1/cmr/m/n/10 e
+.....\OT1/cmr/m/n/10 c
+.....\OT1/cmr/m/n/10 t
+.....\OT1/cmr/m/n/10 :
+.....\glue 4.44444 plus 3.33331 minus 0.55556
+.....\OT1/cmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0
 .....\OT1/cmr/m/n/10 ,
 .....\glue 3.33333 plus 2.08331 minus 0.88889
diff --git a/testfiles-3/refstarred-hyperref.luatex.tlg b/testfiles-3/refstarred-hyperref.luatex.tlg
index 4666163..c790a6a 100644
--- a/testfiles-3/refstarred-hyperref.luatex.tlg
+++ b/testfiles-3/refstarred-hyperref.luatex.tlg
@@ -1,23 +1,14 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-> \ref=robust macro:
-->\protect \ref  .
-> \ref =\long macro:
-->\@ifstar \@refstar \T at ref .
-<argument> \ref  
-l. ...\ShowCommand\ref
-> \Ref=robust macro:
-->\protect \Ref  .
-> \Ref =macro:
-->\@ifstar \@Refstar \T at Ref .
-<argument> \Ref  
-l. ...\ShowCommand\Ref
-> \pageref=robust macro:
-->\protect \pageref  .
-> \pageref =\long macro:
-->\@ifstar \@pagerefstar \T at pageref .
-<argument> \pageref  
-l. ...\ShowCommand\pageref
+> \ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@refstar }{\T at ref }.
+> \Ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@Refstar }{\T at Ref }.
+> \pageref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@pagerefstar }{\T at pageref }.
 Completed box being shipped out [1]
 \vbox(633.0+0.0)x407.0, direction TLT
 .\hbox(0.0+0.0)x0.0, direction TLT
@@ -70,15 +61,15 @@ Completed box being shipped out [1]
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
 ....\glue(\baselineskip) 8.2512
-....\hbox(9.7488+0.0864)x345.0, glue set 292.72803fil, direction TLT
+....\hbox(9.7488+0.0864)x345.0, glue set 292.49762fil, direction TLT
 .....\localpar
 ......\localinterlinepenalty=0
 ......\localbrokenpenalty=0
 ......\localleftbox=null
 ......\localrightbox=null
-.....\hbox(6.5232+0.0864)x22.2768, direction TLT
+.....\hbox(9.4464+0.0)x22.50719, direction TLT
 ......\glue 0.0
-......\TU/lmr/bx/n/14.4 a
+......\TU/lmr/bx/n/14.4 1
 ......\glue 14.4
 .....\TU/lmr/bx/n/14.4 T
 .....\kern-1.35359 (font)
@@ -92,24 +83,36 @@ Completed box being shipped out [1]
 ....\write1{\@writefile{toc}{\protect \contentsline {section}{\protect \numberline \ETC.}
 ....\penalty 10000
 ....\glue 9.913 plus 0.86198
-....\write1{\newlabel{sec:test}{{a}{\thepage }{Test}{section.1}{}}}
+....\write1{\newlabel{sec:test}{{sect: 1}{\thepage }{Test}{section.1}{}}}
 ....\penalty 10000
 ....\penalty 10000
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
-....\glue(\baselineskip) 4.7536
-....\hbox(7.16+1.93)x345.0, glue set 318.60999fil, direction TLT
+....\glue(\baselineskip) 4.8636
+....\hbox(7.05+1.93)x345.0, glue set 271.63fil, direction TLT
 .....\localpar
 ......\localinterlinepenalty=0
 ......\localbrokenpenalty=0
 ......\localleftbox=null
 ......\localrightbox=null
 .....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.1}
-.....\TU/lmr/m/n/10 a
+.....\TU/lmr/m/n/10 s
+.....\TU/lmr/m/n/10 e
+.....\TU/lmr/m/n/10 c
+.....\TU/lmr/m/n/10 t
+.....\TU/lmr/m/n/10 :
+.....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+.....\TU/lmr/m/n/10 1
 .....\pdfendlink
 .....\TU/lmr/m/n/10 ,
 .....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.1}
-.....\TU/lmr/m/n/10 A
+.....\TU/lmr/m/n/10 S
+.....\TU/lmr/m/n/10 e
+.....\TU/lmr/m/n/10 c
+.....\TU/lmr/m/n/10 t
+.....\TU/lmr/m/n/10 :
+.....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+.....\TU/lmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0, direction TLT
 .....\pdfendlink
 .....\TU/lmr/m/n/10 ,
@@ -122,18 +125,30 @@ Completed box being shipped out [1]
 .....\glue(\rightskip) 0.0
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
-....\glue(\baselineskip) 2.91
-....\hbox(7.16+1.93)x345.0, glue set 303.60999fil, direction TLT
+....\glue(\baselineskip) 3.02
+....\hbox(7.05+1.93)x345.0, glue set 256.63fil, direction TLT
 .....\localpar
 ......\localinterlinepenalty=0
 ......\localbrokenpenalty=0
 ......\localleftbox=null
 ......\localrightbox=null
 .....\hbox(0.0+0.0)x15.0, direction TLT
-.....\TU/lmr/m/n/10 a
+.....\TU/lmr/m/n/10 s
+.....\TU/lmr/m/n/10 e
+.....\TU/lmr/m/n/10 c
+.....\TU/lmr/m/n/10 t
+.....\TU/lmr/m/n/10 :
+.....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+.....\TU/lmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0, direction TLT
 .....\TU/lmr/m/n/10 ,
-.....\TU/lmr/m/n/10 A
+.....\TU/lmr/m/n/10 S
+.....\TU/lmr/m/n/10 e
+.....\TU/lmr/m/n/10 c
+.....\TU/lmr/m/n/10 t
+.....\TU/lmr/m/n/10 :
+.....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+.....\TU/lmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0, direction TLT
 .....\TU/lmr/m/n/10 ,
 .....\glue(\spaceskip) 3.33 plus 2.08124 minus 0.888
diff --git a/testfiles-3/refstarred-hyperref.lvt b/testfiles-3/refstarred-hyperref.lvt
index d764fa4..942d187 100644
--- a/testfiles-3/refstarred-hyperref.lvt
+++ b/testfiles-3/refstarred-hyperref.lvt
@@ -5,7 +5,7 @@
 
 \begin{document}
 xxx
-\renewcommand\thesection{\alph{section}}
+\labelformat{section}{sect: #1}
 \START \showoutput
 \ShowCommand\ref
 \ShowCommand\Ref
diff --git a/testfiles-3/refstarred-hyperref.tlg b/testfiles-3/refstarred-hyperref.tlg
index c0fcce1..f5f126b 100644
--- a/testfiles-3/refstarred-hyperref.tlg
+++ b/testfiles-3/refstarred-hyperref.tlg
@@ -1,23 +1,14 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-> \ref=robust macro:
-->\protect \ref  .
-> \ref =\long macro:
-->\@ifstar \@refstar \T at ref .
-<argument> \ref  
-l. ...\ShowCommand\ref
-> \Ref=robust macro:
-->\protect \Ref  .
-> \Ref =macro:
-->\@ifstar \@Refstar \T at Ref .
-<argument> \Ref  
-l. ...\ShowCommand\Ref
-> \pageref=robust macro:
-->\protect \pageref  .
-> \pageref =\long macro:
-->\@ifstar \@pagerefstar \T at pageref .
-<argument> \pageref  
-l. ...\ShowCommand\pageref
+> \ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@refstar }{\T at ref }.
+> \Ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@Refstar }{\T at Ref }.
+> \pageref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@pagerefstar }{\T at pageref }.
 Completed box being shipped out [1]
 \vbox(633.0+0.0)x407.0
 .\hbox(0.0+0.0)x0.0
@@ -65,10 +56,10 @@ Completed box being shipped out [1]
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
 ....\glue(\baselineskip) 8.12001
-....\hbox(9.87999+0.0)x345.0, glue set 290.92673fil
-.....\hbox(6.39998+0.0)x24.07497
+....\hbox(9.87999+0.0)x345.0, glue set 290.70172fil
+.....\hbox(9.27998+0.0)x24.29997
 ......\glue 0.0
-......\OT1/cmr/bx/n/14.4 a
+......\OT1/cmr/bx/n/14.4 1
 ......\glue 16.19998
 .....\OT1/cmr/bx/n/14.4 T
 .....\kern-1.35
@@ -82,19 +73,31 @@ Completed box being shipped out [1]
 ....\write1{\@writefile{toc}{\protect \contentsline {section}{\protect \numberline \ETC.}
 ....\penalty 10000
 ....\glue 9.90276 plus 0.86108
-....\write1{\newlabel{sec:test}{{a}{\thepage }{Test}{section.1}{}}}
+....\write1{\newlabel{sec:test}{{sect: 1}{\thepage }{Test}{section.1}{}}}
 ....\penalty 10000
 ....\penalty 10000
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
 ....\glue(\baselineskip) 5.16669
-....\hbox(6.83331+1.94444)x345.0, glue set 318.61105fil
+....\hbox(6.83331+1.94444)x345.0, glue set 271.61101fil
 .....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.1}
-.....\OT1/cmr/m/n/10 a
+.....\OT1/cmr/m/n/10 s
+.....\OT1/cmr/m/n/10 e
+.....\OT1/cmr/m/n/10 c
+.....\OT1/cmr/m/n/10 t
+.....\OT1/cmr/m/n/10 :
+.....\glue 4.44444 plus 3.33331 minus 0.55556
+.....\OT1/cmr/m/n/10 1
 .....\pdfendlink
 .....\OT1/cmr/m/n/10 ,
 .....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.1}
-.....\OT1/cmr/m/n/10 A
+.....\OT1/cmr/m/n/10 S
+.....\OT1/cmr/m/n/10 e
+.....\OT1/cmr/m/n/10 c
+.....\OT1/cmr/m/n/10 t
+.....\OT1/cmr/m/n/10 :
+.....\glue 4.44444 plus 3.33331 minus 0.55556
+.....\OT1/cmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0
 .....\pdfendlink
 .....\OT1/cmr/m/n/10 ,
@@ -108,12 +111,24 @@ Completed box being shipped out [1]
 ....\glue(\parskip) 0.0 plus 1.0
 ....\glue(\parskip) 0.0
 ....\glue(\baselineskip) 3.22224
-....\hbox(6.83331+1.94444)x345.0, glue set 303.61105fil
+....\hbox(6.83331+1.94444)x345.0, glue set 256.61101fil
 .....\hbox(0.0+0.0)x15.0
-.....\OT1/cmr/m/n/10 a
+.....\OT1/cmr/m/n/10 s
+.....\OT1/cmr/m/n/10 e
+.....\OT1/cmr/m/n/10 c
+.....\OT1/cmr/m/n/10 t
+.....\OT1/cmr/m/n/10 :
+.....\glue 4.44444 plus 3.33331 minus 0.55556
+.....\OT1/cmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0
 .....\OT1/cmr/m/n/10 ,
-.....\OT1/cmr/m/n/10 A
+.....\OT1/cmr/m/n/10 S
+.....\OT1/cmr/m/n/10 e
+.....\OT1/cmr/m/n/10 c
+.....\OT1/cmr/m/n/10 t
+.....\OT1/cmr/m/n/10 :
+.....\glue 4.44444 plus 3.33331 minus 0.55556
+.....\OT1/cmr/m/n/10 1
 .....\hbox(0.0+0.0)x0.0
 .....\OT1/cmr/m/n/10 ,
 .....\glue 3.33333 plus 2.08331 minus 0.88889
diff --git a/testfiles-3/refstarred-nameref-showkeys.luatex.tlg b/testfiles-3/refstarred-nameref-showkeys.luatex.tlg
index 2ced6a1..64fdea8 100644
--- a/testfiles-3/refstarred-nameref-showkeys.luatex.tlg
+++ b/testfiles-3/refstarred-nameref-showkeys.luatex.tlg
@@ -1,23 +1,14 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-> \ref=robust macro:
-->\protect \ref  .
-> \ref =\long macro:
-->\@ifstar \@refstar \T at ref .
-<argument> \ref  
-l. ...\ShowCommand\ref
-> \Ref=robust macro:
-->\protect \Ref  .
-> \Ref =macro:
-->\@ifstar \@Refstar \T at Ref .
-<argument> \Ref  
-l. ...\ShowCommand\Ref
-> \pageref=robust macro:
-->\protect \pageref  .
-> \pageref =\long macro:
-->\@ifstar \@pagerefstar \T at pageref .
-<argument> \pageref  
-l. ...\ShowCommand\pageref
+> \ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@refstar }{\T at ref }.
+> \Ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@Refstar }{\T at Ref }.
+> \pageref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@pagerefstar }{\T at pageref }.
 LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <7> on input line ....
 LaTeX Font Info:    External font `cmex10' loaded for size
@@ -54,15 +45,15 @@ Completed box being shipped out [1]
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 8.2512
-...\hbox(9.7488+0.0864)x345.0, glue set 292.72803fil, direction TLT
+...\hbox(9.7488+0.0864)x345.0, glue set 292.49762fil, direction TLT
 ....\localpar
 .....\localinterlinepenalty=0
 .....\localbrokenpenalty=0
 .....\localleftbox=null
 .....\localrightbox=null
-....\hbox(6.5232+0.0864)x22.2768, direction TLT
+....\hbox(9.4464+0.0)x22.50719, direction TLT
 .....\glue 0.0
-.....\TU/lmr/bx/n/14.4 a
+.....\TU/lmr/bx/n/14.4 1
 .....\glue 14.4
 ....\TU/lmr/bx/n/14.4 T
 ....\kern-1.35359 (font)
@@ -101,13 +92,13 @@ Completed box being shipped out [1]
 .........\rule(*+*)x0.4
 ........\rule(0.4+0.0)x*
 ....\kern11.0
-...\write1{\newlabel{sec:test}{{a}{\thepage }{Test}{}{}}}
+...\write1{\newlabel{sec:test}{{sect: 1}{\thepage }{Test}{}{}}}
 ...\penalty 10000
 ...\penalty 10000
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
-...\glue(\baselineskip) 4.7536
-...\hbox(7.16+1.93)x345.0, glue set 278.60999fil, direction TLT
+...\glue(\baselineskip) 4.8636
+...\hbox(7.05+1.93)x345.0, glue set 231.62999fil, direction TLT
 ....\localpar
 .....\localinterlinepenalty=0
 .....\localbrokenpenalty=0
@@ -134,7 +125,13 @@ Completed box being shipped out [1]
 ........\rule(0.39998+0.0)x*
 .......\mathoff
 ......\glue 0.0 plus 1.0fil minus 1.0fil
-....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 s
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
 ....\glue 20.0
@@ -159,7 +156,13 @@ Completed box being shipped out [1]
 ........\rule(0.39998+0.0)x*
 .......\mathoff
 ......\glue 0.0 plus 1.0fil minus 1.0fil
-....\TU/lmr/m/n/10 A
+....\TU/lmr/m/n/10 S
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
 ....\glue(\spaceskip) 3.33 plus 2.08124 minus 0.888
@@ -192,8 +195,8 @@ Completed box being shipped out [1]
 ....\glue(\rightskip) 0.0
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
-...\glue(\baselineskip) 2.91
-...\hbox(7.16+1.93)x345.0, glue set 263.60999fil, direction TLT
+...\glue(\baselineskip) 3.02
+...\hbox(7.05+1.93)x345.0, glue set 216.62999fil, direction TLT
 ....\localpar
 .....\localinterlinepenalty=0
 .....\localbrokenpenalty=0
@@ -221,7 +224,13 @@ Completed box being shipped out [1]
 ........\rule(0.39998+0.0)x*
 .......\mathoff
 ......\glue 0.0 plus 1.0fil minus 1.0fil
-....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 s
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
 ....\glue 20.0
@@ -246,7 +255,13 @@ Completed box being shipped out [1]
 ........\rule(0.39998+0.0)x*
 .......\mathoff
 ......\glue 0.0 plus 1.0fil minus 1.0fil
-....\TU/lmr/m/n/10 A
+....\TU/lmr/m/n/10 S
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
 ....\glue(\spaceskip) 3.33 plus 2.08124 minus 0.888
diff --git a/testfiles-3/refstarred-nameref-showkeys.lvt b/testfiles-3/refstarred-nameref-showkeys.lvt
index 2397460..6ab5cf3 100644
--- a/testfiles-3/refstarred-nameref-showkeys.lvt
+++ b/testfiles-3/refstarred-nameref-showkeys.lvt
@@ -6,7 +6,7 @@
 
 \begin{document}
 xxx
-\renewcommand\thesection{\alph{section}}
+\labelformat{section}{sect: #1}
 \START \showoutput
 \ShowCommand\ref
 \ShowCommand\Ref
diff --git a/testfiles-3/refstarred-nameref-showkeys.tlg b/testfiles-3/refstarred-nameref-showkeys.tlg
index 4ca46d3..f0f97b8 100644
--- a/testfiles-3/refstarred-nameref-showkeys.tlg
+++ b/testfiles-3/refstarred-nameref-showkeys.tlg
@@ -1,23 +1,14 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-> \ref=robust macro:
-->\protect \ref  .
-> \ref =\long macro:
-->\@ifstar \@refstar \T at ref .
-<argument> \ref  
-l. ...\ShowCommand\ref
-> \Ref=robust macro:
-->\protect \Ref  .
-> \Ref =macro:
-->\@ifstar \@Refstar \T at Ref .
-<argument> \Ref  
-l. ...\ShowCommand\Ref
-> \pageref=robust macro:
-->\protect \pageref  .
-> \pageref =\long macro:
-->\@ifstar \@pagerefstar \T at pageref .
-<argument> \pageref  
-l. ...\ShowCommand\pageref
+> \ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@refstar }{\T at ref }.
+> \Ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@Refstar }{\T at Ref }.
+> \pageref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@pagerefstar }{\T at pageref }.
 LaTeX Font Info:    External font `cmex10' loaded for size
 (Font)              <7> on input line ....
 LaTeX Font Info:    External font `cmex10' loaded for size
@@ -49,10 +40,10 @@ Completed box being shipped out [1]
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 8.12001
-...\hbox(9.87999+0.0)x345.0, glue set 290.92673fil
-....\hbox(6.39998+0.0)x24.07497
+...\hbox(9.87999+0.0)x345.0, glue set 290.70172fil
+....\hbox(9.27998+0.0)x24.29997
 .....\glue 0.0
-.....\OT1/cmr/bx/n/14.4 a
+.....\OT1/cmr/bx/n/14.4 1
 .....\glue 16.19998
 ....\OT1/cmr/bx/n/14.4 T
 ....\kern-1.35
@@ -91,13 +82,13 @@ Completed box being shipped out [1]
 .........\rule(*+*)x0.4
 ........\rule(0.4+0.0)x*
 ....\kern 11.0
-...\write1{\newlabel{sec:test}{{a}{\thepage }{Test}{}{}}}
+...\write1{\newlabel{sec:test}{{sect: 1}{\thepage }{Test}{}{}}}
 ...\penalty 10000
 ...\penalty 10000
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 5.16669
-...\hbox(6.83331+1.94444)x345.0, glue set 278.611fil
+...\hbox(6.83331+1.94444)x345.0, glue set 231.61095fil
 ....\vbox(0.0+0.0)x0.0, glue set - 11.92859fil
 .....\glue 0.0 plus 1.0fil minus 1.0fil
 .....\hbox(11.92859+0.0)x0.0, glue set - 34.40048fil
@@ -119,7 +110,13 @@ Completed box being shipped out [1]
 ........\rule(0.39998+0.0)x*
 .......\mathoff
 ......\glue 0.0 plus 1.0fil minus 1.0fil
-....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
 ....\glue 20.00003
@@ -144,7 +141,13 @@ Completed box being shipped out [1]
 ........\rule(0.39998+0.0)x*
 .......\mathoff
 ......\glue 0.0 plus 1.0fil minus 1.0fil
-....\OT1/cmr/m/n/10 A
+....\OT1/cmr/m/n/10 S
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
 ....\glue 3.33333 plus 2.08331 minus 0.88889
@@ -178,7 +181,7 @@ Completed box being shipped out [1]
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 3.22224
-...\hbox(6.83331+1.94444)x345.0, glue set 263.611fil
+...\hbox(6.83331+1.94444)x345.0, glue set 216.61095fil
 ....\hbox(0.0+0.0)x15.0
 ....\vbox(0.0+0.0)x0.0, glue set - 11.92859fil
 .....\glue 0.0 plus 1.0fil minus 1.0fil
@@ -201,7 +204,13 @@ Completed box being shipped out [1]
 ........\rule(0.39998+0.0)x*
 .......\mathoff
 ......\glue 0.0 plus 1.0fil minus 1.0fil
-....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
 ....\glue 20.00003
@@ -226,7 +235,13 @@ Completed box being shipped out [1]
 ........\rule(0.39998+0.0)x*
 .......\mathoff
 ......\glue 0.0 plus 1.0fil minus 1.0fil
-....\OT1/cmr/m/n/10 A
+....\OT1/cmr/m/n/10 S
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
 ....\glue 3.33333 plus 2.08331 minus 0.88889
diff --git a/testfiles-3/refstarred-nameref.luatex.tlg b/testfiles-3/refstarred-nameref.luatex.tlg
index 0ff9e9a..81ad6e8 100644
--- a/testfiles-3/refstarred-nameref.luatex.tlg
+++ b/testfiles-3/refstarred-nameref.luatex.tlg
@@ -1,23 +1,14 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-> \ref=robust macro:
-->\protect \ref  .
-> \ref =\long macro:
-->\@ifstar \@refstar \T at ref .
-<argument> \ref  
-l. ...\ShowCommand\ref
-> \Ref=robust macro:
-->\protect \Ref  .
-> \Ref =macro:
-->\@ifstar \@Refstar \T at Ref .
-<argument> \Ref  
-l. ...\ShowCommand\Ref
-> \pageref=robust macro:
-->\protect \pageref  .
-> \pageref =\long macro:
-->\@ifstar \@pagerefstar \T at pageref .
-<argument> \pageref  
-l. ...\ShowCommand\pageref
+> \ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@refstar }{\T at ref }.
+> \Ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@Refstar }{\T at Ref }.
+> \pageref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@pagerefstar }{\T at pageref }.
 Completed box being shipped out [1]
 \vbox(633.0+0.0)x407.0, direction TLT
 .\glue 16.0
@@ -50,15 +41,15 @@ Completed box being shipped out [1]
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 8.2512
-...\hbox(9.7488+0.0864)x345.0, glue set 292.72803fil, direction TLT
+...\hbox(9.7488+0.0864)x345.0, glue set 292.49762fil, direction TLT
 ....\localpar
 .....\localinterlinepenalty=0
 .....\localbrokenpenalty=0
 .....\localleftbox=null
 .....\localrightbox=null
-....\hbox(6.5232+0.0864)x22.2768, direction TLT
+....\hbox(9.4464+0.0)x22.50719, direction TLT
 .....\glue 0.0
-.....\TU/lmr/bx/n/14.4 a
+.....\TU/lmr/bx/n/14.4 1
 .....\glue 14.4
 ....\TU/lmr/bx/n/14.4 T
 ....\kern-1.35359 (font)
@@ -71,22 +62,34 @@ Completed box being shipped out [1]
 ...\write1{\@writefile{toc}{\protect \contentsline {section}{\protect \numberline \ETC.}
 ...\penalty 10000
 ...\glue 9.913 plus 0.86198
-...\write1{\newlabel{sec:test}{{a}{\thepage }{Test}{}{}}}
+...\write1{\newlabel{sec:test}{{sect: 1}{\thepage }{Test}{}{}}}
 ...\penalty 10000
 ...\penalty 10000
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
-...\glue(\baselineskip) 4.7536
-...\hbox(7.16+1.93)x345.0, glue set 318.60999fil, direction TLT
+...\glue(\baselineskip) 4.8636
+...\hbox(7.05+1.93)x345.0, glue set 271.63fil, direction TLT
 ....\localpar
 .....\localinterlinepenalty=0
 .....\localbrokenpenalty=0
 .....\localleftbox=null
 .....\localrightbox=null
-....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 s
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
-....\TU/lmr/m/n/10 A
+....\TU/lmr/m/n/10 S
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
 ....\glue(\spaceskip) 3.33 plus 2.08124 minus 0.888
@@ -97,18 +100,30 @@ Completed box being shipped out [1]
 ....\glue(\rightskip) 0.0
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
-...\glue(\baselineskip) 2.91
-...\hbox(7.16+1.93)x345.0, glue set 303.60999fil, direction TLT
+...\glue(\baselineskip) 3.02
+...\hbox(7.05+1.93)x345.0, glue set 256.63fil, direction TLT
 ....\localpar
 .....\localinterlinepenalty=0
 .....\localbrokenpenalty=0
 .....\localleftbox=null
 .....\localrightbox=null
 ....\hbox(0.0+0.0)x15.0, direction TLT
-....\TU/lmr/m/n/10 a
+....\TU/lmr/m/n/10 s
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
-....\TU/lmr/m/n/10 A
+....\TU/lmr/m/n/10 S
+....\TU/lmr/m/n/10 e
+....\TU/lmr/m/n/10 c
+....\TU/lmr/m/n/10 t
+....\TU/lmr/m/n/10 :
+....\glue(\spaceskip) 4.44 plus 3.32999 minus 0.555
+....\TU/lmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0, direction TLT
 ....\TU/lmr/m/n/10 ,
 ....\glue(\spaceskip) 3.33 plus 2.08124 minus 0.888
diff --git a/testfiles-3/refstarred-nameref.lvt b/testfiles-3/refstarred-nameref.lvt
index 05fd37a..4057d77 100644
--- a/testfiles-3/refstarred-nameref.lvt
+++ b/testfiles-3/refstarred-nameref.lvt
@@ -5,7 +5,7 @@
 
 \begin{document}
 xxx
-\renewcommand\thesection{\alph{section}}
+\labelformat{section}{sect: #1}
 \START \showoutput
 \ShowCommand\ref
 \ShowCommand\Ref
diff --git a/testfiles-3/refstarred-nameref.tlg b/testfiles-3/refstarred-nameref.tlg
index e2d434c..c4fb72d 100644
--- a/testfiles-3/refstarred-nameref.tlg
+++ b/testfiles-3/refstarred-nameref.tlg
@@ -1,23 +1,14 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-> \ref=robust macro:
-->\protect \ref  .
-> \ref =\long macro:
-->\@ifstar \@refstar \T at ref .
-<argument> \ref  
-l. ...\ShowCommand\ref
-> \Ref=robust macro:
-->\protect \Ref  .
-> \Ref =macro:
-->\@ifstar \@Refstar \T at Ref .
-<argument> \Ref  
-l. ...\ShowCommand\Ref
-> \pageref=robust macro:
-->\protect \pageref  .
-> \pageref =\long macro:
-->\@ifstar \@pagerefstar \T at pageref .
-<argument> \pageref  
-l. ...\ShowCommand\pageref
+> \ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@refstar }{\T at ref }.
+> \Ref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@Refstar }{\T at Ref }.
+> \pageref=document command:
+  #1:s
+->\IfBooleanTF {#1}{\@pagerefstar }{\T at pageref }.
 Completed box being shipped out [1]
 \vbox(633.0+0.0)x407.0
 .\glue 16.0
@@ -45,10 +36,10 @@ Completed box being shipped out [1]
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 8.12001
-...\hbox(9.87999+0.0)x345.0, glue set 290.92673fil
-....\hbox(6.39998+0.0)x24.07497
+...\hbox(9.87999+0.0)x345.0, glue set 290.70172fil
+....\hbox(9.27998+0.0)x24.29997
 .....\glue 0.0
-.....\OT1/cmr/bx/n/14.4 a
+.....\OT1/cmr/bx/n/14.4 1
 .....\glue 16.19998
 ....\OT1/cmr/bx/n/14.4 T
 ....\kern-1.35
@@ -61,17 +52,29 @@ Completed box being shipped out [1]
 ...\write1{\@writefile{toc}{\protect \contentsline {section}{\protect \numberline \ETC.}
 ...\penalty 10000
 ...\glue 9.90276 plus 0.86108
-...\write1{\newlabel{sec:test}{{a}{\thepage }{Test}{}{}}}
+...\write1{\newlabel{sec:test}{{sect: 1}{\thepage }{Test}{}{}}}
 ...\penalty 10000
 ...\penalty 10000
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 5.16669
-...\hbox(6.83331+1.94444)x345.0, glue set 318.61105fil
-....\OT1/cmr/m/n/10 a
+...\hbox(6.83331+1.94444)x345.0, glue set 271.61101fil
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
-....\OT1/cmr/m/n/10 A
+....\OT1/cmr/m/n/10 S
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
 ....\glue 3.33333 plus 2.08331 minus 0.88889
@@ -83,12 +86,24 @@ Completed box being shipped out [1]
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\parskip) 0.0
 ...\glue(\baselineskip) 3.22224
-...\hbox(6.83331+1.94444)x345.0, glue set 303.61105fil
+...\hbox(6.83331+1.94444)x345.0, glue set 256.61101fil
 ....\hbox(0.0+0.0)x15.0
-....\OT1/cmr/m/n/10 a
+....\OT1/cmr/m/n/10 s
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
-....\OT1/cmr/m/n/10 A
+....\OT1/cmr/m/n/10 S
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 c
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 :
+....\glue 4.44444 plus 3.33331 minus 0.55556
+....\OT1/cmr/m/n/10 1
 ....\hbox(0.0+0.0)x0.0
 ....\OT1/cmr/m/n/10 ,
 ....\glue 3.33333 plus 2.08331 minus 0.88889





More information about the latex3-commits mailing list.