Skip to content

Commit 06b9523

Browse files
committed
[toc2] add more detail about skipping headings to readme & yaml
1 parent 0134ffb commit 06b9523

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/jupyter_contrib_nbextensions/nbextensions/toc2/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ The toc2 extension enables to collect all running headers and display them in a
1010
#### Second demo:
1111
![](demo2.gif)
1212

13-
The table of contents is automatically updated when modifications occur in the notebook. The toc window can be moved and resized. It can be docked as a sidebar or dragged from the sidebar into a floating window. The table of contents can be collapsed or the window can be completely hidden. The navigation menu can be enabled/disabled via the nbextensions configuration utility. It can also be resized. The position, dimensions, and states (that is 'collapsed' and 'hidden' states) are remembered (actually stored in the notebook's metadata) and restored on the next session. Headers can be skipped from being inserted in the toc by adding the html tag "<a class='tocSkip'>" at the end of the header line; eg in
13+
The table of contents is automatically updated when modifications occur in the notebook. The toc window can be moved and resized. It can be docked as a sidebar or dragged from the sidebar into a floating window. The table of contents can be collapsed or the window can be completely hidden. The navigation menu can be enabled/disabled via the nbextensions configuration utility. It can also be resized. The position, dimensions, and states (that is 'collapsed' and 'hidden' states) are remembered (actually stored in the notebook's metadata) and restored on the next session.
14+
15+
There is a configurable option to skip h1 headers from the ToC, to allow their use as a notebook
16+
title. However, this cause issues in latex exports, where h1 are converted to sections.
17+
Alternatively, headers of any level can be omitted from being the toc by adding an html tag with the
18+
css class `tocSkip` at the end of the header line; e.g. as in
19+
1420
```
15-
## title <a class='tocSkip'>"
21+
## title <a class="tocSkip">
1622
```
1723

1824
The toc window also provides two links in its header for further functionalities:
@@ -108,5 +114,5 @@ This option requires the IPython kernel and is not present with other kernels.
108114
- Updated README to please @KadeG in #871
109115
- @hiiwave, april 2017.
110116
- Support customization of background, fonts, border and highlighting colors in the toc window and navigation menus with PR [#969](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/969)
111-
- @louisabraham, @jcb91 July 2017. Add support for skipping h1 headings,
112-
enabling their use as unnumbered notebook titles
117+
- @jfbercher, @louisabraham, @jcb91 July 2017. Add support for skipping h1
118+
headings, enabling their use as unnumbered notebook titles

src/jupyter_contrib_nbextensions/nbextensions/toc2/toc2.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Parameters:
1919

2020
- name: toc2.skip_h1_title
2121
description: |
22-
Skip h1 headings from numbering, so that they can serve as a notebook title
22+
Skip h1 headings from numbering, so that they can serve as a notebook title.
23+
See the README for details, caveats and alternatives
2324
input_type: checkbox
2425
default: false
2526

0 commit comments

Comments
 (0)