listings package options

2013-09-30 Thread Michael Bach
Dear LyX Users and Developers,

I would like to add the numberbychapter=true option to the listings
package for the code listings. I looked around but did not find a GUI
option for it. I found a related issue [1] where the advice was to file
a feature request to add options to packages already loaded by LyX.

Could someone give me a hint?

Best Regards,
Michael Bach


[1] http://www.latex-community.org/forum/viewtopic.php?f=19t=22991



Re: listings package options

2013-09-30 Thread Michael Bach
Hi Olivier,

Thanks for your comment.

On 9/30/13 5:23 PM, Olivier Ripoll wrote: On 30.09.2013 13:57, Michael
Bach wrote:
 Dear LyX Users and Developers,

 I would like to add the numberbychapter=true option to the listings
 package for the code listings. I looked around but did not find a GUI
 option for it. I found a related issue [1] where the advice was to file
 a feature request to add options to packages already loaded by LyX.

 Could someone give me a hint?

 For listings, you can access the individual inset settings by right
 clicking on it, the selecting Settings
 Then, you can type settings not in the GUI in the Advanced tab. Type
 your options in the More Parameters text box.

 If you want to apply the settings to all listings in the document, which
 is the case here (this option is global), then type the text directly in
 Documents-Settings-Listings


I had the impression that the `numberbychapter' option is a package
option and not an option for single (global) listing(s).

 However, that option is true by default (according to listings
 documentation and to my tests), so you should not need to do anything.

 If you want to switch the option off, then type
 numberbychapter=false
 in the above mentioned place. Note that LyX may prevent you to apply the
 change, in such case you can check the Bypass validation option (I
 needed to do that for that specific option).


I tested as you suggested in the global dialog and setting it true or
false there makes no difference, both gives consecutive numbering Code
1, Code 2 etc., i.e. not what I want.

 Tested in LyX 2.0.6 on Windows with MikTeX.


FWIW, I am in 2.0.5.1 on OS X 10.8.5 with MacTeX.

One thing strikes me as odd just from the name of that option: I am
using the `article' document class and not `book' where chapter is a
sectioning command. That should be irrelevant, I guess (?).

Best Regards,
Michael



Re: listings package options

2013-09-30 Thread Michael Bach
On 9/30/13 7:28 PM, Michael Bach wrote:
 One thing strikes me as odd just from the name of that option: I am
 using the `article' document class and not `book' where chapter is a
 sectioning command. That should be irrelevant, I guess (?).
 

RTFM.  But I really do not get it why the article documentclass
shouldn't be supported.  Will contact the listings maintainer.




listings package options

2013-09-30 Thread Michael Bach
Dear LyX Users and Developers,

I would like to add the numberbychapter=true option to the listings
package for the code listings. I looked around but did not find a GUI
option for it. I found a related issue [1] where the advice was to file
a feature request to add options to packages already loaded by LyX.

Could someone give me a hint?

Best Regards,
Michael Bach


[1] http://www.latex-community.org/forum/viewtopic.php?f=19t=22991



Re: listings package options

2013-09-30 Thread Michael Bach
Hi Olivier,

Thanks for your comment.

On 9/30/13 5:23 PM, Olivier Ripoll wrote: On 30.09.2013 13:57, Michael
Bach wrote:
 Dear LyX Users and Developers,

 I would like to add the numberbychapter=true option to the listings
 package for the code listings. I looked around but did not find a GUI
 option for it. I found a related issue [1] where the advice was to file
 a feature request to add options to packages already loaded by LyX.

 Could someone give me a hint?

 For listings, you can access the individual inset settings by right
 clicking on it, the selecting Settings
 Then, you can type settings not in the GUI in the Advanced tab. Type
 your options in the More Parameters text box.

 If you want to apply the settings to all listings in the document, which
 is the case here (this option is global), then type the text directly in
 Documents-Settings-Listings


I had the impression that the `numberbychapter' option is a package
option and not an option for single (global) listing(s).

 However, that option is true by default (according to listings
 documentation and to my tests), so you should not need to do anything.

 If you want to switch the option off, then type
 numberbychapter=false
 in the above mentioned place. Note that LyX may prevent you to apply the
 change, in such case you can check the Bypass validation option (I
 needed to do that for that specific option).


I tested as you suggested in the global dialog and setting it true or
false there makes no difference, both gives consecutive numbering Code
1, Code 2 etc., i.e. not what I want.

 Tested in LyX 2.0.6 on Windows with MikTeX.


FWIW, I am in 2.0.5.1 on OS X 10.8.5 with MacTeX.

One thing strikes me as odd just from the name of that option: I am
using the `article' document class and not `book' where chapter is a
sectioning command. That should be irrelevant, I guess (?).

Best Regards,
Michael



Re: listings package options

2013-09-30 Thread Michael Bach
On 9/30/13 7:28 PM, Michael Bach wrote:
 One thing strikes me as odd just from the name of that option: I am
 using the `article' document class and not `book' where chapter is a
 sectioning command. That should be irrelevant, I guess (?).
 

RTFM.  But I really do not get it why the article documentclass
shouldn't be supported.  Will contact the listings maintainer.




listings package options

2013-09-30 Thread Michael Bach
Dear LyX Users and Developers,

I would like to add the numberbychapter=true option to the listings
package for the code listings. I looked around but did not find a GUI
option for it. I found a related issue [1] where the advice was to file
a feature request to add options to packages already loaded by LyX.

Could someone give me a hint?

Best Regards,
Michael Bach


[1] http://www.latex-community.org/forum/viewtopic.php?f=19=22991



Re: listings package options

2013-09-30 Thread Michael Bach
Hi Olivier,

Thanks for your comment.

On 9/30/13 5:23 PM, Olivier Ripoll wrote:> On 30.09.2013 13:57, Michael
Bach wrote:
>> Dear LyX Users and Developers,
>>
>> I would like to add the numberbychapter=true option to the listings
>> package for the code listings. I looked around but did not find a GUI
>> option for it. I found a related issue [1] where the advice was to file
>> a feature request to add options to packages already loaded by LyX.
>>
>> Could someone give me a hint?
>
> For listings, you can access the individual inset settings by right
> clicking on it, the selecting "Settings...".
> Then, you can type settings not in the GUI in the "Advanced" tab. Type
> your options in the "More Parameters" text box.
>
> If you want to apply the settings to all listings in the document, which
> is the case here (this option is global), then type the text directly in
> Documents->Settings->Listings
>

I had the impression that the `numberbychapter' option is a package
option and not an option for single (global) listing(s).

> However, that option is true by default (according to listings
> documentation and to my tests), so you should not need to do anything.
>
> If you want to switch the option off, then type
> numberbychapter=false
> in the above mentioned place. Note that LyX may prevent you to apply the
> change, in such case you can check the "Bypass validation" option (I
> needed to do that for that specific option).
>

I tested as you suggested in the global dialog and setting it true or
false there makes no difference, both gives consecutive numbering "Code
1", "Code 2" etc., i.e. not what I want.

> Tested in LyX 2.0.6 on Windows with MikTeX.
>

FWIW, I am in 2.0.5.1 on OS X 10.8.5 with MacTeX.

One thing strikes me as odd just from the name of that option: I am
using the `article' document class and not `book' where chapter is a
sectioning command. That should be irrelevant, I guess (?).

Best Regards,
Michael



Re: listings package options

2013-09-30 Thread Michael Bach
On 9/30/13 7:28 PM, Michael Bach wrote:
> One thing strikes me as odd just from the name of that option: I am
> using the `article' document class and not `book' where chapter is a
> sectioning command. That should be irrelevant, I guess (?).
> 

RTFM.  But I really do not get it why the article documentclass
shouldn't be supported.  Will contact the listings maintainer.




Re: formatted cross-reference language

2013-09-04 Thread Michael Bach
On 9/3/13 4:57 PM, Hugo Hinterberger wrote:
 On Tue, 03 Sep 2013 15:25:57 +0200, Michael Bach pha...@gmail.com wrote:
 
 On 9/2/13 9:59 PM, Richard Heck wrote:
 On 09/02/2013 01:19 PM, Michael Bach wrote:
 Dear LyX Users and Developers,

 I am using LyX 2.0.5.1 on OSX 10.8.

 I am working on a document that has Document  Settings  Language set
 to `German' and the custom class option `german' as well.

 The LyX GUI is English as is the OS language setting.

 As indicated in the subject, formatted cross-references are set in
 English instead of German. I read up on the web regarding i18n issues
 and made sure that LyX uses the refstyle package for cross-referencing
 (Document  Settings  Document Class).

 FWIW, nomenclatures commands, e.g. \nomrefeq, are set in German.

 Could you give me a hint on where to look next for a solution?

 I guess I'd start by looking at the generated LaTeX, and see if
 something is wrong there.


 The generated LaTeX shows a \subref{} command.  I read up on the
 `subref' package, and am confused as this should be used to reference
 labels in nested reference hierarchies (?).  But then I did not find the
 \subref command in there...

 This command did not cross my way until now and I can only find it in
 context with figure captions when searching for it.

 Michael
 
 Hi,
 
 As far as I can remember there are multiple issues with refstyle:
 1) Command name clash/override with the subfig package when using sub:
 as label prefix for subsections.
 2) References to headings below sections are not configured in the
 refstyle.cfg file (TeX Live).
 
 I attached my refstyle.cfg which handles German references to
 subsections with the ssec: prefix.
 The file should be located at texmf/tex/latex/refstyle/.
 
 Maybe this helps.
 

Indeed, this helps.  Thanks very much for sharing!

Michael




Re: formatted cross-reference language

2013-09-04 Thread Michael Bach
On 9/3/13 4:57 PM, Hugo Hinterberger wrote:
 On Tue, 03 Sep 2013 15:25:57 +0200, Michael Bach pha...@gmail.com wrote:
 
 On 9/2/13 9:59 PM, Richard Heck wrote:
 On 09/02/2013 01:19 PM, Michael Bach wrote:
 Dear LyX Users and Developers,

 I am using LyX 2.0.5.1 on OSX 10.8.

 I am working on a document that has Document  Settings  Language set
 to `German' and the custom class option `german' as well.

 The LyX GUI is English as is the OS language setting.

 As indicated in the subject, formatted cross-references are set in
 English instead of German. I read up on the web regarding i18n issues
 and made sure that LyX uses the refstyle package for cross-referencing
 (Document  Settings  Document Class).

 FWIW, nomenclatures commands, e.g. \nomrefeq, are set in German.

 Could you give me a hint on where to look next for a solution?

 I guess I'd start by looking at the generated LaTeX, and see if
 something is wrong there.


 The generated LaTeX shows a \subref{} command.  I read up on the
 `subref' package, and am confused as this should be used to reference
 labels in nested reference hierarchies (?).  But then I did not find the
 \subref command in there...

 This command did not cross my way until now and I can only find it in
 context with figure captions when searching for it.

 Michael
 
 Hi,
 
 As far as I can remember there are multiple issues with refstyle:
 1) Command name clash/override with the subfig package when using sub:
 as label prefix for subsections.
 2) References to headings below sections are not configured in the
 refstyle.cfg file (TeX Live).
 
 I attached my refstyle.cfg which handles German references to
 subsections with the ssec: prefix.
 The file should be located at texmf/tex/latex/refstyle/.
 
 Maybe this helps.
 

Indeed, this helps.  Thanks very much for sharing!

Michael




Re: formatted cross-reference language

2013-09-04 Thread Michael Bach
On 9/3/13 4:57 PM, Hugo Hinterberger wrote:
> On Tue, 03 Sep 2013 15:25:57 +0200, Michael Bach <pha...@gmail.com> wrote:
> 
>> On 9/2/13 9:59 PM, Richard Heck wrote:
>>> On 09/02/2013 01:19 PM, Michael Bach wrote:
>>>> Dear LyX Users and Developers,
>>>>
>>>> I am using LyX 2.0.5.1 on OSX 10.8.
>>>>
>>>> I am working on a document that has Document > Settings > Language set
>>>> to `German' and the custom class option `german' as well.
>>>>
>>>> The LyX GUI is English as is the OS language setting.
>>>>
>>>> As indicated in the subject, formatted cross-references are set in
>>>> English instead of German. I read up on the web regarding i18n issues
>>>> and made sure that LyX uses the refstyle package for cross-referencing
>>>> (Document > Settings > Document Class).
>>>>
>>>> FWIW, nomenclatures commands, e.g. \nomrefeq, are set in German.
>>>>
>>>> Could you give me a hint on where to look next for a solution?
>>>
>>> I guess I'd start by looking at the generated LaTeX, and see if
>>> something is wrong there.
>>>
>>
>> The generated LaTeX shows a \subref{} command.  I read up on the
>> `subref' package, and am confused as this should be used to reference
>> labels in nested reference hierarchies (?).  But then I did not find the
>> \subref command in there...
>>
>> This command did not cross my way until now and I can only find it in
>> context with figure captions when searching for it.
>>
>> Michael
> 
> Hi,
> 
> As far as I can remember there are multiple issues with refstyle:
> 1) Command name clash/override with the subfig package when using "sub:"
> as label prefix for subsections.
> 2) References to headings below sections are not configured in the
> refstyle.cfg file (TeX Live).
> 
> I attached my refstyle.cfg which handles German references to
> subsections with the "ssec:" prefix.
> The file should be located at "texmf/tex/latex/refstyle/".
> 
> Maybe this helps.
> 

Indeed, this helps.  Thanks very much for sharing!

Michael




Re: formatted cross-reference language

2013-09-03 Thread Michael Bach
On 9/2/13 9:59 PM, Richard Heck wrote:
 On 09/02/2013 01:19 PM, Michael Bach wrote:
 Dear LyX Users and Developers,

 I am using LyX 2.0.5.1 on OSX 10.8.

 I am working on a document that has Document  Settings  Language set
 to `German' and the custom class option `german' as well.

 The LyX GUI is English as is the OS language setting.

 As indicated in the subject, formatted cross-references are set in
 English instead of German. I read up on the web regarding i18n issues
 and made sure that LyX uses the refstyle package for cross-referencing
 (Document  Settings  Document Class).

 FWIW, nomenclatures commands, e.g. \nomrefeq, are set in German.

 Could you give me a hint on where to look next for a solution?
 
 I guess I'd start by looking at the generated LaTeX, and see if
 something is wrong there.
 

