summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def')
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def36
1 files changed, 21 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def
index 6e140387604..bd7939ac683 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: hyperref-generic.dtx
-\ProvidesFile{hgeneric-testphase.def}[2024-09-02 v0.96k %
+\ProvidesFile{hgeneric-testphase.def}[2024-12-20 v0.96o %
generic Hyperref driver for the LaTeX PDF management testphase bundle]
\RequirePackage{etoolbox} %why?
@@ -399,7 +399,7 @@
%\tl_set:cn {@#1}{#2}
\AddToDocumentProperties[hyperref]{#1}{#2}
}
-\cs_generate_variant:Nn \__hyp_store_metadata:nn {en,ne,ee}
+\cs_generate_variant:Nn \__hyp_store_metadata:nn {en,ne,ee,no,eo}
\hook_new:n{hyp/link/cite}
\keys_define:nn { hyp }
{
@@ -471,6 +471,7 @@
\cs_generate_variant:Nn \__hyp_property_record:nn {ee}
\box_new:N \l__hyp_tmpa_box
\tl_new:N \l__hyp_tmpa_tl
+\tl_new:N \l__hyp_tmpb_tl
\seq_new:N \l__hyp_tmpa_seq
\int_new:N \l__hyp_tmpa_int
\str_new:N \l__hyp_tmpa_str
@@ -525,6 +526,8 @@
{ Go~to~destination~#1 }
{ \l__hyp_text_enc_info_print_tl }
\l__hyp_link_Contents_tl
+ \pdfannot_dict_put:nne {link/GoTo}{Contents}
+ {\l__hyp_link_Contents_tl}
}
\socket_new_plug:nnn {hyp/link/URI/Contents}{default}
{
@@ -532,6 +535,8 @@
{ #1 }
{ \l__hyp_text_enc_info_print_tl }
\l__hyp_link_Contents_tl
+ \pdfannot_dict_put:nne {link/URI}{Contents}
+ {\l__hyp_link_Contents_tl}
}
\socket_assign_plug:nn{hyp/link/GoTo/Contents}{default}
\socket_assign_plug:nn{hyp/link/URI/Contents}{default}
@@ -600,6 +605,7 @@
{
\__hyp_text_pdfstring:noN { #1 }{ \l__hyp_text_enc_info_print_tl } #2
}
+\cs_generate_variant:Nn \__hyp_text_pdfstring_info:nN {eN,oN}
\cs_new_protected:Npn\__hyp_PageLabels_gpush:
{
\pdfmanagement_add:nne {Catalog} {PageLabels}{<</Nums[\HyPL@Labels]>>}
@@ -724,8 +730,6 @@
\group_begin:
\tl_set:Nn \l_hyp_current_dest_name_tl {#2}
\socket_use:nnn{hyp/link/GoTo/Contents}{#2}{#3}
- \pdfannot_dict_put:nne {link/GoTo}{Contents}
- {\l__hyp_link_Contents_tl}
\hook_use:n {hyp/link/#1}
\__hyp_link_goto_begin:nw {#2}#3\Hy@xspace@end
\__hyp_link_goto_end:
@@ -749,6 +753,7 @@
\Hy@VerboseLinkStart{#1}{#2}% only for debug
\group_begin:
\tl_set:Nn \l_hyp_current_dest_name_tl {#2}
+ \socket_use:nnn{hyp/link/GoTo/Contents}{#2}{}
\hook_use:n {hyp/link/#1}
\__hyp_link_goto_begin:nw {#2}
}
@@ -796,7 +801,6 @@
\pdfdict_put:nnn{l_hyp/annot/A/URI}{IsMap}{true}
}
\socket_use:nn{hyp/link/URI/Contents}{#2}
- \pdfannot_dict_put:nne {link/URI}{Contents}{\l__hyp_link_Contents_tl}
\cs_set_eq:NN \# \c_hash_str
\cs_set_eq:NN \% \c_percent_str
\Hy@safe@activestrue
@@ -2213,13 +2217,16 @@
}
\regex_new:N\l__hyp_optlang_regex
\regex_set:Nn\l__hyp_optlang_regex {\A\[([A-Za-z\-]+)\](.*)}
+\cs_generate_variant:Nn\clist_item:nn{on}
\cs_new_protected:Npn \__hyp_setup_info_key:nn #1 #2
{
\keys_define:nn { hyp }
{
pdf#1 .code:n =
{
- \tl_if_blank:nTF {##1}
+ \tl_set:Ne\l__hyp_tmpa_tl {\text_expand:n{##1}}
+ \__hyp_store_metadata:no {pdf#1}{\l__hyp_tmpa_tl}
+ \tl_if_empty:NTF \l__hyp_tmpa_tl
{
\str_case:nnF { #1 }
{
@@ -2239,45 +2246,44 @@
}
}
{
- \tl_set:Ne\l__hyp_tmpa_tl {\clist_item:nn{##1}{1}}
+ \tl_set:Ne\l__hyp_tmpb_tl {\clist_item:on{\l__hyp_tmpa_tl}{1}}
\exp_args:NNV
- \regex_extract_once:NnN \l__hyp_optlang_regex \l__hyp_tmpa_tl\l__hyp_tmpa_seq
+ \regex_extract_once:NnN \l__hyp_optlang_regex \l__hyp_tmpb_tl\l__hyp_tmpa_seq
\seq_if_empty:NTF\l__hyp_tmpa_seq
{
- \__hyp_text_pdfstring_info:nN {##1}\l__hyp_tmpa_str
+ \__hyp_text_pdfstring_info:oN {\l__hyp_tmpa_tl}\l__hyp_tmpa_str
}
{
- \exp_args:Ne
- \__hyp_text_pdfstring_info:nN {\seq_item:Nn \l__hyp_tmpa_seq{3}}\l__hyp_tmpa_str
+ \__hyp_text_pdfstring_info:eN {\seq_item:Nn \l__hyp_tmpa_seq{3}}\l__hyp_tmpa_str
}
\str_if_eq:VnF\l__hyp_tmpa_str{<FEFF>}
{
\pdfmanagement_add:nne {Info}{#2}{\l__hyp_tmpa_str}
}
}
- \__hyp_store_metadata:nn {pdf#1}{##1}
}
}
\keys_define:nn { hyp / info }
{
#2 .code:n =
{
+ \tl_set:Ne\l__hyp_tmpa_tl {\text_expand:n{##1}}
+ \__hyp_store_metadata:eo {pdf\str_lowercase:n{#1}}{\l__hyp_tmpa_tl}
\tl_if_blank:nTF {##1}
{
\pdfmanagement_remove:nn {Info}{#2}
}
{
- \__hyp_text_pdfstring_info:nN {##1}\l__hyp_tmpa_str
+ \__hyp_text_pdfstring_info:oN {\l__hyp_tmpa_tl}\l__hyp_tmpa_str
\str_if_eq:VnF\l__hyp_tmpa_str{<FEFF>}
{
\pdfmanagement_add:nne {Info}{#2}{\l__hyp_tmpa_str}
}
}
- \exp_args:Ne \__hyp_store_metadata:nn {pdf\str_lowercase:n{#1}}{##1}
}
,unknown .code:n =
{
- \__hyp_text_pdfstring_info:nN {##1}\l__hyp_tmpa_str
+ \__hyp_text_pdfstring_info:eN {##1}\l__hyp_tmpa_str
\str_if_eq:VnF\l__hyp_tmpa_str{<FEFF>}
{
\exp_args:Nno