texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texinfo/tp TODO Texinfo/Convert/Info.pm Texinfo...


From: Patrice Dumas
Subject: texinfo/tp TODO Texinfo/Convert/Info.pm Texinfo...
Date: Sat, 01 Jan 2011 12:56:17 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/01/01 12:56:16

Modified files:
        tp             : TODO 
        tp/Texinfo/Convert: Info.pm Plaintext.pm 

Log message:
        Debug info header code.
        Add float as a Ref.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.64&r2=1.65
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Info.pm?cvsroot=texinfo&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Plaintext.pm?cvsroot=texinfo&r1=1.43&r2=1.44

Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- TODO        1 Jan 2011 12:15:35 -0000       1.64
+++ TODO        1 Jan 2011 12:56:16 -0000       1.65
@@ -10,9 +10,6 @@
 
 pass 'output_file' to Plaintext.pm.  Use it to output the result
 (if defined).  Maybe use a different call than convert?
-In Info always ouput to a file unless output_file is -.
-
-floats should be added as locations.
 
 for i18n, one want to do something like
 {style} {number}: {caption}

Index: Texinfo/Convert/Info.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Info.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- Texinfo/Convert/Info.pm     31 Dec 2010 12:14:07 -0000      1.6
+++ Texinfo/Convert/Info.pm     1 Jan 2011 12:56:16 -0000       1.7
@@ -157,14 +157,15 @@
   return $self;
 }
 
+# this also determines the output file
 sub _info_header($)
 {
   my $self = shift;
-  return $self->{'info_header'} if (defined($self->{'info_header'}));
   my $input_basename;
   if (defined($self->{'info'}->{'input_file_name'})) {
     $input_basename = $self->{'info'}->{'input_file_name'};
   } else {
+    # This could happen if called on a piece of texinfo
     $input_basename = '';
   }
   $input_basename =~ s/^.*\///;
@@ -194,14 +195,11 @@
   my $result = $paragraph->add_text($text);
   $result .= $paragraph->end();
   $result .= "\n";
+  $self->{'empty_lines_count'} = 1;
 
   if ($self->{'extra'} and $self->{'extra'}->{'copying'}) {
-    my $options = {};
-    if ($self->{'enable_encoding'}) {
-      $options->{'enabled_encoding'} = $self->{'encoding'};
-    }
     my ($copying) = $self->_convert({'contents' => 
-          $self->{'extra'}->{'copying'}->{'contents'}}, $options);
+          $self->{'extra'}->{'copying'}->{'contents'}});
     $result .= $copying;
   }
   if ($self->{'info'}->{'dircategory_direntry'}) {

Index: Texinfo/Convert/Plaintext.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Plaintext.pm,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- Texinfo/Convert/Plaintext.pm        1 Jan 2011 12:15:35 -0000       1.43
+++ Texinfo/Convert/Plaintext.pm        1 Jan 2011 12:56:16 -0000       1.44
@@ -1311,8 +1311,11 @@
         }
         print STDERR "MULTITABLE_SIZES @$columnsize\n" if ($self->{'debug'});
         $self->{'format_context'}->[-1]->{'columns_size'} = $columnsize;
+      } elsif ($root->{'cmdname'} eq 'float' and $root->{'extra'}
+               and $root->{'extra'}->{'normalized'}) {
+        $self->advance_count_text(\$result, \$bytes_count, \$lines_count,
+               $locations, 0, $self->_anchor($root));
       }
-
     } elsif ($root->{'cmdname'} eq 'node') {
       $self->advance_count_text(\$result, \$bytes_count, \$lines_count,
                $locations, 0, $self->_node($root));
@@ -1569,6 +1572,7 @@
     }
 
   }
+  # open 'type' constructs.
   my $paragraph;
   if ($root->{'type'}) {
     if ($root->{'type'} eq 'paragraph') {
@@ -1694,8 +1698,7 @@
       $frenchspacing = 1 if ($formatter->{'frenchspacing_stack'}->[-1] eq 
'on');
       $formatter->{'container'}->set_space_protection(undef,
         undef, undef, $frenchspacing);
-    } elsif ($root->{'type'} eq 'bracketed'
-      and $self->{'context'}->[-1] eq 'math') {
+    } elsif ($root->{'type'} eq 'bracketed') {
       $result .= $formatter->{'container'}->add_text('}');
     } elsif ($root->{'type'} eq 'row') {
       my @cell_beginnings;



reply via email to

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