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

Syntax for header *columns* in tables #174

Closed
jgm opened this issue Jun 10, 2011 · 5 comments
Closed

Syntax for header *columns* in tables #174

jgm opened this issue Jun 10, 2011 · 5 comments

Comments

@jgm
Copy link
Owner

jgm commented Jun 10, 2011

I lack the possibility to get a *column* of `<th>` cells (respectively how
other output formats mark header cells) in a table; it's of course usually
the leftmost column which needs to be so treated, but the proposed syntax
will allow any column(s) to be designated as header column(s).

The suggested syntax is to substitute equals for dashes in the 'column
format' row of dashes.  Given the input (silly example)

Family   Kid 1  Kid 2  Kid 3  Status
=======  ------ ------ ------ =======
Duck     Huey   Dewey  Louie  Old
Simpson  Bart   Lisa   Maggie New
Griffin  Chris  Meg    Stewie Ripoff

This will make the cells of the leftmost and rightmost columns be output as
header cells.  A more typical use would be with only the leftmost column as
a header column and the top left cell empty: 

         Kid 1  Kid 2  Kid 3 
=======  ------ ------ ------
Duck     Huey   Dewey  Louie 
Simpson  Bart   Lisa   Maggie
Griffin  Chris  Meg    Stewie

Table: Cartoon families with three kids

Of course it should work just as well with the new syntax with no header *row*:

=======  ------ ------ ------
Duck     Huey   Dewey  Louie 
Simpson  Bart   Lisa   Maggie
Griffin  Chris  Meg    Stewie
=======  ------ ------ ------





Google Code Info:
Issue #: 184
Author: bpjonsson
Created On: 2009-12-11T10:56:15.000Z
Closed On: 
@ghost ghost assigned jgm Jun 10, 2011
@healdp
Copy link

healdp commented Jul 5, 2011

Hi - is this enhancement under active consideration? I love pandoc, but I would classify this issue as a significant bug. So much HTML code make use of tags, and at the moment pandoc essentially ignores any such tables and renders the content as linear text (converting to mediawiki). BTW, the same problem occurs if you use tags, which all our code does. I'm using Pandoc 1.8 for Windows. Thanks.

@healdp
Copy link

healdp commented Jul 5, 2011

My previous comment had the html tags stripped out. I was referring to the thead and tbody tags, respectively. Thanks!

Hi - is this enhancement under active consideration? I love pandoc, but I would classify this issue as a significant bug. So much HTML code make use of thead tags, and at the moment pandoc essentially ignores any such tables and renders the content as linear text (converting to mediawiki). BTW, the same problem occurs if you use tbody tags, which all our code does. I'm using Pandoc 1.8 for Windows. Thanks.

@jgm
Copy link
Owner Author

jgm commented Jul 5, 2011

@healdp - you seem to be talking about the HTML reader (converting from HTML). This issue is about the markdown reader (providing a syntax for header columns). If you are concerned with reading HTML, you should open another issue and provide a specific example.

@bpj
Copy link

bpj commented Sep 19, 2012

I got this idea for how to mark any cell as
a header cell in a gridtable: replace the underline
-s of that cell with =s:

    +------------+---------+----------+---------+
    | Country    | Oz      | Belgium  | Sweden  |
    +============+=========+==========+=========+
    | First name | Jack    | Jaques   | Jakob   |
    +============+---------+----------+---------+
    | Last name  | Smith   | Fournier | Smed    |
    +============+---------+----------+---------+
    | Favorite   | LaTeX   | Markdown | HTML    |
    | markup     |         |          |         |
    +============+---------+----------+---------+
    | Language   | English | French   | Swedish |
    +============+---------+----------+---------+

but I see not even ReST supports this...

@mb21
Copy link
Collaborator

mb21 commented Feb 2, 2019

Closing in favour of #1024

@mb21 mb21 closed this as completed Feb 2, 2019
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