Personally, I would prefer to use exactly one table syntax, so long as it _works_.<br><br><br>Using
one pipe per col to span is okay for small number of columns to span,
though it doesn't scale elegantly, as in the following example;<br>
<br><span style="font-family: courier new,monospace;"> | 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 |</span><br><br><br>An
alternative (or additional) syntax option might be to use an
alternative cell separator when colspan is required. '!' comes to
mind, since it looks almost exactly like a '|' in most fonts. '[' or
']' are other possibilities. <br>
<br>I don't mind whether we use the leading or trailing cell-delimiter
for this, but in my examples below, I mostly use a leading cell
delimiter.<br><br>The disadvantage of using another type of cell delimiter is that it introduces additional table framework into our text.<br>
<br>However, the advantage is that by default a '!' cell separator
could indicate colspan=2, which would likely be the most common case.
So, for colspan=2, no additional pollution of the text would be
required. E.g., <br>
<br><span style="font-family: courier new,monospace;"> | ColA | ColB | ColC | ColD | ColE | ColF | ColG | ColH | ColI |</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 and D1 | E1 ! F1 and G1 | H1 | I1 |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> 2 | A2 | B2 | C1 ! D2 and E2 | F2 ! G2 and H2 | I1 |</span><br>
<br><br>Where a colspan greater than 2 is required, metadata must
unfortunately be 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 number of underscores to indicate of
the number of columns a cell should span, such that colspan = number of
underscores +2. In the most common case, colspan=2, no underscores are
required. Colspan=3 requires one underscore, colspan=4 requires two
underscores, and so on.<br>
<br>If I *must* use metadata characters, then I prefer underscores
because they at least "look like" part of the table frame (imagine it
as part of a line between two rows). For example;<br><br><span style="font-family: courier new,monospace;"> | Col A | Col B | Col C | Col D | Col E | Col F | Col G | Col H | Col I</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 | H1 | I1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> 2 !_ colspan three ! colspan two !__ colspan four</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> 3 | A3 | B3 | C3 | D3 | E3 | F3 | G3 | H3 | I3</span><br>
<br><br>Overall, this approach requires one fewer metadata character in every colspanned cell.<br><br><br>The
second suggestion is to use '[' as a leading cell separator, or ']' as
a trailing cell-separator, where colspan is required. This could be
followed, or led, by a number x such that colspan = x. A number need
not be supplied where x == 2.<br>
<br>For example;<br><br><span style="font-family: courier new,monospace;"> | Col A | Col B | Col C | Col D | Col E | Col F | Col G | Col H | Col I</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 | H1 | I1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> 2 [3 colspan three [ colspan two [4 colspan four</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> 3 | A3 | B3 | C3 | D3 | E3 | F3 | G3 | H3 | I3</span><br><br>would be exactly equivalent to<br><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> | Col A | Col B | Col C | Col D | Col E | Col F | Col G | Col H | Col I |</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 | H1 | I1 |</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> 2 | colspan three 3] colspan two ] colspan four 4]</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> 3 | A3 | B3 | C3 | D3 | E3 | F3 | G3 | H3 | I3 |</span><br style="font-family: courier new,monospace;">
<br><br>This approach requires fewer metadata characters overall, but I
prefer the first suggestion (underscores) because it looks nicer, and
reads more easily.<br><font color="#888888"><br><br><br>Simon</font><br><br><div class="gmail_quote">On Wed, Jun 24, 2009 at 12:23 PM, 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 6:43 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;">
Explicit row markers do _work_, but they are too verbose for my liking.<br>
They are more work to write, and don't read as cleanly. The colon syntax<br>
_works_ too, and it is cleaner, and I think having a source document which<br>
is natural to write, and easy to read is important.<br>
</blockquote>
<br></div>
+1, although sometimes, with really busy tables, they make things clearer.<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;">
All that aside, it is support for the continued text *feature* that I am<br>
most interested in. If I have to live with explicit line breaks, I guess I<br>
will. But it would seem a shame, given the alternative.<br>
</blockquote>
<br></div>
I agree, but what I mean by "busy tables" is when you have a table with multicolumn cells *and* multirow rows. My blog entry has a decent example of this:<br>
<br>
| | Grouping ||<br>
+---------------+---------------------------------+<br>
| First Header | Second Header | Third Header |<br>
+---------------+-----------------+---------------+<br>
| Content | *Long Cell* ||<br>
: continued : ::<br>
: content : ::<br>
| Content | **Cell** | Cell |<br>
: continued : : :<br>
: content : : :<br>
<br>
| New section | More | Data |<br>
| And more | And more ||<br>
[Prototype table]<br>
<br>
It starts to get a little confusing in this case, so I'd like, for more complicated tables, to alternatively be able to designate rows like so:<br>
<br>
| | Grouping ||<br>
+===============+=================================+<br>
| First Header | Second Header | Third Header |<br>
+===============+=================================+<br>
| Content | *Long Cell* ||<br>
: continued : ::<br>
: content : ::<br>
+---------------+---------------------------------+<br>
| Content | **Cell** | Cell |<br>
: continued : : :<br>
: content : : :<br>
+---------------+---------------------------------+<br>
<br>
+---------------+---------------------------------+<br>
| New section | More | Data |<br>
+---------------+---------------------------------+<br>
| And more | And more ||<br>
+---------------+---------------------------------+<br>
[Prototype table]<br>
<br>
You can distinguish the one style from the other by the use of =s in the header instead of -s.<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, I strongly agree that the tilde could be used in for definition<br>
lists, thereby removing the ambiguity between colons used as cell delimiters<br>
and those used in definition lists.<br>
</blockquote>
<br></div>
Thanks! They stand out better, too, in most fonts.<br>
<br>
Best,<br><font color="#888888">
<br>
David<br>
</font></blockquote></div><br>