5

I was asked to clarify the question, hopefully this is clearer.

When building a book using bookdown, citations in footnotes do not appear in the references section for a specific chapter, but do appear in the global references at the end of the book. Example below.

# Introduction {#intro}

Lorem ipsum.

You can write citations, too. For example, we are using the **bookdown** package [@R-bookdown] in this sample book, which was built on top of R Markdown and **knitr** [@xie2015].

This is a citation [@johndoe2020a].[^note1]

Citations in footnotes in line doesn't work either^[This is another footnote that contains a citation @bobjohnson2018]

The citations in the footnotes do not show up in the end of chapter references section (right below this line), but does show up in the end of book references.

[^note1]: This footnote contains a citation [@janesmith2019]

The johndoe2020a citation will appear as a reference at the end of the chapter, but janesmith2019 and bobjohnson2018 will not. All three references will appear at the end of the book.

Is there a way to get citations within the footnotes of a chapter to appear in the references section for that chapter?

Here is the repository.

Yihui Xie
  • 28,913
  • 23
  • 193
  • 419
Jim Shen
  • 51
  • 2
  • 1
    It might be a bug of **bookdown**, but I don't have time to verify it. If you don't get an answer in the next few days, you may file an issue to the **bookdown** repo on Github. Thanks! – Yihui Xie Sep 12 '20 at 03:23
  • A workaround is to include an invisible code chunk that has the citations in it, as seen here: https://jimhshen.github.io/citationfootnotes/workaround-footnote-citations.html – Jim Shen Sep 22 '20 at 20:40
  • @JimShen The only problem with this workaround is that the PDF (LaTeX) output will be wrong: it'll include the citations at the end of the chapter. – Tamas Ferenci Nov 05 '20 at 23:59

0 Answers0