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

html export: how to embed + toc + collapsible headings? #1451

Open
drorcohengithub opened this issue Aug 30, 2019 · 0 comments
Open

html export: how to embed + toc + collapsible headings? #1451

drorcohengithub opened this issue Aug 30, 2019 · 0 comments

Comments

@drorcohengithub
Copy link

drorcohengithub commented Aug 30, 2019

Hi all,
Thanks for all your fantastic work.

I often write long, dirty notebooks. Toc and collapsible headings makes handling them much easier.

However, when I share them with others as html, I typically want:

  1. stand alone - hence embedding is necessary
  2. maintain the toc, so readers can jump to whatever section they like
  3. keep much of the dirty code invisible (i.e. hide my shame). Maintaining many collapsed heading for this is useful.

the dedicated html_toc, html_ch and html_embed nbconvert templates work well for me. However, I understand that chaining them is not possible #901.

Based on this blog https://mattwang44.github.io/en/articles/jupyter-tips/ I tried:

jupyter nbconvert --CodeFoldingPreprocessor.remove_folded_code=True --to html_embed --template toc2 CCN_poster_analysis_and_figures.ipynb

But the --CodeFoldingPreprocessor.remove_folded_code=True option does not do anything (probably not supported by toc template). It was a long shot but hey.

Any ideas on how to achieve something like this?

Cheers!

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