Your idea, “Three Space Table” (3SP) if you don’t mind my giving it a name, works with variable width fonts and even narrow spaces at table creation time since one could use as many spaces as needed for visual clarity. A problem would only occur when later editing the same table in some other context that uses a font with very different relative widths and spacing. If one is liberal with spaces, you can usually avoid visual ambiguity even if the table looks ragged, but worst case it can end up hard for a human to read. The machine won’t care.
pickle typical ingredients culture heat
-------- ------------------------ --------- ------
kimchi fermented cabbage, seasonings Korea 8
cornichons gherkins, vinegar, tarragon France 0
avakaya mango, mustard seeds, oil, seasonings India 10
When I entered the 3SP table above, all of the columns were aligned in the variable-width font of the reply box:
In this regard, behavior under changing font styles, I don’t think 3SP is much worse or better than a GFM table similarly aligned when entered:
pickle | typical ingredients | culture | heat
-------- | ------------------------ | --------- | ------
kimchi | fermented cabbage, seasonings | Korea | 8
cornichons | gherkins, vinegar, tarragon | France | 0
avakaya | mango, mustard seeds, oil, seasonings | India | 10
The same GFM table without attempts to align:
pickle | typical ingredients | culture | heat
--- | --- | --- | ---
kimchi | fermented cabbage, seasonings | Korea | 8
cornichons | gherkins, vinegar, tarragon | France | 0
avakaya | mango, mustard seeds, oil, seasonings | India | 10
The same 3SP table without attempts to align:
pickle typical ingredients culture heat
--- --- --- ---
kimchi fermented cabbage, seasonings Korea 8
cornichons gherkins, vinegar, tarragon France 0
avakaya mango, mustard seeds, oil, seasonings India 10
Let’s try the reverse. This 3SP table is spaced to look great in a fixed width font:
pickle typical ingredients culture heat
------ ------------------- ------- ----
kimchi fermented cabbage, seasonings Korea 8
cornichons gherkins, vinegar, tarragon France 0
avakaya mango, mustard seeds, oil, seasonings India 10
Here’s how it looked when I entered it:
Technically there is never ambiguity because deterministic machine parsing rules govern. In practice, especially for a format that is designed for humans, there is plenty of ambiguity for the human reader. some styles are more prone than others. I can’t cover them all here, but I’ll go into one issue: empty cells.
For GFM tables, I think the biggest source of ambiguity is how the optionality of leading |
interacts with intended empty cells. What the human eye sees below clashes with how the GFM parser sees it:
column a | column b
-------- | --------
in a | in b
| in a
Of course you can avoid it by consistently using leading pipes. How does an 3SP table handle empty cells?
column a column b column c
------------ ------------ ------------
in a in b in c
in a in c?
in b? in c?
in c?
How it looked when entered:
You might think, comparing both of the above, that there isn’t any ambiguity. But that’s the human eye. What would the deterministic machine rules be? And when humans lazily apply those machine rules (i.e. using the minimal number of spaces), won’t we end up with a visual mess? Below I assumed these 3SP table rules: (1) three spaces between adjacent cells and (2) a single space for an empty cell:
column a column b column c
------------ ------------ ------------
in a in b in c
in a in c?
in b? in c?
in c?
What would better 3SP table rules be?