# ShareLaTeX Bibliography in ApJ format

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}

-
It seems to me that the problems is due to the use of both natbib and biblatex. – Guido Mar 21 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 at 18:13
If you comment out biblatex you should move the \bibliography command in place of \printbibliography. – egreg Mar 28 at 0:03

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}

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.'