From 842778a509461f375132b00d4a4dacfb5a5e6e50 Mon Sep 17 00:00:00 2001 From: Frank Mittelbach Date: Wed, 5 Feb 2025 22:57:57 +0100 Subject: [PATCH] edits after review by CAR --- base/changes.txt | 2 +- base/lthooks.dtx | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/base/changes.txt b/base/changes.txt index 4a8921053..04ad4c708 100644 --- a/base/changes.txt +++ b/base/changes.txt @@ -11,7 +11,7 @@ not part of the distribution. * lthooks.dtx: Document more prominently that using a hook with \UseHook or similar - commands require that the hook to be declared first (gh/1519) + commands requires that the hook to be declared first (gh/1519) 2025-01-31 Frank Mittelbach diff --git a/base/lthooks.dtx b/base/lthooks.dtx index fabd87137..df43dbd84 100644 --- a/base/lthooks.dtx +++ b/base/lthooks.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{lthooks.dtx} - [2025/02/03 v1.1l LaTeX Kernel (hooks)] + [2025/02/05 v1.1l LaTeX Kernel (hooks)] % \iffalse % \documentclass{l3doc} @@ -249,7 +249,7 @@ % % \subsubsection{Using hooks in code} % -% Using a hook, that is executing the code that has been associated +% Using a hook that is executing the code that has been associated % with it is only allowed if the hook has been previously declared % with \cs{NewHook}. For performance reason there are no runtime % checks for this and it is the responsibility of the programmer of a @@ -347,13 +347,13 @@ % \subsubsection{Updating code for hooks} % % In contrast to the commands from the previous section, declarations -% such as \cs{AddToHook} or \cs{DeclareHookRule} are allowed to be -% used even if the hook is not yet declared. The rationale is, that -% the hook declaration may be in some package that is loaded later or +% such as \cs{AddToHook} or \cs{DeclareHookRule} can be +% used even when the hook is not yet declared. The rationale is that +% the hook declaration may be in some package that is loaded later, or % perhaps not loaded at all. % % A side effect of this design is that misspellings do not raise an -% error, but are simply regarded as declarations for hooks with a +% error but are simply regarded as declarations for hooks with a % different name. % % \begin{function}{\AddToHook} @@ -756,28 +756,28 @@ % in others. % % Before the hook management system was introduced -% packages had to take elaborate precaution to determine if some other -% package got loaded as well (before or after) and find some ways to +% packages had to take elaborate precautions to determine whether some other +% package had also been loaded (before or after) and then to find some ways to % alter its behavior accordingly. In addition is was often the user's % responsibility to load packages in the right order so that alterations -% made by packages were done in the right order and some cases even +% made by packages were done in thsat same order; and in some cases even % altering the loading order wouldn't resolve the conflicts. % % With the new hook management system it is now possible to define % rules (i.e., relationships) between code chunks added by different -% packages and explicitly describe in which order they should be +% packages and to specify explicitly the order in which they should be % processed. % % The rules can be declared for hooks before the hook has been % declared with \cs{NewHook} and they are allowed to refer to code % labels that do not yet exist, e.g., because a package defining the % code chunk with that label has not yet been loaded. -% When the hook code is finally sorted all rules that apply are acted -% upon, the others are ignored. +% When the hook code is finally sorted for fast execution, all rules that apply are acted on +% and the others are ignored. % -% This offers the necessary flexibility to handle complicated -% relationships between code from different packages and set this up -% beforehand, whether or not the packages are actually loaded in a +% This offers the flexibility needed to handle complicated +% relationships between code from different packages and to set this up +% beforehand in a way that is independent of whether or not the packages are actually loaded in a % specific document. The downside of this is that misspellings of % hook names or code labels will not raise any error, instead the rule % will simply never apply! @@ -1062,7 +1062,7 @@ % \end{syntax} % Turn the debugging of hook code on or off. This displays most changes % made to the hook data structures. The output is rather coarse and -% not really intended for normal use but helpful in case hooks do +% not really intended for normal use, but it can be helpful in case hooks do % not work as expected. See also \ref{sec:display-hooks} for % commands to inspect individual hooks. % \end{function} @@ -4585,7 +4585,7 @@ % \begin{macro}{\@@_code_gset_auxi:nnnn,\@@_code_gset_auxi:eeen} % This macro is used to append code to the \verb|toplevel| and % \verb|next| token lists, treating them correctly depending on their -% number of arguments, and depending if the code being added should +% number of arguments, and depending on whether the code being added should % have parameter tokens understood as parameters, or doubled to be % stored as parameter tokens. % \changes{v1.1a}{2023/04/06}