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 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{a1@myuniversity.edu}

\author[myu]{Author 2 \corref{cor1}}
\ead{a2@myuniversity.edu}

\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?

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

1 Answer 1

up vote 5 down vote accepted

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{a1@myuniversity.edu}{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{a1@myuniversity.edu}

\author[myu]{Author 2\corref{cor1}}
\ead{a2@myuniversity.edu}

\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

share|improve this answer
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.