1
我使用RMarkdown基於使用RStudio的投影儀模板獲取PDF演示文稿。我想獲得目錄(TOC)幻燈片;但是,我的TOC幻燈片是空的。使用Rmarkdown投影儀模板的空TOC幻燈片
我需要做什麼讓我的TOC顯示的幻燈片?
我用這個代碼:
---
title: "test"
output:
beamer_presentation:
toc: true
---
## Topic A
kdsfj
## Topic B
sdjfkl
SessionInfo:
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.2
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] backports_1.0.4 magrittr_1.5 rprojroot_1.1 htmltools_0.3.5 tools_3.3.2
[6] yaml_2.1.14 Rcpp_0.12.8 stringi_1.1.2 rmarkdown_1.3 knitr_1.15.1
[11] stringr_1.1.0 digest_0.6.11 evaluate_0.10
謝謝!僅在「slide_level」上定義一個TOC是可能的(或如何),例如,在這種情況下對於第2級? –
據我所知,不符合標準降價。剛剛在SO上找到了這個(http://stackoverflow.com/questions/34814100/table-of-content-in-beamer-generated-with-r-markdown-knitr),這就意味着你可能不得不做一些棘手的事情, renewcommand {\ tableofcontents} {...},但沒有實際的答案。 – PJP