Skip to content

Commit

Permalink
extra docu on \RemoveFromHook
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankMittelbach committed Oct 29, 2024
1 parent e38a28f commit eab51b6
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions base/lthooks.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,17 @@
% Removes any code labeled by \meta{label} from the \meta{hook}.
% When the optional argument \meta{label} is not provided, the
% \meta{default label} is used (see section~\ref{sec:default-label}).
% \end{function}
%
% If there is no code under the \meta{label} in the \meta{hook},
% or if the \meta{hook} does not exist, a warning is issued when
% you attempt to \cs{RemoveFromHook}, and the command is ignored.
% \cs{RemoveFromHook} should be used only when you know exactly what
% \cs{RemoveFromHook}\marginpar{\raggedleft\rightskip5pt\itshape
% \textbf{Important:}\break The \cs{RemoveFromHook} command should be
% only used if one has full control over the code chunk to be removed.
% In particular it should not be used to remove code chunks from other
% packages! For this the \texttt{voids} relation is provided.}
% should be used only when you know exactly what
% labels are in a hook. Typically this will be when some code gets added to a hook
% by a package, then later this code is removed by that same package.
% If you want to prevent the execution of code from another
Expand All @@ -423,16 +429,15 @@
% The \meta{hook} and \meta{label} can be specified using the
% dot-syntax to denote the current package name.
% See section~\ref{sec:default-label}.
% \end{function}
%
% \medskip
%
% In contrast to the \texttt{voids} relationship between two labels
% In contrast to the \texttt {voids} relationship between two labels
% in a \cs{DeclareHookRule} this is a destructive operation as the
% labeled code is removed from the hook data structure, whereas the
% relationship setting can be undone by providing a different
% relationship later.
%
% \medskip
%
% A useful application for this declaration inside the document body
% is when one wants to temporarily add code to hooks and later remove
% it again, e.g.,
Expand Down Expand Up @@ -538,7 +543,6 @@
%
%
%
%
% \subsubsection{Hook names and default labels}
% \label{sec:default-label}
%
Expand Down

0 comments on commit eab51b6

Please sign in to comment.