[latex3-commits] [git/LaTeX3-latex3-latex2e] hook-args: Update ltnews37.tex (3171f8b5)

GitHub noreply at github.com
Tue Apr 11 13:47:14 CEST 2023


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

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

commit 3171f8b5e721d15b8c0b46aa757925140bf198d3
Author: Phelype Oleinik <phelype.oleinik at latex-project.org>
Date:   Tue Apr 11 08:47:14 2023 -0300

    Update ltnews37.tex


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

3171f8b5e721d15b8c0b46aa757925140bf198d3
 base/doc/ltnews37.tex | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/base/doc/ltnews37.tex b/base/doc/ltnews37.tex
index 9f7a7bf0..8a1312bd 100644
--- a/base/doc/ltnews37.tex
+++ b/base/doc/ltnews37.tex
@@ -263,7 +263,7 @@ the code added to these hooks can reference the hook's arguments using
 \verb|#1|, \verb|#2|, etc., so now hooks can behave more like macros
 than like \emph{token lists} (using \pkg{expl3} terminology).  Regular
 argument-less hooks continue to work exactly like they did before:  this
-change is completely compatible with older documents and packages.
+extension is completely compatible with older documents and packages.
 
 \AddToHook{cmd/verbatim at font/after}[hack]{\small}
 To declare a hook with arguments, use
@@ -287,12 +287,11 @@ case, if you want to add an actual parameter token (\verb|#|) to the
 \RemoveFromHook{cmd/verbatim at font/after}[hack]
 
 Additionally, if you want to add \enquote{regular} code to a hook with
-arguments, you can still use \cs{AddToHook}, then there is no need for
-doubling parameter tokens.  This means that a package author can decide
-to add arguments to an existing hook without worrying about
-compatibility: \cs{AddToHook} will do the right thing and will not do
-any reference to the newly added arguments.
-
+arguments, you can still use \cs{AddToHook} --- in that case \verb|#|
+tokens are \emph{not} doubled.  This means that a package author can
+decide to add arguments to an existing hook without worrying about
+compatibility: \cs{AddToHook} will do the right thing and will not
+mistakenly reference the newly added arguments.
 
 The commands \cs{NewReversedHookWithArguments}, \cs
 {NewMirroredHookPairWithArguments}, \cs





More information about the latex3-commits mailing list.