lua-filters.doc: use header attributes, not spans.

This commit is contained in:
John MacFarlane 2022-01-07 23:24:39 -08:00
parent 2fb903336b
commit 95b0645276

View file

@ -2371,7 +2371,7 @@ format, and functions to filter and modify a subtree.
## Pandoc ## Pandoc
### [`Pandoc (blocks[, meta])`]{#pandoc.pandoc} ### `Pandoc (blocks[, meta])` {#pandoc.pandoc}
A complete pandoc document A complete pandoc document
@ -2387,7 +2387,7 @@ Returns: [Pandoc] object
## Meta ## Meta
### [`Meta (table)`]{#pandoc.meta} ### `Meta (table)` {#pandoc.meta}
Create a new Meta object. Create a new Meta object.
@ -2400,7 +2400,7 @@ Returns: [Meta] object
## MetaValue ## 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`, data; creates a copy of the input list via `pandoc.Blocks`,
@ -2413,7 +2413,7 @@ Parameters:
Returns: [Blocks][] 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`, data; creates a copy of the input list via `pandoc.Inlines`,
@ -2426,7 +2426,7 @@ Parameters:
Returns: [Inlines][] 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`, creates a copy of the input list via `pandoc.List`,
@ -2439,7 +2439,7 @@ Parameters:
Returns: [List] 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 a copy of the input table, keeping only pairs with string
@ -2452,7 +2452,7 @@ Parameters:
Returns: table 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 is the identity function for boolean values and exists only
@ -2465,7 +2465,7 @@ Parameters:
Returns: string 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 the identity function for boolean values and exists only for
@ -2480,7 +2480,7 @@ Returns: boolean
## Block ## Block
### [`BlockQuote (content)`]{#pandoc.blockquote} ### `BlockQuote (content)` {#pandoc.blockquote}
Creates a block quote element Creates a block quote element
@ -2491,7 +2491,7 @@ Parameters:
Returns: [BlockQuote] object Returns: [BlockQuote] object
### [`BulletList (items)`]{#pandoc.bulletlist} ### `BulletList (items)` {#pandoc.bulletlist}
Creates a bullet list. Creates a bullet list.
@ -2502,7 +2502,7 @@ Parameters:
Returns: [BulletList] object Returns: [BulletList] object
### [`CodeBlock (text[, attr])`]{#pandoc.codeblock} ### `CodeBlock (text[, attr])` {#pandoc.codeblock}
Creates a code block element Creates a code block element
@ -2516,7 +2516,7 @@ Parameters:
Returns: [CodeBlock] object 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. explanation.
@ -2528,7 +2528,7 @@ Parameters:
Returns: [DefinitionList] object Returns: [DefinitionList] object
### [`Div (content[, attr])`]{#pandoc.div} ### `Div (content[, attr])` {#pandoc.div}
Creates a div element Creates a div element
@ -2542,7 +2542,7 @@ Parameters:
Returns: [Div] object Returns: [Div] object
### [`Header (level, content[, attr])`]{#pandoc.header} ### `Header (level, content[, attr])` {#pandoc.header}
Creates a header element. Creates a header element.
@ -2559,13 +2559,13 @@ Parameters:
Returns: [Header] object Returns: [Header] object
### [`HorizontalRule ()`]{#pandoc.horizontalrule} ### `HorizontalRule ()` {#pandoc.horizontalrule}
Creates a horizontal rule. Creates a horizontal rule.
Returns: [HorizontalRule] object Returns: [HorizontalRule] object
### [`LineBlock (content)`]{#pandoc.lineblock} ### `LineBlock (content)` {#pandoc.lineblock}
Creates a line block element. Creates a line block element.
@ -2576,13 +2576,13 @@ Parameters:
Returns: [LineBlock] object Returns: [LineBlock] object
### [`Null ()`]{#pandoc.null} ### `Null ()` {#pandoc.null}
Creates a null element. Creates a null element.
Returns: [Null] object Returns: [Null] object
### [`OrderedList (items[, listAttributes])`]{#pandoc.orderedlist} ### `OrderedList (items[, listAttributes])` {#pandoc.orderedlist}
Creates an ordered list. Creates an ordered list.
@ -2596,7 +2596,7 @@ Parameters:
Returns: [OrderedList](#type-orderedlist) object Returns: [OrderedList](#type-orderedlist) object
### [`Para (content)`]{#pandoc.para} ### `Para (content)` {#pandoc.para}
Creates a para element. Creates a para element.
@ -2607,7 +2607,7 @@ Parameters:
Returns: [Para](#type-para) object Returns: [Para](#type-para) object
### [`Plain (content)`]{#pandoc.plain} ### `Plain (content)` {#pandoc.plain}
Creates a plain element. Creates a plain element.
@ -2618,7 +2618,7 @@ Parameters:
Returns: [Plain](#type-plain) object 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.
@ -2632,7 +2632,7 @@ Parameters:
Returns: [RawBlock](#type-rawblock) object 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.
@ -2660,7 +2660,7 @@ Returns: [Table](#type-table) object
## Blocks ## Blocks
### [`Blocks (block_like_elements)`]{#pandoc.blocks} ### `Blocks (block_like_elements)` {#pandoc.blocks}
Creates a [Blocks][] list. Creates a [Blocks][] list.
@ -2674,7 +2674,7 @@ Returns: [Blocks][]
## Inline ## Inline
### [`Cite (content, citations)`]{#pandoc.cite} ### `Cite (content, citations)` {#pandoc.cite}
Creates a Cite inline element Creates a Cite inline element
@ -2688,7 +2688,7 @@ Parameters:
Returns: [Cite](#type-cite) object 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
@ -2702,7 +2702,7 @@ Parameters:
Returns: [Code](#type-code) object 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.
@ -2713,7 +2713,7 @@ Parameters:
Returns: [Emph](#type-emph) object 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
@ -2733,13 +2733,13 @@ Parameters:
Returns: [Image](#type-image) object 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 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.
@ -2759,7 +2759,7 @@ Parameters:
Returns: [Link](#type-link) object 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.
@ -2773,7 +2773,7 @@ Parameters:
Returns: [Math](#type-math) object 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).
@ -2784,7 +2784,7 @@ Parameters:
Returns: [Math](#type-math) object 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).
@ -2795,7 +2795,7 @@ Parameters:
Returns: [Math](#type-math) object Returns: [Math](#type-math) object
### [`Note (content)`]{#pandoc.note} ### `Note (content)` {#pandoc.note}
Creates a Note inline element Creates a Note inline element
@ -2806,7 +2806,7 @@ Parameters:
Returns: [Note](#type-note) object 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. quoted content.
@ -2821,7 +2821,7 @@ Parameters:
Returns: [Quoted](#type-quoted) object 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).
@ -2832,7 +2832,7 @@ Parameters:
Returns: [Quoted](#type-quoted) 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).
@ -2843,7 +2843,7 @@ Parameters:
Returns: [Quoted](#type-quoted) Returns: [Quoted](#type-quoted)
### [`RawInline (format, text)`]{#pandoc.rawinline} ### `RawInline (format, text)` {#pandoc.rawinline}
Creates a raw inline element Creates a raw inline element
@ -2857,7 +2857,7 @@ Parameters:
Returns: [RawInline](#type-rawinline) object 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
@ -2868,19 +2868,19 @@ Parameters:
Returns: [SmallCaps](#type-smallcaps) object 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 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 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
@ -2894,7 +2894,7 @@ Parameters:
Returns: [Span](#type-span) object Returns: [Span](#type-span) object
### [`Str (text)`]{#pandoc.str} ### `Str (text)` {#pandoc.str}
Creates a Str inline element Creates a Str inline element
@ -2905,7 +2905,7 @@ Parameters:
Returns: [Str](#type-str) object 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.
@ -2916,7 +2916,7 @@ Parameters:
Returns: [Strikeout](#type-strikeout) object 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. a bold font.
@ -2928,7 +2928,7 @@ Parameters:
Returns: [Strong](#type-strong) object Returns: [Strong](#type-strong) object
### [`Subscript (content)`]{#pandoc.subscript} ### `Subscript (content)` {#pandoc.subscript}
Creates a Subscript inline element Creates a Subscript inline element
@ -2939,7 +2939,7 @@ Parameters:
Returns: [Subscript](#type-subscript) object Returns: [Subscript](#type-subscript) object
### [`Superscript (content)`]{#pandoc.superscript} ### `Superscript (content)` {#pandoc.superscript}
Creates a Superscript inline element Creates a Superscript inline element
@ -2950,7 +2950,7 @@ Parameters:
Returns: [Superscript](#type-superscript) object Returns: [Superscript](#type-superscript) object
### [`Underline (content)`]{#pandoc.underline} ### `Underline (content)` {#pandoc.underline}
Creates an Underline inline element Creates an Underline inline element
@ -2963,7 +2963,7 @@ Returns: [Underline](#type-underline) object
## Inlines ## 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:
@ -2984,7 +2984,7 @@ Returns: [Inlines][] list
## Element components ## 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).
@ -3001,7 +3001,7 @@ Parameters:
Returns: [Attr](#type-attr) object 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.
@ -3028,7 +3028,7 @@ Returns:
- [Cell](#type-cell) object - [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.
@ -3054,7 +3054,7 @@ Parameters:
Returns: [Citation](#type-citation) object 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.
@ -3071,7 +3071,7 @@ Parameters:
Returns: [ListAttributes](#type-listattributes) object Returns: [ListAttributes](#type-listattributes) object
### [`Row ([cells[, attr]])`]{#pandoc.row} ### `Row ([cells[, attr]])` {#pandoc.row}
Creates a table row. Creates a table row.
@ -3083,7 +3083,7 @@ Parameters:
`attr`: `attr`:
: row attributes : row attributes
### [`TableFoot ([rows[, attr]])`]{#pandoc.tablefoot} ### `TableFoot ([rows[, attr]])` {#pandoc.tablefoot}
Creates a table foot. Creates a table foot.
@ -3095,7 +3095,7 @@ Parameters:
`attr`: `attr`:
: table foot attributes : table foot attributes
### [`TableHead ([rows[, attr]])`]{#pandoc.tablehead} ### `TableHead ([rows[, attr]])` {#pandoc.tablehead}
Creates a table head. Creates a table head.
@ -3109,7 +3109,7 @@ Parameters:
## Legacy types ## 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. table type.
@ -3270,7 +3270,7 @@ Usage:
## Other constructors ## Other constructors
### [`ReaderOptions (opts)`]{#pandoc.readeroptions} ### `ReaderOptions (opts)` {#pandoc.readeroptions}
Creates a new [ReaderOptions] value. Creates a new [ReaderOptions] value.
@ -3294,7 +3294,7 @@ Usage:
-- default reader options, but columns set to 66. -- default reader options, but columns set to 66.
local short_colums_opts = pandoc.ReaderOptions {columns = 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.
@ -3929,7 +3929,7 @@ methods and convenience functions.
## Metamethods ## Metamethods
### [`pandoc.List:__concat (list)`]{#pandoc.list:__concat} ### `pandoc.List:__concat (list)` {#pandoc.list:__concat}
Concatenates two lists. Concatenates two lists.
@ -3941,7 +3941,7 @@ Parameters:
Returns: a new list containing all elements from list1 and Returns: a new list containing all elements from list1 and
list2 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 if and only if they are of the same type (i.e., have the same
@ -3959,11 +3959,11 @@ Returns:
## Methods ## 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.
@ -3972,7 +3972,7 @@ Parameters:
`list`: `list`:
: list to appended : 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. given item.
@ -3988,7 +3988,7 @@ Parameters:
Returns: first item equal to the needle, or nil if no such Returns: first item equal to the needle, or nil if no such
item exists. 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. the predicate holds true.
@ -4004,7 +4004,7 @@ Parameters:
Returns: first item for which \`test\` succeeds, or nil if Returns: first item for which \`test\` succeeds, or nil if
no such item exists. 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. condition.
@ -4017,7 +4017,7 @@ Parameters:
Returns: a new list containing all items for which \`test\` Returns: a new list containing all items for which \`test\`
was true. 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.
@ -4032,7 +4032,7 @@ Parameters:
Returns: true if a list item is equal to the needle, false Returns: true if a list item is equal to the needle, false
otherwise 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. elements to the next-greater index if necessary.
@ -4048,7 +4048,7 @@ Parameters:
`value`: `value`:
: value to insert into the list : 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. function to all elements.
@ -4058,7 +4058,7 @@ Parameters:
`fn`: `fn`:
: function which is applied to all list items. : 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`. set the metatable of that value to `pandoc.List`.
@ -4071,7 +4071,7 @@ Parameters:
Returns: the updated input value 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. of the removed element.
@ -4087,7 +4087,7 @@ Parameters:
Returns: the removed element 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 given, then it must be a function that receives two list