2

I am trying to use ShareLaTex to compile my bibliography in the Astrophysical Journal (ApJ) format. The document compiles in ApJ format just fine, but the bibliography is compiled in some generic format and \cite{} and \citep{} do not work as expected, with my references replaced by the usual question marks. Here is my preamble:

\documentclass[apj]{emulateapj}

\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}

\usepackage{natbib}
\usepackage[backend=bibtex]{biblatex}
\bibliographystyle{apj}
\bibliography{P1640_AGES}

\begin{document}

...

\printbibliography
\end{document}
3
  • 1
    It seems to me that the problems is due to the use of both natbib and biblatex.
    – Guido
    Mar 21, 2013 at 3:34
  • Commenting out natbib doesn't have any change, and conversely commented out biblatex caused the bibliography to disappear entirely
    – user27781
    Mar 21, 2013 at 18:13
  • If you comment out biblatex you should move the \bibliography command in place of \printbibliography.
    – egreg
    Mar 28, 2013 at 0:03

2 Answers 2

3

There are several problems:

  1. The file apj.bst is not present by default in ShareLaTeX (either you request ShareLaTeX to include it in the available packages or upload it directly. I got a copy of it from http://www.astro.virginia.edu/coolflow/apj.bst)

  2. The file mixes the use of two reference/bibliography managers natbib and biblatex. The usage should be:

natbib

\documentclass[apj]{emulateapj}

\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{natbib}
\bibliographystyle{apj}

\begin{document}
\nocite{*}
...
\bibliography{test}
\end{document}

biblatex

\documentclass[apj]{emulateapj}

\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}

\usepackage[backend=bibtex]{biblatex}
\addbibresource{test.bib}

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

I don't know if there are already predefined biblatex styles for APJ, and more options might be needed (e.g., author-year) for biblatex.'

1
  • 1
    Back in December 2013 I've tried to build upon (read: hack into) the author-year style of plain biblatex and make a style tailored for ApJ. An updated version of the code can be found at github.com/EdwinChan/biblatex-apj. Aug 1, 2015 at 16:41
0

4 years into the future and the answer is finally here. You need to use the iop format for emulateapj, as it uses the chicago format by default. Your code should look like this:

\documentclass[apj,iop]{emulateapj}

\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}

\usepackage{natbib}
\usepackage[backend=bibtex]{biblatex}
\bibliographystyle{apj}
\bibliography{P1640_AGES}

\begin{document}

...

\printbibliography
\end{document}
1
  • But \bibliographystyle{apj} and \printbibliography is still wrong. Loading natbib and biblatex will also cause an error.
    – moewe
    Dec 12, 2017 at 7:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .