1 # Wrapper around Sweave that sets up some things for LyX
2 # argument 1 is the file name
4 args <- commandArgs(trailingOnly=T)
6 # check whether Sweave.sty is seen by LaTeX
7 sweavesty <- system("kpsewhich Sweave.sty", intern=T, ignore.stderr=T)
8 sp <- (length(sweavesty) == 0)
10 Sweave(args[1], stylepath=sp)