1

I would like to use the bib style nejm in my document to have a bibliography like this style.

enter image description here

But I had a lot of errors! What should I change/add in my code?

\documentclass[num-refs]{wiley-article}

% Add additional packages here if required
\usepackage{siunitx}
\usepackage[super]{nth}
\usepackage{amsmath}
\usepackage{rotating}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{float}

\usepackage[backend=biber,style=nejm]{biblatex}
\addbibresource{sample.bib}

\begin{document}
...
\printbibliography
...
\end{document}

Produces the following error messages

/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.sty, line 462 
LaTeX Error: Command \bibhang already defined.
Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation. Type  H
<return>  for immediate help.  ...                                    

l.462 \newlength{\bibhang}
Your command was ignored. Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.


/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.sty, line 9050
LaTeX Error: Command \citename already defined.

Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation. Type  H
<return>  for immediate help.  ...                                    

l.9050 ...d*{\citename}{\blx@citexpunct{citename}}
Your command was ignored. Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.


/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.def, line 269
LaTeX Error: Command \bibfont already defined.

Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation. Type  H
<return>  for immediate help.  ...                                    

l.269 ...ommand*{\bibfont}{\normalfont\normalsize}
Your command was ignored. Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.



/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.def, line 2094
LaTeX Error: Command \Citeauthor already defined.

Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation. Type  H
<return>  for immediate help.  ...                                    

l.2094 ...e\citeauthor*}{\bibsentence\citeauthor}}
Your command was ignored. Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.


main.tex, line 68
Package biblatex Error: Incompatible package
'natbib'.

See the biblatex package documentation for explanation. Type  H
<return>  for immediate help.  ...                                    

The 'natbib' package and biblatex are incompatible.
2

wiley-article.cls seems to be an elusive document class. I could not find an official download on CTAN or elsewhere. It seems the class was developed by Overleaf for Wiley. With a bit of fiddling I could obtain a download of wiley-article.cls, v1.1, 2017/05/26 from Overleaf. (I started a new v1 project from one of the journal templates listed at https://overleaf.com/latex/templates/tagged/wiley-official and could then download all files involved, including the .cls file.)

The document class wiley-article loads natbib by default. There is an option to load amsrefs instead, but as far as I can see there is no easy way to get rid of natbib and amsrefs at the same time. And indeed if you look at the last error message

Package biblatex Error: Incompatible package 'natbib'.

the problem is pretty clear: biblatex and natbib are both bibliography/citation packages and they are fundamentally incompatible. See for example Is Biblatex still incompatible with natbib? as pointed out by homocomputeris in the comments or Is biblatex compatible with RevTeX?. As an aside, in newer versions of biblatex the most helpful error (Incompatible package 'natbib') will be thrown earlier, so that it would come first in the MWE, that should make things a bit clearer.

There is only really one good reason to use a highly customised publisher class such as wiley-article, namely that you want to submit an article to that publisher. In that case it is strongly advised to follow all instructions of the publisher and use the bibliography system suggested (or programmed into the class). In this case you are probably best off with the class' num-refs option and natbib. Indeed, very few publishers can deal with the different workflow required by biblatex as opposed to BibTeX and natbib (cf. Biblatex: submitting to a journal).

If you are not submitting to a Wiley journal I strongly recommend that you do not use their document class. Sooner or later you will want to deviate from the strict format imposed by the publisher class (indeed, this is a problem you are facing right now) and then it can be quite tricky to pull of these changes. It is also much easier to get help for commonly used normal document classes than for publisher classes.

In theory it is possible to 'unload' natbib or block it from loading, see for example Is it possible to load biblatex with a class that has already loaded natbib?, How to switch from Natbib to Biblatex in pre-made document class/template?, biblatex instead of natbib in elsarticle, how?, How to switch from Natbib to Biblatex in pre-made document class/template?, but I urge you not to do try that.

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.