2

My LaTeX codes for the author and the corresponding address are:

\documentclass[preprint,12pt]{elsarticle}
\journal{elsarticle}
\begin{document}
\begin{frontmatter}
\title{Title}
\author{AuthorOne}
\ead{[email protected]}
\author{AuthorTwo\corref{CorrespondingAuthor}}
\ead{authortwo\[email protected]}
\cortext[CorrespondingAuthor]{Corresponding author}
\end{frontmatter}
\end{document}

The output is as follow:

enter image description here

However, as the above clip shows, when my mouse is hovering over the second email, it does not show the entire email. Why?
Can anyone solve the problem?

You'd better not to change the based setting in the original elsarticle.cls LaTeX template.

2
  • Could you please turn your code fragments into a compilable minimal working example (MWE) (tex.meta.stackexchange.com/q/228). With the information you currently give in your question, I am not able to reproduce your issue.
    – leandriis
    Commented Nov 18, 2017 at 14:06
  • 4
    The links are guessed by the PDF viewer; apparently its heuristics don't work in this case. If I try with Skim, the address is guessed right; with Acrobat Reader, no attempt at guessing a hyperlink is done. The elsarticle class never tries producing a hyperlink.
    – egreg
    Commented Nov 18, 2017 at 14:40

1 Answer 1

2

The elsarticle class does no attempt to make hyperlinks; what you see is an attempt of the PDF viewer to guess a hyperlink based on its internal heuristics.

You can get a real hyperlink with the hyperref package and a trick (because of how \ead works internally):

\documentclass[preprint,12pt]{elsarticle}
\usepackage{etoolbox}
\usepackage{hyperref}

\journal{elsarticle}

\newcommand{\definemail}[2]{\newrobustcmd#1{\href{mailto:#2}{#2}}}

\definemail\authorone{[email protected]}
\definemail\authortwo{authortwo\[email protected]}

\begin{document}

\begin{frontmatter}
\title{Title}
\author{AuthorOne}
\ead{\authorone}
\author{AuthorTwo\corref{CorrespondingAuthor}}
\ead{\authortwo}
\cortext[CorrespondingAuthor]{Corresponding author}
\end{frontmatter}
\end{document}

enter image description here

You must log in to answer this question.

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