Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

What is the best way to remove Page Numbers from a Multi-Page TOC without touching the \pagestyle or \thispagestyle?

I've seen this post already, but I want to find out if there are more ways to solve this.

Furthermore, if you have a collection of "pages", how do you easily nest these inside a block that does not include page numbers?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

If you don't want to change the page style, you could change the page numbering. For example:

\cleardoublepage
\pagenumbering{gobble}
\tableofcontents
\cleardoublepage
\pagenumbering{arabic}

Here, I switched it off by using gobble. Note, by \pagenumbering{arabic} the numbering starts with 1, so it might be that you would like to raise the page number using \refstepcounter or \addtocounter, for example.

I used \cleardoublepage to end the page before changing the page numbering. Otherwise the last table of contents page could get an arabic number.

You could use this for disabling page numbering in blocks, or consider adjusting the page style in the block, or redefine \thepage locally within in the block. If you need \thepage though, you could introduce another macro, which is \thepage by default and is used in your header or footer, and change that temporarily.

share|improve this answer
    
You rock. But I got a page number on the page before the TOC, but maybe that could be caused by something else? Edit, added a \newpage and it works now, thanks a lot –  Filip Ekberg Jan 19 '12 at 9:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.