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

Table of contents should include headers in generated HTML #1594

Open
e-dorigatti opened this issue Jun 2, 2022 · 0 comments
Open

Table of contents should include headers in generated HTML #1594

e-dorigatti opened this issue Jun 2, 2022 · 0 comments

Comments

@e-dorigatti
Copy link

It is possible to add arbitrary HTML to cell outputs via:

from IPython.core.display import display, HTML
display(HTML('<h2 id="aheader">hello!</h2>'))

These headers are added automatically to the TOC sidebar in jupyter lab, but are not in the TOC of exported HTML documents. It would be very convenient if they did!

A possible way of doing this is to change the selector here to include HTML output cells which have class .output_html:

all_headers = $('.text_cell_render,.output_html').find('[id]:header:not(:has(.tocSkip))');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant