[latex3-commits] [git/LaTeX3-latex3-latex2e] OR-lab: make some more stuff internal and use `@@` notation (e68db0dc)

Frank Mittelbach frank.mittelbach at latex-project.org
Thu Mar 10 11:38:36 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : OR-lab
Link       : https://github.com/latex3/latex2e/commit/e68db0dc2e8f5d1a26aba9e5a2788d8c8dd2f467

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

commit e68db0dc2e8f5d1a26aba9e5a2788d8c8dd2f467
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Thu Mar 10 11:38:36 2022 +0100

    make some more stuff internal and use `@@` notation


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

e68db0dc2e8f5d1a26aba9e5a2788d8c8dd2f467
 required/latex-lab/latex-lab-footnotes.dtx | 173 ++++++++++++++++-------------
 required/latex-lab/update-OR-all.sh        |   2 +
 2 files changed, 96 insertions(+), 79 deletions(-)

diff --git a/required/latex-lab/latex-lab-footnotes.dtx b/required/latex-lab/latex-lab-footnotes.dtx
index 41515c66..9c45916a 100644
--- a/required/latex-lab/latex-lab-footnotes.dtx
+++ b/required/latex-lab/latex-lab-footnotes.dtx
@@ -41,6 +41,7 @@
 % \providecommand\hook[1]{\texttt{#1}}
 %
 % \begin{abstract}
+%   \emph{to be written}
 % \end{abstract}
 %
 % \tableofcontents
@@ -382,7 +383,7 @@
 %
 % \section{Tagging support}
 %
-%
+%  \emph{To be documented}
 %
 %
 %
@@ -392,14 +393,17 @@
 %
 % \section{The Implementation}
 %
+%    All this is very rough and misses a lot of documentation.
+%
 %    \begin{macrocode}
 %<*kernel>
+%<@@=fnote>
 %    \end{macrocode}
 %
 % \subsection{File declaration}
 %    \begin{macrocode}
 \ProvidesFile{latex-lab-footnotes.ltx}
-        [2022-03-08 v0.5a changes to the footnote interfaces]
+        [2022-03-10 v0.6a changes to the footnote interfaces]
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -489,7 +493,7 @@
 \NewHook{fnmark/end}
 
 
-\cs_new:Npn \__fnote_debug_footnotemark: {
+\cs_new:Npn \@@_debug_footnotemark: {
   \bool_if:NT \g_fnote_debug_bool
        {
          \LogHook{fnmark/before}
@@ -497,13 +501,13 @@
          \LogHook{fnmark/begin}
          \LogHook{fnmark/end}
          \LogHook{fnmark/after}
-         \cs_gset_eq:NN \__fnote_debug_footnotemark: \prg_do_nothing:
+         \cs_gset_eq:NN \@@_debug_footnotemark: \prg_do_nothing:
        }
 }
 
 
 \cs_new_protected:Npn \fnote_footnotemark: {
-  \__fnote_debug_footnotemark:
+  \@@_debug_footnotemark:
 %-------
 % bibarts
 % chextras  --- actually in the wrong place does an \unskip
@@ -534,14 +538,14 @@
 %    finishing with \hook{fnmark/after}. However, inf a complete
 %    footnote these actions have to happen only after we have handled
 %    the footnote text (e.g., by placing it into an \cs{insert}. In
-%    such a situation \cs{__fnote_footmark_finish:} below does nothing
+%    such a situation \cs{_@@_footmark_finish:} below does nothing
 %    and the action is carried out later.
 %    \begin{macrocode}
-  \__fnote_footnotemark_finish:
+  \@@_footnotemark_finish:
 }
 
 
-\cs_new:Npn \__fnote_finish: {
+\cs_new:Npn \@@_finish: {
 % hyperref.sty
 % memhfixc.sty  --- could move fnmark/after
 % scrlttr2.cls  --- could vanish if footmisc uses a hook
@@ -558,7 +562,7 @@
 }
 
 
-\cs_new_eq:NN \__fnote_footnotemark_finish: \__fnote_finish:
+\cs_new_eq:NN \@@_footnotemark_finish: \@@_finish:
 
 
   
@@ -586,7 +590,7 @@
 \NewHook{fntext/end}
 
 
-\cs_new:Npn \__fnote_debug_footnotetext: {
+\cs_new:Npn \@@_debug_footnotetext: {
   \bool_if:NT \g_fnote_debug_bool
        {
          \cs_log:N\@footnotetext at cfgpoint
@@ -604,12 +608,12 @@
 %    \end{macrocode}
 %    Show the info only once (if at all).
 %    \begin{macrocode}
-         \cs_gset_eq:NN \__fnote_debug_footnotetext: \prg_do_nothing:
+         \cs_gset_eq:NN \@@_debug_footnotetext: \prg_do_nothing:
        }
   }
 
 \cs_new_protected:Npn \fnote_footnotetext:n #1 {
-  \__fnote_debug_footnotetext:
+  \@@_debug_footnotetext:
 %-------
 % ./linguex/linguex.sty
   \UseHook{fntext/before}
@@ -819,26 +823,28 @@
 %    fails it gives up with an \cs{ERROR} (which needs to get a proper definition).
 %    \begin{macrocode}
 
-\tl_new:N \l__fnote_patch_tl
-\cs_new_protected:Npn \_fnote_patch:
+\tl_new:N \l_@@_patch_tl
+\cs_new_eq:NN \@@_tmp:w \ERROR
+
+\cs_new_protected:Npn \@@_patch:
   {
-    \tl_set:No \l__fnote_patch_tl { \@makefntext { \@makefntext at cfgpointii{##1} } }
-    \tl_if_in:NnTF \l__fnote_patch_tl { \hbox }
-      { \cs_set_eq:NN \_fnote_tmp:w \_fnote_patch_hbox:w }
+    \tl_set:No \l_@@_patch_tl { \@makefntext { \@makefntext at cfgpointii{##1} } }
+    \tl_if_in:NnTF \l_@@_patch_tl { \hbox }
+      { \cs_set_eq:NN \@@_tmp:w \@@_patch_hbox:w }
       {
-        \tl_if_in:NnTF \l__fnote_patch_tl { \hb at xt@ }
-          { \cs_set_eq:NN \_fnote_tmp:w \_fnote_patch_hb at xt@:w }
+        \tl_if_in:NnTF \l_@@_patch_tl { \hb at xt@ }
+          { \cs_set_eq:NN \@@_tmp:w \@@_patch_hb at xt@:w }
           {
-            \tl_if_in:NnTF \l__fnote_patch_tl { \@makefnmark }
-              { \cs_set_eq:NN \_fnote_tmp:w \_fnote_patch_ at makefnmark:w }
+            \tl_if_in:NnTF \l_@@_patch_tl { \@makefnmark }
+              { \cs_set_eq:NN \@@_tmp:w \@@_patch_ at makefnmark:w }
               { \ERROR
-                \cs_set_eq:NN \_fnote_tmp:w \exp_stop_f: }
+                \cs_set_eq:NN \@@_tmp:w \exp_stop_f: }
           }
       }
-    \tl_set:Nf \l__fnote_patch_tl
-      { \exp_after:wN \_fnote_tmp:w \l__fnote_patch_tl }
-    \cs_set:Npn \_fnote_tmp:w { \long \def \@makefntext ####1 }
-    \exp_after:wN \_fnote_tmp:w \exp_after:wN { \l__fnote_patch_tl }
+    \tl_set:Nf \l_@@_patch_tl
+      { \exp_after:wN \@@_tmp:w \l_@@_patch_tl }
+    \cs_set:Npn \@@_tmp:w { \long \def \@makefntext ####1 }
+    \exp_after:wN \@@_tmp:w \exp_after:wN { \l_@@_patch_tl }
   }
 %    \end{macrocode}
 %
@@ -848,14 +854,14 @@
 %   AAA  \@makefntext at processX { \hbox BBB }
 %\end{verbatim}
 %    \begin{macrocode}
-\cs_new:Npn \_fnote_patch_hbox:w #1 \hbox #2 #
+\cs_new:Npn \@@_patch_hbox:w #1 \hbox #2 #
   { \exp_stop_f: #1 \@makefntext at processX { \hbox #2 } }
 %    \end{macrocode}
 %    Same for the other cases.
 %    \begin{macrocode}
-\cs_new:Npn \_fnote_patch_hb at xt@:w #1 \hb at xt@ #2 #
+\cs_new:Npn \@@_patch_hb at xt@:w #1 \hb at xt@ #2 #
   { \exp_stop_f: #1 \@makefntext at processX { \hb at xt@ #2 } }
-\cs_new:Npn \_fnote_patch_ at makefnmark:w #1 \@makefnmark
+\cs_new:Npn \@@_patch_ at makefnmark:w #1 \@makefnmark
   { \exp_stop_f: #1 \@makefntext at processX { \use:n } { \@makefnmark } }
 %    \end{macrocode}
 %
@@ -879,7 +885,7 @@
        \cs_set_eq:NN \@makefntext \fnote_makefntext:n
      }
      {
-       \_fnote_patch:
+       \@@_patch:
      }
 }
 
@@ -887,10 +893,58 @@
 % possibly add the following to check for multiple \hbox in
 % the definition:
 %
-% \seq_set_split:NnV \l__fnote_patch_seq { \hbox } \l__fnote_patch_tl
-% \int_compare:nT { \seq_count:N \l__fnote_patch_seq } > 2 \ERROR
+% \seq_set_split:NnV \l_@@_patch_seq { \hbox } \l_@@_patch_tl
+% \int_compare:nT { \seq_count:N \l_@@_patch_seq } > 2 \ERROR
+%
+%    \end{macrocode}
+%
 %
+%
+%
+% \subsection{Document-level commands}
+%
+%    \begin{macrocode}
+
+\DeclareDocumentCommand\footnotetext {om} {
+  \fnote_set_fnmark:nn {#1} \@mpfn
+  \@footnotetext {#2}
+}
+
+
+%-------------------------------------
+
+
+\DeclareDocumentCommand\footnote {om} {
+  \fnote_step_fnmark:nn {#1} \@mpfn
+  \cs_set_eq:NN \@@_footnotemark_finish: \prg_do_nothing:
+  \@footnotemark
+  \cs_set_eq:NN \@@_footnotemark_finish: \@@_finish:
+  \@footnotetext {#2}
+  \@@_footnotemark_finish:
+}
+
+%-------------------------------------
+
+
+\DeclareDocumentCommand\footnotemark {o} {
+  \fnote_step_fnmark:nn {#1} { footnote }
+  \@footnotemark
+}
+
 
+%-------------------------------------
+
+\DeclareDocumentCommand\footref {m}{%
+  \begingroup
+    \unrestored at protected@xdef\@thefnmark{\ref{#1}}%
+  \endgroup
+  \@footnotemark
+}
+
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
+%<@@=>
 %    \end{macrocode}
 %
 %
@@ -900,7 +954,7 @@
 %
 % \subsection{Firstaid for packages and classes}
 %
-% \subsection{\pkg{setspace}}
+% \subsubsection{\pkg{setspace}}
 %
 %    It should not overwrite it any longer but use a hook, so for now we
 %    do just that here.
@@ -913,7 +967,7 @@
 %
 %
 %
-% \subsection{\pkg{hyperref}}
+% \subsubsection{\pkg{hyperref}}
 %
 %    Prevent hyperref from redefining footnote stuff --- this is a
 %    temp solution.
@@ -927,7 +981,11 @@
 
 
 
-
+%    \end{macrocode}
+%
+% \subsection{Stuff that needs cleanup and documentation}
+%
+%    \begin{macrocode}
 
 
 %-------------------------------------
@@ -948,43 +1006,6 @@
 %-------------------------------------
 
 
-\DeclareDocumentCommand\footnotetext {om} {
-  \fnote_set_fnmark:nn {#1} \@mpfn
-  \@footnotetext {#2}
-}
-
-
-%-------------------------------------
-
-
-\DeclareDocumentCommand\footnote {om} {
-  \fnote_step_fnmark:nn {#1} \@mpfn
-  \cs_set_eq:NN \__fnote_footnotemark_finish: \prg_do_nothing:
-  \@footnotemark
-  \cs_set_eq:NN \__fnote_footnotemark_finish: \__fnote_finish:
-  \@footnotetext {#2}
-  \__fnote_footnotemark_finish:
-}
-
-%-------------------------------------
-
-
-\DeclareDocumentCommand\footnotemark {o} {
-  \fnote_step_fnmark:nn {#1} { footnote }
-  \@footnotemark
-}
-
-
-%-------------------------------------
-
-\DeclareDocumentCommand\footref {m}{%
-  \begingroup
-    \unrestored at protected@xdef\@thefnmark{\ref{#1}}%
-  \endgroup
-  \@footnotemark
-}
-
-
 
 %-------------------------------------
 %  Tagging
@@ -1080,16 +1101,10 @@
     { #1 }
 }
  
-
-
-
-  
 %-------------------------------------
 
 
 \ExplSyntaxOff
-
-
 %</kernel>
 %    \end{macrocode}
 %
@@ -1125,7 +1140,7 @@
 \DeclareRelease{v5}{2011-06-06}{footmisc-2011-06-06.sty}
 \DeclareCurrentRelease{}{2022-02-14}
 \ProvidesPackage{latex-lab-footmisc}%
-        [2022/03/07 v6.0c
+        [2022/03/08 v6.0d
      a miscellany of footnote facilities -- latex-lab version%
                    ]
 
diff --git a/required/latex-lab/update-OR-all.sh b/required/latex-lab/update-OR-all.sh
index 660deea0..cdb52c2d 100644
--- a/required/latex-lab/update-OR-all.sh
+++ b/required/latex-lab/update-OR-all.sh
@@ -49,6 +49,8 @@ l3build save -cconfig-OR \
 
 
 
+# those can only be tested locally
+
 l3build save -cconfig-OR-local \
 	footmisc-local-uafthesis \
 	footmisc-local-uwthesis \





More information about the latex3-commits mailing list.