[latex3-commits] [git/LaTeX3-latex3-latex3] gh257: Use the titletoc package for partial tocs in the separate issues (f931816ef)

Johannes Braams texniek at braams.xs4all.nl
Mon Apr 13 19:08:13 CEST 2020


Repository : https://github.com/latex3/latex3
On branch  : gh257
Link       : https://github.com/latex3/latex3/commit/f931816ef2cdca23941e66cde47ecb7111a91d5b

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

commit f931816ef2cdca23941e66cde47ecb7111a91d5b
Author: Johannes Braams <texniek at braams.xs4all.nl>
Date:   Mon Apr 13 19:08:13 2020 +0200

    Use the titletoc package for partial tocs in the separate issues


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

f931816ef2cdca23941e66cde47ecb7111a91d5b
 l3kernel/doc/l3news.tex | 19 ++++++++-----------
 support/texlive.sh      |  1 +
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/l3kernel/doc/l3news.tex b/l3kernel/doc/l3news.tex
index 8b12177a1..668f17fe4 100644
--- a/l3kernel/doc/l3news.tex
+++ b/l3kernel/doc/l3news.tex
@@ -21,6 +21,7 @@
 \usepackage{tikz}
 \usepackage{underscore}
 \usepackage{xparse}
+\usepackage{titletoc}
 \usepackage{hyperref}
 \hypersetup{colorlinks}
 \usepackage{bookmark}
@@ -34,6 +35,7 @@
   }
 
 \makeatletter
+\def\ttl at gobblecontents#1#2#3#4{\ignorespaces}
 \newcounter{issue}
 \renewcommand*{\theissue}{%
   \ifnum\value{issue}<10 0\fi
@@ -91,6 +93,7 @@
 
 \makefirsttitle
 \pdfbookmark[0]{\contentsname}{toc}
+\setcounter{tocdepth}{2}
 \tableofcontents
 \clearpage
 
@@ -108,6 +111,7 @@
   \let\org at twocolumn\twocolumn
   \renewenvironment{document}{%
     \clearpage
+    \let\ltn at tocend\relax
     \ifnum\@issue=20 %
       \addtocontents{toc}{\protect\setcounter{tocdepth}{5}}%
       \addtocontents{toc}{%
@@ -126,19 +130,11 @@
       }%
       \def\toclevel at subsection{1}%
       \def\toclevel at subsubsection{2}%
-      \addtocontents{toc}{\protect\setcounter{tocdepth}{4}}%
       \renewcommand*{\tableofcontents}{%
         \section*{\contentsname}%
-        \@starttoc{toc\theissue}%
-      }%
-      \let\saved at addtocontents\addtocontents
-      \renewcommand*{\addtocontents}[2]{%
-        \saved at addtocontents{##1}{##2}%
-        \def\temp at toc{toc}%
-        \def\temp at param{##1}%
-        \ifx\temp at toc\temp at param
-          \saved at addtocontents{toc\theissue}{##2}%
-        \fi
+        \startcontents[Issue\theissue]%
+        \printcontents[Issue\theissue]{}{1}[3]{}%
+        \gdef\ltn at tocend{\stopcontents[Issue\theissue]}%
       }%
       \let\l at subsubsection\l at subsection
       \let\l at subsection\l at section
@@ -161,6 +157,7 @@
       \endgroup
     }%
   }{%
+    \ltn at tocend
     \clearpage
   }%
   \def\MakeOuterQuote#1{%
diff --git a/support/texlive.sh b/support/texlive.sh
index da6bf24a5..119ed387c 100644
--- a/support/texlive.sh
+++ b/support/texlive.sh
@@ -105,6 +105,7 @@ tlmgr install \
   refcount    \
   rerunfilecheck \
   times       \
+  titlesec    \
   underscore  \
   uniquecounter
 





More information about the latex3-commits mailing list.