[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop: clarify documentation of l3pdfannot (c9fda69)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Mar 16 09:16:25 CET 2021


Repository : https://github.com/latex3/pdfresources
On branch  : develop
Link       : https://github.com/latex3/pdfresources/commit/c9fda69472675a967c11f990b5be0195a01b0901

>---------------------------------------------------------------

commit c9fda69472675a967c11f990b5be0195a01b0901
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Mar 16 09:16:25 2021 +0100

    clarify documentation of l3pdfannot


>---------------------------------------------------------------

c9fda69472675a967c11f990b5be0195a01b0901
 l3pdfannot.dtx | 33 ++++++++++++++++++++++++---------
 1 file changed, 24 insertions(+), 9 deletions(-)

diff --git a/l3pdfannot.dtx b/l3pdfannot.dtx
index 71ee24f..6ca0599 100644
--- a/l3pdfannot.dtx
+++ b/l3pdfannot.dtx
@@ -163,7 +163,8 @@
 %  \texttt{Launch}, \texttt{GoTo} or \texttt{Named}. The dictionary can be changed
 %  by the commands \cs{pdfannot_dict_put:nnn} and friends described below.
 % \end{variable}
-% \begin{function}[added = 2020-03-12, updated = 2020-12-06]{ \pdfannot_link:nnn }
+% \begin{function}[added = 2020-03-12, updated = 2020-12-06]
+%    { \pdfannot_link:nnn,\pdfannot_link:nxn }
 %   \begin{syntax}
 %     \cs{pdfannot_link:nnn} \Arg{type} \Arg{user action spec} \Arg{link text}
 %   \end{syntax}
@@ -191,18 +192,32 @@
 %  text. None of the hooks introduce a group.
 %  \meta{type} should normally be identical to the value of the |/S| key
 %  in the action dictionary.
-%  As example
+%  As example either with a direct action
+%  \begin{verbatim}
+%  \pdfannot_link:nnn { URI }
+%     {
+%       /A<<
+%         /Type/Action
+%         /S/URI
+%         /URI(https://www.latex-project.org)
+%       >>
+%     }
+%    { link text}
+%  \end{verbatim}
+%  Or if some other package or code need access to the action too, through
+%  a dictionary:
 %  \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
-%    \pdfannot_link:nnn { URI }
+%
+%    \pdfannot_link:nxn { URI }
 %     {
-%       /A
-%         <<
-%           /Type/Action
-%           /S/URI
-%           /URI(https://www.latex-project.org)
-%         >>
+%       \pdfdict_use:n{l_my_action_dict}
 %     }
 %     { link text }
 %    \end{verbatim}





More information about the latex3-commits mailing list.