Re: SageTeX and LyX

2012-10-03 Thread Scott Kostyshak
On Tue, Oct 2, 2012 at 7:15 PM, Rob Oakes lyx-de...@oak-tree.us wrote:
 Dear LyX Users,

 I've just started playing around with SAGE (www.sagemath.org) and was
 very happy to see that there is a module which can be used with LyX.

 However, in trying to get the module to work, I've run into a snag. I
 have it installed, and I can even successfully compile the example
 document from the Wiki. However, when I try and create my own documents,
 it appears as though I'm not getting any output back from SAGE.

 Other than adding the module to a new LyX document, is there some
 configuration step that I am missing? Also, any explanation as to why
 the example would appear to compile, but new documents might not?

Hi Rob,

I've been meaning to checkout SAGE + LyX so if no one comes along to
help you I might take a look. How did you install SAGE? In the past
I've compiled from source which was very smooth but took a while.
There is also a PPA: https://launchpad.net/~aims/+archive/sagemath

Which version do you have installed?

Does the terminal output or View Messages toolbar give any useful
output that you could share?

Do you have a minimum working example that you could send or link to?

Best,

Scott

 I'm using LyX 2.1 (SVN) on Ubuntu 12.04, with a custom TeX Live 2011
 install.

 Cheers,

 Rob



Re: SageTeX and LyX

2012-10-03 Thread Rob Oakes
Hi Scott, 

On Wed, 2012-10-03 at 06:16 -0400, Scott Kostyshak wrote:

 I've been meaning to checkout SAGE + LyX so if no one comes along to
 help you I might take a look.

I appreciate the offer. After some quality time looking into how the
module works and how SageTeX processes documents, I was able to get it
up and running. I found this page to be extremely helpful:
http://www.sagemath.org/doc/tutorial/sagetex.html

Of course, like all things, I was hoping to get a quick response via the
list. I decided last year that I wanted to go back to school to improve
my mechanical engineering skills and was hoping to get Sage working for
a lab report.

(Why I decided more education would be desirable is completely beyond
me. I've forgotten how thoroughly miserable it is to be a student. While
I frequently have to work late, it's been years since I've had to pull
an all-night session to finish homework. It's every bit as bad as I
remember. It might even be worse, if you factor in age.)

 How did you install SAGE? In the past
 I've compiled from source which was very smooth but took a while.
 There is also a PPA: https://launchpad.net/~aims/+archive/sagemath

To get Sage installed, I used the PPA. I thought about compiling from
source so that I could integrate it with the system Python, and then
thought better of it. The installation from the PPA was quick and I
haven't had any issues, so far.

To install the SageTeX module (which has to be done separately from
installing Sage), I copied the sagetex folder into my LaTeX path and ran
texhash.

 Which version do you have installed?

I'm running version 5.1.

 Does the terminal output or View Messages toolbar give any useful
 output that you could share?

The output was helpful, but didn't make much sense until I read more
about how SageTeX works.

Sage processes files in two steps. You write your document, then you run
LaTeX (pdflatex, xelatex, lualatex, or regular latex) on it. This
creates a second file, with the Sage processing instructions in it. This
has a *.sagetex.sage file extension.

At this point, you have to run Sage on this secondary file, which
generates your equations, plots and other elements so that they can be
incorporated into your original LaTeX file. At that point, you run LaTeX
on the original file a second time to produce the typeset document.

The problem I was having is that I was only running LaTeX on my new
documents. The converters I set up didn't follow the appropriate pathway
of LaTeX - Sage - LaTeX. Once I added in the Sage processing step,
everything started to work.

 Do you have a minimum working example that you could send or link to?

Absolutely, attached is a simple example that I'm working up into a
template.