The generated LaTeX shows a \subref{} command.  I read up on the
`subref' package, and am confused as this should be used to reference
labels in nested reference hierarchies (?).  But then I did not find the
\subref command in there...

This command did not cross my way until now and I can only find it in
context with figure captions when searching for it.

Michael



Re: formatted cross-reference language

2013-09-03 Thread Michael Bach
On 9/2/13 9:59 PM, Richard Heck wrote:
 On 09/02/2013 01:19 PM, Michael Bach wrote:
 Dear LyX Users and Developers,

 I am using LyX 2.0.5.1 on OSX 10.8.

 I am working on a document that has Document  Settings  Language set
 to `German' and the custom class option `german' as well.

 The LyX GUI is English as is the OS language setting.

 As indicated in the subject, formatted cross-references are set in
 English instead of German. I read up on the web regarding i18n issues
 and made sure that LyX uses the refstyle package for cross-referencing
 (Document  Settings  Document Class).

 FWIW, nomenclatures commands, e.g. \nomrefeq, are set in German.

 Could you give me a hint on where to look next for a solution?
 
 I guess I'd start by looking at the generated LaTeX, and see if
 something is wrong there.
 

The generated LaTeX shows a \subref{} command.  I read up on the
`subref' package, and am confused as this should be used to reference
labels in nested reference hierarchies (?).  But then I did not find the
\subref command in there...

This command did not cross my way until now and I can only find it in
context with figure captions when searching for it.

Michael



Re: formatted cross-reference language

2013-09-03 Thread Michael Bach
On 9/2/13 9:59 PM, Richard Heck wrote:
> On 09/02/2013 01:19 PM, Michael Bach wrote:
>> Dear LyX Users and Developers,
>>
>> I am using LyX 2.0.5.1 on OSX 10.8.
>>
>> I am working on a document that has Document > Settings > Language set
>> to `German' and the custom class option `german' as well.
>>
>> The LyX GUI is English as is the OS language setting.
>>
>> As indicated in the subject, formatted cross-references are set in
>> English instead of German. I read up on the web regarding i18n issues
>> and made sure that LyX uses the refstyle package for cross-referencing
>> (Document > Settings > Document Class).
>>
>> FWIW, nomenclatures commands, e.g. \nomrefeq, are set in German.
>>
>> Could you give me a hint on where to look next for a solution?
> 
> I guess I'd start by looking at the generated LaTeX, and see if
> something is wrong there.
> 

The generated LaTeX shows a \subref{} command.  I read up on the
`subref' package, and am confused as this should be used to reference
labels in nested reference hierarchies (?).  But then I did not find the
\subref command in there...

This command did not cross my way until now and I can only find it in
context with figure captions when searching for it.

Michael



formatted cross-reference language

2013-09-02 Thread Michael Bach
Dear LyX Users and Developers,

I am using LyX 2.0.5.1 on OSX 10.8.

I am working on a document that has Document  Settings  Language set
to `German' and the custom class option `german' as well.

The LyX GUI is English as is the OS language setting.

As indicated in the subject, formatted cross-references are set in
English instead of German. I read up on the web regarding i18n issues
and made sure that LyX uses the refstyle package for cross-referencing
(Document  Settings  Document Class).

FWIW, nomenclatures commands, e.g. \nomrefeq, are set in German.

Could you give me a hint on where to look next for a solution?

Best Regards,
Michael



formatted cross-reference language

2013-09-02 Thread Michael Bach
Dear LyX Users and Developers,

I am using LyX 2.0.5.1 on OSX 10.8.

I am working on a document that has Document  Settings  Language set
to `German' and the custom class option `german' as well.

The LyX GUI is English as is the OS language setting.

As indicated in the subject, formatted cross-references are set in
English instead of German. I read up on the web regarding i18n issues
and made sure that LyX uses the refstyle package for cross-referencing
(Document  Settings  Document Class).

FWIW, nomenclatures commands, e.g. \nomrefeq, are set in German.

Could you give me a hint on where to look next for a solution?

Best Regards,
Michael



formatted cross-reference language

2013-09-02 Thread Michael Bach
Dear LyX Users and Developers,

I am using LyX 2.0.5.1 on OSX 10.8.

I am working on a document that has Document > Settings > Language set
to `German' and the custom class option `german' as well.

The LyX GUI is English as is the OS language setting.

As indicated in the subject, formatted cross-references are set in
English instead of German. I read up on the web regarding i18n issues
and made sure that LyX uses the refstyle package for cross-referencing
(Document > Settings > Document Class).

FWIW, nomenclatures commands, e.g. \nomrefeq, are set in German.

Could you give me a hint on where to look next for a solution?

Best Regards,
Michael



Re: psfragfig

2013-07-02 Thread Michael Bach

Hi Julien,

On 5/19/13 11:55 PM, Julien Rioux wrote:

On 28/10/2012 6:01 AM, Michael Bach wrote:

Ok, although I did not solve this in terms of LyX configuration: Just a
quick notice for sake of completeness and in case someone is plagued by
this issue and might be happy to find this.

On 10/26/12 12:29 PM, Michael Bach wrote:

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format
pdf2/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273):
Systemcall: 'pdflatex -synctex=-1 -shell-escape  skriptum.tex'
finished with exit code 1

in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.tex'.

Now I assume that the external command from pstool is run inside the
temporary LyX directory and it thus cannot find the figures/ folder to
write the .tex file to...


AFAIK, LyX does not copy the .eps and .tex psfrag files to the temporary
directory, because it does not parse the ERT for the psfragfig macro. I
decided to reference the files under figures/ directly with absolute
paths to the source dir. This does work via openout_any = a in
texmf.cnf but then compiling foreign documents does not feel secure
anymore...

I read the LyX Customization manual under 'Copier' for a better
solution, but could not find a reference to the LyX temporary directory
and have no clue how to best solve this in terms of LyX policy.

Michael




The way I use psfrag is to insert the .eps into LyX using the standard
way from the Insert menu, and put the psfrag code in ERT in the LyX
document. This way, LyX handles the copying of the .eps file correctly.
You obviously need the correct \usepackage line added to your preamble
in document settings.



Thanks for your comment. I somehow missed your answer after all this time...

I get how you mentioned the inclusion of the .eps file - I remember 
trying that initially. I also assume you mean `\usepackage{pstool}' as 
correct preamble line(?). However, I do not know what you mean by 
'psfrag code'.


Am I missing something?

Michael



Re: psfragfig

2013-07-02 Thread Michael Bach

On 7/2/13 11:44 PM, Julien Rioux wrote:

On Tue, Jul 2, 2013 at 2:50 PM, Michael Bach pha...@gmail.com
mailto:pha...@gmail.com wrote:

Hi Julien,

On 5/19/13 11:55 PM, Julien Rioux wrote:

On 28/10/2012 6:01 AM, Michael Bach wrote:

Ok, although I did not solve this in terms of LyX
configuration: Just a
quick notice for sake of completeness and in case someone is
plagued by
this issue and might be happy to find this.

On 10/26/12 12:29 PM, Michael Bach wrote:

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format

pdf2/Users/Shared/LyX/lyx-2.0.__4/src/support/Systemcall.cpp(__273):
Systemcall: 'pdflatex -synctex=-1 -shell-escape
  skriptum.tex'
finished with exit code 1

in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.__tex'.

Now I assume that the external command from pstool is
run inside the
temporary LyX directory and it thus cannot find the
figures/ folder to
write the .tex file to...

AFAIK, LyX does not copy the .eps and .tex psfrag files to
the temporary
directory, because it does not parse the ERT for the
psfragfig macro. I
decided to reference the files under figures/ directly with
absolute
paths to the source dir. This does work via openout_any = a in
texmf.cnf but then compiling foreign documents does not feel
secure
anymore...

I read the LyX Customization manual under 'Copier' for a
better
solution, but could not find a reference to the LyX
temporary directory
and have no clue how to best solve this in terms of LyX policy.

Michael



The way I use psfrag is to insert the .eps into LyX using the
standard
way from the Insert menu, and put the psfrag code in ERT in the LyX
document. This way, LyX handles the copying of the .eps file
correctly.
You obviously need the correct \usepackage line added to your
preamble
in document settings.


Thanks for your comment. I somehow missed your answer after all this
time...


Well, it took me quite some time to answer in the first place...

I get how you mentioned the inclusion of the .eps file - I remember
trying that initially. I also assume you mean `\usepackage{pstool}'
as correct preamble line(?). However, I do not know what you mean by
'psfrag code'.


Actually, I just use \usepackage{psfrag} directly (\usepackage{pstool}
isn't necessary for pdf output via ps2pdf). The psfrag code that I refer
to is the content of the .tex file generated by matlabfrag alongside the
.eps file.


I read some more about the technologies and packages involved. I did not 
fully grasp the bare psfrag since I used the pstools psfragfig magic 
before, thanks for explanation.



I would be copy-pasting the content of the .tex file into an
ERT, but you could also input the .tex file via InsertFileChild Doc.


I tried this \input approach, placed before/after the graphics include 
but it did not work with pdflatex.



What this accomplishes corresponds to what is described at the beginning
of section 4.2 of the matlabfrag userguide.pdf manual. If you need to
use pdflatex, you'll need the \usepackage{pstool} instead, but then I
don't know how to help you!



I then tried to use the psfrag together with auto-pst-pdf to get to pdf, 
but pdftex process runs with 100% CPU for 10 minutes and then dies.


So I am back to pstool with absolute paths and an openany_out=a 
pdflatex ... command. This ERT approach is not as neat (e.g. no 
preview!) as the other figure handling in LyX, but at least it works.


Thanks for your thoughts on this!

Michael





Re: psfragfig

2013-07-02 Thread Michael Bach

Hi Julien,

On 5/19/13 11:55 PM, Julien Rioux wrote:

On 28/10/2012 6:01 AM, Michael Bach wrote:

Ok, although I did not solve this in terms of LyX configuration: Just a
quick notice for sake of completeness and in case someone is plagued by
this issue and might be happy to find this.

On 10/26/12 12:29 PM, Michael Bach wrote:

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format
pdf2/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273):
Systemcall: 'pdflatex -synctex=-1 -shell-escape  skriptum.tex'
finished with exit code 1

