On Wed, 17 Dec 2008 at 09:36AM -0800, dsoto wrote:
> i am using the sagetex package to embed sage in latex documents and it
> is working fabulously.  some of my documents are very large and i
> split them up and use \input to assemble into one document.  when i
> try to run sagetex on this there is only a .sage file for the main
> file and not the files included using \input.  the resulting document
> has ?? instead of the equation intended.

I just made up a toy example with multiple files, and it turns out
SageTeX works perfectly fine with \input -- either "\input{foo}" or
"\input foo" -- as well as \include. It even works fine if you
selectively include files with \includeonly.

Yes, you will only get one .sage file. You need to run Sage on that file
(and then rerun LaTeX) to get the "??" bits to go away. I think your
problem is not with using multiple files, but with not running Sage, and
then LaTeX again.

A separate question is whether we can get SageTeX to produce multiple
.sage files, so that in large documents, you can use \includeonly and
instead of running Sage on a single, big .sage file, you can save time
by running Sage on a smaller .sage file. This isn't relevant to your
case since you're using \input, but we might want to do this in the
future. I think this would be difficult. It's certainly not going to
happen anytime soon. For now, you'll always have one big .sage file for
the entire documennt.

Dan

-- 
---  Dan Drake <dr...@kaist.edu>
-----  KAIST Department of Mathematical Sciences
-------  http://mathsci.kaist.ac.kr/~drake

Attachment: signature.asc
Description: Digital signature

Reply via email to