New book on DE and Sage

163 views
Skip to first unread message

kcrisman

unread,
Jul 5, 2012, 9:47:35 AM7/5/12
to sage...@googlegroups.com, sage-...@googlegroups.com
David and Marshall have a book teaching undergrad DE and Sage concurrently that is in JHU Press' latest catalog.  You can already order it at Amazon and B&N... but I figured I'd give the actual source :)

http://jhupbooks.press.jhu.edu/ecom/MasterServlet/GetItemDetailsHandler?iN=9781421406374&qty=1&source=2&viewMode=3&loggedIN=false&JavaScript=y

Let's get this on the http://sagemath.org/library-publications.html#books list!  Any comments the authors have for the sage-edu list for what sort of constituency this would be good for would be great :)

- kcrisman

David Joyner

unread,
Jul 5, 2012, 10:01:44 AM7/5/12
to sage...@googlegroups.com, Marshall Hampton
It's written for a first undergrad course in DEs. Every section
except maybe one at the end uses Sage and has at least
one exercise involving Sage.

There is also a (free) version at
http://boxen.math.washington.edu/home/wdj/teaching/DiffyQ/
though it might have a few more bugs than the published version.
The correct parts are due to Marshall and the mistakes are mine:-)


>
> - kcrisman
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-edu" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/sage-edu/-/czjzrBo9W1QJ.
> To post to this group, send email to sage...@googlegroups.com.
> To unsubscribe from this group, send email to
> sage-edu+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sage-edu?hl=en.

kcrisman

unread,
Jul 5, 2012, 10:23:12 AM7/5/12
to sage...@googlegroups.com


> David and Marshall have a book teaching undergrad DE and Sage concurrently
> that is in JHU Press' latest catalog.  You can already order it at Amazon
> and B&N... but I figured I'd give the actual source :)
>
> http://jhupbooks.press.jhu.edu/ecom/MasterServlet/GetItemDetailsHandler?iN=9781421406374&qty=1&source=2&viewMode=3&loggedIN=false&JavaScript=y
>
> Let's get this on the http://sagemath.org/library-publications.html#books
> list!  Any comments the authors have for the sage-edu list for what sort of
> constituency this would be good for would be great :)


It's written for a first undergrad course in DEs. Every section
except maybe one at the end uses Sage and has at least
one exercise involving Sage.


I've already passed the book on to a workshop on modeling as a potential resource, and will be sure to order one for the library for the fall :)

 
There is also a (free) version at
http://boxen.math.washington.edu/home/wdj/teaching/DiffyQ/
though it might have a few more bugs than the published version.
The correct parts are due to Marshall and the mistakes are mine:-)


I'd strongly encourage you to see if you can try to make a variant that has some Sage exercises using a Sage cell server, if the workflow would support this - I don't know if it's possible to embed a cell in a pdf, but certainly there could be a link to a Sage cell with the same code.  In an HTML5-style epub, apparently, this would be very easy.  Jason, any comments on that? 

Dan Drake

unread,
Jul 5, 2012, 3:30:32 PM7/5/12
to sage...@googlegroups.com
On Thu, 05 Jul 2012 at 07:23AM -0700, kcrisman wrote:
> I'd strongly encourage you to see if you can try to make a variant that has
> some Sage exercises using a Sage cell server, if the workflow would support
> this - I don't know if it's possible to embed a cell in a pdf, but
> certainly there could be a link to a Sage cell with the same code. In an
> HTML5-style epub, apparently, this would be very easy. Jason, any comments
> on that?

Here are some random ideas on that subject:

* Rob Beezer has a prototype of a version of his textbook that puts QR
codes into the PDF, so you can scan them (or click them) to open a cell
with the relevant contents put in. It's pretty nice.

* PDF supports Javascript, so perhaps something can be done right in the
PDF. I don't know how far that can go, though -- and reader support may
be difficult or impossible.

* Someone (not me, at least not anytime soon) should investigate the
epub thing more. I've read that they are basically just HTML packaged up
nicely, and hence seem like a fantastic platform for Sage-ified math
books. We need some examples and more information, though.

Dan

--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------
signature.asc

Andrea Lazzarotto

unread,
Jul 6, 2012, 3:17:52 PM7/6/12
to sage...@googlegroups.com


2012/7/5 Dan Drake <dr...@kaist.edu>

Someone (not me, at least not anytime soon) should investigate the
epub thing more. I've read that they are basically just HTML packaged up
nicely, and hence seem like a fantastic platform for Sage-ified math
books. We need some examples and more information, though.

Yes, they are just HTML. But then, how would you include the Sage "computational part"? Do you mean including some JS to call for a public sage server to do the math?

I'm interested in this kind of things because I'm better at web based languages than Python. :P

--
Andrea Lazzarotto - http://andrealazzarotto.com

kcrisman

unread,
Jul 6, 2012, 4:03:06 PM7/6/12
to sage...@googlegroups.com


Someone (not me, at least not anytime soon) should investigate the
epub thing more. I've read that they are basically just HTML packaged up
nicely, and hence seem like a fantastic platform for Sage-ified math
books. We need some examples and more information, though.

Yes, they are just HTML. But then, how would you include the Sage "computational part"? Do you mean including some JS to call for a public sage server to do the math?

Correct.  See (for instance) https://github.com/sagemath/sagecell/blob/master/doc/embedding.rst or the properly formatted (but possibly very slightly outdated) http://boxen.math.washington.edu/home/jason/sagecell/embedding.html for details. 

Andrea Lazzarotto

unread,
Jul 9, 2012, 4:43:20 AM7/9/12
to sage...@googlegroups.com
2012/7/6 kcrisman <kcri...@gmail.com>


Correct.  See (for instance) https://github.com/sagemath/sagecell/blob/master/doc/embedding.rst or the properly formatted (but possibly very slightly outdated) http://boxen.math.washington.edu/home/jason/sagecell/embedding.html for details. 

Ok, I had a look on this. It looks like only ePub 3 fully supports JS, CSS and HTML5, but ePub 2 supports a part of them. Also, we have to see if the readers out there support those technologies. I want to try something with Sigil, hopefully I can get the JS to work.

In the meanwhile here are two useful links (IMHO):

Andrea Lazzarotto

unread,
Jul 11, 2012, 5:55:24 PM7/11/12
to sage...@googlegroups.com

The situation is sad. I made a simple ebook with js but I can't find a reader which supports it...

Andrea Lazzarotto
(inviato da Android)

Rob Beezer

unread,
Jul 11, 2012, 11:18:48 PM7/11/12
to sage...@googlegroups.com
I can make an EPUB (version 2 or 3) that uses Javascript to employ MathJax and uses Javascript to put up Sage cells powered by the cell server.

It all works pretty well in Calibre, which is primarily a conversion tool, but which also functions as a desktop reader.  One small problem is that Calibre grabs some keystrokes for navigation, so the Sage cell never gets them.  Like the letter "L".  So no doing any Lie groups.  ;-)

I have not found a "reading system" for a portable device where I have had any luck.  Azardi seems to be promising MathJax bundled into their reader in the next version, and they seem to be targeting the technical and textbook markets and may also be just a desktop reader (?).

My test EPUB will not work in iBooks 2.1.1 on an iPad.  MathJax causes the latex text to go grey, so it is trying, but it cannot go out and grab the fonts.  My guess is that Javascript is sandboxed to stay local.  Just a guess, I'd love to know if there is a way around this.  Seems you can unpack the critical bits of MathJax into your book, add all those files to the manifest, and then MathJax will work locally?  Maybe some good hints at link below, but have not been able to pursue them yet.

http://boolesrings.org/krautzberger/2011/10/17/epub-mathjax-and-the-ipad-another-attempt/

The sample/experimental book I created is authored in DocBook, which can then be converted to EPUB3, but it also worked a while ago as just EPUB2.

Andrea - if you make any progress, I'd love to hear about it.  I'm making a version of my textbook optimized for the web and it will eventually include live Sage cells, rather than the current static ones - it should really just be a small leap to have it be an EPUB.  (Link below is an in-progress version.)

http://linear.ups.edu/version3/html/fcla.html

Rob

Marcin Kostur

unread,
Jul 12, 2012, 4:46:47 PM7/12/12
to sage...@googlegroups.com
Rob,

The 3.0 looks really great, I can imagine when live cell are inside will be even better!
How do you author this? 

Marcin  

Rob Beezer

unread,
Jul 12, 2012, 7:02:10 PM7/12/12
to sage...@googlegroups.com
Dear Marcin,

Thanks!  I've hacked together a one-time conversion of my LaTeX sources into XML (via Python, sed, and jut a bit of hand-editing), using a custom set of XML tags, designed to reflect the structure of my text (only).  Eventually, but not quite yet, I'll abandon my LaTeX and the XML will be the source.  I'm about 80% done with this.

From there, XSLT transforms make it very easy to create robust HTML output (which is what you are seeing).  I am also producing much cleaner LaTeX from the XML (yes, that does sound circular).  It should be realtively easy to adjust the HTML versions of the sections to be the bodies of Sage worksheets with live cells.  (The HTML could have live cells now, but I need support for linking together a sequence of cells.)

It is also very easy with an XSLT transform to extract subsets of the material: solutions manual, Sage usage notes, doctests, my "archetype" collection, theorem and definition flashcards, etc.  The current list of notation, with references to the originating definition, is a small example of this idea - grab each notation description and note the definition it is enclosed in as you go.

Everybody's first reaction to XML is "yuck!" and XSLT takes a while to grok, but I'm finding the results worth the pain.

Rob

Andrea Lazzarotto

unread,
Jul 26, 2012, 8:01:31 AM7/26/12
to sage...@googlegroups.com


2012/7/12 Rob Beezer <goo...@beezer.cotse.net>

Andrea - if you make any progress, I'd love to hear about it.  I'm making a version of my textbook optimized for the web and it will eventually include live Sage cells, rather than the current static ones - it should really just be a small leap to have it be an EPUB.  (Link below is an in-progress version.)

It would be great, but I don't think I will make any progress until FLOSS ebook readers won't support proper Javascript inside the files. :(
Reply all
Reply to author
Forward
0 new messages