summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/titlesec
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
parentcb5ec966f1a3e9b26dcd7fc1b13998e03581b8fd (diff)
CTAN sync 201909100300
Diffstat (limited to 'macros/latex/contrib/titlesec')
-rw-r--r--macros/latex/contrib/titlesec/README.md3
-rw-r--r--macros/latex/contrib/titlesec/titleps.pdfbin134004 -> 134006 bytes
-rw-r--r--macros/latex/contrib/titlesec/titleps.sty2
-rw-r--r--macros/latex/contrib/titlesec/titleps.tex4
-rw-r--r--macros/latex/contrib/titlesec/titlesec.pdfbin183112 -> 490516 bytes
-rw-r--r--macros/latex/contrib/titlesec/titlesec.sty9
-rw-r--r--macros/latex/contrib/titlesec/titlesec.tex66
-rw-r--r--macros/latex/contrib/titlesec/titletoc.sty24
8 files changed, 71 insertions, 37 deletions
diff --git a/macros/latex/contrib/titlesec/README.md b/macros/latex/contrib/titlesec/README.md
index 1b9250a712..2b91778938 100644
--- a/macros/latex/contrib/titlesec/README.md
+++ b/macros/latex/contrib/titlesec/README.md
@@ -28,6 +28,9 @@ mechanims is used, without intermediate `\leftmark`s or `\rightmark`s.
### 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.
diff --git a/macros/latex/contrib/titlesec/titleps.pdf b/macros/latex/contrib/titlesec/titleps.pdf
index cef3495fdf..f3657fe272 100644
--- a/macros/latex/contrib/titlesec/titleps.pdf
+++ b/macros/latex/contrib/titlesec/titleps.pdf
Binary files differ
diff --git a/macros/latex/contrib/titlesec/titleps.sty b/macros/latex/contrib/titlesec/titleps.sty
index 2d2a03cbea..7e8b1b7ed4 100644
--- a/macros/latex/contrib/titlesec/titleps.sty
+++ b/macros/latex/contrib/titlesec/titleps.sty
@@ -13,7 +13,7 @@
\ifx\ttl@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
diff --git a/macros/latex/contrib/titlesec/titleps.tex b/macros/latex/contrib/titlesec/titleps.tex
index 51149c9fa8..68116da571 100644
--- a/macros/latex/contrib/titlesec/titleps.tex
+++ b/macros/latex/contrib/titlesec/titleps.tex
@@ -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}
diff --git a/macros/latex/contrib/titlesec/titlesec.pdf b/macros/latex/contrib/titlesec/titlesec.pdf
index bf4525f3e9..4cf1ccd371 100644
--- a/macros/latex/contrib/titlesec/titlesec.pdf
+++ b/macros/latex/contrib/titlesec/titlesec.pdf
Binary files differ
diff --git a/macros/latex/contrib/titlesec/titlesec.sty b/macros/latex/contrib/titlesec/titlesec.sty
index f1f943fd21..caf149e0da 100644
--- a/macros/latex/contrib/titlesec/titlesec.sty
+++ b/macros/latex/contrib/titlesec/titlesec.sty
@@ -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@a}
\def\ttl@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}
diff --git a/macros/latex/contrib/titlesec/titlesec.tex b/macros/latex/contrib/titlesec/titlesec.tex
index d10da1e040..619e043700 100644
--- a/macros/latex/contrib/titlesec/titlesec.tex
+++ b/macros/latex/contrib/titlesec/titlesec.tex
@@ -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@nobreak
@@ -23,18 +24,21 @@
\fi
\decl}
{\enddecl}
+\def\@begintheorem#1#2{%
+ \list{}{}%
+ \global\advance\@listdepth\m@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 @@ dotlessi, babeltools}.}}
\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,17 +847,24 @@ While the shapes and the like modify the behaviour of titles related
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>}|\\
@@ -1518,16 +1537,17 @@ A simple usage might look like (provided you are using
\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}{}{}
{}[ \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}}
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}}}%