crsh / citr

RStudio Addin to Insert Markdown Citations
Other
407 stars 46 forks source link

reference with double score not found #56

Closed sebacea closed 4 years ago

sebacea commented 4 years ago

Description A reference entitled Do share-of-income limits on tax-deductibility of charitable contributions affect giving? by Duquette is shortened as duquette_share--income_2019 in zotero. If you add the reference to an .Rmd archive and compile it with Knitr I have the following error

pandoc-citeproc: reference duquette_share not found

I solved the error by replacing the key to duquette_share-income_2019 in the .bib file and using the updated key in the text.

To Reproduce

file.Rmd

---
output:
  html_document: default
lang: en-GB
bibliography: references.bib
---

[@duquette_share--income_2019]

references.bib

@Article{duquette_share--income_2019,
  title = {Do Share-of-Income Limits on Tax-Deductibility of Charitable Contributions Affect Giving?},
  volume = {174},
  issn = {0165-1765},
  abstract = {The 2017 Tax Cut and Jobs Act increased the limitation on the tax deductibility of charitable contributions from 50 to 60 percent of adjusted gross income. This note estimates the effect of the share-of-income limitation on giving for the first time. Patterns in giving over time and across charities coincide with earlier changes in the share-of-income limit, consistent with a substantial policy effect. I estimate that the 2017 limit increase will boost aggregate household giving on the order of \$10 billion.},
  journal = {Economics Letters},
  doi = {10.1016/j.econlet.2018.10.009},
  author = {Nicolas J. Duquette},
  month = {jan},
  year = {2019},
  keywords = {Charitable giving,Deductibility limits,Income taxation,Public policy},
  pages = {1-4},
  file = {/Users/sebacea/Zotero/storage/DUZU9ZWS/S0165176518304221.html},
}

Expected behavior Use citr without correcting the .bib file

crsh commented 4 years ago

Hmm, if the reference handle is generated by Zotero, I don't think there is anything I can do about this. This seems to be a problem between Zotero and pandoc-citeproc, which is responsible for rendering the references. Or am I missing/misunderstanding something?

sebacea commented 4 years ago

I think you are right