Description Usage Details Value Author(s) Examples
View source: R/knitr_functions.R
Allow to refer to tables and figures in .Rmd files compiled with rmarkdown-package
for LaTex (pdf).
1 |
Simply call the function without arguments in a r code chunk at the begining of the file. The function will take care of the problem that rmarkdown does not allow to make references to Table and Figures number. The only constrain is that the figure should have a fig.cap= option filled with some text and a label= option set. The reference in the text ( \ref{} ) should point to the value of the label= set in the r code chunk.
a string
Marcello Gallucci
1 2 3 4 5 6 7 8 9 10 11 12 13 | # ```{r, results='hide',echo=FALSE,error=FALSE, warning=FALSE,message=FALSE }
#
# library(knitr)
# library(statwriter)
# knit_refs()
# ```
#
# There is a nice graph in Fig. \ref{fig:one}
#
# ```{r label=fig:one, ,results='tex', fig.cap="A nice picture"}
#
# plot(1:3)
# ```
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.