Thursday, September 25, 2008

Removing / Hiding Page Numbers from Latex document (Remove / Hide)

Getting rid of page numbers from a latex document is a tricky thing to do :) sometimes you do not want page numbers in your document but the document class or style file you are using puts page numbers...

many websites/manuals/blogs suggest the use of \thispagestyle{empty} after \maketitle tag to overwrite the style file and remove the page numbers. But some style files will still print the page numbers on all pages except the first one... if this is the case then add \pagestyle{empty} tag and the page numbers from all the pages will be removed :)... the code will look like

\maketitle
\thispagestyle{empty}
\pagestyle{empty}

this trick worked in my case where i was using ieeetr.cls as document class... i hope it works for other cases as well...

31 comments:

Ken Allsop said...

Thanks, this was quite a helpful tip!

Anonymous said...

Thanks and it helps.

Sumant said...

Works! Thanks!

hauth said...

Thanks! THANKS A LOT! GREAT! FINALLY!
The solution for my problem. Great! 1000 Thanks!

Marcos said...

Thank you!

ِAhmed said...

Thank you. This helped

Manhoso said...

In my case using only the command \thispagestyle{empty} worked fine!

Thanks a lot

Relic said...

Thanks!

Anonymous said...

Just to introduce some change:

Cheers mate!

Simone said...
This comment has been removed by the author.
Simone said...

It worked for me! Thank you!

kimberly said...
This comment has been removed by a blog administrator.
রাশেদ said...

Thanks a lot.

Anil said...

Thank you! This saved me a LOT of time. Super tip.

James said...

Thanks you, very much appreciated :-)

Anonymous said...

Thanks!

Babak said...

Thanksss

J said...

Worked for the memoir class too, I guess it would work for any... Thanks!

爱让一切都对了 said...

Excellent!

Anonymous said...

Thanks.
It was really helpful.

Anonymous said...

Nice!!

M Naeem said...

Thanks for the share!
Simple majic worked for me as well in llncs.cls

Anonymous said...

Thanks. It helps.

Anonymous said...

Thanks!

Anonymous said...

Didn't work for me. Perhaps because of the custom header package I use.

Instead I use

\renewcommand\thepage{}

to get rid of page numbers.

Anonymous said...

thank you anonymous, for me too worked in the scrreprt class just \renewcommand\thepage{}

Anonymous said...

Great tip, thanks a lot!

Anonymous said...

This worked flawlessly. Thanks

Gustavo Eduardo Martínez Juárez said...

Works, pdflatex, ubuntu 12.04

Thank you

Anonymous said...

:( it does not work for me
I use memoir. I cant see what the problem is, it a rather complex document.

Anonymous said...

Thank you! simple solution but it works exactly what i want