4

The MCE and images below point out that, with imakeidx' index, some headers may be missing, e.g. on the:

  • even page (chapter stuff) just before index 1st page (the index starting on an odd page, just at its top),
  • index 1st page (the index starting on an odd page, not at its top).

Do you see how to fix this?

\documentclass{book}
\usepackage{imakeidx}
\usepackage[papersize=12cm]{geometry}
\usepackage{lipsum}

\indexsetup{level=\section*,toclevel=section,noclearpage}

\makeindex

\newcommand{\test}[1]{%
  \chapter{Foo}
  \section{Bar}

  Baz\index{Baz}

  \lipsum[1-#1]

  \printindex
}

\begin{document}
% Missing header on the even page (6) just before index 1st page (7)
\test{8}
% Missing header on index 1st page (13)
\test{5}
\end{document}

enter image description here enter image description here

4

By default imakeidx sets the page style of the first page of the index to plain. You need to keep it as headings.

Change your \indexsetup to:

\indexsetup{level=\section*,toclevel=section,noclearpage,firstpagestyle=headings}

You could probably make a case that imakeidx should not change the heading style when the noclearpage option is set. But I'm a little cautious about telling the author of that particular package what to do! :)

  • Sigh, I should not have missed that :( Anyway, I will be much more brave than you! ;) – Denis Bitouzé Nov 25 '17 at 8:58

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.