File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/jupyter_contrib_nbextensions/nbextensions/toc2 Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 37
37
number_sections : true ,
38
38
sideBar : true ,
39
39
skip_h1_title : false ,
40
+ base_numbering : 1 ,
40
41
title_cell : 'Table of Contents' ,
41
42
title_sidebar : 'Contents' ,
42
43
toc_cell : false ,
564
565
break ;
565
566
}
566
567
}
567
- for ( var i = min_lvl ; i <= 6 ; i ++ ) {
568
+ lbl_ary [ 0 ] = cfg . base_numbering - 1 // begin numbering at base_numbering
569
+ for ( var i = min_lvl + 1 ; i <= 6 ; i ++ ) {
568
570
lbl_ary [ i - min_lvl ] = 0 ;
569
571
}
570
572
703
705
'The settings won\'t persist in non-live notebooks though.' ) ,
704
706
build_setting_input ( 'number_sections' , 'Automatically number headings' , 'checkbox' ) ,
705
707
build_setting_input ( 'skip_h1_title' , 'Leave h1 items out of ToC' , 'checkbox' ) ,
708
+ build_setting_input ( 'base_numbering' , 'Begin numbering at' ) ,
706
709
build_setting_input ( 'toc_cell' , 'Add notebook ToC cell' , 'checkbox' ) ,
707
710
build_setting_input ( 'title_cell' , 'ToC cell title' ) ,
708
711
build_setting_input ( 'title_sidebar' , 'Sidebar title' ) ,
You can’t perform that action at this time.
0 commit comments