]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/lyxsweave.R
Fix bug #7552: Use of expression() in plot R command fails
[lyx.git] / lib / scripts / lyxsweave.R
index 3ffc78809d556712528b2e5f489c21fee4feb0f9..bdc3d500d21b862d9863a59e5b51d95aaf914518 100644 (file)
@@ -30,11 +30,7 @@ options(encoding=ls.args[3])
 setwd(ls.args[4])
 
 # this is passed as a prefix.string to tell where temporary files should go
-ls.pr <- sub("\\.tex$", "", ls.args[2])
-
-# Replace the default pdf device by the null device (tip from Yihui Xie)
-# See: http://yihui.name/en/2010/12/a-special-graphics-device-in-r-the-null-device/ 
-.Call("R_GD_nullDevice", PACKAGE = "grDevices")
+ls.pr <- gsub('\\.([^/]*)$', '-\\1', sub("\\.tex$", "", ls.args[2]))
 
 
 # finally run sweave