Skip to content

Commit

Permalink
Add intro to hook section; anticipate hook component change for file-…
Browse files Browse the repository at this point in the history
…related hooks
  • Loading branch information
FrankMittelbach committed Aug 20, 2021
1 parent 3bac676 commit 9633dda
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions base/doc/ltnews34.tex
Expand Up @@ -147,6 +147,16 @@ \section{???}

\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}}

Expand Down Expand Up @@ -183,10 +193,12 @@ \subsection{Providing \cs{ActivateGenericHook}}
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.

Expand All @@ -212,7 +224,7 @@ \subsection{Class, package, and include hook improvements}
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}
Expand All @@ -222,20 +234,6 @@ \subsection{Class, package, and include hook improvements}
\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
Expand All @@ -259,6 +257,17 @@ \subsection{Changed how \cs{RemoveFromHook} treats code that isn't in the hook}
%
\githubissue{625}




\subsection{???}

%
\githubissue{000}




\section{New or improved commands}


Expand Down

0 comments on commit 9633dda

Please sign in to comment.