4

I am trying to change the position of the page numbers from the bottom center to the bottom right. I tried using the fancyhdr package which seemed to be the most recommended way to solve this issue. However, when I used it along with the \maketitle command the fancyhdr package has no effect on the first page. On the second page the positioning of the numbers does move to the bottom right, but I do not like how it changes the format for the header. Below is a simplified version of my code. Any recommendations?

\documentclass[12pt]{article}
\usepackage{fullpage}
\usepackage{fancyhdr}

\title{Some Random Title}
\author{Author Name}
\date{}

\begin{document}
\maketitle
\pagestyle{fancy}
\fancyhf{}
\rfoot{Page \thepage}

Some random words.    
\newpage
Some random words on second page.

\end{document}

first page

second page

1 Answer 1

3

The page where \maketitle has effect uses the plain page style. Redefine it.

\documentclass[12pt]{article}
\usepackage{fullpage}
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\fancyfoot[R]{Page \thepage}

% redefine the plain page style
\fancypagestyle{plain}{%
  \renewcommand{\headrulewidth}{0pt}% no rule above!
  \fancyhf{}\fancyfoot[R]{Page \thepage}%
}

\title{Some Random Title}
\author{Author Name}
\date{}

\begin{document}
\maketitle

Some random words.

\end{document}
2
  • thanks for the suggestion. This did fix the problem on the first page, now the page number is on the bottom right. However, if you add another page (\newpage Some random words on the second page), the ruler is still present at the header. I tried making edits to your code to fix this, but couldn't figure out a solution.
    – dahiana
    Oct 11, 2014 at 22:09
  • 1
    @dahiana Add \renewcommand{\headrulewidth}{0pt} also after \pagestyle{fancy}.
    – egreg
    Oct 11, 2014 at 22:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .