summaryrefslogtreecommitdiff
path: root/macros/generic/markdown
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-11-23 03:03:27 +0000
committerNorbert Preining <norbert@preining.info>2024-11-23 03:03:27 +0000
commitc5ea838e494313690309865715e27f79305f14ae (patch)
tree9cbbf53d64d7e8a079f25f0e21ea192429a549d5 /macros/generic/markdown
parentcfe1c0b2748a9c908eaecd919f4beddd483c8739 (diff)
CTAN sync 202411230303
Diffstat (limited to 'macros/generic/markdown')
-rw-r--r--macros/generic/markdown/CHANGES.md146
-rw-r--r--macros/generic/markdown/DEPENDS.txt7
-rw-r--r--macros/generic/markdown/VERSION2
-rw-r--r--macros/generic/markdown/libraries/markdown-tinyyaml.lua882
-rw-r--r--macros/generic/markdown/markdown.dtx3045
-rw-r--r--macros/generic/markdown/markdown.html481
-rw-r--r--macros/generic/markdown/markdown.ins3
-rw-r--r--macros/generic/markdown/markdown.pdfbin1198664 -> 1223473 bytes
8 files changed, 2052 insertions, 2514 deletions
diff --git a/macros/generic/markdown/CHANGES.md b/macros/generic/markdown/CHANGES.md
index f4e2fdb7d0..01e87e6e16 100644
--- a/macros/generic/markdown/CHANGES.md
+++ b/macros/generic/markdown/CHANGES.md
@@ -1,5 +1,148 @@
# Changes
+## 3.9.0 (2024-11-21)
+
+Development:
+
+- Convert built-in LaTeX themes `witiko/dot` and `witiko/graphicx/http` into
+ plain TeX themes. (#514, #522, #529)
+
+ This allows these themes to be used in formats such as plain TeX and ConTeXt
+ as well.
+
+Refactoring:
+
+- Remove dependencies on `ifthen`, `gobble`, and `catchfile`. (#514, #522, #529)
+
+- Store small built-in LaTeX themes `witiko/dot`, `witiko/graphicx/http`, and
+ `witiko/tilde` in expl3 props in files `markdown.tex` and `markdown.sty`.
+ (#514, #522, #529)
+
+ This simplifies the distribution and installation of these themes, which were
+ previously located in individual `.tex` and `.sty` files.
+
+ The built-in plain TeX, LaTeX, and ConTeXt themes `witiko/markdown/defaults`
+ are still distributed in individual files. This is because inlining these
+ themes in files `markdown.tex`, `markdown.sty`, and `t-markdown.tex` would
+ make it more difficult for users to copy and modify these themes without
+ delaying updates to the Markdown package itself. Furthermore, these themes
+ are large and storing/executing them from an expl3 prop would make it more
+ difficult to determine the line numbers when errors occur.
+
+Fixes:
+
+- Protect renderers and renderer prototypes. (#465, #506)
+
+ After this change, default renderers and renderer prototypes as well
+ as renderers and renderers and prototypes defined using the keys
+ `renderers` and `rendererPrototypes` of the command `\markdownSetup`
+ are protected, which is usually preferable for typesetting.
+
+ New keys `unprotectedRenderers` and `unprotectedRendererPrototypes`
+ were also added to the command `\markdownSetup`. These keys define
+ unprotected renderers and renderer prototypes, respectively, which are easier
+ to expand and may be preferable for programming.
+
+Defaults:
+
+- Define default LaTeX renderer prototypes for table identifiers.
+ (#525, suggested by @machitgarha, #528)
+
+ This establishes a reliable method for authors to reference tables within
+ Markdown:
+
+ ``` tex
+ \documentclass{article}
+ \usepackage[
+ pipe_tables,
+ table_attributes,
+ table_captions,
+ relative_references,
+ ]{markdown}
+ \begin{document}
+ \begin{markdown}
+
+ | Right | *Left* | Default | Center |
+ |------:|:-------|-------------|:------:|
+ | 12 | 12 | 12 | 12 |
+ | 123 | 123 | **123** | 123 |
+ | 1 | 1 | 1 | 1 |
+
+ : Demonstration of *pipe table* syntax with the caption spreading over
+ multiple lines. {#identifier .class-name key=value}
+
+ Demonstration of a *relative reference*: See Table <#identifier>.
+
+ \end{markdown}
+ \end{document}
+ ```
+
+- Define default LaTeX renderer prototypes for bracketed spans.
+ (discussed with @MacLotsen at TUG 2024 and with @TeXhackse at matrix.org, #528)
+
+ This establishes a reliable method for authors to reference the last LaTeX
+ counter that has been incremented in e.g. ordered lists.
+
+ ``` tex
+ \documentclass{article}
+ \usepackage[
+ bracketed_spans,
+ relative_references,
+ start_number = false,
+ ]{markdown}
+ \begin{document}
+ \begin{markdown}
+
+ Demonstration of *bracketed spans* syntax:
+
+ 1. First item
+ 2. [Second item]{#second-item}
+ 3. Third item
+
+ Demonstration of a *relative reference*: See item <#second-item>.
+
+ \end{markdown}
+ \end{document}
+ ```
+
+- Use package LuaXML in default LaTeX renderer prototypes for content blocks,
+ raw blocks, and inline raw spans. (#469, #532, co-authored by @michal.h21)
+
+ This allows authors to render HTML fragments in their LaTeX documents:
+
+ ``` tex
+ \documentclass{article}
+ \usepackage[content_blocks, raw_attribute]{markdown}
+ \begin{filecontents}[overwrite, nosearch, noheader]{example_input.html}
+ <b>foo</b> <i>bar</i>
+ \end{filecontents}
+ \begin{document}
+ \begin{markdown}
+
+ Raw text span: `<b>foo</b> <i>bar</i>`{=html}
+
+ Raw code block:
+
+ ``` {=html}
+ <b>foo</b> <i>bar</i>
+ ```
+
+ Content block:
+
+ /example_input.html
+
+ \end{markdown}
+ \end{document}
+ ```
+
+Deprecation:
+
+- Remove support for TeX Live 2022. (da85e015, 8f2d25c7)
+
+ This change also removes the Lua module `markdown-tinyyaml`, which has been
+ scheduled for removal ever since the Lua module `tinyyaml` was uploaded to
+ CTAN in TeX Live 2023.
+
## 3.8.1 (2024-11-03)
Fixes:
@@ -60,7 +203,8 @@ Defaults:
- Define LaTeX renderers for image identifiers.
(#520, suggested by @jurf, 6f3dcd0c, 478530f, [matrix.org][matrix-520])
- This establishes a reliable method for authors to reference figures within Markdown:
+ This establishes a reliable method for authors to reference figures within
+ Markdown:
``` tex
\documentclass{article}
diff --git a/macros/generic/markdown/DEPENDS.txt b/macros/generic/markdown/DEPENDS.txt
index ee358c0eef..9abf8844c0 100644
--- a/macros/generic/markdown/DEPENDS.txt
+++ b/macros/generic/markdown/DEPENDS.txt
@@ -1,21 +1,20 @@
hard l3kernel
hard lt3luabridge
+hard lua-tinyyaml
hard lua-uni-algos
soft amsfonts
soft amsmath
-soft catchfile
soft csvsimple
soft enumitem
+soft epstopdf
soft epstopdf-pkg
soft etoolbox
soft fancyvrb
-soft gobble
soft graphics
-soft grffile
-soft latex
soft ltxcmds
soft lua-ul
soft luacolor
+soft luaxml
soft paralist
soft pgf
soft soul
diff --git a/macros/generic/markdown/VERSION b/macros/generic/markdown/VERSION
index 7a3b734d16..2c3b498161 100644
--- a/macros/generic/markdown/VERSION
+++ b/macros/generic/markdown/VERSION
@@ -1 +1 @@
-3.8.1-0-gbbed72f3 (2024-11-03)
+3.9.0-0-g4f1abe21 (2024-11-21)
diff --git a/macros/generic/markdown/libraries/markdown-tinyyaml.lua b/macros/generic/markdown/libraries/markdown-tinyyaml.lua
deleted file mode 100644
index 25b351f7e4..0000000000
--- a/macros/generic/markdown/libraries/markdown-tinyyaml.lua
+++ /dev/null
@@ -1,882 +0,0 @@
--- 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 rawget = rawget
-local type = type
-local tonumber = tonumber
-local math = math
-local getmetatable = getmetatable
-local error = error
-local end_symbol = "..."
-local end_break_symbol = "...\n"
-
-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 Parser = {
- timestamps=true,-- parse timestamps as objects instead of strings
-}
-
-function Parser:parsestring(line, stopper)
- stopper = stopper or ''
- local q = ssub(line, 1, 1)
- if q == ' ' or q == '\t' then
- return self:parsestring(ssub(line, 2))
- end
- if q == "'" then
- local i = sfind(line, "'", 2, true)
- if not i then
- return nil, line
- end
- -- Unescape repeated single quotes.
- while i < #line and ssub(line, i+1, i+1) == "'" do
- i = sfind(line, "'", i + 2, true)
- if not i then
- return nil, line
- end
- end
- return ssub(line, 2, i-1):gsub("''", "'"), 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
-
- if line == "*" then
- error("did not find expected alphabetic or numeric character")
- 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
- buf = rtrim(buf)
- local val = tonumber(buf) or buf
- return val, 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 rawget(map, key) ~= nil then
- -- print("found a duplicate key '"..key.."' in line: "..line)
- local suffix = 1
- while rawget(map, key..'_'..suffix) do
- suffix = suffix + 1
- end
- key = key ..'_'..suffix
- end
- return key
-end
-
-
-function Parser: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 = self: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
-
-function Parser: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
-
- if #s == 0 then
- return ""
- 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
-
-function Parser: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
-
-function Parser: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
-
- if self.timestamps then
- local ts, _ = self:parsetimestamp(line)
- if ts then
- return ts
- end
- end
-
- local s, _ = self: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 self:parseflowstyle(line, lines)
- end
-
- if startswith(line, '|') or startswith(line, '>') then
- return self: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
-
-function Parser: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, self:parsemap('', lines, indent2))
- elseif sfind(rest, '^%-%s+') then
- -- Inline nested seq
- local indent2 = j
- lines[1] = string.rep(' ', indent2)..rest
- tinsert(seq, self: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, self:parseseq('', lines, indent2))
- end
- else
- -- - # comment
- -- key: value
- local nextline = lines[1]
- local indent2 = countindent(nextline)
- tinsert(seq, self:parsemap('', lines, indent2))
- end
- elseif line == "*" then
- error("did not find expected alphabetic or numeric character")
- elseif rest then
- -- Array entry with a value
- local nextline = lines[1]
- local indent2 = countindent(nextline)
- tremove(lines, 1)
- tinsert(seq, self:parsescalar(rest, lines, indent2))
- end
- end
- return seq
-end
-
-function Parser: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[self: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[self:parseseq('', lines, indent2)] = true
- end
- end
-
- elseif rest then
- tremove(lines, 1)
- set[self:parsescalar(rest, lines)] = true
- else
- error("failed to classify line: "..line)
- end
- end
- return set
-end
-
-function Parser: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 line == end_symbol or line == end_break_symbol then
- for i, _ in ipairs(lines) do
- lines[i] = nil
- end
- return map
- end
-
- 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 = self:parsestring(line)
-
- -- Quoted keys
- if s and startswith(rest, ':') then
- local sc = self: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] = self: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] = self:parseseq('', lines, indent2)
- elseif sfind(lines[1], '^%s*%?') then
- local indent2 = countindent(lines[1])
- map[key] = self:parseset('', lines, indent2)
- else
- local indent2 = countindent(lines[1])
- if indent >= indent2 then
- -- Null hash entry
- map[key] = null
- else
- map[key] = self:parsemap('', lines, indent2)
- end
- end
- end
- end
- return map
-end
-
-
--- : (list<str>)->dict
-function Parser: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, self: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, self:parseseq('', lines, 0))
- elseif sfind(line, '^%s*[^%s]') then
- -- A hash at the root
- local level = countindent(line)
- tinsert(root, self: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.
-function Parser:parse(source)
- local lines = {}
- for line in string.gmatch(source .. '\n', '(.-)\r?\n') do
- tinsert(lines, line)
- end
-
- local docs = self:parsedocuments(lines)
- if #docs == 1 then
- return docs[1]
- end
-
- return docs
-end
-
-local function parse(source, options)
- local options = options or {}
- local parser = setmetatable (options, {__index=Parser})
- return parser:parse(source)
-end
-
-return {
- version = 0.1,
- parse = parse,
-}
diff --git a/macros/generic/markdown/markdown.dtx b/macros/generic/markdown/markdown.dtx
index 8fc4867b43..dc5e8c9725 100644
--- a/macros/generic/markdown/markdown.dtx
+++ b/macros/generic/markdown/markdown.dtx
@@ -905,7 +905,6 @@ date: \markdownVersion{} \markdownLastModified{}
<link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet" />
% \fi
-% \par
% \begin{markdown}
Introduction
@@ -977,7 +976,7 @@ 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] ≥ 2022 is known to work with the current
+distribution: [\TeX{} Live][tl] ≥ 2023 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
@@ -1014,13 +1013,9 @@ make base
Either of the two abovelisted approaches should produce the following files:
* `markdown.lua`, `markdown-parser.lua`, and `markdown-unicode-data.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.tex`: The `witiko/tilde` theme
* `markdownthemewitiko_markdown_defaults.tex`,
`markdownthemewitiko_markdown_defaults.sty`, and
`t-markdownthemewitiko_markdown_defaults.tex`: The `witiko/markdown/defaults`
@@ -1036,14 +1031,10 @@ placed:
* `⟨TEXMF⟩/tex/luatex/markdown/markdown.lua`
* `⟨TEXMF⟩/tex/luatex/markdown/markdown-parser.lua`
* `⟨TEXMF⟩/tex/luatex/markdown/markdown-unicode-data.lua`
-* `⟨TEXMF⟩/tex/luatex/markdown/markdown-tinyyaml.lua`
* `⟨TEXMF⟩/scripts/markdown/markdown-cli.lua`
* `⟨TEXMF⟩/tex/generic/markdown/markdown.tex`
-* `⟨TEXMF⟩/tex/generic/markdown/markdownthemewitiko_tilde.tex`
* `⟨TEXMF⟩/tex/generic/markdown/markdownthemewitiko_markdown_defaults.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_markdown_defaults.sty`
* `⟨TEXMF⟩/tex/context/third/markdown/t-markdown.tex`
* `⟨TEXMF⟩/tex/context/third/markdown/t-markdownthemewitiko_markdown_defaults.tex`
@@ -1064,14 +1055,10 @@ This is where the individual files should be placed:
* `./markdown.lua`
* `./markdown-parser.lua`
* `./markdown-unicode-data.lua`
-* `./markdown-tinyyaml.lua`
* `./markdown-cli.lua`
* `./markdown/markdown.tex`
* `./markdown.sty`
* `./t-markdown.tex`
-* `./markdownthemewitiko_dot.sty`
-* `./markdownthemewitiko_graphicx_http.sty`
-* `./markdownthemewitiko_tilde.tex`
* `./markdownthemewitiko_markdown_defaults.tex`
* `./markdownthemewitiko_markdown_defaults.sty`
* `./t-markdownthemewitiko_markdown_defaults.tex`
@@ -1081,7 +1068,6 @@ The file `markdown.tex` *must* be placed in a directory named `markdown`.
%</manual>
%<*lua>
% \fi
-% \par
% \begin{markdown}
%
% Requirements
@@ -1111,7 +1097,6 @@ The file `markdown.tex` *must* be placed in a directory named `markdown`.
% \begin{macrocode}
local lpeg = require("lpeg")
% \end{macrocode}
-% \par
% \begin{markdown}
%
% \pkg{Selene Unicode}
@@ -1129,7 +1114,6 @@ local lpeg = require("lpeg")
% \begin{macrocode}
local unicode = require("unicode")
% \end{macrocode}
-% \par
% \begin{markdown}
%
% \pkg{MD5}
@@ -1181,7 +1165,6 @@ local md5 = require("md5")
end
end)()
% \end{macrocode}
-% \par
% \begin{markdown}
%
% All the abovelisted modules are statically linked into the current version of
@@ -1207,17 +1190,13 @@ hard lua-uni-algos
% \begin{macrocode}
local uni_algos = require("lua-uni-algos")
% \end{macrocode}
-% \par
% \begin{markdown}
%
% \pkg{api7/lua-tinyyaml}
%
%: A library that provides a regex-based recursive descent \acro{yaml}
% (subset) parser that is used to read \acro{yaml} metadata when the
-% \Opt{jekyllData} option is enabled. We carry a copy of the library
-% in file `markdown-tinyyaml.lua` distributed together with the Markdown
-% package. <!-- TODO: Stop carrying the copy of the library in TeX Live
-% 2023. -->
+% \Opt{jekyllData} option is enabled.
%
% \end{markdown}
% \iffalse
@@ -1225,13 +1204,12 @@ local uni_algos = require("lua-uni-algos")
%<*depends>
% \fi
% \begin{macrocode}
-# hard lua-tinyyaml # TODO: Uncomment after TeX Live 2022 deprecation.
+hard lua-tinyyaml
% \end{macrocode}
% \iffalse
%</depends>
%<*tex>
% \fi
-% \par
% \begin{markdown}
%
%### Plain \TeX{} Requirements {#tex-prerequisites}
@@ -1329,7 +1307,6 @@ hard lt3luabridge
%</tex>
%<*latex>
% \fi
-% \par
% \begin{markdown}
%
%### \LaTeX{} Requirements {#latex-prerequisites}
@@ -1339,14 +1316,12 @@ hard lt3luabridge
% prerequisites (see Section <#sec:tex-prerequisites>).
% \end{markdown}
% \iffalse
-%<*themes-witiko-dot,latex-themes-witiko-graphicx-http>
% \fi
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
% \end{macrocode}
% \iffalse
-%</themes-witiko-dot,latex-themes-witiko-graphicx-http>
%</latex>
%<*depends>
% \fi
@@ -1399,19 +1374,6 @@ soft paralist
% \end{macrocode}
% \begin{markdown}
%
-% \pkg{ifthen}
-%
-%: A package that provides a concise syntax for the inspection of macro
-% values. It is used in the `witiko/dot` \LaTeX{} theme (see Section
-% <#sec:latexthemes>).
-%
-% \end{markdown}
-% \begin{macrocode}
-soft latex
-soft epstopdf-pkg # required by `latex`
-% \end{macrocode}
-% \begin{markdown}
-%
% \pkg{fancyvrb}
%
%: A package that provides the `\VerbatimInput` macros for the verbatim
@@ -1434,18 +1396,7 @@ soft fancyvrb
soft csvsimple
soft pgf # required by `csvsimple`, which loads `pgfkeys.sty`
soft tools # required by `csvsimple`, which loads `shellesc.sty`
-% \end{macrocode}
-% \begin{markdown}
-%
-% \pkg{gobble}
-%
-%: A package that provides the `\@gobblethree` \TeX{} command that
-% is used in the default renderer prototype for citations. The package
-% is included in \TeX Live${}\geq{}2016$.
-%
-% \end{markdown}
-% \begin{macrocode}
-soft gobble
+soft etoolbox # required by `csvsimple`, which loads `etoolbox.sty`
% \end{macrocode}
% \begin{markdown}
%
@@ -1461,51 +1412,24 @@ soft amsfonts
% \end{macrocode}
% \begin{markdown}
%
-% \pkg{catchfile}
-%
-%: A package that catches the contents of a file and puts it in a macro. It
-% is used in the `witiko/graphicx/http` \LaTeX{} theme, see Section
-% <#sec:latexthemes>.
-%
-% \end{markdown}
-% \begin{macrocode}
-soft catchfile
-% \end{macrocode}
-% \begin{markdown}
-%
-% \pkg{grffile}
-%
-%: A package that extends the name processing of the \pkg{graphics} package
-% to support a larger range of file names in $2006\leq{}$\TeX{}
-% Live${}\leq{}2019$. Since \TeX{} Live${}\geq{}2020$, the functionality
-% of the package has been integrated in the \LaTeXe{} kernel. It is used in
-% the `witiko/dot` and `witiko/graphicx/http` \LaTeX{} themes, see Section
-% <#sec:latexthemes>.
-%
-% \end{markdown}
-% \begin{macrocode}
-soft grffile
-% \end{macrocode}
-% \begin{markdown}
-%
-% \pkg{etoolbox}
+% \pkg{graphicx}
%
-%: A package that is used to polyfill the general hook management system in
-% the default renderer prototypes for \acro{yaml} metadata, see Section
-% <#sec:latex-yaml-metadata>, and also in the default renderer prototype
-% for identifier attributes.
+%: A package that provides extended support for graphics. It is used in
+% the `witiko/dot` and `witiko/graphicx/http` plain \TeX{} themes, see
+% Section <#sec:themes>.
%
% \end{markdown}
% \begin{macrocode}
-soft etoolbox
+soft graphics
+soft epstopdf # required by `graphics` and `graphicx`, which load `epsopdf-base.sty`
+soft epstopdf-pkg # required by `graphics` and `graphicx`, which load `epsopdf-base.sty`
% \end{macrocode}
% \begin{markdown}
%
-% \pkg{soulutf8} and \pkg{xcolor}
+% \pkg{soul} and \pkg{xcolor}
%
%: Packages that are used in the default renderer prototypes for
% strike-throughs and marked text in pdf\TeX.
-% <!-- TODO: 1,$s/soulutf8/soul/g in TeX Live 2023. -->
%
% \end{markdown}
% \begin{macrocode}
@@ -1538,6 +1462,17 @@ soft ltxcmds
% \end{macrocode}
% \begin{markdown}
%
+% \pkg{luaxml}
+%
+%: A package that is used to convert \acro{HTML} to \LaTeX{} in the default
+% renderer prototypes for content blocks, raw blocks, and inline raw spans.
+%
+% \end{markdown}
+% \begin{macrocode}
+soft luaxml
+% \end{macrocode}
+% \begin{markdown}
+%
% \pkg{verse}
%
%: A package that is used in the default renderer prototypes for
@@ -1554,7 +1489,6 @@ soft verse
%</depends>
%<*context>
% \fi
-% \par
% \begin{markdown}
%
%### \Hologo{ConTeXt} Prerequisites
@@ -1901,7 +1835,6 @@ Each part will be shown by example, leaving the implementation details to the
%</manual>
%<*lua>
% \fi
-% \par
% \begin{markdown}
%
% Lua Interface {#luainterface}
@@ -1951,7 +1884,6 @@ local M = {metadata = metadata}
%</lua,lua-loader,lua-unicode-data>
%<*lua>
% \fi
-% \par
% \begin{markdown}
%
%### Conversion from Markdown to Plain \TeX{} {#lua-conversion}
@@ -2020,7 +1952,6 @@ local walkable_syntax = {
},
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamref{reader->insert_pattern} method inserts a \acro{peg} pattern into
@@ -2234,7 +2165,6 @@ local defaultOptions = {}
% \end{macrocode}
% \begingroup
% \markdownSetup{snippet=lua-options}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -2524,7 +2454,6 @@ interfaces and all the way up to the \LaTeX{} and \Hologo{ConTeXt} interfaces.
}
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% To make it easier to support different coding styles in the interface,
@@ -2555,7 +2484,6 @@ interfaces and all the way up to the \LaTeX{} and \Hologo{ConTeXt} interfaces.
{ #2 }
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% To interrupt the \mref{\@\@_with_various_cases:nn} function
@@ -2609,7 +2537,6 @@ interfaces and all the way up to the \LaTeX{} and \Hologo{ConTeXt} interfaces.
%### General Behavior
%
% \end{markdown}
-% \par
% \iffalse
#### Option `eagerCache`
@@ -2714,7 +2641,6 @@ Hello \markdownRendererEmphasis{world}!\relax
% \begin{macrocode}
defaultOptions.eagerCache = true
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -2760,7 +2686,6 @@ defaultOptions.eagerCache = true
% \begin{macrocode}
defaultOptions.experimental = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -2858,7 +2783,6 @@ local singletonCache = {
options = nil,
}
% \end{macrocode}
-% \par
% \iffalse
%</lua>
%<*manual-options>
@@ -2903,7 +2827,6 @@ local singletonCache = {
% \begin{macrocode}
defaultOptions.unicodeNormalization = true
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -2959,7 +2882,6 @@ defaultOptions.unicodeNormalization = true
% \begin{macrocode}
defaultOptions.unicodeNormalizationForm = "nfc"
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -2969,7 +2891,6 @@ defaultOptions.unicodeNormalizationForm = "nfc"
%### File and Directory Names
%
% \end{markdown}
-% \par
% \iffalse
#### Option `cacheDir`
@@ -3135,7 +3056,6 @@ option.
% \begin{macrocode}
defaultOptions.cacheDir = "."
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -3299,7 +3219,6 @@ following text:
% \begin{macrocode}
defaultOptions.contentBlocksLanguageMap = "markdown-languages.json"
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -3348,7 +3267,6 @@ defaultOptions.contentBlocksLanguageMap = "markdown-languages.json"
% \begin{macrocode}
defaultOptions.debugExtensionsFileName = "debug-extensions.json"
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -3590,7 +3508,6 @@ the markdown document from “Hello *world*!” to “Hi *world*!” was not ref
% \begin{macrocode}
defaultOptions.frozenCacheFileName = "frozenCache.tex"
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -3600,7 +3517,6 @@ defaultOptions.frozenCacheFileName = "frozenCache.tex"
%### Parser Options
%
% \end{markdown}
-% \par
% \iffalse
#### Option `autoIdentifiers`
@@ -3647,7 +3563,6 @@ See also the option \Opt{gfmAutoIdentifiers}.
% \begin{macrocode}
defaultOptions.autoIdentifiers = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -3871,7 +3786,6 @@ following text:
% \begin{macrocode}
defaultOptions.blankBeforeBlockquote = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -4128,7 +4042,6 @@ following text:
% \begin{macrocode}
defaultOptions.blankBeforeCodeFence = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -4211,7 +4124,6 @@ following text:
% \begin{macrocode}
defaultOptions.blankBeforeDivFence = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -4451,7 +4363,6 @@ following text:
% \begin{macrocode}
defaultOptions.blankBeforeHeading = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -4677,7 +4588,6 @@ following text:
% \begin{macrocode}
defaultOptions.blankBeforeList = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -4773,7 +4683,6 @@ following text:
% \begin{macrocode}
defaultOptions.bracketedSpans = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -5007,7 +4916,6 @@ following text:
% \begin{macrocode}
defaultOptions.breakableBlockquotes = true
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -5101,7 +5009,6 @@ following text, where the middot (`·`) denotes a non-breaking space:
% \begin{macrocode}
defaultOptions.citationNbsps = true
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -5204,7 +5111,6 @@ following text:
% \begin{macrocode}
defaultOptions.citations = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -5430,7 +5336,6 @@ following text:
% \begin{macrocode}
defaultOptions.codeSpans = true
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -5604,7 +5509,6 @@ following text:
% \begin{macrocode}
defaultOptions.contentBlocks = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -5741,7 +5645,6 @@ following text:
% \begin{macrocode}
defaultOptions.contentLevel = "block"
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -5896,7 +5799,6 @@ inserted to the grammar of markdown.
% \begin{macrocode}
defaultOptions.debugExtensions = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -6035,7 +5937,6 @@ following text:
% \begin{macrocode}
defaultOptions.definitionLists = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -6081,7 +5982,6 @@ defaultOptions.definitionLists = false
% \begin{macrocode}
defaultOptions.ensureJekyllData = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -6205,7 +6105,6 @@ following text:
% \begin{macrocode}
defaultOptions.expectJekyllData = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -6356,7 +6255,6 @@ following text:
% \begin{macrocode}
defaultOptions.extensions = {}
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -6458,7 +6356,6 @@ following text:
% \begin{macrocode}
defaultOptions.fancyLists = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -6625,7 +6522,6 @@ following text:
% \begin{macrocode}
defaultOptions.fencedCode = true
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -6725,7 +6621,6 @@ following text:
% \begin{macrocode}
defaultOptions.fencedCodeAttributes = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -6804,7 +6699,6 @@ following text:
% \begin{macrocode}
defaultOptions.fencedDivs = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -6968,7 +6862,6 @@ the markdown document from “Hello *world*!” to “Hi *world*!” was not ref
% \begin{macrocode}
defaultOptions.finalizeCache = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -7037,7 +6930,6 @@ requested using the `frozenCacheCounter` option.
% \begin{macrocode}
defaultOptions.frozenCacheCounter = 0
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -7086,7 +6978,6 @@ See also the option \Opt{autoIdentifiers}.
% \begin{macrocode}
defaultOptions.gfmAutoIdentifiers = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -7217,7 +7108,6 @@ following text:
% \begin{macrocode}
defaultOptions.hashEnumerators = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -7266,7 +7156,6 @@ defaultOptions.hashEnumerators = false
% \begin{macrocode}
defaultOptions.headerAttributes = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -7538,7 +7427,6 @@ following text:
% \begin{macrocode}
defaultOptions.html = true
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -7816,7 +7704,6 @@ following text:
% \begin{macrocode}
defaultOptions.hybrid = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -7912,7 +7799,6 @@ following text:
% \begin{macrocode}
defaultOptions.inlineCodeAttributes = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -8013,7 +7899,6 @@ following text:
% \begin{macrocode}
defaultOptions.inlineNotes = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -8180,7 +8065,6 @@ following text:
% \begin{macrocode}
defaultOptions.jekyllData = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -8277,7 +8161,6 @@ image (from [Martin Scharrer's mwe package][mwe]) displayed at size 5cm × 4cm.
% \begin{macrocode}
defaultOptions.linkAttributes = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -8412,7 +8295,6 @@ following text:
% \begin{macrocode}
defaultOptions.lineBlocks = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -8483,7 +8365,6 @@ following text:
% \begin{macrocode}
defaultOptions.mark = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -8646,7 +8527,6 @@ following text:
% \begin{macrocode}
defaultOptions.notes = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -8755,7 +8635,6 @@ following text:
% \begin{macrocode}
defaultOptions.pipeTables = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -8795,7 +8674,6 @@ defaultOptions.pipeTables = false
% \begin{macrocode}
defaultOptions.preserveTabs = true
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -8890,7 +8768,6 @@ following text:
% \begin{macrocode}
defaultOptions.rawAttribute = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -8979,7 +8856,6 @@ following text:
% \begin{macrocode}
defaultOptions.relativeReferences = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -9119,7 +8995,6 @@ following text:
% \begin{macrocode}
defaultOptions.shiftHeadings = 0
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -9337,7 +9212,6 @@ following text:
% \begin{macrocode}
defaultOptions.slice = "^ $"
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -9552,7 +9426,6 @@ following text:
% \begin{macrocode}
defaultOptions.smartEllipses = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -9688,7 +9561,6 @@ following text:
% \begin{macrocode}
defaultOptions.startNumber = true
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -9727,7 +9599,7 @@ following content:
``` tex
\input markdown
\def\markdownOptionStrikeThrough{true}
-\input soulutf8.sty
+\input soul.sty
\def\markdownRendererStrikeThrough#1{\st{#1}}
\markdownBegin
This is ~~a lunar roving vehicle~~ strike-through text.
@@ -9750,7 +9622,7 @@ following content:
``` tex
\documentclass{article}
\usepackage[strikeThrough]{markdown}
-\usepackage{soulutf8}
+\usepackage{soul}
\markdownSetup{
renderers = {
strikeThrough = {\st{#1}},
@@ -9810,7 +9682,6 @@ following text:
% \begin{macrocode}
defaultOptions.strikeThrough = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -9923,7 +9794,6 @@ text “Hello *world*!”
% \begin{macrocode}
defaultOptions.stripIndent = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -10015,7 +9885,6 @@ following text:
% \begin{macrocode}
defaultOptions.subscripts = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -10107,7 +9976,6 @@ following text:
% \begin{macrocode}
defaultOptions.superscripts = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -10232,7 +10100,6 @@ following text:
% \begin{macrocode}
defaultOptions.tableAttributes = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -10362,7 +10229,6 @@ following text:
% \begin{macrocode}
defaultOptions.tableCaptions = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -10475,7 +10341,6 @@ following text:
% \begin{macrocode}
defaultOptions.taskLists = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -10591,7 +10456,6 @@ text “Hello *world*!”
% \begin{macrocode}
defaultOptions.texComments = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -10802,7 +10666,6 @@ following text:
% \begin{macrocode}
defaultOptions.texMathDollars = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -11013,7 +10876,6 @@ following text:
% \begin{macrocode}
defaultOptions.texMathDoubleBackslash = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -11224,7 +11086,6 @@ following text:
% \begin{macrocode}
defaultOptions.texMathSingleBackslash = false
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -11345,7 +11206,6 @@ following text:
% \begin{macrocode}
defaultOptions.tightLists = true
% \end{macrocode}
-% \par
% \iffalse
%</lua,lua-cli,lua-loader>
%<*manual-options>
@@ -11493,7 +11353,6 @@ defaultOptions.underscores = true
%</lua,lua-cli,lua-loader>
%<*lua-cli>
% \fi
-% \par
% \begin{markdown}
%
%### Command-Line Interface {#lua-cli-interface}
@@ -11723,7 +11582,6 @@ for i = 1, #arg do
::continue::
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The command-line Lua interface is implemented by the `markdown-cli.lua`
@@ -11743,7 +11601,6 @@ end
%</lua-cli>
%<*tex>
% \fi
-% \par
% \begin{markdown}
%
% Plain \TeX{} Interface {#texinterface}
@@ -11816,7 +11673,6 @@ pdftex --shell-escape document.tex
\def\markdownLastModified{(((LASTMODIFIED)))}%
\def\markdownVersion{(((VERSION)))}%
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The plain \TeX{} interface is implemented by the `markdown.tex` file that can
@@ -11843,7 +11699,6 @@ pdftex --shell-escape document.tex
\let\markdownBegin\relax
\let\markdownEnd\relax
% \end{macrocode}
-% \par
% \begin{markdown}
%
% You may prepend your own code to the \mref{markdownBegin} macro and redefine the
@@ -11899,7 +11754,6 @@ pdftex --shell-escape document.tex
\let\yamlBegin\relax
\def\yamlEnd{\markdownEnd\endgroup}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \mref{yamlBegin} and \mref{yamlEnd} macros are subject to the same
@@ -11935,7 +11789,6 @@ pdftex --shell-escape document.tex
% \begin{macrocode}
\let\markinline\relax
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The following example plain \TeX{} code showcases the usage of the
@@ -11973,7 +11826,6 @@ pdftex --shell-escape document.tex
% \begin{macrocode}
\let\markdownInput\relax
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The macro \mref{markdownInput} is not subject to the limitations of the
@@ -12003,7 +11855,6 @@ pdftex --shell-escape document.tex
\endgroup
}%
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The macro \mref{yamlInput} is also not subject to the limitations of the
@@ -12039,7 +11890,6 @@ pdftex --shell-escape document.tex
% \begin{macrocode}
\let\markdownEscape\relax
% \end{macrocode}
-% \par
% \begin{markdown}
%
%### Options {#tex-options}
@@ -12125,7 +11975,6 @@ following code in your plain \TeX{} document:
%</manual-options>
%<*tex>
% \fi
-% \par
% \begin{markdown}
%
% The plain \TeX{} options may be also be specified via the \mdef{markdownSetup}
@@ -12176,7 +12025,6 @@ you would include the following code in your plain \TeX{} document:
%</manual-options>
%<*tex>
% \fi
-% \par
% \begin{markdown}
%
% The
@@ -12311,7 +12159,6 @@ For more information, see the examples for the \Opt{finalizeCache} option.
{ path }
{ \jobname.markdown.in }
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \mdef{markdownOptionOutputDir} macro sets the path to the directory that
@@ -12327,9 +12174,7 @@ For more information, see the examples for the \Opt{finalizeCache} option.
% \Opt{inputTempFileName} macro.
%
% The \mref{markdownOptionOutputDir} macro has been deprecated and will be
-% removed in the next major version of the Markdown package. <!-- After the
-% macro has been removed, we should remove support for TeX Live 2023 and
-% earlier, where the automatic detection does not work. -->
+% removed in the next major version of the Markdown package.
%
% \end{markdown}
% \begin{macrocode}
@@ -12914,7 +12759,10 @@ A PDF document named `document.pdf` should be produced and contain the text
% \fi
% \begin{markdown}
-### Themes {#themes}
+%### Themes {#themes}
+% \iffalse
+#### Themes {#themes}
+% \fi
User-defined themes for the Markdown package provide a domain-specific
interpretation of Markdown tokens. Themes allow the authors to achieve
@@ -13170,17 +13018,209 @@ a specific look and other high-level goals without low-level programming.
\cs_generate_variant:Nn
\cs_gset:Npn
{ Npe }
-\ExplSyntaxOff
+% \end{macrocode}
+% \begin{markdown}
+%
+% We also define the prop \mdef{g_@@_plain_tex_built_in_themes_prop} that
+% contains the code of built-in themes. This is a packaging optimization,
+% so that built-in themes does not need to be distributed in many small files.
+%
+% \end{markdown}
+% \begin{macrocode}
+\prop_new:N
+ \g_@@_plain_tex_built_in_themes_prop
% \end{macrocode}
% \iffalse
%</tex>
%<*manual-options>
% \fi
-% \par
-% \begin{markdown}
+% \markdownBegin
Built-in plain \TeX{} themes provided with the Markdown package include:
+\pkg{witiko/dot}
+
+: A theme that typesets fenced code blocks with the `dot …` infostring
+ as images of directed graphs rendered by the Graphviz tools. The
+ right tail of the infostring is used as the image title.
+% ```` tex
+% \documentclass{article}
+% \usepackage[import=witiko/dot]{markdown}
+% \setkeys{Gin}{
+% width = \columnwidth,
+% height = 0.65\paperheight,
+% keepaspectratio}
+% \begin{document}
+% \begin{markdown}
+% ``` dot Various formats of mathemathical formulae
+% digraph tree {
+% margin = 0;
+% rankdir = "LR";
+%
+% latex -> pmml;
+% latex -> cmml;
+% pmml -> slt;
+% cmml -> opt;
+% cmml -> prefix;
+% cmml -> infix;
+% pmml -> mterms [style=dashed];
+% cmml -> mterms;
+%
+% latex [label = "LaTeX"];
+% pmml [label = "Presentation MathML"];
+% cmml [label = "Content MathML"];
+% slt [label = "Symbol Layout Tree"];
+% opt [label = "Operator Tree"];
+% prefix [label = "Prefix"];
+% infix [label = "Infix"];
+% mterms [label = "M-Terms"];
+% }
+% ```
+% \end{markdown}
+% \end{document}
+% ````````
+% Typesetting the above document produces the output shown in
+% Figure <#fig:witiko/dot>.
+% ``` dot Various formats of mathemathical formulae \label{fig:witiko/dot}
+% digraph tree {
+% margin = 0;
+% rankdir = "LR";
+%
+% latex -> pmml;
+% latex -> cmml;
+% pmml -> slt;
+% cmml -> opt;
+% cmml -> prefix;
+% cmml -> infix;
+% pmml -> mterms [style=dashed];
+% cmml -> mterms;
+%
+% latex [label = "LaTeX"];
+% pmml [label = "Presentation MathML"];
+% cmml [label = "Content MathML"];
+% slt [label = "Symbol Layout Tree"];
+% opt [label = "Operator Tree"];
+% prefix [label = "Prefix"];
+% infix [label = "Infix"];
+% mterms [label = "M-Terms"];
+% }
+% ```
+ The theme requires a Unix-like operating system with GNU Diffutils and
+ Graphviz installed. The theme also requires shell access unless the
+ \Opt{frozenCache} plain \TeX{} option is enabled.
+
+% \markdownEnd
+% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+```` tex
+\documentclass{article}
+\usepackage[import=witiko/dot]{markdown}
+\setkeys{Gin}{
+ width=\columnwidth,
+ height=0.65\paperheight,
+ keepaspectratio}
+\begin{document}
+\begin{markdown}
+``` dot Various formats of mathemathical formulae
+digraph tree {
+ margin = 0;
+ rankdir = "LR";
+
+ latex -> pmml;
+ latex -> cmml;
+ pmml -> slt;
+ cmml -> opt;
+ cmml -> prefix;
+ cmml -> infix;
+ pmml -> mterms [style=dashed];
+ cmml -> mterms;
+
+ latex [label = "LaTeX"];
+ pmml [label = "Presentation MathML"];
+ cmml [label = "Content MathML"];
+ slt [label = "Symbol Layout Tree"];
+ opt [label = "Operator Tree"];
+ prefix [label = "Prefix"];
+ infix [label = "Infix"];
+ mterms [label = "M-Terms"];
+}
+```
+\end{markdown}
+\end{document}
+````````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex --shell-escape document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain
+a drawing of a directed graph similar to Figure 1 from the following
+conference article:
+
+> NOVOTNÝ, Vít, Petr SOJKA, Michal ŠTEFÁNIK and Dávid LUPTÁK. Three is Better
+> than One: Ensembling Math Information Retrieval Systems. *CEUR Workshop
+> Proceedings*. Thessaloniki, Greece: M. Jeusfeld c/o Redaktion Sun SITE,
+> Informatik V, RWTH Aachen., 2020, vol. 2020, No 2696, p. 1-30. ISSN 1613-0073.
+> <http://ceur-ws.org/Vol-2696/paper_235.pdf>
+
+% \fi
+% \markdownBegin
+
+\pkg{witiko/graphicx/http}
+
+: A theme that adds support for downloading images whose URL has the
+ http or https protocol.
+% ``` tex
+% \documentclass{article}
+% \usepackage[import=witiko/graphicx/http]{markdown}
+% \begin{document}
+% \begin{markdown}
+% ![img](https://github.com/witiko/markdown/raw/main/markdown.png
+% "The banner of the Markdown package")
+% \end{markdown}
+% \end{document}
+% ```````
+% Typesetting the above document produces the output shown in
+% Figure <#fig:witiko/graphicx/http>.
+% ![img](https://github.com/witiko/markdown/raw/main/markdown.png
+% "The banner of the Markdown package \label{fig:witiko/graphicx/http}")
+ The theme requires the \pkg{catchfile} \LaTeX{} package and a Unix-like
+ operating system with GNU Coreutils `md5sum` and either GNU Wget or cURL
+ installed. The theme also requires shell access unless the
+ \Opt{frozenCache} plain \TeX{} option is enabled.
+
+% \markdownEnd
+% \iffalse
+
+##### \LaTeX{} Example {.unnumbered}
+
+Using a text editor, create a text document named `document.tex` with the
+following content:
+``` tex
+\documentclass{article}
+\usepackage[import=witiko/graphicx/http, link_attributes]{markdown}
+\begin{document}
+\begin{markdown}
+![img](https://github.com/witiko/markdown/raw/main/markdown.png
+ "The banner of the Markdown package"){width=5in}
+\end{markdown}
+\end{document}
+```````
+Next, invoke LuaTeX from the terminal:
+``` sh
+lualatex --shell-escape document.tex
+``````
+A PDF document named `document.pdf` should be produced and contain the
+following image:
+
+> ![Figure 1: The banner of the Markdown package](https://github.com/witiko/markdown/raw/main/markdown.png)
+
+% \fi
+% \begin{markdown}
+
\pkg{witiko/tilde}
: A theme that makes tilde (`~`) always typeset the non-breaking space even
@@ -13221,7 +13261,6 @@ following text, where the middot (`·`) denotes a non-breaking space:
> Bartel·Leendert van·der·Waerden
% \fi
-% \par
% \begin{markdown}
\pkg{witiko/markdown/defaults}
@@ -13232,8 +13271,11 @@ following text, where the middot (`·`) denotes a non-breaking space:
% Please, see Section <#sec:themes-implementation> for implementation
% details of the built-in plain \TeX{} themes.
-
-### Snippets {#snippets}
+%
+%### Snippets {#snippets}
+% \iffalse
+#### Snippets {#snippets}
+% \fi
% \end{markdown}
% \iffalse
@@ -13246,7 +13288,6 @@ options locally.
%</manual-options>
%<*tex>
% \fi
-% \par
% \begin{markdown}
%
% We may set up options as *snippets* using the
@@ -13256,7 +13297,6 @@ options locally.
%
% \end{markdown}
% \begin{macrocode}
-\ExplSyntaxOn
\prop_new:N
\g_@@_snippets_prop
\cs_new:Nn
@@ -13379,7 +13419,6 @@ options locally.
%</tex>
%<*manual-options>
% \fi
-% \par
% \markdownBegin
Here is how we can use snippets to store options and invoke them later
@@ -13649,7 +13688,6 @@ In this section, I will describe the individual token renderers.
\prop_new:N \g_@@_renderer_arities_prop
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -13750,9 +13788,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererAttributeIdentifier{%
- \markdownRendererAttributeIdentifierPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererAttributeIdentifier
+ {
+ \markdownRendererAttributeIdentifierPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ attributeIdentifier }
@@ -13760,10 +13801,11 @@ following text:
\g_@@_renderer_arities_prop
{ attributeIdentifier }
{ 1 }
-\ExplSyntaxOff
-\def\markdownRendererAttributeClassName{%
- \markdownRendererAttributeClassNamePrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererAttributeClassName
+ {
+ \markdownRendererAttributeClassNamePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ attributeClassName }
@@ -13771,10 +13813,11 @@ following text:
\g_@@_renderer_arities_prop
{ attributeClassName }
{ 1 }
-\ExplSyntaxOff
-\def\markdownRendererAttributeKeyValue{%
- \markdownRendererAttributeKeyValuePrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererAttributeKeyValue
+ {
+ \markdownRendererAttributeKeyValuePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ attributeKeyValue }
@@ -13784,7 +13827,6 @@ following text:
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -13805,9 +13847,12 @@ a block quote. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererBlockQuoteBegin{%
- \markdownRendererBlockQuoteBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererBlockQuoteBegin
+ {
+ \markdownRendererBlockQuoteBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ blockQuoteBegin }
@@ -13817,7 +13862,6 @@ a block quote. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -13950,9 +13994,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererBlockQuoteEnd{%
- \markdownRendererBlockQuoteEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererBlockQuoteEnd
+ {
+ \markdownRendererBlockQuoteEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ blockQuoteEnd }
@@ -13962,7 +14009,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14019,9 +14065,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererBracketedSpanAttributeContextBegin{%
- \markdownRendererBracketedSpanAttributeContextBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererBracketedSpanAttributeContextBegin
+ {
+ \markdownRendererBracketedSpanAttributeContextBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ bracketedSpanAttributeContextBegin }
@@ -14029,10 +14078,11 @@ following text:
\g_@@_renderer_arities_prop
{ bracketedSpanAttributeContextBegin }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererBracketedSpanAttributeContextEnd{%
- \markdownRendererBracketedSpanAttributeContextEndPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererBracketedSpanAttributeContextEnd
+ {
+ \markdownRendererBracketedSpanAttributeContextEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ bracketedSpanAttributeContextEnd }
@@ -14042,7 +14092,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14064,9 +14113,12 @@ list is not tight). The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererUlBegin{%
- \markdownRendererUlBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererUlBegin
+ {
+ \markdownRendererUlBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ ulBegin }
@@ -14076,7 +14128,6 @@ list is not tight). The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14098,9 +14149,12 @@ is disabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererUlBeginTight{%
- \markdownRendererUlBeginTightPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererUlBeginTight
+ {
+ \markdownRendererUlBeginTightPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ ulBeginTight }
@@ -14110,7 +14164,6 @@ is disabled. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14130,9 +14183,12 @@ list. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererUlItem{%
- \markdownRendererUlItemPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererUlItem
+ {
+ \markdownRendererUlItemPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ ulItem }
@@ -14142,7 +14198,6 @@ list. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14162,9 +14217,12 @@ bulleted list. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererUlItemEnd{%
- \markdownRendererUlItemEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererUlItemEnd
+ {
+ \markdownRendererUlItemEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ ulItemEnd }
@@ -14174,7 +14232,6 @@ bulleted list. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14195,9 +14252,12 @@ tight). The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererUlEnd{%
- \markdownRendererUlEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererUlEnd
+ {
+ \markdownRendererUlEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ ulEnd }
@@ -14207,7 +14267,6 @@ tight). The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14431,9 +14490,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererUlEndTight{%
- \markdownRendererUlEndTightPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererUlEndTight
+ {
+ \markdownRendererUlEndTightPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ ulEndTight }
@@ -14443,7 +14505,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14528,9 +14589,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererCite{%
- \markdownRendererCitePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererCite
+ {
+ \markdownRendererCitePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ cite }
@@ -14540,7 +14604,6 @@ following text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14619,9 +14682,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererTextCite{%
- \markdownRendererTextCitePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererTextCite
+ {
+ \markdownRendererTextCitePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ textCite }
@@ -14631,7 +14697,6 @@ following text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14653,9 +14718,12 @@ filename of a file containing the code block contents.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInputVerbatim{%
- \markdownRendererInputVerbatimPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererInputVerbatim
+ {
+ \markdownRendererInputVerbatimPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ inputVerbatim }
@@ -14665,7 +14733,6 @@ filename of a file containing the code block contents.
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14771,9 +14838,12 @@ following text except for the filename, which may differ:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInputFencedCode{%
- \markdownRendererInputFencedCodePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererInputFencedCode
+ {
+ \markdownRendererInputFencedCodePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ inputFencedCode }
@@ -14783,7 +14853,6 @@ following text except for the filename, which may differ:
{ 3 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14921,9 +14990,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererCodeSpan{%
- \markdownRendererCodeSpanPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererCodeSpan
+ {
+ \markdownRendererCodeSpanPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ codeSpan }
@@ -14933,7 +15005,6 @@ following text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -14991,9 +15062,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererCodeSpanAttributeContextBegin{%
- \markdownRendererCodeSpanAttributeContextBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererCodeSpanAttributeContextBegin
+ {
+ \markdownRendererCodeSpanAttributeContextBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ codeSpanAttributeContextBegin }
@@ -15001,10 +15075,11 @@ following text:
\g_@@_renderer_arities_prop
{ codeSpanAttributeContextBegin }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererCodeSpanAttributeContextEnd{%
- \markdownRendererCodeSpanAttributeContextEndPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererCodeSpanAttributeContextEnd
+ {
+ \markdownRendererCodeSpanAttributeContextEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ codeSpanAttributeContextEnd }
@@ -15014,7 +15089,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15039,9 +15113,12 @@ and the title of the content block.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererContentBlock{%
- \markdownRendererContentBlockPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererContentBlock
+ {
+ \markdownRendererContentBlockPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ contentBlock }
@@ -15051,7 +15128,6 @@ and the title of the content block.
{ 4 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15072,9 +15148,12 @@ as \mref{markdownRendererContentBlock}.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererContentBlockOnlineImage{%
- \markdownRendererContentBlockOnlineImagePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererContentBlockOnlineImage
+ {
+ \markdownRendererContentBlockOnlineImagePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ contentBlockOnlineImage }
@@ -15084,7 +15163,6 @@ as \mref{markdownRendererContentBlock}.
{ 4 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15267,9 +15345,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererContentBlockCode{%
- \markdownRendererContentBlockCodePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererContentBlockCode
+ {
+ \markdownRendererContentBlockCodePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ contentBlockCode }
@@ -15279,7 +15360,6 @@ following text:
{ 5 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15304,9 +15384,12 @@ list is not tight). The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererDlBegin{%
- \markdownRendererDlBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDlBegin
+ {
+ \markdownRendererDlBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ dlBegin }
@@ -15316,7 +15399,6 @@ list is not tight). The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15338,9 +15420,12 @@ list is tight). This macro will only be produced, when the
% \fi
%
% \begin{macrocode}
-\def\markdownRendererDlBeginTight{%
- \markdownRendererDlBeginTightPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDlBeginTight
+ {
+ \markdownRendererDlBeginTightPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ dlBeginTight }
@@ -15350,7 +15435,6 @@ list is tight). This macro will only be produced, when the
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15371,9 +15455,12 @@ being defined.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererDlItem{%
- \markdownRendererDlItemPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDlItem
+ {
+ \markdownRendererDlItemPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ dlItem }
@@ -15383,7 +15470,6 @@ being defined.
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15403,9 +15489,12 @@ definitions for a single term.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererDlItemEnd{%
- \markdownRendererDlItemEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDlItemEnd
+ {
+ \markdownRendererDlItemEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ dlItemEnd }
@@ -15415,7 +15504,6 @@ definitions for a single term.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15436,9 +15524,12 @@ a single term.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererDlDefinitionBegin{%
- \markdownRendererDlDefinitionBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDlDefinitionBegin
+ {
+ \markdownRendererDlDefinitionBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ dlDefinitionBegin }
@@ -15448,7 +15539,6 @@ a single term.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15469,9 +15559,12 @@ single term.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererDlDefinitionEnd{%
- \markdownRendererDlDefinitionEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDlDefinitionEnd
+ {
+ \markdownRendererDlDefinitionEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ dlDefinitionEnd }
@@ -15481,7 +15574,6 @@ single term.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15502,9 +15594,12 @@ tight). The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererDlEnd{%
- \markdownRendererDlEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDlEnd
+ {
+ \markdownRendererDlEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ dlEnd }
@@ -15514,7 +15609,6 @@ tight). The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15871,9 +15965,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererDlEndTight{%
- \markdownRendererDlEndTightPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDlEndTight
+ {
+ \markdownRendererDlEndTightPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ dlEndTight }
@@ -15883,7 +15980,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -15982,9 +16078,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererEllipsis{%
- \markdownRendererEllipsisPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererEllipsis
+ {
+ \markdownRendererEllipsisPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ ellipsis }
@@ -15994,7 +16093,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16016,9 +16114,12 @@ span of text.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererEmphasis{%
- \markdownRendererEmphasisPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererEmphasis
+ {
+ \markdownRendererEmphasisPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ emphasis }
@@ -16028,7 +16129,6 @@ span of text.
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16135,9 +16235,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererStrongEmphasis{%
- \markdownRendererStrongEmphasisPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererStrongEmphasis
+ {
+ \markdownRendererStrongEmphasisPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ strongEmphasis }
@@ -16147,7 +16250,6 @@ following text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16223,9 +16325,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFencedCodeAttributeContextBegin{%
- \markdownRendererFencedCodeAttributeContextBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererFencedCodeAttributeContextBegin
+ {
+ \markdownRendererFencedCodeAttributeContextBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ fencedCodeAttributeContextBegin }
@@ -16233,10 +16338,11 @@ following text:
\g_@@_renderer_arities_prop
{ fencedCodeAttributeContextBegin }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererFencedCodeAttributeContextEnd{%
- \markdownRendererFencedCodeAttributeContextEndPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererFencedCodeAttributeContextEnd
+ {
+ \markdownRendererFencedCodeAttributeContextEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ fencedCodeAttributeContextEnd }
@@ -16246,7 +16352,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16343,9 +16448,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFencedDivAttributeContextBegin{%
- \markdownRendererFencedDivAttributeContextBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererFencedDivAttributeContextBegin
+ {
+ \markdownRendererFencedDivAttributeContextBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ fencedDivAttributeContextBegin }
@@ -16353,10 +16461,11 @@ following text:
\g_@@_renderer_arities_prop
{ fencedDivAttributeContextBegin }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererFencedDivAttributeContextEnd{%
- \markdownRendererFencedDivAttributeContextEndPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererFencedDivAttributeContextEnd
+ {
+ \markdownRendererFencedDivAttributeContextEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ fencedDivAttributeContextEnd }
@@ -16366,7 +16475,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16446,9 +16554,12 @@ following text:
%<*tex>
% \fi
% \begin{macrocode}
-\def\markdownRendererHeaderAttributeContextBegin{%
- \markdownRendererHeaderAttributeContextBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererHeaderAttributeContextBegin
+ {
+ \markdownRendererHeaderAttributeContextBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ headerAttributeContextBegin }
@@ -16456,10 +16567,11 @@ following text:
\g_@@_renderer_arities_prop
{ headerAttributeContextBegin }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererHeaderAttributeContextEnd{%
- \markdownRendererHeaderAttributeContextEndPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererHeaderAttributeContextEnd
+ {
+ \markdownRendererHeaderAttributeContextEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ headerAttributeContextEnd }
@@ -16469,7 +16581,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16490,9 +16601,12 @@ The macro receives a single argument that corresponds to the heading text.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingOne{%
- \markdownRendererHeadingOnePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererHeadingOne
+ {
+ \markdownRendererHeadingOnePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ headingOne }
@@ -16502,7 +16616,6 @@ The macro receives a single argument that corresponds to the heading text.
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16523,9 +16636,12 @@ text.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingTwo{%
- \markdownRendererHeadingTwoPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererHeadingTwo
+ {
+ \markdownRendererHeadingTwoPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ headingTwo }
@@ -16535,7 +16651,6 @@ text.
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16556,9 +16671,12 @@ text.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingThree{%
- \markdownRendererHeadingThreePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererHeadingThree
+ {
+ \markdownRendererHeadingThreePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ headingThree }
@@ -16568,7 +16686,6 @@ text.
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16589,9 +16706,12 @@ text.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingFour{%
- \markdownRendererHeadingFourPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererHeadingFour
+ {
+ \markdownRendererHeadingFourPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ headingFour }
@@ -16601,7 +16721,6 @@ text.
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16622,9 +16741,12 @@ text.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingFive{%
- \markdownRendererHeadingFivePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererHeadingFive
+ {
+ \markdownRendererHeadingFivePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ headingFive }
@@ -16634,7 +16756,6 @@ text.
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16756,9 +16877,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererHeadingSix{%
- \markdownRendererHeadingSixPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererHeadingSix
+ {
+ \markdownRendererHeadingSixPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ headingSix }
@@ -16768,7 +16892,6 @@ following text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16829,9 +16952,12 @@ The horizontal margins should contain the following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInlineHtmlComment{%
- \markdownRendererInlineHtmlCommentPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererInlineHtmlComment
+ {
+ \markdownRendererInlineHtmlCommentPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ inlineHtmlComment }
@@ -16841,7 +16967,6 @@ The horizontal margins should contain the following text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -16906,9 +17031,12 @@ following body text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInlineHtmlTag{%
- \markdownRendererInlineHtmlTagPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererInlineHtmlTag
+ {
+ \markdownRendererInlineHtmlTagPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ inlineHtmlTag }
@@ -16916,10 +17044,11 @@ following body text:
\g_@@_renderer_arities_prop
{ inlineHtmlTag }
{ 1 }
-\ExplSyntaxOff
-\def\markdownRendererInputBlockHtmlElement{%
- \markdownRendererInputBlockHtmlElementPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererInputBlockHtmlElement
+ {
+ \markdownRendererInputBlockHtmlElementPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ inputBlockHtmlElement }
@@ -16929,7 +17058,6 @@ following body text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -17007,9 +17135,12 @@ that the \TeX{} engine has shell access.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererImage{%
- \markdownRendererImagePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererImage
+ {
+ \markdownRendererImagePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ image }
@@ -17019,7 +17150,6 @@ that the \TeX{} engine has shell access.
{ 4 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -17077,9 +17207,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererImageAttributeContextBegin{%
- \markdownRendererImageAttributeContextBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererImageAttributeContextBegin
+ {
+ \markdownRendererImageAttributeContextBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ imageAttributeContextBegin }
@@ -17087,10 +17220,11 @@ following text:
\g_@@_renderer_arities_prop
{ imageAttributeContextBegin }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererImageAttributeContextEnd{%
- \markdownRendererImageAttributeContextEndPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererImageAttributeContextEnd
+ {
+ \markdownRendererImageAttributeContextEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ imageAttributeContextEnd }
@@ -17100,7 +17234,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -17223,9 +17356,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInterblockSeparator{%
- \markdownRendererInterblockSeparatorPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererInterblockSeparator
+ {
+ \markdownRendererInterblockSeparatorPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ interblockSeparator }
@@ -17235,7 +17371,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -17298,9 +17433,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererParagraphSeparator{%
- \markdownRendererParagraphSeparatorPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererParagraphSeparator
+ {
+ \markdownRendererParagraphSeparatorPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ paragraphSeparator }
@@ -17310,7 +17448,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -17418,9 +17555,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererLineBlockBegin{%
- \markdownRendererLineBlockBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererLineBlockBegin
+ {
+ \markdownRendererLineBlockBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ lineBlockBegin }
@@ -17428,10 +17568,11 @@ following text:
\g_@@_renderer_arities_prop
{ lineBlockBegin }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererLineBlockEnd{%
- \markdownRendererLineBlockEndPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererLineBlockEnd
+ {
+ \markdownRendererLineBlockEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ lineBlockEnd }
@@ -17441,7 +17582,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -17537,9 +17677,12 @@ following text:
%<*tex>
% \fi
% \begin{macrocode}
-\def\markdownRendererSoftLineBreak{%
- \markdownRendererSoftLineBreakPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererSoftLineBreak
+ {
+ \markdownRendererSoftLineBreakPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ softLineBreak }
@@ -17549,7 +17692,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -17645,9 +17787,12 @@ following text:
%<*tex>
% \fi
% \begin{macrocode}
-\def\markdownRendererHardLineBreak{%
- \markdownRendererHardLineBreakPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererHardLineBreak
+ {
+ \markdownRendererHardLineBreakPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ hardLineBreak }
@@ -17657,7 +17802,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -17769,9 +17913,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererLink{%
- \markdownRendererLinkPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererLink
+ {
+ \markdownRendererLinkPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ link }
@@ -17781,7 +17928,6 @@ following text:
{ 4 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -17839,9 +17985,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererLinkAttributeContextBegin{%
- \markdownRendererLinkAttributeContextBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererLinkAttributeContextBegin
+ {
+ \markdownRendererLinkAttributeContextBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ linkAttributeContextBegin }
@@ -17849,10 +17998,11 @@ following text:
\g_@@_renderer_arities_prop
{ linkAttributeContextBegin }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererLinkAttributeContextEnd{%
- \markdownRendererLinkAttributeContextEndPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererLinkAttributeContextEnd
+ {
+ \markdownRendererLinkAttributeContextEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ linkAttributeContextEnd }
@@ -17862,7 +18012,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -17917,9 +18066,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererMark{%
- \markdownRendererMarkPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererMark
+ {
+ \markdownRendererMarkPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ mark }
@@ -17929,7 +18081,6 @@ following text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18059,9 +18210,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererDocumentBegin{%
- \markdownRendererDocumentBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDocumentBegin
+ {
+ \markdownRendererDocumentBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ documentBegin }
@@ -18069,10 +18223,11 @@ following text:
\g_@@_renderer_arities_prop
{ documentBegin }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererDocumentEnd{%
- \markdownRendererDocumentEndPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDocumentEnd
+ {
+ \markdownRendererDocumentEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ documentEnd }
@@ -18082,7 +18237,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18155,9 +18309,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererNbsp{%
- \markdownRendererNbspPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererNbsp
+ {
+ \markdownRendererNbspPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ nbsp }
@@ -18167,7 +18324,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18288,7 +18444,6 @@ following text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18311,9 +18466,12 @@ option is disabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererOlBegin{%
- \markdownRendererOlBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererOlBegin
+ {
+ \markdownRendererOlBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ olBegin }
@@ -18323,7 +18481,6 @@ option is disabled. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18346,9 +18503,12 @@ receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererOlBeginTight{%
- \markdownRendererOlBeginTightPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererOlBeginTight
+ {
+ \markdownRendererOlBeginTightPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ olBeginTight }
@@ -18358,7 +18518,6 @@ receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18383,9 +18542,12 @@ and the style of delimiters between list item labels and texts (`Default`,
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFancyOlBegin{%
- \markdownRendererFancyOlBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererFancyOlBegin
+ {
+ \markdownRendererFancyOlBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ fancyOlBegin }
@@ -18395,7 +18557,6 @@ and the style of delimiters between list item labels and texts (`Default`,
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18420,9 +18581,12 @@ the valid style values.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFancyOlBeginTight{%
- \markdownRendererFancyOlBeginTightPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererFancyOlBeginTight
+ {
+ \markdownRendererFancyOlBeginTightPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ fancyOlBeginTight }
@@ -18432,7 +18596,6 @@ the valid style values.
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18454,9 +18617,12 @@ arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererOlItem{%
- \markdownRendererOlItemPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererOlItem
+ {
+ \markdownRendererOlItemPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ olItem }
@@ -18466,7 +18632,6 @@ arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18487,9 +18652,12 @@ option is disabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererOlItemEnd{%
- \markdownRendererOlItemEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererOlItemEnd
+ {
+ \markdownRendererOlItemEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ olItemEnd }
@@ -18499,7 +18667,6 @@ option is disabled. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18521,9 +18688,12 @@ receives a single numeric argument that corresponds to the item number.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererOlItemWithNumber{%
- \markdownRendererOlItemWithNumberPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererOlItemWithNumber
+ {
+ \markdownRendererOlItemWithNumberPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ olItemWithNumber }
@@ -18533,7 +18703,6 @@ receives a single numeric argument that corresponds to the item number.
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18555,9 +18724,12 @@ no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFancyOlItem{%
- \markdownRendererFancyOlItemPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererFancyOlItem
+ {
+ \markdownRendererFancyOlItemPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ fancyOlItem }
@@ -18567,7 +18739,6 @@ no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18588,9 +18759,12 @@ option is enabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFancyOlItemEnd{%
- \markdownRendererFancyOlItemEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererFancyOlItemEnd
+ {
+ \markdownRendererFancyOlItemEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ fancyOlItemEnd }
@@ -18600,7 +18774,6 @@ option is enabled. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18622,9 +18795,12 @@ argument that corresponds to the item number.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFancyOlItemWithNumber{%
- \markdownRendererFancyOlItemWithNumberPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererFancyOlItemWithNumber
+ {
+ \markdownRendererFancyOlItemWithNumberPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ fancyOlItemWithNumber }
@@ -18634,7 +18810,6 @@ argument that corresponds to the item number.
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18656,9 +18831,12 @@ disabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererOlEnd{%
- \markdownRendererOlEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererOlEnd
+ {
+ \markdownRendererOlEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ olEnd }
@@ -18668,7 +18846,6 @@ disabled. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18691,9 +18868,12 @@ arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererOlEndTight{%
- \markdownRendererOlEndTightPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererOlEndTight
+ {
+ \markdownRendererOlEndTightPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ olEndTight }
@@ -18703,7 +18883,6 @@ arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -18725,9 +18904,12 @@ option is enabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFancyOlEnd{%
- \markdownRendererFancyOlEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererFancyOlEnd
+ {
+ \markdownRendererFancyOlEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ fancyOlEnd }
@@ -18737,7 +18919,6 @@ option is enabled. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -19016,9 +19197,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererFancyOlEndTight{%
- \markdownRendererFancyOlEndTightPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererFancyOlEndTight
+ {
+ \markdownRendererFancyOlEndTightPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ fancyOlEndTight }
@@ -19028,7 +19212,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -19052,9 +19235,12 @@ option is enabled.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInputRawInline{%
- \markdownRendererInputRawInlinePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererInputRawInline
+ {
+ \markdownRendererInputRawInlinePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ inputRawInline }
@@ -19064,7 +19250,6 @@ option is enabled.
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -19134,9 +19319,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInputRawBlock{%
- \markdownRendererInputRawBlockPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererInputRawBlock
+ {
+ \markdownRendererInputRawBlockPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ inputRawBlock }
@@ -19146,7 +19334,6 @@ following text:
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -19167,9 +19354,12 @@ macros represent the beginning and the end of a section based on headings.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererSectionBegin{%
- \markdownRendererSectionBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererSectionBegin
+ {
+ \markdownRendererSectionBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ sectionBegin }
@@ -19177,10 +19367,11 @@ macros represent the beginning and the end of a section based on headings.
\g_@@_renderer_arities_prop
{ sectionBegin }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererSectionEnd{%
- \markdownRendererSectionEndPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererSectionEnd
+ {
+ \markdownRendererSectionEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ sectionEnd }
@@ -19190,7 +19381,6 @@ macros represent the beginning and the end of a section based on headings.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -19211,9 +19401,12 @@ and U+FFFD Unicode characters. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererReplacementCharacter{%
- \markdownRendererReplacementCharacterPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererReplacementCharacter
+ {
+ \markdownRendererReplacementCharacterPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ replacementCharacter }
@@ -19223,7 +19416,6 @@ and U+FFFD Unicode characters. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -19336,9 +19528,12 @@ following text, where the middot (`·`) denotes a non-breaking space:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererLeftBrace{%
- \markdownRendererLeftBracePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererLeftBrace
+ {
+ \markdownRendererLeftBracePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ leftBrace }
@@ -19346,10 +19541,11 @@ following text, where the middot (`·`) denotes a non-breaking space:
\g_@@_renderer_arities_prop
{ leftBrace }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererRightBrace{%
- \markdownRendererRightBracePrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererRightBrace
+ {
+ \markdownRendererRightBracePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ rightBrace }
@@ -19357,10 +19553,11 @@ following text, where the middot (`·`) denotes a non-breaking space:
\g_@@_renderer_arities_prop
{ rightBrace }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererDollarSign{%
- \markdownRendererDollarSignPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDollarSign
+ {
+ \markdownRendererDollarSignPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ dollarSign }
@@ -19368,10 +19565,11 @@ following text, where the middot (`·`) denotes a non-breaking space:
\g_@@_renderer_arities_prop
{ dollarSign }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererPercentSign{%
- \markdownRendererPercentSignPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererPercentSign
+ {
+ \markdownRendererPercentSignPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ percentSign }
@@ -19379,10 +19577,11 @@ following text, where the middot (`·`) denotes a non-breaking space:
\g_@@_renderer_arities_prop
{ percentSign }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererAmpersand{%
- \markdownRendererAmpersandPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererAmpersand
+ {
+ \markdownRendererAmpersandPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ ampersand }
@@ -19390,10 +19589,11 @@ following text, where the middot (`·`) denotes a non-breaking space:
\g_@@_renderer_arities_prop
{ ampersand }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererUnderscore{%
- \markdownRendererUnderscorePrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererUnderscore
+ {
+ \markdownRendererUnderscorePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ underscore }
@@ -19401,10 +19601,11 @@ following text, where the middot (`·`) denotes a non-breaking space:
\g_@@_renderer_arities_prop
{ underscore }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererHash{%
- \markdownRendererHashPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererHash
+ {
+ \markdownRendererHashPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ hash }
@@ -19412,10 +19613,11 @@ following text, where the middot (`·`) denotes a non-breaking space:
\g_@@_renderer_arities_prop
{ hash }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererCircumflex{%
- \markdownRendererCircumflexPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererCircumflex
+ {
+ \markdownRendererCircumflexPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ circumflex }
@@ -19423,10 +19625,11 @@ following text, where the middot (`·`) denotes a non-breaking space:
\g_@@_renderer_arities_prop
{ circumflex }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererBackslash{%
- \markdownRendererBackslashPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererBackslash
+ {
+ \markdownRendererBackslashPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ backslash }
@@ -19434,10 +19637,11 @@ following text, where the middot (`·`) denotes a non-breaking space:
\g_@@_renderer_arities_prop
{ backslash }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererTilde{%
- \markdownRendererTildePrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererTilde
+ {
+ \markdownRendererTildePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ tilde }
@@ -19445,10 +19649,11 @@ following text, where the middot (`·`) denotes a non-breaking space:
\g_@@_renderer_arities_prop
{ tilde }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererPipe{%
- \markdownRendererPipePrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererPipe
+ {
+ \markdownRendererPipePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ pipe }
@@ -19458,7 +19663,6 @@ following text, where the middot (`·`) denotes a non-breaking space:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -19484,7 +19688,7 @@ following content:
``` tex
\input markdown
\def\markdownOptionStrikeThrough{true}
-\input soulutf8.sty
+\input soul.sty
\def\markdownRendererStrikeThrough#1{\st{#1}}
\markdownBegin
This is ~~a lunar roving vehicle~~ strike-through text.
@@ -19507,7 +19711,7 @@ following content:
``` tex
\documentclass{article}
\usepackage[strikeThrough]{markdown}
-\usepackage{soulutf8}
+\usepackage{soul}
\markdownSetup{
renderers = {
strikeThrough = {\st{#1}},
@@ -19556,9 +19760,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererStrikeThrough{%
- \markdownRendererStrikeThroughPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererStrikeThrough
+ {
+ \markdownRendererStrikeThroughPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ strikeThrough }
@@ -19568,7 +19775,6 @@ following text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -19664,9 +19870,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererSubscript{%
- \markdownRendererSubscriptPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererSubscript
+ {
+ \markdownRendererSubscriptPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ subscript }
@@ -19675,7 +19884,6 @@ following text:
{ subscript }
{ 1 }
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -19771,9 +19979,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererSuperscript{%
- \markdownRendererSuperscriptPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererSuperscript
+ {
+ \markdownRendererSuperscriptPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ superscript }
@@ -19783,7 +19994,6 @@ following text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -19880,9 +20090,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererTableAttributeContextBegin{%
- \markdownRendererTableAttributeContextBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererTableAttributeContextBegin
+ {
+ \markdownRendererTableAttributeContextBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ tableAttributeContextBegin }
@@ -19890,10 +20103,11 @@ following text:
\g_@@_renderer_arities_prop
{ tableAttributeContextBegin }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererTableAttributeContextEnd{%
- \markdownRendererTableAttributeContextEndPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererTableAttributeContextEnd
+ {
+ \markdownRendererTableAttributeContextEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ tableAttributeContextEnd }
@@ -19903,7 +20117,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20018,9 +20231,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererTable{%
- \markdownRendererTablePrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererTable
+ {
+ \markdownRendererTablePrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ table }
@@ -20030,7 +20246,6 @@ following text:
{ 3 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20139,9 +20354,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererInlineMath{%
- \markdownRendererInlineMathPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererInlineMath
+ {
+ \markdownRendererInlineMathPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ inlineMath }
@@ -20149,10 +20367,11 @@ following text:
\g_@@_renderer_arities_prop
{ inlineMath }
{ 1 }
-\ExplSyntaxOff
-\def\markdownRendererDisplayMath{%
- \markdownRendererDisplayMathPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererDisplayMath
+ {
+ \markdownRendererDisplayMathPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ displayMath }
@@ -20162,7 +20381,6 @@ following text:
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20277,9 +20495,12 @@ following text:
%<*tex>
% \fi
% \begin{macrocode}
-\def\markdownRendererThematicBreak{%
- \markdownRendererThematicBreakPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererThematicBreak
+ {
+ \markdownRendererThematicBreakPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ thematicBreak }
@@ -20289,7 +20510,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20371,9 +20591,12 @@ following text:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererTickedBox{%
- \markdownRendererTickedBoxPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererTickedBox
+ {
+ \markdownRendererTickedBoxPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ tickedBox }
@@ -20381,10 +20604,11 @@ following text:
\g_@@_renderer_arities_prop
{ tickedBox }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererHalfTickedBox{%
- \markdownRendererHalfTickedBoxPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererHalfTickedBox
+ {
+ \markdownRendererHalfTickedBoxPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ halfTickedBox }
@@ -20392,10 +20616,11 @@ following text:
\g_@@_renderer_arities_prop
{ halfTickedBox }
{ 0 }
-\ExplSyntaxOff
-\def\markdownRendererUntickedBox{%
- \markdownRendererUntickedBoxPrototype}%
-\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererUntickedBox
+ {
+ \markdownRendererUntickedBoxPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ untickedBox }
@@ -20405,7 +20630,6 @@ following text:
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20437,11 +20661,17 @@ receive four parameters:
% \fi
%
% \begin{macrocode}
-\def\markdownRendererWarning{%
- \markdownRendererWarningPrototype}%
-\def\markdownRendererError{%
- \markdownRendererErrorPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererWarning
+ {
+ \markdownRendererWarningPrototype
+ }
+\cs_gset_protected:Npn
+ \markdownRendererError
+ {
+ \markdownRendererErrorPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ warning }
@@ -20458,7 +20688,6 @@ receive four parameters:
{ 4 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20481,9 +20710,12 @@ option is enabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataBegin{%
- \markdownRendererJekyllDataBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererJekyllDataBegin
+ {
+ \markdownRendererJekyllDataBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ jekyllDataBegin }
@@ -20493,7 +20725,6 @@ option is enabled. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20514,9 +20745,12 @@ The \mdef{markdownRendererJekyllDataEnd} macro represents the end of a
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataEnd{%
- \markdownRendererJekyllDataEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererJekyllDataEnd
+ {
+ \markdownRendererJekyllDataEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ jekyllDataEnd }
@@ -20526,7 +20760,6 @@ The \mdef{markdownRendererJekyllDataEnd} macro represents the end of a
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20549,9 +20782,12 @@ arguments: the scalar key in the parent structure, cast to a string following
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataMappingBegin{%
- \markdownRendererJekyllDataMappingBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererJekyllDataMappingBegin
+ {
+ \markdownRendererJekyllDataMappingBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ jekyllDataMappingBegin }
@@ -20561,7 +20797,6 @@ arguments: the scalar key in the parent structure, cast to a string following
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20582,9 +20817,12 @@ when the \Opt{jekyllData} option is enabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataMappingEnd{%
- \markdownRendererJekyllDataMappingEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererJekyllDataMappingEnd
+ {
+ \markdownRendererJekyllDataMappingEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ jekyllDataMappingEnd }
@@ -20594,7 +20832,6 @@ when the \Opt{jekyllData} option is enabled. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20617,9 +20854,12 @@ arguments: the scalar key in the parent structure, cast to a string following
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataSequenceBegin{%
- \markdownRendererJekyllDataSequenceBeginPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererJekyllDataSequenceBegin
+ {
+ \markdownRendererJekyllDataSequenceBeginPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ jekyllDataSequenceBegin }
@@ -20629,7 +20869,6 @@ arguments: the scalar key in the parent structure, cast to a string following
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20650,9 +20889,12 @@ when the \Opt{jekyllData} option is enabled. The macro receives no arguments.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataSequenceEnd{%
- \markdownRendererJekyllDataSequenceEndPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererJekyllDataSequenceEnd
+ {
+ \markdownRendererJekyllDataSequenceEndPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ jekyllDataSequenceEnd }
@@ -20662,7 +20904,6 @@ when the \Opt{jekyllData} option is enabled. The macro receives no arguments.
{ 0 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20685,9 +20926,12 @@ following \acro{yaml} serialization rules.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataBoolean{%
- \markdownRendererJekyllDataBooleanPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererJekyllDataBoolean
+ {
+ \markdownRendererJekyllDataBooleanPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ jekyllDataBoolean }
@@ -20697,7 +20941,6 @@ following \acro{yaml} serialization rules.
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20720,9 +20963,12 @@ following \acro{yaml} serialization rules.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataNumber{%
- \markdownRendererJekyllDataNumberPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererJekyllDataNumber
+ {
+ \markdownRendererJekyllDataNumberPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ jekyllDataNumber }
@@ -20732,7 +20978,6 @@ following \acro{yaml} serialization rules.
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20767,11 +21012,17 @@ for identifiers and other programmatic text that won't be typeset by \TeX{}.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataTypographicString{%
- \markdownRendererJekyllDataTypographicStringPrototype}%
-\def\markdownRendererJekyllDataProgrammaticString{%
- \markdownRendererJekyllDataProgrammaticStringPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererJekyllDataTypographicString
+ {
+ \markdownRendererJekyllDataTypographicStringPrototype
+ }
+\cs_gset_protected:Npn
+ \markdownRendererJekyllDataProgrammaticString
+ {
+ \markdownRendererJekyllDataProgrammaticStringPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ jekyllDataTypographicString }
@@ -20788,7 +21039,6 @@ for identifiers and other programmatic text that won't be typeset by \TeX{}.
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20874,7 +21124,6 @@ removed in Markdown 4.0.0.
{ 2 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -20901,9 +21150,12 @@ serialization rules.
% \fi
%
% \begin{macrocode}
-\def\markdownRendererJekyllDataEmpty{%
- \markdownRendererJekyllDataEmptyPrototype}%
\ExplSyntaxOn
+\cs_gset_protected:Npn
+ \markdownRendererJekyllDataEmpty
+ {
+ \markdownRendererJekyllDataEmptyPrototype
+ }
\seq_gput_right:Nn
\g_@@_renderers_seq
{ jekyllDataEmpty }
@@ -20913,7 +21165,6 @@ serialization rules.
{ 1 }
\ExplSyntaxOff
% \end{macrocode}
-% \par
%
% \iffalse
%</tex>
@@ -21021,9 +21272,13 @@ following text:
%
% We define the command \mdef{@@_define_renderers:} that defines plain \TeX{}
% macros for token renderers. Furthermore, the `\markdownSetup` macro also accepts
-% the `renderers` key, whose value must be a list of key-values, where the keys
-% correspond to the markdown token renderer macros and the values are new
-% definitions of these token renderers.
+% the `renderers` and `unprotectedRenderers` keys. The value for these keys
+% must be a list of key-values, where the keys correspond to the markdown token
+% renderer macros and the values are new definitions of these token renderers.
+%
+% Whereas the key `renderers` defines protected functions, which are usually
+% preferable for typesetting, the key `unprotectedRenderers` defines unprotected
+% functions, which are easier to expand and may be preferable for programming.
%
% \end{markdown}
% \begin{macrocode}
@@ -21068,6 +21323,8 @@ following text:
\l_@@_renderer_definition_tl
\bool_new:N
\g_@@_appending_renderer_bool
+\bool_new:N
+ \g_@@_unprotected_renderer_bool
\cs_new:Nn \@@_define_renderer:nNn
{
\keys_define:nn
@@ -21092,15 +21349,27 @@ following text:
\l_@@_renderer_definition_tl
\l_tmpa_tl
}
- \cs_generate_from_arg_count:NNnV
+ \bool_if:NTF
+ \g_@@_unprotected_renderer_bool
+ {
+ \tl_set:Nn
+ \l_tmpa_tl
+ { \cs_set:Npn }
+ }
+ {
+ \tl_set:Nn
+ \l_tmpa_tl
+ { \cs_set_protected:Npn }
+ }
+ \exp_last_unbraced:NNV
+ \cs_generate_from_arg_count:NNnV
#2
- \cs_set:Npn
+ \l_tmpa_tl
{ #3 }
\l_@@_renderer_definition_tl
},
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% If the token renderer macro has been deprecated, we undefine it.
@@ -21119,7 +21388,6 @@ following text:
}
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% We define the function \mdef{@@_tl_set_from_cs:NNn}
@@ -21177,13 +21445,21 @@ following text:
{ markdown/options }
{
renderers .code:n = {
+ \bool_gset_false:N
+ \g_@@_unprotected_renderer_bool
+ \keys_set:nn
+ { markdown/options/renderers }
+ { #1 }
+ },
+ unprotectedRenderers .code:n = {
+ \bool_gset_true:N
+ \g_@@_unprotected_renderer_bool
\keys_set:nn
{ markdown/options/renderers }
{ #1 }
},
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The following example code showcases a possible configuration of the
@@ -21212,7 +21488,6 @@ following text:
{
unknown .code:n = {
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Besides defining renderers at once, we can also define them incrementally
@@ -21274,7 +21549,6 @@ following text:
\g_@@_appending_renderer_bool
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% In addition to exact token renderer names, we also support wildcards (`*`)
@@ -21414,11 +21688,6 @@ following text:
\l_tmpa_clist
}
}
-% TODO: Remove in TeX Live 2023.
-\prg_generate_conditional_variant:Nnn
- \prop_get:NnN
- { NeN }
- { TF }
\cs_generate_variant:Nn
\regex_set:Nn
{ NV }
@@ -21760,9 +22029,15 @@ following text:
%
% We define the command \mdef{@@_define_renderer_prototypes:} that defines plain \TeX{}
% macros for token renderer prototypes. Furthermore, the `\markdownSetup` macro also accepts
-% the `rendererPrototype` key, whose value must be a list of key-values, where the keys
-% correspond to the markdown token renderer prototype macros and the values are new
-% definitions of these token renderer prototypes.
+% the `rendererPrototypes` and `unprotectedRendererPrototypes` keys. The value
+% for these keys must be a list of key-values, where the keys correspond to the
+% markdown token renderer prototype macros and the values are new definitions
+% of these token renderer prototypes.
+%
+% Whereas the key `rendererPrototypes` defines protected functions, which are
+% usually preferable for typesetting, the key `unprotectedRendererPrototypes`
+% defines unprotected functions, which are easier to expand and may be
+% preferable for programming.
%
% \end{markdown}
% \begin{macrocode}
@@ -21808,6 +22083,8 @@ following text:
\l_@@_renderer_prototype_definition_tl
\bool_new:N
\g_@@_appending_renderer_prototype_bool
+\bool_new:N
+ \g_@@_unprotected_renderer_prototype_bool
\cs_new:Nn \@@_define_renderer_prototype:nNn
{
\keys_define:nn
@@ -21832,15 +22109,27 @@ following text:
\l_@@_renderer_prototype_definition_tl
\l_tmpa_tl
}
- \cs_generate_from_arg_count:NNnV
+ \bool_if:NTF
+ \g_@@_unprotected_renderer_prototype_bool
+ {
+ \tl_set:Nn
+ \l_tmpa_tl
+ { \cs_set:Npn }
+ }
+ {
+ \tl_set:Nn
+ \l_tmpa_tl
+ { \cs_set_protected:Npn }
+ }
+ \exp_last_unbraced:NNV
+ \cs_generate_from_arg_count:NNnV
#2
- \cs_set:Npn
+ \l_tmpa_tl
{ #3 }
\l_@@_renderer_prototype_definition_tl
},
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Unless the token renderer prototype macro has already been defined or unless,
@@ -21860,7 +22149,7 @@ following text:
{
\cs_generate_from_arg_count:NNnn
#2
- \cs_set:Npn
+ \cs_gset_protected:Npn
{ #3 }
{ }
}
@@ -21870,7 +22159,6 @@ following text:
\@@_define_renderer_prototype:nNn
{ ncV }
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The following example code showcases a possible configuration of the
@@ -21892,7 +22180,6 @@ following text:
{
unknown .code:n = {
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Besides defining renderer prototypes at once, we can also define them
@@ -21954,7 +22241,6 @@ following text:
\g_@@_appending_renderer_prototype_bool
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% In addition to exact token renderer prototype names, we also support
@@ -22039,6 +22325,23 @@ following text:
{ markdown/options }
{
#1 .code:n = {
+ \bool_gset_false:N
+ \g_@@_unprotected_renderer_prototype_bool
+ \keys_set:nn
+ { markdown/options/renderer-prototypes }
+ { ##1 }
+ },
+ }
+ }
+\@@_with_various_cases:nn
+ { unprotectedRendererPrototypes }
+ {
+ \keys_define:nn
+ { markdown/options }
+ {
+ #1 .code:n = {
+ \bool_gset_true:N
+ \g_@@_unprotected_renderer_prototype_bool
\keys_set:nn
{ markdown/options/renderer-prototypes }
{ ##1 }
@@ -22089,7 +22392,6 @@ following text:
% \begin{macrocode}
\let\markdownMakeOther\relax
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \mdef{markdownReadAndConvert} macro implements the \mref{markdownBegin}
@@ -22148,7 +22450,6 @@ following text:
% \iffalse
%</tex>
% \fi
-% \par
% \begin{markdown}
%
% \LaTeX{} Interface {#latexinterface}
@@ -22260,7 +22561,6 @@ pdflatex --shell-escape document.tex
% \Hologo{LaTeX2e} parses package options.
%
% \end{markdown}
-% \par
% \begin{markdown}
%
%### Typesetting Markdown
@@ -22638,7 +22938,6 @@ document:
}
\ExplSyntaxOff
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The following example \LaTeX{} code showcases a possible configuration of
@@ -22659,7 +22958,10 @@ document:
% \fi
% \begin{markdown}
-### Themes {#latexthemes}
+%### Themes {#latexthemes}
+% \iffalse
+#### Themes {#latexthemes}
+% \fi
% In Section~\ref{sec:themes}, we described the concept of themes.
In \LaTeX{}, we expand on the concept of
@@ -22697,7 +22999,6 @@ For example, to load themes named `witiko/beamer/MU` and `witiko/dot`, you
would use the following code in the preamble of your document:
% \fi
-% \par
% \begin{markdown}
``` tex
@@ -22720,221 +23021,34 @@ would use the following code in the preamble of your document:
%</latex>
%<*manual-options>
% \fi
-% \par
% \begin{markdown}
Due to limitations of \LaTeX{}, themes may not be loaded after the
beginning of a \LaTeX{} document.
-% \end{markdown}
-% \par
-% \markdownBegin
-
-Built-in \LaTeX{} themes provided with the Markdown package include:
-
-\pkg{witiko/dot}
-
-: A theme that typesets fenced code blocks with the `dot …` infostring
- as images of directed graphs rendered by the Graphviz tools. The
- right tail of the infostring is used as the image title.
-% ```` tex
-% \documentclass{article}
-% \usepackage[import=witiko/dot]{markdown}
-% \setkeys{Gin}{
-% width = \columnwidth,
-% height = 0.65\paperheight,
-% keepaspectratio}
-% \begin{document}
-% \begin{markdown}
-% ``` dot Various formats of mathemathical formulae
-% digraph tree {
-% margin = 0;
-% rankdir = "LR";
+% We also define the prop \mdef{g_@@_latex_built_in_themes_prop} that
+% contains the code of built-in themes. This is a packaging optimization,
+% so that built-in themes does not need to be distributed in many small files.
%
-% latex -> pmml;
-% latex -> cmml;
-% pmml -> slt;
-% cmml -> opt;
-% cmml -> prefix;
-% cmml -> infix;
-% pmml -> mterms [style=dashed];
-% cmml -> mterms;
-%
-% latex [label = "LaTeX"];
-% pmml [label = "Presentation MathML"];
-% cmml [label = "Content MathML"];
-% slt [label = "Symbol Layout Tree"];
-% opt [label = "Operator Tree"];
-% prefix [label = "Prefix"];
-% infix [label = "Infix"];
-% mterms [label = "M-Terms"];
-% }
-% ```
-% \end{markdown}
-% \end{document}
-% ````````
-% Typesetting the above document produces the output shown in
-% Figure <#fig:witiko/dot>.
-% ``` dot Various formats of mathemathical formulae \label{fig:witiko/dot}
-% digraph tree {
-% margin = 0;
-% rankdir = "LR";
-%
-% latex -> pmml;
-% latex -> cmml;
-% pmml -> slt;
-% cmml -> opt;
-% cmml -> prefix;
-% cmml -> infix;
-% pmml -> mterms [style=dashed];
-% cmml -> mterms;
-%
-% latex [label = "LaTeX"];
-% pmml [label = "Presentation MathML"];
-% cmml [label = "Content MathML"];
-% slt [label = "Symbol Layout Tree"];
-% opt [label = "Operator Tree"];
-% prefix [label = "Prefix"];
-% infix [label = "Infix"];
-% mterms [label = "M-Terms"];
-% }
-% ```
- The theme requires a Unix-like operating system with GNU Diffutils and
- Graphviz installed. The theme also requires shell access unless the
- \Opt{frozenCache} plain \TeX{} option is enabled.
-
-% \markdownEnd
-% \iffalse
-
-##### \LaTeX{} Example {.unnumbered}
-
-Using a text editor, create a text document named `document.tex` with the
-following content:
-```` tex
-\documentclass{article}
-\usepackage[import=witiko/dot]{markdown}
-\setkeys{Gin}{
- width=\columnwidth,
- height=0.65\paperheight,
- keepaspectratio}
-\begin{document}
-\begin{markdown}
-``` dot Various formats of mathemathical formulae
-digraph tree {
- margin = 0;
- rankdir = "LR";
-
- latex -> pmml;
- latex -> cmml;
- pmml -> slt;
- cmml -> opt;
- cmml -> prefix;
- cmml -> infix;
- pmml -> mterms [style=dashed];
- cmml -> mterms;
-
- latex [label = "LaTeX"];
- pmml [label = "Presentation MathML"];
- cmml [label = "Content MathML"];
- slt [label = "Symbol Layout Tree"];
- opt [label = "Operator Tree"];
- prefix [label = "Prefix"];
- infix [label = "Infix"];
- mterms [label = "M-Terms"];
-}
-```
-\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
-a drawing of a directed graph similar to Figure 1 from the following
-conference article:
-
-> NOVOTNÝ, Vít, Petr SOJKA, Michal ŠTEFÁNIK and Dávid LUPTÁK. Three is Better
-> than One: Ensembling Math Information Retrieval Systems. *CEUR Workshop
-> Proceedings*. Thessaloniki, Greece: M. Jeusfeld c/o Redaktion Sun SITE,
-> Informatik V, RWTH Aachen., 2020, vol. 2020, No 2696, p. 1-30. ISSN 1613-0073.
-> <http://ceur-ws.org/Vol-2696/paper_235.pdf>
-
-%</manual-options>
-%<*themes-witiko-dot>
-% \fi
-% \begin{macrocode}
-\ProvidesPackage{markdownthemewitiko_dot}[2021/03/09]%
-% \end{macrocode}
-% \iffalse
-%</themes-witiko-dot>
-%<*manual-options>
-% \fi
-% \par
-% \markdownBegin
-
-\pkg{witiko/graphicx/http}
-
-: A theme that adds support for downloading images whose URL has the
- http or https protocol.
-% ``` tex
-% \documentclass{article}
-% \usepackage[import=witiko/graphicx/http]{markdown}
-% \begin{document}
-% \begin{markdown}
-% ![img](https://github.com/witiko/markdown/raw/main/markdown.png
-% "The banner of the Markdown package")
-% \end{markdown}
-% \end{document}
-% ```````
-% Typesetting the above document produces the output shown in
-% Figure <#fig:witiko/graphicx/http>.
-% ![img](https://github.com/witiko/markdown/raw/main/markdown.png
-% "The banner of the Markdown package \label{fig:witiko/graphicx/http}")
- The theme requires the \pkg{catchfile} \LaTeX{} package and a Unix-like
- operating system with GNU Coreutils `md5sum` and either GNU Wget or cURL
- installed. The theme also requires shell access unless the
- \Opt{frozenCache} plain \TeX{} option is enabled.
-
-% \markdownEnd
+% \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[import=witiko/graphicx/http]{markdown}
-\begin{document}
-\begin{markdown}
-![img](https://github.com/witiko/markdown/raw/main/markdown.png
- "The banner of the Markdown package")
-\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 image:
-
-> ![img](https://github.com/witiko/markdown/raw/main/markdown.png "The banner of the Markdown package")
-
%</manual-options>
-%<*themes-witiko-graphicx-http>
+%<*latex>
% \fi
% \begin{macrocode}
-\ProvidesPackage{markdownthemewitiko_graphicx_http}[2021/03/22]%
+\ExplSyntaxOn
+\prop_new:N
+ \g_@@_latex_built_in_themes_prop
+\ExplSyntaxOff
% \end{macrocode}
% \iffalse
-%</themes-witiko-graphicx-http>
+%</latex>
%<*manual-options>
% \fi
-% \par
% \begin{markdown}
+Built-in \LaTeX{} themes provided with the Markdown package include:
+
\pkg{witiko/markdown/defaults}
: A \LaTeX{} theme with the default definitions of token renderer prototypes
@@ -22947,9 +23061,7 @@ following image:
%<*latex>
% \fi
% \begin{macrocode}
-\AtEndOfPackage{
- \markdownLaTeXLoadedtrue
-}
+\AtEndOfPackage{\markdownLaTeXLoadedtrue}
% \end{macrocode}
% \begin{markdown}
%
@@ -22989,16 +23101,8 @@ following image:
% \end{macrocode}
% \iffalse
%</latex>
-%<*themes-witiko-markdown-defaults-latex>
-% \fi
-% \begin{macrocode}
-\ProvidesPackage{markdownthemewitiko_markdown_defaults}[2024/10/29]%
-% \end{macrocode}
-% \iffalse
-%</themes-witiko-markdown-defaults-latex>
%<*context>
% \fi
-% \par
% \begin{markdown}
%
% Please, see Section <#sec:latex-themes-implementation> for implementation
@@ -23094,7 +23198,6 @@ following text:
\do\#\do\^\do\_\do\%\do\~}%
\input markdown/markdown
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \Hologo{ConTeXt} interface is implemented by the
@@ -23122,7 +23225,6 @@ following text:
\let\startmarkdown\relax
\let\stopmarkdown\relax
% \end{macrocode}
-% \par
% \begin{markdown}
%
% You may prepend your own code to the \mref{startmarkdown} macro and redefine the
@@ -23152,7 +23254,6 @@ following text:
\let\startyaml\relax
\let\stopyaml\relax
% \end{macrocode}
-% \par
% \begin{markdown}
%
% You may prepend your own code to the \mref{startyaml} macro and append your
@@ -23197,7 +23298,6 @@ following text:
% \begin{macrocode}
\let\inputmarkdown\relax
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Furthermore, the \mref{inputmarkdown} macro also accepts \Hologo{ConTeXt}
@@ -23231,7 +23331,6 @@ following text:
% \begin{macrocode}
\let\inputyaml\relax
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Furthermore, the \mref{inputyaml} macro also accepts \Hologo{ConTeXt}
@@ -23336,16 +23435,19 @@ following text:
\@@_define_renderers:
\@@_define_renderer_prototypes:
}
-\ExplSyntaxOff
% \end{macrocode}
% \iffalse
%</context>
%<*manual-options>
% \fi
% \begin{markdown}
-
-### Themes
-
+%
+%### Themes {#contextthemes}
+% \iffalse
+### \Hologo{ConTeXt}
+#### Themes {#contextthemes}
+% \fi
+%
% In Section~\ref{sec:themes}, we described the concept of themes.
In \Hologo{ConTeXt}, we expand on the concept of
% themes\iffalse
@@ -23373,6 +23475,26 @@ For example, to load a theme named `witiko/tilde` in your document:
\setupmarkdown[import=witiko/tilde]
```````
+% We also define the prop \mdef{g_@@_context_built_in_themes_prop} that
+% contains the code of built-in themes. This is a packaging optimization,
+% so that built-in themes does not need to be distributed in many small files.
+%
+% \end{markdown}
+% \iffalse
+%</manual-options>
+%<*context>
+% \fi
+% \begin{macrocode}
+\prop_new:N
+ \g_@@_context_built_in_themes_prop
+\ExplSyntaxOff
+% \end{macrocode}
+% \iffalse
+%</context>
+%<*manual-options>
+% \fi
+% \begin{markdown}
+
Built-in \Hologo{ConTeXt} themes provided with the Markdown package include:
\pkg{witiko/markdown/defaults}
@@ -23442,7 +23564,6 @@ local P, R, S, V, C, Cg, Cb, Cmt, Cc, Ct, B, Cs, Cp, any =
lpeg.P, lpeg.R, lpeg.S, lpeg.V, lpeg.C, lpeg.Cg, lpeg.Cb,
lpeg.Cmt, lpeg.Cc, lpeg.Ct, lpeg.B, lpeg.Cs, lpeg.Cp, lpeg.P(1)
% \end{macrocode}
-% \par
% \begin{markdown}
%
%### Utility Functions
@@ -23463,7 +23584,6 @@ local util = {}
%</lua,lua-loader>
%<*lua>
% \fi
-% \par
% \begin{markdown}
%
% The \luamdef{util.err} method prints an error message `msg` and exits.
@@ -23481,7 +23601,6 @@ end
%</lua>
%<*lua,lua-loader>
% \fi
-% \par
% \begin{markdown}
%
% The \luamdef{util.cache} method used `dir`, `string`, `salt`, and `suffix`
@@ -23512,7 +23631,6 @@ end
%</lua,lua-loader>
%<*lua>
% \fi
-% \par
% \begin{markdown}
%
% The \luamdef{util.cache_verbatim} method strips whitespaces from the
@@ -23526,7 +23644,6 @@ function util.cache_verbatim(dir, string)
return name
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{util.table_copy} method creates a shallow copy of a table `t`
@@ -23540,7 +23657,6 @@ function util.table_copy(t)
return setmetatable(u, getmetatable(t))
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{util.encode_json_string} method encodes a string `s` in
@@ -23554,7 +23670,6 @@ function util.encode_json_string(s)
return [["]] .. s .. [["]]
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{util.expand_tabs_in_line} expands tabs in string `s`. If
@@ -23574,7 +23689,6 @@ function util.expand_tabs_in_line(s, tabstop)
end))
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{util.walk} method walks a rope `t`, applying a function `f`
@@ -23607,7 +23721,6 @@ function util.walk(t, f)
end
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{util.flatten} method flattens an array `ary` that does not
@@ -23629,7 +23742,6 @@ function util.flatten(ary)
return new
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{util.rope_to_string} method converts a rope `rope` to a
@@ -23644,7 +23756,6 @@ function util.rope_to_string(rope)
return table.concat(buffer)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{util.rope_last} method retrieves the last item in a rope. For
@@ -23665,7 +23776,6 @@ function util.rope_last(rope)
end
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Given an array `ary` and a string `x`, the \luamdef{util.intersperse}
@@ -23687,7 +23797,6 @@ function util.intersperse(ary, x)
return new
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Given an array `ary` and a function `f`, the \luamdef{util.map} method
@@ -23704,7 +23813,6 @@ function util.map(ary, f)
return new
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Given a table `char_escapes` mapping escapable characters to escaped
@@ -23774,7 +23882,6 @@ end
%</lua>
%<*lua,lua-loader>
% \fi
-% \par
% \begin{markdown}
%
% The \luamdef{util.pathname} method produces a pathname out of a directory
@@ -23790,7 +23897,6 @@ function util.pathname(dir, file)
end
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{util.salt} method produces cryptographic salt out of a table of
@@ -23823,7 +23929,6 @@ function util.salt(options)
return salt
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{util.warning} method produces a warning `s` that is unrelated to
@@ -23840,7 +23945,6 @@ end
%</lua,lua-loader>
%<*lua>
% \fi
-% \par
% \begin{markdown}
%
%### HTML Entities
@@ -25981,7 +26085,6 @@ local character_entities = {
["zopf"] = 120171,
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Given a string `s` of decimal digits, the \luamdef{entities.dec_entity}
@@ -25997,7 +26100,6 @@ function entities.dec_entity(s)
return unicode.utf8.char(n)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Given a string `s` of hexadecimal digits, the
@@ -26014,7 +26116,6 @@ function entities.hex_entity(s)
return unicode.utf8.char(n)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Given a captured character `x` and a string `s` of hexadecimal digits, the
@@ -26031,7 +26132,6 @@ function entities.hex_entity_with_x_char(x, s)
return unicode.utf8.char(n)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Given a character entity name `s` (like `ouml`), the
@@ -26055,7 +26155,6 @@ function entities.char_entity(s)
return table.concat(char_table)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
%### Plain \TeX{} Writer {#tex-writer}
@@ -26076,7 +26175,6 @@ end
% \begin{macrocode}
M.writer = {}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{writer.new} method creates and returns a new \TeX{} writer
@@ -26094,7 +26192,6 @@ M.writer = {}
function M.writer.new(options)
local self = {}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Make `options` available as \luamdef{writer->options}, so that it is
@@ -26104,7 +26201,6 @@ function M.writer.new(options)
% \begin{macrocode}
self.options = options
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->flatten\_inlines}, which indicates whether or not the
@@ -26116,7 +26212,6 @@ function M.writer.new(options)
% \begin{macrocode}
self.flatten_inlines = false
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Parse the \Opt{slice} option and define \luamdef{writer->slice\_begin},
@@ -26156,7 +26251,6 @@ function M.writer.new(options)
self.is_writing = false
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->space} as the output format of a space character.
@@ -26165,7 +26259,6 @@ function M.writer.new(options)
% \begin{macrocode}
self.space = " "
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->nbsp} as the output format of a non-breaking space
@@ -26175,7 +26268,6 @@ function M.writer.new(options)
% \begin{macrocode}
self.nbsp = "\\markdownRendererNbsp{}"
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->plain} as a function that will transform an input
@@ -26187,7 +26279,6 @@ function M.writer.new(options)
return s
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->paragraph} as a function that will transform an
@@ -26200,7 +26291,6 @@ function M.writer.new(options)
return s
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->interblocksep} as the output format of a block
@@ -26214,7 +26304,6 @@ function M.writer.new(options)
return self.interblocksep_text
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->paragraphsep} as the output format of a paragraph
@@ -26230,7 +26319,6 @@ function M.writer.new(options)
return self.paragraphsep_text
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->undosep} as a function that will remove the output
@@ -26244,7 +26332,6 @@ function M.writer.new(options)
return self.undosep_text
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->soft_line_break} as the output format of a soft
@@ -26257,7 +26344,6 @@ function M.writer.new(options)
return "\\markdownRendererSoftLineBreak\n{}"
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->hard_line_break} as the output format of a hard
@@ -26270,7 +26356,6 @@ function M.writer.new(options)
return "\\markdownRendererHardLineBreak\n{}"
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->ellipsis} as the output format of an ellipsis.
@@ -26279,7 +26364,6 @@ function M.writer.new(options)
% \begin{macrocode}
self.ellipsis = "\\markdownRendererEllipsis{}"
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->thematic_break} as the output format of a thematic
@@ -26292,7 +26376,6 @@ function M.writer.new(options)
return "\\markdownRendererThematicBreak{}"
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define tables \luamdef{writer->escaped_uri_chars} and
@@ -26319,7 +26402,6 @@ function M.writer.new(options)
= "\\markdownRendererReplacementCharacter{}",
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define table \luamdef{writer->escaped_strings} containing the mapping from
@@ -26330,7 +26412,6 @@ function M.writer.new(options)
self.escaped_strings = util.table_copy(self.escaped_minimal_strings)
self.escaped_strings[entities.hex_entity('00A0')] = self.nbsp
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define a table \luamdef{writer->escaped_chars} containing the mapping from
@@ -26355,7 +26436,6 @@ function M.writer.new(options)
= "\\markdownRendererReplacementCharacter{}",
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Use the \luamref{writer->escaped_chars}, \luamref{writer->escaped_uri_chars},
@@ -26380,7 +26460,6 @@ function M.writer.new(options)
local escape_minimal = create_escaper(
{}, self.escaped_minimal_strings)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define the following semantic aliases for the escaper functions:
@@ -26411,7 +26490,6 @@ function M.writer.new(options)
self.infostring = escape_programmatic_text
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->warning} as a function that will transform an input
@@ -26425,7 +26503,6 @@ function M.writer.new(options)
escape_minimal(m or ""), "}"}
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->error} as a function that will transform an input
@@ -26439,7 +26516,6 @@ function M.writer.new(options)
escape_minimal(m or ""), "}"}
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->code} as a function that will transform an input
@@ -26465,7 +26541,6 @@ function M.writer.new(options)
return buf
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->link} as a function that will transform an input
@@ -26494,7 +26569,6 @@ function M.writer.new(options)
return buf
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->image} as a function that will transform an input
@@ -26523,7 +26597,6 @@ function M.writer.new(options)
return buf
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->bulletlist} as a function that will transform an input
@@ -26563,7 +26636,6 @@ function M.writer.new(options)
"\\markdownRendererUlItemEnd "}
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->orderedlist} as a function that will transform an
@@ -26615,7 +26687,6 @@ function M.writer.new(options)
end
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->inline_html_comment} as a function that will
@@ -26629,7 +26700,6 @@ function M.writer.new(options)
return {"\\markdownRendererInlineHtmlComment{",contents,"}"}
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->inline_html_tag} as a function that will
@@ -26645,7 +26715,6 @@ function M.writer.new(options)
self.string(contents),"}"}
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->block_html_element} as a function that will
@@ -26660,7 +26729,6 @@ function M.writer.new(options)
return {"\\markdownRendererInputBlockHtmlElement{",name,"}"}
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->emphasis} as a function that will transform an
@@ -26673,7 +26741,6 @@ function M.writer.new(options)
return {"\\markdownRendererEmphasis{",s,"}"}
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->tickbox} as a function that will transform a
@@ -26691,7 +26758,6 @@ function M.writer.new(options)
end
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->strong} as a function that will transform a strongly
@@ -26704,7 +26770,6 @@ function M.writer.new(options)
return {"\\markdownRendererStrongEmphasis{",s,"}"}
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->blockquote} as a function that will transform an
@@ -26718,7 +26783,6 @@ function M.writer.new(options)
"\\markdownRendererBlockQuoteEnd "}
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->verbatim} as a function that will transform an
@@ -26733,7 +26797,6 @@ function M.writer.new(options)
return {"\\markdownRendererInputVerbatim{",name,"}"}
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->document} as a function that will transform a
@@ -26768,7 +26831,6 @@ function M.writer.new(options)
return buf
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->attributes} as a function that will transform
@@ -26878,7 +26940,6 @@ function M.writer.new(options)
return buf
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->active\_attributes} as a stack of block-level
@@ -26889,7 +26950,6 @@ function M.writer.new(options)
% \begin{macrocode}
self.active_attributes = {}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->attribute\_type\_levels} as a hash table that
@@ -26902,7 +26962,6 @@ function M.writer.new(options)
setmetatable(self.attribute_type_levels,
{ __index = function() return 0 end })
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->push\_attributes} and
@@ -27160,7 +27219,6 @@ function M.writer.new(options)
return identifier
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->heading} as a function that will transform an
@@ -27248,7 +27306,6 @@ function M.writer.new(options)
return buf
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->get_state} as a function that returns the current
@@ -27265,7 +27322,6 @@ function M.writer.new(options)
}
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->set_state} as a function that restores the input
@@ -27281,7 +27337,6 @@ function M.writer.new(options)
return previous_state
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->defer_call} as a function that will encapsulate the
@@ -27303,7 +27358,6 @@ function M.writer.new(options)
return self
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
%### Parsers
@@ -27314,7 +27368,6 @@ end
% \begin{macrocode}
local parsers = {}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Basic Parsers
@@ -27376,7 +27429,6 @@ parsers.internal_punctuation = S(":;,.?")
parsers.ascii_punctuation = S("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~")
% \end{macrocode}
-% \par
% \iffalse
%</lua>
%<*lua-unicode-data-generator>
@@ -27405,7 +27457,6 @@ parsers.ascii_punctuation = S("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~")
local file = assert(io.open(pathname, "r"),
[[Could not open file "UnicodeData.txt"]])
% \end{macrocode}
-% \par
% \begin{markdown}
%
% In order to minimize the size and speed of the parser, we will first
@@ -27439,7 +27490,6 @@ parsers.ascii_punctuation = S("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~")
assert(file:close())
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Next, we will construct a parser out of the prefix tree.
@@ -27505,7 +27555,6 @@ parsers.ascii_punctuation = S("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~")
end)()
print("return M")
% \end{macrocode}
-% \par
% \iffalse
%</lua-unicode-data-generator>
%<*lua>
@@ -27562,7 +27611,6 @@ parsers.spnl = parsers.optionalspace
parsers.line = parsers.linechar^0 * parsers.newline
parsers.nonemptyline = parsers.line - parsers.blankline
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Parsers Used for Indentation
@@ -28542,7 +28590,6 @@ parsers.indented_blocks = function(bl)
* (parsers.blankline^1 + parsers.eof) )
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Parsers Used for HTML Entities
@@ -28567,7 +28614,6 @@ parsers.html_entities
+ parsers.decentity / entities.dec_entity
+ parsers.tagentity / entities.char_entity
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Parsers Used for Markdown Lists
@@ -28597,7 +28643,6 @@ parsers.halfticked_box = tickbox(S("./")) * Cc(0.5)
parsers.unticked_box = tickbox(parsers.spacechar^1) * Cc(0.0)
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Parsers Used for Markdown Code Spans
@@ -28631,7 +28676,6 @@ parsers.inticks = parsers.openticks
* parsers.closeticks
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Parsers Used for HTML
@@ -29050,7 +29094,6 @@ parsers.html_inline_tags = parsers.html_inline_comment_full
+ parsers.html_any_close_tag
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Parsers Used for Markdown Tags and Links
@@ -29239,7 +29282,6 @@ parsers.optionaltitle
= parsers.spnlc * parsers.title * parsers.spacechar^0 + Cc("")
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Helpers for Links and Link Reference Definitions
@@ -29254,7 +29296,6 @@ parsers.define_reference_parser = (parsers.check_trail / "")
* parsers.only_blank
+ Cc("") * parsers.only_blank)
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Inline Elements
@@ -29273,7 +29314,6 @@ parsers.between = function(p, starter, ender)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Block Elements
@@ -29290,7 +29330,6 @@ parsers.thematic_break_lines = parsers.lineof(parsers.asterisk)
+ parsers.lineof(parsers.dash)
+ parsers.lineof(parsers.underscore)
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Headings
@@ -29321,7 +29360,6 @@ parsers.atx_heading = parsers.check_trail_no_rem
+ parsers.spacechar^1
* C(parsers.line))
% \end{macrocode}
-% \par
% \begin{markdown}
%
%### Markdown Reader {#markdown-reader}
@@ -29347,7 +29385,6 @@ M.reader = {}
function M.reader.new(writer, options)
local self = {}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Make the `writer` and `options` parameters available as
@@ -29359,7 +29396,6 @@ function M.reader.new(writer, options)
self.writer = writer
self.options = options
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Create a \luamdef{reader->parsers} hash table that stores \acro{peg} patterns
@@ -29387,7 +29423,6 @@ function M.reader.new(writer, options)
% \begin{macrocode}
local parsers = self.parsers
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Top-Level Helper Functions
@@ -29405,7 +29440,6 @@ function M.reader.new(writer, options)
return tag
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{iterlines} as a function that iterates over the lines of
@@ -29419,7 +29453,6 @@ function M.reader.new(writer, options)
return util.rope_to_string(rope)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{expandtabs} either as an identity function, when the
@@ -29440,7 +29473,6 @@ function M.reader.new(writer, options)
end
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### High-Level Parser Functions
@@ -29458,7 +29490,6 @@ function M.reader.new(writer, options)
self.create_parser = function(name, grammar, toplevel)
self.parser_functions[name] = function(str)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% If the parser function is top-level and the \Opt{stripIndent} Lua option is
@@ -29489,7 +29520,6 @@ function M.reader.new(writer, options)
str = str:gsub('^' .. min_prefix, '')
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% If the parser is top-level and the \Opt{texComments} or \Opt{hybrid} Lua
@@ -29549,7 +29579,6 @@ function M.reader.new(writer, options)
return parsers.inlines_no_link_or_emphasis
end, false)
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Parsers Used for Indentation (local)
@@ -29693,7 +29722,6 @@ function M.reader.new(writer, options)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Parsers Used for Markdown Lists (local)
@@ -29730,7 +29758,6 @@ function M.reader.new(writer, options)
+ parsers.enumerator(parsers.rparent)
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Parsers Used for Blockquotes (local)
@@ -29754,7 +29781,6 @@ function M.reader.new(writer, options)
* remove_indent("bq")
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Helpers for Emphasis and Strong Emphasis (local)
@@ -30140,7 +30166,6 @@ function M.reader.new(writer, options)
+ parsers.emph_capturing_close
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Helpers for Links and Link Reference Definitions (local)
@@ -30154,7 +30179,6 @@ function M.reader.new(writer, options)
parsers.rawnotes = {}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{reader->register_link} method registers
@@ -30178,7 +30202,6 @@ function M.reader.new(writer, options)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{reader->lookup_reference} method looks up a
@@ -30191,7 +30214,6 @@ function M.reader.new(writer, options)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{reader->lookup_note_reference} method looks up a
@@ -30834,7 +30856,6 @@ function M.reader.new(writer, options)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Inline Elements (local)
@@ -30978,7 +30999,6 @@ function M.reader.new(writer, options)
/ writer.nbsp
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{reader->auto_link_url} method produces an
@@ -30993,7 +31013,6 @@ function self.auto_link_url(url, attributes)
url, nil, attributes)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{reader->auto_link_email} method produces an
@@ -31037,7 +31056,6 @@ end
parsers.HtmlEntity = parsers.html_entities / writer.string
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Block Elements (local)
@@ -31085,7 +31103,6 @@ end
parsers.Plain = parsers.nonindentspace * Ct(parsers.Inline^1)
/ writer.plain
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Lists (local)
@@ -31250,7 +31267,6 @@ end
parsers.OrderedList = parsers.OrderedListOfType(parsers.period)
+ parsers.OrderedListOfType(parsers.rparent)
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Blank (local)
@@ -31260,7 +31276,6 @@ end
parsers.Blank = parsers.blankline / ""
+ V("Reference")
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Headings (local)
@@ -31316,7 +31331,6 @@ end
parsers.Heading = parsers.AtxHeading + parsers.SetextHeading
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Syntax Specification
@@ -31349,7 +31363,6 @@ end
return local_walkable_syntax
end)(walkable_syntax)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamref{reader->insert_pattern} method adds a pattern to
@@ -31406,7 +31419,6 @@ end
end
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Create a local \luamdef{syntax} hash table that stores those rules of the
@@ -31422,7 +31434,6 @@ end
* V("ExpectedJekyllData")
* V("Blank")^0
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Only create interblock separators between pairs of blocks that are not
@@ -31500,7 +31511,6 @@ end
InitializeState = parsers.succeed,
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamref{reader->update_rule} as a function that receives two
@@ -31532,7 +31542,6 @@ end
end
local pattern
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Instead of a function, a \acro{peg} pattern `pattern` may also be
@@ -31561,7 +31570,6 @@ end
walkable_syntax[rule_name] = { accountable_pattern }
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define a hash table of all characters with special meaning and add method
@@ -31583,7 +31591,6 @@ end
self.add_special_character("!")
self.add_special_character("\\")
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Add method \luamdef{reader->initialize_named_group} that defines named groups
@@ -31600,7 +31607,6 @@ end
* Cg(pattern, name)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Add a named group for indentation.
@@ -31609,7 +31615,6 @@ end
% \begin{macrocode}
self.initialize_named_group("indent_info")
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Apply syntax extensions.
@@ -31623,7 +31628,6 @@ end
end
current_extension_name = nil
% \end{macrocode}
-% \par
% \begin{markdown}
%
% If the \Opt{debugExtensions} option is enabled, serialize
@@ -31683,7 +31687,6 @@ end
assert(output_file:close())
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Materialize \luamref{walkable_syntax} and merge it into \luamref{syntax} to
@@ -31720,7 +31723,6 @@ end
end
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Finalize the parser by reacting to options and by producing special parsers
@@ -31806,7 +31808,6 @@ end
parsers.inlines_no_link_or_emphasis
= Ct(inlines_no_link_or_emphasis_t)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Return a function that converts markdown string `input` into a plain \TeX{}
@@ -31940,7 +31941,6 @@ M.extensions.bracketed_spans = function()
name = "built-in bracketed_spans syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->span} as a function that will transform an input
@@ -32002,7 +32002,6 @@ M.extensions.citations = function(citation_nbsps)
name = "built-in citations syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->citations} as a function that will transform an
@@ -32212,7 +32211,6 @@ end
% \begin{macrocode}
M.extensions.content_blocks = function(language_map)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \luamdef{languages_json} table maps programming language filename
@@ -32250,7 +32248,6 @@ M.extensions.content_blocks = function(language_map)
name = "built-in content_blocks syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->contentblock} as a function that will transform an
@@ -32380,7 +32377,6 @@ M.extensions.definition_lists = function(tight_lists)
name = "built-in definition_lists syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->definitionlist} as a function that will transform an
@@ -32499,7 +32495,6 @@ M.extensions.fancy_lists = function()
local options = self.options
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->fancylist} as a function that will transform an
@@ -32800,7 +32795,6 @@ M.extensions.fenced_code = function(blank_before_code_fence,
local options = self.options
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->fencedCode} as a function that will transform an
@@ -32830,7 +32824,6 @@ M.extensions.fenced_code = function(blank_before_code_fence,
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->rawBlock} as a function that will transform an
@@ -33051,7 +33044,6 @@ M.extensions.fenced_divs = function(blank_before_div_fence)
name = "built-in fenced_divs syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->div_begin} as a function that will transform the
@@ -33070,7 +33062,6 @@ M.extensions.fenced_divs = function(blank_before_div_fence)
"div", attributes, start_output, end_output)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->div_end} as a function that will produce the end of a
@@ -33085,7 +33076,6 @@ M.extensions.fenced_divs = function(blank_before_div_fence)
local parsers = self.parsers
local writer = self.writer
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define basic patterns for matching the opening and the closing tag of a div.
@@ -33111,7 +33101,6 @@ M.extensions.fenced_divs = function(blank_before_div_fence)
* parsers.optionalspace
* (parsers.newline + parsers.eof)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Initialize a named group named `fenced_div_level` for tracking how deep
@@ -33224,7 +33213,6 @@ M.extensions.fenced_divs = function(blank_before_div_fence)
self.add_special_character(":")
% \end{macrocode}
-% \par
% \begin{markdown}
%
% If the `blank_before_div_fence` parameter is `false`, we will have the
@@ -33400,7 +33388,6 @@ M.extensions.line_blocks = function()
name = "built-in line_blocks syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->lineblock} as a function that will transform
@@ -33458,7 +33445,6 @@ M.extensions.mark = function()
name = "built-in mark syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->mark} as a function that will transform an input
@@ -33605,7 +33591,6 @@ M.extensions.notes = function(notes, inline_notes)
name = "built-in notes syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->note} as a function that will transform an
@@ -33774,7 +33759,6 @@ M.extensions.pipe_tables = function(table_captions, table_attributes)
name = "built-in pipe_tables syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->table} as a function that will transform an input
@@ -33936,7 +33920,6 @@ M.extensions.raw_inline = function()
local options = self.options
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->rawInline} as a function that will transform an
@@ -33978,7 +33961,6 @@ M.extensions.strike_through = function()
name = "built-in strike_through syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->strike_through} as a function that will transform
@@ -34021,7 +34003,6 @@ M.extensions.subscripts = function()
name = "built-in subscripts syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->subscript} as a function that will transform
@@ -34063,7 +34044,6 @@ M.extensions.superscripts = function()
name = "built-in superscripts syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->superscript} as a function that will transform
@@ -34108,7 +34088,6 @@ M.extensions.tex_math = function(tex_math_dollars,
name = "built-in tex_math syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->display_math} as a function that will transform
@@ -34331,7 +34310,6 @@ M.extensions.jekyll_data = function(expect_jekyll_data,
name = "built-in jekyll_data syntax extension",
extend_writer = function(self)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Define \luamdef{writer->jekyllData} as a function that will transform an
@@ -34470,8 +34448,7 @@ M.extensions.jekyll_data = function(expect_jekyll_data,
, function(s, i, text) -- luacheck: ignore s i
local data
local ran_ok, _ = pcall(function()
- -- TODO: Use `require("tinyyaml")` in TeX Live 2023
- local tinyyaml = require("markdown-tinyyaml")
+ local tinyyaml = require("tinyyaml")
data = tinyyaml.parse(text, {timestamps=false})
end)
if ran_ok and data ~= nil then
@@ -34537,7 +34514,6 @@ end
% \begin{macrocode}
function M.new(options)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Make the `options` table inherit from the \luamref{defaultOptions} table.
@@ -34548,7 +34524,6 @@ function M.new(options)
setmetatable(options, { __index = function (_, key)
return defaultOptions[key] end })
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Return a conversion function that tries to produce a cached conversion output
@@ -34562,7 +34537,6 @@ function M.new(options)
local function convert(input)
if parser_convert == nil then
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Lazy-load `markdown-parser.lua` and check that it originates from the same
@@ -34634,7 +34608,6 @@ end
%</lua-loader>
%<*lua>
% \fi
-% \par
% \begin{markdown}
%
% The \luamref{new} function from file `markdown-parser.lua` returns a
@@ -34645,7 +34618,6 @@ end
% \begin{macrocode}
function M.new(options)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Make the `options` table inherit from the \luamref{defaultOptions} table.
@@ -34656,7 +34628,6 @@ function M.new(options)
setmetatable(options, { __index = function (_, key)
return defaultOptions[key] end })
% \end{macrocode}
-% \par
% \begin{markdown}
%
% If the singleton cache contains a conversion function for the same `options`,
@@ -34688,7 +34659,6 @@ function M.new(options)
end
::miss::
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Apply built-in syntax extensions based on `options`.
@@ -34814,7 +34784,6 @@ function M.new(options)
table.insert(extensions, fancy_lists_extension)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Apply user-defined syntax extensions based on `options.extensions`.
@@ -34914,7 +34883,6 @@ function M.new(options)
table.insert(extensions, user_extension)
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Produce a conversion function from markdown to plain \TeX.
@@ -34925,7 +34893,6 @@ function M.new(options)
local reader = M.reader.new(writer, options)
local convert = reader.finalize_grammar(extensions)
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Force garbage collection to reclaim memory for temporary
@@ -34936,7 +34903,6 @@ function M.new(options)
% \begin{macrocode}
collectgarbage("collect")
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Update the singleton cache.
@@ -34955,7 +34921,6 @@ function M.new(options)
singletonCache.convert = convert
end
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Return the conversion function from markdown to plain \TeX.
@@ -34976,7 +34941,6 @@ return M
%</lua,lua-loader>
%<*lua-cli>
% \fi
-% \par
% \begin{markdown}
%
%### Command-Line Implementation {#lua-cli-implementation}
@@ -35059,7 +35023,6 @@ end
%</lua-cli>
%<*tex>
% \fi
-% \par
% \begin{markdown}
%
% Plain \TeX{} Implementation {#teximplementation}
@@ -35132,7 +35095,6 @@ end
{ nnee }
\ExplSyntaxOff
% \end{macrocode}
-% \par
% \begin{markdown}
%
%### Themes {#themes-implementation}
@@ -35180,11 +35142,6 @@ end
}
}
{
- \msg_info:nnnn
- { markdown }
- { loading-plain-tex-theme }
- { #1 }
- { #2 }
\prop_gput:Nnx
\g_@@_plain_tex_loaded_themes_linenos_prop
{ #1 }
@@ -35193,8 +35150,36 @@ end
\g_@@_plain_tex_loaded_themes_versions_prop
{ #1 }
{ #2 }
- \file_input:n
- { markdown theme #3 }
+% \end{macrocode}
+% \begin{markdown}
+%
+% Load built-in plain \TeX{} themes from the prop
+% \mref{g_@@_plain_tex_built_in_themes_prop} and from the filesystem otherwise.
+%
+% \end{markdown}
+% \begin{macrocode}
+ \prop_if_in:NnTF
+ \g_@@_plain_tex_built_in_themes_prop
+ { #1 }
+ {
+ \msg_info:nnnn
+ { markdown }
+ { loading-built-in-plain-tex-theme }
+ { #1 }
+ { #2 }
+ \prop_item:Nn
+ \g_@@_plain_tex_built_in_themes_prop
+ { #1 }
+ }
+ {
+ \msg_info:nnnn
+ { markdown }
+ { loading-plain-tex-theme }
+ { #1 }
+ { #2 }
+ \file_input:n
+ { markdown theme #3 }
+ }
}
}
\msg_new:nnn
@@ -35203,6 +35188,10 @@ end
{ Loading~version~#2~of~plain~TeX~Markdown~theme~#1 }
\msg_new:nnn
{ markdown }
+ { loading-built-in-plain-tex-theme }
+ { Loading~version~#2~of~built-in~plain~TeX~Markdown~theme~#1 }
+\msg_new:nnn
+ { markdown }
{ repeatedly-loaded-plain-tex-theme }
{
Version~#3~of~plain~TeX~Markdown~theme~#1~was~previously~
@@ -35295,13 +35284,277 @@ end
\cs_generate_variant:Nn
\@@_plain_tex_load_theme:nnn
{ VeV }
-\ExplSyntaxOff
% \end{macrocode}
-% \iffalse
-%</tex>
-%<*themes-witiko-tilde>
-% \fi
-% \par
+% \begin{markdown}
+%
+% The `witiko/dot` theme enables the \Opt{fencedCode} Lua option:
+%
+% \end{markdown}
+% \begin{macrocode}
+\prop_gput:Nnn
+ \g_@@_plain_tex_built_in_themes_prop
+ { witiko / dot }
+ {
+ \markdownSetup{fencedCode}
+% \end{macrocode}
+% \begin{markdown}
+%
+% We store the previous definition of the fenced code token renderer prototype:
+%
+% \end{markdown}
+% \begin{macrocode}
+ \cs_set_eq:NN
+ \@@_dot_previous_definition:nnn
+ \markdownRendererInputFencedCodePrototype
+% \end{macrocode}
+% \begin{markdown}
+%
+% If the infostring starts with `dot …`, we redefine the fenced code block
+% token renderer prototype, so that it typesets the code block via Graphviz
+% tools if and only if the \Opt{frozenCache} plain \TeX{} option is
+% disabled and the code block has not been previously typeset:
+%
+% \end{markdown}
+% \begin{macrocode}
+ \regex_const:Nn
+ \c_@@_dot_infostring_regex
+ { ^dot(\s+(.+))? }
+ \seq_new:N
+ \l_@@_dot_matches_seq
+ \markdownSetup {
+ rendererPrototypes = {
+ inputFencedCode = {
+ \regex_extract_once:NnNTF
+ \c_@@_dot_infostring_regex
+ { #2 }
+ \l_@@_dot_matches_seq
+ {
+ \@@_if_option:nF
+ { frozenCache }
+ {
+ \sys_shell_now:n
+ {
+ if~!~test~-e~#1.pdf.source~
+ ||~!~diff~#1~#1.pdf.source;
+ then~
+ dot~-Tpdf~-o~#1.pdf~#1;
+ cp~#1~#1.pdf.source;
+ fi
+ }
+ }
+% \end{macrocode}
+% \begin{markdown}
+%
+% We include the typeset image using the image token renderer:
+%
+% \end{markdown}
+% \begin{macrocode}
+ \exp_args:NNne
+ \exp_last_unbraced:No
+ \markdownRendererImage
+ {
+ { Graphviz~image }
+ { #1.pdf }
+ { #1.pdf }
+ }
+ {
+ \seq_item:Nn
+ \l_@@_dot_matches_seq
+ { 3 }
+ }
+ }
+% \end{macrocode}
+% \begin{markdown}
+%
+% If the infostring does not start with `dot …`, we use the previous definition
+% of the fenced code token renderer prototype:
+%
+% \end{markdown}
+% \begin{macrocode}
+ {
+ \@@_dot_previous_definition:nnn
+ { #1 }
+ { #2 }
+ { #3 }
+ }
+ },
+ },
+ }
+ }
+% \end{macrocode}
+% \begin{markdown}
+%
+% We locally change the category code of percent signs, so that we
+% can use them in the shell code:
+%
+% \end{markdown}
+% \begin{macrocode}
+\group_begin:
+\char_set_catcode_other:N \%
+% \end{macrocode}
+% \begin{markdown}
+%
+% The `witiko/graphicx/http` theme stores the previous definition of the image
+% token renderer prototype:
+%
+% \end{markdown}
+% \begin{macrocode}
+\prop_gput:Nnn
+ \g_@@_plain_tex_built_in_themes_prop
+ { witiko / graphicx / http }
+ {
+ \cs_set_eq:NN
+ \@@_graphicx_http_previous_definition:nnnn
+ \markdownRendererImagePrototype
+% \end{macrocode}
+% \begin{markdown}
+%
+% We define variables and functions to enumerate the images for caching and to
+% store the pathname of the file containing the pathname of the downloaded
+% image file.
+%
+% \end{markdown}
+% \begin{macrocode}
+ \int_new:N
+ \g_@@_graphicx_http_image_number_int
+ \int_gset:Nn
+ \g_@@_graphicx_http_image_number_int
+ { 0 }
+ \cs_new:Nn
+ \@@_graphicx_http_filename:
+ {
+ \markdownOptionCacheDir
+ / witiko_graphicx_http .
+ \int_use:N
+ \g_@@_graphicx_http_image_number_int
+ }
+% \end{macrocode}
+% \begin{markdown}
+%
+% We define a function that will receive two arguments that correspond to the
+% URL of the online image and to the pathname, where the online image should
+% be downloaded. The function produces a shell command that tries to
+% downloads the online image to the pathname.
+%
+% \end{markdown}
+% \begin{macrocode}
+ \cs_new:Nn
+ \@@_graphicx_http_download:nn
+ {
+ wget~-O~#2~#1~
+ ||~curl~--location~-o~#2~#1~
+ ||~rm~-f~#2
+ }
+% \end{macrocode}
+% \begin{markdown}
+%
+% We redefine the image token renderer prototype, so that it tries to download
+% an online image.
+%
+% \end{markdown}
+% \begin{macrocode}
+ \str_new:N
+ \l_@@_graphicx_http_filename_str
+ \ior_new:N
+ \g_@@_graphicx_http_filename_ior
+ \markdownSetup {
+ rendererPrototypes = {
+ image = {
+ \@@_if_option:nF
+ { frozenCache }
+ {
+% \end{macrocode}
+% \begin{markdown}
+%
+% The image will be downloaded only if the image URL has the http or https
+% protocols and the \Opt{frozenCache} plain \TeX{} option is disabled:
+%
+% \end{markdown}
+% \begin{macrocode}
+ \sys_shell_now:e
+ {
+ mkdir~-p~" \markdownOptionCacheDir ";
+ if~printf~'%s'~"#3"~|~grep~-q~-E~'^https?:';
+ then~
+% \end{macrocode}
+% \begin{markdown}
+%
+% The image will be downloaded to the pathname \Opt{cacheDir}<!--
+% -->`/`\meta{the MD5 digest of the image URL}`.`\meta{the suffix of the
+% image URL}:
+%
+% \end{markdown}
+% \begin{macrocode}
+ OUTPUT_PREFIX=" \markdownOptionCacheDir ";
+ OUTPUT_BODY="$(printf~'%s'~'#3'
+ |~md5sum~|~cut~-d'~'~-f1)";
+ OUTPUT_SUFFIX="$(printf~'%s'~'#3'
+ |~sed~'s/.*[.]//')";
+ OUTPUT="$OUTPUT_PREFIX/$OUTPUT_BODY.$OUTPUT_SUFFIX";
+% \end{macrocode}
+% \begin{markdown}
+%
+% The image will be downloaded only if it has not already been downloaded:
+%
+% \end{markdown}
+% \begin{macrocode}
+ if~!~[~-e~"$OUTPUT"~];
+ then~
+ \@@_graphicx_http_download:nn
+ { '#3' }
+ { "$OUTPUT" } ;
+ printf~'%s'~"$OUTPUT"~
+ >~" \@@_graphicx_http_filename: ";
+ fi;
+% \end{macrocode}
+% \begin{markdown}
+%
+% If the image does not have the http or https protocols or the image has
+% already been downloaded, the URL will be stored as-is:
+%
+% \end{markdown}
+% \begin{macrocode}
+ else~
+ printf~'%s'~'#3'~
+ >~" \@@_graphicx_http_filename: ";
+ fi
+ }
+ }
+% \end{macrocode}
+% \begin{markdown}
+%
+% We load the pathname of the downloaded image and we typeset the image using
+% the previous definition of the image renderer prototype:
+%
+% \end{markdown}
+% \begin{macrocode}
+ \ior_open:Ne
+ \g_@@_graphicx_http_filename_ior
+ { \@@_graphicx_http_filename: }
+ \ior_str_get:NN
+ \g_@@_graphicx_http_filename_ior
+ \l_@@_graphicx_http_filename_str
+ \ior_close:N
+ \g_@@_graphicx_http_filename_ior
+ \@@_graphicx_http_previous_definition:nnVn
+ { #1 }
+ { #2 }
+ \l_@@_graphicx_http_filename_str
+ { #4 }
+ \int_gincr:N
+ \g_@@_graphicx_http_image_number_int
+ }
+ }
+ }
+ \cs_generate_variant:Nn
+ \ior_open:Nn
+ { Ne }
+ \cs_generate_variant:Nn
+ \@@_graphicx_http_previous_definition:nnnn
+ { nnVn }
+ }
+\group_end:
+% \end{macrocode}
% \begin{markdown}
%
% The `witiko/tilde` theme redefines the tilde token renderer prototype,
@@ -35309,14 +35562,20 @@ end
%
% \end{markdown}
% \begin{macrocode}
-\markdownSetup {
- rendererPrototypes = {
- tilde = {~},
- },
-}
+\prop_gput:Nnn
+ \g_@@_plain_tex_built_in_themes_prop
+ { witiko / tilde }
+ {
+ \markdownSetup {
+ rendererPrototypes = {
+ tilde = {~},
+ },
+ }
+ }
+\ExplSyntaxOff
% \end{macrocode}
% \iffalse
-%</themes-witiko-tilde>
+%</tex>
%<*themes-witiko-markdown-defaults-tex>
% \fi
% \begin{markdown}
@@ -35478,7 +35737,6 @@ end
\def\markdownRendererErrorPrototype#1#2#3#4{%
\markdownError{#2}{#4}}%
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Raw Attributes
@@ -35526,7 +35784,6 @@ end
}
\ExplSyntaxOff
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### YAML Metadata Renderer Prototypes
@@ -35559,7 +35816,6 @@ end
\tl_const:Nn \c_@@_jekyll_data_mapping_tl { mapping }
\tl_const:Nn \c_@@_jekyll_data_scalar_tl { scalar }
% \end{macrocode}
-% \par
% \begin{markdown}
%
% To keep track of our current place when we are traversing a \acro{yaml}
@@ -35605,7 +35861,6 @@ end
}
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Out of \mref{g_\@\@_jekyll_data_wildcard_absolute_address_seq}, we will
@@ -35660,7 +35915,6 @@ end
\g_@@_jekyll_data_wildcard_relative_address_tl
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% To make sure that the stacks and token lists stay in sync, we will use the
@@ -35689,7 +35943,6 @@ end
\markdown_jekyll_data_update_address_tls:
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% To set a single key--value, we will use the
@@ -35722,7 +35975,6 @@ end
\markdown_jekyll_data_pop:
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Finally, we will register our macros as token renderer prototypes
@@ -35758,7 +36010,6 @@ end
{ #2 }
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% We will process all string scalar values assuming that they may contain
@@ -35971,7 +36222,6 @@ end
{ " \markdownInputFilename " }
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \mdef{markdownPrepare} macro contains the Lua code that is executed prior
@@ -36004,7 +36254,6 @@ end
local~convert = md.new(options)
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \mdef{markdownConvert} macro contains the Lua code that is executed
@@ -36025,7 +36274,6 @@ end
}
\ExplSyntaxOff
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \mdef{markdownCleanup} macro contains the Lua code that is executed
@@ -36044,7 +36292,6 @@ end
end
}%
% \end{macrocode}
-% \par
% \begin{markdown}
%
%### Buffering Block-Level Markdown Input {#buffering-block}
@@ -36058,7 +36305,6 @@ end
\csname newread\endcsname\markdownInputFileStream
\csname newwrite\endcsname\markdownOutputFileStream
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \mdef{markdownReadAndConvertTab} macro contains the tab character literal.
@@ -36070,7 +36316,6 @@ end
\gdef\markdownReadAndConvertTab{^^I}%
\endgroup
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \mref{markdownReadAndConvert} macro is largely a rewrite of the
@@ -36228,7 +36473,6 @@ end
% \begin{macrocode}
|endgroup
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Use the \pkg{lt3luabridge} library to define the \mdef{markdownLuaExecute}
@@ -36545,7 +36789,6 @@ end
}%
|endgroup
% \end{macrocode}
-% \par
% \begin{markdown}
% The \mref{markdownEscape} macro resets the category codes of the percent sign
% and the hash sign back to comment and parameter, respectively, before using
@@ -36565,7 +36808,6 @@ end
%</tex>
%<*latex>
% \fi
-% \par
% \begin{markdown}
%
% \LaTeX{} Implementation {#lateximplementation}
@@ -36582,7 +36824,6 @@ end
\ProvidesPackage{markdown}[\markdownLastModified\markdownVersionSpace v%
\markdownVersion\markdownVersionSpace markdown renderer]%
% \end{macrocode}
-% \par
% \begin{markdown}
%
%### Typesetting Markdown
@@ -36604,7 +36845,6 @@ end
{ ( \[ (.*?) \] ) ? }
{
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Apply the options locally.
@@ -36622,7 +36862,6 @@ end
}
\ExplSyntaxOff
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \mdef{markdownInputPlainTeX} macro is used to store the original plain
@@ -36645,7 +36884,6 @@ end
\markdownInputPlainTeX{#2}%
\endgroup}%
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \envmref{markdown}, \envmref{markdown*}, and \envmref{yaml} \LaTeX{}
@@ -36824,7 +37062,6 @@ end
<|end<#1>>>%
|endgroup
% \end{macrocode}
-% \par
% \begin{markdown}
%
%### Themes {#latex-themes-implementation}
@@ -36842,12 +37079,13 @@ end
\@@_load_theme:nnn
{
% \end{macrocode}
-% \par
% \begin{markdown}
%
-% If the Markdown package has already been loaded, determine whether
-% a file named `markdowntheme`\meta{munged theme name}`.sty` exists
-% and whether we are still in the preamble.
+% If the Markdown package has not yet been loaded, determine whether
+% either this is a built-in theme according to the prop
+% \mref{g_@@_latex_built_in_themes_prop} or a file named
+% `markdowntheme`\meta{munged theme name}`.sty` exists and whether we are still
+% in the preamble.
%
% \end{markdown}
% \begin{macrocode}
@@ -36856,20 +37094,37 @@ end
% \end{macrocode}
% \begin{markdown}
%
-% If both conditions are true does, end with an error, since we cannot load
-% \LaTeX{} themes after the preamble. Otherwise, try loading a plain \TeX{}
-% theme instead.
+% If both conditions are true, end with an error, since we cannot load
+% \LaTeX{} themes after the preamble.
%
% \end{markdown}
% \begin{macrocode}
- \file_if_exist:nTF
- { markdown theme #3.sty }
+ \bool_if:nTF
+ {
+ \bool_lazy_or_p:nn
+ {
+ \prop_if_in_p:Nn
+ \g_@@_latex_built_in_themes_prop
+ { #1 }
+ }
+ {
+ \file_if_exist_p:n
+ { markdown theme #3.sty }
+ }
+ }
{
\msg_error:nnn
{ markdown }
{ latex-theme-after-preamble }
{ #1 }
}
+% \end{macrocode}
+% \begin{markdown}
+%
+% Otherwise, try loading a plain \TeX{} theme instead.
+%
+% \end{markdown}
+% \begin{macrocode}
{
\@@_plain_tex_load_theme:nnn
{ #1 }
@@ -36886,8 +37141,19 @@ end
%
% \end{markdown}
% \begin{macrocode}
- \file_if_exist:nTF
- { markdown theme #3.sty }
+ \bool_if:nTF
+ {
+ \bool_lazy_or_p:nn
+ {
+ \prop_if_in_p:Nn
+ \g_@@_latex_built_in_themes_prop
+ { #1 }
+ }
+ {
+ \file_if_exist_p:n
+ { markdown theme #3.sty }
+ }
+ }
{
\prop_get:NnNTF
\g_@@_latex_loaded_themes_linenos_prop
@@ -36920,11 +37186,6 @@ end
}
}
{
- \msg_info:nnnn
- { markdown }
- { loading-latex-theme }
- { #1 }
- { #2 }
\prop_gput:Nnx
\g_@@_latex_loaded_themes_linenos_prop
{ #1 }
@@ -36933,8 +37194,36 @@ end
\g_@@_latex_loaded_themes_versions_prop
{ #1 }
{ #2 }
- \RequirePackage
- { markdown theme #3 }
+% \end{macrocode}
+% \begin{markdown}
+%
+% Load built-in plain \TeX{} themes from the prop
+% \mref{g_@@_latex_built_in_themes_prop} and from the filesystem otherwise.
+%
+% \end{markdown}
+% \begin{macrocode}
+ \prop_if_in:NnTF
+ \g_@@_latex_built_in_themes_prop
+ { #1 }
+ {
+ \msg_info:nnnn
+ { markdown }
+ { loading-built-in-latex-theme }
+ { #1 }
+ { #2 }
+ \prop_item:Nn
+ \g_@@_latex_built_in_themes_prop
+ { #1 }
+ }
+ {
+ \msg_info:nnnn
+ { markdown }
+ { loading-latex-theme }
+ { #1 }
+ { #2 }
+ \RequirePackage
+ { markdown theme #3 }
+ }
}
}
{
@@ -36974,6 +37263,10 @@ end
}
\msg_new:nnn
{ markdown }
+ { loading-built-in-latex-theme }
+ { Loading~version~#2~of~built-in~LaTeX~Markdown~theme~#1 }
+\msg_new:nnn
+ { markdown }
{ loading-latex-theme }
{ Loading~version~#2~of~LaTeX~Markdown~theme~#1 }
\msg_new:nnn
@@ -37016,233 +37309,45 @@ end
{ latex-theme-after-preamble }
\l_tmpa_tl
\l_tmpb_tl
-\ExplSyntaxOff
-% \end{macrocode}
-% \begin{markdown}
-%
-% The `witiko/dot` theme enables the \Opt{fencedCode} Lua option:
-%
-% \end{markdown}
-% \iffalse
-%</latex>
-%<*themes-witiko-dot>
-% \fi
-% \begin{macrocode}
-\markdownSetup{fencedCode}%
-% \end{macrocode}
-% \begin{markdown}
-%
-% We load the \pkg{ifthen} and \pkg{grffile} packages, see also
-% Section <#sec:latex-prerequisites>:
-%
-% \end{markdown}
-% \begin{macrocode}
-\RequirePackage{ifthen,grffile}
-% \end{macrocode}
-% \begin{markdown}
-%
-% We store the previous definition of the fenced code token renderer prototype:
-%
-% \end{markdown}
-% \begin{macrocode}
-\let\markdown@witiko@dot@oldRendererInputFencedCodePrototype
- \markdownRendererInputFencedCodePrototype
-% \end{macrocode}
-% \begin{markdown}
-%
-% If the infostring starts with `dot …`, we redefine the fenced code block
-% token renderer prototype, so that it typesets the code block via Graphviz
-% tools if and only if the \Opt{frozenCache} plain \TeX{} option is
-% disabled and the code block has not been previously typeset:
-%
-% \end{markdown}
-% \begin{macrocode}
-\renewcommand\markdownRendererInputFencedCodePrototype[3]{%
- \def\next##1 ##2\relax{%
- \ifthenelse{\equal{##1}{dot}}{%
- \markdownIfOption{frozenCache}{}{%
- \immediate\write18{%
- if ! test -e #1.pdf.source || ! diff #1 #1.pdf.source;
- then
- dot -Tpdf -o #1.pdf #1;
- cp #1 #1.pdf.source;
- fi}}%
-% \end{macrocode}
-% \begin{markdown}
-%
-% We include the typeset image using the image token renderer:
-%
-% \end{markdown}
-% \begin{macrocode}
- \markdownRendererImage{Graphviz image}{#1.pdf}{#1.pdf}{##2}%
-% \end{macrocode}
-% \begin{markdown}
-%
-% If the infostring does not start with `dot …`, we use the previous definition
-% of the fenced code token renderer prototype:
-%
-% \end{markdown}
-% \begin{macrocode}
- }{%
- \markdown@witiko@dot@oldRendererInputFencedCodePrototype
- {#1}{#2}{#3}%
- }%
- }%
- \next#2 \relax}%
-% \end{macrocode}
-% \iffalse
-%</themes-witiko-dot>
-%<*themes-witiko-graphicx-http>
-% \fi
-% \par
-% \begin{markdown}
-%
-% The `witiko/graphicx/http` theme stores the previous definition of the image
-% token renderer prototype:
-%
-% \end{markdown}
-% \begin{macrocode}
-\let\markdown@witiko@graphicx@http@oldRendererImagePrototype
- \markdownRendererImagePrototype
-% \end{macrocode}
-% \begin{markdown}
-%
-% We load the \pkg{catchfile} and \pkg{grffile} packages, see also
-% Section <#sec:latex-prerequisites>:
-%
-% \end{markdown}
-% \begin{macrocode}
-\RequirePackage{catchfile,grffile}
-% \end{macrocode}
-% \begin{markdown}
-%
-% We define the \mdef{markdown@witiko@graphicx@http@counter} counter to enumerate
-% the images for caching and the \mdef{markdown@witiko@graphicx@http@filename}
-% command, which will store the pathname of the file containing the pathname
-% of the downloaded image file.
-%
-% \end{markdown}
-% \begin{macrocode}
-\newcount\markdown@witiko@graphicx@http@counter
-\markdown@witiko@graphicx@http@counter=0
-\newcommand\markdown@witiko@graphicx@http@filename{%
- \markdownOptionCacheDir/witiko_graphicx_http%
- .\the\markdown@witiko@graphicx@http@counter}%
-% \end{macrocode}
-% \begin{markdown}
-%
-% We define the \mdef{markdown@witiko@graphicx@http@download} command, which will
-% receive two arguments that correspond to the URL of the online image and to
-% the pathname, where the online image should be downloaded. The command will
-% produce a shell command that tries to downloads the online image to the
-% pathname.
-%
-% \end{markdown}
-% \begin{macrocode}
-\newcommand\markdown@witiko@graphicx@http@download[2]{%
- wget -O #2 #1 || curl --location -o #2 #1 || rm -f #2}
% \end{macrocode}
% \begin{markdown}
%
-% We locally swap the category code of the percentage sign with the line feed
-% control character, so that we can use percentage signs in the shell code:
+% The `witiko/dot` and `witiko/graphicx/http` \LaTeX{} themes load the package
+% \pkg{graphicx}, see also Section <#sec:latex-prerequisites>. Then, they
+% load the corresponding plain \TeX{} themes.
%
% \end{markdown}
% \begin{macrocode}
-\begingroup
-\catcode`\%=12
-\catcode`\^^A=14
-% \end{macrocode}
-% \begin{markdown}
-%
-% We redefine the image token renderer prototype, so that it tries to download
-% an online image.
-%
-% \end{markdown}
-% \begin{macrocode}
-\global\def\markdownRendererImagePrototype#1#2#3#4{^^A
- \begingroup
- \edef\filename{\markdown@witiko@graphicx@http@filename}^^A
-% \end{macrocode}
-% \begin{markdown}
-%
-% The image will be downloaded only if the image URL has the http or https
-% protocols and the \Opt{frozenCache} plain \TeX{} option is disabled:
-%
-% \end{markdown}
-% \begin{macrocode}
- \markdownIfOption{frozenCache}{}{^^A
- \immediate\write18{^^A
- mkdir -p "\markdownOptionCacheDir";
- if printf '%s' "#3" | grep -q -E '^https?:';
- then
-% \end{macrocode}
-% \begin{markdown}
-%
-% The image will be downloaded to the pathname \Opt{cacheDir}<!--
-% -->`/`\meta{the MD5 digest of the image URL}`.`\meta{the suffix of the
-% image URL}:
-%
-% \end{markdown}
-% \begin{macrocode}
- OUTPUT_PREFIX="\markdownOptionCacheDir";
- OUTPUT_BODY="$(printf '%s' '#3' | md5sum | cut -d' ' -f1)";
- OUTPUT_SUFFIX="$(printf '%s' '#3' | sed 's/.*[.]//')";
- OUTPUT="$OUTPUT_PREFIX/$OUTPUT_BODY.$OUTPUT_SUFFIX";
-% \end{macrocode}
-% \begin{markdown}
-%
-% The image will be downloaded only if it has not already been downloaded:
-%
-% \end{markdown}
-% \begin{macrocode}
- if ! [ -e "$OUTPUT" ];
- then
- \markdown@witiko@graphicx@http@download{'#3'}{"$OUTPUT"};
- printf '%s' "$OUTPUT" > "\filename";
- fi;
-% \end{macrocode}
-% \begin{markdown}
-%
-% If the image does not have the http or https protocols or the image has
-% already been downloaded, the URL will be stored as-is:
-%
-% \end{markdown}
-% \begin{macrocode}
- else
- printf '%s' '#3' > "\filename";
- fi}}^^A
-% \end{macrocode}
-% \begin{markdown}
-%
-% We load the pathname of the downloaded image and we typeset the image using
-% the previous definition of the image renderer prototype:
-%
-% \end{markdown}
-% \begin{macrocode}
- \CatchFileDef{\filename}{\filename}{\endlinechar=-1}^^A
- \markdown@witiko@graphicx@http@oldRendererImagePrototype^^A
- {#1}{#2}{\filename}{#4}^^A
- \endgroup
- \global\advance\markdown@witiko@graphicx@http@counter by 1\relax}^^A
-\endgroup
+\tl_set:Nn
+ \l_tmpa_tl
+ {
+ \RequirePackage
+ { graphicx }
+ \markdownLoadPlainTeXTheme
+ }
+\prop_gput:NnV
+ \g_@@_latex_built_in_themes_prop
+ { witiko / dot }
+ \l_tmpa_tl
+\prop_gput:NnV
+ \g_@@_latex_built_in_themes_prop
+ { witiko / graphicx / http }
+ \l_tmpa_tl
+\ExplSyntaxOff
% \end{macrocode}
% \iffalse
-%</themes-witiko-graphicx-http>
+%</latex>
%<*themes-witiko-markdown-defaults-latex>
% \fi
-% \par
% \begin{markdown}
%
-% The `witiko/markdown/defaults` \LaTeX{} theme provides default definitions
-% for token renderer prototypes. First, the \LaTeX{} theme loads the plain
-% \TeX{} theme with the default definitions for plain \TeX{}:
+% The `witiko/markdown/defaults` \LaTeX{} theme also loads the corresponding
+% plain \TeX{} theme.
%
% \end{markdown}
% \begin{macrocode}
\markdownLoadPlainTeXTheme
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Next, the \LaTeX{} theme overrides some of the plain \TeX{} definitions.
@@ -37277,7 +37382,6 @@ end
% \begin{macrocode}
\markdownIfOption{plain}{\iffalse}{\iftrue}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Lists
@@ -37401,7 +37505,6 @@ end
}
\ExplSyntaxOff
% \end{macrocode}
-% \par
% \begin{markdown}
%
% If we loaded the \pkg{enumitem} package, define the tight and
@@ -37532,7 +37635,6 @@ end
},
}}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Otherwise, if we loaded the \pkg{paralist} package, define the
@@ -37639,7 +37741,6 @@ end
}}
}{
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Otherwise, if we loaded neither the \pkg{enumitem} package nor the
@@ -37668,7 +37769,6 @@ end
\ExplSyntaxOff
\RequirePackage{amsmath}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Unless the \pkg{unicode-math} package has been loaded, load the \pkg{amssymb}
@@ -37700,7 +37800,6 @@ end
tilde = {\textasciitilde},
pipe = {\textbar},
% \end{macrocode}
-% \par
% \begin{markdown}
%
% We can capitalize on the fact that the expansion of renderers is performed by
@@ -37724,6 +37823,19 @@ end
\texttt{#1}%
\fi
}}}
+% \end{macrocode}
+% \begin{markdown}
+%
+%#### Content Blocks
+%
+% In content block renderer prototypes, display the content as a table using
+% the package \pkg{csvsimple} when the raw attribute is `csv`, display the
+% content using the default templates of the package \pkg{luaxml} when the
+% raw attribute is `html`, execute the content with TeX when the raw attribute
+% is `tex`, and display the content as markdown otherwise.
+%
+% \end{markdown}
+% \begin{macrocode}
\ExplSyntaxOn
\markdownSetup{
rendererPrototypes = {
@@ -37742,9 +37854,45 @@ end
{ \caption{#4} }
\end{table}
}
- { tex } { \markdownEscape{#3} }
+ { html }
+ {
+% \end{macrocode}
+% \begin{markdown}
+%
+% If we are using [\TeX{}4ht][1], we will pass HTML elements to the
+% output HTML document unchanged.
+%
+% [1]: https://tug.org/tex4ht/
+%
+% \end{markdown}
+% \begin{macrocode}
+ \cs_if_exist:NTF
+ \HCode
+ {
+ \if_mode_vertical:
+ \IgnorePar
+ \fi:
+ \EndP
+ \special
+ { t4ht* < #3 }
+ \par
+ \ShowPar
+ }
+ {
+ \@@_luaxml_print_html:n
+ { #3 }
+ }
+ }
+ { tex }
+ {
+ \markdownEscape
+ { #3 }
+ }
+ }
+ {
+ \markdownInput
+ { #3 }
}
- { \markdownInput{#3} }
},
},
}
@@ -37763,7 +37911,6 @@ end
tickedBox = {$\boxtimes$},
halfTickedBox = {$\boxdot$}}}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% If \acro{HTML} identifiers appear after a heading, we make them
@@ -37856,7 +38003,6 @@ end
thematicBreak = {\noindent\rule[0.5ex]{\linewidth}{1pt}},
note = {\footnote{#1}}}}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Fenced Code
@@ -37867,7 +38013,7 @@ end
% \begin{macrocode}
\RequirePackage{ltxcmds}
\ExplSyntaxOn
-\cs_gset:Npn
+\cs_gset_protected:Npn
\markdownRendererInputFencedCodePrototype#1#2#3
{
\tl_if_empty:nTF
@@ -37890,7 +38036,6 @@ end
\l_tmpa_seq
\l_tmpa_tl
% \end{macrocode}
-% \par
% \begin{markdown}
%
% When the \pkg{minted} package is loaded, use it for syntax highlighting.
@@ -37911,7 +38056,6 @@ end
}
{
% \end{macrocode}
-% \par
% \begin{markdown}
%
% When the \pkg{listings} package is loaded, use it for syntax highlighting.
@@ -37922,7 +38066,6 @@ end
{ listings }
{ \lstinputlisting[language=\l_tmpa_tl]{#1} }
% \end{macrocode}
-% \par
% \begin{markdown}
%
% When neither the \pkg{listings} package nor the \pkg{minted} package is
@@ -37936,7 +38079,6 @@ end
}
\ExplSyntaxOff
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Support the nesting of strong emphasis.
@@ -37955,7 +38097,6 @@ end
\markdownSetup{rendererPrototypes={strongEmphasis={%
\protect\markdownLATEXStrongEmphasis{#1}}}}
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Support \LaTeX{} document classes that do not provide chapters.
@@ -37979,7 +38120,6 @@ end
headingSix = {\subparagraph{#1}}}}
}%
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Tickboxes
@@ -38015,7 +38155,6 @@ end
\fi
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### HTML elements
@@ -38049,7 +38188,6 @@ end
}
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Citations
@@ -38064,7 +38202,7 @@ end
\newcount\markdownLaTeXCitationsCounter
% Basic implementation
-\RequirePackage{gobble}
+\long\def\@gobblethree#1#2#3{}%
\def\markdownLaTeXBasicCitations#1#2#3#4#5#6{%
\advance\markdownLaTeXCitationsCounter by 1\relax
\ifx\relax#4\relax
@@ -38296,7 +38434,6 @@ end
\expandafter{\expandafter}%
}}}}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Links
@@ -38307,23 +38444,26 @@ end
\RequirePackage{url}
\RequirePackage{expl3}
\ExplSyntaxOn
-\def\markdownRendererLinkPrototype#1#2#3#4{
- \tl_set:Nn \l_tmpa_tl { #1 }
- \tl_set:Nn \l_tmpb_tl { #2 }
- \bool_set:Nn
- \l_tmpa_bool
- {
- \tl_if_eq_p:NN
- \l_tmpa_tl
- \l_tmpb_tl
- }
- \tl_set:Nn \l_tmpa_tl { #4 }
- \bool_set:Nn
- \l_tmpb_bool
- {
- \tl_if_empty_p:N
- \l_tmpa_tl
- }
+\cs_gset_protected:Npn
+ \markdownRendererLinkPrototype
+ #1#2#3#4
+ {
+ \tl_set:Nn \l_tmpa_tl { #1 }
+ \tl_set:Nn \l_tmpb_tl { #2 }
+ \bool_set:Nn
+ \l_tmpa_bool
+ {
+ \tl_if_eq_p:NN
+ \l_tmpa_tl
+ \l_tmpb_tl
+ }
+ \tl_set:Nn \l_tmpa_tl { #4 }
+ \bool_set:Nn
+ \l_tmpb_bool
+ {
+ \tl_if_empty_p:N
+ \l_tmpa_tl
+ }
% \end{macrocode}
% \begin{markdown}
% If the label and the fully-escaped URI are equivalent and the title is
@@ -38331,17 +38471,17 @@ end
% link is either direct or indirect.
% \end{markdown}
% \begin{macrocode}
- \bool_if:nTF
- {
- \l_tmpa_bool && \l_tmpb_bool
- }
- {
- \markdownLaTeXRendererAutolink { #2 } { #3 }
- }{
- \markdownLaTeXRendererDirectOrIndirectLink
- { #1 } { #2 } { #3 } { #4 }
- }
-}
+ \bool_if:nTF
+ {
+ \l_tmpa_bool && \l_tmpb_bool
+ }
+ {
+ \markdownLaTeXRendererAutolink { #2 } { #3 }
+ }{
+ \markdownLaTeXRendererDirectOrIndirectLink
+ { #1 } { #2 } { #3 } { #4 }
+ }
+ }
\def\markdownLaTeXRendererAutolink#1#2{%
% \end{macrocode}
% \begin{markdown}
@@ -38385,7 +38525,6 @@ end
\def\markdownLaTeXRendererDirectOrIndirectLink#1#2#3#4{%
#1\footnote{\ifx\empty#4\empty\else#4: \fi\url{#3}}}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Tables
@@ -38424,7 +38563,59 @@ end
\begin{table}
\centering}%
\addto@hook\markdownLaTeXTableEnd{%
- \caption{#1}
+ \caption{#1}}%
+ \fi
+ }
+}}
+% \end{macrocode}
+% \begin{markdown}
+%
+% If the \Opt{tableAttributes} option is enabled, we will register any
+% identifiers, so that they can be used as \LaTeX{} labels for referencing
+% tables.
+%
+% \end{markdown}
+% \begin{macrocode}
+\ExplSyntaxOn
+\seq_new:N
+ \l_@@_table_identifiers_seq
+\markdownSetup {
+ rendererPrototypes = {
+ table += {
+ \seq_map_inline:Nn
+ \l_@@_table_identifiers_seq
+ {
+ \addto@hook
+ \markdownLaTeXTableEnd
+ { \label { ##1 } }
+ }
+ },
+ }
+}
+\markdownSetup {
+ rendererPrototypes = {
+ tableAttributeContextBegin = {
+ \group_begin:
+ \markdownSetup {
+ rendererPrototypes = {
+ attributeIdentifier = {
+ \seq_put_right:Nn
+ \l_@@_table_identifiers_seq
+ { ##1 }
+ },
+ },
+ }
+ },
+ tableAttributeContextEnd = {
+ \group_end:
+ },
+ },
+}
+\ExplSyntaxOff
+\markdownSetup{rendererPrototypes={
+ table += {%
+ \ifx\empty#1\empty\else
+ \addto@hook\markdownLaTeXTableEnd{%
\end{table}}%
\fi
\addto@hook\markdownLaTeXTable{\begin{tabular}}%
@@ -38473,7 +38664,6 @@ end
\expandafter\@gobble
\fi\markdownLaTeXRenderTableCell}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Line Blocks
@@ -38499,7 +38689,6 @@ end
}{}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### YAML Metadata {#latex-yaml-metadata}
@@ -38538,11 +38727,10 @@ end
},
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Marked Text
-% If the \Opt{mark} option is enabled, we will load either the \pkg{soulutf8}
+% If the \Opt{mark} option is enabled, we will load either the \pkg{soul}
% package or the \pkg{lua-ul} package and use it to implement marked text.
%
% \end{markdown}
@@ -38569,17 +38757,8 @@ end
{
\RequirePackage
{ xcolor }
- % TODO: Use just package soul after TeX Live 2023.
- \IfFormatAtLeastTF
- { 2023-02-18 }
- {
- \RequirePackage
- { soul }
- }
- {
- \RequirePackage
- { soulutf8 }
- }
+ \RequirePackage
+ { soul }
\markdownSetup
{
rendererPrototypes = {
@@ -38592,12 +38771,11 @@ end
}
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Strike-Through
% If the \Opt{strikeThrough} option is enabled, we will load either the
-% \pkg{soulutf8} package or the \pkg{lua-ul} package and use it to implement
+% \pkg{soul} package or the \pkg{lua-ul} package and use it to implement
% strike-throughs.
%
% \end{markdown}
@@ -38620,17 +38798,8 @@ end
}
}
{
- % TODO: Use just package soul after TeX Live 2023.
- \IfFormatAtLeastTF
- { 2023-02-18 }
- {
- \RequirePackage
- { soul }
- }
- {
- \RequirePackage
- { soulutf8 }
- }
+ \RequirePackage
+ { soul }
\markdownSetup
{
rendererPrototypes = {
@@ -38643,7 +38812,6 @@ end
}
}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Images and their attributes
@@ -38713,18 +38881,33 @@ end
}
\ExplSyntaxOff
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Raw Attributes
%
-% In the raw block and inline raw span renderer prototypes, default to the
-% plain TeX renderer prototypes, translating raw attribute `latex` to `tex`.
+% In the raw block and inline raw span renderer prototypes, display the content
+% using the default templates of the package \pkg{luaxml} when the raw
+% attribute is `html` and default to the plain TeX renderer prototypes
+% otherwise, translating raw attribute `latex` to `tex`.
%
% \end{markdown}
% \begin{macrocode}
\ExplSyntaxOn
-\cs_gset:Npn
+\cs_new:Nn
+ \@@_luaxml_print_html:n
+ {
+ \luabridge_now:n
+ {
+ local~input_file = assert(io.open(" #1 ", "r"))
+ local~input = assert(input_file:read("*a"))
+ assert(input_file:close())
+ input = "<body>" .. input .. "</body>"
+ local~dom = require("luaxml-domobject").html_parse(input)
+ local~output = require("luaxml-htmltemplates"):process_dom(dom)
+ print(output)
+ }
+ }
+\cs_gset_protected:Npn
\markdownRendererInputRawInlinePrototype#1#2
{
\str_case:nnF
@@ -38736,6 +38919,33 @@ end
{ #1 }
{ tex }
}
+ { html }
+ {
+% \end{macrocode}
+% \begin{markdown}
+%
+% If we are using [\TeX{}4ht][1], we will pass HTML elements to the
+% output HTML document unchanged.
+%
+% [1]: https://tug.org/tex4ht/
+%
+% \end{markdown}
+% \begin{macrocode}
+ \cs_if_exist:NTF
+ \HCode
+ {
+ \if_mode_vertical:
+ \IgnorePar
+ \EndP
+ \fi:
+ \special
+ { t4ht* < #1 }
+ }
+ {
+ \@@_luaxml_print_html:n
+ { #1 }
+ }
+ }
}
{
\@@_plain_tex_default_input_raw_inline:nn
@@ -38743,7 +38953,7 @@ end
{ #2 }
}
}
-\cs_gset:Npn
+\cs_gset_protected:Npn
\markdownRendererInputRawBlockPrototype#1#2
{
\str_case:nnF
@@ -38755,6 +38965,35 @@ end
{ #1 }
{ tex }
}
+ { html }
+ {
+% \end{macrocode}
+% \begin{markdown}
+%
+% If we are using [\TeX{}4ht][1], we will pass HTML elements to the
+% output HTML document unchanged.
+%
+% [1]: https://tug.org/tex4ht/
+%
+% \end{markdown}
+% \begin{macrocode}
+ \cs_if_exist:NTF
+ \HCode
+ {
+ \if_mode_vertical:
+ \IgnorePar
+ \fi:
+ \EndP
+ \special
+ { t4ht* < #1 }
+ \par
+ \ShowPar
+ }
+ {
+ \@@_luaxml_print_html:n
+ { #1 }
+ }
+ }
}
{
\@@_plain_tex_default_input_raw_block:nn
@@ -38762,6 +39001,41 @@ end
{ #2 }
}
}
+% \end{macrocode}
+% \begin{markdown}
+%
+%#### Bracketed spans
+%
+% If the \Opt{bracketedSpans} option is enabled, we will register any
+% identifiers, so that they can be used as \LaTeX{} labels for referencing
+% the last \LaTeX{} counter that has been incremented in e.g. ordered lists.
+%
+% \end{markdown}
+% \begin{macrocode}
+\seq_new:N
+ \l_@@_bracketed_span_identifiers_seq
+\markdownSetup {
+ rendererPrototypes = {
+ bracketedSpanAttributeContextBegin = {
+ \group_begin:
+ \markdownSetup {
+ rendererPrototypes = {
+ attributeIdentifier = {
+ \seq_put_right:Nn
+ \l_@@_bracketed_span_identifiers_seq
+ { ##1 }
+ },
+ },
+ }
+ },
+ bracketedSpanAttributeContextEnd = {
+ \seq_map_inline:Nn
+ \l_@@_bracketed_span_identifiers_seq
+ { \label { ##1 } }
+ \group_end:
+ },
+ },
+}
\ExplSyntaxOff
\fi % Closes `\markdownIfOption{plain}{\iffalse}{\iftrue}`
% \end{macrocode}
@@ -38769,7 +39043,6 @@ end
%</themes-witiko-markdown-defaults-latex>
%<*latex>
% \fi
-% \par
% \begin{markdown}
%
%### Miscellanea
@@ -38791,7 +39064,6 @@ end
%</latex>
%<*context>
% \fi
-% \par
% \begin{markdown}
%
% \Hologo{ConTeXt} Implementation {#contextimplementation}
@@ -38819,7 +39091,6 @@ end
\advance\count0 by 1\relax
\ifnum\count0<256\repeat
% \end{macrocode}
-% \par
% \begin{markdown}
%
% On top of that, make the pipe character (`|`) inactive during the scanning.
@@ -38829,7 +39100,6 @@ end
% \begin{macrocode}
\catcode`|=12}%
% \end{macrocode}
-% \par
% \begin{markdown}
%
%### Typesetting Markdown
@@ -38856,7 +39126,6 @@ end
\doinputmarkdown
[jekyllData, expectJekyllData, ensureJekyllData, #1]{#2}}%
% \end{macrocode}
-% \par
% \begin{markdown}
%
% The \mref{startmarkdown}, \mref{stopmarkdown}, \mref{startyaml}, and
@@ -38905,7 +39174,6 @@ end
|yamlEnd}%
|endgroup
% \end{macrocode}
-% \par
% \begin{markdown}
%
%### Themes {#context-themes-implementation}
@@ -38924,17 +39192,28 @@ end
\@@_load_theme:nnn
{
% \end{macrocode}
-% \par
% \begin{markdown}
%
-% Determine whether a file named `t-markdowntheme`\meta{munged theme
-% name}`.tex` exists. If it does, load it. Otherwise, try loading a plain
-% \TeX{} theme instead.
+% Determine whether either this is a built-in theme according to the prop
+% \mref{g_@@_context_built_in_themes_prop} or a file named
+% `t-markdowntheme`\meta{munged theme name}`.tex` exists. If it does, load it.
+% Otherwise, try loading a plain \TeX{} theme instead.
%
% \end{markdown}
% \begin{macrocode}
- \file_if_exist:nTF
- { t - markdown theme #3.tex }
+ \bool_if:nTF
+ {
+ \bool_lazy_or_p:nn
+ {
+ \prop_if_in_p:Nn
+ \g_@@_context_built_in_themes_prop
+ { #1 }
+ }
+ {
+ \file_if_exist_p:n
+ { t - markdown theme #3.tex }
+ }
+ }
{
\prop_get:NnNTF
\g_@@_context_loaded_themes_linenos_prop
@@ -38967,11 +39246,6 @@ end
}
}
{
- \msg_info:nnn
- { markdown }
- { loading-context-theme }
- { #1 }
- { #2 }
\prop_gput:Nnx
\g_@@_context_loaded_themes_linenos_prop
{ #1 }
@@ -38980,9 +39254,37 @@ end
\g_@@_context_loaded_themes_versions_prop
{ #1 }
{ #2 }
- \usemodule
- [ t ]
- [ markdown theme #3 ]
+% \end{macrocode}
+% \begin{markdown}
+%
+% Load built-in plain \TeX{} themes from the prop
+% \mref{g_@@_context_built_in_themes_prop} and from the filesystem otherwise.
+%
+% \end{markdown}
+% \begin{macrocode}
+ \prop_if_in:NnTF
+ \g_@@_context_built_in_themes_prop
+ { #1 }
+ {
+ \msg_info:nnnn
+ { markdown }
+ { loading-built-in-context-theme }
+ { #1 }
+ { #2 }
+ \prop_item:Nn
+ \g_@@_context_built_in_themes_prop
+ { #1 }
+ }
+ {
+ \msg_info:nnnn
+ { markdown }
+ { loading-context-theme }
+ { #1 }
+ { #2 }
+ \usemodule
+ [ t ]
+ [ markdown theme #3 ]
+ }
}
}
{
@@ -38994,6 +39296,10 @@ end
}
\msg_new:nnn
{ markdown }
+ { loading-built-in-context-theme }
+ { Loading~version~#2~of~built-in~ConTeXt~Markdown~theme~#1 }
+\msg_new:nnn
+ { markdown }
{ loading-context-theme }
{ Loading~version~#2~of~ConTeXt~Markdown~theme~#1 }
\msg_new:nnn
@@ -39016,7 +39322,6 @@ end
%</context>
%<*themes-witiko-markdown-defaults-ctx>
% \fi
-% \par
% \begin{markdown}
%
% The `witiko/markdown/defaults` \Hologo{ConTeXt} theme provides default
@@ -39027,7 +39332,6 @@ end
% \begin{macrocode}
\markdownLoadPlainTeXTheme
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Next, the \Hologo{ConTeXt} theme overrides some of the plain \TeX{} definitions.
@@ -39126,7 +39430,6 @@ end
}%
\def\markdownRendererInputVerbatimPrototype#1{\typefile{#1}}%
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Fenced Code
@@ -39143,7 +39446,6 @@ end
{ #2 }
{ \markdownRendererInputVerbatim{#1} }
% \end{macrocode}
-% \par
% \begin{markdown}
%
% Otherwise, extract the first word of the infostring and treat it as the name
@@ -39199,7 +39501,6 @@ end
\def\markdownRendererDisplayMathPrototype#1{%
\startformula#1\stopformula}%
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Tables
@@ -39277,7 +39578,6 @@ end
\expandafter\gobbleoneargument
\fi\markdownConTeXtRenderTableCell}
% \end{macrocode}
-% \par
% \begin{markdown}
%
%#### Raw Attributes
@@ -39338,7 +39638,6 @@ end
%</themes-witiko-markdown-defaults-ctx>
%<*context>
% \fi
-% \par
% \begin{markdown}
%
% At the end of the \Hologo{ConTeXt} module, we load the
diff --git a/macros/generic/markdown/markdown.html b/macros/generic/markdown/markdown.html
index d111179592..39b785b58e 100644
--- a/macros/generic/markdown/markdown.html
+++ b/macros/generic/markdown/markdown.html
@@ -93,7 +93,7 @@
<header id="title-block-header">
<h1 class="title">Markdown Package User Manual</h1>
<p class="author">Vít Starý Novotný, Andrej Genčur</p>
-<p class="date">3.8.1-0-gbbed72f3 2024-11-03</p>
+<p class="date">3.9.0-0-g4f1abe21 2024-11-21</p>
</header>
<nav id="TOC" role="doc-toc">
<ul>
@@ -153,17 +153,12 @@ class="toc-section-number">2.2.1</span> Lua</a></li>
<li><a href="#plain-tex-1" id="toc-plain-tex-1"><span
class="toc-section-number">2.2.2</span> Plain <span
class="tex">T<sub>e</sub>X</span></a></li>
-<li><a href="#themes" id="toc-themes"><span
-class="toc-section-number">2.2.3</span> Themes</a></li>
-<li><a href="#snippets" id="toc-snippets"><span
-class="toc-section-number">2.2.4</span> Snippets</a></li>
<li><a href="#latex-1" id="toc-latex-1"><span
-class="toc-section-number">2.2.5</span> <span
+class="toc-section-number">2.2.3</span> <span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span></a></li>
-<li><a href="#latexthemes" id="toc-latexthemes"><span
-class="toc-section-number">2.2.6</span> Themes</a></li>
-<li><a href="#themes-1" id="toc-themes-1"><span
-class="toc-section-number">2.2.7</span> Themes</a></li>
+<li><a href="#context-1" id="toc-context-1"><span
+class="toc-section-number">2.2.4</span> Con<span
+class="tex">T<sub>e</sub>X</span>t</a></li>
</ul></li>
<li><a href="#markdown-tokens" id="toc-markdown-tokens"><span
class="toc-section-number">2.3</span> Markdown Tokens</a>
@@ -211,7 +206,7 @@ which contains the latest development version of the Markdown package,
or a <span class="tex">T<sub>e</sub>X</span> distribution: <a
href="https://www.tug.org/texlive/"
title="TeX Live - TeX Users Group"><span
-class="tex">T<sub>e</sub>X</span> Live</a> ≥ 2022 is known to work with
+class="tex">T<sub>e</sub>X</span> Live</a> ≥ 2023 is known to work with
the current version of the Markdown package and so are recent versions
of <a href="https://miktex.org/" title="Home - MiKTeXorg">Mik<span
class="tex">T<sub>e</sub>X</span></a>. If you are using an older,
@@ -227,10 +222,10 @@ class="tex">T<sub>e</sub>X</span> distribution, you will need to install
it.</p>
<p>From <a href="https://github.com/witiko/markdown/releases"
title="Releases - witiko/markdown">Releases</a>, download <a
-href="https://github.com/witiko/markdown/releases/download/3.8.1/markdown.zip"
-title="Release 3.8.1 - witiko/markdown">an archive
+href="https://github.com/witiko/markdown/releases/download/3.9.0/markdown.zip"
+title="Release 3.9.0 - witiko/markdown">an archive
<code>markdown.zip</code> for this version of the Markdown package
-(3.8.1)</a> or a different version that you wish to install. Then, unzip
+(3.9.0)</a> or a different version that you wish to install. Then, unzip
the archive. If you downloaded an archive for a different version of the
Markdown package, you should now locate a file named
<code>markdown.html</code> with the user manual for that version, open
@@ -247,21 +242,11 @@ files:</p>
<ul>
<li><code>markdown.lua</code>, <code>markdown-parser.lua</code>, and
<code>markdown-unicode-data.lua</code>: The Lua module</li>
-<li><code>libraries/markdown-tinyyaml.lua</code>: An external library
-for reading <abbr>yaml</abbr></li>
<li><code>markdown-cli.lua</code>: The Lua command-line interface</li>
<li><code>markdown.tex</code>: The plain <span
class="tex">T<sub>e</sub>X</span> macro package</li>
<li><code>markdown.sty</code>: The <span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> package</li>
-<li><code>markdownthemewitiko_dot.sty</code>: The
-<code>witiko/dot</code> <span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> theme</li>
-<li><code>markdownthemewitiko_graphicx_http.sty</code>: The
-<code>witiko/graphicx/http</code> <span
-class="latex">L<sup>a</sup>T<sub>e</sub>X</span> theme</li>
-<li><code>markdownthemewitiko_tilde.tex</code>: The
-<code>witiko/tilde</code> theme</li>
<li><code>markdownthemewitiko_markdown_defaults.tex</code>,
<code>markdownthemewitiko_markdown_defaults.sty</code>, and
<code>t-markdownthemewitiko_markdown_defaults.tex</code>: The
@@ -278,14 +263,10 @@ generally where the individual files should be placed:</p>
<li><code>⟨TEXMF⟩/tex/luatex/markdown/markdown.lua</code></li>
<li><code>⟨TEXMF⟩/tex/luatex/markdown/markdown-parser.lua</code></li>
<li><code>⟨TEXMF⟩/tex/luatex/markdown/markdown-unicode-data.lua</code></li>
-<li><code>⟨TEXMF⟩/tex/luatex/markdown/markdown-tinyyaml.lua</code></li>
<li><code>⟨TEXMF⟩/scripts/markdown/markdown-cli.lua</code></li>
<li><code>⟨TEXMF⟩/tex/generic/markdown/markdown.tex</code></li>
-<li><code>⟨TEXMF⟩/tex/generic/markdown/markdownthemewitiko_tilde.tex</code></li>
<li><code>⟨TEXMF⟩/tex/generic/markdown/markdownthemewitiko_markdown_defaults.tex</code></li>
<li><code>⟨TEXMF⟩/tex/latex/markdown/markdown.sty</code></li>
-<li><code>⟨TEXMF⟩/tex/latex/markdown/markdownthemewitiko_dot.sty</code></li>
-<li><code>⟨TEXMF⟩/tex/latex/markdown/markdownthemewitiko_graphicx_http.sty</code></li>
<li><code>⟨TEXMF⟩/tex/latex/markdown/markdownthemewitiko_markdown_defaults.sty</code></li>
<li><code>⟨TEXMF⟩/tex/context/third/markdown/t-markdown.tex</code></li>
<li><code>⟨TEXMF⟩/tex/context/third/markdown/t-markdownthemewitiko_markdown_defaults.tex</code></li>
@@ -307,14 +288,10 @@ them together. This way your document can be portably typeset on legacy
<li><code>./markdown.lua</code></li>
<li><code>./markdown-parser.lua</code></li>
<li><code>./markdown-unicode-data.lua</code></li>
-<li><code>./markdown-tinyyaml.lua</code></li>
<li><code>./markdown-cli.lua</code></li>
<li><code>./markdown/markdown.tex</code></li>
<li><code>./markdown.sty</code></li>
<li><code>./t-markdown.tex</code></li>
-<li><code>./markdownthemewitiko_dot.sty</code></li>
-<li><code>./markdownthemewitiko_graphicx_http.sty</code></li>
-<li><code>./markdownthemewitiko_tilde.tex</code></li>
<li><code>./markdownthemewitiko_markdown_defaults.tex</code></li>
<li><code>./markdownthemewitiko_markdown_defaults.sty</code></li>
<li><code>./t-markdownthemewitiko_markdown_defaults.tex</code></li>
@@ -6551,7 +6528,7 @@ class="tex">T<sub>e</sub>X</span> Example</h5>
<div class="sourceCode" id="cb372"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb372-1"><a href="#cb372-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
<span id="cb372-2"><a href="#cb372-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStrikeThrough</span>{true}</span>
-<span id="cb372-3"><a href="#cb372-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> soulutf8.sty</span>
+<span id="cb372-3"><a href="#cb372-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> soul.sty</span>
<span id="cb372-4"><a href="#cb372-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\st</span>{#1}}</span>
<span id="cb372-5"><a href="#cb372-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
<span id="cb372-6"><a href="#cb372-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
@@ -6572,7 +6549,7 @@ class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<div class="sourceCode" id="cb374"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb374-1"><a href="#cb374-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
<span id="cb374-2"><a href="#cb374-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[strikeThrough]{<span class="ex">markdown</span>}</span>
-<span id="cb374-3"><a href="#cb374-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soulutf8</span>}</span>
+<span id="cb374-3"><a href="#cb374-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soul</span>}</span>
<span id="cb374-4"><a href="#cb374-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
<span id="cb374-5"><a href="#cb374-5" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
<span id="cb374-6"><a href="#cb374-6" aria-hidden="true" tabindex="-1"></a> strikeThrough = {<span class="fu">\st</span>{#1}},</span>
@@ -8237,8 +8214,8 @@ class="sourceCode tex"><code class="sourceCode latex"><span id="cb470-1"><a href
class="sourceCode sh"><code class="sourceCode bash"><span id="cb471-1"><a href="#cb471-1" aria-hidden="true" tabindex="-1"></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="themes"><span
-class="header-section-number">2.2.3</span> Themes</h3>
+<h4 data-number="2.2.2.6" id="themes"><span
+class="header-section-number">2.2.2.6</span> Themes</h4>
<p>User-defined themes for the Markdown package provide a
domain-specific interpretation of Markdown tokens. Themes allow the
authors to achieve a specific look and other high-level goals without
@@ -8246,6 +8223,111 @@ low-level programming.</p>
<p>Built-in plain <span class="tex">T<sub>e</sub>X</span> themes
provided with the Markdown package include:</p>
<dl>
+<dt><code><strong>witiko/dot</strong></code></dt>
+<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
+<code><strong>frozenCache</strong></code> plain <span
+class="tex">T<sub>e</sub>X</span> option is enabled.</p>
+</dd>
+</dl>
+<h5 class="unnumbered" 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="cb472"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb472-1"><a href="#cb472-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb472-2"><a href="#cb472-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[import=witiko/dot]{<span class="ex">markdown</span>}</span>
+<span id="cb472-3"><a href="#cb472-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\setkeys</span>{Gin}{</span>
+<span id="cb472-4"><a href="#cb472-4" aria-hidden="true" tabindex="-1"></a> width=<span class="fu">\columnwidth</span>,</span>
+<span id="cb472-5"><a href="#cb472-5" aria-hidden="true" tabindex="-1"></a> height=0.65<span class="fu">\paperheight</span>,</span>
+<span id="cb472-6"><a href="#cb472-6" aria-hidden="true" tabindex="-1"></a> keepaspectratio}</span>
+<span id="cb472-7"><a href="#cb472-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb472-8"><a href="#cb472-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb472-9"><a href="#cb472-9" aria-hidden="true" tabindex="-1"></a>``` dot Various formats of mathemathical formulae</span>
+<span id="cb472-10"><a href="#cb472-10" aria-hidden="true" tabindex="-1"></a>digraph tree {</span>
+<span id="cb472-11"><a href="#cb472-11" aria-hidden="true" tabindex="-1"></a> margin = 0;</span>
+<span id="cb472-12"><a href="#cb472-12" aria-hidden="true" tabindex="-1"></a> rankdir = &quot;LR&quot;;</span>
+<span id="cb472-13"><a href="#cb472-13" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb472-14"><a href="#cb472-14" aria-hidden="true" tabindex="-1"></a> latex -&gt; pmml;</span>
+<span id="cb472-15"><a href="#cb472-15" aria-hidden="true" tabindex="-1"></a> latex -&gt; cmml;</span>
+<span id="cb472-16"><a href="#cb472-16" aria-hidden="true" tabindex="-1"></a> pmml -&gt; slt;</span>
+<span id="cb472-17"><a href="#cb472-17" aria-hidden="true" tabindex="-1"></a> cmml -&gt; opt;</span>
+<span id="cb472-18"><a href="#cb472-18" aria-hidden="true" tabindex="-1"></a> cmml -&gt; prefix;</span>
+<span id="cb472-19"><a href="#cb472-19" aria-hidden="true" tabindex="-1"></a> cmml -&gt; infix;</span>
+<span id="cb472-20"><a href="#cb472-20" aria-hidden="true" tabindex="-1"></a> pmml -&gt; mterms [style=dashed];</span>
+<span id="cb472-21"><a href="#cb472-21" aria-hidden="true" tabindex="-1"></a> cmml -&gt; mterms;</span>
+<span id="cb472-22"><a href="#cb472-22" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb472-23"><a href="#cb472-23" aria-hidden="true" tabindex="-1"></a> latex [label = &quot;LaTeX&quot;];</span>
+<span id="cb472-24"><a href="#cb472-24" aria-hidden="true" tabindex="-1"></a> pmml [label = &quot;Presentation MathML&quot;];</span>
+<span id="cb472-25"><a href="#cb472-25" aria-hidden="true" tabindex="-1"></a> cmml [label = &quot;Content MathML&quot;];</span>
+<span id="cb472-26"><a href="#cb472-26" aria-hidden="true" tabindex="-1"></a> slt [label = &quot;Symbol Layout Tree&quot;];</span>
+<span id="cb472-27"><a href="#cb472-27" aria-hidden="true" tabindex="-1"></a> opt [label = &quot;Operator Tree&quot;];</span>
+<span id="cb472-28"><a href="#cb472-28" aria-hidden="true" tabindex="-1"></a> prefix [label = &quot;Prefix&quot;];</span>
+<span id="cb472-29"><a href="#cb472-29" aria-hidden="true" tabindex="-1"></a> infix [label = &quot;Infix&quot;];</span>
+<span id="cb472-30"><a href="#cb472-30" aria-hidden="true" tabindex="-1"></a> mterms [label = &quot;M-Terms&quot;];</span>
+<span id="cb472-31"><a href="#cb472-31" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb472-32"><a href="#cb472-32" aria-hidden="true" tabindex="-1"></a>```</span>
+<span id="cb472-33"><a href="#cb472-33" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb472-34"><a href="#cb472-34" aria-hidden="true" tabindex="-1"></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="cb473"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb473-1"><a href="#cb473-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</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>
+</blockquote>
+<dl>
+<dt><code><strong>witiko/graphicx/http</strong></code></dt>
+<dd>
+<p>A theme that adds support for downloading images whose URL has the
+http or https protocol. The theme requires the
+<code><strong>catchfile</strong></code> <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
+<code><strong>frozenCache</strong></code> plain <span
+class="tex">T<sub>e</sub>X</span> option is enabled.</p>
+</dd>
+</dl>
+<h5 class="unnumbered" 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="cb474"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb474-1"><a href="#cb474-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
+<span id="cb474-2"><a href="#cb474-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[import=witiko/graphicx/http, link_attributes]{<span class="ex">markdown</span>}</span>
+<span id="cb474-3"><a href="#cb474-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
+<span id="cb474-4"><a href="#cb474-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb474-5"><a href="#cb474-5" aria-hidden="true" tabindex="-1"></a>![img](https://github.com/witiko/markdown/raw/main/markdown.png</span>
+<span id="cb474-6"><a href="#cb474-6" aria-hidden="true" tabindex="-1"></a> &quot;The banner of the Markdown package&quot;){width=5in}</span>
+<span id="cb474-7"><a href="#cb474-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb474-8"><a href="#cb474-8" aria-hidden="true" tabindex="-1"></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="cb475"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb475-1"><a href="#cb475-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> <span class="at">--shell-escape</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>
+<img src="https://github.com/witiko/markdown/raw/main/markdown.png"
+alt="Figure 1: The banner of the Markdown package" />
+<figcaption aria-hidden="true">Figure 1: The banner of the Markdown
+package</figcaption>
+</figure>
+</blockquote>
+<dl>
<dt><code><strong>witiko/tilde</strong></code></dt>
<dd>
<p>A theme that makes tilde (<code>~</code>) always typeset the
@@ -8257,16 +8339,16 @@ Lua option is disabled.</p>
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="cb472"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb472-1"><a href="#cb472-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
-<span id="cb472-2"><a href="#cb472-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{import=witiko/tilde}</span>
-<span id="cb472-3"><a href="#cb472-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
-<span id="cb472-4"><a href="#cb472-4" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span>
-<span id="cb472-5"><a href="#cb472-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
-<span id="cb472-6"><a href="#cb472-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
+<div class="sourceCode" id="cb476"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb476-1"><a href="#cb476-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
+<span id="cb476-2"><a href="#cb476-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{import=witiko/tilde}</span>
+<span id="cb476-3"><a href="#cb476-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
+<span id="cb476-4"><a href="#cb476-4" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span>
+<span id="cb476-5"><a href="#cb476-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span>
+<span id="cb476-6"><a href="#cb476-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div>
<p>Next, invoke LuaTeX from the terminal:</p>
-<div class="sourceCode" id="cb473"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb473-1"><a href="#cb473-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div>
+<div class="sourceCode" id="cb477"><pre
+class="sourceCode sh"><code class="sourceCode bash"><span id="cb477-1"><a href="#cb477-1" aria-hidden="true" tabindex="-1"></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>
@@ -8282,117 +8364,117 @@ class="tex">T<sub>e</sub>X</span>. This theme is loaded automatically
together with the package and explicitly loading it has no effect.</p>
</dd>
</dl>
-<h3 data-number="2.2.4" id="snippets"><span
-class="header-section-number">2.2.4</span> Snippets</h3>
+<h4 data-number="2.2.2.7" id="snippets"><span
+class="header-section-number">2.2.2.7</span> Snippets</h4>
<p>User-defined themes provide global control over high-level goals.
However, it is often desirable to change only some local aspects of a
document. Snippets provide syntactic sugar for defining and invoking
various options locally.</p>
<p>Here is how we can use snippets to store options and invoke them
later in <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>:</p>
-<div class="sourceCode" id="cb474"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb474-1"><a href="#cb474-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</span>
-<span id="cb474-2"><a href="#cb474-2" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
-<span id="cb474-3"><a href="#cb474-3" aria-hidden="true" tabindex="-1"></a> olItemWithNumber = {<span class="co">%</span></span>
-<span id="cb474-4"><a href="#cb474-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\item</span>[<span class="fu">\romannumeral</span>#1<span class="fu">\relax</span>.]<span class="co">%</span></span>
-<span id="cb474-5"><a href="#cb474-5" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb474-6"><a href="#cb474-6" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb474-7"><a href="#cb474-7" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb474-8"><a href="#cb474-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb474-9"><a href="#cb474-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb474-10"><a href="#cb474-10" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by arabic numerals:</span>
-<span id="cb474-11"><a href="#cb474-11" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb474-12"><a href="#cb474-12" aria-hidden="true" tabindex="-1"></a>1. wahid</span>
-<span id="cb474-13"><a href="#cb474-13" aria-hidden="true" tabindex="-1"></a>2. aithnayn</span>
-<span id="cb474-14"><a href="#cb474-14" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb474-15"><a href="#cb474-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb474-16"><a href="#cb474-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}[snippet=romanNumerals]</span>
-<span id="cb474-17"><a href="#cb474-17" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb474-18"><a href="#cb474-18" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by roman numerals:</span>
-<span id="cb474-19"><a href="#cb474-19" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb474-20"><a href="#cb474-20" aria-hidden="true" tabindex="-1"></a>3. tres</span>
-<span id="cb474-21"><a href="#cb474-21" aria-hidden="true" tabindex="-1"></a>4. quattuor</span>
-<span id="cb474-22"><a href="#cb474-22" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb474-23"><a href="#cb474-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb478"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb478-1"><a href="#cb478-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</span>
+<span id="cb478-2"><a href="#cb478-2" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
+<span id="cb478-3"><a href="#cb478-3" aria-hidden="true" tabindex="-1"></a> olItemWithNumber = {<span class="co">%</span></span>
+<span id="cb478-4"><a href="#cb478-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\item</span>[<span class="fu">\romannumeral</span>#1<span class="fu">\relax</span>.]<span class="co">%</span></span>
+<span id="cb478-5"><a href="#cb478-5" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb478-6"><a href="#cb478-6" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb478-7"><a href="#cb478-7" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb478-8"><a href="#cb478-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
+<span id="cb478-9"><a href="#cb478-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb478-10"><a href="#cb478-10" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by arabic numerals:</span>
+<span id="cb478-11"><a href="#cb478-11" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb478-12"><a href="#cb478-12" aria-hidden="true" tabindex="-1"></a>1. wahid</span>
+<span id="cb478-13"><a href="#cb478-13" aria-hidden="true" tabindex="-1"></a>2. aithnayn</span>
+<span id="cb478-14"><a href="#cb478-14" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb478-15"><a href="#cb478-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
+<span id="cb478-16"><a href="#cb478-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}[snippet=romanNumerals]</span>
+<span id="cb478-17"><a href="#cb478-17" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb478-18"><a href="#cb478-18" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by roman numerals:</span>
+<span id="cb478-19"><a href="#cb478-19" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb478-20"><a href="#cb478-20" aria-hidden="true" tabindex="-1"></a>3. tres</span>
+<span id="cb478-21"><a href="#cb478-21" aria-hidden="true" tabindex="-1"></a>4. quattuor</span>
+<span id="cb478-22"><a href="#cb478-22" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb478-23"><a href="#cb478-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span></code></pre></div>
<p>If the <code>romanNumerals</code> snippet were defined in the
<code>jdoe/lists</code> theme, we could import the
<code>jdoe/lists</code> theme and use the qualified name
<code>jdoe/lists/romanNumerals</code> to invoke the snippet:</p>
-<div class="sourceCode" id="cb475"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb475-1"><a href="#cb475-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{import=jdoe/lists}</span>
-<span id="cb475-2"><a href="#cb475-2" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}[snippet=jdoe/lists/romanNumerals]</span>
-<span id="cb475-3"><a href="#cb475-3" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb475-4"><a href="#cb475-4" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by roman numerals:</span>
-<span id="cb475-5"><a href="#cb475-5" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb475-6"><a href="#cb475-6" aria-hidden="true" tabindex="-1"></a>3. tres</span>
-<span id="cb475-7"><a href="#cb475-7" aria-hidden="true" tabindex="-1"></a>4. quattuor</span>
-<span id="cb475-8"><a href="#cb475-8" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb475-9"><a href="#cb475-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb479"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb479-1"><a href="#cb479-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{import=jdoe/lists}</span>
+<span id="cb479-2"><a href="#cb479-2" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}[snippet=jdoe/lists/romanNumerals]</span>
+<span id="cb479-3"><a href="#cb479-3" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb479-4"><a href="#cb479-4" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by roman numerals:</span>
+<span id="cb479-5"><a href="#cb479-5" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb479-6"><a href="#cb479-6" aria-hidden="true" tabindex="-1"></a>3. tres</span>
+<span id="cb479-7"><a href="#cb479-7" aria-hidden="true" tabindex="-1"></a>4. quattuor</span>
+<span id="cb479-8"><a href="#cb479-8" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb479-9"><a href="#cb479-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span></code></pre></div>
<p>Alternatively, we can use the extended variant of the
<code>import</code> <span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> option that allows us
to import the <code>romanNumerals</code> snippet to the current
namespace for easier access:</p>
-<div class="sourceCode" id="cb476"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb476-1"><a href="#cb476-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb476-2"><a href="#cb476-2" aria-hidden="true" tabindex="-1"></a> import = {</span>
-<span id="cb476-3"><a href="#cb476-3" aria-hidden="true" tabindex="-1"></a> jdoe/lists = romanNumerals,</span>
-<span id="cb476-4"><a href="#cb476-4" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb476-5"><a href="#cb476-5" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb476-6"><a href="#cb476-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}[snippet=romanNumerals]</span>
-<span id="cb476-7"><a href="#cb476-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb476-8"><a href="#cb476-8" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by roman numerals:</span>
-<span id="cb476-9"><a href="#cb476-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb476-10"><a href="#cb476-10" aria-hidden="true" tabindex="-1"></a>3. tres</span>
-<span id="cb476-11"><a href="#cb476-11" aria-hidden="true" tabindex="-1"></a>4. quattuor</span>
-<span id="cb476-12"><a href="#cb476-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb476-13"><a href="#cb476-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb480"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb480-1"><a href="#cb480-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb480-2"><a href="#cb480-2" aria-hidden="true" tabindex="-1"></a> import = {</span>
+<span id="cb480-3"><a href="#cb480-3" aria-hidden="true" tabindex="-1"></a> jdoe/lists = romanNumerals,</span>
+<span id="cb480-4"><a href="#cb480-4" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb480-5"><a href="#cb480-5" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb480-6"><a href="#cb480-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}[snippet=romanNumerals]</span>
+<span id="cb480-7"><a href="#cb480-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb480-8"><a href="#cb480-8" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by roman numerals:</span>
+<span id="cb480-9"><a href="#cb480-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb480-10"><a href="#cb480-10" aria-hidden="true" tabindex="-1"></a>3. tres</span>
+<span id="cb480-11"><a href="#cb480-11" aria-hidden="true" tabindex="-1"></a>4. quattuor</span>
+<span id="cb480-12"><a href="#cb480-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb480-13"><a href="#cb480-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span></code></pre></div>
<p>Furthermore, we can also specify the name of the snippet in the
current namespace, which can be different from the name of the snippet
in the <code>jdoe/lists</code> theme. For example, we can make the
snippet <code>jdoe/lists/romanNumerals</code> available under the name
<code>roman</code>.</p>
-<div class="sourceCode" id="cb477"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb477-1"><a href="#cb477-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb477-2"><a href="#cb477-2" aria-hidden="true" tabindex="-1"></a> import = {</span>
-<span id="cb477-3"><a href="#cb477-3" aria-hidden="true" tabindex="-1"></a> jdoe/lists = romanNumerals as roman,</span>
-<span id="cb477-4"><a href="#cb477-4" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb477-5"><a href="#cb477-5" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb477-6"><a href="#cb477-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}[snippet=roman]</span>
-<span id="cb477-7"><a href="#cb477-7" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb477-8"><a href="#cb477-8" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by roman numerals:</span>
-<span id="cb477-9"><a href="#cb477-9" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb477-10"><a href="#cb477-10" aria-hidden="true" tabindex="-1"></a>3. tres</span>
-<span id="cb477-11"><a href="#cb477-11" aria-hidden="true" tabindex="-1"></a>4. quattuor</span>
-<span id="cb477-12"><a href="#cb477-12" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb477-13"><a href="#cb477-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb481"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb481-1"><a href="#cb481-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb481-2"><a href="#cb481-2" aria-hidden="true" tabindex="-1"></a> import = {</span>
+<span id="cb481-3"><a href="#cb481-3" aria-hidden="true" tabindex="-1"></a> jdoe/lists = romanNumerals as roman,</span>
+<span id="cb481-4"><a href="#cb481-4" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb481-5"><a href="#cb481-5" aria-hidden="true" tabindex="-1"></a>}</span>
+<span id="cb481-6"><a href="#cb481-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}[snippet=roman]</span>
+<span id="cb481-7"><a href="#cb481-7" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb481-8"><a href="#cb481-8" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by roman numerals:</span>
+<span id="cb481-9"><a href="#cb481-9" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb481-10"><a href="#cb481-10" aria-hidden="true" tabindex="-1"></a>3. tres</span>
+<span id="cb481-11"><a href="#cb481-11" aria-hidden="true" tabindex="-1"></a>4. quattuor</span>
+<span id="cb481-12"><a href="#cb481-12" aria-hidden="true" tabindex="-1"></a></span>
+<span id="cb481-13"><a href="#cb481-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span></code></pre></div>
<p>Several themes and/or snippets can be loaded at once using the
extended variant of the <code>import</code> <span
class="latex">L<sup>a</sup>T<sub>e</sub>X</span> option:</p>
-<div class="sourceCode" id="cb478"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb478-1"><a href="#cb478-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb478-2"><a href="#cb478-2" aria-hidden="true" tabindex="-1"></a> import = {</span>
-<span id="cb478-3"><a href="#cb478-3" aria-hidden="true" tabindex="-1"></a> jdoe/longpackagename/lists = {</span>
-<span id="cb478-4"><a href="#cb478-4" aria-hidden="true" tabindex="-1"></a> arabic as arabic1,</span>
-<span id="cb478-5"><a href="#cb478-5" aria-hidden="true" tabindex="-1"></a> roman,</span>
-<span id="cb478-6"><a href="#cb478-6" aria-hidden="true" tabindex="-1"></a> alphabetic,</span>
-<span id="cb478-7"><a href="#cb478-7" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb478-8"><a href="#cb478-8" aria-hidden="true" tabindex="-1"></a> jdoe/anotherlongpackagename/lists = {</span>
-<span id="cb478-9"><a href="#cb478-9" aria-hidden="true" tabindex="-1"></a> arabic as arabic2,</span>
-<span id="cb478-10"><a href="#cb478-10" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb478-11"><a href="#cb478-11" aria-hidden="true" tabindex="-1"></a> jdoe/yetanotherlongpackagename,</span>
-<span id="cb478-12"><a href="#cb478-12" aria-hidden="true" tabindex="-1"></a> },</span>
-<span id="cb478-13"><a href="#cb478-13" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
-<h3 data-number="2.2.5" id="latex-1"><span
-class="header-section-number">2.2.5</span> <span
+<div class="sourceCode" id="cb482"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb482-1"><a href="#cb482-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb482-2"><a href="#cb482-2" aria-hidden="true" tabindex="-1"></a> import = {</span>
+<span id="cb482-3"><a href="#cb482-3" aria-hidden="true" tabindex="-1"></a> jdoe/longpackagename/lists = {</span>
+<span id="cb482-4"><a href="#cb482-4" aria-hidden="true" tabindex="-1"></a> arabic as arabic1,</span>
+<span id="cb482-5"><a href="#cb482-5" aria-hidden="true" tabindex="-1"></a> roman,</span>
+<span id="cb482-6"><a href="#cb482-6" aria-hidden="true" tabindex="-1"></a> alphabetic,</span>
+<span id="cb482-7"><a href="#cb482-7" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb482-8"><a href="#cb482-8" aria-hidden="true" tabindex="-1"></a> jdoe/anotherlongpackagename/lists = {</span>
+<span id="cb482-9"><a href="#cb482-9" aria-hidden="true" tabindex="-1"></a> arabic as arabic2,</span>
+<span id="cb482-10"><a href="#cb482-10" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb482-11"><a href="#cb482-11" aria-hidden="true" tabindex="-1"></a> jdoe/yetanotherlongpackagename,</span>
+<span id="cb482-12"><a href="#cb482-12" aria-hidden="true" tabindex="-1"></a> },</span>
+<span id="cb482-13"><a href="#cb482-13" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<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-defined themes,
and invoke user-defined set-up snippets.</p>
-<h4 data-number="2.2.5.1"
+<h4 data-number="2.2.3.1"
id="setting-lua-and-plain-tex-options-from-latex"><span
-class="header-section-number">2.2.5.1</span> Setting Lua and plain <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
@@ -8400,10 +8482,10 @@ class="latex">L<sup>a</sup>T<sub>e</sub>X</span>. For example, to set
the <code><strong>taskLists</strong></code> 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="cb479"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb479-1"><a href="#cb479-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb479-2"><a href="#cb479-2" aria-hidden="true" tabindex="-1"></a> taskLists = true,</span>
-<span id="cb479-3"><a href="#cb479-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<div class="sourceCode" id="cb483"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb483-1"><a href="#cb483-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb483-2"><a href="#cb483-2" aria-hidden="true" tabindex="-1"></a> taskLists = true,</span>
+<span id="cb483-3"><a href="#cb483-3" aria-hidden="true" tabindex="-1"></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
@@ -8411,12 +8493,12 @@ the <code>\markdownOptionInputTempFileName</code> plain <span
class="tex">T<sub>e</sub>X</span> option to
<code>helper-script.lua</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="cb480"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb480-1"><a href="#cb480-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
-<span id="cb480-2"><a href="#cb480-2" aria-hidden="true" tabindex="-1"></a> inputTempFileName = temporary-input.md,</span>
-<span id="cb480-3"><a href="#cb480-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
-<h3 data-number="2.2.6" id="latexthemes"><span
-class="header-section-number">2.2.6</span> Themes</h3>
+<div class="sourceCode" id="cb484"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb484-1"><a href="#cb484-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
+<span id="cb484-2"><a href="#cb484-2" aria-hidden="true" tabindex="-1"></a> inputTempFileName = temporary-input.md,</span>
+<span id="cb484-3"><a href="#cb484-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div>
+<h4 data-number="2.2.3.2" id="latexthemes"><span
+class="header-section-number">2.2.3.2</span> Themes</h4>
<p>In <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>, we expand
on the concept of <a href="#themes">themes</a> by allowing a theme to be
a full-blown <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>
@@ -8443,11 +8525,11 @@ developers can load the <code>.tex</code> theme file from the
<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="cb481"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb481-1"><a href="#cb481-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[</span>
-<span id="cb481-2"><a href="#cb481-2" aria-hidden="true" tabindex="-1"></a> import=witiko/beamer/MU,</span>
-<span id="cb481-3"><a href="#cb481-3" aria-hidden="true" tabindex="-1"></a> import=witiko/dot,</span>
-<span id="cb481-4"><a href="#cb481-4" aria-hidden="true" tabindex="-1"></a>]{<span class="ex">markdown</span>}</span></code></pre></div>
+<div class="sourceCode" id="cb485"><pre
+class="sourceCode tex"><code class="sourceCode latex"><span id="cb485-1"><a href="#cb485-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[</span>
+<span id="cb485-2"><a href="#cb485-2" aria-hidden="true" tabindex="-1"></a> import=witiko/beamer/MU,</span>
+<span id="cb485-3"><a href="#cb485-3" aria-hidden="true" tabindex="-1"></a> import=witiko/dot,</span>
+<span id="cb485-4"><a href="#cb485-4" aria-hidden="true" tabindex="-1"></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
@@ -8455,110 +8537,6 @@ class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document.</p>
<p>Built-in <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>
themes provided with the Markdown package include:</p>
<dl>
-<dt><code><strong>witiko/dot</strong></code></dt>
-<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
-<code><strong>frozenCache</strong></code> plain <span
-class="tex">T<sub>e</sub>X</span> option is enabled.</p>
-</dd>
-</dl>
-<h5 class="unnumbered" 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="cb482"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb482-1"><a href="#cb482-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb482-2"><a href="#cb482-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[import=witiko/dot]{<span class="ex">markdown</span>}</span>
-<span id="cb482-3"><a href="#cb482-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\setkeys</span>{Gin}{</span>
-<span id="cb482-4"><a href="#cb482-4" aria-hidden="true" tabindex="-1"></a> width=<span class="fu">\columnwidth</span>,</span>
-<span id="cb482-5"><a href="#cb482-5" aria-hidden="true" tabindex="-1"></a> height=0.65<span class="fu">\paperheight</span>,</span>
-<span id="cb482-6"><a href="#cb482-6" aria-hidden="true" tabindex="-1"></a> keepaspectratio}</span>
-<span id="cb482-7"><a href="#cb482-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb482-8"><a href="#cb482-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb482-9"><a href="#cb482-9" aria-hidden="true" tabindex="-1"></a>``` dot Various formats of mathemathical formulae</span>
-<span id="cb482-10"><a href="#cb482-10" aria-hidden="true" tabindex="-1"></a>digraph tree {</span>
-<span id="cb482-11"><a href="#cb482-11" aria-hidden="true" tabindex="-1"></a> margin = 0;</span>
-<span id="cb482-12"><a href="#cb482-12" aria-hidden="true" tabindex="-1"></a> rankdir = &quot;LR&quot;;</span>
-<span id="cb482-13"><a href="#cb482-13" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb482-14"><a href="#cb482-14" aria-hidden="true" tabindex="-1"></a> latex -&gt; pmml;</span>
-<span id="cb482-15"><a href="#cb482-15" aria-hidden="true" tabindex="-1"></a> latex -&gt; cmml;</span>
-<span id="cb482-16"><a href="#cb482-16" aria-hidden="true" tabindex="-1"></a> pmml -&gt; slt;</span>
-<span id="cb482-17"><a href="#cb482-17" aria-hidden="true" tabindex="-1"></a> cmml -&gt; opt;</span>
-<span id="cb482-18"><a href="#cb482-18" aria-hidden="true" tabindex="-1"></a> cmml -&gt; prefix;</span>
-<span id="cb482-19"><a href="#cb482-19" aria-hidden="true" tabindex="-1"></a> cmml -&gt; infix;</span>
-<span id="cb482-20"><a href="#cb482-20" aria-hidden="true" tabindex="-1"></a> pmml -&gt; mterms [style=dashed];</span>
-<span id="cb482-21"><a href="#cb482-21" aria-hidden="true" tabindex="-1"></a> cmml -&gt; mterms;</span>
-<span id="cb482-22"><a href="#cb482-22" aria-hidden="true" tabindex="-1"></a></span>
-<span id="cb482-23"><a href="#cb482-23" aria-hidden="true" tabindex="-1"></a> latex [label = &quot;LaTeX&quot;];</span>
-<span id="cb482-24"><a href="#cb482-24" aria-hidden="true" tabindex="-1"></a> pmml [label = &quot;Presentation MathML&quot;];</span>
-<span id="cb482-25"><a href="#cb482-25" aria-hidden="true" tabindex="-1"></a> cmml [label = &quot;Content MathML&quot;];</span>
-<span id="cb482-26"><a href="#cb482-26" aria-hidden="true" tabindex="-1"></a> slt [label = &quot;Symbol Layout Tree&quot;];</span>
-<span id="cb482-27"><a href="#cb482-27" aria-hidden="true" tabindex="-1"></a> opt [label = &quot;Operator Tree&quot;];</span>
-<span id="cb482-28"><a href="#cb482-28" aria-hidden="true" tabindex="-1"></a> prefix [label = &quot;Prefix&quot;];</span>
-<span id="cb482-29"><a href="#cb482-29" aria-hidden="true" tabindex="-1"></a> infix [label = &quot;Infix&quot;];</span>
-<span id="cb482-30"><a href="#cb482-30" aria-hidden="true" tabindex="-1"></a> mterms [label = &quot;M-Terms&quot;];</span>
-<span id="cb482-31"><a href="#cb482-31" aria-hidden="true" tabindex="-1"></a>}</span>
-<span id="cb482-32"><a href="#cb482-32" aria-hidden="true" tabindex="-1"></a>```</span>
-<span id="cb482-33"><a href="#cb482-33" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb482-34"><a href="#cb482-34" aria-hidden="true" tabindex="-1"></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="cb483"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb483-1"><a href="#cb483-1" aria-hidden="true" tabindex="-1"></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>
-</blockquote>
-<dl>
-<dt><code><strong>witiko/graphicx/http</strong></code></dt>
-<dd>
-<p>A theme that adds support for downloading images whose URL has the
-http or https protocol. The theme requires the
-<code><strong>catchfile</strong></code> <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
-<code><strong>frozenCache</strong></code> plain <span
-class="tex">T<sub>e</sub>X</span> option is enabled.</p>
-</dd>
-</dl>
-<h5 class="unnumbered" 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="cb484"><pre
-class="sourceCode tex"><code class="sourceCode latex"><span id="cb484-1"><a href="#cb484-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
-<span id="cb484-2"><a href="#cb484-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[import=witiko/graphicx/http]{<span class="ex">markdown</span>}</span>
-<span id="cb484-3"><a href="#cb484-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span>
-<span id="cb484-4"><a href="#cb484-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span>
-<span id="cb484-5"><a href="#cb484-5" aria-hidden="true" tabindex="-1"></a>![img](https://github.com/witiko/markdown/raw/main/markdown.png</span>
-<span id="cb484-6"><a href="#cb484-6" aria-hidden="true" tabindex="-1"></a> &quot;The banner of the Markdown package&quot;)</span>
-<span id="cb484-7"><a href="#cb484-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span>
-<span id="cb484-8"><a href="#cb484-8" aria-hidden="true" tabindex="-1"></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="cb485"><pre
-class="sourceCode sh"><code class="sourceCode bash"><span id="cb485-1"><a href="#cb485-1" aria-hidden="true" tabindex="-1"></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>
-<img src="https://github.com/witiko/markdown/raw/main/markdown.png"
-title="The banner of the Markdown package" alt="img" />
-<figcaption aria-hidden="true">img</figcaption>
-</figure>
-</blockquote>
-<dl>
<dt><code><strong>witiko/markdown/defaults</strong></code></dt>
<dd>
<p>A <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> theme with
@@ -8567,8 +8545,11 @@ class="tex">T<sub>e</sub>X</span>. This theme is loaded automatically
together with the package and explicitly loading it has no effect.</p>
</dd>
</dl>
-<h3 data-number="2.2.7" id="themes-1"><span
-class="header-section-number">2.2.7</span> Themes</h3>
+<h3 data-number="2.2.4" id="context-1"><span
+class="header-section-number">2.2.4</span> Con<span
+class="tex">T<sub>e</sub>X</span>t</h3>
+<h4 data-number="2.2.4.1" id="contextthemes"><span
+class="header-section-number">2.2.4.1</span> Themes</h4>
<p>In Con<span class="tex">T<sub>e</sub>X</span>t, we expand on the
concept of <a href="#themes">themes</a> by allowing a theme to be a
full-blown Con<span class="tex">T<sub>e</sub>X</span>t module.
@@ -11889,7 +11870,7 @@ class="tex">T<sub>e</sub>X</span> Example</h5>
<div class="sourceCode" id="cb629"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb629-1"><a href="#cb629-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span>
<span id="cb629-2"><a href="#cb629-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStrikeThrough</span>{true}</span>
-<span id="cb629-3"><a href="#cb629-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> soulutf8.sty</span>
+<span id="cb629-3"><a href="#cb629-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> soul.sty</span>
<span id="cb629-4"><a href="#cb629-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\st</span>{#1}}</span>
<span id="cb629-5"><a href="#cb629-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span>
<span id="cb629-6"><a href="#cb629-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span>
@@ -11910,7 +11891,7 @@ class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5>
<div class="sourceCode" id="cb631"><pre
class="sourceCode tex"><code class="sourceCode latex"><span id="cb631-1"><a href="#cb631-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span>
<span id="cb631-2"><a href="#cb631-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[strikeThrough]{<span class="ex">markdown</span>}</span>
-<span id="cb631-3"><a href="#cb631-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soulutf8</span>}</span>
+<span id="cb631-3"><a href="#cb631-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soul</span>}</span>
<span id="cb631-4"><a href="#cb631-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span>
<span id="cb631-5"><a href="#cb631-5" aria-hidden="true" tabindex="-1"></a> renderers = {</span>
<span id="cb631-6"><a href="#cb631-6" aria-hidden="true" tabindex="-1"></a> strikeThrough = {<span class="fu">\st</span>{#1}},</span>
diff --git a/macros/generic/markdown/markdown.ins b/macros/generic/markdown/markdown.ins
index c0ee2662d5..3402d668eb 100644
--- a/macros/generic/markdown/markdown.ins
+++ b/macros/generic/markdown/markdown.ins
@@ -12,9 +12,6 @@
\file{markdown.tex}{\from{markdown.dtx}{tex}}
\file{markdown.sty}{\from{markdown.dtx}{latex}}
\file{t-markdown.tex}{\from{markdown.dtx}{context}}
- \file{markdownthemewitiko_dot.sty}{\from{markdown.dtx}{themes-witiko-dot}}
- \file{markdownthemewitiko_graphicx_http.sty}{\from{markdown.dtx}{themes-witiko-graphicx-http}}
- \file{markdownthemewitiko_tilde.tex}{\from{markdown.dtx}{themes-witiko-tilde}}
\file{markdownthemewitiko_markdown_defaults.tex}{\from{markdown.dtx}{themes-witiko-markdown-defaults-tex}}
\file{markdownthemewitiko_markdown_defaults.sty}{\from{markdown.dtx}{themes-witiko-markdown-defaults-latex}}
\file{t-markdownthemewitiko_markdown_defaults.tex}{\from{markdown.dtx}{themes-witiko-markdown-defaults-ctx}}
diff --git a/macros/generic/markdown/markdown.pdf b/macros/generic/markdown/markdown.pdf
index f2d56f280d..9464507bbc 100644
--- a/macros/generic/markdown/markdown.pdf
+++ b/macros/generic/markdown/markdown.pdf
Binary files differ