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

Supported by

Conversion Software

Mercurial Repository @BitBucket
Clone using:

hg clone https://[email protected]/rbeezer/tex2sws/

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

Some tickets below that are available for review can be seen building and passing tests at the Sage PatchBot. Failures can be due to improper listing of necessary prerequisites, or builds not caught up with latest alpha version, so do not necessarily mean a ticket is not ready for review.

Items in RED are urgently needed because they are used in textbook additions.

Ticket

Description

Status

Acknowledgements

8071

trivial matrix kernels over non-fields

4.4.alpha0

Martin Albrecht

10362

vector constructor documentation

4.6.1.alpha3

Andrey Novoseltsev

10422

documentation fix on new_matrix constructor

4.6.1.alpha3

Benjamin Jones

10189

additions to all-ones matrix constructor

4.6.2.alpha0

Karl-Dieter Crisman, Robert Miller

10364

zero_vector constructor, vector constructor error-checking

4.6.2.alpha0

Andrey Novoseltsev

10424

matrix augment accepts a vector

4.6.2.alpha0

Joris Vankerschaver, Robert Bradshaw

10625

generic Smith form fails on integer matrices

4.6.2.alpha2

Author: David Loeffler

4492

block matrix constructor

4.6.2.alpha3

Author: Willem Jan Palenstijn

8948

latex printing for vectors

4.6.2.alpha3

Author: Jason Grout

10454

add .is_singular()

4.6.2.alpha3

Robert Bradshaw

10471

conjugate-transpose of a matrix

4.6.2.alpha3

Robert Bradshaw

10500

documentation: matrix row/column linear combinations

4.6.2.alpha3

Alyson Deines

10535

column-oriented matrix constructor

4.6.2.alpha3

Dan Drake

10537

dictionary input to vector constructor

4.6.2.alpha3

Dima Pasechnik

10626

route sparse integer matrices to specialized Smith form

4.6.2.alpha3

David Loeffler

10627

matrix pretty-printing

4.6.2.alpha3

Author: Ivan Andrus

10028

improved error messages for non-invertible matrices

4.6.2.alpha4

Author: Andre Apitzsch

10541

row and column matrix from vector, deprecate transpose

4.6.2.alpha4

Volker Braun, Marco Streng

10543

echelon form over QQ is mutable

4.6.2.alpha4

Tom Coates

10604

diagonal matrix constructor rewrite

4.6.2.alpha4

Joint with: Dan Drake

9796

diagonal elements of a matrix

4.6.2.rc0

Tom Coates

10714

rows/columns of sparse matrices with zero rows/columns

4.6.2.rc0

Jason Grout

10568

speed-up scalar multiples of sparse matrices

4.7.alpha1

Author: Maarten Derickx

10426

matrix row and column swapping, returns new matrix

4.7.alpha2

Alain Filbois

10763

matrix multiplication speedup

4.7.alpha2

Author: Simon King

10477

random vector constructor

4.7.alpha3

Felix Lawrence

10536

vector conjugation

4.7.alpha3

Felix Lawrence

10545

outer product of vectors

4.7.alpha3

Felix Lawrence, John Palmieri

10595

vector constructor fails with empty list

4.7.alpha3

Joint: J. Palmieri, Review: D.Pasechnik

10977

document vector constructor

4.7.alpha3

Martin Raum

4983

fix subdivision attribute

4.7.alpha4

Author: John Palmieri

10470

listing infinite vector space just hangs

4.7.alpha4

John Palmieri

10683

Hermitian inner product, doctests

4.7.alpha4

Karl-Dieter Crisman

10737

extended echelon form

4.7.alpha4

John Palmieri

10752

make matrix pivots immutable

4.7.alpha4

Author: John Palmieri

10863

is_unitary() for matrices

4.7.alpha4

Martin Raum

10876

constructor for elementary matrices

4.7.alpha4

Karl-Dieter Crisman

10974

overhaul matrix stack, augment

4.7.alpha4

Keshav Kini

11004

make subdivisions optional on tensor product

4.7.alpha4

John Palmieri

11112

algebraic closure of CDF

4.7.alpha4

Mike Hansen

10987

subspace decomposition, check optional

4.7.alpha5

Author: Martin Raum

10794

QR matrix decomposition over exact rings

4.7.alpha5

Simon Spicer

11114

is_diagonalizable() for matrices

4.7.1.alpha0

Dan Drake

10746

refactor matrix kernels

4.7.1.alpha2

Christian Stump

11027

Schur matrix decomposition

4.7.1.alpha3

Martin Raum, John Palmieri, Jeroen Demeyer

10944

similarity check for matrices

4.7.1.alpha4

Dan Drake

10839

LU decomposition for rectangular matrices

4.7.2.alpha0

Ryan Grout

11356

companion matrix constructor

4.7.2.alpha1

David Loeffler

10848

is_hermitian() for matrices

4.7.2.alpha1

Mike Hansen

11166

free module inititalization

positive review

Author: Nicolas Borie

11480

zigzag form and rational canonical form

positive review, dep #11356

David Loeffler

11535

linear dependence of vectors

positive review

Ivo Hedtke

11552

fix free module morphism surjectivity

positive review

John Palmieri

11585

transformation matrix for echelon form of sparse matrices

positive review

Author: Volker Braun

7852

solve systems over CDF

with patch

8094

properties for matrices

with patch

Harald Schilly, Jason Grout

10791

fix and upgrade Gram-Schmidt

with patches

Martin Raum

10795

QR double dense matrix decomposition upgrade

with patch

10802

singular values for matrices over CDF

with patch

Martin Raum

11104

is_normal() for matrices

with patch

11259

LU decomposition for exact matrices

with patch

11306

upgrade is_unitary() for RDF/CDF

with patch, dep. #10848, #11277

11364

cyclic subspaces (aka Krylov subspaces)

with patch

11544

Viewing matrices of algebraic numbers can hang

with patch

11553

matrix morphism additional methods

with patch, dep #11552

11555

expand print version of free module morphisms

with patch

11556

linear transformations

with patch, dep #11552, #11553

11595

update exact eigenspace routines

with patch

11600

alias for free module morphism lift method

with patch

11603

deprecate eigenspaces for matrices over RDF/CDF

with patch

11608

RDF/CDF eigenvalues, symmetric matrices, multiplicities

with patch

10837

matrix and vector norms, condition number over CDF

needs work - numerical

Simon Spicer

4932

remove solve-left-LU

needs work

7392

rank for matrices over CDF

new

8046

add double dense matrix file to documentation

needs work

10465

adjoint meta-ticket

information, dep. 10471, 8094, 10501

10501

deprecate adjoint in favor of adjugate

needs work

10544

LLL reduced bases for right kernels

new

10765

obliterate sage/matrix/misc.pyx

orphaned

11274

Cholesky decomposition over rationals

new

11286

speed up solve_right()

new

11596

cached eigenstuff is mutable

new

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