[latex3-commits] [latex3/latex2e] develop: revert to two arguments for \l at XXX (db8b6d8b)

github at latex-project.org github at latex-project.org
Wed Jun 7 23:17:18 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/db8b6d8bd0df4e7bad7a6c57029dd523fc7e58a6

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

commit db8b6d8bd0df4e7bad7a6c57029dd523fc7e58a6
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu May 25 09:45:21 2023 +0200

    revert to two arguments for \l at XXX


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

db8b6d8bd0df4e7bad7a6c57029dd523fc7e58a6
 .../latex-lab/latex-lab-toc-kernel-changes.dtx     | 98 ++++++++++++++--------
 1 file changed, 61 insertions(+), 37 deletions(-)

diff --git a/required/latex-lab/latex-lab-toc-kernel-changes.dtx b/required/latex-lab/latex-lab-toc-kernel-changes.dtx
index d9e1ed84..d082f2bd 100644
--- a/required/latex-lab/latex-lab-toc-kernel-changes.dtx
+++ b/required/latex-lab/latex-lab-toc-kernel-changes.dtx
@@ -167,8 +167,8 @@
 \def\contentsline#1#2#3#4%
   {%
     \@contentsline at cfgpoint@before{#1}{#2}{#3}{#4}%
-    %\gdef\@contentsline at destination{#4}%
-    \csname l@#1\endcsname{#2}{#3}{#4}%
+    \gdef\@contentsline at destination{#4}%
+    \csname l@#1\endcsname{#2}{#3}%
     \@contentsline at cfgpoint@after{#1}{#2}{#3}{#4}%
   }
 %    \end{macrocode}
@@ -246,7 +246,7 @@
 %    \begin{macrocode}
 \def\@dottedtocline at cfgpoint@leaders#1{#1}
 
-\def\@dottedtocline#1#2#3#4#5#6{%
+\def\@dottedtocline#1#2#3#4#5{%
   \ifnum #1>\c at tocdepth \else
     \vskip \z@ \@plus.2\p@
     {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
@@ -255,9 +255,9 @@
      \leavevmode
      \@tempdima #3\relax
      \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
-     \UseHookWithArguments{contentsline/text/before}{4}{#1}{#4}{#5}{#6}%
+     \UseHookWithArguments{contentsline/text/before}{4}{#1}{#4}{#5}{\@contentsline at destination}%
      \csname contentsline at text@#1 at format\endcsname{#4}%
-     \UseHookWithArguments{contentsline/text/after}{4}{#1}{#4}{#5}{#6}%
+     \UseHookWithArguments{contentsline/text/after}{4}{#1}{#4}{#5}{\@contentsline at destination}%
      \nobreak
      \@dottedtocline at cfgpoint@leaders{%
        \leaders\hbox{$\m at th
@@ -265,9 +265,9 @@
           mu$}\hfill}%
      \nobreak
      \hb at xt@\@pnumwidth{\hfil\normalfont \normalcolor
-     \UseHookWithArguments{contentsline/page/before}{4}{#1}{#4}{#5}{#6}%
+     \UseHookWithArguments{contentsline/page/before}{4}{#1}{#4}{#5}{\@contentsline at destination}%
      #5%
-     \UseHookWithArguments{contentsline/page/after}{4}{#1}{#4}{#5}{#6}%
+     \UseHookWithArguments{contentsline/page/after}{4}{#1}{#4}{#5}{\@contentsline at destination}%
                         \kern-\p@\kern\p@}%
      \par}%
   \fi}
@@ -292,7 +292,7 @@
 %    \begin{macrocode}
 \AddToHook{class/article/after}
  {
-  \renewcommand*\l at part[3]{% as in contentsline: content, page, target
+  \renewcommand*\l at part[2]{% as in contentsline: content, page
   \ifnum \c at tocdepth >-2\relax
     \addpenalty\@secpenalty
     \addvspace{2.25em \@plus\p@}%
@@ -302,19 +302,23 @@
       \parfillskip -\@pnumwidth
       {\leavevmode
        \large \bfseries
-       \UseHookWithArguments{contentsline/text/before}{4}{\toclevel at part}{#1}{#2}{#3}%
+       \UseHookWithArguments{contentsline/text/before}{4}
+         {\toclevel at part}{#1}{#2}{\@contentsline at destination}%
        \csname contentsline at text@-1 at format\endcsname{#1}%
-       \UseHookWithArguments{contentsline/text/after}{4}{\toclevel at part}{#1}{#2}{#3}%
+       \UseHookWithArguments{contentsline/text/after}{4}
+         {\toclevel at part}{#1}{#2}{\@contentsline at destination}%
        \hfil
        \hb at xt@\@pnumwidth{\hss
-       \UseHookWithArguments{contentsline/page/before}{4}{\toclevel at part}{#1}{#2}{#3}%
+       \UseHookWithArguments{contentsline/page/before}{4}
+         {\toclevel at part}{#1}{#2}{\@contentsline at destination}%
        #2%
-       \UseHookWithArguments{contentsline/page/after}{4}{\toclevel at part}{#1}{#2}{#3}%
+       \UseHookWithArguments{contentsline/page/after}{4}
+         {\toclevel at part}{#1}{#2}{\@contentsline at destination}%
                           \kern-\p@\kern\p@}}\par
        \nobreak
     \endgroup
   \fi}
-\renewcommand*\l at section[3]{%
+\renewcommand*\l at section[2]{%
   \ifnum \c at tocdepth >\z@
     \addpenalty\@secpenalty
     \addvspace{1.0em \@plus\p@}%
@@ -325,21 +329,25 @@
       \leavevmode \bfseries
       \advance\leftskip\@tempdima
       \hskip -\leftskip
-       \UseHookWithArguments{contentsline/text/before}{4}{\toclevel at section}{#1}{#2}{#3}%
+       \UseHookWithArguments{contentsline/text/before}{4}
+        {\toclevel at section}{#1}{#2}{\@contentsline at destination}%
        \csname contentsline at text@1 at format\endcsname{#1}%
-       \UseHookWithArguments{contentsline/text/after}{4}{\toclevel at section}{#1}{#2}{#3}%
+       \UseHookWithArguments{contentsline/text/after}{4}
+        {\toclevel at section}{#1}{#2}{\@contentsline at destination}%
        \nobreak\hfil
       \nobreak\hb at xt@\@pnumwidth{\hss
-      \UseHookWithArguments{contentsline/page/before}{4}{\toclevel at section}{#1}{#2}{#3}%
+      \UseHookWithArguments{contentsline/page/before}{4}
+        {\toclevel at section}{#1}{#2}{\@contentsline at destination}%
        #2%
-      \UseHookWithArguments{contentsline/page/after}{4}{\toclevel at section}{#1}{#2}{#3}%
+      \UseHookWithArguments{contentsline/page/after}{4}
+        {\toclevel at section}{#1}{#2}{\@contentsline at destination}%
       \kern-\p@\kern\p@}\par
     \endgroup
   \fi}
  }
 \AddToHook{class/report/after}
  {
-    \renewcommand*\l at part[3]{%
+    \renewcommand*\l at part[2]{%
      \ifnum \c at tocdepth >-2\relax
        \addpenalty{-\@highpenalty}%
        \addvspace{2.25em \@plus\p@}%
@@ -349,19 +357,23 @@
          \parfillskip -\@pnumwidth
          {\leavevmode
           \large \bfseries
-          \UseHookWithArguments{contentsline/text/before}{4}{\toclevel at part}{#1}{#2}{#3}%
+          \UseHookWithArguments{contentsline/text/before}{4}
+            {\toclevel at part}{#1}{#2}{\@contentsline at destination}%
           \csname contentsline at text@-1 at format\endcsname{#1}%
-          \UseHookWithArguments{contentsline/text/after}{4}{\toclevel at part}{#1}{#2}{#3}%
+          \UseHookWithArguments{contentsline/text/after}{4}
+            {\toclevel at part}{#1}{#2}{\@contentsline at destination}%
           \hfil
           \hb at xt@\@pnumwidth{\hss          
-          \UseHookWithArguments{contentsline/page/before}{4}{\toclevel at part}{#1}{#2}{#3}%
+          \UseHookWithArguments{contentsline/page/before}{4}
+            {\toclevel at part}{#1}{#2}{\@contentsline at destination}%
           #2%
-          \UseHookWithArguments{contentsline/page/after}{4}{\toclevel at part}{#1}{#2}{#3}%
+          \UseHookWithArguments{contentsline/page/after}{4}
+            {\toclevel at part}{#1}{#2}{\@contentsline at destination}%
                              \kern-\p@\kern\p@}}\par
           \nobreak
        \endgroup
      \fi}
-   \renewcommand*\l at chapter[3]{%
+   \renewcommand*\l at chapter[2]{%
      \ifnum \c at tocdepth >\m at ne
        \addpenalty{-\@highpenalty}%
        \vskip 1.0em \@plus\p@
@@ -372,15 +384,19 @@
          \leavevmode \bfseries
          \advance\leftskip\@tempdima
          \hskip -\leftskip
-         \UseHookWithArguments{contentsline/text/before}{4}{\toclevel at chapter}{#1}{#2}{#3}%
+         \UseHookWithArguments{contentsline/text/before}{4}
+           {\toclevel at chapter}{#1}{#2}{\@contentsline at destination}%
          \csname contentsline at text@0 at format\endcsname
            {#1}%
-         \UseHookWithArguments{contentsline/text/after}{4}{\toclevel at chapter}{#1}{#2}{#3}%
+         \UseHookWithArguments{contentsline/text/after}{4}
+           {\toclevel at chapter}{#1}{#2}{\@contentsline at destination}%
           \nobreak\hfil
          \nobreak\hb at xt@\@pnumwidth{\hss
-          \UseHookWithArguments{contentsline/page/before}{4}{\toclevel at chapter}{#1}{#2}{#3}%%
+          \UseHookWithArguments{contentsline/page/before}{4}
+            {\toclevel at chapter}{#1}{#2}{\@contentsline at destination}%%
           #2%
-          \UseHookWithArguments{contentsline/page/after}{4}{\toclevel at chapter}{#1}{#2}{#3}%%
+          \UseHookWithArguments{contentsline/page/after}{4}
+            {\toclevel at chapter}{#1}{#2}{\@contentsline at destination}%%
                                     \kern-\p@\kern\p@}\par
          \penalty\@highpenalty
        \endgroup
@@ -388,7 +404,7 @@
  }
 \AddToHook{class/book/after}
  {
-    \renewcommand*\l at part[3]{%
+    \renewcommand*\l at part[2]{%
      \ifnum \c at tocdepth >-2\relax
        \addpenalty{-\@highpenalty}%
        \addvspace{2.25em \@plus\p@}%
@@ -398,19 +414,23 @@
          \parfillskip -\@pnumwidth
          {\leavevmode
           \large \bfseries
-          \UseHookWithArguments{contentsline/text/before}{4}{\toclevel at part}{#1}{#2}{#3}%%
+          \UseHookWithArguments{contentsline/text/before}{4}
+            {\toclevel at part}{#1}{#2}{\@contentsline at destination}%%
           \csname contentsline at text@-1 at format\endcsname{#1}%
-          \UseHookWithArguments{contentsline/text/after}{4}{\toclevel at part}{#1}{#2}{#3}%%
+          \UseHookWithArguments{contentsline/text/after}{4}
+            {\toclevel at part}{#1}{#2}{\@contentsline at destination}%%
           \hfil
           \hb at xt@\@pnumwidth{\hss
-          \UseHookWithArguments{contentsline/page/before}{4}{\toclevel at part}{#1}{#2}{#3}%%
+          \UseHookWithArguments{contentsline/page/before}{4}
+            {\toclevel at part}{#1}{#2}{\@contentsline at destination}%%
           #2%
-          \UseHookWithArguments{contentsline/page/after}{4}{\toclevel at part}{#1}{#2}{#3}%%
+          \UseHookWithArguments{contentsline/page/after}{4}
+            {\toclevel at part}{#1}{#2}{\@contentsline at destination}%%
                              \kern-\p@\kern\p@}}\par
           \nobreak
        \endgroup
      \fi}
-   \renewcommand*\l at chapter[3]{%
+   \renewcommand*\l at chapter[2]{%
      \ifnum \c at tocdepth >\m at ne
        \addpenalty{-\@highpenalty}%
        \vskip 1.0em \@plus\p@
@@ -421,15 +441,19 @@
          \leavevmode \bfseries
          \advance\leftskip\@tempdima
          \hskip -\leftskip
-         \UseHookWithArguments{contentsline/text/before}{4}{\toclevel at chapter}{#1}{#2}{#3}%
+         \UseHookWithArguments{contentsline/text/before}{4}
+          {\toclevel at chapter}{#1}{#2}{\@contentsline at destination}%
          \csname contentsline at text@0 at format\endcsname
            {#1}%
-         \UseHookWithArguments{contentsline/text/after}{4}{\toclevel at chapter}{#1}{#2}{#3}%
+         \UseHookWithArguments{contentsline/text/after}{4}
+          {\toclevel at chapter}{#1}{#2}{\@contentsline at destination}%
           \nobreak\hfil
          \nobreak\hb at xt@\@pnumwidth{\hss
-          \UseHookWithArguments{contentsline/page/before}{4}{\toclevel at chapter}{#1}{#2}{#3}%
+          \UseHookWithArguments{contentsline/page/before}{4}
+           {\toclevel at chapter}{#1}{#2}{\@contentsline at destination}%
           #2%
-          \UseHookWithArguments{contentsline/page/after}{4}{\toclevel at chapter}{#1}{#2}{#3}%
+          \UseHookWithArguments{contentsline/page/after}{4}
+           {\toclevel at chapter}{#1}{#2}{\@contentsline at destination}%
                                     \kern-\p@\kern\p@}\par
          \penalty\@highpenalty
        \endgroup





More information about the latex3-commits mailing list.