AEA article bibliography does not work
I tried to compile a new AEA article and it works as expected but ONLY if I don't use any bibtex citations.
After I add
bibliography: orange-economy-bibliography.bib
to the YAML header I get an error that I can not fix:
! Package natbib Error: Bibliography not compatible with author-year citations.
The .bib file itself is properly formatted and works flawlessly with 'knitr' when the following YAML settings are specified:
output:
pdf_document:
latex_engine: pdflatex
keep_tex: true
bibliography: orange-economy-bibliography.bib
csl: harvard-cite-them-right.csl
what is inside orange-economy-bibliography.bib ?
! Package natbib Error: Bibliography not compatible with author-year citations.
This error seems to mean natbib is used, and not happy processing the bib file provided with the aea.bst file provided.
The .bib file itself is properly formatted and works flawlessly with 'knitr' when the following YAML settings are specified:
When using pdf_document, it won't use the same template and default style. Also pdf_document defaults to citeproc, using csl for styling. Possibly if you use pdf_document with the same aea.bst and natbib processing it will give you the same error.
From looking the error online I find stuff like https://tex.stackexchange.com/questions/54480/package-natbib-error-bibliography-not-compatible-with-author-year-citations, saying:
-
Another way this error can arise is if one of your BibTeX entries has no year.
-
To find out which entry it is, look earlier in the output for a message like Warning--empty year in ABC2019
So you should maybe look into the .log file and see more message. If aea.bst expect author-year, you may need to check the bib file about year.
Hope it helps