mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 14:29:21 +00:00
9ebd4405cf
The required the introduction of the new converter token $$e, that holds the iconv name of the latex file encoding. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35772 a592a061-630c-0410-9148-cb99ea01b6c8
16 lines
468 B
R
16 lines
468 B
R
# Wrapper around Sweave that sets up some things for LyX
|
|
# argument 1 is the file name
|
|
# argument 2 is the iconv name for the encoding of the file
|
|
|
|
ls.args <- commandArgs(trailingOnly=T)
|
|
|
|
# check whether Sweave.sty is seen by LaTeX
|
|
ls.sweavesty <- system("kpsewhich Sweave.sty", intern=T, ignore.stderr=T)
|
|
ls.sp <- (length(ls.sweavesty) == 0)
|
|
|
|
# set default encoding to the one of the file
|
|
options(encoding=ls.args[2])
|
|
|
|
#run sweave
|
|
Sweave(ls.args[1], stylepath=ls.sp)
|