Ask Your Question
0

displaying results in latex fonts

asked 2020-06-03 19:33:53 +0100

slartibartfast gravatar image

Is there way to display results in latex fonts? Let me explain what I mean by that. Let's say I have the following expression

(y3^3)*(y2^2)*(y1^2)

I want to see the expression above in the format $y_3^3y_2^2y_1^2$.

Is there a way to do this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-06-03 19:59:23 +0100

Emmanuel Charpentier gravatar image

Yes. And that's documented :

  • Declare your variables with var("y_1, y_2, y_3") (note the underscores). Alternatively, use the latex_name of var (or SR.var).

  • In the Jupyter notebook, a cell whose first line is the "magic" display typeset" will switch your output toLaTeX by default. Revert to "normal" display with the magic%display simple`.

  • In command-line (or emacs), use view. This will open your default PDF viewer on a temporary document containing a nice typesetting of the argument of view.

  • in emacs + sage-shell-mode, there are multiple possibilities depending on the modes...

Don't forget to read the docs : that is usually faster than querying ask.sagemath...

HTH,

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: 2020-06-03 19:33:53 +0100

Seen: 802 times

Last updated: Jun 03 '20