Commit Graph

13 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
d6246362e6 Fix #8019 (from yihui)
* avoid creation of file Rplots.pdf in document file
* find correctly Sweave.sty on old R versions


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40703 a592a061-630c-0410-9148-cb99ea01b6c8
2012-02-02 22:30:38 +00:00
Jean-Marc Lasgouttes
4f176ef89b Fix #7876: Problems with special characters when using sweave with xetex
When R version is >= 2.13.1, Sweave handles natively encodings. Therefore, we have to remove our own kludge.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40135 a592a061-630c-0410-9148-cb99ea01b6c8
2011-11-04 22:39:30 +00:00
Jean-Marc Lasgouttes
c9d9bde0b2 Sweave support cleanup (patch from yihui, see #7555)
http://www.lyx.org/trac/ticket/7555

This part is a simple cleanup:

 * rename variables to start with a dot
 * reset encoding after running sweave
 * improve on-screen display of code chunks



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39506 a592a061-630c-0410-9148-cb99ea01b6c8
2011-08-23 09:52:21 +00:00
Jean-Marc Lasgouttes
ebb85745a9 When Sweave.sty is not available to LaTeX, copy it in the temp directory instead of using the stylepath argument of Sweave(). This is better under windows, where the path to Sweave.sty may contain spaces.
Add Yihui Xie as co-author.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39140 a592a061-630c-0410-9148-cb99ea01b6c8
2011-06-20 10:59:23 +00:00
Jean-Marc Lasgouttes
ddd76c6b15 Tentative fix for bug #7545. Please test.
The problem is with sweave when the temp file path contains spaces. This patch adds some postprocessing that removes the reference to the temp dir.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39070 a592a061-630c-0410-9148-cb99ea01b6c8
2011-06-15 15:51:02 +00:00
Jean-Marc Lasgouttes
c820e4f8e2 Better fix for #7551. We can now handle several dots in the file name.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39068 a592a061-630c-0410-9148-cb99ea01b6c8
2011-06-15 14:51:50 +00:00
Jean-Marc Lasgouttes
7854cc96ed Fix bug #7552: Use of expression() in plot R command fails
This is dur to the use of the null device, which causes problems. Note that, as a consequence, a Rplots.pdf file is created in the document directory.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38896 a592a061-630c-0410-9148-cb99ea01b6c8
2011-05-31 10:44:11 +00:00
Jean-Marc Lasgouttes
dc217ed08c 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
2011-05-31 10:37:09 +00:00
Jean-Marc Lasgouttes
0a65e96ed3 Improvements to lyx sweave support
- use a null device to avoid the extra Rplots.pdf file created by Sweave
- use directly setwd() instead of in the preamble of the module
- add lots of comments.

This finally fixes ticket #6623.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38359 a592a061-630c-0410-9148-cb99ea01b6c8
2011-04-13 10:04:20 +00:00
Jean-Marc Lasgouttes
edd51121d8 Almost finish fixing bug http://www.lyx.org/trac/ticket/6623
Now we specify the output file for sweave explicitely for robustness reasons.
We also specify prefix.string (in order to have the temp files generated in lyx tmp directory.

The only annoying file now is Rplots.pdf, but I am not sure why it is generated... 


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37984 a592a061-630c-0410-9148-cb99ea01b6c8
2011-03-21 14:48:22 +00:00
Jean-Marc Lasgouttes
425f46bea5 * add an extra parameter to lyxsweave.py that tells the document directory
and use it to be able to read data files in there (bug #6623). It is probably possible to use sweave hooks instead of the module preamble. Moreover, I want to investigate the use of prefix.string argument of sweave to make sure that the output files end up in the tmp dir.
  * be more subtle in the way to change default encoding to handle the case where a data file that is read does not use the same encoding as the .rnw file.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36850 a592a061-630c-0410-9148-cb99ea01b6c8
2010-12-12 21:25:57 +00:00
Jean-Marc Lasgouttes
9ebd4405cf Make sweave process files with the correct encoding (#6625).
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
2010-10-22 07:51:39 +00:00
Jean-Marc Lasgouttes
be8cf7c98c 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
2010-10-21 17:02:05 +00:00