[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: fix for #646 (54dd5b49)

Frank Mittelbach frank.mittelbach at latex-project.org
Thu Aug 12 23:41:07 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/54dd5b4960c375ba2305596f3e7228363a86bc01

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

commit 54dd5b4960c375ba2305596f3e7228363a86bc01
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Thu Aug 12 23:41:07 2021 +0200

    fix for #646


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

54dd5b4960c375ba2305596f3e7228363a86bc01
 base/changes.txt |  6 ++++++
 base/lthooks.dtx | 21 +++++++++++++++------
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 86398b92..9cf2b5b3 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,12 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2021-08-12  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* lthooks.dtx (subsubsection{Generic hooks for all environments}):
+	Fixed documentation of \AtBeginEnvironment and friends
+	-- was missing the main "env" argument  (gh/646)
+
 2021-08-11  Marcel Krüger  <Marcel.Krueger at latex-project.org>
 
 	* ltluatex.dtx:
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index d7327c19..21690565 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -32,7 +32,7 @@
 %
 %    \begin{macrocode}
 \def\lthooksversion{v1.0o}
-\def\lthooksdate{2021/07/27}
+\def\lthooksdate{2021/08/12}
 %    \end{macrocode}
 %
 %<*driver>
@@ -1481,7 +1481,10 @@
 % \subsection{\LaTeXe{} commands and environments augmented by
 %    hooks}
 %
-%  \emph{intro to be written}
+%    In this section we describe the standard hooks that are now
+%    offered by \LaTeX{} or give pointers to other documents in which
+%    they are described. This section is will grow over time (and
+%    perhaps move to userguide3 eventually.
 %
 % \subsubsection{Generic hooks for all environments}
 %
@@ -1543,9 +1546,15 @@
 %    to add the outer hooks, etc.
 %
 %
+%    Largely for compatibility with existing packages the following
+%    four commands are also available to set the environments, but for
+%    new packages we recommend to use the hooks names and
+%    \cs{AddToHook} directly instead.
+%
+%
 % \begin{function}{\BeforeBeginEnvironment}
 %   \begin{syntax}
-%     \cs{BeforeBeginEnvironment} \oarg{label} \Arg{code}
+%     \cs{BeforeBeginEnvironment} \oarg{label} \Arg{env} \Arg{code}
 %   \end{syntax}
 %   This declaration adds to the \hook{env/\meta{env}/before} hook
 %    using the \meta{label}.  If \meta{label} is not given, the
@@ -1554,21 +1563,21 @@
 %
 % \begin{function}{\AtBeginEnvironment}
 %   \begin{syntax}
-%     \cs{AtBeginEnvironment} \oarg{label} \Arg{code}
+%     \cs{AtBeginEnvironment} \oarg{label} \Arg{env} \Arg{code}
 %   \end{syntax}
 %   Like \cs{BeforeBeginEnvironment} but adds to the \hook{env/\meta{env}/begin} hook.
 % \end{function}
 %
 % \begin{function}{\AtEndEnvironment}
 %   \begin{syntax}
-%     \cs{AtEndEnvironment} \oarg{label} \Arg{code}
+%     \cs{AtEndEnvironment} \oarg{label} \Arg{env} \Arg{code}
 %   \end{syntax}
 %   Like \cs{BeforeBeginEnvironment} but adds to the \hook{env/\meta{env}/end} hook.
 % \end{function}
 %
 % \begin{function}{\AfterEndEnvironment}
 %   \begin{syntax}
-%     \cs{AfterEndEnvironment} \oarg{label} \Arg{code}
+%     \cs{AfterEndEnvironment} \oarg{label} \Arg{env} \Arg{code}
 %   \end{syntax}
 %   Like \cs{BeforeBeginEnvironment} but adds to the \hook{env/\meta{env}/after} hook.
 % \end{function}





More information about the latex3-commits mailing list.