1
\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}

\rhead{\small bla bla}
\lhead{\small bla bla}


\begin{document}

\pagestyle{fancy}
hello

\newpage

hello 2

\end{document}

I've tried \pagestyle{empty} in page 2, but it removes the page number. I've tried creating a new style:

\fancypagestyle{biblio}{%
    \lhead{}
    \rhead{}
    \cfoot{\thepage}
} 

But the line remains there. Is there a solution to this?

2 Answers 2

2

If you intend to have empty header and centered page number in the footer for any page, simply use the standard\pagestyle{plain} which does that, without the need of fancyhdr package.

And\thispagestyle{plain} does the same but only on current page.

If you really want to define it with fancyhdr, you can suppress the header rule by adding\renewcommand{\headrulewidth}{0pt} to your code.

1

Does this satisfy-removes the line but keeps the page numbering

MWE

\documentclass{report}

\usepackage{fancyhdr}

\fancypagestyle{firstpage}{%
    \lhead{\small bla bla}
    \rhead{\small bla bla}
}

\begin{document}
    \thispagestyle{firstpage}
    
    hello
    
    \pagestyle{plain}
    \newpage
    
    hello 2
    
\end{document}

Page 1

enter image description here

Page 2

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .