How to do superscripts and subscripts in Jupyter Notebook?

You can do this inside of a markdown cell. A markdown cell can be created by selecting a cell then pressing the esc key followed by the M key. You can tell when you have converted a cell to markdown when In [ ]: seen to the right of the default code cell is gone. Then you can input the following code that uses latex with markdown to represent sub/super-scripts:

Latex subscript:

$x_{2}$

Latex superscript:

$x^{2}$

You can find more detailed examples here.

Please comment below if you are still having difficulty.

Leave a Comment