使用(ref:foo)格式化书下定理环境标题(例如,例子)

问题描述 投票:1回答:1

咨询中 bookdown 用于格式化长图标题和其他文字的方法是创建一个参考文献。,

(ref:foo) Title with _formatting_.

上面和下面都是空行,然后在图题中引用这个。

我无法让这个工作对 定理环境 喜欢 example,然而,当编织到pdf。

可复制的例子。

---
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.
latex knitr bookdown caption
1个回答
0
投票

这是一个bug下订刚好 Github上。现在,你可以试试开发版的 下订:

remotes::install_github(c('yihui/knitr', 'rstudio/bookdown'))
© www.soinside.com 2019 - 2024. All rights reserved.