@@ -51,7 +51,7 @@ package main;
5151 use Cwd;
5252 use File::Basename;
5353 ($myname , $mydir , $myext ) = fileparse(__FILE__ , ' \..*' );
54- chop $mydir ; # remove trailing '/'
54+ chop $mydir ; # remove trailing '/'
5555 $mydir = getcwd() . " $dd$mydir "
5656 unless $mydir =~ s | ^/| /| ;
5757}
@@ -252,30 +252,30 @@ sub add_link {
252252 # Returns a pair (iconic link, textual link)
253253 my ($icon , $current_file , @link ) = @_ ;
254254 my ($dummy , $file , $title ) = split ($delim ,
255- $section_info {join (' ' ,@link )});
255+ $section_info {join (' ' ,@link )});
256256 if ($icon =~ / \< tex2html_([_a-z]+)_visible_mark\> / ) {
257257 my $r = get_my_icon($1 );
258258 $icon =~ s /\< tex2html_[_a-z]+_visible_mark\> / $r / ;
259259 }
260260 if ($title && ($file ne $current_file )) {
261261 $title = purify($title );
262- $title = get_first_words($title , $WORDS_IN_NAVIGATION_PANEL_TITLES );
263- return (make_href($file , $icon ), make_href($file , " $title " ))
264- }
262+ $title = get_first_words($title , $WORDS_IN_NAVIGATION_PANEL_TITLES );
263+ return (make_href($file , $icon ), make_href($file , " $title " ))
264+ }
265265 elsif ($icon eq get_my_icon(' up' ) && $EXTERNAL_UP_LINK ) {
266- return (make_href($EXTERNAL_UP_LINK , $icon ),
267- make_href($EXTERNAL_UP_LINK , " $EXTERNAL_UP_TITLE " ))
268- }
266+ return (make_href($EXTERNAL_UP_LINK , $icon ),
267+ make_href($EXTERNAL_UP_LINK , " $EXTERNAL_UP_TITLE " ))
268+ }
269269 elsif ($icon eq get_my_icon(' previous' )
270- && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE ) {
271- return (make_href($EXTERNAL_PREV_LINK , $icon ),
272- make_href($EXTERNAL_PREV_LINK , " $EXTERNAL_PREV_TITLE " ))
273- }
270+ && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE ) {
271+ return (make_href($EXTERNAL_PREV_LINK , $icon ),
272+ make_href($EXTERNAL_PREV_LINK , " $EXTERNAL_PREV_TITLE " ))
273+ }
274274 elsif ($icon eq get_my_icon(' next' )
275- && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE ) {
276- return (make_href($EXTERNAL_DOWN_LINK , $icon ),
277- make_href($EXTERNAL_DOWN_LINK , " $EXTERNAL_DOWN_TITLE " ))
278- }
275+ && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE ) {
276+ return (make_href($EXTERNAL_DOWN_LINK , $icon ),
277+ make_href($EXTERNAL_DOWN_LINK , " $EXTERNAL_DOWN_TITLE " ))
278+ }
279279 return (&inactive_img($icon ), " " );
280280}
281281
@@ -316,10 +316,10 @@ ($$$$$)
316316 my $prog = " $myrootdir /tools/buildindex.py" ;
317317 my $index ;
318318 if ($letters ) {
319- $index = ` $prog --columns $columns --letters $datafile ` ;
319+ $index = ` $prog --columns $columns --letters $datafile ` ;
320320 }
321321 else {
322- $index = ` $prog --columns $columns $datafile ` ;
322+ $index = ` $prog --columns $columns $datafile ` ;
323323 }
324324 if (!s / $mark/ $prefix$index / ) {
325325 print " \n Could not locate index mark: $mark " ;
344344 my $allthesame = 1;
345345 my $prefix = ' ' ;
346346 foreach $key (keys %Modules ) {
347- $key =~ s / <tt>([a-zA-Z0-9._]*)<\/ tt>/ $1 / ;
348- my $plat = " $ModulePlatforms {$key }" ;
349- $plat = ' '
350- if ($plat eq $IGNORE_PLATFORM_ANNOTATION );
351- if (!$first ) {
352- $allthesame = 0
353- if ($prevplat ne $plat );
354- }
355- else { $first = 0; }
356- $prevplat = $plat ;
347+ $key =~ s / <tt>([a-zA-Z0-9._]*)<\/ tt>/ $1 / ;
348+ my $plat = " $ModulePlatforms {$key }" ;
349+ $plat = ' '
350+ if ($plat eq $IGNORE_PLATFORM_ANNOTATION );
351+ if (!$first ) {
352+ $allthesame = 0
353+ if ($prevplat ne $plat );
354+ }
355+ else { $first = 0; }
356+ $prevplat = $plat ;
357357 }
358358 open (MODIDXFILE, ' >modindex.dat' ) || die " \n $! \n " ;
359359 foreach $key (keys %Modules ) {
360- # dump the line in the data file; just use a dummy seqno field
361- my $nkey = $1 ;
362- my $moditem = " $Modules {$key }" ;
363- my $plat = ' ' ;
364- $key =~ s / <tt>([a-zA-Z0-9._]*)<\/ tt>/ $1 / ;
365- if ($ModulePlatforms {$key } && !$allthesame ) {
366- $plat = (" <em>(<span class=\" platform\" >$ModulePlatforms {$key }"
367- . ' </span>)</em>' );
368- }
369- print MODIDXFILE $moditem . $IDXFILE_FIELD_SEP
360+ # dump the line in the data file; just use a dummy seqno field
361+ my $nkey = $1 ;
362+ my $moditem = " $Modules {$key }" ;
363+ my $plat = ' ' ;
364+ $key =~ s / <tt>([a-zA-Z0-9._]*)<\/ tt>/ $1 / ;
365+ if ($ModulePlatforms {$key } && !$allthesame ) {
366+ $plat = (" <em>(<span class=\" platform\" >$ModulePlatforms {$key }"
367+ . ' </span>)</em>' );
368+ }
369+ print MODIDXFILE $moditem . $IDXFILE_FIELD_SEP
370370 . " <tt class=\" module\" >$key </tt>$plat ###\n " ;
371371 }
372372 close (MODIDXFILE);
381381MODULE_INDEX_PREFIX
382382 }
383383 if (!$allthesame ) {
384- $prefix .= <<PLAT_DISCUSS ;
384+ $prefix .= <<PLAT_DISCUSS ;
385385
386386<p> Some module names are followed by an annotation indicating what
387387platform they are available on.</p>
388388
389389PLAT_DISCUSS
390390 }
391391 insert_index($idx_module_mark , ' modindex.dat' , $MODULE_INDEX_COLUMNS , 0,
392- $prefix );
392+ $prefix );
393393}
394394
395395# replace both indexes as needed:
@@ -417,46 +417,46 @@ sub do_cmd_tableofcontents {
417417 $TITLE = $toc_title ;
418418 $tocfile = $CURRENT_FILE ;
419419 my ($closures , $reopens ) = preserve_open_tags();
420- anchor_label(' contents' , $CURRENT_FILE , $_ ); # this is added
420+ anchor_label(' contents' , $CURRENT_FILE , $_ ); # this is added
421421 $MY_CONTENTS_PAGE = " $CURRENT_FILE " ;
422422 join (' ' , " <br />\n\\ tableofchildlinks[off]" , $closures
423- , make_section_heading($toc_title , ' h2' ), $toc_mark
424- , $reopens , $_ );
423+ , make_section_heading($toc_title , ' h2' ), $toc_mark
424+ , $reopens , $_ );
425425}
426426# In addition to the standard stuff, add label to allow named node files.
427427sub do_cmd_listoffigures {
428428 local ($_ ) = @_ ;
429429 $TITLE = $lof_title ;
430430 $loffile = $CURRENT_FILE ;
431431 my ($closures , $reopens ) = preserve_open_tags();
432- anchor_label(' lof' , $CURRENT_FILE , $_ ); # this is added
432+ anchor_label(' lof' , $CURRENT_FILE , $_ ); # this is added
433433 join (' ' , " <br />\n " , $closures
434- , make_section_heading($lof_title , ' h2' ), $lof_mark
435- , $reopens , $_ );
434+ , make_section_heading($lof_title , ' h2' ), $lof_mark
435+ , $reopens , $_ );
436436}
437437# In addition to the standard stuff, add label to allow named node files.
438438sub do_cmd_listoftables {
439439 local ($_ ) = @_ ;
440440 $TITLE = $lot_title ;
441441 $lotfile = $CURRENT_FILE ;
442442 my ($closures , $reopens ) = preserve_open_tags();
443- anchor_label(' lot' , $CURRENT_FILE , $_ ); # this is added
443+ anchor_label(' lot' , $CURRENT_FILE , $_ ); # this is added
444444 join (' ' , " <br />\n " , $closures
445- , make_section_heading($lot_title , ' h2' ), $lot_mark
446- , $reopens , $_ );
445+ , make_section_heading($lot_title , ' h2' ), $lot_mark
446+ , $reopens , $_ );
447447}
448448# In addition to the standard stuff, add label to allow named node files.
449449sub do_cmd_textohtmlinfopage {
450450 local ($_ ) = @_ ;
451- if ($INFO ) { #
452- anchor_label(" about" ,$CURRENT_FILE ,$_ ); # this is added
453- } #
454- my $the_version = ' ' ; # and the rest is
455- if ($t_date ) { # mostly ours
456- $the_version = " ,\n $t_date " ;
457- if ($PACKAGE_VERSION ) {
458- $the_version .= " , Release $PACKAGE_VERSION$RELEASE_INFO " ;
459- }
451+ if ($INFO ) { #
452+ anchor_label(" about" ,$CURRENT_FILE ,$_ ); # this is added
453+ } #
454+ my $the_version = ' ' ; # and the rest is
455+ if ($t_date ) { # mostly ours
456+ $the_version = " ,\n $t_date " ;
457+ if ($PACKAGE_VERSION ) {
458+ $the_version .= " , Release $PACKAGE_VERSION$RELEASE_INFO " ;
459+ }
460460 }
461461 my $about ;
462462 open (ABOUT, " <$ABOUT_FILE " ) || die " \n $! \n " ;
@@ -482,7 +482,7 @@ sub do_cmd_textohtmlindex {
482482 else { $preindex = ' ' ; }
483483 my $heading = make_section_heading($idx_title , ' h2' ) . $idx_mark ;
484484 my ($pre , $post ) = minimize_open_tags($heading );
485- anchor_label(' genindex' ,$CURRENT_FILE ,$_ ); # this is added
485+ anchor_label(' genindex' ,$CURRENT_FILE ,$_ ); # this is added
486486 return " <br />\n " . $pre . $_ ;
487487}
488488
@@ -508,10 +508,10 @@ sub do_cmd_textohtmlmoduleindex {
508508# inserts a \bibliography{} or a dummy \textohtmlindex command just
509509# before the appropriate environments to force sectioning.
510510
511- # XXX This *assumes* that if there are two {theindex} environments,
512- # the first is the module index and the second is the standard
513- # index. This is sufficient for the current Python documentation,
514- # but that's about it.
511+ # XXX This *assumes* that if there are two {theindex} environments,
512+ # the first is the module index and the second is the standard
513+ # index. This is sufficient for the current Python documentation,
514+ # but that's about it.
515515
516516sub add_bbl_and_idx_dummy_commands {
517517 my $id = $global {' max_id' };
@@ -548,7 +548,7 @@ sub add_bbl_and_idx_dummy_commands {
548548 $CUSTOM_BUTTONS .= get_my_icon(' blank' );
549549 $global {' max_id' } = $id ; # not sure why....
550550 s / ([\\ ]begin\s *$O\d +$C\s *theindex)/ \\ textohtmlindex $1 / o ;
551- s / [\\ ]printindex/ \\ textohtmlindex / o ;
551+ s / [\\ ]printindex/ \\ textohtmlindex / o ;
552552 }
553553 else {
554554 die " \n\n Bad number of index environments!\n\n " ;
@@ -568,27 +568,27 @@ sub set_depth_levels {
568568 my $level ;
569569 # RRM: do not alter user-set value for $MAX_SPLIT_DEPTH
570570 foreach $level (" part" , " chapter" , " section" , " subsection" ,
571- " subsubsection" , " paragraph" ) {
572- last if (($outermost_level ) = /\\($level )$delimiter_rx /);
571+ " subsubsection" , " paragraph" ) {
572+ last if (($outermost_level ) = /\\($level )$delimiter_rx /);
573573 }
574574 $level = ($outermost_level ? $section_commands {$outermost_level } :
575- do {$outermost_level = ' section' ; 3;});
575+ do {$outermost_level = ' section' ; 3;});
576576
577577 # RRM: but calculate value for $MAX_SPLIT_DEPTH when a $REL_DEPTH was given
578- if ($REL_DEPTH && $MAX_SPLIT_DEPTH ) {
579- $MAX_SPLIT_DEPTH = $level + $MAX_SPLIT_DEPTH ;
578+ if ($REL_DEPTH && $MAX_SPLIT_DEPTH ) {
579+ $MAX_SPLIT_DEPTH = $level + $MAX_SPLIT_DEPTH ;
580580 } elsif (!($MAX_SPLIT_DEPTH )) { $MAX_SPLIT_DEPTH = 1 };
581581
582582 %unnumbered_section_commands = (' tableofcontents' => $level ,
583- ' listoffigures' => $level ,
584- ' listoftables' => $level ,
585- ' bibliography' => $level ,
586- ' textohtmlindex' => $level ,
587- ' textohtmlmoduleindex' => $level );
583+ ' listoffigures' => $level ,
584+ ' listoftables' => $level ,
585+ ' bibliography' => $level ,
586+ ' textohtmlindex' => $level ,
587+ ' textohtmlmoduleindex' => $level );
588588 $section_headings {' textohtmlmoduleindex' } = ' h1' ;
589589
590590 %section_commands = (%unnumbered_section_commands ,
591- %section_commands );
591+ %section_commands );
592592
593593 make_sections_rx();
594594}
@@ -604,7 +604,7 @@ sub set_depth_levels {
604604# before style files are loaded).
605605#
606606%declarations = (' preform' => ' <div class="verbatim"><pre></pre></div>' ,
607- %declarations );
607+ %declarations );
608608
609609
610610# This is used to map the link rel attributes LaTeX2HTML uses to those
@@ -636,14 +636,14 @@ ($$)
636636
637637 # allow user-modification of the <title> tag; thanks Dan Young
638638 if (defined &custom_TITLE_hook) {
639- $title = &custom_TITLE_hook($title , $toc_sec_title );
639+ $title = &custom_TITLE_hook($title , $toc_sec_title );
640640 }
641641
642642 if ($DOCTYPE =~ / \/\/ [\w\. ]+\s *$ / ) { # language spec included
643- $DTDcomment = " <!DOCTYPE html PUBLIC \" $DOCTYPE \" >\n " ;
643+ $DTDcomment = " <!DOCTYPE html PUBLIC \" $DOCTYPE \" >\n " ;
644644 } else {
645- $DTDcomment = " <!DOCTYPE html PUBLIC \" $DOCTYPE //"
646- . ($ISO_LANGUAGE ? $ISO_LANGUAGE : $isolanguage ) . " \" >\n " ;
645+ $DTDcomment = " <!DOCTYPE html PUBLIC \" $DOCTYPE //"
646+ . ($ISO_LANGUAGE ? $ISO_LANGUAGE : $isolanguage ) . " \" >\n " ;
647647 }
648648 if ($MY_PARTIAL_HEADER eq ' ' ) {
649649 $STYLESHEET = $FILE ." .css" unless $STYLESHEET ;
@@ -719,4 +719,4 @@ sub replace_morelinks {
719719 $_ =~ s / $more_links_mark/ $more_links / e ;
720720}
721721
722- 1; # This must be the last line
722+ 1; # This must be the last line
0 commit comments