X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lilypond-texi2html.init;h=8439436dbed81e9df5e2e7f9f8040f3dfd94a365;hb=8574d4349026c4ac5a15a27c50e264bf548e29fb;hp=7e319e9c0ceacf9a12614953808fb55162c0fc56;hpb=d82263ffb1e106d3e1be4a577a9ca436bcb87c3a;p=lilypond.git diff --git a/lilypond-texi2html.init b/lilypond-texi2html.init index 7e319e9c0c..8439436dbe 100644 --- a/lilypond-texi2html.init +++ b/lilypond-texi2html.init @@ -76,13 +76,12 @@ $LY_LANGUAGES->{'fr'} = { 'Back to Documentation Index' => 'Retour à l\'accueil de la documentation', }; $LY_LANGUAGES->{'es'} = { - 'Back to Documentation Index' => '', + 'Back to Documentation Index' => 'Volver al índice de la documentación', }; $LY_LANGUAGES->{'de'} = { - 'Back to Documentation Index' => '', + 'Back to Documentation Index' => 'Zur Dokumentationsübersicht', }; -print $LY_LANGUAGES->{'fr'}->{'Back to Documentation Index'}; sub ly_get_string () { my $lang = $Texi2HTML::THISDOC{current_lang}; @@ -133,8 +132,8 @@ $Texi2HTML::Config::paragraph = \&makeinfo_like_paragraph; # Examples should be formatted similar to quotes: $Texi2HTML::Config::complex_format_map->{'example'} = { - 'begin' => q{"
"},
-  'end' => q{"
\n"}, + 'begin' => q{"
"}, + 'end' => q{"
\n"}, 'style' => 'code', }; @@ -310,7 +309,7 @@ my $node_to_filename_map = (); # according to node titles, which works by simply overriding the id element of # the $element hash. # If an external nodename<=>filename/anchor map file is found (loaded in -# lilypond_init_out, use the externally created values, otherwise use the +# the command handler, use the externally created values, otherwise use the # same logic here. sub lilypond_element_file_name($$$) { @@ -562,6 +561,19 @@ sub lilypond_external_href($$$) my $page_toc_depth = 2; my @default_toc = []; + +# 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; + + # recursively generate the TOC entries for the element and its children (which # are only shown up to maxlevel. All ancestors of the current element are also # shown with their immediate children, irrespective of their level.