I'm trying to use a Zotero .bib file for the citation backend in this template document setup below but I get the error:
/usr/share/texlive/texmf-dist/tex/latex/biblatex/biblatex.sty: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}
Setup:
\documentclass[a4paper,fleqn,usenatbib]{mnras}
\usepackage{newtxtext,newtxmath}
\usepackage[T1]{fontenc}
\usepackage{ae,aecompl}
\usepackage{graphicx} % Including figure files
\usepackage{amsmath} % Advanced maths commands
\usepackage{amssymb} % Extra maths symbols
\usepackage[backend=bibtex,style= authoryear,citestyle=authoryear]{biblatex}
\addbibresource{Zotero.bib}
Looking at other posts I believe this is a clash between biblatex and natbib but I can't seem to use the zotero backend without using \usepackage[backend=bibtex,style= authoryear,citestyle=authoryear]{biblatex} and it won't accept nanbib in the curly brackets.
Is there a way to fix this so that Zotero is recognised using natbib in this way?
Best Answer
If you are submitting your paper for MNRAS
If you are submitting a paper for MNRAS you should not be using
biblatex
. Themnras
documentation mentions two ways to produce a bibliographythebibliography
andnatbib
.biblatex
andnatbib
are completely incompatible with each other (see bibtex vs. biber and biblatex vs. natbib for a short comparison) and it is unlikely that publishers can acceptbiblatex
submissions (see Biblatex: submitting to a journal). Sobiblatex
is out of the question.Of the two ways the automatic way with
natbib
and BibTeX seems to be strongly preferred (p. 7 of the MNRAS documentation)and
So you should dump
biblatex
and usenatbib
as advised instead. That means you need to follow What to do to switch to biblatex? in reverse so that your document looks roughly likeSee also http://mirrors.ctan.org/macros/latex/contrib/mnras/mnras_template.tex
No mention of
\addbibresource
and\printbibliography
can remain (the two arebiblatex
commands) instead you place\bibliography{<name of bib file without the .bib extension>}
where you want the bibliography to appear.You may be able to tell Zotero to prepare a
.bib
file for the BibTeX data model instead ofbiblatex
. Even though the general structure of the file is the same for the two data models, there are subtle differences between best practices forbiblatex
and best practices for.bst
files (note that while again the general structure of the.bib
files should be the same for most.bst
files there can be differences in the fields and types supported - some old styles don't have aurl
field while many new ones do). For the more common types@article
,@book
,@incollection
it probably does not matter too much, but more fringe types may need special care.If you are not planning on submitting your paper for MNRAS
If you are not planning to submit your document for the MNRAS you should probably not be using the
mnras
document class. This class is specifically tailored for MNRAS submissions. Publisher classes sometimes have idiosyncrasies and may be hard or impossible to customise (why should they be customisable after all? - they just need to enforce the house style and enable easy processing for the publisher).