[latex3-commits] [git/LaTeX3-latex3-pdfresources] testlinkstuff: more about hooks (647ae7f)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue May 7 11:01:50 CEST 2019


Repository : https://github.com/latex3/pdfresources
On branch  : testlinkstuff
Link       : https://github.com/latex3/pdfresources/commit/647ae7f2698feef07e7bae2f4c1c706352e9acd5

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

commit 647ae7f2698feef07e7bae2f4c1c706352e9acd5
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue May 7 11:01:50 2019 +0200

    more about hooks


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

647ae7f2698feef07e7bae2f4c1c706352e9acd5
 pdfresources.dtx |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pdfresources.dtx b/pdfresources.dtx
index f03cba5..530c91e 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -703,6 +703,13 @@
  }
 %</package>
 %    \end{macrocode}
+% \subsection{Passing external information to hooks}
+% hooks sometimes wants to know something about the arguments of the surrounding command.
+% E.g. a hook in \cs{@startsection} perhaps needs the current section level or
+% if it is a run-in or display sectioning. Using \#-arguments in the hook is possible
+% but rather fragile. It is probably better if the surrounding command offers a
+% documentated interface through e.g. tl-variables. It should be also clear which
+% variables are read-only and which can be changed by the hook code. 
 %
 %
 % \PrintIndex





More information about the latex3-commits mailing list