Quantcast
Channel: Active questions tagged starred-version - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 63

Wrong TOC page number with starred part + \addcontentsline

$
0
0

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?


Viewing all articles
Browse latest Browse all 63

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>