r - Rmarkdown yaml 中的多个作者和字幕

标签 r yaml rstudio r-markdown

我正在尝试关注this pandoc example将多个作者添加到 yaml metadata block 中的 Rmarkdown 文件中。 pdf 将在 RStudio(版本 0.98.932)中生成,但没有作者信息。

---
title:  'This is the title: it contains a colon'
author:
- name: Author One
  affiliation: University of Somewhere
- name: Author Two
  affiliation: University of Nowhere
date: "`r format(Sys.time(), '%d %B %Y')`"
tags: [nothing, nothingness]
abstract: |
  This is the abstract.

  It consists of two paragraphs.
output: pdf_document
---

我还想进一步自定义标题并添加副标题。可能吗?

最佳答案

我刚刚发现可以向 R markdown PDF 输出添加字幕。我在 Ubuntu 14.04 中使用 R 3.2.2 和 RStudio 0.99.473。

---
title:  'This is the title: it contains a colon'
subtitle: 'This is the subtitle'
output: pdf_document
---

关于r - Rmarkdown yaml 中的多个作者和字幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26043807/

相关文章:

amazon-web-services - 属性 'Queue' 不能为空

java - 如何在 spring boot 中为应用程序 yml 定义复​​杂列表?

rstudio - 如何在 RStudio 编辑器中更改字母大小写?

r - 打印时保持 R Markdown 语法高亮

r - 成对加权距离矢量化

R:更新前一行的值(视情况而定)

r - 在 R 中计算数据集的多重方差

r - 如何将具有特定模式的字符串与字符向量中的前一个字符串连接起来?

python - PyYAML 转储格式

oracle-call-interface - RStudio 服务器 ROracle 抛出 : Error in . oci.Driver() : ROracle internal error [rociDrvInit, 1, -1]