Re: Weird space in Unicode (utf8)

2015-01-16 Thread Yihui Xie
It is a known issue without a fix yet:
http://comments.gmane.org/gmane.editors.lyx.devel/145465

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name

On Fri, Jan 16, 2015 at 10:27 AM, Xin Wu wuxin.xid...@gmail.com wrote:

 Hi, all,
 I am using LyX 2.1.2.2 on Macbook pro for a Chinese report. I found there are 
 some weird space in the editor when some English words and Chinese characters 
 come together (see the attached screenshot, the space after XeTeX). Do you 
 guys happen to know how to fix this?

 cheers,
 Xin


Re: Weird space in Unicode (utf8)

2015-01-16 Thread Yihui Xie
I have not checked it yet. Actually I have not built LyX from source
for really long time :) In case anyone want to test the dev version,
you can grab some Chinese characters and test this issue by yourself,
e.g., from http://zh.wikipedia.org/wiki/Wikipedia:%E5%85%B3%E4%BA%8E

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name


On Fri, Jan 16, 2015 at 11:59 AM, Liviu Andronic landronim...@gmail.com wrote:
 On Fri, Jan 16, 2015 at 5:38 PM, Yihui Xie x...@yihui.name wrote:
 It is a known issue without a fix yet:
 http://comments.gmane.org/gmane.editors.lyx.devel/145465

 Have you checked if the 2.2dev master addresses this? JMarc has
 recently pushed significant changes to these parts of the code, and
 perhaps something got inadvertently fixed...


 Regards,
 Liviu

 PS On Ubuntu you have daily devel builds:
 https://launchpad.net/~lyx-devel/+archive/ubuntu/daily




 Regards,
 Yihui
 --
 Yihui Xie xieyi...@gmail.com
 Web: http://yihui.name

 On Fri, Jan 16, 2015 at 10:27 AM, Xin Wu wuxin.xid...@gmail.com wrote:

 Hi, all,
 I am using LyX 2.1.2.2 on Macbook pro for a Chinese report. I found there 
 are some weird space in the editor when some English words and Chinese 
 characters come together (see the attached screenshot, the space after 
 XeTeX). Do you guys happen to know how to fix this?

 cheers,
 Xin



 --
 Do you think you know what math is?
 http://www.ideasroadshow.com/issues/ian-stewart-2013-08-02
 Or what it means to be intelligent?
 http://www.ideasroadshow.com/issues/john-duncan-2013-08-30
 Think again:
 http://www.ideasroadshow.com/library


Re: Weird space in Unicode (utf8)

2015-01-16 Thread Yihui Xie
It is a known issue without a fix yet:
http://comments.gmane.org/gmane.editors.lyx.devel/145465

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name

On Fri, Jan 16, 2015 at 10:27 AM, Xin Wu wuxin.xid...@gmail.com wrote:

 Hi, all,
 I am using LyX 2.1.2.2 on Macbook pro for a Chinese report. I found there are 
 some weird space in the editor when some English words and Chinese characters 
 come together (see the attached screenshot, the space after XeTeX). Do you 
 guys happen to know how to fix this?

 cheers,
 Xin


Re: Weird space in Unicode (utf8)

2015-01-16 Thread Yihui Xie
I have not checked it yet. Actually I have not built LyX from source
for really long time :) In case anyone want to test the dev version,
you can grab some Chinese characters and test this issue by yourself,
e.g., from http://zh.wikipedia.org/wiki/Wikipedia:%E5%85%B3%E4%BA%8E

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name


On Fri, Jan 16, 2015 at 11:59 AM, Liviu Andronic landronim...@gmail.com wrote:
 On Fri, Jan 16, 2015 at 5:38 PM, Yihui Xie x...@yihui.name wrote:
 It is a known issue without a fix yet:
 http://comments.gmane.org/gmane.editors.lyx.devel/145465

 Have you checked if the 2.2dev master addresses this? JMarc has
 recently pushed significant changes to these parts of the code, and
 perhaps something got inadvertently fixed...


 Regards,
 Liviu

 PS On Ubuntu you have daily devel builds:
 https://launchpad.net/~lyx-devel/+archive/ubuntu/daily




 Regards,
 Yihui
 --
 Yihui Xie xieyi...@gmail.com
 Web: http://yihui.name

 On Fri, Jan 16, 2015 at 10:27 AM, Xin Wu wuxin.xid...@gmail.com wrote:

 Hi, all,
 I am using LyX 2.1.2.2 on Macbook pro for a Chinese report. I found there 
 are some weird space in the editor when some English words and Chinese 
 characters come together (see the attached screenshot, the space after 
 XeTeX). Do you guys happen to know how to fix this?

 cheers,
 Xin



 --
 Do you think you know what math is?
 http://www.ideasroadshow.com/issues/ian-stewart-2013-08-02
 Or what it means to be intelligent?
 http://www.ideasroadshow.com/issues/john-duncan-2013-08-30
 Think again:
 http://www.ideasroadshow.com/library


Re: Weird space in Unicode (utf8)

2015-01-16 Thread Yihui Xie
It is a known issue without a fix yet:
http://comments.gmane.org/gmane.editors.lyx.devel/145465

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Web: http://yihui.name

On Fri, Jan 16, 2015 at 10:27 AM, Xin Wu <wuxin.xid...@gmail.com> wrote:
>
> Hi, all,
> I am using LyX 2.1.2.2 on Macbook pro for a Chinese report. I found there are 
> some weird space in the editor when some English words and Chinese characters 
> come together (see the attached screenshot, the space after XeTeX). Do you 
> guys happen to know how to fix this?
>
> cheers,
> Xin


Re: Weird space in Unicode (utf8)

2015-01-16 Thread Yihui Xie
I have not checked it yet. Actually I have not built LyX from source
for really long time :) In case anyone want to test the dev version,
you can grab some Chinese characters and test this issue by yourself,
e.g., from http://zh.wikipedia.org/wiki/Wikipedia:%E5%85%B3%E4%BA%8E

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Web: http://yihui.name


On Fri, Jan 16, 2015 at 11:59 AM, Liviu Andronic <landronim...@gmail.com> wrote:
> On Fri, Jan 16, 2015 at 5:38 PM, Yihui Xie <x...@yihui.name> wrote:
>> It is a known issue without a fix yet:
>> http://comments.gmane.org/gmane.editors.lyx.devel/145465
>>
> Have you checked if the 2.2dev master addresses this? JMarc has
> recently pushed significant changes to these parts of the code, and
> perhaps something got inadvertently fixed...
>
>
> Regards,
> Liviu
>
> PS On Ubuntu you have daily devel builds:
> https://launchpad.net/~lyx-devel/+archive/ubuntu/daily
>
>
>
>
>> Regards,
>> Yihui
>> --
>> Yihui Xie <xieyi...@gmail.com>
>> Web: http://yihui.name
>>
>> On Fri, Jan 16, 2015 at 10:27 AM, Xin Wu <wuxin.xid...@gmail.com> wrote:
>>>
>>> Hi, all,
>>> I am using LyX 2.1.2.2 on Macbook pro for a Chinese report. I found there 
>>> are some weird space in the editor when some English words and Chinese 
>>> characters come together (see the attached screenshot, the space after 
>>> XeTeX). Do you guys happen to know how to fix this?
>>>
>>> cheers,
>>> Xin
>
>
>
> --
> Do you think you know what math is?
> http://www.ideasroadshow.com/issues/ian-stewart-2013-08-02
> Or what it means to be intelligent?
> http://www.ideasroadshow.com/issues/john-duncan-2013-08-30
> Think again:
> http://www.ideasroadshow.com/library


Re: WORKAROUND and BUG: Yosemite + LyX

2014-10-22 Thread Yihui Xie
Yes, this may solve some problems but not all. The PATH bug is still
there on Yosemite, and I see it can still bite me in LyX after I
reconfigured from the terminal. For the time being, the only reliable
solution seems to be starting LyX from the terminal. See more info at
http://stackoverflow.com/q/26491934/559676 (and the link in the
answer). Since this is a general problem on Yosemite, you might find
other apps are affected as well (as long as they launch sub processes
and call programs that are not in /bin:/usr/bin:/sbin:/usr/sbin). The
solution of starting apps from the terminal should apply to all of
them.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name


On Wed, Oct 22, 2014 at 4:06 AM, Rainer M Krug rai...@krugs.de wrote:
 THis seems to be a problem with paths and environmental variables passed
 to sub-processes (also mentiond on the R sig mac list): Yosemite seems
 to have implemented security mechanisms which do (to me) unknown things
 to paths and environmental variables.

 So, in a nutshell:

 1) If you do a reconfigure in LyX started from the icon / finder /
 spotlight, the reconfigure seems not to find the files needed, and does
 finish nearly immediately and does not creates an (empty?) configuration
 file

 2) If you start lyx from the terminal

 --8---cut here---start-8---
 /PATH/TO/LyX.app/Contents/MacOS/lyx
 --8---cut here---end---8---

 and reconfigure then, it is working.

 Workaround:
 Startt from terminal and reconfigure - after this everything seems to be
 working

 Solution:
 No idea, but I guess an update in LyX

 Hope this helps,

 Rainer


 Christopher Menzel chris.men...@gmail.com writes:

 Hal Kierstead wrote:
 I am trying to use LyX 2.1.2 with Yosemite, but review does not work
 for me.  I cannot even preview the help manuals.  I can export them
 to LaTex and then compile them with LaTex.  This must be some path
 problem, but I do not know how to deal with it.  Any help would be
 appreciated.

 Couple of very quick ideas:

 . Perhaps reconfiguring (Tools - reconfigure) might help.
 . If you aren't using the latest version of MacTeX
 http://tug.org/mactex/, consider upgrading.

 -chris


 --
 Rainer M. Krug
 email: Raineratkrugsdotde
 PGP: 0x0F52F982


Re: WORKAROUND and BUG: Yosemite + LyX

2014-10-22 Thread Yihui Xie
I do not use Mac OS X very often (I use it mostly for testing
purposes), so personally I do not care. It is easy to ditch Apple by
myself, but not all Apple users :( (Same thing for Windows)

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name


On Wed, Oct 22, 2014 at 11:47 AM, Liviu Andronic landronim...@gmail.com wrote:
 On Wed, Oct 22, 2014 at 6:10 PM, Yihui Xie x...@yihui.name wrote:
 Yes, this may solve some problems but not all. The PATH bug is still
 there on Yosemite, and I see it can still bite me in LyX after I
 reconfigured from the terminal. For the time being, the only reliable
 solution seems to be starting LyX from the terminal.

 Or ditching Apple altogether? :)

 Liviu


Re: WORKAROUND and BUG: Yosemite + LyX

2014-10-22 Thread Yihui Xie
Yes, this may solve some problems but not all. The PATH bug is still
there on Yosemite, and I see it can still bite me in LyX after I
reconfigured from the terminal. For the time being, the only reliable
solution seems to be starting LyX from the terminal. See more info at
http://stackoverflow.com/q/26491934/559676 (and the link in the
answer). Since this is a general problem on Yosemite, you might find
other apps are affected as well (as long as they launch sub processes
and call programs that are not in /bin:/usr/bin:/sbin:/usr/sbin). The
solution of starting apps from the terminal should apply to all of
them.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name


On Wed, Oct 22, 2014 at 4:06 AM, Rainer M Krug rai...@krugs.de wrote:
 THis seems to be a problem with paths and environmental variables passed
 to sub-processes (also mentiond on the R sig mac list): Yosemite seems
 to have implemented security mechanisms which do (to me) unknown things
 to paths and environmental variables.

 So, in a nutshell:

 1) If you do a reconfigure in LyX started from the icon / finder /
 spotlight, the reconfigure seems not to find the files needed, and does
 finish nearly immediately and does not creates an (empty?) configuration
 file

 2) If you start lyx from the terminal

 --8---cut here---start-8---
 /PATH/TO/LyX.app/Contents/MacOS/lyx
 --8---cut here---end---8---

 and reconfigure then, it is working.

 Workaround:
 Startt from terminal and reconfigure - after this everything seems to be
 working

 Solution:
 No idea, but I guess an update in LyX

 Hope this helps,

 Rainer


 Christopher Menzel chris.men...@gmail.com writes:

 Hal Kierstead wrote:
 I am trying to use LyX 2.1.2 with Yosemite, but review does not work
 for me.  I cannot even preview the help manuals.  I can export them
 to LaTex and then compile them with LaTex.  This must be some path
 problem, but I do not know how to deal with it.  Any help would be
 appreciated.

 Couple of very quick ideas:

 . Perhaps reconfiguring (Tools - reconfigure) might help.
 . If you aren't using the latest version of MacTeX
 http://tug.org/mactex/, consider upgrading.

 -chris


 --
 Rainer M. Krug
 email: Raineratkrugsdotde
 PGP: 0x0F52F982


Re: WORKAROUND and BUG: Yosemite + LyX

2014-10-22 Thread Yihui Xie
I do not use Mac OS X very often (I use it mostly for testing
purposes), so personally I do not care. It is easy to ditch Apple by
myself, but not all Apple users :( (Same thing for Windows)

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name


On Wed, Oct 22, 2014 at 11:47 AM, Liviu Andronic landronim...@gmail.com wrote:
 On Wed, Oct 22, 2014 at 6:10 PM, Yihui Xie x...@yihui.name wrote:
 Yes, this may solve some problems but not all. The PATH bug is still
 there on Yosemite, and I see it can still bite me in LyX after I
 reconfigured from the terminal. For the time being, the only reliable
 solution seems to be starting LyX from the terminal.

 Or ditching Apple altogether? :)

 Liviu


Re: WORKAROUND and BUG: Yosemite + LyX

2014-10-22 Thread Yihui Xie
Yes, this may solve some problems but not all. The PATH bug is still
there on Yosemite, and I see it can still bite me in LyX after I
reconfigured from the terminal. For the time being, the only reliable
solution seems to be starting LyX from the terminal. See more info at
http://stackoverflow.com/q/26491934/559676 (and the link in the
answer). Since this is a general problem on Yosemite, you might find
other apps are affected as well (as long as they launch sub processes
and call programs that are not in /bin:/usr/bin:/sbin:/usr/sbin). The
solution of starting apps from the terminal should apply to all of
them.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Web: http://yihui.name


On Wed, Oct 22, 2014 at 4:06 AM, Rainer M Krug <rai...@krugs.de> wrote:
> THis seems to be a problem with paths and environmental variables passed
> to sub-processes (also mentiond on the R sig mac list): Yosemite seems
> to have implemented security mechanisms which do (to me) unknown things
> to paths and environmental variables.
>
> So, in a nutshell:
>
> 1) If you do a reconfigure in LyX started from the icon / finder /
> spotlight, the reconfigure seems not to find the files needed, and does
> finish nearly immediately and does not creates an (empty?) configuration
> file
>
> 2) If you start lyx from the terminal
>
> --8<---cut here---start->8---
> /PATH/TO/LyX.app/Contents/MacOS/lyx
> --8<---cut here---end--->8---
>
> and reconfigure then, it is working.
>
> Workaround:
> Startt from terminal and reconfigure - after this everything seems to be
> working
>
> Solution:
> No idea, but I guess an update in LyX
>
> Hope this helps,
>
> Rainer
>
>
> Christopher Menzel <chris.men...@gmail.com> writes:
>
>> Hal Kierstead wrote:
>>> I am trying to use LyX 2.1.2 with Yosemite, but review does not work
>>> for me.  I cannot even preview the help manuals.  I can export them
>>> to LaTex and then compile them with LaTex.  This must be some path
>>> problem, but I do not know how to deal with it.  Any help would be
>>> appreciated.
>>
>> Couple of very quick ideas:
>>
>> . Perhaps reconfiguring (Tools -> reconfigure) might help.
>> . If you aren't using the latest version of MacTeX
>> <http://tug.org/mactex/>, consider upgrading.
>>
>> -chris
>>
>
> --
> Rainer M. Krug
> email: Rainerkrugsde
> PGP: 0x0F52F982


