summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/titlesec/titleps.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/titlesec/titleps.tex')
-rw-r--r--Master/texmf-dist/doc/latex/titlesec/titleps.tex98
1 files changed, 66 insertions, 32 deletions
diff --git a/Master/texmf-dist/doc/latex/titlesec/titleps.tex b/Master/texmf-dist/doc/latex/titlesec/titleps.tex
index 5dab28b7eab..6cea538de5c 100644
--- a/Master/texmf-dist/doc/latex/titlesec/titleps.tex
+++ b/Master/texmf-dist/doc/latex/titlesec/titleps.tex
@@ -2,10 +2,10 @@
% | Typeset this file to get the documentation. |
% +--------------------------------------------------+
%
-% Copyright (c) 1998-2011 by Javier Bezos.
+% Copyright (c) 1998-2016 by Javier Bezos.
% All Rights Reserved.
%
-% This file is part of the titlesec distribution release 2.10.0
+% This file is part of the titlesec distribution release 2.10.1
% -----------------------------------------------------------
%
% It may be distributed and/or modified under the
@@ -20,14 +20,14 @@
%
% The Current Maintainer of this work is Javier Bezos.
-\def\fileversion{1.1.0}
-\def\docdate{2011-12-15}
+\def\fileversion{1.1.1}
+\def\docdate{2016-03-15}
\documentclass[a4paper]{ltxguide}
\usepackage[sf,bf,compact,topmarks,calcwidth,pagestyles]{titlesec}
\usepackage{titletoc}
\def\gobble#1{}
-\def\cs#1{\expandafter\gobble\string\\#1}
+\DeclareRobustCommand\cs[1]{\expandafter\gobble\string\\#1}
\makeatletter
\newenvironment{desc}
{\if@nobreak
@@ -43,11 +43,11 @@
\title{Headers and footers with \textsf{titleps}\footnote{The
\textsf{titleps} package is currently at version \fileversion.
-\copyright{} 2011 Javier Bezos. All Rights Reserved.}}
+\copyright{} 2016 Javier Bezos. All Rights Reserved.}}
\author{Javier Bezos\footnote{For bug reports, comments and
-suggestions go to \href{http://www.tex-tipografia.com/contact.html}%
-{\texttt{http://www.tex-tipografia.com/contact.html}}. English
+suggestions go to \href{http://www.texnia.com/contact.html}%
+{\texttt{http://www.texnia.com/contact.html}}. English
is not my strong point, so contact me when you find mistakes in the
manual. Other packages by the same author: \textsf{gloss} (with
Jos\'e Luis D\'{\i}az), \textsf{enumitem, accents, tensind, esindex,
@@ -144,7 +144,8 @@ for example, thank to the \textit{extra marks} described below.
It works with standard classes and many others; however, additional
\LaTeX{} layout adjustments could be necessary in some of them (for
-instance the \textsc{AMS} classes).\footnote{%
+instance the \textsc{AMS} classes) and several packages emitting marks
+directly with \verb|\markboth| and \verb|\markleft|.\footnote{%
Two columns layout requires the \textsf{fix2col} package by David
Carlisle.}
@@ -247,15 +248,6 @@ deprecated. Now
The starred version |\settitlemarks*| creates parallel extra marks
as described below.
-Note |\markboth| is a command to set the |myheadings| marks and
-here does not make sense. In fact, using it can lead to unpredictable
-results. Anyway, using directly the marking commands is discouraged
-(see |titlesec.pdf|), but if you need them, you may write:
-\begin{verbatim}
-\chapter*{My Chapter}
-\chaptermark{My Chapter}
-\end{verbatim}
-
\begin{desc}
|\headrule \footrule|\\
|\setheadrule{<length>} \setfootrule{<length>}|
@@ -304,6 +296,49 @@ above and a red rule below (the \textsf{color} package is required):
Of course, the material to be used as rule is not restricted to actual
rules; pictures and leaders, for instance, are allowed, too.
+\section{On \texttt{\cs{markboth}} and \texttt{\cs{markleft}}}
+
+As \textit{The \LaTeX{} Companion explains} ``Leslie Lamport had a
+specific marking scheme in mind when he designed those
+commands''. They are clearly intended for the \verb|heading| and
+\verb|myheading| pagestyles, with a \textit{main-mark} on the left
+page and a \textit{sub-mark} on the right one.
+
+In order to provide the functionality offered by \textsf{titleps}, a
+more general, less specific mechanism is devised, which means
+|\markboth| here does not make sense, because it doesn't work like in
+standard \LaTeX, and in fact, can lead to unpredictable results.
+
+Therefore, using directly the marking commands is discouraged (see
+|titlesec.pdf|), but if you need them, you may write:
+\begin{verbatim}
+\chapter*{My Chapter}
+\chaptermark{My Chapter}
+\end{verbatim}
+
+But some issues remain, because there are a number of packages
+assuming the pagestyle is \verb|heading| or \verb|myheading|. This is,
+of course, a reasonable guess, but not always correct (even if
+\textsf{titleps} is not used at all). Most of them do the right thing
+-- \verb|\markboth| is encapsulated into a macro easily redefinable so
+that the user can modify it if necessary. This is true, for example,
+for \textsf{biblatex}, but unfortunately not for \textsf{endnotes}.
+When this happens, you can resort to the following macro.
+
+\begin{desc}
+|\setmarkboth{<code-to-use>}|
+\end{desc}
+
+From this point on, \verb|\markboth| behaves as defined. It doesn't
+redefine directly the command, but rather provides a replacement code
+(you can use |#1| and |#2| for the two arguments). With
+|\resetmarkboth| (which can be used inside |\setmarkboth|) the
+original definition will be again in force. For example, to cancel the
+next |\markboth|:
+\begin{verbatim}
+\setmarkboth{\resetmarkboth\markboth{}{}}
+\end{verbatim}
+
\section{Headline/footline width}
\begin{desc}
@@ -587,14 +622,14 @@ commands, you might still need an empty title mark (like
hand.
In many cases, the following “short” marks mechanism will be enough.
-With it, you simply say with \verb|\setshormark| the name of a command
+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
illustrates how this is carried out:
\begin{verbatim}
\newcommand\lemmatitle{}
-\setshortmark\lemmatitle
+\newshortmark\lemmatitle
\newcommand\lemma[1]{%
\renewcommand\lemmatitle{#1}%
@@ -629,13 +664,12 @@ For a more general approach use the following tools.
A \textit{markset} contains a set of related commands and variables
intended to be emitted simultaneously as marks, so that their values
-can be retrieved in heads/foots. A typical \textit{markset} could be a
-title and its counter (and perhaps, in a multilingual document, the
-active language, i.e., \verb|\languagename| in \textsf{babel}, or an
-intermediate command). There
-is always a special unnamed \textit{markset} for sectioning marks, which is
-the main one and handled with the tools described above (with |title|
-in their names).
+can be retrieved in heads/foots. A typical \textit{markset} could be
+a title and its counter (and perhaps, in a multilingual document, the
+active language, i.e., \verb|\languagename| in \textsf{babel}, or an
+intermediate command). There is always a special unnamed
+\textit{markset} for sectioning marks, which is the main one and
+handled with the tools described above (with |title| in their names).
\begin{desc}
|\newextramark{<markset>}{<macro-name>}|\\
@@ -729,7 +763,7 @@ define a command. For example:
\section{A couple of examples}
-Because of the way marks are handled, special constructions like this are
+Because of the way marks are handled, special constructs like this are
allowed:
\begin{verbatim}
\newpagestyle{main}[\small\sffamily]{
@@ -743,7 +777,8 @@ allowed:
As you can see, the range of sections in a page with |\thesection| is
printed in both left and right heads. Of course, this example should
be fine tuned to collapse the ranges if there is a single section in a
-page (with |\ifsamemark|), but it gives a hint of how to get stunning headers.
+page (with |\ifsamemark|), but it gives a hint of how to get stunning
+headers.
In this document, the following styles are used:
\begin{verbatim}
@@ -756,9 +791,8 @@ In this document, the following styles are used:
\sethead{titlesec -- titleps}{\sectiontitle}{\thepage}}
\end{verbatim}
-The following definitions provide page styles similar to
-those in Lamport's \textit{The \LaTeX\ book} (with the \textsf{calc}
-package):
+The following definitions provide page styles similar to those in
+Lamport's \textit{The \LaTeX\ book} (with the \textsf{calc} package):
\begin{verbatim}
\widenhead*{0pt}{\marginparsep + \marginparwidth} % symmetrically
\renewpagestyle{plain}{}