Okay, thanks for your input, David.<br><br>Tables with lots of narrow columns are not so rare they can be dismissed; they are useful for matrices of numbers, for example.<br><br>How about an (entirely optional) addition to the existing multimarkdown pipe syntax, specifically for cells which span many cols? A number followed immediately by a pipe would be taken as the colspan.<br>
<br>So this;<br><br><span style="font-family: courier new,monospace;"> | This cell spans 7 cols, and has less spa |||||||</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> | ColA | ColB | ColC | ColD | ColE | ColF | ColG |</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">---+------+------+------+------+------+------+------+</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> 1 | A1 | B1 | C1 | D1 | E1 | F1 | G1 |</span><br>
<br>would be exactly equivalent to this;<br><br><span style="font-family: courier new,monospace;"> | This cell spans 7 cols, and has more space 7|</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> | ColA | ColB | ColC | ColD | ColE | ColF | ColG |</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">---+------+------+------+------+------+------+------+</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> 1 | A1 | B1 | C1 | D1 | E1 | F1 | G1 |</span><br>
<br>It contains 1 ugly metadata character, true. It is a matter of personal taste as to whether you find 6 additional pipes or 1 digit more intrusive, so why not provide authors with the choice? The advantage of the digit meta-character, of course, is the additional space in the cell to write content.<br>
<br><br>The real problem is that *neither* of these options is entirely natural to either the author or the reader.<br><br><br>Thinking some more, I realise that neither metadata option is required at all to parse a table row correctly when there is only a single colspan cell in a row _if_ we have a distinct cell-delimiter which denotes a colspanning cell.<br>
<br><br>The example above _could_ be rewritten like this;<br><br><span style="font-family: courier new,monospace;"> | This cell spans 7 cols, and looks much nicer !</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> | ColA | ColB | ColC | ColD | ColE | ColF | ColG |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">---+------+------+------+------+------+------+------+</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> 1 | A1 | B1 | C1 | D1 | E1 | F1 | G1 |</span><br><br><br>Note the exclamation point as the last character on the first row. I acknowledge David's concern about the use of '!' for table structure, and use it here only as an example. Other punctuation marks could be substituted. Most, however, have the same issue -- that they are common in text content. This is not insurmountable. A cell-delimiter character could require a space either side, for example.<br>
<br>That aside, the example above looks more like what authors would naturally write, and makes *much* cleaner reading than either meta-data option (to my eyes, at least).<br><br><br>The introduction of a col-span indicating cell-delimiter means that *only* the second and subsequent colspanning cells of any row require any metadata to indicate span width.<br>
<br>Two (or more) colspanning cells per row would, presumably, be reasonably rare. When necessary, the author could use the existing multimarkdown syntax for the narrower cells.<br><br><br>Simon<br><br><br><br><div class="gmail_quote">
On Thu, Jun 25, 2009 at 3:05 AM, David E. Wheeler <span dir="ltr"><<a href="mailto:david@kineticode.com">david@kineticode.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Jun 23, 2009, at 10:24 PM, Simon Bull wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Personally, I would prefer to use exactly one table syntax, so long as it<br>
_works_.<br>
</blockquote>
<br></div>
Yeah, that would be my preference, as well, where "_works_" eq "is legible as plain text and parses properly."<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Using one pipe per col to span is okay for small number of columns to span,<br>
though it doesn't scale elegantly, as in the following example;<br>
<br>
| This cell spans 9 cols, and therefore has 9 pipes |||||||||<br>
| ColA | ColB | ColC | ColD | ColE | ColF | ColG | ColH | ColI |<br>
---+------+------+------+------+------+------+------+------+------+<br>
1 | A1 | B1 | C1 | D1 | E1 | F1 | G1 | H1 | I1 |<br>
</blockquote>
<br></div>
Yeah, point taken, although that'd be a pretty rare occurrence.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
An alternative (or additional) syntax option might be to use an alternative<br>
cell separator when colspan is required. '!' comes to mind, since it looks<br>
almost exactly like a '|' in most fonts. '[' or ']' are other<br>
possibilities.<br>
</blockquote>
<br></div>
Well, ! is pretty common in text, and [ and ] are already used for links.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
However, the advantage is that by default a '!' cell separator could<br>
indicate colspan=2, which would likely be the most common case. So, for<br>
colspan=2, no additional pollution of the text would be required. E.g.,<br>
<br>
| ColA | ColB | ColC | ColD | ColE | ColF | ColG | ColH | ColI |<br>
---+------+------+------+------+------+------+------+------+------+<br>
1 | A1 | B1 ! C1 and D1 | E1 ! F1 and G1 | H1 | I1 |<br>
2 | A2 | B2 | C1 ! D2 and E2 | F2 ! G2 and H2 | I1 |<br>
</blockquote>
<br></div>
That's not very intuitive to me.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Where a colspan greater than 2 is required, metadata must unfortunately be<br>
introduced. For this I would like to suggest two alternatives;<br>
<br>
The first suggestion is similar to David's proposal except that it uses a<br>
number of underscores to indicate of the number of columns a cell should<br>
span, such that colspan = number of underscores +2. In the most common<br>
case, colspan=2, no underscores are required. Colspan=3 requires one<br>
underscore, colspan=4 requires two underscores, and so on.<br>
</blockquote>
<br></div>
3 == 1, 4 == 2? Ick.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If I *must* use metadata characters, then I prefer underscores because they<br>
at least "look like" part of the table frame (imagine it as part of a line<br>
between two rows). For example;<br>
<br>
| Col A | Col B | Col C | Col D | Col E | Col F | Col G | Col H | Col I<br>
---+-------+-------+-------+-------+-------+-------+-------+-------+-------<br>
1 | A1 | B1 | C1 | D1 | E1 | F1 | G1 | H1 | I1<br>
2 !_ colspan three ! colspan two !__ colspan four<br>
3 | A3 | B3 | C3 | D3 | E3 | F3 | G3 | H3 | I3<br>
<br>
<br>
Overall, this approach requires one fewer metadata character in every<br>
colspanned cell.<br>
</blockquote>
<br></div>
But it provides no meaning to the reader of the plain text. It just looks like a pasto or something. I'm opposed to adding characters with no semantic meaning.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The second suggestion is to use '[' as a leading cell separator, or ']' as a<br>
trailing cell-separator, where colspan is required. This could be followed,<br>
or led, by a number x such that colspan = x. A number need not be supplied<br>
where x == 2.<br>
</blockquote>
<br></div>
Um, no. Same problem.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This approach requires fewer metadata characters overall, but I prefer the<br>
first suggestion (underscores) because it looks nicer, and reads more<br>
easily.<br>
</blockquote>
<br></div>
I don't like either one, because they're very poor communicators of semantic meaning to the reader of the plain text version. Your original example with nine merge columns is much nicer-looking to my eye. And it's what MultiMarkdown already does, IIRC.<div>
<div></div><div class="h5"><br>
<br>
Best,<br>
<br>
David<br>
<br>
_______________________________________________<br>
Markdown-Discuss mailing list<br>
<a href="mailto:Markdown-Discuss@six.pairlist.net" target="_blank">Markdown-Discuss@six.pairlist.net</a><br>
<a href="http://six.pairlist.net/mailman/listinfo/markdown-discuss" target="_blank">http://six.pairlist.net/mailman/listinfo/markdown-discuss</a><br>
</div></div></blockquote></div><br>