kcrisman wrote:

> 
> 
> On Apr 20, 4:00 am, Wilfried Huss <h...@finanz.math.tugraz.at> wrote:
>> Tom wrote:
>> > I would like to use parts of my Sage notebooks for lecture notes.
>>
>> > Is there a script or some other convenient way of exporting Sage
>> > notebooks to LaTeX?
>>
>> You can use
>>
>> http://www.bitbucket.org/whuss/sws2tex/
>>
> 
> This looks cool, whuss!  I had a problem, though, when trying to use
> it:
> 
> Traceback (most recent call last):
>   File "Downloads/sws2tex/sws2tex.py", line 53, in <module>
>     from pygments import highlight
> ImportError: No module named pygments
> 
> I have
> 
> Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
> [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
> 
> At the very least it should be pointed out in the README (thanks,
> Robert!) that some nonstandard package is required.  Or, that one
> should use
> 
> ./sage -python sws2tex.py
> 
> to invoke it :)

You can also use ./sage sws2tex.py or just ./sws2tex.py if
sage is in your path. You arer right it should be mentioned in
the README.

> Also that wget is needed (apparently not supplied with OSX!!!), etc.
> I'm not even sure how to get it to show up in sh, just in bash, on
> OSX...  Do you think your scripts would work okay if I let sh be an
> alias for bash, or do they have sh-specific syntax?

I just changed the script to use the urllib2 module to download external
files so one does not need wget. The new version is on bitbucket.

> I know these are probably all standard in the Linux-expert world, but
> this would seem to me to have the potential to be very helpful to
> people not at all comfortable with command line (i.e., to make a
> clickable application which runs this taking sws files as input, I
> don't think it's too hard to do) and things like this unfortunately
> might stand in the way of your hard work being more widely used.

I hope that one day it will be included in sage itself, but I currently
don't have much time to improve it further to make this happen. Any help
would be very welcome.

- Wilfried Huss

-- 
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

Reply via email to