-
-
Notifications
You must be signed in to change notification settings - Fork 218
Modifying an Rcpp Vignette
James J Balamuta edited this page Jul 16, 2016
·
2 revisions
After making changes to the vignettes, please make sure to run them! In order to create the vignettes, you will need to use the following script:
#!/usr/bin/Rscript
## use given argument(s) as target files, or else default to .Rnw files in directory
files <- if (length(commandArgs(TRUE)) == 0) dir(pattern="*.Rnw") else commandArgs(TRUE)
## convert all files from Rnw to pdf using the highlight driver
invisible(sapply(files, function(srcfile) {
Sweave(srcfile, driver=highlight::HighlightWeaveLatex(boxes=TRUE))
tools::texi2pdf(gsub(".Rnw", ".tex", srcfile))
tools::texi2pdf(gsub(".Rnw", ".tex", srcfile), texi2dvi="pdflatex")
}))