texlive[68573] Master/texmf-dist: titlesec (17oct23)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 17 21:21:51 CEST 2023


Revision: 68573
          https://tug.org/svn/texlive?view=revision&revision=68573
Author:   karl
Date:     2023-10-17 21:21:51 +0200 (Tue, 17 Oct 2023)
Log Message:
-----------
titlesec (17oct23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/titlesec/README.md
    trunk/Master/texmf-dist/doc/latex/titlesec/titleps.pdf
    trunk/Master/texmf-dist/doc/latex/titlesec/titleps.tex
    trunk/Master/texmf-dist/doc/latex/titlesec/titlesec.pdf
    trunk/Master/texmf-dist/doc/latex/titlesec/titlesec.tex
    trunk/Master/texmf-dist/tex/latex/titlesec/titleps.sty
    trunk/Master/texmf-dist/tex/latex/titlesec/titlesec.sty
    trunk/Master/texmf-dist/tex/latex/titlesec/titletoc.sty

Modified: trunk/Master/texmf-dist/doc/latex/titlesec/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/titlesec/README.md	2023-10-16 23:43:31 UTC (rev 68572)
+++ trunk/Master/texmf-dist/doc/latex/titlesec/README.md	2023-10-17 19:21:51 UTC (rev 68573)
@@ -1,3 +1,5 @@
+2023-10-17
+
 ## Titlesec, Titletoc, Titleps
 
 This directory holds 3 packages for sectioning titles -- when used as
@@ -28,6 +30,10 @@
 ### Latest changes
 
 ```
+2.15  2023-10-17
+      Some fixes: #48, #50, #58, #64, #68 (see the GitHub repository
+      for further info).
+
 2.14  2021-07-05
       A couple of minor changes (for issues #17, #39).
 
@@ -69,3 +75,5 @@
 Please, for suggestions, bug reports, etc., go to
 
    https://github.com/jbezos/titlesec/issues
+   
+   

Modified: trunk/Master/texmf-dist/doc/latex/titlesec/titleps.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/titlesec/titleps.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/titlesec/titleps.tex	2023-10-16 23:43:31 UTC (rev 68572)
+++ trunk/Master/texmf-dist/doc/latex/titlesec/titleps.tex	2023-10-17 19:21:51 UTC (rev 68573)
@@ -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,8 +7,8 @@
 % Repository: https://github.com/jbezos/titlesec
 %
 
-\def\fileversion{2.14}
-\def\docdate{2021/07/05}
+\def\fileversion{2.15}
+\def\docdate{2023/10/17}
 
 \documentclass[a4paper]{ltxguide}
 \usepackage[sf,bf,compact,topmarks,calcwidth,pagestyles]{titlesec}

Modified: trunk/Master/texmf-dist/doc/latex/titlesec/titlesec.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/titlesec/titlesec.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/titlesec/titlesec.tex	2023-10-16 23:43:31 UTC (rev 68572)
+++ trunk/Master/texmf-dist/doc/latex/titlesec/titlesec.tex	2023-10-17 19:21:51 UTC (rev 68573)
@@ -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,8 +7,8 @@
 % Repository: https://github.com/jbezos/titlesec
 %
 
-\def\fileversion{2.14}
-\def\docdate{2021/07/05}
+\def\fileversion{2.15}
+\def\docdate{2023/10/17}
 
 \documentclass[a4paper]{ltxguide}
 \usepackage[sf,bf,compact,topmarks,calcwidth,pagestyles]{titlesec}
@@ -38,7 +38,7 @@
 
 \title{The \textsf{titlesec}, \textsf{titleps} and \textsf{titletoc} 
 Packages\footnote{The \textsf{titlesec} package is currently at 
-version 2.14. \copyright{} 1998--2021 Javier Bezos.}}
+version 2.15. \copyright{} 1998--2023 Javier Bezos.}}
 
 \author{Javier Bezos\footnote{For bug reports, comments and
 suggestions go to \href{http://www.tex-tipografia.com/contact.html}%
@@ -136,16 +136,19 @@
 \end{itemize}
 \textsf{Titlesec} works with the standard classes and with many
 others, including the AMS ones, and it runs smoothly with
-\textsf{hyperref}.\footnote{However, be aware the AMS classes
-reimplement the original internal commands.  These changes will be
-lost here.  The compatibility with \textsf{hyperref} has been tested
-with \textsf{dvips}, \textsf{dvipdfm} and \textsf{pdftex} but it is an
-unsupported feature.  Please, check your version of
-\textsf{hyperref} is compatible with \textsf{titlesec}.}
-Unfortunately, it is not compatible with \textsf{memoir}, which
-provides its own tools with a limited subset of the features available
-in \textsf{titlesec}.
+\textsf{hyperref}.
 
+\begin{warning}
+  Be aware the AMS classes reimplement the original internal commands.
+  These changes will be lost here. The compatibility with
+  \textsf{hyperref} has been tested with \textsf{dvips}, \textsf{dvipdfm}
+  and \textsf{pdftex} but it is an unsupported feature (for example,
+  with |\titleclass| PDF bookmarks are not correctly nested). Please, check
+  your version of \textsf{hyperref} is compatible with
+  \textsf{titlesec}. Unfortunately, it is not compatible with
+  \textsf{memoir} or \textsf{KOMA}, which provide their own tools.
+\end{warning}
+
 As usual, load the package in the standard way with 
 |\usepackage|.  Then, redefine the sectioning commands with the 
 simple, predefined settings (see section ``Quick Reference'') or with 
@@ -170,7 +173,7 @@
 There are three option groups controlling font, size and align.  You 
 need not set all of these groups, since a default is provided for each 
 one; however, you must use at least an option from them if you want
-this ``easy setup.'' 
+this ``easy setup''. 
 \begin{desc}
 |rm sf tt md bf up it sl sc|
 \end{desc}
@@ -238,8 +241,8 @@
 %~~~~~~~~~~~~~~~~~~~~~~~~
 
 Two commands are provided to change the title format.  The first one
-is used for the ``internal'' format, i.~e., shape, font, label\dots,
-the second one defines the ``external'' format, i.~e., spacing before
+is used for the ``internal'' format, i.e., shape, font, label\dots,
+the second one defines the ``external'' format, i.e., spacing before
 and after, indentation, etc.  This scheme is intended to easy
 definitions, since in most of cases you will want to modify either
 spacing or format.\footnote{Information is ``extracted'' from the
@@ -256,7 +259,7 @@
 \subsection{Format}
 
 A set of shapes is provided, which controls the basic distribution of
-elements in a title. The available shapes are:
+elements in the title. The available shapes are:
 \begin{description}
 \item[hang] is the default value, with a hanging label.  (Like the 
 standard |\section|.)
@@ -315,7 +318,7 @@
 
 Here
 \begin{itemize}
-\item |<command>| is the sectioning command to be redefined, i.~e., 
+\item |<command>| is the sectioning command to be redefined, i.e., 
 |\part|,
 |\chapter|, |\section|, |\subsection|, |\subsubsection|, |\paragraph| 
 or |\subparagraph|.
@@ -323,7 +326,7 @@
 \item The paragraph shape is set by |<shape>|, whose possible
 values are those described above.
 
-\item |<format>| is the format to be applied to the whole
+\item |<format>| is the format applied to the whole
 title---label and text.  This part can contain vertical material (and
 horizontal with some shapes) which is typeset just after the space
 above the title.
@@ -340,7 +343,7 @@
 of sectioning commands. If you are using |picture| and the like, set 
 this parameter to 0 pt.
 
-\item |<before-code>| is code preceding the title body. The very last
+\item |<before-code>| is the code preceding the title body. The very last
 command can take an argument, which is the title
 text.\footnote{Remember font size can be changed safely between
 paragraphs only, and changes in the text should be made local with a
@@ -349,7 +352,7 @@
 given explicitly with |#1| (see below). Penalties in this argument may
 lead to unexpected results.
 
-\item |<after-code>| is code following the title body. The typeset
+\item |<after-code>| is the code following the title body. The typeset
 material is in vertical mode with |hang|, |block| and |display|; in
 horizontal mode with |runin| and |leftmargin| (\fbox{2.7} with the
 latter, at the beginning of the paragraph). Otherwise is ignored.
@@ -360,6 +363,14 @@
 breaks. So, |<before-code>| and |<after-code>| are \textit{not} the
 proper places for penalties. See |\sectionbreak| below.
 
+\begin{warning}
+  Because of the way colors are internally ‘stacked’ you can find some
+  anomalous results if |\color| is used in some shapes, namely |wrap|,
+  |drop|, |leftmargin| and |rightmargin|. Either wrap the text with
+  |\textcolor| or place the code inside a group. 
+\end{warning}
+
+
 \begin{desc}
 |\chaptertitlename|
 \end{desc}
@@ -379,7 +390,7 @@
 possibility does not make sense.
 \begin{itemize}
 \item |<left>| increases the left margin, except in the |...margin|, 
-and |drop| shape, where this parameter sets the title width, in 
+and |drop| shapes, where this parameter sets the title width, in 
 |wrap|, the maximum width, and in |runin|, the indentation just before 
 the title.  With negative value the title overhangs.\footnote{This 
 parameter is not equal to |<indent>| of |\cs{@startsection}|, which 
@@ -417,12 +428,17 @@
 the predefined values (or for slight changes in the makeup, for
 example).
 
-\textbf{Notes.} |\titlespacing| does not work with either |\chapter|
-and |\part| unless you change its title format as well by means of
-|\titleformat|, the simple settings, or |\titleclass|. Arguments in
-|\titlespacing| must be dimensions;  |\stretch| includes a command and
-hence raises an error.
+\begin{note}
+  |\titlespacing| does not work with either |\chapter| and |\part|
+  unless you change its title format as well by means of
+  |\titleformat|, the simple settings, or |\titleclass|.
+\end{note}
 
+\begin{note}
+  Arguments in |\titlespacing| must be dimensions; |\stretch| includes
+  a command and hence raises an error.
+\end{note}
+
 \subsection{Spacing related tools}
 
 These commands are provided as tools for |\titleformat| and 
@@ -468,7 +484,7 @@
 With |rigidchapters| the space for chapter titles is always the same, 
 and |<after-sep>| in |\titlespacing| does not mean the space from the 
 bottom of the text title to the text body as described above, but from 
-the \textit{top} of the text title, i.~e., |<before-sep>| $+$ 
+the \textit{top} of the text title, i.e., |<before-sep>| $+$ 
 |<after-sep>| now is a fixed distance from the top of the page body to 
 the main text. The default is |rubberchapters| where |<after-sep>| is 
 the separation between title and text as usual. Actually, the name is 
@@ -513,7 +529,7 @@
 \fbox{2.6} In version 2.6 and later, \verb|\\| does not allow a page
 break and therefore is equivalent to \verb|\\*|.  Since I presume none
 wants a page break inside a title, this has been made the default.  If
-for some extrange reason you want to allow page breaks inside the
+for some strange reason you want to allow page breaks inside the
 titles, use the package option \verb|pageatnewline|, which is provided
 for backward compatibility.
 
@@ -526,7 +542,7 @@
 at certain places to make sure the vertical space is the same with
 relation with the baseline. This is not always the desired behavior, so
 the package options |nostruts| is provided. An alternative is the macro
-|\nostruts| when defining a section (note this macros is defined only
+|\nostruts| when defining a section (note this macro is defined only
 within a title).
 
 \subsection{Rules}
@@ -543,7 +559,7 @@
 \end{desc}
 
 The |\titleline| command allows inserting a line, which may
-contain text and other ``horizontal'' material. it is intended 
+contain text and other ``horizontal'' material. It is intended 
 mainly for rules and leaders but in fact is also useful for other 
 purposes.  The line has a fixed width and hence must be filled, i.e., 
 |\titleline{CHAPTER}| produces an underfull box.  Here the optional 
@@ -786,7 +802,7 @@
 \begin{itemize}
 \item |name|. Allowed values are |\chapter|, |\section|, etc.
 \item |page|. Allowed values are |odd| or |even|.
-\item |numberless|. A valueless key. it is not necessary unless you
+\item |numberless|. A valueless key. It is not necessary unless you
 want to set different numbered (without this key) and unnumbered
 (with |numberless|) variants.
 \end{itemize}
@@ -893,11 +909,11 @@
 below are increased by one (section is 2, subsection is 3, and so on).
 
 There are two sectioning commands which perform some extra actions
-depending of its name and ignoring the class:
+depending on its name and ignoring the class:
 \begin{itemize}
 \item |\chapter| logs the string defined in |\chaptertitlename|
  and the matter is taken into account.
-\item |\part| does not encapsulates the label in the toc entry,
+\item |\part| does not encapsulate the label in the toc entry,
 except if you use the |newparttoc| option.
 \end{itemize}
 
@@ -913,7 +929,7 @@
 Let us suppose you want to create your sectioning commands from scratch.
 This package option ignores any previous definitions, if any,
 and hence removes the possibility of using the options described
-in ``Quick Reference.'' Then you use the \textsf{titlesec}
+in ``Quick Reference''. Then you use the \textsf{titlesec}
 tools, and define the corresponding counters and labels.
 
 \begin{desc}
@@ -929,9 +945,16 @@
 \section{Additional Notes}
 %~~~~~~~~~~~~~~~~~~~~~~~~
 
-This part describes briefly some \LaTeX{} commands, useful
-when defining sectioning titles.
+Only a |\footnote| command is allowed in titles, but it will work.
+However, the footnote mark is not removed from toc entries or running
+headings; for that use
+\begin{verbatim}
+\usepackage[stable]{footmisc}
+\end{verbatim}
 
+The rest of this section describes briefly some \LaTeX{} commands,
+useful when defining sectioning titles.
+
 \subsection{Fixed Width Labels}
 
 The |\makebox| command allows to use fixed width label, which
@@ -958,7 +981,7 @@
 \begin{verbatim}
 \setcounter{secnumdepth}{0}
 \end{verbatim}
-sections will be not numbered but they will be included in both toc
+sections will not be numbered but they will be included in both toc
 and headers.
 
 Now, let's
@@ -1317,7 +1340,7 @@
 The value set is used in all of sections. If you are wondering
 why, the answer is quite simple: in most of cases the |<right>|
 margin will be constant. However, you are allowed to change
-it locally in the |<before-code>| arguments. Note as well that
+it locally in the |<above-code>| arguments. Note as well that
 the default space in standard classes does not leave room to
 display boldfaced page number above 100 and therefore you
 might want to set a larger margin with this command.
@@ -1663,8 +1686,8 @@
 Once you have read the documentation it should be clear this
 is not a package for the casual user who likes the standard
 layout and wants to make simple changes. This is a tool for the
-serious typographer who has a clear idea of what layout wants
-and do not have the skill to get it. No attempt is made to improve
+serious typographer who has a clear idea of what layout he wants
+but does not have the skill to get it. No attempt is made to improve
 your taste in section formatting.
 
 \section{Appendix}

Modified: trunk/Master/texmf-dist/tex/latex/titlesec/titleps.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/titlesec/titleps.sty	2023-10-16 23:43:31 UTC (rev 68572)
+++ trunk/Master/texmf-dist/tex/latex/titlesec/titleps.sty	2023-10-17 19:21:51 UTC (rev 68573)
@@ -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 at 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 at presec@x#1#2[#3]#4{%
   #1{#2}{#3}%
-  \@nameuse{ttl at s@#2}[#3]{#4}}
+  \@nameuse{ttl at s@#2}[{#3}]{#4}}
 
 \def\ttl at presec@s#1#2{%
   \gdef\ttl at savemark{\@nameuse{#1mark}{#2}}%

Modified: trunk/Master/texmf-dist/tex/latex/titlesec/titlesec.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/titlesec/titlesec.sty	2023-10-16 23:43:31 UTC (rev 68572)
+++ trunk/Master/texmf-dist/tex/latex/titlesec/titlesec.sty	2023-10-17 19:21:51 UTC (rev 68573)
@@ -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 at gmk{\markright{##1}}}%
    \fi
    \def\@mkboth##1##2{\protect\ttl at gmk{\protect\@mkboth{##1}{##2}}}%
-   \def\footnote{\@ifnextchar[%
+   \protected\def\footnote{\@ifnextchar[%
      {\ttl at savefn\z@}{\ttl at savefn\@ne[]}}%
    \edef\ttl at key@numberless{\ifttl at label//\else/*\fi}%
    \def\ttl at 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 at sanitizedlabel#1\@@\@@{%
+  \in@{\label}{#1}%
+  \ifin@
+    \ttl at sanitizedlabel@i#1\@@\@@
+    \expandafter\ttl at sanitizedlabel\@currentlabelname\@@\@@
+  \fi}
+\def\ttl at sanitizedlabel@i#1\label#2#3\@@\@@{%
+  \def\@currentlabelname{#1#3}}
+
 \def\ttl at straight@i#1[#2]#3{%
-  \def\@currentlabelname{#2}% for nameref
+  \ttl at sanitizedlabel#2\@@\@@
   \gdef\ttl at savemark{\csname#1mark\endcsname{#3}}%
   \let\ttl at savewrite\@empty
   \def\ttl at 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 at compatpart{\titleclass{\part}{part}\relax}
-
-\else
-
-  \def\ttl at compatchapter{%
-    \def\@makechapterhead{%
-      \ttl at labeltrue
-      \if at mainmatter\else\ttl at labelfalse\fi
-      \ifnum\ttll at chapter>\c at secnumdepth\ttl at labelfalse\fi
-      \ttl at startargs\ttl at mkchap{chapter}}%
-    \def\@makeschapterhead{%
-      \ttl at labelfalse
-      \if at mainmatter\else\ttl at labelfalse\fi
-      \ifnum\ttll at chapter>\c at secnumdepth\ttl at labelfalse\fi
-      \ttl at startargs\ttl at mkchap{chapter}}}
-
-  \def\ttl at compatpart{\titleclass{\part}{page}\relax}
-
-\fi
-
+\@ifundefined{chapter}%
+  {\def\ttl at compatpart{\titleclass{\part}{part}\relax}}%
+  {\def\ttl at compatchapter{%
+     \def\@makechapterhead{%
+       \ttl at labeltrue
+       \if at mainmatter\else\ttl at labelfalse\fi
+       \ifnum\ttll at chapter>\c at secnumdepth\ttl at labelfalse\fi
+       \ttl at startargs\ttl at mkchap{chapter}}%
+     \def\@makeschapterhead{%
+       \ttl at labelfalse
+       \if at mainmatter\else\ttl at labelfalse\fi
+       \ifnum\ttll at chapter>\c at secnumdepth\ttl at labelfalse\fi
+       \ttl at startargs\ttl at mkchap{chapter}}}%
+   \def\ttl at 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 at tempswa
 
-  \expandafter\ifx\csname chapter\endcsname\relax\else
-   \titleformat\chapter[display]%
-    {\@ifundefined{ttl at fil}{\raggedright}{\ttl at fil}\ttl at fonts\ttl at sizes6}
-    {\@chapapp\space\thechapter}{.8\baselineskip}{\ttl at sizes\z@\ttl at passexplicit}
-  \fi
+  \@ifundefined{chapter}{}%
+    {\titleformat\chapter[display]%
+      {\@ifundefined{ttl at fil}{\raggedright}{\ttl at fil}\ttl at fonts\ttl at sizes6}%
+      {\@chapapp\space\thechapter}%
+      {.8\baselineskip}%
+      {\ttl at sizes\z@\ttl at passexplicit}}
 
 \fi
 
@@ -1646,53 +1648,43 @@
 
 \def\ttl at toplevel{part}
 
-\expandafter\ifx\csname chapter\endcsname\relax
-
-  \@namedef{ttll at part}{0}
-  \titleclass{\section}{straight}[\part]
-
-  \titlespacing*{\part}
-    {\z@}
-    {4ex}
-    {3ex}
-
-\else
-
-  \let\ttl at save@mkchap\@makechapterhead
-  \let\ttl at save@mkschap\@makeschapterhead
-
-  \def\@makechapterhead#1{%
-    \gdef\ttl at savemark{\chaptermark{#1}}%
-    \ttl at save@mkchap{#1}%
-    \@ifundefined{ttl at ps@chapter}{}%
-      {\thispagestyle{\@nameuse{ttl at ps@chapter}}}}
-
-  \def\@makeschapterhead#1{%
-    \gdef\ttl at savemark{\chaptermark{#1}}%
-    \ttl at save@mkschap{#1}%
-    \@ifundefined{ttl at ps@chapter}{}%
-      {\thispagestyle{\@nameuse{ttl at ps@chapter}}}}
-
-  \@namedef{ttll at part}{-1}
-  \@namedef{ttlss at part}{chapter}
-  \@namedef{ttll at chapter}{0}
-  \titleclass{\section}{straight}[\chapter]
-
+\@ifundefined{chapter}%
+  {\@namedef{ttll at part}{0}%
+   \titleclass{\section}{straight}[\part]%
+   \titlespacing*{\part}%
+     {\z@}%
+     {4ex}%
+     {3ex}}%
+  {\let\ttl at save@mkchap\@makechapterhead
+   \let\ttl at save@mkschap\@makeschapterhead
+   %
+   \def\@makechapterhead#1{%
+     \gdef\ttl at savemark{\chaptermark{#1}}%
+     \ttl at save@mkchap{#1}%
+     \@ifundefined{ttl at ps@chapter}{}%
+       {\thispagestyle{\@nameuse{ttl at ps@chapter}}}}%
+   %
+   \def\@makeschapterhead#1{%
+     \gdef\ttl at savemark{\chaptermark{#1}}%
+     \ttl at save@mkschap{#1}%
+     \@ifundefined{ttl at ps@chapter}{}%
+       {\thispagestyle{\@nameuse{ttl at ps@chapter}}}}%
+   %
+   \@namedef{ttll at part}{-1}%
+   \@namedef{ttlss at part}{chapter}%
+   \@namedef{ttll at 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 at chapafter}}
 
-  \titlespacing*{\part}
-    {\z@}
-    {\z@\@plus1fil}
-    {\z@\@plus1fil}
-    
-  \titlespacing*\chapter
-    {\z@}%
-    {50\p@}%
-    {\ttl at chapafter}%
-
-\fi
-
 \titleclass{\subsection}   {straight}[\section]
 \titleclass{\subsubsection}{straight}[\subsection]
 \titleclass{\paragraph}    {straight}[\subsubsection]

Modified: trunk/Master/texmf-dist/tex/latex/titlesec/titletoc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/titlesec/titletoc.sty	2023-10-16 23:43:31 UTC (rev 68572)
+++ trunk/Master/texmf-dist/tex/latex/titlesec/titletoc.sty	2023-10-17 19:21:51 UTC (rev 68573)
@@ -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



More information about the tex-live-commits mailing list.