ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/doc/podtbl
(Generate patch)

Comparing rxvt-unicode/doc/podtbl (file contents):
Revision 1.1 by root, Thu Aug 12 21:30:14 2004 UTC vs.
Revision 1.4 by ayin, Sat Nov 10 09:40:51 2007 UTC

42 $table--; 42 $table--;
43 } else { 43 } else {
44 shift; 44 shift;
45 return $self->SUPER::command (@_); 45 return $self->SUPER::command (@_);
46 } 46 }
47} 47}
48 48
49sub verbatim { 49sub verbatim {
50 my ($self, $para) = @_; 50 my ($self, $para) = @_;
51 shift; 51 shift;
52 52
56 my $cols = max map scalar @$_, @$table; 56 my $cols = max map scalar @$_, @$table;
57 57
58 my $fh = $self->output_handle; 58 my $fh = $self->output_handle;
59 59
60 # format the table 60 # format the table
61 # tbl first 61 # text
62 print $fh "=begin text\n\n";
63
64 for (@$table) {
65 print $fh " ", (map +(sprintf "%-15s ", $_), stripfcodes @$_), "\n";
66 }
67
68 print $fh "\n=end text\n\n";
69
70
71 # tbl
62 print $fh "=begin roff\n\n"; 72 print $fh "=begin roff\n\n";
63 73
64 print $fh ".TS\n" . ("l " x $cols) . ".\n"; 74 print $fh ".TS\n" . ("l " x $cols) . ".\n";
65 print $fh map +(join "\t", stripfcodes @$_) . "\n", @$table; 75 print $fh map +(join "\t", stripfcodes @$_) . "\n", @$table;
66 print $fh ".TE\n\n"; 76 print $fh ".TE\n";
67 77
68 print $fh "=end roff\n\n"; 78 print $fh "\n=end roff\n\n";
69 79
70 # html second 80 # html
81 # pod::xhtml fails on begin/end blocks
71 print $fh "=begin html\n\n"; 82# print $fh "=begin xhtml\n\n";
72 83
73 print $fh "<table>\n"; 84 print $fh "=for html <table>";
74 print $fh map "<tr><td>" . +(join "</td><td>", htmlfcodes @$_) . "</td></tr>\n", @$table; 85 print $fh map "<tr><td>" . +(join "</td><td>", htmlfcodes @$_) . "</td></tr>", @$table;
75 print $fh "</table>\n\n"; 86 print $fh "</table>\n\n";
76 87
77 print $fh "=end html\n\n"; 88# print $fh "\n=end xhtml\n\n";
78 89
79} 90}
80 91
81__PACKAGE__->new->parse_from_filehandle; 92__PACKAGE__->new->parse_from_filehandle;
82 93

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines