我正在尝试将 .Rmd 文件转换为 .md (输出:md_document),但标题未显示在渲染的文件上。
当我尝试将同一文件渲染为 .html 文件(输出:html_document)时,标题确实会显示。
标题显示在渲染的文档上:
---
title: "Test"
output: html_document
---
```{r}
head(cars)
```
标题未显示在渲染的文档上:
---
title: "Test"
output: md_document
---
```{r}
head(cars)
```
rmarkdown::render(my_file)
有什么想法吗?
我在 Mac 10.9.5 上使用 RStudio 0.98.1091 和 R 3.1.2。
中间的代码--
被解释,因为我的引用是用以下代码呈现的:
---
title: "Test"
output: md_document
bibliography: ~/mybib.bib
---
This is a test where I cite [@post1, @post2]
有趣的是,当我要求生成 html 和 md 文件时,标题显示在 .md 文件上:
---
title: "Test"
output:
html_document:
keep_md: yes
---
不应该输出keep_md: yes
与output: md_document
?