summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2023-03-19 13:02:36 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2023-03-19 13:35:02 +0100
commit07c56322c24062082b798961573f0dbb22c4937b (patch)
tree549804e1ea1a4d93a9e364e640d70cc3d45cd601 /doc
parentec1a06f5effcf57c6c8d1bd30c47e316a2f13206 (diff)
lua-filters.md: generate docs from Haskell for pandoc.structure
Diffstat (limited to 'doc')
-rw-r--r--doc/lua-filters.md109
1 files changed, 60 insertions, 49 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index d3bea4cb4..e8a9a381a 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -4810,16 +4810,18 @@ objects.
<!-- END: AUTOGENERATED CONTENT -->
+<!-- BEGIN: AUTOGENERATED CONTENT for module pandoc.structure -->
+
# Module pandoc.structure
-Access to the higher-level document structure, including
-hierarchical sections and the table of contents.
+Access to the higher-level document structure,
+includinghierarchical sections and the table of contents.
-## Functions
+## Functions {#pandoc.structure-functions}
-### make\_sections {#pandoc.structure.make_sections}
+### make_sections {#pandoc.structure.make_sections}
-`make_sections (blocks, opts)`
+`make_sections (blocks[, opts])`
Puts [Blocks] into a hierarchical structure: a list of sections
(each a Div with class "section" and first element a Header).
@@ -4832,32 +4834,32 @@ reorganized so that there are no gaps, with numbering levels
shifted by the given value. Finally, an integer `slide_level`
value triggers the creation of slides at that heading level.
-Note that a [WriterOptions][] object can be passed as the opts
+Note that a [WriterOptions] object can be passed as the opts
table; this will set the `number_section` and `slide_level` values
to those defined on the command line.
+Usage:
+
+ local blocks = {
+ pandoc.Header(2, pandoc.Str 'first'),
+ pandoc.Header(2, pandoc.Str 'second'),
+ }
+ local opts = PANDOC_WRITER_OPTIONS
+ local newblocks = pandoc.structure.make_sections(blocks, opts)
+
Parameters:
`blocks`
-: list of blocks to process ([Blocks][]|[Pandoc][])
+: document blocks to process ([Blocks]\|[Pandoc])
`opts`
: options (table)
Returns:
-- [Blocks][].
+- processed blocks ([Blocks])
-Usage:
-
- local blocks = {
- pandoc.Header(2, pandoc.Str 'first'),
- pandoc.Header(2, pandoc.Str 'second'),
- }
- local opts = PANDOC_WRITER_OPTIONS
- local newblocks = pandoc.structure.make_sections(blocks, opts)
-
-### slide\_level {#pandoc.structure.slide_level}
+### slide_level {#pandoc.structure.slide_level}
`slide_level (blocks)`
@@ -4868,60 +4870,62 @@ blocks).
Parameters:
`blocks`
-: document body ([Blocks][]|[Pandoc][])
+: document body ([Blocks]\|[Pandoc])
Returns:
-- slide level (integer)
+- slide level ([integer]{unknown-type="integer"})
-### split\_into\_chunks {#pandoc.structure.split_into_chunks}
+### split_into_chunks {#pandoc.structure.split_into_chunks}
-`split_into_chunks (doc, opts)`
+`split_into_chunks (doc[, opts])`
-Converts a [Pandoc][] document into a
-[ChunkedDoc](#type-chunkeddoc).
+Converts a [Pandoc] document into a [ChunkedDoc].
Parameters:
`doc`
-: document to split ([Pandoc][])
+: document to split ([Pandoc])
`opts`
-: split options (table)
+
+: Splitting options.
The following options are supported:
- `path_template`
- : template used to generate the chunks' filepaths
- `%n` will be replaced with the chunk number (padded with
- leading 0s to 3 digits), `%s` with the section number of
- the heading, `%h` with the (stringified) heading text,
- `%i` with the section identifier. For example,
- `"section-%s-%i.html"` might be resolved to
- `"section-1.2-introduction.html"`.
+ `path_template`
+ : template used to generate the chunks' filepaths
+ `%n` will be replaced with the chunk number (padded with
+ leading 0s to 3 digits), `%s` with the section number of
+ the heading, `%h` with the (stringified) heading text,
+ `%i` with the section identifier. For example,
+ `"section-%s-%i.html"` might be resolved to
+ `"section-1.2-introduction.html"`.
- Default is `"chunk-%n"` (string)
+ Default is `"chunk-%n"` (string)
- `number_sections`
- : whether sections should be numbered; default is `false`
- (boolean)
+ `number_sections`
+ : whether sections should be numbered; default is `false`
+ (boolean)
- `chunk_level`
- : The heading level the document should be split into
- chunks. The default is to split at the top-level, i.e.,
- `1`. (integer)
+ `chunk_level`
+ : The heading level the document should be split into
+ chunks. The default is to split at the top-level, i.e.,
+ `1`. (integer)
- `base_heading_level`
- : The base level to be used for numbering. Default is `nil`
- (integer|nil)
+ `base_heading_level`
+ : The base level to be used for numbering. Default is `nil`
+ (integer|nil)
+
+ (table)
Returns:
-- [ChunkedDoc](#type-chunkeddoc)
+- ([ChunkedDoc])
-### table\_of\_contents {#pandoc.structure.table_of_contents}
+### table_of_contents {#pandoc.structure.table_of_contents}
-`table_of_contents (toc_source, opts)`
+`table_of_contents (toc_source[, opts])`
Generates a table of contents for the given object.
@@ -4929,7 +4933,7 @@ Parameters:
`toc_source`
: list of command line arguments
- ([Blocks]|[Pandoc]|[ChunkedDoc](#type-chunkeddoc)`)
+ ([Blocks]\|[Pandoc]\|[ChunkedDoc])
`opts`
: options ([WriterOptions])
@@ -4938,6 +4942,8 @@ Returns:
- Table of contents as a BulletList object ([Block])
+<!-- END: AUTOGENERATED CONTENT -->
+
# Module pandoc.system
Access to system information and functionality.
@@ -5985,5 +5991,10 @@ Returns:
<!-- BEGIN: GENERATED REFERENCE LINKS -->
[this blog post]: http://neilmitchell.blogspot.co.uk/2015/10/filepaths-are-subtle-symlinks-are-hard.html
+ [Blocks]: #type-blocks
+ [WriterOptions]: #type-writeroptions
+ [Pandoc]: #type-pandoc
+ [ChunkedDoc]: #type-chunkeddoc
+ [Block]: #type-block
[zip.Entry]: #type-pandoc.zip.Entry
[zip.Archive]: #type-pandoc.zip.Archive