![](/img/trans.png)
[英]Relationship between R Markdown, Knitr, Pandoc, and Bookdown
[英]Using pandoc-crossref with R bookdown
是否可以在 bookdown 中使用 pandoc-crossref?
我试图将 yaml header 更改为:
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 使用什么样的环境,排除了对过滤器文件的访问?
这是一个例子
---
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 。
当我尝试将数字放入 Word 文件中的方程式时,我遇到了类似的问题( SO question )。 我得到了同样的错误Could not find executable 'pandoc-crossref'
。
我的 RStudio 安装(在 Windows 上)没有pandoc-crossref
。 这是我所做的:
pandoc-crossref
。pandoc.exe
的路径:rmarkdown::find_pandoc()
pandoc-crossref.exe
放在我进入 (2) 的文件夹中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.