logo logo

Titleps package for LaTeX

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 \leftmarks and \rightmarks — 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:

  • Working top marks, compatible with floats (unlike the standard \topmark, which does not work correctly in LaTeX).
  • Access to top, first and botttom marks in a single headline/footline (e.g., the first and last section numbers).
  • Auto-defining of suitable \sectionmark and the like.
  • Simple (and not so simple) headrules and footrules.
  • Headlines and footlines for pages with floats.
  • Headlines and footlines for specific floats (a sort of \thispagestyle for floats).

New in version 1.1.0 are:

  • Marks for more than 2 sectioning levels.
  • Multiple sets of marks (here named marksets and extra marks). Requires e-TeX or compatible.
  • Separate marksets for different sectioning commands.
  • Fixed a serious bug with \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).

Download

The titleps package is part of the titesec bundle:

More on titleps

If you are a fancyhdr user, have a look at titleps for fancyhdr users.

A present?

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.

Donate

You might consider supporting the development of these packages with a donation, too.

© 2000-2023 Javier Bezos • www.texnia.comjbezos.github.io