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

Could anyone please show me how to get this page number formatting:

enter image description here

share|improve this question
Is the 3 the chapter, and 11 the page number? – cmhughes Jan 7 '13 at 16:50
No, 3 is the page number, and 11 is the number of pages. Thanks for your interest. – Khue Jan 7 '13 at 17:36
up vote 3 down vote accepted

The code should be well-commented I hope.

enter image description here



\color{black!60!white}% background box color
\rule[0.05in]{0.8in}{1in}% background box raise, width, height
\hfil\strut\raisebox{0.25in}{% number raise
\sffamily\bfseries\color{white}% number color
\Huge% number fontsize
\kern0.1em% distance number-bar
\rule{1pt}{1.4ex}% bar size
\kern0.15em% distance bar-totalnumber
\Large% totalnumber fontsize
\fancyheadoffset[LE,RO]{1.2in}% protrusion 

\usepackage{lipsum}% just for dummy text



share|improve this answer
Perfect! Thank you so much, tohecz! – Khue Jan 8 '13 at 14: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.