【发布时间】:2020-05-09 02:59:31
【问题描述】:
advice in bookdown for formatting long figure captions and other text is to create a reference,
(ref:foo) Title with _formatting_.
上下各空一行,然后在图题中引用这个。
但是,在编织到 pdf 时,我无法像 example 那样为 theorem environments 工作。
可重现的例子:
---
title: "Table test"
output:
bookdown::pdf_document2:
keep_tex: true
---
# Test
(ref:foo) This is a test.
```{exercise revision1, echo = T, name="(ref:foo)"}
Some exercise description.
```
编成 pdf 格式时:
rmarkdown::render("test.rmd")
结果,
Exercise 1.1 ((ref:foo)). Some exercise description.
【问题讨论】:
-
您能告诉我们您文件的 YAML 部分吗?我认为您需要设置
output: bookdown::pdf_document2。
标签: r r-markdown knitr bookdown