Skip to content
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

nbconvert -Number Headings when exporting from jupyter ipython to html #1586

Open
oracle1987 opened this issue Jun 8, 2021 · 6 comments · May be fixed by #2187
Open

nbconvert -Number Headings when exporting from jupyter ipython to html #1586

oracle1987 opened this issue Jun 8, 2021 · 6 comments · May be fixed by #2187
Labels

Comments

@oracle1987
Copy link

Im trying to export a ipynb notebook to html while maintaining the headers numbered with # in markdown cells, however, when i export using the following terminal command, the numbering of the sections is ignored.

Note: Headings auto-generated using toc nbextension.

terminal command:
jupyter nbconvert --TemplateExporter.exclude_input=True --no-prompt --to html sample.ipynb

To generate the numbered headings content of notebook is as follows(please ignore brackets below):

(#) SectionA

(##) SubsectionA1

(##) SubsectionA2

Please advise how can the numbering be maintained as per the defined hashtags when exporting to html.

@gitcuz
Copy link

gitcuz commented Dec 11, 2021

Any progress? I'm also interested in this feature.

@oracle1987
Copy link
Author

Try adding '_toc'as follows:
jupyter nbconvert --TemplateExporter.exclude_input=True --no-prompt --to html_toc filename.ipynb

@DheemanthBhat
Copy link

+1

@JingyiShi
Copy link

Following. Still have the same issue in 2023. The command above did not work for me.

@guigoruiz1
Copy link

Hello,

I have the same problem

@letian-w
Copy link

letian-w commented Apr 4, 2024

Same problem.

@sapristi sapristi linked a pull request Jan 30, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants