You have to follow the advice given in the output: run Sage on
example1.sage, and then run LaTeX again.
The file example1.sage is generated when you run LaTeX on example1.tex.
When you do "sage example1.sage", that will generate yet another file,
example1.sout, which LaTeX will use if you compile your document again.
Dan
--
--- Dan Drake <dr...@kaist.edu>
----- KAIST Department of Mathematical Sciences
------- http://mathsci.kaist.ac.kr/~drake
sage: sage example1.sage
sage: sage `example1.sage'
sage: sage `example1.sage`
sage: sage "example1.sage"
sage: load(`example1.sage') etc.
Sony ..
--- On Fri, 3/6/09, Dan Drake <dr...@kaist.edu> wrote:
Well, if the xample1.sage file is generated, then TeX can find
sagetex.sty, so that's not the problem. I think you've put sagetex.py
(the Python module) in the wrong place -- try putting in the same
directory as your document (/Users/Sony/Desktop/sagetexEx/). There are
other ways around this, but that's the easiest way to do it.
That's good advice, although in the next release of SageTeX, it won't be
necessary, since the sagetex.py file will automatically be included in
Sage's Python library.
> Secondly, your sagetex example file starts with
>
> %!TEX TS-program = sage
>
> This a TeXShop specific command. If everything is correctly set up,
> TeXShop will do the latex-sage-latex process for you automatically. To
> make it happen, you must move the sage.engine file from
>
> ~/Library/TeXShop/Engines/Inactive/Sage
>
> to
>
> ~/Library/TeXShop/Engines
>
> This will make the sage.engine file "active".
>
> With these changes, I compiled your example file in TeXShop. It runs
> latex once and pauses (I suppose sage is fired up and is run at that
> time) and then runs latex again. After that, a correct pdf output is
> generated. I believe that this sage.engine is a new addition in the
> most recent version (2.25) of TeXShop.
Wow, that's cool! I'm really excited to see SageTeX included with
TeXShop. I'll add this to the documentation.