question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignore some generated headers in output cells, or collapse TOC entries

See original GitHub issue

Thanks 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:open
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ian-r-rosecommented, Nov 12, 2019

@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.

0reactions
mlucoolcommented, Nov 12, 2019

https://github.com/jupyterlab/jupyterlab-toc/issues/54 may also be worth thinking about at the same time

Read more comments on GitHub >

github_iconTop Results From Across the Web

4.18 Omit a heading in the table of contents - Bookdown
4.18 Omit a heading in the table of contents. If you do not want certain section headings to be included in the table...
Read more >
Video: Take tables of contents (TOCs) to the next level
Training: Create a custom table of contents. Add your own formatting options and how many heading levels to include.
Read more >
Turn Excel table headers on or off - Microsoft Support
When you create an Excel table, a table Header Row is automatically added as the first row of the table, but you have...
Read more >
Table of Contents (2) - Unofficial Jupyter Notebook Extensions
Some minor diplay tweaks are also available (moving header tile/menus, widening cells); Finally, the toc can preserved when exporting to html. First demo: ......
Read more >
Automatic Table of Contents | Asciidoctor Docs
Set the toc attribute in the header using an attribute entry. When the value of toc is empty, the processor will use the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found