Tables
John Gruber
gruber at fedora.net
Tue Nov 15 12:07:59 EST 2005
Michel Fortin <michel.fortin at michelf.com> wrote on 11/15/05 at 7:32 AM:
> Le 2005-11-14 à 18:10, Fletcher T. Penney a écrit :
>
> > for my implementation and download. It takes PME's syntax and adds
> > multiple header row's and colspans, as well as captions (thanks to
> > Robert McGonegal for the caption suggestion).
>
> I've thought of some additions to the table syntax. This one has a
> caption and row headers on the left.
>
> [ Table 1: A simple table ]
>
> | | Beans | Peas |
> | | ----- | ----- |
> | Wholesale | $1.00 | $1.25 |
> | Retail | $2.00 | $3.00 |
That seems reasonable.
> And this one has two rows of header and some colspan in action.
>
> [ Table 2: Test of a complex table ]
>
> || || Imported || Domestic ||
> || || Beans | Peas || Carrots | Tomatoes ||
> || || ----- | ----- || ------- | -------- ||
> || Wholesale || $1.00 | $1.25 || $1.20 | $1.20 ||
> || Retail || $2.00 | $3.00 || $1.80 | $1.80 ||
Clever. I was going to say no, but I suppose that if I ever do want
to use colspanning, I'd want this to be supported. I'm not sure
though.
> I'm just not sure about the caption syntax (which could also be put
> at the bottom) and how to best align text in cells that span on two
> columns.
I had a very similar idea regarding table captions. Do you think the
"Table ___:" part should be mandatory? That would certainly avoid
any ambiguity from a regular paragraph in brackets preceding the
table.
As for placement, my first thought was that the caption should be
allowed to go either before or after the table. But then how would
you tell which caption goes with which table if you have two more
consecutive tables? Maybe in that case you'd use two blank lines to
distinguish:
| header |
|--------|
| cell |
[Table 1: caption]
| header |
|--------|
| cell |
[Table 2: caption]
-J.G.
More information about the Markdown-Discuss
mailing list