11

With the elsarticle class, how can I achieve author-number citations?

This is what I need:

Smith and Dow [1] wrote

Using

\citep{SmithDow} wrote

only prints

[1] wrote

and

\citet{SmithDow} wrote

prints

(author?) [1] wrote

This journal does not use author-year style, so

Smith and Dow (2015) wrote

is not a solution.

I cannot change the options to natbib directly because elsarticle loads it automatically.

10

Use

\bibliographystyle{elsarticle-num-names}

instead of

\bibliographystyle{elsarticle-num}

Then

\citet{SmithDow} wrote

will print

Smith and Dow [1] wrote
3

Adding to the answer by @AlexanderGelbukh:

\bibliographystyle{elsarticle-num-names}

and put this into your preamble:

\makeatletter
\providecommand{\doi}[1]{%
  \begingroup
    \let\bibinfo\@secondoftwo
    \urlstyle{rm}%
    \href{http://dx.doi.org/#1}{%
      doi:\discretionary{}{}{}%
      \nolinkurl{#1}%
    }%
  \endgroup
}
\makeatother

This adds support for doi fields. Source: https://www.tug.org/pipermail/tex-live/2012-August/032152.html

The support for doi fields was already done in elsarticle-num.bst by urlbst according to the header of that file. This patch is not (yet) done for elsarticle-num-names.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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