Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can I display a list of equations aligned like latex eqnarray?

I have several sage equations stored in a python list (for use in solve() etc). I'd like to display them one per line, aligned on equal signs if possible. This is in the notebook.

Most things I've tried - view(), show(), pretty_print() just print something that looks like a python list of formatted equations, all on one line (although the documentation for view() claims it will print each element of a list on a separate line, that doesn't seem to be the case).

The only things I've come up with are to explicitly loop, like: for eqn in eqns: view(eqn) or to pass eqns to html.table() which does one per line with alternating line shading.