'Beamer and Table of Content in RMarkdown

Today I started studying Rmarkdown + Beamer. I have a problem creating the table of contents.

I create this way:

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

This code does not need to include the command toc: true. How can I create a Table of Contents using the toc: true command?

I did something luke this:

---
output:
  beamer_presentation:
    slide_level: 1
    toc: true
---
Table of Contents

## Section 1

## Section 2

## Section 3

# Section 1

# Section 2

# Section 3

But its not good. I want to click and jump to the page relative to the section.

Any help guys?



Solution 1:[1]

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

https://rstudio.cloud/project/675430

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1