[latex3-commits] [git/LaTeX3-latex3-pdfresources] test-new-hooks: switch to new shipout abspage counter (1f6128d)

Ulrike Fischer fischer at troubleshooting-tex.de
Mon May 25 20:20:22 CEST 2020


Repository : https://github.com/latex3/pdfresources
On branch  : test-new-hooks
Link       : https://github.com/latex3/pdfresources/commit/1f6128df9aa5d5884ab87bd2ac9505046f0b9089

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

commit 1f6128df9aa5d5884ab87bd2ac9505046f0b9089
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon May 25 20:20:22 2020 +0200

    switch to new shipout abspage counter


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

1f6128df9aa5d5884ab87bd2ac9505046f0b9089
 pdfresources.dtx                     | 30 ++++++++++++++----------------
 testfiles/dict_if_empty.luatex.tlg   |  4 ++--
 testfiles/pagelabels-log.luatex.tlg  | 20 ++++++++++----------
 testfiles/show.luatex.tlg            |  4 ++--
 testfiles/version-compare.luatex.tlg |  4 ++--
 5 files changed, 30 insertions(+), 32 deletions(-)

diff --git a/pdfresources.dtx b/pdfresources.dtx
index 0adb7f9..40a0157 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -181,11 +181,10 @@
 %
 % \subsection{some zref code, needs to be replaced later}
 % \begin{variable}
-%  {\g_@@_abspage_int, \g_@@_backend_resourceid_int, \g_@@_backend_name_int, \g_@@_backend_page_int}
-%  an absolute page counter, a counter to create labels for the resources, a counter
+%  {\g_@@_backend_resourceid_int, \g_@@_backend_name_int, \g_@@_backend_page_int}
+%  a counter to create labels for the resources, a counter
 %  to number properties in bdc marks, a counter for the \cs{pdfpageref} implementation.
 %    \begin{macrocode}
-\int_new:N \g_@@_abspage_int
 \int_new:N \g_@@_backend_resourceid_int
 \int_new:N \g_@@_backend_name_int
 \int_new:N \g_@@_backend_page_int
@@ -194,7 +193,7 @@
 % a reference for the absolute page counter
 %    \begin{macrocode}
 \zref at newlist  { l3pdf }
-\zref at newprop* { pdf at abspage } [0] { \int_use:N \g_@@_abspage_int }
+\zref at newprop* { pdf at abspage } [0] { \int_use:N \g_shipout_readonly_int }
 \zref at addprop  { l3pdf } { pdf at abspage }
 %    \end{macrocode}
 %
@@ -319,10 +318,9 @@
 
 \cs_new_protected:Npn \@@_BACKEND_shipout_code:
   {
-    \int_gincr:N \g_@@_abspage_int
     \g_@@_BACKEND_thispage_shipout_tl
     \int_compare:nNnT
-      { \g_@@_abspage_int }
+      { \g_shipout_readonly_int }
       =
       { \zref at extractdefault{LastPage}{abspage}{0} }
       {
@@ -332,8 +330,8 @@
 
 \@@_BACKEND_thispage_shipout_gput:n
   {
-    \exp_args:NV \@@_backend_ThisPage_gpush:n           { \g_@@_abspage_int }
-    \exp_args:NV \@@_backend_PageResources_gpush:n { \g_@@_abspage_int }
+    \exp_args:NV \@@_backend_ThisPage_gpush:n           { \g_shipout_readonly_int }
+    \exp_args:NV \@@_backend_PageResources_gpush:n { \g_shipout_readonly_int }
   }
 
 %!!!!! check if pdftex/luatex can run some of them in the immediate end-of-run
@@ -1321,11 +1319,11 @@
         {
           l3kernel.@@.backend_ThisPage_gput
             (
-              tex.count["g_@@_abspage_int"],
+              tex.count["g_shipout_readonly_int"],
               \@@_backend_luastring:n { #1 },
               \@@_backend_luastring:n { #2 }
             )
-          l3kernel.@@.backend_ThisPage_gpush (tex.count["g_@@_abspage_int"])
+          l3kernel.@@.backend_ThisPage_gpush (tex.count["g_shipout_readonly_int"])
         }
     }
   %the code to push the values, used in shipout
@@ -1336,7 +1334,7 @@
     {
       \tex_latelua:D
         {
-          l3kernel.@@.backend_ThisPage_gpush (tex.count["g_@@_abspage_int"])
+          l3kernel.@@.backend_ThisPage_gpush (tex.count["g_shipout_readonly_int"])
         }
     }
   }
@@ -1586,7 +1584,7 @@
             \tex_latelua:D{l3kernel.@@.Page.Resources.#1=true}
             \tex_latelua:D
               {
-                l3kernel.pdf.Page_Resources_gpush(tex.count["g_@@_abspage_int"])
+                l3kernel.pdf.Page_Resources_gpush(tex.count["g_shipout_readonly_int"])
               }
           }
       }
@@ -2540,7 +2538,7 @@
               {
                 l3kernel.pdf.Page_Resources_Properties_gput
                   (
-                    tex.count["g_@@_abspage_int"],
+                    tex.count["g_shipout_readonly_int"],
                     "l3pdf\int_use:N\g_@@_backend_name_int",
                     "\@@_backend_object_ref:n { #2 }"
                   )
@@ -2564,7 +2562,7 @@
               {
                 l3kernel.pdf.Page_Resources_Properties_gput
                   (
-                    tex.count["g_@@_abspage_int"],
+                    tex.count["g_shipout_readonly_int"],
                     "l3pdf\int_use:N\g_@@_backend_name_int",
                     "\@@_backend_object_last:"
                   )
@@ -4014,7 +4012,7 @@ local function @@_backend_ThisPage_gpush (page)
  return token
 end
 
-function l3kernel.@@.backend_ThisPage_gput (page,name,value) -- tex.count["g_@@_abspage_int"]
+function l3kernel.@@.backend_ThisPage_gput (page,name,value) -- tex.count["g_shipout_readonly_int"]
  @@_backend_ThisPage_gput (page,name,value)
 end
 
@@ -4060,7 +4058,7 @@ local function @@_backend_PageResources_gpush (page)
 end
 
 -- the function is public, as I probably need it in tagpdf too ...
-function l3kernel.pdf.Page_Resources_Properties_gput (page,name,value) -- tex.count["g_@@_abspage_int"]
+function l3kernel.pdf.Page_Resources_Properties_gput (page,name,value) -- tex.count["g_shipout_readonly_int"]
  Properties[page] = Properties[page] or {}
  Properties[page][name]=value
  pdf.setpageresources(@@_backend_PageResources_gpush (page))
diff --git a/testfiles/dict_if_empty.luatex.tlg b/testfiles/dict_if_empty.luatex.tlg
index 74575b0..e20441c 100644
--- a/testfiles/dict_if_empty.luatex.tlg
+++ b/testfiles/dict_if_empty.luatex.tlg
@@ -7,8 +7,8 @@ Completed box being shipped out [1]
 ..\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
-....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g__pdf_abspage_i
-nt"]\ETC.}
+....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g_shipout_readon
+ly_i\ETC.}
 ...\glue 0.0 plus 1.0fil minus 1.0fil
 .\glue 16.0
 .\vbox(617.0+0.0)x345.0, shifted 62.0, direction TLT
diff --git a/testfiles/pagelabels-log.luatex.tlg b/testfiles/pagelabels-log.luatex.tlg
index 0f52764..6430382 100644
--- a/testfiles/pagelabels-log.luatex.tlg
+++ b/testfiles/pagelabels-log.luatex.tlg
@@ -8,8 +8,8 @@ Completed box being shipped out [1]
 ..\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
-....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g__pdf_abspage_i
-nt"]\ETC.}
+....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g_shipout_readon
+ly_i\ETC.}
 ...\glue 0.0 plus 1.0fil minus 1.0fil
 .\vbox(0.0+0.0)x0.0, glue set - 14.99626fil, direction TLT
 ..\kern0.0
@@ -77,8 +77,8 @@ Completed box being shipped out [2]
 ..\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
-....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g__pdf_abspage_i
-nt"]\ETC.}
+....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g_shipout_readon
+ly_i\ETC.}
 ...\glue 0.0 plus 1.0fil minus 1.0fil
 .\vbox(0.0+0.0)x0.0, glue set - 14.99626fil, direction TLT
 ..\kern0.0
