I am having some issues with the hyperref package. I would like to create a Introduction chapter without a number so I use \chapter*{Introduction}
and \addcontentsline{toc}{chapter}{Introduction}
because I want it in the table of contents (see example).
But then the link in my PDF viewer gets it wrong and also the automatically created header is no longer correct (see picture). The table of contents shows the right page number (p.1) but the link is also wrong.
What is my mistake here?
\documentclass{scrbook}
\usepackage{hyperref}
\usepackage{blindtext}
\usepackage{glossaries}
\makeglossaries
\newacronym{eg}{e.g.}{%
for example
}
\begin{document}
\frontmatter
% abstract before the table of contents
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
\blindtext
\tableofcontents
% chapter with acronyms
\cleardoublepage \phantomsection
\printglossary[type=\acronymtype]
\addcontentsline{toc}{chapter}{Glossary}
\cleardoublepage
\mainmatter
\phantomsection
% \chapter{Introduction} % with this everything is correct but I don't want the number
\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}
\blindtext
\pagebreak
\blindtext
% first chapter
\chapter{Chapter1}
\gls{eg}
\blindtext
\pagebreak
\blindtext
\end{document}
addchap
?\addcontentsline
but you have to take care of all the rest yourself. KOMA takes care of it with\addchap
so it is reallly useful.