From dc217ed08cf3da0f599010b9bacb4a95b46e3614 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 31 May 2011 10:37:09 +0000 Subject: [PATCH] Fix bug #7551: Inclusion "." in filename creates LaTeX error sweave graphic generation This is different from the fix proposed in bug #7555, because we have to catter for dots in temp dir path. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38895 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/scripts/lyxsweave.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scripts/lyxsweave.R b/lib/scripts/lyxsweave.R index 3ffc78809d..32979c22af 100644 --- a/lib/scripts/lyxsweave.R +++ b/lib/scripts/lyxsweave.R @@ -30,7 +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]) +ls.pr <- gsub('\\.([^/]*)$', '-\\1', 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/ -- 2.39.2