[latex3-commits] [git/LaTeX3-latex3-latex2e] hook-args: More docs (d5269037)

PhelypeOleinik phelype.oleinik at latex-project.org
Tue Mar 28 05:20:13 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : hook-args
Link       : https://github.com/latex3/latex2e/commit/d526903723d0c6fded77965627be698ef14b9674

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

commit d526903723d0c6fded77965627be698ef14b9674
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Tue Mar 28 00:20:13 2023 -0300

    More docs


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

d526903723d0c6fded77965627be698ef14b9674
 base/lthooks.dtx | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index aff30d76..53e78d65 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -4391,10 +4391,15 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\@@_cs_gput_right:nnn}
+% \begin{macro}{\@@_braced_cs_parameter:n}
 % \begin{macro}{\@@_braced_hidden_loop:w}
-%   Check if the expansion of a control sequence is empty by looking at
-%   its replacement text. \pho{can likely be optimised}
+%   Looks at the \meta{parameter text} of a control sequence, and
+%   returns a run of \enquote{hidden} braced parameters for that macro.
+%   This works as long as the macros take a simple run of zero to nine
+%   arguments.  The parameters are \enquote{hidden} because the
+%   parameter tokens are returned inside \cs{c_@@_hash_tl} instead of
+%   explicitly, so that \cs{@@_double_hashes:n} won't touch these.
+%   \pho{can likely be optimised}
 %    \begin{macrocode}
 \cs_new:Npn \@@_braced_cs_parameter:n #1
   {
@@ -4425,6 +4430,18 @@
     { \exp_not:N \c_@@_hash_tl #2 }
     \@@_braced_hidden_loop:w
   }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_braced_parameter:n}
+% \begin{macro}{\@@_braced_real_loop:w}
+%   This one is used in simpler cases, where no special handling of
+%   hashes is required.  This is used only inside
+%   \cs{@@_initialize_hook_code:n}, so it assumes
+%   \cs[no-index]{c_@@_\meta{hook}_parameter_tl} is defined, but should
+%   work otherwise.
+%    \begin{macrocode}
 \cs_new:Npn \@@_braced_parameter:n #1
   {
     \exp_last_unbraced:Nf \@@_braced_real_loop:w
@@ -4442,6 +4459,7 @@
 % \end{macro}
 % \end{macro}
 %
+%
 %  \subsection{Setting rules for hooks code}
 %
 % \begin{macro}{





More information about the latex3-commits mailing list.