git.iko.soy/typeable/pandoc
on master help sign in
doc/lua-filters.md: use 3rd level headers for module fields
commit7b7db934a83e8b1852e2ff68e9797623e2ad1e55 authorAlbert Krewinkel <albert@zeitkraut.de> dateWed 30 Jan 2019, 21:37 (8 years ago) parentdea292a
1 file changed+664−664
doc/lua-filters.md+664−664
doc/lua-filters.md+664−664
@@ -1374,990 +1374,990 @@ function Str (s)
13741374end
13751375```
13761376
1377−[`lower (s)`]{#text-lower}
1377+### `lower (s)` {#text-lower}
13781378
1379−: Returns a copy of a UTF-8 string, converted to lowercase.
1379+Returns a copy of a UTF-8 string, converted to lowercase.
13801380
1381−[`upper (s)`]{#text-upper}
1381+### `upper (s)` {#text-upper}
13821382
1383−: Returns a copy of a UTF-8 string, converted to uppercase.
1383+Returns a copy of a UTF-8 string, converted to uppercase.
13841384
1385−[`reverse (s)`]{#text-reverse}
1385+### `reverse (s)` {#text-reverse}
13861386
1387−: Returns a copy of a UTF-8 string, with characters reversed.
1387+Returns a copy of a UTF-8 string, with characters reversed.
13881388
1389−[`len (s)`]{#text-len}
1389+### `len (s)` {#text-len}
13901390
1391−: Returns the length of a UTF-8 string.
1391+Returns the length of a UTF-8 string.
13921392
1393−[`sub (s)`]{#text-sub}
1393+### `sub (s)` {#text-sub}
13941394
1395−: Returns a substring of a UTF-8 string, using lua's string
1396− indexing rules.
1395+Returns a substring of a UTF-8 string, using Lua's string
1396+indexing rules.
13971397
13981398# Module pandoc
13991399
14001400Lua functions for pandoc scripts.
14011401
1402−## Pandoc Document {#type-ref-}
1402+## Pandoc Document
14031403
1404−[`Pandoc (blocks[, meta])`]{#Pandoc}
1404+### `Pandoc (blocks[, meta])` {#Pandoc}
14051405
1406−: A complete pandoc document
1406+A complete pandoc document
14071407
1408− Parameters:
1408+Parameters:
14091409
1410− `blocks`:
1411− : document content
1410+`blocks`:
1411+: document content
14121412
1413− `meta`:
1414− : document meta data
1413+`meta`:
1414+: document meta data
14151415
14161416## Meta
14171417
1418−[`Meta (table)`]{#Meta}
1418+### `Meta (table)` {#Meta}
14191419
1420−: Create a new Meta object.
1420+Create a new Meta object.
14211421
1422− Parameters:
1422+Parameters:
14231423
1424− `table`:
1425− : table containing document meta information
1424+`table`:
1425+: table containing document meta information
14261426
14271427## MetaValue
14281428
1429−[`MetaBlocks (blocks)`]{#MetaBlocks}
1429+### `MetaBlocks (blocks)` {#MetaBlocks}
14301430
1431−: Meta blocks
1431+Meta blocks
14321432
1433− Parameters:
1433+Parameters:
14341434
1435− `blocks`:
1436− : blocks
1435+`blocks`:
1436+: blocks
14371437
1438−[`MetaInlines (inlines)`]{#MetaInlines}
1438+### `MetaInlines (inlines)` {#MetaInlines}
14391439
1440−: Meta inlines
1440+Meta inlines
14411441
1442− Parameters:
1442+Parameters:
14431443
1444− `inlines`:
1445− : inlines
1444+`inlines`:
1445+: inlines
14461446
1447−[`MetaList (meta_values)`]{#MetaList}
1447+### `MetaList (meta_values)` {#MetaList}
14481448
1449−: Meta list
1449+Meta list
14501450
1451− Parameters:
1451+Parameters:
14521452
1453− `meta_values`:
1454− : list of meta values
1453+`meta_values`:
1454+: list of meta values
14551455
1456−[`MetaMap (key_value_map)`]{#MetaMap}
1456+### `MetaMap (key_value_map)` {#MetaMap}
14571457
1458−: Meta map
1458+Meta map
14591459
1460− Parameters:
1460+Parameters:
14611461
1462− `key_value_map`:
1463− : a string-indexed map of meta values
1462+`key_value_map`:
1463+: a string-indexed map of meta values
14641464
1465−[`MetaString (str)`]{#MetaString}
1465+### `MetaString (str)` {#MetaString}
14661466
1467−: Creates string to be used in meta data.
1467+Creates string to be used in meta data.
14681468
1469− Parameters:
1469+Parameters:
14701470
1471− `str`:
1472− : string value
1471+`str`:
1472+: string value
14731473
1474−[`MetaBool (bool)`]{#MetaBool}
1474+### `MetaBool (bool)` {#MetaBool}
14751475
1476−: Creates boolean to be used in meta data.
1476+Creates boolean to be used in meta data.
14771477
1478− Parameters:
1478+Parameters:
14791479
1480− `bool`:
1481− : boolean value
1480+`bool`:
1481+: boolean value
14821482
14831483## Blocks
14841484
1485−[`Block`]{#Block}
1485+### `Block` {#Block}
14861486
1487−: Block elements
1487+Block elements
14881488
1489−[`BlockQuote (content)`]{#BlockQuote}
1489+### `BlockQuote (content)` {#BlockQuote}
14901490
1491−: Creates a block quote element
1491+Creates a block quote element
14921492
1493− Parameters:
1493+Parameters:
14941494
1495− `content`:
1496− : block content
1495+`content`:
1496+: block content
14971497
1498− Returns: block quote element
1498+Returns: block quote element
14991499
1500−[`BulletList (content)`]{#BulletList}
1500+### `BulletList (content)` {#BulletList}
15011501
1502−: Creates a bullet (i.e.
1502+Creates a bullet (i.e.
15031503
1504− Parameters:
1504+Parameters:
15051505
1506− `content`:
1507− : list of items
1506+`content`:
1507+: list of items
15081508
1509− Returns: bullet list element
1509+Returns: bullet list element
15101510
1511−[`CodeBlock (text[, attr])`]{#CodeBlock}
1511+### `CodeBlock (text[, attr])` {#CodeBlock}
15121512
1513−: Creates a code block element
1513+Creates a code block element
15141514
1515− Parameters:
1515+Parameters:
15161516
1517− `text`:
1518− : code string
1517+`text`:
1518+: code string
15191519
1520− `attr`:
1521− : element attributes
1520+`attr`:
1521+: element attributes
15221522
1523− Returns: code block element
1523+Returns: code block element
15241524
1525−[`DefinitionList (content)`]{#DefinitionList}
1525+### `DefinitionList (content)` {#DefinitionList}
15261526
1527−: Creates a definition list, containing terms and their
1528− explanation.
1527+Creates a definition list, containing terms and their
1528+explanation.
15291529
1530− Parameters:
1530+Parameters:
15311531
1532− `content`:
1533− : list of items
1532+`content`:
1533+: list of items
15341534
1535− Returns: definition list element
1535+Returns: definition list element
15361536
1537−[`Div (content[, attr])`]{#Div}
1537+### `Div (content[, attr])` {#Div}
15381538
1539−: Creates a div element
1539+Creates a div element
15401540
1541− Parameters:
1541+Parameters:
15421542
1543− `content`:
1544− : block content
1543+`content`:
1544+: block content
15451545
1546− `attr`:
1547− : element attributes
1546+`attr`:
1547+: element attributes
15481548
1549− Returns: div element
1549+Returns: div element
15501550
1551−[`Header (level, content[, attr])`]{#Header}
1551+### `Header (level, content[, attr])` {#Header}
15521552
1553−: Creates a header element.
1553+Creates a header element.
15541554
1555− Parameters:
1555+Parameters:
15561556
1557− `level`:
1558− : header level
1557+`level`:
1558+: header level
15591559
1560− `content`:
1561− : inline content
1560+`content`:
1561+: inline content
15621562
1563− `attr`:
1564− : element attributes
1563+`attr`:
1564+: element attributes
15651565
1566− Returns: header element
1566+Returns: header element
15671567
1568−[`HorizontalRule ()`]{#HorizontalRule}
1568+### `HorizontalRule ()` {#HorizontalRule}
15691569
1570−: Creates a horizontal rule.
1570+Creates a horizontal rule.
15711571
1572− Returns: horizontal rule
1572+Returns: horizontal rule
15731573
1574−[`LineBlock (content)`]{#LineBlock}
1574+### `LineBlock (content)` {#LineBlock}
15751575
1576−: Creates a line block element.
1576+Creates a line block element.
15771577
1578− Parameters:
1578+Parameters:
15791579
1580− `content`:
1581− : inline content
1580+`content`:
1581+: inline content
15821582
1583− Returns: line block element
1583+Returns: line block element
15841584
1585−[`Null ()`]{#Null}
1585+### `Null ()` {#Null}
15861586
1587−: Creates a null element.
1587+Creates a null element.
15881588
1589− Returns: null element
1589+Returns: null element
15901590
1591−[`OrderedList (items[, listAttributes])`]{#OrderedList}
1591+### `OrderedList (items[, listAttributes])` {#OrderedList}
15921592
1593−: Creates an ordered list.
1593+Creates an ordered list.
15941594
1595− Parameters:
1595+Parameters:
15961596
1597− `items`:
1598− : list items
1597+`items`:
1598+: list items
15991599
1600− `listAttributes`:
1601− : list parameters
1600+`listAttributes`:
1601+: list parameters
16021602
1603− Returns: ordered list element
1603+Returns: ordered list element
16041604
1605−[`Para (content)`]{#Para}
1605+### `Para (content)` {#Para}
16061606
1607−: Creates a para element.
1607+Creates a para element.
16081608
1609− Parameters:
1609+Parameters:
16101610
1611− `content`:
1612− : inline content
1611+`content`:
1612+: inline content
16131613
1614− Returns: paragraph element
1614+Returns: paragraph element
16151615
1616−[`Plain (content)`]{#Plain}
1616+### `Plain (content)` {#Plain}
16171617
1618−: Creates a plain element.
1618+Creates a plain element.
16191619
1620− Parameters:
1620+Parameters:
16211621
1622− `content`:
1623− : inline content
1622+`content`:
1623+: inline content
16241624
1625− Returns: plain element
1625+Returns: plain element
16261626
1627−[`RawBlock (format, text)`]{#RawBlock}
1627+### `RawBlock (format, text)` {#RawBlock}
16281628
1629−: Creates a raw content block of the specified format.
1629+Creates a raw content block of the specified format.
16301630
1631− Parameters:
1631+Parameters:
16321632
1633− `format`:
1634− : format of content
1633+`format`:
1634+: format of content
16351635
1636− `text`:
1637− : string content
1636+`text`:
1637+: string content
16381638
1639− Returns: raw block element
1639+Returns: raw block element
16401640
1641−[`Table (caption, aligns, widths, headers, rows)`]{#Table}
1641+### `Table (caption, aligns, widths, headers, rows)` {#Table}
16421642
1643−: Creates a table element.
1643+Creates a table element.
16441644
1645− Parameters:
1645+Parameters:
16461646
1647− `caption`:
1648− : table caption
1647+`caption`:
1648+: table caption
16491649
1650− `aligns`:
1651− : alignments
1650+`aligns`:
1651+: alignments
16521652
1653− `widths`:
1654− : column widths
1653+`widths`:
1654+: column widths
16551655
1656− `headers`:
1657− : header row
1656+`headers`:
1657+: header row
16581658
1659− `rows`:
1660− : table rows
1659+`rows`:
1660+: table rows
16611661
1662− Returns: table element
1662+Returns: table element
16631663
16641664## Inline
16651665
1666−[`Inline`]{#Inline}
1666+### `Inline` {#Inline}
16671667
1668−: Inline element class
1668+Inline element class
16691669
1670−[`Cite (content, citations)`]{#Cite}
1670+### `Cite (content, citations)` {#Cite}
16711671
1672−: Creates a Cite inline element
1672+Creates a Cite inline element
16731673
1674− Parameters:
1674+Parameters:
16751675
1676− `content`:
1677− : List of inlines
1676+`content`:
1677+: List of inlines
16781678
1679− `citations`:
1680− : List of citations
1679+`citations`:
1680+: List of citations
16811681
1682− Returns: citations element
1682+Returns: citations element
16831683
1684−[`Code (text[, attr])`]{#Code}
1684+### `Code (text[, attr])` {#Code}
16851685
1686−: Creates a Code inline element
1686+Creates a Code inline element
16871687
1688− Parameters:
1688+Parameters:
16891689
1690− `text`:
1691− : code string
1690+`text`:
1691+: code string
16921692
1693− `attr`:
1694− : additional attributes
1693+`attr`:
1694+: additional attributes
16951695
1696− Returns: code element
1696+Returns: code element
16971697
1698−[`Emph (content)`]{#Emph}
1698+### `Emph (content)` {#Emph}
16991699
1700−: Creates an inline element representing emphasised text.
1700+Creates an inline element representing emphasised text.
17011701
1702− Parameters:
1702+Parameters:
17031703
1704− `content`:
1705− : inline content
1704+`content`:
1705+: inline content
17061706
1707− Returns: emphasis element
1707+Returns: emphasis element
17081708
1709−[`Image (caption, src[, title[, attr]])`]{#Image}
1709+### `Image (caption, src[, title[, attr]])` {#Image}
17101710
1711−: Creates a Image inline element
1711+Creates a Image inline element
17121712
1713− Parameters:
1713+Parameters:
17141714
1715− `caption`:
1716− : text used to describe the image
1715+`caption`:
1716+: text used to describe the image
17171717
1718− `src`:
1719− : path to the image file
1718+`src`:
1719+: path to the image file
17201720
1721− `title`:
1722− : brief image description
1721+`title`:
1722+: brief image description
17231723
1724− `attr`:
1725− : additional attributes
1724+`attr`:
1725+: additional attributes
17261726
1727− Returns: image element
1727+Returns: image element
17281728
1729−[`LineBreak ()`]{#LineBreak}
1729+### `LineBreak ()` {#LineBreak}
17301730
1731−: Create a LineBreak inline element
1731+Create a LineBreak inline element
17321732
1733− Returns: linebreak element
1733+Returns: linebreak element
17341734
1735−[`Link (content, target[, title[, attr]])`]{#Link}
1735+### `Link (content, target[, title[, attr]])` {#Link}
17361736
1737−: Creates a link inline element, usually a hyperlink.
1737+Creates a link inline element, usually a hyperlink.
17381738
1739− Parameters:
1739+Parameters:
17401740
1741− `content`:
1742− : text for this link
1741+`content`:
1742+: text for this link
17431743
1744− `target`:
1745− : the link target
1744+`target`:
1745+: the link target
17461746
1747− `title`:
1748− : brief link description
1747+`title`:
1748+: brief link description
17491749
1750− `attr`:
1751− : additional attributes
1750+`attr`:
1751+: additional attributes
17521752
1753− Returns: image element
1753+Returns: image element
17541754
1755−[`Math (mathtype, text)`]{#Math}
1755+### `Math (mathtype, text)` {#Math}
17561756
1757−: Creates a Math element, either inline or displayed.
1757+Creates a Math element, either inline or displayed.
17581758
1759− Parameters:
1759+Parameters:
17601760
1761− `mathtype`:
1762− : rendering specifier
1761+`mathtype`:
1762+: rendering specifier
17631763
1764− `text`:
1765− : Math content
1764+`text`:
1765+: Math content
17661766
1767− Returns: Math element
1767+Returns: Math element
17681768
1769−[`DisplayMath (text)`]{#DisplayMath}
1769+### `DisplayMath (text)` {#DisplayMath}
17701770
1771−: Creates a DisplayMath element (DEPRECATED).
1771+Creates a DisplayMath element (DEPRECATED).
17721772
1773− Parameters:
1773+Parameters:
17741774
1775− `text`:
1776− : Math content
1775+`text`:
1776+: Math content
17771777
1778− Returns: Math element
1778+Returns: Math element
17791779
1780−[`InlineMath (text)`]{#InlineMath}
1780+### `InlineMath (text)` {#InlineMath}
17811781
1782−: Creates an InlineMath inline element (DEPRECATED).
1782+Creates an InlineMath inline element (DEPRECATED).
17831783
1784− Parameters:
1784+Parameters:
17851785
1786− `text`:
1787− : Math content
1786+`text`:
1787+: Math content
17881788
1789− Returns: Math element
1789+Returns: Math element
17901790
1791−[`Note (content)`]{#Note}
1791+### `Note (content)` {#Note}
17921792
1793−: Creates a Note inline element
1793+Creates a Note inline element
17941794
1795− Parameters:
1795+Parameters:
17961796
1797− `content`:
1798− : footnote block content
1797+`content`:
1798+: footnote block content
17991799
1800−[`Quoted (quotetype, content)`]{#Quoted}
1800+### `Quoted (quotetype, content)` {#Quoted}
18011801
1802−: Creates a Quoted inline element given the quote type and
1803− quoted content.
1802+Creates a Quoted inline element given the quote type and
1803+quoted content.
18041804
1805− Parameters:
1805+Parameters:
18061806
1807− `quotetype`:
1808− : type of quotes to be used
1807+`quotetype`:
1808+: type of quotes to be used
18091809
1810− `content`:
1811− : inline content
1810+`content`:
1811+: inline content
18121812
1813− Returns: quoted element
1813+Returns: quoted element
18141814
1815−[`SingleQuoted (content)`]{#SingleQuoted}
1815+### `SingleQuoted (content)` {#SingleQuoted}
18161816
1817−: Creates a single-quoted inline element (DEPRECATED).
1817+Creates a single-quoted inline element (DEPRECATED).
18181818
1819− Parameters:
1819+Parameters:
18201820
1821− `content`:
1822− : inline content
1821+`content`:
1822+: inline content
18231823
1824− Returns: quoted element
1824+Returns: quoted element
18251825
1826− See also: [Quoted](#Quoted)
1826+See also: [Quoted](#Quoted)
18271827
1828−[`DoubleQuoted (content)`]{#DoubleQuoted}
1828+### `DoubleQuoted (content)` {#DoubleQuoted}
18291829
1830−: Creates a single-quoted inline element (DEPRECATED).
1830+Creates a single-quoted inline element (DEPRECATED).
18311831
1832− Parameters:
1832+Parameters:
18331833
1834− `content`:
1835− : inline content
1834+`content`:
1835+: inline content
18361836
1837− Returns: quoted element
1837+Returns: quoted element
18381838
1839− See also: [Quoted](#Quoted)
1839+See also: [Quoted](#Quoted)
18401840
1841−[`RawInline (format, text)`]{#RawInline}
1841+### `RawInline (format, text)` {#RawInline}
18421842
1843−: Creates a RawInline inline element
1843+Creates a RawInline inline element
18441844
1845− Parameters:
1845+Parameters:
18461846
1847− `format`:
1848− : format of the contents
1847+`format`:
1848+: format of the contents
18491849
1850− `text`:
1851− : string content
1850+`text`:
1851+: string content
18521852
1853− Returns: raw inline element
1853+Returns: raw inline element
18541854
1855−[`SmallCaps (content)`]{#SmallCaps}
1855+### `SmallCaps (content)` {#SmallCaps}
18561856
1857−: Creates text rendered in small caps
1857+Creates text rendered in small caps
18581858
1859− Parameters:
1859+Parameters:
18601860
1861− `content`:
1862− : inline content
1861+`content`:
1862+: inline content
18631863
1864− Returns: smallcaps element
1864+Returns: smallcaps element
18651865
1866−[`SoftBreak ()`]{#SoftBreak}
1866+### `SoftBreak ()` {#SoftBreak}
18671867
1868−: Creates a SoftBreak inline element.
1868+Creates a SoftBreak inline element.
18691869
1870− Returns: softbreak element
1870+Returns: softbreak element
18711871
1872−[`Space ()`]{#Space}
1872+### `Space ()` {#Space}
18731873
1874−: Create a Space inline element
1874+Create a Space inline element
18751875
1876− Returns: space element
1876+Returns: space element
18771877
1878−[`Span (content[, attr])`]{#Span}
1878+### `Span (content[, attr])` {#Span}
18791879
1880−: Creates a Span inline element
1880+Creates a Span inline element
18811881
1882− Parameters:
1882+Parameters:
18831883
1884− `content`:
1885− : inline content
1884+`content`:
1885+: inline content
18861886
1887− `attr`:
1888− : additional attributes
1887+`attr`:
1888+: additional attributes
18891889
1890− Returns: span element
1890+Returns: span element
18911891
1892−[`Str (text)`]{#Str}
1892+### `Str (text)` {#Str}
18931893
1894−: Creates a Str inline element
1894+Creates a Str inline element
18951895
1896− Parameters:
1896+Parameters:
18971897
1898− `text`:
1899− : content
1898+`text`:
1899+: content
19001900
1901− Returns: string element
1901+Returns: string element
19021902
1903−[`Strikeout (content)`]{#Strikeout}
1903+### `Strikeout (content)` {#Strikeout}
19041904
1905−: Creates text which is striked out.
1905+Creates text which is striked out.
19061906
1907− Parameters:
1907+Parameters:
19081908
1909− `content`:
1910− : inline content
1909+`content`:
1910+: inline content
19111911
1912− Returns: strikeout element
1912+Returns: strikeout element
19131913
1914−[`Strong (content)`]{#Strong}
1914+### `Strong (content)` {#Strong}
19151915
1916−: Creates a Strong element, whose text is usually displayed in
1917− a bold font.
1916+Creates a Strong element, whose text is usually displayed in
1917+a bold font.
19181918
1919− Parameters:
1919+Parameters:
19201920
1921− `content`:
1922− : inline content
1921+`content`:
1922+: inline content
19231923
1924− Returns: strong element
1924+Returns: strong element
19251925
1926−[`Subscript (content)`]{#Subscript}
1926+### `Subscript (content)` {#Subscript}
19271927
1928−: Creates a Subscript inline element
1928+Creates a Subscript inline element
19291929
1930− Parameters:
1930+Parameters:
19311931
1932− `content`:
1933− : inline content
1932+`content`:
1933+: inline content
19341934
1935− Returns: subscript element
1935+Returns: subscript element
19361936
1937−[`Superscript (content)`]{#Superscript}
1937+### `Superscript (content)` {#Superscript}
19381938
1939−: Creates a Superscript inline element
1939+Creates a Superscript inline element
19401940
1941− Parameters:
1941+Parameters:
19421942
1943− `content`:
1944− : inline content
1943+`content`:
1944+: inline content
19451945
1946− Returns: strong element
1946+Returns: strong element
19471947
19481948## Element components
19491949
1950−[`Attr ([identifier[, classes[, attributes]]])`]{#Attr}
1950+### `Attr ([identifier[, classes[, attributes]]])` {#Attr}
19511951
1952−: Create a new set of attributes (Attr).
1952+Create a new set of attributes (Attr).
19531953
1954− Parameters:
1954+Parameters:
19551955
1956− `identifier`:
1957− : element identifier
1956+`identifier`:
1957+: element identifier
19581958
1959− `classes`:
1960− : element classes
1959+`classes`:
1960+: element classes
19611961
1962− `attributes`:
1963− : table containing string keys and values
1962+`attributes`:
1963+: table containing string keys and values
19641964
1965− Returns: element attributes
1965+Returns: element attributes
19661966
1967−[`Citation (id, mode[, prefix[, suffix[, note_num[, hash]]]])`]{#Citation}
1967+### `Citation (id, mode[, prefix[, suffix[, note_num[, hash]]]])` {#Citation}
19681968
1969−: Creates a single citation.
1969+Creates a single citation.
19701970
1971− Parameters:
1971+Parameters:
19721972
1973− `id`:
1974− : citation identifier (like a bibtex key)
1973+`id`:
1974+: citation identifier (like a bibtex key)
19751975
1976− `mode`:
1977− : citation mode
1976+`mode`:
1977+: citation mode
19781978
1979− `prefix`:
1980− : citation prefix
1979+`prefix`:
1980+: citation prefix
19811981
1982− `suffix`:
1983− : citation suffix
1982+`suffix`:
1983+: citation suffix
19841984
1985− `note_num`:
1986− : note number
1985+`note_num`:
1986+: note number
19871987
1988− `hash`:
1989− : hash number
1988+`hash`:
1989+: hash number
19901990
1991−[`ListAttributes ([start[, style[, delimiter]]])`](#ListAttributes)
1991+### `ListAttributes ([start[, style[, delimiter]]])` (#ListAttributes)
19921992
1993−: Creates a set of list attributes
1993+Creates a set of list attributes
19941994
1995− Parameters:
1995+Parameters:
19961996
1997− `start`:
1998− : number of the first list item (default: 1)
1997+`start`:
1998+: number of the first list item (default: 1)
19991999
2000− `style`:
2001− : style used for list numbering (default: `DefaultStyle`)
2000+`style`:
2001+: style used for list numbering (default: `DefaultStyle`)
20022002
2003− `delimiter`:
2004− : delimiter of list numbers (default: `DefaultDelim`)
2003+`delimiter`:
2004+: delimiter of list numbers (default: `DefaultDelim`)
20052005
2006− Returns: list attributes table
2006+Returns: list attributes table
20072007
20082008## Constants
20092009
2010−[`AuthorInText`]{#AuthorInText}
2010+### `AuthorInText` {#AuthorInText}
20112011
2012−: Author name is mentioned in the text.
2012+Author name is mentioned in the text.
20132013
2014− See also: [Citation](#Citation)
2014+See also: [Citation](#Citation)
20152015
2016−[`SuppressAuthor`]{#SuppressAuthor}
2016+### `SuppressAuthor` {#SuppressAuthor}
20172017
2018−: Author name is suppressed.
2018+Author name is suppressed.
20192019
2020− See also: [Citation](#Citation)
2020+See also: [Citation](#Citation)
20212021
2022−[`NormalCitation`]{#NormalCitation}
2022+### `NormalCitation` {#NormalCitation}
20232023
2024−: Default citation style is used.
2024+Default citation style is used.
20252025
2026− See also: [Citation](#Citation)
2026+See also: [Citation](#Citation)
20272027
2028−[`AlignLeft`]{#AlignLeft}
2028+### `AlignLeft` {#AlignLeft}
20292029
2030−: Table cells aligned left.
2030+Table cells aligned left.
20312031
2032− See also: [Table](#Table)
2032+See also: [Table](#Table)
20332033
2034−[`AlignRight`]{#AlignRight}
2034+### `AlignRight` {#AlignRight}
20352035
2036−: Table cells right-aligned.
2036+Table cells right-aligned.
20372037
2038− See also: [Table](#Table)
2038+See also: [Table](#Table)
20392039
2040−[`AlignCenter`]{#AlignCenter}
2040+### `AlignCenter` {#AlignCenter}
20412041
2042−: Table cell content is centered.
2042+Table cell content is centered.
20432043
2044− See also: [Table](#Table)
2044+See also: [Table](#Table)
20452045
2046−[`AlignDefault`]{#AlignDefault}
2046+### `AlignDefault` {#AlignDefault}
20472047
2048−: Table cells are alignment is unaltered.
2048+Table cells are alignment is unaltered.
20492049
2050− See also: [Table](#Table)
2050+See also: [Table](#Table)
20512051
2052−[`DefaultDelim`]{#DefaultDelim}
2052+### `DefaultDelim` {#DefaultDelim}
20532053
2054−: Default list number delimiters are used.
2054+Default list number delimiters are used.
20552055
2056− See also: [OrderedList](#OrderedList)
2056+See also: [OrderedList](#OrderedList)
20572057
2058−[`Period`]{#Period}
2058+### `Period` {#Period}
20592059
2060−: List numbers are delimited by a period.
2060+List numbers are delimited by a period.
20612061
2062− See also: [OrderedList](#OrderedList)
2062+See also: [OrderedList](#OrderedList)
20632063
2064−[`OneParen`]{#OneParen}
2064+### `OneParen` {#OneParen}
20652065
2066−: List numbers are delimited by a single parenthesis.
2066+List numbers are delimited by a single parenthesis.
20672067
2068− See also: [OrderedList](#OrderedList)
2068+See also: [OrderedList](#OrderedList)
20692069
2070−[`TwoParens`]{#TwoParens}
2070+### `TwoParens` {#TwoParens}
20712071
2072−: List numbers are delimited by a double parentheses.
2072+List numbers are delimited by a double parentheses.
20732073
2074− See also: [OrderedList](#OrderedList)
2074+See also: [OrderedList](#OrderedList)
20752075
2076−[`DefaultStyle`]{#DefaultStyle}
2076+### `DefaultStyle` {#DefaultStyle}
20772077
2078−: List are numbered in the default style
2078+List are numbered in the default style
20792079
2080− See also: [OrderedList](#OrderedList)
2080+See also: [OrderedList](#OrderedList)
20812081
2082−[`Example`]{#Example}
2082+### `Example` {#Example}
20832083
2084−: List items are numbered as examples.
2084+List items are numbered as examples.
20852085
2086− See also: [OrderedList](#OrderedList)
2086+See also: [OrderedList](#OrderedList)
20872087
2088−[`Decimal`]{#Decimal}
2088+### `Decimal` {#Decimal}
20892089
2090−: List are numbered using decimal integers.
2090+List are numbered using decimal integers.
20912091
2092− See also: [OrderedList](#OrderedList)
2092+See also: [OrderedList](#OrderedList)
20932093
2094−[`LowerRoman`]{#LowerRoman}
2094+### `LowerRoman` {#LowerRoman}
20952095
2096−: List are numbered using lower-case roman numerals.
2096+List are numbered using lower-case roman numerals.
20972097
2098− See also: [OrderedList](#OrderedList)
2098+See also: [OrderedList](#OrderedList)
20992099
2100−[`UpperRoman`]{#UpperRoman}
2100+### `UpperRoman` {#UpperRoman}
21012101
2102−: List are numbered using upper-case roman numerals
2102+List are numbered using upper-case roman numerals
21032103
2104− See also: [OrderedList](#OrderedList)
2104+See also: [OrderedList](#OrderedList)
21052105
2106−[`LowerAlpha`]{#LowerAlpha}
2106+### `LowerAlpha` {#LowerAlpha}
21072107
2108−: List are numbered using lower-case alphabetic characters.
2108+List are numbered using lower-case alphabetic characters.
21092109
2110− See also: [OrderedList](#OrderedList)
2110+See also: [OrderedList](#OrderedList)
21112111
2112−[`UpperAlpha`]{#UpperAlpha}
2112+### `UpperAlpha` {#UpperAlpha}
21132113
2114−: List are numbered using upper-case alphabetic characters.
2114+List are numbered using upper-case alphabetic characters.
21152115
2116− See also: [OrderedList](#OrderedList)
2116+See also: [OrderedList](#OrderedList)
21172117
21182118## Helper functions
21192119
2120−[`pipe (command, args, input)`]{#pipe}
2120+### `pipe (command, args, input)` {#pipe}
21212121
2122−: Runs command with arguments, passing it some input, and
2123− returns the output.
2122+Runs command with arguments, passing it some input, and
2123+returns the output.
21242124
2125− Returns:
2125+Returns:
21262126
2127− - Output of command.
2127+- Output of command.
21282128
2129− Raises:
2129+Raises:
21302130
2131− - A table containing the keys `command`, `error_code`, and
2132− `output` is thrown if the command exits with a non-zero
2133− error code.
2131+- A table containing the keys `command`, `error_code`, and
2132+ `output` is thrown if the command exits with a non-zero
2133+ error code.
21342134
2135− Usage:
2135+Usage:
21362136
2137− local output = pandoc.pipe("sed", {"-e","s/a/b/"}, "abc")
2137+ local output = pandoc.pipe("sed", {"-e","s/a/b/"}, "abc")
21382138
2139−[`walk_block (element, filter)`]{#walk_block}
2139+### `walk_block (element, filter)` {#walk_block}
21402140
2141−: Apply a filter inside a block element, walking its contents.
2141+Apply a filter inside a block element, walking its contents.
21422142
2143− Parameters:
2143+Parameters:
21442144
2145− `element`:
2146− : the block element
2145+`element`:
2146+: the block element
21472147
2148− `filter`:
2149− : a lua filter (table of functions) to be applied within
2150− the block element
2148+`filter`:
2149+: a lua filter (table of functions) to be applied within
2150+ the block element
21512151
2152− Returns: the transformed block element
2152+Returns: the transformed block element
21532153
2154−[`walk_inline (element, filter)`]{#walk_inline}
2154+### `walk_inline (element, filter)` {#walk_inline}
21552155
2156−: Apply a filter inside an inline element, walking its
2157− contents.
2156+Apply a filter inside an inline element, walking its
2157+contents.
21582158
2159− Parameters:
2159+Parameters:
21602160
2161− `element`:
2162− : the inline element
2161+`element`:
2162+: the inline element
21632163
2164− `filter`:
2165− : a lua filter (table of functions) to be applied within
2166− the inline element
2164+`filter`:
2165+: a lua filter (table of functions) to be applied within
2166+ the inline element
21672167
2168− Returns: the transformed inline element
2168+Returns: the transformed inline element
21692169
2170−[`read (markup[, format])`]{#read}
2170+### `read (markup[, format])` {#read}
21712171
2172−: Parse the given string into a Pandoc document.
2172+Parse the given string into a Pandoc document.
21732173
2174− Parameters:
2174+Parameters:
21752175
2176− `markup`:
2177− : the markup to be parsed
2176+`markup`:
2177+: the markup to be parsed
21782178
2179− `format`:
2180− : format specification, defaults to \"markdown\".
2179+`format`:
2180+: format specification, defaults to \"markdown\".
21812181
2182− Returns: pandoc document
2182+Returns: pandoc document
21832183
2184− Usage:
2184+Usage:
21852185
2186− local org_markup = "/emphasis/" -- Input to be read
2187− local document = pandoc.read(org_markup, "org")
2188− -- Get the first block of the document
2189− local block = document.blocks[1]
2190− -- The inline element in that block is an `Emph`
2191− assert(block.content[1].t == "Emph")
2186+ local org_markup = "/emphasis/" -- Input to be read
2187+ local document = pandoc.read(org_markup, "org")
2188+ -- Get the first block of the document
2189+ local block = document.blocks[1]
2190+ -- The inline element in that block is an `Emph`
2191+ assert(block.content[1].t == "Emph")
21922192
21932193# Module pandoc.utils
21942194
21952195This module exposes internal pandoc functions and utility
21962196functions.
21972197
2198−[`blocks_to_inlines (blocks[, sep])`]{#utils-blocks_to_inlines}
2198+### `blocks_to_inlines (blocks[, sep])` {#utils-blocks_to_inlines}
21992199
2200−: Squash a list of blocks into a list of inlines.
2200+Squash a list of blocks into a list of inlines.
22012201
2202− Parameters:
2202+Parameters:
22032203
2204− `blocks`:
2205− : List of blocks to be flattened.
2204+`blocks`:
2205+: List of blocks to be flattened.
22062206
2207− `sep`:
2208− : List of inlines inserted as separator between two
2209− consecutive blocks; defaults to `{ pandoc.Space(),
2210− pandoc.Str'¶', pandoc.Space()}`.
2207+`sep`:
2208+: List of inlines inserted as separator between two
2209+ consecutive blocks; defaults to `{ pandoc.Space(),
2210+ pandoc.Str'¶', pandoc.Space()}`.
22112211
2212− Returns:
2212+Returns:
22132213
2214− - ({[Inline][#Inline]}) List of inlines
2214+- ({[Inline][#Inline]}) List of inlines
22152215
2216− Usage:
2216+Usage:
22172217
2218− local blocks = {
2219− pandoc.Para{ pandoc.Str 'Paragraph1' },
2220− pandoc.Para{ pandoc.Emph 'Paragraph2' }
2221− }
2222− local inlines = pandoc.utils.blocks_to_inlines(blocks)
2223− -- inlines = {
2224− -- pandoc.Str 'Paragraph1',
2225− -- pandoc.Space(), pandoc.Str'¶', pandoc.Space(),
2226− -- pandoc.Emph{ pandoc.Str 'Paragraph2' }
2227− -- }
2218+ local blocks = {
2219+ pandoc.Para{ pandoc.Str 'Paragraph1' },
2220+ pandoc.Para{ pandoc.Emph 'Paragraph2' }
2221+ }
2222+ local inlines = pandoc.utils.blocks_to_inlines(blocks)
2223+ -- inlines = {
2224+ -- pandoc.Str 'Paragraph1',
2225+ -- pandoc.Space(), pandoc.Str'¶', pandoc.Space(),
2226+ -- pandoc.Emph{ pandoc.Str 'Paragraph2' }
2227+ -- }
22282228
2229−[`equals (element1, element2)`]{#utils-equals}
2229+### `equals (element1, element2)` {#utils-equals}
22302230
2231−: Test equality of AST elements. Elements in Lua are considered
2232− equal if and only if the objects obtained by unmarshaling are
2233− equal.
2231+Test equality of AST elements. Elements in Lua are considered
2232+equal if and only if the objects obtained by unmarshaling are
2233+equal.
22342234
2235− Parameters:
2235+Parameters:
22362236
2237− `element1`, `element2`:
2238− : Objects to be compared. Acceptable input types are
2239− [Pandoc](#type-ref-pandoc), [Meta](#type-ref-meta),
2240− [MetaValue](#type-ref-MetaValue),
2241− [Block](#type-ref-Block), [Inline](#type-ref-Inline),
2242− [Attr](#type-ref-Attr),
2243− [ListAttributes](#type-ref-ListAttributes), and
2244− [Citation](#type-ref-Citation).
2237+`element1`, `element2`:
2238+: Objects to be compared. Acceptable input types are
2239+ [Pandoc](#type-ref-pandoc), [Meta](#type-ref-meta),
2240+ [MetaValue](#type-ref-MetaValue),
2241+ [Block](#type-ref-Block), [Inline](#type-ref-Inline),
2242+ [Attr](#type-ref-Attr),
2243+ [ListAttributes](#type-ref-ListAttributes), and
2244+ [Citation](#type-ref-Citation).
22452245
2246− Returns:
2246+Returns:
22472247
2248− - Whether the two objects represent the same element
2249− (boolean)
2248+- Whether the two objects represent the same element
2249+ (boolean)
22502250
2251−[`hierarchicalize (blocks)`]{#utils-hierarchicalize}
2251+### `hierarchicalize (blocks)` {#utils-hierarchicalize}
22522252
2253−: Convert list of blocks into an hierarchical list. An
2254− hierarchical elements is either a normal block (but no
2255− Header), or a `Sec` element. The latter has the following
2256− fields:
2253+Convert list of blocks into an hierarchical list. An
2254+hierarchical elements is either a normal block (but no
2255+Header), or a `Sec` element. The latter has the following
2256+fields:
22572257
2258− - level: level in the document hierarchy;
2259− - numbering: list of integers of length `level`,
2260− specifying the absolute position of the section in the
2261− document;
2262− - attr: section attributes (see [Attr](#Attr));
2263− - contents: nested list of hierarchical elements.
2258+- level: level in the document hierarchy;
2259+- numbering: list of integers of length `level`,
2260+ specifying the absolute position of the section in the
2261+ document;
2262+- attr: section attributes (see [Attr](#Attr));
2263+- contents: nested list of hierarchical elements.
22642264
2265− Returns:
2265+Returns:
22662266
2267− - List of hierarchical elements
2267+- List of hierarchical elements
22682268
2269− Usage:
2269+Usage:
22702270
2271− local blocks = {
2272− pandoc.Header(2, pandoc.Str 'first'),
2273− pandoc.Header(2, pandoc.Str 'second'),
2274− }
2275− local elements = pandoc.utils.hierarchicalize(blocks)
2276− print(table.concat(elements[1].numbering, '.')) -- 0.1
2277− print(table.concat(elements[2].numbering, '.')) -- 0.2
2271+ local blocks = {
2272+ pandoc.Header(2, pandoc.Str 'first'),
2273+ pandoc.Header(2, pandoc.Str 'second'),
2274+ }
2275+ local elements = pandoc.utils.hierarchicalize(blocks)
2276+ print(table.concat(elements[1].numbering, '.')) -- 0.1
2277+ print(table.concat(elements[2].numbering, '.')) -- 0.2
22782278
2279−[`run_json_filter (doc, filter[, args])`]{#utils-run_json_filter}
2279+### `run_json_filter (doc, filter[, args])` {#utils-run_json_filter}
22802280
2281−: Filter the given doc by passing it through the a JSON filter.
2281+Filter the given doc by passing it through the a JSON filter.
22822282
2283− Parameters:
2283+Parameters:
22842284
2285− `doc`:
2286− : the Pandoc document to filter
2285+`doc`:
2286+: the Pandoc document to filter
22872287
2288− `filter`:
2289− : filter to run
2288+`filter`:
2289+: filter to run
22902290
2291− `args`:
2292− : list of arguments passed to the filter. Defaults to
2293− `{FORMAT}`.
2291+`args`:
2292+: list of arguments passed to the filter. Defaults to
2293+ `{FORMAT}`.
22942294
2295− Returns:
2295+Returns:
22962296
2297− - ([Pandoc](#Pandoc)) Filtered document
2297+- ([Pandoc](#Pandoc)) Filtered document
22982298
2299− Usage:
2299+Usage:
23002300
2301− -- Assumes `some_blocks` contains blocks for which a
2302− -- separate literature section is required.
2303− local sub_doc = pandoc.Pandoc(some_blocks, metadata)
2304− sub_doc_with_bib = pandoc.utils.run_json_filter(
2305− sub_doc,
2306− 'pandoc-citeproc'
2307− )
2308− some_blocks = sub_doc.blocks -- some blocks with bib
2301+ -- Assumes `some_blocks` contains blocks for which a
2302+ -- separate literature section is required.
2303+ local sub_doc = pandoc.Pandoc(some_blocks, metadata)
2304+ sub_doc_with_bib = pandoc.utils.run_json_filter(
2305+ sub_doc,
2306+ 'pandoc-citeproc'
2307+ )
2308+ some_blocks = sub_doc.blocks -- some blocks with bib
23092309
2310−[`normalize_date (date_string)`]{#utils-normalize_date}
2310+### `normalize_date (date_string)` {#utils-normalize_date}
23112311
2312−: Parse a date and convert (if possible) to "YYYY-MM-DD"
2313− format. We limit years to the range 1601-9999 (ISO 8601
2314− accepts greater than or equal to 1583, but MS Word only
2315− accepts dates starting 1601).
2312+Parse a date and convert (if possible) to "YYYY-MM-DD"
2313+format. We limit years to the range 1601-9999 (ISO 8601
2314+accepts greater than or equal to 1583, but MS Word only
2315+accepts dates starting 1601).
23162316
2317− Returns:
2317+Returns:
23182318
2319− - A date string, or nil when the conversion failed.
2319+- A date string, or nil when the conversion failed.
23202320
2321−[`sha1 (contents)`]{#utils-sha1}
2321+### `sha1 (contents)` {#utils-sha1}
23222322
2323−: Returns the SHA1 has of the contents.
2323+Returns the SHA1 has of the contents.
23242324
2325− Returns:
2325+Returns:
23262326
2327− - SHA1 hash of the contents.
2327+- SHA1 hash of the contents.
23282328
2329− Usage:
2329+Usage:
23302330
2331− local fp = pandoc.utils.sha1("foobar")
2331+ local fp = pandoc.utils.sha1("foobar")
23322332
2333−[`stringify (element)`]{#utils-stringify}
2333+### `stringify (element)` {#utils-stringify}
23342334
2335−: Converts the given element (Pandoc, Meta, Block, or Inline)
2336− into a string with all formatting removed.
2335+Converts the given element (Pandoc, Meta, Block, or Inline)
2336+into a string with all formatting removed.
23372337
2338− Returns:
2338+Returns:
23392339
2340− - A plain string representation of the given element.
2340+- A plain string representation of the given element.
23412341
2342− Usage:
2342+Usage:
23432343
2344− local inline = pandoc.Emph{pandoc.Str 'Moin'}
2345− -- outputs "Moin"
2346− print(pandoc.utils.stringify(inline))
2344+ local inline = pandoc.Emph{pandoc.Str 'Moin'}
2345+ -- outputs "Moin"
2346+ print(pandoc.utils.stringify(inline))
23472347
2348−[`to_roman_numeral (integer)`]{#utils-to_roman_numeral}
2348+### `to_roman_numeral (integer)` {#utils-to_roman_numeral}
23492349
2350−: Converts an integer \< 4000 to uppercase roman numeral.
2350+Converts an integer \< 4000 to uppercase roman numeral.
23512351
2352− Returns:
2352+Returns:
23532353
2354− - A roman numeral string.
2354+- A roman numeral string.
23552355
2356− Usage:
2356+Usage:
23572357
2358− local to_roman_numeral = pandoc.utils.to_roman_numeral
2359− local pandoc_birth_year = to_roman_numeral(2006)
2360− -- pandoc_birth_year == 'MMVI'
2358+ local to_roman_numeral = pandoc.utils.to_roman_numeral
2359+ local pandoc_birth_year = to_roman_numeral(2006)
2360+ -- pandoc_birth_year == 'MMVI'
23612361
23622362# Module pandoc.mediabag
23632363
@@ -2365,82 +2365,82 @@ The `pandoc.mediabag` module allows accessing pandoc's media
23652365storage. The "media bag" is used when pandoc is called with the
23662366`--extract-media` or `--standalone`/`-s` option.
23672367
2368−[`insert (filepath, mime_type, contents)`]{#mediabag-insert}
2368+### `insert (filepath, mime_type, contents)` {#mediabag-insert}
23692369
2370−: Adds a new entry to pandoc's media bag.
2370+Adds a new entry to pandoc's media bag.
23712371
2372− Parameters:
2372+Parameters:
23732373
2374− `filepath`:
2375− : filename and path relative to the output folder.
2374+`filepath`:
2375+: filename and path relative to the output folder.
23762376
2377− `mime_type`:
2378− : the file's MIME type
2377+`mime_type`:
2378+: the file's MIME type
23792379
2380− `contents`:
2381− : the binary contents of the file.
2380+`contents`:
2381+: the binary contents of the file.
23822382
2383− Usage:
2383+Usage:
23842384
2385− local fp = "media/hello.txt"
2386− local mt = "text/plain"
2387− local contents = "Hello, World!"
2388− pandoc.mediabag(fp, mt, contents)
2385+ local fp = "media/hello.txt"
2386+ local mt = "text/plain"
2387+ local contents = "Hello, World!"
2388+ pandoc.mediabag(fp, mt, contents)
23892389
2390−[`list ()`]{#mediabag-list}
2390+### `list ()` {#mediabag-list}
23912391
2392−: Get a summary of the current media bag contents.
2392+Get a summary of the current media bag contents.
23932393
2394− Returns: A list of elements summarizing each entry in the
2395− media bag. The summary item contains the keys `path`,
2396− `type`, and `length`, giving the filepath, MIME type, and
2397− length of contents in bytes, respectively.
2394+Returns: A list of elements summarizing each entry in the
2395+media bag. The summary item contains the keys `path`,
2396+`type`, and `length`, giving the filepath, MIME type, and
2397+length of contents in bytes, respectively.
23982398
2399− Usage:
2399+Usage:
24002400
2401− -- calculate the size of the media bag.
2402− local mb_items = pandoc.mediabag.list()
2403− local sum = 0
2404− for i = 1, #mb_items:
2405− sum = sum + mb_items[i].length
2406− end
2407− print(sum)
2401+ -- calculate the size of the media bag.
2402+ local mb_items = pandoc.mediabag.list()
2403+ local sum = 0
2404+ for i = 1, #mb_items:
2405+ sum = sum + mb_items[i].length
2406+ end
2407+ print(sum)
24082408
2409−[`lookup (filepath)`]{#mediabag-lookup}
2409+### `lookup (filepath)` {#mediabag-lookup}
24102410
2411−: Lookup a media item in the media bag, returning mime type
2412− and contents.
2411+Lookup a media item in the media bag, returning mime type
2412+and contents.
24132413
2414− Parameters:
2414+Parameters:
24152415
2416− `filepath`:
2417− : name of the file to look up.
2416+`filepath`:
2417+: name of the file to look up.
24182418
2419− Returns:
2419+Returns:
24202420
2421− - the entries MIME type, or nil if the file was not found.
2422− - contents of the file, or nil if the file was not found.
2421+- the entries MIME type, or nil if the file was not found.
2422+- contents of the file, or nil if the file was not found.
24232423
2424− Usage:
2424+Usage:
24252425
2426− local filename = "media/diagram.png"
2427− local mt, contents = pandoc.mediabag.lookup(filename)
2426+ local filename = "media/diagram.png"
2427+ local mt, contents = pandoc.mediabag.lookup(filename)
24282428
2429−[`fetch (source, base_url)`]{#mediabag-fetch}
2429+### `fetch (source, base_url)` {#mediabag-fetch}
24302430
2431−: Fetches the given source from a URL or local file. Returns
2432− two values: the contents of the file and the mime type (or
2433− an empty string).
2431+Fetches the given source from a URL or local file. Returns
2432+two values: the contents of the file and the mime type (or
2433+an empty string).
24342434
2435− Returns:
2435+Returns:
24362436
2437− - the entries MIME type, or nil if the file was not found.
2438− - contents of the file, or nil if the file was not found.
2437+- the entries MIME type, or nil if the file was not found.
2438+- contents of the file, or nil if the file was not found.
24392439
2440− Usage:
2440+Usage:
24412441
2442− local diagram_url = "https://pandoc.org/diagram.jpg"
2443− local contents = pandoc.mediabag.fetch(diagram_url, ".")
2442+ local diagram_url = "https://pandoc.org/diagram.jpg"
2443+ local contents = pandoc.mediabag.fetch(diagram_url, ".")
24442444
24452445# Module pandoc.List
24462446
@@ -2448,99 +2448,99 @@ Pandoc\'s List type and helper methods
24482448
24492449## Metamethods
24502450
2451−[`pandoc.List:__concat (list)`]{#pandoc.List:__concat}
2451+### `pandoc.List:__concat (list)` {#pandoc.List:__concat}
24522452
2453−: Concatenates two lists.
2453+Concatenates two lists.
24542454
2455− Parameters:
2455+Parameters:
24562456
2457− `list`:
2458− : second list concatenated to the first
2457+`list`:
2458+: second list concatenated to the first
24592459
2460− Returns: a new list containing all elements from list1 and
2461− list2
2460+Returns: a new list containing all elements from list1 and
2461+list2
24622462
24632463## Methods
24642464
2465−[`pandoc.List:clone ()`]{#pandoc.List:clone}
2465+`pandoc.List:clone ()` {#pandoc.List:clone}
24662466
2467−: Returns a (shallow) copy of the list.
2467+Returns a (shallow) copy of the list.
24682468
2469−[`pandoc.List:includes (needle, init)`]{#pandoc.List:includes}
2469+### `pandoc.List:includes (needle, init)` {#pandoc.List:includes}
24702470
2471−: Checks if the list has an item equal to the given needle.
2471+Checks if the list has an item equal to the given needle.
24722472
2473− Parameters:
2473+Parameters:
24742474
2475− `needle`:
2476− : item to search for
2475+`needle`:
2476+: item to search for
24772477
2478− `init`:
2479− : index at which the search is started
2478+`init`:
2479+: index at which the search is started
24802480
2481− Returns: true if a list item is equal to the needle, false
2482− otherwise
2481+Returns: true if a list item is equal to the needle, false
2482+otherwise
24832483
2484−[`pandoc.List:find (needle, init)`]{#pandoc.List:find}
2484+### `pandoc.List:find (needle, init)` {#pandoc.List:find}
24852485
2486−: Returns the value and index of the first occurrence of the
2487− given item.
2486+Returns the value and index of the first occurrence of the
2487+given item.
24882488
2489− Parameters:
2489+Parameters:
24902490
2491− `needle`:
2492− : item to search for
2491+`needle`:
2492+: item to search for
24932493
2494− `init`:
2495− : index at which the search is started
2494+`init`:
2495+: index at which the search is started
24962496
2497− Returns: first item equal to the needle, or nil if no such
2498− item exists.
2497+Returns: first item equal to the needle, or nil if no such
2498+item exists.
24992499
2500−[`pandoc.List:find_if (pred, init)`]{#pandoc.List:find_if}
2500+### `pandoc.List:find_if (pred, init)` {#pandoc.List:find_if}
25012501
2502−: Returns the value and index of the first element for which
2503− the predicate holds true.
2502+Returns the value and index of the first element for which
2503+the predicate holds true.
25042504
2505− Parameters:
2505+Parameters:
25062506
2507− `pred`:
2508− : the predicate function
2507+`pred`:
2508+: the predicate function
25092509
2510− `init`:
2511− : index at which the search is started
2510+`init`:
2511+: index at which the search is started
25122512
2513− Returns: first item for which \`test\` succeeds, or nil if
2514− no such item exists.
2513+Returns: first item for which \`test\` succeeds, or nil if
2514+no such item exists.
25152515
2516−[`pandoc.List:extend (list)`]{#pandoc.List:extend}
2516+### `pandoc.List:extend (list)` {#pandoc.List:extend}
25172517
2518−: Adds the given list to the end of this list.
2518+Adds the given list to the end of this list.
25192519
2520− Parameters:
2520+Parameters:
25212521
2522− `list`:
2523− : list to appended
2522+`list`:
2523+: list to appended
25242524
2525−[`pandoc.List:map (fn)`]{#pandoc.List:map}
2525+### `pandoc.List:map (fn)` {#pandoc.List:map}
25262526
2527−: Returns a copy of the current list by applying the given
2528− function to all elements.
2527+Returns a copy of the current list by applying the given
2528+function to all elements.
25292529
2530− Parameters:
2530+Parameters:
25312531
2532− `fn`:
2533− : function which is applied to all list items.
2532+`fn`:
2533+: function which is applied to all list items.
25342534
2535−[`pandoc.List:filter (pred)`]{#pandoc.List:filter}
2535+### `pandoc.List:filter (pred)` {#pandoc.List:filter}
25362536
2537−: Returns a new list containing all items satisfying a given
2538− condition.
2537+Returns a new list containing all items satisfying a given
2538+condition.
25392539
2540− Parameters:
2540+Parameters:
25412541
2542− `pred`:
2543− : condition items must satisfy.
2542+`pred`:
2543+: condition items must satisfy.
25442544
2545− Returns: a new list containing all items for which \`test\`
2546− was true.
2545+Returns: a new list containing all items for which \`test\`
2546+was true.