Open dmi3kno opened 4 years ago
Thanks for taking the time to report this. I'll look into it the next chance I get.
I am not quite sure if this is connected to this, but I experience the following related problem.
In the YAML reference I need to provide the entire path for RStudio to correctly render the citations. citr
on the other hand produces the following result when I do that:
> citr:::insert_citation()
Error in FUN(X[[i]], ...) :
file '/Users/jrennstich/Dropbox/websites/rennstich_com_v2/content/de/tutorials/online-lehre-praxis//Users/jrennstich/Dropbox/websites/rennstich_com_v2/references.bib' does not exist
Here's the odd thing. My workaround is as follows: I have two lines in the YAML
When I want to render the references, I comment-out the first one.
# bibliography: references.bib
bibliography: /Users/jrennstich/Dropbox/websites/rennstich_com_v2/references.bib
Whenever I need to add citations using citr
, I comment-out the second line.
bibliography: references.bib
# bibliography: /Users/jrennstich/Dropbox/websites/rennstich_com_v2/references.bib
This won't allow me to render the references. As my set-up is correct according to the Settings:
all the added references are being added to said .bib file, even though in YAML I only specify
bibliography: references.bib
The problem is, that when I use the correct full .bib file path YAML, I get the following error:
> citr:::insert_citation()
Error in FUN(X[[i]], ...) :
file '/Users/jrennstich/Dropbox/websites/rennstich_com_v2/content/de/tutorials/online-lehre-praxis//Users/jrennstich/Dropbox/websites/rennstich_com_v2/references.bib' does not exist
Is this related to this bug? Or should I open up a new case? And is there a way for me to avoid the workaround I am using now?
Thanks for your incredible work on this and the other packages!
First of all thank you for the awesome package! It changed the way I write academic papers and I am looking forward to converting my colleagues to the workflow involving
citr
/rmd
andZotero
.Describe the bug After connecting to Zotero library,
citr
is losing reference to the local .bib file described in YAML and instead proceeds to create newreferences.bib
in the working directory.To Reproduce Open new RMD document (I am using
rticles
template) with custom bib file defined in YAML. Launch Zotero in the background. Callcitr
Rstudio addin. It correctly identifies YAML's .bib file and suggests that Zotero is running, so it is possible to "connect and load" libraries. Click "connect and load", Zotero is now connected, but the reference to original .bib file is lost (it says "references are added toreferences.bib
"). In order to cure it, switch temporarily to "Settings" tab, where reference to original .bib file is still stored. Do nothing and switch back to "Insert citation" tab. The local .bib is now recognized and properly linked.Expected behavior There should be no need to switch to "Settings" tab to correct the reference to .bib file
Screenshots Open
citr
. YAML reference to./intro_paper.bib
is correctly recognized. Zotero library loaded and reference to./intro_paper.bib
is lost Flip to "Settings" tab. Everything looks like expected. Flip back to "Insert citation" tab. Reference to local .bib file is cured.