【问题标题】:Beamer and Table of Content in RMarkdownRMarkdown 中的 Beamer 和目录
【发布时间】:2022-05-12 00:30:17
【问题描述】:

今天我开始学习 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

但它并不好。我想单击并跳转到与该部分相关的页面。

有帮助吗?

【问题讨论】:

    标签: r latex r-markdown beamer


    【解决方案1】:

    Tex 将为您创建目录,只需将您的部分放在文档中它们所属的位置即可:

    ---
    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
    

    https://rstudio.cloud/project/675430

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-22
      • 1970-01-01
      • 1970-01-01
      • 2018-02-13
      • 2017-07-30
      • 2015-03-16
      • 1970-01-01
      • 2020-06-19
      相关资源
      最近更新 更多