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

Linear Algebra Patches

This table tracks patches meant to support the teaching of introductory linear algebra and the enhancement of Beezer's "A First Course in Linear Algebra."

Ticket

Description

Status

Acknowledgements

8071

trivial matrix kernels over non-fields

4.4.alpha0

Martin Albrecht

10189

additions to all-ones matrix constructor

positive review

Karl-Dieter Crisman, Robert Miller

10362

vector constructor documentation

4.6.1.alpha3

Andrey Novoseltsev

10364

zero_vector constructor, vector constructor error-checking

positive review

Andrey Novoseltsev

10422

documentation fix on new_matrix constructor

4.6.1.alpha3

Benjamin Jones

10424

matrix augment accepts a vector

positive review

Joris Vankerschaver, Robert Bradshaw

10425

subdivisions when augmenting

obsolete, in 10424

8046

add double dense matrix file to documentation

with patch

10426

matrix row and column swapping, returns new matrix

with patch

10439

degree and dictionary to vector constructor

new, no patch

10454

add .is_singular()

with patch

10465

adjoint meta-ticket

information only, dep. 10471, 10472

10470

listing infinite vector space just hangs

new, bug, no patch

10471

conjugate-transpose of a matrix

with patch

10472

properties for matrices

new, Jason Grout?

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

Note: If your version of Sage is 4.3.2 or older then some examples may not render quite right. See way below for how to edit older configurations.

tex4ht

This is a list of known configurations of tex4ht that seem to work:

sws2tex, Example
Anybody want to try for the round-trip, Latex -> SWS -> Latex?

jsMath Safe Boxes Edit

For Sage versions prior to 4.3.3.alpha0 (sagenb prior to 0.7.5) it is necessary to slightly tweak the jsMath configuration in Sage. It is a one-character edit. You can still view the sections, but "reasons" given in math displays (generally in proofs) won't render right and you will see lots of "@a()" stuff. This was fixed in Trac 8202 for Sage 4.3.3. Check your version of Sage with sage --version.

The file to edit is

SAGE_ROOT/local/lib/python/site-packages/sagenb-0.6-py2.6.egg/sagenb/data/sage/js/jsMath.js

where you might have to adjust the numbering on the sagenb package. Then at line 97 (or thereabouts) make the following change

jsMath.safeHBoxes=1 --> jsMath.safeHBoxes=0

Also, these examples have a bit of a formatting problem for larger matrices (more than two rows) on my setup, but I'm uncertain if that is my problem or more general. A report, either way, would be appreciated if you look at these.

The 20% Defying Categorization