texi2html-cvs
[Top][All Lists]
Advanced

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

[Texi2html-cvs] texi2html ChangeLog Makefile.am Makefile.in NEW...


From: Patrice Dumas
Subject: [Texi2html-cvs] texi2html ChangeLog Makefile.am Makefile.in NEW...
Date: Sun, 24 May 2009 22:29:11 +0000

CVSROOT:        /cvsroot/texi2html
Module name:    texi2html
Changes by:     Patrice Dumas <pertusus>        09/05/24 22:29:11

Modified files:
        .              : ChangeLog Makefile.am Makefile.in NEWS TODO 
                         texi2html.init texi2html.pl 
        doc            : texi2html.texi 
        examples       : book.init makeinfo.init xhtml.init 
        formats        : docbook.init html.init info.init xml.init 
        test           : run_test.sh 
Added files:
        test           : run_test_all.sh 
        test/encodings/res/accentenc_encoding_use_entity: accentenc.2 
                                                          accentenc.html 

Log message:
               * texi2html.pl, texi2html.init, formats/*: add an array for the
                format specific expansion T2H_FORMAT_EXPAND to separate from 
the 
                expansion information from the command-line.
                Reset defaults for the customization variables each time a 
format
                is loaded with t2h_default_set_variables_default and
                t2h_default_set_variables_xml.
                Default for the customization variables are the makeinfo 
defaults,
                except when called as texi2html and output is html, in that case
                a function is used t2h_default_set_variables_texi2html.
                replace $TRANSLITERATE_NODE by $TRANSLITERATE_FILE_NAMES.
                replace $SECTION_NAVIGATION by $HEADERS.
                rename ascii_* by default_*.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texi2html/ChangeLog?cvsroot=texi2html&r1=1.387&r2=1.388
http://cvs.savannah.gnu.org/viewcvs/texi2html/Makefile.am?cvsroot=texi2html&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/texi2html/Makefile.in?cvsroot=texi2html&r1=1.69&r2=1.70
http://cvs.savannah.gnu.org/viewcvs/texi2html/NEWS?cvsroot=texi2html&r1=1.99&r2=1.100
http://cvs.savannah.gnu.org/viewcvs/texi2html/TODO?cvsroot=texi2html&r1=1.99&r2=1.100
http://cvs.savannah.gnu.org/viewcvs/texi2html/texi2html.init?cvsroot=texi2html&r1=1.199&r2=1.200
http://cvs.savannah.gnu.org/viewcvs/texi2html/texi2html.pl?cvsroot=texi2html&r1=1.289&r2=1.290
http://cvs.savannah.gnu.org/viewcvs/texi2html/doc/texi2html.texi?cvsroot=texi2html&r1=1.89&r2=1.90
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/book.init?cvsroot=texi2html&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/makeinfo.init?cvsroot=texi2html&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/xhtml.init?cvsroot=texi2html&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/texi2html/formats/docbook.init?cvsroot=texi2html&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texi2html/formats/html.init?cvsroot=texi2html&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texi2html/formats/info.init?cvsroot=texi2html&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texi2html/formats/xml.init?cvsroot=texi2html&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/run_test.sh?cvsroot=texi2html&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/run_test_all.sh?cvsroot=texi2html&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/encodings/res/accentenc_encoding_use_entity/accentenc.2?cvsroot=texi2html&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/encodings/res/accentenc_encoding_use_entity/accentenc.html?cvsroot=texi2html&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/texi2html/texi2html/ChangeLog,v
retrieving revision 1.387
retrieving revision 1.388
diff -u -b -r1.387 -r1.388
--- ChangeLog   23 May 2009 17:09:38 -0000      1.387
+++ ChangeLog   24 May 2009 22:29:08 -0000      1.388
@@ -1,3 +1,20 @@
+2009-05-24   Patrice Dumas  <address@hidden>
+
+       * texi2html.pl, texi2html.init, formats/*: add an array for the 
+       format specific expansion T2H_FORMAT_EXPAND to separate from the 
+       expansion information from the command-line.
+       Reset defaults for the customization variables each time a format
+       is loaded with t2h_default_set_variables_default and 
+       t2h_default_set_variables_xml.
+       Default for the customization variables are the makeinfo defaults,
+       except when called as texi2html and output is html, in that case
+       a function is used t2h_default_set_variables_texi2html.
+       replace $TRANSLITERATE_NODE by $TRANSLITERATE_FILE_NAMES.
+       replace $SECTION_NAVIGATION by $HEADERS.
+       rename ascii_* by default_*.
+       * test/*, test/macros/res_*/: test for texi2html called as 
+       makeinfo or texi2all.
+
 2009-05-23   Patrice Dumas  <address@hidden>
 
        * texi2html.pl, texi2html.init, formats/*: remove html formatting

Index: Makefile.am
===================================================================
RCS file: /cvsroot/texi2html/texi2html/Makefile.am,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- Makefile.am 23 May 2009 17:09:38 -0000      1.48
+++ Makefile.am 24 May 2009 22:29:09 -0000      1.49
@@ -149,10 +149,10 @@
 #          -e "/@T2H_I18N@/r $(srcdir)/T2h_i18n.pm" \
 #          -e "/@T2H_L2H@/r $(srcdir)/T2h_l2h.pm" $< >$@
 #      chmod a+x $@
-texi2html.interm: $(texi2html_sources)
+texi2html.temp: $(texi2html_sources)
        $(SHELL) $(srcdir)/buildt2h.sh $@ $^
 
-texi2html: texi2html.interm $(texi2html_formats)
+texi2html: texi2html.temp $(texi2html_formats)
        $(SHELL) $(srcdir)/addformats.sh $@ $^
        chmod a+x $@
 
@@ -179,4 +179,4 @@
 html-local: texi2html
 
 clean-local:
-       -rm -f texi2html texi2html.interm
+       -rm -f texi2html texi2html.temp

Index: Makefile.in
===================================================================
RCS file: /cvsroot/texi2html/texi2html/Makefile.in,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- Makefile.in 23 May 2009 17:09:38 -0000      1.69
+++ Makefile.in 24 May 2009 22:29:09 -0000      1.70
@@ -830,10 +830,10 @@
 #          -e "/@T2H_I18N@/r $(srcdir)/T2h_i18n.pm" \
 #          -e "/@T2H_L2H@/r $(srcdir)/T2h_l2h.pm" $< >$@
 #      chmod a+x $@
-texi2html.interm: $(texi2html_sources)
+texi2html.temp: $(texi2html_sources)
        $(SHELL) $(srcdir)/buildt2h.sh $@ $^
 
-texi2html: texi2html.interm $(texi2html_formats)
+texi2html: texi2html.temp $(texi2html_formats)
        $(SHELL) $(srcdir)/addformats.sh $@ $^
        chmod a+x $@
 
@@ -860,7 +860,7 @@
 html-local: texi2html
 
 clean-local:
-       -rm -f texi2html texi2html.interm
+       -rm -f texi2html texi2html.temp
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:

Index: NEWS
===================================================================
RCS file: /cvsroot/texi2html/texi2html/NEWS,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -b -r1.99 -r1.100
--- NEWS        22 May 2009 18:50:27 -0000      1.99
+++ NEWS        24 May 2009 22:29:09 -0000      1.100
@@ -45,6 +45,10 @@
 
 * replace $DO_CONTENTS by $CONTENTS and $DO_SCONTENTS by $SHORTCONTENTS.
 
+* replace $TRANSLITERATE_NODE by $TRANSLITERATE_FILE_NAMES.
+
+* replace $SECTION_NAVIGATION by $HEADERS.
+
 1.82 (2009-01-05)
 
 * NEW FEATURES

Index: TODO
===================================================================
RCS file: /cvsroot/texi2html/texi2html/TODO,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -b -r1.99 -r1.100
--- TODO        21 May 2009 20:15:55 -0000      1.99
+++ TODO        24 May 2009 22:29:09 -0000      1.100
@@ -400,3 +400,39 @@
 
      docbook  html  info  plaintext  xml
 
+
+Defaults (d = docbook, h = html(texi2html), i = info, x = xml, m = 
makeinfo.ini)
+Valid on 2009-05-23, before this was ameliorated, by introducing 
+t2h_default_set_variables_default and t2h_default_set_variables_texi2html.
+
+CAPTION_STYLE                                        i asis              
+DEFAULT_ENCODING                                     ascii
+DOCYTPE                          d c        h c                x c      
+ENABLE_ENCODING                                       i 1
+ENABLE_ENCODING_USE_ENTITY                  h 1       i 0
+EXTENSION                       d xml     h html     i info   x xml
+FOOTNOTESTYLE                              h sep     i end              m end
+INLINE_CONTENTS                                       i 1                m 1
+INLINE_INSERTCOPYING             d 1                  i 1
+MENU_SYMBOL                               h &bull;    i *                m *
+NODE_FILE_EXTENSION                       h html                         
+NODE_NAME_IN_MENU                                                        m 1
+NUMBER_SECTIONS                             h 1                          m 1
+OVERVIEW_LINK_TO_TOC                        h 0                          m 1
+SECTION_NAVIGATION               d 0        h 1                x 0       m 1
+SEPARATE_DESCRIPTION                        h 0                x 1
+SHORT_REF                                                                m 1
+SHOW_MENU                        d 0        h 1       i 1      x 1       m 1
+SIMPLE_MENU                                 h 0       i 1
+TOP_FILE                                                              
index.html
+USE_ACCESSKEY                               h 0                          m 1
+USE_ISO                          d 1        h 1       i 0      x 0    
+USE_LINKS                                   h 0                          m 1
+USE_MENU_DIRECTIONS              d 0        h 1       i 0      x 0
+USE_NODES                                 h undef     i 1      x 1       m 1
+USE_NUMERIC_ENTITY               d 0        h 1                x 0
+USE_REL_REV                                 h 0                          m 1
+USE_SECTIONS                                h 1       i 0                
+USE_SETFILENAME                  d 1                  i 1      x 1       m 1
+USE_SETFILENAME_EXTENSION        d 0                  i 1
+USE_UP_FOR_ADJACENT_NODES        d 0        h 1       i 0      x 0

Index: texi2html.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/texi2html.init,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -b -r1.199 -r1.200
--- texi2html.init      23 May 2009 17:09:38 -0000      1.199
+++ texi2html.init      24 May 2009 22:29:09 -0000      1.200
@@ -12,7 +12,7 @@
 # Afterwards, load the file with command-line 
 # option -init-file <your_init_file>
 #
-# $Id: texi2html.init,v 1.199 2009/05/23 17:09:38 pertusus Exp $
+# $Id: texi2html.init,v 1.200 2009/05/24 22:29:09 pertusus Exp $
 
 ######################################################################
 # The following variables can also be set by command-line options
@@ -58,7 +58,7 @@
 # -separated-footnotes
 # if this is set footnotes are on a separated page. Otherwise they are at
 # the end of each file (if the document is split).
-$FOOTNOTESTYLE = 'separate';
+$FOOTNOTESTYLE = 'end';
 
 # -fill-column
 $FILLCOLUMN = 72;
@@ -79,7 +79,8 @@
 # This is most useful if you do not want to have section navigation
 # with -split chapter. There will be chapter navigation panel at the 
 # beginning and at the end of chapters anyway.
-$SECTION_NAVIGATION = 1;
+# this is mostly not used in the default case, important for html.
+$HEADERS = 0;
 
 # -o filename
 # If this is set a monolithic document is outputted into $filename.
@@ -111,7 +112,7 @@
 
 # -transliterate-file-names 
 # transliterate node names for external refs (and internal if NODE_FILES)
-$TRANSLITERATE_NODE = 1;
+$TRANSLITERATE_FILE_NAMES = 1;
 
 # --error-limit
 # quit after NUM errors (default 1000).
@@ -169,7 +170,7 @@
 
 # -expand
 # the @EXPAND array contains the expanded section names.
address@hidden = ('plaintext');
address@hidden = ();
 
 # -invisible
 # This seems obsolete and is not used anywhere.
@@ -244,8 +245,8 @@
 $PREFIX = '';
 
 # -short-ref
-# if this is set cross-references are given without section numbers.
-$SHORT_REF = '';
+# if this is set cross-references are given without section.
+$SHORT_REF = 0;
 
 # -idx-sum
 # if value is set, then for each @printindex <index name>
@@ -317,40 +318,24 @@
 
 $FIRSTPARAGRAPHINDENT = 'none';
 
address@hidden = ('plaintext');
+
 # If true do table of contents even if there is no @content
 $CONTENTS = undef;
 
 # If true do short table of contents even if there is no @shortcontent
 $SHORTCONTENTS = undef;
 
-# if set, output the contents where the command is located
-$INLINE_CONTENTS = 0;
-
-# if this variable is true, numeric entities are used when there is no
-# corresponding textual entity.
-$USE_NUMERIC_ENTITY = 1;
-
 # if set, the image files are completed to be relative from the
 # document directory, to the source manual directory and then to
 # the image
 $COMPLETE_IMAGE_PATHS = 0;
 
-# if this variable is true, @setfilename is used if found to determine the
-# out file name
-$USE_SETFILENAME = 0;
-
 # if true, begin outputting at @setfilename, if this command is present.
 $IGNORE_BEFORE_SETFILENAME = 1;
 
 # if true the link in Overview link to the corresponding Toc entry.
-$OVERVIEW_LINK_TO_TOC = 0;
-
-# if set always separate description and menu link, even in 
-# preformatted environment
-$SEPARATE_DESCRIPTION = 0;
-
-# if set, then use node names in menu entries, instead of section names
-$NODE_NAME_IN_MENU = 0;
+$OVERVIEW_LINK_TO_TOC = 1;
 
 # if set, use node anchors for sections targets
 $USE_NODE_TARGET = 1;
@@ -359,15 +344,7 @@
 $NEW_CROSSREF_STYLE = 1;
 
 # top heading is always at the beginning of the element.
-$TOP_HEADING_AT_BEGINNING = 1;
-
-# if set and menu entry equals menu description, then do not print 
-# menu description.
-# Likewise, if node name equals entry name, do not print entry name.
-$AVOID_MENU_REDUNDANCY = 1;
-
-# if true, use the original command if the result is an entity
-$ENABLE_ENCODING_USE_ENTITY = 1;
+$TOP_HEADING_AT_BEGINNING = 0;
 
 # if set, center @image by default
 # otherwise, do not center by default
@@ -399,22 +376,11 @@
 # use first chapter with @printindex
 $INDEX_CHAPTER = '';
 
-# if set and $SPLIT is set, then split index pages at the next letter
-# after they have more than that many entries
-$SPLIT_INDEX = 0;
-
-# symbol put at the beginning of nodes entry in menu (and optionnaly of 
-# unnumbered in menus, see next variable)
-$MENU_SYMBOL = '*';
-#$MENU_SYMBOL = '*';
-
 $SIMPLE_MENU = 1;
 
 $OPEN_QUOTE_SYMBOL = "\`";
 $CLOSE_QUOTE_SYMBOL = "'";
 
-$CAPTION_STYLE = 'strong';
-
 # if true put a $MENU_SYMBOL before unnumbered in menus
 $UNNUMBERED_SYMBOL_IN_MENU = 0;
 
@@ -490,20 +456,165 @@
 # html version for latex2html
 $L2H_HTML_VERSION = "4.0";
 
+# use icons.
+$ICONS = 0;
+
+sub t2h_default_set_variables_default()
+{
+  $CAPTION_STYLE = 'strong';
+
+# if this variable is true, @setfilename is used if found to determine the
+# out file name
+  $USE_SETFILENAME = 1;
+
+# if true, use the filename and extension from setfilename. For Info.
+  $USE_SETFILENAME_EXTENSION = 0;
+
+# FIXME is this right?
+# default used in init_out for the setting of the ENCODING_NAME variable
+  $DEFAULT_ENCODING = 'utf8';
+
+# if set and menu entry equals menu description, then do not print 
+# menu description.
+# Likewise, if node name equals entry name, do not print entry name.
+  $AVOID_MENU_REDUNDANCY = 0;
+
+# if true, use the original command if the result is an entity
+  $ENABLE_ENCODING_USE_ENTITY = 0;
+
+# if set, output the contents where the command is located
+  $INLINE_CONTENTS = 1;
+
+# symbol put at the beginning of nodes entry in menu (and optionnaly of 
+# unnumbered in menus, see UNNUMBERED_SYMBOL_IN_MENU variable)
+  $MENU_SYMBOL = '*';
+
+# if set, then use node names in menu entries, instead of section names
+  $NODE_NAME_IN_MENU = 1;
+
+# if set always separate description and menu link, even in 
+# preformatted environment
+  $SEPARATE_DESCRIPTION = 0;
+
 # use the information given by menus to complete the node directions
-$USE_MENU_DIRECTIONS = 1;
+  $USE_MENU_DIRECTIONS = 0;
 
 # try up sections to complete the node directions
-$USE_UP_FOR_ADJACENT_NODES = 1;
+  $USE_UP_FOR_ADJACENT_NODES = 0;
 
 # use accesskey in hrefs
-$USE_ACCESSKEY = 0;
+  $USE_ACCESSKEY = 1;
 
 # use rel= and rev= in hrefs. Currently only rel is used
-$USE_REL_REV = 0;
+  $USE_REL_REV = 1;
 
 # generate <link> elements in head
-$USE_LINKS = 0;
+  $USE_LINKS = 1;
+
+# if this variable is true, numeric entities are used when there is no
+# corresponding textual entity.
+  $USE_NUMERIC_ENTITY = 0;
+
+# if set and $SPLIT is set, then split index pages at the next letter
+# after they have more than that many entries
+  $SPLIT_INDEX = 0;
+
+  $FOOTNOTESTYLE = 'end';
+
+  $DOCTYPE = '';
+
+  $USE_ISO = 0;
+
+  $NUMBER_SECTIONS = 1;
+  
+  $TOP_FILE = '';
+
+  $USE_NODES = 1;
+
+  $USE_SECTIONS = 1;
+
+# these are more or less the documented vanilla versions, so they
+# are reset
+$unknown                  = \&t2h_default_unknown;
+$unknown_style            = \&t2h_default_unknown_style;
+$external_ref      = \&t2h_default_external_ref;
+$internal_ref      = \&t2h_default_internal_ref;
+$tab_item_texi              = \&t2h_default_tab_item_texi;
+$complex_format    = \&t2h_default_complex_format;
+# reset in docbook and info.
+$style                    = \&T2H_GPL_style;
+$format                   = \&T2H_GPL_format;
+# reset in html and xml
+$caption_shortcaption     = \&t2h_default_caption_shortcaption;
+$caption_shortcaption_command  = \&t2h_default_caption_shortcaption_command;
+# reset in docbook and xml. Not really vanilla, but documented.
+$printindex        = \&t2h_GPL_default_printindex;
+# reset by xml and html
+$misc_element_label         = \&t2h_default_misc_element_label;
+# set in html
+$init_out    = \&t2h_default_init_out;
+
+# in info
+$footnote_texi = undef;
+$begin_paragraph_texi = undef;
+$begin_style_texi = undef;
+$begin_special_region = undef;
+$end_special_region = undef;
+$empty_preformatted = undef;
+
+%line_command_map = (
+       'title'    => '',
+       'subtitle' => '',
+       'author'   => '',
+);
+
+%format_in_paragraph = (
+);
+# map mapping css specification to style
+
+%css_map = 
+     (
+     );
+
+}
+
+t2h_default_set_variables_default();
+
+sub t2h_default_set_variables_xml()
+{
+  t2h_default_set_variables_default();
+  $ENABLE_ENCODING_USE_ENTITY = 1;
+  $EXTENSION = 'xml';
+  $USE_ISO = 1;
+
+  $empty_line = \&t2h_default_empty_line;
+  $comment = \&xml_default_comment;
+}
+
+sub t2h_default_set_variables_texi2html()
+{
+  $USE_SETFILENAME = 0;
+  $USE_SETFILENAME_EXTENSION = 0;
+  $FOOTNOTESTYLE = 'separate';
+  $INLINE_CONTENTS = 0;
+  $AVOID_MENU_REDUNDANCY = 1;
+  $TOP_HEADING_AT_BEGINNING = 1;
+  $TOP_FILE = '';
+  $USE_ACCESSKEY = 0;
+  $NODE_NAME_IN_MENU = 0;
+  $OVERVIEW_LINK_TO_TOC = 0;
+  $USE_MENU_DIRECTIONS = 1;
+  $USE_UP_FOR_ADJACENT_NODES = 1;
+  $USE_ACCESSKEY = 0;
+  $USE_REL_REV = 0;
+  $USE_LINKS = 0;
+  $USE_NODES = undef;
+  $USE_NUMERIC_ENTITY = 1;
+  $SPLIT_INDEX = 100;
+
+  $ENABLE_ENCODING_USE_ENTITY = 1;
+  $USE_ISO = 1;
+}
 
 # specify in this array which "buttons" should appear in which order
 # in the navigation panel for sections; use ' ' for empty buttons (space)
@@ -518,7 +629,7 @@
 @MISC_BUTTONS = ('Top', 'Contents', 'Index', 'About');
 
 # buttons for chapter file footers
-# (and headers but only if SECTION_NAVIGATION is false)
+# (and headers but only if HEADERS is false)
 @CHAPTER_BUTTONS =
     (
      'FastBack', 'FastForward', ' ',
@@ -545,7 +656,6 @@
       'Top', 'Index', 'Contents', 'About', 'Up', 'NextFile', 'PrevFile'
     );
 
-$ICONS = 0;
 
 # insert here name of icon images for buttons
 # Icons are used, if $ICONS and resp. value are set
@@ -622,7 +732,6 @@
   $null_device_file{'NUL'} = 1;
 }
 
-$init_out    = \&t2h_default_init_out;
 $finish_out    = \&t2h_default_finish_out;
 $translate_names = \&t2h_default_translate_names;
 
@@ -935,9 +1044,6 @@
 #
 #######################################################################
 
-# default used in init_out for the setting of the ENCODING_NAME variable
-$DEFAULT_ENCODING = 'utf8';
-
 # In file encoding. The @documentencoding allows autodetection of 
 # that variable.
 $DOCUMENT_ENCODING = undef;
@@ -1070,6 +1176,7 @@
 $node_file_name            = \&T2H_DEFAULT_node_file_name;
 $inline_contents           = \&T2H_DEFAULT_inline_contents;
 $program_string            = \&T2H_DEFAULT_program_string;
+$element_file_name         = \&t2h_default_element_file_name;
  
 ########################################################################
 # Layout for html for every sections
@@ -1157,7 +1264,7 @@
 {
     # if there is no section navigation and it is not split, the 
     # navigation information is useless
-    return &$print_misc(@_) if (get_conf('SPLIT') or $SECTION_NAVIGATION);
+    return &$print_misc(@_) if (get_conf('SPLIT') or get_conf('headers'));
 }
 
 sub T2H_DEFAULT_print_misc_header
@@ -1414,7 +1521,7 @@
       $level = 1 if ($level < 1);
       my $text =  $element->{'name'};
       $text = $element->{'text'} if ($NUMBER_SECTIONS);
-      my $result =  (' ' x ($level - 1)) . $text;
+      my $result =  (' ' x ($level - 1)) . $text ."\n";
       push @{$Texi2HTML::TOC_LINES}, $result if (get_conf('contents'));
       push @{$Texi2HTML::OVERVIEW}, $result if (get_conf('shortcontents') and 
$level == 1);
    }
@@ -1599,7 +1706,7 @@
     }
     elsif ($NEW_CROSSREF_STYLE)
     {
-        if ($TRANSLITERATE_NODE)
+        if ($TRANSLITERATE_FILE_NAMES)
         {
             $node_file_base = $node->{'cross_manual_file'};
         }
@@ -1665,7 +1772,7 @@
 
 #
 # ascii representation of texinfo "simple things" @-commands
-%ascii_simple_map = (
+%default_simple_map = (
            '*', "\n",
            ' ', ' ',
            "\t", ' ',
@@ -1683,14 +1790,14 @@
 );
 
 # texinfo "simple things" @-commands
-%simple_map = %ascii_simple_map;
+%simple_map = %default_simple_map;
 
 # this map is used in preformatted text
 %simple_map_pre = %simple_map;
 
 # This map is used when texi elements are removed and replaced 
 # by simple text
-%simple_map_texi = %ascii_simple_map;
+%simple_map_texi = %default_simple_map;
 
 # maps for the math specific commands
 %simple_map_math = (
@@ -1711,7 +1818,7 @@
 $after_punctuation_characters = '"\')]';
 
 
-%ascii_things_map = (
+%default_things_map = (
                'TeX'          => 'TeX',
                'LaTeX'          => 'LaTeX',
                'bullet'       => '*',
@@ -1770,7 +1877,7 @@
                'guilsinglright'          => '>',
 );
 
-%things_map = %ascii_things_map;
+%things_map = %default_things_map;
 
 # This map is used in preformatted environments
 %pre_map = %things_map;
@@ -1778,7 +1885,7 @@
 # text replacing macros when texi commands are removed and plain text is 
 # produced.
 # Also used for index sorting.
-%texi_map = %ascii_things_map;
+%texi_map = %default_things_map;
 
 foreach my $accent_letter ('o','O','l','L')
 {
@@ -1787,6 +1894,7 @@
 $texi_map{'copyright'} = 'C';
 $texi_map{'registeredsymbol'} = 'R';
 
+%default_texi_map = %texi_map;
 
 # taken from
 #Latin extended additionnal
@@ -2614,6 +2722,29 @@
       'w',          '',
      );
 
+sub t2h_default_copy_style_map ($$;$)
+{
+  my $from = shift;
+  my $to = shift;
+  my $merge = shift;
+
+  foreach my $command (keys(%$from))
+  {
+     foreach my $key (keys(%{$from->{$command}}))
+     {
+        next if (exists($to->{$command}->{$key}) and $merge);
+        if ($key eq 'args')
+        {
+           $to->{$command}->{$key} = [ @{$from->{$command}->{$key}} ];
+        }
+        else
+        {
+           $to->{$command}->{$key} = $from->{$command}->{$key};
+        }
+     }
+  }
+}
+
 # default is {'args' => ['normal'], 'attribute' => ''},   
 %style_map = (
       'asis',       {},
@@ -2678,11 +2809,6 @@
    }
 }
 
-%line_command_map = (
-       'title'    => '',
-       'subtitle' => '',
-       'author'   => '',
-);
 
 %unicode_diacritical = (
        'H'          => '030B', 
@@ -3040,6 +3166,14 @@
     },
 );
 
+foreach my $accent_command ('tieaccent', 'dotless', keys(%unicode_accents))
+{
+     $style_map{$accent_command} = { 'function' => \&t2h_default_accent };
+     $old_style_map{$accent_command} = '&default_accent';
+     $style_map_texi{$accent_command} = { 'function' => \&t2h_default_accent };
+}
+
+
 %transliterate_accent_map = ();
 foreach my $command (keys(%unicode_accents))
 {
@@ -3064,13 +3198,6 @@
 #      'ogonek'     => 'aeiuAEIU',
 );
 
-foreach my $accent_command ('tieaccent', 'dotless', keys(%unicode_accents))
-{
-     $style_map{$accent_command} = { 'function' => \&t2h_default_accent };
-     $old_style_map{$accent_command} = '&default_accent';
-     $style_map_texi{$accent_command} = { 'function' => 
\&t2h_default_ascii_accent };
-}
-
 sub default_accent($$)
 {
     my $text = shift;
@@ -3115,6 +3242,34 @@
     return $text . $accent if (defined($accent_map{$accent}));
 }
 
+sub xml_default_accent($$)
+{
+    my $accent = shift;
+    my $args = shift;
+
+    my $text = $args->[0];
+
+    return "&${text}$accent_map{$accent};" if (defined($accent_map{$accent}) 
and defined($special_accents{$accent}) and ($text =~ 
/^[$special_accents{$accent}]$/));
+    return '&' . $text . 'ring;' if (($accent eq 'ringaccent') and 
(defined($special_accents{$accent})) and ($text =~ 
/^[$special_accents{$accent}]$/));
+    return $text . '&lt;' if ($accent eq 'v');
+# FIXME here there could be a conversion to the character in the right 
+# encoding, like 
+#    if ($USE_UNICODE and defined($OUT_ENCODING) and $OUT_ENCODING ne '' 
+#        and exists($unicode_accents{$accent}) and  
exists($unicode_accents{$accent}->{$text}))
+#    {
+#          my $encoded_char =  Encode::encode($OUT_ENCODING, 
chr(hex($unicode_map{$thing})), Encode::FB_QUIET);
+#          return $encoded_char if ($encoded_char ne '');
+#    }
+    if ($USE_NUMERIC_ENTITY)
+    {
+        if (exists($unicode_accents{$accent}) and 
exists($unicode_accents{$accent}->{$text}))
+        {
+             return ('&#' . hex($unicode_accents{$accent}->{$text}) . ';');
+        }
+    }
+    return ascii_accents($text, $accent);
+}
+
 # used to utf8 encode the result
 sub t2h_utf8_accent($$$)
 {
@@ -3505,15 +3660,6 @@
     }
 }
 
-sub t2h_default_ascii_accent($$$$)
-{
-    my $accent = shift;
-    my $args = shift;
-
-    my $text = $args->[0];
-    return ascii_accents($text, $accent);
-}
-
 sub t2h_default_no_texi_email
 {
     my $command = shift;
@@ -3656,6 +3802,25 @@
     $simple_format_style_map_texi{$accent_command}->{'function'} = 
\&t2h_default_accent;
 }
 
+foreach my $hash (\%style_map, \%style_map_pre, \%style_map_texi, 
\%simple_format_style_map_texi)
+{
+  foreach my $style (keys(%{$hash}))
+  {
+    $hash->{$style}->{'args'} = ['normal'] if 
(!exists($hash->{$style}->{'args'}));
+  } 
+}
+
+%default_style_map = ();
+%default_style_map_pre = ();
+%default_style_map_texi = ();
+%default_simple_format_style_map_texi = ();
+
+t2h_default_copy_style_map(\%style_map, \%default_style_map);
+t2h_default_copy_style_map(\%style_map_pre, \%default_style_map_pre);
+t2h_default_copy_style_map(\%style_map_texi, \%default_style_map_texi);
+t2h_default_copy_style_map(\%simple_format_style_map_texi, 
\%default_simple_format_style_map_texi);
+
+
 # regions expanded or not depending on the value of this hash.
 # @EXPAND sets entries in this hash, and you should better use
 # @EXPAND unless you know what you are doing.
@@ -4002,14 +4167,6 @@
         'filbreak', 1,
      );
 
-%format_in_paragraph = (
-);
-# map mapping css specification to style
-
-%css_map = 
-     (
-     );
-
 # The command_handler arrays are for commands formatted externally.
 # The function references in @command_handler_init are called
 # before the second pass, before the @-commands text collection.
@@ -4039,9 +4196,6 @@
 #$menu_comment      = \&t2h_default_menu_comment;
 $menu_description  = \&t2h_default_menu_description;
 #$simple_menu_link  = \&t2h_default_simple_menu_link;
-$external_ref      = \&t2h_default_external_ref;
-$external_href     = \&t2h_default_external_href;
-$internal_ref      = \&t2h_default_internal_ref;
 $table_item        = \&t2h_default_table_item;
 $table_line        = \&t2h_default_table_line;
 $table_list        = \&t2h_default_table_list;
@@ -4056,6 +4210,7 @@
 $heading           = \&t2h_default_heading;
 $element_heading   = \&t2h_default_element_heading;
 $heading_no_texi   = \&t2h_default_heading_no_texi;
+$external_href     = \&t2h_default_external_href;
 $paragraph         = \&t2h_default_paragraph;
 $preformatted      = \&t2h_default_preformatted;
 $foot_line_and_ref = \&t2h_default_foot_line_and_ref;
@@ -4065,7 +4220,7 @@
 $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;
@@ -4073,7 +4228,6 @@
 $print_index       = \&t2h_default_print_index;
 $protect_text      = \&t2h_default_protect_text;
 $normal_text       = \&t2h_default_normal_text;
-$complex_format    = \&t2h_default_complex_format;
 $cartouche         = \&t2h_default_cartouche;
 $sp                = \&t2h_default_sp;
 $definition_category      = \&t2h_default_definition_category;
@@ -4084,10 +4238,6 @@
 $index_summary_file_end   = \&t2h_default_index_summary_file_end;
 $index_summary_file_begin = \&t2h_default_index_summary_file_begin;
 $empty_line               = \&t2h_default_empty_line;
-$unknown                  = \&t2h_default_unknown;
-$unknown_style            = \&t2h_default_unknown_style;
-$caption_shortcaption     = \&t2h_default_caption_shortcaption;
-$caption_shortcaption_command  = \&t2h_default_caption_shortcaption_command;
 $float                     = \&t2h_default_float;
 $listoffloats             = \&t2h_default_listoffloats;
 $listoffloats_entry       = \&t2h_default_listoffloats_entry;
@@ -4101,12 +4251,10 @@
 $heading_texi             = \&t2h_default_heading_texi;
 $index_element_heading_texi = \&t2h_default_index_element_heading_texi;
 $element_label              = \&t2h_default_element_label;
-$misc_element_label         = \&t2h_default_misc_element_label;
 $anchor_label               = \&t2h_default_anchor_label;
 $preserve_misc_command      = \&t2h_default_preserve_misc_command;
 $format_list_item_texi      = \&t2h_default_format_list_item_texi;
 $begin_format_texi          = \&t2h_default_begin_format_texi;
-$tab_item_texi              = \&t2h_default_tab_item_texi;
 $insertcopying              = \&t2h_default_insertcopying;
 $colon_command              = \&t2h_default_colon_command;
 $simple_command             = \&t2h_default_simple_command;
@@ -4677,6 +4825,20 @@
     }
 }
 
+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;
+
+   return '';
+}
+
+
 # format the container for the @deffn line and text
 # 
 # argument
@@ -5247,6 +5409,14 @@
     return '';
 }
 
+# an xml comment
+sub xml_default_comment($)
+{
+    my $text = shift;
+    $text =~ s/--+/-/go;
+    return '<!-- ' . $text . ' -->' . "\n";
+}
+
 sub t2h_collect_styles($)
 {
     my $cmd_stack = shift;
@@ -5442,20 +5612,28 @@
     my $one_section = shift;
     my $element_heading = shift;
 
+    my $level = $element->{'level'};
     if ($element->{'node'})
     {
-        return '';
+        if ($element->{'text'} =~ /^top$/i)
+        {
+          $level = 0;
+        }
+        else
+        {
+          $level = 3;
+        }
     }
     my $text = "$element->{'text'}";
     # to do the same than makeinfo a trailing dot in section number is removed
     $text =~ s/^(\w+)\. /$1 /;
     # when @top is empty, use settitle
     $text = $Texi2HTML::THISDOC{'settitle'} if (!length($text) and 
$element->{'tag'} eq 'top' and defined ($Texi2HTML::THISDOC{'settitle'}) and 
length($Texi2HTML::THISDOC{'settitle'}));
-    $text = "Annexe $text" if ($element->{'tag'} =~ /appendix/ and 
$element->{'level'} <= 1);
+    $text = "Annexe $text" if ($element->{'tag'} =~ /appendix/ and $level <= 
1);
     my $result = $text . "\n" .
-       ($t2h_default_underline_symbol{$element->{'level'}} x length($text)) . 
"\n";
+       ($t2h_default_underline_symbol{$level} x length($text)) . "\n";
 
-   $result .= "\n";
+   #$result .= "\n";
    return $result;
 }
 
@@ -5670,7 +5848,6 @@
 
     return '' if (!defined($identifier) or ($identifier !~ /\S/));
     my $label = &$anchor($identifier);
-    return $label . "\n" if (!$preformatted);
     return $label;
 }
 
@@ -6056,7 +6233,7 @@
    return undef;
 }
 
-sub t2h_default_line_command($$$$)
+sub xml_default_line_command($$$$)
 {
     my $command = shift;
     my $arg_text = shift;
@@ -6079,4 +6256,36 @@
     return $arg_text;
 }
 
+sub t2h_default_line_command($$$$)
+{
+    my $command = shift;
+    my $arg_text = shift;
+    my $arg_texi = shift;
+    my $state = shift;
+
+    return $arg_text;
+}
+
+# info is special, since it doesn't use the basename but directly the 
+# setfilename output, contrary to all the other formats
+sub t2h_default_element_file_name($$$)
+{
+    my $element = shift;
+    my $type = shift;
+    my $prefix = shift;
+
+    my $outname;
+    return unless ($USE_SETFILENAME_EXTENSION);
+    $outname = $OUT if (defined($OUT) and $OUT ne '' and $OUT !~ /\/$/ and 
$Texi2HTML::THISDOC{'input_file_number'} == 0);
+    if ($type eq 'doc') 
+    {
+       if (defined($Texi2HTML::THISDOC{'setfilename'}) and !defined($outname))
+       {
+          $Texi2HTML::THISDOC{'extension'} = '';
+          return $Texi2HTML::THISDOC{'setfilename'};
+       }
+    }
+
+    return undef;
+}
 1;

Index: texi2html.pl
===================================================================
RCS file: /cvsroot/texi2html/texi2html/texi2html.pl,v
retrieving revision 1.289
retrieving revision 1.290
diff -u -b -r1.289 -r1.290
--- texi2html.pl        23 May 2009 17:09:38 -0000      1.289
+++ texi2html.pl        24 May 2009 22:29:09 -0000      1.290
@@ -86,7 +86,7 @@
 }
 
 # CVS version:
-# $Id: texi2html.pl,v 1.289 2009/05/23 17:09:38 pertusus Exp $
+# $Id: texi2html.pl,v 1.290 2009/05/24 22:29:09 pertusus Exp $
 
 # Homepage:
 my $T2H_HOMEPAGE = "http://www.nongnu.org/texi2html/";;
@@ -215,6 +215,11 @@
    return $default_output_format;
 }
 
+sub default_command_name()
+{
+   return $my_command_name;
+}
+
 {
 package Texi2HTML::Config;
 
@@ -277,11 +282,11 @@
 $USE_NODE_TARGET
 $USE_UNICODE
 $USE_UNIDECODE
-$TRANSLITERATE_NODE
+$TRANSLITERATE_FILE_NAMES
 $NODE_FILES
 $NODE_NAME_IN_MENU
 $AVOID_MENU_REDUNDANCY
-$SECTION_NAVIGATION
+$HEADERS
 $MONOLITHIC
 $SHORTEXTN 
 $EXTENSION
@@ -315,6 +320,7 @@
 $ENABLE_ENCODING
 $INTERNAL_LINKS
 $DEFAULT_OUTPUT_FORMAT
+$COMMAND_NAME
 );
 
 # customization variables
@@ -373,6 +379,7 @@
 $USER
 $USE_NUMERIC_ENTITY
 $USE_SETFILENAME
+$USE_SETFILENAME_EXTENSION
 $SEPARATE_DESCRIPTION
 $IGNORE_BEFORE_SETFILENAME
 $OVERVIEW_LINK_TO_TOC
@@ -386,6 +393,7 @@
 %BUTTONS_EXAMPLE
 %BUTTONS_ACCESSKEY
 %BUTTONS_REL
address@hidden
 @CHAPTER_BUTTONS
 @MISC_BUTTONS
 @SECTION_BUTTONS
@@ -588,8 +596,13 @@
 %transliterate_accent_map
 %no_transliterate_map
 %ascii_character_map
-%ascii_simple_map
-%ascii_things_map
+%default_simple_map
+%default_things_map
+%default_texi_map
+%default_style_map
+%default_style_map_pre
+%default_style_map_texi
+%default_simple_format_style_map_texi
 %numeric_entity_map
 %perl_charset_to_html
 %misc_pages_targets
@@ -626,6 +639,7 @@
 );
 
 $DEFAULT_OUTPUT_FORMAT = main::default_output_format();
+$COMMAND_NAME = main::default_command_name();
 
 sub set_conf($$;$)
 {
@@ -668,6 +682,8 @@
    'SPLIT_SIZE' => \$SPLIT_SIZE,
    'contents' => \$CONTENTS,
    'shortcontents' => \$SHORTCONTENTS,
+   'doctype' => \$DOCTYPE,
+   'headers' => \$HEADERS,
 );
 
 sub get_conf($)
@@ -681,6 +697,23 @@
     #print STDERR "Unknown conf string: $name\n";
 }
 
+# used to manage expanded sections
+sub set_expansion($$)
+{
+    my $region = shift;
+    my $set = shift;
+    $set = 1 if (!defined($set));
+    if ($set)
+    {
+         push (@EXPAND, $region) unless (grep {$_ eq $region} @EXPAND);
+    }
+    else
+    {
+         @EXPAND = grep {$_ ne $region} @EXPAND;
+         @T2H_FORMAT_EXPAND = grep {$_ ne $region} @T2H_FORMAT_EXPAND;
+    }
+}
+
 # needed in this namespace for translations
 $I = \&Texi2HTML::I18n::get_string;
 
@@ -692,10 +725,10 @@
 #
 
 #$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;
+#$style                    = \&T2H_GPL_style;
+#$format                   = \&T2H_GPL_format;
+#$printindex               = \&t2h_GPL_default_printindex;
+#$summary_letter           = \&t2h_default_summary_letter;
 
 sub HTML_DEFAULT_toc_body($)
 {
@@ -1171,7 +1204,7 @@
 
 # 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($$$$$$$)
+sub html_default_summary_letter($$$$$$$)
 {
    my $letter = shift;
    my $file = shift;
@@ -2060,21 +2093,6 @@
     return 0;
 }
 
-# used to manage expanded sections from the command line
-sub set_expansion($$)
-{
-    my $region = shift;
-    my $set = shift;
-    $set = 1 if (!defined($set));
-    if ($set)
-    {
-         push (@Texi2HTML::Config::EXPAND, $region) unless (grep {$_ eq 
$region} @Texi2HTML::Config::EXPAND);
-    }
-    else
-    {
-         @Texi2HTML::Config::EXPAND = grep {$_ ne $region} 
@Texi2HTML::Config::EXPAND;
-    }
-}
 
 # manage footnote style
 sub set_footnote_style($$;$)
@@ -2296,7 +2314,7 @@
 $T2H_OPTIONS -> {'doctype'} =
 {
  type => '=s',
- linkage => \$Texi2HTML::Config::DOCTYPE,
+ linkage => sub {Texi2HTML::Config::set_conf('doctype', $_[1], 1);},
  verbose => 'document type which is output in header of HTML files',
  noHelp => 1
 };
@@ -2343,7 +2361,7 @@
 $T2H_OPTIONS -> {'expand'} =
 {
  type => '=s',
- linkage => sub {set_expansion($_[1], 1);},
+ linkage => sub {Texi2HTML::Config::set_expansion($_[1], 1);},
  verbose => 'Expand info|tex|none section of texinfo source',
  noHelp => 1,
 };
@@ -2351,7 +2369,7 @@
 $T2H_OPTIONS -> {'no-expand'} =
 {
  type => '=s',
- linkage => sub {set_expansion ($_[1], 0);},
+ linkage => sub {Texi2HTML::Config::set_expansion ($_[1], 0);},
  verbose => 'Don\'t expand the given section of texinfo source',
 };
 
@@ -2366,42 +2384,42 @@
 $T2H_OPTIONS -> {'ifhtml'} =
 {
  type => '!',
- linkage => sub { set_expansion('html', $_[1]); },
+ linkage => sub { Texi2HTML::Config::set_expansion('html', $_[1]); },
  verbose => "expand ifhtml and html sections",
 };
 
 $T2H_OPTIONS -> {'ifinfo'} =
 {
  type => '!',
- linkage => sub { set_expansion('info', $_[1]); },
+ linkage => sub { Texi2HTML::Config::set_expansion('info', $_[1]); },
  verbose => "expand ifinfo",
 };
 
 $T2H_OPTIONS -> {'ifxml'} =
 {
  type => '!',
- linkage => sub { set_expansion('xml', $_[1]); },
+ linkage => sub { Texi2HTML::Config::set_expansion('xml', $_[1]); },
  verbose => "expand ifxml and xml sections",
 };
 
 $T2H_OPTIONS -> {'ifdocbook'} =
 {
  type => '!',
- linkage => sub { set_expansion('docbook', $_[1]); },
+ linkage => sub { Texi2HTML::Config::set_expansion('docbook', $_[1]); },
  verbose => "expand ifdocbook and docbook sections",
 };
 
 $T2H_OPTIONS -> {'iftex'} =
 {
  type => '!',
- linkage => sub { set_expansion('tex', $_[1]); },
+ linkage => sub { Texi2HTML::Config::set_expansion('tex', $_[1]); },
  verbose => "expand iftex and tex sections",
 };
 
 $T2H_OPTIONS -> {'ifplaintext'} =
 {
  type => '!',
- linkage => sub { set_expansion('plaintext', $_[1]); },
+ linkage => sub { Texi2HTML::Config::set_expansion('plaintext', $_[1]); },
  verbose => "expand ifplaintext sections",
 };
 
@@ -2525,7 +2543,7 @@
 $T2H_OPTIONS -> {'headers'} =
 {
  type => '!',
- linkage => \$Texi2HTML::Config::SECTION_NAVIGATION,
+ linkage => sub {Texi2HTML::Config::set_conf('headers', $_[1], 1);},
  verbose => 'output navigation headers for each section',
 };
 
@@ -2723,7 +2741,7 @@
 $T2H_OPTIONS -> {'transliterate-file-names'} =
 {
  type => '!',
- linkage=> \$Texi2HTML::Config::TRANSLITERATE_NODE,
+ linkage=> \$Texi2HTML::Config::TRANSLITERATE_FILE_NAMES,
  verbose => 'produce file names in ASCII transliteration',
 };
 
@@ -2950,15 +2968,15 @@
 $T2H_OBSOLETE_OPTIONS -> {sec_nav} =
 {
  type => '!',
- linkage => \$Texi2HTML::Config::SECTION_NAVIGATION,
- verbose => 'obsolete, use "-header" instead',
+ linkage => sub {Texi2HTML::Config::set_conf('headers', $_[1], 1);},
+ verbose => 'obsolete, use "-headers" instead',
  noHelp  => 2
 };
 
 $T2H_OBSOLETE_OPTIONS -> {'sec-nav'} =
 {
  type => '!',
- linkage => \$Texi2HTML::Config::SECTION_NAVIGATION,
+ linkage => sub {Texi2HTML::Config::set_conf('headers', $_[1], 1);},
  verbose => 'obsolete, use "--header" instead',
  noHelp  => 2
 };
@@ -3014,7 +3032,7 @@
 $T2H_OBSOLETE_OPTIONS -> {'no-section_navigation'} =
 {
  type => '!',
- linkage => sub {$Texi2HTML::Config::SECTION_NAVIGATION = 0;},
+ linkage => sub {Texi2HTML::Config::set_conf('headers', 0, 1);},
  verbose => 'obsolete, use -nosec_nav',
  noHelp => 2,
 };
@@ -3072,7 +3090,7 @@
 $T2H_OBSOLETE_OPTIONS -> {section_navigation} =
 {
  type => '!',
- linkage => \$Texi2HTML::Config::SECTION_NAVIGATION,
+ linkage => sub {Texi2HTML::Config::set_conf('headers', $_[1], 1);},
  verbose => 'obsolete, use --sec-nav instead',
  noHelp => 2,
 };
@@ -3305,6 +3323,8 @@
 # retro compatibility for $Texi2HTML::Config::EXPAND
 push (@Texi2HTML::Config::EXPAND, $Texi2HTML::Config::EXPAND) if 
($Texi2HTML::Config::EXPAND);
 
+push (@Texi2HTML::Config::EXPAND, @Texi2HTML::Config::T2H_FORMAT_EXPAND);
+
 # correct %Texi2HTML::Config::texi_formats_map based on command line and init
 # variables
 $Texi2HTML::Config::texi_formats_map{'menu'} = 'normal' if 
($Texi2HTML::Config::SHOW_MENU);
@@ -3443,7 +3463,7 @@
                  $cross_ref_texi_map{$key} = chr($char_nr);
              }
              # cross_transliterate_texi_map is only used if 
-             # USE_UNIDECODE is unset and TRANSLITERATE_NODE is set
+             # USE_UNIDECODE is unset and TRANSLITERATE_FILE_NAMES is set
              if (exists 
($Texi2HTML::Config::transliterate_map{$Texi2HTML::Config::unicode_map{$key}}))
              {
                 $cross_transliterate_texi_map{$key} = 
$Texi2HTML::Config::transliterate_map{$Texi2HTML::Config::unicode_map{$key}};
@@ -3456,7 +3476,7 @@
         else
         {
             $cross_ref_texi_map{$key} = '_' . 
lc($Texi2HTML::Config::unicode_map{$key});
-             # cross_transliterate_texi_map is used if TRANSLITERATE_NODE is 
set
+             # cross_transliterate_texi_map is used if 
TRANSLITERATE_FILE_NAMES is set
              if (exists 
($Texi2HTML::Config::transliterate_map{$Texi2HTML::Config::unicode_map{$key}}))
              {
                  $cross_transliterate_texi_map{$key} = 
$Texi2HTML::Config::transliterate_map{$Texi2HTML::Config::unicode_map{$key}};
@@ -3468,8 +3488,8 @@
         }
     }
 }
-#if ($Texi2HTML::Config::USE_UNICODE and $Texi2HTML::Config::TRANSLITERATE_NODE
-if ($Texi2HTML::Config::TRANSLITERATE_NODE and (
+#if ($Texi2HTML::Config::USE_UNICODE and 
$Texi2HTML::Config::TRANSLITERATE_FILE_NAMES
+if ($Texi2HTML::Config::TRANSLITERATE_FILE_NAMES and (
     ($Texi2HTML::Config::USE_UNICODE and ! $Texi2HTML::Config::USE_UNIDECODE)
     or !$Texi2HTML::Config::USE_UNICODE))
 {
@@ -3492,7 +3512,7 @@
         {
              $cross_ref_style_map_texi{$key}->{'function'} = 
\&Texi2HTML::Config::t2h_nounicode_cross_manual_accent;
         }
-        # this is only used if TRANSLITERATE_NODE is set and USE_UNICODE
+        # this is only used if TRANSLITERATE_FILE_NAMES is set and USE_UNICODE
         # or USE_UNIDECODE is not set
         $cross_transliterate_style_map_texi{$key}->{'function'} = 
\&Texi2HTML::Config::t2h_transliterate_cross_manual_accent;
     }
@@ -5392,7 +5412,7 @@
             if ($Texi2HTML::Config::USE_UNICODE)
             {
                 $node->{'cross_manual_target'} = 
Unicode::Normalize::NFC($node->{'cross_manual_target'});
-                if ($Texi2HTML::Config::TRANSLITERATE_NODE and 
$Texi2HTML::Config::USE_UNIDECODE)
+                if ($Texi2HTML::Config::TRANSLITERATE_FILE_NAMES and 
$Texi2HTML::Config::USE_UNIDECODE)
                 {
                      $node->{'cross_manual_file'} = 
                        
unicode_to_protected(unicode_to_transliterate($node->{'cross_manual_target'}));
@@ -5424,7 +5444,7 @@
     }
 
     
-    if ($Texi2HTML::Config::TRANSLITERATE_NODE and 
+    if ($Texi2HTML::Config::TRANSLITERATE_FILE_NAMES and 
          (!$Texi2HTML::Config::USE_UNICODE or 
!$Texi2HTML::Config::USE_UNIDECODE))
     {
         $::style_map_texi_ref = \%cross_transliterate_style_map_texi;
@@ -5455,7 +5475,7 @@
             if ($Texi2HTML::Config::USE_UNICODE)
             {
                 $entry->{'cross'} = Unicode::Normalize::NFC($entry->{'cross'});
-                if ($Texi2HTML::Config::TRANSLITERATE_NODE and 
$Texi2HTML::Config::USE_UNIDECODE) # USE_UNIDECODE is redundant
+                if ($Texi2HTML::Config::TRANSLITERATE_FILE_NAMES and 
$Texi2HTML::Config::USE_UNIDECODE) # USE_UNIDECODE is redundant
                 {
                      $entry->{'cross'} = 
                        
unicode_to_protected(unicode_to_transliterate($entry->{'cross'}));
@@ -7413,7 +7433,7 @@
         }
     }
 
-    $Texi2HTML::THISDOC{'do_about'} = 1 unless 
(defined($Texi2HTML::THISDOC{'do_about'}) or $one_section or (not 
Texi2HTML::Config::get_conf('SPLIT') and not 
$Texi2HTML::Config::SECTION_NAVIGATION));
+    $Texi2HTML::THISDOC{'do_about'} = 1 unless 
(defined($Texi2HTML::THISDOC{'do_about'}) or $one_section or (not 
Texi2HTML::Config::get_conf('SPLIT') and not 
Texi2HTML::Config::get_conf('headers')));
     
     $Texi2HTML::NAME{'First'} = $element_first->{'text'};
     $Texi2HTML::NAME{'Last'} = $element_last->{'text'};
@@ -8521,14 +8541,14 @@
          if (exists($nodes{$texi_node}) and 
($nodes{$texi_node}->{'cross_manual_target'})) 
          {
                $node_id = $nodes{$texi_node}->{'cross_manual_target'};
-               if ($Texi2HTML::Config::TRANSLITERATE_NODE)
+               if ($Texi2HTML::Config::TRANSLITERATE_FILE_NAMES)
                {
                    $node_file = $nodes{$texi_node}->{'cross_manual_file'};
                }
          }
          else 
          {
-              if ($Texi2HTML::Config::TRANSLITERATE_NODE)
+              if ($Texi2HTML::Config::TRANSLITERATE_FILE_NAMES)
               {
                   ($node_id, $node_file) = cross_manual_line($texi_node,1);
               }
@@ -8538,7 +8558,7 @@
               }
          }
          $node_xhtml_id = node_to_id($node_id);
-         $node_file = $node_id unless ($Texi2HTML::Config::TRANSLITERATE_NODE);
+         $node_file = $node_id unless 
($Texi2HTML::Config::TRANSLITERATE_FILE_NAMES);
     }
     return &$Texi2HTML::Config::external_href($texi_node, $node_file, 
         $node_xhtml_id, $file);
@@ -13526,7 +13546,7 @@
             my $result;
             if ($state->{'remove_texi'})
             {
-#print STDERR "REMOVE $macro, $style_map_texi_ref->{$macro}, fun 
$style_map_texi_ref->{$macro}->{'function'} remove cmd " . 
\&Texi2HTML::Config::t2h_remove_command . " ascii acc " . 
\&t2h_default_ascii_accent;
+#print STDERR "REMOVE $macro, $style_map_texi_ref->{$macro}, fun 
$style_map_texi_ref->{$macro}->{'function'} remove cmd " . 
\&Texi2HTML::Config::t2h_remove_command . " ascii acc " . \&t2h_default_accent;
                 $style = $::style_map_texi_ref->{$macro};
             }
             elsif ($state->{'preformatted'})

Index: doc/texi2html.texi
===================================================================
RCS file: /cvsroot/texi2html/texi2html/doc/texi2html.texi,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -b -r1.89 -r1.90
--- doc/texi2html.texi  23 May 2009 17:09:39 -0000      1.89
+++ doc/texi2html.texi  24 May 2009 22:29:10 -0000      1.90
@@ -736,7 +736,7 @@
 In case the files are named after the node names, 
 another command-line option, @longopt{transliterate-file-names}
 can be set to trigger ASCII transliteration of node file names 
-(variable @variable{$TRANSLITERATE_NODE}). Transliteration is set in the 
+(variable @variable{$TRANSLITERATE_FILE_NAMES}). Transliteration is set in the 
 default case.
 
 @c --------------------------------------------------------
@@ -798,7 +798,7 @@
 to use frames.
 
 It is also possible to suppress the section navigation panel with
address@hidden (variable @variable{$SECTION_NAVIGATION}, the default
address@hidden (variable @variable{$HEADERS}, the default
 is to output all the navigation panels), and to specify
 whether footnotes should appear at the foot of the same page which contains
 the reference to the note with @longopt{footnote-style} set to
@@ -822,7 +822,7 @@
 frames are used (corresponding variables are @variable{$DOCTYPE} and 
 @variable{$FRAMESET_DOCTYPE}).
 
-The default for the document doctype is:
+The default for the document doctype for HTML is:
 @example
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
 @end example
@@ -1309,7 +1309,7 @@
 @item $ICONS
 Icons are used instead of
 textual buttons if this variable is true.
address@hidden $SECTION_NAVIGATION
address@hidden $HEADERS
 If this variable is false there is no section navigation, no navigation 
 panels for the elements within the pages, only at 
 the beginning and the end of the page (@pxref{Page layout options}).
@@ -1486,7 +1486,8 @@
 
 When it exists, the associated
 variable that sets the default value have the same name, in upper case.
-Currently the following values are available through 
+Currently the following information corresponding with @@-commands 
+is available through 
 @code{get_conf}:
  kbdinputstyle, paragraphindent, setchapternewpage, headings,
  footnotestyle,
@@ -1495,6 +1496,21 @@
  setshortcontentsaftertitlepage, frenchspacing, fillcolumn, documentlanguage,
  novalidate.
 
+Information nthat can be set on the command line and in init files, or 
+that could be modified on a per-output file basis are also available
+through @code{get_conf}:
+
address@hidden @code
address@hidden SPLIT
+How the manual is split.
address@hidden SPLIT_SIZE
+The split size, only relevant for info output.
address@hidden doctype
+The current doctype.
address@hidden headers
+True if headers are to be output.
address@hidden table
+
 @subsubheading Global strings
 
 The @variable{%Texi2HTML::THISDOC} hash holds some global informations:
@@ -1585,10 +1601,6 @@
 @item css_lines
 reference on an array containing the normal lines of 
 @acronym{CSS} files.
address@hidden SPLIT
-How the manual is split.
address@hidden SPLIT_SIZE
-The split size, only relevant for info output.
 @end table
 
 @subsubheading Flags
@@ -4565,6 +4577,8 @@
   same argument than @@footnotestyle.
 @item replace $LANG by $DOCUMENTLANGUAGE.
 @item replace $DO_CONTENTS by $CONTENTS and $DO_SCONTENTS by $SHORTCONTENTS.
address@hidden replace $TRANSLITERATE_NODE by $TRANSLITERATE_FILE_NAMES.
address@hidden replace $SECTION_NAVIGATION by $HEADERS.
 @item @@verbatiminclude is now a $raw command argument distinct from 
@@verbatim.
 @item @@direntry is formatted like a menu and passed down to $menu_command.
 @end itemize

Index: examples/book.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/book.init,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- examples/book.init  21 May 2009 20:15:57 -0000      1.16
+++ examples/book.init  24 May 2009 22:29:10 -0000      1.17
@@ -87,14 +87,14 @@
     my $buttons = address@hidden;
     my $result;
 
-    if ($first_in_page and $SECTION_NAVIGATION)
+    if ($first_in_page and get_conf('headers'))
     {
         $result = book_print_up_toc($Texi2HTML::THIS_ELEMENT);
         $result .= &$print_head_navigation(undef, $buttons);
     }
     else
     { # got to do this here, as it isn't done in print_head_navigation
-        $result = &$print_navigation($buttons) if ($SECTION_NAVIGATION);
+        $result = &$print_navigation($buttons) if (get_conf('headers'));
     }
     return $result;
 }

Index: examples/makeinfo.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/makeinfo.init,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- examples/makeinfo.init      22 May 2009 18:50:29 -0000      1.29
+++ examples/makeinfo.init      24 May 2009 22:29:10 -0000      1.30
@@ -22,12 +22,15 @@
 #
 
#-##############################################################################
 
+html_default_load();
+
 $TOP_FILE = 'index.html';
 
 $SHOW_MENU = 1;
 
 $USE_NODES = 1;
 
+# to be like makeinfo
 #$ONLY_NODES = 1;
 
 $SPLIT = 'node';
@@ -36,14 +39,12 @@
 
 $USE_SETFILENAME = 1;
 
-$IGNORE_BEFORE_SETFILENAME = 1;
-
-# to mimic makeinfo the following have to be set.
+# to mimic makeinfo the 2 following have to be set 1.
 #$USE_MENU_DIRECTIONS = 0;
 
 #$USE_UP_FOR_ADJACENT_NODES = 0;
 
-$SECTION_NAVIGATION = 1;
+$HEADERS = 1;
 
 $SHORT_REF = 1;
 

Index: examples/xhtml.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/xhtml.init,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- examples/xhtml.init 7 Jan 2009 00:36:41 -0000       1.7
+++ examples/xhtml.init 24 May 2009 22:29:10 -0000      1.8
@@ -57,9 +57,10 @@
     my $fh = shift;
     my $longtitle = "$Texi2HTML::THISDOC{'title_no_texi'}";
     $longtitle .= ": $Texi2HTML::NO_TEXI{'This'}" if exists 
$T2H_NO_TEXI{'This'};
+    my $doctype = get_conf('doctype');
     print $fh <<EOT;
 <?xml version="1.0" encoding="iso-8859-1"?>
-$T2H_DOCTYPE
+$doctype
 <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="$T2H_LANG" 
lang="$T2H_LANG">
 $T2H_THISDOC{'copying'}<!-- Created on $Texi2HTML::THISDOC{today} by 
$Texi2HTML::THISDOC{program} -->
 <!--

Index: formats/docbook.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/formats/docbook.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- formats/docbook.init        23 May 2009 17:09:39 -0000      1.2
+++ formats/docbook.init        24 May 2009 22:29:10 -0000      1.3
@@ -39,22 +39,20 @@
 sub docbook_default_load()
 {
 
-$EXTENSION = "xml";
+t2h_default_set_variables_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">
   <!ENTITY latex "LaTeX">
 ]>';
-$USE_MENU_DIRECTIONS = 0;
-$USE_UP_FOR_ADJACENT_NODES = 0;
-$USE_NUMERIC_ENTITY = 0;
-$USE_SETFILENAME = 1;
address@hidden = ('docbook');
address@hidden = ('docbook');
 @IMAGE_EXTENSIONS = ('eps', 'gif', 'jpg', 'jpeg', 'pdf', 'png', 'svg', 'txt');
-$USE_ISO = 1;
 $INLINE_INSERTCOPYING = 1;
+$USE_NODES = undef;
 
 $SHOW_MENU = 0;
-$SECTION_NAVIGATION = 0;
+$HEADERS = 0;
+# certainly irrelevant
+$SIMPLE_MENU = 0;
 
 push @command_handler_process, \&docbook_initialize_variables;
 
@@ -62,6 +60,12 @@
 $misc_command{'comment'}->{'keep'} = 1;
 $misc_command{'settitle'}->{'keep'} = 1;
 
+t2h_default_copy_style_map (\%default_style_map, \%style_map);
+foreach my $accent_command ('tieaccent', 'dotless', keys(%unicode_accents))
+{
+     $style_map{$accent_command} = { 'function' => \&xml_default_accent };
+}
+
 delete $style_map{'sc'}->{'attribute'};
 $style_map{'code'}->{'attribute'} = 'literal';
 $style_map{'strong'}->{'attribute'} = 'emphasis role="bold"';
@@ -366,9 +370,10 @@
 {
     my $fh = shift;
     my $language = get_conf('documentlanguage');
+    my $doctype = get_conf('doctype');
     print $fh <<EOT;
 <?xml version="1.0"?>
-$DOCTYPE
+$doctype
 <book id="$Texi2HTML::THISDOC{file_base_name}.$EXTENSION" lang="$language">
 EOT
 }

Index: formats/html.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/formats/html.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- formats/html.init   23 May 2009 17:09:39 -0000      1.2
+++ formats/html.init   24 May 2009 22:29:10 -0000      1.3
@@ -6,10 +6,14 @@
 # A copy of this file is pasted into the beginning of texi2html by
 # running './configure'.
 #
-# $Id: html.init,v 1.2 2009/05/23 17:09:39 pertusus Exp $
+# $Id: html.init,v 1.3 2009/05/24 22:29:10 pertusus Exp $
 
 use strict;
 
+my  @html_default_multitable_stack;
+# tracks menu entry index
+my $html_menu_entry_index;
+
 sub html_default_load();
 
 if (defined($DEFAULT_OUTPUT_FORMAT) and $DEFAULT_OUTPUT_FORMAT eq 'html')
@@ -21,13 +25,9 @@
 sub html_default_load()
 {
 
-###############################################################
-# Options common with makeinfo
-# -number | -nonumber
-# if this is set the sections are numbered, and section names and numbers 
-# are used in references and menus (instead of node names).
-$NUMBER_SECTIONS = 1;
+t2h_default_set_variables_xml();
 
+###############################################################
 # -headers
 # if this is set then navigation panels are printed at the beginning of each 
 # section.
@@ -39,41 +39,9 @@
 # This is most useful if you do not want to have section navigation
 # with -split chapter. There will be chapter navigation panel at the 
 # beginning and at the end of chapters anyway.
-$SECTION_NAVIGATION = 1;
+$HEADERS = 1;
 
-# -toc-links
-# if this is set, links from headings to toc entries are created.
-$TOC_LINKS = 0;
-
-# -separated-footnotes
-# if this is set footnotes are on a separated page. Otherwise they are at
-# the end of each file (if the document is split).
-$FOOTNOTESTYLE = 'separate';
-
-# --internal-links
-$INTERNAL_LINKS = undef;
-
-# -transliterate-file-names 
-# transliterate node names for external refs (and internal if NODE_FILES)
-$TRANSLITERATE_NODE = 1;
-
-# -css-include
-# All the specified css files are used. More precisely the @import sections
-# are added to the beginning of the CSS_LINES the remaining is added at
-# the end of the CSS_LINES (after the css rules generated by texi2html).
-# cf texinfo manual for more info.
-# - means STDIN
address@hidden = ();
-
-# -css-ref
-# the specified url are used as stylesheet links
address@hidden = ();
-
-###############################################################
-# specific texi2html options
-# -expand
-# the @EXPAND array contains the expanded section names.
address@hidden = ('html');
address@hidden = ('html');
 
 # -doctype
 # The value is the 'SystemLiteral' which identifies the canonical DTD 
@@ -88,24 +56,11 @@
 # the file containing the frame description.
 $FRAMESET_DOCTYPE = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 
Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd";>';
 
-# -invisible
-# This seems obsolete and is not used anywhere.
-# This was a workaround for a known bug of many WWW browsers, including 
-# netscape. This was used to create invisible destination in anchors.
-$INVISIBLE_MARK = '';
-# $INVISIBLE_MARK = '&#160;';
-
 # -iso
 # if this value is true, ISO8859 characters are used for special symbols 
 # (like copyright, etc).
 $USE_ISO = 1;
 
-# -frames
-# if the value is true, HTML 4.0 "frames" are used. 
-# A file describing the frame layout is generated, together with a file 
-# with the short table of contents.
-$FRAMES = 0;
-
 # -menu | -nomenu
 # if the value is true the Texinfo menus are shown.
 $SHOW_MENU = 1;
@@ -118,25 +73,7 @@
 
 $USE_SECTIONS = 1;
 
-# -short-extn
-# If this is set, then all HTML files will have extension ".htm" instead of
-# ".html". This is helpful when shipping the document to DOS-based systems.
-$SHORTEXTN = 0;
-
-# -short-ref
-# if this is set cross-references are given without section numbers.
-$SHORT_REF = '';
-
-# -def-table
-# If this is set a table construction for @def.... instead of definition 
-# lists.
-# (New Option: 27.07.2000 Karl Heinz Marbaise)
-$DEF_TABLE = 0;
-
-# -html-xref-prefix
-# base directory for external manuals.
-#$EXTERNAL_DIR = '../';
-$EXTERNAL_DIR = undef;
+$TOP_FILE = 'index.html';
 
 # -l2h
 # if this is set, latex2html is used for generation of math content.
@@ -175,31 +112,12 @@
 #
 ##############################################################################
 
+$INLINE_INSERTCOPYING = 0;
+
 # if this variable is true, numeric entities are used when there is no
 # corresponding textual entity.
 $USE_NUMERIC_ENTITY = 1;
 
-# if true the link in Overview link to the corresponding Toc entry.
-$OVERVIEW_LINK_TO_TOC = 0;
-
-# if set always separate description and menu link, even in 
-# preformatted environment
-$SEPARATE_DESCRIPTION = 0;
-
-# if set, use node anchors for sections targets
-$USE_NODE_TARGET = 1;
-
-# new style for crossrefs
-$NEW_CROSSREF_STYLE = 1;
-
-# top heading is always at the beginning of the element.
-$TOP_HEADING_AT_BEGINNING = 1;
-
-# if set and menu entry equals menu description, then do not print 
-# menu description.
-# Likewise, if node name equals entry name, do not print entry name.
-$AVOID_MENU_REDUNDANCY = 1;
-
 # if true, use the original command if the result is an entity
 $ENABLE_ENCODING_USE_ENTITY = 1;
 
@@ -219,10 +137,6 @@
 $MIDDLE_RULE = '<hr size="2">';
 $BIG_RULE = '<hr size="6">';
 
-# if set and $SPLIT is set, then split index pages at the next letter
-# after they have more than that many entries
-$SPLIT_INDEX = 100;
-
 # symbol put at the beginning of nodes entry in menu (and optionnaly of 
 # unnumbered in menus, see next variable)
 $MENU_SYMBOL = '&bull;';
@@ -230,17 +144,15 @@
 
 $SIMPLE_MENU = 0;
 
-# if true put a $MENU_SYMBOL before unnumbered in menus
-$UNNUMBERED_SYMBOL_IN_MENU = 0;
-
 # extension for nodes files when NODE_FILES is true
 $NODE_FILE_EXTENSION = 'html';     
 
 # extension
 $EXTENSION = 'html';
 
-# file name used for Top node when NODE_FILES is true
-$TOP_NODE_FILE = 'index';
+# this resets all the variables to the texi2html specific values if
+# called as texi2html
+t2h_default_set_variables_texi2html() if ($COMMAND_NAME eq 'texi2html');
 
 # this controls the pre style for menus
 $MENU_PRE_STYLE = 'font-family: serif';
@@ -284,27 +196,9 @@
 # THIS_WORDS_IN_PAGE holds number of words of current page
 $WORDS_IN_PAGE = 300;
 
-# if this is set a vertical navigation panel is used.
-$VERTICAL_HEAD_NAVIGATION = 0;
-
 # html version for latex2html
 $L2H_HTML_VERSION = "4.0";
 
-# use the information given by menus to complete the node directions
-$USE_MENU_DIRECTIONS = 1;
-
-# try up sections to complete the node directions
-$USE_UP_FOR_ADJACENT_NODES = 1;
-
-# use accesskey in hrefs
-$USE_ACCESSKEY = 0;
-
-# use rel= and rev= in hrefs. Currently only rel is used
-$USE_REL_REV = 0;
-
-# generate <link> elements in head
-$USE_LINKS = 0;
-
 # specify in this array which "buttons" should appear in which order
 # in the navigation panel for sections; use ' ' for empty buttons (space)
 @SECTION_BUTTONS =
@@ -318,7 +212,7 @@
 @MISC_BUTTONS = ('Top', 'Contents', 'Index', 'About');
 
 # buttons for chapter file footers
-# (and headers but only if SECTION_NAVIGATION is false)
+# (and headers but only if HEADERS is false)
 @CHAPTER_BUTTONS =
     (
      'FastBack', 'FastForward', ' ',
@@ -673,6 +567,8 @@
 $pre_map{'enddots'} = '...';
 #$pre_map{'br'} = "\n";
 
+t2h_default_copy_style_map (\%default_style_map, \%style_map);
+t2h_default_copy_style_map (\%default_style_map_pre, \%style_map_pre);
 # default is {'args' => ['normal'], 'attribute' => ''},   
 my %style_map_html = (
       'b',          {'attribute' => 'b'},
@@ -719,24 +615,10 @@
        'author'   => 'strong',
 );
 
-%special_accents = (
-      'ringaccent' => 'aA',
-      "'"          => 'aeiouyAEIOUY',
-      ','          => 'cC',
-      '^'          => 'aeiouAEIOU',
-      '`'          => 'aeiouAEIOU',
-      '~'          => 'nNaoAO',
-      '"'          => 'aeiouyAEIOU',
-# according to http://www2.lib.virginia.edu/small/vhp/download/ISO.txt
-# however this doesn't seems to work in firefox
-#      'ogonek'     => 'aeiuAEIU',
-);
-
 foreach my $accent_command ('tieaccent', 'dotless', keys(%unicode_accents))
 {
-     $style_map{$accent_command} = { 'function' => \&html_default_accent };
-     $style_map_texi{$accent_command} = { 'function' => 
\&t2h_default_ascii_accent };
-     $style_map_pre{$accent_command} = { 'function' => \&html_default_accent };
+     $style_map{$accent_command} = { 'function' => \&xml_default_accent };
+     $style_map_pre{$accent_command} = { 'function' => \&xml_default_accent };
 }
 
 $style_map_pre{'sc'} = {};
@@ -775,7 +657,7 @@
 foreach my $accent_command ('tieaccent', 'dotless', keys(%unicode_accents))
 {
 #    $simple_format_style_map_texi{$accent_command}->{'args'} = ['normal'];
-    $simple_format_style_map_texi{$accent_command}->{'function'} = 
\&html_default_accent;
+    $simple_format_style_map_texi{$accent_command}->{'function'} = 
\&xml_default_accent;
 }
 
 %format_map = (
@@ -897,7 +779,6 @@
 $row               = \&html_default_row;
 $cell              = \&html_default_cell;
 $list_item         = \&html_default_list_item;
-$comment           = \&html_default_comment;
 $def_line          = \&html_default_def_line;
 $raw               = \&html_default_raw;
 $heading           = \&html_default_heading;
@@ -910,17 +791,15 @@
 $image             = \&html_default_image;
 $index_entry_label = \&html_default_index_entry_label;
 $index_summary     = \&html_default_index_summary;
-#$summary_letter    = \&html_default_summary_letter;
+$summary_letter    = \&html_default_summary_letter;
 $index_entry       = \&html_default_index_entry;
 $index_entry_command = \&html_default_index_entry_command;
 $index_letter      = \&html_default_index_letter;
 #$printindex       = \&html_default_printindex;
 $print_index       = \&html_default_print_index;
 $normal_text       = \&html_default_normal_text;
-$complex_format    = \&html_default_complex_format;
 $cartouche         = \&html_default_cartouche;
 $sp                = \&html_default_sp;
-$empty_line               = \&html_default_empty_line;
 $caption_shortcaption     = \&html_default_caption_shortcaption;
 $caption_shortcaption_command  = \&html_default_caption_shortcaption_command;
 $float                     = \&html_default_float;
@@ -943,10 +822,6 @@
 $protect_text      = \&xml_default_protect_text;
 }
 
-my  @html_default_multitable_stack;
-# tracks menu entry index
-my $html_menu_entry_index;
-
 
 
 # The functions
@@ -1014,13 +889,13 @@
     my $previous_is_top = shift;
     my $buttons = address@hidden;
 
-    if (($first_in_page or $previous_is_top) and $SECTION_NAVIGATION)
+    if (($first_in_page or $previous_is_top) and get_conf('headers'))
     {
         return &$print_head_navigation(undef, $buttons);
     }
     else
     { # got to do this here, as it isn't done in print_head_navigation
-        return &$print_navigation($buttons) if ($SECTION_NAVIGATION or 
get_conf('SPLIT') eq 'node');
+        return &$print_navigation($buttons) if (get_conf('headers') or 
get_conf('SPLIT') eq 'node');
     }
 }
 
@@ -1033,7 +908,7 @@
     my $buttons = address@hidden;
 
     my $nw = main::print_lines($fh);
-    if ((get_conf('SPLIT') eq 'node') && $SECTION_NAVIGATION)
+    if ((get_conf('SPLIT') eq 'node') && get_conf('headers'))
     {
         my $buttons = address@hidden;
         &$print_foot_navigation($fh, $buttons, $SMALL_RULE,
@@ -1076,7 +951,7 @@
     my $element = shift;
     my $buttons = address@hidden;
     &$print_foot_navigation($fh, $buttons, $SMALL_RULE, 
-       ($end_page and ($SECTION_NAVIGATION or (get_conf('SPLIT') and 
get_conf('SPLIT') ne 'node'))), $element);
+       ($end_page and (get_conf('headers') or (get_conf('SPLIT') and 
get_conf('SPLIT') ne 'node'))), $element);
 #    &$print_foot_navigation($fh);
 #    print $fh "$SMALL_RULE\n";
     if ($end_page)
@@ -1145,7 +1020,7 @@
 {
     # if there is no section navigation and it is not split, the 
     # navigation information is useless
-    return &$print_misc(@_) if (get_conf('SPLIT') or $SECTION_NAVIGATION);
+    return &$print_misc(@_) if (get_conf('SPLIT') or get_conf('headers'));
 }
 
 sub HTML_DEFAULT_print_misc_header
@@ -1156,7 +1031,7 @@
     my $misc_page = shift;
     &$print_page_head($fh) if ($new_file);
     print $fh "".&$misc_element_label($misc_pages_targets{$misc_page}, 
$misc_page);
-    &$print_head_navigation($fh, $buttons) if ($new_file or 
$SECTION_NAVIGATION);
+    &$print_head_navigation($fh, $buttons) if ($new_file or 
get_conf('headers'));
 }
 
 sub HTML_DEFAULT_print_misc_footer
@@ -1165,7 +1040,7 @@
     my $buttons = shift;
     my $new_file = shift;
     &$print_foot_navigation($fh, $buttons, $SMALL_RULE, 
-        ($new_file and ($SECTION_NAVIGATION or (get_conf('SPLIT') and 
get_conf('SPLIT') ne 'node'))), undef);
+        ($new_file and (get_conf('headers') or (get_conf('SPLIT') and 
get_conf('SPLIT') ne 'node'))), undef);
 #    print $fh "$SMALL_RULE\n";
     if ($new_file)
     {
@@ -1214,7 +1089,7 @@
     my $element = shift;
     # nothing to do there, by default, the navigation panel 
     # is the section navigation panel
-    if (! $SECTION_NAVIGATION)
+    if (! get_conf('headers'))
     { # in this case print_navigation is called here. 
         my $buttons = address@hidden;
         &$print_head_navigation($fh, $buttons);
@@ -1235,7 +1110,7 @@
 sub HTML_DEFAULT_print_section_header
 {
     # nothing to do there, by default
-    if (! $SECTION_NAVIGATION)
+    if (! get_conf('headers'))
     { # in this case print_navigation is called here. 
         my $fh = shift;
         my $buttons = address@hidden;
@@ -1276,8 +1151,9 @@
         }
     }
 
+    my $doctype = get_conf('doctype');
     print $fh <<EOT;
-$DOCTYPE
+$doctype
 <html>
 $Texi2HTML::THISDOC{'copying_comment'}<!-- Created on 
$Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program}
 $Texi2HTML::THISDOC{program_authors}-->
@@ -1752,8 +1628,9 @@
     my $href = &$anchor('', $Texi2HTML::HREF{'This'}, 
$Texi2HTML::NAME{'This'}); 
     my $string = &$I('The node you are looking for is at %{href}.',
        { 'href' => $href });
+    my $doctype = get_conf('doctype');
     print $fh <<EOT;
-$DOCTYPE
+$doctype
 <html>
 <!-- Created on $Texi2HTML::THISDOC{'today'} by $Texi2HTML::THISDOC{'program'} 
-->
 <!--
@@ -1780,34 +1657,6 @@
 EOT
 }
 
-sub html_default_accent($$)
-{
-    my $accent = shift;
-    my $args = shift;
-
-    my $text = $args->[0];
-
-    return "&${text}$accent_map{$accent};" if (defined($accent_map{$accent}) 
and defined($special_accents{$accent}) and ($text =~ 
/^[$special_accents{$accent}]$/));
-    return '&' . $text . 'ring;' if (($accent eq 'ringaccent') and 
(defined($special_accents{$accent})) and ($text =~ 
/^[$special_accents{$accent}]$/));
-    return $text . '&lt;' if ($accent eq 'v');
-# FIXME here there could be a conversion to the character in the right 
-# encoding, like 
-#    if ($USE_UNICODE and defined($OUT_ENCODING) and $OUT_ENCODING ne '' 
-#        and exists($unicode_accents{$accent}) and  
exists($unicode_accents{$accent}->{$text}))
-#    {
-#          my $encoded_char =  Encode::encode($OUT_ENCODING, 
chr(hex($unicode_map{$thing})), Encode::FB_QUIET);
-#          return $encoded_char if ($encoded_char ne '');
-#    }
-    if ($USE_NUMERIC_ENTITY)
-    {
-        if (exists($unicode_accents{$accent}) and 
exists($unicode_accents{$accent}->{$text}))
-        {
-             return ('&#' . hex($unicode_accents{$accent}->{$text}) . ';');
-        }
-    }
-    return ascii_accents($text, $accent);
-}
-
 # Avoid adding h1 if the text is empty
 sub html_default_titlefont($$$)
 {
@@ -1900,47 +1749,6 @@
     return $line;
 }
 
-# This function is called whenever a complex format is processed
-#
-# arguments:
-# name of the format
-# text appearing inside the format
-#
-# an eval of $complex_format->{format name}->{'begin'} should lead to the
-# beginning of the complex format, an eval of 
-# $complex_format->{format name}->{'end'}  should lead to the end of the 
-# complex format.
-sub html_default_complex_format($$)
-{
-    my $name = shift;
-    my $text = shift;
-    return '' if ($text eq '');
-    my $beginning = eval "$complex_format_map->{$name}->{'begin'}";
-    if ($@ ne '')
-    {
-        warn "Evaluation of $complex_format_map->{$name}->{'begin'}: $@";
-        $beginning = '';
-
-    }
-    my $end = eval "$complex_format_map->{$name}->{'end'}";
-    if ($@ ne '')
-    {
-        warn "Evaluation of $complex_format_map->{$name}->{'end'}: $@";
-        $end = '';
-
-    }
-    return $beginning . $text . $end;  
-}
-
-sub html_default_empty_line($$)
-{
-    my $text = shift;
-    my $state = shift;
-    #ignore the line if it just follows a deff
-    return '' if ($state->{'deff_line'});
-    return $text;
-}
-
 sub html_default_caption_shortcaption($)
 {
     my $float = shift;
@@ -2616,14 +2424,6 @@
     }
 }
 
-# an html comment
-sub html_default_comment($)
-{
-    my $text = shift;
-    $text =~ s/--+/-/go;
-    return '<!-- ' . $text . ' -->' . "\n";
-}
-
 sub html_begin_style($$;$)
 {
     my $command = shift;
@@ -2806,7 +2606,7 @@
        }
        else
        {
-           $result .= &$print_head_navigation(undef, address@hidden) if 
(get_conf('SPLIT') or $SECTION_NAVIGATION);
+           $result .= &$print_head_navigation(undef, address@hidden) if 
(get_conf('SPLIT') or get_conf('headers'));
        }
     }
 

Index: formats/info.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/formats/info.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- formats/info.init   23 May 2009 17:09:39 -0000      1.2
+++ formats/info.init   24 May 2009 22:29:10 -0000      1.3
@@ -29,11 +29,6 @@
 
 sub info_default_load();
 
-if (defined($DEFAULT_OUTPUT_FORMAT) and $DEFAULT_OUTPUT_FORMAT eq 'info')
-{
-   info_default_load();
-}
-
 my %info_default_indented_commands;
 my %info_default_format;
 my %info_default_enable_encoding_accents;
@@ -51,40 +46,39 @@
 my $info_default_listoffloat_caption_entry_length;
 my $info_default_listoffloat_append;
 
+if (defined($DEFAULT_OUTPUT_FORMAT) and $DEFAULT_OUTPUT_FORMAT eq 'info')
+{
+   info_default_load();
+}
+
 sub info_default_load()
 {
 
-$USE_NODES = 1;
+t2h_default_set_variables_default();
 $USE_SECTIONS = 0;
address@hidden = ('info', 'direntry');
address@hidden = ('info', 'direntry');
 $EXTENSION = 'info';
 $SHOW_MENU = 1;
-$USE_SETFILENAME = 1;
-$IGNORE_BEFORE_SETFILENAME = 1;
-$NODE_NAME_IN_MENU = 1;
-$SPLIT_INDEX = 0;
-$FOOTNOTESTYLE = 'end';
-$INLINE_CONTENTS = 1;
+$USE_SETFILENAME_EXTENSION = 1;
 $INLINE_INSERTCOPYING = 1;
 $SIMPLE_MENU = 1;
 $MENU_SYMBOL = '*';
-$USE_MENU_DIRECTIONS = 0;
-$USE_UP_FOR_ADJACENT_NODES = 0;
 $USE_ISO = 0;
 $ENABLE_ENCODING_USE_ENTITY = 0;
 $ENABLE_ENCODING = 1;
 @IMAGE_EXTENSIONS = ('png', 'jpg', 'txt');
 $CAPTION_STYLE = 'asis';
 $DEFAULT_ENCODING = 'ascii';
+$HEADERS = 1;
 
 
 $no_paragraph_commands{'anchor'} = 1;
 
-%simple_map = %ascii_simple_map;
+%simple_map = %default_simple_map;
 %simple_map_pre = %simple_map;
 %simple_map_texi = %simple_map;
 
-%things_map = %ascii_things_map;
+%things_map = %default_things_map;
 %pre_map = %things_map;
 
 $misc_command{'exdent'}->{'keep'} = 1;
@@ -105,6 +99,8 @@
 
 %info_default_accent_commands = ();
 
+t2h_default_copy_style_map (\%default_style_map, \%style_map);
+
 foreach my $accent_command ('tieaccent', 'dotless', keys(%unicode_accents), 
keys(%accent_map))
 {
      $info_default_accent_commands{$accent_command} = 1;
@@ -264,6 +260,7 @@
 $index_summary      = \&info_default_index_summary;
 $summary_letter     = \&info_default_summary_letter;
 $index_entry        = \&info_default_index_entry;
+$index_entry_command        = \&t2h_default_index_entry_command;
 $index_letter       = \&info_default_index_letter;
 $print_index        = \&info_default_print_index;
 $index_entry_label  = \&info_default_index_entry_label;
@@ -289,7 +286,7 @@
 $colon_command      = \&info_default_colon_command;
 $raw                = \&info_default_raw;
 $line_command       = \&info_default_line_command;
-$element_file_name  = \&info_default_element_file_name;
+$comment            = \&t2h_default_comment;
 
 }
 
@@ -330,9 +327,9 @@
    foreach my $key (keys(%unicode_accents), 'dotless')
    {
      $info_default_enable_encoding_accents{$key} = 1;
-     $t2h_enable_encoding_default_accent{'normal'}->{$key} = 
\&t2h_default_ascii_accent;
-     $t2h_enable_encoding_default_accent{'texi'}->{$key} = 
\&t2h_default_ascii_accent;
-     $t2h_enable_encoding_default_accent{'pre'}->{$key} = 
\&t2h_default_ascii_accent;
+     $t2h_enable_encoding_default_accent{'normal'}->{$key} = 
\&t2h_default_accent;
+     $t2h_enable_encoding_default_accent{'texi'}->{$key} = 
\&t2h_default_accent;
+     $t2h_enable_encoding_default_accent{'pre'}->{$key} = \&t2h_default_accent;
      $style_map{$key}->{'function'} = \&info_default_accent;
      $style_map_texi{$key}->{'function'} = \&info_default_accent;
      $style_map_pre{$key}->{'function'} = \&info_default_accent;
@@ -389,7 +386,7 @@
     }
     else
     {
-        $result = &t2h_default_ascii_accent(@args);
+        $result = &t2h_default_accent(@args);
     }
     if (scalar(@$style_stack) and 
$info_default_accent_commands{$style_stack->[-1]})
     {
@@ -1593,15 +1590,15 @@
    print STDERR "TREE: Closing $command\n" if ($DEBUG);
    if (!defined($info_state->{'current'}))
    {
-      print STDERR "info_state->{'current'} not defined\n";
+      print STDERR "info_state->{'current'} not defined (closing $command)\n";
    }
    elsif (!defined($info_state->{'current'}->{'command'}))
    {
-      print STDERR "info_state->{'current'}->{'command'} not defined\n";
+      print STDERR "info_state->{'current'}->{'command'} not defined (closing 
$command)\n";
    }
    elsif ($command ne $info_state->{'current'}->{'command'})
    {
-     print STDERR "Was waiting for $info_state->{'current'}->{'command'}\n";
+     print STDERR "Was waiting for $info_state->{'current'}->{'command'} 
(closing $command)\n";
    }
    #return if $no_close;
    $command_entries->{'begin'} = $begin;
@@ -3088,6 +3085,7 @@
     my $style = shift;
     my $text = shift;
     my $expanded = 1 if (grep {$style eq $_} @EXPAND);
+    # no warning for unknown raw formats
     if ($style eq 'verbatim' or $style eq 'verbatiminclude' or $expanded)
     {
         return info_default_store_text(undef,$text, $style);
@@ -3107,26 +3105,5 @@
     return '';
 }
 
-# info is special, since it doesn't use the basename but directly the 
-# setfilename output, contrary to all the other formats
-sub info_default_element_file_name($$$)
-{
-    my $element = shift;
-    my $type = shift;
-    my $prefix = shift;
-
-    my $outname;
-    $outname = $OUT if (defined($OUT) and $OUT ne '' and $OUT !~ /\/$/ and 
$Texi2HTML::THISDOC{'input_file_number'} == 0);
-    if ($type eq 'doc') 
-    {
-       if (defined($Texi2HTML::THISDOC{'setfilename'}) and !defined($outname))
-       {
-          $Texi2HTML::THISDOC{'extension'} = '';
-          return $Texi2HTML::THISDOC{'setfilename'};
-       }
-    }
-
-    return undef;
-}
 
 1;

Index: formats/xml.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/formats/xml.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- formats/xml.init    23 May 2009 17:09:40 -0000      1.2
+++ formats/xml.init    24 May 2009 22:29:10 -0000      1.3
@@ -11,18 +11,15 @@
 sub xml_default_load()
 {
 
-$EXTENSION = "xml";
+t2h_default_set_variables_xml();
 $DOCTYPE = '<!DOCTYPE texinfo PUBLIC "-//GNU//DTD TexinfoML V4.12//EN" 
"http://www.gnu.org/software/texinfo/dtd/4.12/texinfo.dtd";>';
-$USE_MENU_DIRECTIONS = 0;
-$USE_UP_FOR_ADJACENT_NODES = 0;
-$USE_NUMERIC_ENTITY = 0;
-$USE_SETFILENAME = 1;
+$SIMPLE_MENU = 0;
 $SEPARATE_DESCRIPTION = 1;
-$USE_NODES = 1;
address@hidden = ('xml', 'direntry');
-
address@hidden = ('xml', 'direntry');
 $USE_ISO = 0;
-$SECTION_NAVIGATION = 0;
+$HEADERS = 0;
+$INLINE_INSERTCOPYING = 0;
+$SHOW_MENU = 1;
 
 push @Texi2HTML::Config::command_handler_process, \&xml_init_variables;
 
@@ -74,10 +71,16 @@
    $region_formats_kept{$region} = 1;
 }
 
+t2h_default_copy_style_map (\%default_style_map, \%style_map);
+
 foreach my $style (keys(%style_map))
 {
-    next if grep {$style eq $_} ('asis', 'ctrl', 'w', 'tieaccent', 'dotless',  
keys(%unicode_accents));
-    if (!exists($style_map{$style}->{'args'}) or 
(scalar(@{$style_map{$style}->{'args'}}) eq 1 and 
$style_map{$style}->{'args'}->[0] eq 'code'))
+    next if grep {$style eq $_} ('asis', 'ctrl', 'w');
+    if (grep {$style eq $_} ('tieaccent', 'dotless', keys(%unicode_accents)))
+    {
+     $style_map{$style} = { 'function' => \&xml_default_accent };
+    }
+    elsif (!exists($style_map{$style}->{'args'}) or 
(scalar(@{$style_map{$style}->{'args'}}) eq 1 and 
($style_map{$style}->{'args'}->[0] eq 'code' or 
$style_map{$style}->{'args'}->[0] eq 'normal')))
     {
         $style_map{$style}->{'attribute'} = $style;
         delete ($style_map{$style}->{'quote'});
@@ -315,9 +318,10 @@
     $setfilename = 
"<setfilename>$Texi2HTML::THISDOC{file_base_name}.$EXTENSION</setfilename>" 
         unless (defined($Texi2HTML::THISDOC{'setfilename'}) and 
$Texi2HTML::THISDOC{'setfilename'} ne '');
     my $language = get_conf('documentlanguage');
+    my $doctype = get_conf('doctype');
     print $fh <<EOT;
 <?xml version="1.0"?>
-$DOCTYPE
+$doctype
 <texinfo xml:lang="$language">
 $setfilename
 EOT

Index: test/run_test.sh
===================================================================
RCS file: /cvsroot/texi2html/texi2html/test/run_test.sh,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- test/run_test.sh    23 May 2009 17:09:42 -0000      1.15
+++ test/run_test.sh    24 May 2009 22:29:10 -0000      1.16
@@ -9,6 +9,7 @@
 
 res_dir=res
 out_dir=out
+command=texi2html.pl
 diffs_dir=diffs
 
 logfile=tests.log
@@ -85,23 +86,15 @@
     if [ "z$clean" = 'zyes' ]; then
       [ -d "$out_dir/$dir" ] && rm -rf "$out_dir/$dir"
     else
-      do_info=no
-      if echo "$remaining" | grep -qs -- '-init info\.init'; then
-         do_info=yes
-      fi
-      if echo "$remaining" | grep -qs -- '--info'; then
-         do_info=yes
-      fi
       if [ -d "$out_dir/$dir" ]; then
         if [ -d "$res_dir/$dir" ]; then
           # ugly hack to avoid CVS
-          rm "$res_dir/$dir/"*.*
+          rm -f "$res_dir/$dir/"*.*
         else
            mkdir "$res_dir/$dir/"
         fi
         cp -r "$out_dir/$dir/"* "$res_dir/$dir/"
         rm -f "$res_dir/$dir/"*.png "$res_dir/$dir/"*_l2h.css
-        #[ z"$do_info" = z'yes' ] && rm "$res_dir/$dir/$basename.2"
       else
         echo "No dir $out_dir/$dir" 1>&2
       fi
@@ -151,10 +144,10 @@
     # -I $testdir/$srcdir_test/ is useful when file name is found using 
     # @setfilename
     echo "$dir" >> $logfile
-    echo "perl -w -x $testdir/$srcdir_test/../../texi2html.pl -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out $out_dir/$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
-dump-texi $remaining $src_file 2>$out_dir/$dir/$basename.2" >> $logfile
-    eval "perl -w -x $testdir/$srcdir_test/../../texi2html.pl -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out $out_dir/$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
-dump-texi $remaining $src_file 2>$out_dir/$dir/$basename.2"
-    echo "perl -w -x $testdir/$srcdir_test/../../texi2html.pl -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out $out_dir/$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
--macro-expand=$out_dir/$dir/$basename.texi $remaining $src_file 
2>>$out_dir/$dir/$basename.2" >> $logfile
-    eval "perl -w -x $testdir/$srcdir_test/../../texi2html.pl -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out $out_dir/$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
--macro-expand=$out_dir/$dir/$basename.texi $remaining $src_file 
2>>$out_dir/$dir/$basename.2" 
+    echo "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out $out_dir/$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
-dump-texi $remaining $src_file 2>$out_dir/$dir/$basename.2" >> $logfile
+    eval "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out $out_dir/$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
-dump-texi $remaining $src_file 2>$out_dir/$dir/$basename.2"
+    echo "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out $out_dir/$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
--macro-expand=$out_dir/$dir/$basename.texi $remaining $src_file 
2>>$out_dir/$dir/$basename.2" >> $logfile
+    eval "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out $out_dir/$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
--macro-expand=$out_dir/$dir/$basename.texi $remaining $src_file 
2>>$out_dir/$dir/$basename.2" 
     ret=$?
   else
     use_latex2html=no
@@ -183,8 +176,8 @@
     echo "$dir" >> $logfile
     echo >> $stdout_file
     echo "  ----> $dir" >> $stdout_file
-    echo "perl -w -x $testdir/$srcdir_test/../../texi2html.pl -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -I 
$testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ -test --out $out_dir/$dir/ 
$remaining $src_file >> $stdout_file 2>$out_dir/$dir/$basename.2" >> $logfile
-    eval "perl -w -x $testdir/$srcdir_test/../../texi2html.pl -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -I 
$testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ -test --out $out_dir/$dir/ 
$remaining $src_file >> $stdout_file 2>$out_dir/$dir/$basename.2"
+    echo "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -I 
$testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ -test --out $out_dir/$dir/ 
$remaining $src_file >> $stdout_file 2>$out_dir/$dir/$basename.2" >> $logfile
+    eval "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -I 
$testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ -test --out $out_dir/$dir/ 
$remaining $src_file >> $stdout_file 2>$out_dir/$dir/$basename.2"
     ret=$?
     rm -f $out_dir/$dir/*_l2h_images.log $out_dir/$dir/*_tex4ht_*.log \
       $out_dir/$dir/*_tex4ht_*.idv $out_dir/$dir/*_tex4ht_*.dvi \

Index: test/run_test_all.sh
===================================================================
RCS file: test/run_test_all.sh
diff -N test/run_test_all.sh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ test/run_test_all.sh        24 May 2009 22:29:10 -0000      1.1
@@ -0,0 +1,245 @@
+#! /bin/sh
+
+#set -x
+
+#echo "SRCDIR $srcdir srcdir_test $srcdir_test"
+
+export LANG=C
+
+
+res_dir=res
+out_dir=out
+command=texi2html.pl
+diffs_dir=diffs
+
+logfile=tests.log
+stdout_file=tests.out
+
+commands='texi2html.pl: makeinfo.pl:_info texi2all.pl:_all'
+
+clean=no
+if [ z"$1" = 'z-clean' ]; then
+  clean=yes
+  shift
+fi
+
+copy=no
+if [ z"$1" = 'z-copy' ]; then
+  [ -d "$res_dir" ] || mkdir "$res_dir"
+  copy=yes
+  shift
+fi
+
+no_latex2html=yes
+if which latex2html > /dev/null 2>&1; then
+  no_latex2html=no
+fi
+
+no_tex4ht=yes
+if which httexi > /dev/null 2>&1; then
+  no_tex4ht=no
+fi
+
+one_test=no
+if [ z"$1" != 'z' ]; then
+  one_test=yes
+  the_test=$1
+  if [ "z$the_test" = "ztexi" ]; then
+    the_file=$2
+    [ "z$the_file" != "z" ] && the_basename=`basename $the_file .texi`
+  fi
+fi
+
+if [ "z$srcdir_test" = 'z' ]; then
+  testdir=.
+  srcdir_test=.
+else
+  if [ "z$srcdir" = 'z' ]; then
+     testdir=..
+  else
+     testdir=../$srcdir
+  fi
+fi
+
+base_results_dir="$testdir/$srcdir_test"
+test_file='tests.txt'
+driving_file="$testdir/$srcdir_test/$test_file"
+
+if [ -f "$driving_file" ]; then
+  :
+else
+  echo "Cannot find test driving file $driving_file" 1>&2
+  exit 1
+fi
+
+if [ "z$clean" = 'zyes' -o "z$copy" = 'zyes' ]; then
+  while read line
+  do
+    if echo $line | grep -qs '^ *#'; then continue; fi
+# there are better ways
+    dir=`echo $line | awk '{print $1}'`
+    file=`echo $line | awk '{print $2}'`
+    remaining=`echo $line | sed 's/[a-zA-Z0-9_./-]\+ \+[a-zA-Z0-9_./-]\+ *//'`
+    [ "z$dir" = 'z' -o "$zfile" = 'z' ] && continue
+    basename=`basename $file .texi`
+    if [ "z$dir" = 'ztexi' ]; then
+      dir="texi_${basename}"
+    fi
+    if [ "z$clean" = 'zyes' ]; then
+      for command_dir in $commands; do
+        dir_suffix=`echo $command_dir | cut -d':' -f2`
+        outdir="${out_dir}${dir_suffix}/"
+        [ -d "${outdir}$dir" ] && rm -rf "${outdir}$dir"
+      done
+    else
+      for command_dir in $commands; do
+        dir_suffix=`echo $command_dir | cut -d':' -f2`
+        outdir="${out_dir}${dir_suffix}/"
+        resdir="${res_dir}${dir_suffix}/"
+        if [ -d "${outdir}$dir" ]; then
+          if [ -d "${resdir}$dir" ]; then
+          # ugly hack to avoid CVS
+            rm -f "${resdir}$dir/"*.*
+          else
+             mkdir "${resdir}$dir/"
+          fi
+          cp -r "${outdir}$dir/"* "${resdir}$dir/"
+          rm -f "${resdir}$dir/"*.png "${resdir}$dir/"*_l2h.css
+        else
+          echo "No dir ${outdir}$dir" 1>&2
+        fi
+      done
+    fi
+  done < "$driving_file"
+  exit 0
+fi
+
+. ../path_separator || exit 1
+
+[ -d "$diffs_dir" ] || mkdir "$diffs_dir"
+for command_dir in $commands; do
+  dir_suffix=`echo $command_dir | cut -d':' -f2`
+  outdir="${out_dir}${dir_suffix}/"
+  [ -d "${outdir}" ] || mkdir "${outdir}"
+done
+
+if tmp_dir=`mktemp -p /tmp -d l2h_t2h_XXXXXXXX`; then
+  echo "\$L2H_TMP = '$tmp_dir';" > l2h_tmp_dir.init
+  echo "1;" >> l2h_tmp_dir.init
+else
+  exit 1
+fi
+
+echo "base_result_dir $base_results_dir, driving_file $driving_file" > $logfile
+echo "" > $stdout_file
+
+return_code=0
+
+while read line
+do
+  if echo $line | grep -qs '^ *#'; then continue; fi
+# there are better ways
+  current=`echo $line | awk '{print $1}'`
+  file=`echo $line | awk '{print $2}'`
+  [ "z$current" = 'z' -o "$zfile" = 'z' ] && continue
+  basename=`basename $file .texi`
+  remaining=`echo $line | sed 's/[a-zA-Z0-9_./-]\+ \+[a-zA-Z0-9_./-]\+ *//' | 
sed 's,@PATH_SEPARATOR@,'"${PATH_SEPARATOR}$testdir/$srcdir_test/"',g'`
+  src_file="$testdir/$srcdir_test/$file"
+  if [ $one_test = 'yes' -a "z$current" != "z$the_test" ]; then
+    continue
+  fi
+  for command_dir in $commands; do
+    command=`echo $command_dir | cut -d':' -f1`
+    dir_suffix=`echo $command_dir | cut -d':' -f2`
+    outdir="${out_dir}${dir_suffix}/"
+    results_dir="$testdir/$srcdir_test/${res_dir}${dir_suffix}"
+    if [ "z$current" = 'ztexi' ]; then
+      if [ $one_test = 'yes' -a "z$the_basename" != 'z' -a "z$basename" != 
"z$the_basename" ]; then
+        continue 2
+      fi
+      one_test_done=yes
+      dir="texi_${basename}"
+
+      [ -d "${outdir}$dir" ] && rm -rf "${outdir}$dir"
+      mkdir "${outdir}$dir"
+      # -I $testdir/$srcdir_test/ is useful when file name is found using 
+      # @setfilename
+      echo "$command $dir" >> $logfile
+      echo "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out ${outdir}$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
-dump-texi $remaining $src_file 2>${outdir}$dir/$basename.2" >> $logfile
+      eval "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out ${outdir}$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
-dump-texi $remaining $src_file 2>${outdir}$dir/$basename.2"
+      echo "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out ${outdir}$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
--macro-expand=${outdir}$dir/$basename.texi $remaining $src_file 
2>>${outdir}$dir/$basename.2" >> $logfile
+      eval "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -test 
--out ${outdir}$dir/ -I $testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ 
--macro-expand=${outdir}$dir/$basename.texi $remaining $src_file 
2>>${outdir}$dir/$basename.2" 
+      ret=$?
+    else
+      use_latex2html=no
+      use_tex4ht=no
+      if echo "$remaining" | grep -qs -- '-l2h'; then
+        if [ "$no_latex2html" = 'yes' ]; then
+          echo "S: (no latex2html) $current"
+          continue 2
+        fi
+        use_latex2html=yes
+      elif echo "$remaining" | grep -qs -- '-init tex4ht.init'; then
+        if [ "$no_tex4ht" = 'yes' ]; then
+          echo "S: (no tex4ht) $current"
+          continue 2
+        fi
+        use_tex4ht=yes
+      fi
+      one_test_done=yes
+      dir=$current
+      [ -d "${outdir}$dir" ] && rm -rf "${outdir}$dir"
+      mkdir "${outdir}$dir"
+      echo "$command $dir" >> $logfile
+      echo >> $stdout_file
+      echo "  ----> $command $dir" >> $stdout_file
+      echo "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -I 
$testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ -test --out ${outdir}$dir/ 
$remaining $src_file >> $stdout_file 2>${outdir}$dir/$basename.2" >> $logfile
+      eval "perl -w -x $testdir/$srcdir_test/../../$command -conf-dir 
$testdir/$srcdir_test/../../examples -conf-dir 
$testdir/$srcdir_test/../../formats -conf-dir $testdir/$srcdir_test/ -I 
$testdir/$srcdir_test/ -I $testdir/$srcdir_test/../ -test --out ${outdir}$dir/ 
$remaining $src_file >> $stdout_file 2>${outdir}$dir/$basename.2"
+      ret=$?
+      rm -f ${outdir}$dir/*_l2h_images.log ${outdir}$dir/*_tex4ht_*.log \
+        ${outdir}$dir/*_tex4ht_*.idv ${outdir}$dir/*_tex4ht_*.dvi \
+        ${outdir}$dir/*_tex4ht_tex.html
+    fi
+    if [ $ret = 0 ]; then
+      diff_base="${dir}${dir_suffix}"
+      sed -i -e 's/^texexpand.*/texexpand /' "${outdir}$dir/$basename.2"
+      sed -i '/is no longer supported at.*line/d' "${outdir}$dir/$basename.2"
+      if [ "$use_latex2html" = 'yes' ]; then
+        sed -i -e 's/CONTENT="LaTeX2HTML.*/CONTENT="LaTeX2HTML">/' -e \
+         's/with LaTeX2HTML.*/with LaTeX2HTML/' "${outdir}$dir/"*"_l2h.html"
+        # "*"_images.pl" files are not guaranteed to be present
+        for file in "${outdir}$dir/"*"_images.pl" 
"${outdir}$dir/"*"_labels.pl"; do
+         if [ -f "$file" ]; then
+          sed -i -e 's/^# LaTeX2HTML.*/# LaTeX2HTML/' "$file"
+         fi
+        done
+        rm -f "${outdir}$dir/"*".aux"  "${outdir}$dir/"*"_images.out"
+      fi
+      if [ -d "$results_dir/$dir" ]; then
+      #exclude_info=
+      #[ z"$do_info" = z'yes' ] && exclude_info="--exclude=$basename.2"
+        diff -a -u --exclude=CVS --exclude='*.png' --exclude='*_l2h.css' -r 
"$results_dir/$dir" "${outdir}$dir" 2>>$logfile > "$diffs_dir/$diff_base.diff"
+        dif_ret=$?
+        if [ $dif_ret != 0 ]; then
+          echo "D: $diffs_dir/$diff_base.diff"
+          return_code=1
+        else
+          rm "$diffs_dir/$diff_base.diff"
+        fi
+      else
+        echo "no res($command): $dir"
+      fi
+    else
+      echo "F: ${outdir}$dir/$basename.2"
+      return_code=1
+    fi
+  done
+done < "$driving_file"
+
+rm -rf $tmp_dir
+
+if [ "$one_test" = 'yes' -a "z$one_test_done" != "zyes" ]; then
+  echo "$the_test $the_file test not found"
+fi
+
+exit $return_code

