【发布时间】:2016-03-26 18:30:40
【问题描述】:
我有一个 rmarkdown 文档 (.Rmd),我想将其编入 pdf 文档。 number_sections 设置为“yes”,toc 设置为“true”。如何添加出现在目录中但没有节号的附录节?
这是一个示例 .Rmd 代码。怎样才能让附录A和附录B成为无数节,让它们同时出现在目录中?
---
title: "Test"
author: "test test"
geometry: margin=1in
output:
pdf_document:
keep_tex: yes
latex_engine: xelatex
number_sections: yes
toc: yes
toc_depth: 3
header-includes:
- \usepackage[dutch]{babel}
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \fancyfoot[LE,RO]{this is a fancy foot}
- \usepackage{dcolumn}
- \usepackage{here}
- \usepackage{longtable}
- \usepackage{caption}
- \captionsetup{skip=2pt,labelsep=space,justification=justified,singlelinecheck=off}
subtitle: test test test
fontsize: 12pt
---
# start
# second
```{r results="asis",eval=TRUE,echo=FALSE,message=FALSE, error=FALSE, warning=FALSE, comment = NA,fig.height=4}
cat("and here some R")
```
# appendix A
# appandix B
【问题讨论】:
-
你的意思是你想要他们字母而不是编号?您能展示一下您希望目录的外观吗?
-
@BenBolker,不,我不想给他们写字母。我已经有了答案,但我理解你的问题。下次我也会尝试做出更喜欢的结果。
标签: r latex pdf-generation r-markdown