X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Flilypond-texi2html.init;h=414c5add23620ec791c28d7dca123272c8b1fc41;hb=e7aa6c445f463844dbaa52d38ea4aac2882b5601;hp=b6f75d2d4690e105472f63b53bf9192c38485f3c;hpb=5e2900b22db1d1ea433d4e8445cbcba3ffe399a4;p=lilypond.git diff --git a/Documentation/lilypond-texi2html.init b/Documentation/lilypond-texi2html.init index b6f75d2d46..414c5add23 100644 --- a/Documentation/lilypond-texi2html.init +++ b/Documentation/lilypond-texi2html.init @@ -13,7 +13,7 @@ ### -) All @unnumbered* sections are placed into the same file ### (implemented by split_at_numbered_sections) ### -) Use our custom CSS file, with IE-specific fixes in another CSS file, -### impelmented by lilypond_css_lines +### implemented by lilypond_css_lines ### -) TOC (folded, with the current page highlighted) in an overflown
### is added to every page; implemented by: ### lilypond_print_element_header -- building of the TOC @@ -55,6 +55,8 @@ ### makeinfo_like_foot_line_and_ref ### makeinfo_like_foot_lines ### makeinfo_like_paragraph +### -) In tables, don't wrap

around the contents. Implemented in +### makeinfo_like_paragraph ### ### ### Useful helper functions: @@ -114,17 +116,17 @@ $LY_LANGUAGES->{'fr'} = { $LY_LANGUAGES->{'hu'} = { 'Back to Documentation Index' => 'Vissza a dokumentációk jegyzékéhez', - '

Thanks to ${webdev_link} for hosting ${lily_site}.' => 'Köszönet a ${webdev_link} részére a ${lily_site} tárhelyért.', + '

Thanks to ${webdev_link} for hosting ${lily_site}.' => '

Köszönet a ${webdev_link} részére a ${lily_site} tárhelyért.', }; $LY_LANGUAGES->{'it'} = { 'Back to Documentation Index' => 'Torna all\'indice della documentazione', - '

Thanks to ${webdev_link} for hosting ${lily_site}.' => '', + '

