0

I am trying to put the references as bib tex with b-9.bib and with some styling with .csl files. Both the Rmarkdown and the aforementioned files are present in the same working directory. But I am encountering this error when trying to knit to PDF.

Error

YAML Header

---
title: "Swarm Intelligence"
output: html_document
bibliography: b-9.bib
csl: ieee.csl
---

Not sure if it is because of the hyphenated naming or path issue. I even tried giving the absolute path to the header path but still the issue. or am I missing some extra code chunk or so?

Ranji Raj
  • 778
  • 4
  • 18
  • Could you try to knit after renaming it to `b_9.bib`? – bttomio May 03 '21 at 19:36
  • Nope, it didn't work. Is there anything like regular expression to be written for such `-` character? As far I know it is for indentation. – Ranji Raj May 03 '21 at 19:44
  • Does [this](https://stackoverflow.com/questions/33548948/r-markdown-could-not-find-bib-file-in-one-project-whilst-working-fine-in-anoth) answer your question? – bttomio May 03 '21 at 19:52
  • Apparently, I posted after seeing that. That did not answer my question. – Ranji Raj May 03 '21 at 19:54
  • It could be your `csl` file. Could you please try changing it? – bttomio May 03 '21 at 19:55
  • Can you please be more specific as to what needs to be done with the `.csl` ? – Ranji Raj May 03 '21 at 19:58
  • It could be related to [this](https://stackoverflow.com/a/62578958/13249862). Therefore, you could just remove this line `csl: ieee.csl` from your YAML header. – bttomio May 03 '21 at 20:00
  • yes, that worked however now the generated document has no references. it shows `[WARNING] Citeproc: citation cimini2021adipose not found` – Ranji Raj May 03 '21 at 20:27

1 Answers1

0

Ensure all your files have the same working directory. Also, try using "word_document" as the output format. I am not sure how your csl formatting would apply to a html document.

SystemDee
  • 61
  • 1
  • 3