任何人都知道如何分隔“标题页”和“目录”页面? 从这段代码:
---
title: "Title Page"
output:
pdf_document:
toc: true
number_sections: true
---
上面的几行代码创建了标题和目录,但标题封面和目录没有分离。
通过添加乳胶符号\newpage
和\tableofcontents
:
---
title: "Title Page"
output:
pdf_document
---
\centering
\raggedright
\newpage
\tableofcontents
# header 1
```{r}
summary(cars)
```
## header 2
```{r, echo=FALSE}
plot(cars)
```
## header 3
lore ipsum
# header 4
lore ipsum
是否有办法在不必使用套餐\newpage
和\tableofcontents
并在以下区块的某处使用rmarkdown
:
---
title: "Title Page"
output:
pdf_document:
toc: true
---
答案 0 :(得分:8)
我在visibility
includes:
---
title: "Title Page"
output:
pdf_document:
toc: true
number_sections: true
includes:
in_header: latex/header.tex
before_body: latex/before_body.tex
after_body: latex/after_body.tex
---
文件包含before_body
之后您想要的所有选项和标题选项,但是在您开始编写文档正文之前。在该文件中,只需放置\begin{document}
,就像这样:
\newline
那就是它! \newpage
文件中没有其他内容。这应该有用。
现在,如果我只能垂直居中标题页......