将 pandoc-crossref 与 R 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).
产生...
是否可以在 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).
产生...