Hi Rob,

Sorry I did not see your message last year --- I've been filtering
lyx-users while I finish my thesis.

I just received a private email from someone installing the SageTeX
module, and I've posted the transcript of our conversation to the
existing thread on lyx-users in case it's helpful.

If you're still having issues, I should now hopefully see any messages
addressed to me specifically. Thanks for trying out the module!

- Thomas


On Wed, Oct 3, 2012 at 1:28 PM, Scott Kostyshak <skost...@lyx.org> wrote:
> 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

Reply via email to