texinfo-commits
[Top][All Lists]
Advanced

[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\\"\\"\\\\."]
 
address@hidden dot. 
address@hidden dot. [./tp/t/include_dir/f--ile]
 
-   @image dot parent. 
+   @image dot parent. [../include_dir/f--ile]
 
 
 Tag Table:

Index: t/results/info_tests/image_formatting.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/info_tests/image_formatting.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- t/results/info_tests/image_formatting.pl    1 Nov 2011 12:26:05 -0000       
1.6
+++ t/results/info_tests/image_formatting.pl    2 Nov 2011 00:44:06 -0000       
1.7
@@ -2782,8 +2782,8 @@
 
 address@hidden' [image src="f--ile.png" text="[Image 
description\\"\\"\\\\.]"] address@hidden,l--i}\' [image src="f--ile.png" 
text="[Image description\\"\\"\\\\.]"] address@hidden,,l--e}\' [image 
src="f--ile.png" text="[Image description\\"\\"\\\\.]"]
 address@hidden,,,alt}\' [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"] address@hidden,,,,e-d-xt}\' [image 
src="f--ile.png" text="[Image description\\"\\"\\\\.]"]
address@hidden,aze,az,alt,e--xt}\' [image src="f--ile.png" alt="alt" 
text="[Image description\\"\\"\\\\.]"] address@hidden,aze,,a--lt}\' 
address@hidden@file{f--ile}@@@.,aze,az,alt,@file{file ext} address@hidden'  [aaa
address@hidden,aze,az,alt,e--xt}\' [image src="f--ile.png" alt="alt" 
text="[Image description\\"\\"\\\\.]"] address@hidden,aze,,a--lt}\' [a-lt]
address@hidden@file{f--ile}@@@.,aze,az,alt,@file{file ext} address@hidden' 
[alt] [aaa
 bbb
 ccc] [aaa
 bbb
@@ -2795,8 +2795,8 @@
      address@hidden,,,alt}\' [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"]
      address@hidden,,,,e-d-xt}\' [image src="f--ile.png" text="[Image 
description\\"\\"\\\\.]"]
      address@hidden,aze,az,alt,e--xt}\' [image src="f--ile.png" alt="alt" 
