[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop: missed angles, another example (34c8014)
Ulrike Fischer
fischer at troubleshooting-tex.de
Tue Mar 16 09:32:24 CET 2021
Repository : https://github.com/latex3/pdfresources
On branch : develop
Link : https://github.com/latex3/pdfresources/commit/34c8014eb42a612190ed6b36eb8de419e9794cae
>---------------------------------------------------------------
commit 34c8014eb42a612190ed6b36eb8de419e9794cae
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue Mar 16 09:32:24 2021 +0100
missed angles, another example
>---------------------------------------------------------------
34c8014eb42a612190ed6b36eb8de419e9794cae
l3pdfannot.dtx | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/l3pdfannot.dtx b/l3pdfannot.dtx
index 6ca0599..79f0b3d 100644
--- a/l3pdfannot.dtx
+++ b/l3pdfannot.dtx
@@ -204,8 +204,7 @@
% }
% { link text}
% \end{verbatim}
-% Or if some other package or code need access to the action too, through
-% a dictionary:
+% Or through a dictionary:
% \begin{verbatim}
% \pdfdict_new:n {l_my_action_dict}
% \pdfdict_put:nnn {l_my_action_dict}{Type}{/Action}
@@ -217,11 +216,32 @@
%
% \pdfannot_link:nxn { URI }
% {
-% \pdfdict_use:n{l_my_action_dict}
+% /A <<\pdfdict_use:n{l_my_action_dict}>>
% }
% { link text }
% \end{verbatim}
%
+% Or if you want to exclude the possibility of a duplicated /A entry
+% (if the action is already in the link/GoTo dictionary e.g. if you can expect
+% other packages to add a dictionary). An alternative is to ensure that
+% no /A is there by removing it explicitly.
+%
+% \begin{verbatim}
+% \pdfdict_new:n {l_my_action_dict}
+% \pdfdict_put:nnn {l_my_action_dict}{Type}{/Action}
+% \pdfdict_put:nnn {l_my_action_dict}{S}{/URI}
+% \pdfdict_put:nnn {l_my_action_dict}{URI}{(https://www.latex-project.org)}
+%
+%´
+% \pdfannot_dict_put:nnn
+% {link/URI} { C } {[1~0~0]} %red border
+%
+% \group_begin:
+% \pdfannot_dict_put:nnx {link/GoTo}{A}{<<\pdfdict_use:n{l_my_action_dict}>>}
+% \pdfannot_link:nnn { URI }{}{ link text }
+% \group_end:
+% \end{verbatim}
+%
%
% \end{function}
% \begin{function}[updated = 2020-12-06]{ \pdfannot_link_begin:nnw, \pdfannot_link_end:n }
More information about the latex3-commits
mailing list.