[Tex/LaTex] Index (printindex) in appendix has different format than other chapters

appendicesformattingindexing

I have a complex file based on documentclass scrbook.
It has many parts and the last part is the appendix.
Instead of sections I use chapters in appendix.
All glossaries and bibliography are defined as chapter.

I also defined the index as chapter in doc_class:

...
\usepackage{imakeidx}
\makeindex
\indexsetup{level=\chapter,toclevel=chapter,noclearpage}
...

end of document looks like this:

...
\appendix
\part{My appendix}

\printglossary[type=\acronymtype,style=long,title=Acronym]
\printglossary[style=altlist,title=Glossary]
\bibliography{Bibliography}
\chapter{CD Contents}

%problem:
\printindex

\end{document}

All chapters in appendix appear like this:

Appendix (A, B, C, D)

Chaptername (Acronym, Glossary, Bibliography, CD Contents).

However the Index just has the heasline

"Index"
but
"Appendix E"
is missing.

Is there anything I can do, that

\printindex 

uses the defined format for chapter?

Full document structure below:

\documentclass[
pdftex,                             
a4paper,                            
headinclude,                    
headsepline,    
chapterprefix, 
appendixprefix,
bibliography=totocnumbered,     
openany,                        
index=totoc,            
ngerman                             
]{scrbook}

\usepackage{scrpage2}   

\usepackage{geometry}
\geometry{
    a4paper, 
    top=28mm, 
    left=25mm, 
    right=25mm,
    bottom=28mm, 
    headsep=10mm, 
    footskip=12mm
}

\renewcommand*{\partpagestyle}{empty} 

\usepackage[T1]{fontenc}                    
\usepackage[utf8]{inputenc}             
\renewcommand*{\familydefault}{\sfdefault}

\usepackage[toc,page]{appendix}

\usepackage[
    bookmarks
]{hyperref} 

\usepackage{multicol} 

\usepackage[
    nonumberlist,               % don't show page numbes
    acronym,                    
    toc,                        
    section=chapter,      
    numberedsection=autolabel]
{glossaries}
\makeglossaries

\usepackage{imakeidx}
\makeindex[
    intoc,
    columnseprule,
    columns=3
]
\indexsetup{level=\chapter*,toclevel=chapter*}  %,noclearpage

\usepackage[
    totoc,
    columns=3,
    unbalanced,
  %font=small                   
]{idxlayout}

\newacronym{AD}{AD}{Active Directory\protect\glsadd{glos:AD}}
\newglossaryentry{glos:AD}{name=Active Directory, description=
{Active Directory is a Windows-Server-bla bla asdfghjkl.~\cite{MS_AD}}}

\usepackage{blindtext}

\begin{document}
\pagenumbering{roman}

\blindtext

\tableofcontents
\label{chap:Inhalt}
\addcontentsline{toc}{chapter}{Inhalt}

\part{Intro}

\blindtext
Here we are with \gls{AD} for the first time. Here we find \gls{AD} for the second time~\cite{MS_AD}.
\chapter{Introduction}
\blindtext
\chapter{Related Work}
\blindtext

\part{Main}
\blindtext
Effective administration \index{Administration} is important for users \index{Administration!user} and adminstrators index{Administration!adminstration}.
\chapter{Introduction}
\blindtext
\chapter{Related Work}
\blindtext

\appendix
\part{Appendix}

\printglossary[type=\acronymtype,style=altlist,title=Abrev]
\printglossary[style=altlist,title=Glossary]

\bibliographystyle{alphadin}
\bibliography{Bibliography}

\chapter{CD Contents}

\printindex

\end{document}

Best Answer

You should

  1. remove the index=totoc option to the document class

  2. remove the call to idxlayout that does nothing

  3. define \indexsetup{level=\chapter,toclevel=chapter} (the * means “no number”)

  4. move the call of hyperref to be the last loaded package

enter image description here

Related Question