I experienced a similar problem and here's how I resolved it.
First, I modified one line in my sagetex.sty file in my texmf
directory (you said you put yours in ~/Library/texmf/tex/latex/) in
order to specify the directory where sagetex.py can be found. The
original sagetex.sty has a line
%% \...@wsf{sys.path.insert(0, 'directory with sagetex.py')}
and I changed this line to something like
\...@wsf{sys.path.insert(0, '/Users/**yournamehere**/Library/TeXShop/
Engines/Inactive/Sage')}
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.
Good luck.
On Mar 6, 10:05 pm, Sony <[email protected]> wrote:
> Finally, I got it to work. Thank you very much.
>
> However, the example1.dvi file was not saved in the folder that
> contains the example1.tex file. I have to look for it.
>
> Is there a way to make the texshop to do all the work?
>
> Sony ..
>
> On Mar 6, 7:54 pm, Dan Drake <[email protected]> wrote:
>
> > On Fri, 06 Mar 2009 at 05:43PM -0800, Sony wrote:
> > > It seems to be working now. Thank you very much. Unfortunately, now
> > > I have a new problem. Please see below.
> > > __________________________________________
> > > sony$ /Applications/sage/sage /Users/Sony/Desktop/sagetexEx/
> > > xample1.sage
> > > Traceback (most recent call last):
> > > File "/Users/Sony/Desktop/sagetexEx/xample1.py", line 4, in <module>
> > > import sagetex
> > > ImportError: No module named sagetex
> > > sony$
> > > __________________________________________
>
> > > I placed sagetex.sty in Users/Sony/Library/texmf/tex/latex and
> > > sagetex.py in the sage folder.
> > > What am I not doing right?
>
> > 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.
>
> > Dan
>
> > --
> > --- Dan Drake <[email protected]>
> > ----- KAIST Department of Mathematical Sciences
> > ------- http://mathsci.kaist.ac.kr/~drake
>
> > signature.asc
> > < 1KViewDownload
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---