[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/init chm.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/init chm.pm |
Date: |
Mon, 10 Oct 2011 18:02:05 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/10/10 18:02:05
Modified files:
tp/init : chm.pm
Log message:
Handle right the case of index entries in titlepage.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/init/chm.pm?cvsroot=texinfo&r1=1.1&r2=1.2
Patches:
Index: chm.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/init/chm.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- chm.pm 10 Oct 2011 00:07:54 -0000 1.1
+++ chm.pm 10 Oct 2011 18:02:00 -0000 1.2
@@ -34,7 +34,7 @@
set_from_init_file('SHOW_MENU', 0);
set_from_init_file('SPLIT', 'node');
set_from_init_file('contents', 1);
-set_from_init_file('SPLIT_INDEX', undef);
+#set_from_init_file('SPLIT_INDEX', undef);
set_from_init_file('DEFAULT_RULE', '');
set_from_init_file('BIG_RULE', '');
@@ -307,6 +307,16 @@
foreach my $index_name (keys (%$index_entries)) {
foreach my $index_entry_ref (@{$index_entries->{$index_name}}) {
my $file = $self->command_filename($index_entry_ref->{'command'});
+ # happens for things in @titlepage when it is not output
+ if (!defined($file)) {
+ if ($self->{'elements'} and $self->{'elements'}->[0]
+ and defined($self->{'elements'}->[0]->{'filename'})) {
+ # In that case use the first page.
+ $file = $self->{'elements'}->[0]->{'filename'};
+ } else {
+ $file = '';
+ }
+ }
my $anchor = $self->command_target($index_entry_ref->{'command'});
my $origin_href = "$file#$anchor";
my $entry = convert_tree($self,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp/init chm.pm,
Patrice Dumas <=