develooper Front page | perl.perl5.porters | Postings from June 2022

Re: Pre-RFC: tables in Pod

Thread Previous | Thread Next
Paul "LeoNerd" Evans
June 21, 2022 09:20
Re: Pre-RFC: tables in Pod
Message ID:
On Mon, 20 Jun 2022 19:21:38 +0100
Neil Bowers <> wrote:

> If this progresses further, I think we should enumerate the different
> ways/places that people look at pod, and how tables are expected to
> work/render in each of those places. E.g. perldoc, metacpan,
>, man, and ... ?

Hoboy, manpages are fun.

Most POD features are fairly simple copies of things in nroff (the
backing format behind man). It may not therefore be a surprise to
discover that nroff doesn't natively handle tables, any more than POD

There is however a common preprocessor that takes an extension format
and renders it down to simpler positional instructions used to actually
draw the table; it is called `tbl`:

Overall, this verymuch is not a markup style I suggest we consider for
a possible POD idea. But I'll describe it here, to give a brief insight
into the kind of abilities it has.

In summary: it's a straaaange format. You write the table contents
twice - first in a grid of letters that describe how the cells should
be arranged, and then a grid of the actual content, separated by some
character (by default a tab, but you can use some printing one instead).

For example; here's 3 rows of 3 cells, separated by a pipe symbol

  c c c
  l l r .

Clever use of the cell layout letters allows things like vertical or
horizontal spans that cover multiple cells. There's lots of flexibility
here, but the overall markup is verymuch not very readable without
knowing what's going on.

Plus, since the content of each table is just more nroff content string
you can still apply all the expected text-level formatting controls and
whatnot inside there. Infact about the only thing you can't do is nest
a table inside another table.

Paul "LeoNerd" Evans      |  |

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About