summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/titlesec/CHANGES.old (renamed from Master/texmf-dist/doc/latex/titlesec/CHANGES)80
-rw-r--r--Master/texmf-dist/doc/latex/titlesec/README74
-rw-r--r--Master/texmf-dist/doc/latex/titlesec/README.md62
-rw-r--r--Master/texmf-dist/doc/latex/titlesec/titleps.pdfbin134019 -> 134004 bytes
-rw-r--r--Master/texmf-dist/doc/latex/titlesec/titleps.tex52
-rw-r--r--Master/texmf-dist/doc/latex/titlesec/titlesec.pdfbin182077 -> 183112 bytes
-rw-r--r--Master/texmf-dist/doc/latex/titlesec/titlesec.tex138
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/block.tss44
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/drop.tss61
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/frame.tss68
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/leftmargin.tss62
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/margin.tss61
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/rightmargin.tss59
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/titleps.sty757
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/titlesec.sty440
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/titletoc.sty164
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/ttlkeys.def121
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/ttlps.def739
-rw-r--r--Master/texmf-dist/tex/latex/titlesec/wrap.tss83
19 files changed, 1446 insertions, 1619 deletions
diff --git a/Master/texmf-dist/doc/latex/titlesec/CHANGES b/Master/texmf-dist/doc/latex/titlesec/CHANGES.old
index b08244f92e7..fdbcb6b1dbb 100644
--- a/Master/texmf-dist/doc/latex/titlesec/CHANGES
+++ b/Master/texmf-dist/doc/latex/titlesec/CHANGES.old
@@ -1,4 +1,4 @@
-Titlesec changes
+## TITLESEC
History of v1.0
~~~~~~~~~~~~~~~
@@ -260,8 +260,82 @@ History of v.2.10.2
2015-03-21 Fix: With 2.10.1 labels vanished in hang shape (due to a
misplaced \noindent)
+
+## TITLEPS
-History of titleps v.1.1.1
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+History of v.1.1.1
+~~~~~~~~~~~~~~~~~~
2016-03-15 New macro \setmarkboth for compatibility
+## TITLETOC
+
+History of v1.1
+~~~~~~~~~~~~~~~
+99/04/22: A bug fix. Some missing global assignments in \ttl@tocentry
+ were missing, and page numbers messed up with
+ \titlecontents*
+
+History of v1.2
+~~~~~~~~~~~~~~~~
+1999/10/20: Added \contentsafter. \ttl@tocentry modified to accept
+ the new command for grouping in a paragraph entries of
+ different levels.
+1999/10/27: Instead of defining the level numbers explicitly, that's
+ done with \ttl@setlevels and \ttl@levels.
+1999/10/27: Added the basic code for multiple indexes.
+1999/10/29: Added the toctop test to the \ttl@savel@... commands.
+1999/12/28: Simplified \ttl@savel@... with \ttl@lselect.
+2000/01/12: \contentsafter rejected. An aditional optional parameter
+ is used instead. (Too) many thing had to be rewritten.
+2000/01/27: Removed \ttl@setlevels. Any change of levels are
+ best done with titlesec.
+2000/02/14: Moved misplaced \vskip in ttl@tocentry.
+2000/02/16: A few changes in the "block" separators.
+2000/02/16: Fixed bug in \ttl@margin. For the right margin the
+ correction was used instead of the margin.
+
+History of v1.2.1
+~~~~~~~~~~~~~~~~~
+2000/04/25: Dirty trick to make sure that \ttl@finish is the very
+ last thing in lists of floats (lof, lot, etc.).
+2000/05/14: Missing \global before \ttl@labelfalse added.
+
+History of 1.2.2
+~~~~~~~~~~~~~~~~
+2000/06/05: The optional argument no longer mandatory, but
+ still reporting an error if the length is missing.
+ Minor internal changes, and a patch mechanism added.
+
+History of 1.3
+~~~~~~~~~~~~~~
+2001/01/12: Minor changes and some missing \globals added for
+ partial tocs to work inside a group.
+2001/01/21: Added \dottedcontents.
+
+History of 1.4
+~~~~~~~~~~~~~~
+2002/03/27: titletoc.new merged into this file
+2002/03/27: \ttl@finish written by the last \newpage.
+2002/03/27: \ttl@lsection broke paragraphs always. Now
+ only if the sublevel is typeset.
+2002/03/27: \ttl@finish -> \contentsfinish
+
+History of 1.5
+~~~~~~~~~~~~~~
+2003/06/14: \contentspush didn't work because of the change of
+(.new) \leftskip was done inside a group before the
+ corresponding \par
+2003/06/14: Added an useful error if a partial TOC is not
+(.new) defined.
+2005/01/17: New options rubber/rigidseps, to remove if desired
+ the small vertical "plus" between entries.
+2005/01/20: Begin work on partial lists.
+2005/01/21: \ttl@outblock and \ttl@outnoblock just to avoid a
+ huge definition and to ease patching.
+2005/01/22: Work on partial lists finished (but to be resumed).
+
+History of 1.6
+~~~~~~~~~~~~~~
+2007/05/04: Added the patch 2005/05/03 which fixed a wrong
+ result with \included (F. Mittelbach)
+2007/07/14: Removed the patch mechanism.
diff --git a/Master/texmf-dist/doc/latex/titlesec/README b/Master/texmf-dist/doc/latex/titlesec/README
deleted file mode 100644
index dff339be936..00000000000
--- a/Master/texmf-dist/doc/latex/titlesec/README
+++ /dev/null
@@ -1,74 +0,0 @@
-This directory holds 3 packages for sectioning titles -- when used as
-such (titlesec), in headers and footers (titleps) and in tables of
-contents (titletoc). They can be used separately, but you will get
-most of them when used together.
-
-Titlesec
-~~~~~~~~
-Sectioning titles, including margin and `wrap' titles, different
-format in odd and even pages, rules above and below the title,
-adding new sectioning levels, measuring the width of the title, etc.
-
-Titletoc
-~~~~~~~~
-TOC entries, with the possibility of changing the format in the middle
-of a document, grouping the entries in a single paragraph, pretty
-free-forms entries, partial tocs, etc. It's described in titlesec.pdf
-(or .tex).
-
-Titleps
-~~~~~~~
-Page styles with working top marks, access to top, first and bot marks
-in a single header/footer, rules, headers/footers for specific floats
-(kinda \thispagestyle), multiple sets of marks, etc. An one-stage
-mechanims is used, without intermediate \leftmark's or \rightmark's.
-
-What's new (2.9. 2.10)
-~~~~~~~~~~~~~~~~
-
-- Fixed \assignpagestyle, which did not work except in a
-few cases.
-- Fixed an incompatibility with hyperref (wrong appendix
-name).
-- Added \iftitlemeasuring
-- Added package option uppercase
-- Fixed a bug when reckoning the number of lines in wrap/drop.
-
-2.9.1: Fixed a typo (a spurious > in wrap.tss).
-2.9.2: Fixed another typo (\MessageBreag in ttlps.def)
-2.10.0: New features in titleps also available in titlesec
-
-Installation
-~~~~~~~~~~~~
-No .ins/.dtx preinstalation is required. Move the files to a place
-where LaTeX can find them and typeset titlesec.tex. All of files in
-this directory are necessary for titlesec.sty to work, except the
-manual titlesec.tex (and this 'readme' file). The manual requires
-titlesec.sty and titletoc.sty, and hence all the .tss and .def
-files as well.
-
-Formerly there were files with extension .new (titlesec.new and
-titletoc.new) used to patch the packages, but if present should be
-removed (they will be ignored, however).
-
-Web site, manual in PDF format and info
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Further details are available on
-
- http://www.texnia.com/titlesec.html
-
-Contact
-~~~~~~~
-Please, for suggestions, bug reports, etc., go to
-More
- http://www.texnia.com/contact.html
-
-Known problems
-~~~~~~~~~~
-Some language styles (for babel) add the indentation
-after a section in a so radical way that titlesec (which
-uses the internal LaTeX macros) cannot supress it again.
-For example, spanish (fixed in version 5.0) and frenchb.
-
-2016/03/21
-
diff --git a/Master/texmf-dist/doc/latex/titlesec/README.md b/Master/texmf-dist/doc/latex/titlesec/README.md
new file mode 100644
index 00000000000..1b9250a712e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/titlesec/README.md
@@ -0,0 +1,62 @@
+## Titlesec, Titletoc, Titleps
+
+This directory holds 3 packages for sectioning titles -- when used as
+such (titlesec), in headers and footers (titleps) and in tables of
+contents (titletoc). They can be used separately, but you will get
+most of them when used together.
+
+### Titlesec
+
+Sectioning titles, including margin and `wrap` titles, different
+format in odd and even pages, rules above and below the title,
+adding new sectioning levels, measuring the width of the title, etc.
+
+### Titletoc
+
+TOC entries, with the possibility of changing the format in the middle
+of a document, grouping the entries in a single paragraph, pretty
+free-forms entries, partial tocs, etc. It's described in
+`titlesec.pdf`.
+
+### Titleps
+
+Page styles with working top marks, access to top, first and bot marks
+in a single header/footer, rules, headers/footers for specific floats
+(kinda `\thispagestyle`), multiple sets of marks, etc. An one-stage
+mechanims is used, without intermediate `\leftmark`s or `\rightmark`s.
+
+### Latest changes
+
+```
+2.11 2019-07-16
+ - New license: MIT.
+ - Option nostruts, to remove struts inserted by titlesec.
+ - Reorganized code: only sty files, removed def and tss ones
+ (although the mechanism for tss still works).
+ - Fix - Wrong hyperlinks in table of contents with the starred
+ versions, because of a change of behavior of hyperref (it
+ patches the behaviour of an internal macro in hyperref).
+ - Fix - Wrong spacing with titleps and displayed text after a
+ section.
+ - Fix - Newly defined floats raised an error with titletoc.
+```
+
+### Installation
+
+No .ins/.dtx preinstalation is required. Move the files to a place
+where LaTeX can find them and typeset titlesec.tex. All of files in
+this directory are necessary for titlesec.sty to work, except the
+manual titlesec.tex (and this 'readme' file). The manual requires
+titlesec.sty and titletoc.sty.
+
+Further details are available on
+
+ http://www.texnia.com/titlesec.html
+
+### Contact
+
+Please, for suggestions, bug reports, etc., go to
+More
+ http://www.texnia.com/contact.html
+
+
diff --git a/Master/texmf-dist/doc/latex/titlesec/titleps.pdf b/Master/texmf-dist/doc/latex/titlesec/titleps.pdf
index 31c69f64192..cef3495fdf9 100644
--- a/Master/texmf-dist/doc/latex/titlesec/titleps.pdf
+++ b/Master/texmf-dist/doc/latex/titlesec/titleps.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/titlesec/titleps.tex b/Master/texmf-dist/doc/latex/titlesec/titleps.tex
index df021692fc4..51149c9fa85 100644
--- a/Master/texmf-dist/doc/latex/titlesec/titleps.tex
+++ b/Master/texmf-dist/doc/latex/titlesec/titleps.tex
@@ -1,27 +1,14 @@
-% +--------------------------------------------------+
-% | Typeset this file to get the documentation. |
-% +--------------------------------------------------+
%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
+% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
+% This file may be distributed and/or modified under the conditions of
+% the MIT License. A version can be found at the end of this file.
+%
+% Repository: https://github.com/jbezos/titlesec
%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-\def\fileversion{1.1.1}
-\def\docdate{2016-03-15}
+\def\fileversion{2.11}
+\def\docdate{2019/07/16}
\documentclass[a4paper]{ltxguide}
\usepackage[sf,bf,compact,topmarks,calcwidth,pagestyles]{titlesec}
@@ -621,7 +608,7 @@ commands, you might still need an empty title mark (like
\verb|\sectionmark{}|), as well as to synchronize the language by
hand.
-In many cases, the following “short” marks mechanism will be enough.
+In many cases, the following ``short'' marks mechanism will be enough.
With it, you simply say with \verb|\newshormark| the name of a command
to be used in heads or foots, and then emit the mark at appropiated
places (short marks for variables are not available). An example
@@ -823,3 +810,26 @@ Lamport's \textit{The \LaTeX\ book} (with the \textsf{calc} package):
\end{document}
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
diff --git a/Master/texmf-dist/doc/latex/titlesec/titlesec.pdf b/Master/texmf-dist/doc/latex/titlesec/titlesec.pdf
index 0bd17ad3752..bf4525f3e9c 100644
--- a/Master/texmf-dist/doc/latex/titlesec/titlesec.pdf
+++ b/Master/texmf-dist/doc/latex/titlesec/titlesec.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/titlesec/titlesec.tex b/Master/texmf-dist/doc/latex/titlesec/titlesec.tex
index b57d718744c..d10da1e0401 100644
--- a/Master/texmf-dist/doc/latex/titlesec/titlesec.tex
+++ b/Master/texmf-dist/doc/latex/titlesec/titlesec.tex
@@ -1,27 +1,14 @@
-% +--------------------------------------------------+
-% | Typeset this file to get the documentation. |
-% +--------------------------------------------------+
%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
+% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
+% This file may be distributed and/or modified under the conditions of
+% the MIT License. A version can be found at the end of this file.
+%
+% Repository: https://github.com/jbezos/titlesec
%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-\def\fileversion{2.10.2}
-\def\docdate{2016-03-21}
+\def\fileversion{2.11}
+\def\docdate{2019/07/16}
\documentclass[a4paper]{ltxguide}
\usepackage[sf,bf,compact,topmarks,calcwidth,pagestyles]{titlesec}
@@ -69,7 +56,7 @@ dotlessi, babeltools}.}}
\newpagestyle{myps}[\small\sffamily\slshape]{
\headrule
\sethead{Titlesec}{\sectiontitle}{\usepage}}
-
+
\pagestyle{myps}
\newcommand{\examplesep}{%
@@ -157,7 +144,6 @@ same time, but because |\part| is usually implemented in a
non-standard way, it remains untouched by the simple settings and
should be changed with the help of the ``Advanced Interface.''
-
\section{Quick Reference}
%~~~~~~~~~~~~~~~~~~~~~~
@@ -334,7 +320,7 @@ above the title.
there is no section label at that level, but this is not recommended
because by doing so the number is not suppressed in the table of
contents and running heads.
-
+
\item |<sep>| is the horizontal separation between label and title
body and must be a length (it must not be empty). This space is
vertical in |display| shape; in |frame| it is the distance from text
@@ -342,20 +328,26 @@ to frame. Both |<label>| and |<sep>| are ignored in starred versions
of sectioning commands. If you are using |picture| and the like, set
this parameter to 0 pt.
-\item |<before-code>| is code preceding the title body. The very last
-command can take an argument, which is the title
-text.\footnote{Remember font size can be changed safely between
-paragraphs only, and changes in the text should be made local with
-a group; otherwise the leading might be wrong---too large or too small.}
-However, with the package option \texttt{explicit} the title must
-be given explicitly with |#1| (see below).
+\item |<before-code>| is code preceding the title body. The very last
+command can take an argument, which is the title
+text.\footnote{Remember font size can be changed safely between
+paragraphs only, and changes in the text should be made local with a
+group; otherwise the leading might be wrong---too large or too small.}
+However, with the package option \texttt{explicit} the title must be
+given explicitly with |#1| (see below). Penalties in this argument may
+lead to unexpected results.
\item |<after-code>| is code following the title body. The typeset
-material is in vertical mode with |hang|, |block| and |display|;
-in horizontal mode with |runin| and |leftmargin| (\fbox{2.7} with the latter,
-at the beginning of the paragraph). Otherwise is ignored.
+material is in vertical mode with |hang|, |block| and |display|; in
+horizontal mode with |runin| and |leftmargin| (\fbox{2.7} with the
+latter, at the beginning of the paragraph). Otherwise is ignored.
+Penalties in this argument may lead to unexpected results.
\end{itemize}
+Penalties, marks and the like must be properly synchronized with page
+breaks. So, |<before-code>| and |<after-code>| are \textit{not} the
+proper places for penalties. See |\sectionbreak| below.
+
\begin{desc}
|\chaptertitlename|
\end{desc}
@@ -457,7 +449,6 @@ By-pass the settings for all of sectioning commands.%
\footnote{Formerly |indentfirst| and |nonindentfirst|, now
deprecated.}
-
\begin{desc}
|rigidchapters rubberchapters| \quad (Package options)
\end{desc}
@@ -514,6 +505,18 @@ for some extrange reason you want to allow page breaks inside the
titles, use the package option \verb|pageatnewline|, which is provided
for backward compatibility.
+\begin{desc}
+|\nostruts|\\
+|nostruts| \quad (Package option)
+\end{desc}
+
+\fbox{2.11} The styles defined by \textsf{titlesec} insert some struts
+at certain places to make sure the vertical space is the same with
+relation with the baseline. This is not always the desired behavior, so
+the package options |nostruts| is provided. An alternative is the macro
+|\nostruts| when defining a section (note this macros is defined only
+within a title).
+
\subsection{Rules}
The package includes some tools for helping in adding rules and other
@@ -674,6 +677,10 @@ too. Suitable values would be \verb|\cleardoublepage| (the default if
changed to \verb|top| (in this example, parts will continue with the
\verb|openright| setting).
+Note these macros apply the penalties at the right place. In other
+words, penalties in |<before-code>| and |<after-code>| can lead to
+unexpected (and even weird) results.
+
\begin{desc}
|\chaptertolists|
\end{desc}
@@ -890,11 +897,10 @@ tools, and define the corresponding counters and labels.
\end{desc}
Here, the |<name>| title is considered the top level, with number
-|<start-level-num>| (typically 0 or $-$1). It should be used only
-when creating sectioning commands from scratch with the help of
-|loadonly|, and there must be exactly one (no more, no less)
-declaration of this kind. After it, the rest of levels are added as
-explained above.
+|<start-level-num>| (typically 0 or $-$1). It should be used only when
+creating sectioning commands from scratch with the help of |loadonly|,
+and there must be exactly one (no more, no less) declaration of this
+kind. After it, the rest of levels are added as explained above.
\section{Additional Notes}
%~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1230,10 +1236,10 @@ Here:
\item |<left>| even if bracketed is currently mandatory and it
sets the left margin from the left page margin.
-
+
\item |<label width>| is the width of the space created for the label,
as described above.
-
+
\item |<leader width>| is the width of the box containing the char to
be used as filler, as described below.
\end{itemize}
@@ -1490,7 +1496,7 @@ Since partial contents are stopped by |\startcontents| if necessary,
those macros will not be used very often.
\begin{desc}
-|\printcontents[<name>]{<prefix>}{<start-level>}{<toc-code>}|
+|\printcontents[<name>]{<prefix>}{<start-level>}[<toc-depth>]{<toc-code>}|
\end{desc}
Print the current partial toc of |<name>| kind. The format
@@ -1500,9 +1506,12 @@ it is defined. For example, if prefix is |l| and the format of
|lsection| is defined, then this definition will be used; otherwise,
the format is that of |section|. The |<start-level>| parameter sets the
top level of the tocs---for a part toc it would be |0| (chapter), for a
-chapter toc |1| (section), and so on. Finally, |<toc-code>| is
+chapter toc |1| (section), and so on. The |<toc-code>| is
local code for the current toc; it may be used to change the
-|tocdepth| value or |\contentsmargin|, for instance.
+|\contentsmargin|, for instance. \textbf{New 2.11} Finally,
+|<toc-depth>| sets the |tocdepth| locally (in former versions it was
+suggested setting this value with |\setcounter| in the last argument,
+but that was wrong, because this command set counters globally).
A simple usage might look like (provided you are using
\textsf{titlesec} as well):
@@ -1511,8 +1520,8 @@ A simple usage might look like (provided you are using
{...}{...}{...} % Your definitions come here
[\vspace*{4pc}%
\startcontents
- \printcontents{l}{1}{\setcounter{tocdepth}{2}}]
-
+ \printcontents{l}{1}[2]{}]
+
\titlecontents*{lsection}[0pt]
{\small\itshape}{}{}
{}[ \textbullet\ ][.]
@@ -1529,7 +1538,7 @@ The commands are:
|\startlist[<name>]{<list>}|\\
|\stoplist[<name>]{<list>}|\\
|\resumelist[<name>]{<list>}|\\
-|\printlist[<name>]{<list>}{<prefix>}{<toc-code>}|
+|\printlist[<name>]{<list>}{<prefix>}[<toc-depth>]{<toc-code>}|
\end{desc}
Here |<list>| is either |lof| or |lot|. Note as well |\printlist|
@@ -1577,7 +1586,7 @@ after an em-space.
{} % That is, without page number
[\addvspace{.5pc}]
\end{verbatim}
-
+
The chapter title is centered with the chapter label on top
of it. There is no page number.
@@ -1702,7 +1711,7 @@ is an example of the section command defined below}
\titleformat{\section}[block]
{\normalfont\sffamily}
{\thesection}{.5em}{\titlerule\\[.8ex]\bfseries}
-
+
\section[Appendix]{Another Ruled Title}
\begin{verbatim}
@@ -1778,7 +1787,7 @@ an example of the section command defined below}
{}{0pt}{}
\titlespacing{\section}
{\parindent}{*2}{\wordsep}
-
+
\section*{This part is the title itself}
and this part is the section body\ldots
@@ -1920,7 +1929,7 @@ with slight changes.
\vspace{1pc}%
\Huge}
\end{verbatim}
-
+
\examplesep
\def\thesection{\Roman{section}}
@@ -1980,14 +1989,14 @@ Now an example of a complete title scheme follows.
% 5+1=6, ie, the negative left margin in section
\widenhead{6pc}{0pc}
-
+
\renewpagestyle{plain}{}
\newpagestyle{special}[\small\sffamily]{
\headrule
\sethead[\usepage][\textsl{\chaptertitle}][]
{}{\textsl{\chaptertitle}}{\usepage}}
-
+
\newpagestyle{main}[\small\sffamily]{
\headrule
\sethead[\usepage][\textsl{\thechapter. \chaptertitle}][]
@@ -2048,7 +2057,7 @@ programs.
\begin{verbatim}
\usepackage[dvips]{color}
\usepackage[rigidchapters,explicit]{titlesec}
-
+
\DeclareFixedFont{\chapterfont}{T1}{phv}{bx}{n}{11cm}
\titlespacing{\chapter}{0pt}{0pt}{210pt}
@@ -2074,3 +2083,24 @@ class, |\unitlength|, paper size, etc.)
\end{document}
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/Master/texmf-dist/tex/latex/titlesec/block.tss b/Master/texmf-dist/tex/latex/titlesec/block.tss
deleted file mode 100644
index 995f436e9a8..00000000000
--- a/Master/texmf-dist/tex/latex/titlesec/block.tss
+++ /dev/null
@@ -1,44 +0,0 @@
-% +--------------------------------------------------+
-% | Typeset titlesec.tex to get the documentation. |
-% +--------------------------------------------------+
-%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
-%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-
-\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}}%
- \setlength\leftskip{#6}%
- \setlength\rightskip{#7}%
- \interlinepenalty\@M
- \ttl@changecentercr
- \ttl@beginlongest
- #1% \ifhmode\ttl@hmode@error\fi
- \ttl@glcmds
- \parindent\z@
- \leavevmode
- \ifttl@label
- {#2}%
- \setlength\@tempskipa{#3}%
- \ifdim\@tempskipa=\z@\else\ttl@calc\hspace{#3}\fi
- \fi
- #4{#8}%
- \kern\z@\strut\@@par
- \nobreak\ttl@midlongest#5\@@par
- \ttl@endlongest}
diff --git a/Master/texmf-dist/tex/latex/titlesec/drop.tss b/Master/texmf-dist/tex/latex/titlesec/drop.tss
deleted file mode 100644
index 43b5b55200d..00000000000
--- a/Master/texmf-dist/tex/latex/titlesec/drop.tss
+++ /dev/null
@@ -1,61 +0,0 @@
-% +--------------------------------------------------+
-% | Typeset titlesec.tex to get the documentation. |
-% +--------------------------------------------------+
-%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
-%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-
-\ProvidesFile{drop.tss}[2016/03/15]
-
-\gdef\ttlh@drop#1#2#3#4#5#6#7#8{%
- \global\@noskipsectrue
- \gdef\ttl@makeline##1{##1}%
- \ttl@changecentercr
- #1\ifhmode\ttl@hmode@error\fi
- \parindent\z@
- \global\setbox\ttl@box\vtop{\setlength\hsize{#6}%
- \color@begingroup
- \ifttl@label{#2}\ttl@calc\hspace{#3}\fi
- #4{#8}\kern\z@\strut
- \@@par
- \color@endgroup}%
- \advance\@tempskipa1.5\baselineskip
- \advance\@tempskipa\ht\ttl@box
- \advance\@tempskipa\dp\ttl@box
- \advance\@tempskipa-\pagegoal
- \advance\@tempskipa\pagestretch
- \@tempskipb\pagegoal
- \pagegoal-\@tempskipa
- \ifdim\bottomtitlespace<\z@\else
- \def\@textbottom{\vskip\z@\@plus.0001fil}%
- \fi
- \penalty9999
- \pagegoal\@tempskipb
- \@tempdima\ht\ttl@box \advance\@tempdima\dp\ttl@box
- \@tempdimb\@tempdima
- \divide\@tempdima\baselineskip \count@\@tempdima
- \advance\count@
- \ifdim\@tempdimb<\the\count@.5\baselineskip\@ne\else\tw@\fi
- \dp\ttl@box=\z@
- \xdef\@svsechd##1##2{%
- \noexpand\llap{\box\ttl@box##2}%
- \setbox\z@\hbox{\noexpand\ttl@calc\noexpand\hspace{#6}\relax##2}%
- \global\hangindent\wd\z@
- \global\hangafter-\the\count@\relax}}
-
-\endinput
diff --git a/Master/texmf-dist/tex/latex/titlesec/frame.tss b/Master/texmf-dist/tex/latex/titlesec/frame.tss
deleted file mode 100644
index 1247e21bb8d..00000000000
--- a/Master/texmf-dist/tex/latex/titlesec/frame.tss
+++ /dev/null
@@ -1,68 +0,0 @@
-% +--------------------------------------------------+
-% | Typeset titlesec.tex to get the documentation. |
-% +--------------------------------------------------+
-%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
-%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-
-\ProvidesFile{frame.tss}[2016/03/15]
-
-\gdef\ttlh@frame#1#2#3#4#5#6#7#8{%
- \def\ttl@filleft##1{\hfill}%
- \def\ttl@filright##1{\hfill}%
- \gdef\ttl@makeline##1{%
- \ttl@calc\hspace{#6}##1\ttl@calc\hspace{#7}}%
- \interlinepenalty\@M
- \ttl@changecentercr
- #1\ifhmode\ttl@hmode@error\fi
- \parindent\z@
- \leavevmode
- \@tempdima\fboxrule
- \addtolength\@tempdima{#3}%
- \setlength\leftskip{#6}%
- \setlength\rightskip{#7}%
- \lower\@tempdima\hbox{%
- \everypar{}%
- \setbox\z@\hbox{#2}%
- \addtolength\hsize{-#6}%
- \addtolength\hsize{-#7}%
- \@tempdima\dp\z@ % 2002/3/22
- \advance\@tempdima.5\ht\z@
- \vbox{%
- \hbox to \hsize{%
- \leaders\hrule\@height\fboxrule\ttl@filleft{#3}%
- \ifttl@label\lower.5\ht\z@\box\z@\fi
- \leaders\hrule\@height\fboxrule\ttl@filright{#3}}%
- \vskip-\lineskip
- \ifttl@label\vskip-\@tempdima\fi
- \hbox{%
- \vrule\@width\fboxrule
- \kern-\fboxrule
- \vbox{%
- \ttl@calc\vspace{#3}%
- \leavevmode
- \addtolength\leftskip {#3}\addtolength\leftskip{-#6}%
- \addtolength\rightskip{#3}\addtolength\rightskip{-#7}%
- \strut#4{#8}\kern\z@\strut\@@par
- \ttl@calc\vspace{#3}}%
- \kern-\fboxrule
- \vrule\@width\fboxrule}%
- \hrule\@height\fboxrule}}%
- \@@par\nobreak#5\@@par}
-
-\endinput
diff --git a/Master/texmf-dist/tex/latex/titlesec/leftmargin.tss b/Master/texmf-dist/tex/latex/titlesec/leftmargin.tss
deleted file mode 100644
index bf1844d38a4..00000000000
--- a/Master/texmf-dist/tex/latex/titlesec/leftmargin.tss
+++ /dev/null
@@ -1,62 +0,0 @@
-% +--------------------------------------------------+
-% | Typeset titlesec.tex to get the documentation. |
-% +--------------------------------------------------+
-%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
-%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-
-\ProvidesFile{leftmargin.tss}[2016/03/15]
-
-\gdef\ttlh@leftmargin#1#2#3#4#5#6#7#8{%
- \global\@noskipsectrue
- \addtolength\@tempskipb{#6}%
- \xdef\ttl@makeline##1{\hskip-\the\@tempskipb\relax##1}%
- \leftskip\z@skip
- \rightskip\z@skip
- \ttl@changecentercr
- #1\ifhmode\ttl@hmode@error\fi
- \parindent\z@
- \global\setbox\ttl@box\vtop{%
- \setlength\hsize{#6}%
- \linewidth\hsize
- \everypar{}%
- \color@begingroup
- \ifttl@label{\strut#2\strut}\ttl@calc\hspace{#3}\fi
- \strut#4{#8}\kern\z@\strut\@@par
- \color@endgroup}%
- \advance\@tempskipa\ht\ttl@box
- \advance\@tempskipa\dp\ttl@box
- \advance\@tempskipa-\pagegoal
- \advance\@tempskipa\pagestretch
- \@tempskipb\pagegoal
- \pagegoal-\@tempskipa
- \ifdim\bottomtitlespace<\z@\else
- \def\@textbottom{\vskip\z@\@plus.0001fil}%
- \fi
- \penalty9999
- \pagegoal\@tempskipb
- \dp\ttl@box=\z@
- \gdef\@svsechd##1##2{%
- \llap{\box\ttl@box##2}%
- \if@afterindent\hskip\parindent\fi
- #5}}
-
-\endinput
-
-
-
diff --git a/Master/texmf-dist/tex/latex/titlesec/margin.tss b/Master/texmf-dist/tex/latex/titlesec/margin.tss
deleted file mode 100644
index 862fbfae8ac..00000000000
--- a/Master/texmf-dist/tex/latex/titlesec/margin.tss
+++ /dev/null
@@ -1,61 +0,0 @@
-% +--------------------------------------------------+
-% | Typeset titlesec.tex to get the documentation. |
-% +--------------------------------------------------+
-%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
-%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-
-\ProvidesFile{margin.tss}[2016/03/15]
-
-\gdef\ttlh@margin#1#2#3#4#5#6#7#8{%
- \global\@noskipsectrue
- \addtolength\@tempskipb{#6}%
- \xdef\ttl@makeline##1{\hskip-\the\@tempskipb\relax##1}%
- \leftskip\z@skip
- \rightskip\z@skip
- \ttl@changecentercr
- #1\ifhmode\ttl@hmode@error\fi
- \parindent\z@
- \global\setbox\ttl@box\vtop{%
- \setlength\hsize{#6}%
- \linewidth\hsize
- \everypar{}%
- \color@begingroup
- \ifttl@label{\strut#2\strut}\ttl@calc\hspace{#3}\fi
- \strut#4{#8}\kern\z@\strut\@@par
- \color@endgroup}%
- \advance\@tempskipa\ht\ttl@box
- \advance\@tempskipa\dp\ttl@box
- \advance\@tempskipa-\pagegoal
- \advance\@tempskipa\pagestretch
- \@tempskipb\pagegoal
- \pagegoal-\@tempskipa
- \ifdim\bottomtitlespace<\z@\else
- \def\@textbottom{\vskip\z@\@plus.0001fil}%
- \fi
- \penalty9999
- \pagegoal\@tempskipb
- \dp\ttl@box=\z@
- \gdef\@svsechd##1##2{%
- \llap{\box\ttl@box##2}%
- \if@afterindent\hskip\parindent\fi}}
-
-\endinput
-
-
-
diff --git a/Master/texmf-dist/tex/latex/titlesec/rightmargin.tss b/Master/texmf-dist/tex/latex/titlesec/rightmargin.tss
deleted file mode 100644
index 31fc335d7d5..00000000000
--- a/Master/texmf-dist/tex/latex/titlesec/rightmargin.tss
+++ /dev/null
@@ -1,59 +0,0 @@
-% +--------------------------------------------------+
-% | Typeset titlesec.tex to get the documentation. |
-% +--------------------------------------------------+
-%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
-%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
-%
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-
-\ProvidesFile{rightmargin.tss}[2016/03/15]
-
-\gdef\ttlh@rightmargin#1#2#3#4#5#6#7#8{%
- \global\@noskipsectrue
- \addtolength\@tempskipb{#6}%
- \xdef\ttl@makeline##1{##1\hskip-\the\@tempskipb}%
- \leftskip\z@skip
- \rightskip\z@skip
- \ttl@changecentercr
- #1\ifhmode\ttl@hmode@error\fi
- \parindent\z@
- \global\setbox\ttl@box\vtop{%
- \setlength\hsize{#6}%
- \linewidth\hsize
- \everypar{}%
- \color@begingroup
- \ifttl@label{\strut#2\strut}\ttl@calc\hspace{#3}\fi
- \strut#4{#8}\kern\z@\strut\@@par
- \color@endgroup}%
- \advance\@tempskipa\ht\ttl@box
- \advance\@tempskipa\dp\ttl@box
- \advance\@tempskipa-\pagegoal
- \advance\@tempskipa\pagestretch
- \@tempskipb\pagegoal
- \pagegoal-\@tempskipa
- \ifdim\bottomtitlespace<\z@\else
- \def\@textbottom{\vskip\z@\@plus.0001fil}%
- \fi
- \penalty9999
- \pagegoal\@tempskipb
- \dp\ttl@box=\z@
- \gdef\@svsechd##1##2{%
- \rlap{\hskip\textwidth##2\box\ttl@box}%
- \if@afterindent\hskip\parindent\fi}}
-
-\endinput
diff --git a/Master/texmf-dist/tex/latex/titlesec/titleps.sty b/Master/texmf-dist/tex/latex/titlesec/titleps.sty
index 5de6c411878..2d2a03cbea0 100644
--- a/Master/texmf-dist/tex/latex/titlesec/titleps.sty
+++ b/Master/texmf-dist/tex/latex/titlesec/titleps.sty
@@ -1,49 +1,51 @@
-% +--------------------------------------------------+
-% | Typeset titlesec.tex to get the documentation. |
-% +--------------------------------------------------+
%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
+% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
+% This file may be distributed and/or modified under the conditions of
+% the MIT License. A version can be found at the end of this file.
+%
+% Repository: https://github.com/jbezos/titlesec
%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
%
% Release
% ~~~~~~~
+\ifx\ttl@coreps\@empty\else % START code for package
+
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{titleps}[2016/03/15 v1.1.1 Page styles]
+\ProvidesPackage{titleps}[2019/07/16 v2.11 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
% almost similar. First, some definitions from titlesec.
-\newif\ifttl@ps
-\newif\ifttl@toclabel
+\expandafter\newif\csname ifttl@ps\endcsname
+\expandafter\newif\csname ifttl@toclabel\endcsname
\ttl@toclabeltrue
\def\ttl@calcneg#1#2{%
{\setlength\@tempskipa{#2}%
#1{-\@tempskipa}}}
-\newif\ifttl@premark % to be used in ttlps.def
+\expandafter\newif\csname ifttl@premark\endcsname
\ttl@premarkfalse
+% 2019-02-25. Added the \lastskip stuff, because a mark 'forgets' the
+% last skip.
+
\def\ttl@premark#1#2{%
+ \let\ttl@lastskip\relax
+ \ifvmode
+ \ifdim\lastskip=\z@\else
+ \edef\ttl@lastskip{\the\lastskip}%
+ \vskip-\ttl@lastskip\relax
+ \fi
+ \fi
\protected@xdef\ttl@prevmarks{\ttl@marks}%
\csname#1mark\endcsname{#2}%
+ \ifx\ttl@lastskip\relax\else
+ \vskip\ttl@lastskip\relax
+ \fi
\gdef\ttl@prevmarks{\ttl@marks}}
\let\ttl@savemark\@empty
@@ -82,7 +84,7 @@
\AtBeginDocument{\ttl@atbegin}
% Package options
-
+
\DeclareOption{psfloats}{\let\ttl@replace\@empty} % a flag
\DeclareOption{outermarks}{%
@@ -106,9 +108,688 @@
\let\renewpagestyle\@empty
\let\widenhead\@empty
-\input ttlps.def
+\fi % PAUSE code for package
+
+% START core code
+
+% As before, all marks has two parts but now they don't refer to left or
+% 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 incompatibility between them and \LaTeX{} floats. To overcome
+% 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
+% after the title (straight class); the first part contains the values
+% of current title, but the second one contains the previously stored
+% values in the mark before the title, and the current values in the
+% mark after.
+
+\ifx\ttl@compatps\@undefined\else
+ \PackageWarningNoLine{titlesec}
+ {You are using an old interface for page styles\MessageBreak
+ (or you forgot the package option 'pagestyles').\MessageBreak
+ You could proceed but don't complain if you run\MessageBreak
+ into errors}
+\fi
+
+\ttl@pstrue
+
+\let\parttitle\@empty
+\let\chaptertitle\@empty
+\let\sectiontitle\@empty
+\let\subsectiontitle\@empty
+\let\subsubsectiontitle\@empty
+\let\paragraphtitle\@empty
+\let\subparagraphtitle\@empty
+
+\newcommand\iftitle[1]{%
+ \expandafter\ifx\csname #1title\endcsname\@empty
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
+
+% \newtitlemarks belongs to a nameless markset (ie, \@empty).
+% For named extra marksets see below.
+
+\newcommand\newtitlemark{%
+ \@ifstar{\@tempswafalse\ttl@newmk@i\@empty}%
+ {\@tempswatrue\ttl@newmk@i\@empty}}
+
+\def\ttl@newmk@i#1#2{% markset, macro/var
+ \edef\ttl@a{\expandafter\@gobble\string#2}%
+ \expandafter\ifx\csname\ttl@a\endcsname#2\else
+ \edef\ttl@a{c@#2}%
+ \fi
+ \expandafter\ttl@newmk@ii\expandafter{\ttl@a}{#1}}
+
+\def\ttl@newmk@ii#1#2{% macro/var, markset
+ \expandafter\let\expandafter\ttl@a\csname ttl@mks@#2\endcsname
+ \if@tempswa
+ \expandafter\def\expandafter\ttl@a\expandafter{%
+ \ttl@a
+ \protect\@namedef{#1}{\@nameuse{#1}}}%
+ \else
+ \expandafter\def\expandafter\ttl@a\expandafter{%
+ \ttl@a
+ \protect\@nameuse{#1}=\the\@nameuse{#1}\relax}%
+ \fi
+ \expandafter\let\csname ttl@mks@#2\endcsname\ttl@a}
+
+\let\ttl@mks@\@empty
+\def\ttl@moremarks{\ttl@mks@} % backward compat
+
+\def\ttl@prevmarks{\ttl@marks}
+\let\ttl@marks\relax
+
+% The following command sets the ifthe... commands to
+% be used in heads. When the call is from inside a sectioning
+% command, toclabel is either true (in most of cases) or false
+% (a chapter in the front matter, for example). Otherwise (an
+% explicit \...mark) is false
+
+\def\ttl@setifthe#1{%
+ \expandafter\protected@edef\csname ifthe#1\endcsname{%
+ \ifttl@toclabel
+ \protect\@firstoftwo
+ \else
+ \protect\@secondoftwo
+ \fi}}
+
+% At this point \ttl@toclabel is always false
+
+\ttl@setifthe{part}
+\ttl@setifthe{chapter}
+\ttl@setifthe{section}
+\ttl@setifthe{subsection}
+\ttl@setifthe{subsubsection}
+\ttl@setifthe{paragraph}
+\ttl@setifthe{subparagraph}
+
+% Putting marks
+% -------------
+
+\newtitlemark{\ttl@running}
+\let\ttl@enccode\relax
+\def\ttl@running{\ttl@enccode}
+
+% \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).
+
+\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
+ \let\@mkboth\@gobbletwo
+ \let\ttl@enccode\relax
+ \let\label\relax
+ \let\index\relax
+ \let\glossary\relax
+ \let\ttl@c\mark
+ \def\mark##1{\xdef\ttl@running{\expandafter\@gobble##1}}%
+ \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\let\noexpand\ttl@mb@warn\relax}%
+ \@nameuse{ttl@tem@#1}%
+ \if@nobreak\ifvmode\nobreak\fi\fi
+ \endgroup}
+
+\newcommand\settitlemarks{\@ifstar\ttl@svmarks@s\ttl@svmarks@x}
+
+\def\ttl@svmarks@x#1{\def\ttl@marksset{{#1}}}
+\def\ttl@svmarks@s#1{\def\ttl@marksset{*{#1}}}
+
+\newcommand\setmarks[2]{\settitlemarks{#1,#2}} % back compat
+
+\def\ttl@settopmark#1\@@{%
+ \expandafter\def\csname#1mark\endcsname##1{%
+ \expandafter\gdef\csname#1title\endcsname{##1}%
+ \ttl@setifthe{#1}%
+ \expandafter\let\expandafter\ttl@marks\csname ttl@tm@#1\endcsname
+ \ttl@markboth{#1}}%
+ \global\@namedef{ttl@tm@#1}{%
+ \protect\@namedef{#1title}{\@nameuse{#1title}}%
+ \protect\@namedef{the#1}{\@nameuse{the#1}}%
+ \protect\@namedef{ifthe#1}{\@nameuse{ifthe#1}}}%
+ \def\ttl@elt##1{%
+ \expandafter\ttl@setsubmark\ttl@a\@@{##1}}%
+ \ttl@c}%
+
+\def\ttl@setsubmark#1\@@#2{%
+ \expandafter\g@addto@macro\csname ttl@tm@#2\endcsname{%
+ \protect\@namedef{#1title}{}%
+ \protect\@namedef{the#1}{}%
+ \protect\@namedef{ifthe#1}{\protect\@secondoftwo}}
+ \expandafter\g@addto@macro\csname ttl@tm@#1\endcsname{%
+ \protect\@namedef{#2title}{\@nameuse{#2title}}%
+ \protect\@namedef{the#2}{\@nameuse{the#2}}%
+ \protect\@namedef{ifthe#2}{\@nameuse{ifthe#2}}}}%
+
+\def\ttl@setmarks@x#1{%
+ \let\ttl@c\@empty % sub list
+ \@for\ttl@a:=#1\do{%
+ \expandafter\ttl@settopmark\ttl@a\@@
+ \let\ttl@elt\relax
+ \xdef\ttl@c{\ttl@c\ttl@elt{\ttl@a}}}%
+ \@for\ttl@a:=#1\do{%
+ \expandafter\g@addto@macro\csname ttl@tm@\ttl@a\endcsname{%
+ \ttl@moremarks}}}
+
+\def\ttl@setmarks@s#1{% Solo con extramarks
+ \PackageError{titleps}%
+ {You need `extramarks' for \string\settitlemarks*}%
+ {\string\settitlemarks* requires the package option `extramarks'}}
+
+\newcommand\pretitlemark{%
+ \global\ttl@premarktrue
+ \@ifstar{\ttl@pretitlemark\z@}%
+ {\ttl@pretitlemark\@ne}}
+
+\def\ttl@pretitlemark#1#2#3{%
+ \addtocounter{#2}#1%
+ \ttl@premark{#2}{#3}%
+ \addtocounter{#2}{-#1}}
+
+% Rules
+% -----
+
+\newcommand\headrule{\setheadrule{.4\p@}}
+\newcommand\footrule{\setfootrule{.4\p@}}
+
+\newcommand\setheadrule[1]{%
+ \ifdim#1=\z@
+ \let\makeheadrule\@empty
+ \else
+ \def\makeheadrule{\rule[-.3\baselineskip]{\linewidth}{#1}}%
+ \fi}
+\newcommand\setfootrule[1]{%
+ \ifdim#1=\z@
+ \let\makefootrule\@empty
+ \else
+ \def\makefootrule{\rule[.7\baselineskip]{\linewidth}{#1}}%
+ \fi}
+
+\renewcommand\newpagestyle[1]{%
+ \begingroup
+ \catcode`\^^M=9
+ \@ifnextchar[%
+ {\ttl@pagestyle\newcommand{#1}}%
+ {\ttl@pagestyle\newcommand{#1}[]}}
+
+\renewcommand\renewpagestyle[1]{%
+ \begingroup
+ \catcode`\^^M=9
+ \@ifnextchar[%
+ {\ttl@pagestyle\renewcommand{#1}}%
+ {\ttl@pagestyle\renewcommand{#1}[]}}
+
+\def\ttl@pagestyle#1#2[#3]#4{%
+ \endgroup
+ \expandafter#1\csname ps@#2\endcsname{%
+ \ttl@defaultps
+ \def\ttl@headfmt{#3}%
+ #4%
+ \def\settitlemarks{\@ifstar\ttl@svmarks@s\ttl@svmarks@x}}}
+
+\def\ttl@userunning#1#2{\csname ttlr@#1#2\endcsname}
+
+\def\ttl@defaultps{%
+ \let\makeheadrule\@empty
+ \let\makefootrule\@empty
+ \def\@mkboth{\ttl@savemark\@gobbletwo}%
+ \def\@oddfoot{\ttl@userunning of}%
+ \def\@evenfoot{\ttl@userunning ef}%
+ \def\@oddhead{\ttl@userunning oh}%
+ \def\@evenhead{\ttl@userunning eh}%
+ \def\ttlr@of{\ttl@makefoot\@empty\@@\ttl@hiol\ttl@hior}%
+ \def\ttlr@ef{\ttl@makefoot\@empty\@@\ttl@hiel\ttl@hier}%
+ \def\ttlr@oh{\ttl@makehead\@empty\@@\ttl@hiol\ttl@hior}%
+ \def\ttlr@eh{\ttl@makehead\@empty\@@\ttl@hiel\ttl@hier}%
+ \let\ttlr@of@b\relax \let\ttlr@of@p\relax
+ \let\ttlr@ef@b\relax \let\ttlr@ef@p\relax
+ \let\ttlr@oh@t\relax \let\ttlr@oh@p\relax
+ \let\ttlr@eh@t\relax \let\ttlr@eh@p\relax
+ \def\settitlemarks{\@ifstar\ttl@setmarks@s\ttl@setmarks@x}%
+ \expandafter\settitlemarks\ttl@marksset}
+
+\@ifundefined{chapter}%
+ {\settitlemarks{section,subsection}}%
+ {\settitlemarks{chapter,section}}
+
+\newcommand\usepage{\protect\thepage} % back compat
+
+\newcommand\toptitlemarks{\expandafter\@secondoftwo\firstmark{}{}{}}
+\def\firsttitlemarks{%
+ \toks@\expandafter\expandafter\expandafter{%
+ \expandafter\@secondoftwo \firstmark{}{}{}}%
+ \@temptokena\expandafter\expandafter\expandafter{%
+ \expandafter\@secondoftwo \botmark{}{}{}}%
+ \edef\ttl@a{\the\toks@}%
+ \edef\ttl@b{\the\@temptokena}%
+ \ifx\ttl@a\ttl@b
+ \expandafter\@secondoftwo\firstmark{}{}{}%
+ \else
+ \expandafter\@firstoftwo \firstmark{}{}{}%
+ \fi}
+\newcommand\bottitlemarks{\expandafter\@secondoftwo\botmark{}{}{}}
+\newcommand\nexttoptitlemarks{\expandafter\@firstoftwo\botmark{}{}{}}
+\newcommand\outertitlemarks{%
+ \if@twoside
+ \ifodd\c@page\relax
+ \bottitlemarks
+ \else
+ \toptitlemarks
+ \fi
+ \else
+ \toptitlemarks
+ \fi}
+\newcommand\innertitlemarks{%
+ \if@twoside
+ \ifodd\c@page\relax
+ \firsttitlemarks
+ \else
+ \bottitlemarks
+ \fi
+ \else
+ \bottitlemarks
+ \fi}
+
+\def\ttl@duplthreeargs#1#2#3#4{#1[#2][#3][#4]{#2}{#3}{#4}}
+\def\ttl@dupltwoargs#1#2#3{#1[#2][#3]{#2}{#3}}
+\def\ttl@duplthreeargsrev#1#2#3#4{#1[#4][#3][#2]{#2}{#3}{#4}}
+\def\ttl@dupltwoargsrev#1#2#3{#1[#3][#2]{#2}{#3}}
+
+\def\ttl@setany#1{%
+ \@ifstar{\ttl@duplthreeargsrev#1}%
+ {\@ifnextchar[{#1}{\ttl@duplthreeargs#1}}}
+
+\newcommand\setfoot{\ttl@setany\ttl@setfoot}
+\newcommand\sethead{\ttl@setany\ttl@sethead}
+
+\def\ttl@setfoot[#1][#2][#3]#4#5#6{%
+ \def\ttlr@ef{\ttl@makefoot{#1}{#2}{#3}\@@\ttl@hiel\ttl@hier}%
+ \def\ttlr@of{\ttl@makefoot{#4}{#5}{#6}\@@\ttl@hiol\ttl@hior}}
+
+\def\ttl@sethead[#1][#2][#3]#4#5#6{%
+ \def\ttlr@eh{\ttl@makehead{#1}{#2}{#3}\@@\ttl@hiel\ttl@hier}%
+ \def\ttlr@oh{\ttl@makehead{#4}{#5}{#6}\@@\ttl@hiol\ttl@hior}}
+
+\def\ttl@headinline#1#2#3{%
+ \ttl@headfmt
+ \def\ttl@a{#1#3}\def\ttl@b{#2}%
+ \ifx\ttl@a\@empty
+ \hfil{#2}\hfil
+ \else\ifx\ttl@b\@empty
+ {#1}\hfil{#3}%
+ \else
+ \sbox\z@ {#1}%
+ \sbox\tw@{#3}%
+ \copy\z@
+ \ifdim\wd\z@<\wd\tw@
+ \kern-\wd\z@\kern\wd\tw@
+ \fi
+ \hfil{#2}\hfil
+ \ifdim\wd\z@>\wd\tw@
+ \kern-\wd\tw@\kern\wd\z@
+ \fi
+ \box\tw@
+ \fi\fi}
+
+\def\ttl@makeboth#1#2#3#4{%
+ \ttl@calcneg\hspace{#3}%
+ \normalsize
+ \linewidth\textwidth
+ \addtolength\linewidth{#3}%
+ \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@
+ \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}}%
-% Raise error if the following are used
+\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}}}
+
+\def\ttl@widenhd[#1][#2]#3#4{%
+ \def\ttl@hiel{#1}\def\ttl@hier{#2}%
+ \def\ttl@hiol{#3}\def\ttl@hior{#4}}
+
+\let\setheadindent\widenhead
+
+\def\ttl@hiel{\z@}\def\ttl@hier{\z@}
+\def\ttl@hiol{\z@}\def\ttl@hior{\z@}
+
+% A tool:
+
+\def\ifsamemark#1#2{%
+ {#1\global\let\ttl@c#2}%
+ \ifx\ttl@c#2%
+ \expandafter\@firstoftwo
+ \else
+ \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
+% ===========
+
+\ifx\ttl@fetchmark\@empty
+
+\ifx\newmarks\@undefined
+ \PackageInfo{titleps}{%
+ You have requested `extramarks' but etex or similar\MessageBreak
+ has not been loaded. I'll do it for you.}
+ \RequirePackage{etex}
+\fi
+
+\def\ttl@setmarks@s#1{%
+ \@for\ttl@a:=#1\do{%
+ \@ifundefined{ttl@mkc@\ttl@a}{%
+ \expandafter\newmarks\csname ttl@mkc@\ttl@a\endcsname}{}%
+ \expandafter\xdef\csname ttl@tem@\ttl@a\endcsname{%
+ \marks\expandafter\noexpand\csname ttl@mkc@\ttl@a\endcsname
+ {\noexpand\@themark}}}%
+ \ttl@setmarks@x{#1}}%
+
+\newcommand\newmarkset[1]{%
+ \expandafter\newmarks\csname ttl@mkc@#1\endcsname
+ \@namedef{ttl@mks@#1}{}%
+ \@namedef{ttl@premks@#1}{\@nameuse{ttl@mks@#1}}}
+
+\newcommand\newextramark{%
+ \@ifstar{\@tempswafalse\ttl@newmk@i}%
+ {\@tempswatrue\ttl@newmk@i}}
+
+\def\ttl@extramark#1{%
+ \begingroup
+ \let\protect\@unexpandable@protect
+ \let\@mkboth\@gobbletwo
+ \let\label\relax
+ \let\index\relax
+ \let\glossary\relax\endgroup}
+
+\newcommand\extramark[1]{%
+ \begingroup
+ \let\protect\@unexpandable@protect
+ \let\@mkboth\@gobbletwo
+ \let\label\relax
+ \let\index\relax
+ \let\glossary\relax
+ \marks\csname ttl@mkc@#1\endcsname{%
+ {\@nameuse{ttl@mks@#1}}%
+ {\@nameuse{ttl@mks@#1}}}%
+ \expandafter\xdef\csname ttl@premks@#1\endcsname
+ {\@nameuse{ttl@mks@#1}}%
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi}%
+
+\newcommand\preextramark[1]{%
+ \begingroup
+ \let\protect\@unexpandable@protect
+ \let\@mkboth\@gobbletwo
+ \let\label\relax
+ \let\index\relax
+ \let\glossary\relax
+ \marks\csname ttl@mkc@#1\endcsname{%
+ {\csname ttl@mks@#1\endcsname}%
+ {\csname ttl@premks@#1\endcsname}}%
+ \endgroup
+ \if@nobreak\ifvmode\nobreak\fi\fi}
+
+\newcommand\newshortmark[1]{%
+ \newmarkset{\string#1}%
+ \newextramark{\string#1}#1}
+
+\newcommand\shortmark[1]{\extramark{\string#1}}
+\newcommand\preshortmark[1]{\preextramark{\string#1}}
+
+\newcommand\topshortmark[1]{{\topextramarks{\string#1}#1}}
+\newcommand\firstshortmark[1]{{\firstextramarks{\string#1}#1}}
+\newcommand\botshortmark[1]{{\botextramarks{\string#1}#1}}
+\newcommand\nexttopshortmark[1]{{\nexttopextramarks{\string#1}#1}}
+
+\def\ttl@fetchmark#1#2#3{%
+ \expandafter#1#2\csname ttl@mkc@#3\endcsname{}{}{}}
+
+\newcommand\topextramarks[1]{\ttl@fetchmark\@secondoftwo\firstmarks{#1}}
+\newcommand\firstextramarks[1]{%
+ \toks@\expandafter\expandafter\expandafter{%
+ \ttl@fetchmark\@secondoftwo\firstmarks{#1}}%
+ \@temptokena\expandafter\expandafter\expandafter{%
+ \ttl@fetchmark\@secondoftwo\botmarks{#1}}%
+ \edef\ttl@a{\the\toks@}%
+ \edef\ttl@b{\the\@temptokena}%
+ \ifx\ttl@a\ttl@b
+ \ttl@fetchmark\@secondoftwo\firstmarks{#1}%
+ \else
+ \ttl@fetchmark\@firstoftwo\firstmarks{#1}%
+ \fi}
+\newcommand\botextramarks[1]{\ttl@fetchmark\@secondoftwo\botmarks{#1}}
+\newcommand\nexttopextramarks[1]{\ttl@fetchmark\@firstoftwo\botmarks{#1}}
+
+\newcommand\outerextramarks[1]{%
+ \if@twoside
+ \ifodd\c@page\relax
+ \botextramarks{#1}%
+ \else
+ \topextramarks{#1}%
+ \fi
+ \else
+ \topextramarks{#1}%
+ \fi}
+\newcommand\innerextramarks[1]{%
+ \if@twoside
+ \ifodd\c@page\relax
+ \firstextramarks{#1}%
+ \else
+ \botextramarks{#1}%
+ \fi
+ \else
+ \botextramarks{#1}%
+ \fi}
+
+\fi
+
+% ======
+% FLOATS
+% ======
+%
+% Pagestyles with floats. There macros are defined only with the
+% psfloats package option.
+
+\ifx\ttl@replace\@undefined\else
+
+% User interface
+
+ \newcommand\setfloatfoot{%
+ \let\ttl@c\@empty % <- current float, empty if general
+ \ttl@setany\ttl@setftfoot}
+
+ \newcommand\setfloathead{%
+ \let\ttl@c\@empty % <- current float, empty if general
+ \ttl@setany\ttl@setfthead}
+
+ \def\ttl@setftfoot[#1][#2][#3]#4#5#6#7{%
+ \@ifnextchar[{\ttl@setftfoot@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}}%
+ {\ttl@setftfoot@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}[bp]}}
+
+ \def\ttl@setfthead[#1][#2][#3]#4#5#6#7{%
+ \@ifnextchar[{\ttl@setfthead@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}}%
+ {\ttl@setfthead@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}[tp]}}
+
+ \def\ttl@setftfoot@i#1#2#3#4#5#6#7[#8]{%
+ \@tfor\ttl@b:=#8\do{%
+ \@namedef{ttlr@ef@\ttl@b\ttl@c}%
+ {#7\ttl@makefoot{#1}{#2}{#3}\@@\ttl@hiel\ttl@hier}%
+ \@namedef{ttlr@of@\ttl@b\ttl@c}%
+ {#7\ttl@makefoot{#4}{#5}{#6}\@@\ttl@hiol\ttl@hior}}}
+
+ \def\ttl@setfthead@i#1#2#3#4#5#6#7[#8]{%
+ \@tfor\ttl@b:=#8\do{%
+ \@namedef{ttlr@eh@\ttl@b\ttl@c}%
+ {#7\ttl@makehead{#1}{#2}{#3}\@@\ttl@hiel\ttl@hier}%
+ \@namedef{ttlr@oh@\ttl@b\ttl@c}%
+ {#7\ttl@makehead{#4}{#5}{#6}\@@\ttl@hiol\ttl@hior}}}
+
+ \newcommand\nextfloathead{%
+ \ttl@nextfree % returns ttl@c with the next float
+ \ttl@setany\ttl@setfthead}
+
+ \newcommand\nextfloatfoot{%
+ \ttl@nextfree % returns ttl@c with the next float
+ \ttl@setany\ttl@setftfoot}
+
+% Compat mode with floatps
+
+ \ifx\ttl@replace\space
+
+ \let\ttl@setnewfoot\ttl@setftfoot
+ \let\ttl@setnewhead\ttl@setfthead
+
+ \def\ttl@setftfoot[#1][#2][#3]#4#5#6{%
+ \ttl@setnewfoot[#1][#2][#3]{#4}{#5}{#6}{}}
+ \def\ttl@setfthead[#1][#2][#3]#4#5#6{%
+ \ttl@setnewhead[#1][#2][#3]{#4}{#5}{#6}{}}
+
+ \fi
+
+% The simple default value of \ttl@userunning is
+% replaced by one more elaborated
+
+ \def\ttl@userunning#1#2{%
+ \if@fcolmade % From a post by D. Arseneau to comp.text.tex
+ \def\@elt##1{\edef\ttl@pageft{\string##1}}%
+ \@flsucceed
+ \let\@elt\relax
+ \if#2h%
+ \ttl@replace #1hp\ttl@pageft
+ \else
+ \ttl@replace #1fp\ttl@pageft
+ \ttl@killftps\ttl@pageft
+ \fi
+ \else\if#2h%
+ \ifx\ttl@topft\@empty\else
+ \ttl@replace #1ht\ttl@topft
+ \fi
+ \else
+ \ifx\ttl@botft\@empty\else
+ \ttl@replace #1fb\ttl@botft
+ \fi
+ \fi\fi
+ \csname ttlr@#1#2\endcsname}
+
+% [Don't move above as \ttl@replace is used as a flag.]
+
+ \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}}}}%
+ {\csname ttlr@xx@x#4\endcsname\@gobble
+ {\expandafter\let\csname ttlr@#1#2\expandafter\endcsname
+ \csname ttlr@#1#2@#3#4\endcsname}}}
+
+ \def\ttl@nextfree{%
+ \def\@elt##1{%
+ \edef\ttl@c{\string##1}%
+ \let\@elt\@gobble}%
+ \@freelist
+ \let\@elt\relax
+ \@ifundefined{ttlr@xx@x\ttl@c}%
+ {\expandafter\let\csname ttlr@xx@x\ttl@c\endcsname\@secondoftwo
+ \@tfor\ttl@a:={eh@t}{oh@t}{ef@b}{of@b}{eh@p}{oh@p}{ef@p}{of@p}\do{%
+ \expandafter\global\expandafter
+ \let\csname ttlr@\ttl@a\ttl@c\endcsname\relax}}{}}
+
+ \def\ttl@killftps#1{%
+ \expandafter\global\expandafter
+ \let\csname ttlr@xx@x#1\endcsname\relax}
+
+ \let\ttl@topft\@empty
+ \let\ttl@botft\@empty
+ \let\ttl@pageft\@empty
+
+ \def\ttl@combinefloats{%
+ \ifx\@toplist\@empty\else
+ \def\@elt##1{%
+ \edef\ttl@topft{\string##1}%
+ \def\@elt####1{\ttl@killftps{\string####1}}}%
+ \@toplist
+ \fi
+ \ifx\@botlist\@empty\else
+ \def\@elt##1{%
+ \def\@elt####1{%
+ \def\@elt####1{\ttl@killftps\ttl@botft}%
+ \edef\ttl@botft{\string####1}}%
+ \edef\ttl@botft{\string##1}}%
+ \@botlist
+ \fi
+ \let\@elt\relax
+ \ttl@combinefloats@x}
+
+ \AtBeginDocument{%
+ \let\ttl@combinefloats@x\@combinefloats
+ \let\@combinefloats\ttl@combinefloats}
+
+\fi
+
+% END core code
+
+\ifx\ttl@coreps\@empty\else % CONTINUE code for package
+
+% Raise error if the following are used without titlesec
\DeclareRobustCommand\ttl@naerror[1]{%
\PackageError{titleps}%
@@ -129,4 +810,28 @@
\ttl@setifthe{paragraph}
\ttl@setifthe{subparagraph}
-\endinput \ No newline at end of file
+\fi
+
+\endinput
+
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/Master/texmf-dist/tex/latex/titlesec/titlesec.sty b/Master/texmf-dist/tex/latex/titlesec/titlesec.sty
index 67960ef25d4..f1f943fd211 100644
--- a/Master/texmf-dist/tex/latex/titlesec/titlesec.sty
+++ b/Master/texmf-dist/tex/latex/titlesec/titlesec.sty
@@ -1,24 +1,10 @@
-% +--------------------------------------------------+
-% | Typeset titlesec.tex to get the documentation. |
-% +--------------------------------------------------+
%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
+% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
+% This file may be distributed and/or modified under the conditions of
+% the MIT License. A version can be found at the end of this file.
%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
+% Repository: https://github.com/jbezos/titlesec
%
% Notes
% ~~~~~
@@ -48,7 +34,7 @@
% ~~~~~~~
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{titlesec}[2016/03/21 v2.10.2 Sectioning titles]
+\ProvidesPackage{titlesec}[2019/07/16 v2.11 Sectioning titles]
% Initialization
% ~~~~~~~~~~~~~~
@@ -87,11 +73,7 @@
\edef\ttl@b{\expandafter\@gobble\string#1}%
\let\ttl@a\ttl@b
\else
- \makeatletter
- \edef\ttl@d{%
- \noexpand\input{ttlkeys.def}%
- \catcode`\noexpand\@=\the\catcode`\@}%
- \ttl@d
+ \ttl@keys
\ttl@getkeys{#1}{#2}%
\fi}
@@ -282,7 +264,7 @@
\global\let\ttl@fn\@empty
\begingroup
\if@inlabel\else % Keep item's \everypar
- \everypar{\setbox\z@\lastbox\strut}%
+ \everypar{\setbox\z@\lastbox\ttl@strut}%
\fi
\let\ttl@straight@i\ttl@nest@error
\let\ttl@top@i \ttl@nest@error
@@ -341,11 +323,24 @@
\newif\ifttl@premark % to be used in ttlps.def
\ttl@premarkfalse
+% 2019-06-20. Added the \lastskip stuff, because a mark 'forgets' the
+% last skip.
+
\def\ttl@premark#1#2{%
+ \let\ttl@lastskip\relax
+ \ifvmode
+ \ifdim\lastskip=\z@\else
+ \edef\ttl@lastskip{\the\lastskip}%
+ \vskip-\ttl@lastskip\relax
+ \fi
+ \fi
\protected@xdef\ttl@prevmarks{\ttl@marks}%
\ttl@blinemarks
\csname#1mark\endcsname{#2}%
\ttl@elinemarks
+ \ifx\ttl@lastskip\relax\else
+ \vskip\ttl@lastskip\relax
+ \fi
\gdef\ttl@prevmarks{\ttl@marks}}
% Must be preceded by a default \ttl@savewrite, which is used
@@ -611,7 +606,6 @@
\fi
\ignorespaces}
-
% \def\ttl@noskipsectrue{%
% \if@noskipsec
% \PackageError{titlesec}{Invalid shape for top class}%
@@ -626,7 +620,7 @@
% | S H A P E S |
% +-----------------+
%
-% % Reformatting Titles: Interface
+% Reformatting Titles: Interface
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% The surrounding space is stored in a macro
@@ -694,10 +688,14 @@
\begingroup
\makeatletter
\InputIfFileExists{#1.tss}{}{%
- \PackageError{titlesec}{Unknown shape}%
- {Shapes are defined in files with extension tss\MessageBreak
- Either you have misspelled the shape\MessageBreak
- or there is no a #1.tss file}}%
+ \@ifundefined{ttlhx@#1}%
+ {\PackageError{titlesec}{Unknown shape}%
+ {Shapes are defined in files with extension tss\MessageBreak
+ Either you have misspelled the shape\MessageBreak
+ or there is no a #1.tss file}}%
+ {\global\expandafter
+ \let\csname ttlh@#1\expandafter\endcsname
+ \csname ttlhx@#1\endcsname}}%
\endgroup}{}%
\@temptokena{#2}%
\ifttl@explicit
@@ -725,21 +723,24 @@
% With the option explicit, #4 contains the title and #8 is
% empty.
+\def\ttl@strut{\strut}
+
\def\ttlh@display#1#2#3#4#5#6#7#8{%
\gdef\ttl@makeline##1{\ttl@calc\hspace{#6}##1\ttl@calc\hspace{#7}}%
\setlength\leftskip{#6}%
\setlength\rightskip{#7}%
\interlinepenalty\@M
\ttl@changecentercr
+ \ttl@defnostruts
\ttl@beginlongest
#1\ifhmode\ttl@hmode@error\fi
\ttl@glcmds
\parindent\z@
\ifttl@label
- {#2\strut\@@par}\nobreak\ttl@calc\vspace{#3}%
+ {#2\ttl@strut\@@par}\nobreak\ttl@calc\vspace{#3}%
\fi
#4{#8}%
- \kern\z@\strut\@@par
+ \kern\z@\ttl@strut\@@par
\nobreak\ttl@midlongest#5\@@par
\ttl@endlongest}
@@ -749,6 +750,7 @@
\setlength\rightskip{#7}%
\interlinepenalty\@M
\ttl@changecentercr
+ \ttl@defnostruts
\ttl@beginlongest
#1{\ifhmode\ttl@hmode@error\fi
\ttl@glcmds
@@ -756,12 +758,12 @@
\begingroup
\ifttl@label
\noindent
- \sbox\z@{#2\strut\ttl@calc\hspace{#3}}%
+ \sbox\z@{#2\ttl@strut\ttl@calc\hspace{#3}}%
\hangindent\wd\z@
\box\z@
\fi
#4{#8}%
- \kern\z@\strut\@@par
+ \kern\z@\ttl@strut\@@par
\endgroup
\nobreak\ttl@midlongest#5\@@par}%
\ttl@endlongest}
@@ -770,13 +772,250 @@
\global\@noskipsectrue
\gdef\ttl@makeline##1{##1}%
\ttl@changecentercr
+ \ttl@defnostruts
#1{\ifhmode\ttl@hmode@error\fi
\global\sbox\ttl@box{%
\ttl@calc\hspace{#6}%
- \ifttl@label{\strut#2}\ttl@calc\hspace{#3}\fi
+ \ifttl@label{\ttl@strut#2}\ttl@calc\hspace{#3}\fi
#4{#8}#5\unskip}}%
\gdef\@svsechd{\unhbox\ttl@box}}
+% ----------
+
+\gdef\ttlhx@block#1#2#3#4#5#6#7#8{%
+ \gdef\ttl@makeline##1{\ttl@calc\hspace{#6}##1\ttl@calc\hspace{#7}}%
+ \setlength\leftskip{#6}%
+ \setlength\rightskip{#7}%
+ \interlinepenalty\@M
+ \ttl@changecentercr
+ \ttl@defnostruts
+ \ttl@beginlongest
+ #1% \ifhmode\ttl@hmode@error\fi
+ \ttl@glcmds
+ \parindent\z@
+ \leavevmode
+ \ifttl@label
+ {#2}%
+ \setlength\@tempskipa{#3}%
+ \ifdim\@tempskipa=\z@\else\ttl@calc\hspace{#3}\fi
+ \fi
+ #4{#8}%
+ \kern\z@\ttl@strut\@@par
+ \nobreak\ttl@midlongest#5\@@par
+ \ttl@endlongest}
+
+
+\gdef\ttlhx@frame#1#2#3#4#5#6#7#8{%
+ \def\ttl@filleft##1{\hfill}%
+ \def\ttl@filright##1{\hfill}%
+ \gdef\ttl@makeline##1{%
+ \ttl@calc\hspace{#6}##1\ttl@calc\hspace{#7}}%
+ \interlinepenalty\@M
+ \ttl@changecentercr
+ \ttl@defnostruts
+ #1\ifhmode\ttl@hmode@error\fi
+ \parindent\z@
+ \leavevmode
+ \@tempdima\fboxrule
+ \addtolength\@tempdima{#3}%
+ \setlength\leftskip{#6}%
+ \setlength\rightskip{#7}%
+ \lower\@tempdima\hbox{%
+ \everypar{}%
+ \setbox\z@\hbox{#2}%
+ \addtolength\hsize{-#6}%
+ \addtolength\hsize{-#7}%
+ \@tempdima\dp\z@ % 2002/3/22
+ \advance\@tempdima.5\ht\z@
+ \vbox{%
+ \hbox to \hsize{%
+ \leaders\hrule\@height\fboxrule\ttl@filleft{#3}%
+ \ifttl@label\lower.5\ht\z@\box\z@\fi
+ \leaders\hrule\@height\fboxrule\ttl@filright{#3}}%
+ \vskip-\lineskip
+ \ifttl@label\vskip-\@tempdima\fi
+ \hbox{%
+ \vrule\@width\fboxrule
+ \kern-\fboxrule
+ \vbox{%
+ \ttl@calc\vspace{#3}%
+ \leavevmode
+ \addtolength\leftskip {#3}\addtolength\leftskip{-#6}%
+ \addtolength\rightskip{#3}\addtolength\rightskip{-#7}%
+ \ttl@strut#4{#8}\kern\z@\ttl@strut\@@par
+ \ttl@calc\vspace{#3}}%
+ \kern-\fboxrule
+ \vrule\@width\fboxrule}%
+ \hrule\@height\fboxrule}}%
+ \@@par\nobreak#5\@@par}
+
+\gdef\ttlhx@leftmargin#1#2#3#4#5#6#7#8{%
+ \global\@noskipsectrue
+ \addtolength\@tempskipb{#6}%
+ \xdef\ttl@makeline##1{\hskip-\the\@tempskipb\relax##1}%
+ \leftskip\z@skip
+ \rightskip\z@skip
+ \ttl@changecentercr
+ \ttl@defnostruts
+ #1\ifhmode\ttl@hmode@error\fi
+ \parindent\z@
+ \global\setbox\ttl@box\vtop{%
+ \setlength\hsize{#6}%
+ \linewidth\hsize
+ \everypar{}%
+ \color@begingroup
+ \ifttl@label{\ttl@strut#2\ttl@strut}\ttl@calc\hspace{#3}\fi
+ \ttl@strut#4{#8}\kern\z@\ttl@strut\@@par
+ \color@endgroup}%
+ \advance\@tempskipa\ht\ttl@box
+ \advance\@tempskipa\dp\ttl@box
+ \advance\@tempskipa-\pagegoal
+ \advance\@tempskipa\pagestretch
+ \@tempskipb\pagegoal
+ \pagegoal-\@tempskipa
+ \ifdim\bottomtitlespace<\z@\else
+ \def\@textbottom{\vskip\z@\@plus.0001fil}%
+ \fi
+ \penalty9999
+ \pagegoal\@tempskipb
+ \dp\ttl@box=\z@
+ \gdef\@svsechd##1##2{%
+ \llap{\box\ttl@box##2}%
+ \if@afterindent\hskip\parindent\fi
+ #5}}
+
+\let\ttlhx@margin\ttlhx@leftmargin
+
+\gdef\ttlhx@rightmargin#1#2#3#4#5#6#7#8{%
+ \global\@noskipsectrue
+ \addtolength\@tempskipb{#6}%
+ \xdef\ttl@makeline##1{##1\hskip-\the\@tempskipb}%
+ \leftskip\z@skip
+ \rightskip\z@skip
+ \ttl@changecentercr
+ \ttl@defnostruts
+ #1\ifhmode\ttl@hmode@error\fi
+ \parindent\z@
+ \global\setbox\ttl@box\vtop{%
+ \setlength\hsize{#6}%
+ \linewidth\hsize
+ \everypar{}%
+ \color@begingroup
+ \ifttl@label{\ttl@strut#2\ttl@strut}\ttl@calc\hspace{#3}\fi
+ \ttl@strut#4{#8}\kern\z@\ttl@strut\@@par
+ \color@endgroup}%
+ \advance\@tempskipa\ht\ttl@box
+ \advance\@tempskipa\dp\ttl@box
+ \advance\@tempskipa-\pagegoal
+ \advance\@tempskipa\pagestretch
+ \@tempskipb\pagegoal
+ \pagegoal-\@tempskipa
+ \ifdim\bottomtitlespace<\z@\else
+ \def\@textbottom{\vskip\z@\@plus.0001fil}%
+ \fi
+ \penalty9999
+ \pagegoal\@tempskipb
+ \dp\ttl@box=\z@
+ \gdef\@svsechd##1##2{%
+ \rlap{\hskip\textwidth##2\box\ttl@box}%
+ \if@afterindent\hskip\parindent\fi}}
+
+\gdef\ttlhx@wrap#1#2#3#4#5#6#7#8{%
+ \global\@noskipsectrue
+ \gdef\ttl@makeline##1{##1}%
+ \ttl@changecentercr
+ \ttl@defnostruts
+ \begingroup
+ #1\ifhmode\ttl@hmode@error\fi
+ \titlewidth\z@
+ \def\\{\@ifstar{\@ifnextchar[{\ttl@bs}{\newline}}%
+ {\@ifnextchar[{\ttl@bs}{\newline}}}%
+ \def\ttl@bs[##1]{\newline}%
+ \let\@centercr\\%
+ \advance\rightskip 1\leftskip plus 1fil
+ \leftskip=\z@
+ \parindent\z@
+ \let\iftitlemeasuring\@firstoftwo
+ \global\setbox\ttl@box\vtop{\setlength\hsize{#6}%
+ \color@begingroup
+ \ifttl@label{#2}\ttl@calc\hspace{#3}\fi
+ #4{#8}\kern\z@\ttl@strut
+ \@@par
+ \color@endgroup}%
+ \let\iftitlemeasuring\@secondoftwo
+ \ttl@boxprocess
+ \global\titlewidth\titlewidth
+ \global\titlewidthfirst\titlewidthfirst
+ \global\titlewidthlast\titlewidthlast
+ \endgroup
+ \edef\ttl@maxdimen{\the\titlewidth}%
+ #1\ifhmode\ttl@hmode@error\fi
+ \global\setbox\ttl@box\vtop{\setlength\hsize{\ttl@maxdimen}%
+ \color@begingroup
+ \ifttl@label{#2}\ttl@calc\hspace{#3}\fi#4{#8}\kern\z@\ttl@strut
+ \@@par
+ \color@endgroup}%
+ \advance\@tempskipa1.5\baselineskip
+ \advance\@tempskipa\ht\ttl@box
+ \advance\@tempskipa\dp\ttl@box
+ \advance\@tempskipa-\pagegoal
+ \advance\@tempskipa\pagestretch
+ \@tempskipb\pagegoal
+ \pagegoal-\@tempskipa
+ \ifdim\bottomtitlespace<\z@\else
+ \def\@textbottom{\vskip\z@\@plus.0001fil}%
+ \fi
+ \penalty9999
+ \pagegoal\@tempskipb
+ \@tempdima\ht\ttl@box \advance\@tempdima\dp\ttl@box
+ \@tempdimb\@tempdima
+ \divide\@tempdima\baselineskip \count@\@tempdima
+ \advance\count@
+ \ifdim\@tempdimb<\the\count@.5\baselineskip\@ne\else\tw@\fi
+ \dp\ttl@box=\z@
+ \xdef\@svsechd##1##2{%
+ \noexpand\llap{\box\ttl@box##2}%
+ \setbox\z@\hbox{\hskip\ttl@maxdimen\relax##2}%
+ \global\hangindent\wd\z@
+ \global\hangafter-\the\count@\relax}}
+
+\gdef\ttlhx@drop#1#2#3#4#5#6#7#8{%
+ \global\@noskipsectrue
+ \gdef\ttl@makeline##1{##1}%
+ \ttl@changecentercr
+ \ttl@defnostruts
+ #1\ifhmode\ttl@hmode@error\fi
+ \parindent\z@
+ \global\setbox\ttl@box\vtop{\setlength\hsize{#6}%
+ \color@begingroup
+ \ifttl@label{#2}\ttl@calc\hspace{#3}\fi
+ #4{#8}\kern\z@\ttl@strut
+ \@@par
+ \color@endgroup}%
+ \advance\@tempskipa1.5\baselineskip
+ \advance\@tempskipa\ht\ttl@box
+ \advance\@tempskipa\dp\ttl@box
+ \advance\@tempskipa-\pagegoal
+ \advance\@tempskipa\pagestretch
+ \@tempskipb\pagegoal
+ \pagegoal-\@tempskipa
+ \ifdim\bottomtitlespace<\z@\else
+ \def\@textbottom{\vskip\z@\@plus.0001fil}%
+ \fi
+ \penalty9999
+ \pagegoal\@tempskipb
+ \@tempdima\ht\ttl@box \advance\@tempdima\dp\ttl@box
+ \@tempdimb\@tempdima
+ \divide\@tempdima\baselineskip \count@\@tempdima
+ \advance\count@
+ \ifdim\@tempdimb<\the\count@.5\baselineskip\@ne\else\tw@\fi
+ \dp\ttl@box=\z@
+ \xdef\@svsechd##1##2{%
+ \noexpand\llap{\box\ttl@box##2}%
+ \setbox\z@\hbox{\noexpand\ttl@calc\noexpand\hspace{#6}\relax##2}%
+ \global\hangindent\wd\z@
+ \global\hangafter-\the\count@\relax}}
+
% +-----------------+
% | T O O L S |
% +-----------------+
@@ -913,11 +1152,17 @@
\newcommand\wordsep{\fontdimen\tw@\font \@plus
\fontdimen\thr@@\font \@minus \fontdimen4\font}
+% Struts.
+% ~~~~~~
+% A way to remove the struts added by styles. May be redefined below
+% with option nostruts.
+
+\def\ttl@defnostruts{\def\nostruts{\let\ttl@strut\@empty}}
+
% +-----------------+
% | O P T I O N S |
% +-----------------+
-
\DeclareOption{pagestyles}{\let\sectiontitle\@empty}
\DeclareOption{extramarks}{\let\ttl@fetchmark\@empty}
\DeclareOption{floatps}{%
@@ -1088,6 +1333,14 @@
\def\ttl@fonts{}
+% nostruts
+
+\DeclareOption{nostruts}{%
+ \let\ttl@strut\@empty
+ \def\ttl@defnostruts{%
+ \let\ttl@strut\@empty
+ \def\nostruts{\let\ttl@strut\@empty}}}
+
\ExecuteOptions{rubberchapters,bottomtitles,aftersep,oldparttoc,%
innermarks}
@@ -1121,27 +1374,30 @@
\providecommand\newpagestyle{%
\let\ttl@compatps\@empty % marks the ``old interface''
+ \let\ttl@coreps\@empty
\makeatletter
\edef\ttl@d{%
- \noexpand\input{ttlps.def}%
+ \noexpand\input{titleps.sty}%
\catcode`\noexpand\@=\the\catcode`\@}%
\ttl@d
\newpagestyle}
\providecommand\renewpagestyle{%
\let\ttl@compatps\@empty % marks the ``old interface''
+ \let\ttl@coreps\@empty
\makeatletter
\edef\ttl@d{%
- \noexpand\input{ttlps.def}%
+ \noexpand\input{titleps.sty}%
\catcode`\noexpand\@=\the\catcode`\@}%
\ttl@d
\renewpagestyle}
\providecommand\widenhead{%
\let\ttl@compatps\@empty % marks the ``old interface''
+ \let\ttl@coreps\@empty
\makeatletter
\edef\ttl@d{%
- \noexpand\input{ttlps.def}%
+ \noexpand\input{titleps.sty}%
\catcode`\noexpand\@=\the\catcode`\@}%
\ttl@d
\widenhead}
@@ -1149,7 +1405,86 @@
% New pagestyles
% ~~~~~~~~~~~~~~
-\@ifundefined{sectiontitle}{}{\input{ttlps.def}}
+\@ifundefined{sectiontitle}{}{%
+ \let\ttl@coreps\@empty
+ \input{titleps.sty}}
+
+% +-----------------+
+% | K E Y S |
+% +-----------------+
+
+\def\ttl@keys{%
+ \let\ttl@keys\relax
+ \@ifundefined{define@key}{\RequirePackage{keyval}}{}%
+ \def\ttl@getkeys##1##2{%
+ \let\ttl@a\@empty
+ \if\expandafter @\@gobble##1@\@empty % if there is a single token
+ \edef\ttl@b{\expandafter\@gobble\string##1}%
+ \let\ttl@a\ttl@b
+ \else
+ \ttl@labelfalse % A temporary flag: true if there is page key
+ \setkeys{##2}{##1}%
+ \ifttl@label
+ \@ifundefined{ttlp@\ttl@b}{%
+ \expandafter\let\csname ttlp@\ttl@b\endcsname\@empty}{}%
+ \fi
+ \edef\ttl@a{\ttl@b\ttl@a}%
+ \fi}%
+ %
+ \define@key{titlesec}{name}{%
+ \edef\ttl@b{\expandafter\@gobble\string##1}}%
+ \define@key{titlesec}{numberless}[true]{%
+ \csname @tempswa##1\endcsname
+ \if@tempswa
+ \edef\ttl@a{\ttl@a/*}%
+ \fi}%
+ \define@key{titlesec}{page}{%
+ \ttl@labeltrue % Used as flag
+ \edef\ttl@a{/##1\ttl@a}}%
+ %
+ \def\ttl@extra@numberless{\ttl@labeltrue}% The actual meaning
+ \let\ttl@key@numberless\@empty
+ %\let\ttl@key@matter\@empty
+ \let\ttlp@append\@gobbletwo
+ \def\ttl@setkeys##1{%
+ \def\ttl@trylist{\ttl@try{}}%
+ \@for\ttl@b:=##1\do{%
+ \begingroup
+ \let\ttl@a\relax
+ \def\ttl@try####1{%
+ \noexpand\ttl@try{####1\ttl@a{\ttl@b}}%
+ \noexpand\ttl@try{####1}}%
+ \xdef\ttl@trylist{\ttl@trylist}%
+ \endgroup}}%
+ \ttl@setkeys{page,numberless}% matter
+ %
+ \if@twoside
+ \newcounter{ttlp@side}%
+ \newcount\ttlp@side
+ \def\ttlp@theside{\ifodd\c@page o\else e\fi}%
+ \def\ttlp@append##1##2{%
+ {\let\@elt\relax
+ \expandafter\xdef\csname ttlp@##1\endcsname{%
+ \csname ttlp@##1\endcsname\@elt ##2}}}%
+ \def\ttlp@write##1{%
+ {\let\ttlp@theside\relax
+ \protected@write\@auxout{}%
+ {\string\ttlp@append{##1}{\ttlp@theside}}}}%
+ \def\ttlp@fetch##1{%
+ \stepcounter{ttlp@side}%
+ \global\advance\ttlp@side\@ne
+ \@whilenum\ttlp@side<\c@ttlp@side\do{%
+ \expandafter\@next\expandafter\@tempa\csname ttlp@##1\endcsname{}{}%
+ \global\advance\ttlp@side\@ne}%
+ \expandafter\@next\expandafter\ttl@b\csname ttlp@##1\endcsname{%
+ \xdef\ttl@key@page{/\if\ttl@b oodd\else even\fi}%
+ }{%
+ \xdef\ttl@key@page{/\ifodd\c@page odd\else even\fi}%
+ \@@warning{Unsynchronized `##1' title on page \thepage}}}%
+ \else
+ \let\ttlp@write\@gobble
+ \def\ttlp@fetch##1{\gdef\ttl@key@page{/odd}}%
+ \fi}
% +-----------------+
% | C O M P A T |
@@ -1348,3 +1683,26 @@
\titleclass{\subparagraph} {straight}[\paragraph]
\endinput
+
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/Master/texmf-dist/tex/latex/titlesec/titletoc.sty b/Master/texmf-dist/tex/latex/titlesec/titletoc.sty
index 7fb29d55d88..e54bce01730 100644
--- a/Master/texmf-dist/tex/latex/titlesec/titletoc.sty
+++ b/Master/texmf-dist/tex/latex/titlesec/titletoc.sty
@@ -1,97 +1,13 @@
-% +---------------------------------------------+
-% | Documentation is in the titlesec.tex file. |
-% +---------------------------------------------+
%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
+% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
+% This file may be distributed and/or modified under the conditions of
+% the MIT License. A version can be found at the end of this file.
%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-
-% History of v1.1
-% ~~~~~~~~~~~~~~~
-% 99/04/22: A bug fix. Some missing global assignments in \ttl@tocentry
-% were missing, and page numbers messed up with
-% \titlecontents*
-%
-% History of v1.2
-% ~~~~~~~~~~~~~~~~
-% 99/10/20: Added \contentsafter. \ttl@tocentry modified to accept
-% the new command for grouping in a paragraph entries of
-% different levels.
-% 99/10/27: Instead of defining the level numbers explicitly, that's
-% done with \ttl@setlevels and \ttl@levels.
-% 99/10/27: Added the basic code for multiple indexes.
-% 99/10/29: Added the toctop test to the \ttl@savel@... commands.
-% 99/12/28: Simplified \ttl@savel@... with \ttl@lselect.
-% 00/01/12: \contentsafter rejected. An aditional optional parameter
-% is used instead. (Too) many thing had to be rewritten.
-% 00/01/27: Removed \ttl@setlevels. Any change of levels are
-% best done with titlesec.
-% 00/02/14: Moved misplaced \vskip in ttl@tocentry.
-% 00/02/16: A few changes in the "block" separators.
-% 00/02/16: Fixed bug in \ttl@margin. For the right margin the
-% correction was used instead of the margin.
-%
-% History of v1.2.1
-% ~~~~~~~~~~~~~~~~~
-% 00/04/25: Dirty trick to make sure that \ttl@finish is the very
-% last thing in lists of floats (lof, lot, etc.).
-% 00/05/14: Missing \global before \ttl@labelfalse added.
-%
-% History of 1.2.2
-% ~~~~~~~~~~~~~~~~
-% 00/06/05: The optional argument no longer mandatory, but
-% still reporting an error if the length is missing.
-% Minor internal changes, and a patch mechanism added.
-%
-% History of 1.3
-% ~~~~~~~~~~~~~~
-% 01/01/12: Minor changes and some missing \globals added for
-% partial tocs to work inside a group.
-% 01/01/21: Added \dottedcontents.
-%
-% History of 1.4
-% ~~~~~~~~~~~~~~
-% 02/03/27: titletoc.new merged into this file
-% 02/03/27: \ttl@finish written by the last \newpage.
-% 02/03/27: \ttl@lsection broke paragraphs always. Now
-% only if the sublevel is typeset.
-% 02/03/27: \ttl@finish -> \contentsfinish
+% Repository: https://github.com/jbezos/titlesec
%
-% History of 1.5
-% ~~~~~~~~~~~~~~
-% 03/06/14: \contentspush didn't work because of the change of
-% (.new) \leftskip was done inside a group before the
-% corresponding \par
-% 03/06/14: Added an useful error if a partial TOC is not
-% (.new) defined.
-% 05/01/17: New options rubber/rigidseps, to remove if desired
-% the small vertical "plus" between entries.
-% 05/01/20: Begin work on partial lists.
-% 05/01/21: \ttl@outblock and \ttl@outnoblock just to avoid a
-% huge definition and to ease patching.
-% 05/01/22: Work on partial lists finished (but to be resumed).
-
-% History of 1.6
-% ~~~~~~~~~~~~~~
-% 07/05/04: Added the patch 2005/05/03 which fixed a wrong
-% result with \included (F. Mittelbach)
-% 07/07/14: Removed the patch mechanism.
-\ProvidesPackage{titletoc}[2011/12/15 v1.6 TOC entries]
+\ProvidesPackage{titletoc}[2019/07/16 v2.11 TOC entries]
% The following tags are used:
% ttl@ : the generic one, shared with titlesec
@@ -171,7 +87,7 @@
\let\\\@centercr
\filleft\advance\rightskip\z@ \@plus -1fil
\parfillskip\z@ \@plus 2fil\relax}
-
+
% Now, the specific titletoc part
% User interface
@@ -292,7 +208,20 @@
\@ifnextchar[{\ttl@contents@i{#1}{#2}}%
{\ttl@contents@i{#1}{#2}[\@nil]}}
+% A dirty hack to fix wrong destinations with hyperref. But activate
+% only if some inline entry is defined (ie, #1 = 0):
+\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
+ \global\let\Hy@tocdestname\Hy@tocdestname
+ \fi}%
+ \fi
\expandafter\def\csname l@#2\endcsname
{\ttl@tocentry{#1}{#2}{#3}{#4}{{#5}{#6}}{#7}}%
\@ifnextchar[{\ttl@contents@ii{#1}{#2}}%
@@ -422,6 +351,7 @@
\let\ttl@leaders\leaders}
\def\ttl@tocentry#1#2#3#4#5#6#7#8{%
+ \ttl@fixhyperref
\xdef\ttl@b{\csname ttll@#2\endcsname}%
\ifnum\ttl@b>\c@tocdepth\else
\ifnum\ttl@b<\ttl@toctop\else
@@ -474,10 +404,10 @@
% Multiple tocs and lists
% ~~~~~~~~~~~~~~~~~~~~~~~~
-% After some attemps to adapt titletoc to minitoc, I've decided
-% to implement my own solution, because entries as written by
-% minitoc are non standard and unmanageable. The new commands
-% provides a good deal of flexibility, too.
+% After some attemps to adapt titletoc to minitoc, I decided to
+% implement my own solution, because entries as written by minitoc are
+% non standard. The new commands provides a good deal of flexibility,
+% too.
\let\ttl@startlists\@empty
\let\ttl@writefile\@writefile
@@ -554,13 +484,19 @@
\fi
\ignorespaces}
-\newcommand\printcontents[4][default]{%
- \ttl@printlist[#1]{toc}{#2}{#3}{#4}}
+\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}
-\newcommand\printlist[4][default]{%
- \ttl@printlist[#1]{#2}{#3}{-1001}{#4}}
+\newcommand\ttl@preprint[2][\c@tocdepth]{%
+ \expandafter\ttl@printlist\ttl@a{#1}{#2}}
-\newcommand\ttl@printlist[5][default]{%
+% 1:name 2:list 3:prefix 4:startlevel 5:depth 6:toccode
+\newcommand\ttl@printlist[6][default]{%
\begingroup
\@ifundefined{c@ttl@#2@#1}%
{\PackageError{titletoc}{No partial #2 named #1}%
@@ -568,7 +504,8 @@
with \string/startcontents/\string\startlist.}}{}%
\edef\ttl@ptoc{#1@\arabic{ttl@#2@#1}}%
\def\ttl@toctop{#4}%
- #5%
+ \c@tocdepth=#5\relax
+ #6%
\let\ttl@xcontentsline\contentsline
\let\contentsline\ttl@gobblecontents
\def\ttl@contentsline##1{%
@@ -591,10 +528,12 @@
\def\ttl@toctop{-1000}
-% Now the we add \contentsfinish to the current definitions
-% and a "selector" for partial tocs
+% Now the we add \contentsfinish to the current definitions and a
+% "selector" for partial tocs with a wrapper for the original
+% definitions (saved as \ttl@savel@#1).
\def\ttl@lselect#1{%
+ \ttl@fixhyperref
\ifnum\csname ttll@#1\endcsname>\c@tocdepth\else
\contentsfinish
\fi
@@ -638,3 +577,24 @@
\endinput
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/Master/texmf-dist/tex/latex/titlesec/ttlkeys.def b/Master/texmf-dist/tex/latex/titlesec/ttlkeys.def
deleted file mode 100644
index f9da44aa0d4..00000000000
--- a/Master/texmf-dist/tex/latex/titlesec/ttlkeys.def
+++ /dev/null
@@ -1,121 +0,0 @@
-% +--------------------------------------------------+
-% | Typeset titlesec.tex to get the documentation. |
-% +--------------------------------------------------+
-%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
-%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-
-\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
-% and \ttl@b with the string sectioning name (without tag). But if the
-% argument has no keys then simply does the last step. Finally, an
-% error is reported if the sectioning command does not exist. All these
-% testing must be improved (still).
-
-\@ifundefined{define@key}{\RequirePackage{keyval}}{}%
-
-\def\ttl@getkeys#1#2{%
- \let\ttl@a\@empty
- \if\expandafter @\@gobble#1@\@empty % if there is a single token
- \edef\ttl@b{\expandafter\@gobble\string#1}%
- \let\ttl@a\ttl@b
- \else
- \ttl@labelfalse % A temporary flag: true if there is page key
- \setkeys{#2}{#1}%
- \ifttl@label
- \@ifundefined{ttlp@\ttl@b}{%
- \expandafter\let\csname ttlp@\ttl@b\endcsname\@empty}{}%
- \fi
- \edef\ttl@a{\ttl@b\ttl@a}%
- \fi}
-
-\define@key{titlesec}{name}{%
- \edef\ttl@b{\expandafter\@gobble\string#1}}
-
-\define@key{titlesec}{numberless}[true]{%
- \csname @tempswa#1\endcsname
- \if@tempswa
- \edef\ttl@a{\ttl@a/*}%
- \fi}
-
-\define@key{titlesec}{page}{%
- \ttl@labeltrue % Used as flag
- \edef\ttl@a{/#1\ttl@a}}
-
-\def\ttl@extra@numberless{\ttl@labeltrue}% The actual meaning
-
-\let\ttl@key@numberless\@empty
-%\let\ttl@key@matter\@empty
-
-\let\ttlp@append\@gobbletwo
-
-\def\ttl@setkeys#1{%
- \def\ttl@trylist{\ttl@try{}}%
- \@for\ttl@b:=#1\do{%
- \begingroup
- \let\ttl@a\relax
- \def\ttl@try##1{%
- \noexpand\ttl@try{##1\ttl@a{\ttl@b}}%
- \noexpand\ttl@try{##1}}%
- \xdef\ttl@trylist{\ttl@trylist}%
- \endgroup}}
-
-\ttl@setkeys{page,numberless} % matter
-
-%___
-\if@twoside
-
-\newcounter{ttlp@side}
-\newcount\ttlp@side
-
-\def\ttlp@theside{\ifodd\c@page o\else e\fi}
-
-\def\ttlp@append#1#2{%
- {\let\@elt\relax
- \expandafter\xdef\csname ttlp@#1\endcsname{%
- \csname ttlp@#1\endcsname\@elt #2}}}
-
-\def\ttlp@write#1{%
- {\let\ttlp@theside\relax
- \protected@write\@auxout{}%
- {\string\ttlp@append{#1}{\ttlp@theside}}}}
-
-\def\ttlp@fetch#1{%
- \stepcounter{ttlp@side}%
- \global\advance\ttlp@side\@ne
- \@whilenum\ttlp@side<\c@ttlp@side\do{%
- \expandafter\@next\expandafter\@tempa\csname ttlp@#1\endcsname{}{}%
- \global\advance\ttlp@side\@ne}%
- \expandafter\@next\expandafter\ttl@b\csname ttlp@#1\endcsname{%
- \xdef\ttl@key@page{/\if\ttl@b oodd\else even\fi}%
- }{%
- \xdef\ttl@key@page{/\ifodd\c@page odd\else even\fi}%
- \@@warning{Unsynchronized `#1' title on page \thepage}}}
-
-%___
-\else
-
-\let\ttlp@write\@gobble
-\def\ttlp@fetch#1{\gdef\ttl@key@page{/odd}}
-
-%___
-\fi
-
-\endinput
diff --git a/Master/texmf-dist/tex/latex/titlesec/ttlps.def b/Master/texmf-dist/tex/latex/titlesec/ttlps.def
deleted file mode 100644
index 6f95d0c2b6b..00000000000
--- a/Master/texmf-dist/tex/latex/titlesec/ttlps.def
+++ /dev/null
@@ -1,739 +0,0 @@
-% +--------------------------------------------------+
-% | Typeset titlesec.tex to get the documentation. |
-% +--------------------------------------------------+
-%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
-%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-
-% History of v1.0 (actually not 1.0)
-% ~~~~~~~~~~~~~~~
-% 99/11/03: Split from titlesec.sty
-% 99/11/03: Changed \setmarks, \ttl@sethead, \ttl@setfoot to follow
-% the new scheme
-% 99/11/03: Removed the redefinition of \markboth. The arguments are
-% expanded on the fly by the corresponding \...mark.
-% 00/01/06: Added the \newtitlemark device.
-% 00/01/19: Rejected the idea of a separate package (for the time
-% being). Now it's ttlps.def.
-% 00/01/20: Starred versions of \widenhead, \sethead, \setfoot.
-% 00/01/23: Added \ifthe..., \iftitle, etc.
-% 00/02/05: Modified \ifthe... mechanism
-% 00/02/25: Fixed a bug which made enter in an endless loop.
-% Now \ttl@marks is just \relax. The new scheme made
-% compatible with babel. (2.3.1)
-% 00/03/01: Fixed a bug in the previous bug fix. (2.3.2)
-% 00/03/08: Removed the code for AMS and babel. A general procedure
-% to catch the changes of \markboth is introduced, with
-% \ttl@enccode and \ttl@running. (2.3.3)
-% 00/05/05: \setmarks may be used outside of \newpagestyle, with
-% the help of \ttl@setmarks and \ttl@marksset (2.3.4)
-% 00/05/25: Tests for \ttl@toclabel moved to the redefinition of
-% \secdef in titlesec. (2.3.5)
-% 00/06/07: Added the first attempt for pagestyles with floats.
-% With slight changes, it will become the final form
-% for that. (2.3.5)
-% 00/06/14: The default \ifthe... are now defined with \ttl@setifthe
-% so that they are robust from the very beginning. (2.3.5)
-% 01/01/21: Replaced some \defs by \newcommand
-% 10/12/03: A little addition to the warning, for those who don't
-% read the docs.
-%
-% History of v1.1
-% ~~~~~~~~~~~~~~~
-% 11/11/26: Add the extra mark mechanim
-% 11/12/07: Enlarged, eg, multilevel \newtitlemark, \newtitlemark*,
-% premarks
-%
-% As before, all marks has two parts but now they don't refer to left or
-% 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{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
-% after the title (straight class); the first part contains the values
-% of current title, but the second one contains the previolusly stored
-% values in the mark before the title, and the current values in the
-% mark after.
-
-\ProvidesFile{ttlps.def}[2016/03/15]
-
-%
-% Page Styles
-% ~~~~~~~~~~~
-
-\ifx\ttl@compatps\@undefined\else
- \PackageWarningNoLine{titlesec}
- {You are using an old interface for page styles\MessageBreak
- (or you forgot the package option 'pagestyles').\MessageBreak
- You could proceed but don't complain if you run\MessageBreak
- into errors}
-\fi
-
-\ttl@pstrue
-
-\let\parttitle\@empty
-\let\chaptertitle\@empty
-\let\sectiontitle\@empty
-\let\subsectiontitle\@empty
-\let\subsubsectiontitle\@empty
-\let\paragraphtitle\@empty
-\let\subparagraphtitle\@empty
-
-\newcommand\iftitle[1]{%
- \expandafter\ifx\csname #1title\endcsname\@empty
- \expandafter\@secondoftwo
- \else
- \expandafter\@firstoftwo
- \fi}
-
-% \newtitlemarks belongs to a nameless markset (ie, \@empty).
-% For named extra marksets see below.
-
-\newcommand\newtitlemark{%
- \@ifstar{\@tempswafalse\ttl@newmk@i\@empty}%
- {\@tempswatrue\ttl@newmk@i\@empty}}
-
-\def\ttl@newmk@i#1#2{% markset, macro/var
- \edef\ttl@a{\expandafter\@gobble\string#2}%
- \expandafter\ifx\csname\ttl@a\endcsname#2\else
- \edef\ttl@a{c@#2}%
- \fi
- \expandafter\ttl@newmk@ii\expandafter{\ttl@a}{#1}}
-
-\def\ttl@newmk@ii#1#2{% macro/var, markset
- \expandafter\let\expandafter\ttl@a\csname ttl@mks@#2\endcsname
- \if@tempswa
- \expandafter\def\expandafter\ttl@a\expandafter{%
- \ttl@a
- \protect\@namedef{#1}{\@nameuse{#1}}}%
- \else
- \expandafter\def\expandafter\ttl@a\expandafter{%
- \ttl@a
- \protect\@nameuse{#1}=\the\@nameuse{#1}\relax}%
- \fi
- \expandafter\let\csname ttl@mks@#2\endcsname\ttl@a}
-
-\let\ttl@mks@\@empty
-\def\ttl@moremarks{\ttl@mks@} % backward compat
-
-\def\ttl@prevmarks{\ttl@marks}
-\let\ttl@marks\relax
-
-% The following command sets the ifthe... commands to
-% be used in heads. When the call is from inside a sectioning
-% command, toclabel is either true (in most of cases) or false
-% (a chapter in the front matter, for example). Otherwise (an
-% explicit \...mark) is false
-
-\def\ttl@setifthe#1{%
- \expandafter\protected@edef\csname ifthe#1\endcsname{%
- \ifttl@toclabel
- \protect\@firstoftwo
- \else
- \protect\@secondoftwo
- \fi}}
-
-% At this point \ttl@toclabel is always false
-
-\ttl@setifthe{part}
-\ttl@setifthe{chapter}
-\ttl@setifthe{section}
-\ttl@setifthe{subsection}
-\ttl@setifthe{subsubsection}
-\ttl@setifthe{paragraph}
-\ttl@setifthe{subparagraph}
-
-% Putting marks
-% -------------
-
-\newtitlemark{\ttl@running}
-\let\ttl@enccode\relax
-\def\ttl@running{\ttl@enccode}
-
-% \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).
-
-\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
- \let\@mkboth\@gobbletwo
- \let\ttl@enccode\relax
- \let\label\relax
- \let\index\relax
- \let\glossary\relax
- \let\ttl@c\mark
- \def\mark##1{\xdef\ttl@running{\expandafter\@gobble##1}}%
- \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\let\noexpand\ttl@mb@warn\relax}%
- \@nameuse{ttl@tem@#1}%
- \if@nobreak\ifvmode\nobreak\fi\fi
- \endgroup}
-
-\newcommand\settitlemarks{\@ifstar\ttl@svmarks@s\ttl@svmarks@x}
-
-\def\ttl@svmarks@x#1{\def\ttl@marksset{{#1}}}
-\def\ttl@svmarks@s#1{\def\ttl@marksset{*{#1}}}
-
-\newcommand\setmarks[2]{\settitlemarks{#1,#2}} % back compat
-
-\def\ttl@settopmark#1\@@{%
- \expandafter\def\csname#1mark\endcsname##1{%
- \expandafter\gdef\csname#1title\endcsname{##1}%
- \ttl@setifthe{#1}%
- \expandafter\let\expandafter\ttl@marks\csname ttl@tm@#1\endcsname
- \ttl@markboth{#1}}%
- \global\@namedef{ttl@tm@#1}{%
- \protect\@namedef{#1title}{\@nameuse{#1title}}%
- \protect\@namedef{the#1}{\@nameuse{the#1}}%
- \protect\@namedef{ifthe#1}{\@nameuse{ifthe#1}}}%
- \def\ttl@elt##1{%
- \expandafter\ttl@setsubmark\ttl@a\@@{##1}}%
- \ttl@c}%
-
-\def\ttl@setsubmark#1\@@#2{%
- \expandafter\g@addto@macro\csname ttl@tm@#2\endcsname{%
- \protect\@namedef{#1title}{}%
- \protect\@namedef{the#1}{}%
- \protect\@namedef{ifthe#1}{\protect\@secondoftwo}}
- \expandafter\g@addto@macro\csname ttl@tm@#1\endcsname{%
- \protect\@namedef{#2title}{\@nameuse{#2title}}%
- \protect\@namedef{the#2}{\@nameuse{the#2}}%
- \protect\@namedef{ifthe#2}{\@nameuse{ifthe#2}}}}%
-
-\def\ttl@setmarks@x#1{%
- \let\ttl@c\@empty % sub list
- \@for\ttl@a:=#1\do{%
- \expandafter\ttl@settopmark\ttl@a\@@
- \let\ttl@elt\relax
- \xdef\ttl@c{\ttl@c\ttl@elt{\ttl@a}}}%
- \@for\ttl@a:=#1\do{%
- \expandafter\g@addto@macro\csname ttl@tm@\ttl@a\endcsname{%
- \ttl@moremarks}}}
-
-\def\ttl@setmarks@s#1{% Solo con extramarks
- \PackageError{titleps}%
- {You need `extramarks' for \string\settitlemarks*}%
- {\string\settitlemarks* requires the package option `extramarks'}}
-
-\newcommand\pretitlemark{%
- \global\ttl@premarktrue
- \@ifstar{\ttl@pretitlemark\z@}%
- {\ttl@pretitlemark\@ne}}
-
-\def\ttl@pretitlemark#1#2#3{%
- \addtocounter{#2}#1%
- \ttl@premark{#2}{#3}%
- \addtocounter{#2}{-#1}}
-
-% Rules
-% -----
-
-\newcommand\headrule{\setheadrule{.4\p@}}
-\newcommand\footrule{\setfootrule{.4\p@}}
-
-\newcommand\setheadrule[1]{%
- \ifdim#1=\z@
- \let\makeheadrule\@empty
- \else
- \def\makeheadrule{\rule[-.3\baselineskip]{\linewidth}{#1}}%
- \fi}
-\newcommand\setfootrule[1]{%
- \ifdim#1=\z@
- \let\makefootrule\@empty
- \else
- \def\makefootrule{\rule[.7\baselineskip]{\linewidth}{#1}}%
- \fi}
-
-\renewcommand\newpagestyle[1]{%
- \begingroup
- \catcode`\^^M=9
- \@ifnextchar[%
- {\ttl@pagestyle\newcommand{#1}}%
- {\ttl@pagestyle\newcommand{#1}[]}}
-
-\renewcommand\renewpagestyle[1]{%
- \begingroup
- \catcode`\^^M=9
- \@ifnextchar[%
- {\ttl@pagestyle\renewcommand{#1}}%
- {\ttl@pagestyle\renewcommand{#1}[]}}
-
-\def\ttl@pagestyle#1#2[#3]#4{%
- \endgroup
- \expandafter#1\csname ps@#2\endcsname{%
- \ttl@defaultps
- \def\ttl@headfmt{#3}%
- #4%
- \def\settitlemarks{\@ifstar\ttl@svmarks@s\ttl@svmarks@x}}}
-
-\def\ttl@userunning#1#2{\csname ttlr@#1#2\endcsname}
-
-\def\ttl@defaultps{%
- \let\makeheadrule\@empty
- \let\makefootrule\@empty
- \def\@mkboth{\ttl@savemark\@gobbletwo}%
- \def\@oddfoot{\ttl@userunning of}%
- \def\@evenfoot{\ttl@userunning ef}%
- \def\@oddhead{\ttl@userunning oh}%
- \def\@evenhead{\ttl@userunning eh}%
- \def\ttlr@of{\ttl@makefoot\@empty\@@\ttl@hiol\ttl@hior}%
- \def\ttlr@ef{\ttl@makefoot\@empty\@@\ttl@hiel\ttl@hier}%
- \def\ttlr@oh{\ttl@makehead\@empty\@@\ttl@hiol\ttl@hior}%
- \def\ttlr@eh{\ttl@makehead\@empty\@@\ttl@hiel\ttl@hier}%
- \let\ttlr@of@b\relax \let\ttlr@of@p\relax
- \let\ttlr@ef@b\relax \let\ttlr@ef@p\relax
- \let\ttlr@oh@t\relax \let\ttlr@oh@p\relax
- \let\ttlr@eh@t\relax \let\ttlr@eh@p\relax
- \def\settitlemarks{\@ifstar\ttl@setmarks@s\ttl@setmarks@x}%
- \expandafter\settitlemarks\ttl@marksset}
-
-\@ifundefined{chapter}%
- {\settitlemarks{section,subsection}}%
- {\settitlemarks{chapter,section}}
-
-\newcommand\usepage{\protect\thepage} % back compat
-
-\newcommand\toptitlemarks{\expandafter\@secondoftwo\firstmark{}{}{}}
-\def\firsttitlemarks{%
- \toks@\expandafter\expandafter\expandafter{%
- \expandafter\@secondoftwo \firstmark{}{}{}}%
- \@temptokena\expandafter\expandafter\expandafter{%
- \expandafter\@secondoftwo \botmark{}{}{}}%
- \edef\ttl@a{\the\toks@}%
- \edef\ttl@b{\the\@temptokena}%
- \ifx\ttl@a\ttl@b
- \expandafter\@secondoftwo\firstmark{}{}{}%
- \else
- \expandafter\@firstoftwo \firstmark{}{}{}%
- \fi}
-\newcommand\bottitlemarks{\expandafter\@secondoftwo\botmark{}{}{}}
-\newcommand\nexttoptitlemarks{\expandafter\@firstoftwo\botmark{}{}{}}
-\newcommand\outertitlemarks{%
- \if@twoside
- \ifodd\c@page\relax
- \bottitlemarks
- \else
- \toptitlemarks
- \fi
- \else
- \toptitlemarks
- \fi}
-\newcommand\innertitlemarks{%
- \if@twoside
- \ifodd\c@page\relax
- \firsttitlemarks
- \else
- \bottitlemarks
- \fi
- \else
- \bottitlemarks
- \fi}
-
-\def\ttl@duplthreeargs#1#2#3#4{#1[#2][#3][#4]{#2}{#3}{#4}}
-\def\ttl@dupltwoargs#1#2#3{#1[#2][#3]{#2}{#3}}
-\def\ttl@duplthreeargsrev#1#2#3#4{#1[#4][#3][#2]{#2}{#3}{#4}}
-\def\ttl@dupltwoargsrev#1#2#3{#1[#3][#2]{#2}{#3}}
-
-\def\ttl@setany#1{%
- \@ifstar{\ttl@duplthreeargsrev#1}%
- {\@ifnextchar[{#1}{\ttl@duplthreeargs#1}}}
-
-\newcommand\setfoot{\ttl@setany\ttl@setfoot}
-\newcommand\sethead{\ttl@setany\ttl@sethead}
-
-\def\ttl@setfoot[#1][#2][#3]#4#5#6{%
- \def\ttlr@ef{\ttl@makefoot{#1}{#2}{#3}\@@\ttl@hiel\ttl@hier}%
- \def\ttlr@of{\ttl@makefoot{#4}{#5}{#6}\@@\ttl@hiol\ttl@hior}}
-
-\def\ttl@sethead[#1][#2][#3]#4#5#6{%
- \def\ttlr@eh{\ttl@makehead{#1}{#2}{#3}\@@\ttl@hiel\ttl@hier}%
- \def\ttlr@oh{\ttl@makehead{#4}{#5}{#6}\@@\ttl@hiol\ttl@hior}}
-
-\def\ttl@headinline#1#2#3{%
- \ttl@headfmt
- \def\ttl@a{#1#3}\def\ttl@b{#2}%
- \ifx\ttl@a\@empty
- \hfil{#2}\hfil
- \else\ifx\ttl@b\@empty
- {#1}\hfil{#3}%
- \else
- \sbox\z@ {#1}%
- \sbox\tw@{#3}%
- \copy\z@
- \ifdim\wd\z@<\wd\tw@
- \kern-\wd\z@\kern\wd\tw@
- \fi
- \hfil{#2}\hfil
- \ifdim\wd\z@>\wd\tw@
- \kern-\wd\tw@\kern\wd\z@
- \fi
- \box\tw@
- \fi\fi}
-
-\def\ttl@makeboth#1#2#3#4{%
- \ttl@calcneg\hspace{#3}%
- \normalsize
- \linewidth\textwidth
- \addtolength\linewidth{#3}%
- \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@
- \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}}}
-
-\def\ttl@widenhd[#1][#2]#3#4{%
- \def\ttl@hiel{#1}\def\ttl@hier{#2}%
- \def\ttl@hiol{#3}\def\ttl@hior{#4}}
-
-\let\setheadindent\widenhead
-
-\def\ttl@hiel{\z@}\def\ttl@hier{\z@}
-\def\ttl@hiol{\z@}\def\ttl@hior{\z@}
-
-% A tool:
-
-\def\ifsamemark#1#2{%
- {#1\global\let\ttl@c#2}%
- \ifx\ttl@c#2%
- \expandafter\@firstoftwo
- \else
- \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
-% ===========
-
-\ifx\ttl@fetchmark\@empty
-
-\ifx\newmarks\@undefined
- \PackageInfo{titleps}{%
- You have requested `extramarks' but etex or similar\MessageBreak
- has not been loaded. I'll do it for you.}
- \RequirePackage{etex}
-\fi
-
-\def\ttl@setmarks@s#1{%
- \@for\ttl@a:=#1\do{%
- \@ifundefined{ttl@mkc@\ttl@a}{%
- \expandafter\newmarks\csname ttl@mkc@\ttl@a\endcsname}{}%
- \expandafter\xdef\csname ttl@tem@\ttl@a\endcsname{%
- \marks\expandafter\noexpand\csname ttl@mkc@\ttl@a\endcsname
- {\noexpand\@themark}}}%
- \ttl@setmarks@x{#1}}%
-
-\newcommand\newmarkset[1]{%
- \expandafter\newmarks\csname ttl@mkc@#1\endcsname
- \@namedef{ttl@mks@#1}{}%
- \@namedef{ttl@premks@#1}{\@nameuse{ttl@mks@#1}}}
-
-\newcommand\newextramark{%
- \@ifstar{\@tempswafalse\ttl@newmk@i}%
- {\@tempswatrue\ttl@newmk@i}}
-
-\def\ttl@extramark#1{%
- \begingroup
- \let\protect\@unexpandable@protect
- \let\@mkboth\@gobbletwo
- \let\label\relax
- \let\index\relax
- \let\glossary\relax\endgroup}
-
-\newcommand\extramark[1]{%
- \begingroup
- \let\protect\@unexpandable@protect
- \let\@mkboth\@gobbletwo
- \let\label\relax
- \let\index\relax
- \let\glossary\relax
- \marks\csname ttl@mkc@#1\endcsname{%
- {\@nameuse{ttl@mks@#1}}%
- {\@nameuse{ttl@mks@#1}}}%
- \expandafter\xdef\csname ttl@premks@#1\endcsname
- {\@nameuse{ttl@mks@#1}}%
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi}%
-
-\newcommand\preextramark[1]{%
- \begingroup
- \let\protect\@unexpandable@protect
- \let\@mkboth\@gobbletwo
- \let\label\relax
- \let\index\relax
- \let\glossary\relax
- \marks\csname ttl@mkc@#1\endcsname{%
- {\csname ttl@mks@#1\endcsname}%
- {\csname ttl@premks@#1\endcsname}}%
- \endgroup
- \if@nobreak\ifvmode\nobreak\fi\fi}
-
-\newcommand\newshortmark[1]{%
- \newmarkset{\string#1}%
- \newextramark{\string#1}#1}
-
-\newcommand\shortmark[1]{\extramark{\string#1}}
-\newcommand\preshortmark[1]{\preextramark{\string#1}}
-
-\newcommand\topshortmark[1]{{\topextramarks{\string#1}#1}}
-\newcommand\firstshortmark[1]{{\firstextramarks{\string#1}#1}}
-\newcommand\botshortmark[1]{{\botextramarks{\string#1}#1}}
-\newcommand\nexttopshortmark[1]{{\nexttopextramarks{\string#1}#1}}
-
-\def\ttl@fetchmark#1#2#3{%
- \expandafter#1#2\csname ttl@mkc@#3\endcsname{}{}{}}
-
-\newcommand\topextramarks[1]{\ttl@fetchmark\@secondoftwo\firstmarks{#1}}
-\newcommand\firstextramarks[1]{%
- \toks@\expandafter\expandafter\expandafter{%
- \ttl@fetchmark\@secondoftwo\firstmarks{#1}}%
- \@temptokena\expandafter\expandafter\expandafter{%
- \ttl@fetchmark\@secondoftwo\botmarks{#1}}%
- \edef\ttl@a{\the\toks@}%
- \edef\ttl@b{\the\@temptokena}%
- \ifx\ttl@a\ttl@b
- \ttl@fetchmark\@secondoftwo\firstmarks{#1}%
- \else
- \ttl@fetchmark\@firstoftwo\firstmarks{#1}%
- \fi}
-\newcommand\botextramarks[1]{\ttl@fetchmark\@secondoftwo\botmarks{#1}}
-\newcommand\nexttopextramarks[1]{\ttl@fetchmark\@firstoftwo\botmarks{#1}}
-
-\newcommand\outerextramarks[1]{%
- \if@twoside
- \ifodd\c@page\relax
- \botextramarks{#1}%
- \else
- \topextramarks{#1}%
- \fi
- \else
- \topextramarks{#1}%
- \fi}
-\newcommand\innerextramarks[1]{%
- \if@twoside
- \ifodd\c@page\relax
- \firstextramarks{#1}%
- \else
- \botextramarks{#1}%
- \fi
- \else
- \botextramarks{#1}%
- \fi}
-
-\fi
-
-% ======
-% FLOATS
-% ======
-%
-% Pagestyles with floats. There macros are defined only with the
-% psfloats package option.
-
-\@ifundefined{ttl@replace}{\endinput}{}
-
-% User interface
-
-\newcommand\setfloatfoot{%
- \let\ttl@c\@empty % <- current float, empty if general
- \ttl@setany\ttl@setftfoot}
-
-\newcommand\setfloathead{%
- \let\ttl@c\@empty % <- current float, empty if general
- \ttl@setany\ttl@setfthead}
-
-\def\ttl@setftfoot[#1][#2][#3]#4#5#6#7{%
- \@ifnextchar[{\ttl@setftfoot@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}}%
- {\ttl@setftfoot@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}[bp]}}
-
-\def\ttl@setfthead[#1][#2][#3]#4#5#6#7{%
- \@ifnextchar[{\ttl@setfthead@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}}%
- {\ttl@setfthead@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}[tp]}}
-
-\def\ttl@setftfoot@i#1#2#3#4#5#6#7[#8]{%
- \@tfor\ttl@b:=#8\do{%
- \@namedef{ttlr@ef@\ttl@b\ttl@c}%
- {#7\ttl@makefoot{#1}{#2}{#3}\@@\ttl@hiel\ttl@hier}%
- \@namedef{ttlr@of@\ttl@b\ttl@c}%
- {#7\ttl@makefoot{#4}{#5}{#6}\@@\ttl@hiol\ttl@hior}}}
-
-\def\ttl@setfthead@i#1#2#3#4#5#6#7[#8]{%
- \@tfor\ttl@b:=#8\do{%
- \@namedef{ttlr@eh@\ttl@b\ttl@c}%
- {#7\ttl@makehead{#1}{#2}{#3}\@@\ttl@hiel\ttl@hier}%
- \@namedef{ttlr@oh@\ttl@b\ttl@c}%
- {#7\ttl@makehead{#4}{#5}{#6}\@@\ttl@hiol\ttl@hior}}}
-
-\newcommand\nextfloathead{%
- \ttl@nextfree % returns ttl@c with the next float
- \ttl@setany\ttl@setfthead}
-
-\newcommand\nextfloatfoot{%
- \ttl@nextfree % returns ttl@c with the next float
- \ttl@setany\ttl@setftfoot}
-
-% Compat mode with floatps
-
-\ifx\ttl@replace\space
-
- \let\ttl@setnewfoot\ttl@setftfoot
- \let\ttl@setnewhead\ttl@setfthead
-
- \def\ttl@setftfoot[#1][#2][#3]#4#5#6{%
- \ttl@setnewfoot[#1][#2][#3]{#4}{#5}{#6}{}}
- \def\ttl@setfthead[#1][#2][#3]#4#5#6{%
- \ttl@setnewhead[#1][#2][#3]{#4}{#5}{#6}{}}
-
-\fi
-
-% The simple default value of \ttl@userunning is
-% replaced by one more elaborated
-
-\def\ttl@userunning#1#2{%
- \if@fcolmade % From a post by D. Arseneau to comp.text.tex
- \def\@elt##1{\edef\ttl@pageft{\string##1}}%
- \@flsucceed
- \let\@elt\relax
- \if#2h%
- \ttl@replace #1hp\ttl@pageft
- \else
- \ttl@replace #1fp\ttl@pageft
- \ttl@killftps\ttl@pageft
- \fi
- \else\if#2h%
- \ifx\ttl@topft\@empty\else
- \ttl@replace #1ht\ttl@topft
- \fi
- \else
- \ifx\ttl@botft\@empty\else
- \ttl@replace #1fb\ttl@botft
- \fi
- \fi\fi
- \csname ttlr@#1#2\endcsname}
-
-% [Don't move above as \ttl@replace is used as a flag.]
-
-\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}}}}%
- {\csname ttlr@xx@x#4\endcsname\@gobble
- {\expandafter\let\csname ttlr@#1#2\expandafter\endcsname
- \csname ttlr@#1#2@#3#4\endcsname}}}
-
-\def\ttl@nextfree{%
- \def\@elt##1{%
- \edef\ttl@c{\string##1}%
- \let\@elt\@gobble}%
- \@freelist
- \let\@elt\relax
- \@ifundefined{ttlr@xx@x\ttl@c}%
- {\expandafter\let\csname ttlr@xx@x\ttl@c\endcsname\@secondoftwo
- \@tfor\ttl@a:={eh@t}{oh@t}{ef@b}{of@b}{eh@p}{oh@p}{ef@p}{of@p}\do{%
- \expandafter\global\expandafter
- \let\csname ttlr@\ttl@a\ttl@c\endcsname\relax}}{}}
-
-\def\ttl@killftps#1{%
- \expandafter\global\expandafter
- \let\csname ttlr@xx@x#1\endcsname\relax}
-
-\let\ttl@topft\@empty
-\let\ttl@botft\@empty
-\let\ttl@pageft\@empty
-
-\def\ttl@combinefloats{%
- \ifx\@toplist\@empty\else
- \def\@elt##1{%
- \edef\ttl@topft{\string##1}%
- \def\@elt####1{\ttl@killftps{\string####1}}}%
- \@toplist
- \fi
- \ifx\@botlist\@empty\else
- \def\@elt##1{%
- \def\@elt####1{%
- \def\@elt####1{\ttl@killftps\ttl@botft}%
- \edef\ttl@botft{\string####1}}%
- \edef\ttl@botft{\string##1}}%
- \@botlist
- \fi
- \let\@elt\relax
- \ttl@combinefloats@x}
-
-\AtBeginDocument{%
- \let\ttl@combinefloats@x\@combinefloats
- \let\@combinefloats\ttl@combinefloats}
-
-\endinput
diff --git a/Master/texmf-dist/tex/latex/titlesec/wrap.tss b/Master/texmf-dist/tex/latex/titlesec/wrap.tss
deleted file mode 100644
index 44d849b6bce..00000000000
--- a/Master/texmf-dist/tex/latex/titlesec/wrap.tss
+++ /dev/null
@@ -1,83 +0,0 @@
-% +--------------------------------------------------+
-% | Typeset titlesec.tex to get the documentation. |
-% +--------------------------------------------------+
-%
-% Copyright (c) 1998-2016 by Javier Bezos.
-% All Rights Reserved.
-%
-% This file is part of the titlesec distribution release 2.10.2
-% -----------------------------------------------------------
-%
-% It may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-
-\ProvidesFile{wrap.tss}[2016/03/15]
-
-\gdef\ttlh@wrap#1#2#3#4#5#6#7#8{%
- \global\@noskipsectrue
- \gdef\ttl@makeline##1{##1}%
- \ttl@changecentercr
- \begingroup
- #1\ifhmode\ttl@hmode@error\fi
- \titlewidth\z@
- \def\\{\@ifstar{\@ifnextchar[{\ttl@bs}{\newline}}%
- {\@ifnextchar[{\ttl@bs}{\newline}}}%
- \def\ttl@bs[##1]{\newline}%
- \let\@centercr\\%
- \advance\rightskip 1\leftskip plus 1fil
- \leftskip=\z@
- \parindent\z@
- \let\iftitlemeasuring\@firstoftwo
- \global\setbox\ttl@box\vtop{\setlength\hsize{#6}%
- \color@begingroup
- \ifttl@label{#2}\ttl@calc\hspace{#3}\fi
- #4{#8}\kern\z@\strut
- \@@par
- \color@endgroup}%
- \let\iftitlemeasuring\@secondoftwo
- \ttl@boxprocess
- \global\titlewidth\titlewidth
- \global\titlewidthfirst\titlewidthfirst
- \global\titlewidthlast\titlewidthlast
- \endgroup
- \edef\ttl@maxdimen{\the\titlewidth}%
- #1\ifhmode\ttl@hmode@error\fi
- \global\setbox\ttl@box\vtop{\setlength\hsize{\ttl@maxdimen}%
- \color@begingroup
- \ifttl@label{#2}\ttl@calc\hspace{#3}\fi#4{#8}\kern\z@\strut
- \@@par
- \color@endgroup}%
- \advance\@tempskipa1.5\baselineskip
- \advance\@tempskipa\ht\ttl@box
- \advance\@tempskipa\dp\ttl@box
- \advance\@tempskipa-\pagegoal
- \advance\@tempskipa\pagestretch
- \@tempskipb\pagegoal
- \pagegoal-\@tempskipa
- \ifdim\bottomtitlespace<\z@\else
- \def\@textbottom{\vskip\z@\@plus.0001fil}%
- \fi
- \penalty9999
- \pagegoal\@tempskipb
- \@tempdima\ht\ttl@box \advance\@tempdima\dp\ttl@box
- \@tempdimb\@tempdima
- \divide\@tempdima\baselineskip \count@\@tempdima
- \advance\count@
- \ifdim\@tempdimb<\the\count@.5\baselineskip\@ne\else\tw@\fi
- \dp\ttl@box=\z@
- \xdef\@svsechd##1##2{%
- \noexpand\llap{\box\ttl@box##2}%
- \setbox\z@\hbox{\hskip\ttl@maxdimen\relax##2}%
- \global\hangindent\wd\z@
- \global\hangafter-\the\count@\relax}}
-
-\endinput