0

Hi I am using fancyhdr package to define my page number to bottom right. Normally it is working but it is not working on two pages and the page number is at the bottom center instead of bottom right. It may be because I have defined a numbering format on those pages. But I am not being able to solve this. Can you please help?

\documentclass[11pt]{report}
\usepackage[a4paper, margin=1in]{geometry}
\usepackage{amsmath, amsfonts}
\usepackage{graphicx,subfigure}
\usepackage[round,authoryear]{natbib}
\parindent 0ex
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue, citecolor=blue]{hyperref}
\usepackage[table]{xcolor}
\usepackage{array,lscape,longtable,multicol,multirow,boldline,threeparttable,colortbl,enumitem}
\usepackage{fancyhdr} 
\fancyhf{}
\pagestyle{fancy}
\rfoot{\thepage}
\begin{document}
\pagenumbering{roman}
\tableofcontents
\begingroup
\let\clearpage\relax
\listoffigures
\listoftables
\endgroup
\setcounter{chapter}{2}
%Chapter
%%===================================
\chapter{Methods of analysis of dams}
\pagenumbering{arabic}
\setcounter{page}{1}

\section{Introduction}
text...
\end document 

enter image description here

enter image description here

1

The first page of each chapter uses the plain pagestyle, which by default has no headings and the page number at the bottom center. The headings for the table of contents, list of figures, etc, are typeset using the \chapter* command, so they have the same behaviour.

You can change this by redefining the plain style, as described in the fancyhdr documentation, Section 7.

Add this to the preamble of your document:

\fancypagestyle{plain}{%
  \fancyhf{}% clear all header and footer fields
  \rfoot{\thepage}%
  \renewcommand{\headrulewidth}{0pt}%
  \renewcommand{\footrulewidth}{0pt}%
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.