Hi Dana,

Yes, "converting textbooks into notebooks" is exactly right.  I'm able
to do this right now on a small-scale using a custom script, but it
takes some fiddling.  So if you want to help blaze the trail, here are
some ideas.  Also, I am hand-crafting a prototype of sorts for a talk
I'm giving at the math meetings in San Francisco next week.  I'll be
posting that here in the next couple of days (hopefully).

1.  I use tex4ht to translate LaTeX into jsMath.  This is 90% of the
battle.  However tex4ht is very finicky - for example, you need to
balance parentheses in the text - not just LaTeX code, or math, but in
plain-old-unadorned text.  I could round-up some gotchas or assist if
you go this route.  Using lots of macros for notation is very helpful
in getting your source in shape.

2.  It takes very little to get tex4ht-jsMath output to look like a
Sage worksheet.  I use a short Python script to make this happen.

3.  You can put sage code in your LaTeX and have it migrate through
the conversion process to land in the Sage worksheet with the right
delimiters.  This is partially accomplished with the same script as
above, but is not complicated.  I'd like to work with Dan Drake to
standardize some syntax for marking this in LaTeX and make that part
of SageTeX's command set.

4.  Having an interact migrate through the conversion takes no more
effort than #3.

5.  Right now, it hard to link across worksheets, so on the scale of a
book, this can be a problem.  William Stein has been thinking about
folders, or other ways to organize collections of worksheets, that
would lead to stable and predictable cross-worksheet links, so help
should be coming on this one.

6.  I've worked on tikz support for drawing (combinatorial) graphs in
Sage.  There is rudimentary support in Sage now, but it needs
extending and better documentation.  This is on my todo list, and
Nicolas Thiery has dottex/graphviz code to go with it.  I'm less
certain how to make this pass through a conversion process, but maybe
it will "just work."  Partially because of the graph theory work, John
Palmieri has added simple ways to tell Sage to load up a LaTeX package
like tikz, so that part is taken care of.  Right now, I process
diagrams separately, make PNG's and pass those through, but this is a
less satisfactory way to go.

Look at the methods you get from
sage:  latex.<tab>

In Sage there are prebuilt examples you can fiddle with if you *first*
load the right latex packages:

sage: from sage.misc.latex import latex_examples
sage: K = latex_examples.knot()
sage: K
LaTeX example for testing display of a knot produced by xypic...
sage: latex(K)

See:  http://www.sagemath.org/doc/reference/sage/misc/latex.html


7.  There has been discussion about writing in ReST and using Sphinx
to produce worksheets.  This converts the TeX to images (which don't
scale nicely, etc), but this is another process to consider.

I'd suggest building interacts to use in class, and start
experimenting with converting some of your notes.  I expect to be
working on much of this during the spring semester, but will have
little time for it the next week and a half.

Rob


-- 
You received this message because you are subscribed to the Google Groups 
"sage-edu" group.
To post to this group, send email to sage-...@googlegroups.com.
To unsubscribe from this group, send email to 
sage-edu+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-edu?hl=en.


Reply via email to