summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/titlesec/titletoc.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-10 03:00:50 +0000
committerNorbert Preining <norbert@preining.info>2019-09-10 03:00:50 +0000
commita1c3d5afa1daf60d772eb18931e05c5397e7404c (patch)
tree2a4223ec285ae7993f47d69600480c0ded8c9922 /macros/latex/contrib/titlesec/titletoc.sty
parentcb5ec966f1a3e9b26dcd7fc1b13998e03581b8fd (diff)
CTAN sync 201909100300
Diffstat (limited to 'macros/latex/contrib/titlesec/titletoc.sty')
-rw-r--r--macros/latex/contrib/titlesec/titletoc.sty24
1 files changed, 16 insertions, 8 deletions
diff --git a/macros/latex/contrib/titlesec/titletoc.sty b/macros/latex/contrib/titlesec/titletoc.sty
index e54bce0173..ddf9e298c0 100644
--- a/macros/latex/contrib/titlesec/titletoc.sty
+++ b/macros/latex/contrib/titlesec/titletoc.sty
@@ -7,7 +7,7 @@
% Repository: https://github.com/jbezos/titlesec
%
-\ProvidesPackage{titletoc}[2019/07/16 v2.11 TOC entries]
+\ProvidesPackage{titletoc}[2019/09/09 v2.12 TOC entries]
% The following tags are used:
% ttl@ : the generic one, shared with titlesec
@@ -213,9 +213,6 @@
\let\ttl@fixhyperref\relax
\def\ttl@contents@i#1#2[#3]#4#5#6#7{%
- \@ifundefined{ttll@#2}%
- {\expandafter\def\csname ttll@#2\endcsname{-1000}}%
- {}%
\ifcase#1\relax
\def\ttl@fixhyperref{%
\ifx\Hy@tocdestname\@undefined\else
@@ -289,6 +286,18 @@
\def\ttl@lasttoc{-1000} % An inital dummy assignment
+\def\ttl@providettll#1#2{%
+ \@ifundefined{ttll@#1#2}%
+ {\global\expandafter\let\csname ttll@#1#2\expandafter\endcsname
+ \csname ttll@#2\endcsname}%
+ {}%
+ \@ifundefined{ttll@#1#2}%
+ {\PackageWarning{titletoc}%
+ {Unknown TOC type #1#2. I'll set it for you with\MessageBreak
+ level -1000.}%
+ \expandafter\gdef\csname ttll@#1#2\endcsname{-1000}}%
+ {}}
+
% 1 ifblock, 2 sect name, 3 left, 4 before,
% 5 {with}{without}, 6 filler/page, 7 title 8 pageno
@@ -352,6 +361,7 @@
\def\ttl@tocentry#1#2#3#4#5#6#7#8{%
\ttl@fixhyperref
+ \ttl@providettll{}{#2}%
\xdef\ttl@b{\csname ttll@#2\endcsname}%
\ifnum\ttl@b>\c@tocdepth\else
\ifnum\ttl@b<\ttl@toctop\else
@@ -487,7 +497,7 @@
\newcommand\printcontents[3][default]{%
\def\ttl@a{[#1]{toc}{#2}{#3}}%
\ttl@preprint}
-
+
\newcommand\printlist[3][default]{%
\def\ttl@a{[#1]{#2}{#3}{-1001}}%
\ttl@preprint}
@@ -509,9 +519,7 @@
\let\ttl@xcontentsline\contentsline
\let\contentsline\ttl@gobblecontents
\def\ttl@contentsline##1{%
- \@ifundefined{ttll@#3##1}%
- {\expandafter\let\csname ttll@#3##1\expandafter\endcsname
- \csname ttll@##1\endcsname}{}%
+ \ttl@providettll{#3}{##1}%
\@ifundefined{l@#3##1}%
{\ttl@xcontentsline{##1}}%
{\ttl@xcontentsline{#3##1}}}%