Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AEA article bibliography does not work #584

Open
lyuben-ivanov opened this issue Dec 24, 2024 · 1 comment
Open

AEA article bibliography does not work #584

lyuben-ivanov opened this issue Dec 24, 2024 · 1 comment

Comments

@lyuben-ivanov
Copy link

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
@cderv
Copy link
Collaborator

cderv commented Dec 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants