anammari / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

Syntax for header *columns* in tables #184

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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
=======  ------ ------ ------

Original issue reported on code.google.com by bpjonsson@gmail.com on 11 Dec 2009 at 10:56