Ignore some generated headers in output cells, or collapse TOC entries
See original GitHub issueThanks again for the update you made in #15 – I regularly add to my TOC by displaying markdown snippets in my output cells.
However, I have recently come across the pandas-profiling module, which allows for the creating of a neat pd.DataFrame summary report (via pandas_profiling.ProfileReport(df)
). This, however, creates a lot of top-level headings that end up getting captured by the TOC plugin.
So, for this feature request – could we have any way to turn off the capturing of headings in certain output cells? Perhaps a right-click on the cell in question, with a menu item saying “ignore output in TOC”, or something like that.
Alternatively, if the Headings in TOC themselves can be collapsed (a little different from #12, as this isn’t collapsing the cell contents, but the TOC entry itself), this would probably be sufficient. Perhaps allow the highest level TOC entry to collapse to a “…” to conserve space, but still notify the user that there is something there, if they care to expand it.
And, once again, thank you for this great plugin!
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
@mlucool This was an early feature request for this extension (back when it was a lot simpler, I might add 😃 ), c.f. #15. The idea was to programmatically generate headers, possibly interpolating the contents of some kernel variables.
I’m don’t think I agree that it is at odds with the plugin, generating headers with code seems like a reasonable thing to do. I do think we could expose an option so that users can choose whether they want to generate entries from code cell outputs.
https://github.com/jupyterlab/jupyterlab-toc/issues/54 may also be worth thinking about at the same time