0

enter image description hereI'm using Overleaf, and using the below code I want to modify the position of the page number to the footer. I looked online to find that the \usepackage{fancyhdr} is used usually, but in my case it is not working, any idea why?

[![\documentclass\[12pt\]{article}
\usepackage\[demo\]{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{XXXXXXXXXXX}
\rhead{}
\lfoot{XXXXXX\,|\, \thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}

\title{XXXXXXX} \author{XXXXXX} \date{Septembre 2013}

\begin{document} \begin{center} \centering \includegraphics[scale=0.75]{logo.pdf}\[10ex] \textbf{XXXXXXX}\[10ex] \textbf{Date:} \end{center}

\newpage \end{document}][1]][1]

Diana
  • 1,285
  • 7
  • 12
  • 1
    You need to reset \cfoot{} too... And often the first page of a document forces a different pagestyle, so you can use a \thispagestyle{fancy} or redefine plain if you use \maketitle. – Rmano Aug 26 '23 at 08:02
  • See also https://tex.stackexchange.com/questions/206775/header-and-footer-not-on-1st-page – Rmano Aug 26 '23 at 08:06
  • 1
    PS you formatted your code as an image, and now all the square brackets are quoted... – Rmano Aug 26 '23 at 08:07
  • thank you so much, the problem was solved by setting cfoot{} – Diana Aug 26 '23 at 08:12

0 Answers0