![防止标题页、序言等列在目录中](https://linux22.com/image/473006/%E9%98%B2%E6%AD%A2%E6%A0%87%E9%A2%98%E9%A1%B5%E3%80%81%E5%BA%8F%E8%A8%80%E7%AD%89%E5%88%97%E5%9C%A8%E7%9B%AE%E5%BD%95%E4%B8%AD.png)
rmarkdown
我正在使用该软件包制作 pdf bookdown
。我有一个.Rmd
文件,其中包含标题页、一些致谢等。然后我将目录放在这些页面之后、主文档之前。会toc
自动将前面的页面包含在内toc
。我该如何防止这种情况发生?
---
output:
bookdown::pdf_document2:
toc: false
latex_engine: xelatex
header-includes:
- \usepackage{lmodern}
- \pagenumbering{gobble}
---
Title page text
\newpage
\pagenumbering{roman}
## Declarations {-}
## Acknowledgements {-}
## Publications {-}
\newpage
``` {=latex}
\setcounter{tocdepth}{3}
\tableofcontents
\listoffigures
\listoftables
```
\newpage
\pagenumbering{arabic}
# General Introduction
我只想toc
从“概述”开始
答案1
似乎bookdown
需要您将类别添加{.unlisted .unnumbered}
到标题中:请参阅bookdown
文档第 4.18 节。
---
output:
bookdown::pdf_document2:
toc: false
latex_engine: xelatex
header-includes:
- \usepackage{lmodern}
- \pagenumbering{gobble}
---
Title page text
\newpage
\pagenumbering{roman}
## Declarations {.unlisted .unnumbered}
## Acknowledgements {.unlisted .unnumbered}
## Publications {.unlisted .unnumbered}
\newpage
``` {=latex}
\setcounter{tocdepth}{3}
\tableofcontents
\listoffigures
\listoftables
```
\newpage
\pagenumbering{arabic}
# General Introduction