in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.tex'.

Now I assume that the external command from pstool is run inside the
temporary LyX directory and it thus cannot find the figures/ folder to
write the .tex file to...


AFAIK, LyX does not copy the .eps and .tex psfrag files to the temporary
directory, because it does not parse the ERT for the psfragfig macro. I
decided to reference the files under figures/ directly with absolute
paths to the source dir. This does work via openout_any = a in
texmf.cnf but then compiling foreign documents does not feel secure
anymore...

I read the LyX Customization manual under 'Copier' for a better
solution, but could not find a reference to the LyX temporary directory
and have no clue how to best solve this in terms of LyX policy.

Michael




The way I use psfrag is to insert the .eps into LyX using the standard
way from the Insert menu, and put the psfrag code in ERT in the LyX
document. This way, LyX handles the copying of the .eps file correctly.
You obviously need the correct \usepackage line added to your preamble
in document settings.



Thanks for your comment. I somehow missed your answer after all this time...

I get how you mentioned the inclusion of the .eps file - I remember 
trying that initially. I also assume you mean `\usepackage{pstool}' as 
correct preamble line(?). However, I do not know what you mean by 
'psfrag code'.


Am I missing something?

Michael



Re: psfragfig

2013-07-02 Thread Michael Bach

On 7/2/13 11:44 PM, Julien Rioux wrote:

On Tue, Jul 2, 2013 at 2:50 PM, Michael Bach pha...@gmail.com
mailto:pha...@gmail.com wrote:

Hi Julien,

On 5/19/13 11:55 PM, Julien Rioux wrote:

On 28/10/2012 6:01 AM, Michael Bach wrote:

Ok, although I did not solve this in terms of LyX
configuration: Just a
quick notice for sake of completeness and in case someone is
plagued by
this issue and might be happy to find this.

On 10/26/12 12:29 PM, Michael Bach wrote:

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format

pdf2/Users/Shared/LyX/lyx-2.0.__4/src/support/Systemcall.cpp(__273):
Systemcall: 'pdflatex -synctex=-1 -shell-escape
  skriptum.tex'
finished with exit code 1

in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.__tex'.

Now I assume that the external command from pstool is
run inside the
temporary LyX directory and it thus cannot find the
figures/ folder to
write the .tex file to...

AFAIK, LyX does not copy the .eps and .tex psfrag files to
the temporary
directory, because it does not parse the ERT for the
psfragfig macro. I
decided to reference the files under figures/ directly with
absolute
paths to the source dir. This does work via openout_any = a in
texmf.cnf but then compiling foreign documents does not feel
secure
anymore...

I read the LyX Customization manual under 'Copier' for a
better
solution, but could not find a reference to the LyX
temporary directory
and have no clue how to best solve this in terms of LyX policy.

Michael



The way I use psfrag is to insert the .eps into LyX using the
standard
way from the Insert menu, and put the psfrag code in ERT in the LyX
document. This way, LyX handles the copying of the .eps file
correctly.
You obviously need the correct \usepackage line added to your
preamble
in document settings.


Thanks for your comment. I somehow missed your answer after all this
time...


Well, it took me quite some time to answer in the first place...

I get how you mentioned the inclusion of the .eps file - I remember
trying that initially. I also assume you mean `\usepackage{pstool}'
as correct preamble line(?). However, I do not know what you mean by
'psfrag code'.


Actually, I just use \usepackage{psfrag} directly (\usepackage{pstool}
isn't necessary for pdf output via ps2pdf). The psfrag code that I refer
to is the content of the .tex file generated by matlabfrag alongside the
.eps file.


I read some more about the technologies and packages involved. I did not 
fully grasp the bare psfrag since I used the pstools psfragfig magic 
before, thanks for explanation.



I would be copy-pasting the content of the .tex file into an
ERT, but you could also input the .tex file via InsertFileChild Doc.


I tried this \input approach, placed before/after the graphics include 
but it did not work with pdflatex.



What this accomplishes corresponds to what is described at the beginning
of section 4.2 of the matlabfrag userguide.pdf manual. If you need to
use pdflatex, you'll need the \usepackage{pstool} instead, but then I
don't know how to help you!



I then tried to use the psfrag together with auto-pst-pdf to get to pdf, 
but pdftex process runs with 100% CPU for 10 minutes and then dies.


So I am back to pstool with absolute paths and an openany_out=a 
pdflatex ... command. This ERT approach is not as neat (e.g. no 
preview!) as the other figure handling in LyX, but at least it works.


Thanks for your thoughts on this!

Michael





Re: psfragfig

2013-07-02 Thread Michael Bach

Hi Julien,

On 5/19/13 11:55 PM, Julien Rioux wrote:

On 28/10/2012 6:01 AM, Michael Bach wrote:

Ok, although I did not solve this in terms of LyX configuration: Just a
quick notice for sake of completeness and in case someone is plagued by
this issue and might be happy to find this.

On 10/26/12 12:29 PM, Michael Bach wrote:

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format
pdf2/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273):
Systemcall: 'pdflatex -synctex=-1 -shell-escape  "skriptum.tex"'
finished with exit code 1

in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.tex'.

Now I assume that the external command from pstool is run inside the
temporary LyX directory and it thus cannot find the figures/ folder to
write the .tex file to...


AFAIK, LyX does not copy the .eps and .tex psfrag files to the temporary
directory, because it does not parse the ERT for the psfragfig macro. I
decided to reference the files under figures/ directly with absolute
paths to the source dir. This does work via "openout_any = a" in
texmf.cnf but then compiling foreign documents does not feel secure
anymore...

I read the LyX "Customization" manual under 'Copier' for a better
solution, but could not find a reference to the LyX temporary directory
and have no clue how to best solve this in terms of LyX policy.

Michael




The way I use psfrag is to insert the .eps into LyX using the standard
way from the Insert menu, and put the psfrag code in ERT in the LyX
document. This way, LyX handles the copying of the .eps file correctly.
You obviously need the correct \usepackage line added to your preamble
in document settings.



Thanks for your comment. I somehow missed your answer after all this time...

I get how you mentioned the inclusion of the .eps file - I remember 
trying that initially. I also assume you mean `\usepackage{pstool}' as 
correct preamble line(?). However, I do not know what you mean by 
'psfrag code'.


Am I missing something?

Michael



Re: psfragfig

2013-07-02 Thread Michael Bach

On 7/2/13 11:44 PM, Julien Rioux wrote:

On Tue, Jul 2, 2013 at 2:50 PM, Michael Bach <pha...@gmail.com
<mailto:pha...@gmail.com>> wrote:

Hi Julien,

On 5/19/13 11:55 PM, Julien Rioux wrote:

On 28/10/2012 6:01 AM, Michael Bach wrote:

Ok, although I did not solve this in terms of LyX
configuration: Just a
quick notice for sake of completeness and in case someone is
plagued by
this issue and might be happy to find this.

On 10/26/12 12:29 PM, Michael Bach wrote:

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format

pdf2/Users/Shared/LyX/lyx-2.0.__4/src/support/Systemcall.cpp(__273):
Systemcall: 'pdflatex -synctex=-1 -shell-escape
  "skriptum.tex"'
finished with exit code 1

in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.__tex'.

Now I assume that the external command from pstool is
run inside the
temporary LyX directory and it thus cannot find the
figures/ folder to
write the .tex file to...

AFAIK, LyX does not copy the .eps and .tex psfrag files to
the temporary
directory, because it does not parse the ERT for the
psfragfig macro. I
decided to reference the files under figures/ directly with
absolute
paths to the source dir. This does work via "openout_any = a" in
texmf.cnf but then compiling foreign documents does not feel
secure
anymore...

I read the LyX "Customization" manual under 'Copier' for a
better
solution, but could not find a reference to the LyX
temporary directory
and have no clue how to best solve this in terms of LyX policy.

Michael



The way I use psfrag is to insert the .eps into LyX using the
standard
way from the Insert menu, and put the psfrag code in ERT in the LyX
document. This way, LyX handles the copying of the .eps file
correctly.
You obviously need the correct \usepackage line added to your
preamble
in document settings.


Thanks for your comment. I somehow missed your answer after all this
time...


Well, it took me quite some time to answer in the first place...

I get how you mentioned the inclusion of the .eps file - I remember
trying that initially. I also assume you mean `\usepackage{pstool}'
as correct preamble line(?). However, I do not know what you mean by
'psfrag code'.


Actually, I just use \usepackage{psfrag} directly (\usepackage{pstool}
isn't necessary for pdf output via ps2pdf). The psfrag code that I refer
to is the content of the .tex file generated by matlabfrag alongside the
.eps file.


I read some more about the technologies and packages involved. I did not 
fully grasp the bare psfrag since I used the pstools psfragfig magic 
before, thanks for explanation.



I would be copy-pasting the content of the .tex file into an
ERT, but you could also input the .tex file via "Insert>File>Child Doc".


I tried this \input approach, placed before/after the graphics include 
but it did not work with pdflatex.



What this accomplishes corresponds to what is described at the beginning
of section 4.2 of the matlabfrag userguide.pdf manual. If you need to
use pdflatex, you'll need the \usepackage{pstool} instead, but then I
don't know how to help you!



I then tried to use the psfrag together with auto-pst-pdf to get to pdf, 
but pdftex process runs with 100% CPU for 10 minutes and then dies.


So I am back to pstool with absolute paths and an "openany_out=a 
pdflatex ..." command. This ERT approach is not as neat (e.g. no 
preview!) as the other figure handling in LyX, but at least it works.


Thanks for your thoughts on this!

Michael





Re: psfragfig

2012-10-28 Thread Michael Bach
Ok, although I did not solve this in terms of LyX configuration: Just a 
quick notice for sake of completeness and in case someone is plagued by 
this issue and might be happy to find this.


On 10/26/12 12:29 PM, Michael Bach wrote:

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format
pdf2/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273):
Systemcall: 'pdflatex -synctex=-1 -shell-escape  skriptum.tex'
finished with exit code 1

in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.tex'.

Now I assume that the external command from pstool is run inside the
temporary LyX directory and it thus cannot find the figures/ folder to
write the .tex file to...

AFAIK, LyX does not copy the .eps and .tex psfrag files to the temporary 
directory, because it does not parse the ERT for the psfragfig macro. I 
decided to reference the files under figures/ directly with absolute 
paths to the source dir. This does work via openout_any = a in 
texmf.cnf but then compiling foreign documents does not feel secure 
anymore...


I read the LyX Customization manual under 'Copier' for a better 
solution, but could not find a reference to the LyX temporary directory 
and have no clue how to best solve this in terms of LyX policy.


Michael



Re: psfragfig

2012-10-28 Thread Michael Bach
Ok, although I did not solve this in terms of LyX configuration: Just a 
quick notice for sake of completeness and in case someone is plagued by 
this issue and might be happy to find this.


On 10/26/12 12:29 PM, Michael Bach wrote:

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format
pdf2/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273):
Systemcall: 'pdflatex -synctex=-1 -shell-escape  skriptum.tex'
finished with exit code 1

in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.tex'.

Now I assume that the external command from pstool is run inside the
temporary LyX directory and it thus cannot find the figures/ folder to
write the .tex file to...

AFAIK, LyX does not copy the .eps and .tex psfrag files to the temporary 
directory, because it does not parse the ERT for the psfragfig macro. I 
decided to reference the files under figures/ directly with absolute 
paths to the source dir. This does work via openout_any = a in 
texmf.cnf but then compiling foreign documents does not feel secure 
anymore...


I read the LyX Customization manual under 'Copier' for a better 
solution, but could not find a reference to the LyX temporary directory 
and have no clue how to best solve this in terms of LyX policy.


Michael



Re: psfragfig

2012-10-28 Thread Michael Bach
Ok, although I did not solve this in terms of LyX configuration: Just a 
quick notice for sake of completeness and in case someone is plagued by 
this issue and might be happy to find this.


On 10/26/12 12:29 PM, Michael Bach wrote:

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format
pdf2/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273):
Systemcall: 'pdflatex -synctex=-1 -shell-escape  "skriptum.tex"'
finished with exit code 1

in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.tex'.

Now I assume that the external command from pstool is run inside the
temporary LyX directory and it thus cannot find the figures/ folder to
write the .tex file to...

AFAIK, LyX does not copy the .eps and .tex psfrag files to the temporary 
directory, because it does not parse the ERT for the psfragfig macro. I 
decided to reference the files under figures/ directly with absolute 
paths to the source dir. This does work via "openout_any = a" in 
texmf.cnf but then compiling foreign documents does not feel secure 
anymore...


I read the LyX "Customization" manual under 'Copier' for a better 
solution, but could not find a reference to the LyX temporary directory 
and have no clue how to best solve this in terms of LyX policy.


Michael



psfragfig

2012-10-26 Thread Michael Bach

Dear LyX Users and Developers,

I am using MacTeX on OS X 10.8.2 with the pstool package installed. I am 
trying to get the matlabfrag Matlab package to work. It can be found here:

http://www.mathworks.com/matlabcentral/fileexchange/21286-matlabfrag

The User Guide explicitly says to include the generated .eps file in LyX 
via a LaTeX inset containing the \psfragfig macro inside a float 
environment. The foo.eps file resides in the figures/ folder relative to 
the .lyx file. I also had to enable -shell-escape in the converters 
settings under preferences.


The LaTeX source thus reads:
\begin{figure}
\psfragfig{figures/EulerImplizit}
\caption{\label{fig:Implizites-Eulerverfahren-Matlab}Implizites 
Eulerverfahren

mit Matlab. Verschiedene Schrittweiten $h$ für die Differentialgleichung
$x'=-x$}
\end{figure}

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format 
pdf2/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273): 
Systemcall: 'pdflatex -synctex=-1 -shell-escape  skriptum.tex' 
finished with exit code 1


in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.tex'.

Now I assume that the external command from pstool is run inside the 
temporary LyX directory and it thus cannot find the figures/ folder to 
write the .tex file to...


Is anyone using this setup? Or otherwise related to psfragfig? Can you 
give me hints on how to solve this?


Best Regards,
Michael Bach




psfragfig

2012-10-26 Thread Michael Bach

Dear LyX Users and Developers,

I am using MacTeX on OS X 10.8.2 with the pstool package installed. I am 
trying to get the matlabfrag Matlab package to work. It can be found here:

http://www.mathworks.com/matlabcentral/fileexchange/21286-matlabfrag

The User Guide explicitly says to include the generated .eps file in LyX 
via a LaTeX inset containing the \psfragfig macro inside a float 
environment. The foo.eps file resides in the figures/ folder relative to 
the .lyx file. I also had to enable -shell-escape in the converters 
settings under preferences.


The LaTeX source thus reads:
\begin{figure}
\psfragfig{figures/EulerImplizit}
\caption{\label{fig:Implizites-Eulerverfahren-Matlab}Implizites 
Eulerverfahren

mit Matlab. Verschiedene Schrittweiten $h$ für die Differentialgleichung
$x'=-x$}
\end{figure}

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format 
pdf2/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273): 
Systemcall: 'pdflatex -synctex=-1 -shell-escape  skriptum.tex' 
finished with exit code 1


in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.tex'.

Now I assume that the external command from pstool is run inside the 
temporary LyX directory and it thus cannot find the figures/ folder to 
write the .tex file to...


Is anyone using this setup? Or otherwise related to psfragfig? Can you 
give me hints on how to solve this?


Best Regards,
Michael Bach




psfragfig

2012-10-26 Thread Michael Bach

Dear LyX Users and Developers,

I am using MacTeX on OS X 10.8.2 with the pstool package installed. I am 
trying to get the matlabfrag Matlab package to work. It can be found here:

http://www.mathworks.com/matlabcentral/fileexchange/21286-matlabfrag

The User Guide explicitly says to include the generated .eps file in LyX 
via a LaTeX inset containing the \psfragfig macro inside a float 
environment. The foo.eps file resides in the figures/ folder relative to 
the .lyx file. I also had to enable -shell-escape in the converters 
settings under preferences.


The LaTeX source thus reads:
\begin{figure}
\psfragfig{figures/EulerImplizit}
\caption{\label{fig:Implizites-Eulerverfahren-Matlab}Implizites 
Eulerverfahren

mit Matlab. Verschiedene Schrittweiten $h$ für die Differentialgleichung
$x'=-x$}
\end{figure}

Now when I try to compile the document, I see the line:
=== pstool: begin processing ===
Error exporting to format 
pdf2/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273): 
Systemcall: 'pdflatex -synctex=-1 -shell-escape  "skriptum.tex"' 
finished with exit code 1


in the messages pane and get the error:
I can't write on file `figures/EulerExplizit-pstool.tex'.

Now I assume that the external command from pstool is run inside the 
temporary LyX directory and it thus cannot find the figures/ folder to 
write the .tex file to...


Is anyone using this setup? Or otherwise related to psfragfig? Can you 
give me hints on how to solve this?


Best Regards,
Michael Bach




Re: Knitr (Rnw) Rscript error log

2012-10-02 Thread Michael Bach

On 10/1/12 12:15 AM, Yihui Xie wrote:
 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.


My interpretation was wrong then. I thought the workaround was to 
explicitly use the Default language option if I had been using the 
German GUI. My OS is set to American language, so Default for me led 
to US GUI and the C locale. Setting the user interface language to 
German solves it. I could have thought this far... Thanks yet again.



On 10/1/12 10:36 PM, Jean-Marc Lasgouttes wrote:

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.



Quite the contrary, I prefer the US GUI. The last sentence is exactly 
why I thought my German document has to work using the the US GUI. I 
thought that setting the document language leads to Rscript picking up 
the correct locale - it did not occur to me that the locale is 
influenced by the GUI language setting.




Re: Knitr (Rnw) Rscript error log

2012-10-02 Thread Michael Bach

On 10/1/12 12:15 AM, Yihui Xie wrote:
 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.


My interpretation was wrong then. I thought the workaround was to 
explicitly use the Default language option if I had been using the 
German GUI. My OS is set to American language, so Default for me led 
to US GUI and the C locale. Setting the user interface language to 
German solves it. I could have thought this far... Thanks yet again.



On 10/1/12 10:36 PM, Jean-Marc Lasgouttes wrote:

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.



Quite the contrary, I prefer the US GUI. The last sentence is exactly 
why I thought my German document has to work using the the US GUI. I 
thought that setting the document language leads to Rscript picking up 
the correct locale - it did not occur to me that the locale is 
influenced by the GUI language setting.




Re: Knitr (Rnw) Rscript error log

2012-10-02 Thread Michael Bach

On 10/1/12 12:15 AM, Yihui Xie wrote:
> 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.
>

My interpretation was wrong then. I thought the workaround was to 
explicitly use the "Default" language option if I had been using the 
German GUI. My OS is set to American language, so "Default" for me led 
to US GUI and the C locale. Setting the user interface language to 
German solves it. I could have thought this far... Thanks yet again.



On 10/1/12 10:36 PM, Jean-Marc Lasgouttes wrote:

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.



Quite the contrary, I prefer the US GUI. The last sentence is exactly 
why I thought my German document has to work using the the US GUI. I 
thought that setting the document language leads to Rscript picking up 
the correct locale - it did not occur to me that the locale is 
influenced by the GUI language setting.




Re: Knitr (Rnw) Rscript error log

2012-10-01 Thread Michael Bach

On 10/1/12 12:15 AM, Yihui Xie wrote:

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.



Thanks for your help on investigation and the bug link!

I am using an American locale and GUI, so interface language default 
does not work.


Anyway, I am preparing statistics lectures involving R as the main tool, 
so I might get into compiling LyX myself if I can find my way around on 
the (new) OS X - switched two weeks ago...


Best Regards,
Michael




Re: Knitr (Rnw) Rscript error log

2012-10-01 Thread Michael Bach

On 10/1/12 12:15 AM, Yihui Xie wrote:

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.



Thanks for your help on investigation and the bug link!

I am using an American locale and GUI, so interface language default 
does not work.


Anyway, I am preparing statistics lectures involving R as the main tool, 
so I might get into compiling LyX myself if I can find my way around on 
the (new) OS X - switched two weeks ago...


Best Regards,
Michael




Re: Knitr (Rnw) Rscript error log

2012-10-01 Thread Michael Bach

On 10/1/12 12:15 AM, Yihui Xie wrote:

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.



Thanks for your help on investigation and the bug link!

I am using an American locale and GUI, so interface language default 
does not work.


Anyway, I am preparing statistics lectures involving R as the main tool, 
so I might get into compiling LyX myself if I can find my way around on 
the (new) OS X - switched two weeks ago...


Best Regards,
Michael




Re: Knitr (Rnw) Rscript error log

2012-09-30 Thread Michael Bach

On 9/29/12 11:43 PM, Yihui Xie wrote:

He sent me the message log without cc'ing the list, and I saw



Sorry about that, I am using a Newsgroup Account under Thunderbird and 
am posting to gmane. There is a predefined Newsgroup field that I use, 
that posts to gmane, and thus later also to the LyX list, or so I 
thought. This field apparently does not get transmitted in the email 
header, so I will now try to also cc the list. Sorry in advance for 
eventual double-posts because of this...



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.



Sorry about the confusion! The error occurs only on Mac OS X 10.8.2 
Mountain Lion. The problem I think is related to the fact that I work on 
the same code base from both Windows 7 and Mac OS X using a git 
repository. To handle end-of-line characters differently, there is an 
option in git to always commit unix-style line endings, but check out 
files with OS-native line endings respectively.


Now I wondered whether end-of-line issues lead to the error, but then 
again the .tex gets cut off some lines after \begin{document}.


Michael


Re: Knitr (Rnw) Rscript error log

2012-09-30 Thread Michael Bach
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 Michael Bach

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 Michael Bach

On 9/29/12 11:43 PM, Yihui Xie wrote:

He sent me the message log without cc'ing the list, and I saw



Sorry about that, I am using a Newsgroup Account under Thunderbird and 
am posting to gmane. There is a predefined Newsgroup field that I use, 
that posts to gmane, and thus later also to the LyX list, or so I 
thought. This field apparently does not get transmitted in the email 
header, so I will now try to also cc the list. Sorry in advance for 
eventual double-posts because of this...



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.



Sorry about the confusion! The error occurs only on Mac OS X 10.8.2 
Mountain Lion. The problem I think is related to the fact that I work on 
the same code base from both Windows 7 and Mac OS X using a git 
repository. To handle end-of-line characters differently, there is an 
option in git to always commit unix-style line endings, but check out 
files with OS-native line endings respectively.


Now I wondered whether end-of-line issues lead to the error, but then 
again the .tex gets cut off some lines after \begin{document}.


Michael


Re: Knitr (Rnw) Rscript error log

2012-09-30 Thread Michael Bach
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 Michael Bach

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 Michael Bach

On 9/29/12 11:43 PM, Yihui Xie wrote:

He sent me the message log without cc'ing the list, and I saw



Sorry about that, I am using a Newsgroup Account under Thunderbird and 
am posting to gmane. There is a predefined "Newsgroup" field that I use, 
that posts to gmane, and thus later also to the LyX list, or so I 
thought. This field apparently does not get transmitted in the email 
header, so I will now try to also cc the list. Sorry in advance for 
eventual double-posts because of this...



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.



Sorry about the confusion! The error occurs only on Mac OS X 10.8.2 
Mountain Lion. The problem I think is related to the fact that I work on 
the same code base from both Windows 7 and Mac OS X using a git 
repository. To handle end-of-line characters differently, there is an 
option in git to always commit unix-style line endings, but check out 
files with OS-native line endings respectively.


Now I wondered whether end-of-line issues lead to the error, but then 
again the .tex gets cut off some lines after \begin{document}.


Michael


Re: Knitr (Rnw) Rscript error log

2012-09-30 Thread Michael Bach
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 Michael Bach

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 Michael Bach

