我有一个简单的测试.Rmd脚本,我用它生成一个带有rmarkdown
render
函数的PDF文件。
当我将toc
设置为true
时,第二个PDF页面是一个空白的白页,我希望看到“随幻灯片播放”。和'随R代码和输出滑动'在那里。
有谁知道如何格式化幻灯片标题以便它们出现在目录中?
---
title: "test"
author: "test"
date: '2015-10-29'
output: beamer_presentation
toc: true
---
## Slide with Bullets
- Bullet 1
- Bullet 2
- Bullet 3
## Slide with R Code and Output
```{r}
summary(cars)
```
答案 0 :(得分:0)
According to the documentation toc only works with level 1 headings. So the code below will create a table of contents to the title slide. I can't get it to work with slides that contain content though. Maybe this is how the table of contents is designed to work???
---
title: "Untitled"
output:
beamer_presentation:
toc: yes
---
# A Title Slide:
## Slide with Bullets
- Bullet 1
- Bullet 2
- Bullet 3
## Slide with R Code and Output
```{r}
summary(cars)
```