package Pod::Table; use Pod::Parser; =pod =head1 NAME Pod::Table - a pod extension to add support for tables =head1 DESCRIPTION People complain all the time that pod does not natively deal with tables. This extension aims to propose a remedy by becoming a Pod Formatter. So when translating pod to your desired output format, if a I<=begin table> is encountered, a table should be generated. Currently only html is supported. Each translator should follow this example and make =begin table work just like here. All text based formats , like: pod2text pod2html pod2xml pod2docbook pod2latex pod2man ought to be easy to do (and Pod::Table will likely handle them all). The real problem is pod2pdf and other exotics out there, cause I don't if its even possible. =head1 SYNOPSIS =begin table =over table =item table This is a TD people, a table cell =item table This is table cell number 333 =over table =item table row 3, td 1 =item table row 3, td 2 =back table =end table becomes
This is a TD people, a table cell This is table cell number 333
row 3, td 1 row 3, td 2
or more precisely (=begin html follows) =begin html
This is a TD people, a table cell This is table cell number 333
row 3, td 1 row 3, td 2
=end html =head1 The Rules =head2 =begin/=end table Obvious, the outermost always required. A =end implies a =over when there is no other =begin's left (think stack). =head2 =over/=back table A =over is equivalent to a A =back is equivalent to a A =over implies a =back (equivalent to a ) =head2 =item table A I<=item table> paragraph implies a C<paragraph> A I<=item table> is closed by the next I<=item table> or I<=back table> =head1 NESTED TABLES (an example) =begin table =over table =item table This is a TD people, a table cell =item table This is table cell number 333 =over table =item table row 3, td 1 =begin table =over table =item table Yes, a Lone Table Cell =back table =end table =item table The previous end implied a =back (or should have, maybe) =back table =end table is =begin html
This is a TD people, a table cell This is table cell number 333
row 3, td 1
Yes, a Lone Table Cell
The previous end implied a =back (or should have, maybe)
=end html =cut