# [tex-live] problem with elsarticle.cls and hyperref

Fri Aug 17 09:53:00 CEST 2012

Hello,

** Robert Jäschke [2012-08-17 07:08:15 +0200]:

[...]

>>> 2. Do you really need hyperref with elsarticle? AFAIK elsarticle
>>> will certainly do hypertext references by their own means
>>> (references via CrossRef etc). See their web page or the web page
>>> of Science Direct.

> That is a good point. Actually, I don't necessarily need hyperref,
> although it is nice to have hyperlinks when writing the article to
> quickly jump through the document.

> However, what I need is the url package, otherwise URLs won't be
> typeset correctly. So I exchanged hyperref with url in the example
> from my previous post and now the document compiles. However, the DOI
> of the citation is now typeset as:

> doi:\bibinfo{doi}{10.1073/pnas.98.2.404}

> (yes, I see the raw macro in the PDF)

> The url package is the most recent version. So I assume there is an
> incompatibility between the elsarticle class and the url package and I
> should contact the maintainers?

IMHO, it shouldn't work at all. Consider the following small example:
----------------- 8< -----------------
\documentclass{minimal}
\usepackage{url}

\newcommand{\aword}{a//word}

\begin{document}

This is an URL: \url{\aword}

\end{document}
----------------- 8< -----------------

Typeset it with pdflatex and you see the macro itself, from
documentation:

% url.sty  ver 3.3    12-Apr-2006   Donald Arseneau   asnd at triumf.ca
%
% This package defines "\url", a form of "\verb" that allows linebreaks,
% and can often be used in the argument to another command.

So, like ordinary \verb' command \url' macro doesn't expand its
argument.

Perhaps elsarticle author(s) doesn't take into account the url'
package.

---
`