Tables

Dr. Drang drdrang at gmail.com
Thu Feb 19 10:25:11 EST 2009


On Thu, Feb 19, 2009 at 3:16 AM, Daniel Winterstein
<daniel.winterstein at gmail.com> wrote:

>

> Since there is no standard, I'd like to suggest a couple of

> possibilities and get people's comments.

>

> Design goals:

>

> - A table should look like a table in plain text

> - It must be easy to create

> - It must be flexible about how much text can go in a cell

> - It shouldn't force you to use a fixed-width font


It seems to me that your first and last design goals are incompatible.
A table looks like a table because of its vertical alignment, and
there's no way to ensure vertical alignment in plain text unless you
use a fixed-width font.

To me, PHP Markdown Extra and MultiMarkdown have the right idea. The
pipe characters make the table easy to write and are the traditional
cell separators in ASCII tables. Once the table is written, it's
relatively easy to add spaces to get everything aligned and make the
plain text version look good. Getting the plain text aligned also
helps you see where you have extra or missing columns. I wrote a
[TextMate command][1] for doing this, and I'm sure it wouldn't be
difficult to add similar commands to other text editors.

--
Dr. Drang

[1]: http://www.leancrew.com/all-this/2008/08/tables-for-markdown-and-textmate/


More information about the Markdown-Discuss mailing list