Re: working directory cannot find graphics files

2012-07-26 Thread Stephan Witt
Am 25.07.2012 um 23:04 schrieb Hobbs,Tom:

 Hello-
 
 I am using lyx 2.0 under Mac Lion and I have a problem with the working 
 directory and pathnames to files.  As I understand it, if you set the working 
 directory to a folder named, say, /Users/Tom/My_folder, then you can omit the 
 full pathnames when you insert graphics, etc.  This is really needed because 
 otherwise, it becomes terribly hard to share lyx documents and associated 
 graphics files among different users. 
 
 When I give the full pathname to graphics files in the Insert Graphics 
 screen, all is fine.  But when I set the path to the working directory in 
 preferences and the file name in the graphic setting, lyx can't find the 
 file. 

The working directory is the directory LyX changes to on startup.

The best thing one can do is to place all graphics files in the same directory 
or a sub directory of the referring document. All references should be made 
relative to your document. Then it's easy to share documents with associated 
graphics with other users.

Regards,
Stephan




Re: working directory cannot find graphics files

2012-07-26 Thread Hobbs,Tom
Many thanks--I eventually figured this out. It is possible to do the working 
directory route as well, but you can't do both--have relative path names in 
directories below the one where the document is stored and the working 
directory set in Preferences.

Thanks again for your helpful response.

Tom

On Jul 26, 2012, at 12:48 AM, Stephan Witt wrote:

Am 25.07.2012 um 23:04 schrieb Hobbs,Tom:

Hello-

I am using lyx 2.0 under Mac Lion and I have a problem with the working 
directory and pathnames to files.  As I understand it, if you set the working 
directory to a folder named, say, /Users/Tom/My_folder, then you can omit the 
full pathnames when you insert graphics, etc.  This is really needed because 
otherwise, it becomes terribly hard to share lyx documents and associated 
graphics files among different users.

When I give the full pathname to graphics files in the Insert Graphics screen, 
all is fine.  But when I set the path to the working directory in preferences 
and the file name in the graphic setting, lyx can't find the file.

The working directory is the directory LyX changes to on startup.

The best thing one can do is to place all graphics files in the same directory 
or a sub directory of the referring document. All references should be made 
relative to your document. Then it's easy to share documents with associated 
graphics with other users.

Regards,
Stephan



N. Thompson Hobbs
Professor, Natural Resource Ecology Laboratory, Department
of Ecosystem Science and Sustainability, and
Graduate Degree Program in Ecology
Colorado State University
Fort Collins, CO 80524
970-491-5738
http://www.nrel.colostate.edu/nrel/apps/directory/people.php?Main_ID=204



For group mailings:
Use of this mail list is intended exclusively for
internal communication at Colorado State University.
Any unauthorized use is prohibited.





Sweave documents fail to compile under 2.03

2012-07-26 Thread Hobbs,Tom
Hello--

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

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

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

The italics are the chunk.

I would be grateful for any ideas about this problem.

My best,

Tom Hobbs







Re: Sweave documents fail to compile under 2.03

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

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


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

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

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

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

 The italics are the chunk.

 I would be grateful for any ideas about this problem.

 My best,

 Tom Hobbs







Re: Sweave documents fail to compile under 2.03

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

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

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

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


Re: Sweave documents fail to compile under 2.03

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

The problem comes from:

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

becomes

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

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

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

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

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


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

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

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

 I included the full message list below.

 I have done the Reconfigure and the problem remains.

 Thanks very much for your help.

 Tom


Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes
Hello Everyone.

I use lyx for some years, and use some (very few) advanced features. By now I 
intend to create a command to create a list of simbols in abnt style. So I 
wrote this in the preamble, for testing reasons only.

\newcommand{\simbolo}[2]
{
  \ifthenelse{\equal{#1}{}}
{Then1}
{Else1}
 \ifthenelse{\equal{#2}{}}
{Then2}
{Else2}
}

And in plain latex I would use:

...a vector defined in \simbolo{$R^{n}$}{Euclidian Space of dimension n} is ...

wich works as expected.

But in lyx, I had found out that if I insert a ert (wrote ert in  and the 
text in $$ is inserted with lyx math mode): 

...a vector defined in \simbolo{  $R^{n}$   }{  Euclidian Space of 
dimension n  }   is ...

I got errors. It seens that lyx automatically close the braces with an }, so I 
had to write 

...a vector defined in \simbolo{  $R^{n}$   {  Euclidian Space of dimension 
n is ...

I got no errors, but the resulting latex is:

...a vector defined in \simbolo{$R^{n}$}{Euclidian Space of dimension n is ...}

This is not what I want since I would like to close the description of R^n (it 
will appear only in the list of symbols) and continue with the normal text flow 
in the same line.

Do you have any suggestions?



-- 


Carlos Eduardo de Brito Novaes




signature.asc
Description: This is a digitally signed message part.


Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread PhilipPirrip



Do you have any suggestions?


Minimal example .lyx file please.



Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread PhilipPirrip

The attached example works for me, an produces


-

Else1 Else2 is















-


simbolo-minimal.lyx
Description: application/lyx


Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes
This test case worked here too. Just my file behave strange, if I wrote some 
parts I got no errors, but if I copy the section that gave-me errors in your 
example it works fine.
I found out that for some reason the lyx code had an line \lang brasilian 
just 
after the section that does not work, I just open the lyx file in a text editor 
and deleted that line. Everything works fine now.




Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes

I tried to replicate this error by setting a different language on different 
sections
(something I do frequently in citations and for some expressions), but I 
cant reproduce the error anymore. Maybe if I mess up the text a little.

Thanks for the help.





Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes

I tried to replicate this error by setting a different language on different 
sections
(something I do frequently in citations and for some expressions), but I 
cant reproduce the error anymore. Maybe if I mess up the text a little.

Thanks for the help.



Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes
Just for information, the actual command definition is presented below.
I plan to use at the very first time a symbol is declared so it will get 
written 
to the list of symbols with the corresponding description.

\newcommand{\simbolo}[2]
{
  \ifthenelse{\equal{#2}{}}
{\addcontentsline{los}{simbolo}{#1}#1}
{\addcontentsline{los}{simbolo}{#1: #2}#1}
}





Mountain Lion

2012-07-26 Thread Anders Host-Madsen
Did anyone try to run LyX under Mountain Lion? Any problems?

Thanks.



Re: working directory cannot find graphics files

2012-07-26 Thread Stephan Witt
Am 25.07.2012 um 23:04 schrieb Hobbs,Tom:

 Hello-
 
 I am using lyx 2.0 under Mac Lion and I have a problem with the working 
 directory and pathnames to files.  As I understand it, if you set the working 
 directory to a folder named, say, /Users/Tom/My_folder, then you can omit the 
 full pathnames when you insert graphics, etc.  This is really needed because 
 otherwise, it becomes terribly hard to share lyx documents and associated 
 graphics files among different users. 
 
 When I give the full pathname to graphics files in the Insert Graphics 
 screen, all is fine.  But when I set the path to the working directory in 
 preferences and the file name in the graphic setting, lyx can't find the 
 file. 

The working directory is the directory LyX changes to on startup.

The best thing one can do is to place all graphics files in the same directory 
or a sub directory of the referring document. All references should be made 
relative to your document. Then it's easy to share documents with associated 
graphics with other users.

Regards,
Stephan




Re: working directory cannot find graphics files

2012-07-26 Thread Hobbs,Tom
Many thanks--I eventually figured this out. It is possible to do the working 
directory route as well, but you can't do both--have relative path names in 
directories below the one where the document is stored and the working 
directory set in Preferences.

Thanks again for your helpful response.

Tom

On Jul 26, 2012, at 12:48 AM, Stephan Witt wrote:

Am 25.07.2012 um 23:04 schrieb Hobbs,Tom:

Hello-

I am using lyx 2.0 under Mac Lion and I have a problem with the working 
directory and pathnames to files.  As I understand it, if you set the working 
directory to a folder named, say, /Users/Tom/My_folder, then you can omit the 
full pathnames when you insert graphics, etc.  This is really needed because 
otherwise, it becomes terribly hard to share lyx documents and associated 
graphics files among different users.

When I give the full pathname to graphics files in the Insert Graphics screen, 
all is fine.  But when I set the path to the working directory in preferences 
and the file name in the graphic setting, lyx can't find the file.

The working directory is the directory LyX changes to on startup.

The best thing one can do is to place all graphics files in the same directory 
or a sub directory of the referring document. All references should be made 
relative to your document. Then it's easy to share documents with associated 
graphics with other users.

Regards,
Stephan



N. Thompson Hobbs
Professor, Natural Resource Ecology Laboratory, Department
of Ecosystem Science and Sustainability, and
Graduate Degree Program in Ecology
Colorado State University
Fort Collins, CO 80524
970-491-5738
http://www.nrel.colostate.edu/nrel/apps/directory/people.php?Main_ID=204



For group mailings:
Use of this mail list is intended exclusively for
internal communication at Colorado State University.
Any unauthorized use is prohibited.





Sweave documents fail to compile under 2.03

2012-07-26 Thread Hobbs,Tom
Hello--

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

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

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

The italics are the chunk.

I would be grateful for any ideas about this problem.

My best,

Tom Hobbs







Re: Sweave documents fail to compile under 2.03

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

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


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

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

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

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

 The italics are the chunk.

 I would be grateful for any ideas about this problem.

 My best,

 Tom Hobbs







Re: Sweave documents fail to compile under 2.03

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

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

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

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


Re: Sweave documents fail to compile under 2.03

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

The problem comes from:

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

becomes

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

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

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

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

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


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

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

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

 I included the full message list below.

 I have done the Reconfigure and the problem remains.

 Thanks very much for your help.

 Tom


Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes
Hello Everyone.

I use lyx for some years, and use some (very few) advanced features. By now I 
intend to create a command to create a list of simbols in abnt style. So I 
wrote this in the preamble, for testing reasons only.

\newcommand{\simbolo}[2]
{
  \ifthenelse{\equal{#1}{}}
{Then1}
{Else1}
 \ifthenelse{\equal{#2}{}}
{Then2}
{Else2}
}

And in plain latex I would use:

...a vector defined in \simbolo{$R^{n}$}{Euclidian Space of dimension n} is ...

wich works as expected.

But in lyx, I had found out that if I insert a ert (wrote ert in  and the 
text in $$ is inserted with lyx math mode): 

...a vector defined in \simbolo{  $R^{n}$   }{  Euclidian Space of 
dimension n  }   is ...

I got errors. It seens that lyx automatically close the braces with an }, so I 
had to write 

...a vector defined in \simbolo{  $R^{n}$   {  Euclidian Space of dimension 
n is ...

I got no errors, but the resulting latex is:

...a vector defined in \simbolo{$R^{n}$}{Euclidian Space of dimension n is ...}

This is not what I want since I would like to close the description of R^n (it 
will appear only in the list of symbols) and continue with the normal text flow 
in the same line.

Do you have any suggestions?



-- 


Carlos Eduardo de Brito Novaes




signature.asc
Description: This is a digitally signed message part.


Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread PhilipPirrip



Do you have any suggestions?


Minimal example .lyx file please.



Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread PhilipPirrip

The attached example works for me, an produces


-

Else1 Else2 is















-


simbolo-minimal.lyx
Description: application/lyx


Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes
This test case worked here too. Just my file behave strange, if I wrote some 
parts I got no errors, but if I copy the section that gave-me errors in your 
example it works fine.
I found out that for some reason the lyx code had an line \lang brasilian 
just 
after the section that does not work, I just open the lyx file in a text editor 
and deleted that line. Everything works fine now.




Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes

I tried to replicate this error by setting a different language on different 
sections
(something I do frequently in citations and for some expressions), but I 
cant reproduce the error anymore. Maybe if I mess up the text a little.

Thanks for the help.





Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes

I tried to replicate this error by setting a different language on different 
sections
(something I do frequently in citations and for some expressions), but I 
cant reproduce the error anymore. Maybe if I mess up the text a little.

Thanks for the help.



Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes
Just for information, the actual command definition is presented below.
I plan to use at the very first time a symbol is declared so it will get 
written 
to the list of symbols with the corresponding description.

\newcommand{\simbolo}[2]
{
  \ifthenelse{\equal{#2}{}}
{\addcontentsline{los}{simbolo}{#1}#1}
{\addcontentsline{los}{simbolo}{#1: #2}#1}
}





Mountain Lion

2012-07-26 Thread Anders Host-Madsen
Did anyone try to run LyX under Mountain Lion? Any problems?

Thanks.



Re: working directory cannot find graphics files

2012-07-26 Thread Stephan Witt
Am 25.07.2012 um 23:04 schrieb Hobbs,Tom:

> Hello-
> 
> I am using lyx 2.0 under Mac Lion and I have a problem with the working 
> directory and pathnames to files.  As I understand it, if you set the working 
> directory to a folder named, say, /Users/Tom/My_folder, then you can omit the 
> full pathnames when you insert graphics, etc.  This is really needed because 
> otherwise, it becomes terribly hard to share lyx documents and associated 
> graphics files among different users. 
> 
> When I give the full pathname to graphics files in the Insert Graphics 
> screen, all is fine.  But when I set the path to the working directory in 
> preferences and the file name in the graphic setting, lyx can't find the 
> file. 

The working directory is the directory LyX changes to on startup.

The best thing one can do is to place all graphics files in the same directory 
or a sub directory of the referring document. All references should be made 
relative to your document. Then it's easy to share documents with associated 
graphics with other users.

Regards,
Stephan




Re: working directory cannot find graphics files

2012-07-26 Thread Hobbs,Tom
Many thanks--I eventually figured this out. It is possible to do the working 
directory route as well, but you can't do both--have relative path names in 
directories below the one where the document is stored and the working 
directory set in Preferences.

Thanks again for your helpful response.

Tom

On Jul 26, 2012, at 12:48 AM, Stephan Witt wrote:

Am 25.07.2012 um 23:04 schrieb Hobbs,Tom:

Hello-

I am using lyx 2.0 under Mac Lion and I have a problem with the working 
directory and pathnames to files.  As I understand it, if you set the working 
directory to a folder named, say, /Users/Tom/My_folder, then you can omit the 
full pathnames when you insert graphics, etc.  This is really needed because 
otherwise, it becomes terribly hard to share lyx documents and associated 
graphics files among different users.

When I give the full pathname to graphics files in the Insert Graphics screen, 
all is fine.  But when I set the path to the working directory in preferences 
and the file name in the graphic setting, lyx can't find the file.

The working directory is the directory LyX changes to on startup.

The best thing one can do is to place all graphics files in the same directory 
or a sub directory of the referring document. All references should be made 
relative to your document. Then it's easy to share documents with associated 
graphics with other users.

Regards,
Stephan



N. Thompson Hobbs
Professor, Natural Resource Ecology Laboratory, Department
of Ecosystem Science and Sustainability, and
Graduate Degree Program in Ecology
Colorado State University
Fort Collins, CO 80524
970-491-5738
http://www.nrel.colostate.edu/nrel/apps/directory/people.php?Main_ID=204



For group mailings:
Use of this mail list is intended exclusively for
internal communication at Colorado State University.
Any unauthorized use is prohibited.





Sweave documents fail to compile under 2.03

2012-07-26 Thread Hobbs,Tom
Hello--

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

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

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

The italics are the chunk.

I would be grateful for any ideas about this problem.

My best,

Tom Hobbs







Re: Sweave documents fail to compile under 2.03

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

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


On Thu, Jul 26, 2012 at 9:36 AM, Hobbs,Tom  wrote:
> Hello--
>
> I have a mysterious problem.  All of the documents that I created including
> Sweave code using lyx 2.0 fail to compile when I use lyx 2.03. I am running
> lyx using Mac OS Lion.  I have several large documents with lots of Sweave
> code, so until I get this worked out, I won't able to upgrade.
>
> Even the most simple Sweave example taken from the Sweave manual fails to
> run under my 2.03 installation, i.e.:
>
> \SweaveOpts{echo=FALSE}   %turns off (FALSE) or on (TRUE) r code in output
> \SweaveOpts{keep.source=TRUE}  %leaves comments in r code
> \setkeys{Gin}{width=6 in}
> Start
> <>=
> data ( airquality )
> names(airquality)[4]="Temp"
> k=kruskal.test ( Ozone ~ Month , data = airquality )
> }
> @
>
> The italics are the chunk.
>
> I would be grateful for any ideas about this problem.
>
> My best,
>
> Tom Hobbs
>
>
>
>
>


Re: Sweave documents fail to compile under 2.03

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

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

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

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


Re: Sweave documents fail to compile under 2.03

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

The problem comes from:

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

becomes

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

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

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

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

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


On Thu, Jul 26, 2012 at 10:40 AM, Hobbs,Tom  wrote:
> Sorry--I thought the message I sent was the one you needed.  I set all of
> the debug messages to Yes and it appears that this is the one causing
> problems:
>
> 08:34:14.849: Fatal error: cannot open file '/Applications/LyX': No such
> file or directory
>
> There is a file in my /Applications directory for LyX 2.app
>
> I included the full message list below.
>
> I have done the Reconfigure and the problem remains.
>
> Thanks very much for your help.
>
> Tom


Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes
Hello Everyone.

I use lyx for some years, and use some (very few) advanced features. By now I 
intend to create a command to create a list of simbols in abnt style. So I 
wrote this in the preamble, for testing reasons only.

\newcommand{\simbolo}[2]
{
  \ifthenelse{\equal{#1}{}}
{Then1}
{Else1}
 \ifthenelse{\equal{#2}{}}
{Then2}
{Else2}
}

And in plain latex I would use:

...a vector defined in \simbolo{$R^{n}$}{Euclidian Space of dimension n} is ...

wich works as expected.

But in lyx, I had found out that if I insert a ert (wrote ert in <> and the 
text in $$ is inserted with lyx math mode): 

...a vector defined in <\simbolo{>  $R^{n}$   <}{>  Euclidian Space of 
dimension n  <}>   is ...

I got errors. It seens that lyx automatically close the braces with an }, so I 
had to write 

...a vector defined in <\simbolo{>  $R^{n}$   <{>  Euclidian Space of dimension 
n is ...

I got no errors, but the resulting latex is:

...a vector defined in \simbolo{$R^{n}$}{Euclidian Space of dimension n is ...}

This is not what I want since I would like to close the description of R^n (it 
will appear only in the list of symbols) and continue with the normal text flow 
in the same line.

Do you have any suggestions?



-- 


Carlos Eduardo de Brito Novaes




signature.asc
Description: This is a digitally signed message part.


Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread PhilipPirrip



Do you have any suggestions?


Minimal example .lyx file please.



Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread PhilipPirrip

The attached example works for me, an produces


-

Else1 Else2 is















-


simbolo-minimal.lyx
Description: application/lyx


Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes
This test case worked here too. Just my file behave strange, if I wrote some 
parts I got no errors, but if I copy the section that gave-me errors in your 
example it works fine.
I found out that for some reason the lyx code had an line "\lang brasilian" 
just 
after the section that does not work, I just open the lyx file in a text editor 
and deleted that line. Everything works fine now.




Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes

I tried to replicate this error by setting a different language on different 
sections
(something I do frequently in citations and for some expressions), but I 
cant reproduce the error anymore. Maybe if I mess up the text a little.

Thanks for the help.





Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes

I tried to replicate this error by setting a different language on different 
sections
(something I do frequently in citations and for some expressions), but I 
cant reproduce the error anymore. Maybe if I mess up the text a little.

Thanks for the help.



Re: Strange behaviour on user command defined in preamble.

2012-07-26 Thread Carlos Eduardo de Brito Novaes
Just for information, the actual command definition is presented below.
I plan to use at the very first time a symbol is declared so it will get 
written 
to the list of symbols with the corresponding description.

\newcommand{\simbolo}[2]
{
  \ifthenelse{\equal{#2}{}}
{\addcontentsline{los}{simbolo}{#1}#1}
{\addcontentsline{los}{simbolo}{#1: #2}#1}
}





Mountain Lion

2012-07-26 Thread Anders Host-Madsen
Did anyone try to run LyX under Mountain Lion? Any problems?

Thanks.