27

I am trying to format an article using the elsarticle class. I have followed the documentation included with the class file, but for some unknown (and incredibly irritating) reason the email addresses are not displayed in the frontmatter.

Here is a minimal example:

\documentclass{elsarticle}

\title{Remarks on something interesting}

\author[myu]{Author 1}
\ead{[email protected]}

\author[myu]{Author 2 \corref{cor1}}
\ead{[email protected]}

\address[myu]{My Department, My Building, My University in My City}

\cortext[cor1]{Corresponding author}

\begin{document}

\maketitle

\end{document}

Any idea how to make the email addresses display?

2
  • @cyberSingularity: that worked beautifully. Post as an answer and I'll accept it. And thanks!
    – MTS
    Nov 28, 2012 at 0:48
  • I forgot to say that you are welcome, and I thought it was a good question. ;) Nov 28, 2012 at 2:13

1 Answer 1

35

Although I agree that it is not clear from the documentation or the 8th entry in the FAQ pointed out by Werner, all the templates use \title, \author, \ead etc after \begin{document} and \begin{frontmatter}.

The reason it does not work before \begin{document} is that (for some reason), it writes the email addresses to the aux file (which means it needs two runs), and the aux file doesn't get read and re-opened for writing until \begin{document} (so in fact you see lines like \emailauthor{[email protected]}{Author 1} appearing on the terminal instead of getting written to the aux file).

Note that the frontmatter environment does nothing except \maketitle at the end (and some grouping), so I guess the supported syntax is to replace your \maketitle with the frontmatter environment. I have also done this in the following modification of your example.

I have also deleted the unwanted space between the author name and \corref.

Remember that you need to compile twice to see the e-mail addresses.

\documentclass{elsarticle}
\begin{document}

\begin{frontmatter}
\title{Remarks on something interesting}

\author[myu]{Author 1}
\ead{[email protected]}

\author[myu]{Author 2\corref{cor1}}
\ead{[email protected]}

\address[myu]{My Department, My Building, My University in My City}

\cortext[cor1]{Corresponding author}

\end{frontmatter}

\end{document}

Image of footer displaying the e-mail addresses (inspired by Gonzalo Medina's previous answer):

Image of footer

1
  • 10
    In case anyone else is wondering: the abstract and keyword environments should appear in the frontmatter environment too.
    – Clément
    Jul 16, 2015 at 14:50

You must log in to answer this question.

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