Skip to content

Commit

Permalink
add tests for caption spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed Jun 25, 2023
1 parent 122b3be commit b0dc6b3
Show file tree
Hide file tree
Showing 5 changed files with 278 additions and 21 deletions.
9 changes: 0 additions & 9 deletions required/latex-lab/testfiles-float/float-004.luatex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@ Completed box being shipped out [1]
.......\glue(\rightskip) 0.0
......\pdfliteral page <lua data reference ...>
......\pdfliteral page <lua data reference ...>
......\pdfdest name{figure.1} xyz
......\pdfdest name{figure.1} xyz
......\write1{\@writefile{lof}{\protect \contentsline {figure}{\protect \numberline {1}{\ignorespaces This is an example image }}{\thepage }{figure.1}\protected@file@percent }}
......\glue 10.0
......\glue(\baselineskip) 5.05556
Expand Down Expand Up @@ -1271,9 +1269,6 @@ Completed box being shipped out [1]
......\pdfdest name{tagstructure.23} xyz
......\pdfdest name{tagstructure.23} xyz
......\penalty 10000
......\pdfdest name{table.1} xyz
......\pdfdest name{table.1} xyz
......\penalty 10000
......\write1{\@writefile{lot}{\protect \contentsline {table}{\protect \numberline {1}{\ignorespaces Animals in example images}}{\thepage }{table.1}\protected@file@percent }}
......\glue 10.0
......\hbox(6.94444+1.94444)x345.0, glue set 92.86096fil, direction TLT
Expand Down Expand Up @@ -1501,8 +1496,6 @@ Completed box being shipped out [2]
.......\glue(\rightskip) 0.0
......\pdfliteral page <lua data reference ...>
......\pdfliteral page <lua data reference ...>
......\pdfdest name{figure.2} xyz
......\pdfdest name{figure.2} xyz
......\write1{\@writefile{lof}{\protect \contentsline {figure}{\protect \numberline {2}{\ignorespaces This is an example image from the duckuments package}}{\thepage }{figure.2}\protected@file@percent }}
......\glue 10.0
......\glue(\baselineskip) 5.05556
Expand Down Expand Up @@ -1646,8 +1639,6 @@ Completed box being shipped out [2]
.......\glue(\rightskip) 0.0
......\pdfliteral page <lua data reference ...>
......\pdfliteral page <lua data reference ...>
......\pdfdest name{figure.3} xyz
......\pdfdest name{figure.3} xyz
......\write1{\@writefile{lof}{\protect \contentsline {figure}{\protect \numberline {3}{\ignorespaces The second page from the PDF}}{\thepage }{figure.3}\protected@file@percent }}
......\glue 10.0
......\glue(\baselineskip) 5.05556
Expand Down
12 changes: 0 additions & 12 deletions required/latex-lab/testfiles-float/float-004.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,6 @@ Completed box being shipped out [1]
......\marks4{b+,12,14,text,,,}
......\marks4{e-,12,14,}
......\marks4{e+,12,14,}
......\pdfdest name{figure.1} xyz
......\pdfdest struct49 name{figure.1} xyz
......\penalty 10000
......\write1{\@writefile{lof}{\protect \contentsline {figure}{\protect \numberline {1}{\ignorespaces This is an example image }}{\thepage }{figure.1}\protected@file@percent }}
......\glue 10.0
......\glue(\baselineskip) 5.05556
Expand Down Expand Up @@ -1173,9 +1170,6 @@ Completed box being shipped out [1]
......\pdfdest name{tagstructure.23} xyz
......\pdfdest struct72 name{tagstructure.23} xyz
......\penalty 10000
......\pdfdest name{table.1} xyz
......\pdfdest struct72 name{table.1} xyz
......\penalty 10000
......\write1{\@writefile{lot}{\protect \contentsline {table}{\protect \numberline {1}{\ignorespaces Animals in example images}}{\thepage }{table.1}\protected@file@percent }}
......\glue 10.0
......\hbox(6.94444+1.94444)x345.0, glue set 92.86096fil
Expand Down Expand Up @@ -1397,9 +1391,6 @@ Completed box being shipped out [2]
......\marks4{b+,24,30,text,,,}
......\marks4{e-,24,30,}
......\marks4{e+,24,30,}
......\pdfdest name{figure.2} xyz
......\pdfdest struct80 name{figure.2} xyz
......\penalty 10000
......\write1{\@writefile{lof}{\protect \contentsline {figure}{\protect \numberline {2}{\ignorespaces This is an example image from the duckuments package}}{\thepage }{figure.2}\protected@file@percent }}
......\glue 10.0
......\glue(\baselineskip) 5.05556
Expand Down Expand Up @@ -1544,9 +1535,6 @@ Completed box being shipped out [2]
......\marks4{b+,29,36,text,,,}
......\marks4{e-,29,36,}
......\marks4{e+,29,36,}
......\pdfdest name{figure.3} xyz
......\pdfdest struct93 name{figure.3} xyz
......\penalty 10000
......\write1{\@writefile{lof}{\protect \contentsline {figure}{\protect \numberline {3}{\ignorespaces The second page from the PDF}}{\thepage }{figure.3}\protected@file@percent }}
......\glue 10.0
......\glue(\baselineskip) 5.05556
Expand Down
129 changes: 129 additions & 0 deletions required/latex-lab/testfiles-float/float-006-spacing.luatex.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
Floatstructure:4
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 234.57503fil, direction TLT
....\glue 0.0 plus 1.0fil
....\glue -8.0 plus -2.0fil
....\glue 8.0 plus 2.0fil
....\vbox(80.84995+0.0)x345.0, direction TLT
.....\vbox(80.84995+0.0)x345.0, direction TLT
......\pdfdest name{tagstructure.4} xyz
......\pdfdest name{tagstructure.4} xyz
......\penalty 10000
......\glue(\parskip) 0.0
......\glue(\parskip) 0.0
......\hbox(56.9055+0.0)x345.0, direction TLT
.......\glue(\leftskip) 0.0 plus 1.0fil
.......\localpar
........\localinterlinepenalty=0
........\localbrokenpenalty=0
........\localleftbox=null
........\localrightbox=null
.......\hbox(0.0+0.0)x0.0, direction TLT
.......\hbox(56.9055+0.0)x345.0, direction TLT
........\pdfliteral page <lua data reference ...>
........\pdfliteral page <lua data reference ...>
........\rule(56.9055+0.0)x345.0
.......\penalty 10000
.......\glue(\parfillskip) 0.0
.......\glue(\rightskip) 0.0 plus 1.0fil
......\pdfliteral page <lua data reference ...>
......\pdfliteral page <lua data reference ...>
......\write1{\@writefile{lof}{\protect \contentsline {figure}{\protect \numberline {1}{\ignorespaces a caption}}{\thepage }{figure.1}\protected@file@percent }}
......\glue 10.0
......\glue(\baselineskip) 5.16669
......\hbox(6.83331+1.94444)x345.0, glue set 130.33325fil, direction TLT
.......\glue 0.0 plus 1.0fil
.......\pdfliteral page <lua data reference ...>
.......\pdfliteral page <lua data reference ...>
.......\OT1/cmr/m/n/10 F
.......\OT1/cmr/m/n/10 i
.......\OT1/cmr/m/n/10 g
.......\discretionary (penalty 50)
........< \OT1/cmr/m/n/10 -
.......\OT1/cmr/m/n/10 u
.......\OT1/cmr/m/n/10 r
.......\OT1/cmr/m/n/10 e
.......\penalty 10000
.......\TU/lmr/m/n/10
.......\glue(\spaceskip) 0.00333 plus 1.66666 minus 1.11111
.......\OT1/cmr/m/n/10 1
.......\OT1/cmr/m/n/10 :
.......\TU/lmr/m/n/10
.......\glue(\spaceskip) 1.11444 plus 3.33331 minus 0.55556
.......\pdfliteral page <lua data reference ...>
.......\pdfliteral page <lua data reference ...>
.......\OT1/cmr/m/n/10 a
.......\TU/lmr/m/n/10
.......\glue(\spaceskip) 0.00333 plus 1.66666 minus 1.11111
.......\OT1/cmr/m/n/10 c
.......\OT1/cmr/m/n/10 a
.......\OT1/cmr/m/n/10 p
.......\discretionary (penalty 50)
........< \OT1/cmr/m/n/10 -
.......\OT1/cmr/m/n/10 t
.......\OT1/cmr/m/n/10 i
.......\OT1/cmr/m/n/10 o
.......\OT1/cmr/m/n/10 n
.......\glue 0.0 plus 1.0fil
......\glue 0.0
......\glue 0.0
....\glue 0.0 plus 1.0fil
...\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 ...>
(float-006-spacing.aux)
13 changes: 13 additions & 0 deletions required/latex-lab/testfiles-float/float-006-spacing.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
%this tests if the spacing is correct, \refstepcounter with anchor would enlarge it
\DocumentMetadata{testphase={phase-III}}
\input{regression-test}
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\START\showoutput
\begin{figure}
\centering
\rule{\linewidth}{2cm}
\caption{a caption}
\end{figure}
\end{document}
136 changes: 136 additions & 0 deletions required/latex-lab/testfiles-float/float-006-spacing.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
Floatstructure:4
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-,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,1,}
....\marks4{e+,4,1,}
....\pdfrunninglinkon
...\glue 25.0
...\glue(\lineskip) 0.0
...\vbox(550.0+0.0)x345.0, glue set 234.57503fil
....\glue 0.0 plus 1.0fil
....\glue -8.0 plus -2.0fil
....\glue 8.0 plus 2.0fil
....\vbox(80.84995+0.0)x345.0
.....\vbox(80.84995+0.0)x345.0
......\pdfdest name{tagstructure.4} xyz
......\pdfdest struct13 name{tagstructure.4} xyz
......\penalty 10000
......\glue(\parskip) 0.0
......\glue(\parskip) 0.0
......\hbox(56.9055+0.0)x345.0
.......\glue(\leftskip) 0.0 plus 1.0fil
.......\write1{\newlabeldata{mcid-1}{{tagabspage}{\__ref_attribute_tagabspage: }{tagmcabs}{1}{tagmcid}{0}}}
.......\pdfliteral page{/text /l3pdf1 BDC}
.......\write1{\newlabeldata{l3pdf1}{{abspage}{\__ref_attribute_abspage: }}}
.......\hbox(0.0+0.0)x0.0
.......\hbox(56.9055+0.0)x345.0
........\rule(56.9055+0.0)x345.0
.......\pdfliteral page{EMC}
.......\penalty 10000
.......\glue(\parfillskip) 0.0
.......\glue(\rightskip) 0.0 plus 1.0fil
......\marks4{b-,1,6,text,,,}
......\marks4{b+,1,6,text,,,}
......\marks4{e-,1,6,}
......\marks4{e+,1,6,}
......\write1{\@writefile{lof}{\protect \contentsline {figure}{\protect \numberline {1}{\ignorespaces a caption}}{\thepage }{figure.1}\protected@file@percent }}
......\glue 10.0
......\glue(\baselineskip) 5.16669
......\hbox(6.83331+1.94444)x345.0, glue set 130.33325fil
.......\glue 0.0 plus 1.0fil
.......\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/m/n/10 F
.......\OT1/cmr/m/n/10 i
.......\OT1/cmr/m/n/10 g
.......\OT1/cmr/m/n/10 u
.......\OT1/cmr/m/n/10 r
.......\OT1/cmr/m/n/10 e
.......\penalty 10000
.......\glue 3.33333 plus 1.66666 minus 1.11111
.......\OT1/cmr/m/n/10 1
.......\OT1/cmr/m/n/10 :
.......\glue 4.44444 plus 3.33331 minus 0.55556
.......\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: }}}
.......\OT1/cmr/m/n/10 a
.......\glue 3.33333 plus 1.66666 minus 1.11111
.......\OT1/cmr/m/n/10 c
.......\OT1/cmr/m/n/10 a
.......\OT1/cmr/m/n/10 p
.......\OT1/cmr/m/n/10 t
.......\OT1/cmr/m/n/10 i
.......\OT1/cmr/m/n/10 o
.......\OT1/cmr/m/n/10 n
.......\pdfliteral page{EMC}
.......\glue 0.0 plus 1.0fil
......\marks4{b-,2,8,Lbl,,,}
......\marks4{b+,2,8,Lbl,,,}
......\marks4{e-,2,8,}
......\marks4{e+,2,8,}
......\marks4{b-,3,7,Caption,,,}
......\marks4{b+,3,7,Caption,,,}
......\marks4{e-,3,7,}
......\marks4{e+,3,7,}
......\glue 0.0
......\glue 0.0
....\glue 0.0 plus 1.0fil
...\pdfrunninglinkoff
...\pdfliteral page{/Artifact BMC}
...\marks4{b-,5,-1,}
...\marks4{b+,5,-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-,5,1,}
...\marks4{e+,5,1,}
...\pdfrunninglinkon
.\kern 0.0
.\kern 0.0
.\kern -633.0
.\hbox(0.0+0.0)x0.0
.\kern 633.0
(float-006-spacing.aux)

0 comments on commit b0dc6b3

Please sign in to comment.