I'm just getting started with Sage, but now that it's working, I'm quite
impressed with what I've seen. For the past 10 years or so, I've been
using aging copies of Maple for symbolic computation, and this looks
like it will allow me to modernize. (I don't actually have to do much
symbolic math, so it hasn't been that big of a deal.)

Being able to work from within LyX, in a manner very similar to the way
I work with R code via Knitr/Sweave, is going to be very nice. Knowing
that it's all open is even better.

Cheers,

Rob

PS, when I get time, I'm going to try and update the instructions on the
Wiki to make a couple of things clearer. I'll also probably write a blog
post about it, just so I've got a record of how I got things working. If
you'd like, I'll send you a link when it's finished.


Sage Report.lyx
Description: application/lyx


Re: SageTeX and LyX

2012-10-03 Thread Scott Kostyshak
Hi Rob,

I'm CC'ing Thomas Coffee and Murat Yildizoglu, who as the wiki says
did a lot of work on the SAGE module. They might be interested in your
experience.

On Wed, Oct 3, 2012 at 12:11 PM, Rob Oakes lyx-de...@oak-tree.us wrote:
 Hi Scott,

 On Wed, 2012-10-03 at 06:16 -0400, Scott Kostyshak wrote:

 I've been meaning to checkout SAGE + LyX so if no one comes along to
 help you I might take a look.

 I appreciate the offer. After some quality time looking into how the
 module works and how SageTeX processes documents, I was able to get it
 up and running. I found this page to be extremely helpful:
 http://www.sagemath.org/doc/tutorial/sagetex.html

Great! Good job figuring it out.

 Of course, like all things, I was hoping to get a quick response via the
 list. I decided last year that I wanted to go back to school to improve
 my mechanical engineering skills and was hoping to get Sage working for
 a lab report.

 (Why I decided more education would be desirable is completely beyond
 me. I've forgotten how thoroughly miserable it is to be a student. While
 I frequently have to work late, it's been years since I've had to pull
 an all-night session to finish homework. It's every bit as bad as I
 remember. It might even be worse, if you factor in age.)

I bet that it's really difficult to do what you're doing. Hopefully
there are some fun things about being a student again that will
surprise you. How about coming home after turning your homework in and
crashing on your bed -- that must have felt nice at least :). Best of
luck with your challenge!

 How did you install SAGE? In the past
 I've compiled from source which was very smooth but took a while.
 There is also a PPA: https://launchpad.net/~aims/+archive/sagemath

 To get Sage installed, I used the PPA. I thought about compiling from
 source so that I could integrate it with the system Python, and then
 thought better of it. The installation from the PPA was quick and I
 haven't had any issues, so far.

Glad to hear.

 To install the SageTeX module (which has to be done separately from
 installing Sage), I copied the sagetex folder into my LaTeX path and ran
 texhash.

Thanks, this is useful for me. I didn't know they were separate.

 Which version do you have installed?

 I'm running version 5.1.

 Does the terminal output or View Messages toolbar give any useful
 output that you could share?

 The output was helpful, but didn't make much sense until I read more
 about how SageTeX works.

 Sage processes files in two steps. You write your document, then you run
 LaTeX (pdflatex, xelatex, lualatex, or regular latex) on it. This
 creates a second file, with the Sage processing instructions in it. This
 has a *.sagetex.sage file extension.

 At this point, you have to run Sage on this secondary file, which
 generates your equations, plots and other elements so that they can be
 incorporated into your original LaTeX file. At that point, you run LaTeX
 on the original file a second time to produce the typeset document.

 The problem I was having is that I was only running LaTeX on my new
 documents. The converters I set up didn't follow the appropriate pathway
 of LaTeX - Sage - LaTeX. Once I added in the Sage processing step,
 everything started to work.

