Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.