Problem
I like BibLaTeX and StackOverflow presents some ways reasons to switch to BibLaTeX. I like it, if nothing else, I can have multiple bibliographies easily. I can also use natbib
citation style and also limit which fields are displayed in my bibliography. One problem with BibLaTeX is that it does not work well with Elsevier articles (class elsarticle
), since natbib
is loaded by default. There are some other options to induce compatibility are presented here and here.
Solution
So I edited the elsarticle.cls
file to make it work. See the diff
between the 2 files here:
diff elsarticle.cls elsarticle_nonatbib.cls
27c27 < \def\RCSfile{elsarticle}% --- > \def\RCSfile{elsarticle_nonatbib}% 33c33 < \def\@shortjid{elsarticle} --- > \def\@shortjid{elsarticle_nonatbib} 192,193c192,193 < \newcounter{author} < \def\author{\@ifnextchar[{\@@author}{\@author}} --- > \newcounter{auth} > \def\auth{\@ifnextchar[{\@@auth}{\@auth}} 196c196 < \def\@@author[#1]#2{\g@addto@macro\elsauthors{% --- > \def\@@auth[#1]#2{\g@addto@macro\elsauthors{% 211c211 < \def\@author#1{\g@addto@macro\elsauthors{\normalsize% --- > \def\@auth#1{\g@addto@macro\elsauthors{\normalsize% 642c642 < \RequirePackage[\@biboptions]{natbib} --- > %\RequirePackage[\@biboptions]{natbib}
If you've never read a diff
output, the <
means what's written in the first file (elsarticle.cls
) and >
means the second file (elsarticle_nonatbib.cls
). The numbers correspond to the line in each file, e.g 192c193
means line 192 in file 1 and 193 in file 2.
Overall, I changed the type of article, commented out the natbib
requirement, and changed the author
field to auth
(see below for why). The edited cls
is located here.
Things you need to change
The \author
field conflicts with biblatex and elsarticle, so you must chagne the \author
definitions to \auth
instead. This is a minor change, but important one. You can change that field to anything you want in the elsarticle_nonatbib.cls
file (such as elsauthor
).
Minimal Working Example (MWE)
I tried it with Elsevier's sample manuscript, changing the author
fields to auth
, and adding a biblatex-type heading:
\usepackage[ natbib = true, backend=bibtex, isbn=false, url=false, doi=false, eprint=false, style=numeric, sorting=nyt, sortcites = true ]{biblatex} \bibliography{mybibfile}
and
\printbibliography
at the end, and the manuscript came out as if using natbib
. The MWE is located here and output PDF is located here.
Conclusion
You can use elsarticle
with biblatex
, with some minor changes. You may have to include this cls
with the rest of your LaTeX files for them to compile on the editors machine. Maybe Elsevier will change the LaTeX for more flexibility, but the StackOverflow question was asked 3 years ago and not much seems to have changed, so I like my solution.
I’ve got few issues using your workaround:
1. if other than ‘review’ options are chosen (i.e. 1p,3p or 5p) then there is a conflict with two definitions in elsarticle.cls:
\global\let\bibfont=\footnotesize
\global\bibsep=0pt
it seems that these lines can be simply commented.
2. another thing is quite odd one – with renamed \author field to \auth or anything else there is no author list in the title of manuscript (i.e. empty line). I couldn’t find the reason for this behavior.
so in the end, I found another approach to include biblatex package in elsarticle class. here is the important part of preamble:
\documentclass[5p]{elsarticle}
\makeatletter
\let\c@author\relax
\makeatother
\let\bibhang\relax
\let\citename\relax
\let\bibfont\relax
\let\Citeauthor\relax
\expandafter\let\csname ver@natbib.sty\endcsname\relax
\usepackage[… options …]{biblatex}
hope it may help to somebody else.