TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So, I'm using the article class, and I'd like to make the page number smaller, and set it in a different font. I don't need to create a new pagestyle, necessarily, and I'm hesitant to do so without understanding the ramifications.

share|improve this question

You could use a KOMA-script class (e.g. scrartcl instead of article) and add the following to the preamble:


I initially recommended to redefine the \thepage command but, as Lev Bishop has pointed out, this has adverse effects and shouldn't be done.

share|improve this answer
Sorry lockstep, I didn't notice you'd posted your solution as I was posting mine. Here's +1 by way of apology ;) – Geoffrey Jones Oct 3 '10 at 14:03
Changing \thepage this way is a really bad idea. It will make see page \pageref{lbl} for more information Expand to see page \small\sffamily3 for more information (setting "for more information" small and sans serif") which is surely not desired, and it will cause hyperref to fail completely. – Lev Bishop Oct 3 '10 at 15:29
@Lev Bishop: You're of course right. Not sure what I was thinking. :-( @Marcin: Disregard the first part of my answer. You should either use a KOMA-script class or wait for someone who doesn't give blindfold pieces of advice. – lockstep Oct 3 '10 at 15:40
But the KOMA-script info should still be correct. Could you edit your answer so that it mainly shows that. – Caramdir Oct 3 '10 at 15:47
@lockstep, hope you don't mind that I've edited your answer to remove the incorrect information and only leave the valid suggestion of using KOMA-script. Please feel free to revert these changes, or edit the question yourself if you feel this doesn't represent the original intention of your answer. – Juan A. Navarro Oct 4 '10 at 10:50
up vote 7 down vote accepted

Thanks for the suggestion to use fancyhdr/redefine page styles. From the fancyhdr manual:

\fancyhf{} % clear all header and footer fields
\fancyfoot[C]{\sffamily\fontsize{9pt}{9pt}\selectfont\thepage} % except the center
share|improve this answer
Thanks for posting the example code, this is very useful! – Juan A. Navarro Oct 4 '10 at 10:51

The correct way to achieve this is to make a new page style. As this FAQ answer discusses, redefining the \thepage will only cause problems with all the places page numbers are used (\pageref, table of contents, hyperref labels, etc, etc). Such changes will also not survive past a book-class change from \frontmatter to \mainmatter and so on.

Changing the pagestyle is easy enough with the fancyhdr package.

share|improve this answer
OK, cool, I will check that out. Thanks! – Marcin Oct 3 '10 at 20:40

EDIT: As Lev kindly pointed out in his comment about it breaking various things, you definitely shouldn't think of this:

I can't help you with your font unless you mention which font you'd like. However, this code should give you a start:

\renewcommand*\thepage{\small{\ttfamily-- \oldthepage\ --}}
share|improve this answer
Changing \thepage this way is a really bad idea. It will make see page \pageref{lbl}. Expand to see page {\small{\ttfamily-- 3\ --}}. which is surely not desired, and it will cause hyperref to fail completely. – Lev Bishop Oct 3 '10 at 15:23
Lev's right of course. Now he points it out, it's quite obviously a really bad idea. – Geoffrey Jones Oct 3 '10 at 22:15

Your Answer


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.