Page Layoutfancyhdr | Footer only on first Page

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
daltin92000
Posts: 3
Joined: Fri Nov 04, 2011 3:33 am

fancyhdr | Footer only on first Page

Post by daltin92000 »

Hi,

I use a fancy style for footers and headers to do a two columns article. You can find the tex file on the following link : http://www.howtotex.com/templates/
My problem is just that I have the footers only on the first page (the header is print on all pages), I use the \thispagestyle{fancy} command but when I remove this command the headers and footers disappear.You can find below a part of the code i use.

Thank you for helping me.

Jeremy.

N.B : This is a Koma script class : "scrartcl"

Code: Select all

\usepackage{fancyhdr}								
\pagestyle{fancy}		

% Enabling the custom headers/footers
\usepackage{lastpage}	
\lhead{}
\chead{}
\rhead{}
\fancyhead[RO,RE]{\includegraphics[width=1\textwidth]{Home_photoband}}
\lfoot{Two column article template \textbullet ~\today}
\cfoot{}
\rfoot{\footnotesize page \thepage\ sur \pageref{LastPage}}	
\renewcommand{\headrulewidth}{0.0pt}
\renewcommand{\footrulewidth}{0.4pt}
...
\begin{document}
\maketitle
\thispagestyle{fancy} 
...
Last edited by localghost on Fri Nov 04, 2011 10:07 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: fancyhdr | Footer only on first Page

Post by kaiserkarl13 »

I suspect there's a line in your document class or one of the packages that issues \thispagestyle{plain} during \maketitle. If so, the solution is exactly what you did: issue \thispagestyle{fancy} right after \maketitle.
daltin92000
Posts: 3
Joined: Fri Nov 04, 2011 3:33 am

fancyhdr | Footer only on first Page

Post by daltin92000 »

Hi Kaiser,

There is no command \thispagestyle{plain} but somme commands including \thispagestyle, maybe it is the source of my problem.
Below the differents code including this command in the scrartcl.cls . I am not enough proficient to solve the problem and modify these commands .

Thx.Jérémy.

Code: Select all

\newcommand*{\next@tpage}{\clearpage\thispagestyle{empty}}%
\newcommand*\maketitle[1][1]{%
  \if@titlepage
    \begin{titlepage}
      \setcounter{page}{%
        #1%
      }%
      \let\footnotesize\small
      \let\footnoterule\relax
      \let\footnote\thanks
      \renewcommand*\thefootnote{\@fnsymbol\c@footnote}%
      \let\@oldmakefnmark\@makefnmark
      \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
      \ifx\@extratitle\@empty \else
        \noindent\@extratitle\next@tpage\cleardoubleemptypage
        \thispagestyle{empty}%
      \fi
...
 \thispagestyle{\titlepagestyle}\@thanks
...
\newenvironment{titlepage}{%
  \if@twocolumn
    \@restonecoltrue\onecolumn
  \else
    \@restonecolfalse\newpage
  \fi
  \thispagestyle{empty}%
  \if@compatibility
    \setcounter{page}{0}%
  \fi
}{%
...
Last edited by Stefan Kottwitz on Sun Nov 06, 2011 11:34 am, edited 1 time in total.
daltin92000
Posts: 3
Joined: Fri Nov 04, 2011 3:33 am

Re: fancyhdr | Footer only on first Page

Post by daltin92000 »

Hi all,

I have found the solution, it was so evident that I am ashamed.
It was just the layout of the page.
In the first line of my preambule it was wrote :

\documentclass[div = calc,...]{..} so I have changed calc by another value and now it is working.

Bye.

Thanks for trying to help me.
Post Reply