From 4d14c5388a9581dee1111261078e6141963ec24f Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 10 Dec 2023 03:03:07 +0000 Subject: CTAN sync 202312100303 --- .../pdfmanagement-testphase/hyperref-generic.dtx | 500 ++++++++++++--------- 1 file changed, 298 insertions(+), 202 deletions(-) (limited to 'macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx') diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx index c03d57a7fc..03b931f11d 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx @@ -82,7 +82,7 @@ % }^^A % } % -% \date{Version 0.96c, released 2023-11-17} +% \date{Version 0.96d, released 2023-12-09} % % \maketitle % \begin{documentation} @@ -615,7 +615,15 @@ % the link type, so the link is for example no longer colored. It also removes the % implicit grouping of the content. % -% +% \DescribeHypkey{nested-links}% +% +% Links are sometimes nested. E.g. if a section heading contains a reference +% it can lead to nested links in the table of contents or if |\nameref| is used. +% That is not forbidden and normally work as expected: If the link area overlap +% normally the inner link is \enquote{on top} and chosen at a click. +% But it is not always actually wanted, so with the |nested-links| (a boolean key) +% it is possible to disable such nested links. +% % \section{Draftmode} % pdftex and other engines knows a % draftmode which can be set with |\pdfdraftmode=1| @@ -797,7 +805,7 @@ % %\section{Assorted key descriptions}\label{sec:keydesc} %The following gives a few details to some keys that are perhaps not -%completly described in the manual, or are a bit different in this driver. +%completely described in the manual, or are a bit different in this driver. %The list is alphabetic. % % \DescribeHypkey{bookmarkstype} This key takes as value the extension of a list @@ -956,7 +964,7 @@ %<@@=hyp> % \end{macrocode} % \begin{macrocode} -\ProvidesFile{hgeneric-testphase.def}[2023-11-17 v0.96c % +\ProvidesFile{hgeneric-testphase.def}[2023-12-09 v0.96d % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? @@ -1221,15 +1229,15 @@ \cs_set_protected:Npn \hypersetup #1 { %\kvsetkeys{Hyp} {#1} - \keys_set:nn { hyp / setup }{ #1 } + \keys_set:nn { hyp }{ #1 } } % TODO for now unknown keys should only give warnings. -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { unknown .code:n = { \msg_warning:nneee { hyp } { unknown-key } - { hyp~/~setup }{ \l_keys_key_str } { #1 } + { hyp }{ \l_keys_key_str } { #1 } } } % \end{macrocode} @@ -1238,7 +1246,7 @@ % chapters and sections and with \cs{phantomsection}. The following key allows % to force a specific name for the destination so that it can be used by bookmarks. % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { next-anchor .code:n = { @@ -1274,7 +1282,7 @@ ,destination .tl_set:N = \l_@@_href_pdf_destination_tl ,pdfremotestartview .code:n = { - \keys_set:nn { hyp / setup } + \keys_set:nn { hyp } { pdfremotestartview = #1 } } ,page .code:n = @@ -1293,7 +1301,7 @@ { \pdfdict_put:nnn{l_hyp/annot/A}{Next}{#1} \tl_set:Nn \Hy@href@nextactionraw {/Next~#1} - \keys_set:nn {hyp / setup }{ pdfnewwindow = true} + \keys_set:nn {hyp }{ pdfnewwindow = true} } } ,afrelationship .code:n = @@ -1304,7 +1312,7 @@ } -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,href / urlencode .bool_set:N = \l_@@_href_url_encode_bool ,href / urlencode .default:n = {true} @@ -1467,7 +1475,7 @@ \hook_new:n{hyp/link/cite} %\color_set:nnn {hyp/color/cite}{HTML}{2E7E2A} %\color_set:nn {hyp/color/citeborder}{hyp/color/cite!60!white} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,citecolor .code:n = {\@@_color_set:ne {hyp/color/cite}{#1}\@@_citecolor_hook_init:} ,citebordercolor @@ -1477,7 +1485,7 @@ { \hook_gput_code:nnn { hyp/link/cite }{hyp/cite} { - \keys_set:nn { hyp / setup } + \keys_set:nn { hyp } { linkcolor = hyp/color/cite } @@ -1488,7 +1496,7 @@ { \hook_gput_code:nnn { hyp/link/cite }{hyp/citeborder} { - \keys_set:nn { hyp / setup } + \keys_set:nn { hyp } { linkbordercolor = hyp/color/citeborder } @@ -1972,7 +1980,7 @@ } % \end{macrocode} % \end{macro} -% \section {Core Hyperref Commands} +% \section{Core Hyperref Commands} % Every \pkg{hyperref} has to define eight core command: % \begin{verbatim} % \hyper@anchor @@ -1987,7 +1995,46 @@ % % This driver defines for consistency also % |\hyper@linklaunch| for Launch and |\hyper@linknamed| for Named. +% +% \subsection{Link level} +% Links can be nested. Inner links need perhaps special handling, e.g. +% to deactivate the link, or to change the border, or in the case of +% tagging to add some additional structure to handle the parent-child rules. +% We therefore add a global counter which is increased at the begin of +% link and decreased at the end. +% \begin{macro}{g_@@_linknestlevel_int} +% \begin{macrocode} +\int_new:N \g_@@_linknestlevel_int +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\prg_new_conditional:Npnn \@@_if_outer_link: {TF} + { + \int_compare:nNnTF { \g_@@_linknestlevel_int } > {1} + { \prg_return_false: } + { \prg_return_true: } + } +% \end{macrocode} + +% \begin{macrocode} +\cs_new:Npn \@@_check_link_nesting:TF #1 #2 + { + \use_i:nn {#1}{#2} + } +% \end{macrocode} % +% \begin{macrocode} +\keys_define:nn { hyp } + { + nested-links .choice:, + nested-links / true .code:n = + { \cs_set_eq:NN \@@_check_link_nesting:TF \use_i:nn }, + nested-links / false .code:n = + { \cs_set_eq:NN \@@_check_link_nesting:TF \@@_if_outer_link:TF }, + nested-links .default:n = {true} + } +% \end{macrocode} % \subsection{ Anchors / destinations} % The first three commands are needed for \enquote{anchors}. At first % the internal commands to create a destination. It uses @@ -2157,27 +2204,41 @@ { \bool_if:NTF \l_@@_annot_GoTo_bool { - \Hy@VerboseLinkStart{#1}{#2} - \group_begin: - \tl_set:Nn \l_hyp_current_dest_name_tl {#2} - \hook_use:n {hyp/link/#1} - \@@_link_goto_begin:nw {#2}#3\Hy@xspace@end - \@@_link_goto_end: - \group_end: - \Hy@VerboseLinkStop + \int_gincr:N\g_@@_linknestlevel_int + \@@_check_link_nesting:TF + { + \Hy@VerboseLinkStart{#1}{#2} + \group_begin: + \tl_set:Nn \l_hyp_current_dest_name_tl {#2} + \hook_use:n {hyp/link/#1} + \@@_link_goto_begin:nw {#2}#3\Hy@xspace@end + \@@_link_goto_end: + \group_end: + \Hy@VerboseLinkStop + } + { + \group_begin: #3\group_end: + } + \int_gdecr:N\g_@@_linknestlevel_int } {{\let\protect\relax#3}} } - \cs_new_protected:Npn \hyper@linkstart #1 #2 %#1 context, #2=destination name { \bool_if:NT \l_@@_annot_GoTo_bool { - \Hy@VerboseLinkStart{#1}{#2}% only for debug - \group_begin: - \tl_set:Nn \l_hyp_current_dest_name_tl {#2} - \hook_use:n {hyp/link/#1} - \@@_link_goto_begin:nw {#2} + \int_gincr:N\g_@@_linknestlevel_int + \@@_check_link_nesting:TF + { + \Hy@VerboseLinkStart{#1}{#2}% only for debug + \group_begin: + \tl_set:Nn \l_hyp_current_dest_name_tl {#2} + \hook_use:n {hyp/link/#1} + \@@_link_goto_begin:nw {#2} + } + { + \group_begin: + } } } @@ -2185,9 +2246,16 @@ { \bool_if:NT \l_@@_annot_GoTo_bool { - \@@_link_goto_end: - \group_end: - \Hy@VerboseLinkStop + \@@_check_link_nesting:TF + { + \@@_link_goto_end: + \group_end: + \Hy@VerboseLinkStop + } + { + \group_end: + } + \int_gdecr:N\g_@@_linknestlevel_int } } % \end{macrocode} @@ -2203,31 +2271,39 @@ { \bool_if:NTF \l_@@_annot_URI_bool { - \group_begin: - \@@_text_pdfstring:eoN - { #2} - { \l_@@_text_enc_uri_print_tl } - \l_@@_uri_tmpa_tl - \pdfdict_put:nno{l_hyp/annot/A/URI}{URI}{\l_@@_uri_tmpa_tl} - \bool_if:NT \l_@@_href_url_ismap_bool - { - \pdfdict_put:nnn{l_hyp/annot/A/URI}{IsMap}{true} - } - \cs_set_eq:NN \# \c_hash_str - \cs_set_eq:NN \% \c_percent_str - \Hy@safe@activestrue - \mode_leave_vertical: - \pdfannot_dict_put:nne {link/URI}{A}{<<\pdfdict_use:n {l_hyp/annot/A/URI}>>} - \pdfannot_link:nen { URI } - { - } + \int_gincr:N\g_@@_linknestlevel_int + \@@_check_link_nesting:TF + { + \group_begin: + \@@_text_pdfstring:eoN + { #2} + { \l_@@_text_enc_uri_print_tl } + \l_@@_uri_tmpa_tl + \pdfdict_put:nno{l_hyp/annot/A/URI}{URI}{\l_@@_uri_tmpa_tl} + \bool_if:NT \l_@@_href_url_ismap_bool + { + \pdfdict_put:nnn{l_hyp/annot/A/URI}{IsMap}{true} + } + \cs_set_eq:NN \# \c_hash_str + \cs_set_eq:NN \% \c_percent_str + \Hy@safe@activestrue + \mode_leave_vertical: + \pdfannot_dict_put:nne {link/URI}{A}{<<\pdfdict_use:n {l_hyp/annot/A/URI}>>} + \pdfannot_link:nen { URI } + { + } + { + \let\protect\relax + #1 + \Hy@xspace@end + \Hy@VerboseLinkStop %where is the start?? + } + \group_end: + } { - \let\protect\relax - #1 - \Hy@xspace@end - \Hy@VerboseLinkStop %where is the start?? + \group_begin: #1 \group_end: } - \group_end: + \int_gdecr:N\g_@@_linknestlevel_int } {{\let\protect\relax#1}} } @@ -2244,57 +2320,65 @@ { \bool_if:NTF \l_@@_annot_GoToR_bool { - \group_begin: - \tl_set:Ne \l_@@_filename_tmpa_tl { \text_expand:n { #2 } } - \exp_args:Ne - \pdf_object_if_exist:nF { @@_file_\tl_to_str:N \l_@@_filename_tmpa_tl } - { - \pdfdict_put:nne { l_pdffile/Filespec}{Subtype}{\pdf_name_from_unicode_e:n {application/pdf}} - \pdffile_embed_file:noe - {} - {\l_@@_filename_tmpa_tl } - {@@_file_\tl_to_str:N \l_@@_filename_tmpa_tl } - } - \pdfdict_put:nne - {l_hyp/annot/A/GoToR} - {F} - {\pdf_object_ref:e {@@_file_\tl_to_str:N \l_@@_filename_tmpa_tl}} - \@@_text_pdfstring:nnN - { #3 } - { \l_@@_text_enc_dest_print_tl } - \l_@@_dest_name_tmpa_tl - \tl_if_blank:eTF {#3} + \int_gincr:N\g_@@_linknestlevel_int + \@@_check_link_nesting:TF { - \pdfdict_put:nne {l_hyp/annot/A/GoToR}{D} + \group_begin: + \tl_set:Ne \l_@@_filename_tmpa_tl { \text_expand:n { #2 } } + \exp_args:Ne + \pdf_object_if_exist:nF { @@_file_\tl_to_str:N \l_@@_filename_tmpa_tl } + { + \pdfdict_put:nne { l_pdffile/Filespec}{Subtype}{\pdf_name_from_unicode_e:n {application/pdf}} + \pdffile_embed_file:noe + {} + {\l_@@_filename_tmpa_tl } + {@@_file_\tl_to_str:N \l_@@_filename_tmpa_tl } + } + \pdfdict_put:nne + {l_hyp/annot/A/GoToR} + {F} + {\pdf_object_ref:e {@@_file_\tl_to_str:N \l_@@_filename_tmpa_tl}} + \@@_text_pdfstring:nnN + { #3 } + { \l_@@_text_enc_dest_print_tl } + \l_@@_dest_name_tmpa_tl + \tl_if_blank:eTF {#3} { - [ - \int_eval:n - { \int_max:nn {0}{ 0\l_@@_href_pdf_page_tl - 1 }} - /\l_@@_dest_pdfremotestartview_tl - ] + \pdfdict_put:nne {l_hyp/annot/A/GoToR}{D} + { + [ + \int_eval:n + { \int_max:nn {0}{ 0\l_@@_href_pdf_page_tl - 1 }} + /\l_@@_dest_pdfremotestartview_tl + ] + } } - } - { - \pdfdict_put:nno {l_hyp/annot/A/GoToR}{D}{\l_@@_dest_name_tmpa_tl} - } - \mode_leave_vertical: + { + \pdfdict_put:nno {l_hyp/annot/A/GoToR}{D}{\l_@@_dest_name_tmpa_tl} + } + \mode_leave_vertical: % \end{macrocode} % We use an extra object here, as ghostscript doesn't like the % object reference in the dict % \url{https://chat.stackexchange.com/transcript/message/57361080#57361080} % \begin{macrocode} - \pdf_object_unnamed_write:ne{dict}{\pdfdict_use:n {l_hyp/annot/A/GoToR}} - \pdfannot_dict_put:nne {link/GoToR}{A}{\pdf_object_ref_last:} - \pdfannot_link:nnn %expansion?? - { GoToR } - { - } + \pdf_object_unnamed_write:ne{dict}{\pdfdict_use:n {l_hyp/annot/A/GoToR}} + \pdfannot_dict_put:nne {link/GoToR}{A}{\pdf_object_ref_last:} + \pdfannot_link:nnn %expansion?? + { GoToR } + { + } + { + \let\protect\relax + #1\Hy@xspace@end + \Hy@VerboseLinkStop %where is the start?? + } + \group_end: + } { - \let\protect\relax - #1\Hy@xspace@end - \Hy@VerboseLinkStop %where is the start?? + \group_begin: #1 \group_end: } - \group_end: + \int_gdecr:N\g_@@_linknestlevel_int } {{\let\protect\relax#1}} } @@ -2312,47 +2396,53 @@ { \bool_if:NTF \l_@@_annot_Launch_bool { - \group_begin: - \@@_text_pdfstring:nnN - { #1 } - { \l_@@_text_enc_file_print_tl } - \l_@@_filename_tmpa_tl - \pdfdict_put:nno {l_hyp/annot/A/Launch}{F}{\l_@@_filename_tmpa_tl} - \@@_text_pdfstring:noN - { #3 } - { \l_@@_text_enc_para_print_tl } - \l_@@_para_tmpa_tl - \bool_if:nTF - { - \str_if_eq_p:Vn \l_@@_para_tmpa_tl {()} - || - \pdf_version_compare_p:Nn > {1.9} - } - { - \pdfdict_remove:nn {l_hyp/annot/A/Launch}{Win} - } - { - \pdfdict_put:nne - {l_hyp/annot/A/Launch} - {Win} - {<

>} - } - \mode_leave_vertical: - \pdfannot_dict_put:nne {link/Launch}{A}{<<\pdfdict_use:n {l_hyp/annot/A/Launch}>>} - \pdfannot_link:nen - { Launch } - { - % /A -% << -% \pdfdict_use:n {l_hyp/annot/A/Launch} -% >> - } - { - \let\protect\relax - #2\Hy@xspace@end - \Hy@VerboseLinkStop %where is the start?? - } - \group_end: + \int_gincr:N\g_@@_linknestlevel_int + \@@_check_link_nesting:TF + { + \group_begin: + \@@_text_pdfstring:nnN + { #1 } + { \l_@@_text_enc_file_print_tl } + \l_@@_filename_tmpa_tl + \pdfdict_put:nno {l_hyp/annot/A/Launch}{F}{\l_@@_filename_tmpa_tl} + \@@_text_pdfstring:noN + { #3 } + { \l_@@_text_enc_para_print_tl } + \l_@@_para_tmpa_tl + \bool_if:nTF + { + \str_if_eq_p:Vn \l_@@_para_tmpa_tl {()} + || + \pdf_version_compare_p:Nn > {1.9} + } + { + \pdfdict_remove:nn {l_hyp/annot/A/Launch}{Win} + } + { + \pdfdict_put:nne + {l_hyp/annot/A/Launch} + {Win} + {<

>} + } + \mode_leave_vertical: + \pdfannot_dict_put:nne {link/Launch}{A}{<<\pdfdict_use:n {l_hyp/annot/A/Launch}>>} + \pdfannot_link:nen + { Launch } + { + % /A + % << + % \pdfdict_use:n {l_hyp/annot/A/Launch} + % >> + } + { + \let\protect\relax + #2\Hy@xspace@end + \Hy@VerboseLinkStop %where is the start?? + } + \group_end: + } + { \group_begin: #2 \group_end: } + \int_gdecr:N\g_@@_linknestlevel_int } {{\let\protect\relax#2}} } @@ -2380,31 +2470,37 @@ { \bool_if:NTF \l_@@_annot_Named_bool { - \group_begin: - \pdfmeta_standard_verify:nnTF {named_actions}{#1} - { - \mode_leave_vertical: - \pdfdict_put:nne {l_hyp/annot/A/Named}{N} - {\pdf_name_from_unicode_e:n{#1}} - \pdfannot_dict_put:nne {link/Named}{A}{<<\pdfdict_use:n {l_hyp/annot/A/Named}>>} - \pdfannot_link:nnn { Named } + \int_gincr:N\g_@@_linknestlevel_int + \@@_check_link_nesting:TF + { + \group_begin: + \pdfmeta_standard_verify:nnTF {named_actions}{#1} { -% /A -% << -% \pdfdict_use:n { l_hyp/annot/A/Named } -% >> + \mode_leave_vertical: + \pdfdict_put:nne {l_hyp/annot/A/Named}{N} + {\pdf_name_from_unicode_e:n{#1}} + \pdfannot_dict_put:nne {link/Named}{A}{<<\pdfdict_use:n {l_hyp/annot/A/Named}>>} + \pdfannot_link:nnn { Named } + { + % /A + % << + % \pdfdict_use:n { l_hyp/annot/A/Named } + % >> + } + { + #2 + \Hy@xspace@end + \Hy@VerboseLinkStop + } } { + \msg_warning:nnn { hyp } { pdfa-no-named-action }{#1} #2 - \Hy@xspace@end - \Hy@VerboseLinkStop } - } - { - \msg_warning:nnn { hyp } { pdfa-no-named-action }{#1} - #2 - } - \group_end: + \group_end: + } + { \group_begin: #2 \group_end: } + \int_gdecr:N\g_@@_linknestlevel_int } {{\let\protect\relax#2}} } @@ -2517,7 +2613,7 @@ % \begin{hypkey}{colorlinks} % This key also resets the border and borderstyle. % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,colorlinks .meta:n = { @@ -2539,14 +2635,14 @@ % \begin{macrocode} \seq_map_inline:Nn \c_@@_annot_types_seq { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { ,color#1 .bool_set:c = { l_hyp_annot_color#1_bool } ,#1color .code:n = { \@@_color_set:ne {hyp/color/#1}{##1} } } } -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,allcolors .meta:n = { @@ -2568,7 +2664,7 @@ % or cmyk (unusual). This can be set with the |bordercolormodel| key: %\begin{hypkey}{bordercolormodel} % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,bordercolormodel .choices:nn = {rgb,cmyk} @@ -2580,7 +2676,7 @@ % \begin{macrocode} \prop_map_inline:Nn \c_@@_map_hyp_annot_prop { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { #1bordercolor .code:n = { @@ -2605,7 +2701,7 @@ } } -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,allbordercolors .meta:n = { @@ -2625,7 +2721,7 @@ % \begin{macrocode} \prop_map_inline:Nn \c_@@_map_hyp_annot_prop { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { #1border .code:n = { @@ -2644,7 +2740,7 @@ } } } -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,pdfborder .code:n = { @@ -2678,7 +2774,7 @@ % \begin{macrocode} \prop_map_inline:Nn \c_@@_map_hyp_annot_prop { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { #1borderstyle .code:n = { @@ -2697,7 +2793,7 @@ } } } -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,pdfborderstyle .code:n = { @@ -2850,7 +2946,7 @@ { \pdf_version_compare_p:Nn > {1.4} } { \str_if_eq_p:ee{\pdf_version_major:}{-1} } { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { ,_ocgcolorlinks .meta:n = { @@ -2864,7 +2960,7 @@ } } { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { ,_ocgcolorlinks .code:n = { @@ -2876,7 +2972,7 @@ } } -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,ocgcolorlinks .choice: ,ocgcolorlinks / true .meta:n = @@ -2899,13 +2995,13 @@ { \pdf_version_compare_p:Nn > {1.4} } { \str_if_eq_p:ee{\pdf_version_major:}{-1} } { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { ,ocgcolor#1 .bool_set:c = { l_hyp_annot_ocgcolor#1_bool } } } { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { ,ocgcolor#1 .code:n= { @@ -2925,7 +3021,7 @@ % \begin{macrocode} \prop_map_inline:Nn \c_@@_map_hyp_annot_prop { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { ,#1highlight .choices:nn = { /I, /N, /O, /P} @@ -2954,7 +3050,7 @@ } -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,pdfhighlight .choices:nn = { /I, /N, /O, /P} @@ -2991,7 +3087,7 @@ % This key disable all appearance keys. The link themselves are still there. % \begin{hypkey}{hidelinks,hidelink,hideurl,hidefile,hiderun,hidemenu} % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { hidelinks .meta:n = { @@ -3004,7 +3100,7 @@ \seq_map_inline:Nn \c_@@_annot_types_seq { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { hide#1 .meta:n = { @@ -3021,20 +3117,20 @@ % This define the key for the color schemes and sets the default colors. % \begin{hypkey}{colorscheme} % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { colorscheme .code:n = { \prop_map_inline:cn { c_@@_colorscheme_#1_prop } { - \keys_set:nn { hyp /setup } + \keys_set:nn { hyp } { ##1 = ##2 } } } } -\keys_set:nn { hyp / setup } {colorscheme=phelype} +\keys_set:nn { hyp } {colorscheme=phelype} % \end{macrocode} % \end{hypkey} % @@ -3044,7 +3140,7 @@ % The following are ignored (with or without warnings) % \begin{hypkey}{unicode,pdfencoding,pdfversion} % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,unicode .code:n = {} ,pdfencoding .code:n = {} @@ -3062,12 +3158,12 @@ % % \begin{hypkey}{verbose,debug,draft,final} % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,verbose .legacy_if_set:n = {Hy@verbose} ,debug .legacy_if_set:n = {Hy@verbose} } -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,draft .code:n = { @@ -3086,7 +3182,7 @@ % pageanchor,linktoc,linktocpage,plainpages,localanchorname, % linkfileprefix} % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,extension .tl_set:N = \XR@ext ,extension .initial:n= pdf @@ -3098,7 +3194,7 @@ ,plainpages .legacy_if_set:n = {Hy@plainpages} } -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,linktoc .choices:nn = { none, section, all, page } { @@ -3124,7 +3220,7 @@ % \begin{macrocode} \prop_map_inline:Nn \c_@@_map_hyp_annot_prop { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { ,#1 .bool_set:c = {l_@@_annot_#2_bool} } @@ -3133,7 +3229,7 @@ % \end{hypkey} % % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,baseurl .code:n = { @@ -3691,7 +3787,7 @@ % \begin{hypkey}{pdfview} % Destination keys. pdfview is a bit more complicated so extra. % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,pdfview .code:n = { @@ -3781,7 +3877,7 @@ % \begin{hypkey}{pdflang} % |pdflang| should be deprecated. % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,pdflang .code:n = { @@ -3807,7 +3903,7 @@ \regex_set:Nn\l_@@_optlang_regex {\A\[([A-Za-z\-]+)\](.*)} \cs_new_protected:Npn \@@_setup_info_key:nn #1 #2 { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { pdf#1 .code:n = { @@ -3894,7 +3990,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_setup_info_date_key:nn #1 #2 { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { pdf#1 .code:n = { @@ -3927,7 +4023,7 @@ \@@_setup_info_date_key:nn {creationdate} {CreationDate} \@@_setup_info_date_key:nn {moddate} {ModDate} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { pdfmetadate .code:n = { \@@_store_metadata:nn {pdfmetadate}{#1} } } @@ -3936,12 +4032,12 @@ % \begin{hypkey}{pdftrapped} % Trapped is a bit curious, it has an value "unknown", and one can't suppress it ... % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { ,pdftrapped .code:n = { \exp_args:Nne - \keys_set:nn { hyp / setup } { _pdftrapped = \str_uppercase:n { #1 } } + \keys_set:nn { hyp } { _pdftrapped = \str_uppercase:n { #1 } } } ,_pdftrapped .choices:nn = {TRUE,FALSE,UNKNOWN} { @@ -3969,7 +4065,7 @@ % \begin{hypkey}{pdfinfo} % pdfinfo allows to set the info keys with keyval ... % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { pdfinfo .code:n = { @@ -3980,10 +4076,10 @@ % \end{hypkey} % Now we set some default values % \begin{macrocode} -\keys_set:nn { hyp / setup} {pdfcreator = LaTeX~with~hyperref} -\keys_set:nn { hyp / setup} {pdfauthor = } -\keys_set:nn { hyp / setup} {pdftitle = } -\keys_set:nn { hyp / setup} {pdfsubject = } +\keys_set:nn { hyp} {pdfcreator = LaTeX~with~hyperref} +\keys_set:nn { hyp} {pdfauthor = } +\keys_set:nn { hyp} {pdftitle = } +\keys_set:nn { hyp} {pdfsubject = } % \end{macrocode} % % \subsection{hyperxmp keys} @@ -4032,7 +4128,7 @@ ,pdfdate } { - \keys_define:nn { hyp / setup } + \keys_define:nn { hyp } { #1 .code:n= { \@@_store_metadata:nn {#1}{##1}} } @@ -4043,7 +4139,7 @@ % \subsection{Transitions} % pdfpageduration sets the duration a page is shown in full screen mode. % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { pdfpageduration .code:n = { @@ -4088,7 +4184,7 @@ % opaque & true or false, only relevant for Fly style % \end{tabular} % \begin{macrocode} -\keys_define:nn { hyp / setup } +\keys_define:nn { hyp } { pdfpagetransition .code:n = { @@ -4180,7 +4276,7 @@ % % Finally we process the package option list, to get most keys working % \begin{macrocode} -\keys_set_known:nv{hyp/setup}{opt@hyperref.sty} +\keys_set_known:nv{ hyp }{opt@hyperref.sty} % \end{macrocode} % % Unfinished -- cgit v1.2.3