I'm writing a pretty long document, and at some point this happened with the table of contents:
I would like to be able to force a line break between 'complex' and 'space', either directly or by imposing suitable limits on line lengths or the separation between the lines and the numbers, or any such relevant lengths.
A minimal working example is below,
\documentclass[pdftex,11pt,twoside,a4paper]{report}
\usepackage[a4paper, left=3cm, right=3cm, top=3cm, bottom=2cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage{lmodern} % load a font with all the characters
\usepackage[colorlinks,linkcolor=blue,final]{hyperref}
\usepackage{tocloft}
\usepackage{lipsum}
%%% Headers
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\setlength{\headheight}{14pt}
\fancyhead[LE]{\thepage}
\fancyhead[RE]{Electron dynamics in complex space and complex time}
\fancyhead[LO]{\nouppercase{\leftmark}}
\fancyhead[RO]{\thepage}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}
\begin{document}
\tableofcontents
\setcounter{page}{100}
\chapter{Quantum orbits as trajectories through complex time and complex space}
\lipsum[1-16]
\end{document}
including the headers in use in the document; obviously all of the non-lipsum packages are necessary in the larger document. How can I fix this ugliness?
Best Answer
You could specify your chapter using
The optional argument to
\chapter
sets the ToC and header entries. So we replicate the usual\chaptermark
to correct for inserting a line-break inside the header.Alternatively, increase the
p
agenum
berwidth
inside the ToC and/or set the alignment ofchap
ter-related entries to include a\raggedright
alignment:memoir
provides the option of explicitly setting all three possibilities via