[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO texi2any.pl Texinfo/Common.pm T...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO texi2any.pl Texinfo/Common.pm T... |
Date: |
Tue, 05 Apr 2011 22:43:37 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/04/05 22:43:36
Modified files:
tp : TODO texi2any.pl
tp/Texinfo : Common.pm Parser.pm Structuring.pm
tp/Texinfo/Convert: Converter.pm HTML.pm Info.pm Plaintext.pm
Log message:
Separate conf from state, and use a function to get it.
Add a next and prev dor elements, as well as the node even if split by
section.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.118&r2=1.119
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/texi2any.pl?cvsroot=texinfo&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.234&r2=1.235
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Structuring.pm?cvsroot=texinfo&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Converter.pm?cvsroot=texinfo&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Info.pm?cvsroot=texinfo&r1=1.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.130&r2=1.131
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -b -r1.118 -r1.119
--- TODO 3 Apr 2011 22:48:27 -0000 1.118
+++ TODO 5 Apr 2011 22:43:35 -0000 1.119
@@ -46,6 +46,9 @@
When the HTML.pm is finished, document the API, that is everything
in Texinfo::Config.
+Add an API for everything used in conf, for example in page_head, use
+$self->title_string() and so on and so forth.
+
Handle
@xrefautomaticsectiontitle on|off
(does nothing in info, in HTML automatically set the section name as 3rd
Index: texi2any.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/texi2any.pl,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- texi2any.pl 3 Apr 2011 17:04:31 -0000 1.28
+++ texi2any.pl 5 Apr 2011 22:43:36 -0000 1.29
@@ -203,67 +203,6 @@
{
package Texinfo::Config;
-my @document_settable_at_commands =
- ('everyheading', 'everyfooting', 'evenheading',
- 'evenfooting', 'oddheading', 'oddfooting', 'headings',
- 'allowcodebreaks', 'frenchspacing', 'exampleindent',
- 'firstparagraphindent', 'paragraphindent', 'clickstyle',
- 'documentlanguage');
-
-# those should be unique
-my @document_global_at_commands = ('contents', 'shortcontents',
- 'setcontentsaftertitlepage', 'setshortcontentsaftertitlepage',
- 'footnotestyle', 'novalidate', 'kbdinputstyle', 'documentencoding',
- 'setfilename', 'today', 'documentdescription',
- 'everyheadingmarks','everyfootingmarks',
-
'evenheadingmarks','oddheadingmarks','evenfootingmarks','oddfootingmarks',
- 'fonttextsize', 'pagesizes', 'setchapternewpage'
- );
-
-
-my @command_line_settables = ('FILLCOLUMN', 'SPLIT', 'SPLIT_SIZE',
- 'HEADERS',
- 'MACRO_EXPAND', 'NUMBER_SECTIONS',
- 'NUMBER_FOOTNOTES', 'NODE_FILES',
- 'NO_WARN', 'VERBOSE',
- 'TRANSLITERATE_FILE_NAMES', 'ERROR_LIMIT', 'ENABLE_ENCODING',
- 'FORCE', 'INTERNAL_LINKS', 'OUTFILE', 'SUBDIR', 'OUT',
- 'BATCH', 'SILENT'
-);
-
-# FIXME TOP_HEADING_AT_BEGINNING seems to be a no-op
-my @variable_settables = (
- 'DEBUG', 'FRAMES', 'FRAMESET_DOCTYPE', 'DOCTYPE', 'TEST', 'DUMP_TEXI',
- 'TOP_FILE', 'TOC_FILE', 'SHOW_MENU', 'USE_NODES', 'TOC_LINKS', 'SHORTEXTN',
- 'PREFIX', 'SHORT_REF', 'IDX_SUMMARY', 'DEF_TABLE', 'L2H', 'MONOLITHIC',
- 'L2H_L2H', 'L2H_SKIP', 'L2H_TMP', 'L2H_FILE', 'L2H_CLEAN',
- 'L2H_HTML_VERSION', 'IGNORE_PREAMBLE_TEXT', 'EXTERNAL_DIR', 'USE_ISO',
- 'SPLIT_INDEX', 'IN_ENCODING', 'USE_NLS',
- 'VERTICAL_HEAD_NAVIGATION', 'INLINE_CONTENTS', 'NODE_FILE_EXTENSION',
- 'NO_CSS', 'INLINE_CSS_STYLE', 'USE_SECTIONS', 'USE_TITLEPAGE_FOR_TITLE',
- 'SIMPLE_MENU', 'EXTENSION', 'INLINE_INSERTCOPYING', 'USE_NUMERIC_ENTITY',
- 'I18N_PERL_HASH', 'ENABLE_ENCODING_USE_ENTITY', 'ICONS', 'USE_UNICODE',
- 'USE_UNIDECODE', 'DATE_IN_HEADER', 'OPEN_QUOTE_SYMBOL',
- 'CLOSE_QUOTE_SYMBOL', 'TOP_NODE_UP', 'TOP_NODE_FILE',
- 'TOP_NODE_FILE_TARGET', 'SHOW_TITLE', 'WORDS_IN_PAGE',
- 'HEADER_IN_TABLE', 'USE_ACCESSKEY', 'USE_REL_REV', 'USE_LINKS',
- 'OVERVIEW_LINK_TO_TOC', 'AVOID_MENU_REDUNDANCY', 'NODE_NAME_IN_MENU',
- 'NODE_NAME_IN_INDEX', 'USE_SETFILENAME', 'USE_SETFILENAME_EXTENSION',
- 'COMPLEX_FORMAT_IN_TABLE',
- 'USE_UP_FOR_ADJACENT_NODES', 'TOP_HEADING_AT_BEGINNING',
- 'SEPARATE_DESCRIPTION', 'IGNORE_BEFORE_SETFILENAME',
- 'COMPLETE_IMAGE_PATHS', 'USE_NODE_TARGET', 'NEW_CROSSREF_STYLE',
- 'PROGRAM_NAME_IN_FOOTER', 'NODE_FILENAMES', 'DEFAULT_ENCODING',
- 'OUT_ENCODING', 'ENCODING_NAME', 'EXTERNAL_CROSSREF_SPLIT', 'BODYTEXT',
- 'CSS_LINES', 'RENAMED_NODES_REDIRECTIONS', 'RENAMED_NODES_FILE',
- 'TEXI2DVI', 'DUMP_TREE', 'MAX_MACRO_CALL_NESTING');
-
-my %valid_options;
-foreach my $var (@document_settable_at_commands, @document_global_at_commands,
- @command_line_settables, @variable_settables) {
- $valid_options{$var} = 1;
-}
-
# passed from main program
my $cmdline_options;
# used in main program
@@ -286,7 +225,7 @@
sub set_from_init_file ($$) {
my $var = shift;
my $value = shift;
- if (!$valid_options{$var}) {
+ if (!Texinfo::Common::valid_option($var)) {
warn (sprintf(__('Unknown variable %s'), $var));
return 0;
}
@@ -299,8 +238,8 @@
my $var = shift;
my $value = shift;
delete $options->{$var};
- if (!$valid_options{$var}) {
- warn (sprintf(main::__('Unknown variable %s'), $var));
+ if (!Texinfo::Common::valid_option($var)) {
+ warn (sprintf(main::__("Unknown variable %s\n"), $var));
return 0;
}
$cmdline_options->{$var} = $value;
Index: Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- Texinfo/Common.pm 28 Mar 2011 23:52:37 -0000 1.28
+++ Texinfo/Common.pm 5 Apr 2011 22:43:36 -0000 1.29
@@ -71,6 +71,73 @@
$null_device_file{'NUL'} = 1;
}
+#Â configuration options
+my @document_settable_at_commands =
+ ('everyheading', 'everyfooting', 'evenheading',
+ 'evenfooting', 'oddheading', 'oddfooting', 'headings',
+ 'allowcodebreaks', 'frenchspacing', 'exampleindent',
+ 'firstparagraphindent', 'paragraphindent', 'clickstyle',
+ 'documentlanguage');
+
+# those should be unique
+my @document_global_at_commands = ('contents', 'shortcontents',
+ 'setcontentsaftertitlepage', 'setshortcontentsaftertitlepage',
+ 'footnotestyle', 'novalidate', 'kbdinputstyle', 'documentencoding',
+ 'setfilename', 'today', 'documentdescription',
+ 'everyheadingmarks','everyfootingmarks',
+
'evenheadingmarks','oddheadingmarks','evenfootingmarks','oddfootingmarks',
+ 'fonttextsize', 'pagesizes', 'setchapternewpage'
+ );
+
+
+my @command_line_settables = ('FILLCOLUMN', 'SPLIT', 'SPLIT_SIZE',
+ 'HEADERS',
+ 'MACRO_EXPAND', 'NUMBER_SECTIONS',
+ 'NUMBER_FOOTNOTES', 'NODE_FILES',
+ 'NO_WARN', 'VERBOSE',
+ 'TRANSLITERATE_FILE_NAMES', 'ERROR_LIMIT', 'ENABLE_ENCODING',
+ 'FORCE', 'INTERNAL_LINKS', 'OUTFILE', 'SUBDIR', 'OUT',
+ 'BATCH', 'SILENT'
+);
+
+# FIXME TOP_HEADING_AT_BEGINNING seems to be a no-op
+my @variable_settables = (
+ 'DEBUG', 'FRAMES', 'FRAMESET_DOCTYPE', 'DOCTYPE', 'TEST', 'DUMP_TEXI',
+ 'TOP_FILE', 'TOC_FILE', 'SHOW_MENU', 'USE_NODES', 'TOC_LINKS', 'SHORTEXTN',
+ 'PREFIX', 'SHORT_REF', 'IDX_SUMMARY', 'DEF_TABLE', 'L2H', 'MONOLITHIC',
+ 'L2H_L2H', 'L2H_SKIP', 'L2H_TMP', 'L2H_FILE', 'L2H_CLEAN',
+ 'L2H_HTML_VERSION', 'IGNORE_PREAMBLE_TEXT', 'EXTERNAL_DIR', 'USE_ISO',
+ 'SPLIT_INDEX', 'IN_ENCODING', 'USE_NLS',
+ 'VERTICAL_HEAD_NAVIGATION', 'INLINE_CONTENTS', 'NODE_FILE_EXTENSION',
+ 'NO_CSS', 'INLINE_CSS_STYLE', 'USE_SECTIONS', 'USE_TITLEPAGE_FOR_TITLE',
+ 'SIMPLE_MENU', 'EXTENSION', 'INLINE_INSERTCOPYING', 'USE_NUMERIC_ENTITY',
+ 'I18N_PERL_HASH', 'ENABLE_ENCODING_USE_ENTITY', 'ICONS', 'USE_UNICODE',
+ 'USE_UNIDECODE', 'DATE_IN_HEADER', 'OPEN_QUOTE_SYMBOL',
+ 'CLOSE_QUOTE_SYMBOL', 'TOP_NODE_UP', 'TOP_NODE_FILE',
+ 'TOP_NODE_FILE_TARGET', 'SHOW_TITLE', 'WORDS_IN_PAGE',
+ 'HEADER_IN_TABLE', 'USE_ACCESSKEY', 'USE_REL_REV', 'USE_LINKS',
+ 'OVERVIEW_LINK_TO_TOC', 'AVOID_MENU_REDUNDANCY', 'NODE_NAME_IN_MENU',
+ 'NODE_NAME_IN_INDEX', 'USE_SETFILENAME', 'USE_SETFILENAME_EXTENSION',
+ 'COMPLEX_FORMAT_IN_TABLE',
+ 'USE_UP_FOR_ADJACENT_NODES', 'TOP_HEADING_AT_BEGINNING',
+ 'SEPARATE_DESCRIPTION', 'IGNORE_BEFORE_SETFILENAME',
+ 'COMPLETE_IMAGE_PATHS', 'USE_NODE_TARGET', 'NEW_CROSSREF_STYLE',
+ 'PROGRAM_NAME_IN_FOOTER', 'NODE_FILENAMES', 'DEFAULT_ENCODING',
+ 'OUT_ENCODING', 'ENCODING_NAME', 'EXTERNAL_CROSSREF_SPLIT', 'BODYTEXT',
+ 'CSS_LINES', 'RENAMED_NODES_REDIRECTIONS', 'RENAMED_NODES_FILE',
+ 'TEXI2DVI', 'DUMP_TREE', 'MAX_MACRO_CALL_NESTING');
+
+my %valid_options;
+foreach my $var (@document_settable_at_commands, @document_global_at_commands,
+ @command_line_settables, @variable_settables) {
+ $valid_options{$var} = 1;
+}
+
+sub valid_option($)
+{
+ my $option = shift;
+ return $valid_options{$option};
+}
our %no_brace_commands; # commands never taking braces
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -b -r1.234 -r1.235
--- Texinfo/Parser.pm 5 Apr 2011 00:01:45 -0000 1.234
+++ Texinfo/Parser.pm 5 Apr 2011 22:43:36 -0000 1.235
@@ -129,7 +129,7 @@
}
# FIXME do that in the converters when @documentlanguage is found.
- my $lang = $self->{'documentlanguage'};
+ my $lang = $self->get_conf('documentlanguage');
$lang = $DEFAULT_LANGUAGE if (!defined($lang));
my @langs = ($lang);
if ($lang =~ /^([a-z]+)_([A-Z]+)/) {
@@ -186,7 +186,7 @@
}
}
# FIXME reuse a parser?
- if ($self->{'DEBUG'}) {
+ if ($self->get_conf('DEBUG')) {
$parser_conf->{'DEBUG'} = 1;
print STDERR "GDT $result\n";
}
@@ -678,6 +678,13 @@
return $parser;
}
+sub get_conf($$)
+{
+ my $self = shift;
+ my $var = shift;
+ return $self->{$var};
+}
+
# split a scalar text in an array lines.
sub _text_to_lines($)
{
Index: Texinfo/Structuring.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Structuring.pm,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- Texinfo/Structuring.pm 5 Apr 2011 00:01:46 -0000 1.46
+++ Texinfo/Structuring.pm 5 Apr 2011 22:43:36 -0000 1.47
@@ -576,9 +576,13 @@
delete $current->{'extra'}->{'no_section'};
$current->{'extra'}->{'section'}
= $content->{'extra'}->{'associated_section'};
+ $current->{'extra'}->{'node'} = $content;
} else {
$current = { 'type' => 'element', 'extra'
- => {'section' => $content->{'extra'}->{'associated_section'}}};
+ => {'section' => $content->{'extra'}->{'associated_section'},
+ 'node' => $content }};
+ $current->{'element_prev'} = $elements->[-1];
+ $elements->[-1]->{'element_next'} = $current;
push @$elements, $current;
}
} elsif ($content->{'cmdname'} and $content->{'cmdname'} ne 'node'
@@ -588,6 +592,8 @@
$current->{'extra'}->{'section'} = $content;
} elsif ($current->{'extra'}->{'section'} ne $content) {
$current = { 'type' => 'element', 'extra' => {'section' => $content}};
+ $current->{'element_prev'} = $elements->[-1];
+ $elements->[-1]->{'element_next'} = $current;
push @$elements, $current;
}
}
Index: Texinfo/Convert/Converter.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Converter.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- Texinfo/Convert/Converter.pm 5 Apr 2011 00:01:46 -0000 1.8
+++ Texinfo/Convert/Converter.pm 5 Apr 2011 22:43:36 -0000 1.9
@@ -23,6 +23,7 @@
use strict;
use Texinfo::Report;
+use Texinfo::Common;
use vars qw(@ISA);
@ISA = qw(Texinfo::Report);
@@ -85,8 +86,12 @@
}
my %defaults = $converter->_defaults();
foreach my $key (keys(%defaults)) {
+ if (Texinfo::Common::valid_option($key)) {
+ $converter->{'conf'}->{$key} = $defaults{$key};
+ } else {
$converter->{$key} = $defaults{$key};
}
+ }
if (defined($conf)) {
if ($conf->{'parser'}) {
$converter->{'parser'} = $conf->{'parser'};
@@ -103,12 +108,12 @@
$converter->{'floats'} = $floats if ($floats);
$converter->{'labels'} = $labels if ($labels);
- $converter->{'setcontentsaftertitlepage'} = 1
+ $converter->set_conf('setcontentsaftertitlepage', 1)
if ($converter->{'extra'}->{'contents'}
and $converter->{'extra'}->{'setcontentsaftertitlepage'}
and $converter->{'structuring'}
and $converter->{'structuring'}->{'sectioning_root'});
- $converter->{'setshortcontentsaftertitlepage'} = 1
+ $converter->set_conf('setshortcontentsaftertitlepage', 1)
if (($converter->{'extra'}->{'shortcontents'}
or $converter->{'extra'}->{'summarycontents'})
and $converter->{'extra'}->{'setshortcontentsaftertitlepage'}
@@ -133,7 +138,11 @@
# many things may be passed down
#warn "$key not a possible configuration in $name\n";
} else {
+ if (Texinfo::Common::valid_option($key)) {
+ $converter->{'conf'}->{$key} = $conf->{$key};
+ } else {
$converter->{$key} = $conf->{$key};
+ }
$converter->{'set'}->{$key} = 1;
}
}
@@ -176,9 +185,50 @@
my $root = $converter->{'extra'}->{$global_command}->[0];
next if ($converter->{'set'}->{$root->{'cmdname'}}
or !exists($defaults{$root->{'cmdname'}}));
- $converter->{$root->{'cmdname'}} = $defaults{$root->{'cmdname'}};
+ $converter->set_conf($root->{'cmdname'}, $defaults{$root->{'cmdname'}});
+ }
}
+}
+
+sub get_conf($$)
+{
+ my $self = shift;
+ my $conf = shift;
+ if (!Texinfo::Common::valid_option($conf)) {
+ warn "BUG: unknown option $conf\n";
+ return undef;
+ }
+ return $self->{'conf'}->{$conf};
+}
+
+sub set_conf($$$)
+{
+ my $self = shift;
+ my $conf = shift;
+ my $value = shift;
+ if (!Texinfo::Common::valid_option($conf)) {
+ warn "BUG: unknown option $conf\n";
+ return undef;
+ }
+ if ($self->{'set'}->{$conf}) {
+ return 0;
+ } else {
+ $self->{'conf'}->{$conf} = $value;
+ return 1;
+ }
+}
+
+sub force_conf($$$)
+{
+ my $self = shift;
+ my $conf = shift;
+ my $value = shift;
+ if (!Texinfo::Common::valid_option($conf)) {
+ warn "BUG: unknown option $conf\n";
+ return undef;
}
+ $self->{'conf'}->{$conf} = $value;
+ return 1;
}
my $STDIN_DOCU_NAME = 'stdin';
@@ -208,43 +258,47 @@
my $document_name;
# determine output file and output file name
- if (!defined($self->{'OUTFILE'})) {
+ my $outfile;
+ if (!defined($self->get_conf('OUTFILE'))) {
if (defined($setfilename)) {
- $self->{'OUTFILE'} = $setfilename;
- if (!$self->{'USE_SETFILENAME_EXTENSION'}) {
- $self->{'OUTFILE'} =~ s/\.[^\.]*$//;
- $document_name = $self->{'OUTFILE'};
- $self->{'OUTFILE'} .= '.'.$self->{'EXTENSION'}
- if (defined($self->{'EXTENSION'}) and $self->{'EXTENSION'} ne '');
+ $outfile = $setfilename;
+ if (!$self->get_conf('USE_SETFILENAME_EXTENSION')) {
+ $outfile =~ s/\.[^\.]*$//;
+ $document_name = $outfile;
+ $outfile .= '.'.$self->get_conf('EXTENSION')
+ if (defined($self->get_conf('EXTENSION'))
+ and $self->get_conf('EXTENSION') ne '');
}
} elsif ($input_basename ne '') {
- $self->{'OUTFILE'} = $input_basename;
- $self->{'OUTFILE'} =~ s/\.te?x(i|info)?$//;
- $document_name = $self->{'OUTFILE'};
- $self->{'OUTFILE'} .= '.'.$self->{'EXTENSION'}
- if (defined($self->{'EXTENSION'}) and $self->{'EXTENSION'} ne '');
+ $outfile = $input_basename;
+ $outfile =~ s/\.te?x(i|info)?$//;
+ $document_name = $outfile;
+ $outfile .= '.'.$self->get_conf('EXTENSION')
+ if (defined($self->get_conf('EXTENSION'))
+ and $self->get_conf('EXTENSION') ne '');
} else {
- $self->{'OUTFILE'} = '';
- $document_name = $self->{'OUTFILE'};
+ $outfile = '';
+ $document_name = $outfile;
}
- if (defined($self->{'SUBDIR'}) and $self->{'OUTFILE'} ne '') {
- $self->{'OUTFILE'} = "$self->{'SUBDIR'}/$self->{'OUTFILE'}";
+ if (defined($self->get_conf('SUBDIR')) and $outfile ne '') {
+ $outfile = $self->get_conf('SUBDIR')."/$outfile";
}
+ $self->set_conf('OUTFILE', $outfile);
} else {
- $document_name = $self->{'OUTFILE'};
+ $document_name = $self->get_conf('OUTFILE');
# FIXME use a different configuration variable?
- if (!$self->{'USE_SETFILENAME_EXTENSION'}) {
+ if (!$self->get_conf('USE_SETFILENAME_EXTENSION')) {
$document_name =~ s/\.[^\.]*$//;
}
}
- my $output_basename = $self->{'OUTFILE'};
+ my $output_basename = $self->get_conf('OUTFILE');
# this is a case that should happen rarely: one wants to get
# the result in a string and there is a setfilename.
- if ($self->{'OUTFILE'} eq '' and defined($setfilename)) {
+ if ($self->get_conf('OUTFILE') eq '' and defined($setfilename)) {
$output_basename = $setfilename;
$document_name = $setfilename;
- if (!$self->{'USE_SETFILENAME_EXTENSION'}) {
+ if (!$self->get_conf('USE_SETFILENAME_EXTENSION')) {
$document_name =~ s/\.[^\.]*$//;
}
}
@@ -253,7 +307,7 @@
$self->{'document_name'} = $document_name;
$output_basename =~ s/^.*\///;
$self->{'output_filename'} = $output_basename;
- my $output_dir = $self->{'OUTFILE'};
+ my $output_dir = $self->get_conf('OUTFILE');
$output_dir =~ s|[^/]*$||;
if ($output_dir ne '') {
$self->{'destination_directory'} = $output_dir;
@@ -290,7 +344,7 @@
sub expand_today($)
{
my $self = shift;
- if ($self->{'TEST'}) {
+ if ($self->get_conf('TEST')) {
return {'text' => 'a sunny day'};
}
my($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
@@ -447,13 +501,13 @@
my $self = shift;
my $accent = shift;
my $format_accents;
- if ($self->{'USE_NUMERIC_ENTITY'}) {
+ if ($self->get_conf('USE_NUMERIC_ENTITY')) {
$format_accents = \&xml_accent_numeric_entities;
} else {
$format_accents = \&xml_accent;
}
- if ($self->{'ENABLE_ENCODING'}) {
+ if ($self->get_conf('ENABLE_ENCODING')) {
if ($self->{'encoding_name'} and $self->{'encoding_name'} eq 'utf-8') {
return Texinfo::Convert::Text::unicode_accents($accent, $format_accents);
} elsif ($self->{'encoding_name'}
Index: Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- Texinfo/Convert/HTML.pm 5 Apr 2011 00:01:46 -0000 1.8
+++ Texinfo/Convert/HTML.pm 5 Apr 2011 22:43:36 -0000 1.9
@@ -460,8 +460,8 @@
. "$text" . "</$style>";
}
if (defined($attribute_hash->{$cmdname}->{'quote'})) {
- $text = $self->{'OPEN_QUOTE_SYMBOL'} . $text
- . $self->{'CLOSE_QUOTE_SYMBOL'};
+ $text = $self->get_conf('OPEN_QUOTE_SYMBOL') . $text
+ . $self->get_conf('CLOSE_QUOTE_SYMBOL');
}
}
return $text;
@@ -665,14 +665,15 @@
$text = uc($text) if ($self->in_upper_case());
$text = $self->xml_protect_text($text);
- if ($self->{'ENABLE_ENCODING'} and !$self->{'ENABLE_ENCODING_USE_ENTITY'}
+ if ($self->get_conf('ENABLE_ENCODING') and
+ !$self->get_conf('ENABLE_ENCODING_USE_ENTITY')
and $self->{'encoding_name'} and $self->{'encoding_name'} eq 'utf-8') {
my $context = {'code' => $self->in_code(),
'preformatted' => $self->in_preformatted()};
$text = Texinfo::Convert::Unicode::unicode_text($self, $text, $command,
$context);
} elsif (!$self->in_code() and !$self->in_preformatted()) {
- if ($self->{'USE_ISO'}) {
+ if ($self->get_conf('USE_ISO')) {
$text =~ s/---/\&mdash\;/g;
$text =~ s/--/\&ndash\;/g;
$text =~ s/``/\&ldquo\;/g;
@@ -697,8 +698,8 @@
{
my $self = shift;
- if (!$self->{'set'}->{'EXTENSION'} and $self->{'SHORTEXTN'}) {
- $self->{'EXTENSION'} = 'htm';
+ if ($self->get_conf('SHORTEXTN')) {
+ $self->set_conf('EXTENSION', 'html');
}
%{$self->{'css_map'}} = %css_map;
@@ -781,11 +782,11 @@
my $result = '';
- print STDERR "NEW ELEMENT\n" if ($self->{'DEBUG'});
+ print STDERR "NEW ELEMENT\n" if ($self->get_conf('DEBUG'));
$result .= $self->_convert($element);
- print STDERR "END ELEMENT\n" if ($self->{'DEBUG'});
+ print STDERR "END ELEMENT\n" if ($self->get_conf('DEBUG'));
#$result .= $self->_footnotes($element);
@@ -817,8 +818,8 @@
my $elements = shift;
my $no_unidecode;
- $no_unidecode = 1 if (defined($self->{'USE_UNIDECODE'})
- and !$self->{'USE_UNIDECODE'});
+ $no_unidecode = 1 if (defined($self->get_conf('USE_UNIDECODE'))
+ and !$self->get_conf('USE_UNIDECODE'));
if ($elements) {
foreach my $element (@$elements) {
@@ -840,7 +841,7 @@
die if ($nr == 0);
}
my $id = $target;
- if ($root_command->{'associated_node'} and
$self->{'USE_NODE_TARGET'}) {
+ if ($root_command->{'associated_node'} and
$self->get_conf('USE_NODE_TARGET')) {
$id =
$self->{'targets'}->{$root_command->{'associated_node'}}->{'id'};
}
if (defined($Texinfo::Config::sectioning_command_target_name)) {
@@ -866,16 +867,16 @@
$target, $id);
}
my $filename;
- if ($self->{'TRANSLITERATE_FILE_NAMES'}) {
+ if ($self->get_conf('TRANSLITERATE_FILE_NAMES')) {
$filename =
Texinfo::Convert::NodeNameNormalization::transliterate_texinfo(
{'contents' => $root_command->{'extra'}->{'node_content'}},
$no_unidecode);
} else {
$filename = $root_command->{'extra'}->{'normalized'};
}
- $filename .= '.'.$self->{'NODE_FILE_EXTENSION'}
- if (defined($self->{'NODE_FILE_EXTENSION'})
- and $self->{'NODE_FILE_EXTENSION'} ne '');
+ $filename .= '.'.$self->get_conf('NODE_FILE_EXTENSION')
+ if (defined($self->get_conf('NODE_FILE_EXTENSION'))
+ and $self->get_conf('NODE_FILE_EXTENSION') ne '');
if (defined($Texinfo::Config::node_file_name)) {
$filename = &$Texinfo::Config::node_file_name($self, $root_command,
$filename);
@@ -917,15 +918,15 @@
return $page if (defined($page));
}
} elsif ($current->{'cmdname'} eq 'titlepage'
- and $self->{'USE_TITLEPAGE_FOR_TITLE'}
- and $self->{'SHOW_TITLE'}
+ and $self->get_conf('USE_TITLEPAGE_FOR_TITLE')
+ and $self->get_conf('SHOW_TITLE')
and $self->{'pages'}->[0]) {
return $self->{'pages'}->[0];
}
return undef;
}
if ($current->{'cmdname'} eq 'footnote'
- and $self->{'footnotestyle'} eq 'separate') {
+ and $self->get_conf('footnotestyle') eq 'separate') {
return $self->{'special_pages'}->{'footnotes'};
}
}
@@ -950,21 +951,21 @@
#$section_top = $self->{'extra'}->{'top'} if ($self->{'extra'});
#Â first determine the top node file name.
- if ($self->{'NODE_FILENAMES'} and $node_top) {
- if (defined($self->{'TOP_NODE_FILE'})) {
+ if ($self->get_conf('NODE_FILENAMES') and $node_top) {
+ if (defined($self->get_conf('TOP_NODE_FILE'))) {
my $node_top_page = $self->_get_page($node_top);
die "BUG: No page for top node" if (!defined($node_top));
- my $filename = $self->{'TOP_NODE_FILE'};
- $filename .= '.'.$self->{'NODE_FILE_EXTENSION'}
- if (defined($self->{'NODE_FILE_EXTENSION'})
- and $self->{'NODE_FILE_EXTENSION'} ne '');
+ my $filename = $self->get_conf('TOP_NODE_FILE');
+ $filename .= '.'.$self->get_conf('NODE_FILE_EXTENSION')
+ if (defined($self->get_conf('NODE_FILE_EXTENSION'))
+ and $self->get_conf('NODE_FILE_EXTENSION') ne '');
$self->_set_page_file($node_top_page, $filename);
}
}
#Â FIXME add a number for each page?
my $file_nr = 0;
my $previous_page;
- if ($self->{'NODE_FILENAMES'}) {
+ if ($self->get_conf('NODE_FILENAMES')) {
PAGE:
foreach my $page(@$pages) {
if (defined($previous_page)) {
@@ -985,8 +986,9 @@
}
}
my $filename = $self->{'document_name'} . "_$file_nr";
- $filename .= '.'.$self->{'EXTENSION'}
- if (defined($self->{'EXTENSION'}) and $self->{'EXTENSION'} ne '');
+ $filename .= '.'.$self->get_conf('EXTENSION')
+ if (defined($self->get_conf('EXTENSION'))
+ and $self->get_conf('EXTENSION') ne '');
$self->_set_page_file($page, $filename);
$file_nr++;
}
@@ -999,8 +1001,9 @@
}
$previous_page = $page;
my $filename = $self->{'document_name'} . "_$file_nr";
- $filename .= '.'.$self->{'EXTENSION'}
- if (defined($self->{'EXTENSION'}) and $self->{'EXTENSION'} ne '');
+ $filename .= '.'.$self->get_conf('EXTENSION')
+ if (defined($self->get_conf('EXTENSION'))
+ and $self->get_conf('EXTENSION') ne '');
$self->_set_page_file($page, $filename);
$file_nr++;
}
@@ -1023,7 +1026,7 @@
my $root = shift;
my $elements;
- if ($self->{'USE_NODES'}) {
+ if ($self->get_conf('USE_NODES')) {
$elements = Texinfo::Structuring::split_by_node($root);
} else {
$elements = Texinfo::Structuring::split_by_section($root);
@@ -1032,13 +1035,46 @@
return $elements;
}
-sub page_head($$$)
+#Â FIXME object oriented API for elements?
+sub begin_file($$$)
{
my $self = shift;
my $filename = shift;
my $page = shift;
#Â TODO
+
+ my $title;
+ #Â FIXME
+ #Â if ($page and $page->{'contents'}->[0]) {
+ #Â my $element
+ # = Texinfo::Convert::HTML::Element::new($self,
$page->{'contents'}->[0]);
+ # my $element_string = $selement->string();
+ # if ($element_string ne $self->{'title_string'}) {
+ # my $title_tree = $self->gdt('{title}: {element_text}',
+ #Â $self->{'title_tree'}, $selement->tree());
+ # $self->{'context'}->[-1]->{'string'} = 1;
+ # $title = $self->_convert($title_tree);
+ # delete $self->{'context'}->[-1]->{'string'};
+ #Â Â }
+ # }
+ $title = $self->{'title_string'} if (!defined($title));
+
+ my $description;
+ if ($self->{'documentdescription_string'}) {
+ $description = $self->{'documentdescription_string'};
+ } else {
+ $description = $title;
+ }
+ $description = "<meta name=\"description\" content=\"$description\">"
+ if ($description ne '');
+ my $encoding = '';
+ $encoding
+ = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=".
+ $self->get_conf('ENCODING_NAME')."\">"
+ if (defined($self->get_conf('ENCODING_NAME'))
+ and ($self->get_conf('ENCODING_NAME') ne ''));
+
return '';
}
@@ -1086,39 +1122,39 @@
# no splitting when writing to the null device or to stdout or returning
#Â a string
- if (defined($self->{'OUTFILE'})
- and ($Texinfo::Common::null_device_file{$self->{'OUTFILE'}}
- or $self->{'OUTFILE'} eq '-'
- or $self->{'OUTFILE'} eq '')) {
- $self->{'SPLIT'} = 0;
- }
- if (!exists($self->{'set'}->{'NODE_FILES'}) and $self->{'SPLIT'}) {
- $self->{'NODE_FILES'} = 1;
- }
- if (!exists($self->{'set'}->{'NODE_FILENAMES'})
- and ($self->{'NODE_FILES'} or $self->{'SPLIT'} eq 'node')) {
- $self->{'NODE_FILENAMES'} = 1;
+ if (defined($self->get_conf('OUTFILE'))
+ and ($Texinfo::Common::null_device_file{$self->get_conf('OUTFILE')}
+ or $self->get_conf('OUTFILE') eq '-'
+ or $self->get_conf('OUTFILE') eq '')) {
+ $self->force_conf('SPLIT', 0);
+ }
+ if ($self->{'SPLIT'}) {
+ $self->set_conf('NODE_FILES', 1);
+ }
+ if ($self->get_conf('NODE_FILES') or $self->get_conf('SPLIT') eq 'node') {
+ $self->set_conf('NODE_FILENAMES', 1);
}
#Â This should return undef if called on a tree without node or sections.
my $elements = $self->_prepare_elements($root);
# undef if no elements or not split
- my $pages = Texinfo::Structuring::split_pages($elements, $self->{'SPLIT'});
+ my $pages = Texinfo::Structuring::split_pages($elements,
+ $self->get_conf('SPLIT'));
$self->{'pages'} = $pages;
#Â TODO handle special elements, footnotes element, contents and
shortcontents
#Â elements, titlepage association
- #Â this sets OUTFILE, to be used if not split, but also
'destination_directory',
- #Â and 'output_filename' that are useful when split.
+ #Â this sets OUTFILE, to be used if not split, but also
+ #Â 'destination_directory' and 'output_filename' that are useful when split.
$self->_set_outfile();
# determine file names associated with the different pages.
$self->_set_page_files($pages);
#Â FIXME set language and documentencoding/encoding_name
- #Â title
+ #Â prepare title
my $fulltitle;
foreach my $fulltitle_command('settitle', 'title',
'shorttitlepage', 'top') {
@@ -1126,7 +1162,7 @@
my $command = $self->{'extra'}->{$fulltitle_command};
next if ($command->{'extra'}
and $command->{'extra'}->{'missing_argument'});
- $fulltitle = $command;
+ $fulltitle = {'contents' => $command->{'contents'}};
last;
}
}
@@ -1136,49 +1172,71 @@
and
defined($self->{'extra'}->{'titlefont'}->[0]->{'extra'}->{'brace_command_contents'}->[0]))
{
$fulltitle = $self->{'extra'}->{'titlefont'}->[0];
}
- my $simpletitle;
+ #Â prepare simpletitle
foreach my $simpletitle_command('settitle', 'shorttitlepage') {
if ($self->{'extra'}->{$simpletitle_command}) {
my $command = $self->{'extra'}->{$simpletitle_command};
next if ($command->{'extra'}
and $command->{'extra'}->{'missing_argument'});
- $simpletitle = $command;
+ $self->{'simpletitle_tree'} = {'contents' => $command->{'contents'}};
last;
}
}
- my $default_title = $self->gdt('Untitled Document');
$self->{'context'}->[-1]->{'string'} = 1;
- my $html_default_title = $self->_convert($default_title);
+ my $html_title_string;
+ if ($fulltitle) {
+ $self->{'title_tree'} = $fulltitle;
+ $html_title_string = $self->_convert($self->{'title_tree'});
+ }
+ if (!defined($html_title_string) or $html_title_string !~ /\S/) {
+ my $default_title = $self->gdt('Untitled Document');
+ $self->{'title_tree'} = $default_title;
+ $self->{'title_string'} = $self->_convert($self->{'title_tree'});
+ $self->document_warn(__("Must specify a title with a title command or
address@hidden"));
+ } else {
+ $self->{'title_string'} = $html_title_string;
+ }
delete $self->{'context'}->[-1]->{'string'};
+
+ #Â copying comment
if ($self->{'extra'}->{'copying'}) {
my $options;
- if ($self->{'ENABLE_ENCODING'} and $self->{'encoding_name'}) {
+ if ($self->get_conf('ENABLE_ENCODING')
+ and $self->{'encoding_name'}) {
$options->{'enabled_encoding'} = $self->{'encoding_name'};
}
-
my $copying_comment = Texinfo::Convert::Text::convert(
{'contents' => $self->{'extra'}->{'copying'}->{'contents'}}, $options);
if ($copying_comment ne '') {
- $copying_comment = &{$self->{'comment'}}($self, $copying_comment);
+ $self->{'copying_comment'} = &{$self->{'comment'}}($self,
$copying_comment);
}
}
+ #Â documentdescription
+ if ($self->{'extra'}->{'documentdescription'}) {
+ $self->{'context'}->[-1]->{'string'} = 1;
+ $self->{'documentdescription_string'} = $self->_convert(
+ {'contents' => $self->{'extra'}->{'documentdescription'}->{'contents'}});
+ delete $self->{'context'}->[-1]->{'string'};
+ }
+
+ #Â Now do the output
my $fh;
my $output = '';
if (!$pages) {
#Â not split output
- if ($self->{'OUTFILE'} ne '') {
- $fh = $self->Texinfo::Common::open_out ($self->{'OUTFILE'},
+ if ($self->get_conf('OUTFILE') ne '') {
+ $fh = $self->Texinfo::Common::open_out ($self->get_conf('OUTFILE'),
$self->{'perl_encoding'});
if (!$fh) {
$self->document_error(sprintf($self->__("Could not open %s for
writing: %s"),
- $self->{'OUTFILE'}, $!));
+ $self->get_conf('OUTFILE'), $!));
return undef;
}
#$self->{'fh'} = $fh;
}
- my $header = page_head($self, $self->{'output_filename'}, undef);
+ my $header = begin_file($self, $self->{'output_filename'}, undef);
$output .= _output_text($header, $fh);
if ($elements and @$elements) {
foreach my $element (@$elements) {
@@ -1205,8 +1263,7 @@
#Â FIXME close/remove files already created
return undef;
}
- #print $file_fh page_head(
- print $file_fh "".page_head($self, $page->{'filename'}, $page);
+ print $file_fh "".begin_file($self, $page->{'filename'}, $page);
$files{$page->{'filename'}}->{'fh'} = $file_fh;
} else {
$file_fh = $files{$page->{'filename'}}->{'fh'};
@@ -1229,11 +1286,12 @@
my $element = shift;
my $class = shift;
- return "<$element" if (!defined($class) or $class eq '' or
$self->{'NO_CSS'});
+ return "<$element" if (!defined($class) or $class eq ''
+ or $self->get_conf('NO_CSS'));
my $style = '';
- if ($self->{'INLINE_CSS_STYLE'}
+ if ($self->get_conf('INLINE_CSS_STYLE')
and defined($self->{'css_map'}->{"$element.$class"})) {
$style = ' style="'.$self->{'css_map'}->{"$element.$class"}.'"';
}
@@ -1249,10 +1307,11 @@
my $in_w = 1 if ($self->in_space_protected());
- if ($in_w or $self->in_code() and $self->{'allowcodebreaks'} eq 'false') {
+ if ($in_w or $self->in_code()
+ and $self->get_conf('allowcodebreaks') eq 'false') {
my $class = 'nolinebreak';
$class = 'nocodebreak' if ($self->in_code()
- and $self->{'allowcodebreaks'} eq 'false');
+ and $self->get_conf('allowcodebreaks') eq 'false');
my $open = $self->attribute_class('span', $class).'>';
# protect spaces in the html leading attribute in case we are in 'w'
$open =~ s/ /\x{1F}/g if ($in_w);
@@ -1284,7 +1343,7 @@
#my $category = Texinfo::Convert::Texinfo::convert($arg_category->[0]);
#my $class = Texinfo::Convert::Texinfo::convert($arg_class->[0]);
#print STDERR "DEFINITION CATEGORY($style): $category $class\n"
- # if ($self->{'DEBUG'});
+ # if ($self->get_conf('DEBUG'));
if ($style eq 'f') {
#return Texinfo::Parser::parse_texi_line (undef, "$category on $class");
return $self->gdt('{category} on {class}', { 'category' => $arg_category,
@@ -1324,7 +1383,7 @@
'type' => 'frenchspacing'});
my $text = numbered_heading($section,
- $section_title, $self->{'NUMBER_SECTIONS'})."\n";
+ $section_title,
$self->get_conf('NUMBER_SECTIONS'))."\n";
#Â FIXME get ref.
#Â FIXME do li
$result .= (' ' x (2*($section->{'level'} - ($root_level+1)))) . $text;
@@ -1450,7 +1509,7 @@
my $self = shift;
my $root = shift;
- if ($self->{'DEBUG'}) {
+ if ($self->get_conf('DEBUG')) {
print STDERR "ROOT:$root (".join('|',@{$self->{'context'}})."), ->";
print STDERR " cmd: $root->{'cmdname'}," if ($root->{'cmdname'});
print STDERR " type: $root->{'type'}" if ($root->{'type'});
@@ -1471,7 +1530,7 @@
or ($root->{'cmdname'}
and exists($self->{'commands_conversion'}->{$root->{'cmdname'}})
and
!defined($self->{'commands_conversion'}->{$root->{'cmdname'}}))) {
- print STDERR "IGNORED\n" if ($self->{'DEBUG'});
+ print STDERR "IGNORED\n" if ($self->get_conf('DEBUG'));
return '';
}
@@ -1485,11 +1544,11 @@
if ($root->{'extra'}) {
if ($root->{'extra'}->{'invalid_nesting'}) {
- print STDERR "INVALID_NESTING\n" if ($self->{'DEBUG'});
+ print STDERR "INVALID_NESTING\n" if ($self->get_conf('DEBUG'));
return '';
} elsif ($root->{'extra'}->{'missing_argument'}
and (!$root->{'contents'} or address@hidden>{'contents'}})) {
- print STDERR "MISSING_ARGUMENT\n" if ($self->{'DEBUG'});
+ print STDERR "MISSING_ARGUMENT\n" if ($self->get_conf('DEBUG'));
return '';
}
}
@@ -1504,7 +1563,7 @@
# }
# $self->{'index_entries_line_location'}->{$root} = $location;
# print STDERR "INDEX ENTRY lines_count $location->{'lines'}, index_entry
$location->{'index_entry'}\n"
-# if ($self->{'DEBUG'});
+# if ($self->get_conf('DEBUG'));
}
Index: Texinfo/Convert/Info.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Info.pm,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- Texinfo/Convert/Info.pm 3 Apr 2011 23:07:36 -0000 1.51
+++ Texinfo/Convert/Info.pm 5 Apr 2011 22:43:36 -0000 1.52
@@ -59,9 +59,9 @@
$self->{'input_basename'} = $STDIN_DOCU_NAME if ($self->{'input_basename'}
eq '-');
# no splitting when writing to the null device or to stdout
- if ($Texinfo::Common::null_device_file{$self->{'OUTFILE'}}
- or $self->{'OUTFILE'} eq '-') {
- $self->{'SPLIT_SIZE'} = undef;
+ if ($Texinfo::Common::null_device_file{$self->get_conf('OUTFILE')}
+ or $self->get_conf('OUTFILE') eq '-') {
+ $self->force_conf('SPLIT_SIZE', undef);
}
push @{$self->{'count_context'}}, {'lines' => 0, 'bytes' => 0,
@@ -81,17 +81,16 @@
my $elements = Texinfo::Structuring::split_by_node($root);
my $fh;
- if (! $self->{'OUTFILE'} eq '') {
- $fh = $self->Texinfo::Common::open_out ($self->{'OUTFILE'},
+ if (! $self->get_conf('OUTFILE') eq '') {
+ $fh = $self->Texinfo::Common::open_out ($self->get_conf('OUTFILE'),
$self->{'perl_encoding'});
if (!$fh) {
$self->document_error(sprintf($self->__("Could not open %s for writing:
%s"),
- $self->{'OUTFILE'}, $!));
+ $self->get_conf('OUTFILE'), $!));
return undef;
}
- #$self->{'fh'} = $fh;
}
- print STDERR "DOCUMENT\n" if ($self->{'DEBUG'});
+ print STDERR "DOCUMENT\n" if ($self->get_conf('DEBUG'));
my $out_file_nr = 0;
my @indirect_files;
if (!defined($elements) or $elements->[0]->{'extra'}->{'no_node'}) {
@@ -126,33 +125,33 @@
} else {
$result .= $node_text;
}
- if (defined($self->{'SPLIT_SIZE'})
+ if (defined($self->get_conf('SPLIT_SIZE'))
and $self->{'count_context'}->[-1]->{'bytes'} >
- $out_file_nr * $self->{'SPLIT_SIZE'} and @nodes and $fh) {
+ $out_file_nr * $self->get_conf('SPLIT_SIZE')
+ and @nodes and $fh) {
close ($fh);
if ($out_file_nr == 1) {
- unless (rename ($self->{'OUTFILE'},
- $self->{'OUTFILE'}.'-'.$out_file_nr)) {
+ unless (rename ($self->get_conf('OUTFILE'),
+ $self->get_conf('OUTFILE').'-'.$out_file_nr)) {
$self->document_error(sprintf($self->__("Rename %s failed: %s"),
- $self->{'OUTFILE'}, $!));
+ $self->get_conf('OUTFILE'), $!));
}
push @{$self->{'opened_files'}},
- $self->{'OUTFILE'}.'-'.$out_file_nr;
+ $self->get_conf('OUTFILE').'-'.$out_file_nr;
push @indirect_files, [$self->{'output_filename'}.'-'.$out_file_nr,
$first_node_bytes_count];
#print STDERR join(' --> ', @{$indirect_files[-1]}) ."\n";
}
$out_file_nr++;
$fh = $self->Texinfo::Common::open_out (
- $self->{'OUTFILE'}.'-'.$out_file_nr,
+ $self->get_conf('OUTFILE').'-'.$out_file_nr,
$self->{'perl_encoding'});
if (!$fh) {
$self->document_error(sprintf(
$self->__("Could not open %s for writing: %s"),
- $self->{'OUTFILE'}.'-'.$out_file_nr, $!));
+ $self->get_conf('OUTFILE').'-'.$out_file_nr, $!));
return undef;
}
- #$self->{'fh'} = $fh;
print $fh $header;
$self->{'count_context'}->[-1]->{'bytes'} += $header_bytes;
push @indirect_files, [$self->{'output_filename'}.'-'.$out_file_nr,
@@ -164,12 +163,12 @@
my $tag_text = '';
if ($out_file_nr > 1) {
close ($fh);
- $fh = $self->Texinfo::Common::open_out($self->{'OUTFILE'},
+ $fh = $self->Texinfo::Common::open_out($self->get_conf('OUTFILE'),
$self->{'perl_encoding'});
if (!$fh) {
$self->document_error(sprintf(
$self->__("Could not open %s for writing: %s"),
- $self->{'OUTFILE'}, $!));
+ $self->get_conf('OUTFILE'), $!));
return undef;
}
$tag_text = $header;
@@ -244,7 +243,7 @@
$self->{'empty_lines_count'} = 1;
if ($self->{'extra'} and $self->{'extra'}->{'copying'}) {
- print STDERR "COPYING HEADER\n" if ($self->{'DEBUG'});
+ print STDERR "COPYING HEADER\n" if ($self->get_conf('DEBUG'));
$self->_set_global_multiple_commands();
$self->{'in_copying_header'} = 1;
my $copying = $self->_convert({'contents' =>
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -b -r1.130 -r1.131
--- Texinfo/Convert/Plaintext.pm 27 Mar 2011 22:55:13 -0000 1.130
+++ Texinfo/Convert/Plaintext.pm 5 Apr 2011 22:43:36 -0000 1.131
@@ -245,8 +245,6 @@
'footnotestyle' => 'end',
'fillcolumn' => 72,
-# 'perl_encoding' => 'ascii',
-# 'encoding_name' => 'us-ascii',
'encoding_name' => undef,
'perl_encoding' => undef,
'OUTFILE' => undef,
@@ -288,7 +286,7 @@
return if ($self->{'set'}->{$root->{'cmdname'}});
if (exists($root->{'extra'}->{'text_arg'})) {
- $self->{$root->{'cmdname'}} = $root->{'extra'}->{'text_arg'};
+ $self->set_conf($root->{'cmdname'}, $root->{'extra'}->{'text_arg'});
if ($root->{'cmdname'} eq 'documentencoding'
and defined($root->{'extra'})
and defined($root->{'extra'}->{'perl_encoding'})
@@ -309,15 +307,15 @@
#}
}
} elsif ($misc_commands{$root->{'cmdname'}} eq 'skipline') {
- $self->{$root->{'cmdname'}} = 1;
+ $self->set_conf($root->{'cmdname'}, 1);
} elsif ($root->{'extra'} and $root->{'extra'}->{'misc_args'}
and exists($root->{'extra'}->{'misc_args'}->[0])) {
- $self->{$root->{'cmdname'}} = $root->{'extra'}->{'misc_args'}->[0];
+ $self->set_conf($root->{'cmdname'}, $root->{'extra'}->{'misc_args'}->[0]);
if ($root->{'cmdname'} eq 'paragraphindent') {
if ($root->{'extra'}->{'misc_args'}->[0] eq 'asis') {
delete $self->{'ignored_types'}->{'empty_spaces_before_paragraph'};
} else {
- $self->{$root->{'cmdname'}} = 0
+ $self->set_conf($root->{'cmdname'}, 0)
if ($root->{'extra'}->{'misc_args'}->[0] eq 'none');
$self->{'ignored_types'}->{'empty_spaces_before_paragraph'} = 1;
}
@@ -383,17 +381,17 @@
my $result = '';
- print STDERR "NEW NODE\n" if ($self->{'DEBUG'});
+ print STDERR "NEW NODE\n" if ($self->get_conf('DEBUG'));
die "Too much count_context\n" if (scalar(@{$self->{'count_context'}}) != 1);
$self->{'count_context'}->[-1]->{'lines'} = 0;
$result .= $self->_convert($element);
- print STDERR "END NODE
($self->{'count_context'}->[-1]->{'lines'},$self->{'count_context'}->[-1]->{'bytes'})\n"
if ($self->{'DEBUG'});
+ print STDERR "END NODE
($self->{'count_context'}->[-1]->{'lines'},$self->{'count_context'}->[-1]->{'bytes'})\n"
if ($self->get_conf('DEBUG'));
$result .= $self->_footnotes($element);
- print STDERR "AFTER FOOTNOTES
($self->{'count_context'}->[-1]->{'lines'},$self->{'count_context'}->[-1]->{'bytes'})\n"
if ($self->{'DEBUG'});
+ print STDERR "AFTER FOOTNOTES
($self->{'count_context'}->[-1]->{'lines'},$self->{'count_context'}->[-1]->{'bytes'})\n"
if ($self->get_conf('DEBUG'));
return $result;
}
@@ -427,8 +425,8 @@
my $root = shift;
my $outfile = '-';
- if (defined($self->{'OUTFILE'})) {
- $outfile = $self->{'OUTFILE'};
+ if (defined($self->get_conf('OUTFILE'))) {
+ $outfile = $self->get_conf('OUTFILE');
}
my $fh = $self->Texinfo::Common::open_out ($outfile,
@@ -456,7 +454,7 @@
my $text = $command->{'text'};
$text = uc($text) if ($self->{'formatters'}->[-1]->{'upper_case'});
- if ($self->{'ENABLE_ENCODING'} and $self->{'encoding_name'}
+ if ($self->get_conf('ENABLE_ENCODING') and $self->{'encoding_name'}
and $self->{'encoding_name'} eq 'utf-8') {
return Texinfo::Convert::Unicode::unicode_text($self, $text, $command,
$context);
@@ -484,10 +482,11 @@
'max' => $self->{'text_element_context'}->[-1]->{'max'},
'indent_level' =>
$self->{'format_context'}->[-1]->{'indent_level'},
};
- $container_conf->{'frenchspacing'} = 1 if ($self->{'frenchspacing'} eq 'on');
+ $container_conf->{'frenchspacing'} = 1
+ if ($self->get_conf('frenchspacing') eq 'on');
$container_conf->{'counter'} =
$self->{'text_element_context'}->[-1]->{'counter'}
if (defined($self->{'text_element_context'}->[-1]->{'counter'}));
- $container_conf->{'DEBUG'} = 1 if ($self->{'DEBUG'});
+ $container_conf->{'DEBUG'} = 1 if ($self->get_conf('DEBUG'));
if ($conf) {
foreach my $key (keys(%$conf)) {
$container_conf->{$key} = $conf->{$key};
@@ -520,7 +519,7 @@
my $formatter = {'container' => $container, 'upper_case' => 0,
'code' => 0, 'w' => 0, 'type' => $type,
- 'frenchspacing_stack' => [$self->{'frenchspacing'}]};
+ 'frenchspacing_stack' =>
[$self->get_conf('frenchspacing')]};
if ($type eq 'unfilled') {
foreach my $context (reverse(@{$self->{'context'}})) {
@@ -532,7 +531,7 @@
}
}
}
- print STDERR "NEW FORMATTER($type)\n" if ($self->{'DEBUG'});
+ print STDERR "NEW FORMATTER($type)\n" if ($self->get_conf('DEBUG'));
return $formatter;
}
@@ -579,7 +578,7 @@
#my $category = Texinfo::Convert::Texinfo::convert($arg_category->[0]);
#my $class = Texinfo::Convert::Texinfo::convert($arg_class->[0]);
#print STDERR "DEFINITION CATEGORY($style): $category $class\n"
- # if ($self->{'DEBUG'});
+ # if ($self->get_conf('DEBUG'));
if ($style eq 'f') {
#return Texinfo::Parser::parse_texi_line (undef, "$category on $class");
return $self->gdt('{category} on {class}', { 'category' => $arg_category,
@@ -681,8 +680,8 @@
if (scalar(@{$self->{'pending_footnotes'}})) {
$result .= $self->_add_newline_if_needed();
print STDERR "FOOTNOTES ".scalar(@{$self->{'pending_footnotes'}})."\n"
- if ($self->{'DEBUG'});
- if ($self->{'footnotestyle'} eq 'end' or !defined($element)) {
+ if ($self->get_conf('DEBUG'));
+ if ($self->get_conf('footnotestyle') eq 'end' or !defined($element)) {
my $footnotes_header = " ---------- Footnotes ----------\n\n";
$result .= $footnotes_header;
$self->_add_text_count($footnotes_header);
@@ -719,7 +718,7 @@
# this pushes on 'context', 'format_context' and 'formatters'
$self->push_top_formatter('footnote');
my $formatted_footnote_number;
- if ($self->{'NUMBER_FOOTNOTES'}) {
+ if ($self->get_conf('NUMBER_FOOTNOTES')) {
$formatted_footnote_number = $footnote->{'number'};
} else {
$formatted_footnote_number = $NO_NUMBER_FOOTNOTE_SYMBOL;
@@ -862,7 +861,7 @@
'type' => 'frenchspacing'});
pop @{$self->{'count_context'}};
my $text = Texinfo::Convert::Text::numbered_heading($section,
- $section_title, $self->{'NUMBER_SECTIONS'})."\n";
+ $section_title, $self->get_conf('NUMBER_SECTIONS'))."\n";
$result .= (' ' x (2*($section->{'level'} - ($root_level+1)))) . $text;
$lines_count++;
if ($section->{'section_childs'}
@@ -1034,7 +1033,7 @@
my $formatter = $self->{'formatters'}->[-1];
- if ($self->{'DEBUG'}) {
+ if ($self->get_conf('DEBUG')) {
my $is_top_formatter = 0;
$is_top_formatter = 1 if ($formatter->{'_top_formatter'});
my $empty_lines_count = '';
@@ -1067,7 +1066,7 @@
if (($root->{'type'} and $self->{'ignored_types'}->{$root->{'type'}})
or ($root->{'cmdname'}
and $self->{'ignored_commands'}->{$root->{'cmdname'}})) {
- print STDERR "IGNORED\n" if ($self->{'DEBUG'});
+ print STDERR "IGNORED\n" if ($self->get_conf('DEBUG'));
return '';
}
my $result = '';
@@ -1077,7 +1076,7 @@
# especially
if ($root->{'type'} and ($root->{'type'} eq 'empty_line'
or $root->{'type'} eq 'after_description_line')) {
- if ($self->{'DEBUG'}) {
+ if ($self->get_conf('DEBUG')) {
my $count = $self->{'empty_lines_count'};
$count = '' if (!defined($count));
print STDERR "EMPTY_LINE ($count)\n";
@@ -1120,11 +1119,11 @@
if ($root->{'extra'}) {
if ($root->{'extra'}->{'invalid_nesting'}) {
- print STDERR "INVALID_NESTING\n" if ($self->{'DEBUG'});
+ print STDERR "INVALID_NESTING\n" if ($self->get_conf('DEBUG'));
return '';
} elsif ($root->{'extra'}->{'missing_argument'}
and (!$root->{'contents'} or address@hidden>{'contents'}})) {
- print STDERR "MISSING_ARGUMENT\n" if ($self->{'DEBUG'});
+ print STDERR "MISSING_ARGUMENT\n" if ($self->get_conf('DEBUG'));
return '';
}
}
@@ -1163,7 +1162,7 @@
}
if (! $following_not_empty) {
print STDERR "INDEX ENTRY $root->{'cmdname'} followed by empty lines\n"
- if ($self->{'DEBUG'});
+ if ($self->get_conf('DEBUG'));
$location->{'lines'}--;
}
}
@@ -1174,7 +1173,7 @@
}
$self->{'index_entries_line_location'}->{$root} = $location;
print STDERR "INDEX ENTRY lines_count $location->{'lines'}, index_entry
$location->{'index_entry'}\n"
- if ($self->{'DEBUG'});
+ if ($self->get_conf('DEBUG'));
}
my $cell;
@@ -1233,7 +1232,7 @@
# commands with braces
} elsif ($accent_commands{$root->{'cmdname'}}) {
my $encoding;
- if ($self->{'ENABLE_ENCODING'}) {
+ if ($self->get_conf('ENABLE_ENCODING')) {
$encoding = $self->{'encoding_name'};
}
my $accented_text
@@ -1375,7 +1374,7 @@
} elsif ($command eq 'footnote') {
$self->{'footnote_index'}++ unless ($self->{'multiple_pass'});
my $formatted_footnote_number;
- if ($self->{'NUMBER_FOOTNOTES'}) {
+ if ($self->get_conf('NUMBER_FOOTNOTES')) {
$formatted_footnote_number = $self->{'footnote_index'};
} else {
$formatted_footnote_number = $NO_NUMBER_FOOTNOTE_SYMBOL;
@@ -1388,7 +1387,7 @@
}
$result .= $self->_count_added($formatter->{'container'},
$formatter->{'container'}->add_text("($formatted_footnote_number)"));
- if ($self->{'footnotestyle'} eq 'separate' and $self->{'node'}) {
+ if ($self->get_conf('footnotestyle') eq 'separate' and $self->{'node'}) {
$result .= $self->_convert({'contents' =>
[{'text' => ' ('},
{'cmdname' => 'pxref',
@@ -1566,7 +1565,7 @@
'contents' => [$root->{'args'}->[0]]});
pop @{$self->{'count_context'}};
$result = Texinfo::Convert::Text::heading({'level' => 0,
- 'cmdname' => 'titlefont'}, $result, $self->{'NUMBER_SECTIONS'});
+ 'cmdname' => 'titlefont'}, $result,
$self->get_conf('NUMBER_SECTIONS'));
$self->{'empty_lines_count'} = 0 unless ($result eq '');
$self->_add_text_count($result);
$self->_add_lines_count(2);
@@ -1592,7 +1591,7 @@
# remark:
# cartouche group and raggedright -> nothing on format stack
- if ($menu_commands{$root->{'cmdname'}} and !$self->{'SHOW_MENU'}) {
+ if ($menu_commands{$root->{'cmdname'}} and
!$self->get_conf('SHOW_MENU')) {
return '';
}
if ($self->{'preformatted_context_commands'}->{$root->{'cmdname'}}) {
@@ -1655,13 +1654,13 @@
{'indent_length' =>
0});
pop @{$self->{'count_context'}};
print STDERR " MULTITABLE_PROTO {$formatted_prototype}\n"
- if ($self->{'DEBUG'});
+ if ($self->get_conf('DEBUG'));
push @$columnsize,
2+Texinfo::Convert::Unicode::string_width($formatted_prototype);
}
}
print STDERR "MULTITABLE_SIZES @$columnsize\n" if ($columnsize
- and $self->{'DEBUG'});
+ and $self->get_conf('DEBUG'));
$self->{'format_context'}->[-1]->{'columns_size'} = $columnsize;
$self->{'format_context'}->[-1]->{'row_empty_lines_count'}
= $self->{'empty_lines_count'};
@@ -1676,8 +1675,9 @@
$result .= $self->_node($root);
$self->{'format_context'}->[-1]->{'paragraph_count'} = 0;
} elsif ($sectioning_commands{$root->{'cmdname'}}) {
- if ($self->{'setcontentsaftertitlepage'}
- and $root_commands{$root->{'cmdname'}}) {
+ if ($self->get_conf('setcontentsaftertitlepage')
+ and $root_commands{$root->{'cmdname'}}
+ and !$self->{'setcontentsaftertitlepage_done'}) {
my ($contents, $lines_count)
=
$self->_contents($self->{'structuring'}->{'sectioning_root'},
'contents');
@@ -1687,11 +1687,12 @@
$self->_add_text_count($contents);
$self->_add_lines_count($lines_count+1);
}
- $self->{'setcontentsaftertitlepage'} = 0;
+ $self->{'setcontentsaftertitlepage_done'} = 1;
$result .= $contents;
}
- if ($self->{'setshortcontentsaftertitlepage'}
- and $root_commands{$root->{'cmdname'}}) {
+ if ($self->get_conf('setshortcontentsaftertitlepage')
+ and $root_commands{$root->{'cmdname'}}
+ and !$self->{'setshortcontentsaftertitlepage_done'}) {
my ($contents, $lines_count)
=
$self->_contents($self->{'structuring'}->{'sectioning_root'},
'shortcontents');
@@ -1702,7 +1703,7 @@
$self->_add_lines_count($lines_count+1);
}
- $self->{'setshortcontentsaftertitlepage'} = 0;
+ $self->{'setshortcontentsaftertitlepage_done'} = 1;
$result .= $contents;
}
# use settitle for empty @top
@@ -1728,7 +1729,7 @@
# FIXME @* and @c?
my $heading_underlined =
Texinfo::Convert::Text::heading ($root, $heading,
- $self->{'NUMBER_SECTIONS'});
+
$self->get_conf('NUMBER_SECTIONS'));
$result .= $self->_add_newline_if_needed();
$self->{'empty_lines_count'} = 0 unless ($heading_underlined eq '');
$self->_add_text_count($heading_underlined);
@@ -1797,7 +1798,7 @@
$result .= $self->_count_added($line->{'container'},
$line->{'container'}->end());
print STDERR "
$root->{'parent'}->{'cmdname'}($root->{'extra'}->{'item_number'}) ->
|$result|\n"
- if ($self->{'DEBUG'});
+ if ($self->get_conf('DEBUG'));
pop @{$self->{'formatters'}};
$self->{'text_element_context'}->[-1]->{'counter'} +=
Texinfo::Convert::Unicode::string_width($result);
@@ -1809,7 +1810,7 @@
$self->{'format_context'}->[-1]->{'item_command'} = $root->{'cmdname'}
if ($root->{'cmdname'} ne 'tab');
print STDERR "CELL [$root->{'extra'}->{'cell_number'}]:
address@hidden>{'cmdname'}. Width: $cell_width\n"
- if ($self->{'DEBUG'});
+ if ($self->get_conf('DEBUG'));
die if (!defined($cell_width));
$self->{'empty_lines_count'}
= $self->{'format_context'}->[-1]->{'row_empty_lines_count'};
@@ -1983,7 +1984,7 @@
}
return $result;
} elsif ($root->{'cmdname'} eq 'contents') {
- if (!defined($self->{'setcontentsaftertitlepage'})
+ if (!defined($self->get_conf('setcontentsaftertitlepage'))
and $self->{'structuring'}
and $self->{'structuring'}->{'sectioning_root'}) {
my $lines_count;
@@ -1996,7 +1997,7 @@
return $result;
} elsif ($root->{'cmdname'} eq 'shortcontents'
or $root->{'cmdname'} eq 'summarycontents') {
- if (!defined($self->{'setshortcontentsaftertitlepage'})
+ if (!defined($self->get_conf('setshortcontentsaftertitlepage'))
and $self->{'structuring'}
and $self->{'structuring'}->{'sectioning_root'}) {
my $lines_count;
@@ -2036,23 +2037,24 @@
$self->{'empty_lines_count'} = 0;
my $conf;
# indent. Not first paragraph.
- if ($self->{'DEBUG'}) {
+ if ($self->get_conf('DEBUG')) {
print STDERR "OPEN PARA ($self->{'format_context'}->[-1]->{'cmdname'})
"
. "cnt ".
(defined($self->{'text_element_context'}->[-1]->{'counter'}) ?
$self->{'text_element_context'}->[-1]->{'counter'} : 'UNDEF'). ' '
. "para cnt $self->{'format_context'}->[-1]->{'paragraph_count'} "
- . "fparaindent $self->{'firstparagraphindent'} "
- . "paraindent $self->{'paragraphindent'}\n";
+ . "fparaindent ".$self->get_conf('firstparagraphindent')." "
+ . "paraindent ".$self->get_conf('paragraphindent')."\n";
}
if ($self->{'format_context'}->[-1]->{'cmdname'} eq '_top_format'
- and $self->{'paragraphindent'} ne 'asis' and
$self->{'paragraphindent'}
+ and $self->get_conf('paragraphindent') ne 'asis'
+ and $self->get_conf('paragraphindent')
and (($root->{'extra'} and $root->{'extra'}->{'indent'})
or (!($root->{'extra'} and $root->{'extra'}->{'noindent'})
and ($self->{'format_context'}->[-1]->{'paragraph_count'}
- or $self->{'firstparagraphindent'} eq 'insert')
+ or $self->get_conf('firstparagraphindent') eq 'insert')
and !$self->{'text_element_context'}->[-1]->{'counter'}))) {
- $conf->{'first_indent_length'} = $self->{'paragraphindent'};
+ $conf->{'first_indent_length'} = $self->get_conf('paragraphindent');
}
$paragraph = $self->new_formatter('paragraph', $conf);
push @{$self->{'formatters'}}, $paragraph;
@@ -2110,7 +2112,7 @@
pop @{$self->{'formatters'}};
delete $self->{'text_element_context'}->[-1]->{'counter'};
$self->{'empty_lines_count'} = 0;
- print STDERR " --> $result" if ($self->{'DEBUG'});
+ print STDERR " --> $result" if ($self->get_conf('DEBUG'));
}
} elsif ($root->{'type'} eq 'menu_entry') {
my $menu_entry_internal_node;
@@ -2236,7 +2238,7 @@
push @{$cell_updated_locations->[$cell_idx]->{$location->{'lines'}}},
$location;
print STDERR "MULTITABLE anchor
$location->{'root'}->{'extra'}->{'normalized'}: c $cell_idx, l
$location->{'lines'} ($location->{'bytes'})\n"
- if ($self->{'DEBUG'});
+ if ($self->get_conf('DEBUG'));
$max_lines = $location->{'lines'}+1
if ($location->{'lines'}+1 > $max_lines);
}
@@ -2245,7 +2247,7 @@
}
print STDERR "ROW, max_lines $max_lines, indent_len $indent_len\n"
- if ($self->{'DEBUG'});
+ if ($self->get_conf('DEBUG'));
# this is used to keep track of the last cell with content.
my $max_cell = scalar(@{$self->{'format_context'}->[-1]->{'row'}});
@@ -2262,7 +2264,7 @@
or
defined($cell_updated_locations->[$cell_idx]->{$line_idx}));
}
print STDERR " L(last_cell $last_cell): $line_idx\n"
- if ($self->{'DEBUG'});
+ if ($self->get_conf('DEBUG'));
for (my $cell_idx = 0; $cell_idx < $last_cell; $cell_idx++) {
my $cell_text = $cell_lines[$cell_idx]->[$line_idx];
@@ -2272,7 +2274,7 @@
$line = ' ' x $indent_len;
$bytes_count += $self->count_bytes($line);
}
- print STDERR " C($cell_idx) `$cell_text'\n" if ($self->{'DEBUG'});
+ print STDERR " C($cell_idx) `$cell_text'\n" if
($self->get_conf('DEBUG'));
$line .= $cell_text;
$bytes_count += $self->count_bytes($cell_text);
$line_width += Texinfo::Convert::Unicode::string_width($cell_text);
@@ -2280,7 +2282,7 @@
if (defined($cell_updated_locations->[$cell_idx]->{$line_idx})) {
foreach my $location
(@{$cell_updated_locations->[$cell_idx]->{$line_idx}}) {
print STDERR "MULTITABLE UPDATE ANCHOR (l $line_idx, c
$cell_idx): $location->{'root'}->{'extra'}->{'normalized'}:
$location->{'bytes'} -> $bytes_count\n"
- if ($self->{'DEBUG'});
+ if ($self->get_conf('DEBUG'));
$location->{'bytes'} = $bytes_count;
}
}
@@ -2353,7 +2355,7 @@
# close commands
if ($root->{'cmdname'}) {
if ($root->{'cmdname'} eq 'float') {
- if ($self->{'DEBUG'}) {
+ if ($self->get_conf('DEBUG')) {
my $type_texi = '';
$type_texi = Texinfo::Convert::Texinfo::convert({'contents' =>
$root->{'extra'}->{'type'}->{'content'}})
if ($root->{'extra'} and $root->{'extra'}->{'type'}->{'normalized'}
ne '');
@@ -2374,7 +2376,7 @@
} elsif ($root->{'extra'}->{'shortcaption'}) {
$caption = $root->{'extra'}->{'shortcaption'};
}
- #if ($self->{'DEBUG'}) {
+ #if ($self->get_conf('DEBUG')) {
# my $caption_texi =
# Texinfo::Convert::Texinfo::convert({ 'contents' =>
$caption->{'contents'}});
# print STDERR " CAPTION: $caption_texi\n";
- texinfo/tp TODO texi2any.pl Texinfo/Common.pm T...,
Patrice Dumas <=