r - RMarkdown 中的 Beamer 和目录
问题描述
今天开始学习 Rmarkdown + Beamer。我在创建目录时遇到问题。
我这样创建:
---
title: "Beamer"
author: "Me"
date: "08/08/2019"
output: beamer_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
# Table of Contents
* [Chapter 1](#chapter-1)
* [Chapter 2](#chapter-2)
* [Chapter 3](#chapter-3)
# Chapter 1 <a name="chapter-1"></a>
Content for chapter one.
# Chapter 2 <a name="chapter-2"></a>
Content for chapter one.
# Chapter 3 <a name="chapter-3"></a>
Content for chapter one.
此代码不需要包含命令toc: true
。如何使用该toc: true
命令创建目录?
我做了这样的事情:
---
output:
beamer_presentation:
slide_level: 1
toc: true
---
Table of Contents
## Section 1
## Section 2
## Section 3
# Section 1
# Section 2
# Section 3
但它并不好。我想单击并跳转到与该部分相关的页面。
有帮助吗?
解决方案
Tex will create the toc for you, just place your sections where they belong to in your document:
---
title: test
author: test
output:
beamer_presentation:
toc: true
keep_tex: true
---
# Section 1
## Frametitel in Section 1
test
# Section 2
## Frametitel in Section 2
test
# Section 3
## Frametitel in Section 3
test
推荐阅读
- pptxgenjs - 我试图找到解决方案,我们如何将现有幻灯片详细信息分配给添加新幻灯片
- javascript - 在节点 js 中获得反射的跨站点脚本 (XSS) 攻击
- java - 如何获得互联网连接延迟/ping?
- r - 在 bookdown 中操作标题、脚注和表格描述的字体大小(用于 pdf_book)
- python - 使用请求库python发出请求时在标头中保留授权
- r - .txt 文件中的多个分隔符
- macos - 如何从 Kext 访问未导出的符号?
- r - R Shiny openxlsx: uploaded xlsx file - select a sheet from drop-down menu
- node.js - Node JS: How to catch the individual errors while reading files, in case multiple files are read on Promise.all?
- django - docker-compose:无法从 Nuxt 容器中访问 Django 容器