Index: test/encodings/res/accentenc_encoding_use_entity/accentenc.2
===================================================================
RCS file: test/encodings/res/accentenc_encoding_use_entity/accentenc.2
diff -N test/encodings/res/accentenc_encoding_use_entity/accentenc.2

Index: test/encodings/res/accentenc_encoding_use_entity/accentenc.html
===================================================================
RCS file: test/encodings/res/accentenc_encoding_use_entity/accentenc.html
diff -N test/encodings/res/accentenc_encoding_use_entity/accentenc.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ test/encodings/res/accentenc_encoding_use_entity/accentenc.html     24 May 
2009 22:29:11 -0000      1.1
@@ -0,0 +1,128 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
+<html>
+<!-- Created on a sunny day by texi2html
+texi2html was written by: 
+            Lionel Cons <address@hidden> (original author)
+            Karl Berry  <address@hidden>
+            Olaf Bachmann <address@hidden>
+            and many others.
+Maintained by: Many creative people.
+Send bugs and suggestions to <address@hidden>
+-->
+<head>
+<title>Accent encoding test</title>
+
+<meta name="description" content="Accent encoding test">
+<meta name="keywords" content="Accent encoding test">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="Generator" content="texi2html">
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+pre.display {font-family: serif}
+pre.format {font-family: serif}
+pre.menu-comment {font-family: serif}
+pre.menu-preformatted {font-family: serif}
+pre.smalldisplay {font-family: serif; font-size: smaller}
+pre.smallexample {font-size: smaller}
+pre.smallformat {font-family: serif; font-size: smaller}
+pre.smalllisp {font-size: smaller}
+span.roman {font-family:serif; font-weight:normal;}
+span.sansserif {font-family:sans-serif; font-weight:normal;}
+ul.toc {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" 
vlink="#800080" alink="#FF0000">
+
+<a name="Top"></a>
+<a name="Accent-encoding-test-top"></a>
+<h1 class="unnumbered">Accent encoding test top</h1>
+
+
+<p>should be e&lsquo;: è è
+</p>
+<p>should be e&rsquo;: é é
+</p>
+<p>should be e^: ê ê
+</p>
+<p>should be u&quot;: ü ü
+</p>
+<p>should be i&lsquo;: ì ì
+</p>
+<p>should be i&rsquo;: í í
+</p>
+<p>should be i^: î î
+</p>
+<p>should be u&quot;: ü ü
+</p>
+<p>should be c,: ç ç
+</p>
+<p>should be n~: ñ ñ
+</p>
+<p>should be e=: &#275; &#275;
+</p>
+<p>should be e&rsquo;&rsquo;: e'' e''
+</p>
+<p>should be e.: &#279; &#279;
+</p>
+<p>should be e*: e* e*
+</p>
+<p>should be ee[: ee[
+</p>
+<p>should be e(: &#277; &#277;
+</p>
+<p>should be e_: e_ e_
+</p>
+<p>should be .e: &#7865; &#7865;
+</p>
+<p>should be e&lt;: e&lt; e&lt;
+</p>
+<p>upside down: &iquest; &iexcl;
+</p>
+<p>A-with-circle: &aring;,&Aring;
+</p>
+<p>AE, OE ligatures: &aelig; &AElig; &oelig; &OElig;
+</p>
+<p>dotless i, j: i j
+</p>
+<p>Polish suppressed-L: &#322; &#321;
+</p>
+<p>O-with-slash: &oslash; &Oslash;
+</p>
+<p>es-zet or sharp S: &szlig;          
+</p>
+<p>pounds sterling: &pound;      
+</p>
+<p>should be dotless i&lsquo;: ì
+</p>
+<p>should be dotless i&rsquo;: í
+</p>
+<p>should be dotless i^: î
+</p>
+<p>should be dotless i&quot;: ï
+</p>
+<p>should be dotless j&lsquo;: j`
+</p>
+<p>should be dotless j&rsquo;: j'
+</p>
+<p>should be dotless j^: &#309;
+</p>
+<p>should be dotless j&quot;: j"
+</p>
+<hr size="1">
+<p>
+ <font size="-1">
+  This document was generated by <em>a tester</em> on <em>a sunny day</em> 
using <a href="http://www.nongnu.org/texi2html/";><em>texi2html</em></a>.
+ </font>
+ <br>
+
+</p>
+</body>
+</html>




reply via email to

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