When using an unnumbered part (\part*
), added to TOC using \addcontentsline
, the page number for the part page is wrong.
See this MWE :
\documentclass{book}\begin{document} \tableofcontents \part*{First part} \addcontentsline{toc}{part}{First part} \chapter{Chapter 1}\end{document}
The "Part 1" page is page 3, but the TOC says 5, like the beginning of the first chapter. If we adds hyperref
the anchor for the internal link will be similar (page 5 instead of page 3).
It seems basic, but I can't figure out how to fix this behavior, and to my surprise I've found no answer, here or in regular latex manuals… Does someone know what is going wrong here?