[latex3-commits] [git/LaTeX3-latex3-pdfresources] renamedict77: cleaning up pageresources (32199a9)

Ulrike Fischer fischer at troubleshooting-tex.de
Fri Apr 10 16:24:00 CEST 2020


Repository : https://github.com/latex3/pdfresources
On branch  : renamedict77
Link       : https://github.com/latex3/pdfresources/commit/32199a965fbe1c1eec89597c02e443f54f11d000

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

commit 32199a965fbe1c1eec89597c02e443f54f11d000
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Fri Apr 10 16:24:00 2020 +0200

    cleaning up pageresources


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

32199a965fbe1c1eec89597c02e443f54f11d000
 pdfresources.dtx | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/pdfresources.dtx b/pdfresources.dtx
index 1064422..a255d22 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -2050,6 +2050,11 @@
 %    \begin{macrocode}
 % backend commands the command to fill the register
 % and to push the values.
+% xelatex doesn't need the dict, but it can be used to show the content
+\clist_map_inline:Nn \c_@@_backend_PageNResources_clist
+      {
+        \@@_dict_gnew:n {PageN/Resources/#1}
+      }
 % pdftex and luatex
 \bool_if:nT
   {
@@ -2060,7 +2065,6 @@
   { %create the props and backend objects:
     \clist_map_inline:Nn \c_@@_backend_PageNResources_clist
       {
-        \@@_dict_gnew:n {PageN/Resources/#1}
         \@@_backend_object_new:nn {PageN/Resources/#1} {dict}
         \cs_if_exist:NT \tex_directlua:D
           {
@@ -2130,6 +2134,8 @@
 
     \cs_new_protected:Npn \@@_backend_PageNResources_gput:nnn #1 #2 #3
       {
+       % this is unused but can be used by the show command
+       \@@_dict_put:nnn {PageN/Resources/#1} { #2 }{ #3 }
        %objects are not filled with \pdf_object_write as this is not additive!
         \@@_backend:x
           {
@@ -2144,7 +2150,10 @@
 \bool_if:nT { \sys_if_engine_pdftex_p: && !\sys_if_output_pdf_p: }
   {
     \cs_new_protected:Npn \@@_backend_PageNResources:n #1 {}
-    \cs_new_protected:Npn \@@_backend_PageNResources_gput:nnn #1 #2 #3 {}
+    \cs_new_protected:Npn \@@_backend_PageNResources_gput:nnn #1 #2 #3
+      { %only for the show command
+        \@@_dict_put:nnn {PageN/Resources/#1} { #2 }{ #3 }
+      }
     \cs_new_protected:Npn \@@_PageNResources_gpush: {}
   }
 %    \end{macrocode}





More information about the latex3-commits mailing list.