6

I would like to suggest that a table/grid control be added to the markdown options, as it pains me to see people trying to show a sample portion of an excel document, and having it come out as a line of text.

Even if they knew enough formatting to put the data on different lines with a double space at the end, it would still be hard to get the columns to work out.

As of now, the only real solution is to insert an image, but this makes it harder for people to copy and test with on their machines.

Thoughts?

(An example post with this issue)

4
  • Have you seen the available table options for Markdown? They're a pain in the ass to type. It's either impossible to edit, or ends up an ASCII table in source view anyway just to be readable.
    – Daniel Beck Mod
    Commented Jun 13, 2012 at 18:02
  • Right, I am looking for something like what exists in Gmail with the Create a Document lab enabled. I am looking for something as simple as possible. I am in the camp of "How hard can this really be?"
    – soandos
    Commented Jun 13, 2012 at 18:07
  • 2
    till then Is there a webapp to create ASCII art tables?
    – Sathyajith Bhat Mod
    Commented Jun 13, 2012 at 18:42
  • This looks familiar... :P
    – Bob
    Commented Jun 16, 2012 at 3:02

4 Answers 4

4

This is currently achievable using a code block. Granted it does require the fields to have similar lengths of data, and it looks ugly in source as you have to mangle the tabs a little.

This is a nearly direct copy from Excel, with only a few extra tab keys to get the formatting right:

            Time in Time out    Total hours
Monday      08:30   18:00       09:30:00
Tuesday     08:50   22:00       13:10:00
Wednesday   09:00   00:30       15:30:00
Thrusday    09:00   10:00       01:00:00
Friday      08:30   16:00       07:30:00
        Total (days)            1.94
        Total (hours)           46.66666667

So I don't believe Markdown is particularly deficient, though a table type object would be a nice feature.

3
  • I realize that it is possible, its just a pain, and requires constant looking at the preview.
    – soandos
    Commented Jun 13, 2012 at 18:03
  • This feels like a work-around necessary because a proper formating option is not available. That said, I end up having to use it an awful lot.
    – dav
    Commented Aug 1, 2012 at 18:17
  • Semantically, this would be better as a preformatted block (<pre> {table in here} </pre>) - it looks the same, but it doesn't wrap it in <code></code> tags.
    – Robotnik
    Commented Jul 12 at 0:37
4

Here are some useful characters for building tables:

╔╦═╗
╠╬═╣
║║ ║
╚╩═╝

Example:

╔═════╦═══╗
║ xxx ║ b ║
╠═════╬═══╣
║ aaa ║ c ║
╠═════╬═══╣
║ ddd ║ e ║
╚═════╩═══╝

If you're on OS X, they're in the Box Drawing category of characters in Character Palette.

Screenshot of character viewer

If you suffer from Windows (8):

Windows solution

7
  • 1) Its pretty cool and good looking. 2) I would have to find a reference copy every time I want to use it. It would be ok though if there was a button on the markdown bar that just dumped this in.
    – soandos
    Commented Jun 13, 2012 at 18:09
  • @soandos See edited post, there are tools for it. For me, they're about 4 keypresses away at any time.
    – Daniel Beck Mod
    Commented Jun 13, 2012 at 18:09
  • Not on OS X. I assume that I can go into word and find the symbols, but that is really painful.
    – soandos
    Commented Jun 13, 2012 at 18:10
  • @soandos There you go. Feels like a main site answer now :-)
    – Daniel Beck Mod
    Commented Jun 13, 2012 at 18:13
  • It still feels like a pain to impalement. And it just occurred to me, that it is total unportable to anything.
    – soandos
    Commented Jun 13, 2012 at 18:18
  • Is that category new in 10.7? Can't find them in 10.6.
    – slhck
    Commented Jun 13, 2012 at 21:32
  • @slhck No idea. Cogwheel » Customize List » Symbols » Box Drawing.
    – Daniel Beck Mod
    Commented Jun 14, 2012 at 5:41
2

You could be a ninja and do this:


My Table

table

Click edit for copyable, CSV text!


Problem solved :P

2
  • 1
    I would love for this to be automatic.
    – soandos
    Commented Jun 13, 2012 at 21:43
  • Source: meta.superuser.com/revisions/… (edit was blocked as there's a pending edit, so posting alternate link to source)
    – JohnLBevan
    Commented Oct 24, 2016 at 17:22
0

As per the announcement post on Meta Stack Exchange, Stack sites now support Github-style Markdown tables:

| Header Left | Header center | Header Right |
|-------------|:-------------:|-------------:|
| Cell Left   | Cell Center   | Cell Right   |
Header Left Header center Header Right
Cell Left Cell Center Cell Right

See the aforementioned Meta Stack Exchange post for the features and limitations.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .