Differences between revisions 11 and 12
Revision 11 as of 2010-01-31 04:08:06
Size: 3511
Editor: rbeezer
Comment:
Revision 12 as of 2010-01-31 04:29:23
Size: 3801
Editor: rbeezer
Comment:
Deletions are marked like this. Additions are marked like this.
Line 62: Line 62:

== The 20% Defying Categorization ==

 * tikz graphics generation with tex4ht?<<BR>>
   [[http://old.nabble.com/Using-pgfsys-tex4ht.def-to-make-svg-output-td16685147.html | Mailing list discussion]]<<BR>>
   [[http://en.wikipedia.org/wiki/File:Circle_graph.svg | Resultant Example]]

Converting Latex Documents to Sage Worksheets

Introduction

Latex documents can be translated to jsMath, the tool used to render mathematics in the Sage notebook. This project is about automating the conversion process so that authors can easily use a single command to convert a book-length Latex document to a collection of Sage worksheets. These could have embedded Sage input cells, possibly containing interacts, and the cross-referencing features of Latex would be preserved in the collection of Sage worksheets.
Rob Beezer, [email protected], rbeezer on #sage-devel IRC

Examples

To view a worksheet, click on the "worksheet" link, then in the resulting page find the big blue download box and use your browser's function to copy the link there.
Then open your notebook, click the "Upload" link near the upper-left and then paste in the link into the URL field (the second one).

  • Group Theory Primer (2010/01/28)
    Lots of simple Sage code, some simple mathematics, one interact (search for "@interact")
    Best working demo (though it lacks a title)
    Worksheet Source

  • Linked Worksheets (2010/01/30)
    A simple manufactured example of cross-worksheet linking.

    • Fire up Sage, then create a new, temporary notebook with the user "link"
      sage: from sagenb.notebook.notebook import Notebook
      sage: nb = Notebook('/tmp/test.sagenb')
      sage: nb.add_user('link', 'link', '', force=True)
      sage: nb.save()
      sage: exit
    • At system command-line extract archive (below) to create the worksheets with numbers 0 and 1 in link's space.
      $ cd /tmp/test.sagenb/home
      $ tar -xvf <path-to>/link-worksheets.tar.gz
    • Fire up Sage to start a notebook session in the temporary notebook:
      sage: notebook(directory="/tmp/test.sagenb")
    • You may need to create an admin password (do it).

      You may see the worksheets, but be logged in as admin.
      If needed, be certain to login as "link" with password "link."

    • Open worksheet 0, execute a cell or two, find link to worksheet 1.
    • Follow link to worksheet 1, execute some cells here too.
    • Archive (described above) Python generation script

  • Textbook Section Experiment (2010/01/30)
    This is a straight conversion of a math-heavy section from Beezer's linear algebra text.

    • The original tex4ht output is at FCLA Section FS in jsMath which seems to render just fine for me.

    • Worksheet below is a straight conversion as in the Group Theory demo above, but has at least three problems:
      1. Graphic is not being picked up (easy to fix in parsing script).
      2. Some formatting (like matrix brackets) not rendering right.
      3. Links in theorems use \text{@(a href="#definition.LNS")Definition LNS@(/a)} construct which is broken in notebook, and is a mystery to me at the moment.

    • Worksheet

The 20% Defying Categorization

devel/LatexToWorksheet (last edited 2011-12-14 03:50:48 by rbeezer)