The titleps package provides tools for one-stage setting of page
styles (headlines and footlines). Unlike related packages like
fancyhdr or scrpage2, a higher-level interface is used, where the mark
mechanism is hidden and there is no need to deal with \leftmark
s and
\rightmark
s — just use a command or variable registered as a “mark”
as the expected value will be returned, i.e., those when the mark was
emitted, either by a sectioning command or explicitly with
\chaptermark
, \sectionmark
, etc.
A simple example, whose meaning should be obvious, is:
\newpagestyle{main}{ \sethead[\thepage][\chaptertitle][(\thesection] % even {\thesection)}{\sectiontitle}{\thepage}} % odd \pagestyle{main}
(There is no need to redefine \sectionmark
and the like. The
package does it for you.)
Other features are:
\topmark
, which does not work correctly
in LaTeX).\sectionmark
and the like.\thispagestyle
for floats).New in version 1.1.0 are:
\
mkboth@ (with was not even
taken into account).For top marks and special sections (TOC’s, indexes, etc.) to work, sections have to be patched slightly, which is done by the package itself (tools for doing it by yourself are provided).
The titleps package is part of the titesec bundle:
If you are a fancyhdr user, have a look at titleps for fancyhdr users.
The packages listed here are free – you don’t have to pay anything to use them. However, if you have found them useful enough as to give me a little present, I would be very grateful. Just go to the following wish list at Amazon.
You might consider supporting the development of these packages with a donation, too.
© 2000-2023 Javier Bezos • www.texnia.com • jbezos.github.io