Ask Your Question
0

printing equations in latex inside cell

asked 2011-11-30 18:20:08 -0500

indiajoe gravatar image

updated 2011-11-30 18:22:07 -0500

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 05:11:23 -0500

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-01 18:29:08 -0500 )edit
0

answered 2017-03-20 22:02:52 -0500

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-11-30 18:20:08 -0500

Seen: 1,151 times

Last updated: Dec 01 '11