Set/change bibliography title in RMarkdown?

坚强是说给别人听的谎言 提交于 2019-12-24 10:47:52

问题


I'm currently experimenting with RMarkdown. However, I would like to change the title of my bibliography. I'm using natbib in this situation. The current RMarkdown setup is shown below:

title: ....
author: ....
output:
  pdf_document:
    citation_package: natbib
bibliography: Referanser2.bib
biblio-style: unsrt
header_includes: 
- \usepackage{amsmath}
- \usepackage{kbordermatrix}
- \setcitationstyle{numbers,square} 
[@MyReference]

This gives me a simple PDF with 1 reference and a bibliography. Is there any modification which can be done to the code in order for me to change the bibliography title?


回答1:


First of all, you got a typo in your YAML: it is header-includes with an hyphen.

You can change the head of the reference section by redefining \refname:

---
title: "Test"
author: "Martin"
header-includes: 
  - \renewcommand\refname{NEW TITLE}
output:
  pdf_document:
    keep_tex: yes
    citation_package: natbib
bibliography: skeleton.bib
biblio-style: unsrt
---

[@SomeRef]


来源:https://stackoverflow.com/questions/49463602/set-change-bibliography-title-in-rmarkdown

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!