[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/Texinfo/Convert HTML.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/Texinfo/Convert HTML.pm |
Date: |
Tue, 10 May 2011 20:44:02 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/05/10 20:44:02
Modified files:
tp/Texinfo/Convert: HTML.pm
Log message:
Do shortcontents.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.59&r2=1.60
Patches:
Index: HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -b -r1.59 -r1.60
--- HTML.pm 9 May 2011 23:19:49 -0000 1.59
+++ HTML.pm 10 May 2011 20:44:01 -0000 1.60
@@ -3907,7 +3907,8 @@
$ul_class = $NO_BULLET_LIST_CLASS if ($self->get_conf('NUMBER_SECTIONS'));
my $result = '';
- $result .= "<div class=\"contents\">\n";
+ $result .= $self->attribute_class('div', $cmdname).">\n";
+
foreach my $top_section (@{$section_root->{'section_childs'}}) {
my $section = $top_section;
SECTION:
@@ -3915,16 +3916,27 @@
if ($section->{'cmdname'} ne 'top') {
my $text = $self->command_text($section);
# FIXME OVERVIEW_LINK_TO_TOC?
- my $href = $self->command_href($section, $filename);
+ my $href;
+ if (!$contents and $self->get_conf('OVERVIEW_LINK_TO_TOC')) {
+ $href = $self->command_contents_href($section, 'contents',
$filename);
+ } else {
+ $href = $self->command_href($section, $filename);
+ }
my $toc_id = $self->command_contents_id($section, $cmdname);
+ if ($text ne '') {
+ # no indenting for shortcontents
$result .= (' ' x (2*($section->{'level'} - $root_level)))
- . "<li><a name=\"$toc_id\" href=\"$href\">$text</a>"
- if ($text ne '');
+ if ($contents);
+ $result .= "<li><a name=\"$toc_id\" href=\"$href\">$text</a>";
+ }
}
+ #Â for shortcontents don't do child if child is not toplevel
if ($section->{'section_childs'}
and ($contents or $section->{'level'} < $root_level+1)) {
+ # no indenting for shortcontents
$result .= "\n". ' ' x (2*($section->{'level'} - $root_level))
- . $self->attribute_class('ul', $ul_class) .">\n";
+ if ($contents);
+ $result .= $self->attribute_class('ul', $ul_class) .">\n";
$section = $section->{'section_childs'}->[0];
} elsif ($section->{'section_next'}) {
$result .= "</li>\n";
@@ -4212,6 +4224,8 @@
return $about;
} elsif ($special_type eq 'Contents') {
return $self->{'contents'}($self, 'contents', undef);
+ } elsif ($special_type eq 'Overview') {
+ return $self->{'contents'}($self, 'shortcontents', undef);
}
}
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/01
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/02
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/03
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/05
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/09
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/09
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/09
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/09
- texinfo/tp/Texinfo/Convert HTML.pm,
Patrice Dumas <=
- texinfo/tp/Texinfo/Convert HTML.pm, Karl Berry, 2011/05/23
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/29
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/29
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/29
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/31
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/05/31