33

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?

1

5 Answers 5

41

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

4
  • Thanks, this is just what I was looking for. I also didn't know about using the \makeatletter and \makeatother commands, so many thanks for the help.
    – cboettig
    Nov 22, 2011 at 5:07
  • Nice, thanks for the feedback. I had been trying to remove the "Preprint Submitted to" line by modifying the .cls file but could not get the changes to make effect either.
    – user13566
    Apr 13, 2012 at 17:22
  • Great answer! Is there any way I can keep the date on the first page, though?
    – Pawel
    May 30, 2018 at 15:40
  • 3
    @pawel Just add the date to the footer: \makeatletter \def\ps@pprintTitle{ \let\@oddhead\@empty \let\@evenhead\@empty \def\@oddfoot{\hfill\thepage} \def\@evenfoot{\thepage\hfill}} \makeatother
    – Boris
    May 31, 2018 at 15:03
24

Or you can replace the preprint footnotes with page number, so as to make the first page footnote style consistent with the following pages. To achieve this, simply:

\documentclass[review]{elsarticle}
\makeatletter
\def\ps@pprintTitle{%
 \let\@oddhead\@empty
 \let\@evenhead\@empty
 \def\@oddfoot{\centerline{\thepage}}%
 \let\@evenfoot\@oddfoot}
\makeatother
2
  • Worked for me. Thank you for your solution. Jul 2, 2017 at 23:40
  • Great answer! Is there any way I can keep the date, though?
    – Pawel
    May 30, 2018 at 15:39
6

You could try the following code, which uses the instruction \patchcmd provided by the etoolbox package. (What the code does is to replace the long argument of the definition of @oddfoot with \relax...)

\documentclass{elsarticle}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\ps@pprintTitle}{\footnotesize\itshape
       Preprint submitted to \ifx\@journal\@empty Elsevier
       \else\@journal\fi\hfill\today}{\relax}{}{}
\makeatother
[rest of preamble]
0

You could go to the "elsarticle.cls" file and comment out the following lines

% \def\ps@pprintTitle{%
%      \let\@oddhead\@empty
%      \let\@evenhead\@empty
%      \def\@oddfoot{\footnotesize\itshape
%       Preprint submitted to \ifx\@journal\@empty Elsevier
%       \else\@journal\fi\hfill} %\today}%
%      \let\@evenfoot\@oddfoot}
1
  • Do not change an original class file. Copy it to myclass.cls and change this file. Better way: to patch the original class file in your own tex file ...
    – Mensch
    Aug 29, 2022 at 20:22
0

Another way to you can keep the date and make the title page unnumbered.

\makeatletter
\def\ps@pprintTitle{%
    \let\@oddhead\@empty
    \let\@evenhead\@empty
    \def\@oddfoot{\centerline{\hspace*{\fill} \raggedright \today} }%
    \let\@evenfoot\@oddfoot}
\makeatother

\journal{}

\setcounter{page}{0}

You must log in to answer this question.

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