Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-20 Thread Scott Kostyshak
On Fri, Oct 19, 2012 at 5:11 AM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 18/10/2012 16:19, Scott Kostyshak a écrit : The unchangedConverter.log is here (error): http://paste.debian.net/201557/ So the error happens on export to latex because the encoding is not specified. The

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-20 Thread Yihui Xie
I think it should be easy to ignore the encoding argument if it does not exist, but the problem that confuses me is why importing Rnw is involved with lyxsweave.R or lyxknitr.R. I mean Rnw should be treated as a normal TeX document (the R code should not be executed through Sweave or knitr),

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-20 Thread Scott Kostyshak
On Sat, Oct 20, 2012 at 6:17 PM, Yihui Xie x...@yihui.name wrote: I think it should be easy to ignore the encoding argument if it does not exist, but the problem that confuses me is why importing Rnw is involved with lyxsweave.R or lyxknitr.R. I mean Rnw should be treated as a normal TeX

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-20 Thread Scott Kostyshak
On Fri, Oct 19, 2012 at 5:11 AM, Jean-Marc Lasgouttes wrote: > Le 18/10/2012 16:19, Scott Kostyshak a écrit : > >> The unchangedConverter.log is here (error): >> http://paste.debian.net/201557/ > > > So the error happens on export to latex because the encoding is not >

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-20 Thread Yihui Xie
I think it should be easy to ignore the encoding argument if it does not exist, but the problem that confuses me is why importing Rnw is involved with lyxsweave.R or lyxknitr.R. I mean Rnw should be treated as a normal TeX document (the R code should not be executed through Sweave or knitr),

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-20 Thread Scott Kostyshak
On Sat, Oct 20, 2012 at 6:17 PM, Yihui Xie wrote: > I think it should be easy to ignore the encoding argument if it does > not exist, but the problem that confuses me is why importing Rnw is > involved with lyxsweave.R or lyxknitr.R. I mean Rnw should be treated > as a normal TeX

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-19 Thread Jean-Marc Lasgouttes
Le 18/10/2012 19:11, Yihui Xie a écrit : Import Rnw is something I was asked long time ago but have not figured out how it works. It seems the Sweave/knitr module is called but really should not be, because these modules are only responsible for Rnw--TeX, not for Rnw--LyX. Or should they?

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-19 Thread Jean-Marc Lasgouttes
Le 18/10/2012 15:57, Kayvan Sylvan a écrit : The [[foo]] notation is noweb syntax for a reference to something that is defined elsewhere. By putting it in an ERT we ensure that it ends up in the noweb file unaltered. I was wondering whether this could clash with Sweave documents, which do not

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-19 Thread Jean-Marc Lasgouttes
Le 18/10/2012 16:19, Scott Kostyshak a écrit : The unchangedConverter.log is here (error): http://paste.debian.net/201557/ So the error happens on export to latex because the encoding is not specified. I think I do not understand what you do exactly. Does the same happen with Sweave (I do

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-19 Thread Kayvan Sylvan
I can put some time into this next week. Yes, I noticed (and very much appreciate) that you don't need to use CTRL-return anymore. Best regards, Kayvan On Oct 19, 2012, at 2:00, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 18/10/2012 15:57, Kayvan Sylvan a écrit : The [[foo]] notation

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-19 Thread Jean-Marc Lasgouttes
Le 18/10/2012 19:11, Yihui Xie a écrit : Import Rnw is something I was asked long time ago but have not figured out how it works. It seems the Sweave/knitr module is called but really should not be, because these modules are only responsible for Rnw-->TeX, not for Rnw-->LyX. Or should they?

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-19 Thread Jean-Marc Lasgouttes
Le 18/10/2012 15:57, Kayvan Sylvan a écrit : The [[foo]] notation is noweb syntax for a reference to something that is defined elsewhere. By putting it in an ERT we ensure that it ends up in the noweb file unaltered. I was wondering whether this could clash with Sweave documents, which do not

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-19 Thread Jean-Marc Lasgouttes
Le 18/10/2012 16:19, Scott Kostyshak a écrit : The unchangedConverter.log is here (error): http://paste.debian.net/201557/ So the error happens on export to latex because the encoding is not specified. I think I do not understand what you do exactly. Does the same happen with Sweave (I do

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-19 Thread Kayvan Sylvan
I can put some time into this next week. Yes, I noticed (and very much appreciate) that you don't need to use CTRL-return anymore. Best regards, Kayvan On Oct 19, 2012, at 2:00, Jean-Marc Lasgouttes wrote: > Le 18/10/2012 15:57, Kayvan Sylvan a écrit : >> The [[foo]]

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-18 Thread Jean-Marc Lasgouttes
Le 18/10/12 01:49, Scott Kostyshak a écrit : Stupid question; where is importation of knitr files defined in converters? Rnw (knitr) - latex (plain) The converter is currently: Rscript --verbose --no-save --no-restore $$s/scripts/lyxknitr.R $$p$$i $$p$$o $$e $$r When I change this to the

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-18 Thread Scott Kostyshak
On Thu, Oct 18, 2012 at 3:46 AM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 18/10/12 01:49, Scott Kostyshak a écrit : Stupid question; where is importation of knitr files defined in converters? Rnw (knitr) - latex (plain) The converter is currently: Rscript --verbose --no-save

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-18 Thread Jean-Marc Lasgouttes
Le 18/10/2012 14:02, Scott Kostyshak a écrit : Ah, then I don't understand how LyX handles imports. The Customization manual does not talk about importing. Doesn't LyX use the converters to convert the file to LaTeX and then use tex2lyx to import the tex file? Normally, the importation is done

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-18 Thread Scott Kostyshak
On Thu, Oct 18, 2012 at 8:18 AM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 18/10/2012 14:02, Scott Kostyshak a écrit : Ah, then I don't understand how LyX handles imports. The Customization manual does not talk about importing. Doesn't LyX use the converters to convert the file to

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-18 Thread Jean-Marc Lasgouttes
Le 18/10/2012 14:55, Scott Kostyshak a écrit : The old way this noweb mode works is 1/ ensure that the class name is literate-something (now it would be ensure that some module is loaded and the module name should be passed to tex2lyx) 2/ when a layout starts with , change it to a layout with

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-18 Thread Kayvan Sylvan
The [[foo]] notation is noweb syntax for a reference to something that is defined elsewhere. By putting it in an ERT we ensure that it ends up in the noweb file unaltered. On Oct 18, 2012, at 5:18, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 18/10/2012 14:02, Scott Kostyshak a écrit :

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-18 Thread Scott Kostyshak
On Thu, Oct 18, 2012 at 9:11 AM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 18/10/2012 14:55, Scott Kostyshak a écrit : The old way this noweb mode works is 1/ ensure that the class name is literate-something (now it would be ensure that some module is loaded and the module name

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-18 Thread Yihui Xie
Import Rnw is something I was asked long time ago but have not figured out how it works. It seems the Sweave/knitr module is called but really should not be, because these modules are only responsible for Rnw--TeX, not for Rnw--LyX. Or should they? Ideally LyX should be able to handle the TeX

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-18 Thread Jean-Marc Lasgouttes
Le 18/10/12 01:49, Scott Kostyshak a écrit : Stupid question; where is importation of knitr files defined in converters? Rnw (knitr) -> latex (plain) The converter is currently: Rscript --verbose --no-save --no-restore $$s/scripts/lyxknitr.R $$p$$i $$p$$o $$e $$r When I change this to the

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-18 Thread Scott Kostyshak
On Thu, Oct 18, 2012 at 3:46 AM, Jean-Marc Lasgouttes wrote: > Le 18/10/12 01:49, Scott Kostyshak a écrit : > >>> Stupid question; where is importation of knitr files defined in >>> converters? >> >> >> Rnw (knitr) -> latex (plain) >> The converter is currently: >> Rscript

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-18 Thread Jean-Marc Lasgouttes
Le 18/10/2012 14:02, Scott Kostyshak a écrit : Ah, then I don't understand how LyX handles imports. The Customization manual does not talk about importing. Doesn't LyX use the converters to convert the file to LaTeX and then use tex2lyx to import the tex file? Normally, the importation is done

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-18 Thread Scott Kostyshak
On Thu, Oct 18, 2012 at 8:18 AM, Jean-Marc Lasgouttes wrote: > Le 18/10/2012 14:02, Scott Kostyshak a écrit : > >> Ah, then I don't understand how LyX handles imports. The Customization >> manual does not talk about importing. Doesn't LyX use the converters >> to convert the

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-18 Thread Jean-Marc Lasgouttes
Le 18/10/2012 14:55, Scott Kostyshak a écrit : The old way this "noweb mode" works is 1/ ensure that the class name is literate-something (now it would be ensure that some module is loaded and the module name should be passed to tex2lyx) 2/ when a layout starts with <<, change it to a layout

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-18 Thread Kayvan Sylvan
The [[foo]] notation is noweb syntax for a reference to something that is defined elsewhere. By putting it in an ERT we ensure that it ends up in the noweb file unaltered. On Oct 18, 2012, at 5:18, Jean-Marc Lasgouttes wrote: > Le 18/10/2012 14:02, Scott Kostyshak a écrit :

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-18 Thread Scott Kostyshak
On Thu, Oct 18, 2012 at 9:11 AM, Jean-Marc Lasgouttes wrote: > Le 18/10/2012 14:55, Scott Kostyshak a écrit : > >>> The old way this "noweb mode" works is >>> 1/ ensure that the class name is literate-something (now it would be >>> ensure >>> that some module is loaded and the

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-18 Thread Yihui Xie
Import Rnw is something I was asked long time ago but have not figured out how it works. It seems the Sweave/knitr module is called but really should not be, because these modules are only responsible for Rnw-->TeX, not for Rnw-->LyX. Or should they? Ideally LyX should be able to handle the TeX

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-17 Thread Jean-Marc Lasgouttes
Le 17/10/12 06:09, Scott Kostyshak a écrit : I have this problem on master and 2.0.x. An empty $$e variable is being passed to the converter script on import because the document is not open yet: command = subst(command, token_encoding, buffer ? buffer-params().encoding().iconvName() :

Re: $$e not set on import -- import of .Rnw (knitr) fails

2012-10-17 Thread Scott Kostyshak
On Wed, Oct 17, 2012 at 6:52 PM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 17/10/12 06:09, Scott Kostyshak a écrit : I have this problem on master and 2.0.x. An empty $$e variable is being passed to the converter script on import because the document is not open yet: command =

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-17 Thread Jean-Marc Lasgouttes
Le 17/10/12 06:09, Scott Kostyshak a écrit : I have this problem on master and 2.0.x. An empty $$e variable is being passed to the converter script on import because the document is not open yet: command = subst(command, token_encoding, buffer ? buffer->params().encoding().iconvName() :

Re: $$e not set on import --> import of .Rnw (knitr) fails

2012-10-17 Thread Scott Kostyshak
On Wed, Oct 17, 2012 at 6:52 PM, Jean-Marc Lasgouttes wrote: > Le 17/10/12 06:09, Scott Kostyshak a écrit : > >> I have this problem on master and 2.0.x. >> >> An empty $$e variable is being passed to the converter script on >> import because the document is not open yet: >>

$$e not set on import -- import of .Rnw (knitr) fails

2012-10-16 Thread Scott Kostyshak
I have this problem on master and 2.0.x. An empty $$e variable is being passed to the converter script on import because the document is not open yet: command = subst(command, token_encoding, buffer ? buffer-params().encoding().iconvName() : string()); Should $$e be set to the default encoding

$$e not set on import --> import of .Rnw (knitr) fails

2012-10-16 Thread Scott Kostyshak
I have this problem on master and 2.0.x. An empty $$e variable is being passed to the converter script on import because the document is not open yet: command = subst(command, token_encoding, buffer ? buffer->params().encoding().iconvName() : string()); Should $$e be set to the default encoding