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.
Asked
Active
Viewed 4,228 times
3
-
do you want to change the cell number for aesthetic reasons? – Leevo Jan 22 '20 at 15:28
-
@Leevo I' like to be able to reference a cell, either to a colleague or in the narrative/descriptions. – Matan Feb 14 '20 at 02:55
-
This would also be useful for using nbqa to run linters and type checkers that report the cell number – Nev Delap Sep 19 '22 at 03:09
2 Answers
1
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".

Brian Spiering
- 21,136
- 2
- 26
- 109
0
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.

Leevo
- 6,225
- 3
- 16
- 52