figure captions, references using knitr and markdown to html

前端 未结 5 796
迷失自我
迷失自我 2020-12-05 04:00

I\'m writing an Rmd file, to be processed by knitr into HTML. It contains some R chunks that generate figures, which get stored as data URIs in HTML.

1) How do I add

5条回答
  •  一向
    一向 (楼主)
    2020-12-05 04:48

    I'm late to the party, but I wanted to mention a small package I recently built to do figure captioning and cross-referencing with knitr. It is called kfigr and you can install it using devtools::install_github('mkoohafkan/kfigr'). It is still in active development but the main functionality is there. Be sure to check out the vignette, it shows some usage examples and defines some hooks for figure captions and anchors (I may later choose to have the package import knitr and define those hooks on load).

    EDIT: kfigr is now available on CRAN!

提交回复
热议问题