# Page number top left on all pages

I want to put the page number on the left corner of the pages. I've already achieved it using fancyhdr:

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % clear all header and footers
\lfoot{\thepage}


The problem is that the first page remains with the page number on center. Can anyone solve this? Thanks in advance.

• Are you issuing \maketitle on the first page, perhaps? Also, what \documentclass are you using? – Werner Oct 16 '16 at 15:21
• I was finally having problems with \maketitle, had to put: \thispagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \lfoot{\thepage} before the title, finally worked – Javier David Martín Romera Oct 16 '16 at 17:30
• The title says “top left”, but you use \lfoot. Do you mean “bottom left”, instead? – egreg Oct 17 '16 at 0:01

Please always provide a minimal example which can be used to reproduce the issue. You can always edit your question to include further information. Code pasted in comments is essentially unreadable by human beings.

The reason the problem doesn't show up in a minimal completion of your fragment is the lack of any document element which triggers the plain page style. In article this is activated by \maketitle. In other classes it may be triggered by other commands such as \chapter.

To change the page number on plain pages, just read the fancyhdr documentation and redefine the plain style with the commands it provides.

\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % clear all header and footers
\lfoot{\thepage}
\fancypagestyle{plain}{%
\fancyhf{}%
\fancyhf[lf]{\thepage}%
}
\usepackage{kantlipsum}
\author{me}
\title{this}
\begin{document}
\maketitle
\kant[1-10]
\end{document}


Since you're using article that by default states \pagestyle{plain} everywhere, you can just redefine the plain page style.

\documentclass{article}
\usepackage{fancyhdr}
\usepackage{kantlipsum} % just for the example

\fancypagestyle{plain}{%
\fancyhf{}%
\fancyfoot[L]{\thepage}%
}
\pagestyle{plain} % so LaTeX updates the definition

\author{me}
\title{this}

\begin{document}

\maketitle

\kant[1-10]

\end{document}


Add the rest of your setup to this simple template. What you show in the comments scattered among the question and other answers shows nothing that can conflict with this.

Please provide a running minimal example. Creating it might have already revealed the problem: I cannot reproduce your problem as my code (see below) does not show the behavior that you described.

\documentclass{article}
\usepackage{fancyhdr}

\begin{document}

\pagestyle{fancy}
\fancyhf{} % clear all header and footers

• The first page of the OP might have the title block and hence a plain page style, or it is the starting page of a chapter (plain page style). Or there is something completely different going on. We cannot know yet. – Johannes_B Oct 16 '16 at 15:11