[latex3-commits] [git/LaTeX3-latex3-pdfresources] pdfdictchange: move dict_item to l3pdfdict (79106a7)
Ulrike Fischer
fischer at troubleshooting-tex.de
Fri Dec 4 16:56:44 CET 2020
Repository : https://github.com/latex3/pdfresources
On branch : pdfdictchange
Link : https://github.com/latex3/pdfresources/commit/79106a78842b778b5f71d32530beef72c20ba73e
>---------------------------------------------------------------
commit 79106a78842b778b5f71d32530beef72c20ba73e
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Fri Dec 4 16:56:44 2020 +0100
move dict_item to l3pdfdict
>---------------------------------------------------------------
79106a78842b778b5f71d32530beef72c20ba73e
l3backend-pdf-extra.dtx | 6 +++---
l3pdfdict.dtx | 19 +++++++++++++++++--
l3pdftools.dtx | 15 ---------------
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/l3backend-pdf-extra.dtx b/l3backend-pdf-extra.dtx
index e05cadd..ed24620 100644
--- a/l3backend-pdf-extra.dtx
+++ b/l3backend-pdf-extra.dtx
@@ -331,7 +331,7 @@
}
\exp_args:Nx \@@_backend_Page_primitive:n
{
- \prop_map_function:NN \g_@@_tmpa_prop \@@_dict_item:ne
+ \prop_map_function:NN \g_@@_tmpa_prop \pdfdict_item:ne
}
}
%</pdftex>
@@ -987,7 +987,7 @@
\prop_if_empty:cF
{ \pdfdict_name:n { g_@@_Core/Page/Resources/#1} }
{
- \@@_dict_item:ne { #1 }{ \pdf_object_ref:n {Page/Resources/#1}}
+ \pdfdict_item:ne { #1 }{ \pdf_object_ref:n {Page/Resources/#1}}
}
}
@@ -1002,7 +1002,7 @@
<<
\prop_map_function:cN
{ \pdfdict_name:n { g_@@_Core/backend_Page#1/Resources/Properties } }
- \@@_dict_item:ne
+ \pdfdict_item:ne
>>
}
%% add ExtGState etc
diff --git a/l3pdfdict.dtx b/l3pdfdict.dtx
index 67af76e..3d288b6 100644
--- a/l3pdfdict.dtx
+++ b/l3pdfdict.dtx
@@ -123,6 +123,18 @@
% could end as strings in the PDF. So one should neither rely on
% \Arg{value} to be expanded nor not expanded by the backend commands.
% \end{function}
+% \begin{function}[EXP,added = 2020-12-04]
+% { \pdfdict_item:nn, pdfdict_item:ne }
+% \begin{syntax}
+% \cs{pdfdict_item:nn} \Arg{key} \Arg{value}
+% \end{syntax}
+% A simple command to output key-value as |/key value|. This is
+% needed to output dictionaries in mapping commands. The command doesn't
+% do any escaping, it expects that the name has been escaped when the value
+% has been stored into the dictionary.
+% If the value is blank nothing is output.
+% The command is expandable if the content is it.
+% \end{function}%
% \begin{function}[EXP,updated = 2020-12-03]
% { \pdfdict_use:n }
% \begin{syntax}
@@ -568,14 +580,17 @@
%</package>
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\@@_item:nn, \@@_item:ne,\@@_item:nx,}
+% \begin{macro}{\@@_item:nn, \@@_item:ne}
+% \begin{macro}{\pdfdict_item:nn, \pdfdict_item:ne}
% \begin{macrocode}
%<*package>
\cs_new:Npn \@@_item:nn #1 #2 %#1 name, #2 value
{
\tl_if_blank:nF {#2} { /#1~#2~ }
}
-\cs_generate_variant:Nn \@@_item:nn {ne,nx}
+\cs_generate_variant:Nn \@@_item:nn {ne}
+\cs_set_eq:Nn \pdfdict_item:nn \@@_item:nn
+\cs_generate_variant:Nn \pdfdict_item:nn {ne}
%</package>
% \end{macrocode}
% \end{macro}
diff --git a/l3pdftools.dtx b/l3pdftools.dtx
index c3c6b14..0ab1a41 100644
--- a/l3pdftools.dtx
+++ b/l3pdftools.dtx
@@ -218,21 +218,6 @@
%<@@=pdf>
% \end{macrocode}
% \subsection{Conversions and export functions}
-% At first a simple internal command to output key-value to |/key~value|. This is
-% needed in mapping commands. The commands don't
-% do any escaping, they expect that the name has been escaped then the value
-% has been stored into the dictionary.
-% The commands don't check if the arguments are valid but if the value
-% is blank nothing is output. The commands are expandable if the content is.
-% \begin{macro}{\@@_dict_item:nn, \@@_dict_item:ne,\@@_dict_item:nx,}
-% \begin{macrocode}
-\cs_new:Npn \@@_dict_item:nn #1 #2 %#1 name, #2 value
- {
- \tl_if_blank:nF {#2} { /#1~#2~ }
- }
-\cs_generate_variant:Nn \@@_dict_item:nn {ne,nx}
-% \end{macrocode}
-% \end{macro}
% \begin{macro}{\pdf_text_convert:nn,\pdf_text_convert:nV}
% \begin{macro}{\pdf_text_convert:nnN}
% \begin{macro}{\@@_text_convert_name:n}
More information about the latex3-commits
mailing list.