1

我在使用 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。

4

1 回答 1

2

你的论文可能已经到期了……无论如何。您应该有格式的作者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},
}
于 2016-11-28T08:38:55.153 回答