如何在rmakdown Rmd文件中包含一个抽象

use*_*089 5 r pandoc rstudio knitr r-markdown

.Rmd下面带有标题的文件中,我想要包含一个摘要,所以我尝试了标准的LateX文章表单,

\abstract{This paper explores a variety of topics related to the question of testing the equality of
covariance matrices in multivariate linear models, particularly in the MANOVA setting. 
The main focus is on graphical methods that can be used to understand features of data related
to this question.}
Run Code Online (Sandbox Code Playgroud)

但是,令人惊讶的是(我知道这看起来很奇怪),我的References部分中的引用变得格式错误 - 引用之间没有间距,奇数缩进.那么,我怎样才能包含一些看似抽象的东西呢?

我的YAML标题是:

---
title: "Notes on Testing Equality of Covariance Matrices"
author: "Michael Friendly"
date: '`r format(Sys.time(), "%B %d, %Y")`'
output:
  pdf_document:
    fig_caption: yes
    keep_tex: yes
    number_sections: yes
    includes:
        in_header: mystyles.tex
 csl: apa.csl
bibliography: 
  - "C:/Users/friendly/Dropbox/localtexmf/bibtex/bib/statistics.bib"
  - "C:/Users/friendly/Dropbox/localtexmf/bibtex/bib/graphics.bib"
---
Run Code Online (Sandbox Code Playgroud)

编辑:考虑到这一点,问题可能是pandoc-citeproc通过\abstract{}在文档中使用完成的某些东西感到困惑.

Joe*_*der 11

rmarkdown软件包现在允许在YAML中包含摘要.像这样:

abstract: "This is my abstract."
Run Code Online (Sandbox Code Playgroud)

有关示例,请参阅此博客文章.

  • 您是否知道是否有办法将文档中出现的"摘要"一词改为其他内容(即将其翻译成另一种语言)? (3认同)