summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/titlesec/titlesec.sty
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/titlesec.sty
parentd2f68b646eb0ca42dcb488171a6e36ea3da68a5d (diff)
CTAN sync 201910170301
Diffstat (limited to 'macros/latex/contrib/titlesec/titlesec.sty')
-rw-r--r--macros/latex/contrib/titlesec/titlesec.sty14
1 files changed, 11 insertions, 3 deletions
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[]}}%