[latex3-commits] [git/LaTeX3-latex3-latex2e] lthooks-doc-updates: repeated use of \OneTimeHook (b9f92221)

Frank Mittelbach frank.mittelbach at latex-project.org
Fri Jul 23 13:24:21 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : lthooks-doc-updates
Link       : https://github.com/latex3/latex2e/commit/b9f922212a89060e306a94c191d140781038ae94

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

commit b9f922212a89060e306a94c191d140781038ae94
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Fri Jul 23 13:24:21 2021 +0200

    repeated use of \OneTimeHook


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

b9f922212a89060e306a94c191d140781038ae94
 base/lthooks.dtx | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 102b8191..ce4c2b01 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -272,12 +272,22 @@
 %    consumed and any further attempt to add to it will result in
 %    executing the code to be added immediately.
 %
-%    \fmiinline{Maybe add an error version as well?}
-%
 %    The \meta{hook} \emph{cannot} be specified using the dot-syntax.
 %    A leading |.| is treated literally.    See
 %    section~\ref{sec:default-label} for details.
-
+%
+%    Using \cs{UseOneTimeHook} several times with the same
+%    \Arg{hook} means that it only executes the first time, for
+%    example, if used in a command that can be called several time
+%    then the hook executes only during the first invocation allowing
+%    to use it as an \enquote{inizialization} hook.
+%
+%    \fmi{Last statement is not yet implemented!}
+%
+%    Mixing \cs{UseHook} and \cs{UseOneTimeHook} for the same
+%    \Arg{hook} should be avoided, but if used then neither execute
+%    after the first \cs{UseOneTimeHook}.
+%
 % \end{function}
 %
 %





More information about the latex3-commits mailing list.