Re: WORKAROUND and BUG: Yosemite + LyX

2014-10-22 Thread Yihui Xie
I do not use Mac OS X very often (I use it mostly for testing
purposes), so personally I do not care. It is easy to ditch Apple by
myself, but not all Apple users :( (Same thing for Windows)

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Web: http://yihui.name


On Wed, Oct 22, 2014 at 11:47 AM, Liviu Andronic <landronim...@gmail.com> wrote:
> On Wed, Oct 22, 2014 at 6:10 PM, Yihui Xie <x...@yihui.name> wrote:
>> Yes, this may solve some problems but not all. The PATH bug is still
>> there on Yosemite, and I see it can still bite me in LyX after I
>> reconfigured from the terminal. For the time being, the only reliable
>> solution seems to be starting LyX from the terminal.
>>
> Or ditching Apple altogether? :)
>
> Liviu


Re: Problems with custom modules after upgrade to 2.1.0

2014-04-22 Thread Yihui Xie
Whenever you have got an error with the Rnw/knitr module, be sure to
look at View-Messages. The error message in the dialog box does not
tell you much about what was really going on, and the real error
message is in the Messages pane.

To LyX developers: I think it will be much more helpful if LyX can
catch the stderr output when R fails and display the error message in
the dialog. The default error message An error occurred while
running is not informative.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name


On Tue, Apr 22, 2014 at 12:50 PM, John Kane jrkrid...@yahoo.ca wrote:
 Currently I am running Ubuntu 13.10 with LyX 2.1.0. I seem to be having some
 problems with some of the custom modules I usually load.
 Actually I have two different problems
 The first problem is that I seem to have lost the ability to use a custom
 module (ShortInsertNames ). Typically, I will have Natbibapa,
 ShortInsetNames, Rnw(knitr)  ToDo loaded. Now when I compile and even when
 I do Document  I am getting an error, Error reading ShortInsertNames when
 I try to load ShortInsetNames. Both the ToDo and ShortInsetNames are in
 /home/john/.lyx.
 Interestingly enough Short Label but not Short Ref appears in Custom Insets
 and will insert an Undefined field in the document and I can compile the
 document.
 The second problem is that whenever I try to compile a document with
 RnW(knitr) loaded I get an error message saying
 An error occurred while running: Rscript -verbose -no-save -no-restore
 /usr/share/lyx/scripts/lyxknitr.R
 /tmp/lyx_tmpdir.qXaUOysc4933/lyx_tmpbuf4/lists.footnotes.endnotes.Rnw
 /tmp/lyx_tmpdir.qXaUOysc4933/lyx_tmpbuf4/lists.footnotes.endnotes.tex
 ISO-8859-15 /home/john/Lyx/
 This was occuring before the upgrade to 2.1.0 but there was no problem with
 ShortInsertNames before the upgrade. A look at
 /usr/share/lyx/scripts/lyxknitr.R says that that the file exists and when I
 open it, it looks fine.
 The worst of it is, I cannot think of any changes I made to my setup except
 I added some Brother printer drivers to my Windows 7 setup (it's a dual-boot
 machine).
 I'd appreciate any suggestions for either problem. If I can get the blasted
 ShortInsetNames to work again I can perhaps move the Rnw(knitr) problem to
 the knitr group

 I have attached a small example file.


Re: Problems with custom modules after upgrade to 2.1.0

2014-04-22 Thread Yihui Xie
Yes, please. Thanks!

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name


On Tue, Apr 22, 2014 at 4:31 PM, Scott Kostyshak skost...@lyx.org wrote:
 On Tue, Apr 22, 2014 at 5:30 PM, Scott Kostyshak skost...@lyx.org wrote:
 On Tue, Apr 22, 2014 at 3:44 PM, Yihui Xie x...@yihui.name wrote:

 To LyX developers: I think it will be much more helpful if LyX can
 catch the stderr output when R fails and display the error message in
 the dialog. The default error message An error occurred while
 running is not informative.

 Makes sense. You might want to open a ticket for this. It is related
 to (but in my opinion different) http://www.lyx.org/trac/ticket/6826

 If you prefer, I will open the ticket and CC you. Scott


Re: Problems with custom modules after upgrade to 2.1.0

2014-04-22 Thread Yihui Xie
Whenever you have got an error with the Rnw/knitr module, be sure to
look at View-Messages. The error message in the dialog box does not
tell you much about what was really going on, and the real error
message is in the Messages pane.

To LyX developers: I think it will be much more helpful if LyX can
catch the stderr output when R fails and display the error message in
the dialog. The default error message An error occurred while
running is not informative.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name


On Tue, Apr 22, 2014 at 12:50 PM, John Kane jrkrid...@yahoo.ca wrote:
 Currently I am running Ubuntu 13.10 with LyX 2.1.0. I seem to be having some
 problems with some of the custom modules I usually load.
 Actually I have two different problems
 The first problem is that I seem to have lost the ability to use a custom
 module (ShortInsertNames ). Typically, I will have Natbibapa,
 ShortInsetNames, Rnw(knitr)  ToDo loaded. Now when I compile and even when
 I do Document  I am getting an error, Error reading ShortInsertNames when
 I try to load ShortInsetNames. Both the ToDo and ShortInsetNames are in
 /home/john/.lyx.
 Interestingly enough Short Label but not Short Ref appears in Custom Insets
 and will insert an Undefined field in the document and I can compile the
 document.
 The second problem is that whenever I try to compile a document with
 RnW(knitr) loaded I get an error message saying
 An error occurred while running: Rscript -verbose -no-save -no-restore
 /usr/share/lyx/scripts/lyxknitr.R
 /tmp/lyx_tmpdir.qXaUOysc4933/lyx_tmpbuf4/lists.footnotes.endnotes.Rnw
 /tmp/lyx_tmpdir.qXaUOysc4933/lyx_tmpbuf4/lists.footnotes.endnotes.tex
 ISO-8859-15 /home/john/Lyx/
 This was occuring before the upgrade to 2.1.0 but there was no problem with
 ShortInsertNames before the upgrade. A look at
 /usr/share/lyx/scripts/lyxknitr.R says that that the file exists and when I
 open it, it looks fine.
 The worst of it is, I cannot think of any changes I made to my setup except
 I added some Brother printer drivers to my Windows 7 setup (it's a dual-boot
 machine).
 I'd appreciate any suggestions for either problem. If I can get the blasted
 ShortInsetNames to work again I can perhaps move the Rnw(knitr) problem to
 the knitr group

 I have attached a small example file.


Re: Problems with custom modules after upgrade to 2.1.0

2014-04-22 Thread Yihui Xie
Yes, please. Thanks!

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name


On Tue, Apr 22, 2014 at 4:31 PM, Scott Kostyshak skost...@lyx.org wrote:
 On Tue, Apr 22, 2014 at 5:30 PM, Scott Kostyshak skost...@lyx.org wrote:
 On Tue, Apr 22, 2014 at 3:44 PM, Yihui Xie x...@yihui.name wrote:

 To LyX developers: I think it will be much more helpful if LyX can
 catch the stderr output when R fails and display the error message in
 the dialog. The default error message An error occurred while
 running is not informative.

 Makes sense. You might want to open a ticket for this. It is related
 to (but in my opinion different) http://www.lyx.org/trac/ticket/6826

 If you prefer, I will open the ticket and CC you. Scott


Re: Problems with custom modules after upgrade to 2.1.0

2014-04-22 Thread Yihui Xie
Whenever you have got an error with the Rnw/knitr module, be sure to
look at View->Messages. The error message in the dialog box does not
tell you much about what was really going on, and the real error
message is in the Messages pane.

To LyX developers: I think it will be much more helpful if LyX can
catch the stderr output when R fails and display the error message in
the dialog. The default error message "An error occurred while
running" is not informative.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Web: http://yihui.name


On Tue, Apr 22, 2014 at 12:50 PM, John Kane <jrkrid...@yahoo.ca> wrote:
> Currently I am running Ubuntu 13.10 with LyX 2.1.0. I seem to be having some
> problems with some of the custom modules I usually load.
> Actually I have two different problems
> The first problem is that I seem to have lost the ability to use a custom
> module (ShortInsertNames ). Typically, I will have Natbibapa,
> ShortInsetNames, Rnw(knitr) & ToDo loaded. Now when I compile and even when
> I do Document > I am getting an error, "Error reading ShortInsertNames when
> I try to load ShortInsetNames. Both the ToDo and ShortInsetNames are in
> /home/john/.lyx.
> Interestingly enough Short Label but not Short Ref appears in Custom Insets
> and will insert an Undefined field in the document and I can compile the
> document.
> The second problem is that whenever I try to compile a document with
> RnW(knitr) loaded I get an error message saying
> An error occurred while running: Rscript -verbose -no-save -no-restore
> "/usr/share/lyx/scripts/lyxknitr.R"
> "/tmp/lyx_tmpdir.qXaUOysc4933/lyx_tmpbuf4/""lists.footnotes.endnotes.Rnw"
> "/tmp/lyx_tmpdir.qXaUOysc4933/lyx_tmpbuf4/""lists.footnotes.endnotes.tex"
> ISO-8859-15 "/home/john/Lyx/"
> This was occuring before the upgrade to 2.1.0 but there was no problem with
> ShortInsertNames before the upgrade. A look at
> /usr/share/lyx/scripts/lyxknitr.R says that that the file exists and when I
> open it, it looks fine.
> The worst of it is, I cannot think of any changes I made to my setup except
> I added some Brother printer drivers to my Windows 7 setup (it's a dual-boot
> machine).
> I'd appreciate any suggestions for either problem. If I can get the blasted
> ShortInsetNames to work again I can perhaps move the Rnw(knitr) problem to
> the knitr group
>
> I have attached a small example file.


Re: Problems with custom modules after upgrade to 2.1.0

2014-04-22 Thread Yihui Xie
Yes, please. Thanks!

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Web: http://yihui.name


On Tue, Apr 22, 2014 at 4:31 PM, Scott Kostyshak <skost...@lyx.org> wrote:
> On Tue, Apr 22, 2014 at 5:30 PM, Scott Kostyshak <skost...@lyx.org> wrote:
>> On Tue, Apr 22, 2014 at 3:44 PM, Yihui Xie <x...@yihui.name> wrote:
>>
>>> To LyX developers: I think it will be much more helpful if LyX can
>>> catch the stderr output when R fails and display the error message in
>>> the dialog. The default error message "An error occurred while
>>> running" is not informative.
>>
>> Makes sense. You might want to open a ticket for this. It is related
>> to (but in my opinion different) http://www.lyx.org/trac/ticket/6826
>
> If you prefer, I will open the ticket and CC you. Scott


Re: error in LyX with Turkish language using knitr

2013-08-30 Thread Yihui Xie
I can reproduce the problem after I enable babel in the document.
Normally I disable it because it often causes me trouble for unknown
reasons. To disable it globally: Preferences--Language
Settings--Language package--None. Or disable it only for this
document: Document--Settings--Language--Language package--None.

Without babel, it compiles fine.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Fri, Aug 30, 2013 at 2:07 AM, Kizilkaya, Kadir [AN S]
kad...@iastate.edu wrote:
 Hi Scott,

 I attached the lyx file, I hope it is the correct one.

 Kadir
 
 From: skost...@lyx.org [skost...@lyx.org] on behalf of Scott Kostyshak 
 [skost...@princeton.edu]
 Sent: Friday, August 30, 2013 1:24 AM
 To: Kizilkaya, Kadir [AN S]
 Cc: lyx-users
 Subject: Re: error in LyX with Turkish language using knitr

 On Fri, Aug 30, 2013 at 2:06 AM, Kizilkaya, Kadir [AN S]
 kad...@iastate.edu wrote:
 Tex file from LyX and Session info in R are below.

 Hi Kadir,

 Can you please send the .lyx file (the file that created the LaTeX file)?

 Thanks,

 Scott


Re: error in LyX with Turkish language using knitr

2013-08-30 Thread Yihui Xie
I can reproduce the problem after I enable babel in the document.
Normally I disable it because it often causes me trouble for unknown
reasons. To disable it globally: Preferences--Language
Settings--Language package--None. Or disable it only for this
document: Document--Settings--Language--Language package--None.

Without babel, it compiles fine.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Fri, Aug 30, 2013 at 2:07 AM, Kizilkaya, Kadir [AN S]
kad...@iastate.edu wrote:
 Hi Scott,

 I attached the lyx file, I hope it is the correct one.

 Kadir
 
 From: skost...@lyx.org [skost...@lyx.org] on behalf of Scott Kostyshak 
 [skost...@princeton.edu]
 Sent: Friday, August 30, 2013 1:24 AM
 To: Kizilkaya, Kadir [AN S]
 Cc: lyx-users
 Subject: Re: error in LyX with Turkish language using knitr

 On Fri, Aug 30, 2013 at 2:06 AM, Kizilkaya, Kadir [AN S]
 kad...@iastate.edu wrote:
 Tex file from LyX and Session info in R are below.

 Hi Kadir,

 Can you please send the .lyx file (the file that created the LaTeX file)?

 Thanks,

 Scott


Re: error in LyX with Turkish language using knitr

2013-08-30 Thread Yihui Xie
I can reproduce the problem after I enable babel in the document.
Normally I disable it because it often causes me trouble for unknown
reasons. To disable it globally: Preferences-->Language
Settings-->Language package-->None. Or disable it only for this
document: Document-->Settings-->Language-->Language package-->None.

Without babel, it compiles fine.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Fri, Aug 30, 2013 at 2:07 AM, Kizilkaya, Kadir [AN S]
<kad...@iastate.edu> wrote:
> Hi Scott,
>
> I attached the lyx file, I hope it is the correct one.
>
> Kadir
> 
> From: skost...@lyx.org [skost...@lyx.org] on behalf of Scott Kostyshak 
> [skost...@princeton.edu]
> Sent: Friday, August 30, 2013 1:24 AM
> To: Kizilkaya, Kadir [AN S]
> Cc: lyx-users
> Subject: Re: error in LyX with Turkish language using knitr
>
> On Fri, Aug 30, 2013 at 2:06 AM, Kizilkaya, Kadir [AN S]
> <kad...@iastate.edu> wrote:
>> Tex file from LyX and Session info in R are below.
>
> Hi Kadir,
>
> Can you please send the .lyx file (the file that created the LaTeX file)?
>
> Thanks,
>
> Scott


Re: error in LyX with Turkish language using knitr

2013-08-29 Thread Yihui Xie
and also your session info in R:

library(knitr)
sessionInfo()
system('pdflatex --version')

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Aug 29, 2013 at 4:34 PM, Scott Kostyshak skost...@princeton.edu wrote:
 On Thu, Aug 29, 2013 at 4:19 PM, Kizilkaya, Kadir [AN S]
 kad...@iastate.edu wrote:
 Dear LyX users,

 I am a LyX user and I would like to prepare a document in Turkish language
 by using Rnw (knitr) in modules. My sample source code is below and

 Hi Kadir,

 Can you please send the .lyx file the produced that .tex file?

 Scott


Re: error in LyX with Turkish language using knitr

2013-08-29 Thread Yihui Xie
and also your session info in R:

