Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/jupyter_contrib_nbextensions/nbextensions/toc2/toc2.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
number_sections: true,
sideBar: true,
skip_h1_title: false,
base_numbering: 1,
title_cell: 'Table of Contents',
title_sidebar: 'Contents',
toc_cell: false,
Expand Down Expand Up @@ -564,7 +565,8 @@
break;
}
}
for (var i = min_lvl; i <= 6; i++) {
lbl_ary[0] = cfg.base_numbering-1 // begin numbering at base_numbering
for (var i = min_lvl+1; i <= 6; i++) {
lbl_ary[i - min_lvl] = 0;
}

Expand Down Expand Up @@ -703,6 +705,7 @@
'The settings won\'t persist in non-live notebooks though.'),
build_setting_input('number_sections', 'Automatically number headings', 'checkbox'),
build_setting_input('skip_h1_title', 'Leave h1 items out of ToC', 'checkbox'),
build_setting_input('base_numbering', 'Begin numbering at'),
build_setting_input('toc_cell', 'Add notebook ToC cell', 'checkbox'),
build_setting_input('title_cell', 'ToC cell title'),
build_setting_input('title_sidebar', 'Sidebar title'),
Expand Down