format: see [http://sage.math.washington.edu/home/palmieri/misc/docstring.png this picture]. It's in a variable width font, with math typeset correctly -- see the $n \times n$ in the first line of the docstring -- and with example blocks in format.
This is marked ""needs work"" for two reasons, one of which is a mystery to me:
1. (the mystery) start a fresh worksheet and type
{{{
identity_matrix? [SHIFT-RETURN]
}}}
This will be typeset in format. Then type
{{{
identity_matrix? [TAB]
}}}
This is typeset nicely. I don't know what the difference is.
2. Math is not handled properly. I have a hack in place to typeset inline math (""{{{... `blah` ...}}}"") in the docstring, but not displayed math (directive ""{{{.. math::}}}""). This is because I'm using docutils to convert the docstring to html, and docutils doesn't know about math. I would like to use Sphinx to do the conversion (in which case more math should be handled, and there would also be some syntax highlighting), but I don't know how to use Sphinx well enough to do that. I've posted a question to the sphinx-dev group, and if I hear anything, I'll post it here or update the ticket.
Please test out the patch, improve it, rewrite it, whatever.
(By the way, Tom Boothby deserves credit for getting jsMath to process the docstring.)" enhancement closed major sage-4.1.1 notebook fixed Mike Hansen Sage 4.1.1.rc0 Tom Boothby, Evan Fosmark, John Palmieri, Mitesh Patel William Stein, Minh Van Nguyen, John Palmieri N/A