Inline math mode on iPython notebook

mazieres picture mazieres · Oct 16, 2013 · Viewed 10.6k times · Source

In iPython notebook, how can I write a mathematic formula such as r^2 in a line (inline math mode in latex vocabulary). ie. Is it possible to not go on a new line when the formula is printed.

If like in LaTeX, it should be \(r^2\) but it doesn't work...

Thanks for your help !

Answer

Jakob picture Jakob · Oct 16, 2013

In a markdown cell you can use $s, e.g. $r^2$. This requires MathJax from CDN or a local MathJax installation. If you have an internet connection it should work right out of the box.

see e.g. Typesetting Equations example notebook