Learn R Programming

ucbthesis (version 1.0)

rnw2pdf: Render an Rnw file into a PDF

Description

Use knitr to convert an Rnw file into xelatex (and biber) rendered PDF.

Usage

rnw2pdf(file = "thesis.Rnw", biber = TRUE, saveTmpFiles = FALSE)

Arguments

file
the location and name of the Rnw file to be rendered.
biber
logical flag indicating if biber (or biblatex) backend should be run after xelatex is called.
saveTmpFiles
logical flag indicating if intermediary files should be kept after PDF file is created. If FALSE the files are deleted.

Value

The name of the xelatex rendered PDF.

Details

This is just a sequence of system calls that runs knitr to turn the .Rnw into a .tex, and then calls xelatex (and biber) a few more times to make sure citations and cross-references are correct.

Temporary files (e.g. .tex's, .log's, .aux's, etc.) are stored in a temporary (sub)directory, tmp/.

Examples

Run this code
## Not run: 
# setwd("inst/knitr")
# rnw2pdf()
# ## End(Not run)

Run the code above in your browser using DataLab