[IPython-User] How to explicitly print math using mathjax in notebook?
Joon Ro
joonpyro@gmail....
Thu Mar 22 16:29:59 CDT 2012
Latex is enabled. What I'm asking is how to explicitly print a sympy
object with mathjax rendering.
For example, if I have a cell with the following:
alpha, theta, delta = symbols(r'\alpha, \theta, \delta')
alpha
and when I evaluate it, I get mathjax-rendered alpha symbol.
But if I do
alpha, theta, delta = symbols(r'\alpha, \theta, \delta')
print(alpha)
then I get \alpha. Also latex(alpha) gives me that too.
My question is if there is a function which will give me mathjax rendered
symbol printing.
I'm asking this because it seems just putting alpha only works if it is
the last thing on a cell.
For example, if I do
alpha
print(alpha)
Then I only get \alpha, not mathjax rendered symbol.
-Joon
On Thu, 22 Mar 2012 16:00:32 -0500, Michael Hadmack <hadmack@gmail.com>
wrote:
> Take a look at the sympy example notebook. There is a magic command:
> %load_ext sympyprinting
> which enables the latex
>
> -Mike
>
> On Thu, Mar 22, 2012 at 10:55 AM, Joon Ro <joonpyro@gmail.com> wrote:
>
>> I'm sorry but actually I was talking about printing a sympy object with
>> mathjax rendering in python cell. :)
>> Thanks for the reply though!
>>
>> -Joon
>>
>>
>> On Thu, 22 Mar 2012 15:52:35 -0500, Michael Hadmack <hadmack@gmail.com>
>> wrote:
>>
>> > Just put your latex between $$'s like in a tex document. And make
>> sure
>> > the
>> > cell is set for markdown format (Ctrl-m m).
>> >
>> > On Thu, Mar 22, 2012 at 10:38 AM, Joon Ro <joonpyro@gmail.com> wrote:
>> >
>> >> Hi,
>> >>
>> >> I am afraid this is a terribly stupid question, but I cannot find
>> how to
>> >> explicitly print math using mathjax in notebook. For example, I can
>> just
>> >> put x at the last line of a cell to get the rendered printing with
>> >> mathjax, but how do I explicitly do this? It seems there must be
>> latex()
>> >> counterpart which do this, but I have not been able to find it.
>> >>
>> >> Best,
>> >> Joon
>> >> _______________________________________________
>> >> IPython-User mailing list
>> >> IPython-User@scipy.org
>> >> http://mail.scipy.org/mailman/listinfo/ipython-user
>> >>
>>
>>
>> --
>> Using Opera's revolutionary email client: http://www.opera.com/mail/
>> _______________________________________________
>> IPython-User mailing list
>> IPython-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the IPython-User
mailing list