On 9/26/12 6:25 PM, Yihui Xie wrote:

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



Very good to know, thanks. I enabled that and tried again. It seems that 
there is an invalid input found by R(?). Please see also the complete 
log at the end of this post.


I investigated the .tex file and found it was cut off in the middle of 
the abstract environment. I then opened an R session in the temp 
directory and ran knit(skryptum.Rnw) which produces a skryptum.tex 
file that can be tex'ed correctly and contains the \Sepr{} parts. Also, 
the .Rnw file is complete, i.e. not cut off like the .tex file.


So I guess the Rscript call messes things up? I tried the hint by Scott 
on setting an error hook, but to no avail. How to debug further?


--
12:13:14.051: Previewing ...
12:13:14.085: (buffer-view: ⌘R)
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/skryptum.tex 
UTF-8 /Users/XYZ/Documents/Vorlesung/Theorie der Simulationstechnik/src/

12:13:14.373: running
12:13:14.381: 
'/Library/Frameworks/R.framework/Versions/2.15/Resources/bin/R --slave 
--no-restore --no-save --no-restore 
--file=/Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R 
--args /var/folders/yx/
12:13:14.383: 
tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.Rnw 
/var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.tex 
UTF-8'

12:13:14.384:

Running: 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/skryptum.tex 
UTF-8 /Users/XYZ/Documents/Vorlesung/Theorie der Simulationstechnik/src/

12:13:14.663: [1] TRUE
12:13:14.670: Warning in readLines(input, warn = FALSE) :
12:13:14.673:   invalid input found on input connection 'skryptum.Rnw'
12:13:14.925:
12:13:14.925:
12:13:14.927: processing file: skryptum.Rnw
12:13:14.942:
  |
  | |   0%
  |
12:13:14.943:
  || 100%
12:13:14.944:   ordinary text without R code
12:13:14.944:
12:13:14.947:
12:13:14.948: output file: /Users/.../Documents/Vorlesung/Theorie der 
Simulationstechnik/src/skryptum.tex

12:13:14.949:
12:13:14.949: [1] skryptum.tex
12:13:14.951: [1] TRUE
12:13:14.965: pdflatex  skryptum.tex
Running: pdflatex  skryptum.tex  /dev/null
12:13:15.211: This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
12:13:15.212:  restricted \write18 enabled.
12:13:15.227: entering extended mode
12:13:15.229: (./skryptum.tex
12:13:15.230: LaTeX2e 2011/06/27
12:13:15.230: Babel v3.8m and hyphenation patterns for english, 
dumylang, nohyphenation, ge
12:13:15.231: rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, 
ancientgreek, ibycus, arabi
12:13:15.232: c, armenian, basque, bulgarian, catalan, pinyin, coptic, 
croatian, czech, danis
12:13:15.232: h, dutch, ukenglish, usenglishmax, esperanto, estonian, 
ethiopic, farsi, finnis
12:13:15.233: h, french, friulan, galician, german, ngerman, 
swissgerman, monogreek, greek, h
12:13:15.233: ungarian, icelandic, assamese, bengali, gujarati, hindi, 
kannada, malayalam, ma
12:13:15.234: rathi, oriya, panjabi, tamil, telugu, indonesian, 
interlingua, irish, italian,
12:13:15.234: kurmanji, latin, latvian, lithuanian, mongolian, 
mongolianlmc, bokmal, nynorsk,
12:13:15.235:  polish, portuguese, romanian, romansh, russian, sanskrit, 
serbian, serbianc, s
12:13:15.236: lovak, slovenian, spanish, swedish, turkish, turkmen, 
ukrainian, uppersorbian,

12:13:15.236: welsh, loaded.
12:13:15.237:
12:13:16.309: pdflatex  skryptum.tex
12:13:16.503: This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
12:13:16.504:  restricted \write18 enabled.
/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273): Systemcall: 
'pdflatex  skryptum.tex' finished with exit code 1


