0

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
\renewcommand{\headrulewidth}{0pt} % remove the header rule
\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
1

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
\renewcommand{\headrulewidth}{0pt} % remove the header rule
\lfoot{\thepage}
\fancypagestyle{plain}{%
  \fancyhf{}%
  \fancyhf[lf]{\thepage}%
}
\usepackage{kantlipsum}
\author{me}
\title{this}
\begin{document}
\maketitle
\kant[1-10]
\end{document}

bottom left numbering on <code>plain</code> plage

| improve this answer | |
0

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}{%
  \renewcommand{\headrulewidth}{0pt}%
  \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.

| improve this answer | |
0

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
\renewcommand{\headrulewidth}{0pt} % remove the header rule
\lfoot{\thepage}

test for first page \clearpage
test for second page

\end{document}
| improve this answer | |
  • 1
    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
  • Since I'm really noob at this and I don't know what exactly should I provide here is the code that correspond to the beginning of the document: – Javier David Martín Romera Oct 16 '16 at 16:26
  • \documentclass[spanish]{article} \usepackage[LGR,T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage[a4paper]{geometry} \geometry{verbose,tmargin=2.95cm,bmargin=2.95cm,lmargin=2.95cm,rmargin=2.95cm} \setcounter{tocdepth}{2} \setlength{\parskip}{0.25cm} \setlength{\parindent}{0pt} \usepackage{babel} \addto\shorthandsspanish{\spanishdeactivate{~<>}} – Javier David Martín Romera Oct 16 '16 at 16:26
  • \usepackage{float} \usepackage{amsmath} \usepackage{amsthm} \usepackage{graphicx} \usepackage[unicode=true, bookmarks=true,bookmarksnumbered=false,bookmarksopen=true,bookmarksopenlevel=1, breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false] {hyperref} \hypersetup{ pdfauthor={Javier David Martín Romera}} \makeatletter – Javier David Martín Romera Oct 16 '16 at 16:27
  • \DeclareRobustCommand{\greektext}{% \fontencoding{LGR}\selectfont\def\encodingdefault{LGR}} \DeclareRobustCommand{\textgreek}[1]{\leavevmode{\greektext #1}} \DeclareFontEncoding{LGR}{}{} \DeclareTextSymbol{\~}{LGR}{126} %% Because html converters don't know tabularnewline \providecommand{\tabularnewline}{\\} \@ifundefined{date}{}{\date{}} – Javier David Martín Romera Oct 16 '16 at 16:27

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.