git.iko.soy/typeable/pandoc
on master help sign in
doc/lua-filters.md: unify, fix anchors and internal links (#6061)
d09bcc7Albert Krewinkel
doc/lua-filters.md+334−362
@@ -141,10 +141,10 @@ elements.
141Element filter functions within a filter set are called in a
141Element filter functions within a filter set are called in a
142fixed order, skipping any which are not present:
142fixed order, skipping any which are not present:
143
143
144− 1. functions for [*Inline* elements](#type-ref-Inline),
144+ 1. functions for [*Inline* elements](#type-inline),
145− 2. functions for [*Block* elements](#type-ref-Block) ,
145+ 2. functions for [*Block* elements](#type-block) ,
146− 3. the [*Meta*](#type-ref-Meta) filter function, and last
146+ 3. the [`Meta`](#type-meta) filter function, and last
147− 4. the [*Pandoc*](#type-ref-Meta) filter function.
147+ 4. the [`Pandoc`](#type-pandoc) filter function.
148
148
149It is still possible to force a different order by explicitly
149It is still possible to force a different order by explicitly
150returning multiple filter sets. For example, if the filter for
150returning multiple filter sets. For example, if the filter for
@@ -179,13 +179,12 @@ variables.
179: Table of the options which were provided to the parser.
179: Table of the options which were provided to the parser.
180
180
181`PANDOC_VERSION`
181`PANDOC_VERSION`
182−: Contains the pandoc version as a [Version
182+: Contains the pandoc version as a [Version] object which
183− object](#type-ref-Version) which behaves like a numerically
184− indexed table, most significant number first. E.g., for
183+ behaves like a numerically indexed table, most significant
184+ number first. E.g., for pandoc 2.7.3, the value of the
185− pandoc 2.7.3, the value of the variable is equivalent to a
185+ variable is equivalent to a table `{2, 7, 3}`. Use
186− table `{2, 7, 3}`. Use `tostring(PANDOC_VERSION)` to produce
186+ `tostring(PANDOC_VERSION)` to produce a version string. This
187− a version string. This variable is also set in custom
187+ variable is also set in custom writers.
188− writers.
189
188
190`PANDOC_API_VERSION`
189`PANDOC_API_VERSION`
191: Contains the version of the pandoc-types API against which
190: Contains the version of the pandoc-types API against which
@@ -204,7 +203,7 @@ variables.
204`PANDOC_STATE`
203`PANDOC_STATE`
205: The state shared by all readers and writers. It is used by
204: The state shared by all readers and writers. It is used by
206 pandoc to collect and pass information. The value of this
205 pandoc to collect and pass information. The value of this
207− variable is of type [CommonState](#type-ref-CommonState) and
206+ variable is of type [CommonState] and
208 is read-only.
207 is read-only.
209
208
210# Pandoc Module
209# Pandoc Module
@@ -233,12 +232,12 @@ those elements accessible through the filter function parameter.
233
232
234Some pandoc functions have been made available in lua:
233Some pandoc functions have been made available in lua:
235
234
236−- [`walk_block`](#walk_block) and
235+- [`walk_block`](#pandoc.walk_block) and
237− [`walk_inline`](#walk_inline) allow filters to be applied
236+ [`walk_inline`](#pandoc.walk_inline) allow filters to be applied
238 inside specific block or inline elements;
237 inside specific block or inline elements;
239−- [`read`](#read) allows filters to parse strings into pandoc
238+- [`read`](#pandoc.read) allows filters to parse strings into pandoc
240 documents;
239 documents;
241−- [`pipe`](#pipe) runs an external command with input from and
240+- [`pipe`](#pandoc.pipe) runs an external command with input from and
242 output to strings;
241 output to strings;
243- the [`pandoc.mediabag`](#module-pandoc.mediabag) module
242- the [`pandoc.mediabag`](#module-pandoc.mediabag) module
244 allows access to the "mediabag," which stores binary content
243 allows access to the "mediabag," which stores binary content
@@ -573,10 +572,10 @@ function CodeBlock(block)
573end
572end
574```
573```
575
574
576−## Building images with tikz
575+## Building images with Ti*k*Z
577
576
578−This filter converts raw LaTeX tikz environments into images. It
577+This filter converts raw LaTeX Ti*k*Z environments into images. It
579−works with both PDF and HTML output. The tikz code is compiled
578+works with both PDF and HTML output. The Ti*k*Z code is compiled
580to an image using `pdflatex`, and the image is converted from
579to an image using `pdflatex`, and the image is converted from
581pdf to svg format using
580pdf to svg format using
582[`pdf2svg`](https://github.com/dawbarton/pdf2svg), so both of
581[`pdf2svg`](https://github.com/dawbarton/pdf2svg), so both of
@@ -666,7 +665,7 @@ Example of use:
666# Lua type reference
665# Lua type reference
667
666
668This section describes the types of objects available to Lua
667This section describes the types of objects available to Lua
669−filters. See the [pandoc module](#module-pandoc%7D) for
668+filters. See the [pandoc module](#module-pandoc) for
670functions to create these objects.
669functions to create these objects.
671
670
672## Shared Properties
671## Shared Properties
@@ -683,70 +682,63 @@ Usage:
683 local emph = pandoc.Emph {pandoc.Str 'important'}
682 local emph = pandoc.Emph {pandoc.Str 'important'}
684 local cloned_emph = emph:clone() -- note the colon
683 local cloned_emph = emph:clone() -- note the colon
685
684
686−## Pandoc {#type-ref-pandoc}
685+## Pandoc {#type-pandoc}
687
686
688Pandoc document
687Pandoc document
689
688
690−Object equality is determined via
689+Object equality is determined via [`pandoc.utils.equals`].
691−[`pandoc.utils.equals`](#utils-equals).
692
690
693`blocks`
691`blocks`
694−: document content ([List](#module-pandoc.list) of
692+: document content ([List] of [Blocks])
695− [Block](#type-ref-Block)s)
696
693
697`meta`
694`meta`
698−: document meta information ([Meta](#Meta) object)
695+: document meta information ([Meta] object)
699
696
700−## Meta {#type-ref-meta}
697+## Meta {#type-meta}
701
698
702Meta information on a document; string-indexed collection of
699Meta information on a document; string-indexed collection of
703−[MetaValue](#type-ref-MetaValue)s.
700+[MetaValues].
704
701
705−Object equality is determined via
702+Object equality is determined via [`pandoc.utils.equals`].
706−[`pandoc.utils.equals`](#utils-equals).
707
703
708−## MetaValue {#type-ref-MetaValue}
704+## MetaValue {#type-metavalue}
709
705
710Document meta information items.
706Document meta information items.
711
707
712−Object equality is determined via
708+Object equality is determined via [`pandoc.utils.equals`].
713−[`pandoc.utils.equals`](#utils-equals).
714
709
715−### MetaBlocks {#type-ref-MetaBlocks}
710+### MetaBlocks {#type-metablocks}
716
711
717−A list of blocks usable as meta value
712+A list of blocks usable as meta value ([List] of [Blocks])
718−([List](#module-pandoc.list) of [Block](#type-ref-Block)s)
719
713
720Fields:
714Fields:
721
715
722`tag`, `t`
716`tag`, `t`
723: the literal `MetaBlocks` (string)
717: the literal `MetaBlocks` (string)
724
718
725−### MetaBool {#type-ref-MetaBool}
719+### MetaBool {#type-metabool}
726
720
727Plain Lua boolean value (boolean)
721Plain Lua boolean value (boolean)
728
722
729−### MetaInlines {#type-ref-MetaInlines}
723+### MetaInlines {#type-metainlines}
730
724
731−List of inlines used in metadata ([List](#module-pandoc.list) of
725+List of inlines used in metadata ([List] of [Inlines])
732−[Inline](#type-ref-Inline)s)
733
726
734Fields:
727Fields:
735
728
736`tag`, `t`
729`tag`, `t`
737: the literal `MetaInlines` (string)
730: the literal `MetaInlines` (string)
738
731
739−### MetaList {#type-ref-iMetaList}
732+### MetaList {#type-metalist}
740
733
741−A list of other [MetaValue](#type-ref-MetaValue)s.
734+A list of other [MetaValues]. ([List] of [MetaValues])
742−([List](#module-pandoc.list))
743
735
744Fields:
736Fields:
745
737
746`tag`, `t`
738`tag`, `t`
747: the literal `MetaList` (string)
739: the literal `MetaList` (string)
748
740
749−### MetaMap {#type-ref-MetaMap}
741+### MetaMap {#type-metamap}
750
742
751A string-indexed map of meta-values. (table)
743A string-indexed map of meta-values. (table)
752
744
@@ -758,38 +750,35 @@ Fields:
758*Note*: The fields will be shadowed if the map contains a field
750*Note*: The fields will be shadowed if the map contains a field
759with the same name as those listed.
751with the same name as those listed.
760
752
761−### MetaString {#type-ref-MetaString}
753+### MetaString {#type-metastring}
762
754
763Plain Lua string value (string)
755Plain Lua string value (string)
764
756
765−## Block {#type-ref-Block}
757+## Block {#type-block}
766
758
767−Object equality is determined via
759+Object equality is determined via [`pandoc.utils.equals`].
768−[`pandoc.utils.equals`](#utils-equals).
769
760
770−### BlockQuote {#type-ref-BlockQuote}
761+### BlockQuote {#type-blockquote}
771
762
772A block quote element
763A block quote element
773
764
774content:
765content:
775−: block content ([List](#module-pandoc.list) of
766+: block content ([List] of [Blocks])
776− [Block](#type-ref-Block)s)
777
767
778`tag`, `t`
768`tag`, `t`
779: the literal `BlockQuote` (string)
769: the literal `BlockQuote` (string)
780
770
781−### BulletList {#type-ref-BulletList}
771+### BulletList {#type-bulletlist}
782
772
783A bullet list
773A bullet list
784
774
785`content`
775`content`
786−: list of items ([List](#module-pandoc.list) of
776+: list of items ([List] of [Blocks])
787− [Block](#type-ref-Block)s)
788
777
789`tag`, `t`
778`tag`, `t`
790: the literal `BulletList` (string)
779: the literal `BulletList` (string)
791
780
792−### CodeBlock {#type-ref-CodeBlock}
781+### CodeBlock {#type-codeblock}
793
782
794Block of code.
783Block of code.
795
784
@@ -797,23 +786,21 @@ Block of code.
797: code string (string)
786: code string (string)
798
787
799`attr`
788`attr`
800−: element attributes ([Attr](#type-ref-Attr))
789+: element attributes ([Attr])
801
790
802`identifier`
791`identifier`
803: alias for `attr.identifier` (string)
792: alias for `attr.identifier` (string)
804
793
805`classes`
794`classes`
806−: alias for `attr.classes` ([List](#module-pandoc.list) of
795+: alias for `attr.classes` ([List] of strings)
807− strings)
808
796
809`attributes`
797`attributes`
810−: alias for `attr.attributes`
798+: alias for `attr.attributes` ([Attributes])
811− ([Attributes](#type-ref-Attributes))
812
799
813`tag`, `t`
800`tag`, `t`
814: the literal `CodeBlock` (string)
801: the literal `CodeBlock` (string)
815
802
816−### DefinitionList {#type-ref-DefinitionList}
803+### DefinitionList {#type-definitionlist}
817
804
818Definition list, containing terms and their explanation.
805Definition list, containing terms and their explanation.
819
806
@@ -823,32 +810,30 @@ Definition list, containing terms and their explanation.
823`tag`, `t`
810`tag`, `t`
824: the literal `DefinitionList` (string)
811: the literal `DefinitionList` (string)
825
812
826−### Div {#type-ref-Div}
813+### Div {#type-div}
827
814
828Generic block container with attributes
815Generic block container with attributes
829
816
830`content`
817`content`
831−: block content ([List](#module-pandoc.list) of
818+: block content ([List] of [Blocks])
832− [Block](#type-ref-Block)s)
833
819
834`attr`
820`attr`
835−: element attributes ([Attr](#type-ref-Attr))
821+: element attributes ([Attr])
836
822
837`identifier`
823`identifier`
838: alias for `attr.identifier` (string)
824: alias for `attr.identifier` (string)
839
825
840`classes`
826`classes`
841−: alias for `attr.classes` ([List](#module-pandoc.list) of
827+: alias for `attr.classes` ([List] of
842 strings)
828 strings)
843
829
844`attributes`
830`attributes`
845−: alias for `attr.attributes`
831+: alias for `attr.attributes` ([Attributes])
846− ([Attributes](#type-ref-Attributes))
847
832
848`tag`, `t`
833`tag`, `t`
849: the literal `Div` (string)
834: the literal `Div` (string)
850
835
851−### Header {#type-ref-Header}
836+### Header {#type-header}
852
837
853Creates a header element.
838Creates a header element.
854
839
@@ -856,34 +841,32 @@ Creates a header element.
856: header level (integer)
841: header level (integer)
857
842
858`content`
843`content`
859−: inline content ([List](#module-pandoc.list) of
844+: inline content ([List] of [Inlines])
860− [Inline](#type-ref-Inline)s)
861
845
862`attr`
846`attr`
863−: element attributes ([Attr](#type-ref-Attr))
847+: element attributes ([Attr])
864
848
865`identifier`
849`identifier`
866: alias for `attr.identifier` (string)
850: alias for `attr.identifier` (string)
867
851
868`classes`
852`classes`
869−: alias for `attr.classes` ([List](#module-pandoc.list) of
853+: alias for `attr.classes` ([List] of strings)
870− strings)
871
854
872`attributes`
855`attributes`
873: alias for `attr.attributes`
856: alias for `attr.attributes`
874− ([Attributes](#type-ref-Attributes))
857+ ([Attributes])
875
858
876`tag`, `t`
859`tag`, `t`
877: the literal `Header` (string)
860: the literal `Header` (string)
878
861
879−### HorizontalRule {#type-ref-HorizontalRule}
862+### HorizontalRule {#type-horizontalrule}
880
863
881A horizontal rule.
864A horizontal rule.
882
865
883`tag`, `t`
866`tag`, `t`
884: the literal `HorizontalRule` (string)
867: the literal `HorizontalRule` (string)
885
868
886−### LineBlock {#type-ref-LineBlock}
869+### LineBlock {#type-lineblock}
887
870
888A line block, i.e. a list of lines, each separated from the next
871A line block, i.e. a list of lines, each separated from the next
889by a newline.
872by a newline.
@@ -894,7 +877,7 @@ by a newline.
894`tag`, `t`
877`tag`, `t`
895: the literal `LineBlock` (string)
878: the literal `LineBlock` (string)
896
879
897−### Null {#type-ref-Null}
880+### Null {#type-null}
898
881
899A null element; this element never produces any output in the
882A null element; this element never produces any output in the
900target format.
883target format.
@@ -902,16 +885,15 @@ target format.
902`tag`, `t`
885`tag`, `t`
903: the literal `Null` (string)
886: the literal `Null` (string)
904
887
905−### OrderedList {#type-ref-OrderedList}
888+### OrderedList {#type-orderedlist}
906
889
907An ordered list.
890An ordered list.
908
891
909`content`
892`content`
910−: list items ([List](#module-pandoc.list) of
893+: list items ([List] of [List] of [Blocks])
911− [Block](#type-ref-Block)s)
912
894
913`listAttributes`
895`listAttributes`
914−: list parameters ([ListAttributes](#ListAttributes))
896+: list parameters ([ListAttributes])
915
897
916`start`
898`start`
917: alias for `listAttributes.start` (integer)
899: alias for `listAttributes.start` (integer)
@@ -925,29 +907,27 @@ An ordered list.
925`tag`, `t`
907`tag`, `t`
926: the literal `OrderedList` (string)
908: the literal `OrderedList` (string)
927
909
928−### Para {#type-ref-Para}
910+### Para {#type-para}
929
911
930A paragraph
912A paragraph
931
913
932`content`
914`content`
933−: inline content ([List](#module-pandoc.list) of
915+: inline content ([List] of [Inlines])
934− [Inline](#type-ref-Inline)s)
935
916
936`tag`, `t`
917`tag`, `t`
937: the literal `Para` (string)
918: the literal `Para` (string)
938
919
939−### Plain {#type-ref-Plain}
920+### Plain {#type-plain}
940
921
941Plain text, not a paragraph
922Plain text, not a paragraph
942
923
943`content`
924`content`
944−: inline content ([List](#module-pandoc.list) of
925+: inline content ([List] of [Inlines])
945− [Inline](#type-ref-Inline)s)
946
926
947`tag`, `t`
927`tag`, `t`
948: the literal `Plain` (string)
928: the literal `Plain` (string)
949
929
950−### RawBlock {#type-ref-RawBlock}
930+### RawBlock {#type-rawblock}
951
931
952Raw content of a specified format.
932Raw content of a specified format.
953
933
@@ -960,62 +940,56 @@ Raw content of a specified format.
960`tag`, `t`
940`tag`, `t`
961: the literal `RawBlock` (string)
941: the literal `RawBlock` (string)
962
942
963−### Table {#type-ref-Table}
943+### Table {#type-table}
964
944
965A table.
945A table.
966
946
967`caption`
947`caption`
968−: table caption ([List](#module-pandoc.list) of
948+: table caption ([List] of [Inlines])
969− [Inline](#type-ref-Inline)s)
970
949
971`aligns`
950`aligns`
972−: column alignments ([List](#module-pandoc.list) of
951+: column alignments ([List] of [Alignment]s)
973− [Alignment](#type-ref-Alignment)s)
974
952
975`widths`
953`widths`
976: column widths (number)
954: column widths (number)
977
955
978`headers`
956`headers`
979−: header row ([List](#module-pandoc.list) of [table
980− cells](#type-ref-table-cell))
957+: header row ([List] of [table cells](#type-table-cell))
981
958
982`rows`
959`rows`
983−: table rows ([List](#module-pandoc.list) of
960+: table rows ([List] of [List]s of [table
984− [List](#module-pandoc.list)s of [table
985− cells](#type-ref-table-cell))
961+ cells](#type-table-cell))
986
962
987`tag`, `t`
963`tag`, `t`
988: the literal `Table` (string)
964: the literal `Table` (string)
989
965
990−A [table cell]{#table-cell} is a list of blocks.
966+A [table cell]{#type-table-cell} is a list of blocks.
991
967
992−*[Alignment]{#Alignment}* is a string value indicating the
968+*[Alignment]{#type-alignment}* is a string value indicating the
993horizontal alignment of a table column. `AlignLeft`,
969horizontal alignment of a table column. `AlignLeft`,
994`AlignRight`, and `AlignCenter` leads cell content tob be
970`AlignRight`, and `AlignCenter` leads cell content tob be
995left-aligned, right-aligned, and centered, respectively. The
971left-aligned, right-aligned, and centered, respectively. The
996default alignment is `AlignDefault` (often equivalent to
972default alignment is `AlignDefault` (often equivalent to
997centered).
973centered).
998
974
999−## Inline {#type-ref-Inline}
975+## Inline {#type-inline}
1000
976
1001−Object equality is determined via
977+Object equality is determined via [`pandoc.utils.equals`].
1002−[`pandoc.utils.equals`](#utils-equals).
1003
978
1004−### Cite {#type-ref-Cite}
979+### Cite {#type-cite}
1005
980
1006Citation
981Citation
1007
982
1008`content`
983`content`
1009−: ([List](#module-pandoc.list) of [Inline](#type-ref-Inline)s)
984+: ([List] of [Inlines])
1010
985
1011`citations`
986`citations`
1012−: citation entries ([List](#module-pandoc.list) of
987+: citation entries ([List] of [Citations])
1013− [citations](#type-ref-Citation))
1014
988
1015`tag`, `t`
989`tag`, `t`
1016: the literal `Cite` (string)
990: the literal `Cite` (string)
1017
991
1018−### Code {#type-ref-Code}
992+### Code {#type-code}
1019
993
1020Inline code
994Inline code
1021
995
@@ -1023,43 +997,39 @@ Inline code
1023: code string (string)
997: code string (string)
1024
998
1025`attr`
999`attr`
1026−: attributes ([Attr](#type-ref-Attr))
1000+: attributes ([Attr])
1027
1001
1028`identifier`
1002`identifier`
1029: alias for `attr.identifier` (string)
1003: alias for `attr.identifier` (string)
1030
1004
1031`classes`
1005`classes`
1032−: alias for `attr.classes` ([List](#module-pandoc.list) of
1006+: alias for `attr.classes` ([List] of strings)
1033− strings)
1034
1007
1035`attributes`
1008`attributes`
1036−: alias for `attr.attributes`
1009+: alias for `attr.attributes` ([Attributes])
1037− ([Attributes](#type-ref-Attributes))
1038
1010
1039`tag`, `t`
1011`tag`, `t`
1040: the literal `Code` (string)
1012: the literal `Code` (string)
1041
1013
1042−### Emph {#type-ref-Emph}
1014+### Emph {#type-emph}
1043
1015
1044Emphasized text
1016Emphasized text
1045
1017
1046`content`
1018`content`
1047−: inline content ([List](#module-pandoc.list) of
1019+: inline content ([List] of [Inlines])
1048− [Inline](#type-ref-Inline)s)
1049
1020
1050`tag`, `t`
1021`tag`, `t`
1051: the literal `Emph` (string)
1022: the literal `Emph` (string)
1052
1023
1053−### Image {#type-ref-Image}
1024+### Image {#type-image}
1054
1025
1055Image: alt text (list of inlines), target
1026Image: alt text (list of inlines), target
1056
1027
1057`attr`
1028`attr`
1058−: attributes ([Attr](#type-ref-Attr))
1029+: attributes ([Attr])
1059
1030
1060`caption`
1031`caption`
1061−: text used to describe the image ([List](#module-pandoc.list)
1032+: text used to describe the image ([List] of [Inlines])
1062− of [Inline](#type-ref-Inline)s)
1063
1033
1064`src`
1034`src`
1065: path to the image file (string)
1035: path to the image file (string)
@@ -1071,33 +1041,30 @@ Image: alt text (list of inlines), target
1071: alias for `attr.identifier` (string)
1041: alias for `attr.identifier` (string)
1072
1042
1073`classes`
1043`classes`
1074−: alias for `attr.classes` ([List](#module-pandoc.list) of
1044+: alias for `attr.classes` ([List] of strings)
1075− strings)
1076
1045
1077`attributes`
1046`attributes`
1078−: alias for `attr.attributes`
1047+: alias for `attr.attributes` ([Attributes])
1079− ([Attributes](#type-ref-Attributes))
1080
1048
1081`tag`, `t`
1049`tag`, `t`
1082: the literal `Image` (string)
1050: the literal `Image` (string)
1083
1051
1084−### LineBreak {#type-ref-LineBreak}
1052+### LineBreak {#type-linebreak}
1085
1053
1086Hard line break
1054Hard line break
1087
1055
1088`tag`, `t`
1056`tag`, `t`
1089: the literal `LineBreak` (string)
1057: the literal `LineBreak` (string)
1090
1058
1091−### Link {#type-ref-Link}
1059+### Link {#type-link}
1092
1060
1093Hyperlink: alt text (list of inlines), target
1061Hyperlink: alt text (list of inlines), target
1094
1062
1095`attr`
1063`attr`
1096−: attributes ([Attr](#type-ref-Attr))
1064+: attributes ([Attr])
1097
1065
1098`content`
1066`content`
1099−: text for this link ([List](#module-pandoc.list) of
1067+: text for this link ([List] of [Inlines])
1100− [Inline](#type-ref-Inline)s)
1101
1068
1102`target`
1069`target`
1103: the link target (string)
1070: the link target (string)
@@ -1106,17 +1073,15 @@ Hyperlink: alt text (list of inlines), target
1106: alias for `attr.identifier` (string)
1073: alias for `attr.identifier` (string)
1107
1074
1108`classes`
1075`classes`
1109−: alias for `attr.classes` ([List](#module-pandoc.list) of
1076+: alias for `attr.classes` ([List] of strings)
1110− strings)
1111
1077
1112`attributes`
1078`attributes`
1113−: alias for `attr.attributes`
1079+: alias for `attr.attributes` ([Attributes])
1114− ([Attributes](#type-ref-Attributes))
1115
1080
1116`tag`, `t`
1081`tag`, `t`
1117: the literal `Link` (string)
1082: the literal `Link` (string)
1118
1083
1119−### Math {#type-ref-Math}
1084+### Math {#type-math}
1120
1085
1121TeX math (literal)
1086TeX math (literal)
1122
1087
@@ -1131,17 +1096,17 @@ TeX math (literal)
1131`tag`, `t`
1096`tag`, `t`
1132: the literal `Math` (string)
1097: the literal `Math` (string)
1133
1098
1134−### Note {#type-ref-Note}
1099+### Note {#type-note}
1135
1100
1136Footnote or endnote
1101Footnote or endnote
1137
1102
1138`content`
1103`content`
1139−: ([List](#module-pandoc.list) of [Block](#type-ref-Block)s)
1104+: ([List] of [Blocks])
1140
1105
1141`tag`, `t`
1106`tag`, `t`
1142: the literal `Note` (string)
1107: the literal `Note` (string)
1143
1108
1144−### Quoted {#type-ref-Quoted}
1109+### Quoted {#type-quoted}
1145
1110
1146Quoted text
1111Quoted text
1147
1112
@@ -1150,13 +1115,12 @@ Quoted text
1150 `DoubleQuote` (string)
1115 `DoubleQuote` (string)
1151
1116
1152`content`
1117`content`
1153−: quoted text ([List](#module-pandoc.list) of
1118+: quoted text ([List] of [Inlines])
1154− [Inline](#type-ref-Inline)s)
1155
1119
1156`tag`, `t`
1120`tag`, `t`
1157: the literal `Quoted` (string)
1121: the literal `Quoted` (string)
1158
1122
1159−### RawInline {#type-ref-RawInline}
1123+### RawInline {#type-rawinline}
1160
1124
1161Raw inline
1125Raw inline
1162
1126
@@ -1169,56 +1133,53 @@ Raw inline
1169`tag`, `t`
1133`tag`, `t`
1170: the literal `RawInline` (string)
1134: the literal `RawInline` (string)
1171
1135
1172−### SmallCaps {#type-ref-SmallCaps}
1136+### SmallCaps {#type-smallcaps}
1173
1137
1174Small caps text
1138Small caps text
1175
1139
1176`content`
1140`content`
1177−: ([List](#module-pandoc.list) of [Inline](#type-ref-Inline)s)
1141+: ([List] of [Inlines])
1178
1142
1179`tag`, `t`
1143`tag`, `t`
1180: the literal `SmallCaps` (string)
1144: the literal `SmallCaps` (string)
1181
1145
1182−### SoftBreak {#type-ref-SoftBreak}
1146+### SoftBreak {#type-softbreak}
1183
1147
1184Soft line break
1148Soft line break
1185
1149
1186`tag`, `t`
1150`tag`, `t`
1187: the literal `SoftBreak` (string)
1151: the literal `SoftBreak` (string)
1188
1152
1189−### Space {#type-ref-Space}
1153+### Space {#type-space}
1190
1154
1191Inter-word space
1155Inter-word space
1192
1156
1193`tag`, `t`
1157`tag`, `t`
1194: the literal `Space` (string)
1158: the literal `Space` (string)
1195
1159
1196−### Span {#type-ref-Span}
1160+### Span {#type-span}
1197
1161
1198Generic inline container with attributes
1162Generic inline container with attributes
1199
1163
1200`attr`
1164`attr`
1201−: attributes ([Attr](#type-ref-Attr))
1165+: attributes ([Attr])
1202
1166
1203`content`
1167`content`
1204−: wrapped content ([List](#module-pandoc.list) of
1168+: wrapped content ([List] of [Inlines])
1205− [Inline](#type-ref-Inline)s)
1206
1169
1207`identifier`
1170`identifier`
1208: alias for `attr.identifier` (string)
1171: alias for `attr.identifier` (string)
1209
1172
1210`classes`
1173`classes`
1211−: alias for `attr.classes` ([List](#module-pandoc.list) of
1174+: alias for `attr.classes` ([List] of strings)
1212− strings)
1213
1175
1214`attributes`
1176`attributes`
1215−: alias for `attr.attributes`
1177+: alias for `attr.attributes` ([Attributes])
1216− ([Attributes](#type-ref-Attributes))
1217
1178
1218`tag`, `t`
1179`tag`, `t`
1219: the literal `Span` (string)
1180: the literal `Span` (string)
1220
1181
1221−### Str {#type-ref-Str}
1182+### Str {#type-str}
1222
1183
1223Text
1184Text
1224
1185
@@ -1228,60 +1189,56 @@ Text
1228`tag`, `t`
1189`tag`, `t`
1229: the literal `Str` (string)
1190: the literal `Str` (string)
1230
1191
1231−### Strikeout {#type-ref-Strikeout}
1192+### Strikeout {#type-strikeout}
1232
1193
1233Strikeout text
1194Strikeout text
1234
1195
1235`content`
1196`content`
1236−: inline content ([List](#module-pandoc.list) of
1197+: inline content ([List] of [Inlines])
1237− [Inline](#type-ref-Inline)s)
1238
1198
1239`tag`, `t`
1199`tag`, `t`
1240: the literal `Strikeout` (string)
1200: the literal `Strikeout` (string)
1241
1201
1242−### Strong {#type-ref-Strong}
1202+### Strong {#type-strong}
1243
1203
1244Strongly emphasized text
1204Strongly emphasized text
1245
1205
1246`content`
1206`content`
1247−: inline content ([List](#module-pandoc.list) of
1207+: inline content ([List] of [Inlines])
1248− [Inline](#type-ref-Inline)s)
1249
1208
1250`tag`, `t`
1209`tag`, `t`
1251: the literal `Strong` (string)
1210: the literal `Strong` (string)
1252
1211
1253−### Subscript {#type-ref-Subscript}
1212+### Subscript {#type-subscript}
1254
1213
1255Subscripted text
1214Subscripted text
1256
1215
1257`content`
1216`content`
1258−: inline content ([List](#module-pandoc.list) of
1217+: inline content ([List] of [Inlines])
1259− [Inline](#type-ref-Inline)s)
1260
1218
1261`tag`, `t`
1219`tag`, `t`
1262: the literal `Subscript` (string)
1220: the literal `Subscript` (string)
1263
1221
1264−### Superscript {#type-ref-Superscript}
1222+### Superscript {#type-superscript}
1265
1223
1266Superscripted text
1224Superscripted text
1267
1225
1268`content`
1226`content`
1269−: inline content ([List](#module-pandoc.list) of
1227+: inline content ([List] of [Inlines])
1270− [Inline](#type-ref-Inline)s)
1271
1228
1272`tag`, `t`
1229`tag`, `t`
1273: the literal `Superscript` (string)
1230: the literal `Superscript` (string)
1274
1231
1275## Element components
1232## Element components
1276
1233
1277−### Attr {#type-ref-Attr}
1234+### Attr {#type-attr}
1278
1235
1279A set of element attributes. Values of this type can be created
1236A set of element attributes. Values of this type can be created
1280−with the [`pandoc.Attr`](#Attr) constructor. For convenience, it
1237+with the [`pandoc.Attr`](#pandoc.attr) constructor. For
1281−is usually not necessary to construct the value directly if it is
1238+convenience, it is usually not necessary to construct the value
1282−part of an element, and it is sufficient to pass an HTML-like
1239+directly if it is part of an element, and it is sufficient to
1283−table. E.g., to create a span with identifier "text" and classes
1240+pass an HTML-like table. E.g., to create a span with identifier
1284−"a" and "b", on can write:
1241+"text" and classes "a" and "b", on can write:
1285
1242
1286 local span = pandoc.Span('text', {id = 'text', class = 'a b'})
1243 local span = pandoc.Span('text', {id = 'text', class = 'a b'})
1287
1244
@@ -1290,30 +1247,27 @@ This also works when using the `attr` setter:
1290 local span = pandoc.Span 'text'
1247 local span = pandoc.Span 'text'
1291 span.attr = {id = 'text', class = 'a b', other_attribute = '1'}
1248 span.attr = {id = 'text', class = 'a b', other_attribute = '1'}
1292
1249
1293−Object equality is determined via
1250+Object equality is determined via [`pandoc.utils.equals`].
1294−[`pandoc.utils.equals`](#utils-equals).
1295
1251
1296`identifier`
1252`identifier`
1297: element identifier (string)
1253: element identifier (string)
1298
1254
1299`classes`
1255`classes`
1300−: element classes ([List](#module-pandoc.list) of strings)
1256+: element classes ([List] of strings)
1301
1257
1302`attributes`
1258`attributes`
1303−: collection of key/value pairs
1259+: collection of key/value pairs ([Attributes])
1304− ([Attributes](#type-ref-Attributes))
1305
1260
1306−### Attributes {#type-ref-Attributes}
1261+### Attributes {#type-attributes}
1307
1262
1308List of key/value pairs. Values can be accessed by using keys as
1263List of key/value pairs. Values can be accessed by using keys as
1309indices to the list table.
1264indices to the list table.
1310
1265
1311−### Citation {#type-ref-Citation}
1266+### Citation {#type-citation}
1312
1267
1313Single citation entry
1268Single citation entry
1314
1269
1315−Object equality is determined via
1270+Object equality is determined via [`pandoc.utils.equals`].
1316−[`pandoc.utils.equals`](#utils-equals).
1317
1271
1318`id`
1272`id`
1319: citation identifier, e.g., a bibtex key (string)
1273: citation identifier, e.g., a bibtex key (string)
@@ -1323,12 +1277,10 @@ Object equality is determined via
1323 `NormalCitation` (string)
1277 `NormalCitation` (string)
1324
1278
1325`prefix`
1279`prefix`
1326−: citation prefix ([List](#module-pandoc.list) of
1280+: citation prefix ([List] of [Inlines])
1327− [Inline](#type-ref-Inline)s)
1328
1281
1329`suffix`
1282`suffix`
1330−: citation suffix ([List](#module-pandoc.list) of
1283+: citation suffix ([List] of [Inlines])
1331− [Inline](#type-ref-Inline)s)
1332
1284
1333`note_num`
1285`note_num`
1334: note number (integer)
1286: note number (integer)
@@ -1336,12 +1288,11 @@ Object equality is determined via
1336`hash`
1288`hash`
1337: hash (integer)
1289: hash (integer)
1338
1290
1339−### ListAttributes {#type-ref-ListAttributes}
1291+### ListAttributes {#type-listattributes}
1340
1292
1341List attributes
1293List attributes
1342
1294
1343−Object equality is determined via
1295+Object equality is determined via [`pandoc.utils.equals`].
1344−[`pandoc.utils.equals`](#utils-equals).
1345
1296
1346`start`
1297`start`
1347: number of the first list item (integer)
1298: number of the first list item (integer)
@@ -1355,7 +1306,7 @@ Object equality is determined via
1355: delimiter of list numbers; one of `DefaultDelim`, `Period`,
1306: delimiter of list numbers; one of `DefaultDelim`, `Period`,
1356 `OneParen`, and `TwoParens` (string)
1307 `OneParen`, and `TwoParens` (string)
1357
1308
1358−## ReaderOptions {#type-ref-ReaderOptions}
1309+## ReaderOptions {#type-readeroptions}
1359
1310
1360Pandoc reader options
1311Pandoc reader options
1361
1312
@@ -1391,22 +1342,21 @@ Pandoc reader options
1391: track changes setting for docx; one of `AcceptChanges`,
1342: track changes setting for docx; one of `AcceptChanges`,
1392 `RejectChanges`, and `AllChanges` (string)
1343 `RejectChanges`, and `AllChanges` (string)
1393
1344
1394−## CommonState {#type-ref-CommonState}
1345+## CommonState {#type-commonstate}
1395
1346
1396The state used by pandoc to collect information and make it
1347The state used by pandoc to collect information and make it
1397available to readers and writers.
1348available to readers and writers.
1398
1349
1399`input_files`
1350`input_files`
1400: List of input files from command line
1351: List of input files from command line
1401− ([List](#module-pandoc.list) of strings)
1352+ ([List] of strings)
1402
1353
1403`output_file`
1354`output_file`
1404: Output file from command line (string or nil)
1355: Output file from command line (string or nil)
1405
1356
1406`log`
1357`log`
1407−: A list of log messages in reverse order
1358+: A list of log messages in reverse order ([List] of
1408− ([List](#module-pandoc.list) of
1409− [LogMessage](#type-ref-LogMessage)s)
1359+ [LogMessage]s)
1410
1360
1411`request_headers`
1361`request_headers`
1412: Headers to add for HTTP requests; table with header names as
1362: Headers to add for HTTP requests; table with header names as
@@ -1414,7 +1364,7 @@ available to readers and writers.
1414
1364
1415`resource_path`
1365`resource_path`
1416: Path to search for resources like included images
1366: Path to search for resources like included images
1417− ([List](#module-pandoc.list) of strings)
1367+ ([List] of strings)
1418
1368
1419`source_url`
1369`source_url`
1420: Absolute URL or directory of first source file (string or
1370: Absolute URL or directory of first source file (string or
@@ -1429,12 +1379,23 @@ available to readers and writers.
1429`verbosity`
1379`verbosity`
1430: Verbosity level; one of `INFO`, `WARNING`, `ERROR` (string)
1380: Verbosity level; one of `INFO`, `WARNING`, `ERROR` (string)
1431
1381
1432−## LogMessage {#type-ref-LogMessage}
1382+## List {#type-list}
1383+
1384+A list is any Lua table with integer indices. Indices start at
1385+one, so if `alist = {'value'}` then `alist[1] == 'value'`.
1386+
1387+Lists, when part of an element, or when generated during
1388+marshalling, are made instances of the `pandoc.List` type for
1389+convenience. The `pandoc.List` type is defined in the
1390+[*pandoc.List*](#module-pandoc.list) module. See there for
1391+available methods.
1433
1392
1393+## LogMessage {#type-logmessage}
1394+
1434−A pandoc log message. Object have no fields, but can be
1395+A pandoc log message. Objects have no fields, but can be
1435converted to a string via `tostring`.
1396converted to a string via `tostring`.
1436
1397
1437−## Version {#type-ref-Version}
1398+## Version {#type-version}
1438
1399
1439A version object. This represents a software version like
1400A version object. This represents a software version like
1440"2.7.3". The object behaves like a numerically indexed table,
1401"2.7.3". The object behaves like a numerically indexed table,
@@ -1460,10 +1421,10 @@ than the expected version.
1460Parameters:
1421Parameters:
1461
1422
1462`actual`
1423`actual`
1463−: actual version specifier ([Version](#type-ref-Version))
1424+: actual version specifier ([Version])
1464
1425
1465`expected`
1426`expected`
1466−: minimum expected version ([Version](#type-ref-Version))
1427+: minimum expected version ([Version])
1467
1428
1468`error_message`
1429`error_message`
1469: optional error message template. The string is used as
1430: optional error message template. The string is used as
@@ -1479,6 +1440,26 @@ Usage:
1479 'pandoc-types is too old: expected version %s, got %s'
1440 'pandoc-types is too old: expected version %s, got %s'
1480 )
1441 )
1481
1442
1443+[Alignment]: #type-alignment
1444+[Attr]: #type-attr
1445+[Attributes]: #type-attributes
1446+[Block]: #type-block
1447+[Blocks]: #type-block
1448+[Citation]: #type-citation
1449+[Citations]: #type-citation
1450+[CommonState]: #type-commonstate
1451+[Inline]: #type-inline
1452+[Inlines]: #type-inline
1453+[List]: #type-list
1454+[ListAttributes]: #type-listattributes
1455+[Meta]: #type-meta
1456+[MetaValue]: #type-metavalue
1457+[MetaValues]: #type-metavalue
1458+[LogMessage]: #type-logmessage
1459+[Pandoc]: #type-pandoc
1460+[Version]: #type-version
1461+[`pandoc.utils.equals`]: #pandoc.utils.equals
1462+
1482# Module text
1463# Module text
1483
1464
1484UTF-8 aware text manipulation functions, implemented in Haskell.
1465UTF-8 aware text manipulation functions, implemented in Haskell.
@@ -1494,31 +1475,31 @@ function Str (s)
1494end
1475end
1495```
1476```
1496
1477
1497−### lower {#text-lower}
1478+### lower {#text.lower}
1498
1479
1499`lower (s)`
1480`lower (s)`
1500
1481
1501Returns a copy of a UTF-8 string, converted to lowercase.
1482Returns a copy of a UTF-8 string, converted to lowercase.
1502
1483
1503−### upper {#text-upper}
1484+### upper {#text.upper}
1504
1485
1505`upper (s)`
1486`upper (s)`
1506
1487
1507Returns a copy of a UTF-8 string, converted to uppercase.
1488Returns a copy of a UTF-8 string, converted to uppercase.
1508
1489
1509−### reverse {#text-reverse}
1490+### reverse {#text.reverse}
1510
1491
1511`reverse (s)`
1492`reverse (s)`
1512
1493
1513Returns a copy of a UTF-8 string, with characters reversed.
1494Returns a copy of a UTF-8 string, with characters reversed.
1514
1495
1515−### len {#text-len}
1496+### len {#text.len}
1516
1497
1517`len (s)`
1498`len (s)`
1518
1499
1519Returns the length of a UTF-8 string.
1500Returns the length of a UTF-8 string.
1520
1501
1521−### sub {#text-sub}
1502+### sub {#text.sub}
1522
1503
1523`sub (s)`
1504`sub (s)`
1524
1505
@@ -1527,11 +1508,13 @@ indexing rules.
1527
1508
1528# Module pandoc
1509# Module pandoc
1529
1510
1530−Lua functions for pandoc scripts.
1511+Lua functions for pandoc scripts; includes constructors for
1512+document tree elements, functions to parse text in a given
1513+format, and functions to filter and modify a subtree.
1531
1514
1532−## Pandoc Document
1515+## Pandoc
1533
1516
1534−[`Pandoc (blocks[, meta])`]{#Pandoc}
1517+[`Pandoc (blocks[, meta])`]{#pandoc.pandoc}
1535
1518
1536: A complete pandoc document
1519: A complete pandoc document
1537
1520
@@ -1543,9 +1526,9 @@ Lua functions for pandoc scripts.
1543 `meta`:
1526 `meta`:
1544 : document meta data
1527 : document meta data
1545
1528
1546−## Meta {#meta}
1529+## Meta
1547
1530
1548−[`Meta (table)`]{#Meta}
1531+[`Meta (table)`]{#pando.meta}
1549
1532
1550: Create a new Meta object.
1533: Create a new Meta object.
1551
1534
@@ -1554,9 +1537,9 @@ Lua functions for pandoc scripts.
1554 `table`:
1537 `table`:
1555 : table containing document meta information
1538 : table containing document meta information
1556
1539
1557−## MetaValue {#metavalue}
1540+## MetaValue
1558
1541
1559−[`MetaBlocks (blocks)`]{#MetaBlocks}
1542+[`MetaBlocks (blocks)`]{#pandoc.metablocks}
1560
1543
1561: Meta blocks
1544: Meta blocks
1562
1545
@@ -1565,7 +1548,7 @@ Lua functions for pandoc scripts.
1565 `blocks`:
1548 `blocks`:
1566 : blocks
1549 : blocks
1567
1550
1568−[`MetaInlines (inlines)`]{#MetaInlines}
1551+[`MetaInlines (inlines)`]{#pandoc.metainlines}
1569
1552
1570: Meta inlines
1553: Meta inlines
1571
1554
@@ -1574,7 +1557,7 @@ Lua functions for pandoc scripts.
1574 `inlines`:
1557 `inlines`:
1575 : inlines
1558 : inlines
1576
1559
1577−[`MetaList (meta_values)`]{#MetaList}
1560+[`MetaList (meta_values)`]{#pandoc.metalist}
1578
1561
1579: Meta list
1562: Meta list
1580
1563
@@ -1583,7 +1566,7 @@ Lua functions for pandoc scripts.
1583 `meta_values`:
1566 `meta_values`:
1584 : list of meta values
1567 : list of meta values
1585
1568
1586−[`MetaMap (key_value_map)`]{#MetaMap}
1569+[`MetaMap (key_value_map)`]{#pandoc.metamap}
1587
1570
1588: Meta map
1571: Meta map
1589
1572
@@ -1592,7 +1575,7 @@ Lua functions for pandoc scripts.
1592 `key_value_map`:
1575 `key_value_map`:
1593 : a string-indexed map of meta values
1576 : a string-indexed map of meta values
1594
1577
1595−[`MetaString (str)`]{#MetaString}
1578+[`MetaString (str)`]{#pandoc.metastring}
1596
1579
1597: Creates string to be used in meta data.
1580: Creates string to be used in meta data.
1598
1581
@@ -1601,7 +1584,7 @@ Lua functions for pandoc scripts.
1601 `str`:
1584 `str`:
1602 : string value
1585 : string value
1603
1586
1604−[`MetaBool (bool)`]{#MetaBool}
1587+[`MetaBool (bool)`]{#pandoc.metabool}
1605
1588
1606: Creates boolean to be used in meta data.
1589: Creates boolean to be used in meta data.
1607
1590
@@ -1612,11 +1595,7 @@ Lua functions for pandoc scripts.
1612
1595
1613## Blocks
1596## Blocks
1614
1597
1615−[`Block`]{#Block}
1616−
1617−: Block elements
1618−
1619−[`BlockQuote (content)`]{#BlockQuote}
1598+[`BlockQuote (content)`]{#pandoc.blockquote}
1620
1599
1621: Creates a block quote element
1600: Creates a block quote element
1622
1601
@@ -1627,7 +1606,7 @@ Lua functions for pandoc scripts.
1627
1606
1628 Returns: block quote element
1607 Returns: block quote element
1629
1608
1630−[`BulletList (content)`]{#BulletList}
1609+[`BulletList (content)`]{#pandoc.bulletlist}
1631
1610
1632: Creates a bullet (i.e.
1611: Creates a bullet (i.e.
1633
1612
@@ -1638,7 +1617,7 @@ Lua functions for pandoc scripts.
1638
1617
1639 Returns: bullet list element
1618 Returns: bullet list element
1640
1619
1641−[`CodeBlock (text[, attr])`]{#CodeBlock}
1620+[`CodeBlock (text[, attr])`]{#pandoc.codeblock}
1642
1621
1643: Creates a code block element
1622: Creates a code block element
1644
1623
@@ -1652,7 +1631,7 @@ Lua functions for pandoc scripts.
1652
1631
1653 Returns: code block element
1632 Returns: code block element
1654
1633
1655−[`DefinitionList (content)`]{#DefinitionList}
1634+[`DefinitionList (content)`]{#pandoc.definitionlist}
1656
1635
1657: Creates a definition list, containing terms and their
1636: Creates a definition list, containing terms and their
1658 explanation.
1637 explanation.
@@ -1664,7 +1643,7 @@ Lua functions for pandoc scripts.
1664
1643
1665 Returns: definition list element
1644 Returns: definition list element
1666
1645
1667−[`Div (content[, attr])`]{#Div}
1646+[`Div (content[, attr])`]{#pandoc.div}
1668
1647
1669: Creates a div element
1648: Creates a div element
1670
1649
@@ -1678,7 +1657,7 @@ Lua functions for pandoc scripts.
1678
1657
1679 Returns: div element
1658 Returns: div element
1680
1659
1681−[`Header (level, content[, attr])`]{#Header}
1660+[`Header (level, content[, attr])`]{#pandoc.header}
1682
1661
1683: Creates a header element.
1662: Creates a header element.
1684
1663
@@ -1695,13 +1674,13 @@ Lua functions for pandoc scripts.
1695
1674
1696 Returns: header element
1675 Returns: header element
1697
1676
1698−[`HorizontalRule ()`]{#HorizontalRule}
1677+[`HorizontalRule ()`]{#pandoc.horizontalrule}
1699
1678
1700: Creates a horizontal rule.
1679: Creates a horizontal rule.
1701
1680
1702 Returns: horizontal rule
1681 Returns: horizontal rule
1703
1682
1704−[`LineBlock (content)`]{#LineBlock}
1683+[`LineBlock (content)`]{#pandoc.lineblock}
1705
1684
1706: Creates a line block element.
1685: Creates a line block element.
1707
1686
@@ -1712,13 +1691,13 @@ Lua functions for pandoc scripts.
1712
1691
1713 Returns: line block element
1692 Returns: line block element
1714
1693
1715−[`Null ()`]{#Null}
1694+[`Null ()`]{#pandoc.null}
1716
1695
1717: Creates a null element.
1696: Creates a null element.
1718
1697
1719 Returns: null element
1698 Returns: null element
1720
1699
1721−[`OrderedList (items[, listAttributes])`]{#OrderedList}
1700+[`OrderedList (items[, listAttributes])`]{#pandoc.orderedlist}
1722
1701
1723: Creates an ordered list.
1702: Creates an ordered list.
1724
1703
@@ -1732,7 +1711,7 @@ Lua functions for pandoc scripts.
1732
1711
1733 Returns: ordered list element
1712 Returns: ordered list element
1734
1713
1735−[`Para (content)`]{#Para}
1714+[`Para (content)`]{#pandoc.para}
1736
1715
1737: Creates a para element.
1716: Creates a para element.
1738
1717
@@ -1743,7 +1722,7 @@ Lua functions for pandoc scripts.
1743
1722
1744 Returns: paragraph element
1723 Returns: paragraph element
1745
1724
1746−[`Plain (content)`]{#Plain}
1725+[`Plain (content)`]{#pandoc.plain}
1747
1726
1748: Creates a plain element.
1727: Creates a plain element.
1749
1728
@@ -1754,7 +1733,7 @@ Lua functions for pandoc scripts.
1754
1733
1755 Returns: plain element
1734 Returns: plain element
1756
1735
1757−[`RawBlock (format, text)`]{#RawBlock}
1736+[`RawBlock (format, text)`]{#pandoc.rawblock}
1758
1737
1759: Creates a raw content block of the specified format.
1738: Creates a raw content block of the specified format.
1760
1739
@@ -1768,7 +1747,7 @@ Lua functions for pandoc scripts.
1768
1747
1769 Returns: raw block element
1748 Returns: raw block element
1770
1749
1771−[`Table (caption, aligns, widths, headers, rows)`]{#Table}
1750+[`Table (caption, aligns, widths, headers, rows)`]{#pandoc.table}
1772
1751
1773: Creates a table element.
1752: Creates a table element.
1774
1753
@@ -1791,13 +1770,9 @@ Lua functions for pandoc scripts.
1791
1770
1792 Returns: table element
1771 Returns: table element
1793
1772
1794−## Inline {#inline}
1773+## Inline
1795−
1796−[`Inline`]{#Inline}
1797
1774
1798−: Inline element class
1799−
1800−[`Cite (content, citations)`]{#Cite}
1775+[`Cite (content, citations)`]{#pandoc.cite}
1801
1776
1802: Creates a Cite inline element
1777: Creates a Cite inline element
1803
1778
@@ -1811,7 +1786,7 @@ Lua functions for pandoc scripts.
1811
1786
1812 Returns: citations element
1787 Returns: citations element
1813
1788
1814−[`Code (text[, attr])`]{#Code}
1789+[`Code (text[, attr])`]{#pandoc.code}
1815
1790
1816: Creates a Code inline element
1791: Creates a Code inline element
1817
1792
@@ -1825,7 +1800,7 @@ Lua functions for pandoc scripts.
1825
1800
1826 Returns: code element
1801 Returns: code element
1827
1802
1828−[`Emph (content)`]{#Emph}
1803+[`Emph (content)`]{#pandoc.emph}
1829
1804
1830: Creates an inline element representing emphasised text.
1805: Creates an inline element representing emphasised text.
1831
1806
@@ -1836,7 +1811,7 @@ Lua functions for pandoc scripts.
1836
1811
1837 Returns: emphasis element
1812 Returns: emphasis element
1838
1813
1839−[`Image (caption, src[, title[, attr]])`]{#Image}
1814+[`Image (caption, src[, title[, attr]])`]{#pandoc.image}
1840
1815
1841: Creates a Image inline element
1816: Creates a Image inline element
1842
1817
@@ -1856,13 +1831,13 @@ Lua functions for pandoc scripts.
1856
1831
1857 Returns: image element
1832 Returns: image element
1858
1833
1859−[`LineBreak ()`]{#LineBreak}
1834+[`LineBreak ()`]{#pandoc.linebreak}
1860
1835
1861: Create a LineBreak inline element
1836: Create a LineBreak inline element
1862
1837
1863 Returns: linebreak element
1838 Returns: linebreak element
1864
1839
1865−[`Link (content, target[, title[, attr]])`]{#Link}
1840+[`Link (content, target[, title[, attr]])`]{#pandoc.link}
1866
1841
1867: Creates a link inline element, usually a hyperlink.
1842: Creates a link inline element, usually a hyperlink.
1868
1843
@@ -1882,7 +1857,7 @@ Lua functions for pandoc scripts.
1882
1857
1883 Returns: image element
1858 Returns: image element
1884
1859
1885−[`Math (mathtype, text)`]{#Math}
1860+[`Math (mathtype, text)`]{#pandoc.math}
1886
1861
1887: Creates a Math element, either inline or displayed.
1862: Creates a Math element, either inline or displayed.
1888
1863
@@ -1896,7 +1871,7 @@ Lua functions for pandoc scripts.
1896
1871
1897 Returns: Math element
1872 Returns: Math element
1898
1873
1899−[`DisplayMath (text)`]{#DisplayMath}
1874+[`DisplayMath (text)`]{#pandoc.displaymath}
1900
1875
1901: Creates a DisplayMath element (DEPRECATED).
1876: Creates a DisplayMath element (DEPRECATED).
1902
1877
@@ -1907,7 +1882,7 @@ Lua functions for pandoc scripts.
1907
1882
1908 Returns: Math element
1883 Returns: Math element
1909
1884
1910−[`InlineMath (text)`]{#InlineMath}
1885+[`InlineMath (text)`]{#pandoc.inlinemath}
1911
1886
1912: Creates an InlineMath inline element (DEPRECATED).
1887: Creates an InlineMath inline element (DEPRECATED).
1913
1888
@@ -1918,7 +1893,7 @@ Lua functions for pandoc scripts.
1918
1893
1919 Returns: Math element
1894 Returns: Math element
1920
1895
1921−[`Note (content)`]{#Note}
1896+[`Note (content)`]{#pandoc.note}
1922
1897
1923: Creates a Note inline element
1898: Creates a Note inline element
1924
1899
@@ -1927,7 +1902,7 @@ Lua functions for pandoc scripts.
1927 `content`:
1902 `content`:
1928 : footnote block content
1903 : footnote block content
1929
1904
1930−[`Quoted (quotetype, content)`]{#Quoted}
1905+[`Quoted (quotetype, content)`]{#pandoc.quoted}
1931
1906
1932: Creates a Quoted inline element given the quote type and
1907: Creates a Quoted inline element given the quote type and
1933 quoted content.
1908 quoted content.
@@ -1942,7 +1917,7 @@ Lua functions for pandoc scripts.
1942
1917
1943 Returns: quoted element
1918 Returns: quoted element
1944
1919
1945−[`SingleQuoted (content)`]{#SingleQuoted}
1920+[`SingleQuoted (content)`]{#pandoc.singlequoted}
1946
1921
1947: Creates a single-quoted inline element (DEPRECATED).
1922: Creates a single-quoted inline element (DEPRECATED).
1948
1923
@@ -1953,9 +1928,9 @@ Lua functions for pandoc scripts.
1953
1928
1954 Returns: quoted element
1929 Returns: quoted element
1955
1930
1956− See also: [Quoted](#Quoted)
1931+ See also: [Quoted](#type-quoted)
1957
1932
1958−[`DoubleQuoted (content)`]{#DoubleQuoted}
1933+[`DoubleQuoted (content)`]{#pandoc.doublequoted}
1959
1934
1960: Creates a single-quoted inline element (DEPRECATED).
1935: Creates a single-quoted inline element (DEPRECATED).
1961
1936
@@ -1966,9 +1941,9 @@ Lua functions for pandoc scripts.
1966
1941
1967 Returns: quoted element
1942 Returns: quoted element
1968
1943
1969− See also: [Quoted](#Quoted)
1944+ See also: [Quoted](#type-quoted)
1970
1945
1971−[`RawInline (format, text)`]{#RawInline}
1946+[`RawInline (format, text)`]{#pandoc.rawinline}
1972
1947
1973: Creates a RawInline inline element
1948: Creates a RawInline inline element
1974
1949
@@ -1982,7 +1957,7 @@ Lua functions for pandoc scripts.
1982
1957
1983 Returns: raw inline element
1958 Returns: raw inline element
1984
1959
1985−[`SmallCaps (content)`]{#SmallCaps}
1960+[`SmallCaps (content)`]{#pandoc.smallcaps}
1986
1961
1987: Creates text rendered in small caps
1962: Creates text rendered in small caps
1988
1963
@@ -1993,19 +1968,19 @@ Lua functions for pandoc scripts.
1993
1968
1994 Returns: smallcaps element
1969 Returns: smallcaps element
1995
1970
1996−[`SoftBreak ()`]{#SoftBreak}
1971+[`SoftBreak ()`]{#pandoc.softbreak}
1997
1972
1998: Creates a SoftBreak inline element.
1973: Creates a SoftBreak inline element.
1999
1974
2000 Returns: softbreak element
1975 Returns: softbreak element
2001
1976
2002−[`Space ()`]{#Space}
1977+[`Space ()`]{#pandoc.space}
2003
1978
2004: Create a Space inline element
1979: Create a Space inline element
2005
1980
2006 Returns: space element
1981 Returns: space element
2007
1982
2008−[`Span (content[, attr])`]{#Span}
1983+[`Span (content[, attr])`]{#pandoc.span}
2009
1984
2010: Creates a Span inline element
1985: Creates a Span inline element
2011
1986
@@ -2019,7 +1994,7 @@ Lua functions for pandoc scripts.
2019
1994
2020 Returns: span element
1995 Returns: span element
2021
1996
2022−[`Str (text)`]{#Str}
1997+[`Str (text)`]{#pandoc.str}
2023
1998
2024: Creates a Str inline element
1999: Creates a Str inline element
2025
2000
@@ -2030,7 +2005,7 @@ Lua functions for pandoc scripts.
2030
2005
2031 Returns: string element
2006 Returns: string element
2032
2007
2033−[`Strikeout (content)`]{#Strikeout}
2008+[`Strikeout (content)`]{#pandoc.strikeout}
2034
2009
2035: Creates text which is striked out.
2010: Creates text which is striked out.
2036
2011
@@ -2041,7 +2016,7 @@ Lua functions for pandoc scripts.
2041
2016
2042 Returns: strikeout element
2017 Returns: strikeout element
2043
2018
2044−[`Strong (content)`]{#Strong}
2019+[`Strong (content)`]{#pandoc.strong}
2045
2020
2046: Creates a Strong element, whose text is usually displayed in
2021: Creates a Strong element, whose text is usually displayed in
2047 a bold font.
2022 a bold font.
@@ -2053,7 +2028,7 @@ Lua functions for pandoc scripts.
2053
2028
2054 Returns: strong element
2029 Returns: strong element
2055
2030
2056−[`Subscript (content)`]{#Subscript}
2031+[`Subscript (content)`]{#pandoc.subscript}
2057
2032
2058: Creates a Subscript inline element
2033: Creates a Subscript inline element
2059
2034
@@ -2064,7 +2039,7 @@ Lua functions for pandoc scripts.
2064
2039
2065 Returns: subscript element
2040 Returns: subscript element
2066
2041
2067−[`Superscript (content)`]{#Superscript}
2042+[`Superscript (content)`]{#pandoc.superscript}
2068
2043
2069: Creates a Superscript inline element
2044: Creates a Superscript inline element
2070
2045
@@ -2075,9 +2050,9 @@ Lua functions for pandoc scripts.
2075
2050
2076 Returns: strong element
2051 Returns: strong element
2077
2052
2078−## Element components {#element-components-create}
2053+## Element components
2079
2054
2080−[`Attr ([identifier[, classes[, attributes]]])`]{#Attr}
2055+[`Attr ([identifier[, classes[, attributes]]])`]{#pandoc.attr}
2081
2056
2082: Create a new set of attributes (Attr).
2057: Create a new set of attributes (Attr).
2083
2058
@@ -2094,7 +2069,7 @@ Lua functions for pandoc scripts.
2094
2069
2095 Returns: element attributes
2070 Returns: element attributes
2096
2071
2097−[`Citation (id, mode[, prefix[, suffix[, note_num[, hash]]]])`]{#Citation}
2072+[`Citation (id, mode[, prefix[, suffix[, note_num[, hash]]]])`]{#pandoc.citation}
2098
2073
2099: Creates a single citation.
2074: Creates a single citation.
2100
2075
@@ -2118,7 +2093,7 @@ Lua functions for pandoc scripts.
2118 `hash`:
2093 `hash`:
2119 : hash number
2094 : hash number
2120
2095
2121−[`ListAttributes ([start[, style[, delimiter]]])`]{#ListAttributes}
2096+[`ListAttributes ([start[, style[, delimiter]]])`]{#pandoc.listattributes}
2122
2097
2123: Creates a set of list attributes.
2098: Creates a set of list attributes.
2124
2099
@@ -2137,121 +2112,121 @@ Lua functions for pandoc scripts.
2137
2112
2138## Constants
2113## Constants
2139
2114
2140−[`AuthorInText`]{#AuthorInText}
2115+[`AuthorInText`]{#pandoc.authorintext}
2141
2116
2142: Author name is mentioned in the text.
2117: Author name is mentioned in the text.
2143
2118
2144− See also: [Citation](#Citation)
2119+ See also: [Citation](#type-citation)
2145
2120
2146−[`SuppressAuthor`]{#SuppressAuthor}
2121+[`SuppressAuthor`]{#pandoc.suppressauthor}
2147
2122
2148: Author name is suppressed.
2123: Author name is suppressed.
2149
2124
2150− See also: [Citation](#Citation)
2125+ See also: [Citation](#type-citation)
2151
2126
2152−[`NormalCitation`]{#NormalCitation}
2127+[`NormalCitation`]{#pandoc.normalcitation}
2153
2128
2154: Default citation style is used.
2129: Default citation style is used.
2155
2130
2156− See also: [Citation](#Citation)
2131+ See also: [Citation](#type-citation)
2157
2132
2158−[`AlignLeft`]{#AlignLeft}
2133+[`AlignLeft`]{#pandoc.alignleft}
2159
2134
2160: Table cells aligned left.
2135: Table cells aligned left.
2161
2136
2162− See also: [Table](#Table)
2137+ See also: [Table](#type-alignment)
2163
2138
2164−[`AlignRight`]{#AlignRight}
2139+[`AlignRight`]{#pandoc.alignright}
2165
2140
2166: Table cells right-aligned.
2141: Table cells right-aligned.
2167
2142
2168− See also: [Table](#Table)
2143+ See also: [Table](#type-alignment)
2169
2144
2170−[`AlignCenter`]{#AlignCenter}
2145+[`AlignCenter`]{#pandoc.aligncenter}
2171
2146
2172: Table cell content is centered.
2147: Table cell content is centered.
2173
2148
2174− See also: [Table](#Table)
2149+ See also: [Table](#type-alignment)
2175
2150
2176−[`AlignDefault`]{#AlignDefault}
2151+[`AlignDefault`]{#pandoc.aligndefault}
2177
2152
2178: Table cells are alignment is unaltered.
2153: Table cells are alignment is unaltered.
2179
2154
2180− See also: [Table](#Table)
2155+ See also: [Table](#type-alignment)
2181
2156
2182−[`DefaultDelim`]{#DefaultDelim}
2157+[`DefaultDelim`]{#pandoc.defaultdelim}
2183
2158
2184: Default list number delimiters are used.
2159: Default list number delimiters are used.
2185
2160
2186− See also: [OrderedList](#OrderedList)
2161+ See also: [ListAttributes](#type-listattributes)
2187
2162
2188−[`Period`]{#Period}
2163+[`Period`]{#pandoc.period}
2189
2164
2190: List numbers are delimited by a period.
2165: List numbers are delimited by a period.
2191
2166
2192− See also: [OrderedList](#OrderedList)
2167+ See also: [ListAttributes](#type-listattributes)
2193
2168
2194−[`OneParen`]{#OneParen}
2169+[`OneParen`]{#pandoc.oneparen}
2195
2170
2196: List numbers are delimited by a single parenthesis.
2171: List numbers are delimited by a single parenthesis.
2197
2172
2198− See also: [OrderedList](#OrderedList)
2173+ See also: [ListAttributes](#type-listattributes)
2199
2174
2200−[`TwoParens`]{#TwoParens}
2175+[`TwoParens`]{#pandoc.twoparens}
2201
2176
2202: List numbers are delimited by a double parentheses.
2177: List numbers are delimited by a double parentheses.
2203
2178
2204− See also: [OrderedList](#OrderedList)
2179+ See also: [ListAttributes](#type-listattributes)
2205
2180
2206−[`DefaultStyle`]{#DefaultStyle}
2181+[`DefaultStyle`]{#pandoc.defaultstyle}
2207
2182
2208: List are numbered in the default style
2183: List are numbered in the default style
2209
2184
2210− See also: [OrderedList](#OrderedList)
2185+ See also: [ListAttributes](#type-listattributes)
2211
2186
2212−[`Example`]{#Example}
2187+[`Example`]{#pandoc.example}
2213
2188
2214: List items are numbered as examples.
2189: List items are numbered as examples.
2215
2190
2216− See also: [OrderedList](#OrderedList)
2191+ See also: [ListAttributes](#type-listattributes)
2217
2192
2218−[`Decimal`]{#Decimal}
2193+[`Decimal`]{#pandoc.decimal}
2219
2194
2220: List are numbered using decimal integers.
2195: List are numbered using decimal integers.
2221
2196
2222− See also: [OrderedList](#OrderedList)
2197+ See also: [ListAttributes](#type-listattributes)
2223
2198
2224−[`LowerRoman`]{#LowerRoman}
2199+[`LowerRoman`]{#pandoc.lowerroman}
2225
2200
2226: List are numbered using lower-case roman numerals.
2201: List are numbered using lower-case roman numerals.
2227
2202
2228− See also: [OrderedList](#OrderedList)
2203+ See also: [ListAttributes](#type-listattributes)
2229
2204
2230−[`UpperRoman`]{#UpperRoman}
2205+[`UpperRoman`]{#pandoc.upperroman}
2231
2206
2232: List are numbered using upper-case roman numerals
2207: List are numbered using upper-case roman numerals
2233
2208
2234− See also: [OrderedList](#OrderedList)
2209+ See also: [ListAttributes](#type-listattributes)
2235
2210
2236−[`LowerAlpha`]{#LowerAlpha}
2211+[`LowerAlpha`]{#pandoc.loweralpha}
2237
2212
2238: List are numbered using lower-case alphabetic characters.
2213: List are numbered using lower-case alphabetic characters.
2239
2214
2240− See also: [OrderedList](#OrderedList)
2215+ See also: [ListAttributes](#type-listattributes)
2241
2216
2242−[`UpperAlpha`]{#UpperAlpha}
2217+[`UpperAlpha`]{#pandoc.upperalpha}
2243
2218
2244: List are numbered using upper-case alphabetic characters.
2219: List are numbered using upper-case alphabetic characters.
2245
2220
2246− See also: [OrderedList](#OrderedList)
2221+ See also: [ListAttributes](#type-listattributes)
2247
2222
2248−[`sha1`]{#sha1}
2223+[`sha1`]{#pandoc.sha1}
2249
2224
2250: Functions which have moved to different modules
2225: Functions which have moved to different modules
2251
2226
2252## Helper functions
2227## Helper functions
2253
2228
2254−### pipe
2229+### pipe {#pandoc.pipe}
2255
2230
2256`pipe (command, args, input)`
2231`pipe (command, args, input)`
2257
2232
@@ -2272,7 +2247,7 @@ Usage:
2272
2247
2273 local output = pandoc.pipe("sed", {"-e","s/a/b/"}, "abc")
2248 local output = pandoc.pipe("sed", {"-e","s/a/b/"}, "abc")
2274
2249
2275−### walk\_block
2250+### walk\_block {#pandoc.walk_block}
2276
2251
2277`walk_block (element, filter)`
2252`walk_block (element, filter)`
2278
2253
@@ -2289,7 +2264,7 @@ Parameters:
2289
2264
2290Returns: the transformed block element
2265Returns: the transformed block element
2291
2266
2292−### walk\_inline
2267+### walk\_inline {#pandoc.walk_inline}
2293
2268
2294`walk_inline (element, filter)`
2269`walk_inline (element, filter)`
2295
2270
@@ -2306,7 +2281,7 @@ Parameters:
2306
2281
2307Returns: the transformed inline element
2282Returns: the transformed inline element
2308
2283
2309−### read
2284+### read {#pandoc.read}
2310
2285
2311`read (markup[, format])`
2286`read (markup[, format])`
2312
2287
@@ -2340,11 +2315,11 @@ The module is loaded as part of the `pandoc` module and
2340available as `pandoc.utils`. In versions up-to and including
2315available as `pandoc.utils`. In versions up-to and including
2341pandoc 2.6, this module had to be loaded explicitly. Example:
2316pandoc 2.6, this module had to be loaded explicitly. Example:
2342
2317
2343− local utils = require 'pandoc.utils'
2318+ pandoc.utils = require 'pandoc.utils'
2344
2319
2345−Use this for backwards compatibility.
2320+Use the above for backwards compatibility.
2346
2321
2347−### blocks\_to\_inlines {#utils-blocks_to_inlines}
2322+### blocks\_to\_inlines {#pandoc.utils.blocks_to_inlines}
2348
2323
2349`blocks_to_inlines (blocks[, sep])`
2324`blocks_to_inlines (blocks[, sep])`
2350
2325
@@ -2353,16 +2328,16 @@ Squash a list of blocks into a list of inlines.
2353Parameters:
2328Parameters:
2354
2329
2355`blocks`:
2330`blocks`:
2356−: List of [Blocks](#Blocks) to be flattened.
2331+: List of [Blocks](#type-block) to be flattened.
2357
2332
2358`sep`:
2333`sep`:
2359−: List of [Inlines](#Inlines) inserted as separator between
2334+: List of [Inlines](#type-inline) inserted as separator between
2360 two consecutive blocks; defaults to
2335 two consecutive blocks; defaults to
2361 `{ pandoc.Space(), pandoc.Str'¶', pandoc.Space()}`.
2336 `{ pandoc.Space(), pandoc.Str'¶', pandoc.Space()}`.
2362
2337
2363Returns:
2338Returns:
2364
2339
2365−- List of [Inlines](#Inlines)
2340+- [List](#type-list) of [Inlines](#type-inline)
2366
2341
2367Usage:
2342Usage:
2368
2343
@@ -2377,7 +2352,7 @@ Usage:
2377 -- pandoc.Emph{ pandoc.Str 'Paragraph2' }
2352 -- pandoc.Emph{ pandoc.Str 'Paragraph2' }
2378 -- }
2353 -- }
2379
2354
2380−### equals {#utils-equals}
2355+### equals {#pandoc.utils.equals}
2381
2356
2382`equals (element1, element2)`
2357`equals (element1, element2)`
2383
2358
@@ -2388,22 +2363,19 @@ equal.
2388Parameters:
2363Parameters:
2389
2364
2390`element1`, `element2`:
2365`element1`, `element2`:
2391−: Objects to be compared. Acceptable input types are
2366+: Objects to be compared. Acceptable input types are [Pandoc],
2392− [Pandoc](#type-ref-pandoc), [Meta](#type-ref-meta),
2393− [MetaValue](#type-ref-MetaValue), [Block](#type-ref-Block),
2367+ [Meta], [MetaValue], [Block], [Inline], [Attr],
2394− [Inline](#type-ref-Inline), [Attr](#type-ref-Attr),
2395− [ListAttributes](#type-ref-ListAttributes), and
2368+ [ListAttributes], and [Citation].
2396− [Citation](#type-ref-Citation).
2397
2369
2398Returns:
2370Returns:
2399
2371
2400- Whether the two objects represent the same element (boolean)
2372- Whether the two objects represent the same element (boolean)
2401
2373
2402−### make\_sections {#utils-make_sections}
2374+### make\_sections {#pandoc.utils.make_sections}
2403
2375
2404`make_sections (number_sections, base_level, blocks)`
2376`make_sections (number_sections, base_level, blocks)`
2405
2377
2406−Converst list of [Blocks](#Blocks) into sections.
2378+Converst list of [Blocks](#type-block) into sections.
2407`Div`s will be created beginning at each `Header`
2379`Div`s will be created beginning at each `Header`
2408and containing following content until the next `Header`
2380and containing following content until the next `Header`
2409of comparable level. If `number_sections` is true,
2381of comparable level. If `number_sections` is true,
@@ -2415,7 +2387,7 @@ is the level specified.
2415
2387
2416Returns:
2388Returns:
2417
2389
2418−- List of [Blocks](#Blocks).
2390+- List of [Blocks](#type-block).
2419
2391
2420Usage:
2392Usage:
2421
2393
@@ -2425,7 +2397,7 @@ Usage:
2425 }
2397 }
2426 local newblocks = pandoc.utils.make_sections(true, 1, blocks)
2398 local newblocks = pandoc.utils.make_sections(true, 1, blocks)
2427
2399
2428−### run\_json\_filter {#utils-run_json_filter}
2400+### run\_json\_filter {#pandoc.utils.run_json_filter}
2429
2401
2430`run_json_filter (doc, filter[, args])`
2402`run_json_filter (doc, filter[, args])`
2431
2403
@@ -2445,7 +2417,7 @@ Parameters:
2445
2417
2446Returns:
2418Returns:
2447
2419
2448−- ([Pandoc](#Pandoc)) Filtered document
2420+- ([Pandoc](#type-pandoc)) Filtered document
2449
2421
2450Usage:
2422Usage:
2451
2423
@@ -2458,7 +2430,7 @@ Usage:
2458 )
2430 )
2459 some_blocks = sub_doc.blocks -- some blocks with bib
2431 some_blocks = sub_doc.blocks -- some blocks with bib
2460
2432
2461−### normalize\_date {#utils-normalize_date}
2433+### normalize\_date {#pandoc.utils.normalize_date}
2462
2434
2463`normalize_date (date_string)`
2435`normalize_date (date_string)`
2464
2436
@@ -2471,7 +2443,7 @@ Returns:
2471
2443
2472- A date string, or nil when the conversion failed.
2444- A date string, or nil when the conversion failed.
2473
2445
2474−### sha1 {#utils-sha1}
2446+### sha1 {#pandoc.utils.sha1}
2475
2447
2476`sha1 (contents)`
2448`sha1 (contents)`
2477
2449
@@ -2485,7 +2457,7 @@ Usage:
2485
2457
2486 local fp = pandoc.utils.sha1("foobar")
2458 local fp = pandoc.utils.sha1("foobar")
2487
2459
2488−### stringify {#utils-stringify}
2460+### stringify {#pandoc.utils.stringify}
2489
2461
2490`stringify (element)`
2462`stringify (element)`
2491
2463
@@ -2502,7 +2474,7 @@ Usage:
2502 -- outputs "Moin"
2474 -- outputs "Moin"
2503 print(pandoc.utils.stringify(inline))
2475 print(pandoc.utils.stringify(inline))
2504
2476
2505−### to\_roman\_numeral {#utils-to_roman_numeral}
2477+### to\_roman\_numeral {#pandoc.utils.to_roman_numeral}
2506
2478
2507`to_roman_numeral (integer)`
2479`to_roman_numeral (integer)`
2508
2480
@@ -2530,7 +2502,7 @@ required, e.g.:
2530
2502
2531 local mb = require 'pandoc.mediabag'
2503 local mb = require 'pandoc.mediabag'
2532
2504
2533−### delete {#mediabag-delete}
2505+### delete {#pandoc.mediabag.delete}
2534
2506
2535`delete (filepath)`
2507`delete (filepath)`
2536
2508
@@ -2542,13 +2514,13 @@ Parameters:
2542: filename of the item to be deleted. The media bag will be
2514: filename of the item to be deleted. The media bag will be
2543 left unchanged if no entry with the given filename exists.
2515 left unchanged if no entry with the given filename exists.
2544
2516
2545−### empty {#mediabag-empty}
2517+### empty {#pandoc.mediabag.empty}
2546
2518
2547`empty ()`
2519`empty ()`
2548
2520
2549Clear-out the media bag, deleting all items.
2521Clear-out the media bag, deleting all items.
2550
2522
2551−### insert {#mediabag-insert}
2523+### insert {#pandoc.mediabag.insert}
2552
2524
2553`insert (filepath, mime_type, contents)`
2525`insert (filepath, mime_type, contents)`
2554
2526
@@ -2572,7 +2544,7 @@ Usage:
2572 local contents = "Hello, World!"
2544 local contents = "Hello, World!"
2573 pandoc.mediabag.insert(fp, mt, contents)
2545 pandoc.mediabag.insert(fp, mt, contents)
2574
2546
2575−### items {#mediabag-items}
2547+### items {#pandoc.mediabag.items}
2576
2548
2577`items ()`
2549`items ()`
2578
2550
@@ -2583,7 +2555,7 @@ processed one-by-one to avoid excessive memory use.
2583
2555
2584This function should be used only when full access to all items,
2556This function should be used only when full access to all items,
2585including their contents, is required. For all other cases,
2557including their contents, is required. For all other cases,
2586−[`list`](#mediabag-list) should be preferred.
2558+[`list`](#pandoc.mediabag.list) should be preferred.
2587
2559
2588Returns:
2560Returns:
2589
2561
@@ -2599,7 +2571,7 @@ Usage:
2599 -- print(fp, mt, contents)
2571 -- print(fp, mt, contents)
2600 end
2572 end
2601
2573
2602−### list {#mediabag-list}
2574+### list {#pandoc.mediabag.list}
2603
2575
2604`list ()`
2576`list ()`
2605
2577
@@ -2620,7 +2592,7 @@ Usage:
2620 end
2592 end
2621 print(sum)
2593 print(sum)
2622
2594
2623−### lookup {#mediabag-lookup}
2595+### lookup {#pandoc.mediabag.lookup}
2624
2596
2625`lookup (filepath)`
2597`lookup (filepath)`
2626
2598
@@ -2642,7 +2614,7 @@ Usage:
2642 local filename = "media/diagram.png"
2614 local filename = "media/diagram.png"
2643 local mt, contents = pandoc.mediabag.lookup(filename)
2615 local mt, contents = pandoc.mediabag.lookup(filename)
2644
2616
2645−### fetch {#mediabag-fetch}
2617+### fetch {#pandoc.mediabag.fetch}
2646
2618
2647`fetch (source, base_url)`
2619`fetch (source, base_url)`
2648
2620
@@ -2667,7 +2639,7 @@ methods and convenience functions.
2667
2639
2668## Constructor
2640## Constructor
2669
2641
2670−[`pandoc.List([table])`]{#pandoc.List}
2642+[`pandoc.List([table])`]{#pandoc.list}
2671
2643
2672: Create a new List. If the optional argument `table` is given,
2644: Create a new List. If the optional argument `table` is given,
2673 set the metatable of that value to `pandoc.List`. This is an
2645 set the metatable of that value to `pandoc.List`. This is an
@@ -2675,7 +2647,7 @@ methods and convenience functions.
2675
2647
2676## Metamethods
2648## Metamethods
2677
2649
2678−[`pandoc.List:__concat (list)`]{#pandoc.List:__concat}
2650+[`pandoc.List:__concat (list)`]{#pandoc.list:__concat}
2679
2651
2680: Concatenates two lists.
2652: Concatenates two lists.
2681
2653
@@ -2689,11 +2661,11 @@ methods and convenience functions.
2689
2661
2690## Methods
2662## Methods
2691
2663
2692−[`pandoc.List:clone ()`]{#pandoc.List:clone}
2664+[`pandoc.List:clone ()`]{#pandoc.list:clone}
2693
2665
2694: Returns a (shallow) copy of the list.
2666: Returns a (shallow) copy of the list.
2695
2667
2696−[`pandoc.List:new([table])`]{#pandoc.List:new}
2668+[`pandoc.List:new([table])`]{#pandoc.list:new}
2697
2669
2698: Create a new List. If the optional argument `table` is given,
2670: Create a new List. If the optional argument `table` is given,
2699 set the metatable of that value to `pandoc.List`.
2671 set the metatable of that value to `pandoc.List`.
@@ -2706,7 +2678,7 @@ methods and convenience functions.
2706
2678
2707 Returns: the updated input value
2679 Returns: the updated input value
2708
2680
2709−[`pandoc.List:includes (needle, init)`]{#pandoc.List:includes}
2681+[`pandoc.List:includes (needle, init)`]{#pandoc.list:includes}
2710
2682
2711: Checks if the list has an item equal to the given needle.
2683: Checks if the list has an item equal to the given needle.
2712
2684
@@ -2721,7 +2693,7 @@ methods and convenience functions.
2721 Returns: true if a list item is equal to the needle, false
2693 Returns: true if a list item is equal to the needle, false
2722 otherwise
2694 otherwise
2723
2695
2724−[`pandoc.List:find (needle, init)`]{#pandoc.List:find}
2696+[`pandoc.List:find (needle, init)`]{#pandoc.list:find}
2725
2697
2726: Returns the value and index of the first occurrence of the
2698: Returns the value and index of the first occurrence of the
2727 given item.
2699 given item.
@@ -2737,7 +2709,7 @@ methods and convenience functions.
2737 Returns: first item equal to the needle, or nil if no such
2709 Returns: first item equal to the needle, or nil if no such
2738 item exists.
2710 item exists.
2739
2711
2740−[`pandoc.List:find_if (pred, init)`]{#pandoc.List:find_if}
2712+[`pandoc.List:find_if (pred, init)`]{#pandoc.list:find_if}
2741
2713
2742: Returns the value and index of the first element for which
2714: Returns the value and index of the first element for which
2743 the predicate holds true.
2715 the predicate holds true.
@@ -2753,7 +2725,7 @@ methods and convenience functions.
2753 Returns: first item for which \`test\` succeeds, or nil if
2725 Returns: first item for which \`test\` succeeds, or nil if
2754 no such item exists.
2726 no such item exists.
2755
2727
2756−[`pandoc.List:extend (list)`]{#pandoc.List:extend}
2728+[`pandoc.List:extend (list)`]{#pandoc.list:extend}
2757
2729
2758: Adds the given list to the end of this list.
2730: Adds the given list to the end of this list.
2759
2731
@@ -2762,7 +2734,7 @@ methods and convenience functions.
2762 `list`:
2734 `list`:
2763 : list to appended
2735 : list to appended
2764
2736
2765−[`pandoc.List:map (fn)`]{#pandoc.List:map}
2737+[`pandoc.List:map (fn)`]{#pandoc.list:map}
2766
2738
2767: Returns a copy of the current list by applying the given
2739: Returns a copy of the current list by applying the given
2768 function to all elements.
2740 function to all elements.
@@ -2772,7 +2744,7 @@ methods and convenience functions.
2772 `fn`:
2744 `fn`:
2773 : function which is applied to all list items.
2745 : function which is applied to all list items.
2774
2746
2775−[`pandoc.List:filter (pred)`]{#pandoc.List:filter}
2747+[`pandoc.List:filter (pred)`]{#pandoc.list:filter}
2776
2748
2777: Returns a new list containing all items satisfying a given
2749: Returns a new list containing all items satisfying a given
2778 condition.
2750 condition.
@@ -2789,19 +2761,19 @@ methods and convenience functions.
2789
2761
2790Access to system information and functionality.
2762Access to system information and functionality.
2791
2763
2792−## Static Fields {#system-fields}
2764+## Static Fields
2793
2765
2794−### arch {#system-arch}
2766+### arch {#pandoc.system.arch}
2795
2767
2796The machine architecture on which the program is running.
2768The machine architecture on which the program is running.
2797
2769
2798−### os {#system-os}
2770+### os {#pandoc.system.os}
2799
2771
2800The operating system on which the program is running.
2772The operating system on which the program is running.
2801
2773
2802−## Functions {#system-functions}
2774+## Functions
2803
2775
2804−### environment {#system-environment}
2776+### environment {#pandoc.system.environment}
2805
2777
2806`environment ()`
2778`environment ()`
2807
2779
@@ -2812,7 +2784,7 @@ Returns:
2812- A table mapping environment variables names to their string
2784- A table mapping environment variables names to their string
2813 value (table).
2785 value (table).
2814
2786
2815−### get\_working\_directory {#system-get_working_directory}
2787+### get\_working\_directory {#pandoc.system.get_working_directory}
2816
2788
2817`get_working_directory ()`
2789`get_working_directory ()`
2818
2790
@@ -2822,7 +2794,7 @@ Returns:
2822
2794
2823- The current working directory (string).
2795- The current working directory (string).
2824
2796
2825−### with\_environment {#system-with_environment}
2797+### with\_environment {#pandoc.system.with_environment}
2826
2798
2827`with_environment (environment, callback)`
2799`with_environment (environment, callback)`
2828
2800
@@ -2846,7 +2818,7 @@ Returns:
2846
2818
2847- The result(s) of the call to `callback`
2819- The result(s) of the call to `callback`
2848
2820
2849−### with\_temporary\_directory {#system-with_temporary_directory}
2821+### with\_temporary\_directory {#pandoc.system.with_temporary_directory}
2850
2822
2851`with_temporary_directory ([parent_dir,] templ, callback)`
2823`with_temporary_directory ([parent_dir,] templ, callback)`
2852
2824
@@ -2871,7 +2843,7 @@ Returns:
2871
2843
2872- The result of the call to `callback`.
2844- The result of the call to `callback`.
2873
2845
2874−### with\_working\_directory {#system-with_working_directory}
2846+### with\_working\_directory {#pandoc.system.with_working_directory}
2875
2847
2876`with_working_directory (directory, callback)`
2848`with_working_directory (directory, callback)`
2877
2849
@@ -2897,7 +2869,7 @@ Returns:
2897
2869
2898Constructors for types which are not part of the pandoc AST.
2870Constructors for types which are not part of the pandoc AST.
2899
2871
2900−### Version {#pandoc.types.Version}
2872+### Version {#pandoc.types.version}
2901
2873
2902`Version (version_specifier)`
2874`Version (version_specifier)`
2903
2875
@@ -2908,8 +2880,8 @@ Parameters:
2908`version`:
2880`version`:
2909: Version specifier: this can be a version string like
2881: Version specifier: this can be a version string like
2910 `'2.7.3'`, a list of integers like `{2, 7, 3}`, a single
2882 `'2.7.3'`, a list of integers like `{2, 7, 3}`, a single
2911− integer, or a [Version](#type-ref-Version).
2883+ integer, or a [Version].
2912
2884
2913Returns:
2885Returns:
2914
2886
2915−- A new [Version](#type-ref-Version) object.
2887+- A new [Version] object.