[Tex/LaTex] Remove Pagenumber from first page of index

indexingpage-numbering

I have a multiple page-long index in an extarticle document.
However, I am trying to remove the page number (of the bottom of the page) for the whole index.

using \pagestyle{empty}and/or \thispagestyle{empty} resulted in all (footnote-)page numbers getting removed (like expected) but the (footnote-)page number of the first page of the index.

Is there any fix to this?
I tried multiple approaches but had no luck until now.

Addendum

edit1: Indeed, I can only set the page-numbering style of all index-pages BUT the first one. (using fancyhdr and \pagestyle{fancy}

edit2: As I am using a custom .ist for index generation: I tried adding \pagestyle{empty} to it. But this has the same effect.

Best Answer

Many classes use \thispagestyle{plain} for the first page of a chapter. Since you are using a custom .ist file, there is an easy workaround. The key preamble can be set to add \thispagestyle{plain}, e.g.:

preamble "\\begin{theindex}\\thispagestyle{empty}\n"

If class memoir is used, the page style for the first index page can be changed via:

\documentclass{memoir}
\aliaspagestyle{indextitlepagestyle}{empty}

Or if all first pages of chapters including the index should be have an empty page style:

\documentclass{memoir}
\aliaspagestyle{chapter}{empty}

KOMA-Script provides the macro \indexpagestyle, which contains the page style for the first index page. It can be redefined as:

\renewcommand*{\indexpagestyle}{empty}

An empty page style for the first pages of the other chapters are set by:

\renewcommand*{\chapterpagestyle}{empty}

In the standard classes as report or book, the page style is hard coded. If the page style plain should be replaced by empty in all cases, the page style can be redefined:

\makeatletter
\let\ps@plain\ps@empty
\makeatother

If the page style should be changed in theindex only, then it can be patched:

\documentclass{book}
\usepackage{etoolbox}
\patchcmd\theindex{\thispagestyle{plain}}{\thispagestyle{empty}}{}{%
  \errmessage{Could not patch \string\theindex}%
Related Question