Tables

Fletcher T. Penney fletcher at alumni.duke.edu
Tue Nov 15 14:13:57 EST 2005


(much snipping below)

On Nov 15, 2005, at 12:07 PM, John Gruber wrote:


>

>> 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 prefer the colspanning syntax I used (that I copied from someone
else - I'm not sure who originally came up with it). Requiring that
an entire column use double pipes seems to require too much
planning. And what about something like this:


| Really long header |||

| | Somewhat longer ||

| Short | Another | One more |

| ----- | --------- | -------- |


I'm not sure how to do this using the syntax above, but it is quite
easy using the "cell by cell colspanning" syntax I copied and doesn't
require planning out all of your nesting in advance.



>> 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]



I do not allow blank lines between the table and caption in my
syntax, which makes more sense. Then, the only ambiguity is if
someone just has a run-on "table-caption-table" with no blank lines,
which is simply a violation of the syntax and would not be
interpreted as a table in my implementation (but could be handled in
a variety of ways.)

But as you mention, the decision to allow 0 blank lines is arbitrary,
and could be changed to 1. I chose 0 to prevent ambiguity (and
because that was what Robert suggested to me in an email), but 1 is
more aesthetically pleasing.

Fletcher



--
Fletcher T. Penney
fletcher at alumni.duke.edu

He has been given a large brain by mistake, since for him
the spinal cord would fully suffice.
- Albert Einstein


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3949 bytes
Desc: not available
Url : http://six.pairlist.net/pipermail/markdown-discuss/attachments/20051115/aceb2b87/smime-0001.bin


More information about the Markdown-Discuss mailing list