[Tex/LaTex] Modify footer used by elsarticle.cls

document-classeselsarticleheader-footer

I would like to modify the footer used by Elsevier's elsarticle.cls without editing the class file directly. I would like to eliminate the footer on the first page that states "Preprint submitted to Elsevier" (or the journal you specify with the optional \journal{} command). Obviously I can just delete it from the class file but this change won't carry over to others without me providing an explicit modification of the class file. I tried adding the modified lines of the class file to my .tex before the documentclass declaration, but they are ignored:

\def\ps@pprintTitle{%
\let\@oddhead\@empty
\let\@evenhead\@empty
\def\@oddfoot{\footnotesize\itshape
% line below modified from elsarticle.cls
 \ifx\@journal\@empty Elsevier
\else\@journal\fi\hfill\today}%
\let\@evenfoot\@oddfoot}
\documentclass{elsarticle}

Is there any way to remove that footer without editing the .cls file?

Best Answer

You have put your definition before the call to elsarticle, so the newer one overrode the older one. You need to change the order of definitions!

This works for me:

\documentclass{elsarticle}
\usepackage{lipsum}
\makeatletter
\def\ps@pprintTitle{%
 \let\@oddhead\@empty
 \let\@evenhead\@empty
 \def\@oddfoot{}%
 \let\@evenfoot\@oddfoot}
\makeatother
\begin{document}     
\title{Paper}
\author{A. U. Thor}
\date{\today}
\maketitle
\lipsum[1-2]
\end{document}

output of code