[latex3-commits] [git/LaTeX3-latex3-latex2e] shipout-hook-adjust: more test files (ba575e11)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed Jan 13 13:44:13 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : shipout-hook-adjust
Link       : https://github.com/latex3/latex2e/commit/ba575e11dcb3a379ed588b529249450884e1931a

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

commit ba575e11dcb3a379ed588b529249450884e1931a
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Jan 13 13:44:13 2021 +0100

    more test files


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

ba575e11dcb3a379ed588b529249450884e1931a
 base/testfiles-lthooks2/shipout2-008.lvt |  21 +++--
 base/testfiles-lthooks2/shipout2-009.lvt |  21 +++--
 base/testfiles-lthooks2/shipout2-014.lvt |  42 +++++++++
 base/testfiles-lthooks2/shipout2-014.tlg | 145 +++++++++++++++++++++++++++++++
 base/update-lthooks-tests.sh             |   1 +
 5 files changed, 218 insertions(+), 12 deletions(-)

diff --git a/base/testfiles-lthooks2/shipout2-008.lvt b/base/testfiles-lthooks2/shipout2-008.lvt
index 53491e91..ab92e2e1 100644
--- a/base/testfiles-lthooks2/shipout2-008.lvt
+++ b/base/testfiles-lthooks2/shipout2-008.lvt
@@ -3,7 +3,7 @@
 \debug_on:n { check-declarations , deprecation }
 \ExplSyntaxOff
 
-\documentclass[oneside]{report}
+\documentclass[oneside,a4paper]{report}
 
 \input{regression-test}
 
@@ -12,16 +12,25 @@
 \newcommand\chapteropening[1]{%
     \setbox\chapteropeningbox\vbox{\hsize\textwidth #1}}
 
+\newcommand\shipoutchapteropeningbox{%
+  \RawShipout\vbox to\paperheight
+    {\vskip -1in
+     \vss 
+     \moveleft -1in \box\chapteropeningbox 
+     \vss}%
+}
+
+
 \AddToHook{shipout/before}{%
 % before first page only generate a verso page if there is actual material
   \ifnum \ReadonlyShipoutCounter = 0
     \ifvoid\chapteropeningbox \else
-      \RawShipout\vbox to\textheight{\vss \box\chapteropeningbox \vss}%
-   \fi
- \else
+      \shipoutchapteropeningbox
+    \fi
+  \else
  % later do it always
-   \RawShipout\vbox to\textheight{\vss \box\chapteropeningbox \vss}%
- \fi
+    \shipoutchapteropeningbox
+  \fi
 }
 
 
diff --git a/base/testfiles-lthooks2/shipout2-009.lvt b/base/testfiles-lthooks2/shipout2-009.lvt
index f6c15d84..921d12ec 100644
--- a/base/testfiles-lthooks2/shipout2-009.lvt
+++ b/base/testfiles-lthooks2/shipout2-009.lvt
@@ -3,7 +3,7 @@
 \debug_on:n { check-declarations , deprecation }
 \ExplSyntaxOff
 
-\documentclass[oneside]{report}
+\documentclass[oneside,a4paper]{report}
 
 \input{regression-test}
 
@@ -12,16 +12,25 @@
 \newcommand\chapteropening[1]{%
     \setbox\chapteropeningbox\vbox{\hsize\textwidth #1}}
 
+\newcommand\shipoutchapteropeningbox{%
+  \RawShipout\vbox to\paperheight
+    {\vskip -1in
+     \vss 
+     \moveleft -1in \box\chapteropeningbox 
+     \vss}%
+}
+
+
 \AddToHook{shipout/before}{%
 % before first page only generate a verso page if there is actual material
   \ifnum \ReadonlyShipoutCounter = 0
     \ifvoid\chapteropeningbox \else
-      \RawShipout\vbox to\textheight{\vss \box\chapteropeningbox \vss}%
-   \fi
- \else
+      \shipoutchapteropeningbox
+    \fi
+  \else
  % later do it always
-   \RawShipout\vbox to\textheight{\vss \box\chapteropeningbox \vss}%
- \fi
+    \shipoutchapteropeningbox
+  \fi
 }
 
 
diff --git a/base/testfiles-lthooks2/shipout2-014.lvt b/base/testfiles-lthooks2/shipout2-014.lvt
new file mode 100644
index 00000000..883e150f
--- /dev/null
+++ b/base/testfiles-lthooks2/shipout2-014.lvt
@@ -0,0 +1,42 @@
+\RequirePackage[enable-debug]{expl3}
+\ExplSyntaxOn
+\debug_on:n { check-declarations , deprecation }
+\ExplSyntaxOff
+
+\documentclass[a4paper]{article}
+
+\input{regression-test}
+
+
+\AddToHook{shipout/after}{%
+  \ifnum \ReadonlyShipoutCounter = 1
+    \RawShipout\null
+  \else
+    \RawShipout\vbox{%
+      \kern-1in
+      \moveleft 1in
+      \hbox to\paperwidth
+         {\hfil\vrule width 1pt height\paperheight\hfil}%
+    }%
+  \fi
+}
+
+
+
+
+\DebugShipoutsOn
+
+\showoutput
+
+\begin{document}
+
+\START
+
+title \newpage
+X     \newpage
+Y     \newpage
+Z
+\end{document}
+
+
+
diff --git a/base/testfiles-lthooks2/shipout2-014.tlg b/base/testfiles-lthooks2/shipout2-014.tlg
new file mode 100644
index 00000000..19862dff
--- /dev/null
+++ b/base/testfiles-lthooks2/shipout2-014.tlg
@@ -0,0 +1,145 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+Absolute page = 1 (target: 8)
+Completed box being shipped out [1]
+\vbox(682.0+0.0)x398.0
+.\hbox(0.0+0.0)x0.0
+.\glue 17.0
+.\vbox(665.0+0.0)x345.0, shifted 53.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(598.0+0.0)x345.0, glue set 587.9372fil
+...\write-{}
+...\glue(\topskip) 3.05556
+...\hbox(6.94444+0.0)x345.0, glue set 312.22218fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 i
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 l
+....\OT1/cmr/m/n/10 e
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\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
+.\kern 0.0
+Absolute page = 2 (target: 8)
+Doing raw shipout ...
+Completed box being shipped out [1]
+\hbox(0.0+0.0)x0.0
+Absolute page = 3 (target: 8)
+Completed box being shipped out [2]
+\vbox(682.0+0.0)x398.0
+.\glue 17.0
+.\vbox(665.0+0.0)x345.0, shifted 53.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(598.0+0.0)x345.0, glue set 587.9372fil
+...\glue(\topskip) 3.16669
+...\hbox(6.83331+0.0)x345.0, glue set 322.49998fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 X
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+...\glue 0.0 plus 1.0fil
+...\OT1/cmr/m/n/10 2
+...\glue 0.0 plus 1.0fil
+Absolute page = 4 (target: 8)
+Doing raw shipout ...
+Completed box being shipped out [2]
+\vbox(772.77686+0.0)x525.23788
+.\kern -72.26999
+.\hbox(845.04684+0.0)x597.50787, glue set 298.25394fil, shifted -72.26999
+..\glue 0.0 plus 1.0fil
+..\rule(845.04684+*)x1.0
+..\glue 0.0 plus 1.0fil
+Absolute page = 5 (target: 8)
+Completed box being shipped out [3]
+\vbox(682.0+0.0)x398.0
+.\glue 17.0
+.\vbox(665.0+0.0)x345.0, shifted 53.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(598.0+0.0)x345.0, glue set 587.9372fil
+...\glue(\topskip) 3.16669
+...\hbox(6.83331+0.0)x345.0, glue set 322.49998fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 Y
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+...\glue 0.0 plus 1.0fil
+...\OT1/cmr/m/n/10 3
+...\glue 0.0 plus 1.0fil
+Absolute page = 6 (target: 8)
+Doing raw shipout ...
+Completed box being shipped out [3]
+\vbox(772.77686+0.0)x525.23788
+.\kern -72.26999
+.\hbox(845.04684+0.0)x597.50787, glue set 298.25394fil, shifted -72.26999
+..\glue 0.0 plus 1.0fil
+..\rule(845.04684+*)x1.0
+..\glue 0.0 plus 1.0fil
+Absolute page = 7 (target: 8)
+Completed box being shipped out [4]
+\vbox(682.0+0.0)x398.0
+.\glue 17.0
+.\vbox(665.0+0.0)x345.0, shifted 53.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(598.0+0.0)x345.0, glue set 587.9372fil
+...\glue(\topskip) 3.16669
+...\hbox(6.83331+0.0)x345.0, glue set 323.88889fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 Z
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+...\glue 0.0 plus 1.0fil
+...\OT1/cmr/m/n/10 4
+...\glue 0.0 plus 1.0fil
+Absolute page = 8 (target: 8)
+Doing raw shipout ...
+Completed box being shipped out [4]
+\vbox(772.77686+0.0)x525.23788
+.\kern -72.26999
+.\hbox(845.04684+0.0)x597.50787, glue set 298.25394fil, shifted -72.26999
+..\glue 0.0 plus 1.0fil
+..\rule(845.04684+*)x1.0
+..\glue 0.0 plus 1.0fil
+(shipout2-014.aux)
diff --git a/base/update-lthooks-tests.sh b/base/update-lthooks-tests.sh
index 41338d1e..fbeced8f 100644
--- a/base/update-lthooks-tests.sh
+++ b/base/update-lthooks-tests.sh
@@ -13,6 +13,7 @@ l3build save -cconfig-lthooks2 \
    shipout2-011 \
    shipout2-012 \
    shipout2-013 \
+   shipout2-014 \
    github-0360  \
    github-0431
 





More information about the latex3-commits mailing list.