Page Layoutpage number displaying twice in footer!

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
santaclauze
Posts: 3
Joined: Thu Mar 31, 2016 5:27 pm

page number displaying twice in footer!

Post by santaclauze »

Hi,

This is my first post and I am very new to Latex. I have been messing around with it for a few days and I am now trying to use Fancyhd package to customize my footer.

My code is the following:

\fancypagestyle{main}{

\lhead{}
\chead{}
\rhead{\bfseries \CompanyName}
\lfoot{
\footnotesize{ }
}

\rfoot{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
}


This issue is that while i get the wanted result, the page numbering is displayed twice, once where the code has requested it and a second time in the center of the footer.

How do I display ONLY the page number I requested?


Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Re: page number displaying twice in footer!

Post by mas »

You have not 'reset' the central footer, where the page number is printed by default. Using \cfoot{} would solve the problem.

I generally use \fancyhf{} at the beginning to clear all the stuff and start with a clean slate.

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
santaclauze
Posts: 3
Joined: Thu Mar 31, 2016 5:27 pm

page number displaying twice in footer!

Post by santaclauze »

mas wrote:
I generally use \fancyhf{} at the beginning to clear all the stuff and start with a clean slate.
Thanks for the tip, I ended up getting rid of it, but I am not sure how. Though I will remember that!
Post Reply