我觉得这是直截了当的事情,但是我发现的一切并不能完全满足我的需求。我正在使用rmarkdown并编织到latex .pdf
。我想在本文中引文的括号为round ()
,而不是括号。下面的yaml使用references.bib
文件正确导入引用。我可以做些什么来轻松地将圆括号更改为圆形吗?
---
title: "Title"
author: "Author"
date: "16/03/2020"
output:
pdf_document:
fig_caption: yes
citation_package: natbib
bibliography: references.bib
editor_options:
chunk_output_type: console
---
我已使用方法here,但它返回错误:
Error in yaml::yaml.load(..., eval.expr = TRUE) : Parser error: while parsing a block mapping at line 6, column 5 did not find expected key at line 7, column 30` --- title: "Title" author: "Author" date: "16/03/2020" output: pdf_document: fig_caption: yes bibliography: references.bib editor_options: chunk_output_type: console \usepackage[round]{natbib} ---
有什么想法吗?感谢您的建议/想法...
您试图在rmarkdown标头中包含\usepackage[round]{natbib}
的问题是rmarkdown似乎不够灵巧,无法解析带有可选参数的命令。可以通过将命令隐藏在.tex
文件中来欺骗它
---
title: "Title"
author: "Author"
date: "16/03/2020"
output:
pdf_document:
fig_caption: yes
includes:
in_header: preamble.tex
bibliography: references.bib
---
test [@knuth]
带有preamble.tex
\usepackage[round]{natbib}