lyx_mirror/lib/scripts/lyxsweave.R
Jean-Marc Lasgouttes be8cf7c98c Introduce helper script for Sweave. The first benefit is that
Sweave.sty path is hardcoded if LaTeX cannot find it.

More to come.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35750 a592a061-630c-0410-9148-cb99ea01b6c8
2010-10-21 17:02:05 +00:00

11 lines
302 B
R

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