2

This is My 1st try to produce an Article-Like document.

Here's the format I have followed, and the sample text worked perfectly!!

The bibliography tho, was added not in the way I liked it; I used to add bibliography like this;

@ARTICLE{2016MNRAS.457.1722R,
  author = {{Rieder}, M. and {Teyssier}, R.},
  title = "{A small-scale dynamo in feedback-dominated galaxies as the origin of cosmic magnetic fields - I. The kinematic phase}",
  journal = {\mnras},
  archivePrefix = "arXiv",
  eprint = {1506.00849},
  keywords = {MHD, turbulence, methods: numerical, galaxies: magnetic fields},
  year = 2016,
  month = apr,
  volume = 457,
  pages = {1722-1738},
  doi = {10.1093/mnras/stv2985},
  adsurl = {http://adsabs.harvard.edu/abs/2016MNRAS.457.1722R},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

To follow that, I went to my "Thesis" tex and copied what was there;

\usepackage[style=authoryear,sorting=none]{biblatex}
\addbibresource{references.bib}

and on the end of the .tex:

\printbibliography

and of course I copied references.bib on my folder.

Those two, results on the following Error:

! 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}

I tried to follow some other similar questions, but couldn't fine any commands like these;

\PassOptionsToPackage{square,numbers}{natbib}
\RequirePackage{natbib}

on any of my files.

EDIT: Here is part of my code:

\documentclass{aa}  
\usepackage{graphicx}
\usepackage{txfonts}
\usepackage[style=authoryear,sorting=none]{biblatex}
\addbibresource{references.bib}
\begin{document}
\printbibliography
\end{document}
Bobyandbob
  • 4,899

1 Answers1

0

If you are submitting to the journal they will probably not accept biblatex, but if you just want to use biblatex with aa.cls and not submit to the journal then you can load the class with the bibyear option which does not load natbib. (I don't know what other side effects this may have, but you can probably work around them.)

MWE:

\documentclass[bibyear]{aa}
\usepackage{txfonts}
\usepackage[style=authoryear,sorting=none]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{2016MNRAS.457.1722R,
  author = {Rieder, M. and Teyssier, R.},
  title = {A small-scale dynamo in feedback-dominated galaxies as the origin of cosmic magnetic fields - I. The kinematic phase},
  journal = {\mnras},
  archivePrefix = {arXiv},
  eprint = {1506.00849},
  keywords = {MHD, turbulence, methods: numerical, galaxies: magnetic fields},
  year = {2016},
  month = {4},
  volume = {457},
  pages = {1722-1738},
  doi = {10.1093/mnras/stv2985},
  adsurl = {http://adsabs.harvard.edu/abs/2016MNRAS.457.1722R},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Filler text \autocite[1722]{2016MNRAS.457.1722R}.
\printbibliography
\end{document}

enter image description here

David Purton
  • 25,884
  • Wow, REALLY thank you! I didn't know biblatex was not acceptable. I guess I have to find out how natbib works. Much useful information! Up-voted and Accepted – user174411 Nov 15 '17 at 11:33