Does anyone know a way to add cell numbers (not line numbers within cells)? I have been using nbextensions for a while but it does not seem to have the ability to label cell numbers.
-
$\begingroup$ do you want to change the cell number for aesthetic reasons? $\endgroup$– LeevoJan 22, 2020 at 15:28
-
$\begingroup$ @Leevo I' like to be able to reference a cell, either to a colleague or in the narrative/descriptions. $\endgroup$– MatanFeb 14, 2020 at 2:55
-
$\begingroup$ This would also be useful for using nbqa to run linters and type checkers that report the cell number $\endgroup$– Nev DelapSep 19, 2022 at 3:09
2 Answers
There is a cell tag feature. It allows any kind of label for individual cells, including numbers.
Cell tags are found in the "View" menu, then "Cell Toolbar".
If you need it for a presentation, open the Notebook with a text editor, find the brackets where cell numbers fall and change them manually. If it's something you have to do once.