How to Move the Bibliography in Markdown/Pandoc

Pandoc insert appendix after bibliography

Eventually reference handling will change to make it possible to put the references wherever you like (https://github.com/jgm/pandoc/issues/771), but right now there's no easy way to do it.

As suggested here, you could put your appendix in a separate file, use pandoc to convert it to a LaTeX fragment, then include that fragment using the --include-after-body flag. It would then come after the bibliography.

How to move superscript citation numbers inside of punctuation in Markdown file?

It should be sufficient to add

notes-after-punctuation: false

to the YAML metadata block.

Why does _output.yml prevent me from moving references in bookdown::pdf_book()?

From the answer I posted on Github https://github.com/rstudio/bookdown/issues/1082#issuecomment-811026589

Changing placement of the bibliography using a div of id refs as explained in https://bookdown.org/yihui/rmarkdown-cookbook/bibliography.html#include-appendix-after-bibliography is a Pandoc citation processor feature. See https://pandoc.org/MANUAL.html#placement-of-the-bibliography

Using Pandoc's citeproc is the default for pdf_document() and pdf_book(), but here n your output file _output.yml, you are explicitly changing citation_package to natbib for the bookdown::pdf_book format.

When you call bookdown::render_book(output_format = 'bookdown::pdf_book'), depending on the case you tested, this will happen

  • if the format is defined in _output.yaml it will use the configuration define there and use natbib
  • if the format is not defined in _output.yaml it will use the default config for the format and --citeproc will be use.

You can only control the placement of the bibliography with a div of id refs in the second case.

You just need to change the citation_package: accordingly to want you need, and remove the field if you want to use Citations features from Pandoc processor.



Related Topics



Leave a reply



Submit