lua-filters.doc: use headings instead of nested def lists.

See #7807.
This commit is contained in:
John MacFarlane 2022-01-07 23:22:18 -08:00
parent 2986a06aaa
commit 2fb903336b

View file

@ -2371,9 +2371,9 @@ format, and functions to filter and modify a subtree.
## Pandoc
[`Pandoc (blocks[, meta])`]{#pandoc.pandoc}
### [`Pandoc (blocks[, meta])`]{#pandoc.pandoc}
: A complete pandoc document
A complete pandoc document
Parameters:
@ -2387,9 +2387,9 @@ format, and functions to filter and modify a subtree.
## Meta
[`Meta (table)`]{#pandoc.meta}
### [`Meta (table)`]{#pandoc.meta}
: Create a new Meta object.
Create a new Meta object.
Parameters:
@ -2400,9 +2400,9 @@ format, and functions to filter and modify a subtree.
## MetaValue
[`MetaBlocks (blocks)`]{#pandoc.metablocks}
### [`MetaBlocks (blocks)`]{#pandoc.metablocks}
: Creates a value to be used as a MetaBlocks value in meta
Creates a value to be used as a MetaBlocks value in meta
data; creates a copy of the input list via `pandoc.Blocks`,
discarding all non-list keys.
@ -2413,9 +2413,9 @@ format, and functions to filter and modify a subtree.
Returns: [Blocks][]
[`MetaInlines (inlines)`]{#pandoc.metainlines}
### [`MetaInlines (inlines)`]{#pandoc.metainlines}
: Creates a value to be used as a MetaInlines value in meta
Creates a value to be used as a MetaInlines value in meta
data; creates a copy of the input list via `pandoc.Inlines`,
discarding all non-list keys.
@ -2426,9 +2426,9 @@ format, and functions to filter and modify a subtree.
Returns: [Inlines][]
[`MetaList (meta_values)`]{#pandoc.metalist}
### [`MetaList (meta_values)`]{#pandoc.metalist}
: Creates a value to be used as a MetaList in meta data;
Creates a value to be used as a MetaList in meta data;
creates a copy of the input list via `pandoc.List`,
discarding all non-list keys.
@ -2439,9 +2439,9 @@ format, and functions to filter and modify a subtree.
Returns: [List]
[`MetaMap (key_value_map)`]{#pandoc.metamap}
### [`MetaMap (key_value_map)`]{#pandoc.metamap}
: Creates a value to be used as a MetaMap in meta data; creates
Creates a value to be used as a MetaMap in meta data; creates
a copy of the input table, keeping only pairs with string
keys and discards all other keys.
@ -2452,9 +2452,9 @@ format, and functions to filter and modify a subtree.
Returns: table
[`MetaString (str)`]{#pandoc.metastring}
### [`MetaString (str)`]{#pandoc.metastring}
: Creates a value to be used as a MetaString in meta data; this
Creates a value to be used as a MetaString in meta data; this
is the identity function for boolean values and exists only
for completeness.
@ -2465,9 +2465,9 @@ format, and functions to filter and modify a subtree.
Returns: string
[`MetaBool (bool)`]{#pandoc.metabool}
### [`MetaBool (bool)`]{#pandoc.metabool}
: Creates a value to be used as MetaBool in meta data; this is
Creates a value to be used as MetaBool in meta data; this is
the identity function for boolean values and exists only for
completeness.
@ -2480,9 +2480,9 @@ format, and functions to filter and modify a subtree.
## Block
[`BlockQuote (content)`]{#pandoc.blockquote}
### [`BlockQuote (content)`]{#pandoc.blockquote}
: Creates a block quote element
Creates a block quote element
Parameters:
@ -2491,9 +2491,9 @@ format, and functions to filter and modify a subtree.
Returns: [BlockQuote] object
[`BulletList (items)`]{#pandoc.bulletlist}
### [`BulletList (items)`]{#pandoc.bulletlist}
: Creates a bullet list.
Creates a bullet list.
Parameters:
@ -2502,9 +2502,9 @@ format, and functions to filter and modify a subtree.
Returns: [BulletList] object
[`CodeBlock (text[, attr])`]{#pandoc.codeblock}
### [`CodeBlock (text[, attr])`]{#pandoc.codeblock}
: Creates a code block element
Creates a code block element
Parameters:
@ -2516,9 +2516,9 @@ format, and functions to filter and modify a subtree.
Returns: [CodeBlock] object
[`DefinitionList (content)`]{#pandoc.definitionlist}
### [`DefinitionList (content)`]{#pandoc.definitionlist}
: Creates a definition list, containing terms and their
Creates a definition list, containing terms and their
explanation.
Parameters:
@ -2528,9 +2528,9 @@ format, and functions to filter and modify a subtree.
Returns: [DefinitionList] object
[`Div (content[, attr])`]{#pandoc.div}
### [`Div (content[, attr])`]{#pandoc.div}
: Creates a div element
Creates a div element
Parameters:
@ -2542,9 +2542,9 @@ format, and functions to filter and modify a subtree.
Returns: [Div] object
[`Header (level, content[, attr])`]{#pandoc.header}
### [`Header (level, content[, attr])`]{#pandoc.header}
: Creates a header element.
Creates a header element.
Parameters:
@ -2559,15 +2559,15 @@ format, and functions to filter and modify a subtree.
Returns: [Header] object
[`HorizontalRule ()`]{#pandoc.horizontalrule}
### [`HorizontalRule ()`]{#pandoc.horizontalrule}
: Creates a horizontal rule.
Creates a horizontal rule.
Returns: [HorizontalRule] object
[`LineBlock (content)`]{#pandoc.lineblock}
### [`LineBlock (content)`]{#pandoc.lineblock}
: Creates a line block element.
Creates a line block element.
Parameters:
@ -2576,15 +2576,15 @@ format, and functions to filter and modify a subtree.
Returns: [LineBlock] object
[`Null ()`]{#pandoc.null}
### [`Null ()`]{#pandoc.null}
: Creates a null element.
Creates a null element.
Returns: [Null] object
[`OrderedList (items[, listAttributes])`]{#pandoc.orderedlist}
### [`OrderedList (items[, listAttributes])`]{#pandoc.orderedlist}
: Creates an ordered list.
Creates an ordered list.
Parameters:
@ -2596,9 +2596,9 @@ format, and functions to filter and modify a subtree.
Returns: [OrderedList](#type-orderedlist) object
[`Para (content)`]{#pandoc.para}
### [`Para (content)`]{#pandoc.para}
: Creates a para element.
Creates a para element.
Parameters:
@ -2607,9 +2607,9 @@ format, and functions to filter and modify a subtree.
Returns: [Para](#type-para) object
[`Plain (content)`]{#pandoc.plain}
### [`Plain (content)`]{#pandoc.plain}
: Creates a plain element.
Creates a plain element.
Parameters:
@ -2618,9 +2618,9 @@ format, and functions to filter and modify a subtree.
Returns: [Plain](#type-plain) object
[`RawBlock (format, text)`]{#pandoc.rawblock}
### [`RawBlock (format, text)`]{#pandoc.rawblock}
: Creates a raw content block of the specified format.
Creates a raw content block of the specified format.
Parameters:
@ -2632,9 +2632,9 @@ format, and functions to filter and modify a subtree.
Returns: [RawBlock](#type-rawblock) object
[`Table (caption, colspecs, head, bodies, foot[, attr])`]{#pandoc.table}
### [`Table (caption, colspecs, head, bodies, foot[, attr])`]{#pandoc.table}
: Creates a table element.
Creates a table element.
Parameters:
@ -2660,9 +2660,9 @@ format, and functions to filter and modify a subtree.
## Blocks
[`Blocks (block_like_elements)`]{#pandoc.blocks}
### [`Blocks (block_like_elements)`]{#pandoc.blocks}
: Creates a [Blocks][] list.
Creates a [Blocks][] list.
Parameters:
@ -2674,9 +2674,9 @@ format, and functions to filter and modify a subtree.
## Inline
[`Cite (content, citations)`]{#pandoc.cite}
### [`Cite (content, citations)`]{#pandoc.cite}
: Creates a Cite inline element
Creates a Cite inline element
Parameters:
@ -2688,9 +2688,9 @@ format, and functions to filter and modify a subtree.
Returns: [Cite](#type-cite) object
[`Code (text[, attr])`]{#pandoc.code}
### [`Code (text[, attr])`]{#pandoc.code}
: Creates a Code inline element
Creates a Code inline element
Parameters:
@ -2702,9 +2702,9 @@ format, and functions to filter and modify a subtree.
Returns: [Code](#type-code) object
[`Emph (content)`]{#pandoc.emph}
### [`Emph (content)`]{#pandoc.emph}
: Creates an inline element representing emphasized text.
Creates an inline element representing emphasized text.
Parameters:
@ -2713,9 +2713,9 @@ format, and functions to filter and modify a subtree.
Returns: [Emph](#type-emph) object
[`Image (caption, src[, title[, attr]])`]{#pandoc.image}
### [`Image (caption, src[, title[, attr]])`]{#pandoc.image}
: Creates a Image inline element
Creates a Image inline element
Parameters:
@ -2733,15 +2733,15 @@ format, and functions to filter and modify a subtree.
Returns: [Image](#type-image) object
[`LineBreak ()`]{#pandoc.linebreak}
### [`LineBreak ()`]{#pandoc.linebreak}
: Create a LineBreak inline element
Create a LineBreak inline element
Returns: [LineBreak](#type-linebreak) object
[`Link (content, target[, title[, attr]])`]{#pandoc.link}
### [`Link (content, target[, title[, attr]])`]{#pandoc.link}
: Creates a link inline element, usually a hyperlink.
Creates a link inline element, usually a hyperlink.
Parameters:
@ -2759,9 +2759,9 @@ format, and functions to filter and modify a subtree.
Returns: [Link](#type-link) object
[`Math (mathtype, text)`]{#pandoc.math}
### [`Math (mathtype, text)`]{#pandoc.math}
: Creates a Math element, either inline or displayed.
Creates a Math element, either inline or displayed.
Parameters:
@ -2773,9 +2773,9 @@ format, and functions to filter and modify a subtree.
Returns: [Math](#type-math) object
[`DisplayMath (text)`]{#pandoc.displaymath}
### [`DisplayMath (text)`]{#pandoc.displaymath}
: Creates a math element of type "DisplayMath" (DEPRECATED).
Creates a math element of type "DisplayMath" (DEPRECATED).
Parameters:
@ -2784,9 +2784,9 @@ format, and functions to filter and modify a subtree.
Returns: [Math](#type-math) object
[`InlineMath (text)`]{#pandoc.inlinemath}
### [`InlineMath (text)`]{#pandoc.inlinemath}
: Creates a math element of type "InlineMath" (DEPRECATED).
Creates a math element of type "InlineMath" (DEPRECATED).
Parameters:
@ -2795,9 +2795,9 @@ format, and functions to filter and modify a subtree.
Returns: [Math](#type-math) object
[`Note (content)`]{#pandoc.note}
### [`Note (content)`]{#pandoc.note}
: Creates a Note inline element
Creates a Note inline element
Parameters:
@ -2806,9 +2806,9 @@ format, and functions to filter and modify a subtree.
Returns: [Note](#type-note) object
[`Quoted (quotetype, content)`]{#pandoc.quoted}
### [`Quoted (quotetype, content)`]{#pandoc.quoted}
: Creates a Quoted inline element given the quote type and
Creates a Quoted inline element given the quote type and
quoted content.
Parameters:
@ -2821,9 +2821,9 @@ format, and functions to filter and modify a subtree.
Returns: [Quoted](#type-quoted) object
[`SingleQuoted (content)`]{#pandoc.singlequoted}
### [`SingleQuoted (content)`]{#pandoc.singlequoted}
: Creates a single-quoted inline element (DEPRECATED).
Creates a single-quoted inline element (DEPRECATED).
Parameters:
@ -2832,9 +2832,9 @@ format, and functions to filter and modify a subtree.
Returns: [Quoted](#type-quoted)
[`DoubleQuoted (content)`]{#pandoc.doublequoted}
### [`DoubleQuoted (content)`]{#pandoc.doublequoted}
: Creates a single-quoted inline element (DEPRECATED).
Creates a single-quoted inline element (DEPRECATED).
Parameters:
@ -2843,9 +2843,9 @@ format, and functions to filter and modify a subtree.
Returns: [Quoted](#type-quoted)
[`RawInline (format, text)`]{#pandoc.rawinline}
### [`RawInline (format, text)`]{#pandoc.rawinline}
: Creates a raw inline element
Creates a raw inline element
Parameters:
@ -2857,9 +2857,9 @@ format, and functions to filter and modify a subtree.
Returns: [RawInline](#type-rawinline) object
[`SmallCaps (content)`]{#pandoc.smallcaps}
### [`SmallCaps (content)`]{#pandoc.smallcaps}
: Creates text rendered in small caps
Creates text rendered in small caps
Parameters:
@ -2868,21 +2868,21 @@ format, and functions to filter and modify a subtree.
Returns: [SmallCaps](#type-smallcaps) object
[`SoftBreak ()`]{#pandoc.softbreak}
### [`SoftBreak ()`]{#pandoc.softbreak}
: Creates a SoftBreak inline element.
Creates a SoftBreak inline element.
Returns: [SoftBreak](#type-softbreak) object
[`Space ()`]{#pandoc.space}
### [`Space ()`]{#pandoc.space}
: Create a Space inline element
Create a Space inline element
Returns: [Space](#type-space) object
[`Span (content[, attr])`]{#pandoc.span}
### [`Span (content[, attr])`]{#pandoc.span}
: Creates a Span inline element
Creates a Span inline element
Parameters:
@ -2894,9 +2894,9 @@ format, and functions to filter and modify a subtree.
Returns: [Span](#type-span) object
[`Str (text)`]{#pandoc.str}
### [`Str (text)`]{#pandoc.str}
: Creates a Str inline element
Creates a Str inline element
Parameters:
@ -2905,9 +2905,9 @@ format, and functions to filter and modify a subtree.
Returns: [Str](#type-str) object
[`Strikeout (content)`]{#pandoc.strikeout}
### [`Strikeout (content)`]{#pandoc.strikeout}
: Creates text which is struck out.
Creates text which is struck out.
Parameters:
@ -2916,9 +2916,9 @@ format, and functions to filter and modify a subtree.
Returns: [Strikeout](#type-strikeout) object
[`Strong (content)`]{#pandoc.strong}
### [`Strong (content)`]{#pandoc.strong}
: Creates a Strong element, whose text is usually displayed in
Creates a Strong element, whose text is usually displayed in
a bold font.
Parameters:
@ -2928,9 +2928,9 @@ format, and functions to filter and modify a subtree.
Returns: [Strong](#type-strong) object
[`Subscript (content)`]{#pandoc.subscript}
### [`Subscript (content)`]{#pandoc.subscript}
: Creates a Subscript inline element
Creates a Subscript inline element
Parameters:
@ -2939,9 +2939,9 @@ format, and functions to filter and modify a subtree.
Returns: [Subscript](#type-subscript) object
[`Superscript (content)`]{#pandoc.superscript}
### [`Superscript (content)`]{#pandoc.superscript}
: Creates a Superscript inline element
Creates a Superscript inline element
Parameters:
@ -2950,9 +2950,9 @@ format, and functions to filter and modify a subtree.
Returns: [Superscript](#type-superscript) object
[`Underline (content)`]{#pandoc.underline}
### [`Underline (content)`]{#pandoc.underline}
: Creates an Underline inline element
Creates an Underline inline element
Parameters:
@ -2963,9 +2963,9 @@ format, and functions to filter and modify a subtree.
## Inlines
[`Inlines (inline_like_elements)`]{#pandoc.inlines}
### [`Inlines (inline_like_elements)`]{#pandoc.inlines}
: Converts its argument into an [Inlines][] list:
Converts its argument into an [Inlines][] list:
- copies a list of [Inline] elements into a fresh list; any
string `s` within the list is treated as `pandoc.Str(s)`;
@ -2984,9 +2984,9 @@ format, and functions to filter and modify a subtree.
## Element components
[`Attr ([identifier[, classes[, attributes]]])`]{#pandoc.attr}
### [`Attr ([identifier[, classes[, attributes]]])`]{#pandoc.attr}
: Create a new set of attributes (Attr).
Create a new set of attributes (Attr).
Parameters:
@ -3001,9 +3001,9 @@ format, and functions to filter and modify a subtree.
Returns: [Attr](#type-attr) object
[`Cell (blocks[, align[, rowspan[, colspan[, attr]]]])`]{#pandoc.attr}
### [`Cell (blocks[, align[, rowspan[, colspan[, attr]]]])`]{#pandoc.attr}
: Create a new table cell.
Create a new table cell.
Parameters:
@ -3028,9 +3028,9 @@ format, and functions to filter and modify a subtree.
- [Cell](#type-cell) object
[`Citation (id, mode[, prefix[, suffix[, note_num[, hash]]]])`]{#pandoc.citation}
### [`Citation (id, mode[, prefix[, suffix[, note_num[, hash]]]])`]{#pandoc.citation}
: Creates a single citation.
Creates a single citation.
Parameters:
@ -3054,9 +3054,9 @@ format, and functions to filter and modify a subtree.
Returns: [Citation](#type-citation) object
[`ListAttributes ([start[, style[, delimiter]]])`]{#pandoc.listattributes}
### [`ListAttributes ([start[, style[, delimiter]]])`]{#pandoc.listattributes}
: Creates a set of list attributes.
Creates a set of list attributes.
Parameters:
@ -3071,9 +3071,9 @@ format, and functions to filter and modify a subtree.
Returns: [ListAttributes](#type-listattributes) object
[`Row ([cells[, attr]])`]{#pandoc.row}
### [`Row ([cells[, attr]])`]{#pandoc.row}
: Creates a table row.
Creates a table row.
Parameters:
@ -3083,9 +3083,9 @@ format, and functions to filter and modify a subtree.
`attr`:
: row attributes
[`TableFoot ([rows[, attr]])`]{#pandoc.tablefoot}
### [`TableFoot ([rows[, attr]])`]{#pandoc.tablefoot}
: Creates a table foot.
Creates a table foot.
Parameters:
@ -3095,9 +3095,9 @@ format, and functions to filter and modify a subtree.
`attr`:
: table foot attributes
[`TableHead ([rows[, attr]])`]{#pandoc.tablehead}
### [`TableHead ([rows[, attr]])`]{#pandoc.tablehead}
: Creates a table head.
Creates a table head.
Parameters:
@ -3109,9 +3109,9 @@ format, and functions to filter and modify a subtree.
## Legacy types
[`SimpleTable (caption, aligns, widths, headers, rows)`]{#pandoc.simpletable}
### [`SimpleTable (caption, aligns, widths, headers, rows)`]{#pandoc.simpletable}
: Creates a simple table resembling the old (pre pandoc 2.10)
Creates a simple table resembling the old (pre pandoc 2.10)
table type.
Parameters:
@ -3270,9 +3270,9 @@ format, and functions to filter and modify a subtree.
## Other constructors
[`ReaderOptions (opts)`]{#pandoc.readeroptions}
### [`ReaderOptions (opts)`]{#pandoc.readeroptions}
: Creates a new [ReaderOptions] value.
Creates a new [ReaderOptions] value.
Parameters
@ -3294,9 +3294,9 @@ format, and functions to filter and modify a subtree.
-- default reader options, but columns set to 66.
local short_colums_opts = pandoc.ReaderOptions {columns = 66}
[`WriterOptions (opts)`]{#pandoc.writeroptions}
### [`WriterOptions (opts)`]{#pandoc.writeroptions}
: Creates a new [WriterOptions][] value.
Creates a new [WriterOptions][] value.
Parameters
@ -3929,9 +3929,9 @@ methods and convenience functions.
## Metamethods
[`pandoc.List:__concat (list)`]{#pandoc.list:__concat}
### [`pandoc.List:__concat (list)`]{#pandoc.list:__concat}
: Concatenates two lists.
Concatenates two lists.
Parameters:
@ -3941,9 +3941,9 @@ methods and convenience functions.
Returns: a new list containing all elements from list1 and
list2
[`pandoc.List:__eq (a, b)`]{#pandoc.list:__concat}
### [`pandoc.List:__eq (a, b)`]{#pandoc.list:__concat}
: Compares two lists for equality. The lists are taken as equal
Compares two lists for equality. The lists are taken as equal
if and only if they are of the same type (i.e., have the same
non-nil metatable), have the same length, and if all elements
are equal.
@ -3959,22 +3959,22 @@ methods and convenience functions.
## Methods
[`pandoc.List:clone ()`]{#pandoc.list:clone}
### [`pandoc.List:clone ()`]{#pandoc.list:clone}
: Returns a (shallow) copy of the list.
Returns a (shallow) copy of the list.
[`pandoc.List:extend (list)`]{#pandoc.list:extend}
### [`pandoc.List:extend (list)`]{#pandoc.list:extend}
: Adds the given list to the end of this list.
Adds the given list to the end of this list.
Parameters:
`list`:
: list to appended
[`pandoc.List:find (needle, init)`]{#pandoc.list:find}
### [`pandoc.List:find (needle, init)`]{#pandoc.list:find}
: Returns the value and index of the first occurrence of the
Returns the value and index of the first occurrence of the
given item.
Parameters:
@ -3988,9 +3988,9 @@ methods and convenience functions.
Returns: first item equal to the needle, or nil if no such
item exists.
[`pandoc.List:find_if (pred, init)`]{#pandoc.list:find_if}
### [`pandoc.List:find_if (pred, init)`]{#pandoc.list:find_if}
: Returns the value and index of the first element for which
Returns the value and index of the first element for which
the predicate holds true.
Parameters:
@ -4004,9 +4004,9 @@ methods and convenience functions.
Returns: first item for which \`test\` succeeds, or nil if
no such item exists.
[`pandoc.List:filter (pred)`]{#pandoc.list:filter}
### [`pandoc.List:filter (pred)`]{#pandoc.list:filter}
: Returns a new list containing all items satisfying a given
Returns a new list containing all items satisfying a given
condition.
Parameters:
@ -4017,9 +4017,9 @@ methods and convenience functions.
Returns: a new list containing all items for which \`test\`
was true.
[`pandoc.List:includes (needle, init)`]{#pandoc.list:includes}
### [`pandoc.List:includes (needle, init)`]{#pandoc.list:includes}
: Checks if the list has an item equal to the given needle.
Checks if the list has an item equal to the given needle.
Parameters:
@ -4032,9 +4032,9 @@ methods and convenience functions.
Returns: true if a list item is equal to the needle, false
otherwise
[`pandoc.List:insert ([pos], value)`]{#pandoc.list:insert}
### [`pandoc.List:insert ([pos], value)`]{#pandoc.list:insert}
: Inserts element `value` at position `pos` in list, shifting
Inserts element `value` at position `pos` in list, shifting
elements to the next-greater index if necessary.
This function is identical to
@ -4048,9 +4048,9 @@ methods and convenience functions.
`value`:
: value to insert into the list
[`pandoc.List:map (fn)`]{#pandoc.list:map}
### [`pandoc.List:map (fn)`]{#pandoc.list:map}
: Returns a copy of the current list by applying the given
Returns a copy of the current list by applying the given
function to all elements.
Parameters:
@ -4058,9 +4058,9 @@ methods and convenience functions.
`fn`:
: function which is applied to all list items.
[`pandoc.List:new([table])`]{#pandoc.list:new}
### [`pandoc.List:new([table])`]{#pandoc.list:new}
: Create a new List. If the optional argument `table` is given,
Create a new List. If the optional argument `table` is given,
set the metatable of that value to `pandoc.List`.
Parameters:
@ -4071,9 +4071,9 @@ methods and convenience functions.
Returns: the updated input value
[`pandoc.List:remove ([pos])`]{#pandoc.list:remove}
### [`pandoc.List:remove ([pos])`]{#pandoc.list:remove}
: Removes the element at position `pos`, returning the value
Removes the element at position `pos`, returning the value
of the removed element.
This function is identical to
@ -4087,9 +4087,9 @@ methods and convenience functions.
Returns: the removed element
[`pandoc.List:sort ([comp])`]{#pandoc.list:sort}
### [`pandoc.List:sort ([comp])`]{#pandoc.list:sort}
: Sorts list elements in a given order, in-place. If `comp` is
Sorts list elements in a given order, in-place. If `comp` is
given, then it must be a function that receives two list
elements and returns true when the first element must come
before the second in the final order (so that, after the