rmarkdown侧面有页面导航

时间:2018-03-21 14:41:11

标签: r r-markdown

您好我想在我的Rmarkdown文件一侧添加页面导航。如果它看起来像边栏on this page那就太好了。

---
title: "My Title"
author: "My Name"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output: 
  html_document:
    theme: united
    highlight: tango
    code_folding: hide
    df_print: paged
    toc: true
    toc_depth: 2

---
# Section 1
abc
## Section 1.1
abcabc
# Section 2
abcabcabc

任何人都可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

我已经尝试过并且效果很好:

---
title: "TEST"
output: 
  html_document:
  toc: true
  toc_float: true
  toc_collapsed: true
toc_depth: 3
number_sections: true
theme: lumen
---

有关更多信息,请在以下链接中查看答案:RMarkdown: Floating TOC and TOC at beginning