summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/titlesec
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-10-17 03:01:04 +0000
committerNorbert Preining <norbert@preining.info>2019-10-17 03:01:04 +0000
commit4b52b3987478d3197855edc2e7e24276fc2c3cb3 (patch)
tree881f845b0e30331ce74c758b8449577459cb1747 /macros/latex/contrib/titlesec
parentd2f68b646eb0ca42dcb488171a6e36ea3da68a5d (diff)
CTAN sync 201910170301
Diffstat (limited to 'macros/latex/contrib/titlesec')
-rw-r--r--macros/latex/contrib/titlesec/README.md7
-rw-r--r--macros/latex/contrib/titlesec/titleps.pdfbin134006 -> 134006 bytes
-rw-r--r--macros/latex/contrib/titlesec/titleps.sty84
-rw-r--r--macros/latex/contrib/titlesec/titleps.tex4
-rw-r--r--macros/latex/contrib/titlesec/titlesec.pdfbin490516 -> 490706 bytes
-rw-r--r--macros/latex/contrib/titlesec/titlesec.sty14
-rw-r--r--macros/latex/contrib/titlesec/titlesec.tex6
-rw-r--r--macros/latex/contrib/titlesec/titletoc.sty2
8 files changed, 83 insertions, 34 deletions
diff --git a/macros/latex/contrib/titlesec/README.md b/macros/latex/contrib/titlesec/README.md
index 2b91778938..7fb1fdff3d 100644
--- a/macros/latex/contrib/titlesec/README.md
+++ b/macros/latex/contrib/titlesec/README.md
@@ -28,9 +28,14 @@ mechanims is used, without intermediate `\leftmark`s or `\rightmark`s.
### Latest changes
```
+2.13 2019-10-16
+ - \markboth (which has been redefined in the LaTeX kernel) works
+ again.
+
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.
@@ -61,5 +66,3 @@ Further details are available on
Please, for suggestions, bug reports, etc., go to
More
http://www.texnia.com/contact.html
-
-
diff --git a/macros/latex/contrib/titlesec/titleps.pdf b/macros/latex/contrib/titlesec/titleps.pdf
index f3657fe272..0a5ea985c2 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 7e8b1b7ed4..73f7f87215 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/09/09 v2.12 Page styles]
+\ProvidesPackage{titleps}[2019/10/16 v2.13 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
@@ -217,9 +217,15 @@
% \ttl@markboth redefines temporarily \mark to fetch changes made by
% babel or ams, saved in \ttl@running. When this is done, the actual
% \mark es emitted, which has \ttl@running as part of the markset (see
-% the \newtitlemark above).
+% the \newtitlemark above). As of 2019 and due to a change in the LaTex
+% kernel, we consider two possibilities (2.13).
+
+\expandafter\ifx\csname markboth \endcsname\relax
+ \def\ttl@mb@mark{\markboth}
+\else
+ \edef\ttl@mb@mark{\expandafter\noexpand\csname markboth \endcsname}
+\fi
-\def\ttl@mb@mark{\markboth}
\def\ttl@mb@warn{%
\PackageWarningNoLine{titleps}
{Direct use of \string\markboth\space and \string\markleft\space
@@ -495,32 +501,64 @@
\fi}
% Another tool:
+% As of 2019 and due to a change in the LaTex kernel, we consider two
+% possibilities (2.13).
-\newcommand\setmarkboth{%
- \ifx\markboth\ttl@mb@use\else
- \let\ttl@mb@mark\markboth
- \let\markboth\ttl@mb@use
- \fi
- \def\ttl@mb@new##1##2}
+\expandafter\ifx\csname markboth \endcsname\relax
-% \ttl@mb@temp is a trick to allow resetting inside \setmarkboth.
+ \newcommand\setmarkboth{%
+ \ifx\markboth\ttl@mb@use\else
+ \let\ttl@mb@mark\markboth
+ \let\markboth\ttl@mb@use
+ \fi
+ \def\ttl@mb@new##1##2}
-\def\ttl@mb@use#1#2{%
- \let\markboth\ttl@mb@mark
- \def\ttl@mb@temp{\let\markboth\ttl@mb@use}%
- \ttl@mb@new{#1}{#2}%
- \ttl@mb@temp
- \let\ttl@mb@temp\@undefined}
+ % \ttl@mb@temp is a trick to allow resetting inside \setmarkboth.
-\newcommand\resetmarkboth{%
- \ifx\ttl@mb@temp\@undefined
+ \def\ttl@mb@use#1#2{%
\let\markboth\ttl@mb@mark
- \def\ttl@mb@mark{\markboth}%
- \else
- \def\ttl@mb@temp{%
+ \def\ttl@mb@temp{\let\markboth\ttl@mb@use}%
+ \ttl@mb@new{#1}{#2}%
+ \ttl@mb@temp
+ \let\ttl@mb@temp\@undefined}
+
+ \newcommand\resetmarkboth{%
+ \ifx\ttl@mb@temp\@undefined
\let\markboth\ttl@mb@mark
- \def\ttl@mb@mark{\markboth}}%
- \fi}
+ \def\ttl@mb@mark{\markboth}%
+ \else
+ \def\ttl@mb@temp{%
+ \let\markboth\ttl@mb@mark
+ \def\ttl@mb@mark{\markboth}}%
+ \fi}
+
+\else
+
+ \newcommand\setmarkboth{%
+ \expandafter\ifx\csname markboth \endcsname\ttl@mb@use\else
+ \expandafter\let\expandafter\ttl@mb@mark\csname markboth \endcsname
+ \expandafter\let\csname markboth \endcsname\ttl@mb@use
+ \fi
+ \def\ttl@mb@new##1##2}
+
+ \def\ttl@mb@use#1#2{%
+ \expandafter\let\csname markboth \endcsname\ttl@mb@mark
+ \def\ttl@mb@temp{\expandafter\let\csname markboth \endcsname\ttl@mb@use}%
+ \ttl@mb@new{#1}{#2}%
+ \ttl@mb@temp
+ \let\ttl@mb@temp\@undefined}
+
+ \newcommand\resetmarkboth{%
+ \ifx\ttl@mb@temp\@undefined
+ \expandafter\let\csname markboth \endcsname\ttl@mb@mark
+ \edef\ttl@mb@mark{\expandafter\noexpand\csname markboth \endcsname}%
+ \else
+ \def\ttl@mb@temp{%
+ \expandafter\let\csname markboth \endcsname\ttl@mb@mark
+ \edef\ttl@mb@mark{\expandafter\noexpand\csname markboth \endcsname}}%
+ \fi}
+
+\fi
% ===========
% EXTRA MARKS
diff --git a/macros/latex/contrib/titlesec/titleps.tex b/macros/latex/contrib/titlesec/titleps.tex
index 68116da571..c3af656ae9 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.12}
-\def\docdate{2019/09/09}
+\def\fileversion{2.13}
+\def\docdate{2019/10/16}
\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 4cf1ccd371..1812168713 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 caf149e0da..e99e0b09d3 100644
--- a/macros/latex/contrib/titlesec/titlesec.sty
+++ b/macros/latex/contrib/titlesec/titlesec.sty
@@ -34,7 +34,7 @@
% ~~~~~~~
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{titlesec}[2019/09/09 v2.12 Sectioning titles]
+\ProvidesPackage{titlesec}[2019/10/16 v2.13 Sectioning titles]
% Initialization
% ~~~~~~~~~~~~~~
@@ -254,6 +254,9 @@
% is not lost inside a box by saving it into \ttl@mk,
% which in turn is used by the sect and chap commands.
+% As of 2019 and due the LaTex
+% kernel modifies \markboth, we consider two possibilities (2.13).
+
\newif\ifttl@explicit
\def\ttl@gmk#1{\gdef\ttl@mk{#1}}
@@ -272,8 +275,13 @@
\let\ttl@page@i \ttl@nest@error
\let\ttl@newpage\newpage
\def\newpage{\ttl@savewrite\ttl@newpage}%
- \def\markboth##1##2{\protect\ttl@gmk{\protect\markboth{##1}{##2}}}%
- \def\markright##1{\protect\ttl@gmk{\protect\markright{##1}}}%
+ \expandafter\ifx\csname markboth \endcsname\relax
+ \def\markboth##1##2{\protect\ttl@gmk{\protect\markboth{##1}{##2}}}%
+ \def\markright##1{\protect\ttl@gmk{\protect\markright{##1}}}%
+ \else
+ \@namedef{markboth }##1##2{\protect\ttl@gmk{\markboth{##1}{##2}}}%
+ \@namedef{markright }##1{\protect\ttl@gmk{\markright{##1}}}%
+ \fi
\def\@mkboth##1##2{\protect\ttl@gmk{\protect\@mkboth{##1}{##2}}}%
\def\footnote{\@ifnextchar[%
{\ttl@savefn\z@}{\ttl@savefn\@ne[]}}%
diff --git a/macros/latex/contrib/titlesec/titlesec.tex b/macros/latex/contrib/titlesec/titlesec.tex
index 619e043700..6c4d4a8d55 100644
--- a/macros/latex/contrib/titlesec/titlesec.tex
+++ b/macros/latex/contrib/titlesec/titlesec.tex
@@ -7,8 +7,8 @@
% Repository: https://github.com/jbezos/titlesec
%
-\def\fileversion{2.12}
-\def\docdate{2019/09/09}
+\def\fileversion{2.13}
+\def\docdate{2019/10/16}
\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.12. \copyright{} 1998--2019 Javier Bezos.}}
+version 2.13. \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}%
diff --git a/macros/latex/contrib/titlesec/titletoc.sty b/macros/latex/contrib/titlesec/titletoc.sty
index ddf9e298c0..e7a5b6e518 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/09/09 v2.12 TOC entries]
+\ProvidesPackage{titletoc}[2019/10/16 v2.13 TOC entries]
% The following tags are used:
% ttl@ : the generic one, shared with titlesec