[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp Texinfo/Common.pm Texinfo/Parser.pm ...
From: |
Patrice Dumas |
Subject: |
texinfo/tp Texinfo/Common.pm Texinfo/Parser.pm ... |
Date: |
Sat, 27 Nov 2010 00:38:41 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 10/11/27 00:38:41
Modified files:
tp/Texinfo : Common.pm Parser.pm
tp/Texinfo/Convert: Plaintext.pm
tp/t : 27float.t
tp/t/results/coverage: block_commands.pl
tp/t/results/float: empty_listoffloats.pl
listoffloats_with_commands.pl
numbering_captions_listoffloats.pl
Log message:
add support for translations.
Handle float.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Parser.pm?cvsroot=texinfo&r1=1.157&r2=1.158
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/27float.t?cvsroot=texinfo&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/block_commands.pl?cvsroot=texinfo&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/float/empty_listoffloats.pl?cvsroot=texinfo&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/float/listoffloats_with_commands.pl?cvsroot=texinfo&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/float/numbering_captions_listoffloats.pl?cvsroot=texinfo&r1=1.1&r2=1.2
Patches:
Index: Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- Texinfo/Common.pm 22 Nov 2010 18:58:36 -0000 1.4
+++ Texinfo/Common.pm 27 Nov 2010 00:38:40 -0000 1.5
@@ -22,9 +22,25 @@
use strict;
-# nothing exported.
require Exporter;
-use vars qw($VERSION);
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
address@hidden = qw(Exporter);
+
+# Items to export into callers namespace by default. Note: do not export
+# names by default without a very good reason. Use EXPORT_OK instead.
+# Do not simply export all your public functions/methods/constants.
+
+# This allows declaration use Texinfo::Covert::Text ':all';
+# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
+# will save memory.
+%EXPORT_TAGS = ( 'all' => [ qw(
+) ] );
+
address@hidden = ( @{ $EXPORT_TAGS{'all'} } );
+
address@hidden = qw(
+);
+
$VERSION = '0.01';
# i18n
Index: Texinfo/Parser.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Parser.pm,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -b -r1.157 -r1.158
--- Texinfo/Parser.pm 26 Nov 2010 17:56:26 -0000 1.157
+++ Texinfo/Parser.pm 27 Nov 2010 00:38:40 -0000 1.158
@@ -34,6 +34,9 @@
# to detect if an encoding may be used to open the files
use Encode;
+# for i18n
+use Locale::Messages;
+
# commands definitions
use Texinfo::Common;
@@ -63,6 +66,7 @@
errors
indices_information
floats_information
+ gdt
) ] );
@EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
@@ -73,6 +77,110 @@
$VERSION = '0.01';
# i18n
+
+# we want a reliable way to switch locale, so we don't use the system
+# gettext.
+Locale::Messages->select_package ('gettext_pp');
+
+my $strings_textdomain = 'texinfo_document';
+my $messages_textdomain = 'texinfo';
+
+# libintl converts between encodings but doesn't decode them into the
+# perl internal format.
+sub encode_i18n_string($$)
+{
+ my $string = shift;
+ my $encoding = shift;
+ if ($encoding ne 'us-ascii' and Encode::resolve_alias($encoding)) {
+ return Encode::decode($encoding, $string);
+ }
+ return $string;
+}
+
+# handle translations of in-document strings.
+sub gdt($$$;$)
+{
+ my $self = shift;
+ my $message = shift;
+ my $context = shift;
+ my $conf = shift;
+
+ my $encoding = $self->{'encoding'};
+
+ my $re = join '|', map { quotemeta $_ } keys %$context
+ if (defined($context) and ref($context));
+
+ my $saved_LANGUAGE = $ENV{'LANGUAGE'};
+ Locale::Messages::textdomain($strings_textdomain);
+ Locale::Messages::bind_textdomain_codeset($strings_textdomain, $encoding)
+ if ($encoding ne 'us-ascii');
+ Locale::Messages::bind_textdomain_filter($strings_textdomain,
+ \&encode_i18n_string, $encoding);
+
+ # FIXME do that in the converters when @documentlanguage is found.
+ my $lang = $self->{'documentlanguage'};
+ my @langs = ($lang);
+ if ($lang =~ /^([a-z]+)_([A-Z]+)/) {
+ my $main_lang = $1;
+ my $region_code = $2;
+ push @langs, $main_lang;
+ }
+
+ my $locales = '';
+
+ foreach my $language (@langs) {
+ $locales .= "$language.$encoding:";
+ # always try us-ascii, the charset should always be a subset of
+ # all charset, and should resort to @-commands if needed for non
+ # ascii characters
+ if ($encoding ne 'us-ascii') {
+ $locales .= "$language.us-ascii:";
+ }
+ }
+ $locales =~ s/:$//;
+ #print STDERR "$locales\n";
+ # END FIXME
+
+ Locale::Messages::nl_putenv("LANGUAGE=$locales");
+
+ my $result;
+ if (!defined($context) or ref($context)) {
+ $result = Locale::Messages::gettext($message);
+ } else {
+ $result = Locale::Messages::pgettext($context, $message);
+ }
+
+ Locale::Messages::textdomain($messages_textdomain);
+ # old perl complains 'Use of uninitialized value in scalar assignment'
+ if (!defined($saved_LANGUAGE)) {
+ delete ($ENV{'LANGUAGE'});
+ } else {
+ $ENV{'LANGUAGE'} = $saved_LANGUAGE;
+ }
+
+ my $parser_conf;
+ # we change the substituted brace-enclosed strings to values, that
+ # way they are substituted, including when they are Texinfo trees.
+ if (defined($re)) {
+ # next line taken from libintl perl, copyright Guido. sub __expand
+ $result =~ s/\{($re)\}/address@hidden/g;
+ foreach my $substitution(keys %$context) {
+ #print STDERR "$result $substitution $context->{$substitution}\n";
+ $parser_conf->{'values'}->{$substitution} = $context->{$substitution};
+ }
+ }
+ # FIXME reuse a parser?
+ my $parser = parser($parser_conf);
+
+ if ($conf->{'paragraph'}) {
+ $result = $parser->parse_texi_text($result);
+ } else {
+ $result = $parser->parse_texi_line($result);
+ }
+ return $result;
+}
+
+
sub N__($)
{
return $_[0];
@@ -102,7 +210,7 @@
# the following are dynamically modified during the document parsing.
'aliases' => {}, # key is a command name value is the alias
'values' => {}, # the key is the name, the value the @set name
- # argument
+ # argument. A Texinfo tree may also be used.
'macros' => {}, # the key is the user-defined macro name. The
# value is the reference on a macro element
# as obtained by parsing the @macro
@@ -447,7 +555,7 @@
if (defined($conf)) {
foreach my $key (keys(%$conf)) {
if (exists($default_configuration{$key})) {
- if (ref($conf->{$key}) ne 'CODE') {
+ if (ref($conf->{$key}) ne 'CODE' and $key ne 'values') {
$parser->{$key} = _deep_copy($conf->{$key});
} else {
$parser->{$key} = $conf->{$key};
@@ -457,7 +565,9 @@
}
}
}
-
+ #foreach my $value (keys %{$parser->{'values'}}) {
+ # print STDERR " -> $value $parser->{'values'}->{$value}\n";
+ #}
# Now initialize command hash that are dynamically modified, notably
# those for index commands, and lists, based on defaults and user provided.
$parser->{'misc_commands'} = _deep_copy (\%misc_commands);
@@ -555,6 +665,8 @@
push @$lines_array, [$line, $line_nr];
}
}
+
+ $self = parser() if (!defined($self));
$self->{'input'} = [{'pending' => $lines_array}];
return $self->_parse_texi();
}
@@ -585,6 +697,7 @@
'type' => 'preamble' };
}
+ $self = parser() if (!defined($self));
$self->{'input'} = [{
'pending' => [ [$line, { 'line_nr' => $line_nr,
'file_name' => $file_name, 'macro' => '' }] ],
@@ -2523,7 +2636,20 @@
if ($line =~ s/^{([\w\-]+)}//) {
my $value = $1;
if (exists($self->{'values'}->{$value})) {
+ if (!ref($self->{'values'}->{$value})) {
$line = $self->{'values'}->{$value} . $line;
+ # the push @{$current->{'contents'}}, {}; prevents a trailing
+ # text to be merged, to avoid having the value tree modified.
+ } elsif (ref($self->{'values'}->{$value}) eq 'ARRAY') {
+ foreach my $content (@{$self->{'values'}->{$value}}) {
+ push @{$current->{'contents'}}, $content;
+ }
+ push @{$current->{'contents'}}, {};
+ } elsif (ref($self->{'values'}->{$value}) eq 'HASH') {
+ my $content = $self->{'values'}->{$value};
+ push @{$current->{'contents'}}, $content;
+ push @{$current->{'contents'}}, {};
+ }
} else {
# caller should expand something along
# gdt('@{No value for `{value}\'@}', {'value' => $value},
{'keep_texi'=> 1});
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- Texinfo/Convert/Plaintext.pm 26 Nov 2010 15:24:22 -0000 1.21
+++ Texinfo/Convert/Plaintext.pm 27 Nov 2010 00:38:41 -0000 1.22
@@ -28,6 +28,7 @@
use Texinfo::Convert::Paragraph;
use Texinfo::Convert::Line;
use Texinfo::Convert::UnFilled;
+use Texinfo::Parser qw(gdt);
use Carp qw(cluck);
@@ -220,6 +221,8 @@
'footnotestyle' => 'end',
'fillcolumn' => 72,
'documentencoding' => 'us-ascii',
+ 'encoding' => 'us-ascii',
+ 'documentlanguage' => 'en',
'number_footnotes' => 1,
'debug' => 0
@@ -391,8 +394,9 @@
return $converted;
}
-sub _definition_category($$$)
+sub _definition_category($$$$)
{
+ my $self = shift;
my $current = shift;
my $arg_category = shift;
my $arg_class = shift;
@@ -401,14 +405,18 @@
my $style =
$Texinfo::Common::command_index_prefix{$current->{'extra'}->{'def_command'}};
- 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";
+ #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 ($style eq 'f') {
- return Texinfo::Parser::parse_texi_line (undef, "$category on $class");
- #gdt('{category} on {class}', { 'category' => $category, 'class' => $class
});
+ #return Texinfo::Parser::parse_texi_line (undef, "$category on $class");
+ return $self->gdt('{category} on {class}', { 'category' =>
$arg_category->[0],
+ 'class' => $arg_class->[0] });
} elsif ($style eq 'v') {
- return Texinfo::Parser::parse_texi_line (undef, "$category of $class");
+ #return Texinfo::Parser::parse_texi_line (undef, "$category of $class");
+ return $self->gdt('{category} of {class}', { 'category' =>
$arg_category->[0],
+ 'class' => $arg_class->[0] });
}
return $arg_category->[0];
}
@@ -628,6 +636,8 @@
} elsif ($command eq 'anchor') {
# TODO
} elsif ($ref_commands{$command}) {
+ # FIXME if it a reference to a float with a label, $arg[1] should
+ # be set to '$type $number' or '$number' if there is no type.
if ($root->{'extra'} and $root->{'extra'}->{'brace_command_contents'}
and scalar(@{$root->{'extra'}->{'brace_command_contents'}})) {
my @args = @{$root->{'extra'}->{'brace_command_contents'}};
@@ -749,9 +759,12 @@
if ($root->{'cmdname'} eq 'quotation'
or $root->{'cmdname'} eq 'smallquotation') {
if ($root->{'extra'} and
$root->{'extra'}->{'block_command_line_contents'}) {
- my $quotation_arg = Texinfo::Convert::Texinfo::convert(
- {'contents' =>
$root->{'extra'}->{'block_command_line_contents'}->[0]});
- my $prepended = Texinfo::Parser::parse_texi_line (undef,
'@b{'.${quotation_arg}.':} ');
+ #my $quotation_arg = Texinfo::Convert::Texinfo::convert(
+ # {'contents' =>
$root->{'extra'}->{'block_command_line_contents'}->[0]});
+ #my $prepended = Texinfo::Parser::parse_texi_line (undef,
'@b{'.${quotation_arg}.':} ');
+ my $prepended = $self->gdt('@b{{quotation_arg}:} ',
+ {'quotation_arg' =>
$root->{'extra'}->{'block_command_line_contents'}->[0]});
+ #print STDERR Data::Dumper->Dump([$prepended]);
$result = $self->convert_line ($prepended);
$self->{'format_context'}->[-1]->{'counter'} +=
Texinfo::Convert::Unicode::string_width($result);
@@ -852,6 +865,10 @@
if ($root->{'extra'}->{'misc_args'}->[0] eq 'none');
$self->{'ignored_types'}->{'empty_spaces_before_paragraph'} =
1;
}
+ } elsif ($root->{'cmdname'} eq 'documentencoding') {
+ $self->{'encoding'} = $root->{'extra'}->{'encoding_alias'}
+ if (defined($root->{'extra'})
+ and defined($root->{'extra'}->{'encoding_alias'}));
}
}
}
@@ -928,7 +945,7 @@
print STDERR "DEF LINE(parsed) category `$category' name `$name' class
`$class' type `$type'\n"
if ($self->{'debug'});
- my $parsed_definition_category = _definition_category ($root,
+ my $parsed_definition_category = $self->_definition_category ($root,
[$parsed_category,
$category],
[$parsed_class, $class]);
my $definition_category =
$self->convert_unfilled($parsed_definition_category, {'indent_length' => 0});
@@ -1005,47 +1022,86 @@
pop @{$self->{'formatters'}};
delete $self->{'format_context'}->[-1]->{'counter'};
}
+
+ if ($root->{'cmdname'} and $root->{'cmdname'} eq 'float') {
+
+ if ($self->{'debug'}) {
+ my $type_texi = '';
+ $type_texi =
Texinfo::Convert::Texinfo::convert($root->{'extra'}->{'type'})
+ if ($root->{'extra'} and $root->{'extra'}->{'type'});
+ my $number = '';
+ $number = $root->{'number'} if (defined($root->{'number'}));
+ print STDERR "FLOAT: ($number) ($type_texi)\n";
+ }
+ if ($root->{'extra'}) {
+ my $caption;
+ if ($root->{'extra'}->{'caption'}) {
+ $caption = $root->{'extra'}->{'caption'};
+ } elsif ($root->{'extra'}->{'shortcaption'}) {
+ $caption = $root->{'extra'}->{'shortcaption'};
+ }
+ if ($self->{'debug'}) {
+ my $caption_texi =
+ Texinfo::Convert::Texinfo::convert({ 'contents' =>
$caption->{'contents'}});
+ print STDERR " CAPTION: $caption_texi\n";
+ }
+ my $type;
+ if ($root->{'extra'}->{'type'}) {
+ $type = {'contents' => $root->{'extra'}->{'type'}->{'content'}};
+ }
+
+ my $prepended;
+ if ($type) {
+ #print STDERR "AAAAAAA $root->{'extra'}->{'type'} "
+ # .Data::Dumper->Dump([$root->{'extra'}->{'type'}]);
+ if ($caption) {
+ if (defined($root->{'number'})) {
+ $prepended = $self->gdt('{float_type} {float_number}: ',
+ {'float_type' => $type,
+ 'float_number' => $root->{'number'}});
+ } else {
+ $prepended = $self->gdt('{float_type}: ',
+ {'float_type' => $type});
+ }
+ } else {
+ if (defined($root->{'number'})) {
+ $prepended = $self->gdt("{float_type} {float_number}\n",
+ {'float_type' => $type,
+ 'float_number' => $root->{'number'}});
+ } else {
+ $prepended = $self->gdt("{float_type}\n",
+ {'float_type' => $type});
+ }
+ }
+ } elsif (defined($root->{'number'})) {
+ if ($caption) {
+ $prepended = $self->gdt('{float_number}: ',
+ {'float_number' => $root->{'number'}});
+ } else {
+ $prepended = $self->gdt("{float_number}\n",
+ {'float_number' => $root->{'number'}});
+ }
+ }
+ if ($prepended) {
+ #print STDERR "PREPENDED ".Data::Dumper->Dump([$prepended]);
+ $result .= $self->convert_line ($prepended);
+ $self->{'format_context'}->[-1]->{'counter'} +=
+ Texinfo::Convert::Unicode::string_width($result);
+ }
+ if ($caption) {
+ $result .= $self->convert($caption->{'args'}->[0]);
+ }
+ }
+ }
if ($preformatted) {
$result .= $preformatted->{'container'}->end();
pop @{$self->{'formatters'}};
pop @{$self->{'context'}};
}
+
pop @{$self->{'format_context'}}
if ($root->{'cmdname'} and $format_context_commands{$root->{'cmdname'}});
- if ($root->{'cmdname'} and $root->{'cmdname'} eq 'float') {
- my $type_texi;
- my $caption_texi;
- #if ($root->{'extra'}) {
- # my @contents;
- # if ($root->{'extra'}->{'type'}) {
- # @contents = (@{$root->{'extra'}->{'type'}->{'contents'}});
- # push @contents, {'text' => " $root->{'number'}"}
- # if (defined($root->{'number'}));
- # } elsif (defined($root->{'number'})) {
- # @contents = ({'text' => $root->{'number'}});
- # }
- # my $caption;
- # if ($root->{'extra'}->{'caption'}) {
- # $caption = $root->{'extra'}->{'caption'};
- # } elsif ($root->{'extra'}->{'shortcaption'}) {
- # $caption = $root->{'extra'}->{'shortcaption'};
- # }
- # if ($caption) {
- # $caption_texi = Texinfo::Convert::Texinfo::convert(
- # {'contents' => $caption->{'contents'}})
- # }
- #}
- if ($self->{'debug'}) {
- my $number = '';
- $number = $root->{'number'} if (defined($root->{'number'}));
- $type_texi = '' if (!defined($type_texi));
- $caption_texi = '' if (!defined($caption_texi));
- print STDERR "FLOAT: ($number) ($type_texi) ($caption_texi)";
- }
- #if (
- #my $prepended = Texinfo::Parser::parse_texi_line (undef,
'@b{'.${quotation_arg}.':} ');
- }
return $result;
}
Index: t/27float.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/27float.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- t/27float.t 26 Nov 2010 15:24:22 -0000 1.3
+++ t/27float.t 27 Nov 2010 00:38:41 -0000 1.4
@@ -9,6 +9,12 @@
['empty_listoffloats',
'@listoffloats
'],
+['simple',
+'@float Type, Label
+
+In float.
address@hidden
address@hidden float'],
['numbering_captions_listoffloats',
'@node Top
@top Test floats
@@ -22,15 +28,15 @@
@float Text
No label but caption and shortcaption.
address@hidden label}
address@hidden label}
address@hidden No label}
address@hidden No label}
@end float
@float ,label but no type
No type but caption and shortcaption.
address@hidden type}
address@hidden type}
address@hidden No type}
address@hidden No type}
@end float
@@ -47,22 +53,22 @@
@float
No label, no type, but caption and shortcaption.
address@hidden label, no type, but caption and shortcaption.}
address@hidden label, no type, but caption and shortcaption.}
address@hidden No label, no type, but caption and shortcaption.}
address@hidden No label, no type, but caption and shortcaption.}
@end float
@float ,label but no type 2
Second float with no type.
address@hidden type 2}
address@hidden type 2}
address@hidden No type 2}
address@hidden No type 2}
@end float
@float Warning, warning in top
A warning
address@hidden warning}
address@hidden warning}
address@hidden A warning}
address@hidden A warning}
@end float
@node chapter
@@ -71,7 +77,7 @@
@float Text, text in chapter
Text in chapter
address@hidden in chapter}
address@hidden Text in chapter}
@end float
@float Text, float with a lot of features and no shortcaption
@@ -81,21 +87,21 @@
@float address@hidden'address@hidden, theoreme
A address@hidden'address@hidden
address@hidden address@hidden'address@hidden
address@hidden A address@hidden'address@hidden
@end float
@float ,label but no type in chapter
float with no type.
address@hidden type in chapter}
address@hidden type in chapter}
address@hidden No type in chapter}
address@hidden No type in chapter}
@end float
@float Warning, warning in chapter
A warning
address@hidden warning in chapter}
address@hidden warning in chapter}
address@hidden A warning in chapter}
address@hidden A warning in chapter}
@end float
@menu
@@ -119,14 +125,14 @@
@end menu
@float Text, unnumbered float
unnum
address@hidden float}
address@hidden float}
address@hidden unnumbered float}
address@hidden unnumbered float}
@end float
@float ,label but no type in unnumbered
float with no type.
address@hidden type in unnumbered}
address@hidden type in unnumbered}
address@hidden No type in unnumbered}
address@hidden No type in unnumbered}
@end float
@@ -136,8 +142,8 @@
@float Text, Section within unnumbered float
Section within unnumbered
address@hidden within unnumbered}
address@hidden within unnumbered}
address@hidden Section within unnumbered}
address@hidden Section within unnumbered}
@end float
@node Chapter with unnumbsubsec
@@ -148,8 +154,8 @@
@end menu
@float Text, Chapter with subsec float
Chap
address@hidden with subsec}
address@hidden with subsec}
address@hidden Chapter with subsec}
address@hidden Chapter with subsec}
@end float
@node unnumbered sec
@@ -157,15 +163,15 @@
@float Text, unnumbered sec float
Chap
address@hidden sec float}
address@hidden sec float}
address@hidden unnumbered sec float}
address@hidden unnumbered sec float}
@end float
@float ,label but no type in unnumbered subsec in chapter
float with no type.
address@hidden type in unnumbered subsec in chapter}
address@hidden type in unnumbered subsec in chapter}
address@hidden No type in unnumbered subsec in chapter}
address@hidden No type in unnumbered subsec in chapter}
@end float
@node Appendix for float
@@ -174,8 +180,8 @@
@float Text, appendix sec float
Appendix
address@hidden sec float}
address@hidden sec float}
address@hidden appendix sec float}
address@hidden appendix sec float}
@end float
@node list of floats
@@ -206,7 +212,7 @@
);
foreach my $test (@test_cases) {
-# $test->[2]->{'test_formats'} = ['plaintext'];
+ $test->[2]->{'test_formats'} = ['plaintext'];
}
our ($arg_test_case, $arg_generate, $arg_debug);
Index: t/results/coverage/block_commands.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage/block_commands.pl,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- t/results/coverage/block_commands.pl 24 Nov 2010 00:15:42 -0000
1.28
+++ t/results/coverage/block_commands.pl 27 Nov 2010 00:38:41 -0000
1.29
@@ -370,6 +370,9 @@
In float
+a float 1: in caption
+
+in caption
';
1;
Index: t/results/float/empty_listoffloats.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/float/empty_listoffloats.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- t/results/float/empty_listoffloats.pl 20 Nov 2010 16:58:06 -0000
1.5
+++ t/results/float/empty_listoffloats.pl 27 Nov 2010 00:38:41 -0000
1.6
@@ -53,4 +53,7 @@
];
+
+$result_converted{'plaintext'}->{'empty_listoffloats'} = '';
+
1;
Index: t/results/float/listoffloats_with_commands.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/float/listoffloats_with_commands.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- t/results/float/listoffloats_with_commands.pl 20 Nov 2010 16:58:06
-0000 1.6
+++ t/results/float/listoffloats_with_commands.pl 27 Nov 2010 00:38:41
-0000 1.7
@@ -105,4 +105,7 @@
$result_errors{'listoffloats_with_commands'} = [];
+
+$result_converted{'plaintext'}->{'listoffloats_with_commands'} = '';
+
1;
Index: t/results/float/numbering_captions_listoffloats.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/float/numbering_captions_listoffloats.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- t/results/float/numbering_captions_listoffloats.pl 24 Nov 2010 00:15:42
-0000 1.1
+++ t/results/float/numbering_captions_listoffloats.pl 27 Nov 2010 00:38:41
-0000 1.2
@@ -317,7 +317,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No label'
+ 'text' => 'C No label'
}
],
'parent' => {},
@@ -348,7 +348,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No label'
+ 'text' => 'SC No label'
}
],
'parent' => {},
@@ -464,7 +464,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No type'
+ 'text' => 'C No type'
}
],
'parent' => {},
@@ -495,7 +495,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No type'
+ 'text' => 'SC No type'
}
],
'parent' => {},
@@ -720,7 +720,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No label, no type, but caption and
shortcaption.'
+ 'text' => 'C No label, no type, but caption and
shortcaption.'
}
],
'parent' => {},
@@ -751,7 +751,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No label, no type, but caption and
shortcaption.'
+ 'text' => 'SC No label, no type, but caption and
shortcaption.'
}
],
'parent' => {},
@@ -860,7 +860,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No type 2'
+ 'text' => 'C No type 2'
}
],
'parent' => {},
@@ -891,7 +891,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No type 2'
+ 'text' => 'SC No type 2'
}
],
'parent' => {},
@@ -1015,7 +1015,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'A warning'
+ 'text' => 'C A warning'
}
],
'parent' => {},
@@ -1046,7 +1046,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'A warning'
+ 'text' => 'SC A warning'
}
],
'parent' => {},
@@ -1269,7 +1269,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'Text in chapter'
+ 'text' => 'C Text in chapter'
}
],
'parent' => {},
@@ -1587,7 +1587,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'A th'
+ 'text' => 'C A th'
},
{
'args' => [
@@ -1746,7 +1746,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No type in chapter'
+ 'text' => 'C No type in chapter'
}
],
'parent' => {},
@@ -1777,7 +1777,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No type in chapter'
+ 'text' => 'SC No type in chapter'
}
],
'parent' => {},
@@ -1901,7 +1901,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'A warning in chapter'
+ 'text' => 'C A warning in chapter'
}
],
'parent' => {},
@@ -1932,7 +1932,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'A warning in chapter'
+ 'text' => 'SC A warning in chapter'
}
],
'parent' => {},
@@ -2485,7 +2485,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'unnumbered float'
+ 'text' => 'SC unnumbered float'
}
],
'parent' => {},
@@ -2516,7 +2516,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'unnumbered float'
+ 'text' => 'C unnumbered float'
}
],
'parent' => {},
@@ -2638,7 +2638,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No type in unnumbered'
+ 'text' => 'C No type in unnumbered'
}
],
'parent' => {},
@@ -2669,7 +2669,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No type in unnumbered'
+ 'text' => 'SC No type in unnumbered'
}
],
'parent' => {},
@@ -2886,7 +2886,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'Section within unnumbered'
+ 'text' => 'SC Section within unnumbered'
}
],
'parent' => {},
@@ -2917,7 +2917,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'Section within unnumbered'
+ 'text' => 'C Section within unnumbered'
}
],
'parent' => {},
@@ -3203,7 +3203,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'Chapter with subsec'
+ 'text' => 'SC Chapter with subsec'
}
],
'parent' => {},
@@ -3234,7 +3234,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'Chapter with subsec'
+ 'text' => 'C Chapter with subsec'
}
],
'parent' => {},
@@ -3452,7 +3452,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'unnumbered sec float'
+ 'text' => 'SC unnumbered sec float'
}
],
'parent' => {},
@@ -3483,7 +3483,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'unnumbered sec float'
+ 'text' => 'C unnumbered sec float'
}
],
'parent' => {},
@@ -3611,7 +3611,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No type in unnumbered subsec in chapter'
+ 'text' => 'C No type in unnumbered subsec in chapter'
}
],
'parent' => {},
@@ -3642,7 +3642,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'No type in unnumbered subsec in chapter'
+ 'text' => 'SC No type in unnumbered subsec in
chapter'
}
],
'parent' => {},
@@ -3853,7 +3853,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'appendix sec float'
+ 'text' => 'SC appendix sec float'
}
],
'parent' => {},
@@ -3884,7 +3884,7 @@
'contents' => [
{
'parent' => {},
- 'text' => 'appendix sec float'
+ 'text' => 'C appendix sec float'
}
],
'parent' => {},
@@ -5467,15 +5467,15 @@
@float Text
No label but caption and shortcaption.
address@hidden label}
address@hidden label}
address@hidden No label}
address@hidden No label}
@end float
@float ,label but no type
No type but caption and shortcaption.
address@hidden type}
address@hidden type}
address@hidden No type}
address@hidden No type}
@end float
@@ -5492,22 +5492,22 @@
@float
No label, no type, but caption and shortcaption.
address@hidden label, no type, but caption and shortcaption.}
address@hidden label, no type, but caption and shortcaption.}
address@hidden No label, no type, but caption and shortcaption.}
address@hidden No label, no type, but caption and shortcaption.}
@end float
@float ,label but no type 2
Second float with no type.
address@hidden type 2}
address@hidden type 2}
address@hidden No type 2}
address@hidden No type 2}
@end float
@float Warning, warning in top
A warning
address@hidden warning}
address@hidden warning}
address@hidden A warning}
address@hidden A warning}
@end float
@node chapter
@@ -5516,7 +5516,7 @@
@float Text, text in chapter
Text in chapter
address@hidden in chapter}
address@hidden Text in chapter}
@end float
@float Text, float with a lot of features and no shortcaption
@@ -5526,21 +5526,21 @@
@float address@hidden'address@hidden, theoreme
A address@hidden'address@hidden
address@hidden address@hidden'address@hidden
address@hidden A address@hidden'address@hidden
@end float
@float ,label but no type in chapter
float with no type.
address@hidden type in chapter}
address@hidden type in chapter}
address@hidden No type in chapter}
address@hidden No type in chapter}
@end float
@float Warning, warning in chapter
A warning
address@hidden warning in chapter}
address@hidden warning in chapter}
address@hidden A warning in chapter}
address@hidden A warning in chapter}
@end float
@menu
@@ -5564,14 +5564,14 @@
@end menu
@float Text, unnumbered float
unnum
address@hidden float}
address@hidden float}
address@hidden unnumbered float}
address@hidden unnumbered float}
@end float
@float ,label but no type in unnumbered
float with no type.
address@hidden type in unnumbered}
address@hidden type in unnumbered}
address@hidden No type in unnumbered}
address@hidden No type in unnumbered}
@end float
@@ -5581,8 +5581,8 @@
@float Text, Section within unnumbered float
Section within unnumbered
address@hidden within unnumbered}
address@hidden within unnumbered}
address@hidden Section within unnumbered}
address@hidden Section within unnumbered}
@end float
@node Chapter with unnumbsubsec
@@ -5593,8 +5593,8 @@
@end menu
@float Text, Chapter with subsec float
Chap
address@hidden with subsec}
address@hidden with subsec}
address@hidden Chapter with subsec}
address@hidden Chapter with subsec}
@end float
@node unnumbered sec
@@ -5602,15 +5602,15 @@
@float Text, unnumbered sec float
Chap
address@hidden sec float}
address@hidden sec float}
address@hidden unnumbered sec float}
address@hidden unnumbered sec float}
@end float
@float ,label but no type in unnumbered subsec in chapter
float with no type.
address@hidden type in unnumbered subsec in chapter}
address@hidden type in unnumbered subsec in chapter}
address@hidden No type in unnumbered subsec in chapter}
address@hidden No type in unnumbered subsec in chapter}
@end float
@node Appendix for float
@@ -5619,8 +5619,8 @@
@float Text, appendix sec float
Appendix
address@hidden sec float}
address@hidden sec float}
address@hidden appendix sec float}
address@hidden appendix sec float}
@end float
@node list of floats
@@ -6686,4 +6686,108 @@
$result_floats{'numbering_captions_listoffloats'}{'th_00e9or_00e8me'}[0]{'float_section'}
= $result_floats{'numbering_captions_listoffloats'}{''}[5]{'float_section'};
+
+$result_converted{'plaintext'}->{'numbering_captions_listoffloats'} = 'Test
floats
+
+Text 1: An example of float caption...
+
+No label but caption and shortcaption.
+
+Text: C No label
+
+No type but caption and shortcaption.
+
+1: C No type
+
+No type but label and no caption nor shortcaption.
+
+2
+No label, no type, no caption no shortcaption.
+
+No label, no type, but caption and shortcaption.
+C No label, no type, but caption and shortcaption.
+
+Second float with no type.
+
+3: C No type 2
+
+A warning
+
+Warning 1: C A warning
+
+A chapter
+Text in chapter
+
+Text 1.1: C Text in chapter
+
+Text 1.2: An example of float caption, no shortcaption...
+
+A the\'ore`me
+
+the\'ore`me 1.1: C A the\'ore`me
+
+float with no type.
+
+1.1: C No type in chapter
+
+A warning
+
+Warning 1.1: C A warning in chapter
+
+* section::
+A section
+A text in float no caption a label a type.
+
+Text 1.3
+Unnumbered
+* Section within unnumbered::
+unnum
+
+Text 5: C unnumbered float
+float with no type.
+
+5: C No type in unnumbered
+
+Section within unnumbered
+Section within unnumbered
+
+Text 6: C Section within unnumbered
+
+Chapter with unnumbsubsec
+* unnumbered sec::
+Chap
+
+Text 2.1: C Chapter with subsec
+
+unnumbered sec
+Chap
+
+Text 2.2: C unnumbered sec float
+
+float with no type.
+
+2.1: C No type in unnumbered subsec in chapter
+
+Appendix for float
+Appendix
+
+Text A.1: C appendix sec float
+
+list of floats
+See *note text in section::. And (*note text in chapter::). *Note text
+with a lot of features::.
+
+ And now a ref (without manual or printed manual) *note cross ref:
+text with a lot of features.
+
+ And now a ref (with manual without printed manual) *note cross ref:
+(manual)text with a lot of features.
+
+ And now a ref (without manual with a printed manual) *note cross ref:
+()text with a lot of features.
+
+ A ref to float without type *note label but no type::.
+
+';
+
1;