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