[latex3-commits] [git/LaTeX3-latex3-latex2e] lthooks-doc-updates: Add intro to hook section; anticipate hook component change for file-related hooks (9633dda1)

Frank Mittelbach frank.mittelbach at latex-project.org
Fri Aug 20 11:36:53 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : lthooks-doc-updates
Link       : https://github.com/latex3/latex2e/commit/9633dda16e4c5a6f366d7a08888529d84850221c

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

commit 9633dda16e4c5a6f366d7a08888529d84850221c
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Fri Aug 20 11:36:53 2021 +0200

    Add intro to hook section; anticipate hook component change for file-related hooks


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

9633dda16e4c5a6f366d7a08888529d84850221c
 base/doc/ltnews34.tex | 45 +++++++++++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 18 deletions(-)

diff --git a/base/doc/ltnews34.tex b/base/doc/ltnews34.tex
index 2455b8af..7b8b1ccc 100644
--- a/base/doc/ltnews34.tex
+++ b/base/doc/ltnews34.tex
@@ -147,6 +147,16 @@
 
 \section{Hook business}
 
+After the introduction of the hook management system in the 2020
+release of \LaTeX{}~\cite{34:ltnews32} package developers have started
+to make more and more use of the new functionality. This resulted in a
+number of queries showing that some of the documentation was not
+precise enough and that one or the other clarification was
+needed. This has now been addressed in the documentation. The extended
+usage also showed a small number of deficiencies that we thought
+should be corrected now while the adoption rate is still relatively
+small. These are addressed in this release and documented below.
+
 
 \subsection{Providing \cs{ActivateGenericHook}}
 
@@ -183,10 +193,12 @@ themselves before adding code to it. For example, Babel offers hooks
 such as \texttt{babel/afterextras/\meta{language}} enabling the user
 to add language specific declarations there. They can then write
 \begin{verbatim}
-\ActivateGenericHook{babel/afterextras/ngerman}
-\AddToHook{babel/afterextras/ngerman}{\color{blue}}
+\ActivateGenericHook
+          {babel/afterextras/ngerman}
+\AddToHook{babel/afterextras/ngerman}
+          {\color{blue}}
 \end{verbatim}
-after which all German words would be colored in blue in the text.
+after which all German words would be colored blue in the text.
 
 Note that a generic hook produced in this way is always a normal hook.
 
@@ -212,7 +224,7 @@ Classes, packages and include files can only be loaded once in a
 files have been made one-time hooks. Beside being more efficient this
 supports the following important use case
 \begin{verbatim}
-\AddToHook{package/after/varioref}
+\AddToHook{package/varioref/after}
   { ... apply my customizations if the package
       gets loaded (or was loaded already) ... }
 \end{verbatim}
@@ -222,20 +234,6 @@ before.
 \githubissue{623}
 
 
-
-
-
-\subsection{???}
-
-%
-\githubissue{000}
-
-
-
-
-
-\section{Hook business}
-
 \subsection{Changed how \cs{RemoveFromHook} treats code that isn't in the hook}
 
 In the first version of \cs{RemoveFromHook}, in case the code label
@@ -259,6 +257,17 @@ preferred.
 %
 \githubissue{625}
 
+
+
+
+\subsection{???}
+
+%
+\githubissue{000}
+
+
+
+
 \section{New or improved commands}
 
 





More information about the latex3-commits mailing list.