Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spanned columns in tables #176

Open
nkalvi opened this issue Apr 22, 2014 · 9 comments
Open

Add spanned columns in tables #176

nkalvi opened this issue Apr 22, 2014 · 9 comments

Comments

@nkalvi
Copy link

nkalvi commented Apr 22, 2014

Please add support for spanned column in tables - as implemented in some other MD variants.

@adam-p
Copy link
Owner

adam-p commented Aug 13, 2014

Can you provide pointers toward the spanning syntax used in other MD variants?

Unsatisfying workaround: You can use raw HTML, like so:

<table>
    <tr>
        <th>Col 1</th>
        <th>Col 2</th>
        <th>Col 3</th>
    </tr>
    <tr>
        <td colspan="2">span 2 cols</td>
        <td rowspan="2">span 2 rows</td>
    </tr>
    <tr>
        <td>stuff</td>
        <td>stuff</td>
    </tr>
</table>​

Except that because of #157 it won't actually render very nicely -- it'll work a lot better if you put all the HTML on a single line.

search keywords: colspan rowspan

@adam-p
Copy link
Owner

adam-p commented Mar 3, 2015

A follow-up to this...

It seems that MultiMarkdown does have colspan syntax, but not rowspan.

Probably the best way to do rowspan and colspan right now is to use this online HTML table generator to create your table, and then paste it into your email (or whatever) and use MDH to render it. Make sure to check the boxes for "Do not generate CSS" (because MDH provides the CSS) and "Compact mode" (to avoid the multi-line HTML problem I mentioned above).

(I'm also going to add that to the Tips & Tricks wiki page.)

@sixtyfive
Copy link

Hi @adam-p! Do you think it would be feasible to implement rowspan in a Markdown parser at all?

@CTimmerman
Copy link

CTimmerman commented Jul 23, 2018

I like Textile's syntax for spans:

A backslash \ is used for a column span.

|\2. spans two cols |
| col 1 | col 2 |

A forward slash / is used for a row span.

|/3. spans 3 rows | row a |
| row b |
| row c |

@voronin-de
Copy link

Uhm.. so no rowspan or colspan unless we write HTML? :/

@sixtyfive
Copy link

that link is dead btw, @CTimmerman

@CTimmerman
Copy link

that link is dead btw, @CTimmerman

Then use inline HTML instead. https://stackoverflow.com/a/35485694/819417

@sixtyfive
Copy link

sixtyfive commented Dec 8, 2021

that was easy to misunderstand, apologies. i meant that the link to Textile's docs that you posted above ("https://txstyle.org/doc/15/tables") is dead. it should be https://textile-lang.com/doc/tables instead.

@CTimmerman
Copy link

that was easy to misunderstand, apologies. i meant that the link to Textile's docs that you posted above ("https://txstyle.org/doc/15/tables") is dead. it should be https://textile-lang.com/doc/tables instead.

Thanks. I couldn't find the new link due to https://pypi.org/project/TxtStyle/ which is probably why they renamed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants