Closed mccarthy-m-g closed 2 years ago
My guess is that it's only finding the citations in index.Rmd in the K-M method (and it's unlikely you have any). What you really need is to find the citations in all of your files...something like
unique(unlist(lapply(list.files(".", ".Rmd$"), bbt_detect_citations))))
I don't know if it's possible to specifically detect "bookdown", but I could probably add the ability of bbt_detect_citations()
to handle a vector of files.
I tried to use the following from your README in the YAML of a bookdown book using the “Knit and Merge” (K-M) method, but it throws an error when building the book.
Here's the error:
Additionally, when I inspect the
biblio.json
file it's empty despite having in-text citations.However, the syntax above works fine when using bookdown's "Merge and Knit" method. I'm not sure if you can create a YAML-only workaround for the error (likely not since K-M knits every chapter in a new session), so a disclaimer in your README and function documentation to only use this YAML syntax with the "Merge and Knit" method might be helpful.