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

How do you enter a page number on the right-hand side of each page?

Also, is there a command so that "My name" is on the top left corner of each page except the first page?

And maybe put a bar below the two above items?

I am using document class resume.


 \name{\Large My name} 

 This is page 1. 


 This is page 2. 


 This is page 3.   


Thank you.

share|improve this question
Suggestion: fancyhdr package. fancyhdr package – azetina Sep 20 '12 at 15:38
Thank you for the link. I will try that! – math-visitor Sep 20 '12 at 15:39
@azetina please turn your comment into an answer, with a complete MWE :) – cmhughes Sep 20 '12 at 16:21
up vote 5 down vote accepted

fancyhdr works with resume (which is based on article), but some adjustments are necessary:


\usepackage{kantlipsum} % to provide mock text



\name{\Large My name}





Comment out the \fancyheadoffset line if you don't want that the line on the pages following page 1 are extended on the left. If you want to increase the separation between the rule and the text, modify the value of \headsep and also the value of \topmargin.

enter image description here

Note. The mysterious \expandafter\@gobble\@name is needed because \@name expands to \Large My Name, after \name{My Name}, so we have to remove the unwanted \Large command.

share|improve this answer
Thank you. This is helpful, but since I do not have kantlipsum.sty, I followed the instructions as on this link: ctan.org/tex-archive/macros/latex/contrib/kantlipsum and downloaded kantlipsum.sty, kantlipsum.dtx, kantlipsum.ins. But neither the name in the header or the page numbers are showing up on my pdf file. Am I at a trust-worthy website and am supposed to download the kantlipsum package from this link? – math-visitor Sep 21 '12 at 3:45

The following code may be of assistance to solve your issue:

\usepackage{lipsum}% Used to create the random paragraphs
\lhead{My Name} % controls the left corner of the header
\chead{} % controls the center of the header
\rhead{} % controls the right corner of the header
\lfoot{} % controls the left corner of the footer
\cfoot{} % controls the center of the footer
\rfoot{Page~\thepage} % controls the right corner of the footer
\thispagestyle{plain}% Removes the header from the first page. Change plain to empty to remove the numbering entirely.

enter image description here

share|improve this answer
Could you try and mould the answer into a resume document class? There may be specific requirements dealing with something other than article. – Werner Sep 20 '12 at 16:47
Sure, but what type of class is resume? – azetina Sep 20 '12 at 16:49
Based on the document class options ([margin,line]) and only using \name, it could be a renamed version of the res class. – Werner Sep 20 '12 at 17:44

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.