library(knitr)
sessionInfo()
system('pdflatex --version')

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Aug 29, 2013 at 4:34 PM, Scott Kostyshak skost...@princeton.edu wrote:
 On Thu, Aug 29, 2013 at 4:19 PM, Kizilkaya, Kadir [AN S]
 kad...@iastate.edu wrote:
 Dear LyX users,

 I am a LyX user and I would like to prepare a document in Turkish language
 by using Rnw (knitr) in modules. My sample source code is below and

 Hi Kadir,

 Can you please send the .lyx file the produced that .tex file?

 Scott


Re: error in LyX with Turkish language using knitr

2013-08-29 Thread Yihui Xie
and also your session info in R:

library(knitr)
sessionInfo()
system('pdflatex --version')

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Aug 29, 2013 at 4:34 PM, Scott Kostyshak <skost...@princeton.edu> wrote:
> On Thu, Aug 29, 2013 at 4:19 PM, Kizilkaya, Kadir [AN S]
> <kad...@iastate.edu> wrote:
>> Dear LyX users,
>>
>> I am a LyX user and I would like to prepare a document in Turkish language
>> by using Rnw (knitr) in modules. My sample source code is below and
>
> Hi Kadir,
>
> Can you please send the .lyx file the produced that .tex file?
>
> Scott


Re: make graphic insert 100% textwidth default

