Skip to content

Commit

Permalink
edits after review by CAR
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankMittelbach committed Feb 5, 2025
1 parent a23fc18 commit 842778a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion base/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>

Expand Down
34 changes: 17 additions & 17 deletions base/lthooks.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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!
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 842778a

Please sign in to comment.