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.7 by root, Sat Oct 10 20:06:03 2020 UTC

20 B => "b", 20 B => "b",
21 C => "tt", 21 C => "tt",
22 L => "i", # broken 22 L => "i", # broken
23 F => "tt", 23 F => "tt",
24 S => "nobr", # non-std 24 S => "nobr", # non-std
25 X => "span", # brokwn 25 X => "span", # broken
26 Z => "span", # brokwn 26 Z => "span", # broken
27 ); 27 );
28 # strip formatting codes, dumb version 28 # strip formatting codes, dumb version
29 map { 29 map {
30 s/([IBCLFSXZ])<< (.*?) >>/<$tag{$1}>$2<\/$tag{$1}>/gs; 30 s/([IBCLFSXZ])<< (.*?) >>/<$tag{$1}>$2 <\/$tag{$1}>/gs;
31 s/([IBCLFSXZ])<(.*?)>/<$tag{$1}>$2<\/$tag{$1}>/gs; 31 s/([IBCLFSXZ])<(.*?)>/<$tag{$1}>$2 <\/$tag{$1}>/gs;
32 $_ 32 $_
33 } @$_; 33 } @$_;
34} 34}
35 35
36sub command { 36sub command {
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 xhtml <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
88 print $fh "=for html <table>";
89 print $fh map "<tr><td>" . +(join " </td><td>", htmlfcodes @$_) . " </td></tr>", @$table;
90 print $fh "</table>\n\n";
91
77 print $fh "=end html\n\n"; 92# print $fh "\n=end xhtml\n\n";
78 93
79} 94}
80 95
81__PACKAGE__->new->parse_from_filehandle; 96__PACKAGE__->new->parse_from_filehandle;
82 97

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines