0

I am writing a PhD thesis which contains a long chapter title:

On the edge of universality of sequential P systems

When I use standard headings pagestyle, then the title in the heading overflows and it looks ugly:

\documentclass[a4paper,12pt,oneside,openany,pagenumber=footcenter]{book}
\pagestyle{headings}
\begin{document}
\chapter{On the edge of universality of sequential P systems}
\section{Active membranes}
\pagebreak
second page
\end{document}

enter image description here

There are other options, e.g. wrapping long title to the next line. It is somewhat better, but it is still pretty unreadable:

\documentclass[a4paper,12pt,oneside,openany,pagenumber=footcenter]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}
\chapter{On the edge of universality of sequential P systems}
\section{Active membranes}
\pagebreak
second page
\end{document}

enter image description here

Another option is to display shorter version of chapter title in the heading:

\documentclass[a4paper,12pt,oneside,openany,pagenumber=footcenter]{book}
\begin{document}
\chapter[On the edge of universality of seq\dots]{On the edge of universality of sequential P systems}
\section{Active membranes}
\pagebreak
second page
\end{document}

enter image description here

I think, anything is possible. But what is the best practice for these long titles? My department has no rules for this, even this manual has no mention of it. I am asking for a general recommendation: What would you do?

  • 1
    Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Feb 21 '15 at 13:43
  • 4
    Best practice is to avoid long titles ;-) –  Feb 21 '15 at 13:45
  • Added source codes – Michal Kováč Feb 21 '15 at 14:01
  • 3
    If long titles are unavoidable, use the optional argument to provide a shorter version for the header and ToC. – Gonzalo Medina Feb 21 '15 at 14:27
  • I agree with Gonzalo Medina, use shortened title. When doing so, make it meaningful/useful. In your case I would suggested something like "shortened P systems". In any case the "On the edge of" is not needed in the short version. – Andrew Swann Feb 21 '15 at 14:47
  • as for other commentators I'd suggest using a short title, but a complete short title not just cut off with \ldots – David Carlisle Feb 21 '15 at 14:51
  • 3
    If you have such long titles DO YOU REALLY WANT ALL CAPS TEXT IN THE HEADER, IT SEEMS TO MAKE IT HARDER TO SET AND HARDER TO READ? – David Carlisle Feb 21 '15 at 15:00
  • @DavidCarlisle nice thought (the best so far), btw caps are default for the book class: http://tex.stackexchange.com/questions/49168/headers-in-book-format – Michal Kováč Feb 21 '15 at 16:15
  • Yes I know they are the default, and are fine if your titles are "Introduction" but I'd change the default here. The default headings page style also only uses either a chapter or a section title it doesn't try to put both on the same page. – David Carlisle Feb 21 '15 at 16:30
  • Exactly, you are obviously at the beginning of typesetting your thesis so you'll certainly will learn a lot about which classes offer you options you deem more suitable to your needs. You can customize a lot in LaTeX. – henry Feb 21 '15 at 16:37

1 Answers1

2

I would abbreviate the title to a complete phrase, not just truncate it with \ldots Also I would change the default marks not to uppercase. In the default settings the chapter titles are probably intended to be shorter and each page only has a chapter or a section heading, not both.

enter image description here

\documentclass[a4paper,12pt,oneside]{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength\headheight{15pt}
\makeatletter
\renewcommand\chaptermark[1]{%
 \markboth{\if@mainmatter
            \@chapapp\ \thechapter. \ %
          \fi #1}{}}
\renewcommand\sectionmark[1]{%
 \markright {%
          \thesection. \ %
        #1}}

\makeatother
\begin{document}
\chapter[edge of universality]
{On the edge of universality of sequential P systems}
\section{Active membranes}
\pagebreak
second page
\end{document}
David Carlisle
  • 757,742