1

my chapter titles are rather long, which is not a problem on text pages, but for the ToC. Hence, I use this command to provide two versions:

\chapter[Category\\ This is my long title]{Category -- This is my long title}

This works well, of course :-) Now my problem is that I'm using the memoir package, which places the chapter title on every odd page. For this, it uses the the chapter title provided for the ToC, but I want to use the other one to avoid line breaks in my header bar. Maybe I could provide three chapter titles, one for the text page, one for the ToC, and one for the header bar?!

Following my MWE. The resulting PDF illustrates on pages 3 and 4 a line break in the head row of the page I would like to avoid. Thank you!

\documentclass[12pt,twoside,openright,a4paper,oldfontcommands]{memoir}
\usepackage{lipsum}
\usepackage{soul}
\usepackage{tikz}

\renewcommand*{\cftchapterfont}{\bfseries}
\renewcommand*{\cftchapterleader}{\bfseries\cftdotfill{\cftchapterdotsep}}
\renewcommand*{\cftchapterpagefont}{\bfseries}
\renewcommand*{\cftchaptername}{Chapter }
\renewcommand{\cftchapteraftersnum}{~|~}

\chapterstyle{madsen}
\pagestyle{companion}

\makeindex

\begin{document}

\tableofcontents*

\chapter[Category\\ This is my very long title]{Category -- This is my very long title}
\lipsum[1-2]
\section{Test ABC}
\lipsum[1-2]
\section{Test ABC}
\lipsum[1-2]
\section{Test ABC}
\lipsum[1-2]
\end{document}
  • It's neither madsen or the companion style that produces this. The column titles in the headers use the short ToC [Chapter\\...] as default value, that's the cause. – user31729 Aug 13 '14 at 8:10
  • @ChristianHupfer I updated my question, thank you! – strauberry Aug 13 '14 at 10:23
  • as far as I know memoir provide tvo optional chapter fields, one for toc, one for heading, see memoir manual, pp. 75: \chapter[<toc-title>][>head-title>]{<title>}; \chapter*[<head-title>]{<title>}. – Zarko Aug 13 '14 at 12:38
  • @Zarko awesome, thank you! Please move your comment to an answer so I can accept it ;-) – strauberry Aug 13 '14 at 12:48
3

OK, let be my comment transformed to the answer. The memoir is very advanced document class, which among many improvements of book class also provide addition ability to define appearance of chapter, section etc title in TOC, heading and in the text. So, for chapter one can say:

  \chapter[<toc-title>][>head-title>]{<title>}; 
  \chapter*[<head-title>]{<title>}

For more information see Memoir manual, page 75.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.