Running: pdflatex  skryptum.tex  /dev/null
12:13:16.520: entering extended mode
12:13:16.521: (./skryptum.tex
12:13:16.521: LaTeX2e 2011/06/27
12:13:16.522: Babel v3.8m and hyphenation patterns for english, 
dumylang, nohyphenation, ge
12:13:16.523: rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, 
ancientgreek, ibycus, arabi
12:13:16.523: c, armenian, basque, bulgarian, catalan, pinyin, coptic, 
croatian, czech, danis
12:13:16.523: h, dutch, ukenglish, usenglishmax, esperanto, estonian, 
ethiopic, farsi, finnis
12:13:16.524: h, french, friulan, galician, german, ngerman, 
swissgerman, 

Re: Knitr (Rnw) Rscript error log

2012-09-29 Thread Michael Bach

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 Michael Bach

On 9/26/12 6:25 PM, Yihui Xie wrote:

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



Very good to know, thanks. I enabled that and tried again. It seems that 
there is an invalid input found by R(?). Please see also the complete 
log at the end of this post.


I investigated the .tex file and found it was cut off in the middle of 
the abstract environment. I then opened an R session in the temp 
directory and ran knit(skryptum.Rnw) which produces a skryptum.tex 
file that can be tex'ed correctly and contains the \Sepr{} parts. Also, 
the .Rnw file is complete, i.e. not cut off like the .tex file.


So I guess the Rscript call messes things up? I tried the hint by Scott 
on setting an error hook, but to no avail. How to debug further?


--
12:13:14.051: Previewing ...
12:13:14.085: (buffer-view: ⌘R)
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/skryptum.tex 
UTF-8 /Users/XYZ/Documents/Vorlesung/Theorie der Simulationstechnik/src/

12:13:14.373: running
12:13:14.381: 
'/Library/Frameworks/R.framework/Versions/2.15/Resources/bin/R --slave 
--no-restore --no-save --no-restore 
--file=/Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R 
--args /var/folders/yx/
12:13:14.383: 
tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.Rnw 
/var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.tex 
UTF-8'

12:13:14.384:

Running: 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/skryptum.tex 
UTF-8 /Users/XYZ/Documents/Vorlesung/Theorie der Simulationstechnik/src/

12:13:14.663: [1] TRUE
12:13:14.670: Warning in readLines(input, warn = FALSE) :
12:13:14.673:   invalid input found on input connection 'skryptum.Rnw'
12:13:14.925:
12:13:14.925:
12:13:14.927: processing file: skryptum.Rnw
12:13:14.942:
  |
  | |   0%
  |
12:13:14.943:
  || 100%
12:13:14.944:   ordinary text without R code
12:13:14.944:
12:13:14.947:
12:13:14.948: output file: /Users/.../Documents/Vorlesung/Theorie der 
Simulationstechnik/src/skryptum.tex

12:13:14.949:
12:13:14.949: [1] skryptum.tex
12:13:14.951: [1] TRUE
12:13:14.965: pdflatex  skryptum.tex
Running: pdflatex  skryptum.tex  /dev/null
12:13:15.211: This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
12:13:15.212:  restricted \write18 enabled.
12:13:15.227: entering extended mode
12:13:15.229: (./skryptum.tex
12:13:15.230: LaTeX2e 2011/06/27
12:13:15.230: Babel v3.8m and hyphenation patterns for english, 
dumylang, nohyphenation, ge
12:13:15.231: rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, 
ancientgreek, ibycus, arabi
12:13:15.232: c, armenian, basque, bulgarian, catalan, pinyin, coptic, 
croatian, czech, danis
12:13:15.232: h, dutch, ukenglish, usenglishmax, esperanto, estonian, 
ethiopic, farsi, finnis
12:13:15.233: h, french, friulan, galician, german, ngerman, 
swissgerman, monogreek, greek, h
12:13:15.233: ungarian, icelandic, assamese, bengali, gujarati, hindi, 
kannada, malayalam, ma
12:13:15.234: rathi, oriya, panjabi, tamil, telugu, indonesian, 
interlingua, irish, italian,
12:13:15.234: kurmanji, latin, latvian, lithuanian, mongolian, 
mongolianlmc, bokmal, nynorsk,
12:13:15.235:  polish, portuguese, romanian, romansh, russian, sanskrit, 
serbian, serbianc, s
12:13:15.236: lovak, slovenian, spanish, swedish, turkish, turkmen, 
ukrainian, uppersorbian,

12:13:15.236: welsh, loaded.
12:13:15.237:
12:13:16.309: pdflatex  skryptum.tex
12:13:16.503: This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
12:13:16.504:  restricted \write18 enabled.
/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273): Systemcall: 
'pdflatex  skryptum.tex' finished with exit code 1


Running: pdflatex  skryptum.tex  /dev/null
12:13:16.520: entering extended mode
12:13:16.521: (./skryptum.tex
12:13:16.521: LaTeX2e 2011/06/27
12:13:16.522: Babel v3.8m and hyphenation patterns for english, 
dumylang, nohyphenation, ge
12:13:16.523: rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, 
ancientgreek, ibycus, arabi
12:13:16.523: c, armenian, basque, bulgarian, catalan, pinyin, coptic, 
croatian, czech, danis
12:13:16.523: h, dutch, ukenglish, usenglishmax, esperanto, estonian, 
ethiopic, farsi, finnis
12:13:16.524: h, french, friulan, galician, german, ngerman, 
swissgerman, 

Re: Knitr (Rnw) Rscript error log

2012-09-29 Thread Michael Bach

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 Michael Bach

On 9/26/12 6:25 PM, Yihui Xie wrote:

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



Very good to know, thanks. I enabled that and tried again. It seems that 
there is an invalid input found by R(?). Please see also the complete 
log at the end of this post.


I investigated the .tex file and found it was cut off in the middle of 
the abstract environment. I then opened an R session in the temp 
directory and ran knit("skryptum.Rnw") which produces a skryptum.tex 
file that can be tex'ed correctly and contains the \Sepr{} parts. Also, 
the .Rnw file is complete, i.e. not cut off like the .tex file.


So I guess the Rscript call messes things up? I tried the hint by Scott 
on setting an error hook, but to no avail. How to debug further?


--
12:13:14.051: Previewing ...
12:13:14.085: (buffer-view: ⌘R)
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/""skryptum.tex" 
UTF-8 "/Users/XYZ/Documents/Vorlesung/Theorie der Simulationstechnik/src/"

12:13:14.373: running
12:13:14.381: 
'/Library/Frameworks/R.framework/Versions/2.15/Resources/bin/R --slave 
--no-restore --no-save --no-restore 
--file=/Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R 
--args /var/folders/yx/
12:13:14.383: 
tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.Rnw 
/var/folders/yx/tvnzczfx7c31c68jrddvlqgrgn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.tex 
UTF-8'

12:13:14.384:

Running: 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/""skryptum.tex" 
UTF-8 "/Users/XYZ/Documents/Vorlesung/Theorie der Simulationstechnik/src/"

12:13:14.663: [1] TRUE
12:13:14.670: Warning in readLines(input, warn = FALSE) :
12:13:14.673:   invalid input found on input connection 'skryptum.Rnw'
12:13:14.925:
12:13:14.925:
12:13:14.927: processing file: skryptum.Rnw
12:13:14.942:
  |
  | |   0%
  |
12:13:14.943:
  |>| 100%
12:13:14.944:   ordinary text without R code
12:13:14.944:
12:13:14.947:
12:13:14.948: output file: /Users/.../Documents/Vorlesung/Theorie der 
Simulationstechnik/src/skryptum.tex

12:13:14.949:
12:13:14.949: [1] "skryptum.tex"
12:13:14.951: [1] TRUE
12:13:14.965: pdflatex  "skryptum.tex"
Running: pdflatex  "skryptum.tex" > /dev/null
12:13:15.211: This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
12:13:15.212:  restricted \write18 enabled.
12:13:15.227: entering extended mode
12:13:15.229: (./skryptum.tex
12:13:15.230: LaTeX2e <2011/06/27>
12:13:15.230: Babel  and hyphenation patterns for english, 
dumylang, nohyphenation, ge
12:13:15.231: rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, 
ancientgreek, ibycus, arabi
12:13:15.232: c, armenian, basque, bulgarian, catalan, pinyin, coptic, 
croatian, czech, danis
12:13:15.232: h, dutch, ukenglish, usenglishmax, esperanto, estonian, 
ethiopic, farsi, finnis
12:13:15.233: h, french, friulan, galician, german, ngerman, 
swissgerman, monogreek, greek, h
12:13:15.233: ungarian, icelandic, assamese, bengali, gujarati, hindi, 
kannada, malayalam, ma
12:13:15.234: rathi, oriya, panjabi, tamil, telugu, indonesian, 
interlingua, irish, italian,
12:13:15.234: kurmanji, latin, latvian, lithuanian, mongolian, 
mongolianlmc, bokmal, nynorsk,
12:13:15.235:  polish, portuguese, romanian, romansh, russian, sanskrit, 
serbian, serbianc, s
12:13:15.236: lovak, slovenian, spanish, swedish, turkish, turkmen, 
ukrainian, uppersorbian,

12:13:15.236: welsh, loaded.
12:13:15.237:
12:13:16.309: pdflatex  "skryptum.tex"
12:13:16.503: This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
12:13:16.504:  restricted \write18 enabled.
/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273): Systemcall: 
'pdflatex  "skryptum.tex"' finished with exit code 1


Running: pdflatex  "skryptum.tex" > /dev/null
12:13:16.520: entering extended mode
12:13:16.521: (./skryptum.tex
12:13:16.521: LaTeX2e <2011/06/27>
12:13:16.522: Babel  and hyphenation patterns for english, 
dumylang, nohyphenation, ge
12:13:16.523: rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, 
ancientgreek, ibycus, arabi
12:13:16.523: c, armenian, basque, bulgarian, catalan, pinyin, coptic, 
croatian, czech, danis
12:13:16.523: h, dutch, ukenglish, usenglishmax, esperanto, estonian, 

Re: Knitr (Rnw) Rscript error log

2012-09-29 Thread Michael Bach

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(?)...



Knitr (Rnw) Rscript error log

2012-09-26 Thread Michael Bach
Dear LyX Developers and Users,

I am using LyX 2.0.4 on Windows 7 with the knitr (Rnw) module. I successfully
compiled the knitr-minimal.lyx example file and moved on to the
knitr-manual.lyx. I then get an error message that Rscript failed.

Can someone give me a hint on how to get a debug log of a failed Rscript call to
investigate? I am pretty sure my R environment is not set up correctly...

Best Regards,
Michael





Re: Knitr (Rnw) Rscript error log

2012-09-26 Thread Michael Bach
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






Knitr (Rnw) Rscript error log

2012-09-26 Thread Michael Bach
Dear LyX Developers and Users,

I am using LyX 2.0.4 on Windows 7 with the knitr (Rnw) module. I successfully
compiled the knitr-minimal.lyx example file and moved on to the
knitr-manual.lyx. I then get an error message that Rscript failed.

Can someone give me a hint on how to get a debug log of a failed Rscript call to
investigate? I am pretty sure my R environment is not set up correctly...

Best Regards,
Michael





Re: Knitr (Rnw) Rscript error log

2012-09-26 Thread Michael Bach
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






Knitr (Rnw) Rscript error log

2012-09-26 Thread Michael Bach
Dear LyX Developers and Users,

I am using LyX 2.0.4 on Windows 7 with the knitr (Rnw) module. I successfully
compiled the knitr-minimal.lyx example file and moved on to the
knitr-manual.lyx. I then get an error message that Rscript failed.

Can someone give me a hint on how to get a debug log of a failed Rscript call to
investigate? I am pretty sure my R environment is not set up correctly...

Best Regards,
Michael





Re: Knitr (Rnw) Rscript error log

2012-09-26 Thread Michael Bach
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






Export LyX notes/comments

2012-08-28 Thread Michael Bach

Dear LyX Users and Developers,

I understand that notes are only for the LyX documents, not the exported 
pdf documents. The comment inset exports to comment environments in tex.


I am using the presentation (beamer) class and wondered how to use one 
of the insets to export to a \note macro. Did someone set that up 
already? This would be nice because of the option to include the notes 
in the export if one wants to and also to e.g. use the nice enumerate 
markup in LyX.


Michael Bach



Re: Export LyX notes/comments

2012-08-28 Thread Michael Bach

On 8/28/2012 4:15 PM, Richard Heck wrote:


Just create a new inset by copying, e.g., the comment inset, and then
changing what needs changing. E.g., change the LaTeXName to note, and
the name of the inset to My Note.



Thanks for the hint Richard. I read in the `Customization´ manual that I 
could add this on a per-file basis via the `Local Layout´. I tried that, 
validated it via button (validate ok) and can find it now in the 
paragraph style dropdown list.


Style MyNote
  MarginDynamic
  LatexType Command
  LatexName note
  Labelstring   MyNote:
End

I followed your advice plus changed LatexType to `Command´. I can now 
find it in the paragraph style dropdown list at the very end.


This works well for simple \note{stuff}, but I would like to be able to 
have an inset that I can insert after an itemize bullet point so that 
the LaTeX looks like


\begin{itemize}
\item one
\item2- two \note[item]2{Note about two}
\end{itemize}

So I went ahead, searched in the docs and the web. Then I tried to 
create an inset:


InsetLayout Note:MyNote
  LyXType   custom
  LabelString   MyNote:
  Decorationclassic
  MarginDynamic
  LatexType command
  LatexName note[item]
  NextNoIndent  1
  LeftMarginMMM
  RightMargin   MMM
  Align Block
  AlignPossible Block, Left, Right, Center
  LabelSep  :x
  LabelFont
Shape   Italic
Series  Bold
Color   collapsable
  EndFont

  TextFont
Color   magenta
Shape   Italic
  EndFont
End

But I cannot find it under Insert  Note  ...

Where am I wrong?

Michael



Re: Export LyX notes/comments

2012-08-28 Thread Michael Bach

On 8/28/2012 5:54 PM, Michael Bach wrote:

On 8/28/2012 4:15 PM, Richard Heck wrote:


Just create a new inset by copying, e.g., the comment inset, and then
changing what needs changing. E.g., change the LaTeXName to note, and
the name of the inset to My Note.



Thanks for the hint Richard. I read in the `Customization´ manual that I
could add this on a per-file basis via the `Local Layout´. I tried that,
validated it via button (validate ok) and can find it now in the
paragraph style dropdown list.

Style MyNote
   MarginDynamic
   LatexTypeCommand
   LatexNamenote
   LabelstringMyNote:
End

I followed your advice plus changed LatexType to `Command´. I can now
find it in the paragraph style dropdown list at the very end.

This works well for simple \note{stuff}, but I would like to be able to
have an inset that I can insert after an itemize bullet point so that
the LaTeX looks like

\begin{itemize}
\item one
\item2- two \note[item]2{Note about two}
\end{itemize}

So I went ahead, searched in the docs and the web. Then I tried to
create an inset:

InsetLayout Note:MyNote
   LyXType custom
   LabelStringMyNote:
   Decorationclassic
   MarginDynamic
   LatexTypecommand
   LatexNamenote[item]
   NextNoIndent1
   LeftMarginMMM
   RightMarginMMM
   AlignBlock
   AlignPossibleBlock, Left, Right, Center
   LabelSep:x
   LabelFont
ShapeItalic
SeriesBold
Colorcollapsable
   EndFont

   TextFont
 Colormagenta
 ShapeItalic
   EndFont
End

But I cannot find it under Insert  Note  ...

Where am I wrong?

Michael




Never Mind. After a bit of experimenting, I got it to work using:

InsetLayout Flex:MyNote
  LyXType   custom
  LabelString   MyNote
  Decorationclassic
  MarginDynamic
  LatexType command
  LatexName note[item]
  LabelFont
Shape   Italic
Series  Bold
Color   collapsable
  EndFont
  TextFont
Color   magenta
Shape   Italic
  EndFont
End

Thanks again for your comment

Michael



Re: Lyx Ams align multiple equations in one line with

2012-08-28 Thread Michael Bach

On 8/28/2012 11:41 AM, alexatlyx wrote:

Hi all,

using ams align I can aligne multiple equations in one line using extra .

I wonder how to do this in Lyx?
I can select to have ams align environment, then I see 2 blue boxes - and
then?



Hi Alex,

you can add additional columns for these environments using the `Add 
column´ function in the math toolbar at the bottom of the editing 
window. A handy Shortcut is:

ALT+M C I

this can also be seen by hovering over the icon with your mouse.

If your math toolbar is not visible, make sure you have View  Toolbars 
 Math Panels (auto) checked.


also, have a look into the nice Math user guide under Help  Math.

HTH,

Michael



Export LyX notes/comments

2012-08-28 Thread Michael Bach

Dear LyX Users and Developers,

I understand that notes are only for the LyX documents, not the exported 
pdf documents. The comment inset exports to comment environments in tex.


I am using the presentation (beamer) class and wondered how to use one 
of the insets to export to a \note macro. Did someone set that up 
already? This would be nice because of the option to include the notes 
in the export if one wants to and also to e.g. use the nice enumerate 
markup in LyX.


Michael Bach



Re: Export LyX notes/comments

2012-08-28 Thread Michael Bach

On 8/28/2012 4:15 PM, Richard Heck wrote:


Just create a new inset by copying, e.g., the comment inset, and then
changing what needs changing. E.g., change the LaTeXName to note, and
the name of the inset to My Note.



Thanks for the hint Richard. I read in the `Customization´ manual that I 
could add this on a per-file basis via the `Local Layout´. I tried that, 
validated it via button (validate ok) and can find it now in the 
paragraph style dropdown list.


Style MyNote
  MarginDynamic
  LatexType Command
  LatexName note
  Labelstring   MyNote:
End

I followed your advice plus changed LatexType to `Command´. I can now 
find it in the paragraph style dropdown list at the very end.


This works well for simple \note{stuff}, but I would like to be able to 
have an inset that I can insert after an itemize bullet point so that 
the LaTeX looks like


\begin{itemize}
\item one
\item2- two \note[item]2{Note about two}
\end{itemize}

So I went ahead, searched in the docs and the web. Then I tried to 
create an inset:


InsetLayout Note:MyNote
  LyXType   custom
  LabelString   MyNote:
  Decorationclassic
  MarginDynamic
  LatexType command
  LatexName note[item]
  NextNoIndent  1
  LeftMarginMMM
  RightMargin   MMM
  Align Block
  AlignPossible Block, Left, Right, Center
  LabelSep  :x
  LabelFont
Shape   Italic
Series  Bold
Color   collapsable
  EndFont

  TextFont
Color   magenta
Shape   Italic
  EndFont
End

But I cannot find it under Insert  Note  ...

Where am I wrong?

Michael



Re: Export LyX notes/comments

2012-08-28 Thread Michael Bach

On 8/28/2012 5:54 PM, Michael Bach wrote:

On 8/28/2012 4:15 PM, Richard Heck wrote:


Just create a new inset by copying, e.g., the comment inset, and then
changing what needs changing. E.g., change the LaTeXName to note, and
the name of the inset to My Note.



Thanks for the hint Richard. I read in the `Customization´ manual that I
could add this on a per-file basis via the `Local Layout´. I tried that,
validated it via button (validate ok) and can find it now in the
paragraph style dropdown list.

Style MyNote
   MarginDynamic
   LatexTypeCommand
   LatexNamenote
   LabelstringMyNote:
End

I followed your advice plus changed LatexType to `Command´. I can now
find it in the paragraph style dropdown list at the very end.

This works well for simple \note{stuff}, but I would like to be able to
have an inset that I can insert after an itemize bullet point so that
the LaTeX looks like

\begin{itemize}
\item one
\item2- two \note[item]2{Note about two}
\end{itemize}

So I went ahead, searched in the docs and the web. Then I tried to
create an inset:

InsetLayout Note:MyNote
   LyXType custom
   LabelStringMyNote:
   Decorationclassic
   MarginDynamic
   LatexTypecommand
   LatexNamenote[item]
   NextNoIndent1
   LeftMarginMMM
   RightMarginMMM
   AlignBlock
   AlignPossibleBlock, Left, Right, Center
   LabelSep:x
   LabelFont
ShapeItalic
SeriesBold
Colorcollapsable
   EndFont

   TextFont
 Colormagenta
 ShapeItalic
   EndFont
End

But I cannot find it under Insert  Note  ...

Where am I wrong?

Michael




Never Mind. After a bit of experimenting, I got it to work using:

InsetLayout Flex:MyNote
  LyXType   custom
  LabelString   MyNote
  Decorationclassic
  MarginDynamic
  LatexType command
  LatexName note[item]
  LabelFont
Shape   Italic
Series  Bold
Color   collapsable
  EndFont
  TextFont
Color   magenta
Shape   Italic
  EndFont
End

Thanks again for your comment

Michael



Re: Lyx Ams align multiple equations in one line with

2012-08-28 Thread Michael Bach

On 8/28/2012 11:41 AM, alexatlyx wrote:

Hi all,

using ams align I can aligne multiple equations in one line using extra .

I wonder how to do this in Lyx?
I can select to have ams align environment, then I see 2 blue boxes - and
then?



Hi Alex,

you can add additional columns for these environments using the `Add 
column´ function in the math toolbar at the bottom of the editing 
window. A handy Shortcut is:

ALT+M C I

this can also be seen by hovering over the icon with your mouse.

If your math toolbar is not visible, make sure you have View  Toolbars 
 Math Panels (auto) checked.


also, have a look into the nice Math user guide under Help  Math.

HTH,

Michael



Export LyX notes/comments

2012-08-28 Thread Michael Bach

Dear LyX Users and Developers,

I understand that notes are only for the LyX documents, not the exported 
pdf documents. The comment inset exports to comment environments in tex.


I am using the presentation (beamer) class and wondered how to use one 
of the insets to export to a \note macro. Did someone set that up 
already? This would be nice because of the option to include the notes 
in the export if one wants to and also to e.g. use the nice enumerate 
markup in LyX.


Michael Bach



Re: Export LyX notes/comments

2012-08-28 Thread Michael Bach

On 8/28/2012 4:15 PM, Richard Heck wrote:


Just create a new inset by copying, e.g., the comment inset, and then
changing what needs changing. E.g., change the LaTeXName to "note", and
the name of the inset to "My Note".



Thanks for the hint Richard. I read in the `Customization´ manual that I 
could add this on a per-file basis via the `Local Layout´. I tried that, 
validated it via button (validate ok) and can find it now in the 
paragraph style dropdown list.


Style MyNote
  MarginDynamic
  LatexType Command
  LatexName note
  Labelstring   "MyNote:"
End

I followed your advice plus changed LatexType to `Command´. I can now 
find it in the paragraph style dropdown list at the very end.


This works well for simple \note{stuff}, but I would like to be able to 
have an inset that I can insert after an itemize bullet point so that 
the LaTeX looks like


\begin{itemize}
\item one
\item<2-> two \note[item]<2>{Note about two}
\end{itemize}

So I went ahead, searched in the docs and the web. Then I tried to 
create an inset:


InsetLayout "Note:MyNote"
  LyXType   custom
  LabelString   "MyNote:"
  Decorationclassic
  MarginDynamic
  LatexType command
  LatexName note[item]
  NextNoIndent  1
  LeftMarginMMM
  RightMargin   MMM
  Align Block
  AlignPossible Block, Left, Right, Center
  LabelSep  :x
  LabelFont
Shape   Italic
Series  Bold
Color   collapsable
  EndFont

  TextFont
Color   magenta
Shape   Italic
  EndFont
End

But I cannot find it under Insert > Note > ...

Where am I wrong?

Michael



Re: Export LyX notes/comments

2012-08-28 Thread Michael Bach

On 8/28/2012 5:54 PM, Michael Bach wrote:

On 8/28/2012 4:15 PM, Richard Heck wrote:


Just create a new inset by copying, e.g., the comment inset, and then
changing what needs changing. E.g., change the LaTeXName to "note", and
the name of the inset to "My Note".



Thanks for the hint Richard. I read in the `Customization´ manual that I
could add this on a per-file basis via the `Local Layout´. I tried that,
validated it via button (validate ok) and can find it now in the
paragraph style dropdown list.

Style MyNote
   MarginDynamic
   LatexTypeCommand
   LatexNamenote
   Labelstring"MyNote:"
End

I followed your advice plus changed LatexType to `Command´. I can now
find it in the paragraph style dropdown list at the very end.

This works well for simple \note{stuff}, but I would like to be able to
have an inset that I can insert after an itemize bullet point so that
the LaTeX looks like

\begin{itemize}
\item one
\item<2-> two \note[item]<2>{Note about two}
\end{itemize}

So I went ahead, searched in the docs and the web. Then I tried to
create an inset:

InsetLayout "Note:MyNote"
   LyXType custom
   LabelString"MyNote:"
   Decorationclassic
   MarginDynamic
   LatexTypecommand
   LatexNamenote[item]
   NextNoIndent1
   LeftMarginMMM
   RightMarginMMM
   AlignBlock
   AlignPossibleBlock, Left, Right, Center
   LabelSep:x
   LabelFont
ShapeItalic
SeriesBold
Colorcollapsable
   EndFont

   TextFont
 Colormagenta
 ShapeItalic
   EndFont
End

But I cannot find it under Insert > Note > ...

Where am I wrong?

Michael




Never Mind. After a bit of experimenting, I got it to work using:

InsetLayout "Flex:MyNote"
  LyXType   custom
  LabelString   "MyNote"
  Decorationclassic
  MarginDynamic
  LatexType command
  LatexName note[item]
  LabelFont
Shape   Italic
Series  Bold
Color   collapsable
  EndFont
  TextFont
Color   magenta
Shape   Italic
  EndFont
End

Thanks again for your comment

Michael



Re: Lyx Ams align multiple equations in one line with

2012-08-28 Thread Michael Bach

On 8/28/2012 11:41 AM, alexatlyx wrote:

Hi all,

using ams align I can aligne multiple equations in one line using extra &.

I wonder how to do this in Lyx?
I can select to have ams align environment, then I see 2 blue boxes - and
then?



Hi Alex,

you can add additional columns for these environments using the `Add 
column´ function in the math toolbar at the bottom of the editing 
window. A handy Shortcut is:

ALT+M C I

this can also be seen by hovering over the icon with your mouse.

If your math toolbar is not visible, make sure you have View > Toolbars 
> Math Panels (auto) checked.


also, have a look into the nice Math user guide under Help > Math.

HTH,

Michael



Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 8:52 AM, Jürgen Spitzmüller wrote:


It will be fixed in LyX 2.0.5.



Thanks! As I would really like to have it for 2.0.4 I will use the 
custom command


okular --unique $$o#src:$$n $$f

for Tools  Preferences  File Handling  File Formats  Viewer as 
indicated here (line 107):

http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x

Michael



Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 8:52 AM, Jürgen Spitzmüller wrote:


It will be fixed in LyX 2.0.5.



Thanks! As I would really like to have it for 2.0.4 I will use the 
custom command


okular --unique $$o#src:$$n $$f

for Tools  Preferences  File Handling  File Formats  Viewer as 
indicated here (line 107 as of now):

http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x

Michael



Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 8:52 AM, Jürgen Spitzmüller wrote:


It will be fixed in LyX 2.0.5.



Thanks! As I would really like to have it for 2.0.4 I will use the 
custom command


okular --unique $$o#src:$$n $$f

for Tools  Preferences  File Handling  File Formats  Viewer as 
indicated here (line 107):

http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x

Michael



Cross-reference other LyX documents

2012-08-27 Thread Michael Bach

Dear LyX Users and Developers,

I am preparing slides for a lecture using the presentation (beamer) 
class. Within that I would like to be able to reference labels inside my 
lecture notes which is another LyX document.


There was a post on SE some months ago:
http://tex.stackexchange.com/questions/39772/using-the-xr-package-in-lyx-for-cross-referencing-an-external-lyx-document

Breakdown: The OP went ahead and installed the xr package which can 
reference labels in another-file.tex by using 
\externaldocument{another-file}. This searches inside the .aux file 
another-file.aux for the labels.


Now the question is: How to tell LyX to put intermediate files (or just 
the aux) into the current working directory so that this will work?


Quick google just came up with this:
http://tex.stackexchange.com/questions/19768/lyx-how-to-put-temporary-files-to-the-lyx-file-folder-for-truecrypt-compatibil

In which there is no solution. Any tips?

Best Regards,
Michael Bach



Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 4:44 PM, Jürgen Spitzmüller wrote:

2012/8/27 Michael Bach pha...@gmail.com:

Thanks! As I would really like to have it for 2.0.4 I will use the custom
command

okular --unique $$o#src:$$n $$f

for Tools  Preferences  File Handling  File Formats  Viewer as indicated
here (line 107 as of now):
http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x


This won't work, since LyX 2.0.4 does not know the $$f placeholder.
You'd need to apply the whole patch to the 2.0.4 sources or checkout
and compile the stable branch.



Ah, I thought the $$f had been implemented already (i.e. for other 
viewers), but was not set for the default okular command. But then you 
would surely have told me to do what I was trying to do :)


Thanks again and obviously looking forward to 2.0.5!

Michael


Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 8:52 AM, Jürgen Spitzmüller wrote:


It will be fixed in LyX 2.0.5.



Thanks! As I would really like to have it for 2.0.4 I will use the 
custom command


okular --unique $$o#src:$$n $$f

for Tools  Preferences  File Handling  File Formats  Viewer as 
indicated here (line 107):

http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x

Michael



Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 8:52 AM, Jürgen Spitzmüller wrote:


It will be fixed in LyX 2.0.5.



Thanks! As I would really like to have it for 2.0.4 I will use the 
custom command


okular --unique $$o#src:$$n $$f

for Tools  Preferences  File Handling  File Formats  Viewer as 
indicated here (line 107 as of now):

http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x

Michael



Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 8:52 AM, Jürgen Spitzmüller wrote:


It will be fixed in LyX 2.0.5.



Thanks! As I would really like to have it for 2.0.4 I will use the 
custom command


okular --unique $$o#src:$$n $$f

for Tools  Preferences  File Handling  File Formats  Viewer as 
indicated here (line 107):

http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x

Michael



Cross-reference other LyX documents

2012-08-27 Thread Michael Bach

Dear LyX Users and Developers,

I am preparing slides for a lecture using the presentation (beamer) 
class. Within that I would like to be able to reference labels inside my 
lecture notes which is another LyX document.


There was a post on SE some months ago:
http://tex.stackexchange.com/questions/39772/using-the-xr-package-in-lyx-for-cross-referencing-an-external-lyx-document

Breakdown: The OP went ahead and installed the xr package which can 
reference labels in another-file.tex by using 
\externaldocument{another-file}. This searches inside the .aux file 
another-file.aux for the labels.


Now the question is: How to tell LyX to put intermediate files (or just 
the aux) into the current working directory so that this will work?


Quick google just came up with this:
http://tex.stackexchange.com/questions/19768/lyx-how-to-put-temporary-files-to-the-lyx-file-folder-for-truecrypt-compatibil

In which there is no solution. Any tips?

Best Regards,
Michael Bach



Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 4:44 PM, Jürgen Spitzmüller wrote:

2012/8/27 Michael Bach pha...@gmail.com:

Thanks! As I would really like to have it for 2.0.4 I will use the custom
command

okular --unique $$o#src:$$n $$f

for Tools  Preferences  File Handling  File Formats  Viewer as indicated
here (line 107 as of now):
http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x


This won't work, since LyX 2.0.4 does not know the $$f placeholder.
You'd need to apply the whole patch to the 2.0.4 sources or checkout
and compile the stable branch.



Ah, I thought the $$f had been implemented already (i.e. for other 
viewers), but was not set for the default okular command. But then you 
would surely have told me to do what I was trying to do :)


Thanks again and obviously looking forward to 2.0.5!

Michael


Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 8:52 AM, Jürgen Spitzmüller wrote:


It will be fixed in LyX 2.0.5.



Thanks! As I would really like to have it for 2.0.4 I will use the 
custom command


okular --unique "$$o#src:$$n $$f"

for Tools > Preferences > File Handling > File Formats > Viewer as 
indicated here (line 107):

http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x

Michael



Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 8:52 AM, Jürgen Spitzmüller wrote:


It will be fixed in LyX 2.0.5.



Thanks! As I would really like to have it for 2.0.4 I will use the 
custom command


okular --unique "$$o#src:$$n $$f"

for Tools > Preferences > File Handling > File Formats > Viewer as 
indicated here (line 107 as of now):

http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x

Michael



Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 8:52 AM, Jürgen Spitzmüller wrote:


It will be fixed in LyX 2.0.5.



Thanks! As I would really like to have it for 2.0.4 I will use the 
custom command


okular --unique "$$o#src:$$n $$f"

for Tools > Preferences > File Handling > File Formats > Viewer as 
indicated here (line 107):

http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x

Michael



Cross-reference other LyX documents

2012-08-27 Thread Michael Bach

Dear LyX Users and Developers,

I am preparing slides for a lecture using the presentation (beamer) 
class. Within that I would like to be able to reference labels inside my 
lecture notes which is another LyX document.


There was a post on SE some months ago:
http://tex.stackexchange.com/questions/39772/using-the-xr-package-in-lyx-for-cross-referencing-an-external-lyx-document

Breakdown: The OP went ahead and installed the xr package which can 
reference labels in another-file.tex by using 
\externaldocument{another-file}. This searches inside the .aux file 
another-file.aux for the labels.


Now the question is: How to tell LyX to put intermediate files (or just 
the aux) into the current working directory so that this will work?


Quick google just came up with this:
http://tex.stackexchange.com/questions/19768/lyx-how-to-put-temporary-files-to-the-lyx-file-folder-for-truecrypt-compatibil

In which there is no solution. Any tips?

Best Regards,
Michael Bach



Re: Okular 0.15 and forward search

2012-08-27 Thread Michael Bach

On 8/27/2012 4:44 PM, Jürgen Spitzmüller wrote:

2012/8/27 Michael Bach <pha...@gmail.com>:

Thanks! As I would really like to have it for 2.0.4 I will use the custom
command

okular --unique "$$o#src:$$n $$f"

for Tools > Preferences > File Handling > File Formats > Viewer as indicated
here (line 107 as of now):
http://www.lyx.org/trac/browser/lyxgit/status.20x?rev=2.0.x


This won't work, since LyX 2.0.4 does not know the $$f placeholder.
You'd need to apply the whole patch to the 2.0.4 sources or checkout
and compile the stable branch.



Ah, I thought the $$f had been implemented already (i.e. for other 
viewers), but was not set for the default "okular" command. But then you 
would surely have told me to do what I was trying to do :)


Thanks again and obviously looking forward to 2.0.5!

Michael


Okular 0.15 and forward search

2012-08-25 Thread Michael Bach
Dear LyX Users and Developers,

I am running LyX 2.0.4 under Arch GNU/Linux with Okular 0.15. I got the inverse
search to work already and would like to use forward search.

Now I tried the predefined okular in Tools  Preferences  File Handling 
File Formats  Viewer

I also used a custom variant: okular --unique file:$$o#src:$$n $$t

which I found on the web and that did not work either. It opens the pdf file
correctly, but does not jump (near) to the line I am on in LyX.

So to all LyX-okular users: Was there any change to the okular syntax on the
0.15 update on August 1st regarding forward search? Any other tips?

Michael



Okular 0.15 and forward search

2012-08-25 Thread Michael Bach
Dear LyX Users and Developers,

I am running LyX 2.0.4 under Arch GNU/Linux with Okular 0.15. I got the inverse
search to work already and would like to use forward search.

Now I tried the predefined okular in Tools  Preferences  File Handling 
File Formats  Viewer

I also used a custom variant: okular --unique file:$$o#src:$$n $$t

which I found on the web and that did not work either. It opens the pdf file
correctly, but does not jump (near) to the line I am on in LyX.

So to all LyX-okular users: Was there any change to the okular syntax on the
0.15 update on August 1st regarding forward search? Any other tips?

Michael



Okular 0.15 and forward search

2012-08-25 Thread Michael Bach
Dear LyX Users and Developers,

I am running LyX 2.0.4 under Arch GNU/Linux with Okular 0.15. I got the inverse
search to work already and would like to use forward search.

Now I tried the predefined "okular" in Tools > Preferences > File Handling >
File Formats > Viewer

I also used a custom variant: okular --unique "file:$$o#src:$$n $$t"

which I found on the web and that did not work either. It opens the pdf file
correctly, but does not jump (near) to the line I am on in LyX.

So to all LyX-okular users: Was there any change to the okular syntax on the
0.15 update on August 1st regarding forward search? Any other tips?

Michael



Re: presentation (beamer) and bibtex inputenc

2012-08-24 Thread Michael Bach

On 8/23/2012 11:06 PM, Les Denham wrote:

I have had similar problems with beamer and BibTeX in English when a
name in the bibliography had an accented character (é I think).

I did figure out a workaround, but I don't remember exactly how. I
think it involved putting the offending reference in a separate .bib
file, but I don't remember the details and no longer have the files.



Thanks for your comment Les. I solved this by using Document  Settings 
 Language  Encoding  Other: Unicode (utf8).


Turns out that I also did this in the article document class file I 
mentioned in my OP because of other Unicode symbols, but forgot about 
that setting.


I am curious: Could be my setup is borked up, but here I thought 
specifying German as the document language takes care of inputenc in 
respect to German diacritics and special characters such as the ß for 
the bibliography.


Michael





Re: presentation (beamer) and bibtex inputenc

2012-08-24 Thread Michael Bach

On 8/23/2012 11:06 PM, Les Denham wrote:

I have had similar problems with beamer and BibTeX in English when a
name in the bibliography had an accented character (é I think).

I did figure out a workaround, but I don't remember exactly how. I
think it involved putting the offending reference in a separate .bib
file, but I don't remember the details and no longer have the files.



Thanks for your comment Les. I solved this by using Document  Settings 
 Language  Encoding  Other: Unicode (utf8).


Turns out that I also did this in the article document class file I 
mentioned in my OP because of other Unicode symbols, but forgot about 
that setting.


I am curious: Could be my setup is borked up, but here I thought 
specifying German as the document language takes care of inputenc in 
respect to German diacritics and special characters such as the ß for 
the bibliography.


Michael





Re: presentation (beamer) and bibtex inputenc

2012-08-24 Thread Michael Bach

On 8/23/2012 11:06 PM, Les Denham wrote:

I have had similar problems with beamer and BibTeX in English when a
name in the bibliography had an accented character (é I think).

I did figure out a workaround, but I don't remember exactly how. I
think it involved putting the offending reference in a separate .bib
file, but I don't remember the details and no longer have the files.



Thanks for your comment Les. I solved this by using Document > Settings 
> Language > Encoding > Other: Unicode (utf8).


Turns out that I also did this in the article document class file I 
mentioned in my OP because of other Unicode symbols, but forgot about 
that setting.


I am curious: Could be my setup is borked up, but here I thought 
specifying "German" as the document language takes care of inputenc in 
respect to German diacritics and special characters such as the "ß" for 
the bibliography.


Michael





Spell-checking two languages

2012-08-23 Thread Michael Bach

Dear LyX Users and Developers,

I just wanted to ask whether there is the option to use the 
spell-checking feature of LyX for a document with e.g. mixed German and 
English content.


I could not find any info in the Help Manuals. I know that I can do a 
Edit  Language on the parts in English so that the German spell checker 
ignores them. But I would ideally also have a way of checking these 
parts as well with the English checker.


Any best practices?

Michael



Re: Spell-checking two languages

2012-08-23 Thread Michael Bach

On 8/23/2012 2:40 PM, Jean-Marc Lasgouttes wrote:


What is wrong with marking English text as English and German text as
German?



There is nothing wrong with this. Thanks for your frank response which 
made me realize my misconception: I had the impression that marking text 
as e.g. English makes the spell checker ignore these parts when a 
German spell check is started (see OP). I was not aware that 
dictionary switching is automated via the language choice. It already 
worked the way I wanted it.


Sorry for the noise,

Michael





presentation (beamer) and bibtex inputenc

2012-08-23 Thread Michael Bach

Dear LyX Users and Developers,

I am using the presentation (beamer) document class with the german 
option. I have a BibTeX bibliography that I inserted via the Insert  
... mechanism.


Now when I try to compile the file, I get inputenc errors. It stems from 
the usage of the german ß character in the title of the reference. 
From the full log:


! Package inputenc Error: Keyboard character used is undefined
(inputenc)in inputencoding `latin9'.

Now I am wondering why this does not work in the presentation (beamer) 
document class when it does work in another file with the article 
document class.


Any ideas?

Michael



Spell-checking two languages

2012-08-23 Thread Michael Bach

Dear LyX Users and Developers,

I just wanted to ask whether there is the option to use the 
spell-checking feature of LyX for a document with e.g. mixed German and 
English content.


I could not find any info in the Help Manuals. I know that I can do a 
Edit  Language on the parts in English so that the German spell checker 
ignores them. But I would ideally also have a way of checking these 
parts as well with the English checker.


Any best practices?

Michael



Re: Spell-checking two languages

2012-08-23 Thread Michael Bach

On 8/23/2012 2:40 PM, Jean-Marc Lasgouttes wrote:


What is wrong with marking English text as English and German text as
German?



There is nothing wrong with this. Thanks for your frank response which 
made me realize my misconception: I had the impression that marking text 
as e.g. English makes the spell checker ignore these parts when a 
German spell check is started (see OP). I was not aware that 
dictionary switching is automated via the language choice. It already 
worked the way I wanted it.


Sorry for the noise,

Michael





presentation (beamer) and bibtex inputenc

2012-08-23 Thread Michael Bach

Dear LyX Users and Developers,

I am using the presentation (beamer) document class with the german 
option. I have a BibTeX bibliography that I inserted via the Insert  
... mechanism.


Now when I try to compile the file, I get inputenc errors. It stems from 
the usage of the german ß character in the title of the reference. 
From the full log:


! Package inputenc Error: Keyboard character used is undefined
(inputenc)in inputencoding `latin9'.

Now I am wondering why this does not work in the presentation (beamer) 
document class when it does work in another file with the article 
document class.


Any ideas?

Michael



Spell-checking two languages

2012-08-23 Thread Michael Bach

Dear LyX Users and Developers,

I just wanted to ask whether there is the option to use the 
spell-checking feature of LyX for a document with e.g. mixed German and 
English content.


I could not find any info in the Help Manuals. I know that I can do a 
Edit > Language on the parts in English so that the German spell checker 
ignores them. But I would ideally also have a way of checking these 
parts as well with the English checker.


Any best practices?

Michael



Re: Spell-checking two languages

2012-08-23 Thread Michael Bach

On 8/23/2012 2:40 PM, Jean-Marc Lasgouttes wrote:


What is wrong with marking English text as English and German text as
German?



There is nothing wrong with this. Thanks for your frank response which 
made me realize my misconception: I had the impression that marking text 
as e.g. English makes the spell checker ignore these parts when a 
"German" spell check is started (see OP). I was not aware that 
dictionary switching is automated via the language choice. It already 
worked the way I wanted it.


Sorry for the noise,

Michael





presentation (beamer) and bibtex inputenc

2012-08-23 Thread Michael Bach

Dear LyX Users and Developers,

I am using the presentation (beamer) document class with the "german" 
option. I have a BibTeX bibliography that I inserted via the Insert > 
... mechanism.


Now when I try to compile the file, I get inputenc errors. It stems from 
the usage of the german "ß" character in the title of the reference. 
From the full log:


! Package inputenc Error: Keyboard character used is undefined
(inputenc)in inputencoding `latin9'.

Now I am wondering why this does not work in the presentation (beamer) 
document class when it does work in another file with the article 
document class.


Any ideas?

Michael



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

2012-08-17 Thread Michael Bach

On 8/16/2012 9:51 PM, Yihui Xie wrote:

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.



I see, thanks for clarification. Would it be possible to define a 
math-specific inset, that formats and acts like the R/S expression 
inset, but inside a math inset? That way, knitr does not need to change 
and it would be more in line with the other inset of the knitr (Rnw) module.


Anyone?




  1   2   >