summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/titlesec/titlesec.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/titlesec/titlesec.tex')
-rw-r--r--Master/texmf-dist/doc/latex/titlesec/titlesec.tex138
1 files changed, 84 insertions, 54 deletions
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.