1

I'm building an article (documentclass: article) in Bookdown for output as PDF, and I'd like to include an appendix after the bibliography. Is there a way to insert the bibliography wherever you choose rather than it just showing up at the end of the rendered document?

I suspect the solution is similar to this, but I don't have a good understanding of how Pandoc and Bookdown are related. Sorry for the newb question.

Community
  • 1
  • 1
  • I'm not familiar with bookdown/knitr, but it can be solved with pandoc filters. The way I did it was to run a filter right after citeproc; this filter needs to move the last element (a div with the references) and put it right after a header called "References" (or whatever you want). If you have a MWE I can see what I can do.. – Sergio Correia Mar 23 '17 at 21:07

1 Answers1

2

I found an answer here:

https://stackoverflow.com/a/44294306/6242384

which cited this: https://groups.google.com/forum/#!searchin/pandoc-discuss/bibliography$20position|sort:relevance/pandoc-discuss/Q2Y0C2ZS4es/vNJAUWjoAwAJ

Basically, you add this line where you want the bibliography: <div id="refs"></div>

I tried it and it worked for me.

Alex P
  • 1,574
  • 13
  • 28