Get rid of page number on 1st page of ToC in LaTeX!

LaTeX, or more generally TeX, is undoubtly the best typesetting tool available, and what’s more, it’s for free (for Windows users – check out MiKTeX!). Yet, there are few things that should work in a certain “obvious” way, yet they don’t (fortunately, there’s very few of them).

One of them is quite a surprising thing – pagestyle{empty} command does not affect first page of the table of contents. Yet, all the other pages of ToC it does! The same holds for list of figures and list of tables.
This is quite an annoyance, especially if you put ToC at the beginning of the document, and want to have all the pages, before the real contents starts, without the page numbering.

So, how to get rid of the page number on the first page of table of contents in LaTeX? You have to dig into the header and footer setting for this.

First thing is to use fancyhdr package – put usepackage{fancyhdr} command anywhere before the begin{document}.

Second, right before issuing the tableofcontents command, redefine the “plain page style” to an empty one, like this:

}	% clear header and footer of plain page because of ToC

And after the ToC, just get back to the “classical” plain page style (this is important – even if you use your “fancy” page style, each page containing first page of chapter is “plain”, unless you redefine this behaviour), like this:

}	% re-define plain page after the ToC

This block has to be “on a new page” – either after you issue newpage or cleardoublepage command, or after your first chapter{...} command.

19 responses to “Get rid of page number on 1st page of ToC in LaTeX!

  1. Nice!

    Thanks for the info, i’ve been cracking my head open on this one…
    it’s also possible to do clear the plain pagestyle within an encapsulating environment, so you don’t have to redefine it afterwards

    } % clear header and footer of plain page because of ToC

  2. You’re welcome, I’m glad I could be of any help!

    Thanks for the snippet, I found it later also, yet I was lazy to update the post to include it…


  3. This also worked for me:



  4. I’m not quite sure what exactly you mean; you can blank-out just parts of footer and header, like this:

    \fancyfoot[C]{} % clears central part of footer


  5. This did the trick for me (without needing fancyhdr)


  6. This also seems to work:
    put \addtocontents{toc}{\protect\thispagestyle{empty}}
    before the \tableofcontents command.

  7. Thank you so much for this tip. I ended up using the one that redefines \thepage because I got some slight weirdnesses when I used fancyhdr. This was the last formatting bug I had to fix and it was really annoying.

  8. I think the simplest way is to place \pagestyle{empty} in the header (this removes the page number for pages 2 and beyond) and place \thispagestyle{empty} anywhere in the BODY of the first page (that is, after some text has been written to the page).

  9. Dear all,
    I am writing my dissertation. I am have problems with producing the desirable pdf. The problems I am getting are:
    1. No bookmark for Title Page or ToC.
    2. List of Figures and List of Tables bookmarks point to Title Page.
    3. Bibliography and vita are bookmarked under Part III (Appendices).
    4. ToC lists a page number for each of the Parts’ pages.

    My main file is copied here. What I want to end up with is:
    1. Top level bookmarks with correct targets for:
    a. Title Page
    b. ToC
    c. List of Figures
    d. List of Tables
    e. Main matter components
    f. Bibliography
    g. Vita
    h. Appendices
    2. I want each of the Parts’ pages not to have a page number on the ToC.

    The use of “Part: Documentation” is only a workaround and not a solution. I do not like it, but I do not have a working alternative now.

    I tried using the appendices environment but kept receiving an error message about redefining a command that was not defined before. My guess is that the Appendix package is running into a conflict with another package. My problem is that I cannot figure out which one is the offensive package.

    Any help is greatly appreciated.

    Best regards,
    % This is file `iuthesis.tex’,
    % generated with the docstrip utility.
    % The original source files were:
    % iuthesis.dtx (with options: `docs’)
    % IUThesis Document Class (N. Danner)
    % iuthesis: Document class for IU Thesis.
    % N. Danner (
    % Copyright 1999
    % RCS Info:
    % iuthesis.dtx,v 1999/06/04 14:30:00 ndanger Exp
    \usepackage{listings} % identify the language with \lstset{language=FORTRAN}
    \usepackage[usenames]{color} % to include .jpg figures
    \usepackage{graphicx} % to include .jpg figures
    %The following six lines make it possible for Figure number to go continuous over all chapters using the package: {remreset}.
    pagebackref = true,
    breaklinks = true,
    colorlinks = true,
    linkcolor = red,
    anchorcolor = red,
    citecolor = blue,
    filecolor = red,
    urlcolor = red,
    pdfborder={0 0 0}
    pdftitle = {My Dissertation},
    pdfauthor = {Me},
    \title{Geol. of the IL Basin}
    \advisor{} \secondreader{}
    \fourthreader{} \fifthreader{}

    \department{Geological Sciences}
    \submitdate{2 May 2011}
    \copyrightyear{~\copyright ~2011}

    % Dedication
    % \begin{dedication}
    % \textbf{Dedication}\\
    % \bigskip
    % \par
    % To my parents, wife, and daughters\\
    % \par
    % \ldots \par \ldots \par \ldots
    % \end{dedication}

    % Dedication
    To my parents, wife\\
    \ldots \par \ldots \par \ldots

    % Acknowledgements
    Thank God, advisor, committee members, IUB computing facilities, and Aramco\\
    \ldots \par \ldots \par \ldots

    % Abstract
    In this dissertation, I will discuss\\
    \ldots \par \ldots \par \ldots


    % generate the Title
    % generate the Signature page
    % generate the Copyright page
    % generate the Dedication page
    % generate the Acknowledgement page
    % generate the Abstract page
    % insert the table of contents
    %{\texorpdfstring{\tableofcontents}{Table of Contents}}
    % insert the list of figures
    % insert the list of tables

    \part{Stratigraphic Modeling}


    % End of file `iuthesis.tex’.

  10. Thanks for the tips.


    They were live savers.

  11. Having no page numbers for the front matter is not common practice and would look very odd. No wonder it’s hard in LaTeX! Instead you should have Roman numbering for the pages of the front matter (i, ii, etc.) and arabic numbering restarting at 1 for the main matter. Because it’s the right thing to do, this is easy in LaTeX without any tricks; just Google something like “LaTeX front matter Roman page numbers” for instructions.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s