+
+# Initialize the toc_depth to 1 if the command-line option -D=short_toc is given
+sub lilypond_init_toc_depth ()
+{
+ if (exists($main::value{'short_toc'}) and not exists($main::value{'bigpage'})) {
+ $page_toc_depth = 1;
+ }
+}
+# Set the TOC-depth (depending on a texinfo variable short_toc) in a
+# command-handler, so we have them available when creating the pages
+push @Texi2HTML::Config::command_handler_process, \&lilypond_init_toc_depth;
+
+