我想插入一个目录幻灯片,但不要从头开始。
另外,我希望这样做,以便在每个新节到达时,都重复目录幻灯片,但是这次除了当前节以外,其他所有内容都变灰,例如,参见图像。
(this其他答案将不起作用,因为toc:true只是在最开始放置一个目录)
Latex中存在一些答案(请参阅here),但是我不知道如何在降价促销中实现这些答案。更一般而言,我在将本机投影仪乳胶集成到rmarkdown中时遇到了麻烦,因此,如果有人可以向我展示如何做到这一点,尤其是在此示例中,那将很有帮助。
比默前言:
output:
beamer_presentation:
fig_width: 7
fig_height: 6
fig_caption: false
# keep_tex: true
# toc: true
slide_level: 3
includes:
in_header: ~/Google Drive/.../.../../latexbeamertheme.r
header-includes:
- \AtBeginSection[]{\begin{frame}\tableofcontents[currentsection]\end{frame}}
最佳答案
您可以通过header-includes
解决此问题;这就是您如何将内容添加到LaTeX文档中的前言中。以下示例代码生成了一个演示文稿,其中包含了我想完成的事情:
---
title: "Example"
output: beamer_presentation
header-includes:
- \AtBeginSection[]{\begin{frame}\tableofcontents[currentsection]\end{frame}}
---
# Test Section One
----
Test
----
Test
# Test Section Two
----
Test
----
Test
编辑:
如果您希望或需要手动执行此操作,而不是使用
header-includes
方法,则可以:---
title: "Example"
output: beamer_presentation
---
# Test Section One
----
\tableofcontents[currentsection]
----
Test
----
Test
# Test Section Two
----
\tableofcontents[currentsection]
----
Test
----
Test
关于r - Rmarkdown投影仪目录幻灯片,以及非当前部分的灰色显示,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/46044415/