aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-12-19 09:17:54 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2021-12-19 09:44:56 +0100
commita0af1b5926e45c830f734883b909e733fd3c01cb (patch)
treec11d8c77ae6da0b1472cd978fc6cb3a081e1e930 /doc
parent4b220d592c163efb0bf5a0e1db2ed7d6be9c69e7 (diff)
downloadpandoc-a0af1b5926e45c830f734883b909e733fd3c01cb.tar.gz
Lua: change representation of TableHead, TableFoot, and Row values.
The objects now also follow the principle that element attributes are accessible through the `.attr` field. Rows in `TableHead` and `TableFoot` are available via the `.rows` field. Row objects have a `.cells` field, containing the list of table cells. Closes: #7718
Diffstat (limited to 'doc')
-rw-r--r--doc/lua-filters.md93
1 files changed, 78 insertions, 15 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 93595a814..616c13cea 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -1876,8 +1876,6 @@ List attributes
Values of this type can be created with the
[`pandoc.ListAttributes`](#pandoc.listattributes) constructor.
-Object equality is determined via [`pandoc.utils.equals`].
-
Fields:
`start`
@@ -1896,10 +1894,13 @@ Fields:
A table row.
-Tuple fields:
+Fields:
-1. row attributes
-2. row cells (list of [Cells])
+`attr`
+: element attributes ([Attr][])
+
+`cells`
+: list of table cells ([List][] of [Cell][]s)
### TableBody {#type-tablebody}
@@ -1909,35 +1910,59 @@ number of row header columns.
Fields:
`attr`
-: table body attributes ([Attr])
+: table body attributes ([Attr][])
`body`
-: table body rows (list of [Rows])
+: table body rows ([List][] of [Row][]s)
`head`
-: intermediate head (list of [Rows])
+: intermediate head ([List][] of [Row][]s)
`row_head_columns`
: number of columns taken up by the row head of each row of a
- [TableBody]. The row body takes up the remaining columns.
+ [TableBody][]. The row body takes up the remaining columns.
### TableFoot {#type-tablefoot}
The foot of a table.
-This is a pair with the following components:
+Fields:
-1. attributes
-2. foot rows ([Rows])
+`attr`
+: element attributes ([Attr][])
+
+`rows`
+: list of rows ([List][] of [Row][]s)
+
+`identifier`
+: alias for `attr.identifier` (string)
+
+`classes`
+: alias for `attr.classes` ([List][] of strings)
+
+`attributes`
+: alias for `attr.attributes` ([Attributes][])
### TableHead {#type-tablehead}
The head of a table.
-This is a pair with the following components:
+Fields:
+
+`attr`
+: element attributes ([Attr][])
+
+`rows`
+: list of rows ([List][] of [Row][]s)
+
+`identifier`
+: alias for `attr.identifier` (string)
+
+`classes`
+: alias for `attr.classes` ([List][] of strings)
-1. attributes
-2. head rows ([Rows])
+`attributes`
+: alias for `attr.attributes` ([Attributes][])
## ReaderOptions {#type-readeroptions}
@@ -2120,6 +2145,7 @@ Usage:
[Block]: #type-block
[Blocks]: #type-block
[Caption]: #type-caption
+[Cell]: #type-cell
[Cells]: #type-cell
[Citation]: #type-citation
[Citations]: #type-citation
@@ -2138,6 +2164,7 @@ Usage:
[Pandoc]: #type-pandoc
[Para]: #type-para
[Plain]: #type-plain
+[Row]: #type-row
[Rows]: #type-row
[SimpleTable]: #type-simpletable
[Table]: #type-table
@@ -2901,6 +2928,42 @@ format, and functions to filter and modify a subtree.
Returns: [ListAttributes](#type-listattributes) object
+[`Row ([cells[, attr]])`]{#pandoc.row}
+
+: Creates a table row.
+
+ Parameters:
+
+ `cells`:
+ : list of table cells in this row
+
+ `attr`:
+ : row attributes
+
+[`TableFoot ([rows[, attr]])`]{#pandoc.tablefoot}
+
+: Creates a table foot.
+
+ Parameters:
+
+ `rows`:
+ : list of table rows
+
+ `attr`:
+ : table foot attributes
+
+[`TableHead ([rows[, attr]])`]{#pandoc.tablehead}
+
+: Creates a table head.
+
+ Parameters:
+
+ `rows`:
+ : list of table rows
+
+ `attr`:
+ : table head attributes
+
## Legacy types
[`SimpleTable (caption, aligns, widths, headers, rows)`]{#pandoc.simpletable}