我在使用R-markdown编写主人的工作时遇到了问题。我正在使用papaja包。一切都很好,除了当我编写我的文档以生成pdf时,我的参考书目中的作者的第一个名字就在姓氏之前。这是我的问题的一个可重复的例子。这是r-makrdown的内容:
---
title: "The title"
shorttitle: "Title"
author:
- name: First Author
affiliation: 1
corresponding: yes # Define only one corresponding author
address: Postal address
email: my@email.com
- name: Ernst-August Doelle
affiliation: "1,2"
affiliation:
- id: 1
institution: Wilhelm-Wundt-University
- id: 2
institution: Konstanz Business School
abstract: |
Enter abstract here (note the indentation, if you start a new paragraph).
note: |
Complete departmental affiliations for each author (note the indentation, if you start a new paragraph).
Enter author note here.
keywords: "keywords"
wordcount: X
class: man
lang: american
figsintext: yes
lineno: yes
bibliography:
- r-references.bib
output: papaja::apa6_pdf
---
```{r message = FALSE, warning = FALSE}
library("papaja")
apa_prepare_doc() # Prepare document for rendering
```
[@R-papaja]
# References
```{r create_r-references}
r_refs(file = "test-references.bib")
```
\setlength{\parindent}{-0.5in}
\setlength{\leftskip}{0.5in}
\setlength{\parskip}{8pt}
以下是我在“test-references.bib”文件中的引用:
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/
%% Created for Lucien at 2015-12-09 13:45:03 +0100
%% Saved with string encoding Unicode (UTF-8)
@Manual{R-base,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2015},
url = {https://www.R-project.org/},
}
@Manual{R-papaja,
author = {Frederik Aust and Marius Barth},
title = {papaja: Create APA manuscripts with RMarkdown},
year = {2015},
note = {R package version 0.1.0.9054},
url = {https://github.com/crsh/papaja},
}
参考文献的pdf输出为:
Frederik Aust和Marius Barth.papaja:使用RMarkdown创建APA手稿,2015.20URL https://github.com/crsh/papaja。 R包版本0.1.0.9054。
我希望:
Aust Frederik和Barth Marius .papaja:使用RMarkdown创建APA手稿,2015.20URL https://github.com/crsh/papaja。 R包版本0.1.0.9054。
答案 0 :(得分:1)
你的论文可能已经到期......无论如何。您的作者应采用Lastname, Firstname [and Lastname, Firstname]*
。
在你的情况下:
@Manual{R-papaja,
author = {Aust, Frederik and Barth, Marius},
title = {papaja: Create APA manuscripts with RMarkdown},
year = {2015},
note = {R package version 0.1.0.9054},
url = {https://github.com/crsh/papaja},
}