From 4c11a739919c6fe82bd1e3890115da2a7b447bee Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 16 Mar 2016 22:33:36 +0000 Subject: titlesec (16mar16) git-svn-id: svn://tug.org/texlive/trunk@40048 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/titlesec/block.tss | 6 +- Master/texmf-dist/tex/latex/titlesec/drop.tss | 6 +- Master/texmf-dist/tex/latex/titlesec/frame.tss | 6 +- .../texmf-dist/tex/latex/titlesec/leftmargin.tss | 6 +- Master/texmf-dist/tex/latex/titlesec/margin.tss | 6 +- .../texmf-dist/tex/latex/titlesec/rightmargin.tss | 6 +- Master/texmf-dist/tex/latex/titlesec/titleps.sty | 6 +- Master/texmf-dist/tex/latex/titlesec/titlesec.sty | 47 +++++++++------ Master/texmf-dist/tex/latex/titlesec/titletoc.sty | 4 +- Master/texmf-dist/tex/latex/titlesec/ttlkeys.def | 6 +- Master/texmf-dist/tex/latex/titlesec/ttlps.def | 70 ++++++++++++++++------ Master/texmf-dist/tex/latex/titlesec/wrap.tss | 6 +- 12 files changed, 112 insertions(+), 63 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/titlesec/block.tss b/Master/texmf-dist/tex/latex/titlesec/block.tss index 34b2747a84f..bb98ae6da3b 100644 --- a/Master/texmf-dist/tex/latex/titlesec/block.tss +++ b/Master/texmf-dist/tex/latex/titlesec/block.tss @@ -2,10 +2,10 @@ % | Typeset titlesec.tex to get the documentation. | % +--------------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % It may be distributed and/or modified under the @@ -20,7 +20,7 @@ % % The Current Maintainer of this work is Javier Bezos. -\ProvidesFile{block.tss}[2011/12/15] +\ProvidesFile{block.tss}[2016/03/15] \gdef\ttlh@block#1#2#3#4#5#6#7#8{% \gdef\ttl@makeline##1{\ttl@calc\hspace{#6}##1\ttl@calc\hspace{#7}}% diff --git a/Master/texmf-dist/tex/latex/titlesec/drop.tss b/Master/texmf-dist/tex/latex/titlesec/drop.tss index be0d638c085..67d956a8b8d 100644 --- a/Master/texmf-dist/tex/latex/titlesec/drop.tss +++ b/Master/texmf-dist/tex/latex/titlesec/drop.tss @@ -2,10 +2,10 @@ % | Typeset titlesec.tex to get the documentation. | % +--------------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % It may be distributed and/or modified under the @@ -20,7 +20,7 @@ % % The Current Maintainer of this work is Javier Bezos. -\ProvidesFile{drop.tss}[2011/12/15] +\ProvidesFile{drop.tss}[2016/03/15] \gdef\ttlh@drop#1#2#3#4#5#6#7#8{% \global\@noskipsectrue diff --git a/Master/texmf-dist/tex/latex/titlesec/frame.tss b/Master/texmf-dist/tex/latex/titlesec/frame.tss index b386347010e..d9a2d526219 100644 --- a/Master/texmf-dist/tex/latex/titlesec/frame.tss +++ b/Master/texmf-dist/tex/latex/titlesec/frame.tss @@ -2,10 +2,10 @@ % | Typeset titlesec.tex to get the documentation. | % +--------------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % It may be distributed and/or modified under the @@ -20,7 +20,7 @@ % % The Current Maintainer of this work is Javier Bezos. -\ProvidesFile{frame.tss}[2011/12/15] +\ProvidesFile{frame.tss}[2016/03/15] \gdef\ttlh@frame#1#2#3#4#5#6#7#8{% \def\ttl@filleft##1{\hfill}% diff --git a/Master/texmf-dist/tex/latex/titlesec/leftmargin.tss b/Master/texmf-dist/tex/latex/titlesec/leftmargin.tss index e2d17301f88..6399ae7d9dd 100644 --- a/Master/texmf-dist/tex/latex/titlesec/leftmargin.tss +++ b/Master/texmf-dist/tex/latex/titlesec/leftmargin.tss @@ -2,10 +2,10 @@ % | Typeset titlesec.tex to get the documentation. | % +--------------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % It may be distributed and/or modified under the @@ -20,7 +20,7 @@ % % The Current Maintainer of this work is Javier Bezos. -\ProvidesFile{leftmargin.tss}[2011/12/15] +\ProvidesFile{leftmargin.tss}[2016/03/15] \gdef\ttlh@leftmargin#1#2#3#4#5#6#7#8{% \global\@noskipsectrue diff --git a/Master/texmf-dist/tex/latex/titlesec/margin.tss b/Master/texmf-dist/tex/latex/titlesec/margin.tss index 4fc8cb3729b..81290221f6a 100644 --- a/Master/texmf-dist/tex/latex/titlesec/margin.tss +++ b/Master/texmf-dist/tex/latex/titlesec/margin.tss @@ -2,10 +2,10 @@ % | Typeset titlesec.tex to get the documentation. | % +--------------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % It may be distributed and/or modified under the @@ -20,7 +20,7 @@ % % The Current Maintainer of this work is Javier Bezos. -\ProvidesFile{margin.tss}[2011/12/15] +\ProvidesFile{margin.tss}[2016/03/15] \gdef\ttlh@margin#1#2#3#4#5#6#7#8{% \global\@noskipsectrue diff --git a/Master/texmf-dist/tex/latex/titlesec/rightmargin.tss b/Master/texmf-dist/tex/latex/titlesec/rightmargin.tss index dc35f615985..33527ffe904 100644 --- a/Master/texmf-dist/tex/latex/titlesec/rightmargin.tss +++ b/Master/texmf-dist/tex/latex/titlesec/rightmargin.tss @@ -2,10 +2,10 @@ % | Typeset titlesec.tex to get the documentation. | % +--------------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % @@ -21,7 +21,7 @@ % % The Current Maintainer of this work is Javier Bezos. -\ProvidesFile{rightmargin.tss}[2011/12/15] +\ProvidesFile{rightmargin.tss}[2016/03/15] \gdef\ttlh@rightmargin#1#2#3#4#5#6#7#8{% \global\@noskipsectrue diff --git a/Master/texmf-dist/tex/latex/titlesec/titleps.sty b/Master/texmf-dist/tex/latex/titlesec/titleps.sty index b52e3d83d04..e4d341ad063 100644 --- a/Master/texmf-dist/tex/latex/titlesec/titleps.sty +++ b/Master/texmf-dist/tex/latex/titlesec/titleps.sty @@ -2,10 +2,10 @@ % | Typeset titlesec.tex to get the documentation. | % +--------------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % It may be distributed and/or modified under the @@ -24,7 +24,7 @@ % ~~~~~~~ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{titleps}[2011/12/15 v1.1.0 Page styles] +\ProvidesPackage{titleps}[2016/03/15 v1.1.1 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/Master/texmf-dist/tex/latex/titlesec/titlesec.sty b/Master/texmf-dist/tex/latex/titlesec/titlesec.sty index c9c4f5d1650..ab4d0177cc7 100644 --- a/Master/texmf-dist/tex/latex/titlesec/titlesec.sty +++ b/Master/texmf-dist/tex/latex/titlesec/titlesec.sty @@ -2,10 +2,10 @@ % | Typeset titlesec.tex to get the documentation. | % +--------------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % It may be distributed and/or modified under the @@ -48,7 +48,7 @@ % ~~~~~~~ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{titlesec}[2011/12/15 v2.10.0 Sectioning titles] +\ProvidesPackage{titlesec}[2016/03/15 v2.10.1 Sectioning titles] % Initialization % ~~~~~~~~~~~~~~ @@ -281,7 +281,9 @@ \global\let\ttl@mk\@empty % global because of rigidchapters \global\let\ttl@fn\@empty \begingroup - \everypar{\setbox\z@\lastbox\strut}% or \hskip-\parindent? + \if@inlabel\else % Keep item's \everypar + \everypar{\setbox\z@\lastbox\strut}% + \fi \let\ttl@straight@i\ttl@nest@error \let\ttl@top@i \ttl@nest@error \let\ttl@part@i \ttl@nest@error @@ -321,18 +323,20 @@ #1% \let\ttl@try\@gobble}} % locally modified to `break' testings -% \ttl@write writes marks and toc. tocdepth is taken -% care of when the toc is typesetted and not here. -% Used always through ttl@savewrite +% \ttl@write writes marks and toc. tocdepth is taken care of when +% the toc is typesetted and not here. Used always through +% ttl@savewrite, which is reset to \@empty to avoid duplicated +% calls. \def\ttl@write#1#2{% \ttl@blinemarks \csname#1mark\endcsname{#2}% \def\ttl@a{\protect\numberline{\@nameuse{the#1}}}% \@nameuse{ttl@toc#1}% eg, \ttl@tocpart modifies \ttl@a - \ttl@addcontentsline{#1}{#2}% Depends on toctitles + \ttl@addcontentsline{#1}{#2}% Depends on toctitles, uses \ttl@a \ttl@elinemarks - \global\ttl@toclabelfalse} + \global\ttl@toclabelfalse + \global\let\ttl@savewrite\@empty} \newif\ifttl@premark % to be used in ttlps.def \ttl@premarkfalse @@ -355,12 +359,12 @@ \def\ttl@labelling#1#2{% \let\ttl@Hy@saveanchor\@empty - \ifttl@label % First: if star + \ifttl@label % 1st - if star \def\ttl@savewrite{\ttl@write{#1}{#2}}% \@nameuse{ttl@#1label}% eg, sets if mainmatter in chapter. - \ifttl@label % Second, eg, if not main matter + \ifttl@label % 2nd - eg, if not main matter \ifnum\@nameuse{ttll@#1}>\c@secnumdepth\relax - \ttl@labelfalse % Third: if too deep + \ttl@labelfalse % 3rd - if too deep \else \ttl@Hy@refstepcounter{#1}% \@nameuse{ttl@#1out}% @@ -471,7 +475,11 @@ \def\ttl@part@i#1[#2]#3{% \gdef\ttl@savemark{\csname#1mark\endcsname{#3}}% - \def\ttl@savewrite{\ttl@write{#1}{#3}}% A default value. Not #2! + \ifx\ttl@notocparts\@undefined + \def\ttl@savewrite{\ttl@write{#1}{#3}}% Not #2! + \else + \let\ttl@savewrite\@empty + \fi \def\ttl@savetitle{#3}% \ttl@labelling{#1}{#2}% \ttl@startargs\ttl@part@ii{#1}{#3}} @@ -496,7 +504,11 @@ \def\ttl@page@i#1[#2]#3{% \gdef\ttl@savemark{\csname#1mark\endcsname{#3}}% - \def\ttl@savewrite{\ttl@write{#1}{#3}}% A default value. Not #2! + \ifx\ttl@notocparts\@undefined + \def\ttl@savewrite{\ttl@write{#1}{#3}}% Not #2! + \else + \let\ttl@savewrite\@empty + \fi \def\ttl@savetitle{#3}% \ttl@labelling{#1}{#2}% \ttl@startargs\ttl@page@ii{#1}{#3}} @@ -741,12 +753,11 @@ #1{\ifhmode\ttl@hmode@error\fi \ttl@glcmds \parindent\z@ - \leavevmode \begingroup \ifttl@label \sbox\z@{#2\strut\ttl@calc\hspace{#3}}% - \advance\leftskip\wd\z@ - \llap{\box\z@}% + \hangindent\wd\z@ + \noindent\box\z@ \fi #4{#8}% \kern\z@\strut\@@par @@ -970,6 +981,8 @@ \def\ttl@tocpart{\def\ttl@a{\thepart\hspace{1em}}}} \DeclareOption{newparttoc}{% \let\ttl@tocpart\relax} +\DeclareOption{notocpart*}{% + \let\ttl@notocparts\@empty} \DeclareOption{rm}{% \protected@xdef\ttl@fonts{\ttl@fonts\protect\rmfamily}} diff --git a/Master/texmf-dist/tex/latex/titlesec/titletoc.sty b/Master/texmf-dist/tex/latex/titlesec/titletoc.sty index 1e758e76cdf..79a315e714c 100644 --- a/Master/texmf-dist/tex/latex/titlesec/titletoc.sty +++ b/Master/texmf-dist/tex/latex/titlesec/titletoc.sty @@ -2,10 +2,10 @@ % | Documentation is in the titlesec.tex file. | % +---------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % It may be distributed and/or modified under the diff --git a/Master/texmf-dist/tex/latex/titlesec/ttlkeys.def b/Master/texmf-dist/tex/latex/titlesec/ttlkeys.def index 19d5cac879c..a55895b8391 100644 --- a/Master/texmf-dist/tex/latex/titlesec/ttlkeys.def +++ b/Master/texmf-dist/tex/latex/titlesec/ttlkeys.def @@ -2,10 +2,10 @@ % | Typeset titlesec.tex to get the documentation. | % +--------------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % It may be distributed and/or modified under the @@ -20,7 +20,7 @@ % % The Current Maintainer of this work is Javier Bezos. -\ProvidesFile{ttlkeys.def}[2011/12/15] +\ProvidesFile{ttlkeys.def}[2016/03/15] % This command takes a list in "keyval" format, \ttl@a containing the % star spec, and returns \ttl@a with the full string name to be defined diff --git a/Master/texmf-dist/tex/latex/titlesec/ttlps.def b/Master/texmf-dist/tex/latex/titlesec/ttlps.def index b68c4ece33c..5ac38905d79 100644 --- a/Master/texmf-dist/tex/latex/titlesec/ttlps.def +++ b/Master/texmf-dist/tex/latex/titlesec/ttlps.def @@ -2,10 +2,10 @@ % | Typeset titlesec.tex to get the documentation. | % +--------------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % It may be distributed and/or modified under the @@ -63,7 +63,7 @@ % right pages at all. There are some issues related to top marks which % are explained by Knuth in \textit{The \TeX book}, pp. 259f, as well % as an uncompatibility between them and \LaTeX{} floats. To overcome -% both limitations, in the \textsf{titlesec} page styles, the second +% both limitations, in the \textsf{titleps} page styles, the second % part in |\cs{firstmark}| is a \emph{fixed} top mark and the first one % the actual first mark; the right way to get the bot mark is from the % second part. Marks are stored at each section and used before and @@ -72,7 +72,7 @@ % values in the mark before the title, and the current values in the % mark after. -\ProvidesFile{ttlps.def}[2011/12/15] +\ProvidesFile{ttlps.def}[2016/03/15] % % Page Styles @@ -172,6 +172,14 @@ % \mark es emitted, which has \ttl@running as part of the markset (see % the \newtitlemark above). +\def\ttl@mb@mark{\markboth} +\def\ttl@mb@warn{% + \PackageWarningNoLine{titleps} + {Direct use of \string\markboth\space and \string\markleft\space + can lead\MessageBreak + to unpredictable results. Please, read the manual\MessageBreak + for an explanation of this warning.}} + \def\ttl@markboth#1{% \begingroup \let\protect\@unexpandable@protect @@ -182,11 +190,11 @@ \let\glossary\relax \let\ttl@c\mark \def\mark##1{\xdef\ttl@running{\expandafter\@gobble##1}}% - \markboth{}{\ttl@enccode}% + \ttl@mb@mark{}{\ttl@enccode}% \expandafter\let\csname#1mark\endcsname\@gobble \xdef\ttl@marks{\ttl@marks}% \gdef\@themark{{\ttl@marks}{\ttl@prevmarks}}% - \ttl@c{\@themark}% + \ttl@c{\@themark\let\noexpand\ttl@mb@warn\relax}% \@nameuse{ttl@tem@#1}% \if@nobreak\ifvmode\nobreak\fi\fi \endgroup} @@ -233,7 +241,7 @@ \ttl@moremarks}}} \def\ttl@setmarks@s#1{% Solo con extramarks - \PackageError{titlesec}% + \PackageError{titleps}% {You need `extramarks' for \string\settitlemarks*}% {\string\settitlemarks* requires the package option `extramarks'}} @@ -400,22 +408,22 @@ \addtolength\linewidth{#4}% \ifx#2\@empty\else \setbox\z@\hb@xt@\linewidth{% - \color@begingroup - #2% - \color@endgroup}% - \wd\z@\z@ - \ht\z@\z@ - \dp\z@\z@ - \box\z@ + \color@begingroup + #2% + \color@endgroup}% + \wd\z@\z@ + \ht\z@\z@ + \dp\z@\z@ + \box\z@ \fi \ttl@titlemarks % Must precede the format. Defines \ttl@running \def\ttl@enccode{\ttl@headinline#1{}{}{}}% which contains ttl@enccode \ttl@running \ttl@calcneg\hspace{#4}}% - + \def\ttl@makehead#1\@@{\ttl@makeboth{#1}\makeheadrule} \def\ttl@makefoot#1\@@{\ttl@makeboth{#1}\makefootrule} - + \renewcommand\widenhead{% \@ifstar{\ttl@dupltwoargsrev\ttl@widenhd}% {\@ifnextchar[{\ttl@widenhd}{\ttl@dupltwoargs\ttl@widenhd}}} @@ -439,6 +447,34 @@ \expandafter\@secondoftwo \fi} +% Another tool: + +\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} + +% \ttl@mb@temp is a trick to allow resetting inside \setmarkboth. + +\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} + +\newcommand\resetmarkboth{% + \ifx\ttl@mb@temp\@undefined + \let\markboth\ttl@mb@mark + \def\ttl@mb@mark{\markboth}% + \else + \def\ttl@mb@temp{% + \let\markboth\ttl@mb@mark + \def\ttl@mb@mark{\markboth}}% + \fi} + % =========== % EXTRA MARKS % =========== @@ -653,7 +689,7 @@ \def\ttl@replace#1#2#3#4{% \@ifundefined{ttlr@#1#2@#3#4}% {\@ifundefined{ttlr@#1#2@#3}{}% - {\@namedef{ttlr@#1#2}{\@nameuse{ttlr@#1#2@#3}}}}% + {\@namedef{ttlr@#1#2}{\@nameuse{ttlr@#1#2@#3}}}}% {\csname ttlr@xx@x#4\endcsname\@gobble {\expandafter\let\csname ttlr@#1#2\expandafter\endcsname \csname ttlr@#1#2@#3#4\endcsname}}} diff --git a/Master/texmf-dist/tex/latex/titlesec/wrap.tss b/Master/texmf-dist/tex/latex/titlesec/wrap.tss index e0351dfd1eb..c9072d3e586 100644 --- a/Master/texmf-dist/tex/latex/titlesec/wrap.tss +++ b/Master/texmf-dist/tex/latex/titlesec/wrap.tss @@ -2,10 +2,10 @@ % | Typeset titlesec.tex to get the documentation. | % +--------------------------------------------------+ % -% Copyright (c) 1998-2011 by Javier Bezos. +% Copyright (c) 1998-2016 by Javier Bezos. % All Rights Reserved. % -% This file is part of the titlesec distribution release 2.10.0 +% This file is part of the titlesec distribution release 2.10.1 % ----------------------------------------------------------- % % It may be distributed and/or modified under the @@ -20,7 +20,7 @@ % % The Current Maintainer of this work is Javier Bezos. -\ProvidesFile{wrap.tss}[2011/12/15] +\ProvidesFile{wrap.tss}[2016/03/15] \gdef\ttlh@wrap#1#2#3#4#5#6#7#8{% \global\@noskipsectrue -- cgit v1.2.3