Thanks to ${webdev_link} for hosting ${lily_site}.' => 'Grazie a ${webdev_link} per l\'hosting di ${lily_site}.', }; $LY_LANGUAGES->{'ja'} = { 'Back to Documentation Index' => 'ドキュメント インデックスに戻る', - '

Thanks to ${webdev_link} for hosting ${lily_site}.' => '${lily_site} をホスティングしてくれている ${webdev_link} に感謝します。', + '

Thanks to ${webdev_link} for hosting ${lily_site}.' => '

${lily_site} をホスティングしてくれている ${webdev_link} に感謝します。', }; @@ -135,10 +137,11 @@ $LY_LANGUAGES->{'nl'} = { $LY_LANGUAGES->{'zh'} = { 'Back to Documentation Index' => '回到文档索引', - '

Thanks to ${webdev_link} for hosting ${lily_site}.' => '非常感谢 ${webdev_link} 提供 ${lily_site} 的主机空间。', + '

Thanks to ${webdev_link} for hosting ${lily_site}.' => '

非常感谢 ${webdev_link} 提供 ${lily_site} 的主机空间。', }; # FIXME: request the translations below then send them to texi2html/texinfo devs + $LANGUAGES->{'it'} = { ' The buttons in the navigation panels have the following meaning:' => ' I bottoni nei pannelli di navigazione hanno il seguente significato:', ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => ' dove @strong{ Esempio } assume che l\'attuale posizione è alla @strong{ Sottosottosezione Uno-Due-Tre } di un documento che ha la seguente struttura:', @@ -544,7 +547,7 @@ $LANGUAGES->{'ja'} = { '{title_ref}' => '{title_ref}' }; -$LANGUAGES->{'zh'} = { +$LANGUAGES->{'cs'} = { ' The buttons in the navigation panels have the following meaning:' => '', ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => '', ' Up ' => '', @@ -840,22 +843,18 @@ our $web_manual; $Texi2HTML::Config::DOCTYPE = ''; @Texi2HTML::Config::CSS_REFS = ( - {FILENAME => "lilypond-mccarty.css", TITLE => "Default style"} + {FILENAME => "lilypond-manuals.css", TITLE => "Default style"} ); @Texi2HTML::Config::ALT_CSS_REFS = ( - {FILENAME => "lilypond.css", TITLE => "Andrew Hawryluk's design" }, - {FILENAME => "lilypond-blue.css", TITLE => "Kurt Kroon's blue design" }, -); + ); sub web_settings() { - print STDERR "Initializing settings for web site: [$Texi2HTML::THISDOC{current_lang}]\n"; + print STDERR "Processing web site: [$Texi2HTML::THISDOC{current_lang}]\n"; $Texi2HTML::Config::BODYTEXT = ""; @Texi2HTML::Config::CSS_REFS = ( - {FILENAME => "lilypond-web.css", TITLE => "Patrick McCarty's design"} + {FILENAME => "lilypond-website.css", TITLE => "Default style"} ); @Texi2HTML::Config::ALT_CSS_REFS = ( - {FILENAME => "lilypond-web-alt1.css", TITLE => "Alternate style 1"}, - {FILENAME => "lilypond-web-alt2.css", TITLE => "Alternate style 2"}, ); } @@ -1069,18 +1068,18 @@ sub lilypond_css_lines ($$) foreach my $ref (@CSS_REFS) { $Texi2HTML::THISDOC{'CSS_LINES'} .= - "{TITLE}\" href=\"$ref->{FILENAME}\">\n"; + "{TITLE}\" href=\"css/$ref->{FILENAME}\">\n"; } foreach my $ref (@Texi2HTML::Config::ALT_CSS_REFS) { $Texi2HTML::THISDOC{'CSS_LINES'} .= - "{FILENAME}\" title=\"$ref->{TITLE}\">\n"; + "{FILENAME}\" title=\"$ref->{TITLE}\">\n"; } # The ie-fixes stylesheet is needed for the docs, but not the website. if (not ($web_manual)) { $Texi2HTML::THISDOC{'CSS_LINES'} .= - "\n"; + "\n"; } if ($ENV{'AJAX_SEARCH'} == 1) { @@ -1095,6 +1094,25 @@ sub lilypond_css_lines ($$) $Texi2HTML::THISDOC{'CSS_LINES'} .= "\n"; } } + + ## This section makes the manual name visible to CSS through the body tag + ## so that styles can be applied per manual. It will add the manual + ## directory name (e.g., 'notation' or 'learning') as a CSS class, as well + ## as a development status. + + # Parse the input file name to determine the manual we're dealing with. + my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'}); + + # Hard-coded value to indicate if this is a development version + # ('devStatus') or stable version ('stableStatus') + # TODO: Figure out how to automatically set this value based on the even/odd minor revision number or some other mechanism. + $documentstatus = 'devStatus'; + + # Create the extra information for the tag. + # For example, the development Notation reference in English + # will output in HTML as + $Texi2HTML::Config::BODYTEXT = 'lang="' . $Texi2HTML::THISDOC{current_lang} . '" class="' . $docu_name . ' ' . $documentstatus . '"'; + } @@ -1425,11 +1443,10 @@ sub lilypond_external_href($$$) $href = &$default_external_href($node, $node_id, $node_xhtml_id, lc_last($file)); $href = remove_unneeded_anchor($href); - # TODO: very yucky, but will be fixed in issue 1004 if ($web_manual) { - my $only_web = $ENV{ONLY_WEB}; - if ($only_web) { - $href = "../../doc/v2.13/Documentation/web/".$href; + my $only_web_version = $ENV{ONLY_WEB_VERSION}; + if ($only_web_version) { + $href = "../../doc/".$only_web_version."/Documentation/web/".$href; } } @@ -1448,9 +1465,9 @@ sub remove_unneeded_anchor($) for ($i = 0; $i < @hrefsplit; $i++) { $item = @hrefsplit[$i]; if ($item =~ /#/) { - @splitted = split(".html#", $item); - if (@splitted[0] eq @splitted[1]) { - @hrefsplit[$i] = @splitted[0] . ".html"; + @split = split(".html#", $item); + if (@split[0] eq @split[1]) { + @hrefsplit[$i] = @split[0] . ".html"; } } } @@ -1514,7 +1531,7 @@ sub generate_ly_toc_entries($$$$$) 'introduction' => [2, 2, 2, 2, 3, 3, 4, 4], 'download' => [2, 2, 2, 3, 3, 4], 'manuals' => [1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4], - 'community' => [1, 1, 1, 2, 2, 2, 3, 3], + 'community' => [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4], ); my $addColor = "colorDefault"; while (($top_section, $color_indices) = each %color_maps) { @@ -1684,7 +1701,7 @@ sub lilypond_print_toc_div ($$) print $fh '

' . &$anchor('', $Texi2HTML::HREF{'Top'}, - $topname, + $topname . " ", 'title="Start of the manual"' ) . "

\n"; } @@ -2073,6 +2090,13 @@ sub makeinfo_like_paragraph ($$$$$$$$$$$$$) return $text if (($format eq 'itemize' or $format eq 'enumerate') and ($$paragraph_number == 1)); } + # The cells of a table should not be wrapped in a

tag, so just return the text + if (defined($command_stack_at_begin->[0]) and $command_stack_at_begin->[0] eq 'multitable') + { + return $text; + } + + # Adjust all footnotes so that they look like good old makeinfo my $open = '