2017-10-31 19 views
0

bookdown에 pandoc-crossref를 사용할 수 있습니까? R bookdown과 함께 pandoc-crossref 사용

나는에 YAML 헤더 변경 시도 : pandoc에 필터를 통과해야

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

을,하지만 난 오류 얻을 : 같은

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

위의 오류가 이해가되지 않습니다를 올바른 경로를 입력했습니다. 어떤 종류의 env가 bookdown을 사용하고 있는데, 필터 파일에 대한 액세스가 차단되어 있습니까?

+1

'bookdown' 출력 형식에는 이미 상호 참조가 포함되어 있습니다. 무엇을 성취하려고합니까? –

+0

그림을 참조하는 방법과 섹션을 참조하는 방법은 무엇입니까? –

답변

2

여기

enter image description here

는 공식 문서에 대한 https://bookdown.org/yihui/bookdown/figures.html보기 ... 예를 들어 생산

--- 
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). 

입니다.