Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Displaying mathematical notation as "strings"

Hello!

I can't seem to find if there is a command (or if sage is even capable) to display mathematical notation as a string to be printed, rather than evaluated.

For example, if I try;

foo = exp(x)
foo2 = str(foo)

Then using "foo2" displays e^x, rather than the actual superscript x. Although this isn't terribly surprising to me, I'm curious if there is a way to get the actual correct notation?

An even more important one would be limit notation. I can't figure out how to display the text "Lim" with "x -> 0" underneath the text "Lim" at all in sage.

If these features aren't possible that would be good to know, but it seems like a common and straight forward issue. Unfortunately googling gets drown in irrelevant hits and I don't know the appropriate term to search for. A pointer in the right direction would be much appreciated.