texlive[52065] Master/texmf-dist: titlesec (9sep19)

commits+karl at tug.org commits+karl at tug.org
Mon Sep 9 23:20:01 CEST 2019


Revision: 52065
          http://tug.org/svn/texlive?view=revision&revision=52065
Author:   karl
Date:     2019-09-09 23:20:00 +0200 (Mon, 09 Sep 2019)
Log Message:
-----------
titlesec (9sep19)

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	2019-09-09 21:19:49 UTC (rev 52064)
+++ trunk/Master/texmf-dist/doc/latex/titlesec/README.md	2019-09-09 21:20:00 UTC (rev 52065)
@@ -28,6 +28,9 @@
 ### Latest changes
 
 ```
+2.12  2019-09-09
+      - Fix - Partial TOCs were severely broken.
+      - Fix - An undefined section doesn't raise an error any more.
 2.11  2019-07-16
       - New license: MIT.
       - Option nostruts, to remove struts inserted by titlesec.

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	2019-09-09 21:19:49 UTC (rev 52064)
+++ trunk/Master/texmf-dist/doc/latex/titlesec/titleps.tex	2019-09-09 21:20:00 UTC (rev 52065)
@@ -7,8 +7,8 @@
 % Repository: https://github.com/jbezos/titlesec
 %
 
-\def\fileversion{2.11}
-\def\docdate{2019/07/16}
+\def\fileversion{2.12}
+\def\docdate{2019/09/09}
 
 \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	2019-09-09 21:19:49 UTC (rev 52064)
+++ trunk/Master/texmf-dist/doc/latex/titlesec/titlesec.tex	2019-09-09 21:20:00 UTC (rev 52065)
@@ -7,14 +7,15 @@
 % Repository: https://github.com/jbezos/titlesec
 %
 
-\def\fileversion{2.11}
-\def\docdate{2019/07/16}
+\def\fileversion{2.12}
+\def\docdate{2019/09/09}
 
 \documentclass[a4paper]{ltxguide}
 \usepackage[sf,bf,compact,topmarks,calcwidth,pagestyles]{titlesec}
-\usepackage{titletoc}
+\usepackage{titletoc,color}
 \def\gobble#1{}
 \def\cs#1{\expandafter\gobble\string\\#1}
+\definecolor{notes}{rgb}{.75, .3, .3}%
 \makeatletter
 \newenvironment{desc}
   {\if at nobreak
@@ -23,18 +24,21 @@
    \fi
    \decl}
   {\enddecl}
+\def\@begintheorem#1#2{%
+  \list{}{}%
+  \global\advance\@listdepth\m at ne
+  \item[{\sffamily\bfseries\color{notes}\MakeUppercase{#1}}]}%
+\newtheorem{warning}{Warning}
+\newtheorem{note}{Note}
+\newtheorem{example}{Example}
 \makeatother
 
-\usepackage{textcomp,pslatex}
+\usepackage{textcomp}
 \usepackage[linktocpage]{hyperref}
 
 \title{The \textsf{titlesec}, \textsf{titleps} and \textsf{titletoc} 
 Packages\footnote{The \textsf{titlesec} package is currently at 
-version 2.10.2.  \copyright{} 1998--2016 Javier Bezos.
-The \textsf{titletoc} package is currently at 
-version 1.6.  The \textsf{titleps} package is currently at version 
-1.1.1 \copyright{} 1999--2016 Javier Bezos.  All Rights 
-Reserved.}}
+version 2.12. \copyright{} 1998--2019 Javier Bezos.}}
 
 \author{Javier Bezos\footnote{For bug reports, comments and
 suggestions go to \href{http://www.tex-tipografia.com/contact.html}%
@@ -91,6 +95,14 @@
 
 \maketitle
 \tableofcontents
+
+\begin{note}
+  Please, report any issues you find on
+  \texttt{https://github.com/jbezos/titlesec/issues}, which is better
+  than just complaining on an e-mail list or a web forum. Forking
+  and pull requests are welcome.
+\end{note}
+
 \section{Introduction}
 
 This package is essentially a replacement---partial or total---for the 
@@ -835,18 +847,25 @@
 to the surrounding text, title classes allow to change the generic
 behaviour of them.  With the help of classes you may insert, say, a
 new |subchapter| level between |chapter| and |section|, or creating a
-scheme of your own.  \emph{Making a consistent scheme and defining all
-of related stuff like counters, macros, format, spacing and, if there
-is a TOC, TOC format is left to the responsibility of the user.} There
-are three classes: |page| is like the book |\part|, in a single page,
-|top| is like |\chapter|, which begins a page and places the title at
-the top, and |straight| is intended for titles in the middle of
-text.\footnote{There is an further class named |part| to emulate the
-article |\cs{part}|, but you should not use it at all.  Use the
-|straight| class instead.  Remember some features rely in these
-classes and \textsf{titlesec} does not change by default the
-definition of \texttt{\string\part} and \texttt{\string\chapter}.}
+scheme of your own.
 
+There are three classes: |page| is like the book |\part|, in a single
+page, |top| is like |\chapter|, which begins a page and places the
+title at the top, and |straight| is intended for titles in the middle
+of text.\footnote{There is an further class named |part| to emulate the
+article |\cs{part}|, but you should not use it at all. Use the
+|straight| class instead. Remember some features rely in these classes
+and \textsf{titlesec} does not change by default the definition of
+\texttt{\string\part} and \texttt{\string\chapter}.}
+
+\begin{warning}
+  Making a consistent scheme and defining all of
+  related stuff like counters, macros, format, and spacing is left to the
+  responsibility of the user. If there is a TOC, also the TOC format,
+  which might require redefining the corresponding macros to change the
+  hardcoded value (either by hand or with \textsf{titletoc}).
+\end{warning}
+
 \begin{desc}
 |\titleclass{<name>}{<class>}|\\
 |\titleclass{<name>}{<class>}[<super-level-cmd>]|
@@ -1518,9 +1537,9 @@
 \begin{verbatim}
 \titleformat{\chapter}[display]
   {...}{...}{...}  % Your definitions come here
-  [\vspace*{4pc}%
+  [{\vspace*{4pc}%
    \startcontents
-   \printcontents{l}{1}[2]{}]
+   \printcontents{l}{1}[2]{}}]
 
 \titlecontents*{lsection}[0pt]
   {\small\itshape}{}{}
@@ -1527,7 +1546,8 @@
   {}[ \textbullet\ ][.]
 \end{verbatim}
 The included entries are those in levels 1 to 2 inclusive (i.e., 1 
-and 2).
+and 2). Note the whole optional argument is enclosed in braces, because
+there is an internal \texttt{[]}.
 
 \subsection[Partial lists]{Partial lists \normalfont\normalsize\fbox{2.6}}
 

Modified: trunk/Master/texmf-dist/tex/latex/titlesec/titleps.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/titlesec/titleps.sty	2019-09-09 21:19:49 UTC (rev 52064)
+++ trunk/Master/texmf-dist/tex/latex/titlesec/titleps.sty	2019-09-09 21:20:00 UTC (rev 52065)
@@ -13,7 +13,7 @@
 \ifx\ttl at coreps\@empty\else      % START code for package
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{titleps}[2019/07/16 v2.11 Page styles]
+\ProvidesPackage{titleps}[2019/09/09 v2.12 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

Modified: trunk/Master/texmf-dist/tex/latex/titlesec/titlesec.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/titlesec/titlesec.sty	2019-09-09 21:19:49 UTC (rev 52064)
+++ trunk/Master/texmf-dist/tex/latex/titlesec/titlesec.sty	2019-09-09 21:20:00 UTC (rev 52065)
@@ -34,7 +34,7 @@
 % ~~~~~~~
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{titlesec}[2019/07/16 v2.11 Sectioning titles]
+\ProvidesPackage{titlesec}[2019/09/09 v2.12 Sectioning titles]
 
 % Initialization
 % ~~~~~~~~~~~~~~
@@ -1572,13 +1572,16 @@
   \ttl at a}
 
 \def\ttl at extract#1{%
+  \ifx#1\@undefined
+    \let#1\relax % Avoid error if undefined
+  \fi
   \expandafter\in@\expandafter\@startsection\expandafter{#1}%
   \ifin@
     \expandafter\ttl@@extract#1#1%
   \else
     \PackageWarningNoLine{titlesec}%
-      {Non standard sectioning command detected\MessageBreak
-       Using default spacing and no format}
+      {Non standard sectioning command \string#1\MessageBreak
+       detected. Using default spacing and no format}%
     \titlespacing*#1{\z@}{*3}{*2}%
   \fi}
 

Modified: trunk/Master/texmf-dist/tex/latex/titlesec/titletoc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/titlesec/titletoc.sty	2019-09-09 21:19:49 UTC (rev 52064)
+++ trunk/Master/texmf-dist/tex/latex/titlesec/titletoc.sty	2019-09-09 21:20:00 UTC (rev 52065)
@@ -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 at fixhyperref\relax
 
 \def\ttl at contents@i#1#2[#3]#4#5#6#7{%
-  \@ifundefined{ttll@#2}%
-    {\expandafter\def\csname ttll@#2\endcsname{-1000}}%
-    {}%
   \ifcase#1\relax
     \def\ttl at fixhyperref{%
       \ifx\Hy at tocdestname\@undefined\else
@@ -289,6 +286,18 @@
 
 \def\ttl at lasttoc{-1000} % An inital dummy assignment
 
+\def\ttl at 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 at tocentry#1#2#3#4#5#6#7#8{%
   \ttl at fixhyperref
+  \ttl at providettll{}{#2}%
   \xdef\ttl at b{\csname ttll@#2\endcsname}%
   \ifnum\ttl at b>\c at tocdepth\else
     \ifnum\ttl at b<\ttl at toctop\else
@@ -487,7 +497,7 @@
 \newcommand\printcontents[3][default]{%
   \def\ttl at a{[#1]{toc}{#2}{#3}}%
   \ttl at preprint}
-  
+
 \newcommand\printlist[3][default]{%
   \def\ttl at a{[#1]{#2}{#3}{-1001}}%
   \ttl at preprint}
@@ -509,9 +519,7 @@
     \let\ttl at xcontentsline\contentsline
     \let\contentsline\ttl at gobblecontents
     \def\ttl at contentsline##1{%
-      \@ifundefined{ttll@#3##1}%
-        {\expandafter\let\csname ttll@#3##1\expandafter\endcsname
-           \csname ttll@##1\endcsname}{}%
+      \ttl at providettll{#3}{##1}%
       \@ifundefined{l@#3##1}%
         {\ttl at xcontentsline{##1}}%
         {\ttl at xcontentsline{#3##1}}}%



More information about the tex-live-commits mailing list