4Copyright © 2017–2019 Albert Krewinkel
6Permission to use, copy, modify, and/or distribute this software for any purpose
7with or without fee is hereby granted, provided that the above copyright notice
8and this permission notice appear in all copies.
10THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
12FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
14OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
20-- Lua functions for pandoc scripts.
22-- @author Albert Krewinkel
23-- @copyright © 2017–2019 Albert Krewinkel
27-- Re-export bundled modules
28M.List = require 'pandoc.List'
29M.mediabag = require 'pandoc.mediabag'
30M.system = require 'pandoc.system'
31M.utils = require 'pandoc.utils'
32M.text = require 'text'
34-- Local names for modules which this module depends on.
39------------------------------------------------------------------------
42-- Create metatables which allow to access numerical indices via accessor
47--- Create a new indexing function.
48-- @param template function template
49-- @param indices list of indices, starting with the most deeply nested
50-- @return newly created function
52function make_indexing_function(template, indices)
53 local loadstring = loadstring or load
55 for i = 1, #indices do
56 bracketed[i] = string.format('[%d]', indices[#indices - i + 1])
58 local fnstr = string.format('return ' .. template, table.concat(bracketed))
59 return assert(loadstring(fnstr))()
62--- Create accessor functions using a function template.
63-- @param fn_template function template in which '%s' is replacd with indices
64-- @param accessors list of accessors
65-- @return mapping from accessor names to accessor functions
67local function create_accessor_functions (fn_template, accessors)
69 function add_accessors(acc, ...)
70 if type(acc) == 'string' then
71 res[acc] = make_indexing_function(fn_template, {...})
72 elseif type(acc) == 'table' and #acc == 0 and next(acc) then
73 local name, substructure = next(acc)
74 res[name] = make_indexing_function(fn_template, {...})
75 add_accessors(substructure, ...)
77 for i = 1, #(acc or {}) do
78 add_accessors(acc[i], i, ...)
82 add_accessors(accessors)
86--- Get list of top-level fields from field descriptor table.
87-- E.g.: `top_level_fields{'foo', {bar='baz'}, {'qux', 'quux'}}`
88-- gives {'foo, 'bar', 'qux', 'quux'}
90local function top_level_fields (fields)
91 local result = List:new{}
92 for _, v in ipairs(fields) do
93 if type(v) == 'string' then
94 table.insert(result, v)
95 elseif type(v) == 'table' and #v == 0 and next(v) then
96 table.insert(result, (next(v)))
98 result:extend(top_level_fields(v))
104--- Creates a function which behaves like next, but respects field names.
106local function make_next_function (fields)
107 local field_indices = {}
108 for i, f in ipairs(fields) do
112 return function (t, field)
113 local raw_idx = field == nil and 0 or field_indices[field]
114 local next_field = fields[raw_idx + 1]
115 return next_field, t[next_field]
119--- Create a new table which allows to access numerical indices via accessor
122local function create_accessor_behavior (tag, accessors)
123 local behavior = {tag = tag}
124 behavior.getters = create_accessor_functions(
125 'function (x) return x.c%s end',
128 behavior.setters = create_accessor_functions(
129 'function (x, v) x.c%s = v end',
132 behavior.__eq = utils.equals
133 behavior.__index = function(t, k)
134 if getmetatable(t).getters[k] then
135 return getmetatable(t).getters[k](t)
137 return getmetatable(t)["tag"]
139 return getmetatable(t)[k]
142 behavior.__newindex = function(t, k, v)
143 if getmetatable(t).setters[k] then
144 getmetatable(t).setters[k](t, v)
149 behavior.__pairs = function (t)
150 if accessors == nil then
153 local iterable_fields = type(accessors) == 'string'
155 or top_level_fields(accessors)
156 return make_next_function(iterable_fields), t
162------------------------------------------------------------------------
163-- The base class for types
173 setmetatable(obj, self)
177Type.behavior.__index = Type.behavior
179--- Set a new behavior for the type, inheriting that of the parent type if none
180--- is specified explicitly
181-- @param behavior the behavior object for this type.
183function Type:set_behavior (behavior)
184 behavior = behavior or {}
185 behavior.__index = rawget(behavior, '__index') or behavior
186 behavior.__type = self
187 if not getmetatable(behavior) and getmetatable(self) then
188 setmetatable(behavior, getmetatable(self).behavior)
190 self.behavior = behavior
193--- Create a new subtype, using the given table as base.
194-- @param name name of the new type
195-- @param[opt] behavior behavioral object for the new type.
198function Type:make_subtype(name, behavior)
199 local newtype = setmetatable({}, self)
201 newtype.__index = newtype
202 newtype:set_behavior(behavior)
207------------------------------------------------------------------------
208-- The base class for pandoc's AST elements.
211local AstElement = Type:make_subtype 'AstElement'
212AstElement.__call = function(t, ...)
213 local success, ret = pcall(t.new, t, ...)
215 return setmetatable(ret, t.behavior)
217 error(string.format('Constructor for %s failed: %s\n', t.name, ret))
221--- Make a new subtype which constructs a new value when called.
223function AstElement:make_subtype(...)
224 local newtype = Type.make_subtype(self, ...)
225 newtype.__call = self.__call
229--- Create a new constructor
231-- @param tag Tag used to identify the constructor
232-- @param fn Function to be called when constructing a new element
233-- @param accessors names to use as accessors for numerical fields
234-- @return function that constructs a new element
235function AstElement:create_constructor(tag, fn, accessors)
236 local constr = self:make_subtype(tag, create_accessor_behavior(tag, accessors))
237 function constr:new(...)
238 return setmetatable(fn(...), self.behavior)
240 self.constructor = self.constructor or {}
241 self.constructor[tag] = constr
245--- Convert AstElement input into a list if necessary.
247local function ensureList (x)
249 -- Lists are not tagged, but all elements are
256--- Ensure a given object is an Inline element, or convert it into one.
258local function ensureInlineList (x)
259 if type(x) == 'string' then
260 return List:new{M.Str(x)}
266--- Ensure that the given object is a definition pair, convert if necessary.
268local function ensureDefinitionPairs (pair)
269 local inlines = ensureInlineList(pair[1] or {})
270 local blocks = ensureList(pair[2] or {}):map(ensureList)
271 return {inlines, blocks}
274------------------------------------------------------------------------
278--- A complete pandoc document
280-- @tparam {Block,...} blocks document content
281-- @tparam[opt] Meta meta document meta data
282M.Pandoc = AstElement:make_subtype'Pandoc'
283function M.Pandoc:new (blocks, meta)
285 blocks = ensureList(blocks),
290-- DEPRECATED synonym:
293------------------------------------------------------------------------
297--- Create a new Meta object. It sets the metatable of the given table to
300-- @tparam meta table table containing document meta information
301M.Meta = AstElement:make_subtype'Meta'
302function M.Meta:new (meta) return meta end
305------------------------------------------------------------------------
308M.MetaValue = AstElement:make_subtype('MetaValue')
311-- @function MetaBlocks
312-- @tparam {Block,...} blocks blocks
313M.MetaBlocks = M.MetaValue:create_constructor(
315 function (content) return ensureList(content) end
319-- @function MetaInlines
320-- @tparam {Inline,...} inlines inlines
321M.MetaInlines = M.MetaValue:create_constructor(
323 function (content) return ensureInlineList(content) end
328-- @tparam {MetaValue,...} meta_values list of meta values
329M.MetaList = M.MetaValue:create_constructor(
332 if content.tag == 'MetaList' then
335 return ensureList(content)
338for k, v in pairs(List) do
339 M.MetaList.behavior[k] = v
344-- @tparam table key_value_map a string-indexed map of meta values
345M.MetaMap = M.MetaValue:create_constructor(
347 function (mm) return mm end
350--- Creates string to be used in meta data.
351-- Does nothing, lua strings are meta strings.
352-- @function MetaString
353-- @tparam string str string value
354function M.MetaString(str)
358--- Creates boolean to be used in meta data.
359-- Does nothing, lua booleans are meta booleans.
361-- @tparam boolean bool boolean value
362function M.MetaBool(bool)
366------------------------------------------------------------------------
371M.Block = AstElement:make_subtype'Block'
373--- Creates a block quote element
374-- @function BlockQuote
375-- @tparam {Block,...} content block content
376-- @treturn Block block quote element
377M.BlockQuote = M.Block:create_constructor(
379 function(content) return {c = ensureList(content)} end,
383--- Creates a bullet (i.e. unordered) list.
384-- @function BulletList
385-- @tparam {{Block,...},...} content list of items
386-- @treturn Block bullet list element
387M.BulletList = M.Block:create_constructor(
389 function(content) return {c = ensureList(content):map(ensureList)} end,
393--- Creates a code block element
394-- @function CodeBlock
395-- @tparam string text code string
396-- @tparam[opt] Attr attr element attributes
397-- @treturn Block code block element
398M.CodeBlock = M.Block:create_constructor(
400 function(text, attr) return {c = {attr or M.Attr(), text}} end,
401 {{attr = {"identifier", "classes", "attributes"}}, "text"}
404--- Creates a definition list, containing terms and their explanation.
405-- @function DefinitionList
406-- @tparam {{{Inline,...},{{Block,...}}},...} content list of items
407-- @treturn Block definition list element
408M.DefinitionList = M.Block:create_constructor(
411 return {c = ensureList(content):map(ensureDefinitionPairs)}
416--- Creates a div element
418-- @tparam {Block,...} content block content
419-- @tparam[opt] Attr attr element attributes
420-- @treturn Block div element
421M.Div = M.Block:create_constructor(
423 function(content, attr)
424 return {c = {attr or M.Attr(), ensureList(content)}}
426 {{attr = {"identifier", "classes", "attributes"}}, "content"}
429--- Creates a header element.
431-- @tparam int level header level
432-- @tparam {Inline,...} content inline content
433-- @tparam[opt] Attr attr element attributes
434-- @treturn Block header element
435M.Header = M.Block:create_constructor(
437 function(level, content, attr)
438 return {c = {level, attr or M.Attr(), ensureInlineList(content)}}
440 {"level", {attr = {"identifier", "classes", "attributes"}}, "content"}
443--- Creates a horizontal rule.
444-- @function HorizontalRule
445-- @treturn Block horizontal rule
446M.HorizontalRule = M.Block:create_constructor(
448 function() return {} end
451--- Creates a line block element.
452-- @function LineBlock
453-- @tparam {{Inline,...},...} content inline content
454-- @treturn Block line block element
455M.LineBlock = M.Block:create_constructor(
457 function(content) return {c = ensureList(content):map(ensureInlineList)} end,
461--- Creates a null element.
463-- @treturn Block null element
464M.Null = M.Block:create_constructor(
466 function() return {} end
469--- Creates an ordered list.
470-- @function OrderedList
471-- @tparam {{Block,...},...} items list items
472-- @param[opt] listAttributes list parameters
473-- @treturn Block ordered list element
474M.OrderedList = M.Block:create_constructor(
476 function(items, listAttributes)
477 listAttributes = listAttributes or M.ListAttributes()
478 return {c = {listAttributes, ensureList(items):map(ensureList)}}
480 {{listAttributes = {"start", "style", "delimiter"}}, "content"}
483--- Creates a para element.
485-- @tparam {Inline,...} content inline content
486-- @treturn Block paragraph element
487M.Para = M.Block:create_constructor(
489 function(content) return {c = ensureInlineList(content)} end,
493--- Creates a plain element.
495-- @tparam {Inline,...} content inline content
496-- @treturn Block plain element
497M.Plain = M.Block:create_constructor(
499 function(content) return {c = ensureInlineList(content)} end,
503--- Creates a raw content block of the specified format.
505-- @tparam string format format of content
506-- @tparam string text string content
507-- @treturn Block raw block element
508M.RawBlock = M.Block:create_constructor(
510 function(format, text) return {c = {format, text}} end,
514--- Creates a table element.
516-- @tparam {Inline,...} caption table caption
517-- @tparam {AlignDefault|AlignLeft|AlignRight|AlignCenter,...} aligns alignments
518-- @tparam {int,...} widths column widths
519-- @tparam {Block,...} headers header row
520-- @tparam {{Block,...}} rows table rows
521-- @treturn Block table element
522M.Table = M.Block:create_constructor(
524 function(caption, aligns, widths, headers, rows)
527 ensureInlineList(caption),
535 {"caption", "aligns", "widths", "headers", "rows"}
539------------------------------------------------------------------------
543--- Inline element class
544M.Inline = AstElement:make_subtype'Inline'
546--- Creates a Cite inline element
548-- @tparam {Inline,...} content List of inlines
549-- @tparam {Citation,...} citations List of citations
550-- @treturn Inline citations element
551M.Cite = M.Inline:create_constructor(
553 function(content, citations)
554 return {c = {ensureList(citations), ensureInlineList(content)}}
556 {"citations", "content"}
559--- Creates a Code inline element
561-- @tparam string text code string
562-- @tparam[opt] Attr attr additional attributes
563-- @treturn Inline code element
564M.Code = M.Inline:create_constructor(
566 function(text, attr) return {c = {attr or M.Attr(), text}} end,
567 {{attr = {"identifier", "classes", "attributes"}}, "text"}
570--- Creates an inline element representing emphasised text.
572-- @tparam {Inline,..} content inline content
573-- @treturn Inline emphasis element
574M.Emph = M.Inline:create_constructor(
576 function(content) return {c = ensureInlineList(content)} end,
580--- Creates a Image inline element
582-- @tparam {Inline,..} caption text used to describe the image
583-- @tparam string src path to the image file
584-- @tparam[opt] string title brief image description
585-- @tparam[opt] Attr attr additional attributes
586-- @treturn Inline image element
587M.Image = M.Inline:create_constructor(
589 function(caption, src, title, attr)
591 attr = attr or M.Attr()
592 return {c = {attr, ensureInlineList(caption), {src, title}}}
594 {{attr = {"identifier", "classes", "attributes"}}, "caption", {"src", "title"}}
597--- Create a LineBreak inline element
598-- @function LineBreak
599-- @treturn Inline linebreak element
600M.LineBreak = M.Inline:create_constructor(
602 function() return {} end
605--- Creates a link inline element, usually a hyperlink.
607-- @tparam {Inline,..} content text for this link
608-- @tparam string target the link target
609-- @tparam[opt] string title brief link description
610-- @tparam[opt] Attr attr additional attributes
611-- @treturn Inline image element
612M.Link = M.Inline:create_constructor(
614 function(content, target, title, attr)
616 attr = attr or M.Attr()
617 return {c = {attr, ensureInlineList(content), {target, title}}}
619 {{attr = {"identifier", "classes", "attributes"}}, "content", {"target", "title"}}
622--- Creates a Math element, either inline or displayed.
624-- @tparam "InlineMath"|"DisplayMath" mathtype rendering specifier
625-- @tparam string text Math content
626-- @treturn Inline Math element
627M.Math = M.Inline:create_constructor(
629 function(mathtype, text)
630 return {c = {mathtype, text}}
634--- Creates a DisplayMath element (DEPRECATED).
635-- @function DisplayMath
636-- @tparam string text Math content
637-- @treturn Inline Math element
638M.DisplayMath = M.Inline:create_constructor(
640 function(text) return M.Math("DisplayMath", text) end,
643--- Creates an InlineMath inline element (DEPRECATED).
644-- @function InlineMath
645-- @tparam string text Math content
646-- @treturn Inline Math element
647M.InlineMath = M.Inline:create_constructor(
649 function(text) return M.Math("InlineMath", text) end,
653--- Creates a Note inline element
655-- @tparam {Block,...} content footnote block content
656M.Note = M.Inline:create_constructor(
658 function(content) return {c = ensureList(content)} end,
662--- Creates a Quoted inline element given the quote type and quoted content.
664-- @tparam "DoubleQuote"|"SingleQuote" quotetype type of quotes to be used
665-- @tparam {Inline,..} content inline content
666-- @treturn Inline quoted element
667M.Quoted = M.Inline:create_constructor(
669 function(quotetype, content)
670 return {c = {quotetype, ensureInlineList(content)}}
672 {"quotetype", "content"}
674--- Creates a single-quoted inline element (DEPRECATED).
675-- @function SingleQuoted
676-- @tparam {Inline,..} content inline content
677-- @treturn Inline quoted element
679M.SingleQuoted = M.Inline:create_constructor(
681 function(content) return M.Quoted(M.SingleQuote, content) end,
682 {"quotetype", "content"}
684--- Creates a single-quoted inline element (DEPRECATED).
685-- @function DoubleQuoted
686-- @tparam {Inline,..} content inline content
687-- @treturn Inline quoted element
689M.DoubleQuoted = M.Inline:create_constructor(
691 function(content) return M.Quoted("DoubleQuote", content) end,
692 {"quotetype", "content"}
695--- Creates a RawInline inline element
696-- @function RawInline
697-- @tparam string format format of the contents
698-- @tparam string text string content
699-- @treturn Inline raw inline element
700M.RawInline = M.Inline:create_constructor(
702 function(format, text) return {c = {format, text}} end,
706--- Creates text rendered in small caps
707-- @function SmallCaps
708-- @tparam {Inline,..} content inline content
709-- @treturn Inline smallcaps element
710M.SmallCaps = M.Inline:create_constructor(
712 function(content) return {c = ensureInlineList(content)} end,
716--- Creates a SoftBreak inline element.
717-- @function SoftBreak
718-- @treturn Inline softbreak element
719M.SoftBreak = M.Inline:create_constructor(
721 function() return {} end
724--- Create a Space inline element
726-- @treturn Inline space element
727M.Space = M.Inline:create_constructor(
729 function() return {} end
732--- Creates a Span inline element
734-- @tparam {Inline,..} content inline content
735-- @tparam[opt] Attr attr additional attributes
736-- @treturn Inline span element
737M.Span = M.Inline:create_constructor(
739 function(content, attr)
740 return {c = {attr or M.Attr(), ensureInlineList(content)}}
742 {{attr = {"identifier", "classes", "attributes"}}, "content"}
745--- Creates a Str inline element
747-- @tparam string text content
748-- @treturn Inline string element
749M.Str = M.Inline:create_constructor(
751 function(text) return {c = text} end,
755--- Creates text which is striked out.
756-- @function Strikeout
757-- @tparam {Inline,..} content inline content
758-- @treturn Inline strikeout element
759M.Strikeout = M.Inline:create_constructor(
761 function(content) return {c = ensureInlineList(content)} end,
765--- Creates a Strong element, whose text is usually displayed in a bold font.
767-- @tparam {Inline,..} content inline content
768-- @treturn Inline strong element
769M.Strong = M.Inline:create_constructor(
771 function(content) return {c = ensureInlineList(content)} end,
775--- Creates a Subscript inline element
776-- @function Subscript
777-- @tparam {Inline,..} content inline content
778-- @treturn Inline subscript element
779M.Subscript = M.Inline:create_constructor(
781 function(content) return {c = ensureInlineList(content)} end,
785--- Creates a Superscript inline element
786-- @function Superscript
787-- @tparam {Inline,..} content inline content
788-- @treturn Inline strong element
789M.Superscript = M.Inline:create_constructor(
791 function(content) return {c = ensureInlineList(content)} end,
796------------------------------------------------------------------------
798-- @section components
800--- Check if the first element of a pair matches the given value.
801-- @param x key value to be checked
802-- @return function returning true iff first element of its argument matches x
804local function assoc_key_equals (x)
805 return function (y) return y[1] == x end
808--- Lookup a value in an associative list
811-- @tparam {{key, value},...} alist associative list
812-- @param key key for which the associated value is to be looked up
813local function lookup(alist, key)
814 return (List.find_if(alist, assoc_key_equals(key)) or {})[2]
817--- Return an iterator which returns key-value pairs of an associative list.
820-- @tparam {{key, value},...} alist associative list
821local apairs = function (alist)
825 cur = rawget(alist, i)
828 return cur[1], cur[2]
835--- AttributeList, a metatable to allow table-like access to attribute lists
836-- represented by associative lists.
838local AttributeList = {
839 __index = function (t, k)
840 if type(k) == "number" then
847 __newindex = function (t, k, v)
848 local cur, idx = List.find_if(t, assoc_key_equals(k))
853 elseif type(k) == "number" then
856 rawset(t, #t + 1, {k, v})
863--- Convert a table to an associative list. The order of key-value pairs in the
864-- alist is undefined. The table should either contain no numeric keys or
865-- already be an associative list.
867-- @tparam table tbl associative list or table without numeric keys.
868-- @treturn table associative list
869local to_alist = function (tbl)
870 if #tbl ~= 0 or next(tbl) == nil then
871 -- probably already an alist
876 for k, v in pairs(tbl) do
885--- Create a new set of attributes (Attr).
887-- @tparam[opt] string identifier element identifier
888-- @tparam[opt] {string,...} classes element classes
889-- @tparam[opt] table attributes table containing string keys and values
890-- @return element attributes
891M.Attr = AstElement:make_subtype'Attr'
892function M.Attr:new (identifier, classes, attributes)
893 identifier = identifier or ''
894 classes = ensureList(classes or {})
895 attributes = setmetatable(to_alist(attributes or {}), AttributeList)
896 return {identifier, classes, attributes}
898M.Attr.behavior._field_names = {identifier = 1, classes = 2, attributes = 3}
899M.Attr.behavior.__eq = utils.equals
900M.Attr.behavior.__index = function(t, k)
901 return rawget(t, getmetatable(t)._field_names[k]) or
904M.Attr.behavior.__newindex = function(t, k, v)
905 if getmetatable(t)._field_names[k] then
906 rawset(t, getmetatable(t)._field_names[k], v)
911M.Attr.behavior.__pairs = function(t)
912 local field_names = M.Attr.behavior._field_names
914 for name, i in pairs(field_names) do
917 return make_next_function(fields), t, nil
921M.Citation = AstElement:make_subtype'Citation'
923--- Creates a single citation.
925-- @tparam string id citation identifier (like a bibtex key)
926-- @tparam AuthorInText|SuppressAuthor|NormalCitation mode citation mode
927-- @tparam[opt] {Inline,...} prefix citation prefix
928-- @tparam[opt] {Inline,...} suffix citation suffix
929-- @tparam[opt] int note_num note number
930-- @tparam[opt] int hash hash number
931function M.Citation:new (id, mode, prefix, suffix, note_num, hash)
935 prefix = ensureList(prefix or {}),
936 suffix = ensureList(suffix or {}),
937 note_num = note_num or 0,
943M.ListAttributes = AstElement:make_subtype 'ListAttributes'
945--- Creates a set of list attributes.
946-- @function ListAttributes
947-- @tparam[opt] integer start number of the first list item
948-- @tparam[opt] string style style used for list numbering
949-- @tparam[opt] DefaultDelim|Period|OneParen|TwoParens delimiter delimiter of list numbers
950-- @treturn table list attributes table
951function M.ListAttributes:new (start, style, delimiter)
953 style = style or 'DefaultStyle'
954 delimiter = delimiter or 'DefaultDelim'
955 return {start, style, delimiter}
957M.ListAttributes.behavior._field_names = {start = 1, style = 2, delimiter = 3}
958M.ListAttributes.behavior.__eq = utils.equals
959M.ListAttributes.behavior.__index = function (t, k)
960 return rawget(t, getmetatable(t)._field_names[k]) or
963M.ListAttributes.behavior.__newindex = function (t, k, v)
964 if getmetatable(t)._field_names[k] then
965 rawset(t, getmetatable(t)._field_names[k], v)
970M.ListAttributes.behavior.__pairs = function(t)
971 local field_names = M.ListAttributes.behavior._field_names
973 for name, i in pairs(field_names) do
976 return make_next_function(fields), t, nil
980------------------------------------------------------------------------
984--- Author name is mentioned in the text.
987M.AuthorInText = "AuthorInText"
989--- Author name is suppressed.
992M.SuppressAuthor = "SuppressAuthor"
994--- Default citation style is used.
997M.NormalCitation = "NormalCitation"
999--- Table cells aligned left.
1001M.AlignLeft = "AlignLeft"
1003--- Table cells right-aligned.
1005M.AlignRight = "AlignRight"
1007--- Table cell content is centered.
1009M.AlignCenter = "AlignCenter"
1011--- Table cells are alignment is unaltered.
1013M.AlignDefault = "AlignDefault"
1015--- Default list number delimiters are used.
1017M.DefaultDelim = "DefaultDelim"
1019--- List numbers are delimited by a period.
1023--- List numbers are delimited by a single parenthesis.
1025M.OneParen = "OneParen"
1027--- List numbers are delimited by a double parentheses.
1029M.TwoParens = "TwoParens"
1031--- List are numbered in the default style
1033M.DefaultStyle = "DefaultStyle"
1035--- List items are numbered as examples.
1037M.Example = "Example"
1039--- List are numbered using decimal integers.
1041M.Decimal = "Decimal"
1043--- List are numbered using lower-case roman numerals.
1045M.LowerRoman = "LowerRoman"
1047--- List are numbered using upper-case roman numerals
1049M.UpperRoman = "UpperRoman"
1051--- List are numbered using lower-case alphabetic characters.
1053M.LowerAlpha = "LowerAlpha"
1055--- List are numbered using upper-case alphabetic characters.
1057M.UpperAlpha = "UpperAlpha"
1059------------------------------------------------------------------------
1060-- Functions which have moved to different modules
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list