[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Common.pm Texinfo/Conve...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Common.pm Texinfo/Conve... |
Date: |
Fri, 30 Sep 2011 22:31:32 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/09/30 22:31:32
Modified files:
tp : TODO
tp/Texinfo : Common.pm
tp/Texinfo/Convert: Converter.pm HTML.pm Plaintext.pm Text.pm
Unicode.pm
tp/t : 25regions.t languages.t
tp/t/results/languages: multiple.pl
Added files:
tp/t/results/regions: today_in_copying.pl
Log message:
Simplify unicode_text call.
Use encoded_accents for conversion to unicode with any encoding.
Pass correctly all the informations to Text::convert.
More modules documentation.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.181&r2=1.182
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Common.pm?cvsroot=texinfo&r1=1.70&r2=1.71
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Converter.pm?cvsroot=texinfo&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.159&r2=1.160
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.166&r2=1.167
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Text.pm?cvsroot=texinfo&r1=1.71&r2=1.72
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Unicode.pm?cvsroot=texinfo&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/25regions.t?cvsroot=texinfo&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/languages.t?cvsroot=texinfo&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/languages/multiple.pl?cvsroot=texinfo&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/regions/today_in_copying.pl?cvsroot=texinfo&rev=1.1
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -b -r1.181 -r1.182
--- TODO 29 Sep 2011 23:24:41 -0000 1.181
+++ TODO 30 Sep 2011 22:31:30 -0000 1.182
@@ -2,6 +2,8 @@
perl -w t/02coverage.t -o
xmllint --nonet --noout --valid commands.xml
+Add automake conditionals if modules required for tests are not present.
+
In xml output, as can be seen in xtable/table_nested macro output do
not begin with an end of line
<macro>@vtable @asis
@@ -167,16 +169,11 @@
Test @address@hidden and @sc{@'e} in HTML with 8bit and utf_, with and without
enable encoding and entities.
-Test that some constructs in @copying in comments in HTML are converted
-differently (as there is a 'converter' passed to Texinfo::Text) than when
-there are in a Text expansion context. The text is done, but the passed
-information is the enabled_encoding so cannot be in tests as long as
-there is an issue of encoding.
-
In @copying things like some raw formats may be expanded. However it is
not clear that it should be the same than in the main converter. Maybe a
specific list of formats could be passed to Convert::Text::convert, which
would be different (for example Info and Plaintext even if converting HTML).
+This requires a test, to begin with.
An unknwown command in a context where not all commands are accepted leads
to an error message. There is a FIXME in the code. The test case is
Index: Texinfo/Common.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Common.pm,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -b -r1.70 -r1.71
--- Texinfo/Common.pm 29 Sep 2011 23:24:42 -0000 1.70
+++ Texinfo/Common.pm 30 Sep 2011 22:31:30 -0000 1.71
@@ -1212,6 +1212,9 @@
and $self->{'encoding_name'}) {
$options{'enabled_encoding'} = $self->{'encoding_name'};
}
+ $options{'TEST'} = 1 if ($self->get_conf('TEST'));
+ $options{'NUMBER_SECTIONS'} = $self->get_conf('NUMBER_SECTIONS');
+ $options{'converter'} = $self;
return %options;
}
Index: Texinfo/Convert/Converter.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Converter.pm,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- Texinfo/Convert/Converter.pm 29 Sep 2011 20:13:07 -0000 1.48
+++ Texinfo/Convert/Converter.pm 30 Sep 2011 22:31:31 -0000 1.49
@@ -836,23 +836,22 @@
= Texinfo::Common::find_innermost_accent_contents($accent);
my $result = $self->convert_tree({'contents' => $contents});
+ my $encoded;
if ($self->get_conf('ENABLE_ENCODING')) {
- if ($self->{'encoding_name'} and $self->{'encoding_name'} eq 'utf-8') {
- return Texinfo::Convert::Unicode::unicode_accents($result, $stack,
- $format_accents, $in_upper_case);
- } elsif ($self->{'encoding_name'}
- and
$Texinfo::Encoding::eight_bit_encoding_aliases{$self->{'encoding_name'}}) {
- return Texinfo::Convert::Unicode::eight_bit_accents($result, $stack,
+ $encoded = Texinfo::Convert::Unicode::encoded_accents($result, $stack,
$self->{'encoding_name'},
$format_accents,
$in_upper_case);
}
- }
+ if (!defined($encoded)) {
foreach my $accent_command (reverse(@$stack)) {
$result = &$format_accents ($result, $accent_command,
$in_upper_case);
}
return $result;
+ } else {
+ return $encoded;
+ }
}
1;
Index: Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -b -r1.159 -r1.160
--- Texinfo/Convert/HTML.pm 29 Sep 2011 23:24:43 -0000 1.159
+++ Texinfo/Convert/HTML.pm 30 Sep 2011 22:31:31 -0000 1.160
@@ -3394,9 +3394,8 @@
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() or $self->in_math())};
- $text = Texinfo::Convert::Unicode::unicode_text($self, $text, $command,
- $context);
+ $text = Texinfo::Convert::Unicode::unicode_text($text,
+ ($self->in_code() or
$self->in_math()));
} elsif (!$self->in_code() and !$self->in_math()) {
if ($self->get_conf('USE_ISO')) {
$text =~ s/---/\&mdash\;/g;
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -b -r1.166 -r1.167
--- Texinfo/Convert/Plaintext.pm 29 Sep 2011 23:24:43 -0000 1.166
+++ Texinfo/Convert/Plaintext.pm 30 Sep 2011 22:31:31 -0000 1.167
@@ -492,9 +492,8 @@
$text = uc($text) if ($self->{'formatters'}->[-1]->{'upper_case'});
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);
- } elsif (!$context->{'code'} and !$context->{'preformatted'}) {
+ return Texinfo::Convert::Unicode::unicode_text($text, $context->{'code'});
+ } elsif (!$context->{'code'}) {
$text =~ s/---/\x{1F}/g;
$text =~ s/--/-/g;
$text =~ s/\x{1F}/--/g;
@@ -562,7 +561,7 @@
if ($menu_commands{$context}) {
last;
} elsif ($preformatted_code_commands{$context}) {
- $formatter->{'preformatted'} = 1;
+ $formatter->{'code'} = 1;
last;
}
}
Index: Texinfo/Convert/Text.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Text.pm,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -b -r1.71 -r1.72
--- Texinfo/Convert/Text.pm 29 Sep 2011 23:24:43 -0000 1.71
+++ Texinfo/Convert/Text.pm 30 Sep 2011 22:31:31 -0000 1.72
@@ -43,6 +43,8 @@
# will save memory.
%EXPORT_TAGS = ( 'all' => [ qw(
convert
+ ascii_accent
+ text_accents
) ] );
@EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
@@ -190,7 +192,7 @@
}
# format an accent command and nested accents within as Text.
-sub text_accents($$;$)
+sub text_accents($;$$)
{
my $accent = shift;
my $encoding = shift;
@@ -204,15 +206,12 @@
$options->{'sc'} = $in_upper_case if (defined($in_upper_case));
my $text = convert({'contents' => $contents}, $options);
- if ($encoding and $encoding eq 'utf-8') {
- return Texinfo::Convert::Unicode::unicode_accents($text, $stack,
- \&ascii_accent, $in_upper_case);
- } elsif ($encoding
- and $Texinfo::Encoding::eight_bit_encoding_aliases{$encoding}) {
- return Texinfo::Convert::Unicode::eight_bit_accents($text, $stack,
+ my $result = Texinfo::Convert::Unicode::encoded_accents($text, $stack,
$encoding, \&ascii_accent,
$in_upper_case);
+ if (defined($result)) {
+ return $result;
} else {
- my $result = ascii_accents($text, $stack, $in_upper_case);
+ return ascii_accents($text, $stack, $in_upper_case);
}
}
@@ -530,7 +529,7 @@
=head1 SYNOPSIS
- use Texinfo::Convert::Text qw(convert);
+ use Texinfo::Convert::Text qw(convert ascii_accent text_accents);
my $result = convert($tree);
my $result_encoded = convert($tree,
@@ -539,17 +538,84 @@
{'converter' => $converter});
my $result_accent_text = ascii_accent('e', $accent_command);
- my text_accents = text_accents($accents, 'utf-8');
+ my $accents_text = text_accents($accents, 'utf-8');
=head1 DESCRIPTION
-Texinfo::Convert::Text is a simple backend that Encoding takes care of
encoding definition and aliasing.
+Texinfo::Convert::Text is a simple backend that converts a Texinfo tree
+to simple text. It is used for some command argument expansion in
+C<Texinfo::Parser>, for instance the file names, or encoding names.
+The converter is very simple, and, in the default case, cannot handle
+output strings translation or error handling.
=head1 METHODS
=over
-=item
+=item $result = convert($tree, $options)
+
+Convert a Texinfo tree to simple text. I<$options> is a hash reference of
+options. The converter is very simple, and has no internal state besides
+the options. It cannot handle as is output strings translation or error
+storing.
+
+If the I<converter> option is set, some additional features may be available
+for the conversion of some @-commands, like output strings translation or
+error reporting.
+
+The following options may be set:
+
+=over
+
+=item enabled_encoding
+
+If set, the value is considered to be the encoding name texinfo accented
+letters should be converted to. This option corresponds to the
+C<--enable-encoding> option, or the C<ENABLE_ENCODING> customization
+variable.
+
+=item sc
+
+If set, the text is upper-cased.
+
+=item code
+
+If set the text is in code style. (mostly --, ---, '' and `` are kept as
+is).
+
+=item NUMBER_SECTIONS
+
+If set, sections are numbered when output.
+
+=item sort_string
+
+A somehow internal option to convert to text more suitable for alphabetical
+sorting rather than presentation.
+
+=item converter
+
+If this converter object is passed to the function, some features of this
+object may be used during conversion. Mostly error reporting and strings
+translation, as the converter object is also supposed to be a
+L<Texinfo::Report> objet. See also L<Texinfo::Convert::Converter>.
+
+=back
+
+=item $result_accent_text = ascii_accent($text, $accent_command)
+
+I<$text> is the text appearing within an accent command. I<$accent_command>
+should be a Texinfo tree element corresponding to an accent command taking
+an argument. The function returns a transliteration of the accented
+character.
+
+=item $accents_text = text_accents($accents, $encoding, $in_upper_case)
+
+I<$accents> is an accent command that may contain other nested accent
+commands. The function will format the whole stack of nested accent
+commands and the innermost text. If I<$encoding> is set, the formatted
+text is converted to this encoding as much as possible instead of being
+converted as simple ascii. If I<$in_upper_case> is set, the result
+is meant to be upper-cased.
=back
Index: Texinfo/Convert/Unicode.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Unicode.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- Texinfo/Convert/Unicode.pm 29 Sep 2011 22:06:59 -0000 1.20
+++ Texinfo/Convert/Unicode.pm 30 Sep 2011 22:31:31 -0000 1.21
@@ -1,4 +1,4 @@
-# Unicode.pm: handle conversion to and from unicode.
+# Unicode.pm: handle conversion to unicode.
#
# Copyright 2010, 2011 Free Software Foundation, Inc.
#
@@ -39,6 +39,11 @@
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
# will save memory.
%EXPORT_TAGS = ( 'all' => [ qw(
+ unicode_accent
+ encoded_accents
+ unicode_for_brace_no_arg_command
+ unicode_text
+ string_width
) ] );
@EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
@@ -1205,15 +1210,12 @@
}
}
-sub unicode_text($$$$)
+sub unicode_text($$)
{
- my $self = shift;
my $text = shift;
- my $command = shift;
- my $context = shift;
- $text = $command->{'text'} if (!defined($text));
+ my $in_code = shift;
- if (!$context->{'code'} and !$context->{'preformatted'}) {
+ if (!$in_code) {
$text =~ s/---/\x{2014}/g;
$text =~ s/--/\x{2013}/g;
$text =~ s/``/\x{201C}/g;
@@ -1383,6 +1385,24 @@
return $result;
}
+sub encoded_accents ($$$$;$)
+{
+ my $text = shift;
+ my $stack = shift;
+ my $encoding = shift;
+ my $format_accent = shift;
+ my $in_upper_case = shift;
+
+ if ($encoding) {
+ if ($encoding eq 'utf-8') {
+ return unicode_accents($text, $stack, $format_accent, $in_upper_case);
+ } elsif ($Texinfo::Encoding::eight_bit_encoding_aliases{$encoding}) {
+ return eight_bit_accents($text, $stack, $encoding, $format_accent,
+ $in_upper_case);
+ }
+ }
+ return undef;
+}
# returns the unicode for a command with brace and no arg
# if it is known that it is present for the encoding
@@ -1424,3 +1444,93 @@
}
1;
+__END__
+
+=head1 NAME
+
+Texinfo::Convert::Unicode - Handle conversion to Unicode
+
+=head1 SYNOPSIS
+
+ use Texinfo::Convert::Unicode qw(unicode_accent encoded_accents
+ unicode_text);
+
+ my ($innermost_contents, $stack)
+ = Texinfo::Common::find_innermost_accent_contents($accent);
+
+ my $formatted_accents = encoded_accents (convert($innermost_contents),
+ $stack, $encoding, \&Texinfo::Text::ascii_accent);
+
+ my $accent_text = unicode_accent('e', $accent_command);
+
+=head1 DESCRIPTION
+
+Texinfo::Convert::Unicode provides methods that deals with unicode for
+converters. Unicode is important, because it is used internally in perl
+for strings, therefore if converted to Unicode, a string could be output
+in other encodings as well when writting out the converted documents.
+
+When an encoding is given as argument of a method of the module, the
+accented letters should only be converted to unicode if it is known that
+it will be possible to convert the unicode points to encoded charactes
+in the encoding character set.
+
+=head1 METHODS
+
+=over
+
+=item $result = unicode_accent($text, $accent_command)
+
+I<$text> is the text appearing within an accent command. I<$accent_command>
+should be a Texinfo tree element corresponding to an accent command taking
+an argument. The function returns the unicode representation of the accented
+character.
+
+=item $result = encoded_accents ($text, $stack, $encoding, $format_accent,
$in_upper_case)
+
+I<$text> is the text appearing within nested accent commands. I<$stack> is
+an array reference holding the nested accents texinfo element trees. For
+example, I<$text> could be the formatted content and I<$stack> the stack
+returned by C<Texinfo::Common::find_innermost_accent_contents>. I<$encoding>
+is the encoding the accented characters should be encoded to. If
+I<$encoding> not set the I<$result> is set to undef. I<$format_accent>
+is a function reference that is used to format the accent commands if
+there is no encoded character available for the encoding I<$encoding>
+at some point of the conversion of the I<$stack>. Last, if
+I<$in_upper_case> is set, the result is upper-cased.
+
+=item $result = unicode_text ($text, $in_code)
+
+Return I<$text> with characters encoded in unicode. If I<$in_code>
+is set, the text is considered to be in code style.
+
+=item $result = unicode_for_brace_no_arg_command($command_name, $encoding)
+
+Return the unicode representing a command with brace and no argument
+I<$command_name> (like C<@bullet{}>, C<@aa{}> or C<@guilsinglleft{}>),
+or undef if there is no available encoded character for encoding
+I<$encoding>.
+
+=item $width = string_width($string)
+
+Return the string width, taking into account the fact that some characters
+have a zero width (like composing accents) while some have a width of 2
+(most chinese characters, for example).
+
+=back
+
+=head1 AUTHOR
+
+Patrice Dumas, E<lt>address@hidden<gt>
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License,
+or (at your option) any later version.
+
+=cut
+
Index: t/25regions.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/25regions.t,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- t/25regions.t 16 Sep 2011 23:50:19 -0000 1.6
+++ t/25regions.t 30 Sep 2011 22:31:31 -0000 1.7
@@ -109,6 +109,16 @@
@chapter GFDL
'],
+['today_in_copying',
+'@copying
address@hidden
address@hidden copying
+
address@hidden Top
address@hidden top
+
address@hidden
+',{},{'TEST' => 1}],
);
foreach my $test (@test_formatted) {
Index: t/languages.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/languages.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- t/languages.t 6 Apr 2011 23:48:53 -0000 1.2
+++ t/languages.t 30 Sep 2011 22:31:31 -0000 1.3
@@ -40,7 +40,10 @@
foreach my $test (@test_cases) {
push @{$test->[2]->{'test_formats'}}, 'plaintext';
- push @{$test->[2]->{'test_formats'}}, 'info' if ($info_tests{$test->[0]});
+ if ($info_tests{$test->[0]}) {
+ push @{$test->[2]->{'test_formats'}}, 'info';
+ push @{$test->[2]->{'test_formats'}}, 'html';
+ }
}
our ($arg_test_case, $arg_generate, $arg_debug);
Index: t/results/languages/multiple.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/languages/multiple.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- t/results/languages/multiple.pl 3 Sep 2011 21:51:37 -0000 1.10
+++ t/results/languages/multiple.pl 30 Sep 2011 22:31:31 -0000 1.11
@@ -998,4 +998,90 @@
End Tag Table
';
+
+$result_converted{'html'}->{'multiple'} = '<!DOCTYPE html PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- Instance Variable da copying: a b -->
+<!-- Created by texi2html, http://www.gnu.org/software/texinfo/ -->
+<head>
+<title>Documento Sem Nome</title>
+
+<meta name="description" content="Documento Sem Nome">
+<meta name="keywords" content="Documento Sem Nome">
+<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=utf-8">
+<link href="#Top" rel="start" title="Top">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+div.display {margin-left: 3.2em}
+div.example {margin-left: 3.2em}
+div.lisp {margin-left: 3.2em}
+div.smalldisplay {margin-left: 3.2em}
+div.smallexample {margin-left: 3.2em}
+div.smalllisp {margin-left: 3.2em}
+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.nocodebreak {white-space:pre}
+span.nolinebreak {white-space:pre}
+span.roman {font-family:serif; font-weight:normal}
+span.sansserif {font-family:sans-serif; font-weight:normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="pt" bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#800080" alink="#FF0000">
+
+<a name="Top"></a>
+<h1 class="node-heading">Top</h1>
+
+<dl>
+<dt><a name="index-BBB-of-fr"></a>Instance Variable de fr:
<strong>BBB</strong><em> CCC</em></dt>
+</dl>
+
+<dl>
+<dt><a name="index-copying-a-of-copying"></a>Instance Variable de copying:
<strong>a</strong><em> b</em></dt>
+</dl>
+
+
+
+<dl>
+<dt><a name="index-BBB-of-pt"></a>Instance Variable da pt:
<strong>BBB</strong><em> CCC</em></dt>
+</dl>
+
+<dl>
+<dt><a name="index-copying-a-of-copying"></a>Instance Variable da copying:
<strong>a</strong><em> b</em></dt>
+</dl>
+
+<hr>
+<p>
+
+
+</p>
+</body>
+</html>
+';
+
+$result_converted_errors{'html'}->{'multiple'} = [
+ {
+ 'error_line' => 'warning: Must specify a title with a title command or @top
+',
+ 'text' => 'Must specify a title with a title command or @top',
+ 'type' => 'warning'
+ }
+];
+
+
1;
Index: t/results/regions/today_in_copying.pl
===================================================================
RCS file: t/results/regions/today_in_copying.pl
diff -N t/results/regions/today_in_copying.pl
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ t/results/regions/today_in_copying.pl 30 Sep 2011 22:31:31 -0000
1.1
@@ -0,0 +1,406 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted %result_converted_errors
+ %result_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'today_in_copying'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'cmdname' => 'copying',
+ 'contents' => [
+ {
+ 'extra' => {
+ 'command' => {}
+ },
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line_after_command'
+ },
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [],
+ 'parent' => {},
+ 'type' => 'brace_command_arg'
+ }
+ ],
+ 'cmdname' => 'today',
+ 'contents' => [],
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '.
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'extra' => {
+ 'command' => {}
+ },
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'copying'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'end',
+ 'extra' => {
+ 'command' => {},
+ 'command_argument' => 'copying',
+ 'text_arg' => 'copying'
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 3,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'extra' => {
+ 'end_command' => {}
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'text_root'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'extra' => {
+ 'command' => {}
+ },
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'Top'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'contents' => [],
+ 'extra' => {
+ 'node_content' => [
+ {}
+ ],
+ 'nodes_manuals' => [
+ {
+ 'node_content' => [],
+ 'normalized' => 'Top'
+ }
+ ],
+ 'normalized' => 'Top'
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 5,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'extra' => {
+ 'command' => {}
+ },
+ 'parent' => {},
+ 'text' => ' ',
+ 'type' => 'empty_spaces_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => 'top'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'spaces_at_end'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'misc_line_arg'
+ }
+ ],
+ 'cmdname' => 'top',
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'cmdname' => 'insertcopying',
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+'
+ }
+ ],
+ 'extra' => {
+ 'misc_content' => [
+ {}
+ ]
+ },
+ 'level' => 0,
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 6,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ }
+ ],
+ 'type' => 'document_root'
+};
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[0]{'extra'}{'command'}
= $result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[0]{'parent'}
= $result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'args'}[0]{'parent'}
=
$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'contents'}[0];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'contents'}[0]{'parent'}
=
$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[1];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'contents'}[1]{'parent'}
=
$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[1];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[1]{'parent'}
= $result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
=
$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
=
$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[1]{'parent'}
=
$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2]{'args'}[0]{'contents'}[2]{'parent'}
=
$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2]{'args'}[0];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2]{'args'}[0]{'parent'}
=
$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2]{'extra'}{'command'}
= $result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2]{'parent'}
= $result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'extra'}{'end_command'}
=
$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'contents'}[2];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[0]{'parent'} =
$result_trees{'today_in_copying'}{'contents'}[0];
+$result_trees{'today_in_copying'}{'contents'}[0]{'contents'}[1]{'parent'} =
$result_trees{'today_in_copying'}{'contents'}[0];
+$result_trees{'today_in_copying'}{'contents'}[0]{'parent'} =
$result_trees{'today_in_copying'};
+$result_trees{'today_in_copying'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
= $result_trees{'today_in_copying'}{'contents'}[1];
+$result_trees{'today_in_copying'}{'contents'}[1]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'today_in_copying'}{'contents'}[1]{'args'}[0];
+$result_trees{'today_in_copying'}{'contents'}[1]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'today_in_copying'}{'contents'}[1]{'args'}[0];
+$result_trees{'today_in_copying'}{'contents'}[1]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'today_in_copying'}{'contents'}[1]{'args'}[0];
+$result_trees{'today_in_copying'}{'contents'}[1]{'args'}[0]{'parent'} =
$result_trees{'today_in_copying'}{'contents'}[1];
+$result_trees{'today_in_copying'}{'contents'}[1]{'extra'}{'node_content'}[0] =
$result_trees{'today_in_copying'}{'contents'}[1]{'args'}[0]{'contents'}[1];
+$result_trees{'today_in_copying'}{'contents'}[1]{'extra'}{'nodes_manuals'}[0]{'node_content'}
= $result_trees{'today_in_copying'}{'contents'}[1]{'extra'}{'node_content'};
+$result_trees{'today_in_copying'}{'contents'}[1]{'parent'} =
$result_trees{'today_in_copying'};
+$result_trees{'today_in_copying'}{'contents'}[2]{'args'}[0]{'contents'}[0]{'extra'}{'command'}
= $result_trees{'today_in_copying'}{'contents'}[2];
+$result_trees{'today_in_copying'}{'contents'}[2]{'args'}[0]{'contents'}[0]{'parent'}
= $result_trees{'today_in_copying'}{'contents'}[2]{'args'}[0];
+$result_trees{'today_in_copying'}{'contents'}[2]{'args'}[0]{'contents'}[1]{'parent'}
= $result_trees{'today_in_copying'}{'contents'}[2]{'args'}[0];
+$result_trees{'today_in_copying'}{'contents'}[2]{'args'}[0]{'contents'}[2]{'parent'}
= $result_trees{'today_in_copying'}{'contents'}[2]{'args'}[0];
+$result_trees{'today_in_copying'}{'contents'}[2]{'args'}[0]{'parent'} =
$result_trees{'today_in_copying'}{'contents'}[2];
+$result_trees{'today_in_copying'}{'contents'}[2]{'contents'}[0]{'parent'} =
$result_trees{'today_in_copying'}{'contents'}[2];
+$result_trees{'today_in_copying'}{'contents'}[2]{'contents'}[1]{'parent'} =
$result_trees{'today_in_copying'}{'contents'}[2];
+$result_trees{'today_in_copying'}{'contents'}[2]{'contents'}[2]{'parent'} =
$result_trees{'today_in_copying'}{'contents'}[2];
+$result_trees{'today_in_copying'}{'contents'}[2]{'extra'}{'misc_content'}[0] =
$result_trees{'today_in_copying'}{'contents'}[2]{'args'}[0]{'contents'}[1];
+$result_trees{'today_in_copying'}{'contents'}[2]{'parent'} =
$result_trees{'today_in_copying'};
+
+$result_texis{'today_in_copying'} = '@copying
address@hidden
address@hidden copying
+
address@hidden Top
address@hidden top
+
address@hidden
+';
+
+
+$result_texts{'today_in_copying'} = '
+top
+***
+
+
+';
+
+$result_sectioning{'today_in_copying'} = {
+ 'level' => -1,
+ 'section_childs' => [
+ {
+ 'cmdname' => 'top',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+ }
+ },
+ 'level' => 0,
+ 'section_up' => {}
+ }
+ ]
+};
+$result_sectioning{'today_in_copying'}{'section_childs'}[0]{'section_up'} =
$result_sectioning{'today_in_copying'};
+
+$result_nodes{'today_in_copying'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'top',
+ 'extra' => {},
+ 'level' => 0
+ },
+ 'normalized' => 'Top'
+ },
+ 'node_up' => {
+ 'extra' => {
+ 'manual_content' => [
+ {
+ 'text' => 'dir'
+ }
+ ],
+ 'top_node_up' => {}
+ },
+ 'type' => 'top_node_up'
+ }
+};
+$result_nodes{'today_in_copying'}{'node_up'}{'extra'}{'top_node_up'} =
$result_nodes{'today_in_copying'};
+
+$result_menus{'today_in_copying'} = {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+};
+
+$result_errors{'today_in_copying'} = [];
+
+
+
+$result_converted{'info'}->{'today_in_copying'} = 'This is , produced by
makeinfo version 4.13 from .
+
+a sunny day.
+
+
+File: , Node: Top, Up: (dir)
+
+top
+***
+
+a sunny day.
+
+
+Tag Table:
+Node: Top66
+
+End Tag Table
+';
+
+
+$result_converted{'html'}->{'today_in_copying'} = '<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- a sunny day. -->
+<!-- Created by texi2html, http://www.gnu.org/software/texinfo/ -->
+<head>
+<title>top</title>
+
+<meta name="description" content="top">
+<meta name="keywords" content="top">
+<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=utf-8">
+<link href="#Top" rel="start" title="Top">
+<style type="text/css">
+<!--
+a.summary-letter {text-decoration: none}
+blockquote.smallquotation {font-size: smaller}
+div.display {margin-left: 3.2em}
+div.example {margin-left: 3.2em}
+div.lisp {margin-left: 3.2em}
+div.smalldisplay {margin-left: 3.2em}
+div.smallexample {margin-left: 3.2em}
+div.smalllisp {margin-left: 3.2em}
+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.nocodebreak {white-space:pre}
+span.nolinebreak {white-space:pre}
+span.roman {font-family:serif; font-weight:normal}
+span.sansserif {font-family:sans-serif; font-weight:normal}
+ul.no-bullet {list-style: none}
+-->
+</style>
+
+
+</head>
+
+<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#800080" alink="#FF0000">
+
+<a name="Top"></a>
+<a name="top"></a>
+<h1 class="top">top</h1>
+
+<p>a sunny day.
+</p>
+<hr>
+<p>
+
+
+</p>
+</body>
+</html>
+';
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp TODO Texinfo/Common.pm Texinfo/Conve...,
Patrice Dumas <=