[Tex/LaTex] How to put fancy header on all pages except the first page

fancyhdr

I am trying to put fancyhdr custom style on all pages except first one, but it either shows up on all of them, or on none, I can't make this style to go from second page, im new to latex, so any help is welcome.

Best Answer

The default page style - plain - is used throughout article, even if \maketitle is used. To be sure though, you could add

\thispagestyle{plain}
\pagestyle{fancy}

to your preamble, which will ensure the first page uses plain (as a result of \thispagestyle) and subsequent pages use fancy (as a result of \pagestyle; \thispagestyle overrides \pagestyle).

Here's a complete minimal example:

enter image description here

\documentclass{article}
\usepackage{fancyhdr}%
\usepackage{lipsum}% Just for this example

\fancyhf{}% Clear all headers/footers
\fancyhead[L]{Left header}\fancyhead[C]{Centre header}\fancyhead[R]{Right header}
\fancyfoot[L]{Left footer}\fancyfoot[C]{Centre footer}\fancyfoot[R]{Right footer}
\pagestyle{fancy}
\thispagestyle{plain}

\title{My title}
\author{My author}

\begin{document}

%\maketitle

\lipsum[1-10]

\end{document}

Another option might be to use afterpage which you can use to set the page style of page following the one containing the \afterpage command. However, \afterpage sets its contents in a group, which doesn't allow a regular \pagestyle to survive. For that, you could use some other trickery, as discussed in Page styles only work for \thispagestyle under afterpage.

Related Question