@@ -143,8 +143,8 @@ Completed box being shipped out [3]
 ..\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
-....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g__pdf_abspage_i
-nt"]\ETC.}
+....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g_shipout_readon
+ly_i\ETC.}
 ...\glue 0.0 plus 1.0fil minus 1.0fil
 .\vbox(0.0+0.0)x0.0, glue set - 14.99626fil, direction TLT
 ..\kern0.0
@@ -209,8 +209,8 @@ Completed box being shipped out [1]
 ..\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
-....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g__pdf_abspage_i
-nt"]\ETC.}
+....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g_shipout_readon
+ly_i\ETC.}
 ...\glue 0.0 plus 1.0fil minus 1.0fil
 .\vbox(0.0+0.0)x0.0, glue set - 14.99626fil, direction TLT
 ..\kern0.0
@@ -266,8 +266,8 @@ Completed box being shipped out [5]
 ..\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
-....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g__pdf_abspage_i
-nt"]\ETC.}
+....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g_shipout_readon
+ly_i\ETC.}
 ...\glue 0.0 plus 1.0fil minus 1.0fil
 .\vbox(0.0+0.0)x0.0, glue set - 14.99626fil, direction TLT
 ..\kern0.0
diff --git a/testfiles/show.luatex.tlg b/testfiles/show.luatex.tlg
index 76c8809..3a23083 100644
--- a/testfiles/show.luatex.tlg
+++ b/testfiles/show.luatex.tlg
@@ -22,8 +22,8 @@ Completed box being shipped out [1]
 ..\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
-....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g__pdf_abspage_i
-nt"]\ETC.}
+....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g_shipout_readon
+ly_i\ETC.}
 ...\glue 0.0 plus 1.0fil minus 1.0fil
 .\vbox(0.0+0.0)x0.0, glue set - 14.99626fil, direction TLT
 ..\kern0.0
diff --git a/testfiles/version-compare.luatex.tlg b/testfiles/version-compare.luatex.tlg
index 6efd2b5..bd3ca24 100644
--- a/testfiles/version-compare.luatex.tlg
+++ b/testfiles/version-compare.luatex.tlg
@@ -11,8 +11,8 @@ Completed box being shipped out [1]
 ..\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
-....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g__pdf_abspage_i
-nt"]\ETC.}
+....\latelua0{l3kernel.__pdf.backend_ThisPage_gpush(tex.count["g_shipout_readon
+ly_i\ETC.}
 ...\glue 0.0 plus 1.0fil minus 1.0fil
 .\glue 16.0
 .\vbox(617.0+0.0)x345.0, shifted 62.0, direction TLT





More information about the latex3-commits mailing list.