converting sagews worksheets to sws worksheets

597 views
Skip to first unread message

Carl Eberhart

unread,
Apr 14, 2014, 11:46:48 AM4/14/14
to sage-...@googlegroups.com
It would be nice to have a sagews2sws.py available.  Has anyone written such a thing?

William Stein

unread,
Apr 14, 2014, 12:00:58 PM4/14/14
to sage-...@googlegroups.com
On Mon, Apr 14, 2014 at 8:46 AM, Carl Eberhart <carl.e...@gmail.com> wrote:
> It would be nice to have a sagews2sws.py available. Has anyone written such
> a thing?
>

Nobody has yet. Start with ~/.sagemathcloud/sagews2pdf.py

> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/dbf957d5-5eb4-4baa-aea8-2d6da08d656e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Rob Beezer

unread,
Apr 15, 2014, 2:20:54 PM4/15/14
to sage-...@googlegroups.com
Dear Carl,

I am designing an XML source format, especially for mathematics documents. I
can produce good LaTeX and nice HTML (see Gallery at URL below).

I have converters that make SMC worksheets, Sage Notebook worksheets, and
iPython notebooks. So rather than going back and forth between formats, I'm
trying to make a minimal, but sensible and expressive, format from which you can
make *anything*.

This semester, I often manufacture PDF, HTML (w/Sage cell), *.sagews, *.sws
files for each worksheet I use in class, all from the same source, just using
different XSL transforms.

The three worksheet formats are all a bit rough still, so not public. *.sagews
requires a bit of side processing to insert UUIDs. If you get the basics
working and are interested in more, I could send you the transforms by email.

http://mathbook.pugetsound.edu/

Rob

On 04/14/2014 08:46 AM, Carl Eberhart wrote:
> It would be nice to have a sagews2sws.py available. Has anyone written such a
> thing?
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to sage-cloud+...@googlegroups.com
> <mailto:sage-cloud+...@googlegroups.com>.
> <https://groups.google.com/d/msgid/sage-cloud/dbf957d5-5eb4-4baa-aea8-2d6da08d656e%40googlegroups.com?utm_medium=email&utm_source=footer>.

Harald Schilly

unread,
Apr 15, 2014, 2:24:01 PM4/15/14
to sage-...@googlegroups.com
On Tue, Apr 15, 2014 at 8:20 PM, Rob Beezer <bee...@ups.edu> wrote:
> *.sagews requires a bit of side processing to insert UUIDs

Question on the side, mainly to william: would it be possible to leave
the uuid blank or unspecified, and they are inserted by SMC
automatically, when the sagews document is loaded the first time?

Harald

William Stein

unread,
Apr 15, 2014, 2:31:14 PM4/15/14
to sage-...@googlegroups.com
That is a good idea. It would be convenient to maintain the format
but allow for a special uuid place-holder, e.g., something like

xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx

on load something (not sure which process) would replace them all by
random uuid's.

This would be pretty easy to implement. Rob what do you think? Can
somebody make a github ticket?
https://github.com/sagemath/cloud/issues?state=open

-- William

> Harald
>
> --
> You received this message because you are subscribed to the Google Groups "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/CAGG4CB6tAA%3DuOZ-ZjuJNy1ba5YH85hosQHWY1uF6sVhgWHqA2w%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



Harald Schilly

unread,
Apr 15, 2014, 2:37:38 PM4/15/14
to sage-...@googlegroups.com
On Tue, Apr 15, 2014 at 8:31 PM, William Stein <wst...@gmail.com> wrote:
> This would be pretty easy to implement. Rob what do you think? Can
> somebody make a github ticket?


https://github.com/sagemath/cloud/issues/124

Rob Beezer

unread,
Apr 15, 2014, 3:34:19 PM4/15/14
to sage-...@googlegroups.com
On 04/15/2014 11:31 AM, William Stein wrote:
> That is a good idea. It would be convenient to maintain the format
> but allow for a special uuid place-holder, e.g., something like
>
> xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
>
> on load something (not sure which process) would replace them all by
> random uuid's.
>
> This would be pretty easy to implement. Rob what do you think? Can
> somebody make a github ticket?
> https://github.com/sagemath/cloud/issues?state=open

William - That sounds like a great idea. It'll replace a little script I have
for this, and make it easier for me to publish the conversion to *.sagews.

Thanks, Harald, for the query and the ticket (I was away in class, doing SMC).

Rob

Carl Eberhart

unread,
Apr 17, 2014, 5:18:58 PM4/17/14
to sage-...@googlegroups.com
Rob,
Excellent idea.   I will be interested to try this out.   Does the xml source you are developing run in a sage environment?    For example,  I know that the Maple worksheet  *.mw   is written in xml.   But it took Maple forever to get these worksheets to work with anywhere near the speed of their classic *.mws  worksheets.  
Several years ago I developed a set of tools in Maple to produce books and class notes from a set of Maple worksheet in either html, latex, or linked worksheets.  So the source was the set of maple worksheets,  from which I could generate maple worksheets which acted as a table of contents and an index.  To get html or latex images, I massaged the html and latex export from Maple to produce an image of the book of worksheets.   It actually worked pretty well. 
With Sage there are now two sources (three if you count ipython notebooks):  *.sagews and *.sws.   Conversion from either source to the other is needed.  In some cases, one might have a  *.sagews that he wants to work on where fast internet is not readily available.  The need for  a converter from sagews to sws arises.   
Carl



On Tue, Apr 15, 2014 at 1:20 PM, Rob Beezer <bee...@ups.edu> wrote:
Dear Carl,

I am designing an XML source format, especially for mathematics documents.  I can produce good LaTeX and nice HTML (see Gallery at URL below).

I have converters that make SMC worksheets, Sage Notebook worksheets, and iPython notebooks.  So rather than going back and forth between formats, I'm trying to make a minimal, but sensible and expressive, format from which you can make *anything*.

This semester, I often manufacture PDF, HTML (w/Sage cell), *.sagews, *.sws files for each worksheet I use in class, all from the same source, just using different XSL transforms.

The three worksheet formats are all a bit rough still, so not public.  *.sagews requires a bit of side processing to insert UUIDs.  If you get the basics working and are interested in more, I could send you the transforms by email.

http://mathbook.pugetsound.edu/

Rob


On 04/14/2014 08:46 AM, Carl Eberhart wrote:
It would be nice to have a sagews2sws.py available.  Has anyone written such a
thing?

--
You received this message because you are subscribed to the Google Groups
"sage-cloud" group.

To unsubscribe from this group and stop receiving emails from it, send an email

--
You received this message because you are subscribed to a topic in the Google Groups "sage-cloud" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-cloud/3WS3EC68gpc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-cloud+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/534D7886.8070403%40ups.edu.
Reply all
Reply to author
Forward
0 new messages