3

From a previous question, here's some code that enables subtitles for chapters, while also adding the subtitles to the ToC.

\newcommand\Chapter[2]{\chapter
[#1\hfil\hbox{}\protect\linebreak{\itshape#2}]%
{#1\\[2ex]\Large\itshape#2}%
}

Unfortunately this also adds the subtitles to the page headers. Is there a way of achieving the same effect in the chapter titles and ToC, but without having the subtitles in the page headers?

sujato
  • 367

1 Answers1

6

Here is a suggestion using \markboth

\newcommand\Chapter[2]{\chapter
  [#1\hfil\hbox{}\protect\linebreak{\itshape#2}]%
  {#1\\[2ex]\Large\itshape#2}%
  \markboth{\MakeUppercase{\chaptername\ \thechapter.\ #1}}{}%
}

enter image description here


enter image description here


enter image description here

Code:

\documentclass{book}
\usepackage{lmodern}

\newcommand\Chapter[2]{\chapter
  [#1\hfil\hbox{}\protect\linebreak{\itshape#2}]%
  {#1\\[2ex]\Large\itshape#2}%
  \markboth{\MakeUppercase{\chaptername\ \thechapter.\ #1}}{}%
}

\usepackage{blindtext}
\begin{document}
\tableofcontents
\Chapter{Title}{Subtitle}
\blindtext[10]
\end{document}


There is another possibility: try a KOMA-Script class with the class option

headings=optiontoheadandtoc

Then the extended interpretation of the optional argument is activated and you can use

\newcommand\Chapter[2]{\chapter[
    tocentry={#1\hfil\hbox{}\protect\linebreak{\itshape#2}},
    head={#1}
  ]{#1\\[2ex]\Large\itshape#2}%
}

enter image description here


enter image description here


enter image description here

Code:

\documentclass[headings=optiontoheadandtoc]{scrbook}
\usepackage{lmodern}

\newcommand\Chapter[2]{\chapter[
    tocentry={#1\hfil\hbox{}\protect\linebreak{\itshape#2}},
    head={#1}
  ]{#1\\[2ex]\Large\itshape#2}%
}

\usepackage{blindtext}
\begin{document}
\tableofcontents
\Chapter{Title}{Subtitle}
\blindtext[10]
\end{document}
esdd
  • 85,675
  • Thanks! Both these solutions worked. However the first solution also changed the formatting of the headers, apparently overriding some settings used for fancyhdr. So, even though I've not used Koma before, I'll go with the second suggestion. – sujato Jul 04 '14 at 22:22