我使用了pagedown包的论文模板中的代码。目录的默认位置在确认之后,在表格列表之前。我想把它加在文献综述部分之后。我怎么做这件事呢?
这是pagedown包的论文模板中的代码。你可以安装它: remotes::install_github('rstudio/pagedown')
---
title: A paged html thesis template for R Markdown users
subtitle: A {pagedown} template.
author: 
  - name: William Brent Thorne
    edu: BSc
degree: Master of Documentation
institute: Typeset University
faculty: Reproducibility and FOSS
department: Templates
location: St. Catharines, ON 
date:
  - year: 2019
    month: August
sign_page: true
dedication: A dedication line or two goes here.
abstract: This is the abstract.
preface: A preface to the thesis.
acknowledge: Put the ackknowledgements here.
committee:
  - name: Jane Doe III
    prefix: Dr
    position: Chair of Department
  - name: John Smith
    prefix: Dr
    position: Faculty Advisor
lof: true
lot: true
toc-title: Contents
output:
  pagedown::thesis_paged: 
    toc: true
    number_sections: yes
    pandoc_args: --mathjax
    self_contained: no
bibliography: packages.bib
link-citations: yes
# uncomment this line to produce HTML and PDF in RStudio:
knit: pagedown::chrome_print
---
```{r setup, include=FALSE}knitr::opts_chunk$set(echo =假,
                  fig.align = 'center')# Literature Review {-}
This is where you can include a lit review if you don't wish for it to be an individual chapter or to be numbered. To make sure that a section heading is not numbered use the `{-}` notation beside the header text like this:
_**rmarkdown**_:
```markdown文献综述{-}
如果你不希望它成为一个单独的章节或编号,你可以在这里加入一篇文学评论。要确保小节标题没有编号,请在标题文本旁边使用{-}表示法,如下所示:
# The Basics {.chapter}
## Introduction
This template is based on the `pagedown::html_paged` template and modified to meet the requirements of a generic thesis document. Standard RMarkdown formatting can be used for smooth and distraction free writting, for example I will add a citation for the {knitr} package which is located in the `Thesis.bib` file auto-generated in this template [@R-knitr].
Thanks to the [help](https://github.com/rstudio/pagedown/issues/101) of [Romain Lesur](https://github.com/RLesur) this template has the ability to tag section headers with the word "Chapter ". To have your chapters display as this one (_Chapter 1 The Basics_) use the `{.chapter}` class like this:发布于 2020-12-07 01:52:18
使用这个LINK,我能够在文献评论部分之后获得一个要呈现的目录。我相信你必须删除你的yaml头的table of contents部分。

这是我的内容.Rmd文件的目录
---
output: html_document
---
# Table of contents
## literature review
## literature review然后是您的代码和链接资源,我用它将其呈现在另一个.Rmd文件中
---
title: A paged html thesis template for R Markdown users
subtitle: A {pagedown} template.
author: 
  - name: William Brent Thorne
    edu: BSc
degree: Master of Documentation
institute: Typeset University
faculty: Reproducibility and FOSS
department: Templates
location: St. Catharines, ON 
date:
  - year: 2019
    month: August
sign_page: true
dedication: A dedication line or two goes here.
abstract: This is the abstract.
preface: A preface to the thesis.
acknowledge: Put the ackknowledgements here.
committee:
  - name: Jane Doe III
    prefix: Dr
    position: Chair of Department
  - name: John Smith
    prefix: Dr
    position: Faculty Advisor
lof: true
lot: true
output:
  pagedown::thesis_paged: 
    toc: true
    number_sections: yes
    pandoc_args: --mathjax
    self_contained: no
link-citations: yes
---
```{r setup, include=FALSE}knitr::opts_chunk$set(echo =假,
                  fig.align = 'center')devtools::source_gist("c83e078bf8c81b035e32c3fc0cf04ee8",
                  filename = 'render_toc.R')# Literature Review {-}
This is where you can include a lit review if you don't wish for it to be an individual chapter or to be numbered. To make sure that a section heading is     not numbered use the `{-}` notation beside the header text like this:
```{r toc, echo=FALSE} render_toc("tableofcontent.Rmd")
_**rmarkdown**_:
```markdown文献综述{-}
如果你不希望它成为一个单独的章节或编号,你可以在这里加入一篇文学评论。要确保小节标题没有编号,请在标题文本旁边使用{-}表示法,如下所示:
# The Basics {.chapter}
## Introduction
This template is based on the `pagedown::html_paged` template and modified to meet the requirements of a generic thesis document. Standard RMarkdown     formatting can be used for smooth and distraction free writting, for example I will add a citation for the {knitr} package which is located in the     `Thesis.bib` file auto-generated in this template [@R-knitr].
Thanks to the [help](https://github.com/rstudio/pagedown/issues/101) of [Romain Lesur](https://github.com/RLesur) this template has the ability to tag     section headers with the word "Chapter ". To have your chapters display as this one (_Chapter 1 The Basics_) use the `{.chapter}` class like this:    但是您的格式非常具体,因此您必须对其进行更好的格式化,以适应您想要的输出。
https://stackoverflow.com/questions/65168775
复制相似问题