[Tex/LaTex] Natbib — Undefined citations when uploading to arxiv

arxivbibtexcitingnatbib

In uploading a document to arxiv, I'm met with the following error for every single citation:

Package natbib Warning: Citation `citation name' on page 2 undefined on input line x

When I compile the document in TexShop, it seems to run just fine. Similarly, running the following:

latex
bibtex
latex
latex

also works. It's not until I go through the arxiv upload process that I get the natbib warning.

My preamble looks like this:

\documentclass[apj]{emulateapj}
\usepackage{floatrow}
\floatsetup[table]{capposition=top}

And my bibliography section:

\bibliographystyle{apj}
\bibliography{bib_file}

My .bib file is filled with @article entries, most of which were automatically generated, so I'm not worried about typos/syntax errors which may be causing the failure. I've tried just about everything I could think of/find as potential solutions online to no avail.

Best Answer

I was having the same problem, and found even uploading the .bbl file was not sufficient. In fact, the .bbl file brought up an error that made the compilation fail, but this shed light on the problem - I had to upload my emulateapj.cls file, as there were some commands defined in that file necessary for the successful compilation of the bibliography.

Thus, I think the solution is:

  • Upload emulateapj.cls

  • You might also need to upload your texfile.bbl

  • Maybe even the texfile.aux

Related Question