summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/titlesec
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-10-17 19:21:51 +0000
committerKarl Berry <karl@freefriends.org>2023-10-17 19:21:51 +0000
commit7544c4fe8858c4a35e29193e093ad5b134517ae6 (patch)
tree624d8dfb9000d52366fe81cadfbf7f8f1ddca9d8 /Master/texmf-dist/tex/latex/titlesec
parent31b6c76cb2f1434be1ed80083c97fd354d4309e5 (diff)
titlesec (17oct23)
git-svn-id: svn://tug.org/texlive/trunk@68573 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/titlesec')
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/titleps.sty6
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/titlesec.sty146
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/titletoc.sty4
3 files changed, 74 insertions, 82 deletions
diff --git a/Master/texmf-dist/tex/latex/titlesec/titleps.sty b/Master/texmf-dist/tex/latex/titlesec/titleps.sty
index a5d995f265d..cd155f0614b 100644
--- a/Master/texmf-dist/tex/latex/titlesec/titleps.sty
+++ b/Master/texmf-dist/tex/latex/titlesec/titleps.sty
@@ -1,5 +1,5 @@
%
-% Copyright (C) 1998-2021 Javier Bezos http://www.texnia.com
+% Copyright (C) 1998-2023 Javier Bezos http://www.texnia.com
%
% This file may be distributed and/or modified under the conditions of
% the MIT License. A version can be found at the end of this file.
@@ -13,7 +13,7 @@
\ifx\ttl@coreps\@empty\else % START code for package
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{titleps}[2021/07/05 v2.14 Page styles]
+\ProvidesPackage{titleps}[2023/10/17 v2.15 Page styles]
% This package is mainly a wrapper for the pagestyle macros provided
% by titlesec, so that they can be used without it. Functionality is
@@ -67,7 +67,7 @@
% premark/gobble, sect-name, opt, title
\def\ttl@presec@x#1#2[#3]#4{%
#1{#2}{#3}%
- \@nameuse{ttl@s@#2}[#3]{#4}}
+ \@nameuse{ttl@s@#2}[{#3}]{#4}}
\def\ttl@presec@s#1#2{%
\gdef\ttl@savemark{\@nameuse{#1mark}{#2}}%
diff --git a/Master/texmf-dist/tex/latex/titlesec/titlesec.sty b/Master/texmf-dist/tex/latex/titlesec/titlesec.sty
index f4aa050b799..e40079b9fff 100644
--- a/Master/texmf-dist/tex/latex/titlesec/titlesec.sty
+++ b/Master/texmf-dist/tex/latex/titlesec/titlesec.sty
@@ -1,5 +1,5 @@
%
-% Copyright (C) 1998-2021 Javier Bezos http://www.texnia.com
+% Copyright (C) 1998-2023 Javier Bezos http://www.texnia.com
%
% This file may be distributed and/or modified under the conditions of
% the MIT License. A version can be found at the end of this file.
@@ -34,7 +34,7 @@
% ~~~~~~~
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{titlesec}[2021/07/05 v2.14 Sectioning titles]
+\ProvidesPackage{titlesec}[2023/10/17 v2.15 Sectioning titles]
% Initialization
% ~~~~~~~~~~~~~~
@@ -283,7 +283,7 @@
\@namedef{markright }##1{\protect\ttl@gmk{\markright{##1}}}%
\fi
\def\@mkboth##1##2{\protect\ttl@gmk{\protect\@mkboth{##1}{##2}}}%
- \def\footnote{\@ifnextchar[%
+ \protected\def\footnote{\@ifnextchar[%
{\ttl@savefn\z@}{\ttl@savefn\@ne[]}}%
\edef\ttl@key@numberless{\ifttl@label//\else/*\fi}%
\def\ttl@b{ttlf@#1}%
@@ -412,8 +412,17 @@
% is empty if the star version is used. In this case
% neither the toc nor the marks are written.
+\def\ttl@sanitizedlabel#1\@@\@@{%
+ \in@{\label}{#1}%
+ \ifin@
+ \ttl@sanitizedlabel@i#1\@@\@@
+ \expandafter\ttl@sanitizedlabel\@currentlabelname\@@\@@
+ \fi}
+\def\ttl@sanitizedlabel@i#1\label#2#3\@@\@@{%
+ \def\@currentlabelname{#1#3}}
+
\def\ttl@straight@i#1[#2]#3{%
- \def\@currentlabelname{#2}% for nameref
+ \ttl@sanitizedlabel#2\@@\@@
\gdef\ttl@savemark{\csname#1mark\endcsname{#3}}%
\let\ttl@savewrite\@empty
\def\ttl@savetitle{#3}%
@@ -727,8 +736,7 @@
% Styles
% ~~~~~~
-
-% 1:global 2:label 3:sep 4:style 5:after 6:left 7:right 8:title
+%
% \ttl@<shape> and \ttlh@<shape> take the following eight
% arguments:
% {format}{label}{sep}{before}{after}{left}{right}{title}
@@ -1524,28 +1532,21 @@
\newcommand\titlelabel[1]{%
\def\@seccntformat##1{#1}}
-\expandafter\ifx\csname chapter\endcsname\relax
-
- \def\ttl@compatpart{\titleclass{\part}{part}\relax}
-
-\else
-
- \def\ttl@compatchapter{%
- \def\@makechapterhead{%
- \ttl@labeltrue
- \if@mainmatter\else\ttl@labelfalse\fi
- \ifnum\ttll@chapter>\c@secnumdepth\ttl@labelfalse\fi
- \ttl@startargs\ttl@mkchap{chapter}}%
- \def\@makeschapterhead{%
- \ttl@labelfalse
- \if@mainmatter\else\ttl@labelfalse\fi
- \ifnum\ttll@chapter>\c@secnumdepth\ttl@labelfalse\fi
- \ttl@startargs\ttl@mkchap{chapter}}}
-
- \def\ttl@compatpart{\titleclass{\part}{page}\relax}
-
-\fi
-
+\@ifundefined{chapter}%
+ {\def\ttl@compatpart{\titleclass{\part}{part}\relax}}%
+ {\def\ttl@compatchapter{%
+ \def\@makechapterhead{%
+ \ttl@labeltrue
+ \if@mainmatter\else\ttl@labelfalse\fi
+ \ifnum\ttll@chapter>\c@secnumdepth\ttl@labelfalse\fi
+ \ttl@startargs\ttl@mkchap{chapter}}%
+ \def\@makeschapterhead{%
+ \ttl@labelfalse
+ \if@mainmatter\else\ttl@labelfalse\fi
+ \ifnum\ttll@chapter>\c@secnumdepth\ttl@labelfalse\fi
+ \ttl@startargs\ttl@mkchap{chapter}}}%
+ \def\ttl@compatpart{\titleclass{\part}{page}\relax}}
+
\def\ttl@@extract#1\@startsection#2#3#4#5#6#7#8{%
\@tempskipa=#5
\@tempskipb=#6
@@ -1627,11 +1628,12 @@
\if@tempswa
- \expandafter\ifx\csname chapter\endcsname\relax\else
- \titleformat\chapter[display]%
- {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
- {\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
- \fi
+ \@ifundefined{chapter}{}%
+ {\titleformat\chapter[display]%
+ {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}%
+ {\@chapapp\space\thechapter}%
+ {.8\baselineskip}%
+ {\ttl@sizes\z@\ttl@passexplicit}}
\fi
@@ -1646,52 +1648,42 @@
\def\ttl@toplevel{part}
-\expandafter\ifx\csname chapter\endcsname\relax
-
- \@namedef{ttll@part}{0}
- \titleclass{\section}{straight}[\part]
-
- \titlespacing*{\part}
- {\z@}
- {4ex}
- {3ex}
-
-\else
-
- \let\ttl@save@mkchap\@makechapterhead
- \let\ttl@save@mkschap\@makeschapterhead
-
- \def\@makechapterhead#1{%
- \gdef\ttl@savemark{\chaptermark{#1}}%
- \ttl@save@mkchap{#1}%
- \@ifundefined{ttl@ps@chapter}{}%
- {\thispagestyle{\@nameuse{ttl@ps@chapter}}}}
-
- \def\@makeschapterhead#1{%
- \gdef\ttl@savemark{\chaptermark{#1}}%
- \ttl@save@mkschap{#1}%
- \@ifundefined{ttl@ps@chapter}{}%
- {\thispagestyle{\@nameuse{ttl@ps@chapter}}}}
-
- \@namedef{ttll@part}{-1}
- \@namedef{ttlss@part}{chapter}
- \@namedef{ttll@chapter}{0}
- \titleclass{\section}{straight}[\chapter]
-
+\@ifundefined{chapter}%
+ {\@namedef{ttll@part}{0}%
+ \titleclass{\section}{straight}[\part]%
+ \titlespacing*{\part}%
+ {\z@}%
+ {4ex}%
+ {3ex}}%
+ {\let\ttl@save@mkchap\@makechapterhead
+ \let\ttl@save@mkschap\@makeschapterhead
+ %
+ \def\@makechapterhead#1{%
+ \gdef\ttl@savemark{\chaptermark{#1}}%
+ \ttl@save@mkchap{#1}%
+ \@ifundefined{ttl@ps@chapter}{}%
+ {\thispagestyle{\@nameuse{ttl@ps@chapter}}}}%
+ %
+ \def\@makeschapterhead#1{%
+ \gdef\ttl@savemark{\chaptermark{#1}}%
+ \ttl@save@mkschap{#1}%
+ \@ifundefined{ttl@ps@chapter}{}%
+ {\thispagestyle{\@nameuse{ttl@ps@chapter}}}}%
+ %
+ \@namedef{ttll@part}{-1}%
+ \@namedef{ttlss@part}{chapter}%
+ \@namedef{ttll@chapter}{0}%
+ \titleclass{\section}{straight}[\chapter]%
% The following is unoperant, unless when \chapter / \part
% format is redefined
-
- \titlespacing*{\part}
- {\z@}
- {\z@\@plus1fil}
- {\z@\@plus1fil}
-
- \titlespacing*\chapter
- {\z@}%
- {50\p@}%
- {\ttl@chapafter}%
-
-\fi
+ \titlespacing*{\part}%
+ {\z@}%
+ {\z@\@plus1fil}%
+ {\z@\@plus1fil}%
+ \titlespacing*\chapter
+ {\z@}%
+ {50\p@}%
+ {\ttl@chapafter}}
\titleclass{\subsection} {straight}[\section]
\titleclass{\subsubsection}{straight}[\subsection]
diff --git a/Master/texmf-dist/tex/latex/titlesec/titletoc.sty b/Master/texmf-dist/tex/latex/titlesec/titletoc.sty
index 99164ae1d79..efe2d68ef1f 100644
--- a/Master/texmf-dist/tex/latex/titlesec/titletoc.sty
+++ b/Master/texmf-dist/tex/latex/titlesec/titletoc.sty
@@ -1,5 +1,5 @@
%
-% Copyright (C) 1998-2021 Javier Bezos http://www.texnia.com
+% Copyright (C) 1998-2023 Javier Bezos http://www.texnia.com
%
% This file may be distributed and/or modified under the conditions of
% the MIT License. A version can be found at the end of this file.
@@ -7,7 +7,7 @@
% Repository: https://github.com/jbezos/titlesec
%
-\ProvidesPackage{titletoc}[2021/07/05 v2.14 TOC entries]
+\ProvidesPackage{titletoc}[2023/10/17 v2.15 TOC entries]
% The following tags are used:
% ttl@ : the generic one, shared with titlesec