【问题标题】:Using pandoc-crossref with R bookdown将 pandoc-crossref 与 R bookdown 一起使用
【发布时间】:2018-04-12 06:10:45
【问题描述】:

可以在 bookdown 中使用 pandoc-crossref 吗?

我尝试将 yaml 标头更改为:

output: 
    bookdown::tufte_book2:
        toc: yes
        highlight: tango
        pandoc_args: -F /usr/local/bin/pandoc-crossref

应该将过滤器传递给pandoc,但我收到错误:

pandoc: Error running filter  pandoc-crossref:
Could not find executable ' pandoc-crossref'.

上述错误没有意义,因为我输入了正确的路径。 bookdown 使用的是什么类型的 env,排除了对过滤器文件的访问?

【问题讨论】:

  • bookdown 输出格式已经包含交叉引用。你想达到什么目的?
  • 如何引用图以及如何引用节?
  • @KevinArseneau 在 Word 输出中获得方程式编号的这个问题的答案会很有用。谢谢!

标签: r bookdown


【解决方案1】:

这是一个例子

---
output: bookdown::html_document2
---

# Section name {#id}

```{r pressure, echo=FALSE, fig.cap='test plot'}
plot(pressure)
```

Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot. To cross-reference the figure, use `\@ref(fig:pressure)` to produce Figure \@ref(fig:pressure). All this is found within the section \@ref(id).

产生...

官方文档见https://bookdown.org/yihui/bookdown/figures.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-08
    • 2017-03-26
    • 1970-01-01
    • 1970-01-01
    • 2013-08-26
    相关资源
    最近更新 更多