1201725515 Rmarkdown cannot access *.bib file

Any citations I try to export to a bib file are not read by Rmarkdown.

bibliography: ../Zotero_citations/neanderthal.bib

../Zotero_citations/neanderthal.bib: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Execution halted

I have tried exporting as Better BibTeX; Better BibLaTex and Better BibTeX Citation Key Quick Copy. None of which change the outcome.

Thank you. Robert
  • Any reason you're not using RStudio's native Zotero integration?

    As for the error message -- you are actually in a sibling folder to Zotero_citations when you are running this?
  • edited 4 days ago
    I was in my project directory when I ran this. I tried the .bib file in the same directory as the Rmd file and I tried to place the .bib in its own folder. No joy either way.

    I then discovered that when I use the Rmarkdown visual editor to place my citations, it worked. I do not know why, but setting the following paths in the YAML header, makes no difference. But, I cannot knit without those two lines.

    bibliography: neanderthal.bib
    csl: apa.csl

    I can create citations using the visual editor, which led me to discover I was not placing the cite in brackets. I was using @allaire2019 instead of [@allaire2019]

    In short, the problem is resolved. Thank you for your help.

  • By native integration I mean https://www.rstudio.com/blog/rstudio-1-4-preview-citations/

    The error you are seeing seems like a fairly common error when knitting and I doubt it's related to Zotero. See if any of this helps https://stackoverflow.com/questions/48161177/r-markdown-openbinaryfile-does-not-exist-no-such-file-or-directory
  • @rccline I would strongly recommend using CSL YAML or CSL JSON format when working with RMarkdown instead of Bib. pandoc needs to convert bib to CSL anyway, and that is a lossy process
Sign In or Register to comment.