Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Would you be able to provide a minimal working example (MWE) that displays the current behaviour. –  Werner Nov 22 '11 at 3:10
add comment

3 Answers

up vote 8 down vote accepted

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

share|improve this answer
    
Sorry about the confusion. I've deleted my comment, and will do so with this one as well. –  Werner Nov 22 '11 at 4:25
    
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 '11 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 '12 at 17:22
add comment

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]
share|improve this answer
add comment

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
share|improve this answer
    
thanks, that's a rather nice solution. –  cboettig Nov 28 '12 at 14:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.