]> git.donarmstrong.com Git - lilypond.git/blobdiff - lilypond-texi2html.init
Define our own U64_MAX maximum.
[lilypond.git] / lilypond-texi2html.init
index 66c269b36fb940fc33c024f40aa8e0b710027a4e..026d55dfb5e8298368f2ca126f9d8b8497deefa3 100644 (file)
@@ -74,6 +74,9 @@ package Texi2HTML::Config;
 #############################################################################
 
 @Texi2HTML::Config::CSS_REFS      = ("lilypond.css");
+@Texi2HTML::Config::ALT_CSS_REFS      = ( 
+    {FILENAME => "lilypond-mccarty.css", TITLE=>"Patrick McCarty's design"}
+);
 $Texi2HTML::Config::USE_ACCESSKEY = 1;
 $Texi2HTML::Config::USE_LINKS     = 1;
 $Texi2HTML::Config::USE_REL_REV   = 1;
@@ -233,19 +236,23 @@ sub lilypond_css_lines ($$)
 {
     my $import_lines = shift;
     my $rule_lines = shift;
-    return if (defined($CSS_LINES));
+    return if (defined($Texi2HTML::THISDOC{'CSS_LINES'}));
     if (@$rule_lines or @$import_lines)
     {
-        $CSS_LINES = "<style type=\"text/css\">\n<!--\n";
-        $CSS_LINES .= join('',@$import_lines) . "\n" if (@$import_lines);
-        $CSS_LINES .= join('',@$rule_lines) . "\n" if (@$rule_lines);
-        $CSS_LINES .= "-->\n</style>\n";
+        $Texi2HTML::THISDOC{'CSS_LINES'} = "<style type=\"text/css\">\n<!--\n";
+        $Texi2HTML::THISDOC{'CSS_LINES'} .= join('',@$import_lines) . "\n" if (@$import_lines);
+        $Texi2HTML::THISDOC{'CSS_LINES'} .= join('',@$rule_lines) . "\n" if (@$rule_lines);
+        $Texi2HTML::THISDOC{'CSS_LINES'} .= "-->\n</style>\n";
     }
     foreach my $ref (@CSS_REFS)
     {
-        $CSS_LINES .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"$ref\">\n";
+        $Texi2HTML::THISDOC{'CSS_LINES'} .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"$ref\">\n";
+    }
+    foreach my $ref (@ALT_CSS_REFS)
+    {
+        $Texi2HTML::THISDOC{'CSS_LINES'} .= "<link rel=\"alternate stylesheet\" type=\"text/css\" title=\"$ref->{TITLE}\" href=\"$ref->{FILENAME}\">\n";
     }
-    $CSS_LINES .= "<!--[if lte IE 7]>\n<link href=\"lilypond-ie-fixes.css\" rel=\"stylesheet\" type=\"text/css\">\n<![endif]-->\n";
+    $Texi2HTML::THISDOC{'CSS_LINES'} .= "<!--[if lte IE 7]>\n<link href=\"lilypond-ie-fixes.css\" rel=\"stylesheet\" type=\"text/css\">\n<![endif]-->\n";
 }
 
 
@@ -350,7 +357,7 @@ sub lilypond_element_target_name($$$)
   }
 
   # If we have an entry in the section<=>filename map, use that one, otherwise
-  # generate the anchor here. 
+  # generate the anchor here.
   if (exists ($node_to_filename_map->{$node_name})) {
     (my $filename, $target) = @{$node_to_filename_map->{$node_name}};
   } else {
@@ -656,7 +663,7 @@ sub print_lilypond_page_foot($)
 {
   my $fh = shift;
   my $program_string = &$program_string();
-  print $fh "<p><font size='-1'>$program_string</font><br>$PRE_BODY_CLOSE</p>\n";
+  print $fh "<p><font size='-1'>$program_string</font><br>$PRE_BODY_CLOSE</p>\n";
   print $fh "<!-- FOOTER -->\n\n";
   print $fh "<!-- end div#main here -->\n</div>\n\n";
 
@@ -884,7 +891,7 @@ sub lilypond_print_navigation
 # before the fn text.
 
 
-# The following code is copied from texi2html's examples/makeinfo.init and 
+# The following code is copied from texi2html's examples/makeinfo.init and
 # should be updated when texi2html makes some changes there!
 
 my $makekinfo_like_footnote_absolute_number = 0;
@@ -899,7 +906,7 @@ sub makeinfo_like_foot_line_and_ref($$$$$$$$)
     my $footnote_file = shift;
     my $lines = shift;
     my $state = shift;
-    
+
     $makekinfo_like_footnote_absolute_number++;
 
     # this is a bit obscure, this allows to add an anchor only if formatted
@@ -907,7 +914,7 @@ sub makeinfo_like_foot_line_and_ref($$$$$$$$)
     $docid = '' if ($state->{'outside_document'} or $state->{'multiple_pass'});
 
     if ($from_file eq $footnote_file)
-    { 
+    {
         $from_file = $footnote_file = '';
     }
 
@@ -985,8 +992,8 @@ sub makeinfo_like_paragraph ($$$$$$$$$$$$$)
            my $docid = $state->{'footnote_place_id'};
            my $doc_state = $state->{'footnote_document_state'};
            $docid = '' if ($doc_state->{'outside_document'} or $doc_state->{'multiple_pass'});
-           my $foot_label = &$anchor($state->{'footnote_footnote_id'}, 
-                 $document_file . "#$state->{'footnote_place_id'}", 
+           my $foot_label = &$anchor($state->{'footnote_footnote_id'},
+                 $document_file . "#$state->{'footnote_place_id'}",
                  "$state->{'footnote_number_in_page'}");
            $footnote_text = "<small>[${foot_label}]</small> ";
         }