Rmarkdown 中的 Bibtex - 第二作者的名字和姓氏在引用中交换
Bibtex in Rmarkdown - First and and last names of second author get swapped in citation
正如标题所说,我用Rmarkdown写了一个文档。
我在 .Rmd 文档的顶部使用以下文本:
---
title: "Title"
author: "Me"
date: "September 10, 2018"
output:
pdf_document: default
html_document: default
bibliography: bibliography.bib
---
然后我在 bibliography.bib 文档中使用以下代码,根据文档属性,它是一个 bibtex 文件:
@article{Brooks98,
author={ Brooks, S. P. and Gelman, A.},
title={Interface foundation of america general methods for monitoring convergence of iterative simulations general methods for monitoring convergence of iterative simulations},
year={1998},
journal={Journal of Computational and Graphical Statistics},
volume=7,
issue=4,
pages=434-455
}
我希望得到
Brooks, S. P. and Gelman, A. 1998
但我得到
Brooks, S. P., and A. Gelman. 1998
我的问题是,是什么原因造成的,我该如何解决这个问题?
你必须改变你的引用风格。一种简单的解决方案是将 bibtex
与 natbib
和 apalike
:
一起使用
---
title: "Title"
author: "Me"
date: "September 10, 2018"
output:
pdf_document:
citation_package: natbib
html_document: default
bibliography: bibliography.bib
biblio-style: apalike
---
(请注意,您必须使用 pages={434-455}
才能工作。)
如果引文风格的其他方面不合适,您可以查看 this answer 寻找其他风格的方法。另一种选择是 biblatex
.
我不太熟悉的默认设置是使用pandoc-citeproc
,它使用CSL文件来定义样式。有关其他 CSL 样式的资源,请参阅此处:https://citationstyles.org/
正如标题所说,我用Rmarkdown写了一个文档。
我在 .Rmd 文档的顶部使用以下文本:
---
title: "Title"
author: "Me"
date: "September 10, 2018"
output:
pdf_document: default
html_document: default
bibliography: bibliography.bib
---
然后我在 bibliography.bib 文档中使用以下代码,根据文档属性,它是一个 bibtex 文件:
@article{Brooks98,
author={ Brooks, S. P. and Gelman, A.},
title={Interface foundation of america general methods for monitoring convergence of iterative simulations general methods for monitoring convergence of iterative simulations},
year={1998},
journal={Journal of Computational and Graphical Statistics},
volume=7,
issue=4,
pages=434-455
}
我希望得到
Brooks, S. P. and Gelman, A. 1998
但我得到
Brooks, S. P., and A. Gelman. 1998
我的问题是,是什么原因造成的,我该如何解决这个问题?
你必须改变你的引用风格。一种简单的解决方案是将 bibtex
与 natbib
和 apalike
:
---
title: "Title"
author: "Me"
date: "September 10, 2018"
output:
pdf_document:
citation_package: natbib
html_document: default
bibliography: bibliography.bib
biblio-style: apalike
---
(请注意,您必须使用 pages={434-455}
才能工作。)
如果引文风格的其他方面不合适,您可以查看 this answer 寻找其他风格的方法。另一种选择是 biblatex
.
我不太熟悉的默认设置是使用pandoc-citeproc
,它使用CSL文件来定义样式。有关其他 CSL 样式的资源,请参阅此处:https://citationstyles.org/