[OS X TeX] Page number appears with \pagestyle{empty}

Josep Maria Font jmfont at ub.edu
Mon Mar 1 04:28:44 EST 2010


El dia 28/02/2010, a les 22:48, Ross Moore va escriure:

> The reason is that \tableofcontents  starts a new chapter,
> and the footer style for the 1st page of a chapter is different
> to that of later pages.
>
> Having \thispagestyle{empty}  coming after  \tableofcontents
> is useless, as the first page of a multi-page ToC has appeared
> well before that command is encountered.
>
> Having \thispagestyle{empty}  coming before  \tableofcontents
> is equally useless, as the internal \chapter command
> changes the pagestyle anyway.

Crystal clear explanation!

> Here is one way to suppress the pagenumber,
[...]

Here is another: insert

\addtocontents{toc}{\thispagestyle{empty}}

near the first \chapter or \section command in your document that you  
presume will produce an entry in the table of contents. This should  
insert the relevant command *inside* the .toc file, so it will be  
executed at the wnated moment.

I never tried this one, but it should work, I hope. I tried other  
inserts, such as a \newpage so that the contents does not break page  
in the middle of a chapter, which I found ugly, and it worked.

Best,


JMaF




More information about the MacOSX-TeX mailing list