I have a chapter (??) which is intended to be printed on the inside back cover of a booklet I am producing. I want it listed in the table of contents, but with a pointer to 'insider back cover' in the ToC, not a page number. Is this possible? If so, how?

I have been trying code which looks like this:

\addtocontents{toc}{\contentsline{chapter}{\numberline{}{Mission of our organization}{inside back cover}}}


but keep getting compilation errors which read like so:

) [60] (./backmatter/01_mission.tex
! Argument of \contentsline has an extra }.
<inserted text>
\par
l.4 ...our organization}{inside back cover}}}

? q


Any guidance is appreciated. Thanks.

• I just tried this: \setcounter{page}{inside back cover} but got this error message on compilation:  [60] (./backmatter/01_mission.tex ! Missing number, treated as zero. <to be read again> i l.2 \setcounter{page}{inside back cover} Dec 7 '21 at 5:42
• Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
– Community Bot
Dec 7 '21 at 5:45
• If you are actually printing the last page, just use \def\thepage{} or possibly \def\thepage{Cover} anywhere on the last page. \pagestyle{empty} might help. Dec 7 '21 at 15:53

Two things:

1. You need to \protect content that you don't want expanded, since writing to the .toc will do that.

2. \contentsline takes four arguments.

\documentclass{book}

\begin{document}

\tableofcontents

\chapter{A chapter}


• So, what does \protect mean? And how do I know when I need to use it? Dec 7 '21 at 6:38
• @HughEsco: \protect avoids expansion and is often used when dealing with moving arguments (like \captions, which print their contents to the LoF/LoT). See What is the difference between Fragile and Robust commands? When and why do we need \protect?