Table of contents in rays generated by R markdown / knitr

In accordance with this question , I am having problems creating a table of contents with a pool class document that I made in RStudio with R markdown and knitr.

My YAML header looks like this:

---
params:
  x: !r x
author: "Author"
date: "Januar 2016"
graphics: yes
fontsize: 10pt
output:
  beamer_presentation:
    includes:
      in_header: in_header.tex
    keep_tex: yes
    latex_engine: xelatex
    slide_level: 1
    template: body.tex
    toc: true
classoption: aspectratio=169
---

I use the default byte pattern template in body.tex, which I found here (I needed to make dubious settings on the cover page, so why did I mention this directly).

I submit a document using

render(input = "file_name.Rmd",
         params = list(x = i),
         output_file = "file_name.beamer.pdf"
         )

However, only a blank page is displayed in pdf format and without TOC. I tried to render several times.

+2
source share
1

, . : slide_level: 1, 1. .

, . . - :

---
output:
  beamer_presentation:
    slide_level: 2
    toc: true
---

# Section 1

## Slide 1
Slide content

## Slide 2
Slide content

, \renewcommand{\tableofcontents}{...}, tex.stackexchange.com .

+5

Source: https://habr.com/ru/post/1671882/


All Articles