@@ -16,6 +16,7 @@ package main;
1616$HTML_VERSION = 4.0;
1717
1818$MAX_LINK_DEPTH = 2;
19+ $MAX_SPLIT_DEPTH = 5; # split at subsections but not sub-subsections
1920$ADDRESS = ' ' ;
2021
2122$NO_FOOTNODE = 1;
@@ -143,22 +144,22 @@ sub adjust_icon_information{
143144 $BLANK_ICON =~ s / alt="blank"/ alt=""/ ;
144145 $NAV_BGCOLOR = " bgcolor=\" #99CCFF\" " ;
145146}
147+
146148adjust_icon_information();
147149
148150
149151sub make_nav_sectref{
150152 my ($label ,$title ) = @_ ;
151153 if ($title ) {
152- $title =~ s / <A/ <A class=sectref/ ;
153- return (" <b class=navlabel>$label :</b> "
154- . " $title \n " );
154+ return (" <b class='navlabel'>$label :</b> "
155+ . " <span class='sectref'>$title </span>\n " );
155156 }
156157 return ' ' ;
157158}
158159
159160sub make_nav_panel{
160161 my $s ;
161- $s = " <table align=center width=\" 100%\" cellpadding=0 cellspacing=2 >"
162+ $s = " <table align=' center' width=' 100%' cellpadding='0' cellspacing='2' >"
162163 . " \n <tr>"
163164 . " \n <td>$NEXT </td>"
164165 . " \n <td>$UP </td>"
@@ -184,13 +185,13 @@ sub make_nav_panel{
184185}
185186
186187sub top_navigation_panel {
187- " <div class=navigation>\n "
188+ " <div class=' navigation' >\n "
188189 . make_nav_panel()
189190 . ' <br><hr></div>' ;
190191}
191192
192193sub bot_navigation_panel {
193- " <p>\n <div class=navigation><hr>"
194+ " <p>\n <div class=' navigation' ><hr>"
194195 . make_nav_panel()
195196 . ' </div>' ;
196197}
@@ -334,13 +335,11 @@ sub add_module_idx{
334335 my $plat = ' ' ;
335336 $key =~ s / <tt>([a-zA-Z0-9._]*)<\/ tt>/ \1 / ;
336337 if ($ModulePlatforms {$key } && !$allthesame ) {
337- $plat = (" <em>(<span class=platform>$ModulePlatforms {$key }"
338+ $plat = (" <em>(<span class=' platform' >$ModulePlatforms {$key }"
338339 . ' </span>)</em>' );
339340 }
340- print MODIDXFILE
341- $moditem
342- . $IDXFILE_FIELD_SEP
343- . " <tt class=module>$key </tt>$plat ###\n " ;
341+ print MODIDXFILE $moditem . $IDXFILE_FIELD_SEP
342+ . " <tt class='module'>$key </tt>$plat ###\n " ;
344343 }
345344 close (MODIDXFILE);
346345 if (!$allthesame ) {
@@ -556,9 +555,55 @@ sub protect_useritems {
556555#
557556# Note that this *must* be done in the init file, not the python.perl
558557# style support file. The %declarations must be set before initialize()
559- # is called in the main script.
558+ # is called in the main LaTeX2HTML script (which happens before style files
559+ # are loaded).
560560#
561- %declarations = (' preform' => ' <dl><dd><pre class=verbatim></pre></dl>' ,
561+ %declarations = (' preform' => ' <dl><dd><pre class=" verbatim" ></pre></dl>' ,
562562 %declarations );
563563
564+
565+ # This is added to get rid of the long comment that follows the doctype
566+ # declaration; MSIE5 on NT4 SP4 barfs on it and drops the content of the
567+ # page.
568+ sub make_head_and_body {
569+ local ($title ,$body ) = @_ ;
570+ local ($DTDcomment ) = ' ' ;
571+ local ($version ,$isolanguage ) = ($HTML_VERSION , ' EN' );
572+ local (%isolanguages ) = ( ' english' , ' EN' , ' USenglish' , ' EN.US'
573+ , ' original' , ' EN' , ' german' , ' DE'
574+ , ' austrian' , ' DE.AT' , ' french' , ' FR'
575+ , ' spanish' , ' ES'
576+ , %isolanguages );
577+ $isolanguage = $isolanguages {$default_language };
578+ $isolanguage = ' EN' unless $isolanguage ;
579+ $title = &purify($title ,1);
580+ eval (" \$ title = " . $default_title ) unless ($title );
581+
582+ # allow user-modification of the <TITLE> tag; thanks Dan Young
583+ if (defined &custom_TITLE_hook) {
584+ $title = &custom_TITLE_hook($title , $toc_sec_title );
585+ }
586+
587+ if ($DOCTYPE =~ / \/\/ [\w\. ]+\s *$ / ) { # language spec included
588+ $DTDcomment = " <!DOCTYPE html PUBLIC \" $DOCTYPE \" >\n " ;
589+ } else {
590+ $DTDcomment = " <!DOCTYPE html PUBLIC \" $DOCTYPE //"
591+ . ($ISO_LANGUAGE ? $ISO_LANGUAGE : $isolanguage ) . " \" >\n " ;
592+ }
593+
594+ $STYLESHEET = $FILE ." .css" unless $STYLESHEET ;
595+ if (!$charset && $CHARSET ) { $charset = $CHARSET ; $charset =~ s / _/ \- / go ; }
596+
597+ join (' ' , ($DOCTYPE ? $DTDcomment : ' ' )
598+ ," <html>\n <head>\n <title>" , $title , " </title>\n "
599+ , &meta_information($title )
600+ , ($CHARSET && $HTML_VERSION ge " 2.1" ?
601+ " <meta http-equiv=\" Content-Type\" content=\" text/html; charset=$charset \" >\n "
602+ : " " )
603+ , ($BASE ? " <base href=\" $BASE \" >\n " : " " )
604+ , " <link rel=\" STYLESHEET\" href=\" $STYLESHEET \" >"
605+ , $more_links_mark
606+ , " \n </head>\n <body $body >\n " );
607+ }
608+
5646091; # This must be the last line
0 commit comments