# knitr_refs: Reference for Tables and Figures in .Rmd files. In mcfanda/StatWriter: Writer helper

## Description

Allow to refer to tables and figures in .Rmd files compiled with rmarkdown-package for LaTex (pdf).

## Usage

 1 knitr_refs() 

## Details

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

## Author(s)

Marcello Gallucci

## Examples

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

mcfanda/StatWriter documentation built on May 22, 2017, 1:11 a.m.