mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 21:55:29 +00:00
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
This commit is contained in:
parent
5fd9f870b2
commit
be8cf7c98c
@ -612,7 +612,7 @@ def checkConverterEntries():
|
||||
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 "%%" ""'''])
|
||||
#
|
||||
|
10
lib/scripts/lyxsweave.R
Normal file
10
lib/scripts/lyxsweave.R
Normal file
@ -0,0 +1,10 @@
|
||||
# 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)
|
Loading…
Reference in New Issue
Block a user