How can I display a short chapter name in the header and a long chapter name in the ToC?
\chapter[toc version]{doc version}
\chaptermark{version for header}
Helpful link with more information (also for similar or different use-cases):
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=runheadtoobig
The sectioning commands of the memoir
class feature a second optional argument:
\documentclass[11pt,a4paper]{memoir}
\begin{document}
\tableofcontents*% Starred form for not including the ToC in the ToC
\chapter[Title displayed in ToC][Title displayed in header]{Title}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\clearpage\null
\end{document}
EDIT: Since v3.10, the KOMA-Script
classes allow to specify the usage of the optional argument of sectioning commands. The class options are headings=optiontohead
, headings=optiontotoc
, and headings=optiontoheadandtoc
.
\documentclass[headings=optiontohead]{scrbook}
\begin{document}
\tableofcontents
\chapter[Title displayed in header]{Title; also displayed in ToC}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\clearpage\null
\end{document}
Another option is to use the truncate package, with fancyhdr, which truncates the header if it's too long, and adds an elypsis at the end:
\usepackage[fit]{truncate}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[RO,LE]{\truncate{.95\headwidth}{\leftmark}}
\fancyfoot[C]{\thepage}