[latex3-commits] [git/LaTeX3-latex3-latex2e] hook-args: Update docs (2ab22cfa)

PhelypeOleinik phelype.oleinik at latex-project.org
Sat Apr 15 18:25:03 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : hook-args
Link       : https://github.com/latex3/latex2e/commit/2ab22cfa50c835ae0f6f4323139e53188b0abddd

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

commit 2ab22cfa50c835ae0f6f4323139e53188b0abddd
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Sat Apr 15 13:25:03 2023 -0300

    Update docs


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

2ab22cfa50c835ae0f6f4323139e53188b0abddd
 base/lthooks.dtx | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index e7f41ab4..e4716c3f 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -1595,11 +1595,11 @@
 %    \medskip
 %
 %    To use a hook with arguments, just write
-%    \cs{UseHookWithArguments}\Arg{hook} followed by a braced list of
-%    the arguments.  For example, if the hook \hook{test} takes three
-%    arguments, write:
+%    \cs{UseHookWithArguments}\Arg{hook}\Arg{number} followed by a
+%    braced list of the arguments.  For example, if the hook \hook{test}
+%    takes three arguments, write:
 %\begin{verbatim}
-%    \UseHookWithArguments{test}{arg-1}{arg-2}{arg-3}
+%    \UseHookWithArguments{test}{3}{arg-1}{arg-2}{arg-3}
 %\end{verbatim}
 %    then, in the \meta{code} of the hook, all instances of \verb|#1|
 %    will be replaced by \verb|arg-1|, \verb|#2| by \verb|arg-2| and so
@@ -1610,7 +1610,8 @@
 %      {The hook \emph{will} take the declared number of arguments, and
 %       what will happen depends on what was grabbed, and what the hook
 %       code does with its arguments.}
-%    if too few arguments are provided.
+%    if too few arguments are provided.  If the hook isn't declared,
+%    \meta{number} arguments are removed from the input stream.
 %
 %    \medskip
 %





More information about the latex3-commits mailing list.