On Dec 1, 3:30 pm, Dan Drake <dr...@kaist.edu> wrote: > Hi Eric, > > > > On Tue, 01 Dec 2009 at 11:44AM -0800, Eric Drechsel wrote: > > I'm experimenting with a homework workflow using sagetex. I'd like to > > make efficient use of resources, which seems to be a (the?) major > > deficiency with sagetex, especially with large documents. > > > My initial thought was that by placing each problem in an included > > file, I could have my build tool generate individual problem_x.sage > > and problem_x.sout files only for problems with changes, and keep the > > master tex file as a simple list of includes. I see now that that > > can't work, however, at least with my limited knowledge of TeX tricks. > > > So I'm asking the group for ideas. Starters: > > > 1. Is it possible to have a master document that includes a bunch of > > complete subdocuments? If so, one could simply keep the master > > document clean of sagetex references, and build each subdocument > > separately. > > My first thought is, if you're talking about using a master document and > compile times for your homework...you have way too much homework. :) > > I don't know about keeping the master document clean of SageTeX > references, but by using \include, you can keep things separated, and > you can even compile only part of the document using \includeonly.
Yes, I found out about \includeonly from [1] shortly after posting, and I think that's what I'll do in the short term (homework being due Thursday and all :). [1] http://web.science.mq.edu.au/~rdale/resources/writingnotes/latexstruct.html > > One thing you can do with SageTeX to make things go faster is to use the > pause and unpause commands -- \sagetexpause and \sagetexunpause. > Commands between those two don't get run when you run Sage on the .sage > file. (SageTeX literally just comments those sections out in the .sage > file.) The issue I have with both \sagetexpause and \includeonly is that they're not automate-able. Subdocuments seem like a good way to integrate with build tools (since they can have timestamps etc) > Actually, with the stuff I've done, the most time-consuming part of > running Sage on the .sage file is simply startup time. Once it starts > executing the commands, it generally goes really fast, but starting Sage > takes a while. Good point! Most documents are probably not so computationally expensive as the examples file (which has lots of plots). Does sagetex- remote help with this much, or is there still alot of overhead in creating a new session on the server? > I'll think about your per-file ideas, and about some kind of > \includeonly stuff. Right now, though, it works document-wide. > > What would you like to see? Can you describe some commands or > functionality that you would find helpful? Unless you can think of a simple way to add support for generating separate sage files per tex file (which would also require changing the way .sout files are included I guess?), it doesn't seem worth the trouble. I can't begin to read sagetex.sty, so I can't really evaluate what's a reasonable feature request. Thanks for your thoughtful response! Regarding the build tool, I'm using SCons, with which this is my first experience, and so far I'm liking the flexibility and extensibility alot. My example project with SConstruct file is here [2] [2] http://wiki.shared.dre.am/electricity_and_magnetism/probset7/ > Dan > > -- > --- Dan Drake > ----- http://mathsci.kaist.ac.kr/~drake > ------- > > signature.asc > < 1KViewDownload -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org