I am writing a document with the book
class. Hence, the title of the chapter appears at the head of each even page, and the title of the section appears at the head of each odd page. However, some of my titles are too long and the texts exceeds the margins.
How can I resolve this, for instance by ending the heading with '...' if the heading is too long?