I would like to have a short title of chapters and sections in my headers, but in the ToC there should appear the long title.

I am using the book document class, and package fancyhdr. \section[short title]{long title} gives me the headers I want, but then the short title is also placed in the ToC.

This didn't work out in my case: Short title that is not displayed in the ToC {hyperref}

  • 1
    Welcome to TeX SX! If you use package titlesec, this is done through the [toctitles] option.
    – Bernard
    Nov 9, 2018 at 19:12
  • Thank you, I didn't see your answer at first, but this is actually the fastest solution!
    – Anja
    Nov 13, 2018 at 16:45

2 Answers 2


The following updates the way the marks are used when setting the chapter and sectional titles within the book class:

enter image description here




% Update how \chapter is added to the ToC/header
\renewcommand{\chaptermark}[1]{\oldchaptermark{\@chaptermark}}% Used stored chapter mark
  \def\@chaptermark{#1}% Store chapter mark

% Update how \section and \subsection is added to the ToC/header
\renewcommand{\sectionmark}[1]{\oldsectionmark{\@sectionmark}}% Used stored section mark
\renewcommand{\subsectionmark}[1]{\oldsubsectionmark{\@subsectionmark}}% Used stored subsection mark
  \@namedef{@#1mark}{#7}% Store sectional mark




\sloppy % Just for this example
\chapter[Chapter short title]{Chapter long title}

\section[Section short title]{Section long title}

  • Thanks but... then it doesn't know the command \section any more. What could have gone wrong?
    – Anja
    Nov 10, 2018 at 14:27
  • @Anja: In my example there is no problem. Can you elaborate on what packages you use? Perhaps start by taking my example and adding packages you use until something goes wrong. This way you can identify the conflicting package(s). Give some feedback on your findings.
    – Werner
    Nov 10, 2018 at 15:56
  • Actually several of the packages were causing problems, so in my case the solution suggested by Peter Wilson was just faster to get it to run. Thank you still.
    – Anja
    Nov 13, 2018 at 16:01

If you would care to change to the memoir class (which encompasses the book class and an equivalent of the fancyhdr package) then:


puts <toc-title> in the ToC, <head-title> in the header and <title> in the body of the document. SimIlarly the same constructs are available for \subsection, \subsubsection, etc.

  • Thanks for your answer! However, with memoir class I get some new problems: \onehalfspacing doesn't work any longer and I can not make titlepages with \begin{titlepage}. Do you know how to do this?
    – Anja
    Nov 9, 2018 at 20:15
  • @Anja Try \OnehalfSpacing and the titllingpage environment. (No need for any packages for these). Nov 10, 2018 at 20:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .