diff options
Diffstat (limited to 'macros')
-rw-r--r-- | macros/generic/markdown/README.md | 24 | ||||
-rw-r--r-- | macros/generic/markdown/VERSION | 1 | ||||
-rw-r--r-- | macros/generic/markdown/examples/context.tex | 5 | ||||
-rw-r--r-- | macros/generic/markdown/examples/example.md | 6 | ||||
-rw-r--r-- | macros/generic/markdown/libraries/markdown-tinyyaml.lua | 838 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.dtx | 441 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.html | 5631 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.md | 302 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.pdf | bin | 729945 -> 738241 bytes | |||
-rw-r--r-- | macros/generic/witharrows/README.md | 2 | ||||
-rw-r--r-- | macros/generic/witharrows/witharrows-french.pdf | bin | 271551 -> 270159 bytes | |||
-rw-r--r-- | macros/generic/witharrows/witharrows-french.tex | 19 | ||||
-rw-r--r-- | macros/generic/witharrows/witharrows.dtx | 52 | ||||
-rw-r--r-- | macros/generic/witharrows/witharrows.pdf | bin | 647631 -> 682337 bytes |
14 files changed, 4149 insertions, 3172 deletions
diff --git a/macros/generic/markdown/README.md b/macros/generic/markdown/README.md index 0543947bd6..de007e36af 100644 --- a/macros/generic/markdown/README.md +++ b/macros/generic/markdown/README.md @@ -178,10 +178,12 @@ For further information, consult one of the following: - [Using Markdown inside TeX documents][tb119], - [Markdown 2.7.0: Towards lightweight markup in TeX][tb124], - [Making Markdown into a Microwave Meal][tb129], and - - [Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX][tb131-preprint]. -5. My journal articles published by [CSTUG][] (in Czech): - - [Rendering Markdown inside TeX Documents][10.5300/2016-1-4/78], and - - [Markdown 2.8.1: Boldly Unto the Throne of Lightweight Markup in TeX][10.5300/2020-1-2/48]. + - [Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX][tb131]. +5. Journal articles of me and my students published by [CSTUG][] (in Czech and Slovak): + - [Rendering Markdown inside TeX Documents][10.5300/2016-1-4/78], + - [Markdown 2.8.1: Boldly Unto the Throne of Lightweight Markup in TeX][10.5300/2020-1-2/48], + - [Markdown 2.10.0: LaTeX Themes & Snippets][10.5300/2021-1-4/76], and + - [Direct Typesetting of Various Document Formats in TeX Using the Pandoc Utility][10.5300/2021-1-4/83]. 6. My talks: - [Five Years of Markdown in LaTeX: What, Why, How, and Whereto][pv212-fall2020] (in Czech), and - [Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX][tb131-video] ([slides][tb131-slides]). @@ -196,18 +198,20 @@ For further information, consult one of the following: [tb119]: https://www.tug.org/TUGboat/tb38-2/tb119novotny.pdf "Using Markdown inside TeX documents" [tb124]: https://www.tug.org/TUGboat/tb40-1/tb124novotny-markdown.pdf "Markdown 2.7.0: Towards lightweight markup in TeX" [tb129]: https://www.tug.org/TUGboat/tb41-3/tb129novotny-frozen.pdf "Making Markdown into a Microwave Meal" + [tb131]: https://tug.org/TUGboat/tb42-2/tb131novotny-markdown.pdf "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX" - [tb131-preprint]: https://tug.org/TUGboat/production/42-2/tb131novotny-markdown.pdf "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX" - [tb131-slides]: https://tug.org/tug2021/assets/pdf/tug2021-novotny-slides.pdf "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX" - [tb131-video]: https://youtu.be/i2GJMnLCZls "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX" + [tb131-slides]: https://tug.org/tug2021/assets/pdf/tug2021-novotny-slides.pdf "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX" + [tb131-video]: https://youtu.be/i2GJMnLCZls "Markdown 2.10.0: LaTeX Themes & Snippets, Two Flavors of Comments, and LuaMetaTeX" [10.5300/2016-1-4/78]: https://bulletin.cstug.cz/pdf/2016-1-4.pdf#page=80 "Rendering Markdown inside TeX Documents" [10.5300/2020-1-2/48]: https://bulletin.cstug.cz/pdf/2020-1-2.pdf#page=50 "Markdown 2.8.1: Boldly Unto the Throne of Lightweight Markup in TeX" + [10.5300/2021-1-4/76]: https://bulletin.cstug.cz/pdf/2021-1-4.pdf#page=78 "Markdown 2.10.0: LaTeX Themes & Snippets" + [10.5300/2021-1-4/83]: https://bulletin.cstug.cz/pdf/2021-1-4.pdf#page=85 "Direct Typesetting of Various Document Formats in TeX Using the Pandoc Utility" - [pv212-fall2020]: https://is.muni.cz/el/fi/podzim2020/PV212/index.qwarp?prejit=5595952 + [pv212-fall2020]: https://is.muni.cz/elearning/warp?qurl=%2Fel%2Ffi%2Fpodzim2020%2FPV212%2Findex.qwarp;prejit=5595952 [install]: https://mirrors.ctan.org/macros/generic/markdown/markdown.html#installation "Markdown Package User Manual" - [liantze]: https://liantze.penguinattack.org/ "Rants from the Lab" + [liantze]: http://liantze.penguinattack.org/ "Rants from the Lab" [overleaf]: https://www.overleaf.com/ "Overleaf: Real-time Collaborative Writing and Publishing Tools with Integrated PDF Preview" [tugboat]: https://www.tug.org/tugboat/ "TUGboat - Communications of the TeX Users Group" [cstug]: https://www.cstug.cz/ "Československé sdružení uživatelů TeXu" @@ -281,7 +285,7 @@ When citing Markdown in academic papers and theses, please use the following BibTeX entry: ``` bib -@article{novotny17markdown, +@article{novotny2017markdown, author = {V\'{i}t Novotn\'{y}}, year = {2017}, title = {Using {M}arkdown Inside {\TeX} Documents}, diff --git a/macros/generic/markdown/VERSION b/macros/generic/markdown/VERSION new file mode 100644 index 0000000000..737ea04a37 --- /dev/null +++ b/macros/generic/markdown/VERSION @@ -0,0 +1 @@ +2.12.0-1-g976f074 (2021/12/30) diff --git a/macros/generic/markdown/examples/context.tex b/macros/generic/markdown/examples/context.tex index a049d9f81c..85815149d1 100644 --- a/macros/generic/markdown/examples/context.tex +++ b/macros/generic/markdown/examples/context.tex @@ -28,5 +28,10 @@ \startmarkdown Here are some non-ASCII characters: *ěščřžýáíé* and ConTeXt special characters: *|*. + +Here is a hard line break that we inserted directly from the TeX source +by typing two spaces at the end of a line. +This is stretching TeX's abilities and is only supported in ConTeXt MkIV +and later. \stopmarkdown \stoptext diff --git a/macros/generic/markdown/examples/example.md b/macros/generic/markdown/examples/example.md index 2841cd156f..63a16eecfd 100644 --- a/macros/generic/markdown/examples/example.md +++ b/macros/generic/markdown/examples/example.md @@ -44,7 +44,9 @@ This is a bullet list: * The first item of a bullet list that spans several paragraphs, + * the second item of a bullet list, + * the third item of a bullet list. This is a compact bullet list: @@ -58,7 +60,9 @@ This is an ordered list: 5. The first item of an ordered list that spans several paragraphs, + 6. the second item of an ordered list, + 7. the third item of an ordered list. This is an ordered list using hash enumerators: @@ -66,7 +70,9 @@ This is an ordered list using hash enumerators: #. The first item of an ordered list that spans several paragraphs, + #. the second item of an ordered list, + #. the third item of an ordered list. This is a compact ordered list: diff --git a/macros/generic/markdown/libraries/markdown-tinyyaml.lua b/macros/generic/markdown/libraries/markdown-tinyyaml.lua new file mode 100644 index 0000000000..f921ac4571 --- /dev/null +++ b/macros/generic/markdown/libraries/markdown-tinyyaml.lua @@ -0,0 +1,838 @@ +-- MIT License +-- +-- Copyright (c) 2017 peposso +-- +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the "Software"), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +-- copies of the Software, and to permit persons to whom the Software is +-- furnished to do so, subject to the following conditions: +-- +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +-- SOFTWARE. + +------------------------------------------------------------------------------- +-- tinyyaml - YAML subset parser +------------------------------------------------------------------------------- + +local table = table +local string = string +local schar = string.char +local ssub, gsub = string.sub, string.gsub +local sfind, smatch = string.find, string.match +local tinsert, tconcat, tremove = table.insert, table.concat, table.remove +local setmetatable = setmetatable +local pairs = pairs +local type = type +local tonumber = tonumber +local math = math +local getmetatable = getmetatable +local error = error + +local UNESCAPES = { + ['0'] = "\x00", z = "\x00", N = "\x85", + a = "\x07", b = "\x08", t = "\x09", + n = "\x0a", v = "\x0b", f = "\x0c", + r = "\x0d", e = "\x1b", ['\\'] = '\\', +}; + +------------------------------------------------------------------------------- +-- utils +local function select(list, pred) + local selected = {} + for i = 0, #list do + local v = list[i] + if v and pred(v, i) then + tinsert(selected, v) + end + end + return selected +end + +local function startswith(haystack, needle) + return ssub(haystack, 1, #needle) == needle +end + +local function ltrim(str) + return smatch(str, "^%s*(.-)$") +end + +local function rtrim(str) + return smatch(str, "^(.-)%s*$") +end + +local function trim(str) + return smatch(str, "^%s*(.-)%s*$") +end + +------------------------------------------------------------------------------- +-- Implementation. +-- +local class = {__meta={}} +function class.__meta.__call(cls, ...) + local self = setmetatable({}, cls) + if cls.__init then + cls.__init(self, ...) + end + return self +end + +function class.def(base, typ, cls) + base = base or class + local mt = {__metatable=base, __index=base} + for k, v in pairs(base.__meta) do mt[k] = v end + cls = setmetatable(cls or {}, mt) + cls.__index = cls + cls.__metatable = cls + cls.__type = typ + cls.__meta = mt + return cls +end + + +local types = { + null = class:def('null'), + map = class:def('map'), + omap = class:def('omap'), + pairs = class:def('pairs'), + set = class:def('set'), + seq = class:def('seq'), + timestamp = class:def('timestamp'), +} + +local Null = types.null +function Null.__tostring() return 'yaml.null' end +function Null.isnull(v) + if v == nil then return true end + if type(v) == 'table' and getmetatable(v) == Null then return true end + return false +end +local null = Null() + +function types.timestamp:__init(y, m, d, h, i, s, f, z) + self.year = tonumber(y) + self.month = tonumber(m) + self.day = tonumber(d) + self.hour = tonumber(h or 0) + self.minute = tonumber(i or 0) + self.second = tonumber(s or 0) + if type(f) == 'string' and sfind(f, '^%d+$') then + self.fraction = tonumber(f) * math.pow(10, 3 - #f) + elseif f then + self.fraction = f + else + self.fraction = 0 + end + self.timezone = z +end + +function types.timestamp:__tostring() + return string.format( + '%04d-%02d-%02dT%02d:%02d:%02d.%03d%s', + self.year, self.month, self.day, + self.hour, self.minute, self.second, self.fraction, + self:gettz()) +end + +function types.timestamp:gettz() + if not self.timezone then + return '' + end + if self.timezone == 0 then + return 'Z' + end + local sign = self.timezone > 0 + local z = sign and self.timezone or -self.timezone + local zh = math.floor(z) + local zi = (z - zh) * 60 + return string.format( + '%s%02d:%02d', sign and '+' or '-', zh, zi) +end + + +local function countindent(line) + local _, j = sfind(line, '^%s+') + if not j then + return 0, line + end + return j, ssub(line, j+1) +end + +local function parsestring(line, stopper) + stopper = stopper or '' + local q = ssub(line, 1, 1) + if q == ' ' or q == '\t' then + return parsestring(ssub(line, 2)) + end + if q == "'" then + local i = sfind(line, "'", 2, true) + if not i then + return nil, line + end + return ssub(line, 2, i-1), ssub(line, i+1) + end + if q == '"' then + local i, buf = 2, '' + while i < #line do + local c = ssub(line, i, i) + if c == '\\' then + local n = ssub(line, i+1, i+1) + if UNESCAPES[n] ~= nil then + buf = buf..UNESCAPES[n] + elseif n == 'x' then + local h = ssub(i+2,i+3) + if sfind(h, '^[0-9a-fA-F]$') then + buf = buf..schar(tonumber(h, 16)) + i = i + 2 + else + buf = buf..'x' + end + else + buf = buf..n + end + i = i + 1 + elseif c == q then + break + else + buf = buf..c + end + i = i + 1 + end + return buf, ssub(line, i+1) + end + if q == '{' or q == '[' then -- flow style + return nil, line + end + if q == '|' or q == '>' then -- block + return nil, line + end + if q == '-' or q == ':' then + if ssub(line, 2, 2) == ' ' or ssub(line, 2, 2) == '\n' or #line == 1 then + return nil, line + end + end + local buf = '' + while #line > 0 do + local c = ssub(line, 1, 1) + if sfind(stopper, c, 1, true) then + break + elseif c == ':' and (ssub(line, 2, 2) == ' ' or ssub(line, 2, 2) == '\n' or #line == 1) then + break + elseif c == '#' and (ssub(buf, #buf, #buf) == ' ') then + break + else + buf = buf..c + end + line = ssub(line, 2) + end + return rtrim(buf), line +end + +local function isemptyline(line) + return line == '' or sfind(line, '^%s*$') or sfind(line, '^%s*#') +end + +local function equalsline(line, needle) + return startswith(line, needle) and isemptyline(ssub(line, #needle+1)) +end + +local function compactifyemptylines(lines) + -- Appends empty lines as "\n" to the end of the nearest preceding non-empty line + local compactified = {} + local lastline = {} + for i = 1, #lines do + local line = lines[i] + if isemptyline(line) then + if #compactified > 0 and i < #lines then + tinsert(lastline, "\n") + end + else + if #lastline > 0 then + tinsert(compactified, tconcat(lastline, "")) + end + lastline = {line} + end + end + if #lastline > 0 then + tinsert(compactified, tconcat(lastline, "")) + end + return compactified +end + +local function checkdupekey(map, key) + if map[key] ~= nil then + -- print("found a duplicate key '"..key.."' in line: "..line) + local suffix = 1 + while map[key..'_'..suffix] do + suffix = suffix + 1 + end + key = key ..'_'..suffix + end + return key +end + +local function parseflowstyle(line, lines) + local stack = {} + while true do + if #line == 0 then + if #lines == 0 then + break + else + line = tremove(lines, 1) + end + end + local c = ssub(line, 1, 1) + if c == '#' then + line = '' + elseif c == ' ' or c == '\t' or c == '\r' or c == '\n' then + line = ssub(line, 2) + elseif c == '{' or c == '[' then + tinsert(stack, {v={},t=c}) + line = ssub(line, 2) + elseif c == ':' then + local s = tremove(stack) + tinsert(stack, {v=s.v, t=':'}) + line = ssub(line, 2) + elseif c == ',' then + local value = tremove(stack) + if value.t == ':' or value.t == '{' or value.t == '[' then error() end + if stack[#stack].t == ':' then + -- map + local key = tremove(stack) + key.v = checkdupekey(stack[#stack].v, key.v) + stack[#stack].v[key.v] = value.v + elseif stack[#stack].t == '{' then + -- set + stack[#stack].v[value.v] = true + elseif stack[#stack].t == '[' then + -- seq + tinsert(stack[#stack].v, value.v) + end + line = ssub(line, 2) + elseif c == '}' then + if stack[#stack].t == '{' then + if #stack == 1 then break end + stack[#stack].t = '}' + line = ssub(line, 2) + else + line = ','..line + end + elseif c == ']' then + if stack[#stack].t == '[' then + if #stack == 1 then break end + stack[#stack].t = ']' + line = ssub(line, 2) + else + line = ','..line + end + else + local s, rest = parsestring(line, ',{}[]') + if not s then + error('invalid flowstyle line: '..line) + end + tinsert(stack, {v=s, t='s'}) + line = rest + end + end + return stack[1].v, line +end + +local function parseblockstylestring(line, lines, indent) + if #lines == 0 then + error("failed to find multi-line scalar content") + end + local s = {} + local firstindent = -1 + local endline = -1 + for i = 1, #lines do + local ln = lines[i] + local idt = countindent(ln) + if idt <= indent then + break + end + if ln == '' then + tinsert(s, '') + else + if firstindent == -1 then + firstindent = idt + elseif idt < firstindent then + break + end + tinsert(s, ssub(ln, firstindent + 1)) + end + endline = i + end + + local striptrailing = true + local sep = '\n' + local newlineatend = true + if line == '|' then + striptrailing = true + sep = '\n' + newlineatend = true + elseif line == '|+' then + striptrailing = false + sep = '\n' + newlineatend = true + elseif line == '|-' then + striptrailing = true + sep = '\n' + newlineatend = false + elseif line == '>' then + striptrailing = true + sep = ' ' + newlineatend = true + elseif line == '>+' then + striptrailing = false + sep = ' ' + newlineatend = true + elseif line == '>-' then + striptrailing = true + sep = ' ' + newlineatend = false + else + error('invalid blockstyle string:'..line) + end + local _, eonl = s[#s]:gsub('\n', '\n') + s[#s] = rtrim(s[#s]) + if striptrailing then + eonl = 0 + end + if newlineatend then + eonl = eonl + 1 + end + for i = endline, 1, -1 do + tremove(lines, i) + end + return tconcat(s, sep)..string.rep('\n', eonl) +end + +local function parsetimestamp(line) + local _, p1, y, m, d = sfind(line, '^(%d%d%d%d)%-(%d%d)%-(%d%d)') + if not p1 then + return nil, line + end + if p1 == #line then + return types.timestamp(y, m, d), '' + end + local _, p2, h, i, s = sfind(line, '^[Tt ](%d+):(%d+):(%d+)', p1+1) + if not p2 then + return types.timestamp(y, m, d), ssub(line, p1+1) + end + if p2 == #line then + return types.timestamp(y, m, d, h, i, s), '' + end + local _, p3, f = sfind(line, '^%.(%d+)', p2+1) + if not p3 then + p3 = p2 + f = 0 + end + local zc = ssub(line, p3+1, p3+1) + local _, p4, zs, z = sfind(line, '^ ?([%+%-])(%d+)', p3+1) + if p4 then + z = tonumber(z) + local _, p5, zi = sfind(line, '^:(%d+)', p4+1) + if p5 then + z = z + tonumber(zi) / 60 + end + z = zs == '-' and -tonumber(z) or tonumber(z) + elseif zc == 'Z' then + p4 = p3 + 1 + z = 0 + else + p4 = p3 + z = false + end + return types.timestamp(y, m, d, h, i, s, f, z), ssub(line, p4+1) +end + +local function parsescalar(line, lines, indent) + line = trim(line) + line = gsub(line, '^%s*#.*$', '') -- comment only -> '' + line = gsub(line, '^%s*', '') -- trim head spaces + + if line == '' or line == '~' then + return null + end + + local ts, _ = parsetimestamp(line) + if ts then + return ts + end + + local s, _ = parsestring(line) + -- startswith quote ... string + -- not startswith quote ... maybe string + if s and (startswith(line, '"') or startswith(line, "'")) then + return s + end + + if startswith('!', line) then -- unexpected tagchar + error('unsupported line: '..line) + end + + if equalsline(line, '{}') then + return {} + end + if equalsline(line, '[]') then + return {} + end + + if startswith(line, '{') or startswith(line, '[') then + return parseflowstyle(line, lines) + end + + if startswith(line, '|') or startswith(line, '>') then + return parseblockstylestring(line, lines, indent) + end + + -- Regular unquoted string + line = gsub(line, '%s*#.*$', '') -- trim tail comment + local v = line + if v == 'null' or v == 'Null' or v == 'NULL'then + return null + elseif v == 'true' or v == 'True' or v == 'TRUE' then + return true + elseif v == 'false' or v == 'False' or v == 'FALSE' then + return false + elseif v == '.inf' or v == '.Inf' or v == '.INF' then + return math.huge + elseif v == '+.inf' or v == '+.Inf' or v == '+.INF' then + return math.huge + elseif v == '-.inf' or v == '-.Inf' or v == '-.INF' then + return -math.huge + elseif v == '.nan' or v == '.NaN' or v == '.NAN' then + return 0 / 0 + elseif sfind(v, '^[%+%-]?[0-9]+$') or sfind(v, '^[%+%-]?[0-9]+%.$')then + return tonumber(v) -- : int + elseif sfind(v, '^[%+%-]?[0-9]+%.[0-9]+$') then + return tonumber(v) + end + return s or v +end + +local parsemap; -- : func + +local function parseseq(line, lines, indent) + local seq = setmetatable({}, types.seq) + if line ~= '' then + error() + end + while #lines > 0 do + -- Check for a new document + line = lines[1] + if startswith(line, '---') then + while #lines > 0 and not startswith(lines, '---') do + tremove(lines, 1) + end + return seq + end + + -- Check the indent level + local level = countindent(line) + if level < indent then + return seq + elseif level > indent then + error("found bad indenting in line: ".. line) + end + + local i, j = sfind(line, '%-%s+') + if not i then + i, j = sfind(line, '%-$') + if not i then + return seq + end + end + local rest = ssub(line, j+1) + + if sfind(rest, '^[^\'\"%s]*:%s*$') or sfind(rest, '^[^\'\"%s]*:%s+.') then + -- Inline nested hash + -- There are two patterns need to match as inline nested hash + -- first one should have no other characters except whitespace after `:` + -- and the second one should have characters besides whitespace after `:` + -- + -- value: + -- - foo: + -- bar: 1 + -- + -- and + -- + -- value: + -- - foo: bar + -- + -- And there is one pattern should not be matched, where there is no space after `:` + -- in below, `foo:bar` should be parsed into a single string + -- + -- value: + -- - foo:bar + local indent2 = j + lines[1] = string.rep(' ', indent2)..rest + tinsert(seq, parsemap('', lines, indent2)) + elseif sfind(rest, '^%-%s+') then + -- Inline nested seq + local indent2 = j + lines[1] = string.rep(' ', indent2)..rest + tinsert(seq, parseseq('', lines, indent2)) + elseif isemptyline(rest) then + tremove(lines, 1) + if #lines == 0 then + tinsert(seq, null) + return seq + end + if sfind(lines[1], '^%s*%-') then + local nextline = lines[1] + local indent2 = countindent(nextline) + if indent2 == indent then + -- Null seqay entry + tinsert(seq, null) + else + tinsert(seq, parseseq('', lines, indent2)) + end + else + -- - # comment + -- key: value + local nextline = lines[1] + local indent2 = countindent(nextline) + tinsert(seq, parsemap('', lines, indent2)) + end + elseif rest then + -- Array entry with a value + tremove(lines, 1) + tinsert(seq, parsescalar(rest, lines)) + end + end + return seq +end + +local function parseset(line, lines, indent) + if not isemptyline(line) then + error('not seq line: '..line) + end + local set = setmetatable({}, types.set) + while #lines > 0 do + -- Check for a new document + line = lines[1] + if startswith(line, '---') then + while #lines > 0 and not startswith(lines, '---') do + tremove(lines, 1) + end + return set + end + + -- Check the indent level + local level = countindent(line) + if level < indent then + return set + elseif level > indent then + error("found bad indenting in line: ".. line) + end + + local i, j = sfind(line, '%?%s+') + if not i then + i, j = sfind(line, '%?$') + if not i then + return set + end + end + local rest = ssub(line, j+1) + + if sfind(rest, '^[^\'\"%s]*:') then + -- Inline nested hash + local indent2 = j + lines[1] = string.rep(' ', indent2)..rest + set[parsemap('', lines, indent2)] = true + elseif sfind(rest, '^%s+$') then + tremove(lines, 1) + if #lines == 0 then + tinsert(set, null) + return set + end + if sfind(lines[1], '^%s*%?') then + local indent2 = countindent(lines[1]) + if indent2 == indent then + -- Null array entry + set[null] = true + else + set[parseseq('', lines, indent2)] = true + end + end + + elseif rest then + tremove(lines, 1) + set[parsescalar(rest, lines)] = true + else + error("failed to classify line: "..line) + end + end + return set +end + +function parsemap(line, lines, indent) + if not isemptyline(line) then + error('not map line: '..line) + end + local map = setmetatable({}, types.map) + while #lines > 0 do + -- Check for a new document + line = lines[1] + if startswith(line, '---') then + while #lines > 0 and not startswith(lines, '---') do + tremove(lines, 1) + end + return map + end + + -- Check the indent level + local level, _ = countindent(line) + if level < indent then + return map + elseif level > indent then + error("found bad indenting in line: ".. line) + end + + -- Find the key + local key + local s, rest = parsestring(line) + + -- Quoted keys + if s and startswith(rest, ':') then + local sc = parsescalar(s, {}, 0) + if sc and type(sc) ~= 'string' then + key = sc + else + key = s + end + line = ssub(rest, 2) + else + error("failed to classify line: "..line) + end + + key = checkdupekey(map, key) + line = ltrim(line) + + if ssub(line, 1, 1) == '!' then + -- ignore type + local rh = ltrim(ssub(line, 3)) + local typename = smatch(rh, '^!?[^%s]+') + line = ltrim(ssub(rh, #typename+1)) + end + + if not isemptyline(line) then + tremove(lines, 1) + line = ltrim(line) + map[key] = parsescalar(line, lines, indent) + else + -- An indent + tremove(lines, 1) + if #lines == 0 then + map[key] = null + return map; + end + if sfind(lines[1], '^%s*%-') then + local indent2 = countindent(lines[1]) + map[key] = parseseq('', lines, indent2) + elseif sfind(lines[1], '^%s*%?') then + local indent2 = countindent(lines[1]) + map[key] = parseset('', lines, indent2) + else + local indent2 = countindent(lines[1]) + if indent >= indent2 then + -- Null hash entry + map[key] = null + else + map[key] = parsemap('', lines, indent2) + end + end + end + end + return map +end + + +-- : (list<str>)->dict +local function parsedocuments(lines) + lines = compactifyemptylines(lines) + + if sfind(lines[1], '^%%YAML') then tremove(lines, 1) end + + local root = {} + local in_document = false + while #lines > 0 do + local line = lines[1] + -- Do we have a document header? + local docright; + if sfind(line, '^%-%-%-') then + -- Handle scalar documents + docright = ssub(line, 4) + tremove(lines, 1) + in_document = true + end + if docright then + if (not sfind(docright, '^%s+$') and + not sfind(docright, '^%s+#')) then + tinsert(root, parsescalar(docright, lines)) + end + elseif #lines == 0 or startswith(line, '---') then + -- A naked document + tinsert(root, null) + while #lines > 0 and not sfind(lines[1], '---') do + tremove(lines, 1) + end + in_document = false + -- XXX The final '-+$' is to look for -- which ends up being an + -- error later. + elseif not in_document and #root > 0 then + -- only the first document can be explicit + error('parse error: '..line) + elseif sfind(line, '^%s*%-') then + -- An array at the root + tinsert(root, parseseq('', lines, 0)) + elseif sfind(line, '^%s*[^%s]') then + -- A hash at the root + local level = countindent(line) + tinsert(root, parsemap('', lines, level)) + else + -- Shouldn't get here. @lines have whitespace-only lines + -- stripped, and previous match is a line with any + -- non-whitespace. So this clause should only be reachable via + -- a perlbug where \s is not symmetric with \S + + -- uncoverable statement + error('parse error: '..line) + end + end + if #root > 1 and Null.isnull(root[1]) then + tremove(root, 1) + return root + end + return root +end + +--- Parse yaml string into table. +local function parse(source) + local lines = {} + for line in string.gmatch(source .. '\n', '(.-)\r?\n') do + tinsert(lines, line) + end + + local docs = parsedocuments(lines) + if #docs == 1 then + return docs[1] + end + + return docs +end + +return { + version = 0.1, + parse = parse, +} diff --git a/macros/generic/markdown/markdown.dtx b/macros/generic/markdown/markdown.dtx index fad63a3791..b624b04879 100644 --- a/macros/generic/markdown/markdown.dtx +++ b/macros/generic/markdown/markdown.dtx @@ -4,8 +4,11 @@ \documentclass{ltxdockit} \usepackage[american]{babel} \usepackage{amsmath,btxdockit,doc,fancyvrb,graphicx,hologo,microtype,minted,varioref} +\vrefwarning % Set up the style. +\usepackage{xcolor} +\definecolor{spot}{rgb}{0,0.2,0.6} \usepackage{fontspec} \defaultfontfeatures[\rmfamily,\sffamily,\ttfamily]{} \emergencystretch=1em @@ -83,10 +86,10 @@ html, jekyllData, stripPercentSigns, - underscores=false, - theme=witiko/dot, - theme=witiko/graphicx/http, - theme=witiko/markdown/techdoc, + underscores = false, + theme = witiko/dot, + theme = witiko/graphicx/http, + theme = witiko/markdown/techdoc, ]{markdown} % Set up Unicode characters. @@ -720,13 +723,26 @@ abbr { pagetotal = {xviii, 347}, location = {Rio de Janeiro}, publisher = {PUC-Rio}} -@book{knuth86, +@book{knuth86a, author = {Knuth, Donald Ervin}, year = {1986}, title = {The \TeX{}book}, edition = {3}, isbn = {0-201-13447-0}, pagetotal = {ix, 479}, + series = {Computers \& Typesetting}, + volume = {A}, + location = {Reading, MA}, + publisher = {Addison-Wesley}} +@book{knuth86b, + author = {Knuth, Donald Ervin}, + year = {1986}, + title = {\TeX: The Program}, + isbn = {0-201-13437-7}, + pagetotal = {xvi, 594}, + series = {Computers \& Typesetting}, + volume = {B}, + location = {Reading, MA}, publisher = {Addison-Wesley}} @online{novotny21, author = {Novotný, Vít}, @@ -734,6 +750,15 @@ abbr { date = {2021-02-20}, url = {https://github.com/latex3/latex2e/issues/510}, urldate = {2021-02-21}} +@book{eijkhout92, + author = {Victor Eijkhout}, + title = {\TeX{} by Topic}, + subtitle = {A \TeX nician's Reference}, + isbn = {0-201-56882-0}, + pagetotal = {307}, + date = {1992-02-01}, + location = {Wokingham, England}, + publisher = {Addison-Wesley}} %</techdoc-bibliography> %<*latex-themes-witiko-markdown-techdoc> \ProvidesPackage{markdownthemewitiko_markdown_techdoc}[2021/09/10] @@ -3838,6 +3863,97 @@ defaultOptions.definitionLists = false %</lua,lua-cli> %<*manual-options> +#### Option `eagerCache` + +`eagerCache` (default value: `true`) + +% \fi +% \begin{markdown} +% +% \Optitem[true]{eagerCache}{\opt{true}, \opt{false}} +% +: true + + Converted markdown documents will be cached in \Opt{cacheDir}. This can be + useful for post-processing the converted documents and for recovering + historical versions of the documents from the cache. However, it also + produces a large number of auxiliary files on the disk and obscures the + output of the Lua command-line interface when it is used for plumbing. + + This behavior will always be used if the \Opt{finalizeCache} option is + enabled. + +: false + + Converted markdown documents will not be cached. This decreases the number + of auxiliary files that we produce and makes it easier to use the Lua + command-line interface for plumbing. + + This behavior will only be used when the \Opt{finalizeCache} option is + disabled. Furthermore, this behavior is planned to be the new default in + the next major release of the Markdown package. + +% \end{markdown} +% \iffalse + +##### Lua Module Example {.unnumbered} + +Using a text editor, create a text document named `hello.md` with the +following content: +``` md +Hello *world*! +`````` +Next, invoke LuaTeX from the terminal with the \Opt{eagerCache} option +disabled: +``` sh +texlua ⟨CLI pathname⟩ eagerCache=false -- hello.md hello.tex +``````` +where \meta{CLI pathname} corresponds to the location of the Lua CLI script file, +such as `~/texmf/scripts/markdown/markdown-cli.lua` on UN\*X systems or +`C:\Users\`\meta{Your username}`\texmf\scripts\markdown\markdown-cli.lua` on Windows +systems. Use the command `kpsewhich -a markdown-cli.lua` to locate the Lua CLI +script file using [Kpathsea][]. + +A \TeX{} document named `hello.tex` should be produced and contain the +following code: +``` tex +Hello \markdownRendererEmphasis{world}!\relax +``` + +*** + +Invoke LuaTeX from the terminal again, this time with the \Opt{eagerCache} +option enabled: + +``` tex +texlua ⟨CLI pathname⟩ eagerCache=true -- hello.md hello.tex +``` + +A \TeX{} document named `hello.tex` should be produced and contain the +following code: + +``` tex +\input ./⟨hash⟩.md.tex\relax +``` + +Additionally, a \TeX{} document named `⟨hash⟩.md.tex` should be produced and +contain the following code: + +``` tex +Hello \markdownRendererEmphasis{world}!\relax +``` + +%</manual-options> +%<*lua,lua-cli> +% \fi +% \begin{macrocode} +defaultOptions.eagerCache = true +% \end{macrocode} +% \par +% \iffalse +%</lua,lua-cli> +%<*manual-options> + #### Option `fencedCode` `fencedCode` (default value: `false`) @@ -4364,6 +4480,80 @@ defaultOptions.frozenCacheCounter = 0 %</lua,lua-cli> %<*manual-options> +#### Option `hardLineBreaks` + +`hardLineBreaks` (default value: `false`) + +% \fi +% \begin{markdown} +% +% \Optitem[false]{hardLineBreaks}{\opt{true}, \opt{false}} +% +: true + + : Interpret all newlines within a paragraph as hard line breaks instead + of spaces. + +: false + + : Interpret all newlines within a paragraph as spaces. + +% \end{markdown} +% \iffalse + +##### \LaTeX{} Example {.unnumbered} + +Using a text editor, create a text document named `document.tex` with the +following content: +``` tex +\documentclass{article} +\usepackage{markdown} +\begin{document} + +\begin{markdown} +'Twas brillig, and the slithy toves +Did gyre and gimble in the wabe; +All mimsy were the borogoves, +And the mome raths outgrabe. +\end{markdown} + +\begin{markdown*}{hardLineBreaks} +'Twas brillig, and the slithy toves +Did gyre and gimble in the wabe; +All mimsy were the borogoves, +And the mome raths outgrabe. +\end{markdown*} + +\end{document} +``````` +Next, invoke LuaTeX from the terminal: +``` sh +lualatex document.tex +`````` +A PDF document named `document.pdf` should be produced and contain the +following text: + +> 'Twas brillig, and the slithy toves +> Did gyre and gimble in the wabe; +> All mimsy were the borogoves, +> And the mome raths outgrabe. +> +> 'Twas brillig, and the slithy toves +> Did gyre and gimble in the wabe; +> All mimsy were the borogoves, +> And the mome raths outgrabe. + +%</manual-options> +%<*lua,lua-cli> +% \fi +% \begin{macrocode} +defaultOptions.hardLineBreaks = false +% \end{macrocode} +% \par +% \iffalse +%</lua,lua-cli> +%<*manual-options> + #### Option `hashEnumerators` `hashEnumerators` (default value: `false`) @@ -6983,7 +7173,7 @@ pdftex --shell-escape document.tex % Another limitation concerns spaces at the right end of an input line. In % markdown, these are used to produce a forced line break. However, any such % spaces are removed before the lines enter the input buffer of -% \TeX{}~[@knuth86, p. 46]. As a corrolary, the \mref{markdownBegin} macro also +% \TeX{}~[@knuth86a, p. 46]. As a corrolary, the \mref{markdownBegin} macro also % ignores them. % % The \mref{markdownBegin} and \mref{markdownEnd} macros will also consume the rest @@ -7057,6 +7247,16 @@ the `markdown` Lua module. They are supported by all higher-level interfaces of the Markdown package, i.e. the plain \TeX{}, \LaTeX{} and \Hologo{ConTeXt} interfaces. +#### Setting Lua options from plain \TeX{} + +As a rule of thumb, you can set all Lua options directly from plain \TeX{}. For +example, to set the \Opt{taskLists} Lua option to `true`, you would include the +following code in your plain \TeX{} document: + +``` tex +\def\markdownOptionTaskLists{true} +``` + %</manual-options> %<*tex> % \fi @@ -7096,7 +7296,7 @@ defaults to `false`. % The standard usage of the above two options is as follows: % \iffalse -The standard usage of the \Opt{finalizeCache} and \mref{markdownOptionFrozenCache} +The standard usage of the \Opt{finalizeCache} and \Opt{frozenCache} options is as follows: % \fi @@ -7241,6 +7441,9 @@ Markdown to \TeX{}: - `\markdownOptionCacheDir`, and - `\markdownOptionFrozenCacheFileName`. +The `\markdownOptionCacheDir` and `\markdownOptionFrozenCacheFileName` commands +correspond to the `cacheDir` and `frozenCacheFileName` Lua options. + Using a text editor, create a folder named `output-directory` and a text document named `document.tex` with the following content: ``` tex @@ -7313,8 +7516,10 @@ bug](https://github.com/witiko/markdown/issues). \let\markdownOptionContentBlocks\undefined \let\markdownOptionContentBlocksLanguageMap\undefined \let\markdownOptionDefinitionLists\undefined +\let\markdownOptionEagerCache\undefined \let\markdownOptionFootnotes\undefined \let\markdownOptionFencedCode\undefined +\let\markdownOptionHardLineBreaks\undefined \let\markdownOptionHashEnumerators\undefined \let\markdownOptionHeaderAttributes\undefined \let\markdownOptionHtml\undefined @@ -10512,6 +10717,30 @@ arguments: the scalar key in the parent structure, cast to a string following % % \begin{markdown} +The \mdef{markdownRendererJekyllDataSequenceEnd} macro represents the +end of a sequence in a \acro{yaml} document. This macro will only be produced +when the \Opt{jekyllData} option is enabled. The macro receives no arguments. + +% \end{markdown} +% +% \iffalse +%</manual-tokens> +%<*tex> +% \fi +% +% \begin{macrocode} +\def\markdownRendererJekyllDataSequenceEnd{% + \markdownRendererJekyllDataSequenceEndPrototype}% +% \end{macrocode} +% \par +% +% \iffalse +%</tex> +%<*manual-tokens> +% \fi +% +% \begin{markdown} + The \mdef{markdownRendererJekyllDataBoolean} macro represents a boolean scalar value in a \acro{yaml} document. This macro will only be produced when the \Opt{jekyllData} option is enabled. The macro receives two arguments: the @@ -11959,11 +12188,11 @@ pdflatex --shell-escape document.tex % \documentclass{article} \documentclass{article} % \usepackage{markdown} \usepackage{markdown} % \begin{document} \begin{document} -% % ... % ... +% \% ... \% ... % \begin{markdown} \begin{markdown*}{smartEllipses} % _Hello_ **world** ... _Hello_ **world** ... % \end{markdown} \end{markdown*} -% % ... % ... +% \% ... \% ... % \end{document} \end{document} % ``````` % @@ -12054,6 +12283,29 @@ pdflatex --shell-escape document.tex prototypes from plain \TeX{}, load user-contributed themes, and invoke user-defined setup snippets. +#### Setting Lua and plain \TeX{} options from \LaTeX{} + +As a rule of thumb, we can set all Lua options directly from \LaTeX{}. For +example, to set the \Opt{taskLists} Lua option to `true`, we would include the +following code in our \LaTeX{} document: + +``` tex +\markdownSetup{ + taskLists = true, +} +``` + +We can also set all plain \TeX{} options directly from \LaTeX{}. For example, +to set the `\markdownOptionHelperScriptFileName` plain \TeX{} option to +`helper-script.lua`, we would inclde the following code in our \LaTeX{} +document: + +``` tex +\markdownSetup{ + helperScriptFileName = helper-script.lua, +} +``` + % \fi % \par % \begin{markdown} @@ -12064,9 +12316,11 @@ Default token renderer prototypes require \LaTeX{} packages that may clash with other packages used in a document. Additionally, if we redefine token renderers and renderer prototypes ourselves, the default definitions will bring no benefit to us. Using the `plain` package option, we can keep the default -definitions from the plain \TeX{} implementation (see Section -\vref{sec:textokenrendererprototypes}) and prevent the soft \LaTeX{} -prerequisites in Section \vref{sec:latexprerequisites} from being loaded: +definitions from the plain \TeX{} implementation +% (see Section \vref{sec:textokenrendererprototypes}) +and prevent the soft \LaTeX{} prerequisites +% in Section \vref{sec:latexprerequisites} +from being loaded: ``` tex \usepackage[plain]{markdown} @@ -12584,12 +12838,16 @@ The following ordered list will be preceded by roman numerals: \def\markdownOptionContentBlocksLanguageMap{#1}}% \define@key{markdownOptions}{definitionLists}[true]{% \def\markdownOptionDefinitionLists{#1}}% +\define@key{markdownOptions}{eagerCache}[true]{% + \def\markdownOptionEagerCache{#1}}% \define@key{markdownOptions}{footnotes}[true]{% \def\markdownOptionFootnotes{#1}}% \define@key{markdownOptions}{fencedCode}[true]{% \def\markdownOptionFencedCode{#1}}% \define@key{markdownOptions}{jekyllData}[true]{% \def\markdownOptionJekyllData{#1}}% +\define@key{markdownOptions}{hardLineBreaks}[true]{% + \def\markdownOptionHardLineBreaks{#1}}% \define@key{markdownOptions}{hashEnumerators}[true]{% \def\markdownOptionHashEnumerators{#1}}% \define@key{markdownOptions}{headerAttributes}[true]{% @@ -12844,8 +13102,8 @@ The following ordered list will be preceded by roman numerals: % ``` tex % \markdownSetup{ % renderers = { -% link = {#4}, % Render links as the link title. -% emphasis = {\emph{#1}}, % Render emphasized text via `\emph`. +% link = {#4}, \% Render links as the link title. +% emphasis = {\emph{#1}}, \% Render emphasized text via `\emph`. % } % } % ``````` @@ -13016,7 +13274,7 @@ The following ordered list will be preceded by roman numerals: % \markdownSetup{ % rendererPrototypes = { % image = {\includegraphics{#2}}, -% codeSpan = {\texttt{#1}}, % Render inline code via `\texttt`. +% codeSpan = {\texttt{#1}}, \% Render inline code via `\texttt`. % } % } % ``````` @@ -15712,7 +15970,7 @@ function M.writer.new(options) % \end{markdown} % \begin{macrocode} function self.pack(name) - return [[\input ]] .. name .. [[\relax{}]] + return [[\input ]] .. name .. [[\relax]] end % \end{macrocode} % \par @@ -17841,15 +18099,22 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline + larsers.bqstart + larsers.headerstart + larsers.fencestart - ) * parsers.spacechar^0 / writer.space + ) * parsers.spacechar^0 + / (options.hardLineBreaks and writer.linebreak + or writer.space) larsers.OptionalIndent = parsers.spacechar^1 / writer.space larsers.Space = parsers.spacechar^2 * larsers.Endline / writer.linebreak + parsers.spacechar^1 * larsers.Endline^-1 * parsers.eof / "" - + parsers.spacechar^1 * larsers.Endline^-1 - * parsers.optionalspace / writer.space + + parsers.spacechar^1 * larsers.Endline + * parsers.optionalspace + / (options.hardLineBreaks + and writer.linebreak + or writer.space) + + parsers.spacechar^1 * parsers.optionalspace + / writer.space larsers.NonbreakingEndline = parsers.newline * -( -- newline, but not before... @@ -17859,13 +18124,20 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline + larsers.bqstart + larsers.headerstart + larsers.fencestart - ) * parsers.spacechar^0 / writer.nbsp + ) * parsers.spacechar^0 + / (options.hardLineBreaks and writer.linebreak + or writer.nbsp) larsers.NonbreakingSpace = parsers.spacechar^2 * larsers.Endline / writer.linebreak + parsers.spacechar^1 * larsers.Endline^-1 * parsers.eof / "" - + parsers.spacechar^1 * larsers.Endline^-1 - * parsers.optionalspace / writer.nbsp + + parsers.spacechar^1 * larsers.Endline + * parsers.optionalspace + / (options.hardLineBreaks + and writer.linebreak + or writer.nbsp) + + parsers.spacechar^1 * parsers.optionalspace + / writer.nbsp if options.underscores then larsers.Strong = ( parsers.between(parsers.Inline, parsers.doubleasterisks, @@ -18437,19 +18709,30 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline end table.sort(opt_string) local salt = table.concat(opt_string, ",") .. "," .. metadata.version + local output % \end{macrocode} % \begin{markdown} -% Produce the cache file and transform its filename to plain \TeX{} output -% via the \luamref{writer->pack} method. +% If we cache markdown documents, produce the cache file and transform its +% filename to plain \TeX{} output via the \luamref{writer->pack} method. % \end{markdown} % \begin{macrocode} - local name = util.cache(options.cacheDir, input, salt, function(input) - return util.rope_to_string(parse_blocks_toplevel(input)) .. writer.eof - end, ".md" .. writer.suffix) - local output = writer.pack(name) + local function convert(input) + return util.rope_to_string(parse_blocks_toplevel(input)) .. writer.eof + end + if options.eagerCache or options.finalizeCache then + local name = util.cache(options.cacheDir, input, salt, convert, ".md" .. writer.suffix) + output = writer.pack(name) % \end{macrocode} % \begin{markdown} -% If the \Opt{frozenCache} option is enabled, populate the frozen cache in +% Otherwise, return the result of the conversion directly. +% \end{markdown} +% \begin{macrocode} + else + output = convert(input) + end +% \end{macrocode} +% \begin{markdown} +% If the \Opt{finalizeCache} option is enabled, populate the frozen cache in % the file \Opt{frozenCacheFileName} with an entry for markdown document % number \Opt{frozenCacheCounter}. % \end{markdown} @@ -18731,6 +19014,9 @@ end \ifx\markdownOptionDefinitionLists\undefined\else definitionLists = \markdownOptionDefinitionLists, \fi +\ifx\markdownOptionEagerCache\undefined\else + eagerCache = \markdownOptionEagerCache, +\fi \ifx\markdownOptionFinalizeCache\undefined\else finalizeCache = \markdownOptionFinalizeCache, \fi @@ -18742,6 +19028,9 @@ end \ifx\markdownOptionFencedCode\undefined\else fencedCode = \markdownOptionFencedCode, \fi +\ifx\markdownOptionHardLineBreaks\undefined\else + hardLineBreaks = \markdownOptionHardLineBreaks, +\fi \ifx\markdownOptionHashEnumerators\undefined\else hashEnumerators = \markdownOptionHashEnumerators, \fi @@ -19226,7 +19515,28 @@ end % % \end{markdown} % \begin{macrocode} -\def\markdownLuaExecute#1{\directlua{local print = tex.print #1}}% +\begingroup +% \end{macrocode} +% \begin{markdown} +% Swap the category code of the backslash symbol and the pipe symbol, so that +% we may use the backslash symbol freely inside the Lua code. +% \end{markdown} +% \begin{macrocode} + \catcode`|=0% + \catcode`\\=12% + |gdef|markdownLuaExecute#1{% + |directlua{% + local function print(input) + local output = {} + for line in input:gmatch("[^\r\n]+") do + table.insert(output, line) + end + tex.print(output) + end + #1 + }% + }% +|endgroup \fi % \end{macrocode} % \par @@ -19745,8 +20055,17 @@ end \ifx\empty#4\empty\else \caption{#4}% \fi - \end{table}}{% - \markdownInput{#3}}}, + \end{table}% + }{% + \ifthenelse{\equal{#1}{tex}}{% + \catcode`\%=14\relax + \input #3\relax + \catcode`\%=12\relax + }{% + \markdownInput{#3}% + }% + }% + }, image = {% \begin{figure}% \begin{center}% @@ -20603,24 +20922,50 @@ end % The \mref{startmarkdown} and \mref{stopmarkdown} macros are implemented using the % \mref{markdownReadAndConvert} macro. % +% In Knuth's \TeX, trailing spaces are removed very early on when a line is +% being put to the input buffer.~[@knuth86b, sec. 31]. According to +% @eijkhout92 [sec. 2.2], this is because ``these spaces are hard to see in +% an editor''. At the moment, there is no option to suppress this behavior in +% (Lua)\TeX, but \Hologo{ConTeXt} MkIV funnels all input through its own input +% handler. This makes it possible to suppress the removal of trailing spaces +% in \Hologo{ConTeXt} MkIV and therefore to insert hard line breaks into +% markdown text. +% % \end{markdown} % \begin{macrocode} -\begingroup -% \end{macrocode} -% \begin{markdown} -% Locally swap the category code of the backslash symbol with the pipe symbol. -% This is required in order that all the special symbols that appear in the -% first argument of the `markdownReadAndConvert` macro have the category code -% *other*. -% \end{markdown} -% \begin{macrocode} - \catcode`\|=0% - \catcode`\\=12% - |gdef|startmarkdown{% - |markdownReadAndConvert{\stopmarkdown}% - {|stopmarkdown}}% - |gdef|stopmarkdown{|markdownEnd}% -|endgroup +\ifx\startluacode\undefined % MkII + \begingroup + \catcode`\|=0% + \catcode`\\=12% + |gdef|startmarkdown{% + |markdownReadAndConvert{\stopmarkdown}% + {|stopmarkdown}}% + |gdef|stopmarkdown{% + |markdownEnd}% + |endgroup +\else % MkIV + \startluacode + document.markdown_buffering = false + local function preserve_trailing_spaces(line) + if document.markdown_buffering then + line = line:gsub("[ \t][ \t]$", "\t\t") + end + return line + end + resolvers.installinputlinehandler(preserve_trailing_spaces) + \stopluacode + \begingroup + \catcode`\|=0% + \catcode`\\=12% + |gdef|startmarkdown{% + |ctxlua{document.markdown_buffering = true}% + |markdownReadAndConvert{\stopmarkdown}% + {|stopmarkdown}}% + |gdef|stopmarkdown{% + |ctxlua{document.markdown_buffering = false}% + |markdownEnd}% + |endgroup +\fi % \end{macrocode} % \par % \begin{markdown} diff --git a/macros/generic/markdown/markdown.html b/macros/generic/markdown/markdown.html index 920955423f..852e39a3b1 100644 --- a/macros/generic/markdown/markdown.html +++ b/macros/generic/markdown/markdown.html @@ -82,7 +82,7 @@ <header id="title-block-header"> <h1 class="title">Markdown Package User Manual</h1> <p class="author">Vít Novotný</p> -<p class="date">2.11.0-0-g4505824 (2021/09/26)</p> +<p class="date">2.12.0-1-g976f074 (2021/12/30)</p> </header> <nav id="TOC" role="doc-toc"> <ul> @@ -1831,28 +1831,55 @@ Thomas,Edison,1847</code></pre> </dd> </dl> </blockquote> -<h4 data-number="2.2.1.13" id="option-fencedcode"><span class="header-section-number">2.2.1.13</span> Option <code>fencedCode</code></h4> +<h4 data-number="2.2.1.13" id="option-eagercache"><span class="header-section-number">2.2.1.13</span> Option <code>eagerCache</code></h4> +<dl> +<dt><code>eagerCache</code> (default value: <code>true</code>)</dt> +<dd><p>true</p> +<p>Converted markdown documents will be cached in <strong><code>cacheDir</code></strong>. This can be useful for post-processing the converted documents and for recovering historical versions of the documents from the cache. However, it also produces a large number of auxiliary files on the disk and obscures the output of the Lua command-line interface when it is used for plumbing.</p> +<p>This behavior will always be used if the <strong><code>finalizeCache</code></strong> option is enabled.</p> +</dd> +<dd><p>false</p> +<p>Converted markdown documents will not be cached. This decreases the number of auxiliary files that we produce and makes it easier to use the Lua command-line interface for plumbing.</p> +<p>This behavior will only be used when the <strong><code>finalizeCache</code></strong> option is disabled. Furthermore, this behavior is planned to be the new default in the next major release of the Markdown package.</p> +</dd> +</dl> +<h5 class="unnumbered" data-number="" id="lua-module-example-7">Lua Module Example</h5> +<p>Using a text editor, create a text document named <code>hello.md</code> with the following content:</p> +<div class="sourceCode" id="cb176"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb176-1"><a href="#cb176-1" aria-hidden="true"></a>Hello *world*!</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal with the <strong><code>eagerCache</code></strong> option disabled:</p> +<div class="sourceCode" id="cb177"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb177-1"><a href="#cb177-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ eagerCache=false -- hello.md hello.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A <span class="tex">T<sub>e</sub>X</span> document named <code>hello.tex</code> should be produced and contain the following code:</p> +<div class="sourceCode" id="cb178"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb178-1"><a href="#cb178-1" aria-hidden="true"></a>Hello <span class="fu">\markdownRendererEmphasis</span>{world}!<span class="fu">\relax</span></span></code></pre></div> +<hr /> +<p>Invoke LuaTeX from the terminal again, this time with the <strong><code>eagerCache</code></strong> option enabled:</p> +<div class="sourceCode" id="cb179"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb179-1"><a href="#cb179-1" aria-hidden="true"></a>texlua ⟨CLI pathname⟩ eagerCache=true -- hello.md hello.tex</span></code></pre></div> +<p>A <span class="tex">T<sub>e</sub>X</span> document named <code>hello.tex</code> should be produced and contain the following code:</p> +<div class="sourceCode" id="cb180"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb180-1"><a href="#cb180-1" aria-hidden="true"></a><span class="fu">\input</span> ./⟨hash⟩.md.tex<span class="fu">\relax</span></span></code></pre></div> +<p>Additionally, a <span class="tex">T<sub>e</sub>X</span> document named <code>⟨hash⟩.md.tex</code> should be produced and contain the following code:</p> +<div class="sourceCode" id="cb181"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb181-1"><a href="#cb181-1" aria-hidden="true"></a>Hello <span class="fu">\markdownRendererEmphasis</span>{world}!<span class="fu">\relax</span></span></code></pre></div> +<h4 data-number="2.2.1.14" id="option-fencedcode"><span class="header-section-number">2.2.1.14</span> Option <code>fencedCode</code></h4> <dl> <dt><code>fencedCode</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the commonmark fenced code block extension:</p> -<div class="sourceCode" id="cb176"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb176-1"><a href="#cb176-1" aria-hidden="true"></a><span class="in">~~~ js</span></span> -<span id="cb176-2"><a href="#cb176-2" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb176-3"><a href="#cb176-3" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> -<span id="cb176-4"><a href="#cb176-4" aria-hidden="true"></a>}</span> -<span id="cb176-5"><a href="#cb176-5" aria-hidden="true"></a><span class="op">~~~~~~</span></span> -<span id="cb176-6"><a href="#cb176-6" aria-hidden="true"></a></span> -<span id="cb176-7"><a href="#cb176-7" aria-hidden="true"></a> <span class="vs">``` html</span></span> -<span id="cb176-8"><a href="#cb176-8" aria-hidden="true"></a><span class="vs"> <pre></span></span> -<span id="cb176-9"><a href="#cb176-9" aria-hidden="true"></a><span class="vs"> <code></span></span> -<span id="cb176-10"><a href="#cb176-10" aria-hidden="true"></a><span class="vs"> // Some comments</span></span> -<span id="cb176-11"><a href="#cb176-11" aria-hidden="true"></a><span class="vs"> line 1 of code</span></span> -<span id="cb176-12"><a href="#cb176-12" aria-hidden="true"></a><span class="vs"> line 2 of code</span></span> -<span id="cb176-13"><a href="#cb176-13" aria-hidden="true"></a><span class="vs"> line 3 of code</span></span> -<span id="cb176-14"><a href="#cb176-14" aria-hidden="true"></a><span class="vs"> </code></span></span> -<span id="cb176-15"><a href="#cb176-15" aria-hidden="true"></a><span class="vs"> </pre></span></span> -<span id="cb176-16"><a href="#cb176-16" aria-hidden="true"></a><span class="vs"> ```</span></span></code></pre></div> +<div class="sourceCode" id="cb182"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb182-1"><a href="#cb182-1" aria-hidden="true"></a><span class="in">~~~ js</span></span> +<span id="cb182-2"><a href="#cb182-2" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> +<span id="cb182-3"><a href="#cb182-3" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> +<span id="cb182-4"><a href="#cb182-4" aria-hidden="true"></a>}</span> +<span id="cb182-5"><a href="#cb182-5" aria-hidden="true"></a><span class="op">~~~~~~</span></span> +<span id="cb182-6"><a href="#cb182-6" aria-hidden="true"></a></span> +<span id="cb182-7"><a href="#cb182-7" aria-hidden="true"></a> <span class="vs">``` html</span></span> +<span id="cb182-8"><a href="#cb182-8" aria-hidden="true"></a><span class="vs"> <pre></span></span> +<span id="cb182-9"><a href="#cb182-9" aria-hidden="true"></a><span class="vs"> <code></span></span> +<span id="cb182-10"><a href="#cb182-10" aria-hidden="true"></a><span class="vs"> // Some comments</span></span> +<span id="cb182-11"><a href="#cb182-11" aria-hidden="true"></a><span class="vs"> line 1 of code</span></span> +<span id="cb182-12"><a href="#cb182-12" aria-hidden="true"></a><span class="vs"> line 2 of code</span></span> +<span id="cb182-13"><a href="#cb182-13" aria-hidden="true"></a><span class="vs"> line 3 of code</span></span> +<span id="cb182-14"><a href="#cb182-14" aria-hidden="true"></a><span class="vs"> </code></span></span> +<span id="cb182-15"><a href="#cb182-15" aria-hidden="true"></a><span class="vs"> </pre></span></span> +<span id="cb182-16"><a href="#cb182-16" aria-hidden="true"></a><span class="vs"> ```</span></span></code></pre></div> </dd> </dl> </dd> @@ -1865,89 +1892,89 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="latex-example-12"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb177"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb177-1"><a href="#cb177-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb177-2"><a href="#cb177-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> -<span id="cb177-3"><a href="#cb177-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> -<span id="cb177-4"><a href="#cb177-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb177-5"><a href="#cb177-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb177-6"><a href="#cb177-6" aria-hidden="true"></a>~~~ js</span> -<span id="cb177-7"><a href="#cb177-7" aria-hidden="true"></a>if (a > 3) {</span> -<span id="cb177-8"><a href="#cb177-8" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> -<span id="cb177-9"><a href="#cb177-9" aria-hidden="true"></a>}</span> -<span id="cb177-10"><a href="#cb177-10" aria-hidden="true"></a>~~~~~~</span> -<span id="cb177-11"><a href="#cb177-11" aria-hidden="true"></a></span> -<span id="cb177-12"><a href="#cb177-12" aria-hidden="true"></a> ``` html</span> -<span id="cb177-13"><a href="#cb177-13" aria-hidden="true"></a> <pre></span> -<span id="cb177-14"><a href="#cb177-14" aria-hidden="true"></a> <code></span> -<span id="cb177-15"><a href="#cb177-15" aria-hidden="true"></a> // Some comments</span> -<span id="cb177-16"><a href="#cb177-16" aria-hidden="true"></a> line 1 of code</span> -<span id="cb177-17"><a href="#cb177-17" aria-hidden="true"></a> line 2 of code</span> -<span id="cb177-18"><a href="#cb177-18" aria-hidden="true"></a> line 3 of code</span> -<span id="cb177-19"><a href="#cb177-19" aria-hidden="true"></a> </code></span> -<span id="cb177-20"><a href="#cb177-20" aria-hidden="true"></a> </pre></span> -<span id="cb177-21"><a href="#cb177-21" aria-hidden="true"></a> ```</span> -<span id="cb177-22"><a href="#cb177-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb177-23"><a href="#cb177-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb178"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb178-1"><a href="#cb178-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<div class="sourceCode" id="cb179"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb179-1"><a href="#cb179-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb179-2"><a href="#cb179-2" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> -<span id="cb179-3"><a href="#cb179-3" aria-hidden="true"></a>}</span></code></pre></div> -<div class="sourceCode" id="cb180"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb180-1"><a href="#cb180-1" aria-hidden="true"></a><span class="kw"><pre></span></span> -<span id="cb180-2"><a href="#cb180-2" aria-hidden="true"></a> <span class="kw"><code></span></span> -<span id="cb180-3"><a href="#cb180-3" aria-hidden="true"></a> // Some comments</span> -<span id="cb180-4"><a href="#cb180-4" aria-hidden="true"></a> line 1 of code</span> -<span id="cb180-5"><a href="#cb180-5" aria-hidden="true"></a> line 2 of code</span> -<span id="cb180-6"><a href="#cb180-6" aria-hidden="true"></a> line 3 of code</span> -<span id="cb180-7"><a href="#cb180-7" aria-hidden="true"></a> <span class="kw"></code></span></span> -<span id="cb180-8"><a href="#cb180-8" aria-hidden="true"></a><span class="kw"></pre></span></span></code></pre></div> +<div class="sourceCode" id="cb183"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb183-1"><a href="#cb183-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb183-2"><a href="#cb183-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> +<span id="cb183-3"><a href="#cb183-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> +<span id="cb183-4"><a href="#cb183-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb183-5"><a href="#cb183-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb183-6"><a href="#cb183-6" aria-hidden="true"></a>~~~ js</span> +<span id="cb183-7"><a href="#cb183-7" aria-hidden="true"></a>if (a > 3) {</span> +<span id="cb183-8"><a href="#cb183-8" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> +<span id="cb183-9"><a href="#cb183-9" aria-hidden="true"></a>}</span> +<span id="cb183-10"><a href="#cb183-10" aria-hidden="true"></a>~~~~~~</span> +<span id="cb183-11"><a href="#cb183-11" aria-hidden="true"></a></span> +<span id="cb183-12"><a href="#cb183-12" aria-hidden="true"></a> ``` html</span> +<span id="cb183-13"><a href="#cb183-13" aria-hidden="true"></a> <pre></span> +<span id="cb183-14"><a href="#cb183-14" aria-hidden="true"></a> <code></span> +<span id="cb183-15"><a href="#cb183-15" aria-hidden="true"></a> // Some comments</span> +<span id="cb183-16"><a href="#cb183-16" aria-hidden="true"></a> line 1 of code</span> +<span id="cb183-17"><a href="#cb183-17" aria-hidden="true"></a> line 2 of code</span> +<span id="cb183-18"><a href="#cb183-18" aria-hidden="true"></a> line 3 of code</span> +<span id="cb183-19"><a href="#cb183-19" aria-hidden="true"></a> </code></span> +<span id="cb183-20"><a href="#cb183-20" aria-hidden="true"></a> </pre></span> +<span id="cb183-21"><a href="#cb183-21" aria-hidden="true"></a> ```</span> +<span id="cb183-22"><a href="#cb183-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb183-23"><a href="#cb183-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb184"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb184-1"><a href="#cb184-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<blockquote> +<div class="sourceCode" id="cb185"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb185-1"><a href="#cb185-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> +<span id="cb185-2"><a href="#cb185-2" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> +<span id="cb185-3"><a href="#cb185-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb186"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb186-1"><a href="#cb186-1" aria-hidden="true"></a><span class="kw"><pre></span></span> +<span id="cb186-2"><a href="#cb186-2" aria-hidden="true"></a> <span class="kw"><code></span></span> +<span id="cb186-3"><a href="#cb186-3" aria-hidden="true"></a> // Some comments</span> +<span id="cb186-4"><a href="#cb186-4" aria-hidden="true"></a> line 1 of code</span> +<span id="cb186-5"><a href="#cb186-5" aria-hidden="true"></a> line 2 of code</span> +<span id="cb186-6"><a href="#cb186-6" aria-hidden="true"></a> line 3 of code</span> +<span id="cb186-7"><a href="#cb186-7" aria-hidden="true"></a> <span class="kw"></code></span></span> +<span id="cb186-8"><a href="#cb186-8" aria-hidden="true"></a><span class="kw"></pre></span></span></code></pre></div> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-10">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb181"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb181-1"><a href="#cb181-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb181-2"><a href="#cb181-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFencedCode</span>{true}</span> -<span id="cb181-3"><a href="#cb181-3" aria-hidden="true"></a><span class="fu">\definetyping</span> [js]</span> -<span id="cb181-4"><a href="#cb181-4" aria-hidden="true"></a><span class="fu">\definetyping</span> [html]</span> -<span id="cb181-5"><a href="#cb181-5" aria-hidden="true"></a><span class="fu">\setuptyping</span> [html] [option=XML]</span> -<span id="cb181-6"><a href="#cb181-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb181-7"><a href="#cb181-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb181-8"><a href="#cb181-8" aria-hidden="true"></a>~~~ js</span> -<span id="cb181-9"><a href="#cb181-9" aria-hidden="true"></a>if (a > 3) {</span> -<span id="cb181-10"><a href="#cb181-10" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> -<span id="cb181-11"><a href="#cb181-11" aria-hidden="true"></a>}</span> -<span id="cb181-12"><a href="#cb181-12" aria-hidden="true"></a>~~~~~~</span> -<span id="cb181-13"><a href="#cb181-13" aria-hidden="true"></a></span> -<span id="cb181-14"><a href="#cb181-14" aria-hidden="true"></a> ``` html</span> -<span id="cb181-15"><a href="#cb181-15" aria-hidden="true"></a> <pre></span> -<span id="cb181-16"><a href="#cb181-16" aria-hidden="true"></a> <code></span> -<span id="cb181-17"><a href="#cb181-17" aria-hidden="true"></a> // Some comments</span> -<span id="cb181-18"><a href="#cb181-18" aria-hidden="true"></a> line 1 of code</span> -<span id="cb181-19"><a href="#cb181-19" aria-hidden="true"></a> line 2 of code</span> -<span id="cb181-20"><a href="#cb181-20" aria-hidden="true"></a> line 3 of code</span> -<span id="cb181-21"><a href="#cb181-21" aria-hidden="true"></a> </code></span> -<span id="cb181-22"><a href="#cb181-22" aria-hidden="true"></a> </pre></span> -<span id="cb181-23"><a href="#cb181-23" aria-hidden="true"></a> ```</span> -<span id="cb181-24"><a href="#cb181-24" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb181-25"><a href="#cb181-25" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb182"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb182-1"><a href="#cb182-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<div class="sourceCode" id="cb183"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb183-1"><a href="#cb183-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb183-2"><a href="#cb183-2" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> -<span id="cb183-3"><a href="#cb183-3" aria-hidden="true"></a>}</span></code></pre></div> -<div class="sourceCode" id="cb184"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb184-1"><a href="#cb184-1" aria-hidden="true"></a><span class="kw"><pre></span></span> -<span id="cb184-2"><a href="#cb184-2" aria-hidden="true"></a> <span class="kw"><code></span></span> -<span id="cb184-3"><a href="#cb184-3" aria-hidden="true"></a> // Some comments</span> -<span id="cb184-4"><a href="#cb184-4" aria-hidden="true"></a> line 1 of code</span> -<span id="cb184-5"><a href="#cb184-5" aria-hidden="true"></a> line 2 of code</span> -<span id="cb184-6"><a href="#cb184-6" aria-hidden="true"></a> line 3 of code</span> -<span id="cb184-7"><a href="#cb184-7" aria-hidden="true"></a> <span class="kw"></code></span></span> -<span id="cb184-8"><a href="#cb184-8" aria-hidden="true"></a><span class="kw"></pre></span></span></code></pre></div> -</blockquote> -<h4 data-number="2.2.1.14" id="option-finalizecache"><span class="header-section-number">2.2.1.14</span> Option <code>finalizeCache</code></h4> +<div class="sourceCode" id="cb187"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb187-1"><a href="#cb187-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb187-2"><a href="#cb187-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFencedCode</span>{true}</span> +<span id="cb187-3"><a href="#cb187-3" aria-hidden="true"></a><span class="fu">\definetyping</span> [js]</span> +<span id="cb187-4"><a href="#cb187-4" aria-hidden="true"></a><span class="fu">\definetyping</span> [html]</span> +<span id="cb187-5"><a href="#cb187-5" aria-hidden="true"></a><span class="fu">\setuptyping</span> [html] [option=XML]</span> +<span id="cb187-6"><a href="#cb187-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb187-7"><a href="#cb187-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb187-8"><a href="#cb187-8" aria-hidden="true"></a>~~~ js</span> +<span id="cb187-9"><a href="#cb187-9" aria-hidden="true"></a>if (a > 3) {</span> +<span id="cb187-10"><a href="#cb187-10" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> +<span id="cb187-11"><a href="#cb187-11" aria-hidden="true"></a>}</span> +<span id="cb187-12"><a href="#cb187-12" aria-hidden="true"></a>~~~~~~</span> +<span id="cb187-13"><a href="#cb187-13" aria-hidden="true"></a></span> +<span id="cb187-14"><a href="#cb187-14" aria-hidden="true"></a> ``` html</span> +<span id="cb187-15"><a href="#cb187-15" aria-hidden="true"></a> <pre></span> +<span id="cb187-16"><a href="#cb187-16" aria-hidden="true"></a> <code></span> +<span id="cb187-17"><a href="#cb187-17" aria-hidden="true"></a> // Some comments</span> +<span id="cb187-18"><a href="#cb187-18" aria-hidden="true"></a> line 1 of code</span> +<span id="cb187-19"><a href="#cb187-19" aria-hidden="true"></a> line 2 of code</span> +<span id="cb187-20"><a href="#cb187-20" aria-hidden="true"></a> line 3 of code</span> +<span id="cb187-21"><a href="#cb187-21" aria-hidden="true"></a> </code></span> +<span id="cb187-22"><a href="#cb187-22" aria-hidden="true"></a> </pre></span> +<span id="cb187-23"><a href="#cb187-23" aria-hidden="true"></a> ```</span> +<span id="cb187-24"><a href="#cb187-24" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb187-25"><a href="#cb187-25" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb188"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb188-1"><a href="#cb188-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<blockquote> +<div class="sourceCode" id="cb189"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb189-1"><a href="#cb189-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> +<span id="cb189-2"><a href="#cb189-2" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> +<span id="cb189-3"><a href="#cb189-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb190"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb190-1"><a href="#cb190-1" aria-hidden="true"></a><span class="kw"><pre></span></span> +<span id="cb190-2"><a href="#cb190-2" aria-hidden="true"></a> <span class="kw"><code></span></span> +<span id="cb190-3"><a href="#cb190-3" aria-hidden="true"></a> // Some comments</span> +<span id="cb190-4"><a href="#cb190-4" aria-hidden="true"></a> line 1 of code</span> +<span id="cb190-5"><a href="#cb190-5" aria-hidden="true"></a> line 2 of code</span> +<span id="cb190-6"><a href="#cb190-6" aria-hidden="true"></a> line 3 of code</span> +<span id="cb190-7"><a href="#cb190-7" aria-hidden="true"></a> <span class="kw"></code></span></span> +<span id="cb190-8"><a href="#cb190-8" aria-hidden="true"></a><span class="kw"></pre></span></span></code></pre></div> +</blockquote> +<h4 data-number="2.2.1.15" id="option-finalizecache"><span class="header-section-number">2.2.1.15</span> Option <code>finalizeCache</code></h4> <dl> <dt><code>finalizeCache</code> (default value: <code>false</code>)</dt> <dd><p>Whether an output file specified with the <strong><code>frozenCacheFileName</code></strong> option (frozen cache) that contains a mapping between an enumeration of markdown documents and their auxiliary cache files will be created.</p> @@ -1956,94 +1983,94 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-7">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb185"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb185-1"><a href="#cb185-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb185-2"><a href="#cb185-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> -<span id="cb185-3"><a href="#cb185-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb185-4"><a href="#cb185-4" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb185-5"><a href="#cb185-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb185-6"><a href="#cb185-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb191"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb191-1"><a href="#cb191-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb191-2"><a href="#cb191-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> +<span id="cb191-3"><a href="#cb191-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb191-4"><a href="#cb191-4" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb191-5"><a href="#cb191-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb191-6"><a href="#cb191-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb186"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb186-1"><a href="#cb186-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb192"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb192-1"><a href="#cb192-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced as we requested using the <code>finalizeCache</code> option.</p> <p>Next, change the content of <code>document.tex</code> as follows:</p> -<div class="sourceCode" id="cb187"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb187-1"><a href="#cb187-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb187-2"><a href="#cb187-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> -<span id="cb187-3"><a href="#cb187-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb187-4"><a href="#cb187-4" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb187-5"><a href="#cb187-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb187-6"><a href="#cb187-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb193"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb193-1"><a href="#cb193-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb193-2"><a href="#cb193-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> +<span id="cb193-3"><a href="#cb193-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb193-4"><a href="#cb193-4" aria-hidden="true"></a>Hi *world*!</span> +<span id="cb193-5"><a href="#cb193-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb193-6"><a href="#cb193-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb188"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb188-1"><a href="#cb188-1" aria-hidden="true"></a><span class="ex">pdftex</span> -no-shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb194"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb194-1"><a href="#cb194-1" aria-hidden="true"></a><span class="ex">pdftex</span> -no-shell-escape document.tex</span></code></pre></div> <p>A new PDF document named <code>document.pdf</code> should be produced and contain the same text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> <h5 class="unnumbered" data-number="" id="latex-example-13"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb189"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb189-1"><a href="#cb189-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</span> -<span id="cb189-2"><a href="#cb189-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb189-3"><a href="#cb189-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb189-4"><a href="#cb189-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb189-5"><a href="#cb189-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb189-6"><a href="#cb189-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb189-7"><a href="#cb189-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb195"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb195-1"><a href="#cb195-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</span> +<span id="cb195-2"><a href="#cb195-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb195-3"><a href="#cb195-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb195-4"><a href="#cb195-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb195-5"><a href="#cb195-5" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb195-6"><a href="#cb195-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb195-7"><a href="#cb195-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb190"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb190-1"><a href="#cb190-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb196"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb196-1"><a href="#cb196-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced as we requested using the <code>finalizecache</code> option.</p> <p>Next, change the content of <code>document.tex</code> as follows:</p> -<div class="sourceCode" id="cb191"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb191-1"><a href="#cb191-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span> -<span id="cb191-2"><a href="#cb191-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb191-3"><a href="#cb191-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb191-4"><a href="#cb191-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb191-5"><a href="#cb191-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb191-6"><a href="#cb191-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb191-7"><a href="#cb191-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb197"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb197-1"><a href="#cb197-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span> +<span id="cb197-2"><a href="#cb197-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb197-3"><a href="#cb197-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb197-4"><a href="#cb197-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb197-5"><a href="#cb197-5" aria-hidden="true"></a>Hi *world*!</span> +<span id="cb197-6"><a href="#cb197-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb197-7"><a href="#cb197-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb192"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb192-1"><a href="#cb192-1" aria-hidden="true"></a><span class="ex">pdflatex</span> -no-shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb198"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb198-1"><a href="#cb198-1" aria-hidden="true"></a><span class="ex">pdflatex</span> -no-shell-escape document.tex</span></code></pre></div> <p>A new PDF document named <code>document.pdf</code> should be produced and contain the same text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> <h5 class="unnumbered" data-number="" id="context-example-11">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb193"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb193-1"><a href="#cb193-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb193-2"><a href="#cb193-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> -<span id="cb193-3"><a href="#cb193-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb193-4"><a href="#cb193-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb193-5"><a href="#cb193-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb193-6"><a href="#cb193-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb193-7"><a href="#cb193-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb199"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb199-1"><a href="#cb199-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb199-2"><a href="#cb199-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> +<span id="cb199-3"><a href="#cb199-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb199-4"><a href="#cb199-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb199-5"><a href="#cb199-5" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb199-6"><a href="#cb199-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb199-7"><a href="#cb199-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb194"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb194-1"><a href="#cb194-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb200"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb200-1"><a href="#cb200-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizeCache</code> option.</p> <p>Next, change the content of <code>document.tex</code> as follows:</p> -<div class="sourceCode" id="cb195"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb195-1"><a href="#cb195-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb195-2"><a href="#cb195-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> -<span id="cb195-3"><a href="#cb195-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb195-4"><a href="#cb195-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb195-5"><a href="#cb195-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb195-6"><a href="#cb195-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb195-7"><a href="#cb195-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb201"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb201-1"><a href="#cb201-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb201-2"><a href="#cb201-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> +<span id="cb201-3"><a href="#cb201-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb201-4"><a href="#cb201-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb201-5"><a href="#cb201-5" aria-hidden="true"></a>Hi *world*!</span> +<span id="cb201-6"><a href="#cb201-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb201-7"><a href="#cb201-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb196"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb196-1"><a href="#cb196-1" aria-hidden="true"></a><span class="ex">texexec</span> --passon=--no-shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb202"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb202-1"><a href="#cb202-1" aria-hidden="true"></a><span class="ex">texexec</span> --passon=--no-shell-escape document.tex</span></code></pre></div> <p>A new PDF document named <code>document.pdf</code> should be produced and contain the same text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h4 data-number="2.2.1.15" id="option-footnotes"><span class="header-section-number">2.2.1.15</span> Option <code>footnotes</code></h4> +<h4 data-number="2.2.1.16" id="option-footnotes"><span class="header-section-number">2.2.1.16</span> Option <code>footnotes</code></h4> <dl> <dt><code>footnotes</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the pandoc footnote syntax extension:</p> -<div class="sourceCode" id="cb197"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb197-1"><a href="#cb197-1" aria-hidden="true"></a>Here is a footnote reference,<span class="ot">[^1]</span> and another.<span class="ot">[^longnote]</span></span> -<span id="cb197-2"><a href="#cb197-2" aria-hidden="true"></a></span> -<span id="cb197-3"><a href="#cb197-3" aria-hidden="true"></a><span class="ot">[^1]: </span>Here is the footnote.</span> -<span id="cb197-4"><a href="#cb197-4" aria-hidden="true"></a></span> -<span id="cb197-5"><a href="#cb197-5" aria-hidden="true"></a><span class="ot">[^longnote]: </span>Here's one with multiple blocks.</span> -<span id="cb197-6"><a href="#cb197-6" aria-hidden="true"></a></span> -<span id="cb197-7"><a href="#cb197-7" aria-hidden="true"></a><span class="in"> Subsequent paragraphs are indented to show that they</span></span> -<span id="cb197-8"><a href="#cb197-8" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb197-9"><a href="#cb197-9" aria-hidden="true"></a></span> -<span id="cb197-10"><a href="#cb197-10" aria-hidden="true"></a><span class="in"> { some.code }</span></span> -<span id="cb197-11"><a href="#cb197-11" aria-hidden="true"></a></span> -<span id="cb197-12"><a href="#cb197-12" aria-hidden="true"></a><span class="in"> The whole paragraph can be indented, or just the</span></span> -<span id="cb197-13"><a href="#cb197-13" aria-hidden="true"></a><span class="in"> first line. In this way, multi-paragraph footnotes</span></span> -<span id="cb197-14"><a href="#cb197-14" aria-hidden="true"></a><span class="in"> work like multi-paragraph list items.</span></span> -<span id="cb197-15"><a href="#cb197-15" aria-hidden="true"></a></span> -<span id="cb197-16"><a href="#cb197-16" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb197-17"><a href="#cb197-17" aria-hidden="true"></a>isn't indented.</span></code></pre></div> +<div class="sourceCode" id="cb203"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb203-1"><a href="#cb203-1" aria-hidden="true"></a>Here is a footnote reference,<span class="ot">[^1]</span> and another.<span class="ot">[^longnote]</span></span> +<span id="cb203-2"><a href="#cb203-2" aria-hidden="true"></a></span> +<span id="cb203-3"><a href="#cb203-3" aria-hidden="true"></a><span class="ot">[^1]: </span>Here is the footnote.</span> +<span id="cb203-4"><a href="#cb203-4" aria-hidden="true"></a></span> +<span id="cb203-5"><a href="#cb203-5" aria-hidden="true"></a><span class="ot">[^longnote]: </span>Here's one with multiple blocks.</span> +<span id="cb203-6"><a href="#cb203-6" aria-hidden="true"></a></span> +<span id="cb203-7"><a href="#cb203-7" aria-hidden="true"></a><span class="in"> Subsequent paragraphs are indented to show that they</span></span> +<span id="cb203-8"><a href="#cb203-8" aria-hidden="true"></a>belong to the previous footnote.</span> +<span id="cb203-9"><a href="#cb203-9" aria-hidden="true"></a></span> +<span id="cb203-10"><a href="#cb203-10" aria-hidden="true"></a><span class="in"> { some.code }</span></span> +<span id="cb203-11"><a href="#cb203-11" aria-hidden="true"></a></span> +<span id="cb203-12"><a href="#cb203-12" aria-hidden="true"></a><span class="in"> The whole paragraph can be indented, or just the</span></span> +<span id="cb203-13"><a href="#cb203-13" aria-hidden="true"></a><span class="in"> first line. In this way, multi-paragraph footnotes</span></span> +<span id="cb203-14"><a href="#cb203-14" aria-hidden="true"></a><span class="in"> work like multi-paragraph list items.</span></span> +<span id="cb203-15"><a href="#cb203-15" aria-hidden="true"></a></span> +<span id="cb203-16"><a href="#cb203-16" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> +<span id="cb203-17"><a href="#cb203-17" aria-hidden="true"></a>isn't indented.</span></code></pre></div> </dd> </dl> </dd> @@ -2056,31 +2083,31 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="latex-example-14"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb198"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb198-1"><a href="#cb198-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb198-2"><a href="#cb198-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> -<span id="cb198-3"><a href="#cb198-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb198-4"><a href="#cb198-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb198-5"><a href="#cb198-5" aria-hidden="true"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> -<span id="cb198-6"><a href="#cb198-6" aria-hidden="true"></a></span> -<span id="cb198-7"><a href="#cb198-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> -<span id="cb198-8"><a href="#cb198-8" aria-hidden="true"></a></span> -<span id="cb198-9"><a href="#cb198-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> -<span id="cb198-10"><a href="#cb198-10" aria-hidden="true"></a></span> -<span id="cb198-11"><a href="#cb198-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> -<span id="cb198-12"><a href="#cb198-12" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb198-13"><a href="#cb198-13" aria-hidden="true"></a></span> -<span id="cb198-14"><a href="#cb198-14" aria-hidden="true"></a> { some.code }</span> -<span id="cb198-15"><a href="#cb198-15" aria-hidden="true"></a></span> -<span id="cb198-16"><a href="#cb198-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> -<span id="cb198-17"><a href="#cb198-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> -<span id="cb198-18"><a href="#cb198-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> -<span id="cb198-19"><a href="#cb198-19" aria-hidden="true"></a></span> -<span id="cb198-20"><a href="#cb198-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb198-21"><a href="#cb198-21" aria-hidden="true"></a>isn't indented.</span> -<span id="cb198-22"><a href="#cb198-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb198-23"><a href="#cb198-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb199"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb199-1"><a href="#cb199-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb204"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb204-1"><a href="#cb204-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb204-2"><a href="#cb204-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> +<span id="cb204-3"><a href="#cb204-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb204-4"><a href="#cb204-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb204-5"><a href="#cb204-5" aria-hidden="true"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> +<span id="cb204-6"><a href="#cb204-6" aria-hidden="true"></a></span> +<span id="cb204-7"><a href="#cb204-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> +<span id="cb204-8"><a href="#cb204-8" aria-hidden="true"></a></span> +<span id="cb204-9"><a href="#cb204-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> +<span id="cb204-10"><a href="#cb204-10" aria-hidden="true"></a></span> +<span id="cb204-11"><a href="#cb204-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> +<span id="cb204-12"><a href="#cb204-12" aria-hidden="true"></a>belong to the previous footnote.</span> +<span id="cb204-13"><a href="#cb204-13" aria-hidden="true"></a></span> +<span id="cb204-14"><a href="#cb204-14" aria-hidden="true"></a> { some.code }</span> +<span id="cb204-15"><a href="#cb204-15" aria-hidden="true"></a></span> +<span id="cb204-16"><a href="#cb204-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> +<span id="cb204-17"><a href="#cb204-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> +<span id="cb204-18"><a href="#cb204-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> +<span id="cb204-19"><a href="#cb204-19" aria-hidden="true"></a></span> +<span id="cb204-20"><a href="#cb204-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> +<span id="cb204-21"><a href="#cb204-21" aria-hidden="true"></a>isn't indented.</span> +<span id="cb204-22"><a href="#cb204-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb204-23"><a href="#cb204-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb205"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb205-1"><a href="#cb205-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Here is a footnote reference,<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> and another.<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a></p> @@ -2088,66 +2115,110 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-12">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb201"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb201-1"><a href="#cb201-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb201-2"><a href="#cb201-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> -<span id="cb201-3"><a href="#cb201-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb201-4"><a href="#cb201-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb201-5"><a href="#cb201-5" aria-hidden="true"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> -<span id="cb201-6"><a href="#cb201-6" aria-hidden="true"></a></span> -<span id="cb201-7"><a href="#cb201-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> -<span id="cb201-8"><a href="#cb201-8" aria-hidden="true"></a></span> -<span id="cb201-9"><a href="#cb201-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> -<span id="cb201-10"><a href="#cb201-10" aria-hidden="true"></a></span> -<span id="cb201-11"><a href="#cb201-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> -<span id="cb201-12"><a href="#cb201-12" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb201-13"><a href="#cb201-13" aria-hidden="true"></a></span> -<span id="cb201-14"><a href="#cb201-14" aria-hidden="true"></a> { some.code }</span> -<span id="cb201-15"><a href="#cb201-15" aria-hidden="true"></a></span> -<span id="cb201-16"><a href="#cb201-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> -<span id="cb201-17"><a href="#cb201-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> -<span id="cb201-18"><a href="#cb201-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> -<span id="cb201-19"><a href="#cb201-19" aria-hidden="true"></a></span> -<span id="cb201-20"><a href="#cb201-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb201-21"><a href="#cb201-21" aria-hidden="true"></a>isn't indented.</span> -<span id="cb201-22"><a href="#cb201-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb201-23"><a href="#cb201-23" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb202"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb202-1"><a href="#cb202-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb207"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb207-1"><a href="#cb207-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb207-2"><a href="#cb207-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> +<span id="cb207-3"><a href="#cb207-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb207-4"><a href="#cb207-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb207-5"><a href="#cb207-5" aria-hidden="true"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> +<span id="cb207-6"><a href="#cb207-6" aria-hidden="true"></a></span> +<span id="cb207-7"><a href="#cb207-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> +<span id="cb207-8"><a href="#cb207-8" aria-hidden="true"></a></span> +<span id="cb207-9"><a href="#cb207-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> +<span id="cb207-10"><a href="#cb207-10" aria-hidden="true"></a></span> +<span id="cb207-11"><a href="#cb207-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> +<span id="cb207-12"><a href="#cb207-12" aria-hidden="true"></a>belong to the previous footnote.</span> +<span id="cb207-13"><a href="#cb207-13" aria-hidden="true"></a></span> +<span id="cb207-14"><a href="#cb207-14" aria-hidden="true"></a> { some.code }</span> +<span id="cb207-15"><a href="#cb207-15" aria-hidden="true"></a></span> +<span id="cb207-16"><a href="#cb207-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> +<span id="cb207-17"><a href="#cb207-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> +<span id="cb207-18"><a href="#cb207-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> +<span id="cb207-19"><a href="#cb207-19" aria-hidden="true"></a></span> +<span id="cb207-20"><a href="#cb207-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> +<span id="cb207-21"><a href="#cb207-21" aria-hidden="true"></a>isn't indented.</span> +<span id="cb207-22"><a href="#cb207-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb207-23"><a href="#cb207-23" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb208"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb208-1"><a href="#cb208-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Here is a footnote reference,<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a> and another.<a href="#fn4" class="footnote-ref" id="fnref4" role="doc-noteref"><sup>4</sup></a></p> <p>This paragraph won’t be part of the note, because it isn’t indented.</p> </blockquote> -<h4 data-number="2.2.1.16" id="option-frozencachecounter"><span class="header-section-number">2.2.1.16</span> Option <code>frozenCacheCounter</code></h4> +<h4 data-number="2.2.1.17" id="option-frozencachecounter"><span class="header-section-number">2.2.1.17</span> Option <code>frozenCacheCounter</code></h4> <dl> <dt><code>frozenCacheCounter</code> (default value: <code>0</code>)</dt> <dd><p>The number of the current markdown document that will be stored in an output file (frozen cache) when the <strong><code>finalizeCache</code></strong> is enabled. When the document number is 0, then a new frozen cache will be created. Otherwise, the frozen cache will be appended.</p> <p>Each frozen cache entry will define a <span class="tex">T<sub>e</sub>X</span> macro <code>\markdownFrozenCache</code>⟨<em>number</em>⟩ that will typeset markdown document number ⟨<em>number</em>⟩.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-7">Lua Module Example</h5> +<h5 class="unnumbered" data-number="" id="lua-module-example-8">Lua Module Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb204"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb204-1"><a href="#cb204-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb204-2"><a href="#cb204-2" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb204-3"><a href="#cb204-3" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb204-4"><a href="#cb204-4" aria-hidden="true"></a> local firstConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 0})</span> -<span id="cb204-5"><a href="#cb204-5" aria-hidden="true"></a> local firstInput = "Hello"</span> -<span id="cb204-6"><a href="#cb204-6" aria-hidden="true"></a> local secondConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 1})</span> -<span id="cb204-7"><a href="#cb204-7" aria-hidden="true"></a> local secondInput = "*world*!"</span> -<span id="cb204-8"><a href="#cb204-8" aria-hidden="true"></a> tex.sprint(firstConvert(firstInput) .. [[ ]] .. secondConvert(secondInput)) }</span> -<span id="cb204-9"><a href="#cb204-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb210"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb210-1"><a href="#cb210-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb210-2"><a href="#cb210-2" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb210-3"><a href="#cb210-3" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb210-4"><a href="#cb210-4" aria-hidden="true"></a> local firstConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 0})</span> +<span id="cb210-5"><a href="#cb210-5" aria-hidden="true"></a> local firstInput = "Hello"</span> +<span id="cb210-6"><a href="#cb210-6" aria-hidden="true"></a> local secondConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 1})</span> +<span id="cb210-7"><a href="#cb210-7" aria-hidden="true"></a> local secondInput = "*world*!"</span> +<span id="cb210-8"><a href="#cb210-8" aria-hidden="true"></a> tex.sprint(firstConvert(firstInput) .. [[ ]] .. secondConvert(secondInput)) }</span> +<span id="cb210-9"><a href="#cb210-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb205"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb205-1"><a href="#cb205-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb211"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb211-1"><a href="#cb211-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache with two entries will also be produced as we requested using the <code>frozenCacheCounter</code> option.</p> -<h4 data-number="2.2.1.17" id="option-hashenumerators"><span class="header-section-number">2.2.1.17</span> Option <code>hashEnumerators</code></h4> +<h4 data-number="2.2.1.18" id="option-hardlinebreaks"><span class="header-section-number">2.2.1.18</span> Option <code>hardLineBreaks</code></h4> +<dl> +<dt><code>hardLineBreaks</code> (default value: <code>false</code>)</dt> +<dd><dl> +<dt>true</dt> +<dd><p>Interpret all newlines within a paragraph as hard line breaks instead of spaces.</p> +</dd> +</dl> +</dd> +<dd><dl> +<dt>false</dt> +<dd><p>Interpret all newlines within a paragraph as spaces.</p> +</dd> +</dl> +</dd> +</dl> +<h5 class="unnumbered" data-number="" id="latex-example-15"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb212"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb212-1"><a href="#cb212-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb212-2"><a href="#cb212-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb212-3"><a href="#cb212-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb212-4"><a href="#cb212-4" aria-hidden="true"></a></span> +<span id="cb212-5"><a href="#cb212-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb212-6"><a href="#cb212-6" aria-hidden="true"></a>'Twas brillig, and the slithy toves</span> +<span id="cb212-7"><a href="#cb212-7" aria-hidden="true"></a>Did gyre and gimble in the wabe;</span> +<span id="cb212-8"><a href="#cb212-8" aria-hidden="true"></a>All mimsy were the borogoves,</span> +<span id="cb212-9"><a href="#cb212-9" aria-hidden="true"></a>And the mome raths outgrabe.</span> +<span id="cb212-10"><a href="#cb212-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb212-11"><a href="#cb212-11" aria-hidden="true"></a></span> +<span id="cb212-12"><a href="#cb212-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hardLineBreaks}</span> +<span id="cb212-13"><a href="#cb212-13" aria-hidden="true"></a>'Twas brillig, and the slithy toves</span> +<span id="cb212-14"><a href="#cb212-14" aria-hidden="true"></a>Did gyre and gimble in the wabe;</span> +<span id="cb212-15"><a href="#cb212-15" aria-hidden="true"></a>All mimsy were the borogoves,</span> +<span id="cb212-16"><a href="#cb212-16" aria-hidden="true"></a>And the mome raths outgrabe.</span> +<span id="cb212-17"><a href="#cb212-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb212-18"><a href="#cb212-18" aria-hidden="true"></a></span> +<span id="cb212-19"><a href="#cb212-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb213"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb213-1"><a href="#cb213-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<blockquote> +<p>’Twas brillig, and the slithy toves Did gyre and gimble in the wabe; All mimsy were the borogoves, And the mome raths outgrabe.</p> +<p>’Twas brillig, and the slithy toves Did gyre and gimble in the wabe; All mimsy were the borogoves, And the mome raths outgrabe.</p> +</blockquote> +<h4 data-number="2.2.1.19" id="option-hashenumerators"><span class="header-section-number">2.2.1.19</span> Option <code>hashEnumerators</code></h4> <dl> <dt><code>hashEnumerators</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the use of hash symbols (<code>#</code>) as ordered item list markers:</p> -<div class="sourceCode" id="cb206"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb206-1"><a href="#cb206-1" aria-hidden="true"></a>#. Bird</span> -<span id="cb206-2"><a href="#cb206-2" aria-hidden="true"></a>#. McHale</span> -<span id="cb206-3"><a href="#cb206-3" aria-hidden="true"></a>#. Parish</span></code></pre></div> +<div class="sourceCode" id="cb214"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb214-1"><a href="#cb214-1" aria-hidden="true"></a>#. Bird</span> +<span id="cb214-2"><a href="#cb214-2" aria-hidden="true"></a>#. McHale</span> +<span id="cb214-3"><a href="#cb214-3" aria-hidden="true"></a>#. Parish</span></code></pre></div> </dd> </dl> </dd> @@ -2158,27 +2229,27 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-15"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-16"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb207"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb207-1"><a href="#cb207-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb207-2"><a href="#cb207-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb207-3"><a href="#cb207-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb207-4"><a href="#cb207-4" aria-hidden="true"></a></span> -<span id="cb207-5"><a href="#cb207-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb207-6"><a href="#cb207-6" aria-hidden="true"></a>. Bird</span> -<span id="cb207-7"><a href="#cb207-7" aria-hidden="true"></a>. McHale</span> -<span id="cb207-8"><a href="#cb207-8" aria-hidden="true"></a>. Parish</span> -<span id="cb207-9"><a href="#cb207-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb207-10"><a href="#cb207-10" aria-hidden="true"></a></span> -<span id="cb207-11"><a href="#cb207-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hashEnumerators}</span> -<span id="cb207-12"><a href="#cb207-12" aria-hidden="true"></a>. Bird</span> -<span id="cb207-13"><a href="#cb207-13" aria-hidden="true"></a>. McHale</span> -<span id="cb207-14"><a href="#cb207-14" aria-hidden="true"></a>. Parish</span> -<span id="cb207-15"><a href="#cb207-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb207-16"><a href="#cb207-16" aria-hidden="true"></a></span> -<span id="cb207-17"><a href="#cb207-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb208"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb208-1"><a href="#cb208-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb215"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb215-1"><a href="#cb215-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb215-2"><a href="#cb215-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb215-3"><a href="#cb215-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb215-4"><a href="#cb215-4" aria-hidden="true"></a></span> +<span id="cb215-5"><a href="#cb215-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb215-6"><a href="#cb215-6" aria-hidden="true"></a>. Bird</span> +<span id="cb215-7"><a href="#cb215-7" aria-hidden="true"></a>. McHale</span> +<span id="cb215-8"><a href="#cb215-8" aria-hidden="true"></a>. Parish</span> +<span id="cb215-9"><a href="#cb215-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb215-10"><a href="#cb215-10" aria-hidden="true"></a></span> +<span id="cb215-11"><a href="#cb215-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hashEnumerators}</span> +<span id="cb215-12"><a href="#cb215-12" aria-hidden="true"></a>. Bird</span> +<span id="cb215-13"><a href="#cb215-13" aria-hidden="true"></a>. McHale</span> +<span id="cb215-14"><a href="#cb215-14" aria-hidden="true"></a>. Parish</span> +<span id="cb215-15"><a href="#cb215-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb215-16"><a href="#cb215-16" aria-hidden="true"></a></span> +<span id="cb215-17"><a href="#cb215-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb216"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb216-1"><a href="#cb216-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="bird">. Bird</h1> @@ -2192,25 +2263,25 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-13">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb209"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb209-1"><a href="#cb209-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb209-2"><a href="#cb209-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb209-3"><a href="#cb209-3" aria-hidden="true"></a></span> -<span id="cb209-4"><a href="#cb209-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb209-5"><a href="#cb209-5" aria-hidden="true"></a>. Bird</span> -<span id="cb209-6"><a href="#cb209-6" aria-hidden="true"></a>. McHale</span> -<span id="cb209-7"><a href="#cb209-7" aria-hidden="true"></a>. Parish</span> -<span id="cb209-8"><a href="#cb209-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb209-9"><a href="#cb209-9" aria-hidden="true"></a></span> -<span id="cb209-10"><a href="#cb209-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionHashEnumerators</span>{true}</span> -<span id="cb209-11"><a href="#cb209-11" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb209-12"><a href="#cb209-12" aria-hidden="true"></a>. Bird</span> -<span id="cb209-13"><a href="#cb209-13" aria-hidden="true"></a>. McHale</span> -<span id="cb209-14"><a href="#cb209-14" aria-hidden="true"></a>. Parish</span> -<span id="cb209-15"><a href="#cb209-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb209-16"><a href="#cb209-16" aria-hidden="true"></a></span> -<span id="cb209-17"><a href="#cb209-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb210"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb210-1"><a href="#cb210-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb217"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb217-1"><a href="#cb217-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb217-2"><a href="#cb217-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb217-3"><a href="#cb217-3" aria-hidden="true"></a></span> +<span id="cb217-4"><a href="#cb217-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb217-5"><a href="#cb217-5" aria-hidden="true"></a>. Bird</span> +<span id="cb217-6"><a href="#cb217-6" aria-hidden="true"></a>. McHale</span> +<span id="cb217-7"><a href="#cb217-7" aria-hidden="true"></a>. Parish</span> +<span id="cb217-8"><a href="#cb217-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb217-9"><a href="#cb217-9" aria-hidden="true"></a></span> +<span id="cb217-10"><a href="#cb217-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionHashEnumerators</span>{true}</span> +<span id="cb217-11"><a href="#cb217-11" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb217-12"><a href="#cb217-12" aria-hidden="true"></a>. Bird</span> +<span id="cb217-13"><a href="#cb217-13" aria-hidden="true"></a>. McHale</span> +<span id="cb217-14"><a href="#cb217-14" aria-hidden="true"></a>. Parish</span> +<span id="cb217-15"><a href="#cb217-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb217-16"><a href="#cb217-16" aria-hidden="true"></a></span> +<span id="cb217-17"><a href="#cb217-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb218"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb218-1"><a href="#cb218-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="bird-1">. Bird</h1> @@ -2222,18 +2293,18 @@ Thomas,Edison,1847</code></pre> <li>Parish</li> </ol> </blockquote> -<h4 data-number="2.2.1.18" id="header-attributes"><span class="header-section-number">2.2.1.18</span> Option <code>headerAttributes</code></h4> +<h4 data-number="2.2.1.20" id="header-attributes"><span class="header-section-number">2.2.1.20</span> Option <code>headerAttributes</code></h4> <dl> <dt><code>headerAttributes</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the assignment of HTML attributes to headings:</p> -<div class="sourceCode" id="cb211"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb211-1"><a href="#cb211-1" aria-hidden="true"></a><span class="fu"># My first heading {#foo}</span></span> -<span id="cb211-2"><a href="#cb211-2" aria-hidden="true"></a></span> -<span id="cb211-3"><a href="#cb211-3" aria-hidden="true"></a><span class="fu">## My second heading ## {#bar .baz}</span></span> -<span id="cb211-4"><a href="#cb211-4" aria-hidden="true"></a></span> -<span id="cb211-5"><a href="#cb211-5" aria-hidden="true"></a>Yet another heading {key=value}</span> -<span id="cb211-6"><a href="#cb211-6" aria-hidden="true"></a><span class="fu">===================</span></span></code></pre></div> +<div class="sourceCode" id="cb219"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb219-1"><a href="#cb219-1" aria-hidden="true"></a><span class="fu"># My first heading {#foo}</span></span> +<span id="cb219-2"><a href="#cb219-2" aria-hidden="true"></a></span> +<span id="cb219-3"><a href="#cb219-3" aria-hidden="true"></a><span class="fu">## My second heading ## {#bar .baz}</span></span> +<span id="cb219-4"><a href="#cb219-4" aria-hidden="true"></a></span> +<span id="cb219-5"><a href="#cb219-5" aria-hidden="true"></a>Yet another heading {key=value}</span> +<span id="cb219-6"><a href="#cb219-6" aria-hidden="true"></a><span class="fu">===================</span></span></code></pre></div> <p>These HTML attributes have currently no effect other than enabling <a href="#slice">content slicing</a>.</p> </dd> </dl> @@ -2245,7 +2316,7 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h4 data-number="2.2.1.19" id="option-html"><span class="header-section-number">2.2.1.19</span> Option <code>html</code></h4> +<h4 data-number="2.2.1.21" id="option-html"><span class="header-section-number">2.2.1.21</span> Option <code>html</code></h4> <dl> <dt><code>html</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -2261,33 +2332,33 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-8">Lua Module Example</h5> +<h5 class="unnumbered" data-number="" id="lua-module-example-9">Lua Module Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb212"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb212-1"><a href="#cb212-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb212-2"><a href="#cb212-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb212-3"><a href="#cb212-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb212-4"><a href="#cb212-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb212-5"><a href="#cb212-5" aria-hidden="true"></a> local convert = markdown.new()</span> -<span id="cb212-6"><a href="#cb212-6" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb212-7"><a href="#cb212-7" aria-hidden="true"></a> local input =</span> -<span id="cb212-8"><a href="#cb212-8" aria-hidden="true"></a> "<div>*There is no block tag support.*</div>" .. newline ..</span> -<span id="cb212-9"><a href="#cb212-9" aria-hidden="true"></a> "*There is no <inline tag="tag"></inline> support.*" .. newline ..</span> -<span id="cb212-10"><a href="#cb212-10" aria-hidden="true"></a> "_There is no <!-- comment --> support._" .. newline ..</span> -<span id="cb212-11"><a href="#cb212-11" aria-hidden="true"></a> "_There is no <? HTML instruction ?> support._"</span> -<span id="cb212-12"><a href="#cb212-12" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb212-13"><a href="#cb212-13" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb212-14"><a href="#cb212-14" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb212-15"><a href="#cb212-15" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb212-16"><a href="#cb212-16" aria-hidden="true"></a> local convert = markdown.new({html = true})</span> -<span id="cb212-17"><a href="#cb212-17" aria-hidden="true"></a> local input =</span> -<span id="cb212-18"><a href="#cb212-18" aria-hidden="true"></a> "<div>*There is block tag support.*</div>" .. newline ..</span> -<span id="cb212-19"><a href="#cb212-19" aria-hidden="true"></a> "*There is <inline tag="tag"></inline> support.*" .. newline ..</span> -<span id="cb212-20"><a href="#cb212-20" aria-hidden="true"></a> "_There is <!-- comment --> support._" .. newline ..</span> -<span id="cb212-21"><a href="#cb212-21" aria-hidden="true"></a> "_There is <? HTML instruction ?> support._"</span> -<span id="cb212-22"><a href="#cb212-22" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb212-23"><a href="#cb212-23" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb220"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb220-1"><a href="#cb220-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb220-2"><a href="#cb220-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb220-3"><a href="#cb220-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb220-4"><a href="#cb220-4" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb220-5"><a href="#cb220-5" aria-hidden="true"></a> local convert = markdown.new()</span> +<span id="cb220-6"><a href="#cb220-6" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> +<span id="cb220-7"><a href="#cb220-7" aria-hidden="true"></a> local input =</span> +<span id="cb220-8"><a href="#cb220-8" aria-hidden="true"></a> "<div>*There is no block tag support.*</div>" .. newline ..</span> +<span id="cb220-9"><a href="#cb220-9" aria-hidden="true"></a> "*There is no <inline tag="tag"></inline> support.*" .. newline ..</span> +<span id="cb220-10"><a href="#cb220-10" aria-hidden="true"></a> "_There is no <!-- comment --> support._" .. newline ..</span> +<span id="cb220-11"><a href="#cb220-11" aria-hidden="true"></a> "_There is no <? HTML instruction ?> support._"</span> +<span id="cb220-12"><a href="#cb220-12" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> +<span id="cb220-13"><a href="#cb220-13" aria-hidden="true"></a><span class="fu">\par</span></span> +<span id="cb220-14"><a href="#cb220-14" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb220-15"><a href="#cb220-15" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb220-16"><a href="#cb220-16" aria-hidden="true"></a> local convert = markdown.new({html = true})</span> +<span id="cb220-17"><a href="#cb220-17" aria-hidden="true"></a> local input =</span> +<span id="cb220-18"><a href="#cb220-18" aria-hidden="true"></a> "<div>*There is block tag support.*</div>" .. newline ..</span> +<span id="cb220-19"><a href="#cb220-19" aria-hidden="true"></a> "*There is <inline tag="tag"></inline> support.*" .. newline ..</span> +<span id="cb220-20"><a href="#cb220-20" aria-hidden="true"></a> "_There is <!-- comment --> support._" .. newline ..</span> +<span id="cb220-21"><a href="#cb220-21" aria-hidden="true"></a> "_There is <? HTML instruction ?> support._"</span> +<span id="cb220-22"><a href="#cb220-22" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> +<span id="cb220-23"><a href="#cb220-23" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb213"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb213-1"><a href="#cb213-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb221"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb221-1"><a href="#cb221-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> @@ -2295,23 +2366,23 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="lua-cli-example-7">Lua CLI Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb214"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb214-1"><a href="#cb214-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb214-2"><a href="#cb214-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb214-3"><a href="#cb214-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb214-4"><a href="#cb214-4" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb214-5"><a href="#cb214-5" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb214-6"><a href="#cb214-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb222"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb222-1"><a href="#cb222-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb222-2"><a href="#cb222-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb222-3"><a href="#cb222-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb222-4"><a href="#cb222-4" aria-hidden="true"></a><span class="fu">\par</span></span> +<span id="cb222-5"><a href="#cb222-5" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb222-6"><a href="#cb222-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb215"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb215-1"><a href="#cb215-1" aria-hidden="true"></a><span class="kw"><div></span></span> -<span id="cb215-2"><a href="#cb215-2" aria-hidden="true"></a>*Is there block tag support?*</span> -<span id="cb215-3"><a href="#cb215-3" aria-hidden="true"></a><span class="kw"></div></span></span> -<span id="cb215-4"><a href="#cb215-4" aria-hidden="true"></a>*Is there <span class="kw"><inline</span><span class="ot"> tag=</span><span class="st">"tag"</span><span class="kw">></inline></span> support?*</span> -<span id="cb215-5"><a href="#cb215-5" aria-hidden="true"></a>_Is there <span class="co"><!-- comment --></span> support?_</span> -<span id="cb215-6"><a href="#cb215-6" aria-hidden="true"></a>_Is there <span class="kw"><?</span> HTML instruction <span class="kw">?></span> support?_</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb216"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb216-1"><a href="#cb216-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb216-2"><a href="#cb216-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ html=true -- content.md optiontrue.tex</span> -<span id="cb216-3"><a href="#cb216-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb223"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb223-1"><a href="#cb223-1" aria-hidden="true"></a><span class="kw"><div></span></span> +<span id="cb223-2"><a href="#cb223-2" aria-hidden="true"></a>*Is there block tag support?*</span> +<span id="cb223-3"><a href="#cb223-3" aria-hidden="true"></a><span class="kw"></div></span></span> +<span id="cb223-4"><a href="#cb223-4" aria-hidden="true"></a>*Is there <span class="kw"><inline</span><span class="ot"> tag=</span><span class="st">"tag"</span><span class="kw">></inline></span> support?*</span> +<span id="cb223-5"><a href="#cb223-5" aria-hidden="true"></a>_Is there <span class="co"><!-- comment --></span> support?_</span> +<span id="cb223-6"><a href="#cb223-6" aria-hidden="true"></a>_Is there <span class="kw"><?</span> HTML instruction <span class="kw">?></span> support?_</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb224"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb224-1"><a href="#cb224-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> +<span id="cb224-2"><a href="#cb224-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ html=true -- content.md optiontrue.tex</span> +<span id="cb224-3"><a href="#cb224-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> @@ -2320,63 +2391,63 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="plain-tex-example-8">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb217"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb217-1"><a href="#cb217-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb217-2"><a href="#cb217-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb217-3"><a href="#cb217-3" aria-hidden="true"></a></span> -<span id="cb217-4"><a href="#cb217-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb217-5"><a href="#cb217-5" aria-hidden="true"></a><div></span> -<span id="cb217-6"><a href="#cb217-6" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb217-7"><a href="#cb217-7" aria-hidden="true"></a></div></span> -<span id="cb217-8"><a href="#cb217-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb217-9"><a href="#cb217-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb217-10"><a href="#cb217-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb217-11"><a href="#cb217-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb217-12"><a href="#cb217-12" aria-hidden="true"></a></span> -<span id="cb217-13"><a href="#cb217-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> -<span id="cb217-14"><a href="#cb217-14" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb217-15"><a href="#cb217-15" aria-hidden="true"></a><div></span> -<span id="cb217-16"><a href="#cb217-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb217-17"><a href="#cb217-17" aria-hidden="true"></a></div></span> -<span id="cb217-18"><a href="#cb217-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb217-19"><a href="#cb217-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb217-20"><a href="#cb217-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb217-21"><a href="#cb217-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb217-22"><a href="#cb217-22" aria-hidden="true"></a></span> -<span id="cb217-23"><a href="#cb217-23" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb218"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb218-1"><a href="#cb218-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb225"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb225-1"><a href="#cb225-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb225-2"><a href="#cb225-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb225-3"><a href="#cb225-3" aria-hidden="true"></a></span> +<span id="cb225-4"><a href="#cb225-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb225-5"><a href="#cb225-5" aria-hidden="true"></a><div></span> +<span id="cb225-6"><a href="#cb225-6" aria-hidden="true"></a>*There is no block tag support.*</span> +<span id="cb225-7"><a href="#cb225-7" aria-hidden="true"></a></div></span> +<span id="cb225-8"><a href="#cb225-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> +<span id="cb225-9"><a href="#cb225-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> +<span id="cb225-10"><a href="#cb225-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> +<span id="cb225-11"><a href="#cb225-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb225-12"><a href="#cb225-12" aria-hidden="true"></a></span> +<span id="cb225-13"><a href="#cb225-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> +<span id="cb225-14"><a href="#cb225-14" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb225-15"><a href="#cb225-15" aria-hidden="true"></a><div></span> +<span id="cb225-16"><a href="#cb225-16" aria-hidden="true"></a>*There is block tag support.*</span> +<span id="cb225-17"><a href="#cb225-17" aria-hidden="true"></a></div></span> +<span id="cb225-18"><a href="#cb225-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> +<span id="cb225-19"><a href="#cb225-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> +<span id="cb225-20"><a href="#cb225-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> +<span id="cb225-21"><a href="#cb225-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb225-22"><a href="#cb225-22" aria-hidden="true"></a></span> +<span id="cb225-23"><a href="#cb225-23" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb226"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb226-1"><a href="#cb226-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-16"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-17"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb219"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb219-1"><a href="#cb219-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb219-2"><a href="#cb219-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb219-3"><a href="#cb219-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb219-4"><a href="#cb219-4" aria-hidden="true"></a></span> -<span id="cb219-5"><a href="#cb219-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb219-6"><a href="#cb219-6" aria-hidden="true"></a><div></span> -<span id="cb219-7"><a href="#cb219-7" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb219-8"><a href="#cb219-8" aria-hidden="true"></a></div></span> -<span id="cb219-9"><a href="#cb219-9" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb219-10"><a href="#cb219-10" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb219-11"><a href="#cb219-11" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb219-12"><a href="#cb219-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb219-13"><a href="#cb219-13" aria-hidden="true"></a></span> -<span id="cb219-14"><a href="#cb219-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{html}</span> -<span id="cb219-15"><a href="#cb219-15" aria-hidden="true"></a><div></span> -<span id="cb219-16"><a href="#cb219-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb219-17"><a href="#cb219-17" aria-hidden="true"></a></div></span> -<span id="cb219-18"><a href="#cb219-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb219-19"><a href="#cb219-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb219-20"><a href="#cb219-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb219-21"><a href="#cb219-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb219-22"><a href="#cb219-22" aria-hidden="true"></a></span> -<span id="cb219-23"><a href="#cb219-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb220"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb220-1"><a href="#cb220-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb227"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb227-1"><a href="#cb227-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb227-2"><a href="#cb227-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb227-3"><a href="#cb227-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb227-4"><a href="#cb227-4" aria-hidden="true"></a></span> +<span id="cb227-5"><a href="#cb227-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb227-6"><a href="#cb227-6" aria-hidden="true"></a><div></span> +<span id="cb227-7"><a href="#cb227-7" aria-hidden="true"></a>*There is no block tag support.*</span> +<span id="cb227-8"><a href="#cb227-8" aria-hidden="true"></a></div></span> +<span id="cb227-9"><a href="#cb227-9" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> +<span id="cb227-10"><a href="#cb227-10" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> +<span id="cb227-11"><a href="#cb227-11" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> +<span id="cb227-12"><a href="#cb227-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb227-13"><a href="#cb227-13" aria-hidden="true"></a></span> +<span id="cb227-14"><a href="#cb227-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{html}</span> +<span id="cb227-15"><a href="#cb227-15" aria-hidden="true"></a><div></span> +<span id="cb227-16"><a href="#cb227-16" aria-hidden="true"></a>*There is block tag support.*</span> +<span id="cb227-17"><a href="#cb227-17" aria-hidden="true"></a></div></span> +<span id="cb227-18"><a href="#cb227-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> +<span id="cb227-19"><a href="#cb227-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> +<span id="cb227-20"><a href="#cb227-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> +<span id="cb227-21"><a href="#cb227-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb227-22"><a href="#cb227-22" aria-hidden="true"></a></span> +<span id="cb227-23"><a href="#cb227-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb228"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb228-1"><a href="#cb228-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> @@ -2384,37 +2455,37 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-14">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb221"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb221-1"><a href="#cb221-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb221-2"><a href="#cb221-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb221-3"><a href="#cb221-3" aria-hidden="true"></a></span> -<span id="cb221-4"><a href="#cb221-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb221-5"><a href="#cb221-5" aria-hidden="true"></a><div></span> -<span id="cb221-6"><a href="#cb221-6" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb221-7"><a href="#cb221-7" aria-hidden="true"></a></div></span> -<span id="cb221-8"><a href="#cb221-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb221-9"><a href="#cb221-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb221-10"><a href="#cb221-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb221-11"><a href="#cb221-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb221-12"><a href="#cb221-12" aria-hidden="true"></a></span> -<span id="cb221-13"><a href="#cb221-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> -<span id="cb221-14"><a href="#cb221-14" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb221-15"><a href="#cb221-15" aria-hidden="true"></a><div></span> -<span id="cb221-16"><a href="#cb221-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb221-17"><a href="#cb221-17" aria-hidden="true"></a></div></span> -<span id="cb221-18"><a href="#cb221-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb221-19"><a href="#cb221-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb221-20"><a href="#cb221-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb221-21"><a href="#cb221-21" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb221-22"><a href="#cb221-22" aria-hidden="true"></a></span> -<span id="cb221-23"><a href="#cb221-23" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb222"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb222-1"><a href="#cb222-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb229"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb229-1"><a href="#cb229-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb229-2"><a href="#cb229-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb229-3"><a href="#cb229-3" aria-hidden="true"></a></span> +<span id="cb229-4"><a href="#cb229-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb229-5"><a href="#cb229-5" aria-hidden="true"></a><div></span> +<span id="cb229-6"><a href="#cb229-6" aria-hidden="true"></a>*There is no block tag support.*</span> +<span id="cb229-7"><a href="#cb229-7" aria-hidden="true"></a></div></span> +<span id="cb229-8"><a href="#cb229-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> +<span id="cb229-9"><a href="#cb229-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> +<span id="cb229-10"><a href="#cb229-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> +<span id="cb229-11"><a href="#cb229-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb229-12"><a href="#cb229-12" aria-hidden="true"></a></span> +<span id="cb229-13"><a href="#cb229-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> +<span id="cb229-14"><a href="#cb229-14" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb229-15"><a href="#cb229-15" aria-hidden="true"></a><div></span> +<span id="cb229-16"><a href="#cb229-16" aria-hidden="true"></a>*There is block tag support.*</span> +<span id="cb229-17"><a href="#cb229-17" aria-hidden="true"></a></div></span> +<span id="cb229-18"><a href="#cb229-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> +<span id="cb229-19"><a href="#cb229-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> +<span id="cb229-20"><a href="#cb229-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> +<span id="cb229-21"><a href="#cb229-21" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb229-22"><a href="#cb229-22" aria-hidden="true"></a></span> +<span id="cb229-23"><a href="#cb229-23" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb230"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb230-1"><a href="#cb230-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h4 data-number="2.2.1.20" id="option-hybrid"><span class="header-section-number">2.2.1.20</span> Option <code>hybrid</code></h4> +<h4 data-number="2.2.1.22" id="option-hybrid"><span class="header-section-number">2.2.1.22</span> Option <code>hybrid</code></h4> <dl> <dt><code>hybrid</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -2430,27 +2501,27 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-9">Lua Module Example</h5> +<h5 class="unnumbered" data-number="" id="lua-module-example-10">Lua Module Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb223"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb223-1"><a href="#cb223-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb223-2"><a href="#cb223-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb223-3"><a href="#cb223-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb223-4"><a href="#cb223-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb223-5"><a href="#cb223-5" aria-hidden="true"></a> local input, convert_safe, convert_unsafe, paragraph</span> -<span id="cb223-6"><a href="#cb223-6" aria-hidden="true"></a></span> -<span id="cb223-7"><a href="#cb223-7" aria-hidden="true"></a> input = [[<span class="ss">$</span><span class="sc">\string\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.]]</span> -<span id="cb223-8"><a href="#cb223-8" aria-hidden="true"></a> convert_safe = markdown.new()</span> -<span id="cb223-9"><a href="#cb223-9" aria-hidden="true"></a> convert_unsafe = markdown.new({hybrid = true})</span> -<span id="cb223-10"><a href="#cb223-10" aria-hidden="true"></a> paragraph = [[<span class="fu">\par</span>]]</span> -<span id="cb223-11"><a href="#cb223-11" aria-hidden="true"></a></span> -<span id="cb223-12"><a href="#cb223-12" aria-hidden="true"></a> tex.sprint(</span> -<span id="cb223-13"><a href="#cb223-13" aria-hidden="true"></a> convert_safe(input) .. paragraph ..</span> -<span id="cb223-14"><a href="#cb223-14" aria-hidden="true"></a> convert_unsafe(input)</span> -<span id="cb223-15"><a href="#cb223-15" aria-hidden="true"></a> )</span> -<span id="cb223-16"><a href="#cb223-16" aria-hidden="true"></a>}</span> -<span id="cb223-17"><a href="#cb223-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb231"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb231-1"><a href="#cb231-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb231-2"><a href="#cb231-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb231-3"><a href="#cb231-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb231-4"><a href="#cb231-4" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb231-5"><a href="#cb231-5" aria-hidden="true"></a> local input, convert_safe, convert_unsafe, paragraph</span> +<span id="cb231-6"><a href="#cb231-6" aria-hidden="true"></a></span> +<span id="cb231-7"><a href="#cb231-7" aria-hidden="true"></a> input = [[<span class="ss">$</span><span class="sc">\string\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.]]</span> +<span id="cb231-8"><a href="#cb231-8" aria-hidden="true"></a> convert_safe = markdown.new()</span> +<span id="cb231-9"><a href="#cb231-9" aria-hidden="true"></a> convert_unsafe = markdown.new({hybrid = true})</span> +<span id="cb231-10"><a href="#cb231-10" aria-hidden="true"></a> paragraph = [[<span class="fu">\par</span>]]</span> +<span id="cb231-11"><a href="#cb231-11" aria-hidden="true"></a></span> +<span id="cb231-12"><a href="#cb231-12" aria-hidden="true"></a> tex.sprint(</span> +<span id="cb231-13"><a href="#cb231-13" aria-hidden="true"></a> convert_safe(input) .. paragraph ..</span> +<span id="cb231-14"><a href="#cb231-14" aria-hidden="true"></a> convert_unsafe(input)</span> +<span id="cb231-15"><a href="#cb231-15" aria-hidden="true"></a> )</span> +<span id="cb231-16"><a href="#cb231-16" aria-hidden="true"></a>}</span> +<span id="cb231-17"><a href="#cb231-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb224"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb224-1"><a href="#cb224-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb232"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb232-1"><a href="#cb232-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> @@ -2458,21 +2529,21 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="lua-cli-example-8">Lua CLI Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb225"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb225-1"><a href="#cb225-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb225-2"><a href="#cb225-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb225-3"><a href="#cb225-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb225-4"><a href="#cb225-4" aria-hidden="true"></a></span> -<span id="cb225-5"><a href="#cb225-5" aria-hidden="true"></a><span class="fu">\begingroup</span></span> -<span id="cb225-6"><a href="#cb225-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> -<span id="cb225-7"><a href="#cb225-7" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb225-8"><a href="#cb225-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> -<span id="cb225-9"><a href="#cb225-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb233"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb233-1"><a href="#cb233-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb233-2"><a href="#cb233-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb233-3"><a href="#cb233-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb233-4"><a href="#cb233-4" aria-hidden="true"></a></span> +<span id="cb233-5"><a href="#cb233-5" aria-hidden="true"></a><span class="fu">\begingroup</span></span> +<span id="cb233-6"><a href="#cb233-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> +<span id="cb233-7"><a href="#cb233-7" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb233-8"><a href="#cb233-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> +<span id="cb233-9"><a href="#cb233-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb226"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb226-1"><a href="#cb226-1" aria-hidden="true"></a>$\sqrt{-1}$ *equals* $i$.</span></code></pre></div> +<div class="sourceCode" id="cb234"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb234-1"><a href="#cb234-1" aria-hidden="true"></a>$\sqrt{-1}$ *equals* $i$.</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb227"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb227-1"><a href="#cb227-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb227-2"><a href="#cb227-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- content.md optiontrue.tex</span> -<span id="cb227-3"><a href="#cb227-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb235"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb235-1"><a href="#cb235-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> +<span id="cb235-2"><a href="#cb235-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- content.md optiontrue.tex</span> +<span id="cb235-3"><a href="#cb235-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> @@ -2481,43 +2552,43 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="plain-tex-example-9">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb228"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb228-1"><a href="#cb228-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb228-2"><a href="#cb228-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb228-3"><a href="#cb228-3" aria-hidden="true"></a></span> -<span id="cb228-4"><a href="#cb228-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb228-5"><a href="#cb228-5" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb228-6"><a href="#cb228-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb228-7"><a href="#cb228-7" aria-hidden="true"></a></span> -<span id="cb228-8"><a href="#cb228-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb228-9"><a href="#cb228-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb228-10"><a href="#cb228-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb228-11"><a href="#cb228-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb228-12"><a href="#cb228-12" aria-hidden="true"></a></span> -<span id="cb228-13"><a href="#cb228-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb236"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb236-1"><a href="#cb236-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb236-2"><a href="#cb236-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb236-3"><a href="#cb236-3" aria-hidden="true"></a></span> +<span id="cb236-4"><a href="#cb236-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb236-5"><a href="#cb236-5" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb236-6"><a href="#cb236-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb236-7"><a href="#cb236-7" aria-hidden="true"></a></span> +<span id="cb236-8"><a href="#cb236-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb236-9"><a href="#cb236-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb236-10"><a href="#cb236-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb236-11"><a href="#cb236-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb236-12"><a href="#cb236-12" aria-hidden="true"></a></span> +<span id="cb236-13"><a href="#cb236-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb229"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb229-1"><a href="#cb229-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb237"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb237-1"><a href="#cb237-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-17"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-18"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb230"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb230-1"><a href="#cb230-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb230-2"><a href="#cb230-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb230-3"><a href="#cb230-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb230-4"><a href="#cb230-4" aria-hidden="true"></a></span> -<span id="cb230-5"><a href="#cb230-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb230-6"><a href="#cb230-6" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb230-7"><a href="#cb230-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb230-8"><a href="#cb230-8" aria-hidden="true"></a></span> -<span id="cb230-9"><a href="#cb230-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> -<span id="cb230-10"><a href="#cb230-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb230-11"><a href="#cb230-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb230-12"><a href="#cb230-12" aria-hidden="true"></a></span> -<span id="cb230-13"><a href="#cb230-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb238"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb238-1"><a href="#cb238-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb238-2"><a href="#cb238-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb238-3"><a href="#cb238-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb238-4"><a href="#cb238-4" aria-hidden="true"></a></span> +<span id="cb238-5"><a href="#cb238-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb238-6"><a href="#cb238-6" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb238-7"><a href="#cb238-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb238-8"><a href="#cb238-8" aria-hidden="true"></a></span> +<span id="cb238-9"><a href="#cb238-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> +<span id="cb238-10"><a href="#cb238-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb238-11"><a href="#cb238-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb238-12"><a href="#cb238-12" aria-hidden="true"></a></span> +<span id="cb238-13"><a href="#cb238-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb231"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb231-1"><a href="#cb231-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb239"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb239-1"><a href="#cb239-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> @@ -2525,35 +2596,35 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-15">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb232"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb232-1"><a href="#cb232-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb232-2"><a href="#cb232-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb232-3"><a href="#cb232-3" aria-hidden="true"></a></span> -<span id="cb232-4"><a href="#cb232-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb232-5"><a href="#cb232-5" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb232-6"><a href="#cb232-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb232-7"><a href="#cb232-7" aria-hidden="true"></a></span> -<span id="cb232-8"><a href="#cb232-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb232-9"><a href="#cb232-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb232-10"><a href="#cb232-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb232-11"><a href="#cb232-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb232-12"><a href="#cb232-12" aria-hidden="true"></a></span> -<span id="cb232-13"><a href="#cb232-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb240"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb240-1"><a href="#cb240-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb240-2"><a href="#cb240-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb240-3"><a href="#cb240-3" aria-hidden="true"></a></span> +<span id="cb240-4"><a href="#cb240-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb240-5"><a href="#cb240-5" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb240-6"><a href="#cb240-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb240-7"><a href="#cb240-7" aria-hidden="true"></a></span> +<span id="cb240-8"><a href="#cb240-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb240-9"><a href="#cb240-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb240-10"><a href="#cb240-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb240-11"><a href="#cb240-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb240-12"><a href="#cb240-12" aria-hidden="true"></a></span> +<span id="cb240-13"><a href="#cb240-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb233"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb233-1"><a href="#cb233-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb241"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb241-1"><a href="#cb241-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h4 data-number="2.2.1.21" id="option-inlinefootnotes"><span class="header-section-number">2.2.1.21</span> Option <code>inlineFootnotes</code></h4> +<h4 data-number="2.2.1.23" id="option-inlinefootnotes"><span class="header-section-number">2.2.1.23</span> Option <code>inlineFootnotes</code></h4> <dl> <dt><code>inlineFootnotes</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the pandoc inline footnote syntax extension:</p> -<div class="sourceCode" id="cb234"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb234-1"><a href="#cb234-1" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb234-2"><a href="#cb234-2" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb234-3"><a href="#cb234-3" aria-hidden="true"></a>move down to type the note.]</span></code></pre></div> +<div class="sourceCode" id="cb242"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb242-1"><a href="#cb242-1" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> +<span id="cb242-2"><a href="#cb242-2" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> +<span id="cb242-3"><a href="#cb242-3" aria-hidden="true"></a>move down to type the note.]</span></code></pre></div> </dd> </dl> </dd> @@ -2564,57 +2635,57 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-18"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-19"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb235"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb235-1"><a href="#cb235-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb235-2"><a href="#cb235-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[inlineFootnotes]{<span class="ex">markdown</span>}</span> -<span id="cb235-3"><a href="#cb235-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb235-4"><a href="#cb235-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb235-5"><a href="#cb235-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb235-6"><a href="#cb235-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb235-7"><a href="#cb235-7" aria-hidden="true"></a>move down to type the note.]</span> -<span id="cb235-8"><a href="#cb235-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb235-9"><a href="#cb235-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb243"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb243-1"><a href="#cb243-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb243-2"><a href="#cb243-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[inlineFootnotes]{<span class="ex">markdown</span>}</span> +<span id="cb243-3"><a href="#cb243-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb243-4"><a href="#cb243-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb243-5"><a href="#cb243-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> +<span id="cb243-6"><a href="#cb243-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> +<span id="cb243-7"><a href="#cb243-7" aria-hidden="true"></a>move down to type the note.]</span> +<span id="cb243-8"><a href="#cb243-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb243-9"><a href="#cb243-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb236"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb236-1"><a href="#cb236-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb244"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb244-1"><a href="#cb244-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Here is an inline note.<a href="#fn5" class="footnote-ref" id="fnref5" role="doc-noteref"><sup>5</sup></a></p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-16">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb237"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb237-1"><a href="#cb237-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb237-2"><a href="#cb237-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionInlineFootnotes</span>{true}</span> -<span id="cb237-3"><a href="#cb237-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb237-4"><a href="#cb237-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb237-5"><a href="#cb237-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb237-6"><a href="#cb237-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb237-7"><a href="#cb237-7" aria-hidden="true"></a>move down to type the note.]</span> -<span id="cb237-8"><a href="#cb237-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb237-9"><a href="#cb237-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb245"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb245-1"><a href="#cb245-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb245-2"><a href="#cb245-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionInlineFootnotes</span>{true}</span> +<span id="cb245-3"><a href="#cb245-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb245-4"><a href="#cb245-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb245-5"><a href="#cb245-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> +<span id="cb245-6"><a href="#cb245-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> +<span id="cb245-7"><a href="#cb245-7" aria-hidden="true"></a>move down to type the note.]</span> +<span id="cb245-8"><a href="#cb245-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb245-9"><a href="#cb245-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb238"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb238-1"><a href="#cb238-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb246"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb246-1"><a href="#cb246-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Here is an inline note.<a href="#fn6" class="footnote-ref" id="fnref6" role="doc-noteref"><sup>6</sup></a></p> </blockquote> -<h4 data-number="2.2.1.22" id="option-jekylldata"><span class="header-section-number">2.2.1.22</span> Option <code>jekyllData</code></h4> +<h4 data-number="2.2.1.24" id="option-jekylldata"><span class="header-section-number">2.2.1.24</span> Option <code>jekyllData</code></h4> <dl> <dt><code>jekyllData</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the Pandoc <code>yaml_metadata_block</code> syntax extension for entering metadata in <abbr>yaml</abbr>:</p> -<div class="sourceCode" id="cb239"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb239-1"><a href="#cb239-1" aria-hidden="true"></a><span class="pp">---</span></span> -<span id="cb239-2"><a href="#cb239-2" aria-hidden="true"></a><span class="fu">title</span><span class="kw">:</span><span class="at"> </span><span class="st">'This is the title: it contains a colon'</span></span> -<span id="cb239-3"><a href="#cb239-3" aria-hidden="true"></a><span class="fu">author</span><span class="kw">:</span></span> -<span id="cb239-4"><a href="#cb239-4" aria-hidden="true"></a><span class="kw">-</span><span class="at"> Author One</span></span> -<span id="cb239-5"><a href="#cb239-5" aria-hidden="true"></a><span class="kw">-</span><span class="at"> Author Two</span></span> -<span id="cb239-6"><a href="#cb239-6" aria-hidden="true"></a><span class="fu">keywords</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">nothing</span><span class="kw">,</span><span class="at"> nothingness</span><span class="kw">]</span></span> -<span id="cb239-7"><a href="#cb239-7" aria-hidden="true"></a><span class="fu">abstract</span><span class="kw">: </span><span class="ch">|</span></span> -<span id="cb239-8"><a href="#cb239-8" aria-hidden="true"></a> This is the abstract.</span> -<span id="cb239-9"><a href="#cb239-9" aria-hidden="true"></a></span> -<span id="cb239-10"><a href="#cb239-10" aria-hidden="true"></a> It consists of two paragraphs.</span> -<span id="cb239-11"><a href="#cb239-11" aria-hidden="true"></a><span class="pp">---</span></span></code></pre></div> +<div class="sourceCode" id="cb247"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb247-1"><a href="#cb247-1" aria-hidden="true"></a><span class="pp">---</span></span> +<span id="cb247-2"><a href="#cb247-2" aria-hidden="true"></a><span class="fu">title</span><span class="kw">:</span><span class="at"> </span><span class="st">'This is the title: it contains a colon'</span></span> +<span id="cb247-3"><a href="#cb247-3" aria-hidden="true"></a><span class="fu">author</span><span class="kw">:</span></span> +<span id="cb247-4"><a href="#cb247-4" aria-hidden="true"></a><span class="kw">-</span><span class="at"> Author One</span></span> +<span id="cb247-5"><a href="#cb247-5" aria-hidden="true"></a><span class="kw">-</span><span class="at"> Author Two</span></span> +<span id="cb247-6"><a href="#cb247-6" aria-hidden="true"></a><span class="fu">keywords</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">nothing</span><span class="kw">,</span><span class="at"> nothingness</span><span class="kw">]</span></span> +<span id="cb247-7"><a href="#cb247-7" aria-hidden="true"></a><span class="fu">abstract</span><span class="kw">: </span><span class="ch">|</span></span> +<span id="cb247-8"><a href="#cb247-8" aria-hidden="true"></a> This is the abstract.</span> +<span id="cb247-9"><a href="#cb247-9" aria-hidden="true"></a></span> +<span id="cb247-10"><a href="#cb247-10" aria-hidden="true"></a> It consists of two paragraphs.</span> +<span id="cb247-11"><a href="#cb247-11" aria-hidden="true"></a><span class="pp">---</span></span></code></pre></div> </dd> </dl> </dd> @@ -2627,87 +2698,87 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-10">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb240"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb240-1"><a href="#cb240-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb240-2"><a href="#cb240-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> -<span id="cb240-3"><a href="#cb240-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> -<span id="cb240-4"><a href="#cb240-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> -<span id="cb240-5"><a href="#cb240-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb240-6"><a href="#cb240-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb240-7"><a href="#cb240-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb240-8"><a href="#cb240-8" aria-hidden="true"></a>---</span> -<span id="cb240-9"><a href="#cb240-9" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb240-10"><a href="#cb240-10" aria-hidden="true"></a>age: 99</span> -<span id="cb240-11"><a href="#cb240-11" aria-hidden="true"></a>---</span> -<span id="cb240-12"><a href="#cb240-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb240-13"><a href="#cb240-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb248"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb248-1"><a href="#cb248-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb248-2"><a href="#cb248-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb248-3"><a href="#cb248-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> +<span id="cb248-4"><a href="#cb248-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> +<span id="cb248-5"><a href="#cb248-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb248-6"><a href="#cb248-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb248-7"><a href="#cb248-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb248-8"><a href="#cb248-8" aria-hidden="true"></a>---</span> +<span id="cb248-9"><a href="#cb248-9" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb248-10"><a href="#cb248-10" aria-hidden="true"></a>age: 99</span> +<span id="cb248-11"><a href="#cb248-11" aria-hidden="true"></a>---</span> +<span id="cb248-12"><a href="#cb248-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb248-13"><a href="#cb248-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb241"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb241-1"><a href="#cb241-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb249"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb249-1"><a href="#cb249-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-19"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-20"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb242"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb242-1"><a href="#cb242-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb242-2"><a href="#cb242-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> -<span id="cb242-3"><a href="#cb242-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb242-4"><a href="#cb242-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb242-5"><a href="#cb242-5" aria-hidden="true"></a> jekyllDataString = {<span class="fu">\gdef\name</span>{#2}},</span> -<span id="cb242-6"><a href="#cb242-6" aria-hidden="true"></a> jekyllDataNumber = {<span class="fu">\gdef\age</span>{#2}},</span> -<span id="cb242-7"><a href="#cb242-7" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> -<span id="cb242-8"><a href="#cb242-8" aria-hidden="true"></a> }</span> -<span id="cb242-9"><a href="#cb242-9" aria-hidden="true"></a>}</span> -<span id="cb242-10"><a href="#cb242-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb242-11"><a href="#cb242-11" aria-hidden="true"></a></span> -<span id="cb242-12"><a href="#cb242-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb242-13"><a href="#cb242-13" aria-hidden="true"></a>---</span> -<span id="cb242-14"><a href="#cb242-14" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb242-15"><a href="#cb242-15" aria-hidden="true"></a>age: 99</span> -<span id="cb242-16"><a href="#cb242-16" aria-hidden="true"></a>---</span> -<span id="cb242-17"><a href="#cb242-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb242-18"><a href="#cb242-18" aria-hidden="true"></a></span> -<span id="cb242-19"><a href="#cb242-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb243"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb243-1"><a href="#cb243-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb250"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb250-1"><a href="#cb250-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb250-2"><a href="#cb250-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb250-3"><a href="#cb250-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb250-4"><a href="#cb250-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb250-5"><a href="#cb250-5" aria-hidden="true"></a> jekyllDataString = {<span class="fu">\gdef\name</span>{#2}},</span> +<span id="cb250-6"><a href="#cb250-6" aria-hidden="true"></a> jekyllDataNumber = {<span class="fu">\gdef\age</span>{#2}},</span> +<span id="cb250-7"><a href="#cb250-7" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> +<span id="cb250-8"><a href="#cb250-8" aria-hidden="true"></a> }</span> +<span id="cb250-9"><a href="#cb250-9" aria-hidden="true"></a>}</span> +<span id="cb250-10"><a href="#cb250-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb250-11"><a href="#cb250-11" aria-hidden="true"></a></span> +<span id="cb250-12"><a href="#cb250-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb250-13"><a href="#cb250-13" aria-hidden="true"></a>---</span> +<span id="cb250-14"><a href="#cb250-14" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb250-15"><a href="#cb250-15" aria-hidden="true"></a>age: 99</span> +<span id="cb250-16"><a href="#cb250-16" aria-hidden="true"></a>---</span> +<span id="cb250-17"><a href="#cb250-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb250-18"><a href="#cb250-18" aria-hidden="true"></a></span> +<span id="cb250-19"><a href="#cb250-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb251"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb251-1"><a href="#cb251-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-17">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb244"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb244-1"><a href="#cb244-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb244-2"><a href="#cb244-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> -<span id="cb244-3"><a href="#cb244-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> -<span id="cb244-4"><a href="#cb244-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> -<span id="cb244-5"><a href="#cb244-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb244-6"><a href="#cb244-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb244-7"><a href="#cb244-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb244-8"><a href="#cb244-8" aria-hidden="true"></a></span> -<span id="cb244-9"><a href="#cb244-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb244-10"><a href="#cb244-10" aria-hidden="true"></a>---</span> -<span id="cb244-11"><a href="#cb244-11" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb244-12"><a href="#cb244-12" aria-hidden="true"></a>age: 99</span> -<span id="cb244-13"><a href="#cb244-13" aria-hidden="true"></a>---</span> -<span id="cb244-14"><a href="#cb244-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb244-15"><a href="#cb244-15" aria-hidden="true"></a></span> -<span id="cb244-16"><a href="#cb244-16" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb245"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb245-1"><a href="#cb245-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb252"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb252-1"><a href="#cb252-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb252-2"><a href="#cb252-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb252-3"><a href="#cb252-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> +<span id="cb252-4"><a href="#cb252-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> +<span id="cb252-5"><a href="#cb252-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb252-6"><a href="#cb252-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb252-7"><a href="#cb252-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb252-8"><a href="#cb252-8" aria-hidden="true"></a></span> +<span id="cb252-9"><a href="#cb252-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb252-10"><a href="#cb252-10" aria-hidden="true"></a>---</span> +<span id="cb252-11"><a href="#cb252-11" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb252-12"><a href="#cb252-12" aria-hidden="true"></a>age: 99</span> +<span id="cb252-13"><a href="#cb252-13" aria-hidden="true"></a>---</span> +<span id="cb252-14"><a href="#cb252-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb252-15"><a href="#cb252-15" aria-hidden="true"></a></span> +<span id="cb252-16"><a href="#cb252-16" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb253"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb253-1"><a href="#cb253-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h4 data-number="2.2.1.23" id="pipe-tables"><span class="header-section-number">2.2.1.23</span> Option <code>pipeTables</code></h4> +<h4 data-number="2.2.1.25" id="pipe-tables"><span class="header-section-number">2.2.1.25</span> Option <code>pipeTables</code></h4> <dl> <dt><code>pipeTables</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the <abbr>PHP</abbr> Markdown table syntax extension:</p> -<div class="sourceCode" id="cb246"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb246-1"><a href="#cb246-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb246-2"><a href="#cb246-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb246-3"><a href="#cb246-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb246-4"><a href="#cb246-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb246-5"><a href="#cb246-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span></code></pre></div> +<div class="sourceCode" id="cb254"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb254-1"><a href="#cb254-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb254-2"><a href="#cb254-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb254-3"><a href="#cb254-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb254-4"><a href="#cb254-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb254-5"><a href="#cb254-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span></code></pre></div> </dd> </dl> </dd> @@ -2718,21 +2789,21 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-20"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-21"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb247"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb247-1"><a href="#cb247-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb247-2"><a href="#cb247-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables]{<span class="ex">markdown</span>}</span> -<span id="cb247-3"><a href="#cb247-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb247-4"><a href="#cb247-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb247-5"><a href="#cb247-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb247-6"><a href="#cb247-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb247-7"><a href="#cb247-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb247-8"><a href="#cb247-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb247-9"><a href="#cb247-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb247-10"><a href="#cb247-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb247-11"><a href="#cb247-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb255"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb255-1"><a href="#cb255-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb255-2"><a href="#cb255-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables]{<span class="ex">markdown</span>}</span> +<span id="cb255-3"><a href="#cb255-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb255-4"><a href="#cb255-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb255-5"><a href="#cb255-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb255-6"><a href="#cb255-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb255-7"><a href="#cb255-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb255-8"><a href="#cb255-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb255-9"><a href="#cb255-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb255-10"><a href="#cb255-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb255-11"><a href="#cb255-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb248"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb248-1"><a href="#cb248-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb256"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb256-1"><a href="#cb256-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -2768,19 +2839,19 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-18">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb249"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb249-1"><a href="#cb249-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb249-2"><a href="#cb249-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionPipeTables</span>{true}</span> -<span id="cb249-3"><a href="#cb249-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb249-4"><a href="#cb249-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb249-5"><a href="#cb249-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb249-6"><a href="#cb249-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb249-7"><a href="#cb249-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb249-8"><a href="#cb249-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb249-9"><a href="#cb249-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb249-10"><a href="#cb249-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb249-11"><a href="#cb249-11" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb257"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb257-1"><a href="#cb257-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb257-2"><a href="#cb257-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionPipeTables</span>{true}</span> +<span id="cb257-3"><a href="#cb257-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb257-4"><a href="#cb257-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb257-5"><a href="#cb257-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb257-6"><a href="#cb257-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb257-7"><a href="#cb257-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb257-8"><a href="#cb257-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb257-9"><a href="#cb257-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb257-10"><a href="#cb257-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb257-11"><a href="#cb257-11" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb250"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb250-1"><a href="#cb250-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb258"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb258-1"><a href="#cb258-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -2814,7 +2885,7 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </blockquote> -<h4 data-number="2.2.1.24" id="option-preservetabs"><span class="header-section-number">2.2.1.24</span> Option <code>preserveTabs</code></h4> +<h4 data-number="2.2.1.26" id="option-preservetabs"><span class="header-section-number">2.2.1.26</span> Option <code>preserveTabs</code></h4> <dl> <dt><code>preserveTabs</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -2830,7 +2901,7 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h4 data-number="2.2.1.25" id="option-shiftheadings"><span class="header-section-number">2.2.1.25</span> Option <code>shiftHeadings</code></h4> +<h4 data-number="2.2.1.27" id="option-shiftheadings"><span class="header-section-number">2.2.1.27</span> Option <code>shiftHeadings</code></h4> <dl> <dt><code>shiftHeadings</code> (default value: <code>0</code>)</dt> <dd><p>All headings will be shifted by ⟨<em>shift amount</em>⟩, which can be both positive and negative. Headings will not be shifted beyond level 6 or below level 1. Instead, those headings will be shifted to level 6, when ⟨<em>shift amount</em>⟩ is positive, and to level 1, when ⟨<em>shift amount</em>⟩ is negative.</p> @@ -2838,48 +2909,48 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-11">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>example.md</code> with the following content:</p> -<div class="sourceCode" id="cb251"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb251-1"><a href="#cb251-1" aria-hidden="true"></a><span class="fu">## A section</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb252"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb252-1"><a href="#cb252-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb252-2"><a href="#cb252-2" aria-hidden="true"></a></span> -<span id="cb252-3"><a href="#cb252-3" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> -<span id="cb252-4"><a href="#cb252-4" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> -<span id="cb252-5"><a href="#cb252-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span> -<span id="cb252-6"><a href="#cb252-6" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> -<span id="cb252-7"><a href="#cb252-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span> -<span id="cb252-8"><a href="#cb252-8" aria-hidden="true"></a></span> -<span id="cb252-9"><a href="#cb252-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> -<span id="cb252-10"><a href="#cb252-10" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb252-11"><a href="#cb252-11" aria-hidden="true"></a></span> -<span id="cb252-12"><a href="#cb252-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span> -<span id="cb252-13"><a href="#cb252-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb252-14"><a href="#cb252-14" aria-hidden="true"></a></span> -<span id="cb252-15"><a href="#cb252-15" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> -<span id="cb252-16"><a href="#cb252-16" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb252-17"><a href="#cb252-17" aria-hidden="true"></a></span> -<span id="cb252-18"><a href="#cb252-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb259"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb259-1"><a href="#cb259-1" aria-hidden="true"></a><span class="fu">## A section</span></span></code></pre></div> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb260"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb260-1"><a href="#cb260-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb260-2"><a href="#cb260-2" aria-hidden="true"></a></span> +<span id="cb260-3"><a href="#cb260-3" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> +<span id="cb260-4"><a href="#cb260-4" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> +<span id="cb260-5"><a href="#cb260-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span> +<span id="cb260-6"><a href="#cb260-6" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> +<span id="cb260-7"><a href="#cb260-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span> +<span id="cb260-8"><a href="#cb260-8" aria-hidden="true"></a></span> +<span id="cb260-9"><a href="#cb260-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> +<span id="cb260-10"><a href="#cb260-10" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb260-11"><a href="#cb260-11" aria-hidden="true"></a></span> +<span id="cb260-12"><a href="#cb260-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span> +<span id="cb260-13"><a href="#cb260-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb260-14"><a href="#cb260-14" aria-hidden="true"></a></span> +<span id="cb260-15"><a href="#cb260-15" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> +<span id="cb260-16"><a href="#cb260-16" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb260-17"><a href="#cb260-17" aria-hidden="true"></a></span> +<span id="cb260-18"><a href="#cb260-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb253"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb253-1"><a href="#cb253-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb261"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb261-1"><a href="#cb261-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="a-section">A section</h1> <h2 id="a-section-1">A section</h2> <h3 id="a-section-2">A section</h3> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-21"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-22"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb254"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb254-1"><a href="#cb254-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb254-2"><a href="#cb254-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb254-3"><a href="#cb254-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{example.md}</span> -<span id="cb254-4"><a href="#cb254-4" aria-hidden="true"></a>## A section</span> -<span id="cb254-5"><a href="#cb254-5" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb254-6"><a href="#cb254-6" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb254-7"><a href="#cb254-7" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=-1]{example.md}</span> -<span id="cb254-8"><a href="#cb254-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb254-9"><a href="#cb254-9" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=+1]{example.md}</span> -<span id="cb254-10"><a href="#cb254-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb262"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb262-1"><a href="#cb262-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb262-2"><a href="#cb262-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb262-3"><a href="#cb262-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{example.md}</span> +<span id="cb262-4"><a href="#cb262-4" aria-hidden="true"></a>## A section</span> +<span id="cb262-5"><a href="#cb262-5" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> +<span id="cb262-6"><a href="#cb262-6" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb262-7"><a href="#cb262-7" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=-1]{example.md}</span> +<span id="cb262-8"><a href="#cb262-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb262-9"><a href="#cb262-9" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=+1]{example.md}</span> +<span id="cb262-10"><a href="#cb262-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb255"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb255-1"><a href="#cb255-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb263"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb263-1"><a href="#cb263-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="a-section-3">A section</h1> @@ -2888,30 +2959,30 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-19">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>example.md</code> with the following content:</p> -<div class="sourceCode" id="cb256"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb256-1"><a href="#cb256-1" aria-hidden="true"></a><span class="fu">## A section</span></span></code></pre></div> +<div class="sourceCode" id="cb264"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb264-1"><a href="#cb264-1" aria-hidden="true"></a><span class="fu">## A section</span></span></code></pre></div> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb257"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb257-1"><a href="#cb257-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb257-2"><a href="#cb257-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb257-3"><a href="#cb257-3" aria-hidden="true"></a></span> -<span id="cb257-4"><a href="#cb257-4" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> -<span id="cb257-5"><a href="#cb257-5" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb257-6"><a href="#cb257-6" aria-hidden="true"></a></span> -<span id="cb257-7"><a href="#cb257-7" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span> -<span id="cb257-8"><a href="#cb257-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb257-9"><a href="#cb257-9" aria-hidden="true"></a></span> -<span id="cb257-10"><a href="#cb257-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> -<span id="cb257-11"><a href="#cb257-11" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb257-12"><a href="#cb257-12" aria-hidden="true"></a></span> -<span id="cb257-13"><a href="#cb257-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb265"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb265-1"><a href="#cb265-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb265-2"><a href="#cb265-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb265-3"><a href="#cb265-3" aria-hidden="true"></a></span> +<span id="cb265-4"><a href="#cb265-4" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> +<span id="cb265-5"><a href="#cb265-5" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb265-6"><a href="#cb265-6" aria-hidden="true"></a></span> +<span id="cb265-7"><a href="#cb265-7" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span> +<span id="cb265-8"><a href="#cb265-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb265-9"><a href="#cb265-9" aria-hidden="true"></a></span> +<span id="cb265-10"><a href="#cb265-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> +<span id="cb265-11"><a href="#cb265-11" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb265-12"><a href="#cb265-12" aria-hidden="true"></a></span> +<span id="cb265-13"><a href="#cb265-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb258"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb258-1"><a href="#cb258-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb266"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb266-1"><a href="#cb266-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="a-section-6">A section</h1> <h2 id="a-section-7">A section</h2> <h3 id="a-section-8">A section</h3> </blockquote> -<h4 data-number="2.2.1.26" id="slice"><span class="header-section-number">2.2.1.26</span> Option <code>slice</code></h4> +<h4 data-number="2.2.1.28" id="slice"><span class="header-section-number">2.2.1.28</span> Option <code>slice</code></h4> <dl> <dt><code>slice</code> (default value: <code>^ $</code>)</dt> <dd><p>Two space-separated selectors that specify the slice of a document that will be processed, whereas the remainder of the document will be ignored. The following selectors are recognized:</p> @@ -2927,39 +2998,39 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-12">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>hamlet.md</code> with the following content:</p> -<div class="sourceCode" id="cb259"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb259-1"><a href="#cb259-1" aria-hidden="true"></a><span class="fu"># The Tragedy of Hamlet</span></span> -<span id="cb259-2"><a href="#cb259-2" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb259-3"><a href="#cb259-3" aria-hidden="true"></a></span> -<span id="cb259-4"><a href="#cb259-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> -<span id="cb259-5"><a href="#cb259-5" aria-hidden="true"></a>Hamlet kills Polonius.</span> -<span id="cb259-6"><a href="#cb259-6" aria-hidden="true"></a></span> -<span id="cb259-7"><a href="#cb259-7" aria-hidden="true"></a><span class="fu">## Act V {#act-5}</span></span> -<span id="cb259-8"><a href="#cb259-8" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb259-9"><a href="#cb259-9" aria-hidden="true"></a></span> -<span id="cb259-10"><a href="#cb259-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> -<span id="cb259-11"><a href="#cb259-11" aria-hidden="true"></a>Hamlet talks to ghost.</span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb260"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb260-1"><a href="#cb260-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb260-2"><a href="#cb260-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span> -<span id="cb260-3"><a href="#cb260-3" aria-hidden="true"></a></span> -<span id="cb260-4"><a href="#cb260-4" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> -<span id="cb260-5"><a href="#cb260-5" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> -<span id="cb260-6"><a href="#cb260-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span> -<span id="cb260-7"><a href="#cb260-7" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> -<span id="cb260-8"><a href="#cb260-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span> -<span id="cb260-9"><a href="#cb260-9" aria-hidden="true"></a></span> -<span id="cb260-10"><a href="#cb260-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> -<span id="cb260-11"><a href="#cb260-11" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb260-12"><a href="#cb260-12" aria-hidden="true"></a></span> -<span id="cb260-13"><a href="#cb260-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span> -<span id="cb260-14"><a href="#cb260-14" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb260-15"><a href="#cb260-15" aria-hidden="true"></a></span> -<span id="cb260-16"><a href="#cb260-16" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span> -<span id="cb260-17"><a href="#cb260-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb260-18"><a href="#cb260-18" aria-hidden="true"></a></span> -<span id="cb260-19"><a href="#cb260-19" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb261"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb261-1"><a href="#cb261-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb267"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb267-1"><a href="#cb267-1" aria-hidden="true"></a><span class="fu"># The Tragedy of Hamlet</span></span> +<span id="cb267-2"><a href="#cb267-2" aria-hidden="true"></a>Shakespeare's longest play.</span> +<span id="cb267-3"><a href="#cb267-3" aria-hidden="true"></a></span> +<span id="cb267-4"><a href="#cb267-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> +<span id="cb267-5"><a href="#cb267-5" aria-hidden="true"></a>Hamlet kills Polonius.</span> +<span id="cb267-6"><a href="#cb267-6" aria-hidden="true"></a></span> +<span id="cb267-7"><a href="#cb267-7" aria-hidden="true"></a><span class="fu">## Act V {#act-5}</span></span> +<span id="cb267-8"><a href="#cb267-8" aria-hidden="true"></a>Hamlet dies.</span> +<span id="cb267-9"><a href="#cb267-9" aria-hidden="true"></a></span> +<span id="cb267-10"><a href="#cb267-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> +<span id="cb267-11"><a href="#cb267-11" aria-hidden="true"></a>Hamlet talks to ghost.</span></code></pre></div> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb268"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb268-1"><a href="#cb268-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb268-2"><a href="#cb268-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span> +<span id="cb268-3"><a href="#cb268-3" aria-hidden="true"></a></span> +<span id="cb268-4"><a href="#cb268-4" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> +<span id="cb268-5"><a href="#cb268-5" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> +<span id="cb268-6"><a href="#cb268-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span> +<span id="cb268-7"><a href="#cb268-7" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> +<span id="cb268-8"><a href="#cb268-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span> +<span id="cb268-9"><a href="#cb268-9" aria-hidden="true"></a></span> +<span id="cb268-10"><a href="#cb268-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> +<span id="cb268-11"><a href="#cb268-11" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb268-12"><a href="#cb268-12" aria-hidden="true"></a></span> +<span id="cb268-13"><a href="#cb268-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span> +<span id="cb268-14"><a href="#cb268-14" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb268-15"><a href="#cb268-15" aria-hidden="true"></a></span> +<span id="cb268-16"><a href="#cb268-16" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span> +<span id="cb268-17"><a href="#cb268-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb268-18"><a href="#cb268-18" aria-hidden="true"></a></span> +<span id="cb268-19"><a href="#cb268-19" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb269"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb269-1"><a href="#cb269-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="the-tragedy-of-hamlet">The Tragedy of Hamlet</h1> @@ -2971,30 +3042,30 @@ Thomas,Edison,1847</code></pre> <h2 id="act-v">Act V</h2> <p>Hamlet dies.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-22"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-23"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb262"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb262-1"><a href="#cb262-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb262-2"><a href="#cb262-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span> -<span id="cb262-3"><a href="#cb262-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{hamlet.md}</span> -<span id="cb262-4"><a href="#cb262-4" aria-hidden="true"></a># The Tragedy of Hamlet</span> -<span id="cb262-5"><a href="#cb262-5" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb262-6"><a href="#cb262-6" aria-hidden="true"></a></span> -<span id="cb262-7"><a href="#cb262-7" aria-hidden="true"></a>## Act III {#act-3}</span> -<span id="cb262-8"><a href="#cb262-8" aria-hidden="true"></a>Hamlet kills Polonius.</span> -<span id="cb262-9"><a href="#cb262-9" aria-hidden="true"></a></span> -<span id="cb262-10"><a href="#cb262-10" aria-hidden="true"></a>## Act V {#act-5}</span> -<span id="cb262-11"><a href="#cb262-11" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb262-12"><a href="#cb262-12" aria-hidden="true"></a></span> -<span id="cb262-13"><a href="#cb262-13" aria-hidden="true"></a>## Act I {#act-1}</span> -<span id="cb262-14"><a href="#cb262-14" aria-hidden="true"></a>Hamlet talks to ghost.</span> -<span id="cb262-15"><a href="#cb262-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb262-16"><a href="#cb262-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb262-17"><a href="#cb262-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=^ ^act-3]{hamlet.md}</span> -<span id="cb262-18"><a href="#cb262-18" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-1]{hamlet.md}</span> -<span id="cb262-19"><a href="#cb262-19" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-3 act-5]{hamlet.md}</span> -<span id="cb262-20"><a href="#cb262-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb263"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb263-1"><a href="#cb263-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb270"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb270-1"><a href="#cb270-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb270-2"><a href="#cb270-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span> +<span id="cb270-3"><a href="#cb270-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{hamlet.md}</span> +<span id="cb270-4"><a href="#cb270-4" aria-hidden="true"></a># The Tragedy of Hamlet</span> +<span id="cb270-5"><a href="#cb270-5" aria-hidden="true"></a>Shakespeare's longest play.</span> +<span id="cb270-6"><a href="#cb270-6" aria-hidden="true"></a></span> +<span id="cb270-7"><a href="#cb270-7" aria-hidden="true"></a>## Act III {#act-3}</span> +<span id="cb270-8"><a href="#cb270-8" aria-hidden="true"></a>Hamlet kills Polonius.</span> +<span id="cb270-9"><a href="#cb270-9" aria-hidden="true"></a></span> +<span id="cb270-10"><a href="#cb270-10" aria-hidden="true"></a>## Act V {#act-5}</span> +<span id="cb270-11"><a href="#cb270-11" aria-hidden="true"></a>Hamlet dies.</span> +<span id="cb270-12"><a href="#cb270-12" aria-hidden="true"></a></span> +<span id="cb270-13"><a href="#cb270-13" aria-hidden="true"></a>## Act I {#act-1}</span> +<span id="cb270-14"><a href="#cb270-14" aria-hidden="true"></a>Hamlet talks to ghost.</span> +<span id="cb270-15"><a href="#cb270-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> +<span id="cb270-16"><a href="#cb270-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb270-17"><a href="#cb270-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=^ ^act-3]{hamlet.md}</span> +<span id="cb270-18"><a href="#cb270-18" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-1]{hamlet.md}</span> +<span id="cb270-19"><a href="#cb270-19" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-3 act-5]{hamlet.md}</span> +<span id="cb270-20"><a href="#cb270-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb271"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb271-1"><a href="#cb271-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="the-tragedy-of-hamlet-1">The Tragedy of Hamlet</h1> @@ -3008,34 +3079,34 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-20">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>hamlet.md</code> with the following content:</p> -<div class="sourceCode" id="cb264"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb264-1"><a href="#cb264-1" aria-hidden="true"></a><span class="fu"># The Tragedy of Hamlet</span></span> -<span id="cb264-2"><a href="#cb264-2" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb264-3"><a href="#cb264-3" aria-hidden="true"></a></span> -<span id="cb264-4"><a href="#cb264-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> -<span id="cb264-5"><a href="#cb264-5" aria-hidden="true"></a>Hamlet kills Polonius.</span> -<span id="cb264-6"><a href="#cb264-6" aria-hidden="true"></a></span> -<span id="cb264-7"><a href="#cb264-7" aria-hidden="true"></a><span class="fu">## Act V {#act-5}</span></span> -<span id="cb264-8"><a href="#cb264-8" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb264-9"><a href="#cb264-9" aria-hidden="true"></a></span> -<span id="cb264-10"><a href="#cb264-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> -<span id="cb264-11"><a href="#cb264-11" aria-hidden="true"></a>Hamlet talks to ghost.</span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb265"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb265-1"><a href="#cb265-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb265-2"><a href="#cb265-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span> -<span id="cb265-3"><a href="#cb265-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb265-4"><a href="#cb265-4" aria-hidden="true"></a></span> -<span id="cb265-5"><a href="#cb265-5" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> -<span id="cb265-6"><a href="#cb265-6" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb265-7"><a href="#cb265-7" aria-hidden="true"></a></span> -<span id="cb265-8"><a href="#cb265-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span> -<span id="cb265-9"><a href="#cb265-9" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb265-10"><a href="#cb265-10" aria-hidden="true"></a></span> -<span id="cb265-11"><a href="#cb265-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span> -<span id="cb265-12"><a href="#cb265-12" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb265-13"><a href="#cb265-13" aria-hidden="true"></a></span> -<span id="cb265-14"><a href="#cb265-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb266"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb266-1"><a href="#cb266-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb272"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb272-1"><a href="#cb272-1" aria-hidden="true"></a><span class="fu"># The Tragedy of Hamlet</span></span> +<span id="cb272-2"><a href="#cb272-2" aria-hidden="true"></a>Shakespeare's longest play.</span> +<span id="cb272-3"><a href="#cb272-3" aria-hidden="true"></a></span> +<span id="cb272-4"><a href="#cb272-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> +<span id="cb272-5"><a href="#cb272-5" aria-hidden="true"></a>Hamlet kills Polonius.</span> +<span id="cb272-6"><a href="#cb272-6" aria-hidden="true"></a></span> +<span id="cb272-7"><a href="#cb272-7" aria-hidden="true"></a><span class="fu">## Act V {#act-5}</span></span> +<span id="cb272-8"><a href="#cb272-8" aria-hidden="true"></a>Hamlet dies.</span> +<span id="cb272-9"><a href="#cb272-9" aria-hidden="true"></a></span> +<span id="cb272-10"><a href="#cb272-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> +<span id="cb272-11"><a href="#cb272-11" aria-hidden="true"></a>Hamlet talks to ghost.</span></code></pre></div> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb273"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb273-1"><a href="#cb273-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb273-2"><a href="#cb273-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span> +<span id="cb273-3"><a href="#cb273-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb273-4"><a href="#cb273-4" aria-hidden="true"></a></span> +<span id="cb273-5"><a href="#cb273-5" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> +<span id="cb273-6"><a href="#cb273-6" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb273-7"><a href="#cb273-7" aria-hidden="true"></a></span> +<span id="cb273-8"><a href="#cb273-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span> +<span id="cb273-9"><a href="#cb273-9" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb273-10"><a href="#cb273-10" aria-hidden="true"></a></span> +<span id="cb273-11"><a href="#cb273-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span> +<span id="cb273-12"><a href="#cb273-12" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb273-13"><a href="#cb273-13" aria-hidden="true"></a></span> +<span id="cb273-14"><a href="#cb273-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb274"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb274-1"><a href="#cb274-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="the-tragedy-of-hamlet-2">The Tragedy of Hamlet</h1> @@ -3047,7 +3118,7 @@ Thomas,Edison,1847</code></pre> <h2 id="act-v-2">Act V</h2> <p>Hamlet dies.</p> </blockquote> -<h4 data-number="2.2.1.27" id="option-smartellipses"><span class="header-section-number">2.2.1.27</span> Option <code>smartEllipses</code></h4> +<h4 data-number="2.2.1.29" id="option-smartellipses"><span class="header-section-number">2.2.1.29</span> Option <code>smartEllipses</code></h4> <dl> <dt><code>smartEllipses</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -3063,25 +3134,25 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-10">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb267"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb267-1"><a href="#cb267-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb267-2"><a href="#cb267-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb267-3"><a href="#cb267-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb267-4"><a href="#cb267-4" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb267-5"><a href="#cb267-5" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb267-6"><a href="#cb267-6" aria-hidden="true"></a> local convert = markdown.new()</span> -<span id="cb267-7"><a href="#cb267-7" aria-hidden="true"></a> local input = "These are just three regular dots ..."</span> -<span id="cb267-8"><a href="#cb267-8" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb267-9"><a href="#cb267-9" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb267-10"><a href="#cb267-10" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb267-11"><a href="#cb267-11" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb267-12"><a href="#cb267-12" aria-hidden="true"></a> local convert = markdown.new({smartEllipses = true})</span> -<span id="cb267-13"><a href="#cb267-13" aria-hidden="true"></a> local input = "... and this is a victorian ellipsis."</span> -<span id="cb267-14"><a href="#cb267-14" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb267-15"><a href="#cb267-15" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 class="unnumbered" data-number="" id="lua-module-example-11">Lua Module Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb275"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb275-1"><a href="#cb275-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb275-2"><a href="#cb275-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb275-3"><a href="#cb275-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb275-4"><a href="#cb275-4" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb275-5"><a href="#cb275-5" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb275-6"><a href="#cb275-6" aria-hidden="true"></a> local convert = markdown.new()</span> +<span id="cb275-7"><a href="#cb275-7" aria-hidden="true"></a> local input = "These are just three regular dots ..."</span> +<span id="cb275-8"><a href="#cb275-8" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> +<span id="cb275-9"><a href="#cb275-9" aria-hidden="true"></a><span class="fu">\par</span></span> +<span id="cb275-10"><a href="#cb275-10" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb275-11"><a href="#cb275-11" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb275-12"><a href="#cb275-12" aria-hidden="true"></a> local convert = markdown.new({smartEllipses = true})</span> +<span id="cb275-13"><a href="#cb275-13" aria-hidden="true"></a> local input = "... and this is a victorian ellipsis."</span> +<span id="cb275-14"><a href="#cb275-14" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> +<span id="cb275-15"><a href="#cb275-15" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb268"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb268-1"><a href="#cb268-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb276"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb276-1"><a href="#cb276-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>These are just three regular dots …</p> @@ -3089,19 +3160,19 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="lua-cli-example-9">Lua CLI Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb269"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb269-1"><a href="#cb269-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb269-2"><a href="#cb269-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb269-3"><a href="#cb269-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb269-4"><a href="#cb269-4" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb269-5"><a href="#cb269-5" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb269-6"><a href="#cb269-6" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb269-7"><a href="#cb269-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb277"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb277-1"><a href="#cb277-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb277-2"><a href="#cb277-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb277-3"><a href="#cb277-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb277-4"><a href="#cb277-4" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb277-5"><a href="#cb277-5" aria-hidden="true"></a><span class="fu">\par</span></span> +<span id="cb277-6"><a href="#cb277-6" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb277-7"><a href="#cb277-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb270"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb270-1"><a href="#cb270-1" aria-hidden="true"></a>Are these just three regular dots, a victorian ellipsis, or ... ?</span></code></pre></div> +<div class="sourceCode" id="cb278"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb278-1"><a href="#cb278-1" aria-hidden="true"></a>Are these just three regular dots, a victorian ellipsis, or ... ?</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb271"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb271-1"><a href="#cb271-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb271-2"><a href="#cb271-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ smartEllipses=true -- content.md optiontrue.tex</span> -<span id="cb271-3"><a href="#cb271-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb279"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb279-1"><a href="#cb279-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> +<span id="cb279-2"><a href="#cb279-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ smartEllipses=true -- content.md optiontrue.tex</span> +<span id="cb279-3"><a href="#cb279-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> @@ -3110,48 +3181,48 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="plain-tex-example-13">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb272"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb272-1"><a href="#cb272-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb272-2"><a href="#cb272-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb272-3"><a href="#cb272-3" aria-hidden="true"></a></span> -<span id="cb272-4"><a href="#cb272-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb272-5"><a href="#cb272-5" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb272-6"><a href="#cb272-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb272-7"><a href="#cb272-7" aria-hidden="true"></a></span> -<span id="cb272-8"><a href="#cb272-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb272-9"><a href="#cb272-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb272-10"><a href="#cb272-10" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb272-11"><a href="#cb272-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb272-12"><a href="#cb272-12" aria-hidden="true"></a></span> -<span id="cb272-13"><a href="#cb272-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb280"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb280-1"><a href="#cb280-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb280-2"><a href="#cb280-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb280-3"><a href="#cb280-3" aria-hidden="true"></a></span> +<span id="cb280-4"><a href="#cb280-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb280-5"><a href="#cb280-5" aria-hidden="true"></a>These are just three regular dots ...</span> +<span id="cb280-6"><a href="#cb280-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb280-7"><a href="#cb280-7" aria-hidden="true"></a></span> +<span id="cb280-8"><a href="#cb280-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> +<span id="cb280-9"><a href="#cb280-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb280-10"><a href="#cb280-10" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> +<span id="cb280-11"><a href="#cb280-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb280-12"><a href="#cb280-12" aria-hidden="true"></a></span> +<span id="cb280-13"><a href="#cb280-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb273"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb273-1"><a href="#cb273-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb281"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb281-1"><a href="#cb281-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>These are just three regular dots …</p> <p>. . . and this is a victorian ellipsis.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-23"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-24"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb274"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb274-1"><a href="#cb274-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb274-2"><a href="#cb274-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb274-3"><a href="#cb274-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb274-4"><a href="#cb274-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb274-5"><a href="#cb274-5" aria-hidden="true"></a> ellipsis = {. . .}</span> -<span id="cb274-6"><a href="#cb274-6" aria-hidden="true"></a> }</span> -<span id="cb274-7"><a href="#cb274-7" aria-hidden="true"></a>}</span> -<span id="cb274-8"><a href="#cb274-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb274-9"><a href="#cb274-9" aria-hidden="true"></a></span> -<span id="cb274-10"><a href="#cb274-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb274-11"><a href="#cb274-11" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb274-12"><a href="#cb274-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb274-13"><a href="#cb274-13" aria-hidden="true"></a></span> -<span id="cb274-14"><a href="#cb274-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{smartEllipses}</span> -<span id="cb274-15"><a href="#cb274-15" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb274-16"><a href="#cb274-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb274-17"><a href="#cb274-17" aria-hidden="true"></a></span> -<span id="cb274-18"><a href="#cb274-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb275"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb275-1"><a href="#cb275-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb282"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb282-1"><a href="#cb282-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb282-2"><a href="#cb282-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb282-3"><a href="#cb282-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb282-4"><a href="#cb282-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb282-5"><a href="#cb282-5" aria-hidden="true"></a> ellipsis = {. . .}</span> +<span id="cb282-6"><a href="#cb282-6" aria-hidden="true"></a> }</span> +<span id="cb282-7"><a href="#cb282-7" aria-hidden="true"></a>}</span> +<span id="cb282-8"><a href="#cb282-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb282-9"><a href="#cb282-9" aria-hidden="true"></a></span> +<span id="cb282-10"><a href="#cb282-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb282-11"><a href="#cb282-11" aria-hidden="true"></a>These are just three regular dots ...</span> +<span id="cb282-12"><a href="#cb282-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb282-13"><a href="#cb282-13" aria-hidden="true"></a></span> +<span id="cb282-14"><a href="#cb282-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{smartEllipses}</span> +<span id="cb282-15"><a href="#cb282-15" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> +<span id="cb282-16"><a href="#cb282-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb282-17"><a href="#cb282-17" aria-hidden="true"></a></span> +<span id="cb282-18"><a href="#cb282-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb283"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb283-1"><a href="#cb283-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>These are just three regular dots …</p> @@ -3159,28 +3230,28 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-21">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb276"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb276-1"><a href="#cb276-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb276-2"><a href="#cb276-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb276-3"><a href="#cb276-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb276-4"><a href="#cb276-4" aria-hidden="true"></a></span> -<span id="cb276-5"><a href="#cb276-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb276-6"><a href="#cb276-6" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb276-7"><a href="#cb276-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb276-8"><a href="#cb276-8" aria-hidden="true"></a></span> -<span id="cb276-9"><a href="#cb276-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb276-10"><a href="#cb276-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb276-11"><a href="#cb276-11" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb276-12"><a href="#cb276-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb276-13"><a href="#cb276-13" aria-hidden="true"></a></span> -<span id="cb276-14"><a href="#cb276-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb284"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb284-1"><a href="#cb284-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb284-2"><a href="#cb284-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb284-3"><a href="#cb284-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb284-4"><a href="#cb284-4" aria-hidden="true"></a></span> +<span id="cb284-5"><a href="#cb284-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb284-6"><a href="#cb284-6" aria-hidden="true"></a>These are just three regular dots ...</span> +<span id="cb284-7"><a href="#cb284-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb284-8"><a href="#cb284-8" aria-hidden="true"></a></span> +<span id="cb284-9"><a href="#cb284-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> +<span id="cb284-10"><a href="#cb284-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb284-11"><a href="#cb284-11" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> +<span id="cb284-12"><a href="#cb284-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb284-13"><a href="#cb284-13" aria-hidden="true"></a></span> +<span id="cb284-14"><a href="#cb284-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb277"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb277-1"><a href="#cb277-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb285"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb285-1"><a href="#cb285-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>These are just three regular dots …</p> <p>. . . and this is a victorian ellipsis.</p> </blockquote> -<h4 data-number="2.2.1.28" id="option-startnumber"><span class="header-section-number">2.2.1.28</span> Option <code>startNumber</code></h4> +<h4 data-number="2.2.1.30" id="option-startnumber"><span class="header-section-number">2.2.1.30</span> Option <code>startNumber</code></h4> <dl> <dt><code>startNumber</code> (default value: <code>true</code>)</dt> <dd><dl> @@ -3196,32 +3267,32 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-24"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-25"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb278"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb278-1"><a href="#cb278-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb278-2"><a href="#cb278-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb278-3"><a href="#cb278-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb278-4"><a href="#cb278-4" aria-hidden="true"></a></span> -<span id="cb278-5"><a href="#cb278-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb278-6"><a href="#cb278-6" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb278-7"><a href="#cb278-7" aria-hidden="true"></a></span> -<span id="cb278-8"><a href="#cb278-8" aria-hidden="true"></a>3. third item</span> -<span id="cb278-9"><a href="#cb278-9" aria-hidden="true"></a>4. fourth item</span> -<span id="cb278-10"><a href="#cb278-10" aria-hidden="true"></a>5. fifth item</span> -<span id="cb278-11"><a href="#cb278-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb278-12"><a href="#cb278-12" aria-hidden="true"></a></span> -<span id="cb278-13"><a href="#cb278-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{startNumber=false}</span> -<span id="cb278-14"><a href="#cb278-14" aria-hidden="true"></a>The following list does not respect the numbers specified in the</span> -<span id="cb278-15"><a href="#cb278-15" aria-hidden="true"></a>markup:</span> -<span id="cb278-16"><a href="#cb278-16" aria-hidden="true"></a></span> -<span id="cb278-17"><a href="#cb278-17" aria-hidden="true"></a>3. third item</span> -<span id="cb278-18"><a href="#cb278-18" aria-hidden="true"></a>4. fourth item</span> -<span id="cb278-19"><a href="#cb278-19" aria-hidden="true"></a>5. fifth item</span> -<span id="cb278-20"><a href="#cb278-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb278-21"><a href="#cb278-21" aria-hidden="true"></a></span> -<span id="cb278-22"><a href="#cb278-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb279"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb279-1"><a href="#cb279-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb286"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb286-1"><a href="#cb286-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb286-2"><a href="#cb286-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb286-3"><a href="#cb286-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb286-4"><a href="#cb286-4" aria-hidden="true"></a></span> +<span id="cb286-5"><a href="#cb286-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb286-6"><a href="#cb286-6" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> +<span id="cb286-7"><a href="#cb286-7" aria-hidden="true"></a></span> +<span id="cb286-8"><a href="#cb286-8" aria-hidden="true"></a>3. third item</span> +<span id="cb286-9"><a href="#cb286-9" aria-hidden="true"></a>4. fourth item</span> +<span id="cb286-10"><a href="#cb286-10" aria-hidden="true"></a>5. fifth item</span> +<span id="cb286-11"><a href="#cb286-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb286-12"><a href="#cb286-12" aria-hidden="true"></a></span> +<span id="cb286-13"><a href="#cb286-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{startNumber=false}</span> +<span id="cb286-14"><a href="#cb286-14" aria-hidden="true"></a>The following list does not respect the numbers specified in the</span> +<span id="cb286-15"><a href="#cb286-15" aria-hidden="true"></a>markup:</span> +<span id="cb286-16"><a href="#cb286-16" aria-hidden="true"></a></span> +<span id="cb286-17"><a href="#cb286-17" aria-hidden="true"></a>3. third item</span> +<span id="cb286-18"><a href="#cb286-18" aria-hidden="true"></a>4. fourth item</span> +<span id="cb286-19"><a href="#cb286-19" aria-hidden="true"></a>5. fifth item</span> +<span id="cb286-20"><a href="#cb286-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb286-21"><a href="#cb286-21" aria-hidden="true"></a></span> +<span id="cb286-22"><a href="#cb286-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb287"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb287-1"><a href="#cb287-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The following list respects the numbers specified in the markup:</p> @@ -3239,28 +3310,28 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-22">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb280"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb280-1"><a href="#cb280-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb280-2"><a href="#cb280-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb280-3"><a href="#cb280-3" aria-hidden="true"></a></span> -<span id="cb280-4"><a href="#cb280-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb280-5"><a href="#cb280-5" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb280-6"><a href="#cb280-6" aria-hidden="true"></a></span> -<span id="cb280-7"><a href="#cb280-7" aria-hidden="true"></a>3. third item</span> -<span id="cb280-8"><a href="#cb280-8" aria-hidden="true"></a>4. fourth item</span> -<span id="cb280-9"><a href="#cb280-9" aria-hidden="true"></a>5. fifth item</span> -<span id="cb280-10"><a href="#cb280-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb280-11"><a href="#cb280-11" aria-hidden="true"></a></span> -<span id="cb280-12"><a href="#cb280-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{false}</span> -<span id="cb280-13"><a href="#cb280-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb280-14"><a href="#cb280-14" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb280-15"><a href="#cb280-15" aria-hidden="true"></a></span> -<span id="cb280-16"><a href="#cb280-16" aria-hidden="true"></a>3. third item</span> -<span id="cb280-17"><a href="#cb280-17" aria-hidden="true"></a>4. fourth item</span> -<span id="cb280-18"><a href="#cb280-18" aria-hidden="true"></a>5. fifth item</span> -<span id="cb280-19"><a href="#cb280-19" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb280-20"><a href="#cb280-20" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb281"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb281-1"><a href="#cb281-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb288"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb288-1"><a href="#cb288-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb288-2"><a href="#cb288-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb288-3"><a href="#cb288-3" aria-hidden="true"></a></span> +<span id="cb288-4"><a href="#cb288-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb288-5"><a href="#cb288-5" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> +<span id="cb288-6"><a href="#cb288-6" aria-hidden="true"></a></span> +<span id="cb288-7"><a href="#cb288-7" aria-hidden="true"></a>3. third item</span> +<span id="cb288-8"><a href="#cb288-8" aria-hidden="true"></a>4. fourth item</span> +<span id="cb288-9"><a href="#cb288-9" aria-hidden="true"></a>5. fifth item</span> +<span id="cb288-10"><a href="#cb288-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb288-11"><a href="#cb288-11" aria-hidden="true"></a></span> +<span id="cb288-12"><a href="#cb288-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{false}</span> +<span id="cb288-13"><a href="#cb288-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb288-14"><a href="#cb288-14" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> +<span id="cb288-15"><a href="#cb288-15" aria-hidden="true"></a></span> +<span id="cb288-16"><a href="#cb288-16" aria-hidden="true"></a>3. third item</span> +<span id="cb288-17"><a href="#cb288-17" aria-hidden="true"></a>4. fourth item</span> +<span id="cb288-18"><a href="#cb288-18" aria-hidden="true"></a>5. fifth item</span> +<span id="cb288-19"><a href="#cb288-19" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb288-20"><a href="#cb288-20" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb289"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb289-1"><a href="#cb289-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The following list respects the numbers specified in the markup:</p> @@ -3276,19 +3347,19 @@ Thomas,Edison,1847</code></pre> <li>fifth item</li> </ol> </blockquote> -<h4 data-number="2.2.1.29" id="option-stripindent"><span class="header-section-number">2.2.1.29</span> Option <code>stripIndent</code></h4> +<h4 data-number="2.2.1.31" id="option-stripindent"><span class="header-section-number">2.2.1.31</span> Option <code>stripIndent</code></h4> <dl> <dt><code>stripIndent</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Strip the minimal indentation of non-blank lines from all lines in a markdown document. Requires that the <strong><code>preserveTabs</code></strong> Lua option is :</p> -<div class="sourceCode" id="cb282"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb282-1"><a href="#cb282-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb282-2"><a href="#cb282-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> -<span id="cb282-3"><a href="#cb282-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb282-4"><a href="#cb282-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb282-5"><a href="#cb282-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb282-6"><a href="#cb282-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb282-7"><a href="#cb282-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb290"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb290-1"><a href="#cb290-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb290-2"><a href="#cb290-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> +<span id="cb290-3"><a href="#cb290-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb290-4"><a href="#cb290-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb290-5"><a href="#cb290-5" aria-hidden="true"></a> Hello *world*!</span> +<span id="cb290-6"><a href="#cb290-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb290-7"><a href="#cb290-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> </dd> </dl> </dd> @@ -3301,52 +3372,52 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-14">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb283"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb283-1"><a href="#cb283-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb283-2"><a href="#cb283-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> -<span id="cb283-3"><a href="#cb283-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb283-4"><a href="#cb283-4" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb283-5"><a href="#cb283-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb283-6"><a href="#cb283-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb291"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb291-1"><a href="#cb291-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb291-2"><a href="#cb291-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> +<span id="cb291-3"><a href="#cb291-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb291-4"><a href="#cb291-4" aria-hidden="true"></a> Hello *world*!</span> +<span id="cb291-5"><a href="#cb291-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb291-6"><a href="#cb291-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb284"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb284-1"><a href="#cb284-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb292"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb292-1"><a href="#cb292-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h5 class="unnumbered" data-number="" id="latex-example-25"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-26"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb285"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb285-1"><a href="#cb285-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb285-2"><a href="#cb285-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> -<span id="cb285-3"><a href="#cb285-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb285-4"><a href="#cb285-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb285-5"><a href="#cb285-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb285-6"><a href="#cb285-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb285-7"><a href="#cb285-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb293"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb293-1"><a href="#cb293-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb293-2"><a href="#cb293-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> +<span id="cb293-3"><a href="#cb293-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb293-4"><a href="#cb293-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb293-5"><a href="#cb293-5" aria-hidden="true"></a> Hello *world*!</span> +<span id="cb293-6"><a href="#cb293-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb293-7"><a href="#cb293-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb286"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb286-1"><a href="#cb286-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb294"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb294-1"><a href="#cb294-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> <h5 class="unnumbered" data-number="" id="context-example-23">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb287"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb287-1"><a href="#cb287-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb287-2"><a href="#cb287-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> -<span id="cb287-3"><a href="#cb287-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb287-4"><a href="#cb287-4" aria-hidden="true"></a> <span class="fu">\startmarkdown</span></span> -<span id="cb287-5"><a href="#cb287-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb287-6"><a href="#cb287-6" aria-hidden="true"></a> <span class="fu">\stopmarkdown</span></span> -<span id="cb287-7"><a href="#cb287-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb295"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb295-1"><a href="#cb295-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb295-2"><a href="#cb295-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> +<span id="cb295-3"><a href="#cb295-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb295-4"><a href="#cb295-4" aria-hidden="true"></a> <span class="fu">\startmarkdown</span></span> +<span id="cb295-5"><a href="#cb295-5" aria-hidden="true"></a> Hello *world*!</span> +<span id="cb295-6"><a href="#cb295-6" aria-hidden="true"></a> <span class="fu">\stopmarkdown</span></span> +<span id="cb295-7"><a href="#cb295-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb288"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb288-1"><a href="#cb288-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb296"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb296-1"><a href="#cb296-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h4 data-number="2.2.1.30" id="option-tablecaptions"><span class="header-section-number">2.2.1.30</span> Option <code>tableCaptions</code></h4> +<h4 data-number="2.2.1.32" id="option-tablecaptions"><span class="header-section-number">2.2.1.32</span> Option <code>tableCaptions</code></h4> <dl> <dt><code>tableCaptions</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the Pandoc <code>table_captions</code> syntax extension for <a href="#pipe-tables">pipe tables</a>.</p> -<div class="sourceCode" id="cb289"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb289-1"><a href="#cb289-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb289-2"><a href="#cb289-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb289-3"><a href="#cb289-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb289-4"><a href="#cb289-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb289-5"><a href="#cb289-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb289-6"><a href="#cb289-6" aria-hidden="true"></a></span> -<span id="cb289-7"><a href="#cb289-7" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span></code></pre></div> +<div class="sourceCode" id="cb297"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb297-1"><a href="#cb297-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb297-2"><a href="#cb297-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb297-3"><a href="#cb297-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb297-4"><a href="#cb297-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb297-5"><a href="#cb297-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb297-6"><a href="#cb297-6" aria-hidden="true"></a></span> +<span id="cb297-7"><a href="#cb297-7" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span></code></pre></div> </dd> </dl> </dd> @@ -3357,23 +3428,23 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-26"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-27"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb290"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb290-1"><a href="#cb290-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb290-2"><a href="#cb290-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> -<span id="cb290-3"><a href="#cb290-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb290-4"><a href="#cb290-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb290-5"><a href="#cb290-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb290-6"><a href="#cb290-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb290-7"><a href="#cb290-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb290-8"><a href="#cb290-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb290-9"><a href="#cb290-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb290-10"><a href="#cb290-10" aria-hidden="true"></a></span> -<span id="cb290-11"><a href="#cb290-11" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> -<span id="cb290-12"><a href="#cb290-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb290-13"><a href="#cb290-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb298"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb298-1"><a href="#cb298-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb298-2"><a href="#cb298-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> +<span id="cb298-3"><a href="#cb298-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb298-4"><a href="#cb298-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb298-5"><a href="#cb298-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb298-6"><a href="#cb298-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb298-7"><a href="#cb298-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb298-8"><a href="#cb298-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb298-9"><a href="#cb298-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb298-10"><a href="#cb298-10" aria-hidden="true"></a></span> +<span id="cb298-11"><a href="#cb298-11" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> +<span id="cb298-12"><a href="#cb298-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb298-13"><a href="#cb298-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb291"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb291-1"><a href="#cb291-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb299"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb299-1"><a href="#cb299-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -3410,22 +3481,22 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-24">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb292"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb292-1"><a href="#cb292-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb292-2"><a href="#cb292-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionPipeTables</span>{true}</span> -<span id="cb292-3"><a href="#cb292-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTableCaptions</span>{true}</span> -<span id="cb292-4"><a href="#cb292-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb292-5"><a href="#cb292-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb292-6"><a href="#cb292-6" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb292-7"><a href="#cb292-7" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb292-8"><a href="#cb292-8" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb292-9"><a href="#cb292-9" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb292-10"><a href="#cb292-10" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb292-11"><a href="#cb292-11" aria-hidden="true"></a></span> -<span id="cb292-12"><a href="#cb292-12" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> -<span id="cb292-13"><a href="#cb292-13" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb292-14"><a href="#cb292-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb300"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb300-1"><a href="#cb300-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb300-2"><a href="#cb300-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionPipeTables</span>{true}</span> +<span id="cb300-3"><a href="#cb300-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTableCaptions</span>{true}</span> +<span id="cb300-4"><a href="#cb300-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb300-5"><a href="#cb300-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb300-6"><a href="#cb300-6" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb300-7"><a href="#cb300-7" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb300-8"><a href="#cb300-8" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb300-9"><a href="#cb300-9" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb300-10"><a href="#cb300-10" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb300-11"><a href="#cb300-11" aria-hidden="true"></a></span> +<span id="cb300-12"><a href="#cb300-12" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> +<span id="cb300-13"><a href="#cb300-13" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb300-14"><a href="#cb300-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb293"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb293-1"><a href="#cb293-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb301"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb301-1"><a href="#cb301-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -3460,15 +3531,15 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </blockquote> -<h4 data-number="2.2.1.31" id="option-tasklists"><span class="header-section-number">2.2.1.31</span> Option <code>taskLists</code></h4> +<h4 data-number="2.2.1.33" id="option-tasklists"><span class="header-section-number">2.2.1.33</span> Option <code>taskLists</code></h4> <dl> <dt><code>taskLists</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the Pandoc <code>task_lists</code> syntax extension.</p> -<div class="sourceCode" id="cb294"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb294-1"><a href="#cb294-1" aria-hidden="true"></a><span class="ss">- </span><span class="va">[ ]</span> an unticked task list item</span> -<span id="cb294-2"><a href="#cb294-2" aria-hidden="true"></a><span class="ss">- </span><span class="co">[</span><span class="ot">/</span><span class="co">]</span> a half-checked task list item</span> -<span id="cb294-3"><a href="#cb294-3" aria-hidden="true"></a><span class="ss">- </span><span class="co">[</span><span class="ot">X</span><span class="co">]</span> a ticked task list item</span></code></pre></div> +<div class="sourceCode" id="cb302"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb302-1"><a href="#cb302-1" aria-hidden="true"></a><span class="ss">- </span><span class="va">[ ]</span> an unticked task list item</span> +<span id="cb302-2"><a href="#cb302-2" aria-hidden="true"></a><span class="ss">- </span><span class="co">[</span><span class="ot">/</span><span class="co">]</span> a half-checked task list item</span> +<span id="cb302-3"><a href="#cb302-3" aria-hidden="true"></a><span class="ss">- </span><span class="co">[</span><span class="ot">X</span><span class="co">]</span> a ticked task list item</span></code></pre></div> </dd> </dl> </dd> @@ -3479,26 +3550,26 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-27"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-28"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb295"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb295-1"><a href="#cb295-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb295-2"><a href="#cb295-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span> -<span id="cb295-3"><a href="#cb295-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb295-4"><a href="#cb295-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb295-5"><a href="#cb295-5" aria-hidden="true"></a> untickedBox = No,</span> -<span id="cb295-6"><a href="#cb295-6" aria-hidden="true"></a> halfTickedBox = Maybe,</span> -<span id="cb295-7"><a href="#cb295-7" aria-hidden="true"></a> tickedBox = Yes,</span> -<span id="cb295-8"><a href="#cb295-8" aria-hidden="true"></a> },</span> -<span id="cb295-9"><a href="#cb295-9" aria-hidden="true"></a>}</span> -<span id="cb295-10"><a href="#cb295-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb295-11"><a href="#cb295-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb295-12"><a href="#cb295-12" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb295-13"><a href="#cb295-13" aria-hidden="true"></a>- [/] I can?</span> -<span id="cb295-14"><a href="#cb295-14" aria-hidden="true"></a>- [X] I can!</span> -<span id="cb295-15"><a href="#cb295-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb295-16"><a href="#cb295-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb296"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb296-1"><a href="#cb296-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb303"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb303-1"><a href="#cb303-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb303-2"><a href="#cb303-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span> +<span id="cb303-3"><a href="#cb303-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb303-4"><a href="#cb303-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb303-5"><a href="#cb303-5" aria-hidden="true"></a> untickedBox = No,</span> +<span id="cb303-6"><a href="#cb303-6" aria-hidden="true"></a> halfTickedBox = Maybe,</span> +<span id="cb303-7"><a href="#cb303-7" aria-hidden="true"></a> tickedBox = Yes,</span> +<span id="cb303-8"><a href="#cb303-8" aria-hidden="true"></a> },</span> +<span id="cb303-9"><a href="#cb303-9" aria-hidden="true"></a>}</span> +<span id="cb303-10"><a href="#cb303-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb303-11"><a href="#cb303-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb303-12"><a href="#cb303-12" aria-hidden="true"></a>- [ ] you can't.</span> +<span id="cb303-13"><a href="#cb303-13" aria-hidden="true"></a>- [/] I can?</span> +<span id="cb303-14"><a href="#cb303-14" aria-hidden="true"></a>- [X] I can!</span> +<span id="cb303-15"><a href="#cb303-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb303-16"><a href="#cb303-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb304"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb304-1"><a href="#cb304-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <ul> @@ -3509,20 +3580,20 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-25">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb297"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb297-1"><a href="#cb297-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb297-2"><a href="#cb297-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span> -<span id="cb297-3"><a href="#cb297-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> -<span id="cb297-4"><a href="#cb297-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHalftickedBox</span>{Maybe}</span> -<span id="cb297-5"><a href="#cb297-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> -<span id="cb297-6"><a href="#cb297-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb297-7"><a href="#cb297-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb297-8"><a href="#cb297-8" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb297-9"><a href="#cb297-9" aria-hidden="true"></a>- [/] I can?</span> -<span id="cb297-10"><a href="#cb297-10" aria-hidden="true"></a>- [X] I can!</span> -<span id="cb297-11"><a href="#cb297-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb297-12"><a href="#cb297-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb305"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb305-1"><a href="#cb305-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb305-2"><a href="#cb305-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span> +<span id="cb305-3"><a href="#cb305-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> +<span id="cb305-4"><a href="#cb305-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHalftickedBox</span>{Maybe}</span> +<span id="cb305-5"><a href="#cb305-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> +<span id="cb305-6"><a href="#cb305-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb305-7"><a href="#cb305-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb305-8"><a href="#cb305-8" aria-hidden="true"></a>- [ ] you can't.</span> +<span id="cb305-9"><a href="#cb305-9" aria-hidden="true"></a>- [/] I can?</span> +<span id="cb305-10"><a href="#cb305-10" aria-hidden="true"></a>- [X] I can!</span> +<span id="cb305-11"><a href="#cb305-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb305-12"><a href="#cb305-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb298"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb298-1"><a href="#cb298-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb306"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb306-1"><a href="#cb306-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <ul> @@ -3531,20 +3602,20 @@ Thomas,Edison,1847</code></pre> <li>Yes I can!</li> </ul> </blockquote> -<h4 data-number="2.2.1.32" id="option-texcomments"><span class="header-section-number">2.2.1.32</span> Option <code>texComments</code></h4> +<h4 data-number="2.2.1.34" id="option-texcomments"><span class="header-section-number">2.2.1.34</span> Option <code>texComments</code></h4> <dl> <dt><code>texComments</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Strip <span class="tex">T<sub>e</sub>X</span>-style comments.</p> -<div class="sourceCode" id="cb299"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb299-1"><a href="#cb299-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb299-2"><a href="#cb299-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> -<span id="cb299-3"><a href="#cb299-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb299-4"><a href="#cb299-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb299-5"><a href="#cb299-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb299-6"><a href="#cb299-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb299-7"><a href="#cb299-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb299-8"><a href="#cb299-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb307"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb307-1"><a href="#cb307-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb307-2"><a href="#cb307-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> +<span id="cb307-3"><a href="#cb307-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb307-4"><a href="#cb307-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb307-5"><a href="#cb307-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb307-6"><a href="#cb307-6" aria-hidden="true"></a> lo *world*!</span> +<span id="cb307-7"><a href="#cb307-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb307-8"><a href="#cb307-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Always enabled when <strong><code>hybrid</code></strong> is enabled.</p> </dd> </dl> @@ -3558,43 +3629,43 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-15">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb300"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb300-1"><a href="#cb300-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb300-2"><a href="#cb300-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTeXComments</span>{true}</span> -<span id="cb300-3"><a href="#cb300-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb300-4"><a href="#cb300-4" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb300-5"><a href="#cb300-5" aria-hidden="true"></a> lo *world*!</span> -<span id="cb300-6"><a href="#cb300-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb300-7"><a href="#cb300-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb308"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb308-1"><a href="#cb308-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb308-2"><a href="#cb308-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTeXComments</span>{true}</span> +<span id="cb308-3"><a href="#cb308-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb308-4"><a href="#cb308-4" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb308-5"><a href="#cb308-5" aria-hidden="true"></a> lo *world*!</span> +<span id="cb308-6"><a href="#cb308-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb308-7"><a href="#cb308-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb301"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb301-1"><a href="#cb301-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb309"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb309-1"><a href="#cb309-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h5 class="unnumbered" data-number="" id="latex-example-28"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-29"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb302"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb302-1"><a href="#cb302-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb302-2"><a href="#cb302-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> -<span id="cb302-3"><a href="#cb302-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb302-4"><a href="#cb302-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb302-5"><a href="#cb302-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb302-6"><a href="#cb302-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb302-7"><a href="#cb302-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb302-8"><a href="#cb302-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb310"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb310-1"><a href="#cb310-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb310-2"><a href="#cb310-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> +<span id="cb310-3"><a href="#cb310-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb310-4"><a href="#cb310-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb310-5"><a href="#cb310-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb310-6"><a href="#cb310-6" aria-hidden="true"></a> lo *world*!</span> +<span id="cb310-7"><a href="#cb310-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb310-8"><a href="#cb310-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb303"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb303-1"><a href="#cb303-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb311"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb311-1"><a href="#cb311-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> <h5 class="unnumbered" data-number="" id="context-example-26">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb304"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb304-1"><a href="#cb304-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb304-2"><a href="#cb304-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTeXComments</span>{true}</span> -<span id="cb304-3"><a href="#cb304-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb304-4"><a href="#cb304-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb304-5"><a href="#cb304-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb304-6"><a href="#cb304-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb304-7"><a href="#cb304-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb304-8"><a href="#cb304-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb312"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb312-1"><a href="#cb312-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb312-2"><a href="#cb312-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTeXComments</span>{true}</span> +<span id="cb312-3"><a href="#cb312-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb312-4"><a href="#cb312-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb312-5"><a href="#cb312-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb312-6"><a href="#cb312-6" aria-hidden="true"></a> lo *world*!</span> +<span id="cb312-7"><a href="#cb312-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb312-8"><a href="#cb312-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb305"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb305-1"><a href="#cb305-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb313"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb313-1"><a href="#cb313-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h4 data-number="2.2.1.33" id="option-tightlists"><span class="header-section-number">2.2.1.33</span> Option <code>tightLists</code></h4> +<h4 data-number="2.2.1.35" id="option-tightlists"><span class="header-section-number">2.2.1.35</span> Option <code>tightLists</code></h4> <dl> <dt><code>tightLists</code> (default value: <code>true</code>)</dt> <dd><dl> @@ -3610,39 +3681,39 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-29"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-30"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb306"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb306-1"><a href="#cb306-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb306-2"><a href="#cb306-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb306-3"><a href="#cb306-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb306-4"><a href="#cb306-4" aria-hidden="true"></a></span> -<span id="cb306-5"><a href="#cb306-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb306-6"><a href="#cb306-6" aria-hidden="true"></a>The following list is tight:</span> -<span id="cb306-7"><a href="#cb306-7" aria-hidden="true"></a></span> -<span id="cb306-8"><a href="#cb306-8" aria-hidden="true"></a> - first item</span> -<span id="cb306-9"><a href="#cb306-9" aria-hidden="true"></a> - second item</span> -<span id="cb306-10"><a href="#cb306-10" aria-hidden="true"></a> - third item</span> -<span id="cb306-11"><a href="#cb306-11" aria-hidden="true"></a></span> -<span id="cb306-12"><a href="#cb306-12" aria-hidden="true"></a>The following list is loose:</span> -<span id="cb306-13"><a href="#cb306-13" aria-hidden="true"></a></span> -<span id="cb306-14"><a href="#cb306-14" aria-hidden="true"></a> - first item</span> -<span id="cb306-15"><a href="#cb306-15" aria-hidden="true"></a> - second item that spans</span> -<span id="cb306-16"><a href="#cb306-16" aria-hidden="true"></a></span> -<span id="cb306-17"><a href="#cb306-17" aria-hidden="true"></a> multiple paragraphs</span> -<span id="cb306-18"><a href="#cb306-18" aria-hidden="true"></a> - third item</span> -<span id="cb306-19"><a href="#cb306-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb306-20"><a href="#cb306-20" aria-hidden="true"></a></span> -<span id="cb306-21"><a href="#cb306-21" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{tightLists=false}</span> -<span id="cb306-22"><a href="#cb306-22" aria-hidden="true"></a>The following list is now also loose:</span> -<span id="cb306-23"><a href="#cb306-23" aria-hidden="true"></a></span> -<span id="cb306-24"><a href="#cb306-24" aria-hidden="true"></a> - first item</span> -<span id="cb306-25"><a href="#cb306-25" aria-hidden="true"></a> - second item</span> -<span id="cb306-26"><a href="#cb306-26" aria-hidden="true"></a> - third item</span> -<span id="cb306-27"><a href="#cb306-27" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb306-28"><a href="#cb306-28" aria-hidden="true"></a></span> -<span id="cb306-29"><a href="#cb306-29" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb307"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb307-1"><a href="#cb307-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb314"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb314-1"><a href="#cb314-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb314-2"><a href="#cb314-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb314-3"><a href="#cb314-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb314-4"><a href="#cb314-4" aria-hidden="true"></a></span> +<span id="cb314-5"><a href="#cb314-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb314-6"><a href="#cb314-6" aria-hidden="true"></a>The following list is tight:</span> +<span id="cb314-7"><a href="#cb314-7" aria-hidden="true"></a></span> +<span id="cb314-8"><a href="#cb314-8" aria-hidden="true"></a> - first item</span> +<span id="cb314-9"><a href="#cb314-9" aria-hidden="true"></a> - second item</span> +<span id="cb314-10"><a href="#cb314-10" aria-hidden="true"></a> - third item</span> +<span id="cb314-11"><a href="#cb314-11" aria-hidden="true"></a></span> +<span id="cb314-12"><a href="#cb314-12" aria-hidden="true"></a>The following list is loose:</span> +<span id="cb314-13"><a href="#cb314-13" aria-hidden="true"></a></span> +<span id="cb314-14"><a href="#cb314-14" aria-hidden="true"></a> - first item</span> +<span id="cb314-15"><a href="#cb314-15" aria-hidden="true"></a> - second item that spans</span> +<span id="cb314-16"><a href="#cb314-16" aria-hidden="true"></a></span> +<span id="cb314-17"><a href="#cb314-17" aria-hidden="true"></a> multiple paragraphs</span> +<span id="cb314-18"><a href="#cb314-18" aria-hidden="true"></a> - third item</span> +<span id="cb314-19"><a href="#cb314-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb314-20"><a href="#cb314-20" aria-hidden="true"></a></span> +<span id="cb314-21"><a href="#cb314-21" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{tightLists=false}</span> +<span id="cb314-22"><a href="#cb314-22" aria-hidden="true"></a>The following list is now also loose:</span> +<span id="cb314-23"><a href="#cb314-23" aria-hidden="true"></a></span> +<span id="cb314-24"><a href="#cb314-24" aria-hidden="true"></a> - first item</span> +<span id="cb314-25"><a href="#cb314-25" aria-hidden="true"></a> - second item</span> +<span id="cb314-26"><a href="#cb314-26" aria-hidden="true"></a> - third item</span> +<span id="cb314-27"><a href="#cb314-27" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb314-28"><a href="#cb314-28" aria-hidden="true"></a></span> +<span id="cb314-29"><a href="#cb314-29" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb315"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb315-1"><a href="#cb315-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The following list is tight:</p> @@ -3665,16 +3736,16 @@ Thomas,Edison,1847</code></pre> <li><p>third item</p></li> </ul> </blockquote> -<h4 data-number="2.2.1.34" id="option-underscores"><span class="header-section-number">2.2.1.34</span> Option <code>underscores</code></h4> +<h4 data-number="2.2.1.36" id="option-underscores"><span class="header-section-number">2.2.1.36</span> Option <code>underscores</code></h4> <dl> <dt><code>underscores</code> (default value: <code>true</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Both underscores and asterisks can be used to denote emphasis and strong emphasis:</p> -<div class="sourceCode" id="cb308"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb308-1"><a href="#cb308-1" aria-hidden="true"></a>*single asterisks*</span> -<span id="cb308-2"><a href="#cb308-2" aria-hidden="true"></a>_single underscores_</span> -<span id="cb308-3"><a href="#cb308-3" aria-hidden="true"></a>**double asterisks**</span> -<span id="cb308-4"><a href="#cb308-4" aria-hidden="true"></a>__double underscores__</span></code></pre></div> +<div class="sourceCode" id="cb316"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb316-1"><a href="#cb316-1" aria-hidden="true"></a>*single asterisks*</span> +<span id="cb316-2"><a href="#cb316-2" aria-hidden="true"></a>_single underscores_</span> +<span id="cb316-3"><a href="#cb316-3" aria-hidden="true"></a>**double asterisks**</span> +<span id="cb316-4"><a href="#cb316-4" aria-hidden="true"></a>__double underscores__</span></code></pre></div> </dd> </dl> </dd> @@ -3687,43 +3758,43 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-16">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb309"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb309-1"><a href="#cb309-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb309-2"><a href="#cb309-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb309-3"><a href="#cb309-3" aria-hidden="true"></a></span> -<span id="cb309-4"><a href="#cb309-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb309-5"><a href="#cb309-5" aria-hidden="true"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> -<span id="cb309-6"><a href="#cb309-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb309-7"><a href="#cb309-7" aria-hidden="true"></a></span> -<span id="cb309-8"><a href="#cb309-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> -<span id="cb309-9"><a href="#cb309-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb309-10"><a href="#cb309-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb309-11"><a href="#cb309-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb309-12"><a href="#cb309-12" aria-hidden="true"></a></span> -<span id="cb309-13"><a href="#cb309-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb317"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb317-1"><a href="#cb317-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb317-2"><a href="#cb317-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb317-3"><a href="#cb317-3" aria-hidden="true"></a></span> +<span id="cb317-4"><a href="#cb317-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb317-5"><a href="#cb317-5" aria-hidden="true"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> +<span id="cb317-6"><a href="#cb317-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb317-7"><a href="#cb317-7" aria-hidden="true"></a></span> +<span id="cb317-8"><a href="#cb317-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> +<span id="cb317-9"><a href="#cb317-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb317-10"><a href="#cb317-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> +<span id="cb317-11"><a href="#cb317-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb317-12"><a href="#cb317-12" aria-hidden="true"></a></span> +<span id="cb317-13"><a href="#cb317-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb310"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb310-1"><a href="#cb310-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb318"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb318-1"><a href="#cb318-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> <p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-30"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-31"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb311"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb311-1"><a href="#cb311-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb311-2"><a href="#cb311-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[hybrid]{<span class="ex">markdown</span>}</span> -<span id="cb311-3"><a href="#cb311-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb311-4"><a href="#cb311-4" aria-hidden="true"></a></span> -<span id="cb311-5"><a href="#cb311-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb311-6"><a href="#cb311-6" aria-hidden="true"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> -<span id="cb311-7"><a href="#cb311-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb311-8"><a href="#cb311-8" aria-hidden="true"></a></span> -<span id="cb311-9"><a href="#cb311-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{underscores=false}</span> -<span id="cb311-10"><a href="#cb311-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb311-11"><a href="#cb311-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb311-12"><a href="#cb311-12" aria-hidden="true"></a></span> -<span id="cb311-13"><a href="#cb311-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb319"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb319-1"><a href="#cb319-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb319-2"><a href="#cb319-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[hybrid]{<span class="ex">markdown</span>}</span> +<span id="cb319-3"><a href="#cb319-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb319-4"><a href="#cb319-4" aria-hidden="true"></a></span> +<span id="cb319-5"><a href="#cb319-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb319-6"><a href="#cb319-6" aria-hidden="true"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> +<span id="cb319-7"><a href="#cb319-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb319-8"><a href="#cb319-8" aria-hidden="true"></a></span> +<span id="cb319-9"><a href="#cb319-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{underscores=false}</span> +<span id="cb319-10"><a href="#cb319-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> +<span id="cb319-11"><a href="#cb319-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb319-12"><a href="#cb319-12" aria-hidden="true"></a></span> +<span id="cb319-13"><a href="#cb319-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb312"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb312-1"><a href="#cb312-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb320"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb320-1"><a href="#cb320-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> @@ -3731,22 +3802,22 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-27">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb313"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb313-1"><a href="#cb313-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb313-2"><a href="#cb313-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb313-3"><a href="#cb313-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb313-4"><a href="#cb313-4" aria-hidden="true"></a></span> -<span id="cb313-5"><a href="#cb313-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb313-6"><a href="#cb313-6" aria-hidden="true"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> -<span id="cb313-7"><a href="#cb313-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb313-8"><a href="#cb313-8" aria-hidden="true"></a></span> -<span id="cb313-9"><a href="#cb313-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> -<span id="cb313-10"><a href="#cb313-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb313-11"><a href="#cb313-11" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb313-12"><a href="#cb313-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb313-13"><a href="#cb313-13" aria-hidden="true"></a></span> -<span id="cb313-14"><a href="#cb313-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb321"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb321-1"><a href="#cb321-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb321-2"><a href="#cb321-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb321-3"><a href="#cb321-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb321-4"><a href="#cb321-4" aria-hidden="true"></a></span> +<span id="cb321-5"><a href="#cb321-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb321-6"><a href="#cb321-6" aria-hidden="true"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> +<span id="cb321-7"><a href="#cb321-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb321-8"><a href="#cb321-8" aria-hidden="true"></a></span> +<span id="cb321-9"><a href="#cb321-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> +<span id="cb321-10"><a href="#cb321-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb321-11"><a href="#cb321-11" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> +<span id="cb321-12"><a href="#cb321-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb321-13"><a href="#cb321-13" aria-hidden="true"></a></span> +<span id="cb321-14"><a href="#cb321-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb314"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb314-1"><a href="#cb314-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb322"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb322-1"><a href="#cb322-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> @@ -3754,9 +3825,12 @@ Thomas,Edison,1847</code></pre> </blockquote> <h3 data-number="2.2.2" id="plain-tex-1"><span class="header-section-number">2.2.2</span> Plain <span class="tex">T<sub>e</sub>X</span></h3> <p>Plain <span class="tex">T<sub>e</sub>X</span> options control the communication between the <span class="tex">T<sub>e</sub>X</span> interface and the <code>markdown</code> Lua module. They are supported by all higher-level interfaces of the Markdown package, i.e. the plain <span class="tex">T<sub>e</sub>X</span>, <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> and Con<span class="tex">T<sub>e</sub>X</span>t interfaces.</p> -<h4 data-number="2.2.2.1" id="finalizing-and-freezing-the-cache"><span class="header-section-number">2.2.2.1</span> Finalizing and Freezing the Cache</h4> +<h4 data-number="2.2.2.1" id="setting-lua-options-from-plain-tex"><span class="header-section-number">2.2.2.1</span> Setting Lua options from plain <span class="tex">T<sub>e</sub>X</span></h4> +<p>As a rule of thumb, you can set all Lua options directly from plain <span class="tex">T<sub>e</sub>X</span>. For example, to set the <strong><code>taskLists</code></strong> Lua option to <code>true</code>, you would include the following code in your plain <span class="tex">T<sub>e</sub>X</span> document:</p> +<div class="sourceCode" id="cb323"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb323-1"><a href="#cb323-1" aria-hidden="true"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span></code></pre></div> +<h4 data-number="2.2.2.2" id="finalizing-and-freezing-the-cache"><span class="header-section-number">2.2.2.2</span> Finalizing and Freezing the Cache</h4> <p>The <code>\markdownOptionFrozenCache</code> option uses the mapping previously created by the Lua interface <strong><code>finalizeCache</code></strong> option, and uses it to typeset the plain <span class="tex">T<sub>e</sub>X</span> document without invoking Lua. As a result, the plain <span class="tex">T<sub>e</sub>X</span> document becomes more portable, but further changes in the order and the content of markdown documents will not be reflected. It defaults to <code>false</code>.</p> -<p>The standard usage of the <strong><code>finalizeCache</code></strong> and options is as follows:</p> +<p>The standard usage of the <strong><code>finalizeCache</code></strong> and <strong><code>frozenCache</code></strong> options is as follows:</p> <ol type="1"> <li>Remove the <strong><code>cacheDir</code></strong> cache directory with stale auxiliary cache files.</li> <li>Enable the <strong><code>finalizeCache</code></strong> option.</li> @@ -3765,7 +3839,7 @@ Thomas,Edison,1847</code></pre> <li>Publish the source code of the plain <span class="tex">T<sub>e</sub>X</span> document and the <strong><code>cacheDir</code></strong> directory.</li> </ol> <p>For more information, see the examples for the <strong><code>finalizeCache</code></strong> option.</p> -<h4 data-number="2.2.2.2" id="file-and-directory-names"><span class="header-section-number">2.2.2.2</span> File and Directory Names</h4> +<h4 data-number="2.2.2.3" id="file-and-directory-names"><span class="header-section-number">2.2.2.3</span> File and Directory Names</h4> <p>The plain <span class="tex">T<sub>e</sub>X</span> interface provides the following commands that you can use to specify the location of temporary files produced during the conversion from Markdown to <span class="tex">T<sub>e</sub>X</span>:</p> <ul> <li><code>\markdownOptionHelperScriptFileName</code>,</li> @@ -3776,60 +3850,70 @@ Thomas,Edison,1847</code></pre> <li><code>\markdownOptionCacheDir</code>, and</li> <li><code>\markdownOptionFrozenCacheFileName</code>.</li> </ul> +<p>The <code>\markdownOptionCacheDir</code> and <code>\markdownOptionFrozenCacheFileName</code> commands correspond to the <code>cacheDir</code> and <code>frozenCacheFileName</code> Lua options.</p> <p>Using a text editor, create a folder named <code>output-directory</code> and a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb315"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb315-1"><a href="#cb315-1" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb315-2"><a href="#cb315-2" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb315-3"><a href="#cb315-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionHelperScriptFileName</span>{helper-script.lua}</span> -<span id="cb315-4"><a href="#cb315-4" aria-hidden="true"></a><span class="fu">\def\markdownOptionInputTempFileName</span>{temporary-input.md}</span> -<span id="cb315-5"><a href="#cb315-5" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputTempFileName</span>{temporary-output.tex}</span> -<span id="cb315-6"><a href="#cb315-6" aria-hidden="true"></a><span class="fu">\def\markdownOptionErrorTempFileName</span>{error-output.txt}</span> -<span id="cb315-7"><a href="#cb315-7" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputDir</span>{output-directory}</span> -<span id="cb315-8"><a href="#cb315-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionCacheDir</span>{output-directory/cache-directory}</span> -<span id="cb315-9"><a href="#cb315-9" aria-hidden="true"></a><span class="fu">\markdownOptionFinalizeCachetrue</span></span> -<span id="cb315-10"><a href="#cb315-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{output-directory/cache-directory/frozen-cache.tex}</span> -<span id="cb315-11"><a href="#cb315-11" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb315-12"><a href="#cb315-12" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb315-13"><a href="#cb315-13" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb315-14"><a href="#cb315-14" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb316"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb316-1"><a href="#cb316-1" aria-hidden="true"></a><span class="ex">luatex</span> --output-directory output-directory document.tex</span></code></pre></div> +<div class="sourceCode" id="cb324"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb324-1"><a href="#cb324-1" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb324-2"><a href="#cb324-2" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb324-3"><a href="#cb324-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionHelperScriptFileName</span>{helper-script.lua}</span> +<span id="cb324-4"><a href="#cb324-4" aria-hidden="true"></a><span class="fu">\def\markdownOptionInputTempFileName</span>{temporary-input.md}</span> +<span id="cb324-5"><a href="#cb324-5" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputTempFileName</span>{temporary-output.tex}</span> +<span id="cb324-6"><a href="#cb324-6" aria-hidden="true"></a><span class="fu">\def\markdownOptionErrorTempFileName</span>{error-output.txt}</span> +<span id="cb324-7"><a href="#cb324-7" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputDir</span>{output-directory}</span> +<span id="cb324-8"><a href="#cb324-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionCacheDir</span>{output-directory/cache-directory}</span> +<span id="cb324-9"><a href="#cb324-9" aria-hidden="true"></a><span class="fu">\markdownOptionFinalizeCachetrue</span></span> +<span id="cb324-10"><a href="#cb324-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{output-directory/cache-directory/frozen-cache.tex}</span> +<span id="cb324-11"><a href="#cb324-11" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb324-12"><a href="#cb324-12" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb324-13"><a href="#cb324-13" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb324-14"><a href="#cb324-14" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb325"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb325-1"><a href="#cb325-1" aria-hidden="true"></a><span class="ex">luatex</span> --output-directory output-directory document.tex</span></code></pre></div> <p>A text document named <code>temporary-input.md</code> should be produced in the folder named <code>output-directory</code> and contain the following text:</p> <blockquote> <p>Hello *world*!</p> </blockquote> <p>A folder named <code>output-directory/cache-directory</code> should also be produced and contain fragments of the converted markdown document. LuaTeX does not need other temporary files to perform the conversion from markdown to <span class="tex">T<sub>e</sub>X</span>. To produce the remaining temporary files, invoke pdfTeX from the terminal:</p> -<div class="sourceCode" id="cb317"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb317-1"><a href="#cb317-1" aria-hidden="true"></a><span class="ex">pdftex</span> --output-directory output-directory --shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb326"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb326-1"><a href="#cb326-1" aria-hidden="true"></a><span class="ex">pdftex</span> --output-directory output-directory --shell-escape document.tex</span></code></pre></div> <p>Text documents named <code>helper-script.lua</code>, and <code>temporary-output.md</code> should be produced in the folder named <code>output-directory</code>. The document named <code>helper-script.lua</code> will contain Lua code that was executed to convert markdown to plain <span class="tex">T<sub>e</sub>X</span>. The document named <code>temporary-output.tex</code> will contain the input markdown document converted to <span class="tex">T<sub>e</sub>X</span>.</p> <p>No document named <code>error-output.txt</code> should be produced in the folder named <code>output-directory</code>. This document would only be produced if an error had occured while executing the Lua code. If this happens, please <a href="https://github.com/witiko/markdown/issues">file a bug</a>.</p> -<h4 data-number="2.2.2.3" id="package-documentation"><span class="header-section-number">2.2.2.3</span> Package Documentation</h4> +<h4 data-number="2.2.2.4" id="package-documentation"><span class="header-section-number">2.2.2.4</span> Package Documentation</h4> <p>The <code>\markdownOptionStripPercentSigns</code> macro controls whether a percent sign (<code>%</code>) at the beginning of a line will be discarded when reading Markdown input from a <span class="tex">T<sub>e</sub>X</span> document. This enables the use of markdown when writing <span class="tex">T<sub>e</sub>X</span> package documentation using the <a href="https://ctan.org/pkg/doc" title="doc – Format LaTeX documentation">Doc <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> package</a> by Frank Mittelbach. The recognized values of the macro are <code>true</code> (discard) and <code>false</code> (retain). It defaults to <code>false</code>.</p> <p>Using a text editor, create a text document named <code>document.dtx</code> with the following content:</p> -<div class="sourceCode" id="cb318"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb318-1"><a href="#cb318-1" aria-hidden="true"></a><span class="co">% \iffalse</span></span> -<span id="cb318-2"><a href="#cb318-2" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">ltxdoc</span>}</span> -<span id="cb318-3"><a href="#cb318-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripPercentSigns]{<span class="ex">markdown</span>}</span> -<span id="cb318-4"><a href="#cb318-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb318-5"><a href="#cb318-5" aria-hidden="true"></a><span class="fu">\DocInput</span>{document.dtx}</span> -<span id="cb318-6"><a href="#cb318-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span> -<span id="cb318-7"><a href="#cb318-7" aria-hidden="true"></a><span class="co">% \fi</span></span> -<span id="cb318-8"><a href="#cb318-8" aria-hidden="true"></a><span class="co">%</span></span> -<span id="cb318-9"><a href="#cb318-9" aria-hidden="true"></a><span class="co">% \begin{markdown}</span></span> -<span id="cb318-10"><a href="#cb318-10" aria-hidden="true"></a><span class="co">% Hello *world*!</span></span> -<span id="cb318-11"><a href="#cb318-11" aria-hidden="true"></a><span class="co">% \end{markdown}</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb319"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb319-1"><a href="#cb319-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.dtx</span></code></pre></div> +<div class="sourceCode" id="cb327"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb327-1"><a href="#cb327-1" aria-hidden="true"></a><span class="co">% \iffalse</span></span> +<span id="cb327-2"><a href="#cb327-2" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">ltxdoc</span>}</span> +<span id="cb327-3"><a href="#cb327-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripPercentSigns]{<span class="ex">markdown</span>}</span> +<span id="cb327-4"><a href="#cb327-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb327-5"><a href="#cb327-5" aria-hidden="true"></a><span class="fu">\DocInput</span>{document.dtx}</span> +<span id="cb327-6"><a href="#cb327-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span> +<span id="cb327-7"><a href="#cb327-7" aria-hidden="true"></a><span class="co">% \fi</span></span> +<span id="cb327-8"><a href="#cb327-8" aria-hidden="true"></a><span class="co">%</span></span> +<span id="cb327-9"><a href="#cb327-9" aria-hidden="true"></a><span class="co">% \begin{markdown}</span></span> +<span id="cb327-10"><a href="#cb327-10" aria-hidden="true"></a><span class="co">% Hello *world*!</span></span> +<span id="cb327-11"><a href="#cb327-11" aria-hidden="true"></a><span class="co">% \end{markdown}</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb328"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb328-1"><a href="#cb328-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.dtx</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> <h3 data-number="2.2.3" id="latex-1"><span class="header-section-number">2.2.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> <p><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> options allow us to disable the redefinition of the default renderer prototypes from plain <span class="tex">T<sub>e</sub>X</span>, load user-contributed themes, and invoke user-defined setup snippets.</p> -<h4 data-number="2.2.3.1" id="no-default-token-renderer-prototypes"><span class="header-section-number">2.2.3.1</span> No default token renderer prototypes</h4> -<p>Default token renderer prototypes require <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> packages that may clash with other packages used in a document. Additionally, if we redefine token renderers and renderer prototypes ourselves, the default definitions will bring no benefit to us. Using the <code>plain</code> package option, we can keep the default definitions from the plain <span class="tex">T<sub>e</sub>X</span> implementation (see Section ) and prevent the soft <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> prerequisites in Section from being loaded:</p> -<div class="sourceCode" id="cb320"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb320-1"><a href="#cb320-1" aria-hidden="true"></a><span class="bu">\usepackage</span>[plain]{<span class="ex">markdown</span>}</span></code></pre></div> -<h4 data-number="2.2.3.2" id="latex-themes"><span class="header-section-number">2.2.3.2</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes</h4> +<h4 data-number="2.2.3.1" id="setting-lua-and-plain-tex-options-from-latex"><span class="header-section-number">2.2.3.1</span> Setting Lua and plain <span class="tex">T<sub>e</sub>X</span> options from <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h4> +<p>As a rule of thumb, we can set all Lua options directly from <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>. For example, to set the <strong><code>taskLists</code></strong> Lua option to <code>true</code>, we would include the following code in our <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document:</p> +<div class="sourceCode" id="cb329"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb329-1"><a href="#cb329-1" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb329-2"><a href="#cb329-2" aria-hidden="true"></a> taskLists = true,</span> +<span id="cb329-3"><a href="#cb329-3" aria-hidden="true"></a>}</span></code></pre></div> +<p>We can also set all plain <span class="tex">T<sub>e</sub>X</span> options directly from <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>. For example, to set the <code>\markdownOptionHelperScriptFileName</code> plain <span class="tex">T<sub>e</sub>X</span> option to <code>helper-script.lua</code>, we would inclde the following code in our <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document:</p> +<div class="sourceCode" id="cb330"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb330-1"><a href="#cb330-1" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb330-2"><a href="#cb330-2" aria-hidden="true"></a> helperScriptFileName = helper-script.lua,</span> +<span id="cb330-3"><a href="#cb330-3" aria-hidden="true"></a>}</span></code></pre></div> +<h4 data-number="2.2.3.2" id="no-default-token-renderer-prototypes"><span class="header-section-number">2.2.3.2</span> No default token renderer prototypes</h4> +<p>Default token renderer prototypes require <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> packages that may clash with other packages used in a document. Additionally, if we redefine token renderers and renderer prototypes ourselves, the default definitions will bring no benefit to us. Using the <code>plain</code> package option, we can keep the default definitions from the plain <span class="tex">T<sub>e</sub>X</span> implementation and prevent the soft <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> prerequisites from being loaded:</p> +<div class="sourceCode" id="cb331"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb331-1"><a href="#cb331-1" aria-hidden="true"></a><span class="bu">\usepackage</span>[plain]{<span class="ex">markdown</span>}</span></code></pre></div> +<h4 data-number="2.2.3.3" id="latex-themes"><span class="header-section-number">2.2.3.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes</h4> <p>User-contributed <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes for the Markdown package provide a domain-specific interpretation of some Markdown tokens. Similarly to <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> packages, themes allow the authors to achieve a specific look and other high-level goals without low-level programming.</p> <p>For example, to load themes named <code>witiko/beamer/MU</code> and <code>witiko/dot</code>, you would use the following code in the preamble of your document:</p> -<div class="sourceCode" id="cb321"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb321-1"><a href="#cb321-1" aria-hidden="true"></a><span class="bu">\usepackage</span>[</span> -<span id="cb321-2"><a href="#cb321-2" aria-hidden="true"></a> theme = witiko/beamer/MU,</span> -<span id="cb321-3"><a href="#cb321-3" aria-hidden="true"></a> theme = witiko/dot,</span> -<span id="cb321-4"><a href="#cb321-4" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span></code></pre></div> +<div class="sourceCode" id="cb332"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb332-1"><a href="#cb332-1" aria-hidden="true"></a><span class="bu">\usepackage</span>[</span> +<span id="cb332-2"><a href="#cb332-2" aria-hidden="true"></a> theme = witiko/beamer/MU,</span> +<span id="cb332-3"><a href="#cb332-3" aria-hidden="true"></a> theme = witiko/dot,</span> +<span id="cb332-4"><a href="#cb332-4" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span></code></pre></div> <p>Due to limitations of <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>, themes may not be loaded after the beginning of a <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document.</p> <p>Example themes provided with the Markdown package include:</p> <dl> @@ -3837,44 +3921,44 @@ Thomas,Edison,1847</code></pre> <dd><p>A theme that typesets fenced code blocks with the <code>dot …</code> infostring as images of directed graphs rendered by the Graphviz tools. The right tail of the infostring is used as the image title. The theme requires a Unix-like operating system with GNU Diffutils and Graphviz installed. The theme also requires shell access unless the plain <span class="tex">T<sub>e</sub>X</span> option is enabled.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-31"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-32"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb322"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb322-1"><a href="#cb322-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb322-2"><a href="#cb322-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/dot]{<span class="ex">markdown</span>}</span> -<span id="cb322-3"><a href="#cb322-3" aria-hidden="true"></a><span class="fu">\setkeys</span>{Gin}{</span> -<span id="cb322-4"><a href="#cb322-4" aria-hidden="true"></a> width=<span class="fu">\columnwidth</span>,</span> -<span id="cb322-5"><a href="#cb322-5" aria-hidden="true"></a> height=0.65<span class="fu">\paperheight</span>,</span> -<span id="cb322-6"><a href="#cb322-6" aria-hidden="true"></a> keepaspectratio}</span> -<span id="cb322-7"><a href="#cb322-7" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb322-8"><a href="#cb322-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb322-9"><a href="#cb322-9" aria-hidden="true"></a>``` dot Various formats of mathemathical formulae</span> -<span id="cb322-10"><a href="#cb322-10" aria-hidden="true"></a>digraph tree {</span> -<span id="cb322-11"><a href="#cb322-11" aria-hidden="true"></a> margin = 0;</span> -<span id="cb322-12"><a href="#cb322-12" aria-hidden="true"></a> rankdir = "LR";</span> -<span id="cb322-13"><a href="#cb322-13" aria-hidden="true"></a></span> -<span id="cb322-14"><a href="#cb322-14" aria-hidden="true"></a> latex -> pmml;</span> -<span id="cb322-15"><a href="#cb322-15" aria-hidden="true"></a> latex -> cmml;</span> -<span id="cb322-16"><a href="#cb322-16" aria-hidden="true"></a> pmml -> slt;</span> -<span id="cb322-17"><a href="#cb322-17" aria-hidden="true"></a> cmml -> opt;</span> -<span id="cb322-18"><a href="#cb322-18" aria-hidden="true"></a> cmml -> prefix;</span> -<span id="cb322-19"><a href="#cb322-19" aria-hidden="true"></a> cmml -> infix;</span> -<span id="cb322-20"><a href="#cb322-20" aria-hidden="true"></a> pmml -> mterms [style=dashed];</span> -<span id="cb322-21"><a href="#cb322-21" aria-hidden="true"></a> cmml -> mterms;</span> -<span id="cb322-22"><a href="#cb322-22" aria-hidden="true"></a></span> -<span id="cb322-23"><a href="#cb322-23" aria-hidden="true"></a> latex [label = "LaTeX"];</span> -<span id="cb322-24"><a href="#cb322-24" aria-hidden="true"></a> pmml [label = "Presentation MathML"];</span> -<span id="cb322-25"><a href="#cb322-25" aria-hidden="true"></a> cmml [label = "Content MathML"];</span> -<span id="cb322-26"><a href="#cb322-26" aria-hidden="true"></a> slt [label = "Symbol Layout Tree"];</span> -<span id="cb322-27"><a href="#cb322-27" aria-hidden="true"></a> opt [label = "Operator Tree"];</span> -<span id="cb322-28"><a href="#cb322-28" aria-hidden="true"></a> prefix [label = "Prefix"];</span> -<span id="cb322-29"><a href="#cb322-29" aria-hidden="true"></a> infix [label = "Infix"];</span> -<span id="cb322-30"><a href="#cb322-30" aria-hidden="true"></a> mterms [label = "M-Terms"];</span> -<span id="cb322-31"><a href="#cb322-31" aria-hidden="true"></a>}</span> -<span id="cb322-32"><a href="#cb322-32" aria-hidden="true"></a>```</span> -<span id="cb322-33"><a href="#cb322-33" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb322-34"><a href="#cb322-34" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb323"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb323-1"><a href="#cb323-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb333"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb333-1"><a href="#cb333-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb333-2"><a href="#cb333-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/dot]{<span class="ex">markdown</span>}</span> +<span id="cb333-3"><a href="#cb333-3" aria-hidden="true"></a><span class="fu">\setkeys</span>{Gin}{</span> +<span id="cb333-4"><a href="#cb333-4" aria-hidden="true"></a> width=<span class="fu">\columnwidth</span>,</span> +<span id="cb333-5"><a href="#cb333-5" aria-hidden="true"></a> height=0.65<span class="fu">\paperheight</span>,</span> +<span id="cb333-6"><a href="#cb333-6" aria-hidden="true"></a> keepaspectratio}</span> +<span id="cb333-7"><a href="#cb333-7" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb333-8"><a href="#cb333-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb333-9"><a href="#cb333-9" aria-hidden="true"></a>``` dot Various formats of mathemathical formulae</span> +<span id="cb333-10"><a href="#cb333-10" aria-hidden="true"></a>digraph tree {</span> +<span id="cb333-11"><a href="#cb333-11" aria-hidden="true"></a> margin = 0;</span> +<span id="cb333-12"><a href="#cb333-12" aria-hidden="true"></a> rankdir = "LR";</span> +<span id="cb333-13"><a href="#cb333-13" aria-hidden="true"></a></span> +<span id="cb333-14"><a href="#cb333-14" aria-hidden="true"></a> latex -> pmml;</span> +<span id="cb333-15"><a href="#cb333-15" aria-hidden="true"></a> latex -> cmml;</span> +<span id="cb333-16"><a href="#cb333-16" aria-hidden="true"></a> pmml -> slt;</span> +<span id="cb333-17"><a href="#cb333-17" aria-hidden="true"></a> cmml -> opt;</span> +<span id="cb333-18"><a href="#cb333-18" aria-hidden="true"></a> cmml -> prefix;</span> +<span id="cb333-19"><a href="#cb333-19" aria-hidden="true"></a> cmml -> infix;</span> +<span id="cb333-20"><a href="#cb333-20" aria-hidden="true"></a> pmml -> mterms [style=dashed];</span> +<span id="cb333-21"><a href="#cb333-21" aria-hidden="true"></a> cmml -> mterms;</span> +<span id="cb333-22"><a href="#cb333-22" aria-hidden="true"></a></span> +<span id="cb333-23"><a href="#cb333-23" aria-hidden="true"></a> latex [label = "LaTeX"];</span> +<span id="cb333-24"><a href="#cb333-24" aria-hidden="true"></a> pmml [label = "Presentation MathML"];</span> +<span id="cb333-25"><a href="#cb333-25" aria-hidden="true"></a> cmml [label = "Content MathML"];</span> +<span id="cb333-26"><a href="#cb333-26" aria-hidden="true"></a> slt [label = "Symbol Layout Tree"];</span> +<span id="cb333-27"><a href="#cb333-27" aria-hidden="true"></a> opt [label = "Operator Tree"];</span> +<span id="cb333-28"><a href="#cb333-28" aria-hidden="true"></a> prefix [label = "Prefix"];</span> +<span id="cb333-29"><a href="#cb333-29" aria-hidden="true"></a> infix [label = "Infix"];</span> +<span id="cb333-30"><a href="#cb333-30" aria-hidden="true"></a> mterms [label = "M-Terms"];</span> +<span id="cb333-31"><a href="#cb333-31" aria-hidden="true"></a>}</span> +<span id="cb333-32"><a href="#cb333-32" aria-hidden="true"></a>```</span> +<span id="cb333-33"><a href="#cb333-33" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb333-34"><a href="#cb333-34" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb334"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb334-1"><a href="#cb334-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain a drawing of a directed graph similar to Figure 1 from the following conference article:</p> <blockquote> <p>NOVOTNÝ, Vít, Petr SOJKA, Michal ŠTEFÁNIK and Dávid LUPTÁK. Three is Better than One: Ensembling Math Information Retrieval Systems. <em>CEUR Workshop Proceedings</em>. Thessaloniki, Greece: M. Jeusfeld c/o Redaktion Sun SITE, Informatik V, RWTH Aachen., 2020, vol. 2020, No 2696, p. 1-30. ISSN 1613-0073. <a href="http://ceur-ws.org/Vol-2696/paper_235.pdf" class="uri">http://ceur-ws.org/Vol-2696/paper_235.pdf</a></p> @@ -3884,18 +3968,18 @@ Thomas,Edison,1847</code></pre> <dd><p>A theme that adds support for downloading images whose URL has the http or https protocol. The theme requires the <strong><code>catchfile</code></strong> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> package and a Unix-like operating system with GNU Coreutils <code>md5sum</code> and either GNU Wget or cURL installed. The theme also requires shell access unless the plain <span class="tex">T<sub>e</sub>X</span> option is enabled.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-32"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-33"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb324"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb324-1"><a href="#cb324-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb324-2"><a href="#cb324-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/graphicx/http]{<span class="ex">markdown</span>}</span> -<span id="cb324-3"><a href="#cb324-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb324-4"><a href="#cb324-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb324-5"><a href="#cb324-5" aria-hidden="true"></a>![img](https://github.com/witiko/markdown/raw/main/markdown.png</span> -<span id="cb324-6"><a href="#cb324-6" aria-hidden="true"></a> "The banner of the Markdown package")</span> -<span id="cb324-7"><a href="#cb324-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb324-8"><a href="#cb324-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb335"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb335-1"><a href="#cb335-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb335-2"><a href="#cb335-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/graphicx/http]{<span class="ex">markdown</span>}</span> +<span id="cb335-3"><a href="#cb335-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb335-4"><a href="#cb335-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb335-5"><a href="#cb335-5" aria-hidden="true"></a>![img](https://github.com/witiko/markdown/raw/main/markdown.png</span> +<span id="cb335-6"><a href="#cb335-6" aria-hidden="true"></a> "The banner of the Markdown package")</span> +<span id="cb335-7"><a href="#cb335-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb335-8"><a href="#cb335-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb325"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb325-1"><a href="#cb325-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb336"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb336-1"><a href="#cb336-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following image:</p> <blockquote> <figure> @@ -3907,71 +3991,71 @@ Thomas,Edison,1847</code></pre> <dd><p>A theme that makes tilde (<code>~</code>) always typeset the non-breaking space even when the <strong><code>hybrid</code></strong> Lua option is <code>false</code>.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-33"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-34"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb326"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb326-1"><a href="#cb326-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb326-2"><a href="#cb326-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/tilde]{<span class="ex">markdown</span>}</span> -<span id="cb326-3"><a href="#cb326-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb326-4"><a href="#cb326-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb326-5"><a href="#cb326-5" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb326-6"><a href="#cb326-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb326-7"><a href="#cb326-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb337"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb337-1"><a href="#cb337-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb337-2"><a href="#cb337-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/tilde]{<span class="ex">markdown</span>}</span> +<span id="cb337-3"><a href="#cb337-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb337-4"><a href="#cb337-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb337-5"><a href="#cb337-5" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb337-6"><a href="#cb337-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb337-7"><a href="#cb337-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb327"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb327-1"><a href="#cb327-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb338"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb338-1"><a href="#cb338-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, where the middot (<code>·</code>) denotes a non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> </blockquote> -<h4 data-number="2.2.3.3" id="latex-setup-snippets"><span class="header-section-number">2.2.3.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> setup snippets</h4> +<h4 data-number="2.2.3.4" id="latex-setup-snippets"><span class="header-section-number">2.2.3.4</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> setup snippets</h4> <p>User-contributed <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes provide global control over high-level goals. However, it is often desirable to change only some local aspects of a document. <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> setup snippets provide syntactic sugar for defining and invoking various options locally.</p> <p>Here is how we can use setup snippets to store options and invoke them later:</p> -<div class="sourceCode" id="cb328"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb328-1"><a href="#cb328-1" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</span> -<span id="cb328-2"><a href="#cb328-2" aria-hidden="true"></a> renderers = {</span> -<span id="cb328-3"><a href="#cb328-3" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb328-4"><a href="#cb328-4" aria-hidden="true"></a> <span class="fu">\item</span>[<span class="fu">\romannumeral</span>#1<span class="fu">\relax</span>.]<span class="co">%</span></span> -<span id="cb328-5"><a href="#cb328-5" aria-hidden="true"></a> },</span> -<span id="cb328-6"><a href="#cb328-6" aria-hidden="true"></a> },</span> -<span id="cb328-7"><a href="#cb328-7" aria-hidden="true"></a>}</span> -<span id="cb328-8"><a href="#cb328-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb328-9"><a href="#cb328-9" aria-hidden="true"></a></span> -<span id="cb328-10"><a href="#cb328-10" aria-hidden="true"></a>The following ordered list will be preceded by arabic numerals:</span> -<span id="cb328-11"><a href="#cb328-11" aria-hidden="true"></a></span> -<span id="cb328-12"><a href="#cb328-12" aria-hidden="true"></a>1. wahid</span> -<span id="cb328-13"><a href="#cb328-13" aria-hidden="true"></a>2. aithnayn</span> -<span id="cb328-14"><a href="#cb328-14" aria-hidden="true"></a></span> -<span id="cb328-15"><a href="#cb328-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb328-16"><a href="#cb328-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{snippet=romanNumerals}</span> -<span id="cb328-17"><a href="#cb328-17" aria-hidden="true"></a></span> -<span id="cb328-18"><a href="#cb328-18" aria-hidden="true"></a>The following ordered list will be preceded by roman numerals:</span> -<span id="cb328-19"><a href="#cb328-19" aria-hidden="true"></a></span> -<span id="cb328-20"><a href="#cb328-20" aria-hidden="true"></a>3. tres</span> -<span id="cb328-21"><a href="#cb328-21" aria-hidden="true"></a>4. quattuor</span> -<span id="cb328-22"><a href="#cb328-22" aria-hidden="true"></a></span> -<span id="cb328-23"><a href="#cb328-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span></code></pre></div> +<div class="sourceCode" id="cb339"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb339-1"><a href="#cb339-1" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</span> +<span id="cb339-2"><a href="#cb339-2" aria-hidden="true"></a> renderers = {</span> +<span id="cb339-3"><a href="#cb339-3" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> +<span id="cb339-4"><a href="#cb339-4" aria-hidden="true"></a> <span class="fu">\item</span>[<span class="fu">\romannumeral</span>#1<span class="fu">\relax</span>.]<span class="co">%</span></span> +<span id="cb339-5"><a href="#cb339-5" aria-hidden="true"></a> },</span> +<span id="cb339-6"><a href="#cb339-6" aria-hidden="true"></a> },</span> +<span id="cb339-7"><a href="#cb339-7" aria-hidden="true"></a>}</span> +<span id="cb339-8"><a href="#cb339-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb339-9"><a href="#cb339-9" aria-hidden="true"></a></span> +<span id="cb339-10"><a href="#cb339-10" aria-hidden="true"></a>The following ordered list will be preceded by arabic numerals:</span> +<span id="cb339-11"><a href="#cb339-11" aria-hidden="true"></a></span> +<span id="cb339-12"><a href="#cb339-12" aria-hidden="true"></a>1. wahid</span> +<span id="cb339-13"><a href="#cb339-13" aria-hidden="true"></a>2. aithnayn</span> +<span id="cb339-14"><a href="#cb339-14" aria-hidden="true"></a></span> +<span id="cb339-15"><a href="#cb339-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb339-16"><a href="#cb339-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{snippet=romanNumerals}</span> +<span id="cb339-17"><a href="#cb339-17" aria-hidden="true"></a></span> +<span id="cb339-18"><a href="#cb339-18" aria-hidden="true"></a>The following ordered list will be preceded by roman numerals:</span> +<span id="cb339-19"><a href="#cb339-19" aria-hidden="true"></a></span> +<span id="cb339-20"><a href="#cb339-20" aria-hidden="true"></a>3. tres</span> +<span id="cb339-21"><a href="#cb339-21" aria-hidden="true"></a>4. quattuor</span> +<span id="cb339-22"><a href="#cb339-22" aria-hidden="true"></a></span> +<span id="cb339-23"><a href="#cb339-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span></code></pre></div> <h2 data-number="2.3" id="markdown-tokens"><span class="header-section-number">2.3</span> Markdown Tokens</h2> <p>A key feature of the Markdown package is the support for manipulating markdown tokens, such as headings, emphasized text, links, and lists, in <span class="tex">T<sub>e</sub>X</span>. Instead of reducing <span class="tex">T<sub>e</sub>X</span> to a PDF document producer, the Markdown package allows the user to specify how every markdown token should be processed and rendered.</p> <h3 data-number="2.3.1" id="token-renderers"><span class="header-section-number">2.3.1</span> Token Renderers</h3> <p>Token renderers are user-defined <span class="tex">T<sub>e</sub>X</span> macros, which render markdown tokens. In this section, I will describe the individual token renderers.</p> <h4 data-number="2.3.1.1" id="tickbox-renderers"><span class="header-section-number">2.3.1.1</span> Tickbox Renderers</h4> <p>The macros named <code>\markdownRendererTickedBox</code>, <code>\markdownRendererHalfTickedBox</code>, and <code>\markdownRendererUntickedBox</code> represent ticked and unticked boxes, respectively. These macros will either be produced, when the <strong><code>taskLists</code></strong> option is enabled, or when the Ballot Box with X (☒, U+2612), Hourglass (⌛, U+231B) or Ballot Box (☐, U+2610) Unicode characters are encountered in the markdown input, respectively.</p> -<h5 class="unnumbered" data-number="" id="latex-example-34"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-35"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb329"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb329-1"><a href="#cb329-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb329-2"><a href="#cb329-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span> -<span id="cb329-3"><a href="#cb329-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb329-4"><a href="#cb329-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb329-5"><a href="#cb329-5" aria-hidden="true"></a> untickedBox = No,</span> -<span id="cb329-6"><a href="#cb329-6" aria-hidden="true"></a> tickedBox = Yes,</span> -<span id="cb329-7"><a href="#cb329-7" aria-hidden="true"></a> },</span> -<span id="cb329-8"><a href="#cb329-8" aria-hidden="true"></a>}</span> -<span id="cb329-9"><a href="#cb329-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb329-10"><a href="#cb329-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb329-11"><a href="#cb329-11" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb329-12"><a href="#cb329-12" aria-hidden="true"></a>- [x] I can!</span> -<span id="cb329-13"><a href="#cb329-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb329-14"><a href="#cb329-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb340"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb340-1"><a href="#cb340-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb340-2"><a href="#cb340-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span> +<span id="cb340-3"><a href="#cb340-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb340-4"><a href="#cb340-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb340-5"><a href="#cb340-5" aria-hidden="true"></a> untickedBox = No,</span> +<span id="cb340-6"><a href="#cb340-6" aria-hidden="true"></a> tickedBox = Yes,</span> +<span id="cb340-7"><a href="#cb340-7" aria-hidden="true"></a> },</span> +<span id="cb340-8"><a href="#cb340-8" aria-hidden="true"></a>}</span> +<span id="cb340-9"><a href="#cb340-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb340-10"><a href="#cb340-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb340-11"><a href="#cb340-11" aria-hidden="true"></a>- [ ] you can't.</span> +<span id="cb340-12"><a href="#cb340-12" aria-hidden="true"></a>- [x] I can!</span> +<span id="cb340-13"><a href="#cb340-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb340-14"><a href="#cb340-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb330"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb330-1"><a href="#cb330-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb341"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb341-1"><a href="#cb341-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <ul> @@ -3981,18 +4065,18 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-28">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb331"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb331-1"><a href="#cb331-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb331-2"><a href="#cb331-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span> -<span id="cb331-3"><a href="#cb331-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> -<span id="cb331-4"><a href="#cb331-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> -<span id="cb331-5"><a href="#cb331-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb331-6"><a href="#cb331-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb331-7"><a href="#cb331-7" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb331-8"><a href="#cb331-8" aria-hidden="true"></a>- [x] I can!</span> -<span id="cb331-9"><a href="#cb331-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb331-10"><a href="#cb331-10" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb342"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb342-1"><a href="#cb342-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb342-2"><a href="#cb342-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span> +<span id="cb342-3"><a href="#cb342-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> +<span id="cb342-4"><a href="#cb342-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> +<span id="cb342-5"><a href="#cb342-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb342-6"><a href="#cb342-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb342-7"><a href="#cb342-7" aria-hidden="true"></a>- [ ] you can't.</span> +<span id="cb342-8"><a href="#cb342-8" aria-hidden="true"></a>- [x] I can!</span> +<span id="cb342-9"><a href="#cb342-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb342-10"><a href="#cb342-10" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb332"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb332-1"><a href="#cb332-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb343"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb343-1"><a href="#cb343-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <ul> @@ -4004,48 +4088,48 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererInterblockSeparator</code> macro represents a separator between two markdown block elements. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-17">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb333"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb333-1"><a href="#cb333-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb333-2"><a href="#cb333-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb333-3"><a href="#cb333-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb333-4"><a href="#cb333-4" aria-hidden="true"></a> {<span class="fu">\it</span>(The end of a block)}<span class="co">%</span></span> -<span id="cb333-5"><a href="#cb333-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb333-6"><a href="#cb333-6" aria-hidden="true"></a>}</span> -<span id="cb333-7"><a href="#cb333-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb333-8"><a href="#cb333-8" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb333-9"><a href="#cb333-9" aria-hidden="true"></a></span> -<span id="cb333-10"><a href="#cb333-10" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb333-11"><a href="#cb333-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb333-12"><a href="#cb333-12" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb344"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb344-1"><a href="#cb344-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb344-2"><a href="#cb344-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb344-3"><a href="#cb344-3" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb344-4"><a href="#cb344-4" aria-hidden="true"></a> {<span class="fu">\it</span>(The end of a block)}<span class="co">%</span></span> +<span id="cb344-5"><a href="#cb344-5" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb344-6"><a href="#cb344-6" aria-hidden="true"></a>}</span> +<span id="cb344-7"><a href="#cb344-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb344-8"><a href="#cb344-8" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb344-9"><a href="#cb344-9" aria-hidden="true"></a></span> +<span id="cb344-10"><a href="#cb344-10" aria-hidden="true"></a>_Foo_ bar!</span> +<span id="cb344-11"><a href="#cb344-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb344-12"><a href="#cb344-12" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb334"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb334-1"><a href="#cb334-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb345"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb345-1"><a href="#cb345-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(The end of a block)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-35"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-36"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb335"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb335-1"><a href="#cb335-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb335-2"><a href="#cb335-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb335-3"><a href="#cb335-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb335-4"><a href="#cb335-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb335-5"><a href="#cb335-5" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb335-6"><a href="#cb335-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb335-7"><a href="#cb335-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> -<span id="cb335-8"><a href="#cb335-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb335-9"><a href="#cb335-9" aria-hidden="true"></a> },</span> -<span id="cb335-10"><a href="#cb335-10" aria-hidden="true"></a> },</span> -<span id="cb335-11"><a href="#cb335-11" aria-hidden="true"></a>}</span> -<span id="cb335-12"><a href="#cb335-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb335-13"><a href="#cb335-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb335-14"><a href="#cb335-14" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb335-15"><a href="#cb335-15" aria-hidden="true"></a></span> -<span id="cb335-16"><a href="#cb335-16" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb335-17"><a href="#cb335-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb335-18"><a href="#cb335-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb336"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb336-1"><a href="#cb336-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb346"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb346-1"><a href="#cb346-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb346-2"><a href="#cb346-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb346-3"><a href="#cb346-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb346-4"><a href="#cb346-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb346-5"><a href="#cb346-5" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb346-6"><a href="#cb346-6" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb346-7"><a href="#cb346-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> +<span id="cb346-8"><a href="#cb346-8" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb346-9"><a href="#cb346-9" aria-hidden="true"></a> },</span> +<span id="cb346-10"><a href="#cb346-10" aria-hidden="true"></a> },</span> +<span id="cb346-11"><a href="#cb346-11" aria-hidden="true"></a>}</span> +<span id="cb346-12"><a href="#cb346-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb346-13"><a href="#cb346-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb346-14"><a href="#cb346-14" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb346-15"><a href="#cb346-15" aria-hidden="true"></a></span> +<span id="cb346-16"><a href="#cb346-16" aria-hidden="true"></a>_Foo_ bar!</span> +<span id="cb346-17"><a href="#cb346-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb346-18"><a href="#cb346-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb347"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb347-1"><a href="#cb347-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> @@ -4054,21 +4138,21 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-29">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb337"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb337-1"><a href="#cb337-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb337-2"><a href="#cb337-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb337-3"><a href="#cb337-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb337-4"><a href="#cb337-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> -<span id="cb337-5"><a href="#cb337-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb337-6"><a href="#cb337-6" aria-hidden="true"></a>}</span> -<span id="cb337-7"><a href="#cb337-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb337-8"><a href="#cb337-8" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb337-9"><a href="#cb337-9" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb337-10"><a href="#cb337-10" aria-hidden="true"></a></span> -<span id="cb337-11"><a href="#cb337-11" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb337-12"><a href="#cb337-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb337-13"><a href="#cb337-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb348"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb348-1"><a href="#cb348-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb348-2"><a href="#cb348-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb348-3"><a href="#cb348-3" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb348-4"><a href="#cb348-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> +<span id="cb348-5"><a href="#cb348-5" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb348-6"><a href="#cb348-6" aria-hidden="true"></a>}</span> +<span id="cb348-7"><a href="#cb348-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb348-8"><a href="#cb348-8" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb348-9"><a href="#cb348-9" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb348-10"><a href="#cb348-10" aria-hidden="true"></a></span> +<span id="cb348-11"><a href="#cb348-11" aria-hidden="true"></a>_Foo_ bar!</span> +<span id="cb348-12"><a href="#cb348-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb348-13"><a href="#cb348-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb338"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb338-1"><a href="#cb338-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb349"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb349-1"><a href="#cb349-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> @@ -4079,44 +4163,44 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererLineBreak</code> macro represents a forced line break. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-18">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb339"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb339-1"><a href="#cb339-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb339-2"><a href="#cb339-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> -<span id="cb339-3"><a href="#cb339-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb339-4"><a href="#cb339-4" aria-hidden="true"></a> {<span class="fu">\it</span>(A forced linebreak)}<span class="co">%</span></span> -<span id="cb339-5"><a href="#cb339-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb339-6"><a href="#cb339-6" aria-hidden="true"></a>}</span> -<span id="cb339-7"><a href="#cb339-7" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb339-8"><a href="#cb339-8" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb350"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb350-1"><a href="#cb350-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb350-2"><a href="#cb350-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> +<span id="cb350-3"><a href="#cb350-3" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb350-4"><a href="#cb350-4" aria-hidden="true"></a> {<span class="fu">\it</span>(A forced linebreak)}<span class="co">%</span></span> +<span id="cb350-5"><a href="#cb350-5" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb350-6"><a href="#cb350-6" aria-hidden="true"></a>}</span> +<span id="cb350-7"><a href="#cb350-7" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb350-8"><a href="#cb350-8" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Using a text editor, create a text document named <code>example.md</code> with the following content. Note the two spaces at the end of the first line, which specify a hard linebreak. Due to the limitations of the <span class="tex">T<sub>e</sub>X</span> input processor, hard linebreaks would be ignored if we typed them directly into the <code>document.tex</code> document.</p> <pre><code>Hello world! <br/>_Foo_ bar!</code></pre> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb340"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb340-1"><a href="#cb340-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb351"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb351-1"><a href="#cb351-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(A forced linebreak)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-36"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-37"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb341"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb341-1"><a href="#cb341-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb341-2"><a href="#cb341-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb341-3"><a href="#cb341-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb341-4"><a href="#cb341-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb341-5"><a href="#cb341-5" aria-hidden="true"></a> lineBreak = {<span class="co">%</span></span> -<span id="cb341-6"><a href="#cb341-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb341-7"><a href="#cb341-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> -<span id="cb341-8"><a href="#cb341-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb341-9"><a href="#cb341-9" aria-hidden="true"></a> },</span> -<span id="cb341-10"><a href="#cb341-10" aria-hidden="true"></a> },</span> -<span id="cb341-11"><a href="#cb341-11" aria-hidden="true"></a>}</span> -<span id="cb341-12"><a href="#cb341-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb341-13"><a href="#cb341-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb341-14"><a href="#cb341-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb352"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb352-1"><a href="#cb352-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb352-2"><a href="#cb352-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb352-3"><a href="#cb352-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb352-4"><a href="#cb352-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb352-5"><a href="#cb352-5" aria-hidden="true"></a> lineBreak = {<span class="co">%</span></span> +<span id="cb352-6"><a href="#cb352-6" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb352-7"><a href="#cb352-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> +<span id="cb352-8"><a href="#cb352-8" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb352-9"><a href="#cb352-9" aria-hidden="true"></a> },</span> +<span id="cb352-10"><a href="#cb352-10" aria-hidden="true"></a> },</span> +<span id="cb352-11"><a href="#cb352-11" aria-hidden="true"></a>}</span> +<span id="cb352-12"><a href="#cb352-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb352-13"><a href="#cb352-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb352-14"><a href="#cb352-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Using a text editor, create a text document named <code>example.md</code> with the following content. Note the two spaces at the end of the first line, which specify a hard linebreak. Due to the limitations of the <span class="tex">T<sub>e</sub>X</span> input processor, hard linebreaks would be ignored if we typed them directly into the <code>document.tex</code> document.</p> <pre><code>Hello world! <br/>_Foo_ bar!</code></pre> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb342"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb342-1"><a href="#cb342-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb353"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb353-1"><a href="#cb353-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> @@ -4125,19 +4209,19 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-30">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb343"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb343-1"><a href="#cb343-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb343-2"><a href="#cb343-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> -<span id="cb343-3"><a href="#cb343-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb343-4"><a href="#cb343-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> -<span id="cb343-5"><a href="#cb343-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb343-6"><a href="#cb343-6" aria-hidden="true"></a>}</span> -<span id="cb343-7"><a href="#cb343-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb343-8"><a href="#cb343-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb343-9"><a href="#cb343-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb354"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb354-1"><a href="#cb354-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb354-2"><a href="#cb354-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> +<span id="cb354-3"><a href="#cb354-3" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-4"><a href="#cb354-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> +<span id="cb354-5"><a href="#cb354-5" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-6"><a href="#cb354-6" aria-hidden="true"></a>}</span> +<span id="cb354-7"><a href="#cb354-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb354-8"><a href="#cb354-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb354-9"><a href="#cb354-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Using a text editor, create a text document named <code>example.md</code> with the following content. Note the two spaces at the end of the first line, which specify a hard linebreak. Due to the limitations of the <span class="tex">T<sub>e</sub>X</span> input processor, hard linebreaks would be ignored if we typed them directly into the <code>document.tex</code> document.</p> <pre><code>Hello world! <br/>_Foo_ bar!</code></pre> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb344"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb344-1"><a href="#cb344-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb355"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb355-1"><a href="#cb355-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> @@ -4148,51 +4232,51 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererEllipsis</code> macro replaces any occurance of ASCII ellipses in the input text. This macro will only be produced, when the <strong><code>smartEllipses</code></strong> option is enabled. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-19">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb345"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb345-1"><a href="#cb345-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb345-2"><a href="#cb345-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb345-3"><a href="#cb345-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{{<span class="fu">\it</span> SHAZAM}!}</span> -<span id="cb345-4"><a href="#cb345-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb345-5"><a href="#cb345-5" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb345-6"><a href="#cb345-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb345-7"><a href="#cb345-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb356"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb356-1"><a href="#cb356-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb356-2"><a href="#cb356-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> +<span id="cb356-3"><a href="#cb356-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{{<span class="fu">\it</span> SHAZAM}!}</span> +<span id="cb356-4"><a href="#cb356-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb356-5"><a href="#cb356-5" aria-hidden="true"></a>The secret word is ...</span> +<span id="cb356-6"><a href="#cb356-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb356-7"><a href="#cb356-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb346"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb346-1"><a href="#cb346-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb357"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb357-1"><a href="#cb357-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The secret word is <em>SHAZAM</em>!</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-37"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-38"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb347"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb347-1"><a href="#cb347-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb347-2"><a href="#cb347-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> -<span id="cb347-3"><a href="#cb347-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb347-4"><a href="#cb347-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb347-5"><a href="#cb347-5" aria-hidden="true"></a> ellipsis = <span class="fu">\emph</span>{SHAZAM}!,</span> -<span id="cb347-6"><a href="#cb347-6" aria-hidden="true"></a> },</span> -<span id="cb347-7"><a href="#cb347-7" aria-hidden="true"></a>}</span> -<span id="cb347-8"><a href="#cb347-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb347-9"><a href="#cb347-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb347-10"><a href="#cb347-10" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb347-11"><a href="#cb347-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb347-12"><a href="#cb347-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb358"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb358-1"><a href="#cb358-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb358-2"><a href="#cb358-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> +<span id="cb358-3"><a href="#cb358-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb358-4"><a href="#cb358-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb358-5"><a href="#cb358-5" aria-hidden="true"></a> ellipsis = <span class="fu">\emph</span>{SHAZAM}!,</span> +<span id="cb358-6"><a href="#cb358-6" aria-hidden="true"></a> },</span> +<span id="cb358-7"><a href="#cb358-7" aria-hidden="true"></a>}</span> +<span id="cb358-8"><a href="#cb358-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb358-9"><a href="#cb358-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb358-10"><a href="#cb358-10" aria-hidden="true"></a>The secret word is ...</span> +<span id="cb358-11"><a href="#cb358-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb358-12"><a href="#cb358-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb348"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb348-1"><a href="#cb348-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb359"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb359-1"><a href="#cb359-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The secret word is <em>SHAZAM</em>!</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-31">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb349"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb349-1"><a href="#cb349-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb349-2"><a href="#cb349-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb349-3"><a href="#cb349-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{<span class="fu">\emph</span>{SHAZAM}!}</span> -<span id="cb349-4"><a href="#cb349-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb349-5"><a href="#cb349-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb349-6"><a href="#cb349-6" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb349-7"><a href="#cb349-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb349-8"><a href="#cb349-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb360"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb360-1"><a href="#cb360-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb360-2"><a href="#cb360-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> +<span id="cb360-3"><a href="#cb360-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{<span class="fu">\emph</span>{SHAZAM}!}</span> +<span id="cb360-4"><a href="#cb360-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb360-5"><a href="#cb360-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb360-6"><a href="#cb360-6" aria-hidden="true"></a>The secret word is ...</span> +<span id="cb360-7"><a href="#cb360-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb360-8"><a href="#cb360-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb350"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb350-1"><a href="#cb350-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb361"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb361-1"><a href="#cb361-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> @@ -4201,40 +4285,40 @@ Thomas,Edison,1847</code></pre> </blockquote> <h4 data-number="2.3.1.5" id="non-breaking-space-renderer"><span class="header-section-number">2.3.1.5</span> Non-Breaking Space Renderer</h4> <p>The <code>\markdownRendererNbsp</code> macro represents a non-breaking space.</p> -<h5 class="unnumbered" data-number="" id="latex-example-38"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-39"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.bib</code> with the following content:</p> -<div class="sourceCode" id="cb351"><pre class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb351-1"><a href="#cb351-1" aria-hidden="true"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> -<span id="cb351-2"><a href="#cb351-2" aria-hidden="true"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> -<span id="cb351-3"><a href="#cb351-3" aria-hidden="true"></a> <span class="dt">title</span> = "<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>",</span> -<span id="cb351-4"><a href="#cb351-4" aria-hidden="true"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> -<span id="cb351-5"><a href="#cb351-5" aria-hidden="true"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> -<span id="cb351-6"><a href="#cb351-6" aria-hidden="true"></a>}</span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb352"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb352-1"><a href="#cb352-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb352-2"><a href="#cb352-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[</span> -<span id="cb352-3"><a href="#cb352-3" aria-hidden="true"></a> citations,</span> -<span id="cb352-4"><a href="#cb352-4" aria-hidden="true"></a> citationNbsps,</span> -<span id="cb352-5"><a href="#cb352-5" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span> -<span id="cb352-6"><a href="#cb352-6" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb352-7"><a href="#cb352-7" aria-hidden="true"></a> renderers = {</span> -<span id="cb352-8"><a href="#cb352-8" aria-hidden="true"></a> nbsp = {<span class="ss">$</span><span class="sc">\cdot</span><span class="ss">$</span>},</span> -<span id="cb352-9"><a href="#cb352-9" aria-hidden="true"></a> },</span> -<span id="cb352-10"><a href="#cb352-10" aria-hidden="true"></a>}</span> -<span id="cb352-11"><a href="#cb352-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb352-12"><a href="#cb352-12" aria-hidden="true"></a></span> -<span id="cb352-13"><a href="#cb352-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb352-14"><a href="#cb352-14" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> -<span id="cb352-15"><a href="#cb352-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb352-16"><a href="#cb352-16" aria-hidden="true"></a></span> -<span id="cb352-17"><a href="#cb352-17" aria-hidden="true"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span> -<span id="cb352-18"><a href="#cb352-18" aria-hidden="true"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span> -<span id="cb352-19"><a href="#cb352-19" aria-hidden="true"></a></span> -<span id="cb352-20"><a href="#cb352-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb362"><pre class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb362-1"><a href="#cb362-1" aria-hidden="true"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> +<span id="cb362-2"><a href="#cb362-2" aria-hidden="true"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> +<span id="cb362-3"><a href="#cb362-3" aria-hidden="true"></a> <span class="dt">title</span> = "<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>",</span> +<span id="cb362-4"><a href="#cb362-4" aria-hidden="true"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> +<span id="cb362-5"><a href="#cb362-5" aria-hidden="true"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> +<span id="cb362-6"><a href="#cb362-6" aria-hidden="true"></a>}</span></code></pre></div> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb363"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb363-1"><a href="#cb363-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb363-2"><a href="#cb363-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[</span> +<span id="cb363-3"><a href="#cb363-3" aria-hidden="true"></a> citations,</span> +<span id="cb363-4"><a href="#cb363-4" aria-hidden="true"></a> citationNbsps,</span> +<span id="cb363-5"><a href="#cb363-5" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span> +<span id="cb363-6"><a href="#cb363-6" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb363-7"><a href="#cb363-7" aria-hidden="true"></a> renderers = {</span> +<span id="cb363-8"><a href="#cb363-8" aria-hidden="true"></a> nbsp = {<span class="ss">$</span><span class="sc">\cdot</span><span class="ss">$</span>},</span> +<span id="cb363-9"><a href="#cb363-9" aria-hidden="true"></a> },</span> +<span id="cb363-10"><a href="#cb363-10" aria-hidden="true"></a>}</span> +<span id="cb363-11"><a href="#cb363-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb363-12"><a href="#cb363-12" aria-hidden="true"></a></span> +<span id="cb363-13"><a href="#cb363-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb363-14"><a href="#cb363-14" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> +<span id="cb363-15"><a href="#cb363-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb363-16"><a href="#cb363-16" aria-hidden="true"></a></span> +<span id="cb363-17"><a href="#cb363-17" aria-hidden="true"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span> +<span id="cb363-18"><a href="#cb363-18" aria-hidden="true"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span> +<span id="cb363-19"><a href="#cb363-19" aria-hidden="true"></a></span> +<span id="cb363-20"><a href="#cb363-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX and BibTeX from the terminal:</p> -<div class="sourceCode" id="cb353"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb353-1"><a href="#cb353-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb353-2"><a href="#cb353-2" aria-hidden="true"></a><span class="ex">bibtex</span> document.aux</span> -<span id="cb353-3"><a href="#cb353-3" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb353-4"><a href="#cb353-4" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb364"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb364-1"><a href="#cb364-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb364-2"><a href="#cb364-2" aria-hidden="true"></a><span class="ex">bibtex</span> document.aux</span> +<span id="cb364-3"><a href="#cb364-3" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb364-4"><a href="#cb364-4" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The TeXbook [1, p.·123·and·130] is good.</p> @@ -4258,49 +4342,49 @@ Thomas,Edison,1847</code></pre> </ul> <h5 class="unnumbered" data-number="" id="plain-tex-example-20">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content. We will make the tilde behave as if it were written in <span class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking space.</p> -<div class="sourceCode" id="cb354"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb354-1"><a href="#cb354-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb354-2"><a href="#cb354-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> -<span id="cb354-3"><a href="#cb354-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb354-4"><a href="#cb354-4" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb354-5"><a href="#cb354-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb354-6"><a href="#cb354-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb355"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb355-1"><a href="#cb355-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb365"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb365-1"><a href="#cb365-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb365-2"><a href="#cb365-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> +<span id="cb365-3"><a href="#cb365-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb365-4"><a href="#cb365-4" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb365-5"><a href="#cb365-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb365-6"><a href="#cb365-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb366"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb366-1"><a href="#cb366-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, where the middot (<code>·</code>) denotes a non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-39"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-40"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content. We will make the tilde behave as if it were written in <span class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking space.</p> -<div class="sourceCode" id="cb356"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb356-1"><a href="#cb356-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb356-2"><a href="#cb356-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb356-3"><a href="#cb356-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb356-4"><a href="#cb356-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb356-5"><a href="#cb356-5" aria-hidden="true"></a> tilde = ~,</span> -<span id="cb356-6"><a href="#cb356-6" aria-hidden="true"></a> },</span> -<span id="cb356-7"><a href="#cb356-7" aria-hidden="true"></a>}</span> -<span id="cb356-8"><a href="#cb356-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb356-9"><a href="#cb356-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb356-10"><a href="#cb356-10" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb356-11"><a href="#cb356-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb356-12"><a href="#cb356-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb357"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb357-1"><a href="#cb357-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb367"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb367-1"><a href="#cb367-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb367-2"><a href="#cb367-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb367-3"><a href="#cb367-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb367-4"><a href="#cb367-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb367-5"><a href="#cb367-5" aria-hidden="true"></a> tilde = ~,</span> +<span id="cb367-6"><a href="#cb367-6" aria-hidden="true"></a> },</span> +<span id="cb367-7"><a href="#cb367-7" aria-hidden="true"></a>}</span> +<span id="cb367-8"><a href="#cb367-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb367-9"><a href="#cb367-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb367-10"><a href="#cb367-10" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb367-11"><a href="#cb367-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb367-12"><a href="#cb367-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb368"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb368-1"><a href="#cb368-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, where the middot (<code>·</code>) denotes a non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-32">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content. We will make the tilde behave as if it were written in <span class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking space.</p> -<div class="sourceCode" id="cb358"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb358-1"><a href="#cb358-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb358-2"><a href="#cb358-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> -<span id="cb358-3"><a href="#cb358-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb358-4"><a href="#cb358-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb358-5"><a href="#cb358-5" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb358-6"><a href="#cb358-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb358-7"><a href="#cb358-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb359"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb359-1"><a href="#cb359-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb369"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb369-1"><a href="#cb369-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb369-2"><a href="#cb369-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> +<span id="cb369-3"><a href="#cb369-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb369-4"><a href="#cb369-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb369-5"><a href="#cb369-5" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb369-6"><a href="#cb369-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb369-7"><a href="#cb369-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb370"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb370-1"><a href="#cb370-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, where the middot (<code>·</code>) denotes a non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> @@ -4309,55 +4393,55 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererCodeSpan</code> macro represents inlined code span in the input text. It receives a single argument that corresponds to the inlined code span.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-21">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb360"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb360-1"><a href="#cb360-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb360-2"><a href="#cb360-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb360-3"><a href="#cb360-3" aria-hidden="true"></a></span> -<span id="cb360-4"><a href="#cb360-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> -<span id="cb360-5"><a href="#cb360-5" aria-hidden="true"></a></span> -<span id="cb360-6"><a href="#cb360-6" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb360-7"><a href="#cb360-7" aria-hidden="true"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> -<span id="cb360-8"><a href="#cb360-8" aria-hidden="true"></a></span> -<span id="cb360-9"><a href="#cb360-9" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb360-10"><a href="#cb360-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb360-11"><a href="#cb360-11" aria-hidden="true"></a></span> -<span id="cb360-12"><a href="#cb360-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb360-13"><a href="#cb360-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb360-14"><a href="#cb360-14" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb360-15"><a href="#cb360-15" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb360-16"><a href="#cb360-16" aria-hidden="true"></a></span> -<span id="cb360-17"><a href="#cb360-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb361"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb361-1"><a href="#cb361-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb371"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb371-1"><a href="#cb371-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb371-2"><a href="#cb371-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb371-3"><a href="#cb371-3" aria-hidden="true"></a></span> +<span id="cb371-4"><a href="#cb371-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> +<span id="cb371-5"><a href="#cb371-5" aria-hidden="true"></a></span> +<span id="cb371-6"><a href="#cb371-6" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb371-7"><a href="#cb371-7" aria-hidden="true"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> +<span id="cb371-8"><a href="#cb371-8" aria-hidden="true"></a></span> +<span id="cb371-9"><a href="#cb371-9" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb371-10"><a href="#cb371-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb371-11"><a href="#cb371-11" aria-hidden="true"></a></span> +<span id="cb371-12"><a href="#cb371-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb371-13"><a href="#cb371-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb371-14"><a href="#cb371-14" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb371-15"><a href="#cb371-15" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb371-16"><a href="#cb371-16" aria-hidden="true"></a></span> +<span id="cb371-17"><a href="#cb371-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb372"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb372-1"><a href="#cb372-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ *equals* $i$.</p> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-40"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-41"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb362"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb362-1"><a href="#cb362-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb362-2"><a href="#cb362-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> -<span id="cb362-3"><a href="#cb362-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb362-4"><a href="#cb362-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb362-5"><a href="#cb362-5" aria-hidden="true"></a> codeSpan = {#1},</span> -<span id="cb362-6"><a href="#cb362-6" aria-hidden="true"></a> },</span> -<span id="cb362-7"><a href="#cb362-7" aria-hidden="true"></a>}</span> -<span id="cb362-8"><a href="#cb362-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb362-9"><a href="#cb362-9" aria-hidden="true"></a></span> -<span id="cb362-10"><a href="#cb362-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb362-11"><a href="#cb362-11" aria-hidden="true"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> -<span id="cb362-12"><a href="#cb362-12" aria-hidden="true"></a></span> -<span id="cb362-13"><a href="#cb362-13" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb362-14"><a href="#cb362-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb362-15"><a href="#cb362-15" aria-hidden="true"></a></span> -<span id="cb362-16"><a href="#cb362-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> -<span id="cb362-17"><a href="#cb362-17" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb362-18"><a href="#cb362-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb362-19"><a href="#cb362-19" aria-hidden="true"></a></span> -<span id="cb362-20"><a href="#cb362-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb363"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb363-1"><a href="#cb363-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb373"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb373-1"><a href="#cb373-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb373-2"><a href="#cb373-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> +<span id="cb373-3"><a href="#cb373-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb373-4"><a href="#cb373-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb373-5"><a href="#cb373-5" aria-hidden="true"></a> codeSpan = {#1},</span> +<span id="cb373-6"><a href="#cb373-6" aria-hidden="true"></a> },</span> +<span id="cb373-7"><a href="#cb373-7" aria-hidden="true"></a>}</span> +<span id="cb373-8"><a href="#cb373-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb373-9"><a href="#cb373-9" aria-hidden="true"></a></span> +<span id="cb373-10"><a href="#cb373-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb373-11"><a href="#cb373-11" aria-hidden="true"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> +<span id="cb373-12"><a href="#cb373-12" aria-hidden="true"></a></span> +<span id="cb373-13"><a href="#cb373-13" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb373-14"><a href="#cb373-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb373-15"><a href="#cb373-15" aria-hidden="true"></a></span> +<span id="cb373-16"><a href="#cb373-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> +<span id="cb373-17"><a href="#cb373-17" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb373-18"><a href="#cb373-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb373-19"><a href="#cb373-19" aria-hidden="true"></a></span> +<span id="cb373-20"><a href="#cb373-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb374"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb374-1"><a href="#cb374-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ *equals* $i$.</p> @@ -4366,24 +4450,24 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-33">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb364"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb364-1"><a href="#cb364-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb364-2"><a href="#cb364-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> -<span id="cb364-3"><a href="#cb364-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb364-4"><a href="#cb364-4" aria-hidden="true"></a></span> -<span id="cb364-5"><a href="#cb364-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb364-6"><a href="#cb364-6" aria-hidden="true"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> -<span id="cb364-7"><a href="#cb364-7" aria-hidden="true"></a></span> -<span id="cb364-8"><a href="#cb364-8" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb364-9"><a href="#cb364-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb364-10"><a href="#cb364-10" aria-hidden="true"></a></span> -<span id="cb364-11"><a href="#cb364-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb364-12"><a href="#cb364-12" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb364-13"><a href="#cb364-13" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb364-14"><a href="#cb364-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb364-15"><a href="#cb364-15" aria-hidden="true"></a></span> -<span id="cb364-16"><a href="#cb364-16" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb365"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb365-1"><a href="#cb365-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb375"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb375-1"><a href="#cb375-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb375-2"><a href="#cb375-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> +<span id="cb375-3"><a href="#cb375-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb375-4"><a href="#cb375-4" aria-hidden="true"></a></span> +<span id="cb375-5"><a href="#cb375-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb375-6"><a href="#cb375-6" aria-hidden="true"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> +<span id="cb375-7"><a href="#cb375-7" aria-hidden="true"></a></span> +<span id="cb375-8"><a href="#cb375-8" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb375-9"><a href="#cb375-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb375-10"><a href="#cb375-10" aria-hidden="true"></a></span> +<span id="cb375-11"><a href="#cb375-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb375-12"><a href="#cb375-12" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb375-13"><a href="#cb375-13" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb375-14"><a href="#cb375-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb375-15"><a href="#cb375-15" aria-hidden="true"></a></span> +<span id="cb375-16"><a href="#cb375-16" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb376"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb376-1"><a href="#cb376-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ *equals* $i$.</p> @@ -4394,106 +4478,106 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererLink</code> macro represents a hyperlink. It receives four arguments: the label, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the link.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-22">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb366"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb366-1"><a href="#cb366-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb366-2"><a href="#cb366-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb366-3"><a href="#cb366-3" aria-hidden="true"></a> #1 {<span class="fu">\tt</span>#2} titled {<span class="fu">\it</span>#4}<span class="co">%</span></span> -<span id="cb366-4"><a href="#cb366-4" aria-hidden="true"></a>}</span> -<span id="cb366-5"><a href="#cb366-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb366-6"><a href="#cb366-6" aria-hidden="true"></a>Please visit [the link][ctan].</span> -<span id="cb366-7"><a href="#cb366-7" aria-hidden="true"></a></span> -<span id="cb366-8"><a href="#cb366-8" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> -<span id="cb366-9"><a href="#cb366-9" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb366-10"><a href="#cb366-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb366-11"><a href="#cb366-11" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb377"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb377-1"><a href="#cb377-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb377-2"><a href="#cb377-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb377-3"><a href="#cb377-3" aria-hidden="true"></a> #1 {<span class="fu">\tt</span>#2} titled {<span class="fu">\it</span>#4}<span class="co">%</span></span> +<span id="cb377-4"><a href="#cb377-4" aria-hidden="true"></a>}</span> +<span id="cb377-5"><a href="#cb377-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb377-6"><a href="#cb377-6" aria-hidden="true"></a>Please visit [the link][ctan].</span> +<span id="cb377-7"><a href="#cb377-7" aria-hidden="true"></a></span> +<span id="cb377-8"><a href="#cb377-8" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> +<span id="cb377-9"><a href="#cb377-9" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> +<span id="cb377-10"><a href="#cb377-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb377-11"><a href="#cb377-11" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb367"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb367-1"><a href="#cb367-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb378"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb378-1"><a href="#cb378-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Please visit the link <a href="https://ctan.org/" class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX Archive Network</em>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-41"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-42"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb368"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb368-1"><a href="#cb368-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb368-2"><a href="#cb368-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb368-3"><a href="#cb368-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb368-4"><a href="#cb368-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb368-5"><a href="#cb368-5" aria-hidden="true"></a> link = {<span class="co">%</span></span> -<span id="cb368-6"><a href="#cb368-6" aria-hidden="true"></a> #1 <span class="fu">\texttt</span>{#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span> -<span id="cb368-7"><a href="#cb368-7" aria-hidden="true"></a> },</span> -<span id="cb368-8"><a href="#cb368-8" aria-hidden="true"></a> },</span> -<span id="cb368-9"><a href="#cb368-9" aria-hidden="true"></a>}</span> -<span id="cb368-10"><a href="#cb368-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb368-11"><a href="#cb368-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb368-12"><a href="#cb368-12" aria-hidden="true"></a>Please visit [the link][ctan].</span> -<span id="cb368-13"><a href="#cb368-13" aria-hidden="true"></a></span> -<span id="cb368-14"><a href="#cb368-14" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> -<span id="cb368-15"><a href="#cb368-15" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb368-16"><a href="#cb368-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb368-17"><a href="#cb368-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb369"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb369-1"><a href="#cb369-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb379"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb379-1"><a href="#cb379-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb379-2"><a href="#cb379-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb379-3"><a href="#cb379-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb379-4"><a href="#cb379-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb379-5"><a href="#cb379-5" aria-hidden="true"></a> link = {<span class="co">%</span></span> +<span id="cb379-6"><a href="#cb379-6" aria-hidden="true"></a> #1 <span class="fu">\texttt</span>{#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span> +<span id="cb379-7"><a href="#cb379-7" aria-hidden="true"></a> },</span> +<span id="cb379-8"><a href="#cb379-8" aria-hidden="true"></a> },</span> +<span id="cb379-9"><a href="#cb379-9" aria-hidden="true"></a>}</span> +<span id="cb379-10"><a href="#cb379-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb379-11"><a href="#cb379-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb379-12"><a href="#cb379-12" aria-hidden="true"></a>Please visit [the link][ctan].</span> +<span id="cb379-13"><a href="#cb379-13" aria-hidden="true"></a></span> +<span id="cb379-14"><a href="#cb379-14" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> +<span id="cb379-15"><a href="#cb379-15" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> +<span id="cb379-16"><a href="#cb379-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb379-17"><a href="#cb379-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb380"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb380-1"><a href="#cb380-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Please visit the link <a href="https://ctan.org/" class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX Archive Network</em>.</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-34">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb370"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb370-1"><a href="#cb370-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb370-2"><a href="#cb370-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb370-3"><a href="#cb370-3" aria-hidden="true"></a> #1 {<span class="fu">\tt</span>#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span> -<span id="cb370-4"><a href="#cb370-4" aria-hidden="true"></a>}</span> -<span id="cb370-5"><a href="#cb370-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb370-6"><a href="#cb370-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb370-7"><a href="#cb370-7" aria-hidden="true"></a>Please visit [the link][ctan].</span> -<span id="cb370-8"><a href="#cb370-8" aria-hidden="true"></a></span> -<span id="cb370-9"><a href="#cb370-9" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> -<span id="cb370-10"><a href="#cb370-10" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb370-11"><a href="#cb370-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb370-12"><a href="#cb370-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb381"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb381-1"><a href="#cb381-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb381-2"><a href="#cb381-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb381-3"><a href="#cb381-3" aria-hidden="true"></a> #1 {<span class="fu">\tt</span>#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span> +<span id="cb381-4"><a href="#cb381-4" aria-hidden="true"></a>}</span> +<span id="cb381-5"><a href="#cb381-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb381-6"><a href="#cb381-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb381-7"><a href="#cb381-7" aria-hidden="true"></a>Please visit [the link][ctan].</span> +<span id="cb381-8"><a href="#cb381-8" aria-hidden="true"></a></span> +<span id="cb381-9"><a href="#cb381-9" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> +<span id="cb381-10"><a href="#cb381-10" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> +<span id="cb381-11"><a href="#cb381-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb381-12"><a href="#cb381-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb371"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb371-1"><a href="#cb371-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb382"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb382-1"><a href="#cb382-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Please visit the link <a href="https://ctan.org/" class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX Archive Network</em>.</p> </blockquote> <h4 data-number="2.3.1.9" id="image-renderer"><span class="header-section-number">2.3.1.9</span> Image Renderer</h4> <p>The <code>\markdownRendererImage</code> macro represents an image. It receives four arguments: the label, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the link.</p> -<h5 class="unnumbered" data-number="" id="latex-example-42"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-43"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb372"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb372-1"><a href="#cb372-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb372-2"><a href="#cb372-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb372-3"><a href="#cb372-3" aria-hidden="true"></a><span class="fu">\begingroup</span></span> -<span id="cb372-4"><a href="#cb372-4" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\@</span>=11</span> -<span id="cb372-5"><a href="#cb372-5" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> -<span id="cb372-6"><a href="#cb372-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\^</span>^A=14</span> -<span id="cb372-7"><a href="#cb372-7" aria-hidden="true"></a><span class="fu">\global\def\markdownRendererImage</span>#1#2#3#4{^^A</span> -<span id="cb372-8"><a href="#cb372-8" aria-hidden="true"></a> <span class="fu">\immediate\write</span>18{^^A</span></code></pre></div> -<div class="sourceCode" id="cb373"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb373-1"><a href="#cb373-1" aria-hidden="true"></a> <span class="kw">if</span> <span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="fu">grep</span> -q ^http<span class="kw">;</span> <span class="kw">then</span></span> -<span id="cb373-2"><a href="#cb373-2" aria-hidden="true"></a> <span class="va">OUTPUT=</span><span class="st">"</span><span class="va">$(</span><span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="ex">md5sum</span> <span class="kw">|</span> <span class="fu">cut</span> -d<span class="st">' '</span> -f1<span class="va">)</span><span class="st">.^^A</span></span> -<span id="cb373-3"><a href="#cb373-3" aria-hidden="true"></a><span class="st"> </span><span class="va">$(</span><span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="fu">sed</span> <span class="st">'s/.*[.]//'</span><span class="va">)</span><span class="st">"</span>;</span> -<span id="cb373-4"><a href="#cb373-4" aria-hidden="true"></a> <span class="kw">if</span> !<span class="bu"> [</span> <span class="ot">-e</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span><span class="bu"> ]</span>; <span class="kw">then</span></span> -<span id="cb373-5"><a href="#cb373-5" aria-hidden="true"></a> <span class="fu">wget</span> -O <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> <span class="st">'#3'</span> <span class="kw">||</span> <span class="fu">rm</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span><span class="kw">;</span></span> -<span id="cb373-6"><a href="#cb373-6" aria-hidden="true"></a> <span class="ex">convert</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> png:<span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span><span class="kw">;</span></span> -<span id="cb373-7"><a href="#cb373-7" aria-hidden="true"></a> <span class="kw">fi</span>;</span> -<span id="cb373-8"><a href="#cb373-8" aria-hidden="true"></a> <span class="bu">printf</span> <span class="st">'%s%%'</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> <span class="op">></span> \jobname.fetched<span class="kw">;</span></span> -<span id="cb373-9"><a href="#cb373-9" aria-hidden="true"></a> <span class="kw">else</span></span> -<span id="cb373-10"><a href="#cb373-10" aria-hidden="true"></a> <span class="bu">printf</span> <span class="st">'%s%%'</span> <span class="st">"#3"</span> <span class="op">></span> \jobname.fetched<span class="kw">;</span></span> -<span id="cb373-11"><a href="#cb373-11" aria-hidden="true"></a> <span class="kw">fi</span>^^<span class="ex">A</span></span></code></pre></div> -<div class="sourceCode" id="cb374"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb374-1"><a href="#cb374-1" aria-hidden="true"></a> }^^A</span> -<span id="cb374-2"><a href="#cb374-2" aria-hidden="true"></a> {^^A</span> -<span id="cb374-3"><a href="#cb374-3" aria-hidden="true"></a> <span class="fu">\everyeof</span>={<span class="fu">\noexpand</span>}^^A</span> -<span id="cb374-4"><a href="#cb374-4" aria-hidden="true"></a> <span class="fu">\edef\filename</span>{<span class="fu">\_</span>_markdowninput"<span class="fu">\jobname</span>.fetched" }^^A</span> -<span id="cb374-5"><a href="#cb374-5" aria-hidden="true"></a> <span class="bu">\includegraphics</span>[width=<span class="fu">\textwidth</span>]{<span class="fu">\filename</span>}^^A</span> -<span id="cb374-6"><a href="#cb374-6" aria-hidden="true"></a> }^^A</span> -<span id="cb374-7"><a href="#cb374-7" aria-hidden="true"></a>}</span> -<span id="cb374-8"><a href="#cb374-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> -<span id="cb374-9"><a href="#cb374-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb374-10"><a href="#cb374-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb374-11"><a href="#cb374-11" aria-hidden="true"></a>![TUGboat](https://tug.org/tugboat/noword.jpg)</span> -<span id="cb374-12"><a href="#cb374-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb374-13"><a href="#cb374-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb375"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb375-1"><a href="#cb375-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb383"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb383-1"><a href="#cb383-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb383-2"><a href="#cb383-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb383-3"><a href="#cb383-3" aria-hidden="true"></a><span class="fu">\begingroup</span></span> +<span id="cb383-4"><a href="#cb383-4" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\@</span>=11</span> +<span id="cb383-5"><a href="#cb383-5" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> +<span id="cb383-6"><a href="#cb383-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\^</span>^A=14</span> +<span id="cb383-7"><a href="#cb383-7" aria-hidden="true"></a><span class="fu">\global\def\markdownRendererImage</span>#1#2#3#4{^^A</span> +<span id="cb383-8"><a href="#cb383-8" aria-hidden="true"></a> <span class="fu">\immediate\write</span>18{^^A</span></code></pre></div> +<div class="sourceCode" id="cb384"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb384-1"><a href="#cb384-1" aria-hidden="true"></a> <span class="kw">if</span> <span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="fu">grep</span> -q ^http<span class="kw">;</span> <span class="kw">then</span></span> +<span id="cb384-2"><a href="#cb384-2" aria-hidden="true"></a> <span class="va">OUTPUT=</span><span class="st">"</span><span class="va">$(</span><span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="ex">md5sum</span> <span class="kw">|</span> <span class="fu">cut</span> -d<span class="st">' '</span> -f1<span class="va">)</span><span class="st">.^^A</span></span> +<span id="cb384-3"><a href="#cb384-3" aria-hidden="true"></a><span class="st"> </span><span class="va">$(</span><span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="fu">sed</span> <span class="st">'s/.*[.]//'</span><span class="va">)</span><span class="st">"</span>;</span> +<span id="cb384-4"><a href="#cb384-4" aria-hidden="true"></a> <span class="kw">if</span> !<span class="bu"> [</span> <span class="ot">-e</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span><span class="bu"> ]</span>; <span class="kw">then</span></span> +<span id="cb384-5"><a href="#cb384-5" aria-hidden="true"></a> <span class="fu">wget</span> -O <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> <span class="st">'#3'</span> <span class="kw">||</span> <span class="fu">rm</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span><span class="kw">;</span></span> +<span id="cb384-6"><a href="#cb384-6" aria-hidden="true"></a> <span class="ex">convert</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> png:<span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span><span class="kw">;</span></span> +<span id="cb384-7"><a href="#cb384-7" aria-hidden="true"></a> <span class="kw">fi</span>;</span> +<span id="cb384-8"><a href="#cb384-8" aria-hidden="true"></a> <span class="bu">printf</span> <span class="st">'%s%%'</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> <span class="op">></span> \jobname.fetched<span class="kw">;</span></span> +<span id="cb384-9"><a href="#cb384-9" aria-hidden="true"></a> <span class="kw">else</span></span> +<span id="cb384-10"><a href="#cb384-10" aria-hidden="true"></a> <span class="bu">printf</span> <span class="st">'%s%%'</span> <span class="st">"#3"</span> <span class="op">></span> \jobname.fetched<span class="kw">;</span></span> +<span id="cb384-11"><a href="#cb384-11" aria-hidden="true"></a> <span class="kw">fi</span>^^<span class="ex">A</span></span></code></pre></div> +<div class="sourceCode" id="cb385"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb385-1"><a href="#cb385-1" aria-hidden="true"></a> }^^A</span> +<span id="cb385-2"><a href="#cb385-2" aria-hidden="true"></a> {^^A</span> +<span id="cb385-3"><a href="#cb385-3" aria-hidden="true"></a> <span class="fu">\everyeof</span>={<span class="fu">\noexpand</span>}^^A</span> +<span id="cb385-4"><a href="#cb385-4" aria-hidden="true"></a> <span class="fu">\edef\filename</span>{<span class="fu">\_</span>_markdowninput"<span class="fu">\jobname</span>.fetched" }^^A</span> +<span id="cb385-5"><a href="#cb385-5" aria-hidden="true"></a> <span class="bu">\includegraphics</span>[width=<span class="fu">\textwidth</span>]{<span class="fu">\filename</span>}^^A</span> +<span id="cb385-6"><a href="#cb385-6" aria-hidden="true"></a> }^^A</span> +<span id="cb385-7"><a href="#cb385-7" aria-hidden="true"></a>}</span> +<span id="cb385-8"><a href="#cb385-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> +<span id="cb385-9"><a href="#cb385-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb385-10"><a href="#cb385-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb385-11"><a href="#cb385-11" aria-hidden="true"></a>![TUGboat](https://tug.org/tugboat/noword.jpg)</span> +<span id="cb385-12"><a href="#cb385-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb385-13"><a href="#cb385-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb386"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb386-1"><a href="#cb386-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following content. This assumes that you use a Unix-like operating system with Bourne or Bourne again shell as the default shell of the current user. It also assumes that the <code>md5sum</code>, <code>wget</code>, and <code>convert</code> binaries are installed and that the <span class="tex">T<sub>e</sub>X</span> engine has shell access.</p> <blockquote> <p><img src="https://tug.org/tugboat/noword.jpg" title="The Communications of the TeX Users Group" /></p> @@ -4505,64 +4589,64 @@ Thomas,Edison,1847</code></pre> <p>Note that you will need to place place a <code>markdown-languages.json</code> file inside your working directory or inside your local <span class="tex">T<sub>e</sub>X</span> directory structure. In this file, you will define a mapping between filename extensions and the language names recognized by your favorite syntax highlighter; there may exist other creative uses beside syntax highlighting. <a href="https://github.com/iainc/Markdown-Content-Blocks" title="File transclusion syntax for Markdown">The <code>Languages.json</code> file provided by Anton Sotkov</a> is a good starting point.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-23">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb376"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb376-1"><a href="#cb376-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb376-2"><a href="#cb376-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> -<span id="cb376-3"><a href="#cb376-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb376-4"><a href="#cb376-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb376-5"><a href="#cb376-5" aria-hidden="true"></a>}</span> -<span id="cb376-6"><a href="#cb376-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb376-7"><a href="#cb376-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb376-8"><a href="#cb376-8" aria-hidden="true"></a>}</span> -<span id="cb376-9"><a href="#cb376-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> -<span id="cb376-10"><a href="#cb376-10" aria-hidden="true"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span> -<span id="cb376-11"><a href="#cb376-11" aria-hidden="true"></a>}</span> -<span id="cb376-12"><a href="#cb376-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb376-13"><a href="#cb376-13" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb376-14"><a href="#cb376-14" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb376-15"><a href="#cb376-15" aria-hidden="true"></a> and programming language names)</span> -<span id="cb376-16"><a href="#cb376-16" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb376-17"><a href="#cb376-17" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb376-18"><a href="#cb376-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb387"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb387-1"><a href="#cb387-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb387-2"><a href="#cb387-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> +<span id="cb387-3"><a href="#cb387-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb387-4"><a href="#cb387-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb387-5"><a href="#cb387-5" aria-hidden="true"></a>}</span> +<span id="cb387-6"><a href="#cb387-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb387-7"><a href="#cb387-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb387-8"><a href="#cb387-8" aria-hidden="true"></a>}</span> +<span id="cb387-9"><a href="#cb387-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> +<span id="cb387-10"><a href="#cb387-10" aria-hidden="true"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span> +<span id="cb387-11"><a href="#cb387-11" aria-hidden="true"></a>}</span> +<span id="cb387-12"><a href="#cb387-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb387-13"><a href="#cb387-13" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> +<span id="cb387-14"><a href="#cb387-14" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> +<span id="cb387-15"><a href="#cb387-15" aria-hidden="true"></a> and programming language names)</span> +<span id="cb387-16"><a href="#cb387-16" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> +<span id="cb387-17"><a href="#cb387-17" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb387-18"><a href="#cb387-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Create also a text document named <code>markdown-languages.json</code> with the following content:</p> -<div class="sourceCode" id="cb377"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb377-1"><a href="#cb377-1" aria-hidden="true"></a>{</span> -<span id="cb377-2"><a href="#cb377-2" aria-hidden="true"></a> <span class="st">"json"</span><span class="op">:</span> <span class="st">"JavaScript Object Notation"</span><span class="op">,</span></span> -<span id="cb377-3"><a href="#cb377-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb388"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb388-1"><a href="#cb388-1" aria-hidden="true"></a>{</span> +<span id="cb388-2"><a href="#cb388-2" aria-hidden="true"></a> <span class="st">"json"</span><span class="op">:</span> <span class="st">"JavaScript Object Notation"</span><span class="op">,</span></span> +<span id="cb388-3"><a href="#cb388-3" aria-hidden="true"></a>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb378"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb378-1"><a href="#cb378-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb389"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb389-1"><a href="#cb389-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <code>document.tex</code>, the document that we are currently typesetting.</p> <p>This is the JavaScript Object Notation (JSON) document <code>markdown-languages.json</code>, the mapping between filename extensions and programming language names.</p> <p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>, the logotype of TUGboat.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-43"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-44"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb379"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb379-1"><a href="#cb379-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb379-2"><a href="#cb379-2" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{markdown-languages.json}</span> -<span id="cb379-3"><a href="#cb379-3" aria-hidden="true"></a>{</span> -<span id="cb379-4"><a href="#cb379-4" aria-hidden="true"></a> "json": "JavaScript Object Notation",</span> -<span id="cb379-5"><a href="#cb379-5" aria-hidden="true"></a>}</span> -<span id="cb379-6"><a href="#cb379-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb379-7"><a href="#cb379-7" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> -<span id="cb379-8"><a href="#cb379-8" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb379-9"><a href="#cb379-9" aria-hidden="true"></a> renderers = {</span> -<span id="cb379-10"><a href="#cb379-10" aria-hidden="true"></a> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</span> -<span id="cb379-11"><a href="#cb379-11" aria-hidden="true"></a> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</span> -<span id="cb379-12"><a href="#cb379-12" aria-hidden="true"></a> contentBlockCode = {<span class="co">%</span></span> -<span id="cb379-13"><a href="#cb379-13" aria-hidden="true"></a> This is the #2 (<span class="fu">\MakeUppercase</span>{#1}) document <span class="fu">\texttt</span>{#3}, #5.</span> -<span id="cb379-14"><a href="#cb379-14" aria-hidden="true"></a> },</span> -<span id="cb379-15"><a href="#cb379-15" aria-hidden="true"></a> },</span> -<span id="cb379-16"><a href="#cb379-16" aria-hidden="true"></a>}</span> -<span id="cb379-17"><a href="#cb379-17" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb379-18"><a href="#cb379-18" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb379-19"><a href="#cb379-19" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb379-20"><a href="#cb379-20" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb379-21"><a href="#cb379-21" aria-hidden="true"></a> and programming language names)</span> -<span id="cb379-22"><a href="#cb379-22" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb379-23"><a href="#cb379-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb379-24"><a href="#cb379-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb380"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb380-1"><a href="#cb380-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb390"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb390-1"><a href="#cb390-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb390-2"><a href="#cb390-2" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{markdown-languages.json}</span> +<span id="cb390-3"><a href="#cb390-3" aria-hidden="true"></a>{</span> +<span id="cb390-4"><a href="#cb390-4" aria-hidden="true"></a> "json": "JavaScript Object Notation",</span> +<span id="cb390-5"><a href="#cb390-5" aria-hidden="true"></a>}</span> +<span id="cb390-6"><a href="#cb390-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> +<span id="cb390-7"><a href="#cb390-7" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> +<span id="cb390-8"><a href="#cb390-8" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb390-9"><a href="#cb390-9" aria-hidden="true"></a> renderers = {</span> +<span id="cb390-10"><a href="#cb390-10" aria-hidden="true"></a> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</span> +<span id="cb390-11"><a href="#cb390-11" aria-hidden="true"></a> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</span> +<span id="cb390-12"><a href="#cb390-12" aria-hidden="true"></a> contentBlockCode = {<span class="co">%</span></span> +<span id="cb390-13"><a href="#cb390-13" aria-hidden="true"></a> This is the #2 (<span class="fu">\MakeUppercase</span>{#1}) document <span class="fu">\texttt</span>{#3}, #5.</span> +<span id="cb390-14"><a href="#cb390-14" aria-hidden="true"></a> },</span> +<span id="cb390-15"><a href="#cb390-15" aria-hidden="true"></a> },</span> +<span id="cb390-16"><a href="#cb390-16" aria-hidden="true"></a>}</span> +<span id="cb390-17"><a href="#cb390-17" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb390-18"><a href="#cb390-18" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb390-19"><a href="#cb390-19" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> +<span id="cb390-20"><a href="#cb390-20" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> +<span id="cb390-21"><a href="#cb390-21" aria-hidden="true"></a> and programming language names)</span> +<span id="cb390-22"><a href="#cb390-22" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> +<span id="cb390-23"><a href="#cb390-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb390-24"><a href="#cb390-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb391"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb391-1"><a href="#cb391-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <code>document.tex</code>, the document that we are currently typesetting.</p> @@ -4571,31 +4655,31 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-35">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb381"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb381-1"><a href="#cb381-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb381-2"><a href="#cb381-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> -<span id="cb381-3"><a href="#cb381-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb381-4"><a href="#cb381-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb381-5"><a href="#cb381-5" aria-hidden="true"></a>}</span> -<span id="cb381-6"><a href="#cb381-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb381-7"><a href="#cb381-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb381-8"><a href="#cb381-8" aria-hidden="true"></a>}</span> -<span id="cb381-9"><a href="#cb381-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> -<span id="cb381-10"><a href="#cb381-10" aria-hidden="true"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span> -<span id="cb381-11"><a href="#cb381-11" aria-hidden="true"></a>}</span> -<span id="cb381-12"><a href="#cb381-12" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb381-13"><a href="#cb381-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb381-14"><a href="#cb381-14" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb381-15"><a href="#cb381-15" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb381-16"><a href="#cb381-16" aria-hidden="true"></a> and programming language names)</span> -<span id="cb381-17"><a href="#cb381-17" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb381-18"><a href="#cb381-18" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb381-19"><a href="#cb381-19" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb392"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb392-1"><a href="#cb392-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb392-2"><a href="#cb392-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> +<span id="cb392-3"><a href="#cb392-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb392-4"><a href="#cb392-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb392-5"><a href="#cb392-5" aria-hidden="true"></a>}</span> +<span id="cb392-6"><a href="#cb392-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb392-7"><a href="#cb392-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb392-8"><a href="#cb392-8" aria-hidden="true"></a>}</span> +<span id="cb392-9"><a href="#cb392-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> +<span id="cb392-10"><a href="#cb392-10" aria-hidden="true"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span> +<span id="cb392-11"><a href="#cb392-11" aria-hidden="true"></a>}</span> +<span id="cb392-12"><a href="#cb392-12" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb392-13"><a href="#cb392-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb392-14"><a href="#cb392-14" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> +<span id="cb392-15"><a href="#cb392-15" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> +<span id="cb392-16"><a href="#cb392-16" aria-hidden="true"></a> and programming language names)</span> +<span id="cb392-17"><a href="#cb392-17" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> +<span id="cb392-18"><a href="#cb392-18" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb392-19"><a href="#cb392-19" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Create also a text document named <code>markdown-languages.json</code> with the following content:</p> -<div class="sourceCode" id="cb382"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb382-1"><a href="#cb382-1" aria-hidden="true"></a>{</span> -<span id="cb382-2"><a href="#cb382-2" aria-hidden="true"></a> <span class="st">"json"</span><span class="op">:</span> <span class="st">"JavaScript Object Notation"</span><span class="op">,</span></span> -<span id="cb382-3"><a href="#cb382-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb393"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb393-1"><a href="#cb393-1" aria-hidden="true"></a>{</span> +<span id="cb393-2"><a href="#cb393-2" aria-hidden="true"></a> <span class="st">"json"</span><span class="op">:</span> <span class="st">"JavaScript Object Notation"</span><span class="op">,</span></span> +<span id="cb393-3"><a href="#cb393-3" aria-hidden="true"></a>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb383"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb383-1"><a href="#cb383-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb394"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb394-1"><a href="#cb394-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <code>document.tex</code>, the document that we are currently typesetting.</p> @@ -4611,50 +4695,50 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererUlEndTight</code> macro represents the end of a bulleted list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <code>false</code>. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-24">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb384"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb384-1"><a href="#cb384-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb384-2"><a href="#cb384-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb384-3"><a href="#cb384-3" aria-hidden="true"></a></span> -<span id="cb384-4"><a href="#cb384-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb384-5"><a href="#cb384-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> -<span id="cb384-6"><a href="#cb384-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb384-7"><a href="#cb384-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb384-8"><a href="#cb384-8" aria-hidden="true"></a> ,</span> -<span id="cb384-9"><a href="#cb384-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb384-10"><a href="#cb384-10" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb384-11"><a href="#cb384-11" aria-hidden="true"></a>}</span> -<span id="cb384-12"><a href="#cb384-12" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> -<span id="cb384-13"><a href="#cb384-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> -<span id="cb384-14"><a href="#cb384-14" aria-hidden="true"></a></span> -<span id="cb384-15"><a href="#cb384-15" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb384-16"><a href="#cb384-16" aria-hidden="true"></a>This is a tight list</span> -<span id="cb384-17"><a href="#cb384-17" aria-hidden="true"></a></span> -<span id="cb384-18"><a href="#cb384-18" aria-hidden="true"></a>- the first item</span> -<span id="cb384-19"><a href="#cb384-19" aria-hidden="true"></a>- the second item</span> -<span id="cb384-20"><a href="#cb384-20" aria-hidden="true"></a>- the third item</span> -<span id="cb384-21"><a href="#cb384-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb384-22"><a href="#cb384-22" aria-hidden="true"></a></span> -<span id="cb384-23"><a href="#cb384-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb384-24"><a href="#cb384-24" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb384-25"><a href="#cb384-25" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb384-26"><a href="#cb384-26" aria-hidden="true"></a>}</span> -<span id="cb384-27"><a href="#cb384-27" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{}</span> -<span id="cb384-28"><a href="#cb384-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{--<span class="fu">\kern</span> 0.5em}</span> -<span id="cb384-29"><a href="#cb384-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb384-30"><a href="#cb384-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{}</span> -<span id="cb384-31"><a href="#cb384-31" aria-hidden="true"></a></span> -<span id="cb384-32"><a href="#cb384-32" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb384-33"><a href="#cb384-33" aria-hidden="true"></a>This is a loose list</span> -<span id="cb384-34"><a href="#cb384-34" aria-hidden="true"></a></span> -<span id="cb384-35"><a href="#cb384-35" aria-hidden="true"></a>- This is the first item</span> -<span id="cb384-36"><a href="#cb384-36" aria-hidden="true"></a></span> -<span id="cb384-37"><a href="#cb384-37" aria-hidden="true"></a>- This is the second item</span> -<span id="cb384-38"><a href="#cb384-38" aria-hidden="true"></a></span> -<span id="cb384-39"><a href="#cb384-39" aria-hidden="true"></a>- This is the third item</span> -<span id="cb384-40"><a href="#cb384-40" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb384-41"><a href="#cb384-41" aria-hidden="true"></a></span> -<span id="cb384-42"><a href="#cb384-42" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb385"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb385-1"><a href="#cb385-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb395"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb395-1"><a href="#cb395-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb395-2"><a href="#cb395-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb395-3"><a href="#cb395-3" aria-hidden="true"></a></span> +<span id="cb395-4"><a href="#cb395-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb395-5"><a href="#cb395-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> +<span id="cb395-6"><a href="#cb395-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb395-7"><a href="#cb395-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb395-8"><a href="#cb395-8" aria-hidden="true"></a> ,</span> +<span id="cb395-9"><a href="#cb395-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> +<span id="cb395-10"><a href="#cb395-10" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb395-11"><a href="#cb395-11" aria-hidden="true"></a>}</span> +<span id="cb395-12"><a href="#cb395-12" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> +<span id="cb395-13"><a href="#cb395-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> +<span id="cb395-14"><a href="#cb395-14" aria-hidden="true"></a></span> +<span id="cb395-15"><a href="#cb395-15" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb395-16"><a href="#cb395-16" aria-hidden="true"></a>This is a tight list</span> +<span id="cb395-17"><a href="#cb395-17" aria-hidden="true"></a></span> +<span id="cb395-18"><a href="#cb395-18" aria-hidden="true"></a>- the first item</span> +<span id="cb395-19"><a href="#cb395-19" aria-hidden="true"></a>- the second item</span> +<span id="cb395-20"><a href="#cb395-20" aria-hidden="true"></a>- the third item</span> +<span id="cb395-21"><a href="#cb395-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb395-22"><a href="#cb395-22" aria-hidden="true"></a></span> +<span id="cb395-23"><a href="#cb395-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb395-24"><a href="#cb395-24" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb395-25"><a href="#cb395-25" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb395-26"><a href="#cb395-26" aria-hidden="true"></a>}</span> +<span id="cb395-27"><a href="#cb395-27" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{}</span> +<span id="cb395-28"><a href="#cb395-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{--<span class="fu">\kern</span> 0.5em}</span> +<span id="cb395-29"><a href="#cb395-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.<span class="fu">\par</span>}</span> +<span id="cb395-30"><a href="#cb395-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{}</span> +<span id="cb395-31"><a href="#cb395-31" aria-hidden="true"></a></span> +<span id="cb395-32"><a href="#cb395-32" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb395-33"><a href="#cb395-33" aria-hidden="true"></a>This is a loose list</span> +<span id="cb395-34"><a href="#cb395-34" aria-hidden="true"></a></span> +<span id="cb395-35"><a href="#cb395-35" aria-hidden="true"></a>- This is the first item</span> +<span id="cb395-36"><a href="#cb395-36" aria-hidden="true"></a></span> +<span id="cb395-37"><a href="#cb395-37" aria-hidden="true"></a>- This is the second item</span> +<span id="cb395-38"><a href="#cb395-38" aria-hidden="true"></a></span> +<span id="cb395-39"><a href="#cb395-39" aria-hidden="true"></a>- This is the third item</span> +<span id="cb395-40"><a href="#cb395-40" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb395-41"><a href="#cb395-41" aria-hidden="true"></a></span> +<span id="cb395-42"><a href="#cb395-42" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb396"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb396-1"><a href="#cb396-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -4665,57 +4749,57 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ul> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-44"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-45"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb386"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb386-1"><a href="#cb386-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb386-2"><a href="#cb386-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[tightLists]{<span class="ex">markdown</span>}</span> -<span id="cb386-3"><a href="#cb386-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb386-4"><a href="#cb386-4" aria-hidden="true"></a></span> -<span id="cb386-5"><a href="#cb386-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb386-6"><a href="#cb386-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb386-7"><a href="#cb386-7" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb386-8"><a href="#cb386-8" aria-hidden="true"></a> ulBeginTight = { (},</span> -<span id="cb386-9"><a href="#cb386-9" aria-hidden="true"></a> ulItem = {<span class="co">%</span></span> -<span id="cb386-10"><a href="#cb386-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb386-11"><a href="#cb386-11" aria-hidden="true"></a> ,</span> -<span id="cb386-12"><a href="#cb386-12" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb386-13"><a href="#cb386-13" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb386-14"><a href="#cb386-14" aria-hidden="true"></a> },</span> -<span id="cb386-15"><a href="#cb386-15" aria-hidden="true"></a> ulItemEnd = {},</span> -<span id="cb386-16"><a href="#cb386-16" aria-hidden="true"></a> ulEndTight = {).},</span> -<span id="cb386-17"><a href="#cb386-17" aria-hidden="true"></a> },</span> -<span id="cb386-18"><a href="#cb386-18" aria-hidden="true"></a>}</span> -<span id="cb386-19"><a href="#cb386-19" aria-hidden="true"></a>This is a tight list</span> -<span id="cb386-20"><a href="#cb386-20" aria-hidden="true"></a></span> -<span id="cb386-21"><a href="#cb386-21" aria-hidden="true"></a>- the first item</span> -<span id="cb386-22"><a href="#cb386-22" aria-hidden="true"></a>- the second item</span> -<span id="cb386-23"><a href="#cb386-23" aria-hidden="true"></a>- the third item</span> -<span id="cb386-24"><a href="#cb386-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb386-25"><a href="#cb386-25" aria-hidden="true"></a></span> -<span id="cb386-26"><a href="#cb386-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb386-27"><a href="#cb386-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb386-28"><a href="#cb386-28" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb386-29"><a href="#cb386-29" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb386-30"><a href="#cb386-30" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb386-31"><a href="#cb386-31" aria-hidden="true"></a> },</span> -<span id="cb386-32"><a href="#cb386-32" aria-hidden="true"></a> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</span> -<span id="cb386-33"><a href="#cb386-33" aria-hidden="true"></a> ulItem = {<span class="fu">\item</span>},</span> -<span id="cb386-34"><a href="#cb386-34" aria-hidden="true"></a> ulItemEnd = {.},</span> -<span id="cb386-35"><a href="#cb386-35" aria-hidden="true"></a> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> -<span id="cb386-36"><a href="#cb386-36" aria-hidden="true"></a> },</span> -<span id="cb386-37"><a href="#cb386-37" aria-hidden="true"></a>}</span> -<span id="cb386-38"><a href="#cb386-38" aria-hidden="true"></a>This is a loose list</span> -<span id="cb386-39"><a href="#cb386-39" aria-hidden="true"></a></span> -<span id="cb386-40"><a href="#cb386-40" aria-hidden="true"></a>- This is the first item</span> -<span id="cb386-41"><a href="#cb386-41" aria-hidden="true"></a></span> -<span id="cb386-42"><a href="#cb386-42" aria-hidden="true"></a>- This is the second item</span> -<span id="cb386-43"><a href="#cb386-43" aria-hidden="true"></a></span> -<span id="cb386-44"><a href="#cb386-44" aria-hidden="true"></a>- This is the third item</span> -<span id="cb386-45"><a href="#cb386-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb386-46"><a href="#cb386-46" aria-hidden="true"></a></span> -<span id="cb386-47"><a href="#cb386-47" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb387"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb387-1"><a href="#cb387-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb397"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb397-1"><a href="#cb397-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb397-2"><a href="#cb397-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[tightLists]{<span class="ex">markdown</span>}</span> +<span id="cb397-3"><a href="#cb397-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb397-4"><a href="#cb397-4" aria-hidden="true"></a></span> +<span id="cb397-5"><a href="#cb397-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb397-6"><a href="#cb397-6" aria-hidden="true"></a> renderers = {</span> +<span id="cb397-7"><a href="#cb397-7" aria-hidden="true"></a> interblockSeparator = {},</span> +<span id="cb397-8"><a href="#cb397-8" aria-hidden="true"></a> ulBeginTight = { (},</span> +<span id="cb397-9"><a href="#cb397-9" aria-hidden="true"></a> ulItem = {<span class="co">%</span></span> +<span id="cb397-10"><a href="#cb397-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb397-11"><a href="#cb397-11" aria-hidden="true"></a> ,</span> +<span id="cb397-12"><a href="#cb397-12" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> +<span id="cb397-13"><a href="#cb397-13" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb397-14"><a href="#cb397-14" aria-hidden="true"></a> },</span> +<span id="cb397-15"><a href="#cb397-15" aria-hidden="true"></a> ulItemEnd = {},</span> +<span id="cb397-16"><a href="#cb397-16" aria-hidden="true"></a> ulEndTight = {).},</span> +<span id="cb397-17"><a href="#cb397-17" aria-hidden="true"></a> },</span> +<span id="cb397-18"><a href="#cb397-18" aria-hidden="true"></a>}</span> +<span id="cb397-19"><a href="#cb397-19" aria-hidden="true"></a>This is a tight list</span> +<span id="cb397-20"><a href="#cb397-20" aria-hidden="true"></a></span> +<span id="cb397-21"><a href="#cb397-21" aria-hidden="true"></a>- the first item</span> +<span id="cb397-22"><a href="#cb397-22" aria-hidden="true"></a>- the second item</span> +<span id="cb397-23"><a href="#cb397-23" aria-hidden="true"></a>- the third item</span> +<span id="cb397-24"><a href="#cb397-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb397-25"><a href="#cb397-25" aria-hidden="true"></a></span> +<span id="cb397-26"><a href="#cb397-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb397-27"><a href="#cb397-27" aria-hidden="true"></a> renderers = {</span> +<span id="cb397-28"><a href="#cb397-28" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb397-29"><a href="#cb397-29" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb397-30"><a href="#cb397-30" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb397-31"><a href="#cb397-31" aria-hidden="true"></a> },</span> +<span id="cb397-32"><a href="#cb397-32" aria-hidden="true"></a> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</span> +<span id="cb397-33"><a href="#cb397-33" aria-hidden="true"></a> ulItem = {<span class="fu">\item</span>},</span> +<span id="cb397-34"><a href="#cb397-34" aria-hidden="true"></a> ulItemEnd = {.},</span> +<span id="cb397-35"><a href="#cb397-35" aria-hidden="true"></a> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> +<span id="cb397-36"><a href="#cb397-36" aria-hidden="true"></a> },</span> +<span id="cb397-37"><a href="#cb397-37" aria-hidden="true"></a>}</span> +<span id="cb397-38"><a href="#cb397-38" aria-hidden="true"></a>This is a loose list</span> +<span id="cb397-39"><a href="#cb397-39" aria-hidden="true"></a></span> +<span id="cb397-40"><a href="#cb397-40" aria-hidden="true"></a>- This is the first item</span> +<span id="cb397-41"><a href="#cb397-41" aria-hidden="true"></a></span> +<span id="cb397-42"><a href="#cb397-42" aria-hidden="true"></a>- This is the second item</span> +<span id="cb397-43"><a href="#cb397-43" aria-hidden="true"></a></span> +<span id="cb397-44"><a href="#cb397-44" aria-hidden="true"></a>- This is the third item</span> +<span id="cb397-45"><a href="#cb397-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb397-46"><a href="#cb397-46" aria-hidden="true"></a></span> +<span id="cb397-47"><a href="#cb397-47" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb398"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb398-1"><a href="#cb398-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -4728,51 +4812,51 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-36">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb388"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb388-1"><a href="#cb388-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb388-2"><a href="#cb388-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb388-3"><a href="#cb388-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb388-4"><a href="#cb388-4" aria-hidden="true"></a></span> -<span id="cb388-5"><a href="#cb388-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb388-6"><a href="#cb388-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> -<span id="cb388-7"><a href="#cb388-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb388-8"><a href="#cb388-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb388-9"><a href="#cb388-9" aria-hidden="true"></a> ,</span> -<span id="cb388-10"><a href="#cb388-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb388-11"><a href="#cb388-11" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb388-12"><a href="#cb388-12" aria-hidden="true"></a>}</span> -<span id="cb388-13"><a href="#cb388-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> -<span id="cb388-14"><a href="#cb388-14" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> -<span id="cb388-15"><a href="#cb388-15" aria-hidden="true"></a></span> -<span id="cb388-16"><a href="#cb388-16" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb388-17"><a href="#cb388-17" aria-hidden="true"></a>This is a tight list</span> -<span id="cb388-18"><a href="#cb388-18" aria-hidden="true"></a></span> -<span id="cb388-19"><a href="#cb388-19" aria-hidden="true"></a>- the first item</span> -<span id="cb388-20"><a href="#cb388-20" aria-hidden="true"></a>- the second item</span> -<span id="cb388-21"><a href="#cb388-21" aria-hidden="true"></a>- the third item</span> -<span id="cb388-22"><a href="#cb388-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb388-23"><a href="#cb388-23" aria-hidden="true"></a></span> -<span id="cb388-24"><a href="#cb388-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb388-25"><a href="#cb388-25" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb388-26"><a href="#cb388-26" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb388-27"><a href="#cb388-27" aria-hidden="true"></a>}</span> -<span id="cb388-28"><a href="#cb388-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{<span class="fu">\startitemize</span>}</span> -<span id="cb388-29"><a href="#cb388-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="fu">\item</span>}</span> -<span id="cb388-30"><a href="#cb388-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.}</span> -<span id="cb388-31"><a href="#cb388-31" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb388-32"><a href="#cb388-32" aria-hidden="true"></a></span> -<span id="cb388-33"><a href="#cb388-33" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb388-34"><a href="#cb388-34" aria-hidden="true"></a>This is a loose list</span> -<span id="cb388-35"><a href="#cb388-35" aria-hidden="true"></a></span> -<span id="cb388-36"><a href="#cb388-36" aria-hidden="true"></a>- This is the first item</span> -<span id="cb388-37"><a href="#cb388-37" aria-hidden="true"></a></span> -<span id="cb388-38"><a href="#cb388-38" aria-hidden="true"></a>- This is the second item</span> -<span id="cb388-39"><a href="#cb388-39" aria-hidden="true"></a></span> -<span id="cb388-40"><a href="#cb388-40" aria-hidden="true"></a>- This is the third item</span> -<span id="cb388-41"><a href="#cb388-41" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb388-42"><a href="#cb388-42" aria-hidden="true"></a></span> -<span id="cb388-43"><a href="#cb388-43" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb389"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb389-1"><a href="#cb389-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb399"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb399-1"><a href="#cb399-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb399-2"><a href="#cb399-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb399-3"><a href="#cb399-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb399-4"><a href="#cb399-4" aria-hidden="true"></a></span> +<span id="cb399-5"><a href="#cb399-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb399-6"><a href="#cb399-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> +<span id="cb399-7"><a href="#cb399-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb399-8"><a href="#cb399-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb399-9"><a href="#cb399-9" aria-hidden="true"></a> ,</span> +<span id="cb399-10"><a href="#cb399-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> +<span id="cb399-11"><a href="#cb399-11" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb399-12"><a href="#cb399-12" aria-hidden="true"></a>}</span> +<span id="cb399-13"><a href="#cb399-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> +<span id="cb399-14"><a href="#cb399-14" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> +<span id="cb399-15"><a href="#cb399-15" aria-hidden="true"></a></span> +<span id="cb399-16"><a href="#cb399-16" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb399-17"><a href="#cb399-17" aria-hidden="true"></a>This is a tight list</span> +<span id="cb399-18"><a href="#cb399-18" aria-hidden="true"></a></span> +<span id="cb399-19"><a href="#cb399-19" aria-hidden="true"></a>- the first item</span> +<span id="cb399-20"><a href="#cb399-20" aria-hidden="true"></a>- the second item</span> +<span id="cb399-21"><a href="#cb399-21" aria-hidden="true"></a>- the third item</span> +<span id="cb399-22"><a href="#cb399-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb399-23"><a href="#cb399-23" aria-hidden="true"></a></span> +<span id="cb399-24"><a href="#cb399-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb399-25"><a href="#cb399-25" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb399-26"><a href="#cb399-26" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb399-27"><a href="#cb399-27" aria-hidden="true"></a>}</span> +<span id="cb399-28"><a href="#cb399-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{<span class="fu">\startitemize</span>}</span> +<span id="cb399-29"><a href="#cb399-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="fu">\item</span>}</span> +<span id="cb399-30"><a href="#cb399-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.}</span> +<span id="cb399-31"><a href="#cb399-31" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{<span class="fu">\stopitemize</span>}</span> +<span id="cb399-32"><a href="#cb399-32" aria-hidden="true"></a></span> +<span id="cb399-33"><a href="#cb399-33" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb399-34"><a href="#cb399-34" aria-hidden="true"></a>This is a loose list</span> +<span id="cb399-35"><a href="#cb399-35" aria-hidden="true"></a></span> +<span id="cb399-36"><a href="#cb399-36" aria-hidden="true"></a>- This is the first item</span> +<span id="cb399-37"><a href="#cb399-37" aria-hidden="true"></a></span> +<span id="cb399-38"><a href="#cb399-38" aria-hidden="true"></a>- This is the second item</span> +<span id="cb399-39"><a href="#cb399-39" aria-hidden="true"></a></span> +<span id="cb399-40"><a href="#cb399-40" aria-hidden="true"></a>- This is the third item</span> +<span id="cb399-41"><a href="#cb399-41" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb399-42"><a href="#cb399-42" aria-hidden="true"></a></span> +<span id="cb399-43"><a href="#cb399-43" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb400"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb400-1"><a href="#cb400-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -4793,68 +4877,68 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererOlEndTight</code> macro represents the end of an ordered list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <code>false</code>. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-25">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb390"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb390-1"><a href="#cb390-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb390-2"><a href="#cb390-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb390-3"><a href="#cb390-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> -<span id="cb390-4"><a href="#cb390-4" aria-hidden="true"></a></span> -<span id="cb390-5"><a href="#cb390-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb390-6"><a href="#cb390-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> -<span id="cb390-7"><a href="#cb390-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb390-8"><a href="#cb390-8" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb390-9"><a href="#cb390-9" aria-hidden="true"></a> the first</span> -<span id="cb390-10"><a href="#cb390-10" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb390-11"><a href="#cb390-11" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb390-12"><a href="#cb390-12" aria-hidden="true"></a> , the second</span> -<span id="cb390-13"><a href="#cb390-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb390-14"><a href="#cb390-14" aria-hidden="true"></a> , and the third</span> -<span id="cb390-15"><a href="#cb390-15" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb390-16"><a href="#cb390-16" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb390-17"><a href="#cb390-17" aria-hidden="true"></a>}</span> -<span id="cb390-18"><a href="#cb390-18" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> -<span id="cb390-19"><a href="#cb390-19" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> -<span id="cb390-20"><a href="#cb390-20" aria-hidden="true"></a></span> -<span id="cb390-21"><a href="#cb390-21" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb390-22"><a href="#cb390-22" aria-hidden="true"></a>This is a tight list</span> -<span id="cb390-23"><a href="#cb390-23" aria-hidden="true"></a></span> -<span id="cb390-24"><a href="#cb390-24" aria-hidden="true"></a>1. item</span> -<span id="cb390-25"><a href="#cb390-25" aria-hidden="true"></a>2. item</span> -<span id="cb390-26"><a href="#cb390-26" aria-hidden="true"></a>3. item</span> -<span id="cb390-27"><a href="#cb390-27" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb390-28"><a href="#cb390-28" aria-hidden="true"></a></span> -<span id="cb390-29"><a href="#cb390-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb390-30"><a href="#cb390-30" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb390-31"><a href="#cb390-31" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb390-32"><a href="#cb390-32" aria-hidden="true"></a>}</span> -<span id="cb390-33"><a href="#cb390-33" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{}</span> -<span id="cb390-34"><a href="#cb390-34" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb390-35"><a href="#cb390-35" aria-hidden="true"></a> #1.<span class="fu">\kern</span> 0.5em<span class="co">%</span></span> -<span id="cb390-36"><a href="#cb390-36" aria-hidden="true"></a> This is the</span> -<span id="cb390-37"><a href="#cb390-37" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb390-38"><a href="#cb390-38" aria-hidden="true"></a> first</span> -<span id="cb390-39"><a href="#cb390-39" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb390-40"><a href="#cb390-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb390-41"><a href="#cb390-41" aria-hidden="true"></a> second</span> -<span id="cb390-42"><a href="#cb390-42" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb390-43"><a href="#cb390-43" aria-hidden="true"></a> third</span> -<span id="cb390-44"><a href="#cb390-44" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb390-45"><a href="#cb390-45" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb390-46"><a href="#cb390-46" aria-hidden="true"></a>}</span> -<span id="cb390-47"><a href="#cb390-47" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb390-48"><a href="#cb390-48" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{}</span> -<span id="cb390-49"><a href="#cb390-49" aria-hidden="true"></a></span> -<span id="cb390-50"><a href="#cb390-50" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb390-51"><a href="#cb390-51" aria-hidden="true"></a>This is a loose list</span> -<span id="cb390-52"><a href="#cb390-52" aria-hidden="true"></a></span> -<span id="cb390-53"><a href="#cb390-53" aria-hidden="true"></a>1. item</span> -<span id="cb390-54"><a href="#cb390-54" aria-hidden="true"></a></span> -<span id="cb390-55"><a href="#cb390-55" aria-hidden="true"></a>2. item</span> -<span id="cb390-56"><a href="#cb390-56" aria-hidden="true"></a></span> -<span id="cb390-57"><a href="#cb390-57" aria-hidden="true"></a>3. item</span> -<span id="cb390-58"><a href="#cb390-58" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb390-59"><a href="#cb390-59" aria-hidden="true"></a></span> -<span id="cb390-60"><a href="#cb390-60" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb391"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb391-1"><a href="#cb391-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb401"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb401-1"><a href="#cb401-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb401-2"><a href="#cb401-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb401-3"><a href="#cb401-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> +<span id="cb401-4"><a href="#cb401-4" aria-hidden="true"></a></span> +<span id="cb401-5"><a href="#cb401-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb401-6"><a href="#cb401-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> +<span id="cb401-7"><a href="#cb401-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb401-8"><a href="#cb401-8" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb401-9"><a href="#cb401-9" aria-hidden="true"></a> the first</span> +<span id="cb401-10"><a href="#cb401-10" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb401-11"><a href="#cb401-11" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb401-12"><a href="#cb401-12" aria-hidden="true"></a> , the second</span> +<span id="cb401-13"><a href="#cb401-13" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb401-14"><a href="#cb401-14" aria-hidden="true"></a> , and the third</span> +<span id="cb401-15"><a href="#cb401-15" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb401-16"><a href="#cb401-16" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb401-17"><a href="#cb401-17" aria-hidden="true"></a>}</span> +<span id="cb401-18"><a href="#cb401-18" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> +<span id="cb401-19"><a href="#cb401-19" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> +<span id="cb401-20"><a href="#cb401-20" aria-hidden="true"></a></span> +<span id="cb401-21"><a href="#cb401-21" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb401-22"><a href="#cb401-22" aria-hidden="true"></a>This is a tight list</span> +<span id="cb401-23"><a href="#cb401-23" aria-hidden="true"></a></span> +<span id="cb401-24"><a href="#cb401-24" aria-hidden="true"></a>1. item</span> +<span id="cb401-25"><a href="#cb401-25" aria-hidden="true"></a>2. item</span> +<span id="cb401-26"><a href="#cb401-26" aria-hidden="true"></a>3. item</span> +<span id="cb401-27"><a href="#cb401-27" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb401-28"><a href="#cb401-28" aria-hidden="true"></a></span> +<span id="cb401-29"><a href="#cb401-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb401-30"><a href="#cb401-30" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb401-31"><a href="#cb401-31" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb401-32"><a href="#cb401-32" aria-hidden="true"></a>}</span> +<span id="cb401-33"><a href="#cb401-33" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{}</span> +<span id="cb401-34"><a href="#cb401-34" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb401-35"><a href="#cb401-35" aria-hidden="true"></a> #1.<span class="fu">\kern</span> 0.5em<span class="co">%</span></span> +<span id="cb401-36"><a href="#cb401-36" aria-hidden="true"></a> This is the</span> +<span id="cb401-37"><a href="#cb401-37" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb401-38"><a href="#cb401-38" aria-hidden="true"></a> first</span> +<span id="cb401-39"><a href="#cb401-39" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb401-40"><a href="#cb401-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb401-41"><a href="#cb401-41" aria-hidden="true"></a> second</span> +<span id="cb401-42"><a href="#cb401-42" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb401-43"><a href="#cb401-43" aria-hidden="true"></a> third</span> +<span id="cb401-44"><a href="#cb401-44" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb401-45"><a href="#cb401-45" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb401-46"><a href="#cb401-46" aria-hidden="true"></a>}</span> +<span id="cb401-47"><a href="#cb401-47" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> +<span id="cb401-48"><a href="#cb401-48" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{}</span> +<span id="cb401-49"><a href="#cb401-49" aria-hidden="true"></a></span> +<span id="cb401-50"><a href="#cb401-50" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb401-51"><a href="#cb401-51" aria-hidden="true"></a>This is a loose list</span> +<span id="cb401-52"><a href="#cb401-52" aria-hidden="true"></a></span> +<span id="cb401-53"><a href="#cb401-53" aria-hidden="true"></a>1. item</span> +<span id="cb401-54"><a href="#cb401-54" aria-hidden="true"></a></span> +<span id="cb401-55"><a href="#cb401-55" aria-hidden="true"></a>2. item</span> +<span id="cb401-56"><a href="#cb401-56" aria-hidden="true"></a></span> +<span id="cb401-57"><a href="#cb401-57" aria-hidden="true"></a>3. item</span> +<span id="cb401-58"><a href="#cb401-58" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb401-59"><a href="#cb401-59" aria-hidden="true"></a></span> +<span id="cb401-60"><a href="#cb401-60" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb402"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb402-1"><a href="#cb402-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -4865,73 +4949,73 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ol> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-45"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-46"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb392"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb392-1"><a href="#cb392-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb392-2"><a href="#cb392-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[tightLists, startNumber]{<span class="ex">markdown</span>}</span> -<span id="cb392-3"><a href="#cb392-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb392-4"><a href="#cb392-4" aria-hidden="true"></a></span> -<span id="cb392-5"><a href="#cb392-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb392-6"><a href="#cb392-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb392-7"><a href="#cb392-7" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb392-8"><a href="#cb392-8" aria-hidden="true"></a> olBeginTight = { (},</span> -<span id="cb392-9"><a href="#cb392-9" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb392-10"><a href="#cb392-10" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb392-11"><a href="#cb392-11" aria-hidden="true"></a> the first</span> -<span id="cb392-12"><a href="#cb392-12" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb392-13"><a href="#cb392-13" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb392-14"><a href="#cb392-14" aria-hidden="true"></a> , the second</span> -<span id="cb392-15"><a href="#cb392-15" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb392-16"><a href="#cb392-16" aria-hidden="true"></a> , and the third</span> -<span id="cb392-17"><a href="#cb392-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb392-18"><a href="#cb392-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb392-19"><a href="#cb392-19" aria-hidden="true"></a> },</span> -<span id="cb392-20"><a href="#cb392-20" aria-hidden="true"></a> olItemEnd = {},</span> -<span id="cb392-21"><a href="#cb392-21" aria-hidden="true"></a> olEndTight = {).},</span> -<span id="cb392-22"><a href="#cb392-22" aria-hidden="true"></a> },</span> -<span id="cb392-23"><a href="#cb392-23" aria-hidden="true"></a>}</span> -<span id="cb392-24"><a href="#cb392-24" aria-hidden="true"></a>This is a tight list</span> -<span id="cb392-25"><a href="#cb392-25" aria-hidden="true"></a></span> -<span id="cb392-26"><a href="#cb392-26" aria-hidden="true"></a>1. item</span> -<span id="cb392-27"><a href="#cb392-27" aria-hidden="true"></a>2. item</span> -<span id="cb392-28"><a href="#cb392-28" aria-hidden="true"></a>3. item</span> -<span id="cb392-29"><a href="#cb392-29" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb392-30"><a href="#cb392-30" aria-hidden="true"></a></span> -<span id="cb392-31"><a href="#cb392-31" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb392-32"><a href="#cb392-32" aria-hidden="true"></a> renderers = {</span> -<span id="cb392-33"><a href="#cb392-33" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb392-34"><a href="#cb392-34" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb392-35"><a href="#cb392-35" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb392-36"><a href="#cb392-36" aria-hidden="true"></a> },</span> -<span id="cb392-37"><a href="#cb392-37" aria-hidden="true"></a> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</span> -<span id="cb392-38"><a href="#cb392-38" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb392-39"><a href="#cb392-39" aria-hidden="true"></a> <span class="fu">\item</span> This is the</span> -<span id="cb392-40"><a href="#cb392-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb392-41"><a href="#cb392-41" aria-hidden="true"></a> first</span> -<span id="cb392-42"><a href="#cb392-42" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb392-43"><a href="#cb392-43" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb392-44"><a href="#cb392-44" aria-hidden="true"></a> second</span> -<span id="cb392-45"><a href="#cb392-45" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb392-46"><a href="#cb392-46" aria-hidden="true"></a> third</span> -<span id="cb392-47"><a href="#cb392-47" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb392-48"><a href="#cb392-48" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb392-49"><a href="#cb392-49" aria-hidden="true"></a> },</span> -<span id="cb392-50"><a href="#cb392-50" aria-hidden="true"></a> olItemEnd = {.},</span> -<span id="cb392-51"><a href="#cb392-51" aria-hidden="true"></a> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</span> -<span id="cb392-52"><a href="#cb392-52" aria-hidden="true"></a> },</span> -<span id="cb392-53"><a href="#cb392-53" aria-hidden="true"></a>}</span> -<span id="cb392-54"><a href="#cb392-54" aria-hidden="true"></a>This is a loose list</span> -<span id="cb392-55"><a href="#cb392-55" aria-hidden="true"></a></span> -<span id="cb392-56"><a href="#cb392-56" aria-hidden="true"></a>1. item</span> -<span id="cb392-57"><a href="#cb392-57" aria-hidden="true"></a></span> -<span id="cb392-58"><a href="#cb392-58" aria-hidden="true"></a>2. item</span> -<span id="cb392-59"><a href="#cb392-59" aria-hidden="true"></a></span> -<span id="cb392-60"><a href="#cb392-60" aria-hidden="true"></a>3. item</span> -<span id="cb392-61"><a href="#cb392-61" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb392-62"><a href="#cb392-62" aria-hidden="true"></a></span> -<span id="cb392-63"><a href="#cb392-63" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb393"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb393-1"><a href="#cb393-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb403"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb403-1"><a href="#cb403-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb403-2"><a href="#cb403-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[tightLists, startNumber]{<span class="ex">markdown</span>}</span> +<span id="cb403-3"><a href="#cb403-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb403-4"><a href="#cb403-4" aria-hidden="true"></a></span> +<span id="cb403-5"><a href="#cb403-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb403-6"><a href="#cb403-6" aria-hidden="true"></a> renderers = {</span> +<span id="cb403-7"><a href="#cb403-7" aria-hidden="true"></a> interblockSeparator = {},</span> +<span id="cb403-8"><a href="#cb403-8" aria-hidden="true"></a> olBeginTight = { (},</span> +<span id="cb403-9"><a href="#cb403-9" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> +<span id="cb403-10"><a href="#cb403-10" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb403-11"><a href="#cb403-11" aria-hidden="true"></a> the first</span> +<span id="cb403-12"><a href="#cb403-12" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb403-13"><a href="#cb403-13" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb403-14"><a href="#cb403-14" aria-hidden="true"></a> , the second</span> +<span id="cb403-15"><a href="#cb403-15" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb403-16"><a href="#cb403-16" aria-hidden="true"></a> , and the third</span> +<span id="cb403-17"><a href="#cb403-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb403-18"><a href="#cb403-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb403-19"><a href="#cb403-19" aria-hidden="true"></a> },</span> +<span id="cb403-20"><a href="#cb403-20" aria-hidden="true"></a> olItemEnd = {},</span> +<span id="cb403-21"><a href="#cb403-21" aria-hidden="true"></a> olEndTight = {).},</span> +<span id="cb403-22"><a href="#cb403-22" aria-hidden="true"></a> },</span> +<span id="cb403-23"><a href="#cb403-23" aria-hidden="true"></a>}</span> +<span id="cb403-24"><a href="#cb403-24" aria-hidden="true"></a>This is a tight list</span> +<span id="cb403-25"><a href="#cb403-25" aria-hidden="true"></a></span> +<span id="cb403-26"><a href="#cb403-26" aria-hidden="true"></a>1. item</span> +<span id="cb403-27"><a href="#cb403-27" aria-hidden="true"></a>2. item</span> +<span id="cb403-28"><a href="#cb403-28" aria-hidden="true"></a>3. item</span> +<span id="cb403-29"><a href="#cb403-29" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb403-30"><a href="#cb403-30" aria-hidden="true"></a></span> +<span id="cb403-31"><a href="#cb403-31" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb403-32"><a href="#cb403-32" aria-hidden="true"></a> renderers = {</span> +<span id="cb403-33"><a href="#cb403-33" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb403-34"><a href="#cb403-34" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb403-35"><a href="#cb403-35" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb403-36"><a href="#cb403-36" aria-hidden="true"></a> },</span> +<span id="cb403-37"><a href="#cb403-37" aria-hidden="true"></a> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</span> +<span id="cb403-38"><a href="#cb403-38" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> +<span id="cb403-39"><a href="#cb403-39" aria-hidden="true"></a> <span class="fu">\item</span> This is the</span> +<span id="cb403-40"><a href="#cb403-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb403-41"><a href="#cb403-41" aria-hidden="true"></a> first</span> +<span id="cb403-42"><a href="#cb403-42" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb403-43"><a href="#cb403-43" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb403-44"><a href="#cb403-44" aria-hidden="true"></a> second</span> +<span id="cb403-45"><a href="#cb403-45" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb403-46"><a href="#cb403-46" aria-hidden="true"></a> third</span> +<span id="cb403-47"><a href="#cb403-47" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb403-48"><a href="#cb403-48" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb403-49"><a href="#cb403-49" aria-hidden="true"></a> },</span> +<span id="cb403-50"><a href="#cb403-50" aria-hidden="true"></a> olItemEnd = {.},</span> +<span id="cb403-51"><a href="#cb403-51" aria-hidden="true"></a> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</span> +<span id="cb403-52"><a href="#cb403-52" aria-hidden="true"></a> },</span> +<span id="cb403-53"><a href="#cb403-53" aria-hidden="true"></a>}</span> +<span id="cb403-54"><a href="#cb403-54" aria-hidden="true"></a>This is a loose list</span> +<span id="cb403-55"><a href="#cb403-55" aria-hidden="true"></a></span> +<span id="cb403-56"><a href="#cb403-56" aria-hidden="true"></a>1. item</span> +<span id="cb403-57"><a href="#cb403-57" aria-hidden="true"></a></span> +<span id="cb403-58"><a href="#cb403-58" aria-hidden="true"></a>2. item</span> +<span id="cb403-59"><a href="#cb403-59" aria-hidden="true"></a></span> +<span id="cb403-60"><a href="#cb403-60" aria-hidden="true"></a>3. item</span> +<span id="cb403-61"><a href="#cb403-61" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb403-62"><a href="#cb403-62" aria-hidden="true"></a></span> +<span id="cb403-63"><a href="#cb403-63" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb404"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb404-1"><a href="#cb404-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -4944,69 +5028,69 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-37">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb394"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb394-1"><a href="#cb394-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb394-2"><a href="#cb394-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb394-3"><a href="#cb394-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> -<span id="cb394-4"><a href="#cb394-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb394-5"><a href="#cb394-5" aria-hidden="true"></a></span> -<span id="cb394-6"><a href="#cb394-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb394-7"><a href="#cb394-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> -<span id="cb394-8"><a href="#cb394-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb394-9"><a href="#cb394-9" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb394-10"><a href="#cb394-10" aria-hidden="true"></a> the first</span> -<span id="cb394-11"><a href="#cb394-11" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb394-12"><a href="#cb394-12" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb394-13"><a href="#cb394-13" aria-hidden="true"></a> , the second</span> -<span id="cb394-14"><a href="#cb394-14" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb394-15"><a href="#cb394-15" aria-hidden="true"></a> , and the third</span> -<span id="cb394-16"><a href="#cb394-16" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb394-17"><a href="#cb394-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb394-18"><a href="#cb394-18" aria-hidden="true"></a>}</span> -<span id="cb394-19"><a href="#cb394-19" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> -<span id="cb394-20"><a href="#cb394-20" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> -<span id="cb394-21"><a href="#cb394-21" aria-hidden="true"></a></span> -<span id="cb394-22"><a href="#cb394-22" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb394-23"><a href="#cb394-23" aria-hidden="true"></a>This is a tight list</span> -<span id="cb394-24"><a href="#cb394-24" aria-hidden="true"></a></span> -<span id="cb394-25"><a href="#cb394-25" aria-hidden="true"></a>1. item</span> -<span id="cb394-26"><a href="#cb394-26" aria-hidden="true"></a>2. item</span> -<span id="cb394-27"><a href="#cb394-27" aria-hidden="true"></a>3. item</span> -<span id="cb394-28"><a href="#cb394-28" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb394-29"><a href="#cb394-29" aria-hidden="true"></a></span> -<span id="cb394-30"><a href="#cb394-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb394-31"><a href="#cb394-31" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb394-32"><a href="#cb394-32" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb394-33"><a href="#cb394-33" aria-hidden="true"></a>}</span> -<span id="cb394-34"><a href="#cb394-34" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{<span class="fu">\startitemize</span>}</span> -<span id="cb394-35"><a href="#cb394-35" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb394-36"><a href="#cb394-36" aria-hidden="true"></a> <span class="fu">\sym</span>{#1.}</span> -<span id="cb394-37"><a href="#cb394-37" aria-hidden="true"></a> This is the</span> -<span id="cb394-38"><a href="#cb394-38" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb394-39"><a href="#cb394-39" aria-hidden="true"></a> first</span> -<span id="cb394-40"><a href="#cb394-40" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb394-41"><a href="#cb394-41" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb394-42"><a href="#cb394-42" aria-hidden="true"></a> second</span> -<span id="cb394-43"><a href="#cb394-43" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb394-44"><a href="#cb394-44" aria-hidden="true"></a> third</span> -<span id="cb394-45"><a href="#cb394-45" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb394-46"><a href="#cb394-46" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb394-47"><a href="#cb394-47" aria-hidden="true"></a>}</span> -<span id="cb394-48"><a href="#cb394-48" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb394-49"><a href="#cb394-49" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb394-50"><a href="#cb394-50" aria-hidden="true"></a></span> -<span id="cb394-51"><a href="#cb394-51" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb394-52"><a href="#cb394-52" aria-hidden="true"></a>This is a loose list</span> -<span id="cb394-53"><a href="#cb394-53" aria-hidden="true"></a></span> -<span id="cb394-54"><a href="#cb394-54" aria-hidden="true"></a>1. item</span> -<span id="cb394-55"><a href="#cb394-55" aria-hidden="true"></a></span> -<span id="cb394-56"><a href="#cb394-56" aria-hidden="true"></a>2. item</span> -<span id="cb394-57"><a href="#cb394-57" aria-hidden="true"></a></span> -<span id="cb394-58"><a href="#cb394-58" aria-hidden="true"></a>3. item</span> -<span id="cb394-59"><a href="#cb394-59" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb394-60"><a href="#cb394-60" aria-hidden="true"></a></span> -<span id="cb394-61"><a href="#cb394-61" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb395"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb395-1"><a href="#cb395-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb405"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb405-1"><a href="#cb405-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb405-2"><a href="#cb405-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb405-3"><a href="#cb405-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> +<span id="cb405-4"><a href="#cb405-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb405-5"><a href="#cb405-5" aria-hidden="true"></a></span> +<span id="cb405-6"><a href="#cb405-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb405-7"><a href="#cb405-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> +<span id="cb405-8"><a href="#cb405-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb405-9"><a href="#cb405-9" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb405-10"><a href="#cb405-10" aria-hidden="true"></a> the first</span> +<span id="cb405-11"><a href="#cb405-11" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb405-12"><a href="#cb405-12" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb405-13"><a href="#cb405-13" aria-hidden="true"></a> , the second</span> +<span id="cb405-14"><a href="#cb405-14" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb405-15"><a href="#cb405-15" aria-hidden="true"></a> , and the third</span> +<span id="cb405-16"><a href="#cb405-16" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb405-17"><a href="#cb405-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb405-18"><a href="#cb405-18" aria-hidden="true"></a>}</span> +<span id="cb405-19"><a href="#cb405-19" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> +<span id="cb405-20"><a href="#cb405-20" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> +<span id="cb405-21"><a href="#cb405-21" aria-hidden="true"></a></span> +<span id="cb405-22"><a href="#cb405-22" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb405-23"><a href="#cb405-23" aria-hidden="true"></a>This is a tight list</span> +<span id="cb405-24"><a href="#cb405-24" aria-hidden="true"></a></span> +<span id="cb405-25"><a href="#cb405-25" aria-hidden="true"></a>1. item</span> +<span id="cb405-26"><a href="#cb405-26" aria-hidden="true"></a>2. item</span> +<span id="cb405-27"><a href="#cb405-27" aria-hidden="true"></a>3. item</span> +<span id="cb405-28"><a href="#cb405-28" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb405-29"><a href="#cb405-29" aria-hidden="true"></a></span> +<span id="cb405-30"><a href="#cb405-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb405-31"><a href="#cb405-31" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb405-32"><a href="#cb405-32" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb405-33"><a href="#cb405-33" aria-hidden="true"></a>}</span> +<span id="cb405-34"><a href="#cb405-34" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{<span class="fu">\startitemize</span>}</span> +<span id="cb405-35"><a href="#cb405-35" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb405-36"><a href="#cb405-36" aria-hidden="true"></a> <span class="fu">\sym</span>{#1.}</span> +<span id="cb405-37"><a href="#cb405-37" aria-hidden="true"></a> This is the</span> +<span id="cb405-38"><a href="#cb405-38" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb405-39"><a href="#cb405-39" aria-hidden="true"></a> first</span> +<span id="cb405-40"><a href="#cb405-40" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb405-41"><a href="#cb405-41" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb405-42"><a href="#cb405-42" aria-hidden="true"></a> second</span> +<span id="cb405-43"><a href="#cb405-43" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb405-44"><a href="#cb405-44" aria-hidden="true"></a> third</span> +<span id="cb405-45"><a href="#cb405-45" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb405-46"><a href="#cb405-46" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb405-47"><a href="#cb405-47" aria-hidden="true"></a>}</span> +<span id="cb405-48"><a href="#cb405-48" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> +<span id="cb405-49"><a href="#cb405-49" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{<span class="fu">\stopitemize</span>}</span> +<span id="cb405-50"><a href="#cb405-50" aria-hidden="true"></a></span> +<span id="cb405-51"><a href="#cb405-51" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb405-52"><a href="#cb405-52" aria-hidden="true"></a>This is a loose list</span> +<span id="cb405-53"><a href="#cb405-53" aria-hidden="true"></a></span> +<span id="cb405-54"><a href="#cb405-54" aria-hidden="true"></a>1. item</span> +<span id="cb405-55"><a href="#cb405-55" aria-hidden="true"></a></span> +<span id="cb405-56"><a href="#cb405-56" aria-hidden="true"></a>2. item</span> +<span id="cb405-57"><a href="#cb405-57" aria-hidden="true"></a></span> +<span id="cb405-58"><a href="#cb405-58" aria-hidden="true"></a>3. item</span> +<span id="cb405-59"><a href="#cb405-59" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb405-60"><a href="#cb405-60" aria-hidden="true"></a></span> +<span id="cb405-61"><a href="#cb405-61" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb406"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb406-1"><a href="#cb406-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -5029,86 +5113,86 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererDlEndTight</code> macro represents the end of a definition list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <code>false</code>. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-26">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb396"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb396-1"><a href="#cb396-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb396-2"><a href="#cb396-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> -<span id="cb396-3"><a href="#cb396-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb396-4"><a href="#cb396-4" aria-hidden="true"></a></span> -<span id="cb396-5"><a href="#cb396-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb396-6"><a href="#cb396-6" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb396-7"><a href="#cb396-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb396-8"><a href="#cb396-8" aria-hidden="true"></a>}</span> -<span id="cb396-9"><a href="#cb396-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{<span class="co">%</span></span> -<span id="cb396-10"><a href="#cb396-10" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb396-11"><a href="#cb396-11" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</span> -<span id="cb396-12"><a href="#cb396-12" aria-hidden="true"></a>}</span> -<span id="cb396-13"><a href="#cb396-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb396-14"><a href="#cb396-14" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> -<span id="cb396-15"><a href="#cb396-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb396-16"><a href="#cb396-16" aria-hidden="true"></a> ,</span> -<span id="cb396-17"><a href="#cb396-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb396-18"><a href="#cb396-18" aria-hidden="true"></a> , and</span> -<span id="cb396-19"><a href="#cb396-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb396-20"><a href="#cb396-20" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb396-21"><a href="#cb396-21" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb396-22"><a href="#cb396-22" aria-hidden="true"></a>}</span> -<span id="cb396-23"><a href="#cb396-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb396-24"><a href="#cb396-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\par</span>--<span class="fu">\kern</span> 0.5em}</span> -<span id="cb396-25"><a href="#cb396-25" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{<span class="fu">\endgroup</span>}</span> -<span id="cb396-26"><a href="#cb396-26" aria-hidden="true"></a></span> -<span id="cb396-27"><a href="#cb396-27" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb396-28"><a href="#cb396-28" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb396-29"><a href="#cb396-29" aria-hidden="true"></a></span> -<span id="cb396-30"><a href="#cb396-30" aria-hidden="true"></a>Coffee</span> -<span id="cb396-31"><a href="#cb396-31" aria-hidden="true"></a>: black hot drink</span> -<span id="cb396-32"><a href="#cb396-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb396-33"><a href="#cb396-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb396-34"><a href="#cb396-34" aria-hidden="true"></a></span> -<span id="cb396-35"><a href="#cb396-35" aria-hidden="true"></a>Milk</span> -<span id="cb396-36"><a href="#cb396-36" aria-hidden="true"></a>: white cold drink</span> -<span id="cb396-37"><a href="#cb396-37" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb396-38"><a href="#cb396-38" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb396-39"><a href="#cb396-39" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb396-40"><a href="#cb396-40" aria-hidden="true"></a></span> -<span id="cb396-41"><a href="#cb396-41" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb396-42"><a href="#cb396-42" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb396-43"><a href="#cb396-43" aria-hidden="true"></a>}</span> -<span id="cb396-44"><a href="#cb396-44" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> -<span id="cb396-45"><a href="#cb396-45" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb396-46"><a href="#cb396-46" aria-hidden="true"></a> . #1 is a</span> -<span id="cb396-47"><a href="#cb396-47" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb396-48"><a href="#cb396-48" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb396-49"><a href="#cb396-49" aria-hidden="true"></a> ,</span> -<span id="cb396-50"><a href="#cb396-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb396-51"><a href="#cb396-51" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb396-52"><a href="#cb396-52" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb396-53"><a href="#cb396-53" aria-hidden="true"></a>}</span> -<span id="cb396-54"><a href="#cb396-54" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb396-55"><a href="#cb396-55" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> -<span id="cb396-56"><a href="#cb396-56" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> -<span id="cb396-57"><a href="#cb396-57" aria-hidden="true"></a></span> -<span id="cb396-58"><a href="#cb396-58" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb396-59"><a href="#cb396-59" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb396-60"><a href="#cb396-60" aria-hidden="true"></a></span> -<span id="cb396-61"><a href="#cb396-61" aria-hidden="true"></a>Coffee</span> -<span id="cb396-62"><a href="#cb396-62" aria-hidden="true"></a></span> -<span id="cb396-63"><a href="#cb396-63" aria-hidden="true"></a>: black hot drink</span> -<span id="cb396-64"><a href="#cb396-64" aria-hidden="true"></a></span> -<span id="cb396-65"><a href="#cb396-65" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb396-66"><a href="#cb396-66" aria-hidden="true"></a></span> -<span id="cb396-67"><a href="#cb396-67" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb396-68"><a href="#cb396-68" aria-hidden="true"></a></span> -<span id="cb396-69"><a href="#cb396-69" aria-hidden="true"></a>Milk</span> -<span id="cb396-70"><a href="#cb396-70" aria-hidden="true"></a></span> -<span id="cb396-71"><a href="#cb396-71" aria-hidden="true"></a>: white cold drink</span> -<span id="cb396-72"><a href="#cb396-72" aria-hidden="true"></a></span> -<span id="cb396-73"><a href="#cb396-73" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb396-74"><a href="#cb396-74" aria-hidden="true"></a></span> -<span id="cb396-75"><a href="#cb396-75" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb396-76"><a href="#cb396-76" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb396-77"><a href="#cb396-77" aria-hidden="true"></a></span> -<span id="cb396-78"><a href="#cb396-78" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb397"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb397-1"><a href="#cb397-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb407"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb407-1"><a href="#cb407-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb407-2"><a href="#cb407-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> +<span id="cb407-3"><a href="#cb407-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb407-4"><a href="#cb407-4" aria-hidden="true"></a></span> +<span id="cb407-5"><a href="#cb407-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb407-6"><a href="#cb407-6" aria-hidden="true"></a> :<span class="co">%</span></span> +<span id="cb407-7"><a href="#cb407-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb407-8"><a href="#cb407-8" aria-hidden="true"></a>}</span> +<span id="cb407-9"><a href="#cb407-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{<span class="co">%</span></span> +<span id="cb407-10"><a href="#cb407-10" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> +<span id="cb407-11"><a href="#cb407-11" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</span> +<span id="cb407-12"><a href="#cb407-12" aria-hidden="true"></a>}</span> +<span id="cb407-13"><a href="#cb407-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb407-14"><a href="#cb407-14" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> +<span id="cb407-15"><a href="#cb407-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb407-16"><a href="#cb407-16" aria-hidden="true"></a> ,</span> +<span id="cb407-17"><a href="#cb407-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb407-18"><a href="#cb407-18" aria-hidden="true"></a> , and</span> +<span id="cb407-19"><a href="#cb407-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> +<span id="cb407-20"><a href="#cb407-20" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb407-21"><a href="#cb407-21" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb407-22"><a href="#cb407-22" aria-hidden="true"></a>}</span> +<span id="cb407-23"><a href="#cb407-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> +<span id="cb407-24"><a href="#cb407-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\par</span>--<span class="fu">\kern</span> 0.5em}</span> +<span id="cb407-25"><a href="#cb407-25" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{<span class="fu">\endgroup</span>}</span> +<span id="cb407-26"><a href="#cb407-26" aria-hidden="true"></a></span> +<span id="cb407-27"><a href="#cb407-27" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb407-28"><a href="#cb407-28" aria-hidden="true"></a>This is a tight definition list</span> +<span id="cb407-29"><a href="#cb407-29" aria-hidden="true"></a></span> +<span id="cb407-30"><a href="#cb407-30" aria-hidden="true"></a>Coffee</span> +<span id="cb407-31"><a href="#cb407-31" aria-hidden="true"></a>: black hot drink</span> +<span id="cb407-32"><a href="#cb407-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb407-33"><a href="#cb407-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb407-34"><a href="#cb407-34" aria-hidden="true"></a></span> +<span id="cb407-35"><a href="#cb407-35" aria-hidden="true"></a>Milk</span> +<span id="cb407-36"><a href="#cb407-36" aria-hidden="true"></a>: white cold drink</span> +<span id="cb407-37"><a href="#cb407-37" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb407-38"><a href="#cb407-38" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb407-39"><a href="#cb407-39" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb407-40"><a href="#cb407-40" aria-hidden="true"></a></span> +<span id="cb407-41"><a href="#cb407-41" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb407-42"><a href="#cb407-42" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb407-43"><a href="#cb407-43" aria-hidden="true"></a>}</span> +<span id="cb407-44"><a href="#cb407-44" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> +<span id="cb407-45"><a href="#cb407-45" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb407-46"><a href="#cb407-46" aria-hidden="true"></a> . #1 is a</span> +<span id="cb407-47"><a href="#cb407-47" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb407-48"><a href="#cb407-48" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb407-49"><a href="#cb407-49" aria-hidden="true"></a> ,</span> +<span id="cb407-50"><a href="#cb407-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> +<span id="cb407-51"><a href="#cb407-51" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb407-52"><a href="#cb407-52" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb407-53"><a href="#cb407-53" aria-hidden="true"></a>}</span> +<span id="cb407-54"><a href="#cb407-54" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> +<span id="cb407-55"><a href="#cb407-55" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> +<span id="cb407-56"><a href="#cb407-56" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> +<span id="cb407-57"><a href="#cb407-57" aria-hidden="true"></a></span> +<span id="cb407-58"><a href="#cb407-58" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb407-59"><a href="#cb407-59" aria-hidden="true"></a>This is a loose definition list</span> +<span id="cb407-60"><a href="#cb407-60" aria-hidden="true"></a></span> +<span id="cb407-61"><a href="#cb407-61" aria-hidden="true"></a>Coffee</span> +<span id="cb407-62"><a href="#cb407-62" aria-hidden="true"></a></span> +<span id="cb407-63"><a href="#cb407-63" aria-hidden="true"></a>: black hot drink</span> +<span id="cb407-64"><a href="#cb407-64" aria-hidden="true"></a></span> +<span id="cb407-65"><a href="#cb407-65" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb407-66"><a href="#cb407-66" aria-hidden="true"></a></span> +<span id="cb407-67"><a href="#cb407-67" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb407-68"><a href="#cb407-68" aria-hidden="true"></a></span> +<span id="cb407-69"><a href="#cb407-69" aria-hidden="true"></a>Milk</span> +<span id="cb407-70"><a href="#cb407-70" aria-hidden="true"></a></span> +<span id="cb407-71"><a href="#cb407-71" aria-hidden="true"></a>: white cold drink</span> +<span id="cb407-72"><a href="#cb407-72" aria-hidden="true"></a></span> +<span id="cb407-73"><a href="#cb407-73" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb407-74"><a href="#cb407-74" aria-hidden="true"></a></span> +<span id="cb407-75"><a href="#cb407-75" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb407-76"><a href="#cb407-76" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb407-77"><a href="#cb407-77" aria-hidden="true"></a></span> +<span id="cb407-78"><a href="#cb407-78" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb408"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb408-1"><a href="#cb408-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight definition list:</p> @@ -5126,90 +5210,90 @@ Thomas,Edison,1847</code></pre> </ul> <p>This is a loose definition list. Coffee is a black hot drink, prepared from roasted coffee beans, and one of the most traded agricultural commodities in the world. Milk is a white cold drink, nutrient-rich, and produced on an industrial scale.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-46"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-47"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb398"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb398-1"><a href="#cb398-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb398-2"><a href="#cb398-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</span> -<span id="cb398-3"><a href="#cb398-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb398-4"><a href="#cb398-4" aria-hidden="true"></a></span> -<span id="cb398-5"><a href="#cb398-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb398-6"><a href="#cb398-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb398-7"><a href="#cb398-7" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb398-8"><a href="#cb398-8" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb398-9"><a href="#cb398-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb398-10"><a href="#cb398-10" aria-hidden="true"></a> },</span> -<span id="cb398-11"><a href="#cb398-11" aria-hidden="true"></a> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</span> -<span id="cb398-12"><a href="#cb398-12" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> -<span id="cb398-13"><a href="#cb398-13" aria-hidden="true"></a> <span class="fu">\item</span>[#1]</span> -<span id="cb398-14"><a href="#cb398-14" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</span> -<span id="cb398-15"><a href="#cb398-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb398-16"><a href="#cb398-16" aria-hidden="true"></a> ,</span> -<span id="cb398-17"><a href="#cb398-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb398-18"><a href="#cb398-18" aria-hidden="true"></a> , and</span> -<span id="cb398-19"><a href="#cb398-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb398-20"><a href="#cb398-20" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb398-21"><a href="#cb398-21" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb398-22"><a href="#cb398-22" aria-hidden="true"></a> },</span> -<span id="cb398-23"><a href="#cb398-23" aria-hidden="true"></a> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> -<span id="cb398-24"><a href="#cb398-24" aria-hidden="true"></a> dlDefinitionBegin = <span class="fu">\item</span>,</span> -<span id="cb398-25"><a href="#cb398-25" aria-hidden="true"></a> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</span> -<span id="cb398-26"><a href="#cb398-26" aria-hidden="true"></a> },</span> -<span id="cb398-27"><a href="#cb398-27" aria-hidden="true"></a>}</span> -<span id="cb398-28"><a href="#cb398-28" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb398-29"><a href="#cb398-29" aria-hidden="true"></a></span> -<span id="cb398-30"><a href="#cb398-30" aria-hidden="true"></a>Coffee</span> -<span id="cb398-31"><a href="#cb398-31" aria-hidden="true"></a>: black hot drink</span> -<span id="cb398-32"><a href="#cb398-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb398-33"><a href="#cb398-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb398-34"><a href="#cb398-34" aria-hidden="true"></a></span> -<span id="cb398-35"><a href="#cb398-35" aria-hidden="true"></a>Milk</span> -<span id="cb398-36"><a href="#cb398-36" aria-hidden="true"></a>: white cold drink</span> -<span id="cb398-37"><a href="#cb398-37" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb398-38"><a href="#cb398-38" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb398-39"><a href="#cb398-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb398-40"><a href="#cb398-40" aria-hidden="true"></a></span> -<span id="cb398-41"><a href="#cb398-41" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb398-42"><a href="#cb398-42" aria-hidden="true"></a> renderers = {</span> -<span id="cb398-43"><a href="#cb398-43" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb398-44"><a href="#cb398-44" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb398-45"><a href="#cb398-45" aria-hidden="true"></a> },</span> -<span id="cb398-46"><a href="#cb398-46" aria-hidden="true"></a> dlBegin = {},</span> -<span id="cb398-47"><a href="#cb398-47" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> -<span id="cb398-48"><a href="#cb398-48" aria-hidden="true"></a> . #1 is a</span> -<span id="cb398-49"><a href="#cb398-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb398-50"><a href="#cb398-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb398-51"><a href="#cb398-51" aria-hidden="true"></a> ,</span> -<span id="cb398-52"><a href="#cb398-52" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb398-53"><a href="#cb398-53" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb398-54"><a href="#cb398-54" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb398-55"><a href="#cb398-55" aria-hidden="true"></a> },</span> -<span id="cb398-56"><a href="#cb398-56" aria-hidden="true"></a> dlItemEnd = {},</span> -<span id="cb398-57"><a href="#cb398-57" aria-hidden="true"></a> dlDefinitionEnd = {},</span> -<span id="cb398-58"><a href="#cb398-58" aria-hidden="true"></a> dlEnd = {.},</span> -<span id="cb398-59"><a href="#cb398-59" aria-hidden="true"></a> },</span> -<span id="cb398-60"><a href="#cb398-60" aria-hidden="true"></a>}</span> -<span id="cb398-61"><a href="#cb398-61" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb398-62"><a href="#cb398-62" aria-hidden="true"></a></span> -<span id="cb398-63"><a href="#cb398-63" aria-hidden="true"></a>Coffee</span> -<span id="cb398-64"><a href="#cb398-64" aria-hidden="true"></a></span> -<span id="cb398-65"><a href="#cb398-65" aria-hidden="true"></a>: black hot drink</span> -<span id="cb398-66"><a href="#cb398-66" aria-hidden="true"></a></span> -<span id="cb398-67"><a href="#cb398-67" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb398-68"><a href="#cb398-68" aria-hidden="true"></a></span> -<span id="cb398-69"><a href="#cb398-69" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb398-70"><a href="#cb398-70" aria-hidden="true"></a></span> -<span id="cb398-71"><a href="#cb398-71" aria-hidden="true"></a>Milk</span> -<span id="cb398-72"><a href="#cb398-72" aria-hidden="true"></a></span> -<span id="cb398-73"><a href="#cb398-73" aria-hidden="true"></a>: white cold drink</span> -<span id="cb398-74"><a href="#cb398-74" aria-hidden="true"></a></span> -<span id="cb398-75"><a href="#cb398-75" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb398-76"><a href="#cb398-76" aria-hidden="true"></a></span> -<span id="cb398-77"><a href="#cb398-77" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb398-78"><a href="#cb398-78" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb398-79"><a href="#cb398-79" aria-hidden="true"></a></span> -<span id="cb398-80"><a href="#cb398-80" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb399"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb399-1"><a href="#cb399-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb409"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb409-1"><a href="#cb409-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb409-2"><a href="#cb409-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</span> +<span id="cb409-3"><a href="#cb409-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb409-4"><a href="#cb409-4" aria-hidden="true"></a></span> +<span id="cb409-5"><a href="#cb409-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb409-6"><a href="#cb409-6" aria-hidden="true"></a> renderers = {</span> +<span id="cb409-7"><a href="#cb409-7" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb409-8"><a href="#cb409-8" aria-hidden="true"></a> :<span class="co">%</span></span> +<span id="cb409-9"><a href="#cb409-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb409-10"><a href="#cb409-10" aria-hidden="true"></a> },</span> +<span id="cb409-11"><a href="#cb409-11" aria-hidden="true"></a> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</span> +<span id="cb409-12"><a href="#cb409-12" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> +<span id="cb409-13"><a href="#cb409-13" aria-hidden="true"></a> <span class="fu">\item</span>[#1]</span> +<span id="cb409-14"><a href="#cb409-14" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</span> +<span id="cb409-15"><a href="#cb409-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb409-16"><a href="#cb409-16" aria-hidden="true"></a> ,</span> +<span id="cb409-17"><a href="#cb409-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb409-18"><a href="#cb409-18" aria-hidden="true"></a> , and</span> +<span id="cb409-19"><a href="#cb409-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> +<span id="cb409-20"><a href="#cb409-20" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb409-21"><a href="#cb409-21" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb409-22"><a href="#cb409-22" aria-hidden="true"></a> },</span> +<span id="cb409-23"><a href="#cb409-23" aria-hidden="true"></a> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> +<span id="cb409-24"><a href="#cb409-24" aria-hidden="true"></a> dlDefinitionBegin = <span class="fu">\item</span>,</span> +<span id="cb409-25"><a href="#cb409-25" aria-hidden="true"></a> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</span> +<span id="cb409-26"><a href="#cb409-26" aria-hidden="true"></a> },</span> +<span id="cb409-27"><a href="#cb409-27" aria-hidden="true"></a>}</span> +<span id="cb409-28"><a href="#cb409-28" aria-hidden="true"></a>This is a tight definition list</span> +<span id="cb409-29"><a href="#cb409-29" aria-hidden="true"></a></span> +<span id="cb409-30"><a href="#cb409-30" aria-hidden="true"></a>Coffee</span> +<span id="cb409-31"><a href="#cb409-31" aria-hidden="true"></a>: black hot drink</span> +<span id="cb409-32"><a href="#cb409-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb409-33"><a href="#cb409-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb409-34"><a href="#cb409-34" aria-hidden="true"></a></span> +<span id="cb409-35"><a href="#cb409-35" aria-hidden="true"></a>Milk</span> +<span id="cb409-36"><a href="#cb409-36" aria-hidden="true"></a>: white cold drink</span> +<span id="cb409-37"><a href="#cb409-37" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb409-38"><a href="#cb409-38" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb409-39"><a href="#cb409-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb409-40"><a href="#cb409-40" aria-hidden="true"></a></span> +<span id="cb409-41"><a href="#cb409-41" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb409-42"><a href="#cb409-42" aria-hidden="true"></a> renderers = {</span> +<span id="cb409-43"><a href="#cb409-43" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb409-44"><a href="#cb409-44" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb409-45"><a href="#cb409-45" aria-hidden="true"></a> },</span> +<span id="cb409-46"><a href="#cb409-46" aria-hidden="true"></a> dlBegin = {},</span> +<span id="cb409-47"><a href="#cb409-47" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> +<span id="cb409-48"><a href="#cb409-48" aria-hidden="true"></a> . #1 is a</span> +<span id="cb409-49"><a href="#cb409-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb409-50"><a href="#cb409-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb409-51"><a href="#cb409-51" aria-hidden="true"></a> ,</span> +<span id="cb409-52"><a href="#cb409-52" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> +<span id="cb409-53"><a href="#cb409-53" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb409-54"><a href="#cb409-54" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb409-55"><a href="#cb409-55" aria-hidden="true"></a> },</span> +<span id="cb409-56"><a href="#cb409-56" aria-hidden="true"></a> dlItemEnd = {},</span> +<span id="cb409-57"><a href="#cb409-57" aria-hidden="true"></a> dlDefinitionEnd = {},</span> +<span id="cb409-58"><a href="#cb409-58" aria-hidden="true"></a> dlEnd = {.},</span> +<span id="cb409-59"><a href="#cb409-59" aria-hidden="true"></a> },</span> +<span id="cb409-60"><a href="#cb409-60" aria-hidden="true"></a>}</span> +<span id="cb409-61"><a href="#cb409-61" aria-hidden="true"></a>This is a loose definition list</span> +<span id="cb409-62"><a href="#cb409-62" aria-hidden="true"></a></span> +<span id="cb409-63"><a href="#cb409-63" aria-hidden="true"></a>Coffee</span> +<span id="cb409-64"><a href="#cb409-64" aria-hidden="true"></a></span> +<span id="cb409-65"><a href="#cb409-65" aria-hidden="true"></a>: black hot drink</span> +<span id="cb409-66"><a href="#cb409-66" aria-hidden="true"></a></span> +<span id="cb409-67"><a href="#cb409-67" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb409-68"><a href="#cb409-68" aria-hidden="true"></a></span> +<span id="cb409-69"><a href="#cb409-69" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb409-70"><a href="#cb409-70" aria-hidden="true"></a></span> +<span id="cb409-71"><a href="#cb409-71" aria-hidden="true"></a>Milk</span> +<span id="cb409-72"><a href="#cb409-72" aria-hidden="true"></a></span> +<span id="cb409-73"><a href="#cb409-73" aria-hidden="true"></a>: white cold drink</span> +<span id="cb409-74"><a href="#cb409-74" aria-hidden="true"></a></span> +<span id="cb409-75"><a href="#cb409-75" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb409-76"><a href="#cb409-76" aria-hidden="true"></a></span> +<span id="cb409-77"><a href="#cb409-77" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb409-78"><a href="#cb409-78" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb409-79"><a href="#cb409-79" aria-hidden="true"></a></span> +<span id="cb409-80"><a href="#cb409-80" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb410"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb410-1"><a href="#cb410-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight definition list:</p> @@ -5229,85 +5313,85 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-38">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb400"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb400-1"><a href="#cb400-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb400-2"><a href="#cb400-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> -<span id="cb400-3"><a href="#cb400-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb400-4"><a href="#cb400-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb400-5"><a href="#cb400-5" aria-hidden="true"></a></span> -<span id="cb400-6"><a href="#cb400-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb400-7"><a href="#cb400-7" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb400-8"><a href="#cb400-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb400-9"><a href="#cb400-9" aria-hidden="true"></a>}</span> -<span id="cb400-10"><a href="#cb400-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{}</span> -<span id="cb400-11"><a href="#cb400-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb400-12"><a href="#cb400-12" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> -<span id="cb400-13"><a href="#cb400-13" aria-hidden="true"></a> <span class="fu">\startitemize</span></span> -<span id="cb400-14"><a href="#cb400-14" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb400-15"><a href="#cb400-15" aria-hidden="true"></a> ,</span> -<span id="cb400-16"><a href="#cb400-16" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb400-17"><a href="#cb400-17" aria-hidden="true"></a> , and</span> -<span id="cb400-18"><a href="#cb400-18" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb400-19"><a href="#cb400-19" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb400-20"><a href="#cb400-20" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb400-21"><a href="#cb400-21" aria-hidden="true"></a>}</span> -<span id="cb400-22"><a href="#cb400-22" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb400-23"><a href="#cb400-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\item</span>}</span> -<span id="cb400-24"><a href="#cb400-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{}</span> -<span id="cb400-25"><a href="#cb400-25" aria-hidden="true"></a></span> -<span id="cb400-26"><a href="#cb400-26" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb400-27"><a href="#cb400-27" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb400-28"><a href="#cb400-28" aria-hidden="true"></a></span> -<span id="cb400-29"><a href="#cb400-29" aria-hidden="true"></a>Coffee</span> -<span id="cb400-30"><a href="#cb400-30" aria-hidden="true"></a>: black hot drink</span> -<span id="cb400-31"><a href="#cb400-31" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb400-32"><a href="#cb400-32" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb400-33"><a href="#cb400-33" aria-hidden="true"></a></span> -<span id="cb400-34"><a href="#cb400-34" aria-hidden="true"></a>Milk</span> -<span id="cb400-35"><a href="#cb400-35" aria-hidden="true"></a>: white cold drink</span> -<span id="cb400-36"><a href="#cb400-36" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb400-37"><a href="#cb400-37" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb400-38"><a href="#cb400-38" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb400-39"><a href="#cb400-39" aria-hidden="true"></a></span> -<span id="cb400-40"><a href="#cb400-40" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb400-41"><a href="#cb400-41" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb400-42"><a href="#cb400-42" aria-hidden="true"></a>}</span> -<span id="cb400-43"><a href="#cb400-43" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> -<span id="cb400-44"><a href="#cb400-44" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb400-45"><a href="#cb400-45" aria-hidden="true"></a> . #1 is a</span> -<span id="cb400-46"><a href="#cb400-46" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb400-47"><a href="#cb400-47" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb400-48"><a href="#cb400-48" aria-hidden="true"></a> ,</span> -<span id="cb400-49"><a href="#cb400-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb400-50"><a href="#cb400-50" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb400-51"><a href="#cb400-51" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb400-52"><a href="#cb400-52" aria-hidden="true"></a>}</span> -<span id="cb400-53"><a href="#cb400-53" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb400-54"><a href="#cb400-54" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> -<span id="cb400-55"><a href="#cb400-55" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> -<span id="cb400-56"><a href="#cb400-56" aria-hidden="true"></a></span> -<span id="cb400-57"><a href="#cb400-57" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb400-58"><a href="#cb400-58" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb400-59"><a href="#cb400-59" aria-hidden="true"></a></span> -<span id="cb400-60"><a href="#cb400-60" aria-hidden="true"></a>Coffee</span> -<span id="cb400-61"><a href="#cb400-61" aria-hidden="true"></a></span> -<span id="cb400-62"><a href="#cb400-62" aria-hidden="true"></a>: black hot drink</span> -<span id="cb400-63"><a href="#cb400-63" aria-hidden="true"></a></span> -<span id="cb400-64"><a href="#cb400-64" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb400-65"><a href="#cb400-65" aria-hidden="true"></a></span> -<span id="cb400-66"><a href="#cb400-66" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb400-67"><a href="#cb400-67" aria-hidden="true"></a></span> -<span id="cb400-68"><a href="#cb400-68" aria-hidden="true"></a>Milk</span> -<span id="cb400-69"><a href="#cb400-69" aria-hidden="true"></a></span> -<span id="cb400-70"><a href="#cb400-70" aria-hidden="true"></a>: white cold drink</span> -<span id="cb400-71"><a href="#cb400-71" aria-hidden="true"></a></span> -<span id="cb400-72"><a href="#cb400-72" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb400-73"><a href="#cb400-73" aria-hidden="true"></a></span> -<span id="cb400-74"><a href="#cb400-74" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb400-75"><a href="#cb400-75" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb400-76"><a href="#cb400-76" aria-hidden="true"></a></span> -<span id="cb400-77"><a href="#cb400-77" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb401"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb401-1"><a href="#cb401-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb411"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb411-1"><a href="#cb411-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb411-2"><a href="#cb411-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> +<span id="cb411-3"><a href="#cb411-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb411-4"><a href="#cb411-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb411-5"><a href="#cb411-5" aria-hidden="true"></a></span> +<span id="cb411-6"><a href="#cb411-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb411-7"><a href="#cb411-7" aria-hidden="true"></a> :<span class="co">%</span></span> +<span id="cb411-8"><a href="#cb411-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb411-9"><a href="#cb411-9" aria-hidden="true"></a>}</span> +<span id="cb411-10"><a href="#cb411-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{}</span> +<span id="cb411-11"><a href="#cb411-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb411-12"><a href="#cb411-12" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> +<span id="cb411-13"><a href="#cb411-13" aria-hidden="true"></a> <span class="fu">\startitemize</span></span> +<span id="cb411-14"><a href="#cb411-14" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb411-15"><a href="#cb411-15" aria-hidden="true"></a> ,</span> +<span id="cb411-16"><a href="#cb411-16" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb411-17"><a href="#cb411-17" aria-hidden="true"></a> , and</span> +<span id="cb411-18"><a href="#cb411-18" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> +<span id="cb411-19"><a href="#cb411-19" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb411-20"><a href="#cb411-20" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb411-21"><a href="#cb411-21" aria-hidden="true"></a>}</span> +<span id="cb411-22"><a href="#cb411-22" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{<span class="fu">\stopitemize</span>}</span> +<span id="cb411-23"><a href="#cb411-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\item</span>}</span> +<span id="cb411-24"><a href="#cb411-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{}</span> +<span id="cb411-25"><a href="#cb411-25" aria-hidden="true"></a></span> +<span id="cb411-26"><a href="#cb411-26" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb411-27"><a href="#cb411-27" aria-hidden="true"></a>This is a tight definition list</span> +<span id="cb411-28"><a href="#cb411-28" aria-hidden="true"></a></span> +<span id="cb411-29"><a href="#cb411-29" aria-hidden="true"></a>Coffee</span> +<span id="cb411-30"><a href="#cb411-30" aria-hidden="true"></a>: black hot drink</span> +<span id="cb411-31"><a href="#cb411-31" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb411-32"><a href="#cb411-32" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb411-33"><a href="#cb411-33" aria-hidden="true"></a></span> +<span id="cb411-34"><a href="#cb411-34" aria-hidden="true"></a>Milk</span> +<span id="cb411-35"><a href="#cb411-35" aria-hidden="true"></a>: white cold drink</span> +<span id="cb411-36"><a href="#cb411-36" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb411-37"><a href="#cb411-37" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb411-38"><a href="#cb411-38" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb411-39"><a href="#cb411-39" aria-hidden="true"></a></span> +<span id="cb411-40"><a href="#cb411-40" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb411-41"><a href="#cb411-41" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb411-42"><a href="#cb411-42" aria-hidden="true"></a>}</span> +<span id="cb411-43"><a href="#cb411-43" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> +<span id="cb411-44"><a href="#cb411-44" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb411-45"><a href="#cb411-45" aria-hidden="true"></a> . #1 is a</span> +<span id="cb411-46"><a href="#cb411-46" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb411-47"><a href="#cb411-47" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb411-48"><a href="#cb411-48" aria-hidden="true"></a> ,</span> +<span id="cb411-49"><a href="#cb411-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> +<span id="cb411-50"><a href="#cb411-50" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb411-51"><a href="#cb411-51" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb411-52"><a href="#cb411-52" aria-hidden="true"></a>}</span> +<span id="cb411-53"><a href="#cb411-53" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> +<span id="cb411-54"><a href="#cb411-54" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> +<span id="cb411-55"><a href="#cb411-55" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> +<span id="cb411-56"><a href="#cb411-56" aria-hidden="true"></a></span> +<span id="cb411-57"><a href="#cb411-57" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb411-58"><a href="#cb411-58" aria-hidden="true"></a>This is a loose definition list</span> +<span id="cb411-59"><a href="#cb411-59" aria-hidden="true"></a></span> +<span id="cb411-60"><a href="#cb411-60" aria-hidden="true"></a>Coffee</span> +<span id="cb411-61"><a href="#cb411-61" aria-hidden="true"></a></span> +<span id="cb411-62"><a href="#cb411-62" aria-hidden="true"></a>: black hot drink</span> +<span id="cb411-63"><a href="#cb411-63" aria-hidden="true"></a></span> +<span id="cb411-64"><a href="#cb411-64" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb411-65"><a href="#cb411-65" aria-hidden="true"></a></span> +<span id="cb411-66"><a href="#cb411-66" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb411-67"><a href="#cb411-67" aria-hidden="true"></a></span> +<span id="cb411-68"><a href="#cb411-68" aria-hidden="true"></a>Milk</span> +<span id="cb411-69"><a href="#cb411-69" aria-hidden="true"></a></span> +<span id="cb411-70"><a href="#cb411-70" aria-hidden="true"></a>: white cold drink</span> +<span id="cb411-71"><a href="#cb411-71" aria-hidden="true"></a></span> +<span id="cb411-72"><a href="#cb411-72" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb411-73"><a href="#cb411-73" aria-hidden="true"></a></span> +<span id="cb411-74"><a href="#cb411-74" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb411-75"><a href="#cb411-75" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb411-76"><a href="#cb411-76" aria-hidden="true"></a></span> +<span id="cb411-77"><a href="#cb411-77" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb412"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb412-1"><a href="#cb412-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight definition list:</p> @@ -5329,41 +5413,41 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererEmphasis</code> macro represents an emphasized span of text. The macro receives a single argument that corresponds to the emphasized span of text.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-27">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb402"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb402-1"><a href="#cb402-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb402-2"><a href="#cb402-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{{<span class="fu">\it</span>#1}}</span> -<span id="cb402-3"><a href="#cb402-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{{<span class="fu">\bf</span>#1}}</span> -<span id="cb402-4"><a href="#cb402-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb402-5"><a href="#cb402-5" aria-hidden="true"></a>This is *emphasis*.</span> -<span id="cb402-6"><a href="#cb402-6" aria-hidden="true"></a></span> -<span id="cb402-7"><a href="#cb402-7" aria-hidden="true"></a>This is **strong emphasis**.</span> -<span id="cb402-8"><a href="#cb402-8" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb402-9"><a href="#cb402-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb413"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb413-1"><a href="#cb413-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb413-2"><a href="#cb413-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{{<span class="fu">\it</span>#1}}</span> +<span id="cb413-3"><a href="#cb413-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{{<span class="fu">\bf</span>#1}}</span> +<span id="cb413-4"><a href="#cb413-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb413-5"><a href="#cb413-5" aria-hidden="true"></a>This is *emphasis*.</span> +<span id="cb413-6"><a href="#cb413-6" aria-hidden="true"></a></span> +<span id="cb413-7"><a href="#cb413-7" aria-hidden="true"></a>This is **strong emphasis**.</span> +<span id="cb413-8"><a href="#cb413-8" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb413-9"><a href="#cb413-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb403"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb403-1"><a href="#cb403-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb414"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb414-1"><a href="#cb414-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <em>emphasis</em>.</p> <p>This is <strong>strong emphasis</strong>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-47"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-48"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb404"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb404-1"><a href="#cb404-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb404-2"><a href="#cb404-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb404-3"><a href="#cb404-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb404-4"><a href="#cb404-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb404-5"><a href="#cb404-5" aria-hidden="true"></a> emphasis = {<span class="fu">\emph</span>{#1}},</span> -<span id="cb404-6"><a href="#cb404-6" aria-hidden="true"></a> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</span> -<span id="cb404-7"><a href="#cb404-7" aria-hidden="true"></a> },</span> -<span id="cb404-8"><a href="#cb404-8" aria-hidden="true"></a>}</span> -<span id="cb404-9"><a href="#cb404-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb404-10"><a href="#cb404-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb404-11"><a href="#cb404-11" aria-hidden="true"></a>This is *emphasis*.</span> -<span id="cb404-12"><a href="#cb404-12" aria-hidden="true"></a></span> -<span id="cb404-13"><a href="#cb404-13" aria-hidden="true"></a>This is **strong emphasis**.</span> -<span id="cb404-14"><a href="#cb404-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb404-15"><a href="#cb404-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb405"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb405-1"><a href="#cb405-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb415"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb415-1"><a href="#cb415-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb415-2"><a href="#cb415-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb415-3"><a href="#cb415-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb415-4"><a href="#cb415-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb415-5"><a href="#cb415-5" aria-hidden="true"></a> emphasis = {<span class="fu">\emph</span>{#1}},</span> +<span id="cb415-6"><a href="#cb415-6" aria-hidden="true"></a> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</span> +<span id="cb415-7"><a href="#cb415-7" aria-hidden="true"></a> },</span> +<span id="cb415-8"><a href="#cb415-8" aria-hidden="true"></a>}</span> +<span id="cb415-9"><a href="#cb415-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb415-10"><a href="#cb415-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb415-11"><a href="#cb415-11" aria-hidden="true"></a>This is *emphasis*.</span> +<span id="cb415-12"><a href="#cb415-12" aria-hidden="true"></a></span> +<span id="cb415-13"><a href="#cb415-13" aria-hidden="true"></a>This is **strong emphasis**.</span> +<span id="cb415-14"><a href="#cb415-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb415-15"><a href="#cb415-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb416"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb416-1"><a href="#cb416-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <em>emphasis</em>.</p> @@ -5371,18 +5455,18 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-39">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb406"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb406-1"><a href="#cb406-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb406-2"><a href="#cb406-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{<span class="fu">\emph</span>{#1}}</span> -<span id="cb406-3"><a href="#cb406-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{<span class="fu">\bold</span>{#1}}</span> -<span id="cb406-4"><a href="#cb406-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb406-5"><a href="#cb406-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb406-6"><a href="#cb406-6" aria-hidden="true"></a>This is *emphasis*.</span> -<span id="cb406-7"><a href="#cb406-7" aria-hidden="true"></a></span> -<span id="cb406-8"><a href="#cb406-8" aria-hidden="true"></a>This is **strong emphasis**.</span> -<span id="cb406-9"><a href="#cb406-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb406-10"><a href="#cb406-10" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb417"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb417-1"><a href="#cb417-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb417-2"><a href="#cb417-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{<span class="fu">\emph</span>{#1}}</span> +<span id="cb417-3"><a href="#cb417-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{<span class="fu">\bold</span>{#1}}</span> +<span id="cb417-4"><a href="#cb417-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb417-5"><a href="#cb417-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb417-6"><a href="#cb417-6" aria-hidden="true"></a>This is *emphasis*.</span> +<span id="cb417-7"><a href="#cb417-7" aria-hidden="true"></a></span> +<span id="cb417-8"><a href="#cb417-8" aria-hidden="true"></a>This is **strong emphasis**.</span> +<span id="cb417-9"><a href="#cb417-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb417-10"><a href="#cb417-10" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb407"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb407-1"><a href="#cb407-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb418"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb418-1"><a href="#cb418-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <em>emphasis</em>.</p> @@ -5394,29 +5478,29 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererBlockQuoteEnd</code> macro represents the end of a block quote. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-28">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb408"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb408-1"><a href="#cb408-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb408-2"><a href="#cb408-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="co">%</span></span> -<span id="cb408-3"><a href="#cb408-3" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb408-4"><a href="#cb408-4" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> -<span id="cb408-5"><a href="#cb408-5" aria-hidden="true"></a> <span class="fu">\leftskip</span>=2<span class="fu">\parindent</span></span> -<span id="cb408-6"><a href="#cb408-6" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</span> -<span id="cb408-7"><a href="#cb408-7" aria-hidden="true"></a>}</span> -<span id="cb408-8"><a href="#cb408-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="co">%</span></span> -<span id="cb408-9"><a href="#cb408-9" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb408-10"><a href="#cb408-10" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> -<span id="cb408-11"><a href="#cb408-11" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> -<span id="cb408-12"><a href="#cb408-12" aria-hidden="true"></a>}</span> -<span id="cb408-13"><a href="#cb408-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb408-14"><a href="#cb408-14" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb408-15"><a href="#cb408-15" aria-hidden="true"></a></span> -<span id="cb408-16"><a href="#cb408-16" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb408-17"><a href="#cb408-17" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb408-18"><a href="#cb408-18" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb408-19"><a href="#cb408-19" aria-hidden="true"></a>> stars [...]</span> -<span id="cb408-20"><a href="#cb408-20" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb408-21"><a href="#cb408-21" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb409"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb409-1"><a href="#cb409-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb419"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb419-1"><a href="#cb419-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb419-2"><a href="#cb419-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="co">%</span></span> +<span id="cb419-3"><a href="#cb419-3" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> +<span id="cb419-4"><a href="#cb419-4" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> +<span id="cb419-5"><a href="#cb419-5" aria-hidden="true"></a> <span class="fu">\leftskip</span>=2<span class="fu">\parindent</span></span> +<span id="cb419-6"><a href="#cb419-6" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</span> +<span id="cb419-7"><a href="#cb419-7" aria-hidden="true"></a>}</span> +<span id="cb419-8"><a href="#cb419-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="co">%</span></span> +<span id="cb419-9"><a href="#cb419-9" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb419-10"><a href="#cb419-10" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> +<span id="cb419-11"><a href="#cb419-11" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> +<span id="cb419-12"><a href="#cb419-12" aria-hidden="true"></a>}</span> +<span id="cb419-13"><a href="#cb419-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb419-14"><a href="#cb419-14" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> +<span id="cb419-15"><a href="#cb419-15" aria-hidden="true"></a></span> +<span id="cb419-16"><a href="#cb419-16" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> +<span id="cb419-17"><a href="#cb419-17" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> +<span id="cb419-18"><a href="#cb419-18" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> +<span id="cb419-19"><a href="#cb419-19" aria-hidden="true"></a>> stars [...]</span> +<span id="cb419-20"><a href="#cb419-20" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb419-21"><a href="#cb419-21" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb420"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb420-1"><a href="#cb420-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A quote from William Shakespeare’s King Lear:</p> @@ -5424,28 +5508,28 @@ Thomas,Edison,1847</code></pre> <p>This is the excellent foppery of the world that when we are sick in fortune—often the surfeit of our own behavior—we make guilty of our disasters the sun, the moon, and the stars […]</p> </blockquote> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-48"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-49"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb410"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb410-1"><a href="#cb410-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb410-2"><a href="#cb410-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb410-3"><a href="#cb410-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb410-4"><a href="#cb410-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb410-5"><a href="#cb410-5" aria-hidden="true"></a> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span> -<span id="cb410-6"><a href="#cb410-6" aria-hidden="true"></a> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span> -<span id="cb410-7"><a href="#cb410-7" aria-hidden="true"></a> },</span> -<span id="cb410-8"><a href="#cb410-8" aria-hidden="true"></a>}</span> -<span id="cb410-9"><a href="#cb410-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb410-10"><a href="#cb410-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb410-11"><a href="#cb410-11" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb410-12"><a href="#cb410-12" aria-hidden="true"></a></span> -<span id="cb410-13"><a href="#cb410-13" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb410-14"><a href="#cb410-14" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb410-15"><a href="#cb410-15" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb410-16"><a href="#cb410-16" aria-hidden="true"></a>> stars [...]</span> -<span id="cb410-17"><a href="#cb410-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb410-18"><a href="#cb410-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb411"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb411-1"><a href="#cb411-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb421"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb421-1"><a href="#cb421-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb421-2"><a href="#cb421-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb421-3"><a href="#cb421-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb421-4"><a href="#cb421-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb421-5"><a href="#cb421-5" aria-hidden="true"></a> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span> +<span id="cb421-6"><a href="#cb421-6" aria-hidden="true"></a> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span> +<span id="cb421-7"><a href="#cb421-7" aria-hidden="true"></a> },</span> +<span id="cb421-8"><a href="#cb421-8" aria-hidden="true"></a>}</span> +<span id="cb421-9"><a href="#cb421-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb421-10"><a href="#cb421-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb421-11"><a href="#cb421-11" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> +<span id="cb421-12"><a href="#cb421-12" aria-hidden="true"></a></span> +<span id="cb421-13"><a href="#cb421-13" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> +<span id="cb421-14"><a href="#cb421-14" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> +<span id="cb421-15"><a href="#cb421-15" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> +<span id="cb421-16"><a href="#cb421-16" aria-hidden="true"></a>> stars [...]</span> +<span id="cb421-17"><a href="#cb421-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb421-18"><a href="#cb421-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb422"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb422-1"><a href="#cb422-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A quote from William Shakespeare’s King Lear:</p> @@ -5455,21 +5539,21 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-40">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb412"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb412-1"><a href="#cb412-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb412-2"><a href="#cb412-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="fu">\startquotation</span>}</span> -<span id="cb412-3"><a href="#cb412-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="fu">\stopquotation</span>}</span> -<span id="cb412-4"><a href="#cb412-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb412-5"><a href="#cb412-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb412-6"><a href="#cb412-6" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb412-7"><a href="#cb412-7" aria-hidden="true"></a></span> -<span id="cb412-8"><a href="#cb412-8" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb412-9"><a href="#cb412-9" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb412-10"><a href="#cb412-10" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb412-11"><a href="#cb412-11" aria-hidden="true"></a>> stars [...]</span> -<span id="cb412-12"><a href="#cb412-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb412-13"><a href="#cb412-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb423"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb423-1"><a href="#cb423-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb423-2"><a href="#cb423-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="fu">\startquotation</span>}</span> +<span id="cb423-3"><a href="#cb423-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="fu">\stopquotation</span>}</span> +<span id="cb423-4"><a href="#cb423-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb423-5"><a href="#cb423-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb423-6"><a href="#cb423-6" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> +<span id="cb423-7"><a href="#cb423-7" aria-hidden="true"></a></span> +<span id="cb423-8"><a href="#cb423-8" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> +<span id="cb423-9"><a href="#cb423-9" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> +<span id="cb423-10"><a href="#cb423-10" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> +<span id="cb423-11"><a href="#cb423-11" aria-hidden="true"></a>> stars [...]</span> +<span id="cb423-12"><a href="#cb423-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb423-13"><a href="#cb423-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb413"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb413-1"><a href="#cb413-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb424"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb424-1"><a href="#cb424-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A quote from William Shakespeare’s King Lear:</p> @@ -5480,73 +5564,73 @@ Thomas,Edison,1847</code></pre> <h4 data-number="2.3.1.16" id="code-block-renderers"><span class="header-section-number">2.3.1.16</span> Code Block Renderers</h4> <p>The <code>\markdownRendererInputVerbatim</code> macro represents a code block. The macro receives a single argument that corresponds to the filename of a file contaning the code block contents.</p> <p>The <code>\markdownRendererInputFencedCode</code> macro represents a fenced code block. This macro will only be produced, when the <strong><code>fencedCode</code></strong> option is enabled. The macro receives two arguments that correspond to the filename of a file contaning the code block contents and to the code fence infostring.</p> -<h5 class="unnumbered" data-number="" id="latex-example-49"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-50"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb414"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb414-1"><a href="#cb414-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb414-2"><a href="#cb414-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span> -<span id="cb414-3"><a href="#cb414-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</span> -<span id="cb414-4"><a href="#cb414-4" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> -<span id="cb414-5"><a href="#cb414-5" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb414-6"><a href="#cb414-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb414-7"><a href="#cb414-7" aria-hidden="true"></a> interblockSeparator = {</span> -<span id="cb414-8"><a href="#cb414-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb414-9"><a href="#cb414-9" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb414-10"><a href="#cb414-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb414-11"><a href="#cb414-11" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb414-12"><a href="#cb414-12" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb414-13"><a href="#cb414-13" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb414-14"><a href="#cb414-14" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb414-15"><a href="#cb414-15" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb414-16"><a href="#cb414-16" aria-hidden="true"></a> },</span> -<span id="cb414-17"><a href="#cb414-17" aria-hidden="true"></a> inputVerbatim = {</span> -<span id="cb414-18"><a href="#cb414-18" aria-hidden="true"></a> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></span> -<span id="cb414-19"><a href="#cb414-19" aria-hidden="true"></a> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></span> -<span id="cb414-20"><a href="#cb414-20" aria-hidden="true"></a> },</span> -<span id="cb414-21"><a href="#cb414-21" aria-hidden="true"></a> inputFencedCode = {</span> -<span id="cb414-22"><a href="#cb414-22" aria-hidden="true"></a> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></span> -<span id="cb414-23"><a href="#cb414-23" aria-hidden="true"></a> },</span> -<span id="cb414-24"><a href="#cb414-24" aria-hidden="true"></a> },</span> -<span id="cb414-25"><a href="#cb414-25" aria-hidden="true"></a>}</span> -<span id="cb414-26"><a href="#cb414-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb414-27"><a href="#cb414-27" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb414-28"><a href="#cb414-28" aria-hidden="true"></a>The following code</span> -<span id="cb414-29"><a href="#cb414-29" aria-hidden="true"></a></span> -<span id="cb414-30"><a href="#cb414-30" aria-hidden="true"></a> def foo(bar):</span> -<span id="cb414-31"><a href="#cb414-31" aria-hidden="true"></a> if len(bar) <= 1:</span> -<span id="cb414-32"><a href="#cb414-32" aria-hidden="true"></a> return bar[0]</span> -<span id="cb414-33"><a href="#cb414-33" aria-hidden="true"></a> elif len(bar) == 2:</span> -<span id="cb414-34"><a href="#cb414-34" aria-hidden="true"></a> return sorted(bar)</span> -<span id="cb414-35"><a href="#cb414-35" aria-hidden="true"></a> else:</span> -<span id="cb414-36"><a href="#cb414-36" aria-hidden="true"></a> baz = len(bar) // 2</span> -<span id="cb414-37"><a href="#cb414-37" aria-hidden="true"></a> return foo(bar[baz:], bar[:baz])</span> -<span id="cb414-38"><a href="#cb414-38" aria-hidden="true"></a></span> -<span id="cb414-39"><a href="#cb414-39" aria-hidden="true"></a>The following code</span> -<span id="cb414-40"><a href="#cb414-40" aria-hidden="true"></a></span> -<span id="cb414-41"><a href="#cb414-41" aria-hidden="true"></a>~~~ Python</span> -<span id="cb414-42"><a href="#cb414-42" aria-hidden="true"></a>>>> foo([4, 2, 1, 3])</span> -<span id="cb414-43"><a href="#cb414-43" aria-hidden="true"></a>[1, 2, 3, 4]</span> -<span id="cb414-44"><a href="#cb414-44" aria-hidden="true"></a>~~~~~~~~~~</span> -<span id="cb414-45"><a href="#cb414-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb414-46"><a href="#cb414-46" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb415"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb415-1"><a href="#cb415-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb425"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb425-1"><a href="#cb425-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb425-2"><a href="#cb425-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span> +<span id="cb425-3"><a href="#cb425-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</span> +<span id="cb425-4"><a href="#cb425-4" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> +<span id="cb425-5"><a href="#cb425-5" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb425-6"><a href="#cb425-6" aria-hidden="true"></a> renderers = {</span> +<span id="cb425-7"><a href="#cb425-7" aria-hidden="true"></a> interblockSeparator = {</span> +<span id="cb425-8"><a href="#cb425-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb425-9"><a href="#cb425-9" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb425-10"><a href="#cb425-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb425-11"><a href="#cb425-11" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb425-12"><a href="#cb425-12" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb425-13"><a href="#cb425-13" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb425-14"><a href="#cb425-14" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb425-15"><a href="#cb425-15" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb425-16"><a href="#cb425-16" aria-hidden="true"></a> },</span> +<span id="cb425-17"><a href="#cb425-17" aria-hidden="true"></a> inputVerbatim = {</span> +<span id="cb425-18"><a href="#cb425-18" aria-hidden="true"></a> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></span> +<span id="cb425-19"><a href="#cb425-19" aria-hidden="true"></a> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></span> +<span id="cb425-20"><a href="#cb425-20" aria-hidden="true"></a> },</span> +<span id="cb425-21"><a href="#cb425-21" aria-hidden="true"></a> inputFencedCode = {</span> +<span id="cb425-22"><a href="#cb425-22" aria-hidden="true"></a> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></span> +<span id="cb425-23"><a href="#cb425-23" aria-hidden="true"></a> },</span> +<span id="cb425-24"><a href="#cb425-24" aria-hidden="true"></a> },</span> +<span id="cb425-25"><a href="#cb425-25" aria-hidden="true"></a>}</span> +<span id="cb425-26"><a href="#cb425-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb425-27"><a href="#cb425-27" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb425-28"><a href="#cb425-28" aria-hidden="true"></a>The following code</span> +<span id="cb425-29"><a href="#cb425-29" aria-hidden="true"></a></span> +<span id="cb425-30"><a href="#cb425-30" aria-hidden="true"></a> def foo(bar):</span> +<span id="cb425-31"><a href="#cb425-31" aria-hidden="true"></a> if len(bar) <= 1:</span> +<span id="cb425-32"><a href="#cb425-32" aria-hidden="true"></a> return bar[0]</span> +<span id="cb425-33"><a href="#cb425-33" aria-hidden="true"></a> elif len(bar) == 2:</span> +<span id="cb425-34"><a href="#cb425-34" aria-hidden="true"></a> return sorted(bar)</span> +<span id="cb425-35"><a href="#cb425-35" aria-hidden="true"></a> else:</span> +<span id="cb425-36"><a href="#cb425-36" aria-hidden="true"></a> baz = len(bar) // 2</span> +<span id="cb425-37"><a href="#cb425-37" aria-hidden="true"></a> return foo(bar[baz:], bar[:baz])</span> +<span id="cb425-38"><a href="#cb425-38" aria-hidden="true"></a></span> +<span id="cb425-39"><a href="#cb425-39" aria-hidden="true"></a>The following code</span> +<span id="cb425-40"><a href="#cb425-40" aria-hidden="true"></a></span> +<span id="cb425-41"><a href="#cb425-41" aria-hidden="true"></a>~~~ Python</span> +<span id="cb425-42"><a href="#cb425-42" aria-hidden="true"></a>>>> foo([4, 2, 1, 3])</span> +<span id="cb425-43"><a href="#cb425-43" aria-hidden="true"></a>[1, 2, 3, 4]</span> +<span id="cb425-44"><a href="#cb425-44" aria-hidden="true"></a>~~~~~~~~~~</span> +<span id="cb425-45"><a href="#cb425-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb425-46"><a href="#cb425-46" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb426"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb426-1"><a href="#cb426-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text except for the filename, which may differ:</p> <blockquote> <p>The following code is contained in file <code>./_markdown_document/882453149edcf288976647f6fe147ada.verbatim</code>:</p> -<div class="sourceCode" id="cb416"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb416-1"><a href="#cb416-1" aria-hidden="true"></a><span class="kw">def</span> foo(bar):</span> -<span id="cb416-2"><a href="#cb416-2" aria-hidden="true"></a> <span class="cf">if</span> <span class="bu">len</span>(bar) <span class="op"><=</span> <span class="dv">1</span>:</span> -<span id="cb416-3"><a href="#cb416-3" aria-hidden="true"></a> <span class="cf">return</span> bar[:<span class="dv">1</span>]</span> -<span id="cb416-4"><a href="#cb416-4" aria-hidden="true"></a> <span class="cf">elif</span> <span class="bu">len</span>(bar) <span class="op">==</span> <span class="dv">2</span>:</span> -<span id="cb416-5"><a href="#cb416-5" aria-hidden="true"></a> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</span> -<span id="cb416-6"><a href="#cb416-6" aria-hidden="true"></a> <span class="cf">else</span>:</span> -<span id="cb416-7"><a href="#cb416-7" aria-hidden="true"></a> baz <span class="op">=</span> bar[<span class="bu">len</span>(bar) <span class="op">//</span> <span class="dv">2</span>]</span> -<span id="cb416-8"><a href="#cb416-8" aria-hidden="true"></a> <span class="cf">return</span> (</span> -<span id="cb416-9"><a href="#cb416-9" aria-hidden="true"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op"><</span> baz]) <span class="op">+</span> [baz] <span class="op">+</span></span> -<span id="cb416-10"><a href="#cb416-10" aria-hidden="true"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op">></span> baz])</span> -<span id="cb416-11"><a href="#cb416-11" aria-hidden="true"></a> )</span></code></pre></div> +<div class="sourceCode" id="cb427"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb427-1"><a href="#cb427-1" aria-hidden="true"></a><span class="kw">def</span> foo(bar):</span> +<span id="cb427-2"><a href="#cb427-2" aria-hidden="true"></a> <span class="cf">if</span> <span class="bu">len</span>(bar) <span class="op"><=</span> <span class="dv">1</span>:</span> +<span id="cb427-3"><a href="#cb427-3" aria-hidden="true"></a> <span class="cf">return</span> bar[:<span class="dv">1</span>]</span> +<span id="cb427-4"><a href="#cb427-4" aria-hidden="true"></a> <span class="cf">elif</span> <span class="bu">len</span>(bar) <span class="op">==</span> <span class="dv">2</span>:</span> +<span id="cb427-5"><a href="#cb427-5" aria-hidden="true"></a> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</span> +<span id="cb427-6"><a href="#cb427-6" aria-hidden="true"></a> <span class="cf">else</span>:</span> +<span id="cb427-7"><a href="#cb427-7" aria-hidden="true"></a> baz <span class="op">=</span> bar[<span class="bu">len</span>(bar) <span class="op">//</span> <span class="dv">2</span>]</span> +<span id="cb427-8"><a href="#cb427-8" aria-hidden="true"></a> <span class="cf">return</span> (</span> +<span id="cb427-9"><a href="#cb427-9" aria-hidden="true"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op"><</span> baz]) <span class="op">+</span> [baz] <span class="op">+</span></span> +<span id="cb427-10"><a href="#cb427-10" aria-hidden="true"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op">></span> baz])</span> +<span id="cb427-11"><a href="#cb427-11" aria-hidden="true"></a> )</span></code></pre></div> <p>The following code in Python contained in file <code>./_markdown_document/cf2a96e2120cef5b1fae5fea36fcc27b.verbatim</code>:</p> -<div class="sourceCode" id="cb417"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb417-1"><a href="#cb417-1" aria-hidden="true"></a><span class="op">>>></span> foo([<span class="dv">4</span>, <span class="dv">2</span>, <span class="dv">1</span>, <span class="dv">3</span>])</span> -<span id="cb417-2"><a href="#cb417-2" aria-hidden="true"></a>[<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>]</span></code></pre></div> +<div class="sourceCode" id="cb428"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb428-1"><a href="#cb428-1" aria-hidden="true"></a><span class="op">>>></span> foo([<span class="dv">4</span>, <span class="dv">2</span>, <span class="dv">1</span>, <span class="dv">3</span>])</span> +<span id="cb428-2"><a href="#cb428-2" aria-hidden="true"></a>[<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>]</span></code></pre></div> </blockquote> <h4 data-number="2.3.1.17" id="yaml-metadata-renderers"><span class="header-section-number">2.3.1.17</span> YAML Metadata Renderers</h4> <p>The <code>\markdownRendererJekyllDataBegin</code> macro represents the beginning of a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives no arguments.</p> @@ -5554,78 +5638,79 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererJekyllDataMappingBegin</code> macro represents the beginning of a mapping in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives two arguments: the scalar key in the parent structure, cast to a string following <abbr>yaml</abbr> serialization rules, and the number of items in the mapping.</p> <p>The <code>\markdownRendererJekyllDataMappingEnd</code> macro represents the end of a mapping in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives no arguments.</p> <p>The <code>\markdownRendererJekyllDataSequenceBegin</code> macro represents the beginning of a sequence in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives two arguments: the scalar key in the parent structure, cast to a string following <abbr>yaml</abbr> serialization rules, and the number of items in the sequence.</p> +<p>The <code>\markdownRendererJekyllDataSequenceEnd</code> macro represents the end of a sequence in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives no arguments.</p> <p>The <code>\markdownRendererJekyllDataBoolean</code> macro represents a boolean scalar value in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives two arguments: the scalar key in the parent structure, and the scalar value, both cast to a string following <abbr>yaml</abbr> serialization rules.</p> <p>The <code>\markdownRendererJekyllDataNumber</code> macro represents a numeric scalar value in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives two arguments: the scalar key in the parent structure, and the scalar value, both cast to a string following <abbr>yaml</abbr> serialization rules.</p> <p>The <code>\markdownRendererJekyllDataString</code> macro represents a string scalar value in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives two arguments: the scalar key in the parent structure, cast to a string following <abbr>yaml</abbr> serialization rules, and the scalar value.</p> <p>The <code>\markdownRendererJekyllDataEmpty</code> macro represents an empty scalar value in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives one argument: the scalar key in the parent structure, cast to a string following <abbr>yaml</abbr> serialization rules.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-29">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb418"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb418-1"><a href="#cb418-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb418-2"><a href="#cb418-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> -<span id="cb418-3"><a href="#cb418-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> -<span id="cb418-4"><a href="#cb418-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> -<span id="cb418-5"><a href="#cb418-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb418-6"><a href="#cb418-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb418-7"><a href="#cb418-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb418-8"><a href="#cb418-8" aria-hidden="true"></a>---</span> -<span id="cb418-9"><a href="#cb418-9" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb418-10"><a href="#cb418-10" aria-hidden="true"></a>age: 99</span> -<span id="cb418-11"><a href="#cb418-11" aria-hidden="true"></a>---</span> -<span id="cb418-12"><a href="#cb418-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb418-13"><a href="#cb418-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb429"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb429-1"><a href="#cb429-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb429-2"><a href="#cb429-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb429-3"><a href="#cb429-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> +<span id="cb429-4"><a href="#cb429-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> +<span id="cb429-5"><a href="#cb429-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb429-6"><a href="#cb429-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb429-7"><a href="#cb429-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb429-8"><a href="#cb429-8" aria-hidden="true"></a>---</span> +<span id="cb429-9"><a href="#cb429-9" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb429-10"><a href="#cb429-10" aria-hidden="true"></a>age: 99</span> +<span id="cb429-11"><a href="#cb429-11" aria-hidden="true"></a>---</span> +<span id="cb429-12"><a href="#cb429-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb429-13"><a href="#cb429-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb419"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb419-1"><a href="#cb419-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb430"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb430-1"><a href="#cb430-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-50"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-51"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb420"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb420-1"><a href="#cb420-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb420-2"><a href="#cb420-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> -<span id="cb420-3"><a href="#cb420-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb420-4"><a href="#cb420-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb420-5"><a href="#cb420-5" aria-hidden="true"></a> jekyllDataString = {<span class="fu">\gdef\name</span>{#2}},</span> -<span id="cb420-6"><a href="#cb420-6" aria-hidden="true"></a> jekyllDataNumber = {<span class="fu">\gdef\age</span>{#2}},</span> -<span id="cb420-7"><a href="#cb420-7" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> -<span id="cb420-8"><a href="#cb420-8" aria-hidden="true"></a> }</span> -<span id="cb420-9"><a href="#cb420-9" aria-hidden="true"></a>}</span> -<span id="cb420-10"><a href="#cb420-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb420-11"><a href="#cb420-11" aria-hidden="true"></a></span> -<span id="cb420-12"><a href="#cb420-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb420-13"><a href="#cb420-13" aria-hidden="true"></a>---</span> -<span id="cb420-14"><a href="#cb420-14" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb420-15"><a href="#cb420-15" aria-hidden="true"></a>age: 99</span> -<span id="cb420-16"><a href="#cb420-16" aria-hidden="true"></a>---</span> -<span id="cb420-17"><a href="#cb420-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb420-18"><a href="#cb420-18" aria-hidden="true"></a></span> -<span id="cb420-19"><a href="#cb420-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb421"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb421-1"><a href="#cb421-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb431"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb431-1"><a href="#cb431-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb431-2"><a href="#cb431-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb431-3"><a href="#cb431-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb431-4"><a href="#cb431-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb431-5"><a href="#cb431-5" aria-hidden="true"></a> jekyllDataString = {<span class="fu">\gdef\name</span>{#2}},</span> +<span id="cb431-6"><a href="#cb431-6" aria-hidden="true"></a> jekyllDataNumber = {<span class="fu">\gdef\age</span>{#2}},</span> +<span id="cb431-7"><a href="#cb431-7" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> +<span id="cb431-8"><a href="#cb431-8" aria-hidden="true"></a> }</span> +<span id="cb431-9"><a href="#cb431-9" aria-hidden="true"></a>}</span> +<span id="cb431-10"><a href="#cb431-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb431-11"><a href="#cb431-11" aria-hidden="true"></a></span> +<span id="cb431-12"><a href="#cb431-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb431-13"><a href="#cb431-13" aria-hidden="true"></a>---</span> +<span id="cb431-14"><a href="#cb431-14" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb431-15"><a href="#cb431-15" aria-hidden="true"></a>age: 99</span> +<span id="cb431-16"><a href="#cb431-16" aria-hidden="true"></a>---</span> +<span id="cb431-17"><a href="#cb431-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb431-18"><a href="#cb431-18" aria-hidden="true"></a></span> +<span id="cb431-19"><a href="#cb431-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb432"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb432-1"><a href="#cb432-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-41">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb422"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb422-1"><a href="#cb422-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb422-2"><a href="#cb422-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> -<span id="cb422-3"><a href="#cb422-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> -<span id="cb422-4"><a href="#cb422-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> -<span id="cb422-5"><a href="#cb422-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb422-6"><a href="#cb422-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb422-7"><a href="#cb422-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb422-8"><a href="#cb422-8" aria-hidden="true"></a></span> -<span id="cb422-9"><a href="#cb422-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb422-10"><a href="#cb422-10" aria-hidden="true"></a>---</span> -<span id="cb422-11"><a href="#cb422-11" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb422-12"><a href="#cb422-12" aria-hidden="true"></a>age: 99</span> -<span id="cb422-13"><a href="#cb422-13" aria-hidden="true"></a>---</span> -<span id="cb422-14"><a href="#cb422-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb422-15"><a href="#cb422-15" aria-hidden="true"></a></span> -<span id="cb422-16"><a href="#cb422-16" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb423"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb423-1"><a href="#cb423-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb433"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb433-1"><a href="#cb433-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb433-2"><a href="#cb433-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb433-3"><a href="#cb433-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> +<span id="cb433-4"><a href="#cb433-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> +<span id="cb433-5"><a href="#cb433-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb433-6"><a href="#cb433-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb433-7"><a href="#cb433-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb433-8"><a href="#cb433-8" aria-hidden="true"></a></span> +<span id="cb433-9"><a href="#cb433-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb433-10"><a href="#cb433-10" aria-hidden="true"></a>---</span> +<span id="cb433-11"><a href="#cb433-11" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb433-12"><a href="#cb433-12" aria-hidden="true"></a>age: 99</span> +<span id="cb433-13"><a href="#cb433-13" aria-hidden="true"></a>---</span> +<span id="cb433-14"><a href="#cb433-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb433-15"><a href="#cb433-15" aria-hidden="true"></a></span> +<span id="cb433-16"><a href="#cb433-16" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb434"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb434-1"><a href="#cb434-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> @@ -5639,79 +5724,79 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererHeadingSix</code> macro represents a sixth level heading. The macro receives a single argument that corresponds to the heading text.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-30">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb424"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb424-1"><a href="#cb424-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb424-2"><a href="#cb424-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb424-3"><a href="#cb424-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> -<span id="cb424-4"><a href="#cb424-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> -<span id="cb424-5"><a href="#cb424-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> -<span id="cb424-6"><a href="#cb424-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> -<span id="cb424-7"><a href="#cb424-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> -<span id="cb424-8"><a href="#cb424-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> -<span id="cb424-9"><a href="#cb424-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb424-10"><a href="#cb424-10" aria-hidden="true"></a>######</span> -<span id="cb424-11"><a href="#cb424-11" aria-hidden="true"></a>#####</span> -<span id="cb424-12"><a href="#cb424-12" aria-hidden="true"></a>#####</span> -<span id="cb424-13"><a href="#cb424-13" aria-hidden="true"></a>###</span> -<span id="cb424-14"><a href="#cb424-14" aria-hidden="true"></a>######</span> -<span id="cb424-15"><a href="#cb424-15" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb424-16"><a href="#cb424-16" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb425"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb425-1"><a href="#cb425-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb435"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb435-1"><a href="#cb435-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb435-2"><a href="#cb435-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb435-3"><a href="#cb435-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> +<span id="cb435-4"><a href="#cb435-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> +<span id="cb435-5"><a href="#cb435-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> +<span id="cb435-6"><a href="#cb435-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> +<span id="cb435-7"><a href="#cb435-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> +<span id="cb435-8"><a href="#cb435-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> +<span id="cb435-9"><a href="#cb435-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb435-10"><a href="#cb435-10" aria-hidden="true"></a>######</span> +<span id="cb435-11"><a href="#cb435-11" aria-hidden="true"></a>#####</span> +<span id="cb435-12"><a href="#cb435-12" aria-hidden="true"></a>#####</span> +<span id="cb435-13"><a href="#cb435-13" aria-hidden="true"></a>###</span> +<span id="cb435-14"><a href="#cb435-14" aria-hidden="true"></a>######</span> +<span id="cb435-15"><a href="#cb435-15" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb435-16"><a href="#cb435-16" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb436"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb436-1"><a href="#cb436-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>65536</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-51"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-52"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb426"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb426-1"><a href="#cb426-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb426-2"><a href="#cb426-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb426-3"><a href="#cb426-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb426-4"><a href="#cb426-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb426-5"><a href="#cb426-5" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb426-6"><a href="#cb426-6" aria-hidden="true"></a> headingOne = 1,</span> -<span id="cb426-7"><a href="#cb426-7" aria-hidden="true"></a> headingTwo = 2,</span> -<span id="cb426-8"><a href="#cb426-8" aria-hidden="true"></a> headingThree = 3,</span> -<span id="cb426-9"><a href="#cb426-9" aria-hidden="true"></a> headingFour = 4,</span> -<span id="cb426-10"><a href="#cb426-10" aria-hidden="true"></a> headingFive = 5,</span> -<span id="cb426-11"><a href="#cb426-11" aria-hidden="true"></a> headingSix = 6,</span> -<span id="cb426-12"><a href="#cb426-12" aria-hidden="true"></a> },</span> -<span id="cb426-13"><a href="#cb426-13" aria-hidden="true"></a>}</span> -<span id="cb426-14"><a href="#cb426-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb426-15"><a href="#cb426-15" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb426-16"><a href="#cb426-16" aria-hidden="true"></a>######</span> -<span id="cb426-17"><a href="#cb426-17" aria-hidden="true"></a>#####</span> -<span id="cb426-18"><a href="#cb426-18" aria-hidden="true"></a>#####</span> -<span id="cb426-19"><a href="#cb426-19" aria-hidden="true"></a>###</span> -<span id="cb426-20"><a href="#cb426-20" aria-hidden="true"></a>######</span> -<span id="cb426-21"><a href="#cb426-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb426-22"><a href="#cb426-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb427"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb427-1"><a href="#cb427-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb437"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb437-1"><a href="#cb437-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb437-2"><a href="#cb437-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb437-3"><a href="#cb437-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb437-4"><a href="#cb437-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb437-5"><a href="#cb437-5" aria-hidden="true"></a> interblockSeparator = {},</span> +<span id="cb437-6"><a href="#cb437-6" aria-hidden="true"></a> headingOne = 1,</span> +<span id="cb437-7"><a href="#cb437-7" aria-hidden="true"></a> headingTwo = 2,</span> +<span id="cb437-8"><a href="#cb437-8" aria-hidden="true"></a> headingThree = 3,</span> +<span id="cb437-9"><a href="#cb437-9" aria-hidden="true"></a> headingFour = 4,</span> +<span id="cb437-10"><a href="#cb437-10" aria-hidden="true"></a> headingFive = 5,</span> +<span id="cb437-11"><a href="#cb437-11" aria-hidden="true"></a> headingSix = 6,</span> +<span id="cb437-12"><a href="#cb437-12" aria-hidden="true"></a> },</span> +<span id="cb437-13"><a href="#cb437-13" aria-hidden="true"></a>}</span> +<span id="cb437-14"><a href="#cb437-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb437-15"><a href="#cb437-15" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb437-16"><a href="#cb437-16" aria-hidden="true"></a>######</span> +<span id="cb437-17"><a href="#cb437-17" aria-hidden="true"></a>#####</span> +<span id="cb437-18"><a href="#cb437-18" aria-hidden="true"></a>#####</span> +<span id="cb437-19"><a href="#cb437-19" aria-hidden="true"></a>###</span> +<span id="cb437-20"><a href="#cb437-20" aria-hidden="true"></a>######</span> +<span id="cb437-21"><a href="#cb437-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb437-22"><a href="#cb437-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb438"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb438-1"><a href="#cb438-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>65536</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-42">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb428"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb428-1"><a href="#cb428-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb428-2"><a href="#cb428-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb428-3"><a href="#cb428-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> -<span id="cb428-4"><a href="#cb428-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> -<span id="cb428-5"><a href="#cb428-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> -<span id="cb428-6"><a href="#cb428-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> -<span id="cb428-7"><a href="#cb428-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> -<span id="cb428-8"><a href="#cb428-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> -<span id="cb428-9"><a href="#cb428-9" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb428-10"><a href="#cb428-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb428-11"><a href="#cb428-11" aria-hidden="true"></a>######</span> -<span id="cb428-12"><a href="#cb428-12" aria-hidden="true"></a>#####</span> -<span id="cb428-13"><a href="#cb428-13" aria-hidden="true"></a>#####</span> -<span id="cb428-14"><a href="#cb428-14" aria-hidden="true"></a>###</span> -<span id="cb428-15"><a href="#cb428-15" aria-hidden="true"></a>######</span> -<span id="cb428-16"><a href="#cb428-16" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb428-17"><a href="#cb428-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb429"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb429-1"><a href="#cb429-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb439"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb439-1"><a href="#cb439-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb439-2"><a href="#cb439-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb439-3"><a href="#cb439-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> +<span id="cb439-4"><a href="#cb439-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> +<span id="cb439-5"><a href="#cb439-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> +<span id="cb439-6"><a href="#cb439-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> +<span id="cb439-7"><a href="#cb439-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> +<span id="cb439-8"><a href="#cb439-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> +<span id="cb439-9"><a href="#cb439-9" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb439-10"><a href="#cb439-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb439-11"><a href="#cb439-11" aria-hidden="true"></a>######</span> +<span id="cb439-12"><a href="#cb439-12" aria-hidden="true"></a>#####</span> +<span id="cb439-13"><a href="#cb439-13" aria-hidden="true"></a>#####</span> +<span id="cb439-14"><a href="#cb439-14" aria-hidden="true"></a>###</span> +<span id="cb439-15"><a href="#cb439-15" aria-hidden="true"></a>######</span> +<span id="cb439-16"><a href="#cb439-16" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb439-17"><a href="#cb439-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb440"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb440-1"><a href="#cb440-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>65536</p> @@ -5720,44 +5805,44 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererHorizontalRule</code> macro represents a horizontal rule. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-31">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb430"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb430-1"><a href="#cb430-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb430-2"><a href="#cb430-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\vfil\break</span>}</span> -<span id="cb430-3"><a href="#cb430-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb430-4"><a href="#cb430-4" aria-hidden="true"></a>This is the first page.</span> -<span id="cb430-5"><a href="#cb430-5" aria-hidden="true"></a></span> -<span id="cb430-6"><a href="#cb430-6" aria-hidden="true"></a>***</span> -<span id="cb430-7"><a href="#cb430-7" aria-hidden="true"></a></span> -<span id="cb430-8"><a href="#cb430-8" aria-hidden="true"></a>This is the second page.</span> -<span id="cb430-9"><a href="#cb430-9" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb430-10"><a href="#cb430-10" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb441"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb441-1"><a href="#cb441-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb441-2"><a href="#cb441-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\vfil\break</span>}</span> +<span id="cb441-3"><a href="#cb441-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb441-4"><a href="#cb441-4" aria-hidden="true"></a>This is the first page.</span> +<span id="cb441-5"><a href="#cb441-5" aria-hidden="true"></a></span> +<span id="cb441-6"><a href="#cb441-6" aria-hidden="true"></a>***</span> +<span id="cb441-7"><a href="#cb441-7" aria-hidden="true"></a></span> +<span id="cb441-8"><a href="#cb441-8" aria-hidden="true"></a>This is the second page.</span> +<span id="cb441-9"><a href="#cb441-9" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb441-10"><a href="#cb441-10" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb431"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb431-1"><a href="#cb431-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb442"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb442-1"><a href="#cb442-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is the first page.</p> <hr /> <p>This is the second page.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-52"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-53"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb432"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb432-1"><a href="#cb432-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb432-2"><a href="#cb432-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb432-3"><a href="#cb432-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb432-4"><a href="#cb432-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb432-5"><a href="#cb432-5" aria-hidden="true"></a> horizontalRule = <span class="fu">\newpage</span>,</span> -<span id="cb432-6"><a href="#cb432-6" aria-hidden="true"></a> },</span> -<span id="cb432-7"><a href="#cb432-7" aria-hidden="true"></a>}</span> -<span id="cb432-8"><a href="#cb432-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb432-9"><a href="#cb432-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb432-10"><a href="#cb432-10" aria-hidden="true"></a>This is the first page.</span> -<span id="cb432-11"><a href="#cb432-11" aria-hidden="true"></a></span> -<span id="cb432-12"><a href="#cb432-12" aria-hidden="true"></a>***</span> -<span id="cb432-13"><a href="#cb432-13" aria-hidden="true"></a></span> -<span id="cb432-14"><a href="#cb432-14" aria-hidden="true"></a>This is the second page.</span> -<span id="cb432-15"><a href="#cb432-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb432-16"><a href="#cb432-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb433"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb433-1"><a href="#cb433-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb443"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb443-1"><a href="#cb443-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb443-2"><a href="#cb443-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb443-3"><a href="#cb443-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb443-4"><a href="#cb443-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb443-5"><a href="#cb443-5" aria-hidden="true"></a> horizontalRule = <span class="fu">\newpage</span>,</span> +<span id="cb443-6"><a href="#cb443-6" aria-hidden="true"></a> },</span> +<span id="cb443-7"><a href="#cb443-7" aria-hidden="true"></a>}</span> +<span id="cb443-8"><a href="#cb443-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb443-9"><a href="#cb443-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb443-10"><a href="#cb443-10" aria-hidden="true"></a>This is the first page.</span> +<span id="cb443-11"><a href="#cb443-11" aria-hidden="true"></a></span> +<span id="cb443-12"><a href="#cb443-12" aria-hidden="true"></a>***</span> +<span id="cb443-13"><a href="#cb443-13" aria-hidden="true"></a></span> +<span id="cb443-14"><a href="#cb443-14" aria-hidden="true"></a>This is the second page.</span> +<span id="cb443-15"><a href="#cb443-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb443-16"><a href="#cb443-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb444"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb444-1"><a href="#cb444-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is the first page.</p> @@ -5766,19 +5851,19 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-43">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb434"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb434-1"><a href="#cb434-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb434-2"><a href="#cb434-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\page</span>[yes]}</span> -<span id="cb434-3"><a href="#cb434-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb434-4"><a href="#cb434-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb434-5"><a href="#cb434-5" aria-hidden="true"></a>This is the first page.</span> -<span id="cb434-6"><a href="#cb434-6" aria-hidden="true"></a></span> -<span id="cb434-7"><a href="#cb434-7" aria-hidden="true"></a>***</span> -<span id="cb434-8"><a href="#cb434-8" aria-hidden="true"></a></span> -<span id="cb434-9"><a href="#cb434-9" aria-hidden="true"></a>This is the second page.</span> -<span id="cb434-10"><a href="#cb434-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb434-11"><a href="#cb434-11" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb445"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb445-1"><a href="#cb445-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb445-2"><a href="#cb445-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\page</span>[yes]}</span> +<span id="cb445-3"><a href="#cb445-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb445-4"><a href="#cb445-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb445-5"><a href="#cb445-5" aria-hidden="true"></a>This is the first page.</span> +<span id="cb445-6"><a href="#cb445-6" aria-hidden="true"></a></span> +<span id="cb445-7"><a href="#cb445-7" aria-hidden="true"></a>***</span> +<span id="cb445-8"><a href="#cb445-8" aria-hidden="true"></a></span> +<span id="cb445-9"><a href="#cb445-9" aria-hidden="true"></a>This is the second page.</span> +<span id="cb445-10"><a href="#cb445-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb445-11"><a href="#cb445-11" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb435"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb435-1"><a href="#cb435-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb446"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb446-1"><a href="#cb446-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is the first page.</p> @@ -5789,163 +5874,163 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererFootnote</code> macro represents a footnote. This macro will only be produced, when the <strong><code>footnotes</code></strong> option is enabled. The macro receives a single argument that corresponds to the footnote text.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-32">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb436"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb436-1"><a href="#cb436-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb436-2"><a href="#cb436-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> -<span id="cb436-3"><a href="#cb436-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> -<span id="cb436-4"><a href="#cb436-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb436-5"><a href="#cb436-5" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb436-6"><a href="#cb436-6" aria-hidden="true"></a></span> -<span id="cb436-7"><a href="#cb436-7" aria-hidden="true"></a> [^1]: this is a footnote</span> -<span id="cb436-8"><a href="#cb436-8" aria-hidden="true"></a></span> -<span id="cb436-9"><a href="#cb436-9" aria-hidden="true"></a> [^2]: this is some other footnote</span> -<span id="cb436-10"><a href="#cb436-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb436-11"><a href="#cb436-11" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb447"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb447-1"><a href="#cb447-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb447-2"><a href="#cb447-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> +<span id="cb447-3"><a href="#cb447-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> +<span id="cb447-4"><a href="#cb447-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb447-5"><a href="#cb447-5" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> +<span id="cb447-6"><a href="#cb447-6" aria-hidden="true"></a></span> +<span id="cb447-7"><a href="#cb447-7" aria-hidden="true"></a> [^1]: this is a footnote</span> +<span id="cb447-8"><a href="#cb447-8" aria-hidden="true"></a></span> +<span id="cb447-9"><a href="#cb447-9" aria-hidden="true"></a> [^2]: this is some other footnote</span> +<span id="cb447-10"><a href="#cb447-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb447-11"><a href="#cb447-11" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb437"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb437-1"><a href="#cb437-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb448"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb448-1"><a href="#cb448-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is some text (and this is a footnote) and this is some other text (and this is some other footnote).</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-53"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-54"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb438"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb438-1"><a href="#cb438-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb438-2"><a href="#cb438-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> -<span id="cb438-3"><a href="#cb438-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb438-4"><a href="#cb438-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb438-5"><a href="#cb438-5" aria-hidden="true"></a> footnote = { (and <span class="fu">\MakeLowercase</span>{#1})},</span> -<span id="cb438-6"><a href="#cb438-6" aria-hidden="true"></a> },</span> -<span id="cb438-7"><a href="#cb438-7" aria-hidden="true"></a>}</span> -<span id="cb438-8"><a href="#cb438-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb438-9"><a href="#cb438-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb438-10"><a href="#cb438-10" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb438-11"><a href="#cb438-11" aria-hidden="true"></a></span> -<span id="cb438-12"><a href="#cb438-12" aria-hidden="true"></a> [^1]: this is a footnote</span> -<span id="cb438-13"><a href="#cb438-13" aria-hidden="true"></a></span> -<span id="cb438-14"><a href="#cb438-14" aria-hidden="true"></a> [^2]: this is some other footnote</span> -<span id="cb438-15"><a href="#cb438-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb438-16"><a href="#cb438-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb439"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb439-1"><a href="#cb439-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb449"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb449-1"><a href="#cb449-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb449-2"><a href="#cb449-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> +<span id="cb449-3"><a href="#cb449-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb449-4"><a href="#cb449-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb449-5"><a href="#cb449-5" aria-hidden="true"></a> footnote = { (and <span class="fu">\MakeLowercase</span>{#1})},</span> +<span id="cb449-6"><a href="#cb449-6" aria-hidden="true"></a> },</span> +<span id="cb449-7"><a href="#cb449-7" aria-hidden="true"></a>}</span> +<span id="cb449-8"><a href="#cb449-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb449-9"><a href="#cb449-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb449-10"><a href="#cb449-10" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> +<span id="cb449-11"><a href="#cb449-11" aria-hidden="true"></a></span> +<span id="cb449-12"><a href="#cb449-12" aria-hidden="true"></a> [^1]: this is a footnote</span> +<span id="cb449-13"><a href="#cb449-13" aria-hidden="true"></a></span> +<span id="cb449-14"><a href="#cb449-14" aria-hidden="true"></a> [^2]: this is some other footnote</span> +<span id="cb449-15"><a href="#cb449-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb449-16"><a href="#cb449-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb450"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb450-1"><a href="#cb450-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is some text (and this is a footnote) and this is some other text (and this is some other footnote).</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-44">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb440"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb440-1"><a href="#cb440-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb440-2"><a href="#cb440-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> -<span id="cb440-3"><a href="#cb440-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> -<span id="cb440-4"><a href="#cb440-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb440-5"><a href="#cb440-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb440-6"><a href="#cb440-6" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb440-7"><a href="#cb440-7" aria-hidden="true"></a></span> -<span id="cb440-8"><a href="#cb440-8" aria-hidden="true"></a> [^1]: this is a footnote</span> -<span id="cb440-9"><a href="#cb440-9" aria-hidden="true"></a></span> -<span id="cb440-10"><a href="#cb440-10" aria-hidden="true"></a> [^2]: this is some other footnote</span> -<span id="cb440-11"><a href="#cb440-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb440-12"><a href="#cb440-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb451"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb451-1"><a href="#cb451-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb451-2"><a href="#cb451-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> +<span id="cb451-3"><a href="#cb451-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> +<span id="cb451-4"><a href="#cb451-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb451-5"><a href="#cb451-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb451-6"><a href="#cb451-6" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> +<span id="cb451-7"><a href="#cb451-7" aria-hidden="true"></a></span> +<span id="cb451-8"><a href="#cb451-8" aria-hidden="true"></a> [^1]: this is a footnote</span> +<span id="cb451-9"><a href="#cb451-9" aria-hidden="true"></a></span> +<span id="cb451-10"><a href="#cb451-10" aria-hidden="true"></a> [^2]: this is some other footnote</span> +<span id="cb451-11"><a href="#cb451-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb451-12"><a href="#cb451-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb441"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb441-1"><a href="#cb441-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb452"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb452-1"><a href="#cb452-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is some text (and this is a footnote) and this is some other text (and this is some other footnote).</p> </blockquote> <h4 data-number="2.3.1.21" id="parenthesized-citations-renderer"><span class="header-section-number">2.3.1.21</span> Parenthesized Citations Renderer</h4> <p>The <code>\markdownRendererCite</code> macro represents a string of one or more parenthetical citations. This macro will only be produced, when the <strong><code>citations</code></strong> option is enabled. The macro receives the parameter <code>{</code>⟨<em>number of citations</em>⟩<code>}</code> followed by ⟨<em>suppress author</em>⟩ <code>{</code>⟨<em>prenote</em>⟩<code>}{</code>⟨<em>postnote</em>⟩<code>}{</code>⟨<em>name</em>⟩<code>}</code> repeated ⟨<em>number of citations</em>⟩ times. The ⟨<em>suppress author</em>⟩ parameter is either the token <code>-</code>, when the author’s name is to be suppressed, or <code>+</code> otherwise.</p> -<h5 class="unnumbered" data-number="" id="latex-example-54"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-55"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb442"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb442-1"><a href="#cb442-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb442-2"><a href="#cb442-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb442-3"><a href="#cb442-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> -<span id="cb442-4"><a href="#cb442-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> -<span id="cb442-5"><a href="#cb442-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb442-6"><a href="#cb442-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb442-7"><a href="#cb442-7" aria-hidden="true"></a> a parenthesized citation <span class="fu">\emph</span>{#4}</span> -<span id="cb442-8"><a href="#cb442-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb442-9"><a href="#cb442-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> -<span id="cb442-10"><a href="#cb442-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb442-11"><a href="#cb442-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb442-12"><a href="#cb442-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb442-13"><a href="#cb442-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb442-14"><a href="#cb442-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> -<span id="cb442-15"><a href="#cb442-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb442-16"><a href="#cb442-16" aria-hidden="true"></a> <span class="fu">\ </span>and a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb442-17"><a href="#cb442-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb442-18"><a href="#cb442-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb442-19"><a href="#cb442-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> -<span id="cb442-20"><a href="#cb442-20" aria-hidden="true"></a> .<span class="co">%</span></span> -<span id="cb442-21"><a href="#cb442-21" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> -<span id="cb442-22"><a href="#cb442-22" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb442-23"><a href="#cb442-23" aria-hidden="true"></a> , and</span> -<span id="cb442-24"><a href="#cb442-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> -<span id="cb442-25"><a href="#cb442-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb442-26"><a href="#cb442-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb442-27"><a href="#cb442-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb442-28"><a href="#cb442-28" aria-hidden="true"></a> cite = {<span class="co">%</span></span> -<span id="cb442-29"><a href="#cb442-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> -<span id="cb442-30"><a href="#cb442-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> -<span id="cb442-31"><a href="#cb442-31" aria-hidden="true"></a> This is</span> -<span id="cb442-32"><a href="#cb442-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> -<span id="cb442-33"><a href="#cb442-33" aria-hidden="true"></a> },</span> -<span id="cb442-34"><a href="#cb442-34" aria-hidden="true"></a> },</span> -<span id="cb442-35"><a href="#cb442-35" aria-hidden="true"></a>}</span> -<span id="cb442-36"><a href="#cb442-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb442-37"><a href="#cb442-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb442-38"><a href="#cb442-38" aria-hidden="true"></a>[see @abrahams90, pp. 12; @eijkhout91, pp. 34]</span> -<span id="cb442-39"><a href="#cb442-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb442-40"><a href="#cb442-40" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb443"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb443-1"><a href="#cb443-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb453"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb453-1"><a href="#cb453-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb453-2"><a href="#cb453-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> +<span id="cb453-3"><a href="#cb453-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> +<span id="cb453-4"><a href="#cb453-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> +<span id="cb453-5"><a href="#cb453-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> +<span id="cb453-6"><a href="#cb453-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb453-7"><a href="#cb453-7" aria-hidden="true"></a> a parenthesized citation <span class="fu">\emph</span>{#4}</span> +<span id="cb453-8"><a href="#cb453-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb453-9"><a href="#cb453-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> +<span id="cb453-10"><a href="#cb453-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb453-11"><a href="#cb453-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> +<span id="cb453-12"><a href="#cb453-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb453-13"><a href="#cb453-13" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb453-14"><a href="#cb453-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> +<span id="cb453-15"><a href="#cb453-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb453-16"><a href="#cb453-16" aria-hidden="true"></a> <span class="fu">\ </span>and a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> +<span id="cb453-17"><a href="#cb453-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb453-18"><a href="#cb453-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb453-19"><a href="#cb453-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> +<span id="cb453-20"><a href="#cb453-20" aria-hidden="true"></a> .<span class="co">%</span></span> +<span id="cb453-21"><a href="#cb453-21" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> +<span id="cb453-22"><a href="#cb453-22" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb453-23"><a href="#cb453-23" aria-hidden="true"></a> , and</span> +<span id="cb453-24"><a href="#cb453-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> +<span id="cb453-25"><a href="#cb453-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> +<span id="cb453-26"><a href="#cb453-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb453-27"><a href="#cb453-27" aria-hidden="true"></a> renderers = {</span> +<span id="cb453-28"><a href="#cb453-28" aria-hidden="true"></a> cite = {<span class="co">%</span></span> +<span id="cb453-29"><a href="#cb453-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> +<span id="cb453-30"><a href="#cb453-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> +<span id="cb453-31"><a href="#cb453-31" aria-hidden="true"></a> This is</span> +<span id="cb453-32"><a href="#cb453-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> +<span id="cb453-33"><a href="#cb453-33" aria-hidden="true"></a> },</span> +<span id="cb453-34"><a href="#cb453-34" aria-hidden="true"></a> },</span> +<span id="cb453-35"><a href="#cb453-35" aria-hidden="true"></a>}</span> +<span id="cb453-36"><a href="#cb453-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb453-37"><a href="#cb453-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb453-38"><a href="#cb453-38" aria-hidden="true"></a>[see @abrahams90, pp. 12; @eijkhout91, pp. 34]</span> +<span id="cb453-39"><a href="#cb453-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb453-40"><a href="#cb453-40" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb454"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb454-1"><a href="#cb454-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a parenthesized citation <em>abrahams90</em> with a prefix see and a postfix <em>pp. 12</em>, and a citation <em>eijkhout91</em> with a postfix <em>pp. 34</em>.</p> </blockquote> <h4 data-number="2.3.1.22" id="text-citations-renderer"><span class="header-section-number">2.3.1.22</span> Text Citations Renderer</h4> <p>The <code>\markdownRendererTextCite</code> macro represents a string of one or more text citations. This macro will only be produced, when the <strong><code>citations</code></strong> option is enabled. The macro receives parameters in the same format as the macro.</p> -<h5 class="unnumbered" data-number="" id="latex-example-55"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-56"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb444"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb444-1"><a href="#cb444-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb444-2"><a href="#cb444-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb444-3"><a href="#cb444-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> -<span id="cb444-4"><a href="#cb444-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> -<span id="cb444-5"><a href="#cb444-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb444-6"><a href="#cb444-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb444-7"><a href="#cb444-7" aria-hidden="true"></a> a text citation <span class="fu">\emph</span>{#4}</span> -<span id="cb444-8"><a href="#cb444-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb444-9"><a href="#cb444-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> -<span id="cb444-10"><a href="#cb444-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb444-11"><a href="#cb444-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb444-12"><a href="#cb444-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb444-13"><a href="#cb444-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb444-14"><a href="#cb444-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> -<span id="cb444-15"><a href="#cb444-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb444-16"><a href="#cb444-16" aria-hidden="true"></a> <span class="fu">\ </span>and a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb444-17"><a href="#cb444-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb444-18"><a href="#cb444-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb444-19"><a href="#cb444-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> -<span id="cb444-20"><a href="#cb444-20" aria-hidden="true"></a> .<span class="co">%</span></span> -<span id="cb444-21"><a href="#cb444-21" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> -<span id="cb444-22"><a href="#cb444-22" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb444-23"><a href="#cb444-23" aria-hidden="true"></a> , and</span> -<span id="cb444-24"><a href="#cb444-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> -<span id="cb444-25"><a href="#cb444-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb444-26"><a href="#cb444-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb444-27"><a href="#cb444-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb444-28"><a href="#cb444-28" aria-hidden="true"></a> textCite = {<span class="co">%</span></span> -<span id="cb444-29"><a href="#cb444-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> -<span id="cb444-30"><a href="#cb444-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> -<span id="cb444-31"><a href="#cb444-31" aria-hidden="true"></a> This is</span> -<span id="cb444-32"><a href="#cb444-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> -<span id="cb444-33"><a href="#cb444-33" aria-hidden="true"></a> },</span> -<span id="cb444-34"><a href="#cb444-34" aria-hidden="true"></a> },</span> -<span id="cb444-35"><a href="#cb444-35" aria-hidden="true"></a>}</span> -<span id="cb444-36"><a href="#cb444-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb444-37"><a href="#cb444-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb444-38"><a href="#cb444-38" aria-hidden="true"></a>@abrahams90 [pp. 12; also @eijkhout91]</span> -<span id="cb444-39"><a href="#cb444-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb444-40"><a href="#cb444-40" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb445"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb445-1"><a href="#cb445-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb455"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb455-1"><a href="#cb455-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb455-2"><a href="#cb455-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> +<span id="cb455-3"><a href="#cb455-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> +<span id="cb455-4"><a href="#cb455-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> +<span id="cb455-5"><a href="#cb455-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> +<span id="cb455-6"><a href="#cb455-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb455-7"><a href="#cb455-7" aria-hidden="true"></a> a text citation <span class="fu">\emph</span>{#4}</span> +<span id="cb455-8"><a href="#cb455-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb455-9"><a href="#cb455-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> +<span id="cb455-10"><a href="#cb455-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb455-11"><a href="#cb455-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> +<span id="cb455-12"><a href="#cb455-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb455-13"><a href="#cb455-13" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb455-14"><a href="#cb455-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> +<span id="cb455-15"><a href="#cb455-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb455-16"><a href="#cb455-16" aria-hidden="true"></a> <span class="fu">\ </span>and a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> +<span id="cb455-17"><a href="#cb455-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb455-18"><a href="#cb455-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb455-19"><a href="#cb455-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> +<span id="cb455-20"><a href="#cb455-20" aria-hidden="true"></a> .<span class="co">%</span></span> +<span id="cb455-21"><a href="#cb455-21" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> +<span id="cb455-22"><a href="#cb455-22" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb455-23"><a href="#cb455-23" aria-hidden="true"></a> , and</span> +<span id="cb455-24"><a href="#cb455-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> +<span id="cb455-25"><a href="#cb455-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> +<span id="cb455-26"><a href="#cb455-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb455-27"><a href="#cb455-27" aria-hidden="true"></a> renderers = {</span> +<span id="cb455-28"><a href="#cb455-28" aria-hidden="true"></a> textCite = {<span class="co">%</span></span> +<span id="cb455-29"><a href="#cb455-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> +<span id="cb455-30"><a href="#cb455-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> +<span id="cb455-31"><a href="#cb455-31" aria-hidden="true"></a> This is</span> +<span id="cb455-32"><a href="#cb455-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> +<span id="cb455-33"><a href="#cb455-33" aria-hidden="true"></a> },</span> +<span id="cb455-34"><a href="#cb455-34" aria-hidden="true"></a> },</span> +<span id="cb455-35"><a href="#cb455-35" aria-hidden="true"></a>}</span> +<span id="cb455-36"><a href="#cb455-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb455-37"><a href="#cb455-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb455-38"><a href="#cb455-38" aria-hidden="true"></a>@abrahams90 [pp. 12; also @eijkhout91]</span> +<span id="cb455-39"><a href="#cb455-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb455-40"><a href="#cb455-40" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb456"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb456-1"><a href="#cb456-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a text citation <em>abrahams90</em> with a postfix <em>pp. 12</em>, and a citation <em>eijkhout91</em> with a prefix <em>also</em>.</p> @@ -5958,93 +6043,93 @@ Thomas,Edison,1847</code></pre> <li><code>c</code> – The corresponding column is centered.</li> <li><code>r</code> – The corresponding column is right-aligned.</li> </ul> -<h5 class="unnumbered" data-number="" id="latex-example-56"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-57"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb446"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb446-1"><a href="#cb446-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb446-2"><a href="#cb446-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> -<span id="cb446-3"><a href="#cb446-3" aria-hidden="true"></a><span class="fu">\newcount\rowCounter</span></span> -<span id="cb446-4"><a href="#cb446-4" aria-hidden="true"></a><span class="fu">\newcount\columnCounter</span></span> -<span id="cb446-5"><a href="#cb446-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb446-6"><a href="#cb446-6" aria-hidden="true"></a><span class="fu">\def\processRow</span>#1{<span class="co">%</span></span> -<span id="cb446-7"><a href="#cb446-7" aria-hidden="true"></a> <span class="fu">\columnCounter</span>=1<span class="co">%</span></span> -<span id="cb446-8"><a href="#cb446-8" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> -<span id="cb446-9"><a href="#cb446-9" aria-hidden="true"></a> As for the alignment,</span> -<span id="cb446-10"><a href="#cb446-10" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb446-11"><a href="#cb446-11" aria-hidden="true"></a> In row <span class="fu">\the\rowCounter</span>,</span> -<span id="cb446-12"><a href="#cb446-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb446-13"><a href="#cb446-13" aria-hidden="true"></a> <span class="fu">\processColumn</span>#1</span> -<span id="cb446-14"><a href="#cb446-14" aria-hidden="true"></a> <span class="fu">\advance\rowCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb446-15"><a href="#cb446-15" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>><span class="fu">\rowTotal\relax</span></span> -<span id="cb446-16"><a href="#cb446-16" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> -<span id="cb446-17"><a href="#cb446-17" aria-hidden="true"></a> <span class="fu">\fi\processRow</span>}<span class="co">%</span></span> -<span id="cb446-18"><a href="#cb446-18" aria-hidden="true"></a><span class="fu">\def\processColumn</span>#1{<span class="co">%</span></span> -<span id="cb446-19"><a href="#cb446-19" aria-hidden="true"></a> column number <span class="fu">\the\columnCounter</span>{}</span> -<span id="cb446-20"><a href="#cb446-20" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> -<span id="cb446-21"><a href="#cb446-21" aria-hidden="true"></a> <span class="fu">\if</span>#1d{}has default alignment<span class="fu">\fi</span></span> -<span id="cb446-22"><a href="#cb446-22" aria-hidden="true"></a> <span class="fu">\if</span>#1l{}is left-aligned<span class="fu">\fi</span></span> -<span id="cb446-23"><a href="#cb446-23" aria-hidden="true"></a> <span class="fu">\if</span>#1c{}is centered<span class="fu">\fi</span></span> -<span id="cb446-24"><a href="#cb446-24" aria-hidden="true"></a> <span class="fu">\if</span>#1r{}is right-aligned<span class="fu">\fi</span></span> -<span id="cb446-25"><a href="#cb446-25" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb446-26"><a href="#cb446-26" aria-hidden="true"></a> says <span class="fu">\emph</span>{#1}<span class="co">%</span></span> -<span id="cb446-27"><a href="#cb446-27" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb446-28"><a href="#cb446-28" aria-hidden="true"></a> <span class="fu">\advance\columnCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb446-29"><a href="#cb446-29" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span><<span class="fu">\columnTotal\relax</span>, <span class="fu">\fi</span></span> -<span id="cb446-30"><a href="#cb446-30" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span>=<span class="fu">\columnTotal\relax</span>, and <span class="fu">\fi</span></span> -<span id="cb446-31"><a href="#cb446-31" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span>><span class="fu">\columnTotal\relax</span></span> -<span id="cb446-32"><a href="#cb446-32" aria-hidden="true"></a> .<span class="fu">\expandafter\@gobble</span></span> -<span id="cb446-33"><a href="#cb446-33" aria-hidden="true"></a> <span class="fu">\fi\processColumn</span>}<span class="co">%</span></span> -<span id="cb446-34"><a href="#cb446-34" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb446-35"><a href="#cb446-35" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb446-36"><a href="#cb446-36" aria-hidden="true"></a> renderers = {</span> -<span id="cb446-37"><a href="#cb446-37" aria-hidden="true"></a> table = {<span class="co">%</span></span> -<span id="cb446-38"><a href="#cb446-38" aria-hidden="true"></a> This is a table with caption <span class="fu">\emph</span>{#1} that is #3 colums wide</span> -<span id="cb446-39"><a href="#cb446-39" aria-hidden="true"></a> and #2 rows long.</span> -<span id="cb446-40"><a href="#cb446-40" aria-hidden="true"></a> <span class="fu">\rowCounter</span>=0<span class="co">%</span></span> -<span id="cb446-41"><a href="#cb446-41" aria-hidden="true"></a> <span class="fu">\def\rowTotal</span>{#2}<span class="co">%</span></span> -<span id="cb446-42"><a href="#cb446-42" aria-hidden="true"></a> <span class="fu">\def\columnTotal</span>{#3}<span class="co">%</span></span> -<span id="cb446-43"><a href="#cb446-43" aria-hidden="true"></a> <span class="fu">\processRow</span></span> -<span id="cb446-44"><a href="#cb446-44" aria-hidden="true"></a> },</span> -<span id="cb446-45"><a href="#cb446-45" aria-hidden="true"></a> },</span> -<span id="cb446-46"><a href="#cb446-46" aria-hidden="true"></a>}</span> -<span id="cb446-47"><a href="#cb446-47" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb446-48"><a href="#cb446-48" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb446-49"><a href="#cb446-49" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb446-50"><a href="#cb446-50" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb446-51"><a href="#cb446-51" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb446-52"><a href="#cb446-52" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb446-53"><a href="#cb446-53" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb446-54"><a href="#cb446-54" aria-hidden="true"></a></span> -<span id="cb446-55"><a href="#cb446-55" aria-hidden="true"></a> : Demonstration of pipe table syntax</span> -<span id="cb446-56"><a href="#cb446-56" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb446-57"><a href="#cb446-57" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb447"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb447-1"><a href="#cb447-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb457"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb457-1"><a href="#cb457-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb457-2"><a href="#cb457-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> +<span id="cb457-3"><a href="#cb457-3" aria-hidden="true"></a><span class="fu">\newcount\rowCounter</span></span> +<span id="cb457-4"><a href="#cb457-4" aria-hidden="true"></a><span class="fu">\newcount\columnCounter</span></span> +<span id="cb457-5"><a href="#cb457-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> +<span id="cb457-6"><a href="#cb457-6" aria-hidden="true"></a><span class="fu">\def\processRow</span>#1{<span class="co">%</span></span> +<span id="cb457-7"><a href="#cb457-7" aria-hidden="true"></a> <span class="fu">\columnCounter</span>=1<span class="co">%</span></span> +<span id="cb457-8"><a href="#cb457-8" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> +<span id="cb457-9"><a href="#cb457-9" aria-hidden="true"></a> As for the alignment,</span> +<span id="cb457-10"><a href="#cb457-10" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb457-11"><a href="#cb457-11" aria-hidden="true"></a> In row <span class="fu">\the\rowCounter</span>,</span> +<span id="cb457-12"><a href="#cb457-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb457-13"><a href="#cb457-13" aria-hidden="true"></a> <span class="fu">\processColumn</span>#1</span> +<span id="cb457-14"><a href="#cb457-14" aria-hidden="true"></a> <span class="fu">\advance\rowCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb457-15"><a href="#cb457-15" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>><span class="fu">\rowTotal\relax</span></span> +<span id="cb457-16"><a href="#cb457-16" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> +<span id="cb457-17"><a href="#cb457-17" aria-hidden="true"></a> <span class="fu">\fi\processRow</span>}<span class="co">%</span></span> +<span id="cb457-18"><a href="#cb457-18" aria-hidden="true"></a><span class="fu">\def\processColumn</span>#1{<span class="co">%</span></span> +<span id="cb457-19"><a href="#cb457-19" aria-hidden="true"></a> column number <span class="fu">\the\columnCounter</span>{}</span> +<span id="cb457-20"><a href="#cb457-20" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> +<span id="cb457-21"><a href="#cb457-21" aria-hidden="true"></a> <span class="fu">\if</span>#1d{}has default alignment<span class="fu">\fi</span></span> +<span id="cb457-22"><a href="#cb457-22" aria-hidden="true"></a> <span class="fu">\if</span>#1l{}is left-aligned<span class="fu">\fi</span></span> +<span id="cb457-23"><a href="#cb457-23" aria-hidden="true"></a> <span class="fu">\if</span>#1c{}is centered<span class="fu">\fi</span></span> +<span id="cb457-24"><a href="#cb457-24" aria-hidden="true"></a> <span class="fu">\if</span>#1r{}is right-aligned<span class="fu">\fi</span></span> +<span id="cb457-25"><a href="#cb457-25" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb457-26"><a href="#cb457-26" aria-hidden="true"></a> says <span class="fu">\emph</span>{#1}<span class="co">%</span></span> +<span id="cb457-27"><a href="#cb457-27" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb457-28"><a href="#cb457-28" aria-hidden="true"></a> <span class="fu">\advance\columnCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb457-29"><a href="#cb457-29" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span><<span class="fu">\columnTotal\relax</span>, <span class="fu">\fi</span></span> +<span id="cb457-30"><a href="#cb457-30" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span>=<span class="fu">\columnTotal\relax</span>, and <span class="fu">\fi</span></span> +<span id="cb457-31"><a href="#cb457-31" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span>><span class="fu">\columnTotal\relax</span></span> +<span id="cb457-32"><a href="#cb457-32" aria-hidden="true"></a> .<span class="fu">\expandafter\@gobble</span></span> +<span id="cb457-33"><a href="#cb457-33" aria-hidden="true"></a> <span class="fu">\fi\processColumn</span>}<span class="co">%</span></span> +<span id="cb457-34"><a href="#cb457-34" aria-hidden="true"></a><span class="fu">\makeatother</span></span> +<span id="cb457-35"><a href="#cb457-35" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb457-36"><a href="#cb457-36" aria-hidden="true"></a> renderers = {</span> +<span id="cb457-37"><a href="#cb457-37" aria-hidden="true"></a> table = {<span class="co">%</span></span> +<span id="cb457-38"><a href="#cb457-38" aria-hidden="true"></a> This is a table with caption <span class="fu">\emph</span>{#1} that is #3 colums wide</span> +<span id="cb457-39"><a href="#cb457-39" aria-hidden="true"></a> and #2 rows long.</span> +<span id="cb457-40"><a href="#cb457-40" aria-hidden="true"></a> <span class="fu">\rowCounter</span>=0<span class="co">%</span></span> +<span id="cb457-41"><a href="#cb457-41" aria-hidden="true"></a> <span class="fu">\def\rowTotal</span>{#2}<span class="co">%</span></span> +<span id="cb457-42"><a href="#cb457-42" aria-hidden="true"></a> <span class="fu">\def\columnTotal</span>{#3}<span class="co">%</span></span> +<span id="cb457-43"><a href="#cb457-43" aria-hidden="true"></a> <span class="fu">\processRow</span></span> +<span id="cb457-44"><a href="#cb457-44" aria-hidden="true"></a> },</span> +<span id="cb457-45"><a href="#cb457-45" aria-hidden="true"></a> },</span> +<span id="cb457-46"><a href="#cb457-46" aria-hidden="true"></a>}</span> +<span id="cb457-47"><a href="#cb457-47" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb457-48"><a href="#cb457-48" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb457-49"><a href="#cb457-49" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb457-50"><a href="#cb457-50" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb457-51"><a href="#cb457-51" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb457-52"><a href="#cb457-52" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb457-53"><a href="#cb457-53" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb457-54"><a href="#cb457-54" aria-hidden="true"></a></span> +<span id="cb457-55"><a href="#cb457-55" aria-hidden="true"></a> : Demonstration of pipe table syntax</span> +<span id="cb457-56"><a href="#cb457-56" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb457-57"><a href="#cb457-57" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb458"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb458-1"><a href="#cb458-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a table with caption <em>Demonstration of pipe table syntax</em> that is 4 colums wide and 4 rows long. As for the alignment, column number 1 is right-aligned, column number 2 is left-aligned, column number 3 has default alignment, and column number 4 is centered. In row 1, column number 1 says <em>Right</em>, column number 2 says <em>Left</em>, column number 3 says <em>Default</em>, and column number 4 says <em>Center</em>. In row 2, column number 1 says <em>12</em>, column number 2 says <em>12</em>, column number 3 says <em>12</em>, and column number 4 says <em>12</em>. In row 3, column number 1 says <em>123</em>, column number 2 says <em>123</em>, column number 3 says <em>123</em>, and column number 4 says <em>123</em>. In row 4, column number 1 says <em>1</em>, column number 2 says <em>1</em>, column number 3 says <em>1</em>, and column number 4 says <em>1</em>.</p> </blockquote> <h4 data-number="2.3.1.24" id="inline-html-comment-renderer"><span class="header-section-number">2.3.1.24</span> Inline HTML Comment Renderer</h4> <p>The <code>\markdownRendererInlineHtmlComment</code> macro represents the contents of an inline <abbr>HTML</abbr> comment. This macro will only be produced, when the <strong><code>html</code></strong> option is enabled. The macro receives a single argument that corresponds to the contents of the <abbr>HTML</abbr> comment.</p> -<h5 class="unnumbered" data-number="" id="latex-example-57"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-58"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb448"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb448-1"><a href="#cb448-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb448-2"><a href="#cb448-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span> -<span id="cb448-3"><a href="#cb448-3" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span> -<span id="cb448-4"><a href="#cb448-4" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb448-5"><a href="#cb448-5" aria-hidden="true"></a> renderers = {</span> -<span id="cb448-6"><a href="#cb448-6" aria-hidden="true"></a> inlineHtmlComment = {<span class="fu">\marginnote</span>{#1}},</span> -<span id="cb448-7"><a href="#cb448-7" aria-hidden="true"></a> },</span> -<span id="cb448-8"><a href="#cb448-8" aria-hidden="true"></a>}</span> -<span id="cb448-9"><a href="#cb448-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb448-10"><a href="#cb448-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb448-11"><a href="#cb448-11" aria-hidden="true"></a>A useful use of HTML comments are side notes.</span> -<span id="cb448-12"><a href="#cb448-12" aria-hidden="true"></a><!-- Side notes are displayed in the horizontal margins next to the relevant</span> -<span id="cb448-13"><a href="#cb448-13" aria-hidden="true"></a>passages, which makes them easier for the reader to find than footnotes. --></span> -<span id="cb448-14"><a href="#cb448-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb448-15"><a href="#cb448-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb449"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb449-1"><a href="#cb449-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb449-2"><a href="#cb449-2" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb459"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb459-1"><a href="#cb459-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb459-2"><a href="#cb459-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span> +<span id="cb459-3"><a href="#cb459-3" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span> +<span id="cb459-4"><a href="#cb459-4" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb459-5"><a href="#cb459-5" aria-hidden="true"></a> renderers = {</span> +<span id="cb459-6"><a href="#cb459-6" aria-hidden="true"></a> inlineHtmlComment = {<span class="fu">\marginnote</span>{#1}},</span> +<span id="cb459-7"><a href="#cb459-7" aria-hidden="true"></a> },</span> +<span id="cb459-8"><a href="#cb459-8" aria-hidden="true"></a>}</span> +<span id="cb459-9"><a href="#cb459-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb459-10"><a href="#cb459-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb459-11"><a href="#cb459-11" aria-hidden="true"></a>A useful use of HTML comments are side notes.</span> +<span id="cb459-12"><a href="#cb459-12" aria-hidden="true"></a><!-- Side notes are displayed in the horizontal margins next to the relevant</span> +<span id="cb459-13"><a href="#cb459-13" aria-hidden="true"></a>passages, which makes them easier for the reader to find than footnotes. --></span> +<span id="cb459-14"><a href="#cb459-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb459-15"><a href="#cb459-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb460"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb460-1"><a href="#cb460-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb460-2"><a href="#cb460-2" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following body text:</p> <blockquote> <p>A useful use of HTML comments are side notes.</p> @@ -6057,52 +6142,52 @@ Thomas,Edison,1847</code></pre> <p>By default, token renderers point to package-defined <span class="tex">T<sub>e</sub>X</span> macros, further referred to as <em>prototypes</em>, which provide useful default definitions.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-33">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb450"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb450-1"><a href="#cb450-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb450-2"><a href="#cb450-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> -<span id="cb450-3"><a href="#cb450-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> -<span id="cb450-4"><a href="#cb450-4" aria-hidden="true"></a>}</span> -<span id="cb450-5"><a href="#cb450-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb450-6"><a href="#cb450-6" aria-hidden="true"></a>~</span> -<span id="cb450-7"><a href="#cb450-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb450-8"><a href="#cb450-8" aria-hidden="true"></a></span> -<span id="cb450-9"><a href="#cb450-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> -<span id="cb450-10"><a href="#cb450-10" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</span></span> -<span id="cb450-11"><a href="#cb450-11" aria-hidden="true"></a>}</span> -<span id="cb450-12"><a href="#cb450-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb450-13"><a href="#cb450-13" aria-hidden="true"></a>~</span> -<span id="cb450-14"><a href="#cb450-14" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb450-15"><a href="#cb450-15" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb451"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb451-1"><a href="#cb451-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb461"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb461-1"><a href="#cb461-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb461-2"><a href="#cb461-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> +<span id="cb461-3"><a href="#cb461-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> +<span id="cb461-4"><a href="#cb461-4" aria-hidden="true"></a>}</span> +<span id="cb461-5"><a href="#cb461-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb461-6"><a href="#cb461-6" aria-hidden="true"></a>~</span> +<span id="cb461-7"><a href="#cb461-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb461-8"><a href="#cb461-8" aria-hidden="true"></a></span> +<span id="cb461-9"><a href="#cb461-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> +<span id="cb461-10"><a href="#cb461-10" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</span></span> +<span id="cb461-11"><a href="#cb461-11" aria-hidden="true"></a>}</span> +<span id="cb461-12"><a href="#cb461-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb461-13"><a href="#cb461-13" aria-hidden="true"></a>~</span> +<span id="cb461-14"><a href="#cb461-14" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb461-15"><a href="#cb461-15" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb462"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb462-1"><a href="#cb462-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Packages can specify token renderer prototypes.</p> <p>User-defined token renderers take precedence.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-58"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb452"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb452-1"><a href="#cb452-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb452-2"><a href="#cb452-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb452-3"><a href="#cb452-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb452-4"><a href="#cb452-4" aria-hidden="true"></a> rendererPrototypes = {</span> -<span id="cb452-5"><a href="#cb452-5" aria-hidden="true"></a> tilde = {Packages can specify token renderer prototypes.},</span> -<span id="cb452-6"><a href="#cb452-6" aria-hidden="true"></a> },</span> -<span id="cb452-7"><a href="#cb452-7" aria-hidden="true"></a>}</span> -<span id="cb452-8"><a href="#cb452-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb452-9"><a href="#cb452-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb452-10"><a href="#cb452-10" aria-hidden="true"></a>~</span> -<span id="cb452-11"><a href="#cb452-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb452-12"><a href="#cb452-12" aria-hidden="true"></a></span> -<span id="cb452-13"><a href="#cb452-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb452-14"><a href="#cb452-14" aria-hidden="true"></a> renderers = {</span> -<span id="cb452-15"><a href="#cb452-15" aria-hidden="true"></a> tilde = {User-defined token renderers take precedence.},</span> -<span id="cb452-16"><a href="#cb452-16" aria-hidden="true"></a> },</span> -<span id="cb452-17"><a href="#cb452-17" aria-hidden="true"></a>}</span> -<span id="cb452-18"><a href="#cb452-18" aria-hidden="true"></a>~</span> -<span id="cb452-19"><a href="#cb452-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb452-20"><a href="#cb452-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb453"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb453-1"><a href="#cb453-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 class="unnumbered" data-number="" id="latex-example-59"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb463"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb463-1"><a href="#cb463-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb463-2"><a href="#cb463-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb463-3"><a href="#cb463-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb463-4"><a href="#cb463-4" aria-hidden="true"></a> rendererPrototypes = {</span> +<span id="cb463-5"><a href="#cb463-5" aria-hidden="true"></a> tilde = {Packages can specify token renderer prototypes.},</span> +<span id="cb463-6"><a href="#cb463-6" aria-hidden="true"></a> },</span> +<span id="cb463-7"><a href="#cb463-7" aria-hidden="true"></a>}</span> +<span id="cb463-8"><a href="#cb463-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb463-9"><a href="#cb463-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb463-10"><a href="#cb463-10" aria-hidden="true"></a>~</span> +<span id="cb463-11"><a href="#cb463-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb463-12"><a href="#cb463-12" aria-hidden="true"></a></span> +<span id="cb463-13"><a href="#cb463-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb463-14"><a href="#cb463-14" aria-hidden="true"></a> renderers = {</span> +<span id="cb463-15"><a href="#cb463-15" aria-hidden="true"></a> tilde = {User-defined token renderers take precedence.},</span> +<span id="cb463-16"><a href="#cb463-16" aria-hidden="true"></a> },</span> +<span id="cb463-17"><a href="#cb463-17" aria-hidden="true"></a>}</span> +<span id="cb463-18"><a href="#cb463-18" aria-hidden="true"></a>~</span> +<span id="cb463-19"><a href="#cb463-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb463-20"><a href="#cb463-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb464"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb464-1"><a href="#cb464-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Packages can specify token renderer prototypes.</p> @@ -6110,24 +6195,24 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-45">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb454"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb454-1"><a href="#cb454-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb454-2"><a href="#cb454-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> -<span id="cb454-3"><a href="#cb454-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> -<span id="cb454-4"><a href="#cb454-4" aria-hidden="true"></a>}</span> -<span id="cb454-5"><a href="#cb454-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb454-6"><a href="#cb454-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb454-7"><a href="#cb454-7" aria-hidden="true"></a>~</span> -<span id="cb454-8"><a href="#cb454-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb454-9"><a href="#cb454-9" aria-hidden="true"></a></span> -<span id="cb454-10"><a href="#cb454-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> -<span id="cb454-11"><a href="#cb454-11" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</span></span> -<span id="cb454-12"><a href="#cb454-12" aria-hidden="true"></a>}</span> -<span id="cb454-13"><a href="#cb454-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb454-14"><a href="#cb454-14" aria-hidden="true"></a>~</span> -<span id="cb454-15"><a href="#cb454-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb454-16"><a href="#cb454-16" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb455"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb455-1"><a href="#cb455-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb465"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb465-1"><a href="#cb465-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb465-2"><a href="#cb465-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> +<span id="cb465-3"><a href="#cb465-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> +<span id="cb465-4"><a href="#cb465-4" aria-hidden="true"></a>}</span> +<span id="cb465-5"><a href="#cb465-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb465-6"><a href="#cb465-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb465-7"><a href="#cb465-7" aria-hidden="true"></a>~</span> +<span id="cb465-8"><a href="#cb465-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb465-9"><a href="#cb465-9" aria-hidden="true"></a></span> +<span id="cb465-10"><a href="#cb465-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> +<span id="cb465-11"><a href="#cb465-11" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</span></span> +<span id="cb465-12"><a href="#cb465-12" aria-hidden="true"></a>}</span> +<span id="cb465-13"><a href="#cb465-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb465-14"><a href="#cb465-14" aria-hidden="true"></a>~</span> +<span id="cb465-15"><a href="#cb465-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb465-16"><a href="#cb465-16" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb466"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb466-1"><a href="#cb466-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Packages can specify token renderer prototypes.</p> diff --git a/macros/generic/markdown/markdown.md b/macros/generic/markdown/markdown.md deleted file mode 100644 index 9488ded486..0000000000 --- a/macros/generic/markdown/markdown.md +++ /dev/null @@ -1,302 +0,0 @@ - ---- -title: Markdown Package User Manual -author: Vít Novotný -date: \markdownVersion{} (\markdownLastModified{}) ---- - - -<link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet" /> - -Introduction -============ -The [Markdown package][pkg] converts [markdown][] markup to \TeX{} commands. The -functionality is provided both as a Lua module and as plain \TeX{}, \LaTeX{}, and -\Hologo{ConTeXt} macro packages that can be used to directly typeset \TeX documents -containing markdown markup. Unlike other convertors, the Markdown package -does not require any external programs, and makes it easy to redefine how each -and every markdown element is rendered. Creative abuse of the markdown -syntax is encouraged. 😉 - - [markdown]: https://daringfireball.net/projects/markdown/basics - (Daring Fireball: Markdown Basics) - [pkg]: https://ctan.org/pkg/markdown - (CTAN: Package markdown) - - -This document is a user manual for the [Markdown package][pkg]. It provides -tutorials and code examples. For an in-depth description of the package -requirements, interfaces, and implementation, please refer to the [technical -documentation][techdoc]. - - [techdoc]: http://mirrors.ctan.org/macros/generic/markdown/markdown.pdf - (A Markdown Interpreter for TeX) - - -Requirements ------------- - -The package requires either [our official Docker image][docker], which contains -the latest development version of the Markdown package, or a \TeX{} -distribution: [\TeX{} Live][tl] ≥ 2018 is known to work with the current -version of the Markdown package and so are recent versions of [Mik\TeX{}][mik]. -If you are using an older, incomplete, or atypical \TeX{} distribution, please -consult the [technical documentation][techdoc] for a detailed list of -requirements. - - [docker]: https://hub.docker.com/r/witiko/markdown/tags (witiko/markdown - Docker Image) - [tl]: https://www.tug.org/texlive/ (TeX Live - TeX Users Group) - [mik]: https://miktex.org/ (Home - MiKTeXorg) - -Installation ------------- - -If Markdown is not included in your \TeX{} distribution, you will need to -install it. - -First, download the package from the repository using Git: -``` sh -git clone https://github.com/witiko/markdown -`````` -Next, enter the directory named `markdown` and run the `make base` command using -GNU Make: -``` sh -cd markdown -make base -`````` -This should produce the following files: - - * `markdown.lua`, the Lua module, - * `libraries/markdown-tinyyaml.lua`, an external library for reading \acro{yaml}, - * `markdown-cli.lua`, the Lua command-line interface, - * `markdown.tex`, the plain \TeX{} macro package, - * `markdown.sty`, the \LaTeX{} package, - * `markdownthemewitiko_dot.sty`, the `witiko/dot` \LaTeX{} theme, - * `markdownthemewitiko_graphicx_http.sty`, the `witiko/graphicx/http` \LaTeX{} theme, - * `markdownthemewitiko_tilde.sty`, the `witiko/tilde` \LaTeX{} theme, and - * `t-markdown.tex`, the \Hologo{ConTeXt} module. - -### Local Installation - -To perform a local installation, place the above files into your \TeX{} -directory structure. This is generally where the individual files should be -placed: - - * `⟨TEXMF⟩/tex/luatex/markdown/markdown.lua` - * `⟨TEXMF⟩/tex/luatex/markdown/markdown-tinyyaml.lua` - * `⟨TEXMF⟩/scripts/markdown/markdown-cli.lua` - * `⟨TEXMF⟩/tex/generic/markdown/markdown.tex` - * `⟨TEXMF⟩/tex/latex/markdown/markdown.sty` - * `⟨TEXMF⟩/tex/latex/markdown/markdownthemewitiko_dot.sty` - * `⟨TEXMF⟩/tex/latex/markdown/markdownthemewitiko_graphicx_http.sty` - * `⟨TEXMF⟩/tex/latex/markdown/markdownthemewitiko_tilde.sty` - * `⟨TEXMF⟩/tex/context/third/markdown/t-markdown.tex` - -where `⟨TEXMF⟩` corresponds to a root of your \TeX{} distribution, such as -`/usr/share/texmf` and `~/texmf` on UN\*X systems or -`C:\Users\`\meta{Your username}`\texmf` on Windows systems. When in doubt, -consult the manual of your \TeX{} distribution. - -### Portable Installation - -Alternatively, you can also store the above files in the same folder as your -\TeX{} document and distribute them together. This way your document can be -portably typeset on legacy \TeX{} distributions. - -Since Markdown version 2.10.0, the file `markdown.tex` must be placed in -a directory named `markdown` due to [issue #74][issue-74]. - - [issue-74]: https://github.com/witiko/markdown/issues/74 (Does not compile if user names own document markdown.tex) - - -First Document --------------- - -In this section, we will take the necessary steps to typeset our first markdown -document in \TeX{}. This will serve as our first hands-on experience with the -package and also as a reassurance that the package has been correctly installed. - -If you are using [our official Docker image][docker], you need to prefix all -commands in this section with `docker run --rm -v "$PWD"/workdir:/workdir -w -/workdir witiko/markdown`. For example, instead of `luatex document.tex`, you -would execute the following command: -``` sh -docker run --rm -v "$PWD"/workdir:/workdir -w /workdir witiko/markdown \ - luatex document.tex -`````` - -### Using Lua - -Using a text editor, create a text document named `document.tex` with the -following content: -``` tex -\input markdown -\input hello -\bye -``````` - -#### Using the Lua Module - -Using a text editor, create a text document named `hello.lua` with the -following content: -``` lua -#!/usr/bin/env texlua -local ran_ok, kpse = pcall(require, "kpse") -if ran_ok then kpse.set_program_name("luatex") end -local markdown = require("markdown") -local convert = markdown.new() -print(convert("Hello *world*!")) -``````` -Next, invoke LuaTeX from the terminal: -``` sh -texlua hello.lua > hello.tex -luatex document.tex -`````` -A PDF document named `document.pdf` should be produced and contain the text -“Hello *world*!” Invoking pdfTeX should have the same effect: -``` sh -texlua hello.lua > hello.tex -pdftex document.tex -`````` - -#### Using the Lua Command-Line Interface - -Using a text editor, create a text document named `hello.md` with the -following content: -``` md -Hello *world*! -`````` -Next, invoke LuaTeX from the terminal: -``` sh -texlua ⟨CLI pathname⟩ -- hello.md hello.tex -luatex document.tex -`````` -where \meta{CLI pathname} corresponds to the location of the Lua CLI script file, -such as `~/texmf/scripts/markdown/markdown-cli.lua` on UN\*X systems or -`C:\Users\`\meta{Your username}`\texmf\scripts\markdown\markdown-cli.lua` on Windows -systems. Use the command `kpsewhich -a markdown-cli.lua` to locate the Lua CLI -script file using [Kpathsea][]. - - [Kpathsea]: https://tug.org/kpathsea/ (Kpathsea - TeX Users Group) - -A PDF document named `document.pdf` should be produced and contain the text “Hello -*world*!” Invoking pdfTeX should have the same effect: -``` sh -texlua ⟨CLI pathname⟩ -- hello.md hello.tex -pdftex document.tex -`````` - -### Using Plain \TeX{} - -Using a text editor, create a text document named `document.tex` with the -following content: -``` tex -\input markdown -\markdownBegin -Hello *world*! -\markdownEnd -\bye -``````` -Next, invoke LuaTeX from the terminal: -``` sh -luatex document.tex -`````` -A PDF document named `document.pdf` should be produced and contain the text -“Hello *world*!” Invoking pdfTeX should have the same effect: -``` sh -pdftex --shell-escape document.tex -``````` - -### Using \LaTeX{} - -Using a text editor, create a text document named `document.tex` with the -following content: -``` tex -\documentclass{article} -\usepackage{markdown} -\begin{document} -\begin{markdown} -Hello *world*! -\end{markdown} -\end{document} -``````` -Next, invoke LuaTeX from the terminal: -``` sh -lualatex document.tex -`````` -A PDF document named `document.pdf` should be produced and contain the text “Hello -*world*!” Invoking pdfTeX should have the same effect: -``` sh -pdflatex --shell-escape document.tex -`````` - -*** - -As the next step, try typesetting the example documents distributed along with -the Markdown package: -``` sh -git clone https://github.com/witiko/markdown -cd markdown/examples -lualatex latex.tex -`````` -A PDF document named `latex.pdf` should be produced. Open the text documents -`latex.tex` and `example.md` in a text editor to see how the example documents -are structured. Try changing the documents and typesetting them as follows: -``` sh -lualatex latex.tex -`````` -to see the effect of your changes. - -### Using \Hologo{ConTeXt} - -Using a text editor, create a text document named `document.tex` with the -following content: -``` tex -\usemodule[t][markdown] -\starttext -\startmarkdown -Hello *world*! -\stopmarkdown -\stoptext -``````` -Next, invoke LuaTeX from the terminal: -``` sh -context document.tex -`````` -A PDF document named `document.pdf` should be produced and contain the text “Hello -*world*!” Invoking pdfTeX should have the same effect: -``` sh -texexec --passon=--shell-escape document.tex -`````` - -*** - -As the next step, try typesetting the example documents distributed along with -the Markdown package: -``` sh -git clone https://github.com/witiko/markdown -cd markdown/examples -context context.tex -`````` -A PDF document named `context.pdf` should be produced. Open the text documents -`context.tex` and `example.md` in a text editor to see how the example documents -are structured. Try changing the documents and typesetting them as follows: -``` sh -context context.tex -`````` -to see the effect of your changes. - -Examples -======== - -In this section, I will describe the individual parts of the Markdown package. -Each part will be shown by example, leaving the implementation details to the -[technical documentation][techdoc]. - - [techdoc]: https://mirrors.ctan.org/macros/generic/markdown/markdown.pdf - (A Markdown Interpreter for \TeX{}) - -/markdown-interfaces.md -/markdown-options.md -/markdown-tokens.md - diff --git a/macros/generic/markdown/markdown.pdf b/macros/generic/markdown/markdown.pdf Binary files differindex 1319fa0d0e..2ce9620627 100644 --- a/macros/generic/markdown/markdown.pdf +++ b/macros/generic/markdown/markdown.pdf diff --git a/macros/generic/witharrows/README.md b/macros/generic/witharrows/README.md index 3ca957c2a0..9e57579a52 100644 --- a/macros/generic/witharrows/README.md +++ b/macros/generic/witharrows/README.md @@ -23,7 +23,7 @@ The package `witharrows` is present in the distributions MiKTeX, TeXLive and Mac For a manual installation: * put the files `witharrows.ins` and `witharrows.dtx` in the same directory; -* run `latex witharrows.ins`. +* run `latex witharrows.ins` in that directory. The files `witharrows.sty` and `witharrows.tex` will be generated. diff --git a/macros/generic/witharrows/witharrows-french.pdf b/macros/generic/witharrows/witharrows-french.pdf Binary files differindex 2d9b238271..19becad1d3 100644 --- a/macros/generic/witharrows/witharrows-french.pdf +++ b/macros/generic/witharrows/witharrows-french.pdf diff --git a/macros/generic/witharrows/witharrows-french.tex b/macros/generic/witharrows/witharrows-french.tex index 8c19fc72f8..56d9e694d3 100644 --- a/macros/generic/witharrows/witharrows-french.tex +++ b/macros/generic/witharrows/witharrows-french.tex @@ -11,6 +11,7 @@ \usepackage{color} \usepackage{verbatim} \usepackage{mathtools} +\usepackage[hyperfootnotes = false]{hyperref} \usepackage[footnotehyper]{witharrows} \usepackage{amsfonts} \usepackage{amssymb} @@ -59,7 +60,6 @@ \setlength{\parindent}{0pt} - \begin{document} @@ -769,8 +769,8 @@ A & = B \Arrow{un}\Arrow[o,jump=2]{deux}\Arrow[o,jump=3]{trois}\\ \end{WithArrows}$ \bigskip -L'espace (horizontal) entre une flèche de type \verb|o| et les flèches immédiatement recouvertes est fixé par le -paramètre \verb|xoffset-for-o-arrows| que l'on peut régler avec \verb|\WithArrowsOptions| (valeur initiale : 2~mm). +L'espace (horizontal) entre une flèche de type |o| et les flèches immédiatement recouvertes est fixé par le +paramètre |xoffset-for-o-arrows| que l'on peut régler avec |\WithArrowsOptions| (valeur initiale : 2~mm). \bigskip \emph{Remarque} : La lettre |o| a été choisie car c'est la première lettre du mot anglais \emph{over}. Une flèche @@ -1025,7 +1025,7 @@ Contrairement à |{aligned}|, l'environnement |{WithArrows}| utilise |\textstyle Là aussi, il est possible de changer ce comportement avec |\WithArrowsOptions|: -\quad \verb|\WithArrowsOptions{displaystyle}|. +\quad |\WithArrowsOptions{displaystyle}|. \smallskip @@ -2169,7 +2169,7 @@ dans l'extension \pkg{witharrows} avec le code suivant: -\section{Examples} +\section{Exemples} \subsection{\textbackslash MoveEqLeft} @@ -2548,15 +2548,6 @@ Le document |witharrows.pdf| (fourni avec l'extension \pkg{witharrows}) contient documentation ici présente, ainsi que le code source commenté et un historique des versions. -\bigskip -Les versions successives du fichier |witharrows.sty| fournies par TeXLive sont disponibles sur le serveur -\textsc{svn} de TeXLive : - -{ -\small -\url{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/nicematrix/witharrows.sty} -} - \end{document} diff --git a/macros/generic/witharrows/witharrows.dtx b/macros/generic/witharrows/witharrows.dtx index 2e6c4270ea..921c2ebc77 100644 --- a/macros/generic/witharrows/witharrows.dtx +++ b/macros/generic/witharrows/witharrows.dtx @@ -1,6 +1,6 @@ %\iffalse meta-comment % -% Copyright (C) 2017-2021 by F. Pantigny +% Copyright (C) 2017-2022 by F. Pantigny % ----------------------------------- % % This file may be distributed and/or modified under the @@ -15,8 +15,8 @@ % % \fi % \iffalse -\def\myfileversion{2.6c} -\def\myfiledate{2021/03/04} +\def\myfileversion{2.6d} +\def\myfiledate{2022/01/01} % % %<*batchfile> @@ -26,7 +26,7 @@ \usedir{tex/latex/witharrows} \preamble -Copyright (C) 2017-2021 by F. Pantigny +Copyright (C) 2017-2022 by F. Pantigny ----------------------------------- This file may be distributed and/or modified under the @@ -45,10 +45,12 @@ version 2005/12/01 or later. %</batchfile> % %<*driver> -\documentclass[dvipsnames]{l3doc}% dvipsnames is for xcolor (loaded by Tikz, loaded by witharrows) +\documentclass[dvipsnames]{l3doc}% dvipsnames is for xcolor (loaded by Tikz) +\VerbatimFootnotes \usepackage{xltxtra} \usepackage[xetex]{geometry} \geometry{left=2.8cm,right=2.8cm,top=2.5cm,bottom=2.5cm,papersize={21cm,29.7cm}} +\usepackage[hyperfootnotes=false]{footnotehyper} \usepackage[footnotehyper]{witharrows} \usetikzlibrary{calc} \usepackage{mathtools} @@ -698,7 +700,7 @@ version 2005/12/01 or later. % \bigskip % In an environment which uses the option |group| or the option |groups|, it's % still possible to give an option of position (|ll|, |lr|, |rl|, |rr| or |i|) -% to an individual arrow\footnote{Such an arrow will be called +% to an individual arrow\footnote{Such arrow will be called % \emph{independent} in the technical documentation}. Such arrow will be drawn % irrespective of the groups. It's also possible to start a new group by % applying the option |new-group| to an given arrow. @@ -814,7 +816,7 @@ version 2005/12/01 or later. % % \bigskip % The horizontal space between an arrow of type |o| and the arrows immediately -% covered is fixed by the dimension \verb|xoffset-for-o-arrows| which can be set +% covered is fixed by the dimension |xoffset-for-o-arrows| which can be set % which the command |\WithArrowsOptions| (initial value: 2~mm). % % @@ -1813,7 +1815,7 @@ version 2005/12/01 or later. % % For lisibility, this option |left-brace| is also available with a special % syntax: it's possible to give this option between angle brackets -% (\verb|<| and \verb|>|) just after \verb|{DispWithArrows}| (before the optional +% (|<| and |>|) just after |{DispWithArrows}| (before the optional % arguments between square brackets). % % \bigskip @@ -1872,7 +1874,7 @@ version 2005/12/01 or later. % interactive link. % % \bigskip -% With the option \verb|replace-left-brace-by|, it's possible to replace the +% With the option |replace-left-brace-by|, it's possible to replace the % left curly brace by another extensible delimiter. For example, % ``|replace-left-brace-by = [\enskip|'' will compose with a bracket and add also a % |\enskip| after this bracket. @@ -1931,7 +1933,7 @@ version 2005/12/01 or later. % By default, the value is the following: % % \smallskip -% \qquad \verb|\draw (#1) to node {#3} (#2) ;| +% \qquad |\draw (#1) to node {#3} (#2) ;| % % % \bigskip @@ -2377,7 +2379,7 @@ version 2005/12/01 or later. % environments nested inside).} % % \smallskip -% The value by defaut of |tikz-code| is \verb|\draw (#1) to node {#3} (#2) ;| +% The value by defaut of |tikz-code| is |\draw (#1) to node {#3} (#2) ;| % where the three markers |#1|, |#2| and |#3| represent the start row, the end % row and the label of the arrow. % @@ -5162,7 +5164,7 @@ version 2005/12/01 or later. % Even if the default value of |\nulldelimiterspace| is 1.2~pt, we take it into account. % \begin{macrocode} \group_begin: - \dim_set_eq:NN \nulldelimiterspace \c_zero_dim + \dim_zero:N \nulldelimiterspace \c_math_toggle_token \left \l_@@_replace_left_brace_by_tl \vcenter to 1 cm { } \right. \c_math_toggle_token @@ -5222,7 +5224,10 @@ version 2005/12/01 or later. %</plain-TeX> %<*LaTeX> \bool_if:NTF \l_@@_in_label_or_minipage_bool - { \c_math_toggle_token } + { + \noindent % added in v. 2.6d + \c_math_toggle_token + } { %</LaTeX> % \end{macrocode} @@ -5336,13 +5341,17 @@ version 2005/12/01 or later. \hbox_to_wd:nn \g_@@_alignment_dim { \box_use_drop:N \l_@@_left_brace_box +% \end{macrocode} +% Here, you should use |\box_ht_plus_dp:N| when TeXLive 2021 will be available +% on Overleaf. +% \begin{macrocode} \dim_set:Nn \l_tmpa_dim { \box_ht:N \l_@@_halign_box + \box_dp:N \l_@@_halign_box } \group_begin: - \dim_set_eq:NN \nulldelimiterspace \c_zero_dim + \dim_zero:N \nulldelimiterspace \c_math_toggle_token \left \l_@@_replace_left_brace_by_tl \vcenter to \l_tmpa_dim { \vfil } @@ -6154,7 +6163,7 @@ version 2005/12/01 or later. % \bigskip % Eventually, we can draw the arrow with the code in |\l_@@_tikz_code_tl|. We % recall that the value by default for this token list is :\enskip -% ``\verb|\draw (#1) to node {#3} (#2) ;|''. This value can be modified with the +% ``|\draw (#1) to node {#3} (#2) ;|''. This value can be modified with the % option |tikz-code|. We use the variant |\@@_draw_arrow:nno| of the macro % |\@@_draw_arrow:nnn| because of the characters \emph{underscore} in the name % |\l_tmpa_tl|: if the user uses the Tikz library |babel|, the third argument of @@ -6162,7 +6171,7 @@ version 2005/12/01 or later. % will be in the argument of a command |node| of an instruction |\draw| of % Tikz... and we will have an error because of the characters % \emph{underscore}.\footnote{There were other solutions: use another name -% without \emph{underscore} (like \Verb|\ltmpatl|) or use the package +% without \emph{underscore} (like |\ltmpatl|) or use the package % \pkg{underscore} (with this package, the characters \emph{underscore} will be % rescanned without errors, even in text mode).} % \begin{macrocode} @@ -6206,7 +6215,7 @@ version 2005/12/01 or later. \pgf@relevantforpicturesizetrue #1 \dim_compare:nNnTF \pgf@picminx = { 16000 pt } - { \dim_set_eq:NN \l_tmpa_dim \c_zero_dim } + { \dim_zero:NN \l_tmpa_dim } { \dim_set:Nn \l_tmpa_dim { \pgf@picmaxx - \pgf@picminx } } \dim_add:Nn \l_tmpa_dim \l_@@_xoffset_dim \prop_gput:cnV @@ -7724,13 +7733,6 @@ version 2005/12/01 or later. % % \section{History} % -% The successive versions of the file |witharrows.sty| provided by TeXLive are available on the -% \textsc{svn} server of TeXLive: -% -% { -% \small -% \url{https:www.tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/witharrows/witharrows.sty} -% } % \subsection*{Changes between versions 1.0 and 1.1} % % Option for the command |\\| and option |interline| @@ -7947,6 +7949,8 @@ version 2005/12/01 or later. % Replacement of |\hbox_unpack_clear:N| by |\hbox_unpack_drop:N| since % |\hbox_unpack_clear:N| is now deprecated in \pkg{expl3}. % +% Version 2.6d: correction of a bug (cf. question 628461 on TeX StackExchange). +% % \PrintIndex % % \tableofcontents diff --git a/macros/generic/witharrows/witharrows.pdf b/macros/generic/witharrows/witharrows.pdf Binary files differindex 03a0cb1161..e5e271026a 100644 --- a/macros/generic/witharrows/witharrows.pdf +++ b/macros/generic/witharrows/witharrows.pdf |