Thanks for the explanation. It would be nice if the module took care
of all of this.

 Do you have a minimum working example that you could send or link to?

 Absolutely, attached is a simple example that I'm working up into a
 template.

 I'm just getting started with Sage, but now that it's working, I'm quite
 impressed with what I've seen. For the past 10 years or so, I've been
 using aging copies of Maple for symbolic computation, and this looks
 like it will allow me to modernize. (I don't actually have to do much
 symbolic math, so it hasn't been that big of a deal.)

 Being able to work from within LyX, in a manner very similar to the way
 I work with R code via Knitr/Sweave, is going to be very nice. Knowing
 that it's all open is even better.

I'm also a big fan of R + Knitr (+ LyX) and I agree with you. I think
having things integrated is closer to how our minds work and allows
for a more natural workflow.

 PS, when I get time, I'm going to try and update the instructions on the
 Wiki to make a couple of things clearer. I'll also probably write a blog
 post about it, just so I've got a record of how I got things working. If
 you'd like, I'll send you a link when it's finished.

Yes, I'm definitely interested. This would be great.

Thanks a lot Rob!

Scott


Re: SageTeX and LyX

2012-10-03 Thread Scott Kostyshak
On Tue, Oct 2, 2012 at 7:15 PM, Rob Oakes lyx-de...@oak-tree.us wrote:
 Dear LyX Users,

 I've just started playing around with SAGE (www.sagemath.org) and was
 very happy to see that there is a module which can be used with LyX.

 However, in trying to get the module to work, I've run into a snag. I
 have it installed, and I can even successfully compile the example
 document from the Wiki. However, when I try and create my own documents,
 it appears as though I'm not getting any output back from SAGE.

 Other than adding the module to a new LyX document, is there some
 configuration step that I am missing? Also, any explanation as to why
 the example would appear to compile, but new documents might not?

Hi Rob,

I've been meaning to checkout SAGE + LyX so if no one comes along to
help you I might take a look. How did you install SAGE? In the past
I've compiled from source which was very smooth but took a while.
There is also a PPA: https://launchpad.net/~aims/+archive/sagemath

Which version do you have installed?

Does the terminal output or View Messages toolbar give any useful
output that you could share?

Do you have a minimum working example that you could send or link to?

Best,

Scott

 I'm using LyX 2.1 (SVN) on Ubuntu 12.04, with a custom TeX Live 2011
 install.

 Cheers,

 Rob



Re: SageTeX and LyX

2012-10-03 Thread Rob Oakes
Hi Scott, 

On Wed, 2012-10-03 at 06:16 -0400, Scott Kostyshak wrote:

 I've been meaning to checkout SAGE + LyX so if no one comes along to
 help you I might take a look.

I appreciate the offer. After some quality time looking into how the
module works and how SageTeX processes documents, I was able to get it
up and running. I found this page to be extremely helpful:
http://www.sagemath.org/doc/tutorial/sagetex.html

Of course, like all things, I was hoping to get a quick response via the
list. I decided last year that I wanted to go back to school to improve
my mechanical engineering skills and was hoping to get Sage working for
a lab report.

(Why I decided more education would be desirable is completely beyond
me. I've forgotten how thoroughly miserable it is to be a student. While
I frequently have to work late, it's been years since I've had to pull
an all-night session to finish homework. It's every bit as bad as I
remember. It might even be worse, if you factor in age.)

 How did you install SAGE? In the past
 I've compiled from source which was very smooth but took a while.
 There is also a PPA: https://launchpad.net/~aims/+archive/sagemath

To get Sage installed, I used the PPA. I thought about compiling from
source so that I could integrate it with the system Python, and then
thought better of it. The installation from the PPA was quick and I
haven't had any issues, so far.

To install the SageTeX module (which has to be done separately from
installing Sage), I copied the sagetex folder into my LaTeX path and ran
texhash.

 Which version do you have installed?

I'm running version 5.1.

 Does the terminal output or View Messages toolbar give any useful
 output that you could share?

The output was helpful, but didn't make much sense until I read more
about how SageTeX works.

Sage processes files in two steps. You write your document, then you run
LaTeX (pdflatex, xelatex, lualatex, or regular latex) on it. This
creates a second file, with the Sage processing instructions in it. This
has a *.sagetex.sage file extension.

At this point, you have to run Sage on this secondary file, which
generates your equations, plots and other elements so that they can be
incorporated into your original LaTeX file. At that point, you run LaTeX
on the original file a second time to produce the typeset document.

The problem I was having is that I was only running LaTeX on my new
documents. The converters I set up didn't follow the appropriate pathway
of LaTeX - Sage - LaTeX. Once I added in the Sage processing step,
everything started to work.

 Do you have a minimum working example that you could send or link to?

Absolutely, attached is a simple example that I'm working up into a
template.

I'm just getting started with Sage, but now that it's working, I'm quite
impressed with what I've seen. For the past 10 years or so, I've been
using aging copies of Maple for symbolic computation, and this looks
like it will allow me to modernize. (I don't actually have to do much
symbolic math, so it hasn't been that big of a deal.)

Being able to work from within LyX, in a manner very similar to the way
I work with R code via Knitr/Sweave, is going to be very nice. Knowing
that it's all open is even better.

Cheers,

Rob

PS, when I get time, I'm going to try and update the instructions on the
Wiki to make a couple of things clearer. I'll also probably write a blog
post about it, just so I've got a record of how I got things working. If
you'd like, I'll send you a link when it's finished.


Sage Report.lyx
Description: application/lyx


Re: SageTeX and LyX

2012-10-03 Thread Scott Kostyshak
Hi Rob,

I'm CC'ing Thomas Coffee and Murat Yildizoglu, who as the wiki says
did a lot of work on the SAGE module. They might be interested in your
experience.

On Wed, Oct 3, 2012 at 12:11 PM, Rob Oakes lyx-de...@oak-tree.us wrote:
 Hi Scott,

 On Wed, 2012-10-03 at 06:16 -0400, Scott Kostyshak wrote:

 I've been meaning to checkout SAGE + LyX so if no one comes along to
 help you I might take a look.

 I appreciate the offer. After some quality time looking into how the
 module works and how SageTeX processes documents, I was able to get it
 up and running. I found this page to be extremely helpful:
 http://www.sagemath.org/doc/tutorial/sagetex.html

Great! Good job figuring it out.

 Of course, like all things, I was hoping to get a quick response via the
 list. I decided last year that I wanted to go back to school to improve
 my mechanical engineering skills and was hoping to get Sage working for
 a lab report.

 (Why I decided more education would be desirable is completely beyond
 me. I've forgotten how thoroughly miserable it is to be a student. While
 I frequently have to work late, it's been years since I've had to pull
 an all-night session to finish homework. It's every bit as bad as I
 remember. It might even be worse, if you factor in age.)

I bet that it's really difficult to do what you're doing. Hopefully
there are some fun things about being a student again that will
surprise you. How about coming home after turning your homework in and
crashing on your bed -- that must have felt nice at least :). Best of
luck with your challenge!

 How did you install SAGE? In the past
 I've compiled from source which was very smooth but took a while.
 There is also a PPA: https://launchpad.net/~aims/+archive/sagemath

 To get Sage installed, I used the PPA. I thought about compiling from
 source so that I could integrate it with the system Python, and then
 thought better of it. The installation from the PPA was quick and I
 haven't had any issues, so far.

Glad to hear.

 To install the SageTeX module (which has to be done separately from
 installing Sage), I copied the sagetex folder into my LaTeX path and ran
 texhash.

Thanks, this is useful for me. I didn't know they were separate.

 Which version do you have installed?

 I'm running version 5.1.

 Does the terminal output or View Messages toolbar give any useful
 output that you could share?

 The output was helpful, but didn't make much sense until I read more
 about how SageTeX works.

 Sage processes files in two steps. You write your document, then you run
 LaTeX (pdflatex, xelatex, lualatex, or regular latex) on it. This
 creates a second file, with the Sage processing instructions in it. This
 has a *.sagetex.sage file extension.

 At this point, you have to run Sage on this secondary file, which
 generates your equations, plots and other elements so that they can be
 incorporated into your original LaTeX file. At that point, you run LaTeX
 on the original file a second time to produce the typeset document.

 The problem I was having is that I was only running LaTeX on my new
 documents. The converters I set up didn't follow the appropriate pathway
 of LaTeX - Sage - LaTeX. Once I added in the Sage processing step,
 everything started to work.

Thanks for the explanation. It would be nice if the module took care
of all of this.

 Do you have a minimum working example that you could send or link to?

 Absolutely, attached is a simple example that I'm working up into a
 template.

 I'm just getting started with Sage, but now that it's working, I'm quite
 impressed with what I've seen. For the past 10 years or so, I've been
 using aging copies of Maple for symbolic computation, and this looks
 like it will allow me to modernize. (I don't actually have to do much
 symbolic math, so it hasn't been that big of a deal.)

 Being able to work from within LyX, in a manner very similar to the way
 I work with R code via Knitr/Sweave, is going to be very nice. Knowing
 that it's all open is even better.

I'm also a big fan of R + Knitr (+ LyX) and I agree with you. I think
having things integrated is closer to how our minds work and allows
for a more natural workflow.

 PS, when I get time, I'm going to try and update the instructions on the
 Wiki to make a couple of things clearer. I'll also probably write a blog
 post about it, just so I've got a record of how I got things working. If
 you'd like, I'll send you a link when it's finished.

Yes, I'm definitely interested. This would be great.

Thanks a lot Rob!

Scott


Re: SageTeX and LyX

2012-10-03 Thread Scott Kostyshak
On Tue, Oct 2, 2012 at 7:15 PM, Rob Oakes  wrote:
> Dear LyX Users,
>
> I've just started playing around with SAGE (www.sagemath.org) and was
> very happy to see that there is a module which can be used with LyX.
>
> However, in trying to get the module to work, I've run into a snag. I
> have it installed, and I can even successfully compile the example
> document from the Wiki. However, when I try and create my own documents,
> it appears as though I'm not getting any output back from SAGE.
>
> Other than adding the module to a new LyX document, is there some
> configuration step that I am missing? Also, any explanation as to why
> the example would appear to compile, but new documents might not?

Hi Rob,

I've been meaning to checkout SAGE + LyX so if no one comes along to
help you I might take a look. How did you install SAGE? In the past
I've compiled from source which was very smooth but took a while.
There is also a PPA: https://launchpad.net/~aims/+archive/sagemath

Which version do you have installed?

Does the terminal output or View Messages toolbar give any useful
output that you could share?

Do you have a minimum working example that you could send or link to?

Best,

Scott

> I'm using LyX 2.1 (SVN) on Ubuntu 12.04, with a custom TeX Live 2011
> install.
>
> Cheers,
>
> Rob
>


Re: SageTeX and LyX

2012-10-03 Thread Rob Oakes
Hi Scott, 

On Wed, 2012-10-03 at 06:16 -0400, Scott Kostyshak wrote:

> I've been meaning to checkout SAGE + LyX so if no one comes along to
> help you I might take a look.

I appreciate the offer. After some quality time looking into how the
module works and how SageTeX processes documents, I was able to get it
up and running. I found this page to be extremely helpful:
http://www.sagemath.org/doc/tutorial/sagetex.html

Of course, like all things, I was hoping to get a quick response via the
list. I decided last year that I wanted to go back to school to improve
my mechanical engineering skills and was hoping to get Sage working for
a lab report.

(Why I decided more education would be desirable is completely beyond
me. I've forgotten how thoroughly miserable it is to be a student. While
I frequently have to work late, it's been years since I've had to pull
an all-night session to finish homework. It's every bit as bad as I
remember. It might even be worse, if you factor in age.)

> How did you install SAGE? In the past
> I've compiled from source which was very smooth but took a while.
> There is also a PPA: https://launchpad.net/~aims/+archive/sagemath

To get Sage installed, I used the PPA. I thought about compiling from
source so that I could integrate it with the system Python, and then
thought better of it. The installation from the PPA was quick and I
haven't had any issues, so far.

To install the SageTeX module (which has to be done separately from
installing Sage), I copied the sagetex folder into my LaTeX path and ran
texhash.

> Which version do you have installed?

I'm running version 5.1.

> Does the terminal output or View Messages toolbar give any useful
> output that you could share?

The output was helpful, but didn't make much sense until I read more
about how SageTeX works.

Sage processes files in two steps. You write your document, then you run
LaTeX (pdflatex, xelatex, lualatex, or regular latex) on it. This
creates a second file, with the Sage processing instructions in it. This
has a *.sagetex.sage file extension.

At this point, you have to run Sage on this secondary file, which
generates your equations, plots and other elements so that they can be
incorporated into your original LaTeX file. At that point, you run LaTeX
on the original file a second time to produce the typeset document.

The problem I was having is that I was only running LaTeX on my new
documents. The converters I set up didn't follow the appropriate pathway
of LaTeX -> Sage -> LaTeX. Once I added in the Sage processing step,
everything started to work.

> Do you have a minimum working example that you could send or link to?

Absolutely, attached is a simple example that I'm working up into a
template.

I'm just getting started with Sage, but now that it's working, I'm quite
impressed with what I've seen. For the past 10 years or so, I've been
using aging copies of Maple for symbolic computation, and this looks
like it will allow me to modernize. (I don't actually have to do much
symbolic math, so it hasn't been that big of a deal.)

Being able to work from within LyX, in a manner very similar to the way
I work with R code via Knitr/Sweave, is going to be very nice. Knowing
that it's all open is even better.

Cheers,

Rob

PS, when I get time, I'm going to try and update the instructions on the
Wiki to make a couple of things clearer. I'll also probably write a blog
post about it, just so I've got a record of how I got things working. If
you'd like, I'll send you a link when it's finished.


Sage Report.lyx
Description: application/lyx


Re: SageTeX and LyX

2012-10-03 Thread Scott Kostyshak
Hi Rob,

I'm CC'ing Thomas Coffee and Murat Yildizoglu, who as the wiki says
did a lot of work on the SAGE module. They might be interested in your
experience.

On Wed, Oct 3, 2012 at 12:11 PM, Rob Oakes  wrote:
> Hi Scott,
>
> On Wed, 2012-10-03 at 06:16 -0400, Scott Kostyshak wrote:
>
>> I've been meaning to checkout SAGE + LyX so if no one comes along to
>> help you I might take a look.
>
> I appreciate the offer. After some quality time looking into how the
> module works and how SageTeX processes documents, I was able to get it
> up and running. I found this page to be extremely helpful:
> http://www.sagemath.org/doc/tutorial/sagetex.html

Great! Good job figuring it out.

> Of course, like all things, I was hoping to get a quick response via the
> list. I decided last year that I wanted to go back to school to improve
> my mechanical engineering skills and was hoping to get Sage working for
> a lab report.
>
> (Why I decided more education would be desirable is completely beyond
> me. I've forgotten how thoroughly miserable it is to be a student. While
> I frequently have to work late, it's been years since I've had to pull
> an all-night session to finish homework. It's every bit as bad as I
> remember. It might even be worse, if you factor in age.)

I bet that it's really difficult to do what you're doing. Hopefully
there are some fun things about being a student again that will
surprise you. How about coming home after turning your homework in and
crashing on your bed -- that must have felt nice at least :). Best of
luck with your challenge!

>> How did you install SAGE? In the past
>> I've compiled from source which was very smooth but took a while.
>> There is also a PPA: https://launchpad.net/~aims/+archive/sagemath
>
> To get Sage installed, I used the PPA. I thought about compiling from
> source so that I could integrate it with the system Python, and then
> thought better of it. The installation from the PPA was quick and I
> haven't had any issues, so far.

Glad to hear.

> To install the SageTeX module (which has to be done separately from
> installing Sage), I copied the sagetex folder into my LaTeX path and ran
> texhash.

Thanks, this is useful for me. I didn't know they were separate.

>> Which version do you have installed?
>
> I'm running version 5.1.
>
>> Does the terminal output or View Messages toolbar give any useful
>> output that you could share?
>
> The output was helpful, but didn't make much sense until I read more
> about how SageTeX works.
>
> Sage processes files in two steps. You write your document, then you run
> LaTeX (pdflatex, xelatex, lualatex, or regular latex) on it. This
> creates a second file, with the Sage processing instructions in it. This
> has a *.sagetex.sage file extension.
>
> At this point, you have to run Sage on this secondary file, which
> generates your equations, plots and other elements so that they can be
> incorporated into your original LaTeX file. At that point, you run LaTeX
> on the original file a second time to produce the typeset document.
>
> The problem I was having is that I was only running LaTeX on my new
> documents. The converters I set up didn't follow the appropriate pathway
> of LaTeX -> Sage -> LaTeX. Once I added in the Sage processing step,
> everything started to work.

Thanks for the explanation. It would be nice if the module took care
of all of this.

>> Do you have a minimum working example that you could send or link to?
>
> Absolutely, attached is a simple example that I'm working up into a
> template.
>
> I'm just getting started with Sage, but now that it's working, I'm quite
> impressed with what I've seen. For the past 10 years or so, I've been
> using aging copies of Maple for symbolic computation, and this looks
> like it will allow me to modernize. (I don't actually have to do much
> symbolic math, so it hasn't been that big of a deal.)
>
> Being able to work from within LyX, in a manner very similar to the way
> I work with R code via Knitr/Sweave, is going to be very nice. Knowing
> that it's all open is even better.

I'm also a big fan of R + Knitr (+ LyX) and I agree with you. I think
having things integrated is closer to how our minds work and allows
for a more natural workflow.

> PS, when I get time, I'm going to try and update the instructions on the
> Wiki to make a couple of things clearer. I'll also probably write a blog
> post about it, just so I've got a record of how I got things working. If
> you'd like, I'll send you a link when it's finished.

Yes, I'm definitely interested. This would be great.

Thanks a lot Rob!

Scott