Ask Your Question
0

Displaying mathematical notation as "strings"

asked 2016-09-09 16:24:17 +0100

Jason021 gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-09-09 16:39:39 +0100

kcrisman gravatar image

You are probably looking for view(), show(), or latex(). But Sage's output is usually ASCII unless you specifically ask for something like this, and how that renders (e.g. in a separate output program or in the 'usual' place) depends on whether you are using the command line or one of the notebooks.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-09-09 16:24:17 +0100

Seen: 568 times

Last updated: Sep 09 '16