text="[Image description\\"\\"\\\\.]"]
-     address@hidden,aze,,a--lt}\' 
-     address@hidden@file{f--ile}@@@.,aze,az,alt,@file{file ext} 
address@hidden' 
+     address@hidden,aze,,a--lt}\' [a-lt]
+     address@hidden@file{f--ile}@@@.,aze,az,alt,@file{file ext} 
address@hidden' [alt]
      [aaa
 bbb
 ccc] [aaa

Index: t/results/info_tests/image_not_found.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/info_tests/image_not_found.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- t/results/info_tests/image_not_found.pl     1 Nov 2011 12:26:05 -0000       
1.7
+++ t/results/info_tests/image_not_found.pl     2 Nov 2011 00:44:06 -0000       
1.8
@@ -158,7 +158,7 @@
 
 File: ,  Node: Top,  Up: (dir)
 
-
+[n_f_image]
 
 Tag Table:
 Node: Top41

Index: t/results/sectioning/at_commands_in_refs.pl
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/t/results/sectioning/at_commands_in_refs.pl,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- t/results/sectioning/at_commands_in_refs.pl 1 Nov 2011 12:26:09 -0000       
1.58
+++ t/results/sectioning/at_commands_in_refs.pl 2 Nov 2011 00:44:06 -0000       
1.59
@@ -20162,7 +20162,7 @@
 * AAA (fff) AAA BBB::
 * CCC (rrr) CCC DDD::
 * the someone <address@hidden> <address@hidden>::
-*   [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"]::
+* [f--ile1]  [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"]::
 *  @ {} . ::
 * `cite asis\' in @w b in r SC *str* t VAR "dfn" i::
 * `env\' `code\' `option\' `samp\' `command\' `file\' `C-x <ESC>\'::
@@ -20266,20 +20266,20 @@
 ********************
 
 
-File: ,  Node: the someone <address@hidden> <address@hidden>,  Next:  [image 
src="f--ile.png" alt="alt" text="[Image description\\"\\"\\\\.]"],  Prev: CCC 
(rrr) CCC DDD,  Up: Top
+File: ,  Node: the someone <address@hidden> <address@hidden>,  Next: [f--ile1] 
[image src="f--ile.png" alt="alt" text="[Image description\\"\\"\\\\.]"],  
Prev: CCC (rrr) CCC DDD,  Up: Top
 
 16 the someone <address@hidden> <address@hidden>
 ****************************************************
 
 
-File: ,  Node:  [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"],  Next:  @ {} . ,  Prev: the someone 
<address@hidden> <address@hidden>,  Up: Top
+File: ,  Node: [f--ile1] [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"],  Next:  @ {} . ,  Prev: the someone 
<address@hidden> <address@hidden>,  Up: Top
 
 
-17  [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"]
-************************************************************************
+17 [f--ile1] [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"]
+*********************************************************************************
 
 
-File: ,  Node:  @ {} . ,  Next: `cite asis\' in @w b in r SC *str* t VAR "dfn" 
i,  Prev:  [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"],  Up: Top
+File: ,  Node:  @ {} . ,  Next: `cite asis\' in @w b in r SC *str* t VAR "dfn" 
i,  Prev: [f--ile1] [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"],  Up: Top
 
 18  @ {} . 
 ***********
@@ -20333,7 +20333,7 @@
 e\'\' e;:: *note e. e( e_ .e e< j ee[:: *note `` \'\' ` \' ,, ,:: *note << >>
 << >> < >:: *note `` \'\' --- --:: *note AAA (fff) AAA BBB:: *note CCC
 (rrr) CCC DDD:: *note the someone <address@hidden>
-<address@hidden>:: *note  [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"]:: *note  @ {} . :: *note `cite asis\' in @w b
+<address@hidden>:: *note [f--ile1] [image src="f--ile.png" alt="alt" 
text="[Image description\\"\\"\\\\.]"]:: *note  @ {} . :: *note `cite asis\' 
in @w b
 in r SC *str* t VAR "dfn" i:: *note `env\' `code\' `option\' `samp\'
 `command\' `file\' `C-x <ESC>\':: *note 8.27in:: *note sansserif slanted::
 *note <indicateurl>:: *note `http://somewhere_aaa\' text (url) ls::
@@ -20342,31 +20342,31 @@
 
 Tag Table:
 Node: Top41
-Node: { }819
+Node: { }828
 Node:     !
-. . ? @898
-Node: LaTeX TeX * , (C) ... ...1019
-Node: == error--> Euro ! ==> -1185
-Node: >= <= ->1344
-Node: a o -!- # -| ? (R)1464
-Node: => o a b a sunny day aa1603
-Node: AA ae oe AE OE /o /O ss /l /L D d TH th1783
-Node: a" e~ i^ a^ a` e\' c, e= e* e\'\' e;2010
-Node: e. e( e_ .e e< j ee[2222
-Node: `` \'\' ` \' ,, ,2385
-Node: << >> << >> < >2518
-Node: `` \'\' --- --2645
-Node: AAA (fff) AAA BBB2761
-Node: CCC (rrr) CCC DDD2897
-Node: the someone <address@hidden> <address@hidden>3070
-Node:  [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"]3363
-Node:  @ {} . 3692
-Node: `cite asis\' in @w b in r SC *str* t VAR "dfn" i3892
-Node: `env\' `code\' `option\' `samp\' `command\' `file\' `C-x <ESC>\'4154
-Node: 8.27in4434
-Node: sansserif slanted4582
-Node: <indicateurl>4708
-Node: `http://somewhere_aaa\' text (url) ls4856
+. . ? @907
+Node: LaTeX TeX * , (C) ... ...1028
+Node: == error--> Euro ! ==> -1194
+Node: >= <= ->1353
+Node: a o -!- # -| ? (R)1473
+Node: => o a b a sunny day aa1612
+Node: AA ae oe AE OE /o /O ss /l /L D d TH th1792
+Node: a" e~ i^ a^ a` e\' c, e= e* e\'\' e;2019
+Node: e. e( e_ .e e< j ee[2231
+Node: `` \'\' ` \' ,, ,2394
+Node: << >> << >> < >2527
+Node: `` \'\' --- --2654
+Node: AAA (fff) AAA BBB2770
+Node: CCC (rrr) CCC DDD2906
+Node: the someone <address@hidden> <address@hidden>3079
+Node: [f--ile1] [image src="f--ile.png" alt="alt" text="[Image 
description\\"\\"\\\\.]"]3381
+Node:  @ {} . 3737
+Node: `cite asis\' in @w b in r SC *str* t VAR "dfn" i3946
+Node: `env\' `code\' `option\' `samp\' `command\' `file\' `C-x <ESC>\'4208
+Node: 8.27in4488
+Node: sansserif slanted4636
+Node: <indicateurl>4762
+Node: `http://somewhere_aaa\' text (url) ls4910
 
 End Tag Table
 ';



reply via email to

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