texi2html-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texi2html-cvs] texi2html ChangeLog texi2html.init texi2html.pl...


From: Patrice Dumas
Subject: [Texi2html-cvs] texi2html ChangeLog texi2html.init texi2html.pl...
Date: Sat, 08 Nov 2008 20:02:51 +0000

CVSROOT:        /cvsroot/texi2html
Module name:    texi2html
Changes by:     Patrice Dumas <pertusus>        08/11/08 20:02:51

Modified files:
        .              : ChangeLog texi2html.init texi2html.pl 
        doc            : texi2html.html 
        examples       : chm.init docbook.init enable_encoding.init 
                         html32.init inlinestyle.init makeinfo.init 
                         noheaders.init roff.init tex4ht.init utf8.init 
                         xhtml.init 

Log message:
                * texi2html.init, texi2html.pl: move index splitting code back 
to
                texi2html.pl, but still in the Config namespace, to mark clearly
                that this code is GPL. summary_letter is also put in 
texi2html.pl
                since it share a variable at file scope.
                * examples/*: add copyright notices to most init files, except 
                xml.init and book.init that should remain as an example users 
can 
                copy from.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texi2html/ChangeLog?cvsroot=texi2html&r1=1.335&r2=1.336
http://cvs.savannah.gnu.org/viewcvs/texi2html/texi2html.init?cvsroot=texi2html&r1=1.167&r2=1.168
http://cvs.savannah.gnu.org/viewcvs/texi2html/texi2html.pl?cvsroot=texi2html&r1=1.242&r2=1.243
http://cvs.savannah.gnu.org/viewcvs/texi2html/doc/texi2html.html?cvsroot=texi2html&r1=1.99&r2=1.100
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/chm.init?cvsroot=texi2html&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/docbook.init?cvsroot=texi2html&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/enable_encoding.init?cvsroot=texi2html&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/html32.init?cvsroot=texi2html&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/inlinestyle.init?cvsroot=texi2html&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/makeinfo.init?cvsroot=texi2html&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/noheaders.init?cvsroot=texi2html&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/roff.init?cvsroot=texi2html&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/tex4ht.init?cvsroot=texi2html&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/utf8.init?cvsroot=texi2html&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/xhtml.init?cvsroot=texi2html&r1=1.5&r2=1.6

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/texi2html/texi2html/ChangeLog,v
retrieving revision 1.335
retrieving revision 1.336
diff -u -b -r1.335 -r1.336
--- ChangeLog   4 Nov 2008 00:37:07 -0000       1.335
+++ ChangeLog   8 Nov 2008 20:02:49 -0000       1.336
@@ -1,3 +1,13 @@
+2008-11-08  Patrice Dumas  <address@hidden>
+
+       * texi2html.init, texi2html.pl: move index splitting code back to
+       texi2html.pl, but still in the Config namespace, to mark clearly
+       that this code is GPL. summary_letter is also put in texi2html.pl
+       since it share a variable at file scope.
+       * examples/*: add copyright notices to most init files, except 
+       xml.init and book.init that should remain as an example users can 
+       copy from.
+
 2008-11-03  Patrice Dumas  <address@hidden>
 
        * texi2html.init: remove leading spaces and trailing spaces in 

Index: texi2html.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/texi2html.init,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -b -r1.167 -r1.168
--- texi2html.init      4 Nov 2008 00:37:07 -0000       1.167
+++ texi2html.init      8 Nov 2008 20:02:49 -0000       1.168
@@ -12,7 +12,7 @@
 # Afterwards, load the file with command-line 
 # option -init-file <your_init_file>
 #
-# $Id: texi2html.init,v 1.167 2008/11/04 00:37:07 pertusus Exp $
+# $Id: texi2html.init,v 1.168 2008/11/08 20:02:49 pertusus Exp $
 
 ######################################################################
 # The following variables can also be set by command-line options
@@ -4326,403 +4326,7 @@
 # 'expand'        function reference used when expanding the @-command text
 %command_handler = ();
 
-my $t2h_default_file_number;
-my $t2h_default_index_page_nr;
-#my %t2h_default_element_indices;
-my %t2h_default_index_letters_hash;
-my %t2h_default_index_letters_array;
-my %t2h_default_seen_files;
-my $t2h_default_element_split_printindices;
-my %t2h_default_split_files;
 
-# FIXME call it where indices are split in main program
-sub t2h_default_init_split_indices ()
-{
-    #print STDERR "Do splitting of index letters, once.\n";
-
-    push @command_handler_process, \&t2h_default_index_rearrange_directions;
-    %t2h_default_index_letters_hash = ();
-    %t2h_default_index_letters_array = ();
-    %t2h_default_seen_files = ();
-    %t2h_default_split_files = ();
-    $t2h_default_element_split_printindices = undef;
-    $t2h_default_index_page_nr = 0;
-    $t2h_default_file_number = 0;
-
-    foreach my $index_name (keys %{$Texi2HTML::THISDOC{'indices'}})
-    {
-      #print STDERR "Gathering and sorting $index_name letters\n";
-      foreach my $key (keys 
%{$Texi2HTML::THISDOC{'indices'}->{$index_name}->[0]->{'entries'}})
-      {
-        my $letter = uc(substr($key, 0, 1));
-        $t2h_default_index_letters_hash{$index_name}->{$letter}->{$key} = 
$Texi2HTML::THISDOC{'indices'}->{$index_name}->[0]->{'entries'}->{$key};
-      }
-
-      my $entries_count = 0;
-      my @letters = ();
-      # use cmp if only letters or only symbols, otherwise symbols before 
-      # letters
-      foreach my $letter (sort { 
-         ((($a =~ /^[[:alpha:]]/ and $b =~ /^[[:alpha:]]/) or 
-          ($a !~ /^[[:alpha:]]/ and $b !~ /^[[:alpha:]]/)) && $a cmp $b)
-             || ($a =~ /^[[:alpha:]]/ && 1) || -1 } 
(keys(%{$t2h_default_index_letters_hash{$index_name}})))
-      {
-        my $letter_entry = {'letter' => $letter };
-        foreach my $key (sort {uc($a) cmp uc($b)} 
(keys(%{$t2h_default_index_letters_hash{$index_name}->{$letter}})))
-        {
-          push @{$letter_entry->{'entries'}}, 
$t2h_default_index_letters_hash{$index_name}->{$letter}->{$key};
-        }
-        push @letters, $letter_entry;
-        $entries_count += scalar(@{$letter_entry->{'entries'}});
-        #if ($SPLIT and $SPLIT_INDEX and $entries_count >= $SPLIT_INDEX)
-        # FIXME this is not right, above is right
-        # Don't split if document is not split
-        if ($SPLIT and $SPLIT_INDEX and $entries_count > $SPLIT_INDEX)
-        {
-          push @{$t2h_default_index_letters_array{$index_name}}, [ @letters ];
-          @letters = ();
-          $entries_count = 0;
-        }
-      }
-      push @{$t2h_default_index_letters_array{$index_name}}, [ @letters ] if 
(scalar(@letters));
-    }
-}
-
-sub t2h_default_associate_index_element($$$$)
-{
-  my $element = shift;
-  my $is_top = shift;
-  my $docu_name = shift;
-  my $use_node_file = shift;
-
-  my ($file, $default_element_file);
-
-  if ($SPLIT)
-  {
-    # respect the default splitting
-    $default_element_file = $element->{'file'};
-    if ($t2h_default_seen_files{$default_element_file})
-    {
-      $file = $t2h_default_seen_files{$default_element_file};
-    }
-    else
-    {
-      if ($is_top eq 'top')
-      {
-        $file = $default_element_file;
-      }
-      else
-      {
-        $file = "${docu_name}_$t2h_default_file_number";
-        $file .= '.' . $Texi2HTML::THISDOC{'extension'} if
-           (defined($Texi2HTML::THISDOC{'extension'}));
-      }
-      $t2h_default_file_number++;
-      $t2h_default_seen_files{$default_element_file} = $file;
-    }
-  }
-  my $modify_file = ($SPLIT and (!$use_node_file or 
$t2h_default_split_files{$default_element_file}));
-  $element->{'file'} = $file if ($modify_file);
-
-  my $current_element = $element;
-  #print STDERR "Doing printindices for $element $element->{'texi'}, file 
$file (@{$element->{'place'}})\n";
-
-  my @places = @{$element->{'place'}};
-  @{$element->{'place'}} = ();
-
-  foreach my $place (@places)
-  {
-    unless ($place->{'command'} and $place->{'command'} eq 'printindex')
-    {
-#print STDERR "HHHHHHHHH ($element->{'texi'}) place: $place->{'texi'}, 
current: $current_element->{'texi'}, $current_element->{'file'}\n";
-       push @{$current_element->{'place'}}, $place;
-       $place->{'file'} = $current_element->{'file'};
-       $place->{'element_ref'} = $current_element if ($place->{'element_ref'} 
and $current_element ne $element);
-       next;
-    }
-    my $printindex = $place;
-    my $index_name = $printindex->{'name'};
-    #print STDERR "Associate letters in $element->{'texi'} for $index_name\n";
-    my @letter_groups = ();
-    # empty index
-    next if (!exists($t2h_default_index_letters_array{$index_name}));
-    my @letters_split = @{$t2h_default_index_letters_array{$index_name}};
-
-    # index is not split
-    if (scalar(@letters_split) eq 1)
-    {
-      push @{$letter_groups[0]->{'letters'}}, @{$letters_split[0]};
-    }
-    # the element is at the level of splitting, then we split according to
-    # INDEX_SPLIT
-    elsif (!$element->{'top'} and $SPLIT and (($SPLIT eq 'node') or 
(defined($element->{'level'}) and $element->{'level'} <= 
$Texi2HTML::THISDOC{'split_level'})))
-    {
-      $t2h_default_split_files{$default_element_file} = 1;
-      foreach my $letters_split (@letters_split)
-      {
-        push @letter_groups, {'letters' => address@hidden;
-      }
-    }
-    else
-    { # we 'unsplit' index split if not located where document is indeed split
-      #print STDERR "UNSPLIT $element->{'texi'}, $index_name\n";
-      foreach my $letters_split (@letters_split)
-      {
-        push @{$letter_groups[0]->{'letters'}}, @$letters_split;
-      }
-    }
-    $letter_groups[0]->{'element'} = $current_element;
-    # may only happen if SPLIT
-    if (scalar(@letter_groups) > 1)
-    { # this weird construct is there because the element use as a key is 
-      # converted to a string by perl, losing its meaning as a reference, 
-      # the reference must be recorded explicitly
-      $t2h_default_element_split_printindices->{$element}->{'element'} = 
$element;
-      push 
@{$t2h_default_element_split_printindices->{$element}->{'printindices'}}, 
$printindex;
-      #print STDERR "Pushing $element, $element->{'texi'}, $printindex\n";
-      foreach my $split_group (@letter_groups)
-      {
-        my $first_letter = $split_group->{'letters'}->[0]->{'letter'};
-        my $last_letter = $split_group->{'letters'}->[-1]->{'letter'};
-        if (!$split_group->{'element'})
-        {
-          #construct new element name
-          my $letters_heading;
-          if ($last_letter ne $first_letter)
-          {
-            $letters_heading = &$normal_text("$first_letter -- $last_letter");
-          }
-          else
-          {
-            $letters_heading = &$normal_text("$first_letter");
-          }
-          my ($name, $simple);
-          my $texi = "ADDED ELEMENT $element->{'texi'}: $letters_heading";
-          if (!defined($element->{'text'}))
-          {
-            my $element_heading_texi = &$heading_texi($element->{'tag'}, 
$element->{'texi'}, $element->{'number'});
-
-            my $heading_texi = &$index_element_heading_texi(
-                 $element_heading_texi,
-                 $element->{'tag'},
-                 $element->{'texi'},
-                 $element->{'number'},
-                 $first_letter, $last_letter);
-            $name = main::substitute_line($heading_texi);
-            $simple = main::simple_format(undef,undef,$heading_texi);
-          }
-          else
-          { # should never happen
-            $name = "$element->{'text'}: $letters_heading";
-            $simple = "$element->{'simple_format'}: $letters_heading";
-          }
-
-          #file and id
-          my $relative_file = $Texi2HTML::THISDOC{'file_base_name'} . '_' . 
$t2h_default_file_number;
-          $t2h_default_file_number++;
-          $relative_file .= '.' . $Texi2HTML::THISDOC{'extension'} if 
-             (defined($Texi2HTML::THISDOC{'extension'}));
-          my $id = "index_split-$t2h_default_index_page_nr";
-          $t2h_default_index_page_nr++;
-
-          my $new_element = { 'file' => $relative_file, 'id' => $id, 'target' 
=> $id, 'text' => $name, 'texi' => $texi, 'seen' => 1, 'simple_format' => 
$simple };
-
-          $split_group->{'element'} = $new_element;
-          $current_element = $new_element;
-          #print STDERR "Added $new_element->{'file'} for 
$new_element->{'texi'} ($first_letter:$last_letter)\n";
-        }
-        else
-        { # this is the first index split, it is still associated with the 
element
-          #print STDERR "No file added for ($first_letter:$last_letter)\n";
-        }
-      }
-      $t2h_default_seen_files{$default_element_file} = 
$current_element->{'file'};
-    }
-    else
-    {
-       push @{$current_element->{'place'}}, $place;
-    }
-    $printindex->{'split_groups'} = address@hidden;
-    #print STDERR "$index_name processed for $element, $element->{'texi'} 
(@{$printindex->{'split_groups'}})\n";
-  }
-
-  return $file if ($modify_file);
-  return undef;
-}
-
-sub t2h_default_index_rearrange_directions()
-{
-  return if (!defined($t2h_default_element_split_printindices));
-  foreach my $element_string (keys(%$t2h_default_element_split_printindices))
-  {
-    my $element = 
$t2h_default_element_split_printindices->{$element_string}->{'element'};
-    my $current_element = $element;
-    #print STDERR " E Processing $element_string,$current_element 
$current_element->{'texi'}\n";
-    foreach my $printindex 
(@{$t2h_default_element_split_printindices->{$element_string}->{'printindices'}})
-    {
-      #print STDERR "  I Processing $printindex $printindex->{'name'} 
(@{$printindex->{'split_groups'}})\n";
-      foreach my $split_group (@{$printindex->{'split_groups'}})
-      {
-        my $first_letter = $split_group->{'letters'}->[0]->{'letter'};
-        my $last_letter = $split_group->{'letters'}->[-1]->{'letter'};
-
-        my $new_element = $split_group->{'element'};
-        next if ($current_element eq $new_element);
-        #print STDERR "   G Processing ($first_letter:$last_letter) in 
$element->{'texi'}, index $printindex->{'name'}: $new_element->{'texi'}\n";
-        $new_element->{'This'} = $new_element;
-        if ($current_element->{'Forward'})
-        {
-          $current_element->{'Forward'}->{'Back'} = $new_element;
-          $new_element->{'Forward'} = $current_element->{'Forward'};
-        }
-        $current_element->{'Forward'} = $new_element;
-        $new_element->{'Back'} = $current_element;
-        if ($current_element->{'Following'})
-        {
-#print STDERR "F: C($current_element): $current_element->{'texi'}, 
N($new_element): $new_element->{'texi'} -- C->F: 
$current_element->{'Following'}->{'texi'}\n";
-          $new_element->{'Following'} = $current_element->{'Following'};
-          $current_element->{'Following'} = $new_element;
-        }
-        foreach my $key ('FastForward', 'FastBack', 'Up', 'tag_level', 'tag',
-            'level', 'node')
-        {
-          $new_element->{$key} = $element->{$key} if 
(defined($element->{$key}));
-        }
-        $current_element = $new_element;
-      }
-    }
-  }
-}
-
-# not needed to initialize it for a document, since it is reset 
-# in index_summary
-my $t2h_symbol_indices = 0;
-
-# this replaces do_index_page
-# args should be:
-# index_name
-sub t2h_default_printindex($)
-{
-  my $index_name = shift;
-
-  my %letter_entries;
-  my $identifier_index_nr = 0;
-  # could be cross verified with argument
-  my $printindex = shift @{$Texi2HTML::THISDOC{'printindices'}};
-  if ($printindex->{'name'} ne $index_name)
-  {
-    print STDERR "BUG: THISDOC{'printindices'} $printindex->{'name'} ne 
$index_name\n";
-  }
-#print STDERR "Doing printindex $index_name\n";
-  return '' if (! defined($printindex->{'split_groups'}));
-  my @split_letters = @{$printindex->{'split_groups'}};
-
-  return '' if (!scalar(@split_letters));
-
-  foreach my $split_group (@split_letters)
-  {
-    #do summmary
-    my @non_alpha = ();
-    my @alpha = ();
-    my $file = $split_group->{'element'}->{'file'};
-    # letter_id could be done once for all instead of for each split_group
-    # and outside of t2h_default_summary_letter (or t2h_default_summary_letter
-    # could be simplified and inlined
-    my %letter_id;
-    foreach my $summary_split_group (@split_letters)
-    {
-      foreach my $letter_entry (@{$summary_split_group->{'letters'}})
-      {
-        my $letter = $letter_entry->{'letter'};
-        #my $letter = $letter_entry;
-        my $dest_file = '';
-        $dest_file = $summary_split_group->{'element'}->{'file'}
-           if ($summary_split_group ne $split_group);
-        my $index_element_id = $summary_split_group->{'element'}->{'id'};
-        my $default_identifier = $index_element_id . "_$identifier_index_nr";
-        $identifier_index_nr++;
-        my ($result, $identifier, $is_symbol) =
-          &$summary_letter($letter, $dest_file, $default_identifier, 
$index_element_id, '', '', $index_name);
-        $identifier = $default_identifier if (!defined($identifier));
-        $letter_id{$letter} = $identifier;
-        $is_symbol = $letter !~ /^[A-Za-z]/ if (!defined($is_symbol));
-
-        if ($is_symbol)
-        {
-          push @non_alpha, $result;
-        }
-        else
-        {
-          push @alpha, $result;
-        }
-      }
-    }
-    my $summary = &$index_summary(address@hidden, address@hidden);
-
-    # reset symbols numbering
-    $t2h_symbol_indices = 0;
-
-    my $letters_text = '';
-    foreach my $letter_entry (@{$split_group->{'letters'}})
-    {
-      my $letter = $letter_entry->{'letter'};
-      my $entries_text = '';
-      #foreach my $entry (@{$letter_entries{$letter}->{'entries'}})
-      foreach my $index_entry_ref (@{$letter_entry->{'entries'}})
-      {
-        #my $entry_infos = main::get_index_entry_infos($index_entry, 
$split_group->{'element'});
-        #my ($text_href, $entry, $element_href, $element_text, $entry_file, 
$element_file, $entry_target, $entry_element_target) = @$entry_infos;
-        my ($text_href, $entry_file, $element_file, $entry_target,
-          $entry_element_target, $formatted_entry, $element_href, 
$entry_element_text)
-          =  main::get_index_entry_infos($index_entry_ref, 
$split_group->{'element'});
-        $entries_text .= &$index_entry ($text_href, $formatted_entry, 
$element_href, $entry_element_text, $entry_file, $element_file, $entry_target, 
$entry_element_target);
-      }
-      $letters_text .= &$index_letter ($letter, $letter_id{$letter}, 
$entries_text)
-    }
-    my $index_text = &$print_index($letters_text, $index_name);
-    $split_group->{'text'} = $summary . $index_text . $summary;
-#    print STDERR "    ---> $index_name @{$split_group->{'letters'}}
-#     * elt:   $split_group->{'element'}->{'id'}, 
$split_group->{'element'}->{'file'}, $split_group->{'element'}->{'name'}
-#     * directions: B: $split_group->{'element'}->{'Back'}->{'name'}, F: 
$split_group->{'element'}->{'Forward'}->{'name'}, FB: 
$split_group->{'element'}->{'FastBack'}->{'name'}, FF: 
$split_group->{'element'}->{'FastForward'}->{'name'}
-#     * text
-#
-#$split_group->{'text'}
-#   
-#";
-  }
-  my $current_page = shift @split_letters;
-  if (!scalar(@split_letters))
-  {
-    return $current_page->{'text'};
-  }
-
-  while (1)
-  {
-    # print the index letters
-    push @{$Texi2HTML::THIS_SECTION}, $current_page->{'text'};
-
-    $current_page = shift @split_letters;
-    last if (!defined($current_page));
-
-    # end the previous element
-    main::finish_element ($Texi2HTML::THISDOC{'FH'}, $Texi2HTML::THIS_ELEMENT, 
$Texi2HTML::THIS_ELEMENT->{'Forward'}, 0);
-
-    # do the new element beginning
-    $Texi2HTML::THIS_ELEMENT = $current_page->{'element'};
-    main::do_element_directions($Texi2HTML::THIS_ELEMENT);
-    main::open_out_file($current_page->{'element'}->{'file'});
-    &$print_page_head($Texi2HTML::THISDOC{'FH'});
-    &$print_chapter_header($Texi2HTML::THISDOC{'FH'}, 
$Texi2HTML::THIS_ELEMENT) if $Texi2HTML::Config::SPLIT eq 'chapter';
-    &$print_section_header($Texi2HTML::THISDOC{'FH'}, 
$Texi2HTML::THIS_ELEMENT) if $Texi2HTML::Config::SPLIT eq 'section';
-
-    @{$Texi2HTML::THIS_SECTION} =  
&$element_label($Texi2HTML::THIS_ELEMENT->{'id'}, $Texi2HTML::THIS_ELEMENT, 
undef, undef);
-    push @{$Texi2HTML::THIS_SECTION}, &$print_element_header(1, 0);
-    push @{$Texi2HTML::THIS_SECTION}, &$heading($Texi2HTML::THIS_ELEMENT);
-  }
-  return '';
-}
-
-1;
 # formatting functions
 
 $anchor            = \&t2h_default_anchor;
@@ -4759,11 +4363,11 @@
 $address           = \&t2h_default_address;
 $index_entry_label = \&t2h_default_index_entry_label;
 $index_summary     = \&t2h_default_index_summary;
-$summary_letter    = \&t2h_default_summary_letter;
+#$summary_letter    = \&t2h_default_summary_letter;
 $index_entry       = \&t2h_default_index_entry;
 $index_entry_command = \&t2h_default_index_entry_command;
 $index_letter      = \&t2h_default_index_letter;
-$printindex       = \&t2h_default_printindex;
+#$printindex       = \&t2h_default_printindex;
 $print_index       = \&t2h_default_print_index;
 $protect_text      = \&t2h_default_protect_text;
 $normal_text       = \&t2h_default_normal_text;
@@ -6879,44 +6483,6 @@
     return $document_description;
 }
 
-# format a letter appearing in a summary for an index. The letter links to
-# the place where the index elements beginning with this letter are (called
-# a letter entry).
-#
-# arguments:
-# letter
-# file where the target letter entry is 
-# identifier for the target letter entry
-sub t2h_default_summary_letter($$$$$$$)
-{
-   my $letter = shift;
-   my $file = shift;
-   my $default_identifier = shift;
-   my $index_element_id = shift;
-   my $number = shift;
-   my $index_element = shift;
-   my $index_name = shift;
-
-   my $is_symbol = $letter !~ /^[A-Za-z]/;
-   my $identifier = $default_identifier;
-
-   if ($NEW_CROSSREF_STYLE)
-   {
-      if ($is_symbol)
-      {
-         $t2h_symbol_indices++;
-         $identifier = $index_element_id . 
"_${index_name}_symbol-$t2h_symbol_indices";
-      }
-      else
-      {
-         $identifier = $index_element_id . "_${index_name}_letter-${letter}";
-      }
-   }
-   my $result = &$anchor('', $file . '#' . $identifier, '<b>' . 
&$protect_text($letter) . '</b>', 'class="summary-letter"');
-   return $result unless ($NEW_CROSSREF_STYLE);
-   return ($result, $identifier, $is_symbol);
-}
-
 # format an index summary. This is a list of letters linking to the letter
 # entries.
 #

Index: texi2html.pl
===================================================================
RCS file: /cvsroot/texi2html/texi2html/texi2html.pl,v
retrieving revision 1.242
retrieving revision 1.243
diff -u -b -r1.242 -r1.243
--- texi2html.pl        4 Nov 2008 00:37:07 -0000       1.242
+++ texi2html.pl        8 Nov 2008 20:02:49 -0000       1.243
@@ -60,7 +60,7 @@
 #--##########################################################################
 
 # CVS version:
-# $Id: texi2html.pl,v 1.242 2008/11/04 00:37:07 pertusus Exp $
+# $Id: texi2html.pl,v 1.243 2008/11/08 20:02:49 pertusus Exp $
 
 # Homepage:
 my $T2H_HOMEPAGE = "http://www.nongnu.org/texi2html/";;
@@ -553,6 +553,8 @@
 $toc_body                 = \&T2H_GPL_toc_body;
 $style                    = \&T2H_GPL_style;
 $format                   = \&T2H_GPL_format;
+$printindex               = \&t2h_GPL_default_printindex;
+$summary_letter           = \&t2h_default_summary_letter;
 
 sub T2H_GPL_toc_body($)
 {
@@ -743,6 +745,442 @@
     return "<${element}$attribute_text>\n" . $text. "</$element>\n";
 }
 
+my $t2h_default_file_number;
+my $t2h_default_index_page_nr;
+#my %t2h_default_element_indices;
+my %t2h_default_index_letters_hash;
+my %t2h_default_index_letters_array;
+my %t2h_default_seen_files;
+my $t2h_default_element_split_printindices;
+my %t2h_default_split_files;
+
+# FIXME call it where indices are split in main program
+sub t2h_default_init_split_indices ()
+{
+    #print STDERR "Do splitting of index letters, once.\n";
+
+    push @command_handler_process, \&t2h_default_index_rearrange_directions;
+    %t2h_default_index_letters_hash = ();
+    %t2h_default_index_letters_array = ();
+    %t2h_default_seen_files = ();
+    %t2h_default_split_files = ();
+    $t2h_default_element_split_printindices = undef;
+    $t2h_default_index_page_nr = 0;
+    $t2h_default_file_number = 0;
+
+    foreach my $index_name (keys %{$Texi2HTML::THISDOC{'indices'}})
+    {
+      #print STDERR "Gathering and sorting $index_name letters\n";
+      foreach my $key (keys 
%{$Texi2HTML::THISDOC{'indices'}->{$index_name}->[0]->{'entries'}})
+      {
+        my $letter = uc(substr($key, 0, 1));
+        $t2h_default_index_letters_hash{$index_name}->{$letter}->{$key} = 
$Texi2HTML::THISDOC{'indices'}->{$index_name}->[0]->{'entries'}->{$key};
+      }
+
+      my $entries_count = 0;
+      my @letters = ();
+      # use cmp if only letters or only symbols, otherwise symbols before 
+      # letters
+      foreach my $letter (sort { 
+         ((($a =~ /^[[:alpha:]]/ and $b =~ /^[[:alpha:]]/) or 
+          ($a !~ /^[[:alpha:]]/ and $b !~ /^[[:alpha:]]/)) && $a cmp $b)
+             || ($a =~ /^[[:alpha:]]/ && 1) || -1 } 
(keys(%{$t2h_default_index_letters_hash{$index_name}})))
+      {
+        my $letter_entry = {'letter' => $letter };
+        foreach my $key (sort {uc($a) cmp uc($b)} 
(keys(%{$t2h_default_index_letters_hash{$index_name}->{$letter}})))
+        {
+          push @{$letter_entry->{'entries'}}, 
$t2h_default_index_letters_hash{$index_name}->{$letter}->{$key};
+        }
+        push @letters, $letter_entry;
+        $entries_count += scalar(@{$letter_entry->{'entries'}});
+        #if ($SPLIT and $SPLIT_INDEX and $entries_count >= $SPLIT_INDEX)
+        # FIXME this is not right, above is right
+        # Don't split if document is not split
+        if ($SPLIT and $SPLIT_INDEX and $entries_count > $SPLIT_INDEX)
+        {
+          push @{$t2h_default_index_letters_array{$index_name}}, [ @letters ];
+          @letters = ();
+          $entries_count = 0;
+        }
+      }
+      push @{$t2h_default_index_letters_array{$index_name}}, [ @letters ] if 
(scalar(@letters));
+    }
+}
+
+sub t2h_default_associate_index_element($$$$)
+{
+  my $element = shift;
+  my $is_top = shift;
+  my $docu_name = shift;
+  my $use_node_file = shift;
+
+  my ($file, $default_element_file);
+
+  if ($SPLIT)
+  {
+    # respect the default splitting
+    $default_element_file = $element->{'file'};
+    if ($t2h_default_seen_files{$default_element_file})
+    {
+      $file = $t2h_default_seen_files{$default_element_file};
+    }
+    else
+    {
+      if ($is_top eq 'top')
+      {
+        $file = $default_element_file;
+      }
+      else
+      {
+        $file = "${docu_name}_$t2h_default_file_number";
+        $file .= '.' . $Texi2HTML::THISDOC{'extension'} if
+           (defined($Texi2HTML::THISDOC{'extension'}));
+      }
+      $t2h_default_file_number++;
+      $t2h_default_seen_files{$default_element_file} = $file;
+    }
+  }
+  my $modify_file = ($SPLIT and (!$use_node_file or 
$t2h_default_split_files{$default_element_file}));
+  $element->{'file'} = $file if ($modify_file);
+
+  my $current_element = $element;
+  #print STDERR "Doing printindices for $element $element->{'texi'}, file 
$file (@{$element->{'place'}})\n";
+
+  my @places = @{$element->{'place'}};
+  @{$element->{'place'}} = ();
+
+  foreach my $place (@places)
+  {
+    unless ($place->{'command'} and $place->{'command'} eq 'printindex')
+    {
+#print STDERR "HHHHHHHHH ($element->{'texi'}) place: $place->{'texi'}, 
current: $current_element->{'texi'}, $current_element->{'file'}\n";
+       push @{$current_element->{'place'}}, $place;
+       $place->{'file'} = $current_element->{'file'};
+       $place->{'element_ref'} = $current_element if ($place->{'element_ref'} 
and $current_element ne $element);
+       next;
+    }
+    my $printindex = $place;
+    my $index_name = $printindex->{'name'};
+    #print STDERR "Associate letters in $element->{'texi'} for $index_name\n";
+    my @letter_groups = ();
+    # empty index
+    next if (!exists($t2h_default_index_letters_array{$index_name}));
+    my @letters_split = @{$t2h_default_index_letters_array{$index_name}};
+
+    # index is not split
+    if (scalar(@letters_split) eq 1)
+    {
+      push @{$letter_groups[0]->{'letters'}}, @{$letters_split[0]};
+    }
+    # the element is at the level of splitting, then we split according to
+    # INDEX_SPLIT
+    elsif (!$element->{'top'} and $SPLIT and (($SPLIT eq 'node') or 
(defined($element->{'level'}) and $element->{'level'} <= 
$Texi2HTML::THISDOC{'split_level'})))
+    {
+      $t2h_default_split_files{$default_element_file} = 1;
+      foreach my $letters_split (@letters_split)
+      {
+        push @letter_groups, {'letters' => address@hidden;
+      }
+    }
+    else
+    { # we 'unsplit' index split if not located where document is indeed split
+      #print STDERR "UNSPLIT $element->{'texi'}, $index_name\n";
+      foreach my $letters_split (@letters_split)
+      {
+        push @{$letter_groups[0]->{'letters'}}, @$letters_split;
+      }
+    }
+    $letter_groups[0]->{'element'} = $current_element;
+    # may only happen if SPLIT
+    if (scalar(@letter_groups) > 1)
+    { # this weird construct is there because the element use as a key is 
+      # converted to a string by perl, losing its meaning as a reference, 
+      # the reference must be recorded explicitly
+      $t2h_default_element_split_printindices->{$element}->{'element'} = 
$element;
+      push 
@{$t2h_default_element_split_printindices->{$element}->{'printindices'}}, 
$printindex;
+      #print STDERR "Pushing $element, $element->{'texi'}, $printindex\n";
+      foreach my $split_group (@letter_groups)
+      {
+        my $first_letter = $split_group->{'letters'}->[0]->{'letter'};
+        my $last_letter = $split_group->{'letters'}->[-1]->{'letter'};
+        if (!$split_group->{'element'})
+        {
+          #construct new element name
+          my $letters_heading;
+          if ($last_letter ne $first_letter)
+          {
+            $letters_heading = &$normal_text("$first_letter -- $last_letter");
+          }
+          else
+          {
+            $letters_heading = &$normal_text("$first_letter");
+          }
+          my ($name, $simple);
+          my $texi = "ADDED ELEMENT $element->{'texi'}: $letters_heading";
+          if (!defined($element->{'text'}))
+          {
+            my $element_heading_texi = &$heading_texi($element->{'tag'}, 
$element->{'texi'}, $element->{'number'});
+
+            my $heading_texi = &$index_element_heading_texi(
+                 $element_heading_texi,
+                 $element->{'tag'},
+                 $element->{'texi'},
+                 $element->{'number'},
+                 $first_letter, $last_letter);
+            $name = main::substitute_line($heading_texi);
+            $simple = main::simple_format(undef,undef,$heading_texi);
+          }
+          else
+          { # should never happen
+            $name = "$element->{'text'}: $letters_heading";
+            $simple = "$element->{'simple_format'}: $letters_heading";
+          }
+
+          #file and id
+          my $relative_file = $Texi2HTML::THISDOC{'file_base_name'} . '_' . 
$t2h_default_file_number;
+          $t2h_default_file_number++;
+          $relative_file .= '.' . $Texi2HTML::THISDOC{'extension'} if 
+             (defined($Texi2HTML::THISDOC{'extension'}));
+          my $id = "index_split-$t2h_default_index_page_nr";
+          $t2h_default_index_page_nr++;
+
+          my $new_element = { 'file' => $relative_file, 'id' => $id, 'target' 
=> $id, 'text' => $name, 'texi' => $texi, 'seen' => 1, 'simple_format' => 
$simple };
+
+          $split_group->{'element'} = $new_element;
+          $current_element = $new_element;
+          #print STDERR "Added $new_element->{'file'} for 
$new_element->{'texi'} ($first_letter:$last_letter)\n";
+        }
+        else
+        { # this is the first index split, it is still associated with the 
element
+          #print STDERR "No file added for ($first_letter:$last_letter)\n";
+        }
+      }
+      $t2h_default_seen_files{$default_element_file} = 
$current_element->{'file'};
+    }
+    else
+    {
+       push @{$current_element->{'place'}}, $place;
+    }
+    $printindex->{'split_groups'} = address@hidden;
+    #print STDERR "$index_name processed for $element, $element->{'texi'} 
(@{$printindex->{'split_groups'}})\n";
+  }
+
+  return $file if ($modify_file);
+  return undef;
+}
+
+sub t2h_default_index_rearrange_directions()
+{
+  return if (!defined($t2h_default_element_split_printindices));
+  foreach my $element_string (keys(%$t2h_default_element_split_printindices))
+  {
+    my $element = 
$t2h_default_element_split_printindices->{$element_string}->{'element'};
+    my $current_element = $element;
+    #print STDERR " E Processing $element_string,$current_element 
$current_element->{'texi'}\n";
+    foreach my $printindex 
(@{$t2h_default_element_split_printindices->{$element_string}->{'printindices'}})
+    {
+      #print STDERR "  I Processing $printindex $printindex->{'name'} 
(@{$printindex->{'split_groups'}})\n";
+      foreach my $split_group (@{$printindex->{'split_groups'}})
+      {
+        my $first_letter = $split_group->{'letters'}->[0]->{'letter'};
+        my $last_letter = $split_group->{'letters'}->[-1]->{'letter'};
+
+        my $new_element = $split_group->{'element'};
+        next if ($current_element eq $new_element);
+        #print STDERR "   G Processing ($first_letter:$last_letter) in 
$element->{'texi'}, index $printindex->{'name'}: $new_element->{'texi'}\n";
+        $new_element->{'This'} = $new_element;
+        if ($current_element->{'Forward'})
+        {
+          $current_element->{'Forward'}->{'Back'} = $new_element;
+          $new_element->{'Forward'} = $current_element->{'Forward'};
+        }
+        $current_element->{'Forward'} = $new_element;
+        $new_element->{'Back'} = $current_element;
+        if ($current_element->{'Following'})
+        {
+#print STDERR "F: C($current_element): $current_element->{'texi'}, 
N($new_element): $new_element->{'texi'} -- C->F: 
$current_element->{'Following'}->{'texi'}\n";
+          $new_element->{'Following'} = $current_element->{'Following'};
+          $current_element->{'Following'} = $new_element;
+        }
+        foreach my $key ('FastForward', 'FastBack', 'Up', 'tag_level', 'tag',
+            'level', 'node')
+        {
+          $new_element->{$key} = $element->{$key} if 
(defined($element->{$key}));
+        }
+        $current_element = $new_element;
+      }
+    }
+  }
+}
+
+# not needed to initialize it for a document, since it is reset 
+# in index_summary
+my $t2h_symbol_indices = 0;
+
+# format a letter appearing in a summary for an index. The letter links to
+# the place where the index elements beginning with this letter are (called
+# a letter entry).
+#
+# arguments:
+# letter
+# file where the target letter entry is 
+# identifier for the target letter entry
+
+# This should better be in texi2html.init, but $t2h_symbol_indices
+# has to be in the same file scope than printindeex.
+sub t2h_default_summary_letter($$$$$$$)
+{
+   my $letter = shift;
+   my $file = shift;
+   my $default_identifier = shift;
+   my $index_element_id = shift;
+   my $number = shift;
+   my $index_element = shift;
+   my $index_name = shift;
+
+   my $is_symbol = $letter !~ /^[A-Za-z]/;
+   my $identifier = $default_identifier;
+
+   if ($NEW_CROSSREF_STYLE)
+   {
+      if ($is_symbol)
+      {
+         $t2h_symbol_indices++;
+         $identifier = $index_element_id . 
"_${index_name}_symbol-$t2h_symbol_indices";
+      }
+      else
+      {
+         $identifier = $index_element_id . "_${index_name}_letter-${letter}";
+      }
+   }
+   my $result = &$anchor('', $file . '#' . $identifier, '<b>' . 
&$protect_text($letter) . '</b>', 'class="summary-letter"');
+   return $result unless ($NEW_CROSSREF_STYLE);
+   return ($result, $identifier, $is_symbol);
+}
+
+# this replaces do_index_page
+# args should be:
+# index_name
+sub t2h_GPL_default_printindex($)
+{
+  my $index_name = shift;
+
+  my %letter_entries;
+  my $identifier_index_nr = 0;
+  # could be cross verified with argument
+  my $printindex = shift @{$Texi2HTML::THISDOC{'printindices'}};
+  if ($printindex->{'name'} ne $index_name)
+  {
+    print STDERR "BUG: THISDOC{'printindices'} $printindex->{'name'} ne 
$index_name\n";
+  }
+#print STDERR "Doing printindex $index_name\n";
+  return '' if (! defined($printindex->{'split_groups'}));
+  my @split_letters = @{$printindex->{'split_groups'}};
+
+  return '' if (!scalar(@split_letters));
+
+  foreach my $split_group (@split_letters)
+  {
+    #do summmary
+    my @non_alpha = ();
+    my @alpha = ();
+    my $file = $split_group->{'element'}->{'file'};
+    # letter_id could be done once for all instead of for each split_group
+    # and outside of t2h_default_summary_letter (or t2h_default_summary_letter
+    # could be simplified and inlined
+    my %letter_id;
+    foreach my $summary_split_group (@split_letters)
+    {
+      foreach my $letter_entry (@{$summary_split_group->{'letters'}})
+      {
+        my $letter = $letter_entry->{'letter'};
+        #my $letter = $letter_entry;
+        my $dest_file = '';
+        $dest_file = $summary_split_group->{'element'}->{'file'}
+           if ($summary_split_group ne $split_group);
+        my $index_element_id = $summary_split_group->{'element'}->{'id'};
+        my $default_identifier = $index_element_id . "_$identifier_index_nr";
+        $identifier_index_nr++;
+        my ($result, $identifier, $is_symbol) =
+          &$summary_letter($letter, $dest_file, $default_identifier, 
$index_element_id, '', '', $index_name);
+        $identifier = $default_identifier if (!defined($identifier));
+        $letter_id{$letter} = $identifier;
+        $is_symbol = $letter !~ /^[A-Za-z]/ if (!defined($is_symbol));
+
+        if ($is_symbol)
+        {
+          push @non_alpha, $result;
+        }
+        else
+        {
+          push @alpha, $result;
+        }
+      }
+    }
+    my $summary = &$index_summary(address@hidden, address@hidden);
+
+    # reset symbols numbering
+    $t2h_symbol_indices = 0;
+
+    my $letters_text = '';
+    foreach my $letter_entry (@{$split_group->{'letters'}})
+    {
+      my $letter = $letter_entry->{'letter'};
+      my $entries_text = '';
+      #foreach my $entry (@{$letter_entries{$letter}->{'entries'}})
+      foreach my $index_entry_ref (@{$letter_entry->{'entries'}})
+      {
+        #my $entry_infos = main::get_index_entry_infos($index_entry, 
$split_group->{'element'});
+        #my ($text_href, $entry, $element_href, $element_text, $entry_file, 
$element_file, $entry_target, $entry_element_target) = @$entry_infos;
+        my ($text_href, $entry_file, $element_file, $entry_target,
+          $entry_element_target, $formatted_entry, $element_href, 
$entry_element_text)
+          =  main::get_index_entry_infos($index_entry_ref, 
$split_group->{'element'});
+        $entries_text .= &$index_entry ($text_href, $formatted_entry, 
$element_href, $entry_element_text, $entry_file, $element_file, $entry_target, 
$entry_element_target);
+      }
+      $letters_text .= &$index_letter ($letter, $letter_id{$letter}, 
$entries_text)
+    }
+    my $index_text = &$print_index($letters_text, $index_name);
+    $split_group->{'text'} = $summary . $index_text . $summary;
+#    print STDERR "    ---> $index_name @{$split_group->{'letters'}}
+#     * elt:   $split_group->{'element'}->{'id'}, 
$split_group->{'element'}->{'file'}, $split_group->{'element'}->{'name'}
+#     * directions: B: $split_group->{'element'}->{'Back'}->{'name'}, F: 
$split_group->{'element'}->{'Forward'}->{'name'}, FB: 
$split_group->{'element'}->{'FastBack'}->{'name'}, FF: 
$split_group->{'element'}->{'FastForward'}->{'name'}
+#     * text
+#
+#$split_group->{'text'}
+#   
+#";
+  }
+  my $current_page = shift @split_letters;
+  if (!scalar(@split_letters))
+  {
+    return $current_page->{'text'};
+  }
+
+  while (1)
+  {
+    # print the index letters
+    push @{$Texi2HTML::THIS_SECTION}, $current_page->{'text'};
+
+    $current_page = shift @split_letters;
+    last if (!defined($current_page));
+
+    # end the previous element
+    main::finish_element ($Texi2HTML::THISDOC{'FH'}, $Texi2HTML::THIS_ELEMENT, 
$Texi2HTML::THIS_ELEMENT->{'Forward'}, 0);
+
+    # do the new element beginning
+    $Texi2HTML::THIS_ELEMENT = $current_page->{'element'};
+    main::do_element_directions($Texi2HTML::THIS_ELEMENT);
+    main::open_out_file($current_page->{'element'}->{'file'});
+    &$print_page_head($Texi2HTML::THISDOC{'FH'});
+    &$print_chapter_header($Texi2HTML::THISDOC{'FH'}, 
$Texi2HTML::THIS_ELEMENT) if $Texi2HTML::Config::SPLIT eq 'chapter';
+    &$print_section_header($Texi2HTML::THISDOC{'FH'}, 
$Texi2HTML::THIS_ELEMENT) if $Texi2HTML::Config::SPLIT eq 'section';
+
+    @{$Texi2HTML::THIS_SECTION} =  
&$element_label($Texi2HTML::THIS_ELEMENT->{'id'}, $Texi2HTML::THIS_ELEMENT, 
undef, undef);
+    push @{$Texi2HTML::THIS_SECTION}, &$print_element_header(1, 0);
+    push @{$Texi2HTML::THIS_SECTION}, &$heading($Texi2HTML::THIS_ELEMENT);
+  }
+  return '';
+}
 # leave this within comments, and keep the require statement
 # This way, you can directly run texi2html.pl, if 
 # $ENV{T2H_HOME}/texi2html.init exists.

Index: doc/texi2html.html
===================================================================
RCS file: /cvsroot/texi2html/texi2html/doc/texi2html.html,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -b -r1.99 -r1.100
--- doc/texi2html.html  4 Nov 2008 00:37:08 -0000       1.99
+++ doc/texi2html.html  8 Nov 2008 20:02:50 -0000       1.100
@@ -40,7 +40,7 @@
 permission notice may be stated in a translation approved
 by the Free Software Foundation.
  -->
-<!-- Created on November 4, 2008 by texi2html 1.79
+<!-- Created on November 8, 2008 by texi2html 1.79
 texi2html was written by: 
             Lionel Cons <address@hidden> (original author)
             Karl Berry  <address@hidden>
@@ -7718,7 +7718,7 @@
 </tr></table>
 <h1>About This Document</h1>
 <p>
-  This document was generated by <em>Patrice Dumas</em> on <em>November 4, 
2008</em> using <a href="http://www.nongnu.org/texi2html/";><em>texi2html 
1.79</em></a>.
+  This document was generated by <em>Patrice Dumas</em> on <em>November 8, 
2008</em> using <a href="http://www.nongnu.org/texi2html/";><em>texi2html 
1.79</em></a>.
 </p>
 <p>
   The buttons in the navigation panels have the following meaning:
@@ -7820,7 +7820,7 @@
 <hr size="1">
 <p>
  <font size="-1">
-  This document was generated by <em>Patrice Dumas</em> on <em>November 4, 
2008</em> using <a href="http://www.nongnu.org/texi2html/";><em>texi2html 
1.79</em></a>.
+  This document was generated by <em>Patrice Dumas</em> on <em>November 8, 
2008</em> using <a href="http://www.nongnu.org/texi2html/";><em>texi2html 
1.79</em></a>.
  </font>
  <br>
 

Index: examples/chm.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/chm.init,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- examples/chm.init   24 Sep 2008 23:39:19 -0000      1.15
+++ examples/chm.init   8 Nov 2008 20:02:50 -0000       1.16
@@ -1,6 +1,27 @@
 # -*-perl-*-
 
-#main::load_init_file('', 'noheaders.init');
+#+##############################################################################
+#
+# chm.init: convert to chm intermediate formats hhp, hhc, hhk and html files
+#
+#    Copyright (C) 2004-2008  Patrice Dumas <address@hidden>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+#    02110-1301  USA
+#
+#-##############################################################################
 
 #$SECTION_NAVIGATION = 0; # to avoid headers in normal elements
 $SHOW_MENU = 0;
@@ -212,22 +233,6 @@
 # htmlhelp 1.x isn't utf8 aware
 #   $Texi2HTML::THISDOC{'OUT_ENCODING'} = 'utf8';
 
-# there is a special treatment for @l and @L, as there is no 
-# entity, but they could be readble anyway
-#    if ($USE_UNICODE and defined($Texi2HTML::THISDOC{'OUT_ENCODING'}) and 
$Texi2HTML::THISDOC{'OUT_ENCODING'} ne '')
-#    {
-#         foreach my $thing ('l', 'L')
-#         {
-#              my $encoded_char = 
-#                
Encode::encode($Texi2HTML::THISDOC{'OUT_ENCODING'},chr(hex($unicode_map{$thing})),
 Encode::FB_QUIET);
-#              if ($encoded_char ne '')
-#              {
-#                  $things_map{$thing} = $encoded_char;
-#                  $pre_map{$thing} = $encoded_char;
-#                  $simple_format_texi_map{$thing} = $encoded_char;
-#              }
-#         }
-#    } 
     my $hhk_file = 
"$Texi2HTML::THISDOC{'destination_directory'}$Texi2HTML::THISDOC{'file_base_name'}"
 . ".hhk";
     open (IDXFILE, ">$hhk_file") or
         die "Can't open $hhk_file for writing: $!\n";
@@ -305,21 +310,6 @@
 {
     my $text = shift;
     return main::simple_format(undef,undef,$text);
-
-# the following doesn't work as html 1.x doesn't accept utf8
-    $::simple_map_texi_ref = \%chm_simple_map_texi;
-    $::style_map_texi_ref = \%chm_style_map_texi;
-    $::texi_map_ref = \%chm_texi_map;
-    my $normal_text_kept = $normal_text;
-    $Texi2HTML::Config::normal_text = \&t2h_utf8_normal_text;
-    
-    $text = main::remove_texi($text);
-
-    $normal_text = $normal_text_kept;
-    $::simple_map_texi_ref = \%simple_map_texi;
-    $::style_map_texi_ref = \%style_map_texi;
-    $::texi_map_ref = \%texi_map;
-    return &$protect_text($text);
 }
 
 

Index: examples/docbook.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/docbook.init,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- examples/docbook.init       3 Nov 2008 12:33:16 -0000       1.12
+++ examples/docbook.init       8 Nov 2008 20:02:50 -0000       1.13
@@ -1,3 +1,26 @@
+#+##############################################################################
+#
+# docbook.init: convert to docbook
+#
+#    Copyright (C) 2008  Patrice Dumas <address@hidden>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+#    02110-1301  USA
+#
+#-##############################################################################
+
 $EXTENSION = "xml";
 $DOCTYPE = '<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"; [
   <!ENTITY tex "TeX">

Index: examples/enable_encoding.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/enable_encoding.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- examples/enable_encoding.init       1 Sep 2008 14:48:28 -0000       1.2
+++ examples/enable_encoding.init       8 Nov 2008 20:02:50 -0000       1.3
@@ -1,4 +1,27 @@
 # -*-perl-*-
+#+##############################################################################
+#
+# enable_encoding.init: handle --enable-encoding
+#
+#    Copyright (C) 2008  Patrice Dumas <address@hidden>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+#    02110-1301  USA
+#
+#-##############################################################################
+
 
 # for debugging printouts
 #use Encode;

Index: examples/html32.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/html32.init,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- examples/html32.init        3 Nov 2008 12:33:16 -0000       1.20
+++ examples/html32.init        8 Nov 2008 20:02:51 -0000       1.21
@@ -1,4 +1,26 @@
 # -*-perl-*-
+#+##############################################################################
+#
+# html32.init: output HTML 3.2
+#
+#    Copyright (C) 2003-2008  Patrice Dumas <address@hidden>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+#    02110-1301  USA
+#
+#-##############################################################################
 # APA: Add SystemLiteral to identify the canonical DTD.
 # [Definition:] The SystemLiteral is called the entity's system
 # identifier. It is a URI, which may be used to retrieve the entity.

Index: examples/inlinestyle.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/inlinestyle.init,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- examples/inlinestyle.init   17 Mar 2008 23:23:46 -0000      1.5
+++ examples/inlinestyle.init   8 Nov 2008 20:02:51 -0000       1.6
@@ -1,3 +1,25 @@
+#+##############################################################################
+#
+# inlinestyle.init: style is inlined instead of being in a css file
+#
+#    Copyright (C) 2003-2008  Patrice Dumas <address@hidden>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+#    02110-1301  USA
+#
+#-##############################################################################
 
 $NO_BULLET_LIST_ATTRIBUTE = $NO_BULLET_LIST_ATTRIBUTE . " 
style=\"$NO_BULLET_LIST_STYLE\"";
 

Index: examples/makeinfo.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/makeinfo.init,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- examples/makeinfo.init      4 Nov 2008 00:37:08 -0000       1.24
+++ examples/makeinfo.init      8 Nov 2008 20:02:51 -0000       1.25
@@ -1,4 +1,27 @@
 # -*-perl-*-
+#+##############################################################################
+#
+# makeinfo.init: output html in the makeinfo style. Tend not to be up-to-date
+#
+#    Copyright (C) 2003-2008  Patrice Dumas <address@hidden>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+#    02110-1301  USA
+#
+#-##############################################################################
+
 $TOP_FILE = 'index.html';
 
 $SHOW_MENU = 1;

Index: examples/noheaders.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/noheaders.init,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- examples/noheaders.init     24 Sep 2008 23:39:19 -0000      1.12
+++ examples/noheaders.init     8 Nov 2008 20:02:51 -0000       1.13
@@ -1,4 +1,26 @@
 # -*-perl-*-
+#+##############################################################################
+#
+# noheaders.init: output html without headers. Obsoleted by --no-header
+#
+#    Copyright (C) 2003-2008  Patrice Dumas <address@hidden>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+#    02110-1301  USA
+#
+#-##############################################################################
 
 #$SPLIT = 'none';
 

Index: examples/roff.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/roff.init,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- examples/roff.init  1 Nov 2008 18:26:19 -0000       1.23
+++ examples/roff.init  8 Nov 2008 20:02:51 -0000       1.24
@@ -1,4 +1,26 @@
 # -*-perl-*-
+#+##############################################################################
+#
+# roff.init: convert to roff
+#
+#    Copyright (C) 2003-2008  Patrice Dumas <address@hidden>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+#    02110-1301  USA
+#
+#-##############################################################################
 
 main::load_init_file('', 'noheaders.init');
 

Index: examples/tex4ht.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/tex4ht.init,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- examples/tex4ht.init        1 Sep 2008 14:48:28 -0000       1.7
+++ examples/tex4ht.init        8 Nov 2008 20:02:51 -0000       1.8
@@ -1,5 +1,27 @@
 # -*-perl-*-
 
+#+##############################################################################
+#
+# tex4ht.init: use tex4ht to convert tex to html
+#
+#    Copyright (C) 2005-2008  Patrice Dumas <address@hidden>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+#    02110-1301  USA
+#
+#-##############################################################################
 # To customize the command and the options, you could set
 # $Texi2HTML::TeX4HT::STYLE_MATH to latex/tex
 # $Texi2HTML::TeX4HT::STYLE_TEX to latex/texi

Index: examples/utf8.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/utf8.init,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- examples/utf8.init  18 Aug 2008 18:01:50 -0000      1.5
+++ examples/utf8.init  8 Nov 2008 20:02:51 -0000       1.6
@@ -1,4 +1,26 @@
 # -*-perl-*-
+#+##############################################################################
+#
+# utf8.init: convert accented letters to utf8
+#
+#    Copyright (C) 2003-2008  Patrice Dumas <address@hidden>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+#    02110-1301  USA
+#
+#-##############################################################################
 $USE_ISO = 0;
 $ENCODING_NAME = 'utf-8';
 

Index: examples/xhtml.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/xhtml.init,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- examples/xhtml.init 24 Feb 2004 01:55:25 -0000      1.5
+++ examples/xhtml.init 8 Nov 2008 20:02:51 -0000       1.6
@@ -1,5 +1,26 @@
 # -*-perl-*-
-
+#+##############################################################################
+#
+# xhtml.init: convert to well-formed xhtml transitional
+#
+#    Copyright (C) 2003-2008  Patrice Dumas <address@hidden>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+#    02110-1301  USA
+#
+#-##############################################################################
 # APA: Add SystemLiteral to identify the canonical DTD.
 # [Definition:] The SystemLiteral is called the entity's system
 # identifier. It is a URI, which may be used to retrieve the entity.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]