Ask Your Question
0

printing equations in latex inside cell

asked 2011-12-01 01:20:08 +0100

indiajoe gravatar image

updated 2011-12-01 01:22:07 +0100

How can I print equation in latex inside a cell in the sage's browser interface?

The %latex command converts the entire cell to latex. I only want to print certain equations in latex.

The latex(eqn) prints out the eqn in latex syntax, but it is not rendering and showing me the eqn in latex fonts.

I tried out the function 'view()'. It also is giving me the syntax as output, not the rendered latex eqn.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-12-01 12:11:23 +0100

kcrisman gravatar image

You have two options, if I'm understanding your question correctly.

  • Use the TinyMCE editor (this is what happens if you Shift-Click on a blue line in the notebook, instead of just clicking for a cell) to put LaTeX in between cells.
  • Use the show command. Just type show(x^2) to see what I mean.

This link may have more useful information.

edit flag offensive delete link more

Comments

Oh, thanks. I was trying out various things like show("$\frac{2}{49 \, \alpha} + x^{2}$") but it didn't work. But as u said simply giving show(x^2+4/(98*alpha)) worked !! Thanks..

indiajoe gravatar imageindiajoe ( 2011-12-02 01:29:08 +0100 )edit
1

answered 2017-03-21 04:02:52 +0100

jdk2py gravatar image

You shoul try something like

show(LatexExpr("\int x\cos(x)dx"))

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

Stats

Asked: 2011-12-01 01:20:08 +0100

Seen: 3,318 times

Last updated: Dec 01 '11