-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable line numbers to show on code cells. #1254
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Inspired by readthedocs/sphinx_rtd_theme#1168 this worked for me in both HTML and
Duplicate issue #1580 |
This was added in executablebooks/MyST-NB#380, available as |
@chrisjsewell thanks for that context. Can you post/link an example of where the |
heya, its not released to jupyter-book just yet (only just merged that PR last week), in sphinx its just in the conf.py |
Any updates pertaining to enabling line numbers to be shown on code blocks? Thanks! |
This feature would allow me to mention specific code line in my course. |
@pierrepo See #1254 (comment). This worked just fine for my thesis |
Hello @michaelosthege Thanks for your comment. I did not think it would work out of the box... and it did 🤯 So I have now to replace all:
by
in my course. Many thanks for your help @michaelosthege 🙏 @chrisjsewell I still believe that a global code line numbering option would be useful in Jupyter Book. |
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
When code cells are rendered, there should be a way to show line numbers. This could be done with tags. Narrating code requires precision with references to line numbers.
Describe alternatives you've considered
None.
Additional context
The text was updated successfully, but these errors were encountered: