[Python-checkins] python/dist/src/Doc/perl l2hinit.perl,1.70,1.71

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Fri, 02 May 2003 13:18:04 -0700


Update of /cvsroot/python/python/dist/src/Doc/perl
In directory sc8-pr-cvs1:/tmp/cvs-serv14534

Modified Files:
	l2hinit.perl 
Log Message:
- add link relationships to some of the links in the navigation panels
- implement custom_REL_hook() so LaTeX2HTML uses currently recommended
  link types; those work fine with tools like the Mozilla Site
  Navigation Bar


Index: l2hinit.perl
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** l2hinit.perl	2 May 2003 18:21:22 -0000	1.70
--- l2hinit.perl	2 May 2003 20:18:01 -0000	1.71
***************
*** 100,113 ****
  $CUSTOM_BUTTONS = '';
  
! sub make_nav_sectref($$) {
!     my($label, $title) = @_;
      if ($title) {
          if ($title =~ /\<[aA] /) {
!             $title =~ s/\<[aA] /<a class="sectref" /;
          }
          else {
              $title = "<span class=\"sectref\">$title</span>";
          }
!         return "<b class=\"navlabel\">$label:</b> $title\n";
      }
      return '';
--- 100,113 ----
  $CUSTOM_BUTTONS = '';
  
! sub make_nav_sectref($$$) {
!     my($label, $linktype, $title) = @_;
      if ($title) {
          if ($title =~ /\<[aA] /) {
!             $title =~ s/\<[aA] /<a class="sectref" rel="$linktype" /;
          }
          else {
              $title = "<span class=\"sectref\">$title</span>";
          }
!         return "<b class=\"navlabel\">$label:</b>\n$title\n";
      }
      return '';
***************
*** 176,182 ****
            . "\n</tr></table>\n"
            # textual navigation
!           . make_nav_sectref("Previous", $PREVIOUS_TITLE)
!           . make_nav_sectref("Up", $UP_TITLE)
!           . make_nav_sectref("Next", $NEXT_TITLE)
            );
      # remove these; they are unnecessary and cause errors from validation
--- 176,182 ----
            . "\n</tr></table>\n"
            # textual navigation
!           . make_nav_sectref("Previous", "prev", $PREVIOUS_TITLE)
!           . make_nav_sectref("Up", "parent", $UP_TITLE)
!           . make_nav_sectref("Next", "next", $NEXT_TITLE)
            );
      # remove these; they are unnecessary and cause errors from validation
***************
*** 581,584 ****
--- 581,593 ----
  		 %declarations);
  
+ 
+ # This is used to map the link rel attributes LaTeX2HTML uses to those
+ # currently recommended by the W3C.
+ sub custom_REL_hook {
+     my($rel,$junk) = @_;
+     return 'parent' if $rel eq 'up';
+     return 'prev' if $rel eq 'previous';
+     return $rel;
+ }
  
  # This is added to get rid of the long comment that follows the