2

I wonder if it is possible to put an appendix after references when using biblatex. These question and answer or this answer showed how to do so without citation_package: biblatex but do not work anymore when I add this in YAML. Using child document to print appendix after references does not work either.

Is it possible to use both biblatex and this solution?

Here's a reproducible example (Not working. Remove citation_package: biblatex for a functional example):

---
title:
author:
date: 
abstract: 
output: 
  pdf_document:
    number_sections: true
    citation_package: biblatex
bibliography: references.bib
biblio-style: bwl-FU
---

# Part 1

@greenwood_financial_1989


# My references

<div id="refs"></div>

# Appendix

bla bla

with references.bib:

@article{greenwood_financial_1989,
  title = {Financial Development, Growth and the Distribution of Income},
  url = {https://www.nber.org/papers/w3189},
  number = {3189},
  journaltitle = {NBER Working Paper Series},
  date = {1989},
  author = {Greenwood, Jeremy and Jovanovic, Boyan}
}

Edit: As suggested, I compared the latex document produced by the .Rmd file (by adding keep_tex: true in YAML) when I use citation_package: biblatex and when I don't.

I renamed the section "References" as "My references" in the .Rmd file to be able to distinguish the two sections in the latex document.

It appears that:

  • using citation_package: biblatex automatically adds \printbibliography at the end of the latex document, hence the "References" section with the actual references at the end of the PDF output. Besides, the section "My references" only contains \hypertarget{refs}{}.

  • when I remove citation_package: biblatex, the \printbibliography line disappears from the latex document, and the "My references" section contains \leavevmode\hypertarget{}{} with the id of the reference and its full description (that I do not paste here because it would only make this less readable).

Therefore, I guess this problem appears during the conversion from the .Rmd file to .tex format.

bretauv
  • 7,756
  • 2
  • 20
  • 57
  • if you can separate the RMarkdown and TeX issues (e.g. by processing the RMarkdown into a TeX file and seeing if there are obvious problems with the TeX) that would (1) help narrow down the problem and (2) possibly make this an appropriate question for tex.stackexchange.com – Ben Bolker May 13 '20 at 17:46
  • @BenBolker, okay, I will do that – bretauv May 13 '20 at 17:52
  • 1
    @BenBolker I edited my post, is this what you wanted? – bretauv May 13 '20 at 18:23
  • Don't know if this is adding more than confusion, but this from the other day from [R-Bloggers-citations](https://ropensci.org/technotes/2020/05/07/rmd-citations/), and ways (packages) to get to the guts. – Chris May 13 '20 at 19:35
  • 1
    @Chris Though this may be useful to know, I think it is not related to my issue as it does not use `biblatex` – bretauv May 13 '20 at 19:39
  • I don't know the answer, but I do think your additions will be very helpful for someone else who has the time/knowledge/energy to tackle this. – Ben Bolker May 13 '20 at 22:57

0 Answers0