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
rc_entry = [r'''\converter literate latex "%%" ""
\converter literate pdflatex "%%" ""'''])
#
- checkProg('a Sweave -> LaTeX converter', ['R CMD Sweave $$i'],
+ checkProg('a Sweave -> LaTeX converter', ['Rscript --vanilla $$s/scripts/lyxsweave.R $$i'],
rc_entry = [r'''\converter sweave latex "%%" ""
\converter sweave pdflatex "%%" ""'''])
#
--- /dev/null
+# 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)