Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to move the position of my page numbers to the bottom right of the page. Is there a way to do it without using the fancyhdr package?

Right now I just use

\pagenumbering{roman}

and it does the job, but the default setting is to put the page number in the bottom middle. If it makes a difference, I am using TeXworks.

share|improve this question
2  
Any reason to not using fancyhdr package? Also what documentclass are you using? –  mythealias Nov 14 '12 at 21:46
    
I am using \documentclass{article} –  suzu Nov 14 '12 at 22:29
add comment

3 Answers

I had the same problem, even though I was using the fancyhdr package. The key is to use the

\fancyhf{}

tag before you use

\begin{document}

if you are using fancyhdr and still getting enumeration for the page numbers in the center of your footer. You can also use the command

\fancyhead[R]{\thepage}

to put the page number in the upper righthand side of the page in the header.

share|improve this answer
add comment

Turns out it is actually easiest to just use \usepackage{fancyhdr}. Added this code and everything works like a charm.

\usepackage{fancyhdr}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\makeatletter
\let\ps@plain\ps@fancy
\makeatother
\rfoot{\thepage}
share|improve this answer
1  
You must require something else to actually set the page number in the footer, right? Something like \fancyfoot[R]{\thepage}. –  Werner Nov 15 '12 at 2:37
add comment

I assume, you are using pagestyle plain. The original definition can be found in source2e. It can be changed from centering to right aligning the page number:

\makeatletter
\renewcommand*{\ps@plain}{%
  \let\@mkboth\@gobbletwo
  \let\@oddhead\@empty
  \def\@oddfoot{%
    \reset@font
    \hfil
    \thepage
    % \hfil % removed for aligning to the right
  }%
  \let\@evenhead\@empty
  \let\@evenfoot\@oddfoot
}
\makeatother
\pagestyle{plain}

Remarks:

  • Some document classes might already contain support for configuring the footer.
  • The page headers and footers can be configured via package fancyhdr or package scrpage2 (from KOMA-Script).
share|improve this answer
add comment

Your Answer

 
discard

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.