简体   繁体   English

R标题的降价指数

[英]R Markdown index for titles

I have seen people that are able to create an index based on the titles that you have on your R markdown document like in this picture 我见过能够根据您R降价文档中的标题创建索引的人,如下图所示

在此处输入图片说明

If somebody could let me know how would I have to modify this code so it creates that left index table? 如果有人可以让我知道如何修改此代码,以便创建该左索引表?

---
title: "Untitled"
author: "Juan Lozano"
date: "October 19, 2018"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## Title 1

Text Text Text Text Text

```{r cars}
summary(cars)
```

## Title 2

Text Text Text Text Text

As @hrbrmstr 's link indicates there are many YAML customisations possible: This is the sort of thing I usually use: 如@hrbrmstr的链接所示,可能有许多YAML定制:这是我通常使用的那种东西:

---
title: "Untitled"
author: "john Smith"
date: "today ;)"
output:
  html_notebook:
    fig_caption: yes
    number_sections: yes
    toc: yes
    toc_float: yes
  html_document:
    fig_caption: yes
    number_sections: yes
    toc: yes
    toc_float: yes
    df_print: paged
bibliography: /path/to/library.bib
---

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM