[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Convert/HTML.pm Texinfo...
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Convert/HTML.pm Texinfo... |
Date: |
Wed, 02 Nov 2011 00:44:06 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/11/02 00:44:06
Modified files:
tp : TODO
tp/Texinfo/Convert: HTML.pm Info.pm Plaintext.pm
tp/t/results/coverage_braces: test_image.pl
tp/t/results/info_tests: image_file_search.pl
image_formatting.pl image_not_found.pl
tp/t/results/sectioning: at_commands_in_refs.pl
Log message:
For Info and Plaintext @image output if there is no basename.txt,
use alt else the basename as [image basename].
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.199&r2=1.200
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.197&r2=1.198
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Info.pm?cvsroot=texinfo&r1=1.70&r2=1.71
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.182&r2=1.183
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage_braces/test_image.pl?cvsroot=texinfo&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/info_tests/image_file_search.pl?cvsroot=texinfo&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/info_tests/image_formatting.pl?cvsroot=texinfo&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/info_tests/image_not_found.pl?cvsroot=texinfo&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/sectioning/at_commands_in_refs.pl?cvsroot=texinfo&r1=1.58&r2=1.59
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -b -r1.199 -r1.200
--- TODO 1 Nov 2011 12:01:17 -0000 1.199
+++ TODO 2 Nov 2011 00:44:05 -0000 1.200
@@ -12,8 +12,7 @@
Warning for obsolete/unused customization variables like USE_SECTIONS
(a FIXME in Texinfo/Common.pm).?
-For plaintext @image output if there is no basename.txt, use alt else
-the basename as [image basename].
+Right now VERBOSE is almost not used.
There should be a warning with something like
@example text
Index: Texinfo/Convert/HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.197
retrieving revision 1.198
diff -u -b -r1.197 -r1.198
--- Texinfo/Convert/HTML.pm 1 Nov 2011 12:01:30 -0000 1.197
+++ Texinfo/Convert/HTML.pm 2 Nov 2011 00:44:05 -0000 1.198
@@ -6174,7 +6174,7 @@
if ($converter->get_conf('DEBUG')) {
print STDERR "HANDLER($stage) , priority $priority: $handler\n";
}
- &{$handler}($converter);
+ &{$handler}($converter, $stage);
}
}
}
Index: Texinfo/Convert/Info.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Info.pm,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -b -r1.70 -r1.71
--- Texinfo/Convert/Info.pm 1 Nov 2011 16:08:20 -0000 1.70
+++ Texinfo/Convert/Info.pm 2 Nov 2011 00:44:05 -0000 1.71
@@ -544,12 +544,16 @@
}
}
my $text = $self->_image_text($root, $basefile);
+ my $text_result;
if (defined($text)) {
if (!$self->{'formatters'}->[-1]->{'_top_formatter'}) {
- $text = '['.$text.']';
+ $text_result = '['.$text.']';
+ } else {
+ $text_result = $text;
}
} elsif (!defined($image_file)) {
- $self->line_warn(sprintf($self->__("Cannot find address@hidden file
`%s.txt'"), $basefile), $root->{'line_nr'});
+ $self->line_warn(sprintf($self->__("Cannot find address@hidden file
`%s.txt'"),
+ $basefile), $root->{'line_nr'});
}
my $result;
@@ -567,23 +571,22 @@
$alt =~ s/\"/\\\"/g;
$result .= " alt=\"$alt\"";
}
- if (defined($text)) {
- $text =~ s/\\/\\\\/g;
- $text =~ s/\"/\\\"/g;
- $result .= " text=\"$text\"";
+ if (defined($text_result)) {
+ $text_result =~ s/\\/\\\\/g;
+ $text_result =~ s/\"/\\\"/g;
+ $result .= " text=\"$text_result\"";
}
$result .= "\x{00}\x{08}]";
if ($self->{'formatters'}->[-1]->{'_top_formatter'}) {
$result .= "\n";
}
- } elsif (defined($text)) {
- $result = $text;
+ } else {
+ $result = $self->_image_formatted_text($root, $basefile, $text,
+ $text_result);
$lines_count = ($result =~ tr/\n/\n/);
}
- if (defined($result)) {
return ($result, $lines_count);
}
- }
return ('', 0);
}
Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -b -r1.182 -r1.183
--- Texinfo/Convert/Plaintext.pm 1 Nov 2011 16:08:20 -0000 1.182
+++ Texinfo/Convert/Plaintext.pm 2 Nov 2011 00:44:06 -0000 1.183
@@ -968,6 +968,32 @@
return undef;
}
+sub _image_formatted_text($$$$$)
+{
+ my $self = shift;
+ my $root = shift;
+ my $basefile = shift;
+ my $text = shift;
+ my $text_result = shift;
+
+ my $result;
+ if (defined($text)) {
+ $result = $text_result;
+ } elsif (defined($root->{'extra'}->{'brace_command_contents'}->[3])) {
+ my $alt = Texinfo::Convert::Text::convert(
+ {'contents' => $root->{'extra'}->{'brace_command_contents'}->[3]},
+ {Texinfo::Common::_convert_text_options($self)});
+ if (!$self->{'formatters'}->[-1]->{'_top_formatter'}) {
+ $result = '['.$alt.']';
+ } else {
+ $result = $alt;
+ }
+ } else {
+ $result = '['.$basefile.']';
+ }
+ return $result;
+}
+
sub _image($$)
{
my $self = shift;
@@ -977,15 +1003,20 @@
my $basefile = Texinfo::Convert::Text::convert(
{'contents' => $root->{'extra'}->{'brace_command_contents'}->[0]},
{'code' => 1, Texinfo::Common::_convert_text_options($self)});
- my $result = $self->_image_text($root, $basefile);
- if (defined($result)) {
+ my $text = $self->_image_text($root, $basefile);
+ my $text_result;
+ if (defined($text)) {
if (!$self->{'formatters'}->[-1]->{'_top_formatter'}) {
- $result = '['.$result.']';
+ $text_result = '['.$text.']';
+ } else {
+ $text_result = $text;
}
+ }
+ my $result = $self->_image_formatted_text($root, $basefile, $text,
+ $text_result);
my $lines_count = ($result =~ tr/\n/\n/);
return ($result, $lines_count);
}
- }
return ('', 0);
}
Index: t/results/coverage_braces/test_image.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage_braces/test_image.pl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- t/results/coverage_braces/test_image.pl 1 Nov 2011 12:01:33 -0000
1.13
+++ t/results/coverage_braces/test_image.pl 2 Nov 2011 00:44:06 -0000
1.14
@@ -4499,25 +4499,32 @@
-$result_converted{'plaintext'}->{'test_image'} = 'In text .
+$result_converted{'plaintext'}->{'test_image'} = 'address@hidden a@<"%@ < &
@ % " ]
+In text [alt i^-le.. a
+<"%@ < & @ % " ].
Insertcopying
- Text in copying.
+ Text in copying. address@hidden a@<"%@ < & @ % " ]
- In text .
+ In text [alt i^-le.. a
+<"%@ < & @ % " ].
+ address@hidden a@<"%@ < & @ % " ]
+ In text [alt i^-le.. a
+<"%@ < & @ % " ].
- In text .
address@hidden a@<"%@ < & @ % " ]
+In text [alt i^-le.. a
+<"%@ < & @ % " ].
-In text .
-
-Image 1:
-In text .
+Image 1: address@hidden a@<"%@ < & @ % " ]
+In text [alt i^-le.. a
+<"%@ < & @ % " ].
* Menu:
-* Image 1: Image with commands. In text .
+* Image 1: Image with commands. address@hidden a@<"%@ < & @ % ...
';
Index: t/results/info_tests/image_file_search.pl
===================================================================
RCS file:
/sources/texinfo/texinfo/tp/t/results/info_tests/image_file_search.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- t/results/info_tests/image_file_search.pl 1 Nov 2011 12:26:05 -0000
1.8
+++ t/results/info_tests/image_file_search.pl 2 Nov 2011 00:44:06 -0000
1.9
@@ -309,9 +309,9 @@
[image src="tp/t/include_dir/f--ile.png" text="Image
description\\"\\"\\\\."