mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-09 17:15:43 +00:00
[API change] Text.Pandoc.Parsing: `tableWith` and `tableWith'` now return a list of lists of Blocks, rather than a list of Blocks, for the header rows, allowing for multiple header rows. Closes #10338.
156 lines
3.8 KiB
Markdown
156 lines
3.8 KiB
Markdown
```
|
|
% pandoc -f rst -t native
|
|
Multiple Headers
|
|
================
|
|
|
|
========== =========
|
|
Header A1 Header A2
|
|
Header B1 Header B2
|
|
========== =========
|
|
body a1 body a1
|
|
body b1 body b2
|
|
========== =========
|
|
|
|
Headless
|
|
========
|
|
|
|
========== =========
|
|
body a1 body a1
|
|
body b1 body b2
|
|
========== =========
|
|
|
|
End Section
|
|
===========
|
|
^D
|
|
[ Header
|
|
1
|
|
( "multiple-headers" , [] , [] )
|
|
[ Str "Multiple" , Space , Str "Headers" ]
|
|
, Table
|
|
( "" , [] , [] )
|
|
(Caption Nothing [])
|
|
[ ( AlignDefault , ColWidthDefault )
|
|
, ( AlignDefault , ColWidthDefault )
|
|
]
|
|
(TableHead
|
|
( "" , [] , [] )
|
|
[ Row
|
|
( "" , [] , [] )
|
|
[ Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "Header" , Space , Str "A1" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "Header" , Space , Str "A2" ] ]
|
|
]
|
|
, Row
|
|
( "" , [] , [] )
|
|
[ Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "Header" , Space , Str "B1" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "Header" , Space , Str "B2" ] ]
|
|
]
|
|
])
|
|
[ TableBody
|
|
( "" , [] , [] )
|
|
(RowHeadColumns 0)
|
|
[]
|
|
[ Row
|
|
( "" , [] , [] )
|
|
[ Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "body" , Space , Str "a1" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "body" , Space , Str "a1" ] ]
|
|
]
|
|
, Row
|
|
( "" , [] , [] )
|
|
[ Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "body" , Space , Str "b1" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "body" , Space , Str "b2" ] ]
|
|
]
|
|
]
|
|
]
|
|
(TableFoot ( "" , [] , [] ) [])
|
|
, Header 1 ( "headless" , [] , [] ) [ Str "Headless" ]
|
|
, Table
|
|
( "" , [] , [] )
|
|
(Caption Nothing [])
|
|
[ ( AlignDefault , ColWidthDefault )
|
|
, ( AlignDefault , ColWidthDefault )
|
|
]
|
|
(TableHead ( "" , [] , [] ) [])
|
|
[ TableBody
|
|
( "" , [] , [] )
|
|
(RowHeadColumns 0)
|
|
[]
|
|
[ Row
|
|
( "" , [] , [] )
|
|
[ Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "body" , Space , Str "a1" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "body" , Space , Str "a1" ] ]
|
|
]
|
|
, Row
|
|
( "" , [] , [] )
|
|
[ Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "body" , Space , Str "b1" ] ]
|
|
, Cell
|
|
( "" , [] , [] )
|
|
AlignDefault
|
|
(RowSpan 1)
|
|
(ColSpan 1)
|
|
[ Plain [ Str "body" , Space , Str "b2" ] ]
|
|
]
|
|
]
|
|
]
|
|
(TableFoot ( "" , [] , [] ) [])
|
|
, Header
|
|
1
|
|
( "end-section" , [] , [] )
|
|
[ Str "End" , Space , Str "Section" ]
|
|
]
|
|
```
|