|  1 |    initial version    |  
If you're working from the notebook you can use the pretty_print function. In your example
 pretty_print(g)
 will display 2x as rendered LaTeX. I doesn't just typeset mathematics, either: you can also use it to prettify other objects, like long lists or dictionaries.
    |  2 |    No.2 Revision    |  
If you're working from the notebook you can use the pretty_print function. In your example
 pretty_print(g)
 will display 2x as rendered LaTeX. I doesn't just typeset mathematics, either: you can also use it to prettify other objects, like long lists or dictionaries.dictionaries. Here's a more interesting example

 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.