I want to to use numbers to indicate references in footnotes, so I was wondering inside of Jupyter Notebook how can I use superscripts and subscripts?
Subscripts and Superscripts To indicate a subscript, use the underscore _ character. To indicate a superscript, use a single caret character ^ . Note: this can be confusing, because the R Markdown language delimits superscripts with two carets.
An extension to the Python Markdown project which adds the ability to subscript text. To do so, the character ~ becomes a Markdown tag for text meant to be subscripted, and is replaced with the HTML sub tag. For example, the extension transforms the text directly below into the HTML shown after it.
Both ! and % allow you to run shell commands from a Jupyter notebook. % is provided by the IPython kernel and allows you to run "magic commands", many of which include well-known shell commands. ! , provided by Jupyter, allows shell commands to be run within cells.
%%writefile lets you output code developed in a Notebook to a Python module. The sys library connects a Python program to the system it is running on.
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.
<sup>superscript text </sup>
also works, and might be better because latex formatting changes the whole line etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With