diff options
author | Norbert Preining <norbert@preining.info> | 2021-07-14 03:01:33 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-07-14 03:01:33 +0000 |
commit | 3303a89b11161d66ec78811056b85306f696cc09 (patch) | |
tree | 32dec4376d10f3e3aa82049a3388462e39914a70 /macros/latex/contrib/l3backend/l3backend-pdf.dtx | |
parent | 4ac920a9909dd7d233ed3662bb576e1ae4ade873 (diff) |
CTAN sync 202107140301
Diffstat (limited to 'macros/latex/contrib/l3backend/l3backend-pdf.dtx')
-rw-r--r-- | macros/latex/contrib/l3backend/l3backend-pdf.dtx | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx index 11456302a2..5c7fa3b565 100644 --- a/macros/latex/contrib/l3backend/l3backend-pdf.dtx +++ b/macros/latex/contrib/l3backend/l3backend-pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2021-05-07} +% \date{Released 2021-07-12} % % \maketitle % @@ -392,8 +392,8 @@ % { % pdf.linkdp.pad , % pdf.linkht.pad , -% pdf.llx, pdf.lly , -% pdf.ury, pdf.ury , +% pdf.llx, pdf.lly , +% pdf.ury, pdf.ury , % pdf.link.dict , % pdf.outerbox , % pdf.baselineskip @@ -403,6 +403,10 @@ % grab the link content as a box which can then unbox: this allows the same % interface as for \pdfTeX{}. % +% Notice that the link setup here uses |/Action| not |/A|. That is because +% Distiller \emph{requires} this trigger word, rather than a \enquote{raw} +% PDF dictionary key (Ghostscript can handle either form). +% % Taking the idea of |evenboxes| from \pkg{hypdvips}, we implement a minimum % box height and depth for link placement. This means that \enquote{underlining} % with a hyperlink will generally give an even appearance. However, to ensure @@ -417,10 +421,13 @@ % as taken from \pkg{hypdvips}. % % Getting the outer dimensions of the text area may be better using a two-pass -% approach and |\tex_savepos:D|. That plus format mode are still to re-examine. +% approach and |\tex_savepos:D|. That plus generic mode are still to re-examine. % \begin{macrocode} \cs_new_protected:Npn \@@_backend_link_begin_goto:nnw #1#2 - { \@@_backend_link_begin:nw { #1 /Subtype /Link /A << /S /GoTo /D ( #2 ) >> } } + { + \@@_backend_link_begin:nw + { #1 /Subtype /Link /Action << /S /GoTo /D ( #2 ) >> } + } \cs_new_protected:Npn \@@_backend_link_begin_user:nnw #1#2 { \@@_backend_link_begin:nw {#1#2} } \cs_new_protected:Npn \@@_backend_link_begin:nw #1 @@ -428,6 +435,11 @@ \bool_if:NF \g_@@_backend_link_bool { \@@_backend_link_begin_aux:nw {#1} } } +% \end{macrocode} +% The definition of |pdf.link.dict| here is needed as there is code in the +% PostScript headers for breaking links, and that can only work with this +% available. +% \begin{macrocode} \cs_new_protected:Npn \@@_backend_link_begin_aux:nw #1 { \bool_gset_true:N \g_@@_backend_link_bool @@ -1377,7 +1389,7 @@ width ~ \dim_eval:n {#1} ~ height ~ \dim_eval:n {#2} ~ depth ~ \dim_eval:n {#3} ~ - <</Type/Annot #4 >> + << /Type /Annot #4 >> } } % \end{macrocode} |