[latex3-commits] [git/LaTeX3-latex3-pdfresources] pdfdictchange: add module to code dict names (f33325d)

Ulrike Fischer fischer at troubleshooting-tex.de
Fri Dec 4 15:11:00 CET 2020


Repository : https://github.com/latex3/pdfresources
On branch  : pdfdictchange
Link       : https://github.com/latex3/pdfresources/commit/f33325d248e10d4f9e7bddaf57d203c99c4189d7

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

commit f33325d248e10d4f9e7bddaf57d203c99c4189d7
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Fri Dec 4 15:11:00 2020 +0100

    add module to code dict names


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

f33325d248e10d4f9e7bddaf57d203c99c4189d7
 l3backend-pdf-extra.dtx     | 102 ++++++++++++++++++++++----------------------
 l3pdfmanagement.dtx         |  92 +++++++++++++++++++--------------------
 testfiles/dict_if_empty.lvt |   4 +-
 3 files changed, 99 insertions(+), 99 deletions(-)

diff --git a/l3backend-pdf-extra.dtx b/l3backend-pdf-extra.dtx
index 49d770d..e05cadd 100644
--- a/l3backend-pdf-extra.dtx
+++ b/l3backend-pdf-extra.dtx
@@ -278,14 +278,14 @@
 % sets a lua table with lualatex
  \cs_new_protected:Npn \@@_backend_Page_gput:nn #1 #2 %key,value
    {
-     \pdfdict_gput:nnn {g_Core/Page}{ #1 }{ #2 }
+     \pdfdict_gput:nnn {g_@@_Core/Page}{ #1 }{ #2 }
    }
 % the command to remove a default value.
 % Uses a prop with pdflatex + dvi,
 % changes a lua table with lualatex
 \cs_new_protected:Npn \@@_backend_Page_gremove:n #1
   {
-    \pdfdict_gremove:nn  {g_Core/Page}{ #1 }
+    \pdfdict_gremove:nn  {g_@@_Core/Page}{ #1 }
   }
 % the command used in the document.
 % direct call of the primitive special with dvips/dvipdfmx
@@ -308,12 +308,12 @@
 %        \xref_value:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage}
         \@@_backend_ref_value:en {l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage}
       }
-    \pdfdict_if_exist:nF { g_Core/backend_Page\l_@@_tmpa_tl}
+    \pdfdict_if_exist:nF { g_@@_Core/backend_Page\l_@@_tmpa_tl}
       {
-        \pdfdict_new:n { g_Core/backend_Page\l_@@_tmpa_tl}
+        \pdfdict_new:n { g_@@_Core/backend_Page\l_@@_tmpa_tl}
       }
     %backend_Page has no handler.
-    \pdfdict_gput:nnn {g_Core/backend_Page\l_@@_tmpa_tl}{ #1 }{ #2 }
+    \pdfdict_gput:nnn {g_@@_Core/backend_Page\l_@@_tmpa_tl}{ #1 }{ #2 }
   }
 %the code to push the values, used in shipout
 %merges the two props and then fills the register in pdflatex
@@ -321,10 +321,10 @@
 %issues the values stored in the global prop with dvi
 \cs_new_protected:Npn \@@_backend_ThisPage_gpush:n #1
   {
-    \prop_gset_eq:Nc \g_@@_tmpa_prop { \pdfdict_name:n { g_Core/Page } }
-    \prop_if_exist:cT  { \pdfdict_name:n { g_Core/backend_Page#1 } }
+    \prop_gset_eq:Nc \g_@@_tmpa_prop { \pdfdict_name:n { g_@@_Core/Page } }
+    \prop_if_exist:cT  { \pdfdict_name:n { g_@@_Core/backend_Page#1 } }
       {
-        \prop_map_inline:cn { \pdfdict_name:n { g_Core/backend_Page#1 } }
+        \prop_map_inline:cn { \pdfdict_name:n { g_@@_Core/backend_Page#1 } }
           {
             \prop_gput:Nnn \g_@@_tmpa_prop { ##1 }{ ##2 }
           }
@@ -415,14 +415,14 @@
   % sets a lua table with lualatex
 \cs_new_protected:Npn \@@_backend_Page_gput:nn #1 #2
   {
-    \pdfdict_gput:nnn {g_Core/Page}{ #1 }{ #2 }
+    \pdfdict_gput:nnn {g_@@_Core/Page}{ #1 }{ #2 }
   }
   % the command to remove a default value.
   % Uses a prop with pdflatex + dvi,
   % changes a lua table with lualatex
 \cs_new_protected:Npn \@@_backend_Page_gremove:n #1
    {
-     \pdfdict_gremove:nn  {g_Core/Page}{ #1 }
+     \pdfdict_gremove:nn  {g_@@_Core/Page}{ #1 }
    }
   % the command used in the document.
   % direct call of the primitive special with dvips/dvipdfmx
@@ -441,7 +441,7 @@
 \cs_new_protected:Npn \@@_backend_ThisPage_gpush:n #1
   {
     \exp_args:Nx \@@_backend_Page_primitive:n
-      { \pdfdict_use:n { g_Core/Page} }
+      { \pdfdict_use:n { g_@@_Core/Page} }
   }
 %</dvipdfmx|xdvipdfmx>
 %<*dvips>
@@ -454,14 +454,14 @@
   % sets a lua table with lualatex
 \cs_new_protected:Npn \@@_backend_Page_gput:nn #1 #2
    {
-     \pdfdict_gput:nnn {g_Core/Page}{ #1 }{ #2 }
+     \pdfdict_gput:nnn {g_@@_Core/Page}{ #1 }{ #2 }
    }
   % the command to remove a default value.
   % Uses a prop with pdflatex + dvi,
   % changes a lua table with lualatex
 \cs_new_protected:Npn \@@_backend_Page_gremove:n #1
   {
-    \pdfdict_gremove:nn  {g_Core/Page}{ #1 }
+    \pdfdict_gremove:nn  {g_@@_Core/Page}{ #1 }
   }
   % the command used in the document.
   % direct call of the primitive special with dvips/dvipdfmx
@@ -480,7 +480,7 @@
 \cs_new_protected:Npn \@@_backend_ThisPage_gpush:n #1
   {
     \exp_args:Nx \@@_backend_Page_primitive:n
-          { \pdfdict_use:n { g_Core/Page} }
+          { \pdfdict_use:n { g_@@_Core/Page} }
   }
 %</dvips>
 %<*dvisvgm>
@@ -490,13 +490,13 @@
   % Uses a prop with pdflatex + dvi,
 \cs_new_protected:Npn \@@_backend_Page_gput:nn #1 #2
    {
-     \pdfdict_gput:nnn {g_Core/Page}{ #1 }{ #2 }
+     \pdfdict_gput:nnn {g_@@_Core/Page}{ #1 }{ #2 }
    }
   % the command to remove a default value.
   % Uses a prop with pdflatex + dvi,
 \cs_new_protected:Npn \@@_backend_Page_gremove:n #1
   {
-    \pdfdict_gremove:nn  {g_Core/Page}{ #1 }
+    \pdfdict_gremove:nn  {g_@@_Core/Page}{ #1 }
   }
   % the command used in the document.
 \cs_new_protected:Npn \@@_backend_ThisPage_gput:nn #1 #2
@@ -556,7 +556,7 @@
 %values are only stored in a prop and will be output at end document.
 \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3
   {
-    \pdfdict_gput:nnn {g_Core/Page/Resources/#1} { #2 }{ #3 }
+    \pdfdict_gput:nnn {g_@@_Core/Page/Resources/#1} { #2 }{ #3 }
     % luatex must also trigger the lua side
     \tex_latelua:D{ltx.@@.Page.Resources.#1=true}
     \tex_latelua:D
@@ -568,7 +568,7 @@
 %<*pdftex>
  \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3
    {
-     \pdfdict_gput:nnn {g_Core/Page/Resources/#1} { #2 }{ #3 }
+     \pdfdict_gput:nnn {g_@@_Core/Page/Resources/#1} { #2 }{ #3 }
    }
 %</pdftex>
 %<*pdftex|luatex>
@@ -578,11 +578,11 @@
     \clist_map_inline:Nn \c_@@_backend_PageResources_clist
       {
         \prop_if_empty:cF
-          { \pdfdict_name:n { g_Core/Page/Resources/##1} }
+          { \pdfdict_name:n { g_@@_Core/Page/Resources/##1} }
           {
             \@@_backend_object_write:nx
               { Page/Resources/##1 }
-              { \pdfdict_use:n { g_Core/Page/Resources/##1} }
+              { \pdfdict_use:n { g_@@_Core/Page/Resources/##1} }
           }
      }
   }
@@ -608,7 +608,7 @@
 \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3
   {
    % this is not used for output, but there is a test if the resource is empty
-   \prop_gput:cnn { \pdfdict_name:n { g_Core/Page/Resources/#1} } { #2 }{ #3 }
+   \prop_gput:cnn { \pdfdict_name:n { g_@@_Core/Page/Resources/#1} } { #2 }{ #3 }
    %objects are not filled with \pdf_object_write as this is not additive!
     \@@_backend:x
       {
@@ -623,7 +623,7 @@
 \cs_new_protected:Npn \@@_backend_PageResources:n #1 {}
 \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3
   { %only for the show command TEST!!
-    \pdfdict_gput:nnn {g_Core/Page/Resources/#1} { #2 }{ #3 }
+    \pdfdict_gput:nnn {g_@@_Core/Page/Resources/#1} { #2 }{ #3 }
   }
 \cs_new_protected:Npn \@@_backend_PageResources_obj_gpush: {}
 %</dvips>
@@ -632,7 +632,7 @@
 \cs_new_protected:Npn \@@_backend_PageResources:n #1 {}
 \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3
   { %only for the show command TEST!!
-    \pdfdict_gput:nnn {g_Core/Page/Resources/#1} { #2 }{ #3 }
+    \pdfdict_gput:nnn {g_@@_Core/Page/Resources/#1} { #2 }{ #3 }
   }
 \cs_new_protected:Npn \@@_backend_PageResources_obj_gpush: {}
 %</dvisvgm>
@@ -787,7 +787,7 @@
   {
     \clist_map_inline:Nn \c_@@_backend_PageResources_clist
       {
-        \prop_if_empty:cF { \pdfdict_name:n { g_Core/Page/Resources/##1} }
+        \prop_if_empty:cF { \pdfdict_name:n { g_@@_Core/Page/Resources/##1} }
           {
             \__kernel_backend_literal:x
               {
@@ -808,7 +808,7 @@
     \bool_if:NTF \l_@@_backend_xform_bool
       {
         \exp_args:Nnx\pdfdict_gput:nnn
-          { g_Core/Xform/Resources/Properties }
+          { g_@@_Core/Xform/Resources/Properties }
           { l3pdf\int_use:N\g_@@_backend_name_int }
           { \@@_backend_object_ref:n { #2 } }
       }
@@ -832,7 +832,7 @@
     \bool_if:NTF \l_@@_backend_xform_bool
       {
         \exp_args:Nnx\pdfdict_gput:nnn %no handler needed
-          { g_Core/Xform/Resources/Properties }
+          { g_@@_Core/Xform/Resources/Properties }
           { l3pdf\int_use:N\g_@@_backend_name_int }
           { \@@_backend_object_last: }
       }
@@ -888,7 +888,7 @@
     \bool_if:NTF \l_@@_backend_xform_bool
       {
         \exp_args:Nnxx\pdfdict_gput:nnn %no handler needed
-          { g_Core/Xform/Resources/Properties }
+          { g_@@_Core/Xform/Resources/Properties }
           { l3pdf\int_use:N\g_@@_backend_resourceid_int }
           { \@@_backend_object_ref:n { #2 } }
       }
@@ -907,12 +907,12 @@
             %\xref_value:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage}
             \@@_backend_ref_value:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage}
           }
-        \pdfdict_if_exist:nF { g_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
+        \pdfdict_if_exist:nF { g_@@_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
           {
-            \pdfdict_new:n { g_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
+            \pdfdict_new:n { g_@@_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
           }
         \exp_args:Nnxx\pdfdict_gput:nnn
-          { g_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
+          { g_@@_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
           { l3pdf\int_use:N\g_@@_backend_resourceid_int }
           { \@@_backend_object_ref:n{#2} }
       }
@@ -927,7 +927,7 @@
     \bool_if:NTF \l_@@_backend_xform_bool
       {
         \exp_args:Nnxx\pdfdict_gput:nnn
-          { g_Core/Xform/Resources/Properties }
+          { g_@@_Core/Xform/Resources/Properties }
           { l3pdf\int_use:N\g_@@_backend_resourceid_int }
           { \@@_backend_object_last: }
       }
@@ -946,12 +946,12 @@
          %   \xref_value:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage}
             \@@_backend_ref_value:en{l3pdf\int_use:N\g_@@_backend_resourceid_int}{abspage}
           }
-        \pdfdict_if_exist:nF { g_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
+        \pdfdict_if_exist:nF { g_@@_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
           {
-            \pdfdict_new:n { g_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
+            \pdfdict_new:n { g_@@_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
           }
         \exp_args:Nnxx\pdfdict_gput:nnn
-          { g_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
+          { g_@@_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties }
           { l3pdf\int_use:N\g_@@_backend_resourceid_int }
           { \@@_backend_object_last: }
         %\pdfdict_show:n { g_backend_Page\l_@@_tmpa_tl/Resources/Properties }
@@ -985,7 +985,7 @@
 \cs_new:Npn \@@_backend_PageResources_gpush_aux:n #1 %#1 ExtGState etc
   {
     \prop_if_empty:cF
-      { \pdfdict_name:n { g_Core/Page/Resources/#1} }
+      { \pdfdict_name:n { g_@@_Core/Page/Resources/#1} }
       {
         \@@_dict_item:ne { #1 }{ \pdf_object_ref:n {Page/Resources/#1}}
       }
@@ -996,12 +996,12 @@
      \exp_args:NNx \tex_global:D \tex_pdfpageresources:D
        {
          \prop_if_exist:cT
-           { \pdfdict_name:n { g_Core/backend_Page#1/Resources/Properties } }
+           { \pdfdict_name:n { g_@@_Core/backend_Page#1/Resources/Properties } }
            {
              /Properties~
                <<
                  \prop_map_function:cN
-                   { \pdfdict_name:n { g_Core/backend_Page#1/Resources/Properties } }
+                   { \pdfdict_name:n { g_@@_Core/backend_Page#1/Resources/Properties } }
                    \@@_dict_item:ne
                >>
            }
@@ -1154,7 +1154,7 @@
     \hbox_set:Nn \l_@@_tmpa_box
       {
         \bool_set_true:N \l_@@_backend_xform_bool
-        \prop_gclear:c {\pdfdict_name:n { g_Core/Xform/Resources/Properties }}
+        \prop_gclear:c {\pdfdict_name:n { g_@@_Core/Xform/Resources/Properties }}
         #4
       }
     %store the dimensions
@@ -1175,33 +1175,33 @@
       {
         #3
         \int_compare:nNnT
-          { \prop_count:c { \pdfdict_name:n { g_Core/Xform/Resources/Properties } } }
+          { \prop_count:c { \pdfdict_name:n { g_@@_Core/Xform/Resources/Properties } } }
           >
           { 0 }
           {
             /Properties~
               <<
-                \pdfdict_use:n { g_Core/Xform/Resources/Properties }
+                \pdfdict_use:n { g_@@_Core/Xform/Resources/Properties }
               >>
           }
 
         \prop_if_empty:cF
-          { \pdfdict_name:n { g_Core/Page/Resources/ExtGState } }
+          { \pdfdict_name:n { g_@@_Core/Page/Resources/ExtGState } }
           {
             /ExtGState~ \pdf_object_ref:n { Page/Resources/ExtGState }
           }
         \prop_if_empty:cF
-          { \pdfdict_name:n { g_Core/Page/Resources/Pattern } }
+          { \pdfdict_name:n { g_@@_Core/Page/Resources/Pattern } }
           {
             /Pattern~ \pdf_object_ref:n { Page/Resources/Pattern }
           }
         \prop_if_empty:cF
-          { \pdfdict_name:n { g_Core/Page/Resources/Shading } }
+          { \pdfdict_name:n { g_@@_Core/Page/Resources/Shading } }
           {
             /Shading~ \pdf_object_ref:n { Page/Resources/Shading }
           }
         \prop_if_empty:cF
-          { \pdfdict_name:n { g_Core/Page/Resources/ColorSpace } }
+          { \pdfdict_name:n { g_@@_Core/Page/Resources/ColorSpace } }
           {
             /ColorSpace~ \pdf_object_ref:n { Page/Resources/ColorSpace }
           }
@@ -1236,7 +1236,7 @@
     \hbox_set:Nn \l_@@_tmpa_box
       {
         \bool_set_true:N \l_@@_backend_xform_bool
-        \prop_gclear:c { \pdfdict_name:n { g_Core/Xform/Resources/Properties } }
+        \prop_gclear:c { \pdfdict_name:n { g_@@_Core/Xform/Resources/Properties } }
         #4
       }
     \tl_const:cx
@@ -1256,32 +1256,32 @@
       {
         #3
         \int_compare:nNnT
-          {\prop_count:c { \pdfdict_name:n { g_Core/Xform/Resources/Properties } }}
+          {\prop_count:c { \pdfdict_name:n { g_@@_Core/Xform/Resources/Properties } }}
           >
           { 0 }
           {
             /Properties~
               <<
-                \pdfdict_use:n { g_Core/Xform/Resources/Properties }
+                \pdfdict_use:n { g_@@_Core/Xform/Resources/Properties }
               >>
           }
         \prop_if_empty:cF
-          { \pdfdict_name:n { g_Core/Page/Resources/ExtGState } }
+          { \pdfdict_name:n { g_@@_Core/Page/Resources/ExtGState } }
           {
             /ExtGState~ \pdf_object_ref:n { Page/Resources/ExtGState }
           }
         \prop_if_empty:cF
-          { \pdfdict_name:n { g_Core/Page/Resources/Pattern } }
+          { \pdfdict_name:n { g_@@_Core/Page/Resources/Pattern } }
           {
             /Pattern~ \pdf_object_ref:n { Page/Resources/Pattern }
           }
         \prop_if_empty:cF
-          { \pdfdict_name:n { g_Core/Page/Resources/Shading } }
+          { \pdfdict_name:n { g_@@_Core/Page/Resources/Shading } }
           {
             /Shading~ \pdf_object_ref:n { Page/Resources/Shading }
           }
         \prop_if_empty:cF
-          { \pdfdict_name:n { g_Core/Page/Resources/ColorSpace } }
+          { \pdfdict_name:n { g_@@_Core/Page/Resources/ColorSpace } }
           {
             /ColorSpace~ \pdf_object_ref:n { Page/Resources/ColorSpace }
           }
diff --git a/l3pdfmanagement.dtx b/l3pdfmanagement.dtx
index 27913c4..c7bb22c 100644
--- a/l3pdfmanagement.dtx
+++ b/l3pdfmanagement.dtx
@@ -527,7 +527,7 @@
   {
     \@@_if_active:TF
       {
-        \pdfdict_if_exist:nTF { g_Core/#1 }
+        \pdfdict_if_exist:nTF { g__pdf_Core/#1 }
           {
             \@@_handler_gput:nnn { #1 }{ #2 }{ #3 }
           }
@@ -639,7 +639,7 @@
         \msg_none:nnn { pdfmanagement }{ empty-value }{ /#1/#2 }
       }
       {
-        \pdfdict_if_exist:nTF { g_Core/#1 }
+        \pdfdict_if_exist:nTF { g__pdf_Core/#1 }
           {
             \cs_if_exist:cTF
               { @@_handler/#1/?_gput:nn } %general, name independant handler
@@ -650,7 +650,7 @@
                   { \use:c {@@_handler/#1/#2_gput:n} {#3} } %special handler
                   {
                     \prop_gput:cnn
-                      { \pdfdict_name:n { g_Core/#1 } }{ #2 } { #3 }
+                      { \pdfdict_name:n { g__pdf_Core/#1 } }{ #2 } { #3 }
                   }
               }
           }
@@ -666,14 +666,14 @@
 \cs_new_protected:Npn \@@_get:nnN  #1 #2 #3 %path,key,macro
   {
     \prop_get:cnN
-      { \pdfdict_name:n { g_Core/#1 } }
+      { \pdfdict_name:n { g__pdf_Core/#1 } }
       { #2 } #3
   }
 
 
 \cs_new_protected:Npn \@@_handler_gremove:nn #1 #2 %path,key
   {
-    \pdfdict_if_exist:nTF { g_Core/#1 }
+    \pdfdict_if_exist:nTF { g__pdf_Core/#1 }
           {
             \cs_if_exist:cTF
               { @@_handler/#1/?_gremove:n } %general, name independant handler
@@ -684,7 +684,7 @@
                   { \use:c {@@_handler/#1/#2_gremove:} } %special handler
                   {
                     \prop_gremove:cn
-                      { \pdfdict_name:n { g_Core/#1 } }{ #2 }
+                      { \pdfdict_name:n { g__pdf_Core/#1 } }{ #2 }
                   }
               }
           }
@@ -695,10 +695,10 @@
 
 \cs_new_protected:Npn \@@_gremove:nn #1 #2 %path,key
   {
-    \pdfdict_if_exist:nTF { g_Core/#1 }
+    \pdfdict_if_exist:nTF { g__pdf_Core/#1 }
           {
             \prop_gremove:cn
-              { \pdfdict_name:n { g_Core/#1 } }{ #2 }
+              { \pdfdict_name:n { g__pdf_Core/#1 } }{ #2 }
           }
           {
             \msg_error:nnn { pdfmanagement } { unknown-dict } { #1 }
@@ -712,12 +712,12 @@
       { @@_handler/#2/?_show: } %general, name independant handler
       { \use:c {@@_handler/#2/?_show:} }
       {
-        \prop_if_exist:cTF { \pdfdict_name:n { g_Core/#2 } }
+        \prop_if_exist:cTF { \pdfdict_name:n { g__pdf_Core/#2 } }
           {
              #1
                { pdfmanagement } { show-dict }
                { \tl_to_str:n {#2} }
-               { \prop_map_function:cN {\pdfdict_name:n { g_Core/#2 }} \msg_show_item:nn }
+               { \prop_map_function:cN {\pdfdict_name:n { g__pdf_Core/#2 }} \msg_show_item:nn }
                { } { }
           }
           {
@@ -728,7 +728,7 @@
 
 \cs_new_protected:Npn \@@_show:n #1  %path
   {
-    \prop_show:c { \pdfdict_name:n { g_Core/#1 } }
+    \prop_show:c { \pdfdict_name:n { g__pdf_Core/#1 } }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -743,7 +743,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \pdfmanagement_remove:nn #1 #2
   {
-    \pdfdict_if_exist:nTF { g_Core/#1 }
+    \pdfdict_if_exist:nTF { g__pdf_Core/#1 }
       {
         \@@_handler_gremove:nn { #1 }{ #2 }
       }
@@ -755,7 +755,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \pdfmanagement_get:nnN #1 #2 #3
   {
-    \pdfdict_if_exist:nTF { g_Core/#1 }
+    \pdfdict_if_exist:nTF { g__pdf_Core/#1 }
       {
         \@@_get:nnN { #1 }{ #2 } #3
       }
@@ -767,7 +767,7 @@
 % \subsection{The Info dictionary}
 % Initialization of the dictionary:
 %    \begin{macrocode}
-\pdfdict_new:n { g_Core/Info}
+\pdfdict_new:n { g__pdf_Core/Info}
 %    \end{macrocode}
 %
 % \begin{macro}{\@@_Info_gpush:}
@@ -777,15 +777,15 @@
 % push to the register command / issue the special
 \cs_new_protected:Npn \@@_Info_gpush:
   {
-    \prop_map_function:cN  { \pdfdict_name:n { g_Core/Info} } \__pdf_backend_info_gput:nn
-    \prop_gclear:c { \pdfdict_name:n { g_Core/Info} }
+    \prop_map_function:cN  { \pdfdict_name:n { g__pdf_Core/Info} } \__pdf_backend_info_gput:nn
+    \prop_gclear:c { \pdfdict_name:n { g__pdf_Core/Info} }
   }
 %    \end{macrocode}
 % \end{macro}
 % \subsection{The Pages dictionary code}
 % At first the initialisation
 %     \begin{macrocode}
-\pdfdict_new:n { g_Core/Pages}
+\pdfdict_new:n { g__pdf_Core/Pages}
 %    \end{macrocode}
 %
 % \begin{macro}{\@@_Pages_gpush:}
@@ -797,7 +797,7 @@
   {
     \exp_args:Nx \__pdf_backend_Pages_primitive:n
       {
-        \pdfdict_use:n { g_Core/Pages}
+        \pdfdict_use:n { g__pdf_Core/Pages}
       }
   }
 
@@ -806,8 +806,8 @@
 % \subsection{The Page and ThisPage dictionary}
 % At first the initialisation.
 %    \begin{macrocode}
-\pdfdict_new:n { g_Core/Page }
-\pdfdict_new:n { g_Core/ThisPage }
+\pdfdict_new:n { g__pdf_Core/Page }
+\pdfdict_new:n { g__pdf_Core/ThisPage }
 
 %handler for pdfmanagement
 \cs_new_protected:cpn { @@_handler/Page/?_gput:nn } #1 #2
@@ -823,7 +823,7 @@
 % handler for pdfmanagement
 \cs_new_protected:cpn { @@_handler/ThisPage/?_gput:nn } #1 #2
   {
-    \prop_gput:cnn  { \pdfdict_name:n { g_Core/ThisPage } }{ #1 } { #2 }
+    \prop_gput:cnn  { \pdfdict_name:n { g__pdf_Core/ThisPage } }{ #1 } { #2 }
     \bool_if:NT \g_@@_active_bool
       {
         \__pdf_backend_ThisPage_gput:nn { #1 }{ #2 }
@@ -853,7 +853,7 @@
 
 \clist_map_inline:Nn \c_@@_PageResources_clist
   {
-    \pdfdict_new:n { g_Core/Page/Resources/#1}
+    \pdfdict_new:n { g__pdf_Core/Page/Resources/#1}
   }
 %
 % setter:  #1 is the name of the resource
@@ -892,7 +892,7 @@
 %  \begin{macro}{ \@@_catalog_XX_gput:n }
 % Various commands to handle subentries and special cases.
 %    \begin{macrocode}
-\pdfdict_new:n { g_Core/Catalog}
+\pdfdict_new:n { g__pdf_Core/Catalog}
 
 \clist_const:Nn \c_@@_Catalog_toplevel_clist
   {
@@ -929,7 +929,7 @@
 
 \clist_map_inline:Nn \c_@@_Catalog_sub_clist
   {
-    \pdfdict_new:n { g_Core/Catalog/#1}
+    \pdfdict_new:n { g__pdf_Core/Catalog/#1}
   }
 
 
@@ -977,7 +977,7 @@
     \use:c { @@_/Catalog/Requirements_gpush: }
     \use:c { @@_/Catalog/ViewerPreferences_gpush: }
     % output the single values:
-    \prop_map_function:cN { \pdfdict_name:n { g_Core/Catalog} }  \__pdf_backend_catalog_gput:nn
+    \prop_map_function:cN { \pdfdict_name:n { g__pdf_Core/Catalog} }  \__pdf_backend_catalog_gput:nn
     % output names tree:
     \use:c { @@_/Catalog/Names/EmbeddedFiles_gpush: }
   }
@@ -989,12 +989,12 @@
 \cs_new_protected:cpn { @@_/Catalog/AA_gpush: }
   {
     \prop_if_empty:cF
-     { \pdfdict_name:n { g_Core/Catalog/AA } }
+     { \pdfdict_name:n { g__pdf_Core/Catalog/AA } }
      {
        \__pdf_backend_object_new:nn  { g_@@_/Catalog/AA_obj } { dict }
        \__pdf_backend_object_write:nx
             { g_@@_/Catalog/AA_obj }
-            { \pdfdict_use:n { g_Core/Catalog/AA } }
+            { \pdfdict_use:n { g__pdf_Core/Catalog/AA } }
        \exp_args:Nnx
          \__pdf_backend_catalog_gput:nn
            {AA}
@@ -1027,7 +1027,7 @@
             { \seq_use:cn { g_@@_/Catalog/AcroForm/Fields_seq } {~} }
         \exp_args:Nnnx
           \prop_gput:cnn %we have to use \prop here to avoid the handler ..
-            { \pdfdict_name:n { g_Core/Catalog/AcroForm } }
+            { \pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } }
             { Fields }
             { \__pdf_backend_object_ref:n { g_@@_/Catalog/AcroForm/Fields_obj } }
       }
@@ -1040,43 +1040,43 @@
             { \seq_use:cn { g_@@_/Catalog/AcroForm/CO_seq } {~} }
         \exp_args:Nnnx
           \prop_gput:cnn %we have to use \prop here to avoid the handler ..
-            { \pdfdict_name:n { g_Core/Catalog/AcroForm } }
+            { \pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } }
             { CO }
             { \__pdf_backend_object_ref:n { g_@@_/Catalog/AcroForm/CO_obj } }
       }
-     \prop_if_empty:cF { \pdfdict_name:n { g_Core/Catalog/AcroForm/DR/Font}}
+     \prop_if_empty:cF { \pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR/Font}}
        {
          \__pdf_backend_object_new:nn { g_@@_/Catalog/AcroForm/DR/Font_obj } {dict}
          \exp_args:Nnx
            \__pdf_backend_object_write:nn
              { g_@@_/Catalog/AcroForm/DR/Font_obj }
-             { \pdfdict_use:n { g_Core/Catalog/AcroForm/DR/Font } }
+             { \pdfdict_use:n { g__pdf_Core/Catalog/AcroForm/DR/Font } }
          \exp_args:Nnnx
            \prop_gput:cnn %we have to use \prop here to avoid the handler ..
-             { \pdfdict_name:n { g_Core/Catalog/AcroForm/DR } }
+             { \pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR } }
              { Font }
              { \__pdf_backend_object_ref:n { g_@@_/Catalog/AcroForm/DR/Font_obj } }
        }
-     \prop_if_empty:cF { \pdfdict_name:n { g_Core/Catalog/AcroForm/DR}}
+     \prop_if_empty:cF { \pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR}}
        {
          \__pdf_backend_object_new:nn { g_@@_/Catalog/AcroForm/DR_obj } {dict}
          \exp_args:Nnx
            \__pdf_backend_object_write:nn
              { g_@@_/Catalog/AcroForm/DR_obj }
-             { \pdfdict_use:n { g_Core/Catalog/AcroForm/DR } }
+             { \pdfdict_use:n { g__pdf_Core/Catalog/AcroForm/DR } }
          \exp_args:Nnnx
            \prop_gput:cnn %we have to use \prop here to avoid the handler ..
-             { \pdfdict_name:n { g_Core/Catalog/AcroForm } }
+             { \pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } }
              { DR }
              { \__pdf_backend_object_ref:n { g_@@_/Catalog/AcroForm/DR_obj } }
        }
-     \prop_if_empty:cF { \pdfdict_name:n { g_Core/Catalog/AcroForm} }
+     \prop_if_empty:cF { \pdfdict_name:n { g__pdf_Core/Catalog/AcroForm} }
        {
          \__pdf_backend_object_new:nn { g_@@_/Catalog/AcroForm_obj } {dict}
          \exp_args:Nnx
            \__pdf_backend_object_write:nn
              { g_@@_/Catalog/AcroForm_obj }
-             { \pdfdict_use:n { g_Core/Catalog/AcroForm } }
+             { \pdfdict_use:n { g__pdf_Core/Catalog/AcroForm } }
          \exp_args:Nnnx
            \@@_handler_gput:nnn
              { Catalog }
@@ -1119,13 +1119,13 @@
 \cs_new_protected:cpn { @@_/Catalog/MarkInfo_gpush: }
   {
     \prop_if_empty:cF
-     { \pdfdict_name:n { g_Core/Catalog/MarkInfo } }
+     { \pdfdict_name:n { g__pdf_Core/Catalog/MarkInfo } }
      {
        \__pdf_backend_object_new:nn  { g_@@_/Catalog/MarkInfo_obj } { dict }
        \exp_args:Nnx
          \__pdf_backend_object_write:nn
             { g_@@_/Catalog/MarkInfo_obj }
-            { \pdfdict_use:n { g_Core/Catalog/MarkInfo } }
+            { \pdfdict_use:n { g__pdf_Core/Catalog/MarkInfo } }
        \exp_args:Nnx
          \__pdf_backend_catalog_gput:nn
            {MarkInfo}
@@ -1241,13 +1241,13 @@
 \cs_new_protected:cpn { @@_/Catalog/ViewerPreferences_gpush: }
   {
     \prop_if_empty:cF
-     { \pdfdict_name:n { g_Core/Catalog/ViewerPreferences } }
+     { \pdfdict_name:n { g__pdf_Core/Catalog/ViewerPreferences } }
      {
        \__pdf_backend_object_new:nn  { g_@@_/Catalog/ViewerPreferences_obj } { dict }
        \exp_args:Nnx
          \__pdf_backend_object_write:nn
             { g_@@_/Catalog/ViewerPreferences_obj }
-            { \pdfdict_use:n { g_Core/Catalog/ViewerPreferences } }
+            { \pdfdict_use:n { g__pdf_Core/Catalog/ViewerPreferences } }
        \exp_args:Nnx
          \__pdf_backend_catalog_gput:nn
            {ViewerPreferences}
@@ -1265,7 +1265,7 @@
 % \begin{macro}{ Handler}
 % EmbeddedFiles is an array and needs a special handler to add values.
 %    \begin{macrocode}
-\pdfdict_new:n { g_Core/Catalog/Names }
+\pdfdict_new:n { g__pdf_Core/Catalog/Names }
 
 \cs_new_protected:cpn { @@_handler/Catalog/Names/EmbeddedFiles_gput:n } #1
   {
@@ -1299,7 +1299,7 @@
       {
         \iow_newline:
         The~Catalog~contains~in~the~top~level~the~single~value~entries
-        \prop_map_function:cN {\pdfdict_name:n { g_Core/Catalog }} \msg_show_item:nn
+        \prop_map_function:cN {\pdfdict_name:n { g__pdf_Core/Catalog }} \msg_show_item:nn
       }
     \clist_map_inline:Nn \c_@@_Catalog_seq_clist
      {
@@ -1314,12 +1314,12 @@
       }
     \clist_map_inline:Nn \c_@@_Catalog_sub_clist
       {
-        \prop_if_empty:cF { \pdfdict_name:n { g_Core/Catalog/##1 } }
+        \prop_if_empty:cF { \pdfdict_name:n { g__pdf_Core/Catalog/##1 } }
           {
             \iow_term:x
               {
                 The~Catalog~subdirectory~'##1'~contains~the~single~value~entries
-                \prop_map_function:cN {\pdfdict_name:n { g_Core/Catalog/##1 }} \msg_show_item:nn
+                \prop_map_function:cN {\pdfdict_name:n { g__pdf_Core/Catalog/##1 }} \msg_show_item:nn
               }
           }
       }
@@ -1329,7 +1329,7 @@
 % \end{macro}
 % \subsection{ xform / Properties }
 %    \begin{macrocode}
-\pdfdict_new:n { g_Core/Xform/Resources/Properties}
+\pdfdict_new:n { g__pdf_Core/Xform/Resources/Properties}
 %    \end{macrocode}
 %    \begin{macrocode}
 %</package>
diff --git a/testfiles/dict_if_empty.lvt b/testfiles/dict_if_empty.lvt
index 22642a3..fe16fc7 100644
--- a/testfiles/dict_if_empty.lvt
+++ b/testfiles/dict_if_empty.lvt
@@ -13,9 +13,9 @@
 \pdfdict_put:nnn {l_test}{key}{value}
 \pdfdict_if_empty:nTF { l_test}{empty}{not empty}\par
 
-\pdfdict_if_empty:nTF { g_Core/Page}{empty}{not empty}\par
+\pdfdict_if_empty:nTF { g__pdf_Core/Page}{empty}{not empty}\par
 \pdfmanagement_add:nnn {Page}{Rotate}{90}
-\pdfdict_if_empty:nTF { g_Core/Page}{empty}{not empty}\par
+\pdfdict_if_empty:nTF { g__pdf_Core/Page}{empty}{not empty}\par
 \ExplSyntaxOff
 
 \end{document}





More information about the latex3-commits mailing list.