[latex3-commits] [git/LaTeX3-latex3-pdfresources] splitting: added pdfannot_last (eac271f)
Ulrike Fischer
fischer at troubleshooting-tex.de
Tue Jun 30 00:04:00 CEST 2020
Repository : https://github.com/latex3/pdfresources
On branch : splitting
Link : https://github.com/latex3/pdfresources/commit/eac271f15b3c162fca75662daca843713ec8a2ef
>---------------------------------------------------------------
commit eac271f15b3c162fca75662daca843713ec8a2ef
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue Jun 30 00:04:00 2020 +0200
added pdfannot_last
>---------------------------------------------------------------
eac271f15b3c162fca75662daca843713ec8a2ef
pdfresources.dtx | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/pdfresources.dtx b/pdfresources.dtx
index 6cc85cb..48f2414 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -1067,7 +1067,9 @@
% annotation: one for links, one for boxed annotation. We use a boolean to decide
% which one should be used, so that only one user command is needed.
% \begin{macrocode}
+%<*package>
\bool_new:N \g__pdfannot_use_lastlink_bool
+%</package>
% \end{macrocode}
% \end{variable}
% \begin{NOTE}{UF}
@@ -1121,7 +1123,6 @@
\cs_new:Npn \pdfannot_box_last:
{
\@@_backend_annotation_last:
- \bool_gset_false:N\g__pdfannot_use_lastlink_bool
}
\cs_new_protected:Npn \pdfannot_box:nnnnn #1 #2 #3 #4 #5
@@ -1456,6 +1457,25 @@
\cs_set_eq:NN \pdfannot_link_last: \@@_backend_link_last:
%</package>
% \end{macrocode}
+% \begin{function}[added = 2020-06-29]{ \pdfannot_last: }
+% This retrieves the object reference a previously annotation
+% created either with a link or a box command. When the last was a link
+% it won't work with xelatex.
+% \end{function}
+% \begin{macrocode}
+%<*package>
+\cs_new:Npn \pdfannot_last:
+ {
+ \bool_if:NTF \g__pdfannot_use_lastlink_bool
+ {
+ \@@_backend_link_last:
+ }
+ {
+ \@@_backend_annotation_last:
+ }
+ }
+%</package>
+% \end{macrocode}
% %!!!! only annot link or also annot??
% \begin{function}[added = 2020-03-12]{ \pdfannot_link_margin:n }
% \begin{syntax}
More information about the latex3-commits
mailing list.