[latex3-commits] [latex3/latex2e] UF-latexlab-toc: move toc tagging socket to lttagging (a584be9e9)
github at latex-project.org
github at latex-project.org
Sun Jul 14 12:13:29 CEST 2024
Repository : https://github.com/latex3/latex2e
On branch : UF-latexlab-toc
Link : https://github.com/latex3/latex2e/commit/a584be9e9f9587568d580dc8abcdb75d8b1cd2dd
>---------------------------------------------------------------
commit a584be9e9f9587568d580dc8abcdb75d8b1cd2dd
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Jul 14 12:13:29 2024 +0200
move toc tagging socket to lttagging
>---------------------------------------------------------------
a584be9e9f9587568d580dc8abcdb75d8b1cd2dd
base/changes.txt | 3 ++
base/lttagging.dtx | 36 ++++++++++++++++++++--
.../latex-lab/latex-lab-toc-kernel-changes.dtx | 32 +++++++++++++++----
3 files changed, 63 insertions(+), 8 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index a82ab8498..5d822aa59 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,9 @@ to completeness or accuracy and it contains some references to files that are
not part of the distribution.
================================================================================
+2024-07-13 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * lttagging.dtx: (subsection{Tagging sockets}): toc-related tagging sockets added.
+
2024-07-13 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* lttagging.dtx (subsection{Tagging support for table/tabular packages}):
diff --git a/base/lttagging.dtx b/base/lttagging.dtx
index 3595e2326..5d6e3efee 100644
--- a/base/lttagging.dtx
+++ b/base/lttagging.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{lttagging.dtx}
- [2024/07/13 v1.0c LaTeX Kernel (tagging support)]
+ [2024/07/14 v1.0d LaTeX Kernel (tagging support)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{lttagging.dtx}
@@ -219,10 +219,42 @@
%
% \end{macro}
%
+% \subsection{Tagging sockets}
+% This collects tagging sockets that should be generally available
+% so that they can also be used even if the tagging code is not loaded.
%
+% \subsubsection{Tagging sockets for toc}
+
+% \begin{socketdecl}{tagsupport/toc/contentsline/before,
+% tagsupport/toc/contentsline/after}
+% Tagging sockets at the begin and end of contentsline.
+% They receive \emph{all} contentsline arguments as one argument
+% in four brace groups. The socket code should then use the parts it needs.
+% \begin{macrocode}
+\NewSocket{tagsupport/toc/contentsline/before}{1}
+\NewSocket{tagsupport/toc/contentsline/after}{1}
+% \end{macrocode}
+% \end{socketdecl}
%
+% \begin{socketdecl}{tagsupport/toc/starttoc/before,
+% tagsupport/toc/starttoc/after}
+% Tagging sockets for the begin and end of start of \cs{@starttoc}.
+% They take one argument, the extension.
+% \begin{macrocode}
+\NewSocket{tagsupport/toc/starttoc/before}{1}
+\NewSocket{tagsupport/toc/starttoc/after}{1}
+% \end{macrocode}
+% \end{socketdecl}
%
-%
+% \begin{socketdecl}{tagsupport/toc/leaders/before,
+% tagsupport/toc/leaders/after}
+% Tagging sockets to make the dot leaders an artifact.
+% They do not take an argument.
+% \begin{macrocode}
+\NewSocket{tagsupport/toc/leaders/before}{0}
+\NewSocket{tagsupport/toc/leaders/after}{0}
+% \end{macrocode}
+% \end{socketdecl}
%
% \subsection{Tagging support for table/tabular packages}
%
diff --git a/required/latex-lab/latex-lab-toc-kernel-changes.dtx b/required/latex-lab/latex-lab-toc-kernel-changes.dtx
index 78c4a80cb..bf10bf4f2 100644
--- a/required/latex-lab/latex-lab-toc-kernel-changes.dtx
+++ b/required/latex-lab/latex-lab-toc-kernel-changes.dtx
@@ -199,9 +199,15 @@
% Tagging sockets at the begin and end of contentsline.
% They receive \emph{all} contentsline arguments as one argument
% in four brace groups. The socket code should then use the parts it needs.
+% The sockets will be in lttagging.dtx, but that may only happen in
+% the next main release, so for now we test if they are in the
+% format and if not define them now.
% \begin{macrocode}
-\NewSocket{tagsupport/toc/contentsline/before}{1}
-\NewSocket{tagsupport/toc/contentsline/after}{1}
+\str_if_exist:cF { l__socket_tagsupport/toc/contentsline/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/contentsline/before}{1}
+ \NewSocket{tagsupport/toc/contentsline/after}{1}
+ }
% \end{macrocode}
% \end{socketdecl}
% for the hooks we need that the \cs{l at XX} pass also the destination and
@@ -242,9 +248,17 @@
% tagsupport/toc/starttoc/after}
% Tagging sockets for the begin and end of start of \cs{@starttoc}.
% They take one argument, the extension.
+% The sockets will be in lttagging.dtx, but that may only happen in
+% the next main release, so for now we test if they are in the
+% format and if not define them now.
+% \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/toc/starttoc/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/starttoc/before}{1}
+ \NewSocket{tagsupport/toc/starttoc/after}{1}
+ }
+% \end{macrocode}
% \begin{macrocode}
-\NewSocket{tagsupport/toc/starttoc/before}{1}
-\NewSocket{tagsupport/toc/starttoc/after}{1}
% \end{macrocode}
% \end{socketdecl}
%
@@ -301,9 +315,15 @@
% tagsupport/toc/leaders/after}
% Tagging sockets to make the dot leaders an artifact.
% They do not take an argument.
+% The sockets will be in lttagging.dtx, but that may only happen in
+% the next main release, so for now we test if they are in the
+% format and if not define them now.
% \begin{macrocode}
-\NewSocket{tagsupport/toc/leaders/before}{0}
-\NewSocket{tagsupport/toc/leaders/after}{0}
+\str_if_exist:cF { l__socket_tagsupport/toc/leaders/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/leaders/before}{0}
+ \NewSocket{tagsupport/toc/leaders/after}{0}
+ }
% \end{macrocode}
% \end{socketdecl}
% The destination is accessed through \cs{@contentsline at destination}.
More information about the latex3-commits
mailing list.