CTAN Comprehensive TeX Archive Network

Directory macros/latex/contrib/titlesec



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.


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.


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.


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 \leftmarks or \rightmarks.

Latest changes

2.16  2023-10-27
      Undo the fix for #64.

2.15  2023-10-17
      Some fixes: #48, #50, #58, #64, #68 (see the GitHub repository
      for further info).

2.14  2021-07-05
      A couple of minor changes (for issues #17, #39).

2.13  2019-10-16
      - \markboth (which has been redefined in the LaTeX kernel) works

2.12  2019-09-09
      - Fix - Partial TOCs were severely broken.
      - Fix - An undefined section doesn't raise an error any more.

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
      - Fix - Newly defined floats raised an error with titletoc.


No .ins/.dtx preinstalation is required. Move the files to a place where 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



Please, for suggestions, bug reports, etc., go to


Download the contents of this package in one zip archive (694.8k).

titlesec – Select alternative section titles

A package providing an interface to sectioning commands for selection from various title styles. E.g., marginal titles and to change the font of all headings with a single command, also providing simple one-step page styles. Also includes a package to change the page styles when there are floats in a page. You may assign headers/footers to individual floats, too.

Bug trackerhttps://github.com/jbezos/titlesec/issues
Version2.16 2023-10-27
LicensesMIT License
Copyright1998–2023 Javier Bezos
MaintainerJavier Bezos López
Contained inTeX Live as titlesec
MiKTeX as titlesec
TopicsPage head and foot
See alsofancyhdr
Guest Book Sitemap Contact Contact Author