[latex3-commits] [git/LaTeX3-latex3-pdfresources] renamedict77: rename dict_map and change expansion (a2e46e9)
Ulrike Fischer
fischer at troubleshooting-tex.de
Tue Apr 21 17:35:19 CEST 2020
Repository : https://github.com/latex3/pdfresources
On branch : renamedict77
Link : https://github.com/latex3/pdfresources/commit/a2e46e960d0284f3f683525621ac0ec9c66ed773
>---------------------------------------------------------------
commit a2e46e960d0284f3f683525621ac0ec9c66ed773
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue Apr 21 17:35:19 2020 +0200
rename dict_map and change expansion
>---------------------------------------------------------------
a2e46e960d0284f3f683525621ac0ec9c66ed773
pdfresources.dtx | 46 ++++++++++++++++++++++++----------------------
1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/pdfresources.dtx b/pdfresources.dtx
index 2270843..980757d 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -494,6 +494,7 @@
% in the pdf layer at the input.
% \begin{macrocode}
\cs_new:Npn \@@_dict_item:nn #1 #2 { /#1~#2~ } %name, value
+\cs_generate_variant:Nn \@@_dict_item:nn {ne}
\cs_new:Npn \@@_dict_objref_item:nn #1 #2 %name, object name
{
@@ -765,15 +766,16 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{ \@@_dict_map_dict_item:n }
-% \cs{@@_dict_map_dict_item:n} outputs a prop as needed in a dictionary:
+% \begin{macro}{ \@@_dict_map:n }
+% \cs{@@_dict_map:n} outputs a prop as needed in a dictionary:
% as a list of /\meta{key} \meta{value} pairs.
% \begin{macrocode}
%local + global
%!! Xname must be replaced later!
-\cs_new:Npn \@@_dict_map_dict_item:n #1 %path
+% !! is xexpansion the right thing?
+\cs_new:Npn \@@_dict_map:n #1 %path
{
- \prop_map_function:cN { \@@_dict_Xname:n { #1 } } \@@_dict_item:nn
+ \prop_map_function:cN { \@@_dict_Xname:n { #1 } } \@@_dict_item:ne
}
% \end{macrocode}
% \end{macro}
@@ -1144,7 +1146,7 @@
{
\exp_args:Nx \@@_backend_Pages_primitive:n
{
- \@@_dict_map_dict_item:n {Pages}
+ \@@_dict_map:n {Pages}
}
}
@@ -1244,7 +1246,7 @@
\@@_dict_gmerge:nnN {Page}{backend_Page#1}\g_@@_tmpa_prop
\exp_args:Nx \@@_backend_Page_primitive:n
{
- \prop_map_function:NN \g_@@_tmpa_prop \@@_dict_item:nn
+ \prop_map_function:NN \g_@@_tmpa_prop \@@_dict_item:ne
}
}
}
@@ -1356,7 +1358,7 @@
\cs_new_protected:Npn \@@_backend_ThisPage_gpush:n #1
{
\exp_args:Nx \@@_backend_Page_primitive:n
- { \@@_dict_map_dict_item:n {Page} }
+ { \@@_dict_map:n {Page} }
}
}
%dvips
@@ -1397,7 +1399,7 @@
\cs_new_protected:Npn \@@_backend_ThisPage_gpush:n #1
{
\exp_args:Nx \@@_backend_Page_primitive:n
- { \@@_dict_map_dict_item:n {Page} }
+ { \@@_dict_map:n {Page} }
}
}
% \end{macrocode}
@@ -1584,7 +1586,7 @@
{
\@@_backend_object_write:nx
{ Page/Resources/##1 }
- { \@@_dict_map_dict_item:n {Page/Resources/##1} }
+ { \@@_dict_map:n {Page/Resources/##1} }
}
}
}
@@ -1964,7 +1966,7 @@
\@@_backend_object_new:nn { g_@@_dict_/Catalog/AA_obj } { dict }
\@@_backend_object_write:nx
{ g_@@_dict_/Catalog/AA_obj }
- { \@@_dict_map_dict_item:n { Catalog/AA } }
+ { \@@_dict_map:n { Catalog/AA } }
\exp_args:Nnx
\@@_backend_catalog_gput:nn
{AA}
@@ -2019,7 +2021,7 @@
\exp_args:Nnx
\@@_backend_object_write:nn
{ g_@@_dict_/Catalog/AcroForm/DR/Font_obj }
- { \@@_dict_map_dict_item:n { Catalog/AcroForm/DR/Font } }
+ { \@@_dict_map:n { Catalog/AcroForm/DR/Font } }
\exp_args:Nnnx
\prop_gput:cnn %we have to use \prop here to avoid the handler ..
{ \__pdf_dict_Xname:n { Catalog/AcroForm/DR } }
@@ -2032,7 +2034,7 @@
\exp_args:Nnx
\@@_backend_object_write:nn
{ g_@@_dict_/Catalog/AcroForm/DR_obj }
- { \@@_dict_map_dict_item:n { Catalog/AcroForm/DR } }
+ { \@@_dict_map:n { Catalog/AcroForm/DR } }
\exp_args:Nnnx
\prop_gput:cnn %we have to use \prop here to avoid the handler ..
{ \__pdf_dict_Xname:n { Catalog/AcroForm } }
@@ -2045,7 +2047,7 @@
\exp_args:Nnx
\@@_backend_object_write:nn
{ g_@@_dict_/Catalog/AcroForm_obj }
- { \@@_dict_map_dict_item:n { Catalog/AcroForm } }
+ { \@@_dict_map:n { Catalog/AcroForm } }
\exp_args:Nnnx
\@@_dict_handler_put:nnn
{ Catalog }
@@ -2094,7 +2096,7 @@
\exp_args:Nnx
\@@_backend_object_write:nn
{ g_@@_dict_/Catalog/MarkInfo_obj }
- { \@@_dict_map_dict_item:n {Catalog/MarkInfo } }
+ { \@@_dict_map:n {Catalog/MarkInfo } }
\exp_args:Nnx
\@@_backend_catalog_gput:nn
{MarkInfo}
@@ -2214,7 +2216,7 @@
\exp_args:Nnx
\@@_backend_object_write:nn
{ g_@@_dict_/Catalog/ViewerPreferences_obj }
- { \@@_dict_map_dict_item:n {Catalog/ViewerPreferences } }
+ { \@@_dict_map:n {Catalog/ViewerPreferences } }
\exp_args:Nnx
\@@_backend_catalog_gput:nn
{ViewerPreferences}
@@ -2600,7 +2602,7 @@
<<
\prop_map_function:cN
{ \@@_dict_gname:n { backend_Page#1/Resources/Properties } }
- \@@_dict_item:nn
+ \@@_dict_item:ne
>>
}
%% add ExtGState etc
@@ -2768,7 +2770,7 @@
{
/Properties~
<<
- \@@_dict_map_dict_item:n {xform/Resources/Properties}
+ \@@_dict_map:n {xform/Resources/Properties}
>>
}
@@ -2851,7 +2853,7 @@
{
/Properties~
<<
- \@@_dict_map_dict_item:n {xform/Resources/Properties}
+ \@@_dict_map:n {xform/Resources/Properties}
>>
}
\prop_if_empty:cF
@@ -3067,7 +3069,7 @@
{
\@@_dict_if_exist:nT { annot/#1 }
{
- \@@_dict_map_dict_item:n {annot/#1}
+ \@@_dict_map:n {annot/#1}
}
#5
}
@@ -3176,7 +3178,7 @@
{
\@@_dict_if_exist:nT { annot/Link/#1 }
{
- \@@_dict_map_dict_item:n {annot/Link/#1}
+ \@@_dict_map:n {annot/Link/#1}
}
}
{
@@ -3234,7 +3236,7 @@
{
\@@_dict_if_exist:nT { annot/Link/#1 }
{
- \@@_dict_map_dict_item:n {annot/Link/#1}
+ \@@_dict_map:n {annot/Link/#1}
}
}
{ #2 }
@@ -3264,7 +3266,7 @@
\exp_args:Nxx %xetex needs expansion
\@@_backend_link_begin_goto:nnw
{
- \@@_dict_map_dict_item:n {annot/Link/GoTo}
+ \@@_dict_map:n {annot/Link/GoTo}
}
{ #1 }
More information about the latex3-commits
mailing list.