2013-07-31 Thread Yihui Xie
One way to do that is to redefine \includegraphics (cf
https://github.com/jgm/pandoc-templates/blob/master/default.latex).

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 206-667-4385 Web: http://yihui.name
Fred Hutchinson Cancer Research Center, Seattle


On Wed, Jul 31, 2013 at 12:23 PM, Neal Becker ndbeck...@gmail.com wrote:
 I almost always want my graphic insert to be 100% textwidth.  How can I set 
 this
 as the default?



Re: make graphic insert 100% textwidth default

2013-07-31 Thread Yihui Xie
One way to do that is to redefine \includegraphics (cf
https://github.com/jgm/pandoc-templates/blob/master/default.latex).

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 206-667-4385 Web: http://yihui.name
Fred Hutchinson Cancer Research Center, Seattle


On Wed, Jul 31, 2013 at 12:23 PM, Neal Becker ndbeck...@gmail.com wrote:
 I almost always want my graphic insert to be 100% textwidth.  How can I set 
 this
 as the default?



Re: make graphic insert 100% textwidth default

2013-07-31 Thread Yihui Xie
One way to do that is to redefine \includegraphics (cf
https://github.com/jgm/pandoc-templates/blob/master/default.latex).

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 206-667-4385 Web: http://yihui.name
Fred Hutchinson Cancer Research Center, Seattle


On Wed, Jul 31, 2013 at 12:23 PM, Neal Becker <ndbeck...@gmail.com> wrote:
> I almost always want my graphic insert to be 100% textwidth.  How can I set 
> this
> as the default?
>


Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
But John needs the LaTeX table output in the next line of R code;
include=FALSE will exclude everything in that chunk.

Moving booktabs() to the previous chunk and using include=FALSE there
will be fine.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Jun 3, 2013 at 11:29 PM, Liviu Andronic landronim...@gmail.com wrote:
 On Mon, Jun 3, 2013 at 10:45 PM, Yihui Xie x...@yihui.name wrote:
 You should not print booktabs() in a chunk with results='asis',
 because that will generate invalid LaTeX code in the output. You can
 use invisible(booktabs()) or foo - booktabs() to avoid printing.

 Or request Duncan (the package author) to return invisible(save) in 
 booktabs().

 I simply use chunk with include=FALSE in this case.

 Liviu


Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
That is right.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Tue, Jun 4, 2013 at 8:49 AM, Liviu Andronic landronim...@gmail.com wrote:
 On Tue, Jun 4, 2013 at 5:33 PM, John Kane jrkrid...@yahoo.ca wrote:
 Thanks Yihui.  I understood the invisible(booktabs()) after a bit of
 thought, but not Liviu's comment.  Using his approach,  could I run booktabs
 ina earlier chunk?

 Yes. You can do:
 include=F=
 booktabs()
 @

 Then
 results='asis'=
 latex(table(...))
 @

 From memory this works.
 Liviu


Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
But John needs the LaTeX table output in the next line of R code;
include=FALSE will exclude everything in that chunk.

Moving booktabs() to the previous chunk and using include=FALSE there
will be fine.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Jun 3, 2013 at 11:29 PM, Liviu Andronic landronim...@gmail.com wrote:
 On Mon, Jun 3, 2013 at 10:45 PM, Yihui Xie x...@yihui.name wrote:
 You should not print booktabs() in a chunk with results='asis',
 because that will generate invalid LaTeX code in the output. You can
 use invisible(booktabs()) or foo - booktabs() to avoid printing.

 Or request Duncan (the package author) to return invisible(save) in 
 booktabs().

 I simply use chunk with include=FALSE in this case.

 Liviu


Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
That is right.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Tue, Jun 4, 2013 at 8:49 AM, Liviu Andronic landronim...@gmail.com wrote:
 On Tue, Jun 4, 2013 at 5:33 PM, John Kane jrkrid...@yahoo.ca wrote:
 Thanks Yihui.  I understood the invisible(booktabs()) after a bit of
 thought, but not Liviu's comment.  Using his approach,  could I run booktabs
 ina earlier chunk?

 Yes. You can do:
 include=F=
 booktabs()
 @

 Then
 results='asis'=
 latex(table(...))
 @

 From memory this works.
 Liviu


Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
But John needs the LaTeX table output in the next line of R code;
include=FALSE will exclude everything in that chunk.

Moving booktabs() to the previous chunk and using include=FALSE there
will be fine.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Jun 3, 2013 at 11:29 PM, Liviu Andronic <landronim...@gmail.com> wrote:
> On Mon, Jun 3, 2013 at 10:45 PM, Yihui Xie <x...@yihui.name> wrote:
>> You should not print booktabs() in a chunk with results='asis',
>> because that will generate invalid LaTeX code in the output. You can
>> use invisible(booktabs()) or foo <- booktabs() to avoid printing.
>>
>> Or request Duncan (the package author) to return invisible(save) in 
>> booktabs().
>>
> I simply use chunk with include=FALSE in this case.
>
> Liviu


Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
That is right.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Tue, Jun 4, 2013 at 8:49 AM, Liviu Andronic <landronim...@gmail.com> wrote:
> On Tue, Jun 4, 2013 at 5:33 PM, John Kane <jrkrid...@yahoo.ca> wrote:
>> Thanks Yihui.  I understood the invisible(booktabs()) after a bit of
>> thought, but not Liviu's comment.  Using his approach,  could I run booktabs
>> ina earlier chunk?
>>
> Yes. You can do:
> <

Re: Problem using R's table package with knitr.

2013-06-03 Thread Yihui Xie
Did you \usepackage{booktabs} in the preamble? That is what
?tables::booktabs says.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Jun 3, 2013 at 3:07 PM, John Kane jrkrid...@yahoo.ca wrote:
 I was having a look at the tables package in R and tried to run an example
 in LyX. It works fine until I try using the suggestion to use the booktabs()
 command in the knitr statement.
 The code works fine in R.

 I assume that I am in conflict with another latex package in LyX?  Any
 workarounds?

 It's not a serious problem as I don't actually need to use the tables
 package; I was just playing around with tables  trying to understand the
 syntax and decided to try it in LyX.


Re: Problem using R's table package with knitr.

2013-06-03 Thread Yihui Xie
You should not print booktabs() in a chunk with results='asis',
because that will generate invalid LaTeX code in the output. You can
use invisible(booktabs()) or foo - booktabs() to avoid printing.

Or request Duncan (the package author) to return invisible(save) in booktabs().

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Jun 3, 2013 at 1:38 PM, John Kane jrkrid...@yahoo.ca wrote:


 
 From: Yihui Xie x...@yihui.name
 To: John Kane jrkrid...@yahoo.ca
 Cc: Lyx List lyx-users@lists.lyx.org
 Sent: Monday, June 3, 2013 4:17:18 PM
 Subject: Re: Problem using R's table package with knitr.

 Did you \usepackage{booktabs} in the preamble? That is what
 ?tables::booktabs says.

 Yes , I tried it both with and without \usepackage{booktabs}

 I realise I did not attach my example file.

 Hopefully there is one now.

 Thanks

 Regards,
 Yihui
 --
 Yihui Xie xieyi...@gmail.com
 Phone: 515-294-2465 Web: http://yihui.name
 Department of Statistics, Iowa State University
 2215 Snedecor Hall, Ames, IA


 On Mon, Jun 3, 2013 at 3:07 PM, John Kane jrkrid...@yahoo.ca wrote:
 I was having a look at the tables package in R and tried to run an example
 in LyX. It works fine until I try using the suggestion to use the
 booktabs()
 command in the knitr statement.
 The code works fine in R.

 I assume that I am in conflict with another latex package in LyX?  Any
 workarounds?

 It's not a serious problem as I don't actually need to use the tables
 package; I was just playing around with tables  trying to understand the
 syntax and decided to try it in LyX.




Re: Problem using R's table package with knitr.

2013-06-03 Thread Yihui Xie
Did you \usepackage{booktabs} in the preamble? That is what
?tables::booktabs says.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Jun 3, 2013 at 3:07 PM, John Kane jrkrid...@yahoo.ca wrote:
 I was having a look at the tables package in R and tried to run an example
 in LyX. It works fine until I try using the suggestion to use the booktabs()
 command in the knitr statement.
 The code works fine in R.

 I assume that I am in conflict with another latex package in LyX?  Any
 workarounds?

 It's not a serious problem as I don't actually need to use the tables
 package; I was just playing around with tables  trying to understand the
 syntax and decided to try it in LyX.


Re: Problem using R's table package with knitr.

2013-06-03 Thread Yihui Xie
You should not print booktabs() in a chunk with results='asis',
because that will generate invalid LaTeX code in the output. You can
use invisible(booktabs()) or foo - booktabs() to avoid printing.

Or request Duncan (the package author) to return invisible(save) in booktabs().

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Jun 3, 2013 at 1:38 PM, John Kane jrkrid...@yahoo.ca wrote:


 
 From: Yihui Xie x...@yihui.name
 To: John Kane jrkrid...@yahoo.ca
 Cc: Lyx List lyx-users@lists.lyx.org
 Sent: Monday, June 3, 2013 4:17:18 PM
 Subject: Re: Problem using R's table package with knitr.

 Did you \usepackage{booktabs} in the preamble? That is what
 ?tables::booktabs says.

 Yes , I tried it both with and without \usepackage{booktabs}

 I realise I did not attach my example file.

 Hopefully there is one now.

 Thanks

 Regards,
 Yihui
 --
 Yihui Xie xieyi...@gmail.com
 Phone: 515-294-2465 Web: http://yihui.name
 Department of Statistics, Iowa State University
 2215 Snedecor Hall, Ames, IA


 On Mon, Jun 3, 2013 at 3:07 PM, John Kane jrkrid...@yahoo.ca wrote:
 I was having a look at the tables package in R and tried to run an example
 in LyX. It works fine until I try using the suggestion to use the
 booktabs()
 command in the knitr statement.
 The code works fine in R.

 I assume that I am in conflict with another latex package in LyX?  Any
 workarounds?

 It's not a serious problem as I don't actually need to use the tables
 package; I was just playing around with tables  trying to understand the
 syntax and decided to try it in LyX.




Re: Problem using R's table package with knitr.

2013-06-03 Thread Yihui Xie
Did you \usepackage{booktabs} in the preamble? That is what
?tables::booktabs says.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Jun 3, 2013 at 3:07 PM, John Kane <jrkrid...@yahoo.ca> wrote:
> I was having a look at the tables package in R and tried to run an example
> in LyX. It works fine until I try using the suggestion to use the booktabs()
> command in the knitr statement.
> The code works fine in R.
>
> I assume that I am in conflict with another latex package in LyX?  Any
> workarounds?
>
> It's not a serious problem as I don't actually need to use the tables
> package; I was just playing around with tables  trying to understand the
> syntax and decided to try it in LyX.


Re: Problem using R's table package with knitr.

2013-06-03 Thread Yihui Xie
You should not print booktabs() in a chunk with results='asis',
because that will generate invalid LaTeX code in the output. You can
use invisible(booktabs()) or foo <- booktabs() to avoid printing.

Or request Duncan (the package author) to return invisible(save) in booktabs().

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Jun 3, 2013 at 1:38 PM, John Kane <jrkrid...@yahoo.ca> wrote:
>
>
> ________
> From: Yihui Xie <x...@yihui.name>
> To: John Kane <jrkrid...@yahoo.ca>
> Cc: Lyx List <lyx-users@lists.lyx.org>
> Sent: Monday, June 3, 2013 4:17:18 PM
> Subject: Re: Problem using R's table package with knitr.
>
> Did you \usepackage{booktabs} in the preamble? That is what
> ?tables::booktabs says.
>
> Yes , I tried it both with and without \usepackage{booktabs}
>
> I realise I did not attach my example file.
>
> Hopefully there is one now.
>
> Thanks
>
> Regards,
> Yihui
> --
> Yihui Xie <xieyi...@gmail.com>
> Phone: 515-294-2465 Web: http://yihui.name
> Department of Statistics, Iowa State University
> 2215 Snedecor Hall, Ames, IA
>
>
> On Mon, Jun 3, 2013 at 3:07 PM, John Kane <jrkrid...@yahoo.ca> wrote:
>> I was having a look at the tables package in R and tried to run an example
>> in LyX. It works fine until I try using the suggestion to use the
>> booktabs()
>> command in the knitr statement.
>> The code works fine in R.
>>
>> I assume that I am in conflict with another latex package in LyX?  Any
>> workarounds?
>>
>> It's not a serious problem as I don't actually need to use the tables
>> package; I was just playing around with tables  trying to understand the
>> syntax and decided to try it in LyX.
>
>


Re: Working with Lyx and Sweave; pasting R-code from Emacs into Lyx seems awkward. Any suggestions?

2013-04-14 Thread Yihui Xie
Short answer: you can use Ctrl+L and Ctrl+Shift+V instead of Scrap and Ctrl+V.

Note Scrap is obsolete now. The new name is Chunk. Some users choose
to use this, but others like me use the ERT (Ctrl+L). It is up to you.

A slightly longer answer: you do not really have to paste code between
Emacs and LyX if you use the knitr module instead of Sweave. See
http://yihui.name/knitr/demo/externalization/ for examples, and
http://yihui.name/knitr/demo/lyx/ for a video demo of knitr in LyX.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Apr 14, 2013 at 6:06 PM, Mark Dalphin
mark.dalp...@pacificedge.co.nz wrote:
 Hi,

 I use Lyx for writing reports on data analysis. To incorporate results from
 those analysis, I use Sweave within Lyx. This is all nicely integrated in
 the recent versions of Lyx. There is one major inconvenience remaining for
 me, however, and that is described here.

 I usually develop my R-code in Emacs (ESS-mode). This permits me to refine
 my tables and graphs before I incorporate them into Lyx. This is much faster
 as it interactive and avoids the time to run LaTeX (or export the R, etc
 etc). Then I write the text part of my report, and, in the Lyx scrap, I
 paste the required chunks of R-code. Nice and simple (thank you!). The
 problem is that when I paste the R-code from Emacs to the Lyx scrap, the
 End-Of-Line character gets converted into something else (a BLANK or some
 other white space, I guess), which is not acceptable to the R-parser when
 Sweave runs. This means that every paste operation is followed by many edit
 operations to convert the blanks back into new-lines.

 Is is possible to prevent this mangling of the paste? Or could there be a
 right-click option to paste-retaining-newlines or something such item? Or
 is this a user-error and there is a better way to perform the actions I am
 describing (A wild example that I have not tried: in a blank Lyx window,
 import the Emacs file, then cut-and-paste from one Lyx buffer to another).

 System: Linux (Kubuntu 8.04)
 Lyx: 2.0.5.1, built from source.

 Cut-and-paste: Standard Linux/X11, selecting with left-mouse button and
 pasting with center mouse button.

 Regards,
 Mark

 --



Mark Dalphin Ph.D.

 Director of Bioinformatics

 mark.dalp...@pacificedge.co.nz mailto:mark.dalp...@pacificedge.co.nz
 *Ph:* +64-3-479-5805
 *Cell:* +64-21-156-7625
 *Skype:* mark.dalphin.pel
 http://www.facebook.com/pages/Pacific-Edge/111356775582456
 http://twitter.com/#%21/pacificEdgeLtd
 http://www.youtube.com/PacificEdgeLtd

 87 St David St, PO Box 56, Dunedin, New Zealand 9016www.pacificedge.co.nz



Re: Working with Lyx and Sweave; pasting R-code from Emacs into Lyx seems awkward. Any suggestions?

2013-04-14 Thread Yihui Xie
My suggestion is always ERT for R code chunks, because it is clean and
easier to play with program code.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Apr 14, 2013 at 10:30 PM, Mark Dalphin
mark.dalp...@pacificedge.co.nz wrote:
 Thanks to both Scott Kostyshak and Yihui Xie (I appreciate Yihui not
 reminding me that he has already suggested I switch to knitr). I mis-wrote
 when I said scrap in my text; it is indeed the chunk into which I paste
 my text from Emacs.

 When I use ctrl-shift-v into a chunk that I have pre-filled with
 echo=FALSE,fig=TRUE=\n (where \n means I am on the next line, not
 the literal characters), the first line adds correctly, then there is a
 blank line and change of paragraph type into Standard, with the remaining
 lines in that standard paragraph.

 If I change my work order and paste-special into a Standard paragraph, it
 looks alright, but then selection of those lines and conversion to a Chunk
 paragraph yields a similar output: one good, chunk line, a blank line plus
 several lines in the following Standard paragraph.

 Trying Yihui's ERT format seemed to paste correctly, however, I am left
 wondering then in what kind of paragraph should the ERT exist. Just as a
 stand-alone Standard paragraph? I can live with that if it leads to clean
 processing of my report. Does anyone have any comments on possible
 side-effects of using the ERT to contain the Sweave material?

 Cheers,
 Mark


Re: Working with Lyx and Sweave; pasting R-code from Emacs into Lyx seems awkward. Any suggestions?

2013-04-14 Thread Yihui Xie
Short answer: you can use Ctrl+L and Ctrl+Shift+V instead of Scrap and Ctrl+V.

Note Scrap is obsolete now. The new name is Chunk. Some users choose
to use this, but others like me use the ERT (Ctrl+L). It is up to you.

A slightly longer answer: you do not really have to paste code between
Emacs and LyX if you use the knitr module instead of Sweave. See
http://yihui.name/knitr/demo/externalization/ for examples, and
http://yihui.name/knitr/demo/lyx/ for a video demo of knitr in LyX.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Apr 14, 2013 at 6:06 PM, Mark Dalphin
mark.dalp...@pacificedge.co.nz wrote:
 Hi,

 I use Lyx for writing reports on data analysis. To incorporate results from
 those analysis, I use Sweave within Lyx. This is all nicely integrated in
 the recent versions of Lyx. There is one major inconvenience remaining for
 me, however, and that is described here.

 I usually develop my R-code in Emacs (ESS-mode). This permits me to refine
 my tables and graphs before I incorporate them into Lyx. This is much faster
 as it interactive and avoids the time to run LaTeX (or export the R, etc
 etc). Then I write the text part of my report, and, in the Lyx scrap, I
 paste the required chunks of R-code. Nice and simple (thank you!). The
 problem is that when I paste the R-code from Emacs to the Lyx scrap, the
 End-Of-Line character gets converted into something else (a BLANK or some
 other white space, I guess), which is not acceptable to the R-parser when
 Sweave runs. This means that every paste operation is followed by many edit
 operations to convert the blanks back into new-lines.

 Is is possible to prevent this mangling of the paste? Or could there be a
 right-click option to paste-retaining-newlines or something such item? Or
 is this a user-error and there is a better way to perform the actions I am
 describing (A wild example that I have not tried: in a blank Lyx window,
 import the Emacs file, then cut-and-paste from one Lyx buffer to another).

 System: Linux (Kubuntu 8.04)
 Lyx: 2.0.5.1, built from source.

 Cut-and-paste: Standard Linux/X11, selecting with left-mouse button and
 pasting with center mouse button.

 Regards,
 Mark

 --



Mark Dalphin Ph.D.

 Director of Bioinformatics

 mark.dalp...@pacificedge.co.nz mailto:mark.dalp...@pacificedge.co.nz
 *Ph:* +64-3-479-5805
 *Cell:* +64-21-156-7625
 *Skype:* mark.dalphin.pel
 http://www.facebook.com/pages/Pacific-Edge/111356775582456
 http://twitter.com/#%21/pacificEdgeLtd
 http://www.youtube.com/PacificEdgeLtd

 87 St David St, PO Box 56, Dunedin, New Zealand 9016www.pacificedge.co.nz



Re: Working with Lyx and Sweave; pasting R-code from Emacs into Lyx seems awkward. Any suggestions?

2013-04-14 Thread Yihui Xie
My suggestion is always ERT for R code chunks, because it is clean and
easier to play with program code.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Apr 14, 2013 at 10:30 PM, Mark Dalphin
mark.dalp...@pacificedge.co.nz wrote:
 Thanks to both Scott Kostyshak and Yihui Xie (I appreciate Yihui not
 reminding me that he has already suggested I switch to knitr). I mis-wrote
 when I said scrap in my text; it is indeed the chunk into which I paste
 my text from Emacs.

 When I use ctrl-shift-v into a chunk that I have pre-filled with
 echo=FALSE,fig=TRUE=\n (where \n means I am on the next line, not
 the literal characters), the first line adds correctly, then there is a
 blank line and change of paragraph type into Standard, with the remaining
 lines in that standard paragraph.

 If I change my work order and paste-special into a Standard paragraph, it
 looks alright, but then selection of those lines and conversion to a Chunk
 paragraph yields a similar output: one good, chunk line, a blank line plus
 several lines in the following Standard paragraph.

 Trying Yihui's ERT format seemed to paste correctly, however, I am left
 wondering then in what kind of paragraph should the ERT exist. Just as a
 stand-alone Standard paragraph? I can live with that if it leads to clean
 processing of my report. Does anyone have any comments on possible
 side-effects of using the ERT to contain the Sweave material?

 Cheers,
 Mark


Re: Working with Lyx and Sweave; pasting R-code from Emacs into Lyx seems awkward. Any suggestions?

2013-04-14 Thread Yihui Xie
Short answer: you can use Ctrl+L and Ctrl+Shift+V instead of Scrap and Ctrl+V.

Note Scrap is obsolete now. The new name is Chunk. Some users choose
to use this, but others like me use the ERT (Ctrl+L). It is up to you.

A slightly longer answer: you do not really have to paste code between
Emacs and LyX if you use the knitr module instead of Sweave. See
http://yihui.name/knitr/demo/externalization/ for examples, and
http://yihui.name/knitr/demo/lyx/ for a video demo of knitr in LyX.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Apr 14, 2013 at 6:06 PM, Mark Dalphin
<mark.dalp...@pacificedge.co.nz> wrote:
> Hi,
>
> I use Lyx for writing reports on data analysis. To incorporate results from
> those analysis, I use Sweave within Lyx. This is all nicely integrated in
> the recent versions of Lyx. There is one major inconvenience remaining for
> me, however, and that is described here.
>
> I usually develop my R-code in Emacs (ESS-mode). This permits me to refine
> my tables and graphs before I incorporate them into Lyx. This is much faster
> as it interactive and avoids the time to run LaTeX (or export the R, etc
> etc). Then I write the text part of my report, and, in the Lyx scrap, I
> paste the required chunks of R-code. Nice and simple (thank you!). The
> problem is that when I paste the R-code from Emacs to the Lyx scrap, the
> End-Of-Line character gets converted into something else (a BLANK or some
> other white space, I guess), which is not acceptable to the R-parser when
> Sweave runs. This means that every paste operation is followed by many edit
> operations to convert the blanks back into new-lines.
>
> Is is possible to prevent this mangling of the paste? Or could there be a
> right-click option to "paste-retaining-newlines" or something such item? Or
> is this a user-error and there is a better way to perform the actions I am
> describing (A wild example that I have not tried: in a blank Lyx window,
> import the Emacs file, then cut-and-paste from one Lyx buffer to another).
>
> System: Linux (Kubuntu 8.04)
> Lyx: 2.0.5.1, built from source.
>
> Cut-and-paste: Standard Linux/X11, selecting with left-mouse button and
> pasting with center mouse button.
>
> Regards,
> Mark
>
> --
>
>
>
>Mark Dalphin Ph.D.
>
> Director of Bioinformatics
>
> mark.dalp...@pacificedge.co.nz <mailto:mark.dalp...@pacificedge.co.nz>
> *Ph:* +64-3-479-5805
> *Cell:* +64-21-156-7625
> *Skype:* mark.dalphin.pel
> <http://www.facebook.com/pages/Pacific-Edge/111356775582456>
> <http://twitter.com/#%21/pacificEdgeLtd>
> <http://www.youtube.com/PacificEdgeLtd>
>
> 87 St David St, PO Box 56, Dunedin, New Zealand 9016www.pacificedge.co.nz
>


Re: Working with Lyx and Sweave; pasting R-code from Emacs into Lyx seems awkward. Any suggestions?

2013-04-14 Thread Yihui Xie
My suggestion is always ERT for R code chunks, because it is clean and
easier to play with program code.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Apr 14, 2013 at 10:30 PM, Mark Dalphin
<mark.dalp...@pacificedge.co.nz> wrote:
> Thanks to both Scott Kostyshak and Yihui Xie (I appreciate Yihui not
> reminding me that he has already suggested I switch to knitr). I mis-wrote
> when I said "scrap" in my text; it is indeed the "chunk" into which I paste
> my text from Emacs.
>
> When I use "ctrl-shift-v" into a chunk that I have pre-filled with
> "<

Re: kitr problem after R update.

2013-02-17 Thread Yihui Xie
You cannot use cm directly; you have to convert cm to in which should
be trivial: 1in = 2.54cm.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Feb 17, 2013 at 11:53 AM, John Kane jrkrid...@yahoo.ca wrote:
 Hi,

 Thanks for this and my appologies for taking so long to get back to you.

 I was so frustrated with my LyX/apa6/biblatex problems that I just stopped
 even trying to get it to work and got on with other things.

 I made the simple height to fig.height, etc change and it seems to work just
 fine now.

 My lack of LaTeX knowledge plus my inability to actually comprehend much of
 the knitr/Sweave material due to lack of experiencc with them is sometimes
 maddening.

 How do I set fig.height and fig.width in cm?  It appears to me that the
 default is inches?

 Thanks again.



Re: kitr problem after R update.

2013-02-17 Thread Yihui Xie
You cannot use cm directly; you have to convert cm to in which should
be trivial: 1in = 2.54cm.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Feb 17, 2013 at 11:53 AM, John Kane jrkrid...@yahoo.ca wrote:
 Hi,

 Thanks for this and my appologies for taking so long to get back to you.

 I was so frustrated with my LyX/apa6/biblatex problems that I just stopped
 even trying to get it to work and got on with other things.

 I made the simple height to fig.height, etc change and it seems to work just
 fine now.

 My lack of LaTeX knowledge plus my inability to actually comprehend much of
 the knitr/Sweave material due to lack of experiencc with them is sometimes
 maddening.

 How do I set fig.height and fig.width in cm?  It appears to me that the
 default is inches?

 Thanks again.



Re: kitr problem after R update.

2013-02-17 Thread Yihui Xie
You cannot use cm directly; you have to convert cm to in which should
be trivial: 1in = 2.54cm.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Feb 17, 2013 at 11:53 AM, John Kane <jrkrid...@yahoo.ca> wrote:
> Hi,
>
> Thanks for this and my appologies for taking so long to get back to you.
>
> I was so frustrated with my LyX/apa6/biblatex problems that I just stopped
> even trying to get it to work and got on with other things.
>
> I made the simple height to fig.height, etc change and it seems to work just
> fine now.
>
> My lack of LaTeX knowledge plus my inability to actually comprehend much of
> the knitr/Sweave material due to lack of experiencc with them is sometimes
> maddening.
>
> How do I set fig.height and fig.width in cm?  It appears to me that the
> default is inches?
>
> Thanks again.
>


Re: kitr problem after R update.

2013-01-26 Thread Yihui Xie
Please see the NEWS for knitr 1.0 (now 1.0.5):
https://github.com/yihui/knitr/blob/master/NEWS.md#changes-in-knitr-version-10
Sweave2knitr() is a function in knitr instead of an executable in your
Ubuntu system: http://yihui.name/knitr/demo/sweave/

In your case, the chunk options height=4cm, width=4cm are invalid;
please read the documentation for chunk options:
http://yihui.name/knitr/options On one hand, there are no options
called height and width (only fig.height/fig.width or
out.height/out.width); on the other, 4cm is not a valid R object.

To René Mayer: you also had problems after upgrading knitr, but you
did not show me examples, so I have to guess - maybe you had some
non-ASCII characters in your document, and knitr 1.0 added encoding
support; I have submitted a patch to LyX accordingly:
http://www.lyx.org/trac/ticket/8504 For now, you can download the new
lyxknitr.R from
https://raw.github.com/yihui/lyx/master/scripts/lyxknitr.R and put it
under ~/lyx/scripts/. After LyX 2.0.6 is out, you will not need it.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sat, Jan 26, 2013 at 9:35 AM, John Kane jrkrid...@yahoo.ca wrote:
 I had thought that I had apa6 working nicely (I think I was wrong) and
 decided to have a go at comgining it with knitr.

 I successfully embedded an inline statement, then created both a table and a
 figure. (see attached file).
 Both were running fine untill I updated R yesterday

 I'm suddenly getting the error It seems you are using the Sweave-specific
 sntsx; you may need to run 'Sweave2knitr('basic.knitr.attempt1.Rnw')'

 This gives the error :
 john@john-K53U:~/Lyx$ Sweave2knitr('basic.knitr.attempt1.Rnw')
 bash: syntax error near unexpected token `'basic.knitr.attempt1.Rnw''

 I got this with a slightly larger file where I was working with the document
 class apa6 and knitr so for simplicity  I striped my example down to this so
 it appears it is knitr error and not something I have done playing with
 settings to get apa6 and biblatex to work

 What stupid error am I making now?  Or do I just have to update things?

 If this is the wrong mailing list can anyone point me in the right
 direction?
 Thanks

 LyX 2.0.4

 R info
 R version 2.15.2 (2012-10-26)
 Platform: i686-pc-linux-gnu (32-bit)

 locale:
  [1] LC_CTYPE=en_CA.UTF-8   LC_NUMERIC=C
  [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_CA.UTF-8
  [5] LC_MONETARY=en_CA.UTF-8LC_MESSAGES=en_CA.UTF-8
  [7] LC_PAPER=C LC_NAME=C
  [9] LC_ADDRESS=C   LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C

 attached base packages:
 [1] grid  stats graphics  grDevices utils datasets  methods
 base

 other attached packages:
 [1] lubridate_1.2.0directlabels_2.9   RColorBrewer_1.0-5 gridExtra_0.9.1
 [5] stringr_0.6.2  scales_0.2.3   plyr_1.8   reshape2_1.2.2
 [9] ggplot2_0.9.3

 loaded via a namespace (and not attached):
 [1] colorspace_1.2-1 dichromat_2.0-0  digest_0.6.1 gtable_0.1.2
 [5] labeling_0.1 MASS_7.3-23  munsell_0.4  proto_0.3-10
 [9] tools_2.15.2



Re: kitr problem after R update.

2013-01-26 Thread Yihui Xie
Please see the NEWS for knitr 1.0 (now 1.0.5):
https://github.com/yihui/knitr/blob/master/NEWS.md#changes-in-knitr-version-10
Sweave2knitr() is a function in knitr instead of an executable in your
Ubuntu system: http://yihui.name/knitr/demo/sweave/

In your case, the chunk options height=4cm, width=4cm are invalid;
please read the documentation for chunk options:
http://yihui.name/knitr/options On one hand, there are no options
called height and width (only fig.height/fig.width or
out.height/out.width); on the other, 4cm is not a valid R object.

To René Mayer: you also had problems after upgrading knitr, but you
did not show me examples, so I have to guess - maybe you had some
non-ASCII characters in your document, and knitr 1.0 added encoding
support; I have submitted a patch to LyX accordingly:
http://www.lyx.org/trac/ticket/8504 For now, you can download the new
lyxknitr.R from
https://raw.github.com/yihui/lyx/master/scripts/lyxknitr.R and put it
under ~/lyx/scripts/. After LyX 2.0.6 is out, you will not need it.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sat, Jan 26, 2013 at 9:35 AM, John Kane jrkrid...@yahoo.ca wrote:
 I had thought that I had apa6 working nicely (I think I was wrong) and
 decided to have a go at comgining it with knitr.

 I successfully embedded an inline statement, then created both a table and a
 figure. (see attached file).
 Both were running fine untill I updated R yesterday

 I'm suddenly getting the error It seems you are using the Sweave-specific
 sntsx; you may need to run 'Sweave2knitr('basic.knitr.attempt1.Rnw')'

 This gives the error :
 john@john-K53U:~/Lyx$ Sweave2knitr('basic.knitr.attempt1.Rnw')
 bash: syntax error near unexpected token `'basic.knitr.attempt1.Rnw''

 I got this with a slightly larger file where I was working with the document
 class apa6 and knitr so for simplicity  I striped my example down to this so
 it appears it is knitr error and not something I have done playing with
 settings to get apa6 and biblatex to work

 What stupid error am I making now?  Or do I just have to update things?

 If this is the wrong mailing list can anyone point me in the right
 direction?
 Thanks

 LyX 2.0.4

 R info
 R version 2.15.2 (2012-10-26)
 Platform: i686-pc-linux-gnu (32-bit)

 locale:
  [1] LC_CTYPE=en_CA.UTF-8   LC_NUMERIC=C
  [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_CA.UTF-8
  [5] LC_MONETARY=en_CA.UTF-8LC_MESSAGES=en_CA.UTF-8
  [7] LC_PAPER=C LC_NAME=C
  [9] LC_ADDRESS=C   LC_TELEPHONE=C
 [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C

 attached base packages:
 [1] grid  stats graphics  grDevices utils datasets  methods
 base

 other attached packages:
 [1] lubridate_1.2.0directlabels_2.9   RColorBrewer_1.0-5 gridExtra_0.9.1
 [5] stringr_0.6.2  scales_0.2.3   plyr_1.8   reshape2_1.2.2
 [9] ggplot2_0.9.3

 loaded via a namespace (and not attached):
 [1] colorspace_1.2-1 dichromat_2.0-0  digest_0.6.1 gtable_0.1.2
 [5] labeling_0.1 MASS_7.3-23  munsell_0.4  proto_0.3-10
 [9] tools_2.15.2



Re: kitr problem after R update.

2013-01-26 Thread Yihui Xie
Please see the NEWS for knitr 1.0 (now 1.0.5):
https://github.com/yihui/knitr/blob/master/NEWS.md#changes-in-knitr-version-10
Sweave2knitr() is a function in knitr instead of an executable in your
Ubuntu system: http://yihui.name/knitr/demo/sweave/

In your case, the chunk options "height=4cm, width=4cm" are invalid;
please read the documentation for chunk options:
http://yihui.name/knitr/options On one hand, there are no options
called height and width (only fig.height/fig.width or
out.height/out.width); on the other, 4cm is not a valid R object.

To René Mayer: you also had problems after upgrading knitr, but you
did not show me examples, so I have to guess - maybe you had some
non-ASCII characters in your document, and knitr 1.0 added encoding
support; I have submitted a patch to LyX accordingly:
http://www.lyx.org/trac/ticket/8504 For now, you can download the new
lyxknitr.R from
https://raw.github.com/yihui/lyx/master/scripts/lyxknitr.R and put it
under ~/lyx/scripts/. After LyX 2.0.6 is out, you will not need it.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sat, Jan 26, 2013 at 9:35 AM, John Kane <jrkrid...@yahoo.ca> wrote:
> I had thought that I had apa6 working nicely (I think I was wrong) and
> decided to have a go at comgining it with knitr.
>
> I successfully embedded an inline statement, then created both a table and a
> figure. (see attached file).
> Both were running fine untill I updated R yesterday
>
> I'm suddenly getting the error "It seems you are using the Sweave-specific
> sntsx; you may need to run 'Sweave2knitr('basic.knitr.attempt1.Rnw')'
>
> This gives the error :
> john@john-K53U:~/Lyx$ Sweave2knitr('basic.knitr.attempt1.Rnw')
> bash: syntax error near unexpected token `'basic.knitr.attempt1.Rnw''
>
> I got this with a slightly larger file where I was working with the document
> class apa6 and knitr so for simplicity  I striped my example down to this so
> it appears it is knitr error and not something I have done playing with
> settings to get apa6 and biblatex to work
>
> What stupid error am I making now?  Or do I just have to update things?
>
> If this is the wrong mailing list can anyone point me in the right
> direction?
> Thanks
>
> LyX 2.0.4
>
> R info
> R version 2.15.2 (2012-10-26)
> Platform: i686-pc-linux-gnu (32-bit)
>
> locale:
>  [1] LC_CTYPE=en_CA.UTF-8   LC_NUMERIC=C
>  [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_CA.UTF-8
>  [5] LC_MONETARY=en_CA.UTF-8LC_MESSAGES=en_CA.UTF-8
>  [7] LC_PAPER=C LC_NAME=C
>  [9] LC_ADDRESS=C   LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] grid  stats graphics  grDevices utils datasets  methods
> base
>
> other attached packages:
> [1] lubridate_1.2.0directlabels_2.9   RColorBrewer_1.0-5 gridExtra_0.9.1
> [5] stringr_0.6.2  scales_0.2.3   plyr_1.8   reshape2_1.2.2
> [9] ggplot2_0.9.3
>
> loaded via a namespace (and not attached):
> [1] colorspace_1.2-1 dichromat_2.0-0  digest_0.6.1 gtable_0.1.2
> [5] labeling_0.1 MASS_7.3-23  munsell_0.4  proto_0.3-10
> [9] tools_2.15.2
>


Re: Problems with dcolumn package

2012-12-17 Thread Yihui Xie
bug #7741:

http://www.lyx.org/announce/2_0_5.txt
http://www.lyx.org/trac/ticket/7741

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Dec 17, 2012 at 3:56 AM, José Luis Cañadas
canadasre...@gmail.com wrote:
 Oh..

 When I change the language in lyx for Spanish to English with utf8 encoding,
 it's work..

 It's weird, I'll have to investigate



Re: Problems with dcolumn package

2012-12-17 Thread Yihui Xie
bug #7741:

http://www.lyx.org/announce/2_0_5.txt
http://www.lyx.org/trac/ticket/7741

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Dec 17, 2012 at 3:56 AM, José Luis Cañadas
canadasre...@gmail.com wrote:
 Oh..

 When I change the language in lyx for Spanish to English with utf8 encoding,
 it's work..

 It's weird, I'll have to investigate



Re: Problems with dcolumn package

2012-12-17 Thread Yihui Xie
bug #7741:

http://www.lyx.org/announce/2_0_5.txt
http://www.lyx.org/trac/ticket/7741

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Dec 17, 2012 at 3:56 AM, José Luis Cañadas
<canadasre...@gmail.com> wrote:
> Oh..
>
> When I change the language in lyx for Spanish to English with utf8 encoding,
> it's work..
>
> It's weird, I'll have to investigate
>


Re: Problems with dcolumn package

2012-12-16 Thread Yihui Xie
I'm sorry but what exactly was the problem? I can compile it without
any problems in LyX, and here is a screenshot: http://imgur.com/bX7I7

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Dec 16, 2012 at 1:30 PM, Jose Luis Cañadas
canadasre...@gmail.com wrote:
 Hello.

 I'm using lyx with the knitr  (to comunicate with R language) module to
 write my analysis report, and I have a problem with dcolumn packages


 Example without lyx (it works)
 Using gedit or Rstudio, and compile using Knitr package in R language.

 \documentclass{article}
 \usepackage{booktabs}
 \usepackage{dcolumn}
 \begin{document}

 =
 library(memisc)

 X1 - rnorm(1000)
 X2 - rnorm(1000)
 X3 - rnorm(1000)
 X4 - rnorm(1000)

 #Create a relationship to Model:
 Y - X1 + 1.8*X2 -.12*X3 + 1.8*X4 + rnorm(1000)
 Model.1 - lm(Y ~ X1 + X2)
 Model.2 - lm(Y ~ X1 + X3)
 Model.3 - lm(Y ~ X1 + X2 + X3)
 Model.4 - lm(Y ~ X1 + X2 + X3 + X4)

 tabla - mtable(Model.1,Model.2,Model.3,Model.4)
 @

 results='asis'=
 toLatex(tabla)
 @

 \end{document}

 In my lyx document I write in preamble
 \usepackage{booktabs}
 \usepackage{dcolumn}

 And the next of document is similar, with the chunks = @ into a TEX
 box.

 I think what the problem is in dcolumn package because when I write

 results='asis'=
 toLatex(tabla,useDcolumn=FALSE)
 @

 PDF is compiled but I don't get decimal-alignment.

 Any idea?

 Thanks.



Re: Problems with dcolumn package

2012-12-16 Thread Yihui Xie
I'm sorry but what exactly was the problem? I can compile it without
any problems in LyX, and here is a screenshot: http://imgur.com/bX7I7

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Dec 16, 2012 at 1:30 PM, Jose Luis Cañadas
canadasre...@gmail.com wrote:
 Hello.

 I'm using lyx with the knitr  (to comunicate with R language) module to
 write my analysis report, and I have a problem with dcolumn packages


 Example without lyx (it works)
 Using gedit or Rstudio, and compile using Knitr package in R language.

 \documentclass{article}
 \usepackage{booktabs}
 \usepackage{dcolumn}
 \begin{document}

 =
 library(memisc)

 X1 - rnorm(1000)
 X2 - rnorm(1000)
 X3 - rnorm(1000)
 X4 - rnorm(1000)

 #Create a relationship to Model:
 Y - X1 + 1.8*X2 -.12*X3 + 1.8*X4 + rnorm(1000)
 Model.1 - lm(Y ~ X1 + X2)
 Model.2 - lm(Y ~ X1 + X3)
 Model.3 - lm(Y ~ X1 + X2 + X3)
 Model.4 - lm(Y ~ X1 + X2 + X3 + X4)

 tabla - mtable(Model.1,Model.2,Model.3,Model.4)
 @

 results='asis'=
 toLatex(tabla)
 @

 \end{document}

 In my lyx document I write in preamble
 \usepackage{booktabs}
 \usepackage{dcolumn}

 And the next of document is similar, with the chunks = @ into a TEX
 box.

 I think what the problem is in dcolumn package because when I write

 results='asis'=
 toLatex(tabla,useDcolumn=FALSE)
 @

 PDF is compiled but I don't get decimal-alignment.

 Any idea?

 Thanks.



Re: Problems with dcolumn package

2012-12-16 Thread Yihui Xie
I'm sorry but what exactly was the problem? I can compile it without
any problems in LyX, and here is a screenshot: http://imgur.com/bX7I7

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Dec 16, 2012 at 1:30 PM, Jose Luis Cañadas
<canadasre...@gmail.com> wrote:
> Hello.
>
> I'm using lyx with the knitr  (to comunicate with R language) module to
> write my analysis report, and I have a problem with dcolumn packages
>
>
> Example without lyx (it works)
> Using gedit or Rstudio, and compile using Knitr package in R language.
>
> \documentclass{article}
> \usepackage{booktabs}
> \usepackage{dcolumn}
> \begin{document}
>
> <<>>=
> library(memisc)
>
> X1 <- rnorm(1000)
> X2 <- rnorm(1000)
> X3 <- rnorm(1000)
> X4 <- rnorm(1000)
>
> #Create a relationship to Model:
> Y <- X1 + 1.8*X2 -.12*X3 + 1.8*X4 + rnorm(1000)
> Model.1 <- lm(Y ~ X1 + X2)
> Model.2 <- lm(Y ~ X1 + X3)
> Model.3 <- lm(Y ~ X1 + X2 + X3)
> Model.4 <- lm(Y ~ X1 + X2 + X3 + X4)
>
> tabla <- mtable(Model.1,Model.2,Model.3,Model.4)
> @
>
> <

Input an Sweave/knitr chunk via command sequence

2012-11-27 Thread Yihui Xie
This is a solution instead of a question. Over a long I have been
wondering how to input an Sweave chunk template in LyX, i.e. = and
@. I just figured it out thanks to the hint from Liviu. We can add a
shortcut (Preferences=Editing=Shortcuts) with this command sequence
(be sure _not_ to include the possible line breaks introduced by
Gmail):

command-sequence ert-insert; unicode-insert 0x3C;  unicode-insert
0x3C; unicode-insert 0x3E; unicode-insert 0x3E; unicode-insert 0x3D;
break-paragraph; break-paragraph; unicode-insert 0x40; up;

We can assign it to, say, Ctrl+Alt+I (the same shortcut as RStudio).
Then we will be able to input this quickly:

=
# cursor moved here automatically
@

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


Re: Input an Sweave/knitr chunk via command sequence

2012-11-27 Thread Yihui Xie
Thanks, I'll keep that in mind.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Tue, Nov 27, 2012 at 12:21 PM, Scott Kostyshak skost...@lyx.org wrote:
 On Tue, Nov 27, 2012 at 12:44 PM, Yihui Xie x...@yihui.name wrote:
 This is a solution instead of a question. Over a long I have been
 wondering how to input an Sweave chunk template in LyX, i.e. = and
 @. I just figured it out thanks to the hint from Liviu. We can add a
 shortcut (Preferences=Editing=Shortcuts) with this command sequence
 (be sure _not_ to include the possible line breaks introduced by
 Gmail):

 command-sequence ert-insert; unicode-insert 0x3C;  unicode-insert
 0x3C; unicode-insert 0x3E; unicode-insert 0x3E; unicode-insert 0x3D;
 break-paragraph; break-paragraph; unicode-insert 0x40; up;

 Thanks, Liviu and Yihui. This is indeed handy. Note that in master (to
 become 2.1), break-paragraph is renamed to paragraph-break.

 In master branch, the following works:

 command-sequence ert-insert; unicode-insert 0x3C;  unicode-insert
 0x3C; unicode-insert 0x3E; unicode-insert 0x3E; unicode-insert 0x3D;
 paragraph-break; paragraph-break; unicode-insert 0x40; up;

 The former LFUN was discordant with the LFUN naming rules, in
 particular 1) Use the object.event order. That is, use
 `word-forward' instead of `forward-word'

 Scott


Input an Sweave/knitr chunk via command sequence

2012-11-27 Thread Yihui Xie
This is a solution instead of a question. Over a long I have been
wondering how to input an Sweave chunk template in LyX, i.e. = and
@. I just figured it out thanks to the hint from Liviu. We can add a
shortcut (Preferences=Editing=Shortcuts) with this command sequence
(be sure _not_ to include the possible line breaks introduced by
Gmail):

command-sequence ert-insert; unicode-insert 0x3C;  unicode-insert
0x3C; unicode-insert 0x3E; unicode-insert 0x3E; unicode-insert 0x3D;
break-paragraph; break-paragraph; unicode-insert 0x40; up;

We can assign it to, say, Ctrl+Alt+I (the same shortcut as RStudio).
Then we will be able to input this quickly:

=
# cursor moved here automatically
@

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


Re: Input an Sweave/knitr chunk via command sequence

2012-11-27 Thread Yihui Xie
Thanks, I'll keep that in mind.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Tue, Nov 27, 2012 at 12:21 PM, Scott Kostyshak skost...@lyx.org wrote:
 On Tue, Nov 27, 2012 at 12:44 PM, Yihui Xie x...@yihui.name wrote:
 This is a solution instead of a question. Over a long I have been
 wondering how to input an Sweave chunk template in LyX, i.e. = and
 @. I just figured it out thanks to the hint from Liviu. We can add a
 shortcut (Preferences=Editing=Shortcuts) with this command sequence
 (be sure _not_ to include the possible line breaks introduced by
 Gmail):

 command-sequence ert-insert; unicode-insert 0x3C;  unicode-insert
 0x3C; unicode-insert 0x3E; unicode-insert 0x3E; unicode-insert 0x3D;
 break-paragraph; break-paragraph; unicode-insert 0x40; up;

 Thanks, Liviu and Yihui. This is indeed handy. Note that in master (to
 become 2.1), break-paragraph is renamed to paragraph-break.

 In master branch, the following works:

 command-sequence ert-insert; unicode-insert 0x3C;  unicode-insert
 0x3C; unicode-insert 0x3E; unicode-insert 0x3E; unicode-insert 0x3D;
 paragraph-break; paragraph-break; unicode-insert 0x40; up;

 The former LFUN was discordant with the LFUN naming rules, in
 particular 1) Use the object.event order. That is, use
 `word-forward' instead of `forward-word'

 Scott


Input an Sweave/knitr chunk via command sequence

2012-11-27 Thread Yihui Xie
This is a solution instead of a question. Over a long I have been
wondering how to input an Sweave chunk template in LyX, i.e. <<>>= and
@. I just figured it out thanks to the hint from Liviu. We can add a
shortcut (Preferences=>Editing=>Shortcuts) with this command sequence
(be sure _not_ to include the possible line breaks introduced by
Gmail):

command-sequence ert-insert; unicode-insert 0x3C;  unicode-insert
0x3C; unicode-insert 0x3E; unicode-insert 0x3E; unicode-insert 0x3D;
break-paragraph; break-paragraph; unicode-insert 0x40; up;

We can assign it to, say, Ctrl+Alt+I (the same shortcut as RStudio).
Then we will be able to input this quickly:

<<>>=
# cursor moved here automatically
@

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


Re: Input an Sweave/knitr chunk via command sequence

2012-11-27 Thread Yihui Xie
Thanks, I'll keep that in mind.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Tue, Nov 27, 2012 at 12:21 PM, Scott Kostyshak <skost...@lyx.org> wrote:
> On Tue, Nov 27, 2012 at 12:44 PM, Yihui Xie <x...@yihui.name> wrote:
>> This is a solution instead of a question. Over a long I have been
>> wondering how to input an Sweave chunk template in LyX, i.e. <<>>= and
>> @. I just figured it out thanks to the hint from Liviu. We can add a
>> shortcut (Preferences=>Editing=>Shortcuts) with this command sequence
>> (be sure _not_ to include the possible line breaks introduced by
>> Gmail):
>>
>> command-sequence ert-insert; unicode-insert 0x3C;  unicode-insert
>> 0x3C; unicode-insert 0x3E; unicode-insert 0x3E; unicode-insert 0x3D;
>> break-paragraph; break-paragraph; unicode-insert 0x40; up;
>
> Thanks, Liviu and Yihui. This is indeed handy. Note that in master (to
> become 2.1), "break-paragraph" is renamed to "paragraph-break".
>
> In master branch, the following works:
>
> command-sequence ert-insert; unicode-insert 0x3C;  unicode-insert
> 0x3C; unicode-insert 0x3E; unicode-insert 0x3E; unicode-insert 0x3D;
> paragraph-break; paragraph-break; unicode-insert 0x40; up;
>
> The former LFUN was discordant with the LFUN naming rules, in
> particular <<1) Use the object.event order. That is, use
> `word-forward' instead of `forward-word'>>
>
> Scott


Re: Having a problem including an AT, '@', in my output (Document module = Sweave)

2012-11-12 Thread Yihui Xie
Could you attach a minimal real *.lyx file? I do not understand what
pseudo-html markup means.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Nov 12, 2012 at 7:26 PM, Mark mark.dalp...@pacificedge.co.nz wrote:
 Hi,

 Running lyx, version 2.0.5, built from source today.
 Host system is (old): kubuntu 8.04

 I am writing an in-house document which shows how to use Sweave. This means 
 I
 want to both show the Sweave code and then the results of the Sweave code
 being run. This has worked in the distant past (lyx version 1.4?) but as I
 update the document now, I am having problems.

 In my example below, I use pseudo-html markup to show the Lyx paragraph types.

 Eg:
 Lyx-code paragraph:
echo=FALSE,results=tex=
 print( toLatex( sessionInfo() ))
 @
 /lyx-code

 chunk paragraph:
 echo=FALSE,results=tex=
 print( toLatex( sessionInfo() ))
 @
 /chunk

 This works fine (as expected) except that the AT-sign, '@', in the lyx-code
 paragraph gets eaten and does not show up in the output. I can circumvent 
 the
 problem by adding a thin-space in front of the '@', however, it implies that I
 need to know when characters will be eaten. I don't know the rules yet.

 If I use the File -- Export -- LaTeX (plain) option, there is no '@' in the
 tex file.

 Cheers,
 Mark



Re: Having a problem including an AT, '@', in my output (Document module = Sweave)

2012-11-12 Thread Yihui Xie
[We did receive two posts; your email client may not post your own
email to your own account.]

I can reproduce your problem with the example, but I guess that is
probably due to Sweave instead of LyX -- it interprets @ as the
beginning of text chunks, hence it is removed in the tex output. To
verify this, you can try the knitr module after
install.packages('knitr') in R, and @ will be there as expected. In
case you are not aware of it, knitr is an alternative to Sweave (and
I'm shamelessly advertising here).

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Nov 12, 2012 at 9:01 PM, Mark Dalphin
mark.dalp...@pacificedge.co.nz wrote:
 I have created and attached a simple example showing the error.

 [If this is a double-post, I apologize. I have subscribed to the lyx-user
 maillist as the first posting did not appear to work]


 Regards,
 Mark



Re: Having a problem including an AT, '@', in my output (Document module = Sweave)

2012-11-12 Thread Yihui Xie
Could you attach a minimal real *.lyx file? I do not understand what
pseudo-html markup means.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Nov 12, 2012 at 7:26 PM, Mark mark.dalp...@pacificedge.co.nz wrote:
 Hi,

 Running lyx, version 2.0.5, built from source today.
 Host system is (old): kubuntu 8.04

 I am writing an in-house document which shows how to use Sweave. This means 
 I
 want to both show the Sweave code and then the results of the Sweave code
 being run. This has worked in the distant past (lyx version 1.4?) but as I
 update the document now, I am having problems.

 In my example below, I use pseudo-html markup to show the Lyx paragraph types.

 Eg:
 Lyx-code paragraph:
echo=FALSE,results=tex=
 print( toLatex( sessionInfo() ))
 @
 /lyx-code

 chunk paragraph:
 echo=FALSE,results=tex=
 print( toLatex( sessionInfo() ))
 @
 /chunk

 This works fine (as expected) except that the AT-sign, '@', in the lyx-code
 paragraph gets eaten and does not show up in the output. I can circumvent 
 the
 problem by adding a thin-space in front of the '@', however, it implies that I
 need to know when characters will be eaten. I don't know the rules yet.

 If I use the File -- Export -- LaTeX (plain) option, there is no '@' in the
 tex file.

 Cheers,
 Mark



Re: Having a problem including an AT, '@', in my output (Document module = Sweave)

2012-11-12 Thread Yihui Xie
[We did receive two posts; your email client may not post your own
email to your own account.]

I can reproduce your problem with the example, but I guess that is
probably due to Sweave instead of LyX -- it interprets @ as the
beginning of text chunks, hence it is removed in the tex output. To
verify this, you can try the knitr module after
install.packages('knitr') in R, and @ will be there as expected. In
case you are not aware of it, knitr is an alternative to Sweave (and
I'm shamelessly advertising here).

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Nov 12, 2012 at 9:01 PM, Mark Dalphin
mark.dalp...@pacificedge.co.nz wrote:
 I have created and attached a simple example showing the error.

 [If this is a double-post, I apologize. I have subscribed to the lyx-user
 maillist as the first posting did not appear to work]


 Regards,
 Mark



Re: Having a problem including an AT, '@', in my output (Document module = Sweave)

2012-11-12 Thread Yihui Xie
Could you attach a minimal real *.lyx file? I do not understand what
"pseudo-html markup" means.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Nov 12, 2012 at 7:26 PM, Mark <mark.dalp...@pacificedge.co.nz> wrote:
> Hi,
>
> Running lyx, version 2.0.5, built from source today.
> Host system is (old): kubuntu 8.04
>
> I am writing an in-house document which shows how to use "Sweave". This means 
> I
> want to both show the "Sweave" code and then the results of the Sweave code
> being run. This has worked in the distant past (lyx version 1.4?) but as I
> update the document now, I am having problems.
>
> In my example below, I use pseudo-html markup to show the Lyx paragraph types.
>
> Eg:
>  paragraph:
><

Re: Having a problem including an AT, '@', in my output (Document module = Sweave)

2012-11-12 Thread Yihui Xie
[We did receive two posts; your email client may not post your own
email to your own account.]

I can reproduce your problem with the example, but I guess that is
probably due to Sweave instead of LyX -- it interprets @ as the
beginning of text chunks, hence it is removed in the tex output. To
verify this, you can try the knitr module after
install.packages('knitr') in R, and @ will be there as expected. In
case you are not aware of it, knitr is an alternative to Sweave (and
I'm shamelessly advertising here).

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Nov 12, 2012 at 9:01 PM, Mark Dalphin
<mark.dalp...@pacificedge.co.nz> wrote:
> I have created and attached a simple example showing the error.
>
> [If this is a double-post, I apologize. I have subscribed to the lyx-user
> maillist as the first posting did not appear to work]
>
>
> Regards,
> Mark
>


Re: Lyx vs Kile

2012-11-05 Thread Yihui Xie
Coincidently I discussed this just a couple of days ago:
http://yihui.name/en/2012/10/lyx-vs-latex/

LyX is absolutely a big time-saver. My productivity was boosted by
300% after using raw LaTeX for 5 years, since I would never be lost in
nested itemized environments, or math equations, or
(sub){0,2}sections, or \includegraphics{}. Everything is so clear.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Nov 5, 2012 at 1:29 PM, VA cuyfa...@hotmail.com wrote:
 I use Win7 with both LyX and TeXStudio.

 The purist in me likes working with the source code of TeXStudio as it
 provides a high level of precise control over the document. But, I really,
 REALLY, prefer the WYSIWYM interface of LyX. I do a lot of outlining with
 the enumerate environment, and doing it visually with the LyX interface,
 using the tab key to move from one level to the next is as easy as pie.
 With the pure LaTeX code, I get lost in the different outline levels within
 the document and often forget to put in an \end{enumerate} somewhere. LyX
 handles that for me.

 LyX insulates me from a lot of LaTeX source code. That said, I still put a
 lot of stuff into the preamble through the document/settings menu option.

 Without LyX, I would have never had the patience to try to learn LaTeX. LyX
 has provided the training wheels that allowed me to venture into the
 typesetting world.

 Virgil

 -Original Message- From: Richard Heck
 Sent: Monday, November 05, 2012 1:40 PM
 To: Thomas Johansson
 Cc: lyx-users@lists.lyx.org ; Thomas Ernst
 Subject: Re: Lyx vs Kile

 On 11/05/2012 12:15 PM, Thomas Johansson wrote:

 Hi
 My name is Thomas, im helping a friend whos isn't particuarly home with
 computers even though he uses Mathematica and Kile on a Linux CentOS system
 to produce mathematical reports. He has some thoughts on moving to Win7
 environment but he has concerns regarding the WYSIWYM editor, because he is
 used to struggle with the source based stuff :-)
 So i short, are the any big differences regarding the potential output
 and/or limitations connected to the use of Lyx compared to for example the
 Kile editor?

 In principle, you can do anything in LyX you can do in Kile, because you
 can enter raw LaTeX into LyX if you wish. But that's not really the
 point of LyX. Rather, this is:

 How much time is it possible to save if the normal state of things is
 struggling with formatting, commands etc in the source based stuff?

 Tons. The whole idea is to hide the details of LaTeX from the user, so
 that LyX works more like a traditional word processor, though it's
 also different in lots of other ways.

 Richard



Re: Lyx vs Kile

2012-11-05 Thread Yihui Xie
Coincidently I discussed this just a couple of days ago:
http://yihui.name/en/2012/10/lyx-vs-latex/

LyX is absolutely a big time-saver. My productivity was boosted by
300% after using raw LaTeX for 5 years, since I would never be lost in
nested itemized environments, or math equations, or
(sub){0,2}sections, or \includegraphics{}. Everything is so clear.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Nov 5, 2012 at 1:29 PM, VA cuyfa...@hotmail.com wrote:
 I use Win7 with both LyX and TeXStudio.

 The purist in me likes working with the source code of TeXStudio as it
 provides a high level of precise control over the document. But, I really,
 REALLY, prefer the WYSIWYM interface of LyX. I do a lot of outlining with
 the enumerate environment, and doing it visually with the LyX interface,
 using the tab key to move from one level to the next is as easy as pie.
 With the pure LaTeX code, I get lost in the different outline levels within
 the document and often forget to put in an \end{enumerate} somewhere. LyX
 handles that for me.

 LyX insulates me from a lot of LaTeX source code. That said, I still put a
 lot of stuff into the preamble through the document/settings menu option.

 Without LyX, I would have never had the patience to try to learn LaTeX. LyX
 has provided the training wheels that allowed me to venture into the
 typesetting world.

 Virgil

 -Original Message- From: Richard Heck
 Sent: Monday, November 05, 2012 1:40 PM
 To: Thomas Johansson
 Cc: lyx-users@lists.lyx.org ; Thomas Ernst
 Subject: Re: Lyx vs Kile

 On 11/05/2012 12:15 PM, Thomas Johansson wrote:

 Hi
 My name is Thomas, im helping a friend whos isn't particuarly home with
 computers even though he uses Mathematica and Kile on a Linux CentOS system
 to produce mathematical reports. He has some thoughts on moving to Win7
 environment but he has concerns regarding the WYSIWYM editor, because he is
 used to struggle with the source based stuff :-)
 So i short, are the any big differences regarding the potential output
 and/or limitations connected to the use of Lyx compared to for example the
 Kile editor?

 In principle, you can do anything in LyX you can do in Kile, because you
 can enter raw LaTeX into LyX if you wish. But that's not really the
 point of LyX. Rather, this is:

 How much time is it possible to save if the normal state of things is
 struggling with formatting, commands etc in the source based stuff?

 Tons. The whole idea is to hide the details of LaTeX from the user, so
 that LyX works more like a traditional word processor, though it's
 also different in lots of other ways.

 Richard



Re: Lyx vs Kile

2012-11-05 Thread Yihui Xie
Coincidently I discussed this just a couple of days ago:
http://yihui.name/en/2012/10/lyx-vs-latex/

LyX is absolutely a big time-saver. My productivity was boosted by
300% after using raw LaTeX for 5 years, since I would never be lost in
nested itemized environments, or math equations, or
(sub){0,2}sections, or \includegraphics{}. Everything is so clear.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Nov 5, 2012 at 1:29 PM, VA <cuyfa...@hotmail.com> wrote:
> I use Win7 with both LyX and TeXStudio.
>
> The purist in me likes working with the source code of TeXStudio as it
> provides a high level of precise control over the document. But, I really,
> REALLY, prefer the WYSIWYM interface of LyX. I do a lot of outlining with
> the enumerate environment, and doing it visually with the LyX interface,
> using the  key to move from one level to the next is as easy as pie.
> With the pure LaTeX code, I get lost in the different outline levels within
> the document and often forget to put in an "\end{enumerate}" somewhere. LyX
> handles that for me.
>
> LyX insulates me from a lot of LaTeX source code. That said, I still put a
> lot of stuff into the preamble through the "document/settings" menu option.
>
> Without LyX, I would have never had the patience to try to learn LaTeX. LyX
> has provided the training wheels that allowed me to venture into the
> typesetting world.
>
> Virgil
>
> -Original Message- From: Richard Heck
> Sent: Monday, November 05, 2012 1:40 PM
> To: Thomas Johansson
> Cc: lyx-users@lists.lyx.org ; Thomas Ernst
> Subject: Re: Lyx vs Kile
>
> On 11/05/2012 12:15 PM, Thomas Johansson wrote:
>>
>> Hi
>> My name is Thomas, im helping a friend whos isn't particuarly home with
>> computers even though he uses Mathematica and Kile on a Linux CentOS system
>> to produce mathematical reports. He has some thoughts on moving to Win7
>> environment but he has concerns regarding the WYSIWYM editor, because he is
>> used to struggle with the source based stuff :-)
>> So i short, are the any big differences regarding the potential output
>> and/or limitations connected to the use of Lyx compared to for example the
>> Kile editor?
>>
> In principle, you can do anything in LyX you can do in Kile, because you
> can enter raw LaTeX into LyX if you wish. But that's not really the
> point of LyX. Rather, this is:
>
>> How much time is it possible to save if the normal state of things is
>> struggling with formatting, commands etc in the source based stuff?
>>
> Tons. The whole idea is to hide the details of LaTeX from the user, so
> that LyX works more like a traditional "word processor", though it's
> also different in lots of other ways.
>
> Richard
>


Re: Knitr (Rnw) Rscript error log

2012-10-01 Thread Yihui Xie
That is something confused me as well. Here is a screenshot of what I
was talking about: http://i.imgur.com/vkLhP.png It only sets the
language of the GUI and will not affect the document itself.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Oct 1, 2012 at 3:36 PM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote:
 Le 01/10/12 21:37, Michael Bach a écrit :
 I am using an American locale and GUI, so interface language default
 does not work.


 What do you mean exactly? Is it just that the US GUI is not convenient to
 you? You do not need the German UI to input German documents.

 JMarc


Re: Knitr (Rnw) Rscript error log

2012-10-01 Thread Yihui Xie
That is something confused me as well. Here is a screenshot of what I
was talking about: http://i.imgur.com/vkLhP.png It only sets the
language of the GUI and will not affect the document itself.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Oct 1, 2012 at 3:36 PM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote:
 Le 01/10/12 21:37, Michael Bach a écrit :
 I am using an American locale and GUI, so interface language default
 does not work.


 What do you mean exactly? Is it just that the US GUI is not convenient to
 you? You do not need the German UI to input German documents.

 JMarc


Re: Knitr (Rnw) Rscript error log

2012-10-01 Thread Yihui Xie
That is something confused me as well. Here is a screenshot of what I
was talking about: http://i.imgur.com/vkLhP.png It only sets the
language of the GUI and will not affect the document itself.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Oct 1, 2012 at 3:36 PM, Jean-Marc Lasgouttes <lasgout...@lyx.org> wrote:
> Le 01/10/12 21:37, Michael Bach a écrit :
>> I am using an American locale and GUI, so interface language default
>> does not work.
>
>
> What do you mean exactly? Is it just that the US GUI is not convenient to
> you? You do not need the German UI to input German documents.
>
> JMarc


Re: Knitr (Rnw) Rscript error log

2012-09-30 Thread Yihui Xie
You can make a copy of that document, delete everything in it, and
only put a code chunk

=
sessionInfo()
@

there and compile it. Then show us the results from sessionInfo().

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Sep 30, 2012 at 2:11 PM, Michael Bach pha...@gmail.com wrote:
 I found the error source, but have no clue for a fix yet. The resulting .tex
 document after a LyX-caused knit() is cut off exactly at the first
 occurrence of a German diacritic o, i.e. the character ö. This is also in
 line with the fact that the knitr-minimal example runs fine since it is
 written in English...

 As I wrote earlier, a manual knit() from an R session on the .Rnw file
 succeeds. So I guess there is something wrong with the UTF-8 part in the
 Rscript call by the knitr(Rnw) module(?).

 For reference:


 12:13:14.353: Rscript --verbose --no-save --no-restore
 /Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R

 /var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.Rnw

 /var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/tex
 UTF-8 /Users/XYZ/Documents/...

 R and Terminal locale are set correctly as mentioned in a previous post.

 @Yihui:

 Do you remember any similar issues when updating knitr.module and
 lyxknitr.R?

 @Scott:

 I will try your attached files if that could help now as the error is
 obvious.

 Michael


Re: Knitr (Rnw) Rscript error log

2012-09-30 Thread Yihui Xie
Wonderful. That is the root of the problem. The locale should not be C.

This bug has been biting us: http://www.lyx.org/trac/ticket/7741

If you are using the German translation of the GUI, you can set the
interface language option to be Default in the preferences. Otherwise
you have to wait for LyX 2.0.5 for the bug fix.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Sep 30, 2012 at 5:06 PM, Michael Bach pha...@gmail.com wrote:
 On 9/30/12 10:51 PM, Yihui Xie wrote:

 You can make a copy of that document, delete everything in it, and
 only put a code chunk

 =
 sessionInfo()
 @

 there and compile it. Then show us the results from sessionInfo().


 Good idea, it is as I suspected:

 sessionInfo()
 ## R version 2.15.1 (2012-06-22)
 ## Platform: i386-apple-darwin9.8.0/i386 (32-bit)
 ##
 ## locale:
 ## [1] C
 ##
 ## attached base packages:
 ## [1] stats graphics  grDevices utils datasets  base
 ##
 ## other attached packages:
 ## [1] knitr_0.8
 ##
 ## loaded via a namespace (and not attached):
 ## [1] digest_0.5.2   evaluate_0.4.2 formatR_0.6plyr_1.7.1
 ## [5] stringr_0.6.1  tools_2.15.1

 The R started from Terminal picks up the utf-8 locale, Rscript does not.
 How/where best to look next?

 Michael


Re: Knitr (Rnw) Rscript error log

2012-09-30 Thread Yihui Xie
You can make a copy of that document, delete everything in it, and
only put a code chunk

=
sessionInfo()
@

there and compile it. Then show us the results from sessionInfo().

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Sep 30, 2012 at 2:11 PM, Michael Bach pha...@gmail.com wrote:
 I found the error source, but have no clue for a fix yet. The resulting .tex
 document after a LyX-caused knit() is cut off exactly at the first
 occurrence of a German diacritic o, i.e. the character ö. This is also in
 line with the fact that the knitr-minimal example runs fine since it is
 written in English...

 As I wrote earlier, a manual knit() from an R session on the .Rnw file
 succeeds. So I guess there is something wrong with the UTF-8 part in the
 Rscript call by the knitr(Rnw) module(?).

 For reference:


 12:13:14.353: Rscript --verbose --no-save --no-restore
 /Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R

 /var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.Rnw

 /var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/tex
 UTF-8 /Users/XYZ/Documents/...

 R and Terminal locale are set correctly as mentioned in a previous post.

 @Yihui:

 Do you remember any similar issues when updating knitr.module and
 lyxknitr.R?

 @Scott:

 I will try your attached files if that could help now as the error is
 obvious.

 Michael


Re: Knitr (Rnw) Rscript error log

2012-09-30 Thread Yihui Xie
Wonderful. That is the root of the problem. The locale should not be C.

This bug has been biting us: http://www.lyx.org/trac/ticket/7741

If you are using the German translation of the GUI, you can set the
interface language option to be Default in the preferences. Otherwise
you have to wait for LyX 2.0.5 for the bug fix.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Sep 30, 2012 at 5:06 PM, Michael Bach pha...@gmail.com wrote:
 On 9/30/12 10:51 PM, Yihui Xie wrote:

 You can make a copy of that document, delete everything in it, and
 only put a code chunk

 =
 sessionInfo()
 @

 there and compile it. Then show us the results from sessionInfo().


 Good idea, it is as I suspected:

 sessionInfo()
 ## R version 2.15.1 (2012-06-22)
 ## Platform: i386-apple-darwin9.8.0/i386 (32-bit)
 ##
 ## locale:
 ## [1] C
 ##
 ## attached base packages:
 ## [1] stats graphics  grDevices utils datasets  base
 ##
 ## other attached packages:
 ## [1] knitr_0.8
 ##
 ## loaded via a namespace (and not attached):
 ## [1] digest_0.5.2   evaluate_0.4.2 formatR_0.6plyr_1.7.1
 ## [5] stringr_0.6.1  tools_2.15.1

 The R started from Terminal picks up the utf-8 locale, Rscript does not.
 How/where best to look next?

 Michael


Re: Knitr (Rnw) Rscript error log

2012-09-30 Thread Yihui Xie
You can make a copy of that document, delete everything in it, and
only put a code chunk

<<>>=
sessionInfo()
@

there and compile it. Then show us the results from sessionInfo().

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Sep 30, 2012 at 2:11 PM, Michael Bach <pha...@gmail.com> wrote:
> I found the error source, but have no clue for a fix yet. The resulting .tex
> document after a LyX-caused knit() is cut off exactly at the first
> occurrence of a German diacritic o, i.e. the character ö. This is also in
> line with the fact that the knitr-minimal example runs fine since it is
> written in English...
>
> As I wrote earlier, a manual knit() from an R session on the .Rnw file
> succeeds. So I guess there is something wrong with the UTF-8 part in the
> Rscript call by the knitr(Rnw) module(?).
>
> For reference:
>
>
>> 12:13:14.353: Rscript --verbose --no-save --no-restore
>> "/Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R"
>>
>> "/var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/""skryptum.Rnw"
>>
>> "/var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/""tex"
>> UTF-8 "/Users/XYZ/Documents/..."
>
> R and Terminal locale are set correctly as mentioned in a previous post.
>
> @Yihui:
>
> Do you remember any similar issues when updating knitr.module and
> lyxknitr.R?
>
> @Scott:
>
> I will try your attached files if that could help now as the error is
> obvious.
>
> Michael


Re: Knitr (Rnw) Rscript error log

2012-09-30 Thread Yihui Xie
Wonderful. That is the root of the problem. The locale should not be C.

This bug has been biting us: http://www.lyx.org/trac/ticket/7741

If you are using the German translation of the GUI, you can set the
interface language option to be Default in the preferences. Otherwise
you have to wait for LyX 2.0.5 for the bug fix.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sun, Sep 30, 2012 at 5:06 PM, Michael Bach <pha...@gmail.com> wrote:
> On 9/30/12 10:51 PM, Yihui Xie wrote:
>>
>> You can make a copy of that document, delete everything in it, and
>> only put a code chunk
>>
>> <<>>=
>> sessionInfo()
>> @
>>
>> there and compile it. Then show us the results from sessionInfo().
>>
>
> Good idea, it is as I suspected:
>
> sessionInfo()
> ## R version 2.15.1 (2012-06-22)
> ## Platform: i386-apple-darwin9.8.0/i386 (32-bit)
> ##
> ## locale:
> ## [1] C
> ##
> ## attached base packages:
> ## [1] stats graphics  grDevices utils datasets  base
> ##
> ## other attached packages:
> ## [1] knitr_0.8
> ##
> ## loaded via a namespace (and not attached):
> ## [1] digest_0.5.2   evaluate_0.4.2 formatR_0.6plyr_1.7.1
> ## [5] stringr_0.6.1  tools_2.15.1
>
> The R started from Terminal picks up the utf-8 locale, Rscript does not.
> How/where best to look next?
>
> Michael


Re: Knitr (Rnw) Rscript error log

2012-09-29 Thread Yihui Xie
I think this indicated the problem in your log:

12:13:14.670: Warning in readLines(input, warn = FALSE) :
12:13:14.673:   invalid input found on input connection 'skryptum.Rnw'

But without a reproducible example, I'm afraid I cannot do anything,
especially I do not have Mac OS to test with.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sat, Sep 29, 2012 at 10:52 AM, Michael Bach pha...@gmail.com wrote:
 Just a quick follow-up.

 I gather from the log that R reads the file as UTF-8. I checked my System

 $ locale

 and the R

 Sys.getlocale()

 Both are correctly set up as en_US.UTF-8. Just to rule that one out(?)...



Re: Knitr (Rnw) Rscript error log

2012-09-29 Thread Yihui Xie
He sent me the message log without cc'ing the list, and I saw

12:13:14.353: Rscript --verbose --no-save --no-restore
/Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R
/var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.Rnw
/var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/tex
UTF-8 /Users/XYZ/Documents/...

I think that is Mac OS, although in the first email it was Windows 7.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sat, Sep 29, 2012 at 4:39 PM, Scott Kostyshak skost...@lyx.org wrote:

 I misunderstood. In his original email he stated that he is using Windows 7.
 Sorry for the confusion.

 Scott


Re: Knitr (Rnw) Rscript error log

2012-09-29 Thread Yihui Xie
I think this indicated the problem in your log:

12:13:14.670: Warning in readLines(input, warn = FALSE) :
12:13:14.673:   invalid input found on input connection 'skryptum.Rnw'

But without a reproducible example, I'm afraid I cannot do anything,
especially I do not have Mac OS to test with.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sat, Sep 29, 2012 at 10:52 AM, Michael Bach pha...@gmail.com wrote:
 Just a quick follow-up.

 I gather from the log that R reads the file as UTF-8. I checked my System

 $ locale

 and the R

 Sys.getlocale()

 Both are correctly set up as en_US.UTF-8. Just to rule that one out(?)...



Re: Knitr (Rnw) Rscript error log

2012-09-29 Thread Yihui Xie
He sent me the message log without cc'ing the list, and I saw

12:13:14.353: Rscript --verbose --no-save --no-restore
/Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R
/var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.Rnw
/var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/tex
UTF-8 /Users/XYZ/Documents/...

I think that is Mac OS, although in the first email it was Windows 7.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sat, Sep 29, 2012 at 4:39 PM, Scott Kostyshak skost...@lyx.org wrote:

 I misunderstood. In his original email he stated that he is using Windows 7.
 Sorry for the confusion.

 Scott


Re: Knitr (Rnw) Rscript error log

2012-09-29 Thread Yihui Xie
I think this indicated the problem in your log:

12:13:14.670: Warning in readLines(input, warn = FALSE) :
12:13:14.673:   invalid input found on input connection 'skryptum.Rnw'

But without a reproducible example, I'm afraid I cannot do anything,
especially I do not have Mac OS to test with.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sat, Sep 29, 2012 at 10:52 AM, Michael Bach <pha...@gmail.com> wrote:
> Just a quick follow-up.
>
> I gather from the log that R reads the file as UTF-8. I checked my System
>
> $ locale
>
> and the R
>
>> Sys.getlocale()
>
> Both are correctly set up as en_US.UTF-8. Just to rule that one out(?)...
>


Re: Knitr (Rnw) Rscript error log

2012-09-29 Thread Yihui Xie
He sent me the message log without cc'ing the list, and I saw

12:13:14.353: Rscript --verbose --no-save --no-restore
"/Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R"
"/var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/""skryptum.Rnw"
"/var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/""tex"
UTF-8 "/Users/XYZ/Documents/..."

I think that is Mac OS, although in the first email it was Windows 7.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Sat, Sep 29, 2012 at 4:39 PM, Scott Kostyshak <skost...@lyx.org> wrote:
>
> I misunderstood. In his original email he stated that he is using Windows 7.
> Sorry for the confusion.
>
> Scott


Re: Knitr (Rnw) Rscript error log

2012-09-26 Thread Yihui Xie
The first place to look at is View--View Messages, as described in
the troubleshooting section in Sweave manual (which applies to knitr
as well): https://github.com/downloads/yihui/lyx/sweave.pdf

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Wed, Sep 26, 2012 at 10:16 AM, Michael Bach pha...@gmail.com wrote:
 Hi Scott,

 Thanks for responses.

 Look in the terminal output. It might give you the error.


 I cannot find a terminal output view in LyX - checked all toolbars and View 
 menu.

 You could alternatively do File  Export  R/S code and then run/debug
 the resulting file in R.


 I tried this and after checking each line interactively in the R console and
 commenting out some things in LyX files, e.g. packages that are not available 
 in
 R2.15.1, it runs through, but the LyX called Rscript does not.

 Also note that since version 0.7 :

   - when `opts_knit$get('verbose')` is TRUE, logs (messages, warnings and
   errors) along with the corresponding R code will be printed after `knit()`
   is done; this might help users figure out possible problems in R code
   quickly (#276)


 This is a good hint, I set it with:
 opts_knit$set(verbose = TRUE)

 inside the first code chunk, but I assume this prints to the R console if 
 knit()
 is called interactively, doesn't it? Anyway, I do not get any feedback on 
 where
 the error comes from

 Michael






Re: Knitr (Rnw) Rscript error log

2012-09-26 Thread Yihui Xie
The first place to look at is View--View Messages, as described in
the troubleshooting section in Sweave manual (which applies to knitr
as well): https://github.com/downloads/yihui/lyx/sweave.pdf

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Wed, Sep 26, 2012 at 10:16 AM, Michael Bach pha...@gmail.com wrote:
 Hi Scott,

 Thanks for responses.

 Look in the terminal output. It might give you the error.


 I cannot find a terminal output view in LyX - checked all toolbars and View 
 menu.

 You could alternatively do File  Export  R/S code and then run/debug
 the resulting file in R.


 I tried this and after checking each line interactively in the R console and
 commenting out some things in LyX files, e.g. packages that are not available 
 in
 R2.15.1, it runs through, but the LyX called Rscript does not.

 Also note that since version 0.7 :

   - when `opts_knit$get('verbose')` is TRUE, logs (messages, warnings and
   errors) along with the corresponding R code will be printed after `knit()`
   is done; this might help users figure out possible problems in R code
   quickly (#276)


 This is a good hint, I set it with:
 opts_knit$set(verbose = TRUE)

 inside the first code chunk, but I assume this prints to the R console if 
 knit()
 is called interactively, doesn't it? Anyway, I do not get any feedback on 
 where
 the error comes from

 Michael






Re: Knitr (Rnw) Rscript error log

2012-09-26 Thread Yihui Xie
The first place to look at is View-->View Messages, as described in
the troubleshooting section in Sweave manual (which applies to knitr
as well): https://github.com/downloads/yihui/lyx/sweave.pdf

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Wed, Sep 26, 2012 at 10:16 AM, Michael Bach <pha...@gmail.com> wrote:
> Hi Scott,
>
> Thanks for responses.
>
>> Look in the terminal output. It might give you the error.
>>
>
> I cannot find a terminal output view in LyX - checked all toolbars and View 
> menu.
>
>> You could alternatively do File > Export > R/S code and then run/debug
>> the resulting file in R.
>>
>
> I tried this and after checking each line interactively in the R console and
> commenting out some things in LyX files, e.g. packages that are not available 
> in
> R2.15.1, it runs through, but the LyX called Rscript does not.
>
>> Also note that since version 0.7 :
>>
>>   - when `opts_knit$get('verbose')` is TRUE, logs (messages, warnings and
>>   errors) along with the corresponding R code will be printed after `knit()`
>>   is done; this might help users figure out possible problems in R code
>>   quickly (#276)
>>
>
> This is a good hint, I set it with:
> opts_knit$set(verbose = TRUE)
>
> inside the first code chunk, but I assume this prints to the R console if 
> knit()
> is called interactively, doesn't it? Anyway, I do not get any feedback on 
> where
> the error comes from
>
> Michael
>
>
>
>


Re: wiki upload issues

2012-09-24 Thread Yihui Xie
If this problem cannot be solved in the near future, you may consider
other places to host your files and post a link on the wiki, e.g. I
use github: https://github.com/yihui/lyx/downloads In that way, you
have more control over the files, instead of having to waiting for the
web admin to inspect the problem, but of course, the external file
host has to be reliable...

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Sep 24, 2012 at 4:20 PM, Liviu Andronic landronim...@gmail.com wrote:
 On Mon, Sep 24, 2012 at 8:03 AM, Scott Kostyshak skost...@lyx.org wrote:
 From what I understand, this problem is known but there is no one to fix it:

 This wasn't really discussed: Would it be possible to make uploads to
 the Wiki using FTP (or similar)? This would make for an excellent
 temporary solution.

 Regards
 Liviu


Re: wiki upload issues

2012-09-24 Thread Yihui Xie
If this problem cannot be solved in the near future, you may consider
other places to host your files and post a link on the wiki, e.g. I
use github: https://github.com/yihui/lyx/downloads In that way, you
have more control over the files, instead of having to waiting for the
web admin to inspect the problem, but of course, the external file
host has to be reliable...

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Sep 24, 2012 at 4:20 PM, Liviu Andronic landronim...@gmail.com wrote:
 On Mon, Sep 24, 2012 at 8:03 AM, Scott Kostyshak skost...@lyx.org wrote:
 From what I understand, this problem is known but there is no one to fix it:

 This wasn't really discussed: Would it be possible to make uploads to
 the Wiki using FTP (or similar)? This would make for an excellent
 temporary solution.

 Regards
 Liviu


Re: wiki upload issues

2012-09-24 Thread Yihui Xie
If this problem cannot be solved in the near future, you may consider
other places to host your files and post a link on the wiki, e.g. I
use github: https://github.com/yihui/lyx/downloads In that way, you
have more control over the files, instead of having to waiting for the
web admin to inspect the problem, but of course, the external file
host has to be reliable...

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Mon, Sep 24, 2012 at 4:20 PM, Liviu Andronic <landronim...@gmail.com> wrote:
> On Mon, Sep 24, 2012 at 8:03 AM, Scott Kostyshak <skost...@lyx.org> wrote:
>> From what I understand, this problem is known but there is no one to fix it:
>>
> This wasn't really discussed: Would it be possible to make uploads to
> the Wiki using FTP (or similar)? This would make for an excellent
> temporary solution.
>
> Regards
> Liviu


Re: knitr (Rnw) module: \Sexpr in Inline Math

2012-08-16 Thread Yihui Xie
That should be the best solution for this particular case, but you are
right this problem needs to be solved at a lower level in knitr or
Sweave, or LyX's math mode. The difficulty on R's side is from parsing
\Sexpr{} using regular expressions. In your case, the R code should be
0.5^{2} but knitr sees 0.5^{2 because } terminates the code.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Aug 16, 2012 at 2:33 PM, Michael Bach pha...@gmail.com wrote:
 On 8/16/2012 9:25 PM, Michael Bach wrote:

 Dear LyX Users and Developers,

 today I tried to use the knitr (Rnw) module successfully when accessed
 from Insert  Custom Insets  S/R expression.

 When I tried to do that in inline math via \Sexpr{0.5^2} then the
 display becomes 0.5² meaning that LyX correctly thinks I want LaTeX-ish
 0.5^{2}, but R will choke on that literal { in there.


 Ok I found a workaround for my specific issue, which is to use the
 alternative \Sexpr{0.5**2} for the exponent.

 Sorry for the noise, but suggestions / ideas are welcome anyway.




Re: knitr (Rnw) module: \Sexpr in Inline Math

2012-08-16 Thread Yihui Xie
That should be the best solution for this particular case, but you are
right this problem needs to be solved at a lower level in knitr or
Sweave, or LyX's math mode. The difficulty on R's side is from parsing
\Sexpr{} using regular expressions. In your case, the R code should be
0.5^{2} but knitr sees 0.5^{2 because } terminates the code.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Aug 16, 2012 at 2:33 PM, Michael Bach pha...@gmail.com wrote:
 On 8/16/2012 9:25 PM, Michael Bach wrote:

 Dear LyX Users and Developers,

 today I tried to use the knitr (Rnw) module successfully when accessed
 from Insert  Custom Insets  S/R expression.

 When I tried to do that in inline math via \Sexpr{0.5^2} then the
 display becomes 0.5² meaning that LyX correctly thinks I want LaTeX-ish
 0.5^{2}, but R will choke on that literal { in there.


 Ok I found a workaround for my specific issue, which is to use the
 alternative \Sexpr{0.5**2} for the exponent.

 Sorry for the noise, but suggestions / ideas are welcome anyway.




Re: knitr (Rnw) module: \Sexpr in Inline Math

2012-08-16 Thread Yihui Xie
That should be the best solution for this particular case, but you are
right this problem needs to be solved at a lower level in knitr or
Sweave, or LyX's math mode. The difficulty on R's side is from parsing
\Sexpr{} using regular expressions. In your case, the R code should be
0.5^{2} but knitr sees 0.5^{2 because } terminates the code.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Aug 16, 2012 at 2:33 PM, Michael Bach <pha...@gmail.com> wrote:
> On 8/16/2012 9:25 PM, Michael Bach wrote:
>>
>> Dear LyX Users and Developers,
>>
>> today I tried to use the knitr (Rnw) module successfully when accessed
>> from Insert > Custom Insets > S/R expression.
>>
>> When I tried to do that in inline math via \Sexpr{0.5^2} then the
>> display becomes 0.5² meaning that LyX correctly thinks I want LaTeX-ish
>> 0.5^{2}, but R will choke on that literal "{" in there.
>>
>
> Ok I found a workaround for my specific issue, which is to use the
> alternative \Sexpr{0.5**2} for the exponent.
>
> Sorry for the noise, but suggestions / ideas are welcome anyway.
>
>


Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
Please read section 4 of the manual and report more information:
https://github.com/downloads/yihui/lyx/sweave.pdf otherwise it is hard
to know what is exactly is the failure.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Jul 26, 2012 at 9:36 AM, Hobbs,Tom tom.ho...@colostate.edu wrote:
 Hello--

 I have a mysterious problem.  All of the documents that I created including
 Sweave code using lyx 2.0 fail to compile when I use lyx 2.03. I am running
 lyx using Mac OS Lion.  I have several large documents with lots of Sweave
 code, so until I get this worked out, I won't able to upgrade.

 Even the most simple Sweave example taken from the Sweave manual fails to
 run under my 2.03 installation, i.e.:

 \SweaveOpts{echo=FALSE}   %turns off (FALSE) or on (TRUE) r code in output
 \SweaveOpts{keep.source=TRUE}  %leaves comments in r code
 \setkeys{Gin}{width=6 in}
 Start
 a=
 data ( airquality )
 names(airquality)[4]=Temp
 k=kruskal.test ( Ozone ~ Month , data = airquality )
 }
 @

 The italics are the chunk.

 I would be grateful for any ideas about this problem.

 My best,

 Tom Hobbs







Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
You did not read Section 4 carefully. I said in the manual that you
need to open View--View Messages, and check the messages there. A
simple error dialogue box saying An error occured while running
Rscript --verbose... is not helpful for diagnosis at all. BTW, your
document compiles fine under my system (LyX 2.0.4, Ubuntu).

To JMarc: I keep on forgetting a feature request about this problem
and I'm wondering if you could do it. When an error occurs with the
Sweave/knitr module, is it possible for LyX to catch the *real* error
message in R and show it in the error dialogue box instead of just
showing the very vague message An error occured while running Rscript
--verbose...? R errors are written to stderr, so in theory it should
be possible. Thanks!

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

[...] reply omitted [...]


Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
Oh, that is far in the opposite direction now -- too much debug
information :) You do not need to turn on debug messages; normal
messages are enough.

The problem comes from:

  Rscript --verbose --no-save --no-restore /Applications/LyX
2.app/Contents/Resources/scripts/lyxsweave.R

becomes

  '/Library/Frameworks/R.framework/Versions/2.13/Resources/bin/R
--slave --no-restore --no-save --no-restore --file=/Applications/LyX
2.app/Contents/Resources/scripts/lyxsweave.R

I do not know why R removed the quotes around the --file argument, but
FWIW, can you upgrade R to the latest version before you proceed? Also
update LyX if you can. Both LyX and R are old in your system.

The other thing is to make sure you did not hack at the Sweave module
by yourself; check the preferences file in your LyX User directory
(should not contain anything about Sweave there).

I do not use Mac OS, so it is difficult for me to reproduce the problem.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Jul 26, 2012 at 10:40 AM, Hobbs,Tom tom.ho...@colostate.edu wrote:
 Sorry--I thought the message I sent was the one you needed.  I set all of
 the debug messages to Yes and it appears that this is the one causing
 problems:

 08:34:14.849: Fatal error: cannot open file '/Applications/LyX': No such
 file or directory

 There is a file in my /Applications directory for LyX 2.app

 I included the full message list below.

 I have done the Reconfigure and the problem remains.

 Thanks very much for your help.

 Tom


Re: Sweave documents fail to compile under 2.03

2012-07-26 Thread Yihui Xie
Please read section 4 of the manual and report more information:
https://github.com/downloads/yihui/lyx/sweave.pdf otherwise it is hard
to know what is exactly is the failure.

Regards,
Yihui
--
Yihui Xie xieyi...@gmail.com
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Thu, Jul 26, 2012 at 9:36 AM, Hobbs,Tom tom.ho...@colostate.edu wrote:
 Hello--

 I have a mysterious problem.  All of the documents that I created including
 Sweave code using lyx 2.0 fail to compile when I use lyx 2.03. I am running
 lyx using Mac OS Lion.  I have several large documents with lots of Sweave
 code, so until I get this worked out, I won't able to upgrade.

 Even the most simple Sweave example taken from the Sweave manual fails to
 run under my 2.03 installation, i.e.:

 \SweaveOpts{echo=FALSE}   %turns off (FALSE) or on (TRUE) r code in output
 \SweaveOpts{keep.source=TRUE}  %leaves comments in r code
 \setkeys{Gin}{width=6 in}
 Start
 a=
 data ( airquality )
 names(airquality)[4]=Temp
 k=kruskal.test ( Ozone ~ Month , data = airquality )
 }
 @

 The italics are the chunk.

 I would be grateful for any ideas about this problem.

 My best,

 Tom Hobbs







  1   2   3   >