Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inline math mode on iPython notebook

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 !

like image 710
mazieres Avatar asked Oct 16 '13 19:10

mazieres


People also ask

How do I get inline help in Jupyter Notebook?

The Jupyter Notebook has two ways to get help.Place the cursor inside the parenthesis of the function, hold down shift , and press tab . Or type a function name with a question mark after it.

What is inline math mode?

inline math mode is used to write formulas that are part of a paragraph. display math mode is used to write expressions that are not part of a paragraph, and are therefore put on separate lines.

How do you type mathematical symbols in Jupyter Notebook?

To insert in-line math use the $ symbol within a Markdown cell. For example, the text $this_{is}^{inline}$ will produce: t h i s i s i n l i n e .


1 Answers

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

like image 129
Jakob Avatar answered Sep 21 '22 15:09

Jakob