knitr fig.cap with latexdown语法到latex

时间:2016-12-10 14:36:14

标签: r knitr r-markdown pandoc bookdown

当我转换以下R降价

```{r UCSC, fig.cap="**My** [UCSC](http://www.text.com)"}
knitr::include_graphics("ucsc.png")
```

到乳胶,它会生成

\begin{figure}
\includegraphics{"ucsc.png"}
\caption{**My** [UCSC](http://www.text.com)}
\end{figure}

降价语法转换为乳胶代码\href{http://www.text.com}{UCSC}

如何配置在fig.cap中传输markdown语法以更正乳胶代码?

bookdown(文本参考)文档中找到了解决方案。

A normal paragraph.

(ref:foo) A scatterplot of the data `cars` using **base** R graphics. 

```{r foo, fig.cap='(ref:foo)'}
plot(cars)  # a scatterplot
```

谢谢!

0 个答案:

没有答案