[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop: backend support for linkoff/linkon (43e1e0b)
Ulrike Fischer
fischer at troubleshooting-tex.de
Thu Aug 19 18:38:43 CEST 2021
Repository : https://github.com/latex3/pdfresources
On branch : develop
Link : https://github.com/latex3/pdfresources/commit/43e1e0b5564fd241742adea92fc6a27c4dd1a807
>---------------------------------------------------------------
commit 43e1e0b5564fd241742adea92fc6a27c4dd1a807
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Thu Aug 19 18:38:43 2021 +0200
backend support for linkoff/linkon
>---------------------------------------------------------------
43e1e0b5564fd241742adea92fc6a27c4dd1a807
l3backend-testphase.dtx | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/l3backend-testphase.dtx b/l3backend-testphase.dtx
index 0102b1c..03d2ac6 100644
--- a/l3backend-testphase.dtx
+++ b/l3backend-testphase.dtx
@@ -1153,6 +1153,53 @@
%</dvisvgm>
% \end{macrocode}
% \end{macro}
+% \subsubsection{Additional annotation commands}
+% Starting with texlive 2021 pdftex and luatex offer commands to interrupt
+% a link. That can for example be used to exclude the header and footer from
+% the link. We add here backend support for this.
+% \begin{macrocode}
+%<*drivers>
+\cs_new_protected:Npn \@@_backend_annotation_linkoff:{}
+\cs_new_protected:Npn \@@_backend_annotation_linkon: {}
+%</drivers>
+%<*pdftex>
+\cs_if_exist:NT \pdfrunninglinkoff
+ {
+ \cs_new_protected:Npn \@@_backend_annotation_linkoff:
+ {
+ \pdfrunninglinkoff
+ }
+ \cs_new_protected:Npn \@@_backend_annotation_linkon:
+ {
+ \pdfrunninglinkon
+ }
+ }
+%</pdftex>
+%<*luatex>
+\int_compare:nNnT {\tex_luatexversion:D } > {112}
+ {
+ \cs_new_protected:Npn \@@_backend_annotation_linkoff:
+ {
+ \pdfextension linkstate 1
+ }
+ \cs_new_protected:Npn \@@_backend_annotation_linkon:
+ {
+ \pdfextension linkstate 0
+ }
+ }
+%</luatex>
+%<*dvipdfmx|xdvipdfmx>
+ \cs_new_protected:Npn \@@_backend_annotation_linkoff:
+ {
+ \@@_backend:n { nolink }
+ }
+ \cs_new_protected:Npn \@@_backend_annotation_linkon:
+ {
+ \@@_backend:n { link }
+ }
+%</dvipdfmx|xdvipdfmx>
+% \end{macrocode}
+%
% \subsubsection{Form XObject / backend }
% \begin{macro}{ \@@_backend_xform_new:nnnn }
% \begin{arguments}
More information about the latex3-commits
mailing list.