[latex3-commits] [latex3/pdfresources] gh72-expand-pdfauthor: expand less (893d6a93)
github at latex-project.org
github at latex-project.org
Wed Jul 10 01:13:28 CEST 2024
Repository : https://github.com/latex3/pdfresources
On branch : gh72-expand-pdfauthor
Link : https://github.com/latex3/pdfresources/commit/893d6a93cc6febd6646a0906e056ecd570149c20
>---------------------------------------------------------------
commit 893d6a93cc6febd6646a0906e056ecd570149c20
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Wed Jul 10 01:13:28 2024 +0200
expand less
>---------------------------------------------------------------
893d6a93cc6febd6646a0906e056ecd570149c20
hyperref-generic.dtx | 24 ++++++++++++------------
testfiles-pdftex/metadata-ansi.tpf | 2 +-
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index 77ef1b52..df6fc877 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -1467,7 +1467,7 @@
%\tl_set:cn {@#1}{#2}
\AddToDocumentProperties[hyperref]{#1}{#2}
}
-\cs_generate_variant:Nn \@@_store_metadata:nn {en,ne,ee}
+\cs_generate_variant:Nn \@@_store_metadata:nn {en,ne,ee,no,eo}
% \end{macrocode}
% \subsection{citecolor}
% cite is a link context. So we define a hook, and the keys in terms of this hook.
@@ -1941,7 +1941,7 @@
{
\@@_text_pdfstring:noN { #1 }{ \l_@@_text_enc_info_print_tl } #2
}
-\cs_generate_variant:Nn \@@_text_pdfstring_info:nN {eN}
+\cs_generate_variant:Nn \@@_text_pdfstring_info:nN {eN,oN}
% \end{macrocode}
% \end{macro}
%
@@ -3948,19 +3948,19 @@
% but we allow to set an empty value.
% If the value begin with an optional argument, we assume a multilanguage clist and
% use only the first value.
-% The values are expanded with \cs{text_purify:n}
+% The values are expanded with \cs{text_expand:n}
% \begin{macrocode}
\regex_new:N\l_@@_optlang_regex
\regex_set:Nn\l_@@_optlang_regex {\A\[([A-Za-z\-]+)\](.*)}
+\cs_generate_variant:Nn\clist_item:nn{on}
\cs_new_protected:Npn \@@_setup_info_key:nn #1 #2
{
\keys_define:nn { hyp }
{
pdf#1 .code:n =
{
- \tl_set:Ne\l_@@_tmpa_tl {\text_purify:n{##1}}
- \@@_store_metadata:ne {pdf#1}{\l_@@_tmpa_tl}
- \tl_show:N\l_@@_tmpa_tl
+ \tl_set:Ne\l_@@_tmpa_tl {\text_expand:n{##1}}
+ \@@_store_metadata:no {pdf#1}{\l_@@_tmpa_tl}
\tl_if_empty:NTF \l_@@_tmpa_tl
{
\str_case:nnF { #1 }
@@ -3981,12 +3981,12 @@
}
}
{
- \tl_set:Ne\l_@@_tmpb_tl {\clist_item:en{\l_@@_tmpa_tl}{1}}
+ \tl_set:Ne\l_@@_tmpb_tl {\clist_item:on{\l_@@_tmpa_tl}{1}}
\exp_args:NNV
\regex_extract_once:NnN \l_@@_optlang_regex \l_@@_tmpb_tl\l_@@_tmpa_seq
\seq_if_empty:NTF\l_@@_tmpa_seq
{
- \@@_text_pdfstring_info:eN {\l_@@_tmpa_tl}\l_@@_tmpa_str
+ \@@_text_pdfstring_info:oN {\l_@@_tmpa_tl}\l_@@_tmpa_str
}
{
\@@_text_pdfstring_info:eN {\seq_item:Nn \l_@@_tmpa_seq{3}}\l_@@_tmpa_str
@@ -4002,14 +4002,14 @@
{
#2 .code:n =
{
- \tl_set:Ne\l_@@_tmpa_tl {\text_purify:n{##1}}
- \@@_store_metadata:ee {pdf\str_lowercase:n{#1}}{\l_@@_tmpa_tl}
+ \tl_set:Ne\l_@@_tmpa_tl {\text_expand:n{##1}}
+ \@@_store_metadata:eo {pdf\str_lowercase:n{#1}}{\l_@@_tmpa_tl}
\tl_if_blank:nTF {##1}
{
\pdfmanagement_remove:nn {Info}{#2}
}
{
- \@@_text_pdfstring_info:eN {\l_@@_tmpa_tl}\l_@@_tmpa_str
+ \@@_text_pdfstring_info:oN {\l_@@_tmpa_tl}\l_@@_tmpa_str
\str_if_eq:VnF\l_@@_tmpa_str{<FEFF>}
{
\pdfmanagement_add:nne {Info}{#2}{\l_@@_tmpa_str}
@@ -4018,7 +4018,7 @@
}
,unknown .code:n =
{
- \@@_text_pdfstring_info:eN {\text_purify:n{##1}}\l_@@_tmpa_str
+ \@@_text_pdfstring_info:eN {##1}\l_@@_tmpa_str
\str_if_eq:VnF\l_@@_tmpa_str{<FEFF>}
{
\exp_args:Nno
diff --git a/testfiles-pdftex/metadata-ansi.tpf b/testfiles-pdftex/metadata-ansi.tpf
index 8ad995bb..1228b465 100644
--- a/testfiles-pdftex/metadata-ansi.tpf
+++ b/testfiles-pdftex/metadata-ansi.tpf
@@ -231,7 +231,7 @@ stream
<xmp:CreateDate>2016-05-20T09:00:00Z</xmp:CreateDate>
<xmp:ModifyDate>2016-05-20T09:00:00Z</xmp:ModifyDate>
<xmp:MetadataDate>2016-05-20T09:00:00Z</xmp:MetadataDate>
- <xmpMM:DocumentID>uuid:91c76ee0-d189-45bc-85ec-ef2ffad03713</xmpMM:DocumentID>
+ <xmpMM:DocumentID>uuid:d335db53-c0a8-4523-8370-bb1ec58d4ac1</xmpMM:DocumentID>
<xmpMM:InstanceID>uuid:0a57c455-157a-4141-8c19-6237d832fc80</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
More information about the latex3-commits
mailing list.