[latex3-commits] [git/LaTeX3-latex3-latex2e] hook-args: Minor doc tweaks (34ebe4ba)

PhelypeOleinik phelype.oleinik at latex-project.org
Wed Mar 29 05:01:32 CEST 2023


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

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

commit 34ebe4ba17ddccba55604be62bd2cf3bf8877758
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Wed Mar 29 00:01:32 2023 -0300

    Minor doc tweaks


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

34ebe4ba17ddccba55604be62bd2cf3bf8877758
 base/lthooks.dtx | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index df0a140c..b81b0fb9 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -283,8 +283,8 @@
 %   \end{syntax}
 %    Some hooks are only used (and can be only used) in one place, for
 %    example, those in \verb=\begin{document}= or
-%    \verb=\end{document}=. Once we have passed that point adding to
-%    the hook through a defined \cs[no-index]{\meta{addto-cmd}} command (e.g.,
+%    \verb=\end{document}=. From that point onwards, adding to the hook
+%    through a defined \cs[no-index]{\meta{addto-cmd}} command (e.g.,
 %    \cs{AddToHook} or \cs{AtBeginDocument}, etc.\@) would have no
 %    effect (as would the use of such a command inside the hook code
 %    itself). It is therefore customary to redefine
@@ -614,10 +614,10 @@
 % package's hooks, so the dot-syntax doesn't make much sense.
 %
 % In some cases, for example in large packages, one may want to separate
-% it in logical parts, but still use the main package name as
+% the code in logical parts, but still use the main package name as the
 % \meta{label}, then the \meta{default label} can be set using
-% \cs{SetDefaultHookLabel} or
-% \cs{PushDefaultHookLabel}\verb={..}=\,\ldots\cs{PopDefaultHookLabel}.
+% \cs{PushDefaultHookLabel}\verb={...}=\,\ldots\cs{PopDefaultHookLabel}
+% or \cs{SetDefaultHookLabel}\verb={...}=.
 %
 % \begin{function}{\PushDefaultHookLabel,\PopDefaultHookLabel}
 %   \begin{syntax}
@@ -1393,7 +1393,7 @@
 %    \begin{itshape}\begin{color}{blue} ...
 %    \end{itshape}\end{color}
 %\end{verbatim}
-%   and an error message that \verb=\begin{color}= ended by
+%    and an error message saying that \verb=\begin{color}= was ended by
 %    \verb=\end{itshape}=.
 %    With \hook{env/quote/after} declared as a reversed hook the
 %    execution order is reversed and so all environments are closed in
@@ -1530,9 +1530,9 @@
 %    you typically do not know what kind of variable parts may come up
 %    in real documents.
 %
-%    For example, \pkg{babel} may want to provide hooks such as
-%    \hook{babel/\meta{language}/afterextras}.  Language support in
-%    \pkg{babel} is often done through external language
+%    For example, \pkg{babel} provides hooks such as
+%    \hook{babel/\meta{language}/afterextras}.  However, language
+%    support in \pkg{babel} is often done through external language
 %    packages. Thus doing the activation for all languages inside the
 %    core \pkg{babel} code is not a viable approach. Instead it needs
 %    to be done by each language package (or by the user who wants to
@@ -1732,7 +1732,7 @@
 %    package/class name if called inside such a file
 %    (see section~\ref{sec:default-label}).
 %
-%    This way one can add further code to the hook using
+%    This way one can add code to the hook using
 %    \cs{AddToHook} or \cs{AtBeginDocument} using a different label
 %    and explicitly order the code chunks as necessary, e.g., run some
 %    code before or after another package's code.  When using the
@@ -2017,10 +2017,10 @@
 %
 % \subsection{Hooks provided by \cs{end}\texttt{\{document\}}}
 %
-%    \LaTeXe{} always provided \cs{AtEndDocument} to add code to the
-%    execution of \verb=\end{document}= just in front of the code that
+%    \LaTeXe{} has always provided \cs{AtEndDocument} to add code to the
+%    \verb=\end{document}=, just in front of the code that
 %    is normally executed there. While this was a big improvement over
-%    the situation in \LaTeX\,2.09 it was not flexible enough for a
+%    the situation in \LaTeX\,2.09, it was not flexible enough for a
 %    number of use cases and so packages, such as \pkg{etoolbox},
 %    \pkg{atveryend} and others patched \cs{enddocument} to add
 %    additional points where code could be hooked into.
@@ -2488,7 +2488,11 @@
 %
 % \DescribeMacro{\g_@@_\meta{hook}_code_prop}
 % \DescribeMacro{\@@\textvisiblespace\meta{hook}}
+% \DescribeMacro{\g_@@_\meta{hook}_reversed_tl}
+% \DescribeMacro{\g_@@_\meta{hook}_declared_tl}
+% \DescribeMacro{\g_@@_\meta{hook}_parameter_tl}
 % \DescribeMacro{\@@_next\textvisiblespace\meta{hook}}
+% \DescribeMacro{\@@_toplevel\textvisiblespace\meta{hook}}
 %    Hooks have a name (called \meta{hook} in the description below)
 %    and for each hook we have to
 %    provide a number of data structures. These are





More information about the latex3-commits mailing list.