# Remove page number in ToC but not on the page

I have a problem removing the page numbering in the ToC but not on the page. I´ve looked around for answers and tried several things but nothing works. I have to use \thispagestyle{plain} for numbering of the pages but this automatically puts the page in ToC. If I use {empty} instead, then I remove the page numbers on the page ...

newpage
\thispagestyle{plain}
\setcounter{page}{1}
%\pagenumbering{gobble} (this supresses the page numbers on the page which is not what I want)

\chapter*{Appendix 1: Room Temperature}

\noindent\makebox[\textwidth][c]{\raisebox{-0.9\height}[10pt][10pt]{\includegraphics[page=1,scale=0.6]{Room-Code}}}\par



• I'm not sure I understand: you want the page to be numbered, but the list of entries in the ToC should not have the page numbers? So just a list of chapter/section titles? – campa Aug 15 '19 at 13:01
• @campa I have chapters in my text which numbers are displayed in the ToC. However, the appendixes should not have their numbers displayed in ToC but should have numbers in the pages. That's how my school wants it – Delfinium Aug 15 '19 at 13:07
• Sorry, but you have not submitted any code we can work with. We need something self contained (and minimal) that we can just copy and test as is. Here there is no document class, no preamble, an image we do not have (probably irrelevant anyway) – daleif Aug 15 '19 at 13:12
• Possible dublicate of this. – Niklas Aug 15 '19 at 13:43
• @Niklas his example suppresses the numbers in the ToC however, it also removes the numbers on the pages in the appendices – Delfinium Aug 15 '19 at 13:50

Without an MWE in the question (document class, TOC related packages etc) it can be only a guess.

You could use package tocloft and add \cftpagenumbersoff{chapter} to the TOC.

Example:

\documentclass{report}
\usepackage{blindtext}% only for dummy text

\usepackage{tocloft}

\begin{document}
\tableofcontents
\blinddocument

\cleardoublepage
\setcounter{page}{1}
\chapter*{Appendix 1: Room Temperature}

\blindtext
\end{document}


Or suggestion with package tocbasic:

\documentclass{report}
\usepackage{blindtext}% only for dummy text

\usepackage{tocbasic}
\newcommand\gobble[1]{}

\begin{document}
\tableofcontents
\blinddocument

\cleardoublepage
\setcounter{page}{1}

\chapter*{Appendix 1: Room Temperature}

\blindtext
\end{document}


Or with \appendix:

\documentclass{report}
\usepackage{blindtext}% only for dummy text

\usepackage{tocbasic}
\newcommand\gobble[1]{}
\newcommand\appendixprefixintoc[1]{\appendixname~#1:\hfill}

\begin{document}
\tableofcontents
\blinddocument

\cleardoublepage
\appendix
\setcounter{page}{1}