I am trying to set the page number for my last page as "End Page" because that is a thesis requirement for my university. This is what I have:

\chapter*{ABOUT THE AUTHOR} 
\setcounter{page}{End Page}
\addcontentsline{toc}{chapter}{About the Author}

I get an error on line 3 that a number is missing and it is treated as 0. The number shows up as 0 in the TOC.

  • 1
    Welcome! \setcounter sets a counter, i.e. a number. Depending on which document class and styles you use, there are different you use, there are different options. One of them is to use fancyhdr and to play with \chead etc. But for people really to give you specific answers, you may want to specify the document classes and the relevant style files.
    – user121799
    Commented Nov 25, 2017 at 3:15
  • So if I used \chead it would change the page number on the final page and the TOC, but how would I change the TOC, and not the final page? To be specific, I want to completely suppress the page number on the final page, and just have it labeled in the TOC as "End Page."
    – Bex
    Commented Nov 25, 2017 at 3:45
  • 1
    Well, as I wrote above, you need to provide more input concerning document class and styles before others can help you. Another suggestion is to make use of the search of this site, you'll be surprised how many suggestions you find.
    – user121799
    Commented Nov 25, 2017 at 3:54
  • 1
    @Bex: Depending on the content towards the last page of your thesis, it might suffice to use \AtEndDocument{\renewcommand{\thepage}{End Page}}.
    – Werner
    Commented Nov 25, 2017 at 6:36

1 Answer 1


This is one possible solution. It is quite possible that the question is a duplicate to this question.

\clearpage %from https://tex.stackexchange.com/questions/152589/how-to-add-a-line-to-the-table-of-contents-without-a-page-number
  \protect\contentsline{section}{Acknowledgments}{End Page}}
\chead{}\rhead{Acknowledgments}\cfoot{End Page}
I'm grateful to an anonymous marmot sacrificing precious hibernation time for \TeX\ related questions.

For a given document class, there will very likely be much more elegant solutions.

  • I attempted this \chapter*{ABOUT THE AUTHOR} \label{ch:author} \thispagestyle{empty} \addtocontents{toc}{% \protect\contentsline{chapter}{About the Author}{End Page}} \addcontentsline{toc}{chapter}{About the Author} But under the line in the TOC it outputs chapterAbouttheAuthor14chapter*.13 and I'm not sure why. If I eliminate \addcontentsline{toc}{chapter}{About the Author}, it does not print the desired line in the TOC at all.
    – Bex
    Commented Nov 25, 2017 at 16:49
  • Well, given the format in comments, I can't tell if there is an issue because of the % sign. More precisely, the the stuff \protect.. needs to go in a new line, or you need to drop the % sign. (Also, \label does not make much sense in \chapter*.) The best way to go is if you include something similar to my code in your question, of course adapted to your needs, and then post this as a real question with real MWE. See also @Werner's comment.
    – user121799
    Commented Nov 25, 2017 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .