4

I am writing a document in which I would like to include table of contents, after which I will write a prologue.

The issue is that the second page of the chapter, has the header of the ToC, as seen in the following imageenter image description here

Any idea on how to add the proper header?

A sample code follows

\documentclass{book}
\usepackage[Conny]{fncychap}%Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\UCTfalse
\usepackage{blindtext}

\begin{document}

\tableofcontents

\chapter*{Prologue}
\blindtext[5]
\end{document}
0

2 Answers 2

3

suppressing the chapter name with \chapter*{} causes the headers not to update. You can change that by adding \markboth{Prologue}{}.

\documentclass{book}
\usepackage[Conny]{fncychap}%Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\UCTfalse
\usepackage{blindtext}

\begin{document}
    \tableofcontents
    \chapter*{Prologue}
    \addcontentsline{toc}{chapter}{Prologue}  % if you want to add the Prologue to TOC
    \markboth{Prologue}{}                     % to change the header despite \chapter*{} command
    \blindtext[5]
\end{document}

Here's the result:
preview

Hope this helps :)

Edit: note that you will have to do this for every chapter you suppress with *, if you want it to change the headers, not just after the TOC.

1
  • @Thanos you're welcome! :) glad it helped. Mar 7, 2019 at 11:07
3

You can use \frontmatter, \mainmatter and \backmatter commands and place the whole frontmatter inside a "group" (\begingroup and \endgroup commands) with a \pagestyle{plain} command just after \frontmatter:

\documentclass{book}
\usepackage[Conny]{fncychap}%Options: Sonny, Lenny, Glenn, Conny, Rejne, Bjarne, Bjornstrup
\UCTfalse
\usepackage{blindtext}
\title{Test}
\begin{document}


\maketitle
\begingroup
\pagestyle{plain}
\frontmatter
\tableofcontents
\chapter*{Prologue}
\blindtext[5]
\endgroup
\mainmatter
\chapter{Introduction}
\blindtext[5]
\backmatter
\appendix
\chapter{App1}
\blindtext[5]
\end{document}

Check the headers and footers in the result of the above code to see if everything is as expected from you.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .