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

I need to move the page number to the very bottom of the page, so it scrapes the bottom edge of the actual sheet (US letter). How do we do that?

share|improve this question
Beware of what you wish for: you may have to print it one day, on a printer which can't print on the last 5mm of the paper... – Brent.Longborough Nov 10 '11 at 20:48
up vote 11 down vote accepted
share|improve this answer

You can do more than move the page number. From comp.text.tex:




      {\makebox[0pt][c]{\pgn@fmt{Page \thepage}}}}% 

  \hrule height1pt depth.5pt width\headwidth\relax 
  \vspace{2pt}\hrule height1pt depth.5pt width\headwidth 

  \hrule height1pt depth.5pt width\headwidth\relax 
  \vspace{2pt}\hrule height1pt depth.5pt width\headwidth 



  scale=5,angle=90,chead=\textcolor{cyan}{From \texttt{xwatermark} package}, 
  cfoot=Specimen fancy page numbers] 



  angle=0,chead=Sample use of \sstring\FancyPageNos] 



The rubbishing of the syntax is not my fault. I simply copied my solution and pasted here. I hope you can arrange the code correctly.

share|improve this answer
Oops, the syntax is correct after all! – Ahmed Musa Feb 4 '11 at 19:51
Maybe you could add some explanations what this does, for those of us who don't want to/can't read all that code. – Caramdir Feb 4 '11 at 20:20
If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "101010" on it). – Caramdir Feb 4 '11 at 20:21
The macro \FancyPageNos provides a key-value interface for formatting and positioning the page number. The keys/options available are typified by the examples provided with the post. ‘fmt’ is the desired format, cfoot, rfoot, lfoot, chead, rhead, lhead have the same meaning as explained in the fancyhdr package documentation. Running the example provided gives further hints. – Ahmed Musa Feb 4 '11 at 21:03
Thanks, Pluto, this is interesting! – Alexy Feb 5 '11 at 2:07

Just write:

share|improve this answer
Welcome to TeX.sx! Answers here should include some details and explanations. Actually answers so short are automatically flagged for moderator review. – Martin Scharrer Jan 13 '12 at 19:07
This may be an approximate measure. However, since the location of the page number may depend on other components (text block height, for example), this would not solve the original question in general. – Werner Jan 15 '12 at 17:37

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.