diff options
author | Norbert Preining <norbert@preining.info> | 2022-10-04 03:00:59 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-10-04 03:00:59 +0000 |
commit | 30b3429f0e138c93c5f1ba1d1a6d46728c0943e9 (patch) | |
tree | 6c15cc0a1c291188deaa6f1c37d469d4e4dd27c7 /macros/generic/markdown | |
parent | 0ec122c100e39ea118fdb2c4b6223ece8053f439 (diff) |
CTAN sync 202210040300
Diffstat (limited to 'macros/generic/markdown')
-rw-r--r-- | macros/generic/markdown/CHANGES.md | 20 | ||||
-rw-r--r-- | macros/generic/markdown/VERSION | 2 | ||||
-rw-r--r-- | macros/generic/markdown/examples/context-mkii.tex | 1 | ||||
-rw-r--r-- | macros/generic/markdown/examples/context-mkiv.tex | 1 | ||||
-rw-r--r-- | macros/generic/markdown/examples/latex.tex | 1 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.dtx | 643 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.html | 13956 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.pdf | bin | 888520 -> 895604 bytes |
8 files changed, 8863 insertions, 5761 deletions
diff --git a/macros/generic/markdown/CHANGES.md b/macros/generic/markdown/CHANGES.md index fae1a5a717..077fb63c99 100644 --- a/macros/generic/markdown/CHANGES.md +++ b/macros/generic/markdown/CHANGES.md @@ -1,6 +1,24 @@ # Changes -## 2.17.0 (2022-10-01) +## 2.17.1 (2022-10-03) + +Fixes: + +- Add `debugExtensions` and `debugExtensionsFileName` Lua options for debugging + user-defined syntax extensions. (#191, #192) + - Add a third optional argument to the `reader->insert_pattern()` method and + increment `user_extension_api_version` to `2`. This change is fully + backwards-compatible with the `user_extension_api_version` of `1`. + (658fbbe) + - Fix typos in example code for user-defined syntax extensions. + (7c6de52, d3195f7) + +Documentation: + +- Move `contentBlocksLanguageMap` option to the file and directory names + section of the technical documentation. (dd564f2) + +## 2.17.0 (2022-09-30) Development: diff --git a/macros/generic/markdown/VERSION b/macros/generic/markdown/VERSION index 3b4985a362..5435cd30d6 100644 --- a/macros/generic/markdown/VERSION +++ b/macros/generic/markdown/VERSION @@ -1 +1 @@ -2.17.0-0-g6428569 (2022-09-30) +2.17.1-0-g8ca83f5 (2022-10-03) diff --git a/macros/generic/markdown/examples/context-mkii.tex b/macros/generic/markdown/examples/context-mkii.tex index 13ce98fd60..77809fa16b 100644 --- a/macros/generic/markdown/examples/context-mkii.tex +++ b/macros/generic/markdown/examples/context-mkii.tex @@ -10,6 +10,7 @@ \setupmarkdown [ hashEnumerators = yes, + debugExtensions = yes, definitionLists = yes, smartEllipses = yes, footnotes = yes, diff --git a/macros/generic/markdown/examples/context-mkiv.tex b/macros/generic/markdown/examples/context-mkiv.tex index 415cf2a4dd..8849e7bd66 100644 --- a/macros/generic/markdown/examples/context-mkiv.tex +++ b/macros/generic/markdown/examples/context-mkiv.tex @@ -10,6 +10,7 @@ \setupmarkdown [ hashEnumerators = yes, + debugExtensions = yes, definitionLists = yes, smartEllipses = yes, footnotes = yes, diff --git a/macros/generic/markdown/examples/latex.tex b/macros/generic/markdown/examples/latex.tex index cb2bce39b8..2403caf1e9 100644 --- a/macros/generic/markdown/examples/latex.tex +++ b/macros/generic/markdown/examples/latex.tex @@ -17,6 +17,7 @@ \usepackage{booktabs} \usepackage[ hashEnumerators, + debugExtensions, definitionLists, footnotes, inlineFootnotes, diff --git a/macros/generic/markdown/markdown.dtx b/macros/generic/markdown/markdown.dtx index f419af48a2..2e3e12e15d 100644 --- a/macros/generic/markdown/markdown.dtx +++ b/macros/generic/markdown/markdown.dtx @@ -1653,12 +1653,17 @@ local walkable_syntax = { % \begin{markdown} % % The \luamref{reader->insert_pattern} method inserts a \acro{peg} pattern into -% the grammar of markdown. The method receives two arguments: a selector string -% in the form `"`\meta{left-hand side terminal symbol} \meta{`before`, `after`, -% or `instead of`} \meta{right-hand side terminal symbol}`"` and a \acro{peg} -% pattarn to insert. For example. if we'd like to insert `pattern` into the -% grammar between the `Inline -> Emph` and `Inline -> Link` rules, we would -% call \luamref{reader->insert_pattern} with `"Inline after Emph"` (or `"Inline +% the grammar of markdown. The method receives two mandatory arguments: a +% selector string in the form `"`\meta{left-hand side terminal symbol} +% \meta{`before`, `after`, or `instead of`} \meta{right-hand side terminal +% symbol}`"` and a \acro{peg} pattern to insert, and an optional third argument +% with a name of the \acro{peg} pattern for debugging purposes (see the +% \Opt{debugExtensions} option). The name does not need to be unique and shall +% not be interpreted by the Markdown package; you can treat it as a comment. +% +% For example. if we'd like to insert `pattern` into the grammar between the +% `Inline -> Emph` and `Inline -> Link` rules, we would call +% \luamref{reader->insert_pattern} with `"Inline after Emph"` (or `"Inline % before Link"`) and `pattern` as the arguments. % % The \luamdef{reader->add_special_character} method adds a new character with @@ -2278,6 +2283,219 @@ defaultOptions.cacheDir = "." %</lua,lua-cli> %<*manual-options> +#### Option `contentBlocksLanguageMap` + +`contentBlocksLanguageMap` (default value: `"markdown-languages.json"`) + +% \fi +% \begin{markdown} +% +% \Valitem[markdown-languages.json]{contentBlocksLanguageMap}{filename} +% +: The filename of the \acro{JSON} file that maps filename extensions to + programming language names in the iA\,Writer content blocks when the + \Opt{contentBlocks} option is enabled. +% See Section <#sec:texcontentblockrenderers> for more information. + +% \end{markdown} +% \iffalse + +##### \LaTeX{} Example {.unnumbered} + +Using a text editor, create a text document named `table.csv` with the +following content: +``` csv +Name,Surname,Born +Albert,Einstein,1879 +Marie,Curie,1867 +Thomas,Edison,1847 +``````` +Create also a text document named `language-map.json` with the following +content: +``` js +{ + "tex": "LaTeX" +} +`````` +Create also a text document named `code.tex` with the following content: +``` tex +This is an example code listing in \LaTeX. +``````` +Create also a text document named `part.md` with the following content: +``` md +This is a *transcluded markdown document*. +`````` +Create also a text document named `document.tex` with the following content: +``` tex +\documentclass{article} +\usepackage{minted} +\usepackage[contentBlocks]{markdown} +\markdownSetup{ + contentBlocksLanguageMap = {language-map.json}, +} +\begin{document} +\begin{markdown} +/table.csv (An example table) +/code.tex (An example code listing) +/part.md (A file transclusion example) +\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 text: + +> | Name | Surname | Born | +> | ------ | ---------| ---- | +> | Albert | Einstein | 1879 | +> | Marie | Curie | 1867 | +> | Thomas | Edison | 1847 | +> +> Table 1: An example table +> +> ``` tex +> This is an example code listing in \LaTeX. +> ``````` +> +> This is a *transcluded markdown document*. + +##### \Hologo{ConTeXt} Example {.unnumbered} + +Using a text editor, create a text document named `table.csv` with the +following content: +``` csv +Name,Surname,Born +Albert,Einstein,1879 +Marie,Curie,1867 +Thomas,Edison,1847 +``````` +Create also a text document named `language-map.json` with the following +content: +``` js +{ + "tex": "ConTeXt" +} +`````` +Create also a text document named `code.tex` with the following content: +``` tex +This is an example code listing in \ConTeXt. +``````` +Create also a text document named `part.md` with the following content: +``` md +This is a *transcluded markdown document*. +`````` +Create also a text document named `document.tex` with the following content: +``` tex +\usemodule[t][markdown] +\setupmarkdown + [ + contentBlocks = yes, + contentBlocksLanguageMap = language-map.json, + ] +\definetyping [ConTeXt] +\setuptyping [ConTeXt] [option=TEX] +\starttext +\startmarkdown +/table.csv (An example table) +/code.tex (An example code listing) +/part.md (A file transclusion example) +\stopmarkdown +\stoptext +```````` +Next, invoke LuaTeX from the terminal: +``` sh +context document.tex +````` +A PDF document named `document.pdf` should be produced and contain the +following text: + +> | Name | Surname | Born | +> | ------ | ---------| ---- | +> | Albert | Einstein | 1879 | +> | Marie | Curie | 1867 | +> | Thomas | Edison | 1847 | +> +> Table 1: An example table +> +> ``` tex +> This is an example code listing in \ConTeXt. +> ``````` +> +> This is a *transcluded markdown document*. + +%</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\@@_add_lua_option:nnn + { contentBlocksLanguageMap } + { path } + { markdown-languages.json } +% \end{macrocode} +% \iffalse +%</tex> +%<*lua,lua-cli> +% \fi +% \begin{macrocode} +defaultOptions.contentBlocksLanguageMap = "markdown-languages.json" +% \end{macrocode} +% \par +% \iffalse +%</lua,lua-cli> +%<*manual-options> + +#### Option `debugExtensionsFileName` + +`debugExtensionsFileName` (default value: `"debug-extensions.json"`) + +% \fi +% \begin{markdown} +% +% \Valitem[debug-extensions.json]{debugExtensionsFileName}{filename} +% +: The filename of the \acro{JSON} file that will be produced when the + \Opt{debugExtensions} option is enabled. This file will contain the + extensible subset of the \acro{peg} grammar of markdown +% (see the \luamref{walkable_syntax} hash table) + after built-in syntax extensions +% (see Section <#luabuiltinextensions>) +% \iffalse + (see options \Opt{citations}, \Opt{contentBlocks}, \Opt{definitionLists}, + etc.) +% \fi + and user-defined syntax extensions +% (see Section <#luauserextensions>) +% \iffalse + (see option \Opt{extensions}) +% \fi + have been applied. + +% \end{markdown} +% \iffalse +%</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\@@_add_lua_option:nnn + { debugExtensionsFileName } + { path } + { \markdownOptionOutputDir / \jobname .debug-extensions.json } +% \end{macrocode} +% \iffalse +%</tex> +%<*lua,lua-cli> +% \fi +% \begin{macrocode} +defaultOptions.debugExtensionsFileName = "debug-extensions.json" +% \end{macrocode} +% \par +% \iffalse +%</lua,lua-cli> +%<*manual-options> + #### Option `frozenCacheFileName` `frozenCacheFileName` (default value: `"frozenCache.tex"`) @@ -2513,9 +2731,9 @@ defaultOptions.frozenCacheFileName = "frozenCache.tex" %<*manual-options> % \fi % \begin{markdown} -% +% %### Parser Options -% +% % \end{markdown} % \par % \iffalse @@ -4028,163 +4246,151 @@ defaultOptions.contentBlocks = false %</lua,lua-cli> %<*manual-options> -#### Option `contentBlocksLanguageMap` +#### Option `debugExtensions` -`contentBlocksLanguageMap` (default value: `"markdown-languages.json"`) +`debugExtensions` (default value: `false`) % \fi % \begin{markdown} % -% \Valitem[markdown-languages.json]{contentBlocksLanguageMap}{filename} +% \Optitem[false]{debugExtensions}{\opt{true}, \opt{false}} % -: The filename of the \acro{JSON} file that maps filename extensions to - programming language names in the iA\,Writer content blocks. -% See Section <#sec:texcontentblockrenderers> for more information. +: true + + : Produce a \acro{JSON} file that will contain the + extensible subset of the \acro{peg} grammar of markdown +% (see the \luamref{walkable_syntax} hash table) + after built-in syntax extensions +% (see Section <#luabuiltinextensions>) +% \iffalse + (see options \Opt{citations}, \Opt{contentBlocks}, + \Opt{definitionLists}, etc.) +% \fi + and user-defined syntax extensions +% (see Section <#luauserextensions>) +% \iffalse + (see option \Opt{extensions}) +% \fi + have been applied. This helps you to see how the different + extensions interact. The name of the produced \acro{JSON} file is + controlled by the \Opt{debugExtensionsFileName} option. + +: false + + : Do not produce a \acro{JSON} file with the \acro{peg} grammar of + markdown. % \end{markdown} % \iffalse ##### \LaTeX{} Example {.unnumbered} -Using a text editor, create a text document named `table.csv` with the +Using a text editor, create a text document named `strike-through.lua` with the following content: -``` csv -Name,Surname,Born -Albert,Einstein,1879 -Marie,Curie,1867 -Thomas,Edison,1847 -``````` -Create also a text document named `language-map.json` with the following -content: -``` js -{ - "tex": "LaTeX" +``` lua +local strike_through = { + api_version = 2, + grammar_version = 1, + finalize_grammar = function(reader) + local nonspacechar = lpeg.P(1) - lpeg.S("\t ") + local doubleslashes = lpeg.P("//") + local function between(p, starter, ender) + ender = lpeg.B(nonspacechar) * ender + return (starter * #nonspacechar + * lpeg.Ct(p * (p - ender)^0) * ender) + end + + local read_strike_through = between( + lpeg.V("Inline"), doubleslashes, doubleslashes + ) / function(s) return {"\\st{", s, "}"} end + + reader.insert_pattern("Inline after Emph", read_strike_through, + "StrikeThrough") + reader.add_special_character("/") + end } -`````` -Create also a text document named `code.tex` with the following content: -``` tex -This is an example code listing in \LaTeX. + +return strike_through ``````` -Create also a text document named `part.md` with the following content: -``` md -This is a *transcluded markdown document*. -`````` -Create also a text document named `document.tex` with the following content: +Using a text editor, create also a text document named `document.tex` with the +following content: ``` tex \documentclass{article} -\usepackage{minted} -\usepackage[contentBlocks]{markdown} -\markdownSetup{ - contentBlocksLanguageMap = {language-map.json}, -} +\usepackage{soul} +\usepackage[extension = strike-through.lua, + debugExtensions]{markdown} \begin{document} \begin{markdown} -/table.csv (An example table) -/code.tex (An example code listing) -/part.md (A file transclusion example) +This is //a lunar roving vehicle// strike-through text. \end{markdown} \end{document} ``````` Next, invoke LuaTeX from the terminal: ``` sh -lualatex --shell-escape document.tex +lualatex document.tex `````` A PDF document named `document.pdf` should be produced and contain the following text: -> | Name | Surname | Born | -> | ------ | ---------| ---- | -> | Albert | Einstein | 1879 | -> | Marie | Curie | 1867 | -> | Thomas | Edison | 1847 | -> -> Table 1: An example table -> -> ``` tex -> This is an example code listing in \LaTeX. -> ``````` -> -> This is a *transcluded markdown document*. +> This is ~~a lunar roving vehicle~~ strike-through text. -##### \Hologo{ConTeXt} Example {.unnumbered} +Furthermore, a JSON document named `document.debug-extensions.json` should also +be produced and contain the following text: -Using a text editor, create a text document named `table.csv` with the -following content: -``` csv -Name,Surname,Born -Albert,Einstein,1879 -Marie,Curie,1867 -Thomas,Edison,1847 -``````` -Create also a text document named `language-map.json` with the following -content: -``` js +``` json { - "tex": "ConTeXt" + "Block": [ + "Blockquote", + "Verbatim", + "HorizontalRule", + "BulletList", + "OrderedList", + "Heading", + "DisplayHtml", + "Paragraph", + "Plain" + ], + "Inline": [ + "Str", + "Space", + "Endline", + "UlOrStarLine", + "Strong", + "Emph", + "StrikeThrough (user-defined \"./strike-through.lua\" syntax extension)", + "Link", + "Image", + "Code", + "AutoLinkUrl", + "AutoLinkEmail", + "AutoLinkRelativeReference", + "InlineHtml", + "HtmlEntity", + "EscapedChar", + "Smart", + "Symbol" + ] } -`````` -Create also a text document named `code.tex` with the following content: -``` tex -This is an example code listing in \ConTeXt. -``````` -Create also a text document named `part.md` with the following content: -``` md -This is a *transcluded markdown document*. -`````` -Create also a text document named `document.tex` with the following content: -``` tex -\usemodule[t][markdown] -\setupmarkdown - [ - contentBlocks = yes, - contentBlocksLanguageMap = language-map.json, - ] -\definetyping [ConTeXt] -\setuptyping [ConTeXt] [option=TEX] -\starttext -\startmarkdown -/table.csv (An example table) -/code.tex (An example code listing) -/part.md (A file transclusion example) -\stopmarkdown -\stoptext ```````` -Next, invoke LuaTeX from the terminal: -``` sh -context document.tex -````` -A PDF document named `document.pdf` should be produced and contain the -following text: -> | Name | Surname | Born | -> | ------ | ---------| ---- | -> | Albert | Einstein | 1879 | -> | Marie | Curie | 1867 | -> | Thomas | Edison | 1847 | -> -> Table 1: An example table -> -> ``` tex -> This is an example code listing in \ConTeXt. -> ``````` -> -> This is a *transcluded markdown document*. +This output shows us that our user-defined syntax extension has been correctly +inserted to the grammar of markdown. %</manual-options> %<*tex> % \fi % \begin{macrocode} \@@_add_lua_option:nnn - { contentBlocksLanguageMap } - { path } - { markdown-languages.json } + { debugExtensions } + { boolean } + { false } % \end{macrocode} % \iffalse %</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} -defaultOptions.contentBlocksLanguageMap = "markdown-languages.json" +defaultOptions.debugExtensions = false % \end{macrocode} % \par % \iffalse @@ -4449,7 +4655,7 @@ defaultOptions.eagerCache = true % % ``` lua % local strike_through = { -% api_version = 1, +% api_version = 2, % grammar_version = 1, % finalize_grammar = function(reader) % local nonspacechar = lpeg.P(1) - lpeg.S("\t ") @@ -4461,10 +4667,11 @@ defaultOptions.eagerCache = true % end % % local read_strike_through = between( -% lpeg.V("Inline"), doubletildes, doubletildes +% lpeg.V("Inline"), doubleslashes, doubleslashes % ) / function(s) return {"\\st{", s, "}"} end % -% reader.insert_pattern("Inline after Emph", read_strike_through) +% reader.insert_pattern("Inline after Emph", read_strike_through, +% "StrikeThrough") % reader.add_special_character("/") % end % } @@ -4483,7 +4690,7 @@ defaultOptions.eagerCache = true %<*lua> % \fi % \begin{macrocode} -metadata.user_extension_api_version = 1 +metadata.user_extension_api_version = 2 metadata.grammar_version = 1 % \end{macrocode} % \iffalse @@ -4513,7 +4720,7 @@ Using a text editor, create a text document named `strike-through.lua` with the following content: ``` lua local strike_through = { - api_version = 1, + api_version = 2, grammar_version = 1, finalize_grammar = function(reader) local nonspacechar = lpeg.P(1) - lpeg.S("\t ") @@ -4525,13 +4732,16 @@ local strike_through = { end local read_strike_through = between( - lpeg.V("Inline"), doubletildes, doubletildes + lpeg.V("Inline"), doubleslashes, doubleslashes ) / function(s) return {"\\st{", s, "}"} end - reader.insert_pattern("Inline after Emph", read_strike_through) + reader.insert_pattern("Inline after Emph", read_strike_through, + "StrikeThrough") reader.add_special_character("/") end } + +return strike_through ``````` Using a text editor, create also a text document named `document.tex` with the following content: @@ -17116,6 +17326,20 @@ end % \par % \begin{markdown} % +% The \luamdef{util.encode_json_string} method encodes a string `s` in +% \acro{JSON}. +% +% \end{markdown} +% \begin{macrocode} +function util.encode_json_string(s) + s = s:gsub([[\]], [[\\]]) + s = s:gsub([["]], [[\"]]) + return [["]] .. s .. [["]] +end +% \end{macrocode} +% \par +% \begin{markdown} +% % The \luamdef{util.lookup_files} method looks up files with filename `f` % and returns its path. If the \pkg{kpathsea} library is available, it will % search for files not only in the current working directory but also in the @@ -21495,16 +21719,15 @@ function M.reader.new(writer, options) % \par % \begin{markdown} % -% Define \luamref{reader->insert_pattern} as a function that receives two -% arguments: a selector string in the form `"`\meta{left-hand side terminal -% symbol} \meta{`before`, `after`, or `instead of`} \meta{right-hand side -% terminal symbol}`"` and a \acro{peg} pattarn to insert. The function adds -% the pattern to \luamref{walkable_syntax}`[`*left-hand side terminal -% symbol*`]` before or after *right-hand side terminal symbol*. +% The \luamref{reader->insert_pattern} method adds a pattern to +% \luamref{walkable_syntax}`[`*left-hand side terminal symbol*`]` before, +% instead of, or after a right-hand-side terminal symbol. % % \end{markdown} % \begin{macrocode} - self.insert_pattern = function(selector, pattern) + local current_extension_name = nil + self.insert_pattern = function(selector, pattern, pattern_name) + assert(pattern_name == nil or type(pattern_name) == "string") local _, _, lhs, pos, rhs = selector:find("^(%a+)%s+([%a%s]+%a+)%s+(%a+)$") assert(lhs ~= nil, [[Expected selector in form "LHS (before|after|instead of) RHS", not "]] @@ -21528,10 +21751,19 @@ function M.reader.new(writer, options) assert(index ~= nil, [[Rule ]] .. lhs .. [[ -> ]] .. rhs .. [[ does not exist in markdown grammar]]) + local accountable_pattern + if current_extension_name then + accountable_pattern = { pattern, current_extension_name, pattern_name } + else + assert(type(pattern) == "string", + [[reader->insert_pattern() was called outside an extension with ]] + .. [[a PEG pattern instead of a rule name]]) + accountable_pattern = pattern + end if pos == "instead of" then - rule[index] = pattern + rule[index] = accountable_pattern else - table.insert(rule, index, pattern) + table.insert(rule, index, accountable_pattern) end end % \end{macrocode} @@ -21596,17 +21828,19 @@ function M.reader.new(writer, options) % \par % \begin{markdown} % -% Define \luamref{reader->update_rule} as a function that receives two arguments: -% a left-hand side terminal symbol and a \acro{peg} pattarn. The function -% (re)defines \luamref{walkable_syntax}`[`left-hand side terminal symbol`]` to -% be equal to pattern. +% Define \luamref{reader->update_rule} as a function that receives two +% arguments: a left-hand side terminal symbol and a \acro{peg} pattern. +% The function (re)defines \luamref{walkable_syntax}`[`left-hand side terminal +% symbol`]` to be equal to pattern. % % \end{markdown} % \begin{macrocode} self.update_rule = function(rule_name, pattern) + assert(current_extension_name ~= nil) assert(syntax[rule_name] ~= nil, [[Rule ]] .. rule_name .. [[ -> ... does not exist in markdown grammar]]) - walkable_syntax[rule_name] = { pattern } + local accountable_pattern = { pattern, current_extension_name, rule_name } + walkable_syntax[rule_name] = { accountable_pattern } end % \end{macrocode} % \par @@ -21640,9 +21874,68 @@ function M.reader.new(writer, options) % \end{markdown} % \begin{macrocode} for _, extension in ipairs(extensions) do + current_extension_name = extension.name extension.extend_writer(writer) extension.extend_reader(self) end + current_extension_name = nil +% \end{macrocode} +% \par +% \begin{markdown} +% +% If the \Opt{debugExtensions} option is enabled, serialize +% \luamref{walkable_syntax} to a \acro{JSON} for debugging purposes. +% +% \end{markdown} +% \begin{macrocode} + if options.debugExtensions then + local sorted_lhs = {} + for lhs, _ in pairs(walkable_syntax) do + table.insert(sorted_lhs, lhs) + end + table.sort(sorted_lhs) + + local output_lines = {"{"} + for lhs_index, lhs in ipairs(sorted_lhs) do + local encoded_lhs = util.encode_json_string(lhs) + table.insert(output_lines, [[ ]] ..encoded_lhs .. [[: []]) + local rule = walkable_syntax[lhs] + for rhs_index, rhs in ipairs(rule) do + local human_readable_rhs + if type(rhs) == "string" then + human_readable_rhs = rhs + else + local pattern_name + if rhs[3] then + pattern_name = rhs[3] + else + pattern_name = "Anonymous Pattern" + end + local extension_name = rhs[2] + human_readable_rhs = pattern_name .. [[ (]] .. extension_name .. [[)]] + end + local encoded_rhs = util.encode_json_string(human_readable_rhs) + local output_line = [[ ]] .. encoded_rhs + if rhs_index < #rule then + output_line = output_line .. "," + end + table.insert(output_lines, output_line) + end + local output_line = " ]" + if lhs_index < #sorted_lhs then + output_line = output_line .. "," + end + table.insert(output_lines, output_line) + end + table.insert(output_lines, "}") + + local output = table.concat(output_lines, "\n") + local output_filename = options.debugExtensionsFileName + local output_file = assert(io.open(output_filename, "w"), + [[Could not open file "]] .. output_filename .. [[" for writing]]) + assert(output_file:write(output)) + assert(output_file:close()) + end % \end{macrocode} % \par % \begin{markdown} @@ -21672,10 +21965,24 @@ function M.reader.new(writer, options) syntax[lhs] = parsers.fail for _, rhs in ipairs(rule) do local pattern +% \end{macrocode} +% \begin{markdown} +% +% Although the interface of the \luamref{reader->insert_pattern} method does +% document this (see Section <#luauserextensions>), we allow the +% \luamref{reader->insert_pattern} and \luamref{reader->update_rule} +% methods to insert not just \acro{peg} patterns, but also rule names that +% reference the \acro{peg} grammar of Markdown. +% +% \end{markdown} +% \begin{macrocode} if type(rhs) == "string" then pattern = V(rhs) else - pattern = rhs + pattern = rhs[1] + if type(pattern) == "string" then + pattern = V(pattern) + end end syntax[lhs] = syntax[lhs] + pattern end @@ -21684,9 +21991,9 @@ function M.reader.new(writer, options) % \par % \begin{markdown} % -% Finalize the parser by enabling built-in syntax extensions and producing -% special parsers for difficult edge cases such as blocks nested in definition -% lists or inline content nested in link, note, and image labels. +% Finalize the parser by reacting to options and by producing special parsers +% for difficult edge cases such as blocks nested in definition lists or +% inline content nested in link, note, and image labels. % % \end{markdown} % \begin{macrocode} @@ -21877,6 +22184,7 @@ M.extensions.citations = function(citation_nbsps) ["#"] = "\\markdownRendererHash{}", } return { + name = "built-in citations syntax extension", extend_writer = function(self) local options = self.options @@ -22046,7 +22354,8 @@ M.extensions.citations = function(citation_nbsps) local Citations = TextCitations + ParenthesizedCitations - self.insert_pattern("Inline after Emph", Citations) + self.insert_pattern("Inline after Emph", + Citations, "Citations") self.add_special_character("@") self.add_special_character("-") @@ -22101,6 +22410,7 @@ M.extensions.content_blocks = function(language_map) end)() return { + name = "built-in content_blocks syntax extension", extend_writer = function(self) % \end{macrocode} % \par @@ -22211,7 +22521,8 @@ M.extensions.content_blocks = function(language_map) * contentblock_tail / writer.contentblock - self.insert_pattern("Block before Blockquote", ContentBlock) + self.insert_pattern("Block before Blockquote", + ContentBlock, "ContentBlock") end } end @@ -22228,6 +22539,7 @@ end % \begin{macrocode} M.extensions.definition_lists = function(tight_lists) return { + name = "built-in definition_lists syntax extension", extend_writer = function(self) % \end{macrocode} % \par @@ -22309,7 +22621,8 @@ M.extensions.definition_lists = function(tight_lists) * -DefinitionListItemLoose * Cc(true)) ) / writer.definitionlist - self.insert_pattern("Block after Heading", DefinitionList) + self.insert_pattern("Block after Heading", + DefinitionList, "DefinitionList") end } end @@ -22327,6 +22640,7 @@ end % \begin{macrocode} M.extensions.fenced_code = function(blank_before_code_fence) return { + name = "built-in fenced_code syntax extension", extend_writer = function(self) local options = self.options @@ -22411,7 +22725,7 @@ M.extensions.fenced_code = function(blank_before_code_fence) end self.insert_pattern("Block after Verbatim", - FencedCode) + FencedCode, "FencedCode") local fencestart if blank_before_code_fence then @@ -22444,6 +22758,7 @@ end M.extensions.footnotes = function(footnotes, inline_footnotes) assert(footnotes or inline_footnotes) return { + name = "built-in footnotes syntax extension", extend_writer = function(self) % \end{macrocode} % \par @@ -22467,7 +22782,8 @@ M.extensions.footnotes = function(footnotes, inline_footnotes) * (parsers.tag / self.parser_functions.parse_inlines_no_inline_note) / writer.note - self.insert_pattern("Inline after Emph", InlineNote) + self.insert_pattern("Inline after Emph", + InlineNote, "InlineNote") end if footnotes then local function strip_first_char(s) @@ -22509,7 +22825,8 @@ M.extensions.footnotes = function(footnotes, inline_footnotes) local Blank = NoteBlock + parsers.Blank self.update_rule("Blank", Blank) - self.insert_pattern("Inline after Emph", NoteRef) + self.insert_pattern("Inline after Emph", + NoteRef, "NoteRef") end self.add_special_character("^") @@ -22528,6 +22845,7 @@ end % \begin{macrocode} M.extensions.header_attributes = function() return { + name = "built-in header_attributes syntax extension", extend_writer = function() end, extend_reader = function(self) local parsers = self.parsers @@ -22595,6 +22913,7 @@ end % \begin{macrocode} M.extensions.jekyll_data = function(expect_jekyll_data) return { + name = "built-in jekyll_data syntax extension", extend_writer = function(self) % \end{macrocode} % \par @@ -22728,7 +23047,8 @@ M.extensions.jekyll_data = function(expect_jekyll_data) * JekyllData * (P("---") + P("..."))^-1 - self.insert_pattern("Block before Blockquote", UnexpectedJekyllData) + self.insert_pattern("Block before Blockquote", + UnexpectedJekyllData, "UnexpectedJekyllData") if expect_jekyll_data then self.update_rule("ExpectedJekyllData", ExpectedJekyllData) end @@ -22803,6 +23123,7 @@ M.extensions.pipe_tables = function(table_captions) end return { + name = "built-in pipe_tables syntax extension", extend_writer = function(self) % \end{macrocode} % \par @@ -22892,7 +23213,8 @@ M.extensions.pipe_tables = function(table_captions) * table_caption^-1 / writer.table - self.insert_pattern("Block after Blockquote", PipeTable) + self.insert_pattern("Block after Blockquote", + PipeTable, "PipeTable") end } end @@ -22908,6 +23230,7 @@ end % \begin{macrocode} M.extensions.strike_through = function() return { + name = "built-in strike_through syntax extension", extend_writer = function(self) % \end{macrocode} % \par @@ -22930,7 +23253,8 @@ M.extensions.strike_through = function() parsers.doubletildes) ) / writer.strike_through - self.insert_pattern("Inline after Emph", StrikeThrough) + self.insert_pattern("Inline after Emph", + StrikeThrough, "StrikeThrough") self.add_special_character("~") end @@ -22948,6 +23272,7 @@ end % \begin{macrocode} M.extensions.superscripts = function() return { + name = "built-in superscripts syntax extension", extend_writer = function(self) % \end{macrocode} % \par @@ -22969,7 +23294,8 @@ M.extensions.superscripts = function() parsers.between(parsers.Str, parsers.circumflex, parsers.circumflex) ) / writer.superscript - self.insert_pattern("Inline after Emph", Superscript) + self.insert_pattern("Inline after Emph", + Superscript, "Superscript") self.add_special_character("^") end @@ -22987,6 +23313,7 @@ end % \begin{macrocode} M.extensions.subscripts = function() return { + name = "built-in subscripts syntax extension", extend_writer = function(self) % \end{macrocode} % \par @@ -23008,7 +23335,8 @@ M.extensions.subscripts = function() parsers.between(parsers.Str, parsers.tilde, parsers.tilde) ) / writer.subscript - self.insert_pattern("Inline after Emph", Subscript) + self.insert_pattern("Inline after Emph", + Subscript, "Subscript") self.add_special_character("~") end @@ -23026,6 +23354,7 @@ end % \begin{macrocode} M.extensions.fancy_lists = function() return { + name = "built-in fancy_lists syntax extension", extend_writer = function(self) local options = self.options @@ -23358,7 +23687,8 @@ function M.new(options) .. [[" specifies field "api_version" of type "]] .. type(user_extension.api_version) .. [[" but "number" was expected]]) - assert(user_extension.api_version == metadata.user_extension_api_version, + assert(user_extension.api_version > 0 + and user_extension.api_version <= metadata.user_extension_api_version, [[User-defined syntax extension "]] .. pathname .. [[" uses syntax extension API version "]] .. user_extension.api_version .. [[ but markdown.lua ]] @@ -23399,6 +23729,7 @@ function M.new(options) % \end{markdown} % \begin{macrocode} local extension = { + name = [[user-defined "]] .. pathname .. [[" syntax extension]], extend_reader = user_extension.finalize_grammar, extend_writer = function() end, } diff --git a/macros/generic/markdown/markdown.html b/macros/generic/markdown/markdown.html index 834e756529..edd58f157d 100644 --- a/macros/generic/markdown/markdown.html +++ b/macros/generic/markdown/markdown.html @@ -16,6 +16,7 @@ pre > code.sourceCode { white-space: pre; position: relative; } pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } pre > code.sourceCode > span:empty { height: 1.2em; } + .sourceCode { overflow: visible; } code.sourceCode > span { color: inherit; text-decoration: inherit; } div.sourceCode { margin: 1em 0; } pre.sourceCode { margin: 0; } @@ -50,7 +51,7 @@ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.at { color: #7d9029; } /* Attribute */ code span.bn { color: #40a070; } /* BaseN */ - code span.bu { } /* BuiltIn */ + code span.bu { color: #008000; } /* BuiltIn */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.ch { color: #4070a0; } /* Char */ code span.cn { color: #880000; } /* Constant */ @@ -63,7 +64,7 @@ code span.ex { } /* Extension */ code span.fl { color: #40a070; } /* Float */ code span.fu { color: #06287e; } /* Function */ - code span.im { } /* Import */ + code span.im { color: #008000; font-weight: bold; } /* Import */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.op { color: #666666; } /* Operator */ @@ -75,6 +76,7 @@ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ + .display.math{display: block; text-align: center; margin: 0.5rem auto;} </style> <link rel="stylesheet" href="markdown.css" /> </head> @@ -82,76 +84,156 @@ <header id="title-block-header"> <h1 class="title">Markdown Package User Manual</h1> <p class="author">Vít Novotný</p> -<p class="date">2.17.0-0-g6428569 2022-09-30</p> +<p class="date">2.17.1-0-g8ca83f5 2022-10-03</p> </header> <nav id="TOC" role="doc-toc"> <ul> -<li><a href="#introduction"><span class="toc-section-number">1</span> Introduction</a> +<li><a href="#introduction"><span class="toc-section-number">1</span> +Introduction</a> <ul> -<li><a href="#requirements"><span class="toc-section-number">1.1</span> Requirements</a></li> -<li><a href="#installation"><span class="toc-section-number">1.2</span> Installation</a> +<li><a href="#requirements"><span class="toc-section-number">1.1</span> +Requirements</a></li> +<li><a href="#installation"><span class="toc-section-number">1.2</span> +Installation</a> <ul> -<li><a href="#local-installation"><span class="toc-section-number">1.2.1</span> Local Installation</a></li> -<li><a href="#portable-installation"><span class="toc-section-number">1.2.2</span> Portable Installation</a></li> +<li><a href="#local-installation"><span +class="toc-section-number">1.2.1</span> Local Installation</a></li> +<li><a href="#portable-installation"><span +class="toc-section-number">1.2.2</span> Portable Installation</a></li> </ul></li> -<li><a href="#first-document"><span class="toc-section-number">1.3</span> First Document</a> +<li><a href="#first-document"><span +class="toc-section-number">1.3</span> First Document</a> <ul> -<li><a href="#using-lua"><span class="toc-section-number">1.3.1</span> Using Lua</a></li> -<li><a href="#using-plain-tex"><span class="toc-section-number">1.3.2</span> Using Plain <span class="tex">T<sub>e</sub>X</span></a></li> -<li><a href="#using-latex"><span class="toc-section-number">1.3.3</span> Using <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></a></li> -<li><a href="#using-context"><span class="toc-section-number">1.3.4</span> Using Con<span class="tex">T<sub>e</sub>X</span>t</a></li> +<li><a href="#using-lua"><span class="toc-section-number">1.3.1</span> +Using Lua</a></li> +<li><a href="#using-plain-tex"><span +class="toc-section-number">1.3.2</span> Using Plain <span +class="tex">T<sub>e</sub>X</span></a></li> +<li><a href="#using-latex"><span class="toc-section-number">1.3.3</span> +Using <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></a></li> +<li><a href="#using-context"><span +class="toc-section-number">1.3.4</span> Using Con<span +class="tex">T<sub>e</sub>X</span>t</a></li> </ul></li> </ul></li> -<li><a href="#examples"><span class="toc-section-number">2</span> Examples</a> +<li><a href="#examples"><span class="toc-section-number">2</span> +Examples</a> <ul> -<li><a href="#interfaces"><span class="toc-section-number">2.1</span> Interfaces</a> +<li><a href="#interfaces"><span class="toc-section-number">2.1</span> +Interfaces</a> <ul> -<li><a href="#lua"><span class="toc-section-number">2.1.1</span> Lua</a></li> -<li><a href="#plain-tex"><span class="toc-section-number">2.1.2</span> Plain <span class="tex">T<sub>e</sub>X</span></a></li> -<li><a href="#latex"><span class="toc-section-number">2.1.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></a></li> -<li><a href="#context"><span class="toc-section-number">2.1.4</span> Con<span class="tex">T<sub>e</sub>X</span>t</a></li> +<li><a href="#lua"><span class="toc-section-number">2.1.1</span> +Lua</a></li> +<li><a href="#plain-tex"><span class="toc-section-number">2.1.2</span> +Plain <span class="tex">T<sub>e</sub>X</span></a></li> +<li><a href="#latex"><span class="toc-section-number">2.1.3</span> <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span></a></li> +<li><a href="#context"><span class="toc-section-number">2.1.4</span> +Con<span class="tex">T<sub>e</sub>X</span>t</a></li> </ul></li> -<li><a href="#options"><span class="toc-section-number">2.2</span> Options</a> +<li><a href="#options"><span class="toc-section-number">2.2</span> +Options</a> <ul> -<li><a href="#lua-1"><span class="toc-section-number">2.2.1</span> Lua</a></li> -<li><a href="#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="#latex-1"><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="#lua-1"><span class="toc-section-number">2.2.1</span> +Lua</a></li> +<li><a href="#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="#latex-1"><span class="toc-section-number">2.2.3</span> +<span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></a></li> </ul></li> -<li><a href="#markdown-tokens"><span class="toc-section-number">2.3</span> Markdown Tokens</a> +<li><a href="#markdown-tokens"><span +class="toc-section-number">2.3</span> Markdown Tokens</a> <ul> -<li><a href="#texrenderersuser"><span class="toc-section-number">2.3.1</span> Token Renderers</a></li> -<li><a href="#texrendererprototypes"><span class="toc-section-number">2.3.2</span> Token Renderer Prototypes</a></li> +<li><a href="#texrenderersuser"><span +class="toc-section-number">2.3.1</span> Token Renderers</a></li> +<li><a href="#texrendererprototypes"><span +class="toc-section-number">2.3.2</span> Token Renderer +Prototypes</a></li> </ul></li> </ul></li> </ul> </nav> <p><link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet" /></p> -<h1 data-number="1" id="introduction"><span class="header-section-number">1</span> Introduction</h1> -<p>The <a href="https://ctan.org/pkg/markdown" title="CTAN: Package markdown">Markdown package</a> converts <a href="https://daringfireball.net/projects/markdown/basics" title="Daring Fireball: Markdown Basics">markdown</a> markup to <span class="tex">T<sub>e</sub>X</span> commands. The functionality is provided both as a Lua module and as plain <span class="tex">T<sub>e</sub>X</span>, <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>, and Con<span class="tex">T<sub>e</sub>X</span>t macro packages that can be used to directly typeset <span class="tex">T<sub>e</sub>X</span> documents containing markdown markup. Unlike other convertors, the Markdown package does not require any external programs, and makes it easy to redefine how each and every markdown element is rendered. Creative abuse of the markdown syntax is encouraged. <i class="em em-wink"></i></p> -<p>This document is a user manual for the <a href="https://ctan.org/pkg/markdown" title="CTAN: Package markdown">Markdown package</a>. It provides tutorials and code examples. For an in-depth description of the package requirements, interfaces, and implementation, please refer to the <a href="https://mirrors.ctan.org/macros/generic/markdown/markdown.pdf" title="A Markdown Interpreter for <span class="tex">T<sub>e</sub>X</span>">technical documentation</a>.</p> -<h2 data-number="1.1" id="requirements"><span class="header-section-number">1.1</span> Requirements</h2> -<p>The package requires either <a href="https://hub.docker.com/r/witiko/markdown/tags" title="witiko/markdown - Docker Image">our official Docker image</a>, 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> ≥ 2020 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, incomplete, or atypical <span class="tex">T<sub>e</sub>X</span> distribution, please consult the <a href="https://mirrors.ctan.org/macros/generic/markdown/markdown.pdf" title="A Markdown Interpreter for <span class="tex">T<sub>e</sub>X</span>">technical documentation</a> for a detailed list of requirements.</p> -<h2 data-number="1.2" id="installation"><span class="header-section-number">1.2</span> Installation</h2> -<p>If Markdown is not included in your <span class="tex">T<sub>e</sub>X</span> distribution, you will need to install it.</p> +<h1 data-number="1" id="introduction"><span +class="header-section-number">1</span> Introduction</h1> +<p>The <a href="https://ctan.org/pkg/markdown" +title="CTAN: Package markdown">Markdown package</a> converts <a +href="https://daringfireball.net/projects/markdown/basics" +title="Daring Fireball: Markdown Basics">markdown</a> markup to <span +class="tex">T<sub>e</sub>X</span> commands. The functionality is +provided both as a Lua module and as plain <span +class="tex">T<sub>e</sub>X</span>, <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span>, and Con<span +class="tex">T<sub>e</sub>X</span>t macro packages that can be used to +directly typeset <span class="tex">T<sub>e</sub>X</span> documents +containing markdown markup. Unlike other convertors, the Markdown +package does not require any external programs, and makes it easy to +redefine how each and every markdown element is rendered. Creative abuse +of the markdown syntax is encouraged. <i class="em em-wink"></i></p> +<p>This document is a user manual for the <a +href="https://ctan.org/pkg/markdown" +title="CTAN: Package markdown">Markdown package</a>. It provides +tutorials and code examples. For an in-depth description of the package +requirements, interfaces, and implementation, please refer to the <a +href="https://mirrors.ctan.org/macros/generic/markdown/markdown.pdf" +title="A Markdown Interpreter for <span class="tex">T<sub>e</sub>X</span>">technical +documentation</a>.</p> +<h2 data-number="1.1" id="requirements"><span +class="header-section-number">1.1</span> Requirements</h2> +<p>The package requires either <a +href="https://hub.docker.com/r/witiko/markdown/tags" +title="witiko/markdown - Docker Image">our official Docker image</a>, +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> ≥ 2020 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, +incomplete, or atypical <span class="tex">T<sub>e</sub>X</span> +distribution, please consult the <a +href="https://mirrors.ctan.org/macros/generic/markdown/markdown.pdf" +title="A Markdown Interpreter for <span class="tex">T<sub>e</sub>X</span>">technical +documentation</a> for a detailed list of requirements.</p> +<h2 data-number="1.2" id="installation"><span +class="header-section-number">1.2</span> Installation</h2> +<p>If Markdown is not included in your <span +class="tex">T<sub>e</sub>X</span> distribution, you will need to install +it.</p> <p>First, download the package from the repository using Git:</p> -<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="fu">git</span> clone https://github.com/witiko/markdown</span></code></pre></div> -<p>Next, enter the directory named <code>markdown</code> and run the <code>make base</code> command using GNU Make:</p> -<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="bu">cd</span> markdown</span> -<span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a><span class="fu">make</span> base</span></code></pre></div> +<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> clone https://github.com/witiko/markdown</span></code></pre></div> +<p>Next, enter the directory named <code>markdown</code> and run the +<code>make base</code> command using GNU Make:</p> +<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> markdown</span> +<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> base</span></code></pre></div> <p>This should produce the following files:</p> <ul> <li><code>markdown.lua</code>, the Lua module,</li> -<li><code>libraries/markdown-tinyyaml.lua</code>, an external library for reading <abbr>yaml</abbr>,</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.sty</code>, the <code>witiko/tilde</code> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> theme, and</li> -<li><code>t-markdown.tex</code>, the Con<span class="tex">T<sub>e</sub>X</span>t module.</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.sty</code>, the +<code>witiko/tilde</code> <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> theme, and</li> +<li><code>t-markdown.tex</code>, the Con<span +class="tex">T<sub>e</sub>X</span>t module.</li> </ul> -<h3 data-number="1.2.1" id="local-installation"><span class="header-section-number">1.2.1</span> Local Installation</h3> -<p>To perform a local installation, place the above files into your <span class="tex">T<sub>e</sub>X</span> directory structure. This is generally where the individual files should be placed:</p> +<h3 data-number="1.2.1" id="local-installation"><span +class="header-section-number">1.2.1</span> Local Installation</h3> +<p>To perform a local installation, place the above files into your +<span class="tex">T<sub>e</sub>X</span> directory structure. This is +generally where the individual files should be placed:</p> <ul> <li><code>⟨TEXMF⟩/tex/luatex/markdown/markdown.lua</code></li> <li><code>⟨TEXMF⟩/tex/luatex/markdown/markdown-tinyyaml.lua</code></li> @@ -163,484 +245,1038 @@ <li><code>⟨TEXMF⟩/tex/latex/markdown/markdownthemewitiko_tilde.sty</code></li> <li><code>⟨TEXMF⟩/tex/context/third/markdown/t-markdown.tex</code></li> </ul> -<p>where <code>⟨TEXMF⟩</code> corresponds to a root of your <span class="tex">T<sub>e</sub>X</span> distribution, such as <code>/usr/share/texmf</code> and <code>~/texmf</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf</code> on Windows systems. When in doubt, consult the manual of your <span class="tex">T<sub>e</sub>X</span> distribution.</p> -<h3 data-number="1.2.2" id="portable-installation"><span class="header-section-number">1.2.2</span> Portable Installation</h3> -<p>Alternatively, you can also store the above files in the same folder as your <span class="tex">T<sub>e</sub>X</span> document and distribute them together. This way your document can be portably typeset on legacy <span class="tex">T<sub>e</sub>X</span> distributions.</p> -<p>Since Markdown version 2.10.0, the file <code>markdown.tex</code> must be placed in a directory named <code>markdown</code> due to <a href="https://github.com/witiko/markdown/issues/74" title="Does not compile if user names own document markdown.tex">issue #74</a>.</p> -<h2 data-number="1.3" id="first-document"><span class="header-section-number">1.3</span> First Document</h2> -<p>In this section, we will take the necessary steps to typeset our first markdown document in <span class="tex">T<sub>e</sub>X</span>. This will serve as our first hands-on experience with the package and also as a reassurance that the package has been correctly installed.</p> -<p>If you are using <a href="https://hub.docker.com/r/witiko/markdown/tags" title="witiko/markdown - Docker Image">our official Docker image</a>, you need to prefix all commands in this section with <code>docker run --rm -v "$PWD"/workdir:/workdir -w /workdir witiko/markdown</code>. For example, instead of <code>luatex document.tex</code>, you would execute the following command:</p> -<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true"></a><span class="ex">docker</span> run --rm -v <span class="st">"</span><span class="va">$PWD</span><span class="st">"</span>/workdir:/workdir -w /workdir witiko/markdown <span class="kw">\</span></span> -<span id="cb3-2"><a href="#cb3-2" aria-hidden="true"></a> <span class="ex">luatex</span> document.tex</span></code></pre></div> -<h3 data-number="1.3.1" id="using-lua"><span class="header-section-number">1.3.1</span> Using Lua</h3> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb4"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb4-2"><a href="#cb4-2" aria-hidden="true"></a><span class="fu">\input</span> hello</span> -<span id="cb4-3"><a href="#cb4-3" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<h4 data-number="1.3.1.1" id="using-the-lua-module"><span class="header-section-number">1.3.1.1</span> Using the Lua Module</h4> -<p>Using a text editor, create a text document named <code>hello.lua</code> with the following content:</p> -<div class="sourceCode" id="cb5"><pre class="sourceCode lua"><code class="sourceCode lua"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true"></a><span class="co">#!/usr/bin/env texlua</span></span> -<span id="cb5-2"><a href="#cb5-2" aria-hidden="true"></a><span class="kw">local</span> ran_ok<span class="op">,</span> kpse <span class="op">=</span> <span class="fu">pcall</span><span class="op">(</span><span class="fu">require</span><span class="op">,</span> <span class="st">"kpse"</span><span class="op">)</span></span> -<span id="cb5-3"><a href="#cb5-3" aria-hidden="true"></a><span class="cf">if</span> ran_ok <span class="cf">then</span> kpse<span class="op">.</span>set_program_name<span class="op">(</span><span class="st">"luatex"</span><span class="op">)</span> <span class="cf">end</span></span> -<span id="cb5-4"><a href="#cb5-4" aria-hidden="true"></a><span class="kw">local</span> markdown <span class="op">=</span> <span class="fu">require</span><span class="op">(</span><span class="st">"markdown"</span><span class="op">)</span></span> -<span id="cb5-5"><a href="#cb5-5" aria-hidden="true"></a><span class="kw">local</span> convert <span class="op">=</span> markdown<span class="op">.</span>new<span class="op">()</span></span> -<span id="cb5-6"><a href="#cb5-6" aria-hidden="true"></a><span class="fu">print</span><span class="op">(</span>convert<span class="op">(</span><span class="st">"Hello *world*!"</span><span class="op">))</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true"></a><span class="ex">texlua</span> hello.lua <span class="op">></span> hello.tex</span> -<span id="cb6-2"><a href="#cb6-2" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true"></a><span class="ex">texlua</span> hello.lua <span class="op">></span> hello.tex</span> -<span id="cb7-2"><a href="#cb7-2" aria-hidden="true"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> -<h4 data-number="1.3.1.2" id="using-the-lua-command-line-interface"><span class="header-section-number">1.3.1.2</span> Using the Lua Command-Line Interface</h4> -<p>Using a text editor, create a text document named <code>hello.md</code> with the following content:</p> -<div class="sourceCode" id="cb8"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true"></a>Hello *world*!</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- hello.md hello.tex</span> -<span id="cb9-2"><a href="#cb9-2" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- hello.md hello.tex</span> -<span id="cb10-2"><a href="#cb10-2" aria-hidden="true"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> -<h3 data-number="1.3.2" id="using-plain-tex"><span class="header-section-number">1.3.2</span> Using Plain <span class="tex">T<sub>e</sub>X</span></h3> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb11"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb11-2"><a href="#cb11-2" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb11-3"><a href="#cb11-3" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb11-4"><a href="#cb11-4" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb11-5"><a href="#cb11-5" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true"></a><span class="ex">pdftex</span> --shell-escape document.tex</span></code></pre></div> -<h3 data-number="1.3.3" id="using-latex"><span class="header-section-number">1.3.3</span> Using <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb14"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb14-2"><a href="#cb14-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb14-3"><a href="#cb14-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb14-4"><a href="#cb14-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb14-5"><a href="#cb14-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb14-6"><a href="#cb14-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb14-7"><a href="#cb14-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb15"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb16"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true"></a><span class="ex">pdflatex</span> --shell-escape document.tex</span></code></pre></div> +<p>where <code>⟨TEXMF⟩</code> corresponds to a root of your <span +class="tex">T<sub>e</sub>X</span> distribution, such as +<code>/usr/share/texmf</code> and <code>~/texmf</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf</code> on +Windows systems. When in doubt, consult the manual of your <span +class="tex">T<sub>e</sub>X</span> distribution.</p> +<h3 data-number="1.2.2" id="portable-installation"><span +class="header-section-number">1.2.2</span> Portable Installation</h3> +<p>Alternatively, you can also store the above files in the same folder +as your <span class="tex">T<sub>e</sub>X</span> document and distribute +them together. This way your document can be portably typeset on legacy +<span class="tex">T<sub>e</sub>X</span> distributions.</p> +<p>Since Markdown version 2.10.0, the file <code>markdown.tex</code> +must be placed in a directory named <code>markdown</code> due to <a +href="https://github.com/witiko/markdown/issues/74" +title="Does not compile if user names own document markdown.tex">issue +#74</a>.</p> +<h2 data-number="1.3" id="first-document"><span +class="header-section-number">1.3</span> First Document</h2> +<p>In this section, we will take the necessary steps to typeset our +first markdown document in <span class="tex">T<sub>e</sub>X</span>. This +will serve as our first hands-on experience with the package and also as +a reassurance that the package has been correctly installed.</p> +<p>If you are using <a +href="https://hub.docker.com/r/witiko/markdown/tags" +title="witiko/markdown - Docker Image">our official Docker image</a>, +you need to prefix all commands in this section with +<code>docker run --rm -v "$PWD"/workdir:/workdir -w /workdir witiko/markdown</code>. +For example, instead of <code>luatex document.tex</code>, you would +execute the following command:</p> +<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">docker</span> run <span class="at">--rm</span> <span class="at">-v</span> <span class="st">"</span><span class="va">$PWD</span><span class="st">"</span>/workdir:/workdir <span class="at">-w</span> /workdir witiko/markdown <span class="dt">\</span></span> +<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> luatex document.tex</span></code></pre></div> +<h3 data-number="1.3.1" id="using-lua"><span +class="header-section-number">1.3.1</span> Using Lua</h3> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb4"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> hello</span> +<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<h4 data-number="1.3.1.1" id="using-the-lua-module"><span +class="header-section-number">1.3.1.1</span> Using the Lua Module</h4> +<p>Using a text editor, create a text document named +<code>hello.lua</code> with the following content:</p> +<div class="sourceCode" id="cb5"><pre +class="sourceCode lua"><code class="sourceCode lua"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="co">#!/usr/bin/env texlua</span></span> +<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> ran_ok<span class="op">,</span> kpse <span class="op">=</span> <span class="fu">pcall</span><span class="op">(</span><span class="fu">require</span><span class="op">,</span> <span class="st">"kpse"</span><span class="op">)</span></span> +<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> ran_ok <span class="cf">then</span> kpse<span class="op">.</span>set_program_name<span class="op">(</span><span class="st">"luatex"</span><span class="op">)</span> <span class="cf">end</span></span> +<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> markdown <span class="op">=</span> <span class="fu">require</span><span class="op">(</span><span class="st">"markdown"</span><span class="op">)</span></span> +<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> convert <span class="op">=</span> markdown<span class="op">.</span>new<span class="op">()</span></span> +<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a><span class="fu">print</span><span class="op">(</span>convert<span class="op">(</span><span class="st">"Hello *world*!"</span><span class="op">))</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> hello.lua <span class="op">></span> hello.tex</span> +<span id="cb6-2"><a href="#cb6-2" 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 text “Hello <em>world</em>!” Invoking pdfTeX should have the +same effect:</p> +<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> hello.lua <span class="op">></span> hello.tex</span> +<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> +<h4 data-number="1.3.1.2" +id="using-the-lua-command-line-interface"><span +class="header-section-number">1.3.1.2</span> Using the Lua Command-Line +Interface</h4> +<p>Using a text editor, create a text document named +<code>hello.md</code> with the following content:</p> +<div class="sourceCode" id="cb8"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> hello.md hello.tex</span> +<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the +same effect:</p> +<div class="sourceCode" id="cb10"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> hello.md hello.tex</span> +<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> +<h3 data-number="1.3.2" id="using-plain-tex"><span +class="header-section-number">1.3.2</span> Using Plain <span +class="tex">T<sub>e</sub>X</span></h3> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb11"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb11-5"><a href="#cb11-5" 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="cb12"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-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 text “Hello <em>world</em>!” Invoking pdfTeX should have the +same effect:</p> +<div class="sourceCode" id="cb13"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div> +<h3 data-number="1.3.3" id="using-latex"><span +class="header-section-number">1.3.3</span> Using <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb14"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb14-4"><a href="#cb14-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb14-5"><a href="#cb14-5" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb14-6"><a href="#cb14-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb14-7"><a href="#cb14-7" 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="cb15"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-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 text “Hello <em>world</em>!” Invoking pdfTeX should have the +same effect:</p> +<div class="sourceCode" id="cb16"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdflatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div> <hr /> -<p>As the next step, try typesetting the example documents distributed along with the Markdown package:</p> -<div class="sourceCode" id="cb17"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true"></a><span class="fu">git</span> clone https://github.com/witiko/markdown</span> -<span id="cb17-2"><a href="#cb17-2" aria-hidden="true"></a><span class="bu">cd</span> markdown/examples</span> -<span id="cb17-3"><a href="#cb17-3" aria-hidden="true"></a><span class="ex">lualatex</span> latex.tex</span></code></pre></div> -<p>A PDF document named <code>latex.pdf</code> should be produced. Open the text documents <code>latex.tex</code> and <code>example.md</code> in a text editor to see how the example documents are structured. Try changing the documents and typesetting them as follows:</p> -<div class="sourceCode" id="cb18"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true"></a><span class="ex">lualatex</span> latex.tex</span></code></pre></div> +<p>As the next step, try typesetting the example documents distributed +along with the Markdown package:</p> +<div class="sourceCode" id="cb17"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> clone https://github.com/witiko/markdown</span> +<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> markdown/examples</span> +<span id="cb17-3"><a href="#cb17-3" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> latex.tex</span></code></pre></div> +<p>A PDF document named <code>latex.pdf</code> should be produced. Open +the text documents <code>latex.tex</code> and <code>example.md</code> in +a text editor to see how the example documents are structured. Try +changing the documents and typesetting them as follows:</p> +<div class="sourceCode" id="cb18"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> latex.tex</span></code></pre></div> <p>to see the effect of your changes.</p> -<h3 data-number="1.3.4" id="using-context"><span class="header-section-number">1.3.4</span> Using Con<span class="tex">T<sub>e</sub>X</span>t</h3> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb19"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb19-2"><a href="#cb19-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb19-3"><a href="#cb19-3" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb19-4"><a href="#cb19-4" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb19-5"><a href="#cb19-5" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb19-6"><a href="#cb19-6" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb20"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb21"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true"></a><span class="ex">texexec</span> --passon=--shell-escape document.tex</span></code></pre></div> +<h3 data-number="1.3.4" id="using-context"><span +class="header-section-number">1.3.4</span> Using Con<span +class="tex">T<sub>e</sub>X</span>t</h3> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb19"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb19-3"><a href="#cb19-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb19-4"><a href="#cb19-4" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb19-5"><a href="#cb19-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb19-6"><a href="#cb19-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb20"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the +same effect:</p> +<div class="sourceCode" id="cb21"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texexec</span> <span class="at">--passon</span><span class="op">=</span>--shell-escape document.tex</span></code></pre></div> <hr /> -<p>As the next step, try typesetting the example documents distributed along with the Markdown package:</p> -<div class="sourceCode" id="cb22"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true"></a><span class="fu">git</span> clone https://github.com/witiko/markdown</span> -<span id="cb22-2"><a href="#cb22-2" aria-hidden="true"></a><span class="bu">cd</span> markdown/examples</span> -<span id="cb22-3"><a href="#cb22-3" aria-hidden="true"></a><span class="ex">context</span> context.tex</span></code></pre></div> -<p>A PDF document named <code>context.pdf</code> should be produced. Open the text documents <code>context.tex</code> and <code>example.md</code> in a text editor to see how the example documents are structured. Try changing the documents and typesetting them as follows:</p> -<div class="sourceCode" id="cb23"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true"></a><span class="ex">context</span> context.tex</span></code></pre></div> +<p>As the next step, try typesetting the example documents distributed +along with the Markdown package:</p> +<div class="sourceCode" id="cb22"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="fu">git</span> clone https://github.com/witiko/markdown</span> +<span id="cb22-2"><a href="#cb22-2" aria-hidden="true" tabindex="-1"></a><span class="bu">cd</span> markdown/examples</span> +<span id="cb22-3"><a href="#cb22-3" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> context.tex</span></code></pre></div> +<p>A PDF document named <code>context.pdf</code> should be produced. +Open the text documents <code>context.tex</code> and +<code>example.md</code> in a text editor to see how the example +documents are structured. Try changing the documents and typesetting +them as follows:</p> +<div class="sourceCode" id="cb23"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> context.tex</span></code></pre></div> <p>to see the effect of your changes.</p> -<h1 data-number="2" id="examples"><span class="header-section-number">2</span> Examples</h1> -<p>In this section, I will describe the individual parts of the Markdown package. Each part will be shown by example, leaving the implementation details to the <a href="https://mirrors.ctan.org/macros/generic/markdown/markdown.pdf" title="A Markdown Interpreter for <span class="tex">T<sub>e</sub>X</span>">technical documentation</a>.</p> -<h2 data-number="2.1" id="interfaces"><span class="header-section-number">2.1</span> Interfaces</h2> -<p>In this section, I will describe the individual interfaces exposed by the Markdown package starting with the low-level Lua interfaces and all the way up to the <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> and Con<span class="tex">T<sub>e</sub>X</span>t interfaces intended for the ordinary user.</p> -<h3 data-number="2.1.1" id="lua"><span class="header-section-number">2.1.1</span> Lua</h3> -<p>The Lua programming language is what drives the conversion from markdown to <span class="tex">T<sub>e</sub>X</span> in the Markdown package. Based on the <a href="https://github.com/jgm/lunamark" title="Lua library for conversion between markup formats">Lunamark</a> Lua library by John MacFarlane, the Lua implementation is largely independent on <span class="tex">T<sub>e</sub>X</span>, and can be used separately from typesetting a document. Lua provides two interfaces: a Lua module and a command-line interface (CLI).</p> -<h4 data-number="2.1.1.1" id="lua-module"><span class="header-section-number">2.1.1.1</span> Lua Module</h4> -<p>A Lua module is a software library that can be used from in other programs. The <code>markdown</code> Lua module makes it possible to convert markdown to <span class="tex">T<sub>e</sub>X</span> from within Lua<span class="tex">T<sub>e</sub>X</span> documents and Lua scripts.</p> -<p>The <code>markdown</code> Lua module exposes the <code>new(</code>⟨<em>options</em>⟩<code>)</code> method, which creates a converter function from markdown to <span class="tex">T<sub>e</sub>X</span>. The properties of the converter function are specified by the Lua table <code>options</code>. The parameter is optional; when unspecified, the behaviour will be the same as if ⟨<em>options</em>⟩ were an empty table.</p> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb24"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb24-2"><a href="#cb24-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb24-3"><a href="#cb24-3" aria-hidden="true"></a><span class="fu">\input</span> example</span> -<span id="cb24-4"><a href="#cb24-4" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>example.lua</code> with the following content:</p> -<div class="sourceCode" id="cb25"><pre class="sourceCode lua"><code class="sourceCode lua"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true"></a><span class="co">#!/usr/bin/env texlua</span></span> -<span id="cb25-2"><a href="#cb25-2" aria-hidden="true"></a><span class="kw">local</span> ran_ok<span class="op">,</span> kpse <span class="op">=</span> <span class="fu">pcall</span><span class="op">(</span><span class="fu">require</span><span class="op">,</span> <span class="st">"kpse"</span><span class="op">)</span></span> -<span id="cb25-3"><a href="#cb25-3" aria-hidden="true"></a><span class="cf">if</span> ran_ok <span class="cf">then</span> kpse<span class="op">.</span>set_program_name<span class="op">(</span><span class="st">"luatex"</span><span class="op">)</span> <span class="cf">end</span></span> -<span id="cb25-4"><a href="#cb25-4" aria-hidden="true"></a><span class="kw">local</span> markdown <span class="op">=</span> <span class="fu">require</span><span class="op">(</span><span class="st">"markdown"</span><span class="op">)</span></span> -<span id="cb25-5"><a href="#cb25-5" aria-hidden="true"></a><span class="kw">local</span> input<span class="op">,</span> convert_safe<span class="op">,</span> convert_unsafe<span class="op">,</span> paragraph</span> -<span id="cb25-6"><a href="#cb25-6" aria-hidden="true"></a></span> -<span id="cb25-7"><a href="#cb25-7" aria-hidden="true"></a>input <span class="op">=</span> <span class="vs">[[$\sqrt{-1}$ *equals* $i$.]]</span></span> -<span id="cb25-8"><a href="#cb25-8" aria-hidden="true"></a>convert_safe <span class="op">=</span> markdown<span class="op">.</span>new<span class="op">()</span></span> -<span id="cb25-9"><a href="#cb25-9" aria-hidden="true"></a>convert_unsafe <span class="op">=</span> markdown<span class="op">.</span>new<span class="op">({</span>hybrid <span class="op">=</span> <span class="kw">true</span><span class="op">})</span></span> -<span id="cb25-10"><a href="#cb25-10" aria-hidden="true"></a>paragraph <span class="op">=</span> <span class="vs">[[\par]]</span></span> -<span id="cb25-11"><a href="#cb25-11" aria-hidden="true"></a></span> -<span id="cb25-12"><a href="#cb25-12" aria-hidden="true"></a><span class="fu">print</span><span class="op">(</span></span> -<span id="cb25-13"><a href="#cb25-13" aria-hidden="true"></a> convert_safe<span class="op">(</span>input<span class="op">)</span> <span class="op">..</span> paragraph <span class="op">..</span></span> -<span id="cb25-14"><a href="#cb25-14" aria-hidden="true"></a> convert_unsafe<span class="op">(</span>input<span class="op">)</span></span> -<span id="cb25-15"><a href="#cb25-15" aria-hidden="true"></a><span class="op">)</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb26"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true"></a><span class="ex">texlua</span> example.lua <span class="op">></span> example.tex</span> -<span id="cb26-2"><a href="#cb26-2" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h1 data-number="2" id="examples"><span +class="header-section-number">2</span> Examples</h1> +<p>In this section, I will describe the individual parts of the Markdown +package. Each part will be shown by example, leaving the implementation +details to the <a +href="https://mirrors.ctan.org/macros/generic/markdown/markdown.pdf" +title="A Markdown Interpreter for <span class="tex">T<sub>e</sub>X</span>">technical +documentation</a>.</p> +<h2 data-number="2.1" id="interfaces"><span +class="header-section-number">2.1</span> Interfaces</h2> +<p>In this section, I will describe the individual interfaces exposed by +the Markdown package starting with the low-level Lua interfaces and all +the way up to the <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> +and Con<span class="tex">T<sub>e</sub>X</span>t interfaces intended for +the ordinary user.</p> +<h3 data-number="2.1.1" id="lua"><span +class="header-section-number">2.1.1</span> Lua</h3> +<p>The Lua programming language is what drives the conversion from +markdown to <span class="tex">T<sub>e</sub>X</span> in the Markdown +package. Based on the <a href="https://github.com/jgm/lunamark" +title="Lua library for conversion between markup formats">Lunamark</a> +Lua library by John MacFarlane, the Lua implementation is largely +independent on <span class="tex">T<sub>e</sub>X</span>, and can be used +separately from typesetting a document. Lua provides two interfaces: a +Lua module and a command-line interface (CLI).</p> +<h4 data-number="2.1.1.1" id="lua-module"><span +class="header-section-number">2.1.1.1</span> Lua Module</h4> +<p>A Lua module is a software library that can be used from in other +programs. The <code>markdown</code> Lua module makes it possible to +convert markdown to <span class="tex">T<sub>e</sub>X</span> from within +Lua<span class="tex">T<sub>e</sub>X</span> documents and Lua +scripts.</p> +<p>The <code>markdown</code> Lua module exposes the +<code>new(</code>⟨<em>options</em>⟩<code>)</code> method, which creates +a converter function from markdown to <span +class="tex">T<sub>e</sub>X</span>. The properties of the converter +function are specified by the Lua table <code>options</code>. The +parameter is optional; when unspecified, the behaviour will be the same +as if ⟨<em>options</em>⟩ were an empty table.</p> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb24"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb24-2"><a href="#cb24-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb24-3"><a href="#cb24-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> example</span> +<span id="cb24-4"><a href="#cb24-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>example.lua</code> with the following content:</p> +<div class="sourceCode" id="cb25"><pre +class="sourceCode lua"><code class="sourceCode lua"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="co">#!/usr/bin/env texlua</span></span> +<span id="cb25-2"><a href="#cb25-2" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> ran_ok<span class="op">,</span> kpse <span class="op">=</span> <span class="fu">pcall</span><span class="op">(</span><span class="fu">require</span><span class="op">,</span> <span class="st">"kpse"</span><span class="op">)</span></span> +<span id="cb25-3"><a href="#cb25-3" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> ran_ok <span class="cf">then</span> kpse<span class="op">.</span>set_program_name<span class="op">(</span><span class="st">"luatex"</span><span class="op">)</span> <span class="cf">end</span></span> +<span id="cb25-4"><a href="#cb25-4" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> markdown <span class="op">=</span> <span class="fu">require</span><span class="op">(</span><span class="st">"markdown"</span><span class="op">)</span></span> +<span id="cb25-5"><a href="#cb25-5" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> input<span class="op">,</span> convert_safe<span class="op">,</span> convert_unsafe<span class="op">,</span> paragraph</span> +<span id="cb25-6"><a href="#cb25-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb25-7"><a href="#cb25-7" aria-hidden="true" tabindex="-1"></a>input <span class="op">=</span> <span class="vs">[[$\sqrt{-1}$ *equals* $i$.]]</span></span> +<span id="cb25-8"><a href="#cb25-8" aria-hidden="true" tabindex="-1"></a>convert_safe <span class="op">=</span> markdown<span class="op">.</span>new<span class="op">()</span></span> +<span id="cb25-9"><a href="#cb25-9" aria-hidden="true" tabindex="-1"></a>convert_unsafe <span class="op">=</span> markdown<span class="op">.</span>new<span class="op">({</span>hybrid <span class="op">=</span> <span class="kw">true</span><span class="op">})</span></span> +<span id="cb25-10"><a href="#cb25-10" aria-hidden="true" tabindex="-1"></a>paragraph <span class="op">=</span> <span class="vs">[[\par]]</span></span> +<span id="cb25-11"><a href="#cb25-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb25-12"><a href="#cb25-12" aria-hidden="true" tabindex="-1"></a><span class="fu">print</span><span class="op">(</span></span> +<span id="cb25-13"><a href="#cb25-13" aria-hidden="true" tabindex="-1"></a> convert_safe<span class="op">(</span>input<span class="op">)</span> <span class="op">..</span> paragraph <span class="op">..</span></span> +<span id="cb25-14"><a href="#cb25-14" aria-hidden="true" tabindex="-1"></a> convert_unsafe<span class="op">(</span>input<span class="op">)</span></span> +<span id="cb25-15"><a href="#cb25-15" aria-hidden="true" tabindex="-1"></a><span class="op">)</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb26"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> example.lua <span class="op">></span> example.tex</span> +<span id="cb26-2"><a href="#cb26-2" 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:</p> <blockquote> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> <p>Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb27"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true"></a><span class="ex">texlua</span> example.lua <span class="op">></span> example.tex</span> -<span id="cb27-2"><a href="#cb27-2" aria-hidden="true"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb27"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> example.lua <span class="op">></span> example.tex</span> +<span id="cb27-2"><a href="#cb27-2" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> <hr /> -<p>Rather than use the <code>texlua</code> interpreter, we can also access the <code>markdown</code> Lua module directly from our document. Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb28"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb28-2"><a href="#cb28-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb28-3"><a href="#cb28-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb28-4"><a href="#cb28-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb28-5"><a href="#cb28-5" aria-hidden="true"></a> local input, convert_safe, convert_unsafe, paragraph</span> -<span id="cb28-6"><a href="#cb28-6" aria-hidden="true"></a></span> -<span id="cb28-7"><a href="#cb28-7" aria-hidden="true"></a> input = [[<span class="ss">$</span><span class="sc">\string\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.]]</span> -<span id="cb28-8"><a href="#cb28-8" aria-hidden="true"></a> convert_safe = markdown.new()</span> -<span id="cb28-9"><a href="#cb28-9" aria-hidden="true"></a> convert_unsafe = markdown.new({hybrid = true})</span> -<span id="cb28-10"><a href="#cb28-10" aria-hidden="true"></a> paragraph = [[<span class="fu">\par</span>]]</span> -<span id="cb28-11"><a href="#cb28-11" aria-hidden="true"></a></span> -<span id="cb28-12"><a href="#cb28-12" aria-hidden="true"></a> tex.sprint(</span> -<span id="cb28-13"><a href="#cb28-13" aria-hidden="true"></a> convert_safe(input) .. paragraph ..</span> -<span id="cb28-14"><a href="#cb28-14" aria-hidden="true"></a> convert_unsafe(input)</span> -<span id="cb28-15"><a href="#cb28-15" aria-hidden="true"></a> )</span> -<span id="cb28-16"><a href="#cb28-16" aria-hidden="true"></a>}</span> -<span id="cb28-17"><a href="#cb28-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb29"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>Rather than use the <code>texlua</code> interpreter, we can also +access the <code>markdown</code> Lua module directly from our document. +Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb28"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb28-2"><a href="#cb28-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb28-3"><a href="#cb28-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb28-4"><a href="#cb28-4" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb28-5"><a href="#cb28-5" aria-hidden="true" tabindex="-1"></a> local input, convert_safe, convert_unsafe, paragraph</span> +<span id="cb28-6"><a href="#cb28-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb28-7"><a href="#cb28-7" aria-hidden="true" tabindex="-1"></a> input = [[<span class="ss">$</span><span class="sc">\string\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.]]</span> +<span id="cb28-8"><a href="#cb28-8" aria-hidden="true" tabindex="-1"></a> convert_safe = markdown.new()</span> +<span id="cb28-9"><a href="#cb28-9" aria-hidden="true" tabindex="-1"></a> convert_unsafe = markdown.new({hybrid = true})</span> +<span id="cb28-10"><a href="#cb28-10" aria-hidden="true" tabindex="-1"></a> paragraph = [[<span class="fu">\par</span>]]</span> +<span id="cb28-11"><a href="#cb28-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb28-12"><a href="#cb28-12" aria-hidden="true" tabindex="-1"></a> tex.sprint(</span> +<span id="cb28-13"><a href="#cb28-13" aria-hidden="true" tabindex="-1"></a> convert_safe(input) .. paragraph ..</span> +<span id="cb28-14"><a href="#cb28-14" aria-hidden="true" tabindex="-1"></a> convert_unsafe(input)</span> +<span id="cb28-15"><a href="#cb28-15" aria-hidden="true" tabindex="-1"></a> )</span> +<span id="cb28-16"><a href="#cb28-16" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb28-17"><a href="#cb28-17" 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="cb29"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb29-1"><a href="#cb29-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:</p> <blockquote> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<p>In this case, we cannot use pdfTeX, because pdfTeX does not define the <code>\directlua</code> <span class="tex">T<sub>e</sub>X</span> command.</p> -<h4 data-number="2.1.1.2" id="lua-command-line-interface"><span class="header-section-number">2.1.1.2</span> Lua Command-Line Interface</h4> -<p>The Lua command-line interface (CLI) of the Markdown package makes the functionality of the Lua module accessible from the command line. This makes it possible to convert documents from markdown to <span class="tex">T<sub>e</sub>X</span> manually without any knowledge of the Lua programming language.</p> -<p>The Lua command-line interface accepts the same options as the <code>markdown</code> Lua module, but now the options are specified as command-line parameters.</p> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb30"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb30-2"><a href="#cb30-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb30-3"><a href="#cb30-3" aria-hidden="true"></a><span class="fu">\input</span> safe</span> -<span id="cb30-4"><a href="#cb30-4" aria-hidden="true"></a></span> -<span id="cb30-5"><a href="#cb30-5" aria-hidden="true"></a><span class="fu">\begingroup</span></span> -<span id="cb30-6"><a href="#cb30-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> -<span id="cb30-7"><a href="#cb30-7" aria-hidden="true"></a><span class="fu">\input</span> unsafe</span> -<span id="cb30-8"><a href="#cb30-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> -<span id="cb30-9"><a href="#cb30-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>example.md</code> with the following content:</p> -<div class="sourceCode" id="cb31"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true"></a>$\sqrt{-1}$ *equals* $i$.</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb32"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- example.md safe.tex</span> -<span id="cb32-2"><a href="#cb32-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- example.md unsafe.tex</span> -<span id="cb32-3"><a href="#cb32-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>In this case, we cannot use pdfTeX, because pdfTeX does not define +the <code>\directlua</code> <span class="tex">T<sub>e</sub>X</span> +command.</p> +<h4 data-number="2.1.1.2" id="lua-command-line-interface"><span +class="header-section-number">2.1.1.2</span> Lua Command-Line +Interface</h4> +<p>The Lua command-line interface (CLI) of the Markdown package makes +the functionality of the Lua module accessible from the command line. +This makes it possible to convert documents from markdown to <span +class="tex">T<sub>e</sub>X</span> manually without any knowledge of the +Lua programming language.</p> +<p>The Lua command-line interface accepts the same options as the +<code>markdown</code> Lua module, but now the options are specified as +command-line parameters.</p> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb30"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb30-2"><a href="#cb30-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb30-3"><a href="#cb30-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> safe</span> +<span id="cb30-4"><a href="#cb30-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb30-5"><a href="#cb30-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\begingroup</span></span> +<span id="cb30-6"><a href="#cb30-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> +<span id="cb30-7"><a href="#cb30-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> unsafe</span> +<span id="cb30-8"><a href="#cb30-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\endgroup</span></span> +<span id="cb30-9"><a href="#cb30-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>example.md</code> with the following content:</p> +<div class="sourceCode" id="cb31"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a>$\sqrt{-1}$ *equals* $i$.</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb32"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> example.md safe.tex</span> +<span id="cb32-2"><a href="#cb32-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true <span class="at">--</span> example.md unsafe.tex</span> +<span id="cb32-3"><a href="#cb32-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> <p>Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb33"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- example.md safe.tex</span> -<span id="cb33-2"><a href="#cb33-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- example.md unsafe.tex</span> -<span id="cb33-3"><a href="#cb33-3" aria-hidden="true"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> -<h3 data-number="2.1.2" id="plain-tex"><span class="header-section-number">2.1.2</span> Plain <span class="tex">T<sub>e</sub>X</span></h3> -<p>The plain <span class="tex">T<sub>e</sub>X</span> interface provides <span class="tex">T<sub>e</sub>X</span> commands that typeset markdown documents by using the Lua interface behind the scenes. Unlike the Lua interface, the plain TeX interface does not provide low-level tools for converting markdown to <span class="tex">T<sub>e</sub>X</span>. Instead, its goal is to provide high-level typesetting capabilities.</p> -<p>The plain <span class="tex">T<sub>e</sub>X</span> interface accepts the same options as the <code>markdown</code> Lua module, in addition to its own options, but now the options are specified as <span class="tex">T<sub>e</sub>X</span> commands.</p> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb34"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb34-2"><a href="#cb34-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb34-3"><a href="#cb34-3" aria-hidden="true"></a></span> -<span id="cb34-4"><a href="#cb34-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb34-5"><a href="#cb34-5" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb34-6"><a href="#cb34-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb34-7"><a href="#cb34-7" aria-hidden="true"></a></span> -<span id="cb34-8"><a href="#cb34-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb34-9"><a href="#cb34-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb34-10"><a href="#cb34-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb34-11"><a href="#cb34-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb34-12"><a href="#cb34-12" aria-hidden="true"></a></span> -<span id="cb34-13"><a href="#cb34-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb35"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb33"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> example.md safe.tex</span> +<span id="cb33-2"><a href="#cb33-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true <span class="at">--</span> example.md unsafe.tex</span> +<span id="cb33-3"><a href="#cb33-3" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> +<h3 data-number="2.1.2" id="plain-tex"><span +class="header-section-number">2.1.2</span> Plain <span +class="tex">T<sub>e</sub>X</span></h3> +<p>The plain <span class="tex">T<sub>e</sub>X</span> interface provides +<span class="tex">T<sub>e</sub>X</span> commands that typeset markdown +documents by using the Lua interface behind the scenes. Unlike the Lua +interface, the plain TeX interface does not provide low-level tools for +converting markdown to <span class="tex">T<sub>e</sub>X</span>. Instead, +its goal is to provide high-level typesetting capabilities.</p> +<p>The plain <span class="tex">T<sub>e</sub>X</span> interface accepts +the same options as the <code>markdown</code> Lua module, in addition to +its own options, but now the options are specified as <span +class="tex">T<sub>e</sub>X</span> commands.</p> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb34"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb34-2"><a href="#cb34-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb34-3"><a href="#cb34-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb34-4"><a href="#cb34-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb34-5"><a href="#cb34-5" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb34-6"><a href="#cb34-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb34-7"><a href="#cb34-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb34-8"><a href="#cb34-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb34-9"><a href="#cb34-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb34-10"><a href="#cb34-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb34-11"><a href="#cb34-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb34-12"><a href="#cb34-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb34-13"><a href="#cb34-13" 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="cb35"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb35-1"><a href="#cb35-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:</p> <blockquote> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> <p>Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb36"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true"></a><span class="ex">pdftex</span> --shell-escape document.tex</span></code></pre></div> -<h3 data-number="2.1.3" id="latex"><span class="header-section-number">2.1.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> -<p>The <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> interface provides the same level of functionality as the plain <span class="tex">T<sub>e</sub>X</span> interface by using the plain <span class="tex">T<sub>e</sub>X</span> interface behind the scenes. Unlike the plain <span class="tex">T<sub>e</sub>X</span> interface, the <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> interface uses familiar <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> idioms, such as package options and environments.</p> -<p>The <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> interface accepts the same options as the plain <span class="tex">T<sub>e</sub>X</span> interface, but now the options are specified as ⟨<em>key</em>⟩<span class="math inline"> = </span>⟨<em>value</em>⟩ pairs and they are passed either as package options, in the <code>\markdownSetup</code> command, or as parameters for the <code>markdown*</code> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> environment.</p> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb37"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb37-2"><a href="#cb37-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb37-3"><a href="#cb37-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb37-4"><a href="#cb37-4" aria-hidden="true"></a></span> -<span id="cb37-5"><a href="#cb37-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb37-6"><a href="#cb37-6" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb37-7"><a href="#cb37-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb37-8"><a href="#cb37-8" aria-hidden="true"></a></span> -<span id="cb37-9"><a href="#cb37-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> -<span id="cb37-10"><a href="#cb37-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb37-11"><a href="#cb37-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb37-12"><a href="#cb37-12" aria-hidden="true"></a></span> -<span id="cb37-13"><a href="#cb37-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb38"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb36"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div> +<h3 data-number="2.1.3" id="latex"><span +class="header-section-number">2.1.3</span> <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> +<p>The <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> interface +provides the same level of functionality as the plain <span +class="tex">T<sub>e</sub>X</span> interface by using the plain <span +class="tex">T<sub>e</sub>X</span> interface behind the scenes. Unlike +the plain <span class="tex">T<sub>e</sub>X</span> interface, the <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> interface uses familiar +<span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> idioms, such as +package options and environments.</p> +<p>The <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> interface +accepts the same options as the plain <span +class="tex">T<sub>e</sub>X</span> interface, but now the options are +specified as ⟨<em>key</em>⟩<span +class="math inline"> = </span>⟨<em>value</em>⟩ pairs and they are passed +either as package options, in the <code>\markdownSetup</code> command, +or as parameters for the <code>markdown*</code> <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> environment.</p> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb37"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb37-2"><a href="#cb37-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb37-3"><a href="#cb37-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb37-4"><a href="#cb37-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb37-5"><a href="#cb37-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb37-6"><a href="#cb37-6" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb37-7"><a href="#cb37-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb37-8"><a href="#cb37-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb37-9"><a href="#cb37-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> +<span id="cb37-10"><a href="#cb37-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb37-11"><a href="#cb37-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb37-12"><a href="#cb37-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb37-13"><a href="#cb37-13" 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="cb38"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb38-1"><a href="#cb38-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 text:</p> <blockquote> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> <p>Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb39"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true"></a><span class="ex">pdflatex</span> --shell-escape document.tex</span></code></pre></div> -<h3 data-number="2.1.4" id="context"><span class="header-section-number">2.1.4</span> Con<span class="tex">T<sub>e</sub>X</span>t</h3> -<p>The Con<span class="tex">T<sub>e</sub>X</span>t interface provides the same level of functionality as the plain <span class="tex">T<sub>e</sub>X</span> interface by using the plain <span class="tex">T<sub>e</sub>X</span> interface behind the scenes. Unlike the plain <span class="tex">T<sub>e</sub>X</span> interface, the Con<span class="tex">T<sub>e</sub>X</span>t interface uses familiar Con<span class="tex">T<sub>e</sub>X</span>t idioms as syntactic sugar.</p> -<p>The Con<span class="tex">T<sub>e</sub>X</span>t interface accepts the same options as the plain <span class="tex">T<sub>e</sub>X</span> interface.</p> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb40"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb40-2"><a href="#cb40-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb40-3"><a href="#cb40-3" aria-hidden="true"></a></span> -<span id="cb40-4"><a href="#cb40-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb40-5"><a href="#cb40-5" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb40-6"><a href="#cb40-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb40-7"><a href="#cb40-7" aria-hidden="true"></a></span> -<span id="cb40-8"><a href="#cb40-8" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span> -<span id="cb40-9"><a href="#cb40-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb40-10"><a href="#cb40-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb40-11"><a href="#cb40-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb40-12"><a href="#cb40-12" aria-hidden="true"></a></span> -<span id="cb40-13"><a href="#cb40-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb41"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb39"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdflatex</span> <span class="at">--shell-escape</span> document.tex</span></code></pre></div> +<h3 data-number="2.1.4" id="context"><span +class="header-section-number">2.1.4</span> Con<span +class="tex">T<sub>e</sub>X</span>t</h3> +<p>The Con<span class="tex">T<sub>e</sub>X</span>t interface provides +the same level of functionality as the plain <span +class="tex">T<sub>e</sub>X</span> interface by using the plain <span +class="tex">T<sub>e</sub>X</span> interface behind the scenes. Unlike +the plain <span class="tex">T<sub>e</sub>X</span> interface, the +Con<span class="tex">T<sub>e</sub>X</span>t interface uses familiar +Con<span class="tex">T<sub>e</sub>X</span>t idioms as syntactic +sugar.</p> +<p>The Con<span class="tex">T<sub>e</sub>X</span>t interface accepts the +same options as the plain <span class="tex">T<sub>e</sub>X</span> +interface.</p> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb40"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb40-2"><a href="#cb40-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb40-3"><a href="#cb40-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb40-4"><a href="#cb40-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb40-5"><a href="#cb40-5" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb40-6"><a href="#cb40-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb40-7"><a href="#cb40-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb40-8"><a href="#cb40-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span> +<span id="cb40-9"><a href="#cb40-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb40-10"><a href="#cb40-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb40-11"><a href="#cb40-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb40-12"><a href="#cb40-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb40-13"><a href="#cb40-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb41"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> <p>Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb42"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true"></a><span class="ex">texexec</span> --passon=--shell-escape document.tex</span></code></pre></div> -<h2 data-number="2.2" id="options"><span class="header-section-number">2.2</span> Options</h2> -<p>In this section, I will describe all the options recognized by the Markdown package.</p> -<h3 data-number="2.2.1" id="lua-1"><span class="header-section-number">2.2.1</span> Lua</h3> -<p>Lua options control the conversion from markdown to <span class="tex">T<sub>e</sub>X</span>. They are supported by all interfaces of the Markdown package starting with the low-level Lua interfaces and all the way up to the <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> and Con<span class="tex">T<sub>e</sub>X</span>t interfaces.</p> -<h4 data-number="2.2.1.1" id="option-cachedir"><span class="header-section-number">2.2.1.1</span> Option <code>cacheDir</code></h4> +<div class="sourceCode" id="cb42"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texexec</span> <span class="at">--passon</span><span class="op">=</span>--shell-escape document.tex</span></code></pre></div> +<h2 data-number="2.2" id="options"><span +class="header-section-number">2.2</span> Options</h2> +<p>In this section, I will describe all the options recognized by the +Markdown package.</p> +<h3 data-number="2.2.1" id="lua-1"><span +class="header-section-number">2.2.1</span> Lua</h3> +<p>Lua options control the conversion from markdown to <span +class="tex">T<sub>e</sub>X</span>. They are supported by all interfaces +of the Markdown package starting with the low-level Lua interfaces and +all the way up to the <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> and Con<span +class="tex">T<sub>e</sub>X</span>t interfaces.</p> +<h4 data-number="2.2.1.1" id="option-cachedir"><span +class="header-section-number">2.2.1.1</span> Option +<code>cacheDir</code></h4> <dl> <dt><code>cacheDir</code> (default value: <code>"."</code>)</dt> -<dd><p>A path to the directory containing auxiliary cache files. If the last segment of the path does not exist, it will be created by the Lua command-line and plain <span class="tex">T<sub>e</sub>X</span> implementations. The Lua implementation expects that the entire path already exists.</p> -<p>When iteratively writing and typesetting a markdown document, the cache files are going to accumulate over time. You are advised to clean the cache directory every now and then, or to set it to a temporary filesystem (such as <code>/tmp</code> on UN*X systems), which gets periodically emptied.</p> +<dd> +<p>A path to the directory containing auxiliary cache files. If the last +segment of the path does not exist, it will be created by the Lua +command-line and plain <span class="tex">T<sub>e</sub>X</span> +implementations. The Lua implementation expects that the entire path +already exists.</p> +<p>When iteratively writing and typesetting a markdown document, the +cache files are going to accumulate over time. You are advised to clean +the cache directory every now and then, or to set it to a temporary +filesystem (such as <code>/tmp</code> on UN*X systems), which gets +periodically emptied.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb43"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb43-2"><a href="#cb43-2" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb43-3"><a href="#cb43-3" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb43-4"><a href="#cb43-4" aria-hidden="true"></a> local convert = markdown.new({cacheDir = "cache"})</span> -<span id="cb43-5"><a href="#cb43-5" aria-hidden="true"></a> local input = "Hello *world*!"</span> -<span id="cb43-6"><a href="#cb43-6" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb43-7"><a href="#cb43-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Create an empty directory named <code>cache</code> next to our text document. Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb44"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Several cache files of the Markdown package will also be produced in the <code>cache</code> directory as we requested using the <code>cacheDir</code> option.</p> -<h5 class="unnumbered" data-number="" id="lua-cli-example">Lua CLI Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb45"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb45-2"><a href="#cb45-2" aria-hidden="true"></a><span class="fu">\input</span> hello</span> -<span id="cb45-3"><a href="#cb45-3" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>hello.md</code> with the following content:</p> -<div class="sourceCode" id="cb46"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true"></a>Hello *world*!</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb47"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb47-1"><a href="#cb47-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ cacheDir=cache -- hello.md hello.tex</span> -<span id="cb47-2"><a href="#cb47-2" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A directory named <code>cache</code> containing several cache files of the Markdown package will also be produced as we requested using the <code>cacheDir</code> option.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb48"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb48-1"><a href="#cb48-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb48-2"><a href="#cb48-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionCacheDir</span>{cache}</span> -<span id="cb48-3"><a href="#cb48-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb48-4"><a href="#cb48-4" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb48-5"><a href="#cb48-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb48-6"><a href="#cb48-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb49"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb49-1"><a href="#cb49-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A directory named <code>cache</code> containing several cache files of the Markdown package will also be produced as we requested using the <code>cacheDir</code> option.</p> -<h5 class="unnumbered" data-number="" id="latex-example"><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="cb50"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb50-1"><a href="#cb50-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb50-2"><a href="#cb50-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[cacheDir=cache]{<span class="ex">markdown</span>}</span> -<span id="cb50-3"><a href="#cb50-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb50-4"><a href="#cb50-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb50-5"><a href="#cb50-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb50-6"><a href="#cb50-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb50-7"><a href="#cb50-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb51"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb51-1"><a href="#cb51-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A directory named <code>cache</code> containing several cache files of the Markdown package will also be produced as we requested using the <code>cacheDir</code> option.</p> -<h5 class="unnumbered" data-number="" id="context-example">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb52"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb52-1"><a href="#cb52-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb52-2"><a href="#cb52-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[cacheDir = cache]</span> -<span id="cb52-3"><a href="#cb52-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb52-4"><a href="#cb52-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb52-5"><a href="#cb52-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb52-6"><a href="#cb52-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb52-7"><a href="#cb52-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb53"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb53-1"><a href="#cb53-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A directory named <code>cache</code> containing several cache files of the Markdown package will also be produced as we requested using the <code>cacheDir</code> option.</p> -<h4 data-number="2.2.1.2" id="option-frozencachefilename"><span class="header-section-number">2.2.1.2</span> Option <code>frozenCacheFileName</code></h4> +<h5 class="unnumbered" id="lua-module-example">Lua Module Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb43"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb43-2"><a href="#cb43-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb43-3"><a href="#cb43-3" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb43-4"><a href="#cb43-4" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new({cacheDir = "cache"})</span> +<span id="cb43-5"><a href="#cb43-5" aria-hidden="true" tabindex="-1"></a> local input = "Hello *world*!"</span> +<span id="cb43-6"><a href="#cb43-6" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb43-7"><a href="#cb43-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Create an empty directory named <code>cache</code> next to our text +document. Then, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb44"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb44-1"><a href="#cb44-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 text “Hello <em>world</em>!” Several cache files of the +Markdown package will also be produced in the <code>cache</code> +directory as we requested using the <code>cacheDir</code> option.</p> +<h5 class="unnumbered" id="lua-cli-example">Lua CLI Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb45"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb45-2"><a href="#cb45-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> hello</span> +<span id="cb45-3"><a href="#cb45-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>hello.md</code> with the following content:</p> +<div class="sourceCode" id="cb46"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb47"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb47-1"><a href="#cb47-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ cacheDir=cache <span class="at">--</span> hello.md hello.tex</span> +<span id="cb47-2"><a href="#cb47-2" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the text “Hello <em>world</em>!” A directory named +<code>cache</code> containing several cache files of the Markdown +package will also be produced as we requested using the +<code>cacheDir</code> option.</p> +<h5 class="unnumbered" id="plain-tex-example">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb48"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb48-1"><a href="#cb48-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb48-2"><a href="#cb48-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionCacheDir</span>{cache}</span> +<span id="cb48-3"><a href="#cb48-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb48-4"><a href="#cb48-4" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb48-5"><a href="#cb48-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb48-6"><a href="#cb48-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="cb49"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb49-1"><a href="#cb49-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 text “Hello <em>world</em>!” A directory named +<code>cache</code> containing several cache files of the Markdown +package will also be produced as we requested using the +<code>cacheDir</code> option.</p> +<h5 class="unnumbered" id="latex-example"><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="cb50"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb50-1"><a href="#cb50-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb50-2"><a href="#cb50-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[cacheDir=cache]{<span class="ex">markdown</span>}</span> +<span id="cb50-3"><a href="#cb50-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb50-4"><a href="#cb50-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb50-5"><a href="#cb50-5" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb50-6"><a href="#cb50-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb50-7"><a href="#cb50-7" 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="cb51"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb51-1"><a href="#cb51-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 text “Hello <em>world</em>!” A directory named +<code>cache</code> containing several cache files of the Markdown +package will also be produced as we requested using the +<code>cacheDir</code> option.</p> +<h5 class="unnumbered" id="context-example">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb52"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb52-1"><a href="#cb52-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb52-2"><a href="#cb52-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[cacheDir = cache]</span> +<span id="cb52-3"><a href="#cb52-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb52-4"><a href="#cb52-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb52-5"><a href="#cb52-5" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb52-6"><a href="#cb52-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb52-7"><a href="#cb52-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb53"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb53-1"><a href="#cb53-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the text “Hello <em>world</em>!” A directory named +<code>cache</code> containing several cache files of the Markdown +package will also be produced as we requested using the +<code>cacheDir</code> option.</p> +<h4 data-number="2.2.1.2" id="option-contentblockslanguagemap"><span +class="header-section-number">2.2.1.2</span> Option +<code>contentBlocksLanguageMap</code></h4> <dl> -<dt><code>frozenCacheFileName</code> (default value: <code>"frozenCache.tex"</code>)</dt> -<dd><p>A path to an output file (frozen cache) that will be created when the <strong><code>finalizeCache</code></strong> option is enabled and will contain a mapping between an enumeration of markdown documents and their auxiliary cache files.</p> -<p>The frozen cache makes it possible to later typeset a plain <span class="tex">T<sub>e</sub>X</span> document that contains markdown documents without invoking Lua using the <code>\markdownOptionFrozenCache</code> plain <span class="tex">T<sub>e</sub>X</span> option. As a result, the plain <span class="tex">T<sub>e</sub>X</span> document becomes more portable, but further changes in the order and the content of markdown documents will not be reflected.</p> +<dt><code>contentBlocksLanguageMap</code> (default value: +<code>"markdown-languages.json"</code>)</dt> +<dd> +<p>The filename of the <abbr>JSON</abbr> file that maps filename +extensions to programming language names in the iA Writer content blocks +when the <strong><code>contentBlocks</code></strong> option is +enabled.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-1">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb54"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb54-1"><a href="#cb54-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb54-2"><a href="#cb54-2" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb54-3"><a href="#cb54-3" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb54-4"><a href="#cb54-4" aria-hidden="true"></a> local convert = markdown.new({finalizeCache = true, frozenCacheFileName = "cache.tex"})</span> -<span id="cb54-5"><a href="#cb54-5" aria-hidden="true"></a> local input = "Hello *world*!"</span> -<span id="cb54-6"><a href="#cb54-6" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb54-7"><a href="#cb54-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 class="unnumbered" id="latex-example-1"><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>table.csv</code> with the following content:</p> +<pre class="csv"><code>Name,Surname,Born +Albert,Einstein,1879 +Marie,Curie,1867 +Thomas,Edison,1847</code></pre> +<p>Create also a text document named <code>language-map.json</code> with +the following content:</p> +<div class="sourceCode" id="cb55"><pre +class="sourceCode js"><code class="sourceCode javascript"><span id="cb55-1"><a href="#cb55-1" aria-hidden="true" tabindex="-1"></a>{</span> +<span id="cb55-2"><a href="#cb55-2" aria-hidden="true" tabindex="-1"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"LaTeX"</span></span> +<span id="cb55-3"><a href="#cb55-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<p>Create also a text document named <code>code.tex</code> with the +following content:</p> +<div class="sourceCode" id="cb56"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb56-1"><a href="#cb56-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> +<p>Create also a text document named <code>part.md</code> with the +following content:</p> +<div class="sourceCode" id="cb57"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb57-1"><a href="#cb57-1" aria-hidden="true" tabindex="-1"></a>This is a *transcluded markdown document*.</span></code></pre></div> +<p>Create also a text document named <code>document.tex</code> with the +following content:</p> +<div class="sourceCode" id="cb58"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb58-1"><a href="#cb58-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb58-2"><a href="#cb58-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> +<span id="cb58-3"><a href="#cb58-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> +<span id="cb58-4"><a href="#cb58-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb58-5"><a href="#cb58-5" aria-hidden="true" tabindex="-1"></a> contentBlocksLanguageMap = {language-map.json},</span> +<span id="cb58-6"><a href="#cb58-6" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb58-7"><a href="#cb58-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb58-8"><a href="#cb58-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb58-9"><a href="#cb58-9" aria-hidden="true" tabindex="-1"></a>/table.csv (An example table)</span> +<span id="cb58-10"><a href="#cb58-10" aria-hidden="true" tabindex="-1"></a>/code.tex (An example code listing)</span> +<span id="cb58-11"><a href="#cb58-11" aria-hidden="true" tabindex="-1"></a>/part.md (A file transclusion example)</span> +<span id="cb58-12"><a href="#cb58-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb58-13"><a href="#cb58-13" 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="cb59"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb59-1"><a href="#cb59-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 text:</p> +<blockquote> +<table> +<thead> +<tr class="header"> +<th>Name</th> +<th>Surname</th> +<th>Born</th> +</tr> +</thead> +<tbody> +<tr class="odd"> +<td>Albert</td> +<td>Einstein</td> +<td>1879</td> +</tr> +<tr class="even"> +<td>Marie</td> +<td>Curie</td> +<td>1867</td> +</tr> +<tr class="odd"> +<td>Thomas</td> +<td>Edison</td> +<td>1847</td> +</tr> +</tbody> +</table> +<p>Table 1: An example table</p> +<div class="sourceCode" id="cb60"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb60-1"><a href="#cb60-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> +<p>This is a <em>transcluded markdown document</em>.</p> +</blockquote> +<h5 class="unnumbered" id="context-example-1">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>table.csv</code> with the following content:</p> +<pre class="csv"><code>Name,Surname,Born +Albert,Einstein,1879 +Marie,Curie,1867 +Thomas,Edison,1847</code></pre> +<p>Create also a text document named <code>language-map.json</code> with +the following content:</p> +<div class="sourceCode" id="cb62"><pre +class="sourceCode js"><code class="sourceCode javascript"><span id="cb62-1"><a href="#cb62-1" aria-hidden="true" tabindex="-1"></a>{</span> +<span id="cb62-2"><a href="#cb62-2" aria-hidden="true" tabindex="-1"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"ConTeXt"</span></span> +<span id="cb62-3"><a href="#cb62-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<p>Create also a text document named <code>code.tex</code> with the +following content:</p> +<div class="sourceCode" id="cb63"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb63-1"><a href="#cb63-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> +<p>Create also a text document named <code>part.md</code> with the +following content:</p> +<div class="sourceCode" id="cb64"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb64-1"><a href="#cb64-1" aria-hidden="true" tabindex="-1"></a>This is a *transcluded markdown document*.</span></code></pre></div> +<p>Create also a text document named <code>document.tex</code> with the +following content:</p> +<div class="sourceCode" id="cb65"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb65-1"><a href="#cb65-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb65-2"><a href="#cb65-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span> +<span id="cb65-3"><a href="#cb65-3" aria-hidden="true" tabindex="-1"></a> [</span> +<span id="cb65-4"><a href="#cb65-4" aria-hidden="true" tabindex="-1"></a> contentBlocks = yes,</span> +<span id="cb65-5"><a href="#cb65-5" aria-hidden="true" tabindex="-1"></a> contentBlocksLanguageMap = language-map.json,</span> +<span id="cb65-6"><a href="#cb65-6" aria-hidden="true" tabindex="-1"></a> ]</span> +<span id="cb65-7"><a href="#cb65-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\definetyping</span> [ConTeXt]</span> +<span id="cb65-8"><a href="#cb65-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\setuptyping</span> [ConTeXt] [option=TEX]</span> +<span id="cb65-9"><a href="#cb65-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb65-10"><a href="#cb65-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb65-11"><a href="#cb65-11" aria-hidden="true" tabindex="-1"></a>/table.csv (An example table)</span> +<span id="cb65-12"><a href="#cb65-12" aria-hidden="true" tabindex="-1"></a>/code.tex (An example code listing)</span> +<span id="cb65-13"><a href="#cb65-13" aria-hidden="true" tabindex="-1"></a>/part.md (A file transclusion example)</span> +<span id="cb65-14"><a href="#cb65-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb65-15"><a href="#cb65-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb66"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb66-1"><a href="#cb66-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<table> +<thead> +<tr class="header"> +<th>Name</th> +<th>Surname</th> +<th>Born</th> +</tr> +</thead> +<tbody> +<tr class="odd"> +<td>Albert</td> +<td>Einstein</td> +<td>1879</td> +</tr> +<tr class="even"> +<td>Marie</td> +<td>Curie</td> +<td>1867</td> +</tr> +<tr class="odd"> +<td>Thomas</td> +<td>Edison</td> +<td>1847</td> +</tr> +</tbody> +</table> +<p>Table 1: An example table</p> +<div class="sourceCode" id="cb67"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb67-1"><a href="#cb67-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> +<p>This is a <em>transcluded markdown document</em>.</p> +</blockquote> +<h4 data-number="2.2.1.3" id="option-debugextensionsfilename"><span +class="header-section-number">2.2.1.3</span> Option +<code>debugExtensionsFileName</code></h4> +<dl> +<dt><code>debugExtensionsFileName</code> (default value: +<code>"debug-extensions.json"</code>)</dt> +<dd> +<p>The filename of the <abbr>JSON</abbr> file that will be produced when +the <strong><code>debugExtensions</code></strong> option is enabled. +This file will contain the extensible subset of the <abbr>peg</abbr> +grammar of markdown after built-in syntax extensions (see options +<strong><code>citations</code></strong>, +<strong><code>contentBlocks</code></strong>, +<strong><code>definitionLists</code></strong>, etc.) and user-defined +syntax extensions (see option <strong><code>extensions</code></strong>) +have been applied.</p> +</dd> +</dl> +<h4 data-number="2.2.1.4" id="option-frozencachefilename"><span +class="header-section-number">2.2.1.4</span> Option +<code>frozenCacheFileName</code></h4> +<dl> +<dt><code>frozenCacheFileName</code> (default value: +<code>"frozenCache.tex"</code>)</dt> +<dd> +<p>A path to an output file (frozen cache) that will be created when the +<strong><code>finalizeCache</code></strong> option is enabled and will +contain a mapping between an enumeration of markdown documents and their +auxiliary cache files.</p> +<p>The frozen cache makes it possible to later typeset a plain <span +class="tex">T<sub>e</sub>X</span> document that contains markdown +documents without invoking Lua using the +<code>\markdownOptionFrozenCache</code> plain <span +class="tex">T<sub>e</sub>X</span> option. As a result, the plain <span +class="tex">T<sub>e</sub>X</span> document becomes more portable, but +further changes in the order and the content of markdown documents will +not be reflected.</p> +</dd> +</dl> +<h5 class="unnumbered" id="lua-module-example-1">Lua Module Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb68"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb68-1"><a href="#cb68-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb68-2"><a href="#cb68-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb68-3"><a href="#cb68-3" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb68-4"><a href="#cb68-4" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new({finalizeCache = true, frozenCacheFileName = "cache.tex"})</span> +<span id="cb68-5"><a href="#cb68-5" aria-hidden="true" tabindex="-1"></a> local input = "Hello *world*!"</span> +<span id="cb68-6"><a href="#cb68-6" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb68-7"><a href="#cb68-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb55"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb55-1"><a href="#cb55-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizeCache</code> and <code>frozenCacheFileName</code> options.</p> -<h5 class="unnumbered" data-number="" id="lua-cli-example-1">Lua CLI Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb56"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb56-1"><a href="#cb56-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb56-2"><a href="#cb56-2" aria-hidden="true"></a><span class="fu">\input</span> hello</span> -<span id="cb56-3"><a href="#cb56-3" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>hello.md</code> with the following content:</p> -<div class="sourceCode" id="cb57"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb57-1"><a href="#cb57-1" aria-hidden="true"></a>Hello *world*!</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb58"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb58-1"><a href="#cb58-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ finalizeCache=true frozenCacheFileName=cache.tex -- hello.md hello.tex</span> -<span id="cb58-2"><a href="#cb58-2" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizeCache</code> and <code>frozenCacheFileName</code> options.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-1">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb59"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb59-1"><a href="#cb59-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb59-2"><a href="#cb59-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> -<span id="cb59-3"><a href="#cb59-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{cache.tex}</span> -<span id="cb59-4"><a href="#cb59-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb59-5"><a href="#cb59-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb59-6"><a href="#cb59-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb59-7"><a href="#cb59-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb60"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb60-1"><a href="#cb60-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizeCache</code> and <code>frozenCacheFileName</code> options.</p> -<p>Next, create a new text document <code>frozen-document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb61"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb61-1"><a href="#cb61-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb61-2"><a href="#cb61-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> -<span id="cb61-3"><a href="#cb61-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{cache.tex}</span> -<span id="cb61-4"><a href="#cb61-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb61-5"><a href="#cb61-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb61-6"><a href="#cb61-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb61-7"><a href="#cb61-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb69"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb69-1"><a href="#cb69-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 text “Hello <em>world</em>!” A frozen cache will also be +produced in the <code>cache.tex</code> output file as we requested using +the <code>finalizeCache</code> and <code>frozenCacheFileName</code> +options.</p> +<h5 class="unnumbered" id="lua-cli-example-1">Lua CLI Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb70"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb70-1"><a href="#cb70-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb70-2"><a href="#cb70-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> hello</span> +<span id="cb70-3"><a href="#cb70-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>hello.md</code> with the following content:</p> +<div class="sourceCode" id="cb71"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb71-1"><a href="#cb71-1" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb72"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb72-1"><a href="#cb72-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ finalizeCache=true frozenCacheFileName=cache.tex <span class="at">--</span> hello.md hello.tex</span> +<span id="cb72-2"><a href="#cb72-2" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the text “Hello <em>world</em>!” A frozen cache will also be +produced in the <code>cache.tex</code> output file as we requested using +the <code>finalizeCache</code> and <code>frozenCacheFileName</code> +options.</p> +<h5 class="unnumbered" id="plain-tex-example-1">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb73"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb73-1"><a href="#cb73-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb73-2"><a href="#cb73-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> +<span id="cb73-3"><a href="#cb73-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{cache.tex}</span> +<span id="cb73-4"><a href="#cb73-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb73-5"><a href="#cb73-5" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb73-6"><a href="#cb73-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb73-7"><a href="#cb73-7" 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="cb74"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb74-1"><a href="#cb74-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 text “Hello <em>world</em>!” A frozen cache will also be +produced in the <code>cache.tex</code> output file as we requested using +the <code>finalizeCache</code> and <code>frozenCacheFileName</code> +options.</p> +<p>Next, create a new text document <code>frozen-document.tex</code> +with the following content:</p> +<div class="sourceCode" id="cb75"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb75-1"><a href="#cb75-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb75-2"><a href="#cb75-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> +<span id="cb75-3"><a href="#cb75-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{cache.tex}</span> +<span id="cb75-4"><a href="#cb75-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb75-5"><a href="#cb75-5" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span> +<span id="cb75-6"><a href="#cb75-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb75-7"><a href="#cb75-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb62"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb62-1"><a href="#cb62-1" aria-hidden="true"></a><span class="ex">pdftex</span> -no-shell-escape frozen-document.tex</span></code></pre></div> -<p>A PDF document named <code>frozen-document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h5 class="unnumbered" data-number="" id="latex-example-1"><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="cb63"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb63-1"><a href="#cb63-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</span> -<span id="cb63-2"><a href="#cb63-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[frozenCacheFileName=cache.tex]{<span class="ex">markdown</span>}</span> -<span id="cb63-3"><a href="#cb63-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb63-4"><a href="#cb63-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb63-5"><a href="#cb63-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb63-6"><a href="#cb63-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb63-7"><a href="#cb63-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb64"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb64-1"><a href="#cb64-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizecache</code> and <code>frozenCacheFileName</code> options.</p> -<p>Next, create a new text document <code>frozen-document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb65"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb65-1"><a href="#cb65-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span> -<span id="cb65-2"><a href="#cb65-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[frozenCacheFileName=cache.tex]{<span class="ex">markdown</span>}</span> -<span id="cb65-3"><a href="#cb65-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb65-4"><a href="#cb65-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb65-5"><a href="#cb65-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb65-6"><a href="#cb65-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb65-7"><a href="#cb65-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb76"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb76-1"><a href="#cb76-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> <span class="at">-no-shell-escape</span> frozen-document.tex</span></code></pre></div> +<p>A PDF document named <code>frozen-document.pdf</code> should be +produced and contain the text “Hello <em>world</em>!” Since we used the +contents of the frozen cache using the +<code>\markdownOptionFrozenCache</code> option, we were able to typeset +the document without accessing the shell or invoking Lua, but the change +in the content of the markdown document from “Hello <em>world</em>!” to +“Hi <em>world</em>!” was not reflected.</p> +<h5 class="unnumbered" id="latex-example-2"><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="cb77"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb77-1"><a href="#cb77-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</span> +<span id="cb77-2"><a href="#cb77-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[frozenCacheFileName=cache.tex]{<span class="ex">markdown</span>}</span> +<span id="cb77-3"><a href="#cb77-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb77-4"><a href="#cb77-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb77-5"><a href="#cb77-5" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb77-6"><a href="#cb77-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb77-7"><a href="#cb77-7" 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="cb78"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb78-1"><a href="#cb78-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 text “Hello <em>world</em>!” A frozen cache will also be +produced in the <code>cache.tex</code> output file as we requested using +the <code>finalizecache</code> and <code>frozenCacheFileName</code> +options.</p> +<p>Next, create a new text document <code>frozen-document.tex</code> +with the following content:</p> +<div class="sourceCode" id="cb79"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb79-1"><a href="#cb79-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span> +<span id="cb79-2"><a href="#cb79-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[frozenCacheFileName=cache.tex]{<span class="ex">markdown</span>}</span> +<span id="cb79-3"><a href="#cb79-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb79-4"><a href="#cb79-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb79-5"><a href="#cb79-5" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span> +<span id="cb79-6"><a href="#cb79-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb79-7"><a href="#cb79-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb66"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb66-1"><a href="#cb66-1" aria-hidden="true"></a><span class="ex">pdflatex</span> -no-shell-escape frozen-document.tex</span></code></pre></div> -<p>A PDF document named <code>frozen-document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>frozencache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h5 class="unnumbered" data-number="" id="context-example-1">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb67"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb67-1"><a href="#cb67-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb67-2"><a href="#cb67-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span></span> -<span id="cb67-3"><a href="#cb67-3" aria-hidden="true"></a> [</span> -<span id="cb67-4"><a href="#cb67-4" aria-hidden="true"></a> finalizeCache = yes,</span> -<span id="cb67-5"><a href="#cb67-5" aria-hidden="true"></a> frozenCacheFileName = cache.tex,</span> -<span id="cb67-6"><a href="#cb67-6" aria-hidden="true"></a> ]</span> -<span id="cb67-7"><a href="#cb67-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb67-8"><a href="#cb67-8" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb67-9"><a href="#cb67-9" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb67-10"><a href="#cb67-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb67-11"><a href="#cb67-11" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb68"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb68-1"><a href="#cb68-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizeCache</code> and <code>frozenCacheFileName</code> options.</p> -<p>Next, create a new text document <code>frozen-document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb69"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb69-1"><a href="#cb69-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb69-2"><a href="#cb69-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span></span> -<span id="cb69-3"><a href="#cb69-3" aria-hidden="true"></a> [</span> -<span id="cb69-4"><a href="#cb69-4" aria-hidden="true"></a> frozenCache = yes,</span> -<span id="cb69-5"><a href="#cb69-5" aria-hidden="true"></a> frozenCacheFileName = cache.tex,</span> -<span id="cb69-6"><a href="#cb69-6" aria-hidden="true"></a> ]</span> -<span id="cb69-7"><a href="#cb69-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb69-8"><a href="#cb69-8" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb69-9"><a href="#cb69-9" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb69-10"><a href="#cb69-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb69-11"><a href="#cb69-11" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb80"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb80-1"><a href="#cb80-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdflatex</span> <span class="at">-no-shell-escape</span> frozen-document.tex</span></code></pre></div> +<p>A PDF document named <code>frozen-document.pdf</code> should be +produced and contain the text “Hello <em>world</em>!” Since we used the +contents of the frozen cache using the <code>frozencache</code> option, +we were able to typeset the document without accessing the shell or +invoking Lua, but the change in the content of the markdown document +from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not +reflected.</p> +<h5 class="unnumbered" id="context-example-2">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb81"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb81-1"><a href="#cb81-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb81-2"><a href="#cb81-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span> +<span id="cb81-3"><a href="#cb81-3" aria-hidden="true" tabindex="-1"></a> [</span> +<span id="cb81-4"><a href="#cb81-4" aria-hidden="true" tabindex="-1"></a> finalizeCache = yes,</span> +<span id="cb81-5"><a href="#cb81-5" aria-hidden="true" tabindex="-1"></a> frozenCacheFileName = cache.tex,</span> +<span id="cb81-6"><a href="#cb81-6" aria-hidden="true" tabindex="-1"></a> ]</span> +<span id="cb81-7"><a href="#cb81-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb81-8"><a href="#cb81-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb81-9"><a href="#cb81-9" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb81-10"><a href="#cb81-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb81-11"><a href="#cb81-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb82"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb82-1"><a href="#cb82-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the text “Hello <em>world</em>!” A frozen cache will also be +produced in the <code>cache.tex</code> output file as we requested using +the <code>finalizeCache</code> and <code>frozenCacheFileName</code> +options.</p> +<p>Next, create a new text document <code>frozen-document.tex</code> +with the following content:</p> +<div class="sourceCode" id="cb83"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb83-1"><a href="#cb83-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb83-2"><a href="#cb83-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span> +<span id="cb83-3"><a href="#cb83-3" aria-hidden="true" tabindex="-1"></a> [</span> +<span id="cb83-4"><a href="#cb83-4" aria-hidden="true" tabindex="-1"></a> frozenCache = yes,</span> +<span id="cb83-5"><a href="#cb83-5" aria-hidden="true" tabindex="-1"></a> frozenCacheFileName = cache.tex,</span> +<span id="cb83-6"><a href="#cb83-6" aria-hidden="true" tabindex="-1"></a> ]</span> +<span id="cb83-7"><a href="#cb83-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb83-8"><a href="#cb83-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb83-9"><a href="#cb83-9" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span> +<span id="cb83-10"><a href="#cb83-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb83-11"><a href="#cb83-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb70"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb70-1"><a href="#cb70-1" aria-hidden="true"></a><span class="ex">texexec</span> --passon=--no-shell-escape frozen-document.tex</span></code></pre></div> -<p>A PDF document named <code>frozen-document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h4 data-number="2.2.1.3" id="option-blankbeforeblockquote"><span class="header-section-number">2.2.1.3</span> Option <code>blankBeforeBlockquote</code></h4> +<div class="sourceCode" id="cb84"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb84-1"><a href="#cb84-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texexec</span> <span class="at">--passon</span><span class="op">=</span>--no-shell-escape frozen-document.tex</span></code></pre></div> +<p>A PDF document named <code>frozen-document.pdf</code> should be +produced and contain the text “Hello <em>world</em>!” Since we used the +contents of the frozen cache using the +<code>\markdownOptionFrozenCache</code> option, we were able to typeset +the document without accessing the shell or invoking Lua, but the change +in the content of the markdown document from “Hello <em>world</em>!” to +“Hi <em>world</em>!” was not reflected.</p> +<h4 data-number="2.2.1.5" id="option-blankbeforeblockquote"><span +class="header-section-number">2.2.1.5</span> Option +<code>blankBeforeBlockquote</code></h4> +<dl> +<dt><code>blankBeforeBlockquote</code> (default value: +<code>false</code>)</dt> +<dd> <dl> -<dt><code>blankBeforeBlockquote</code> (default value: <code>false</code>)</dt> -<dd><dl> <dt>true</dt> -<dd><p>Require a blank line between a paragraph and the following blockquote.</p> +<dd> +<p>Require a blank line between a paragraph and the following +blockquote.</p> </dd> <dt>false</dt> -<dd><p>Do not require a blank line between a paragraph and the following blockquote.</p> +<dd> +<p>Do not require a blank line between a paragraph and the following +blockquote.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-2">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb71"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb71-1"><a href="#cb71-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb71-2"><a href="#cb71-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb71-3"><a href="#cb71-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb71-4"><a href="#cb71-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb71-5"><a href="#cb71-5" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb71-6"><a href="#cb71-6" aria-hidden="true"></a> local convert, input</span> -<span id="cb71-7"><a href="#cb71-7" aria-hidden="true"></a></span> -<span id="cb71-8"><a href="#cb71-8" aria-hidden="true"></a> convert = markdown.new()</span> -<span id="cb71-9"><a href="#cb71-9" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb71-10"><a href="#cb71-10" aria-hidden="true"></a> "> A quote." .. newline</span> -<span id="cb71-11"><a href="#cb71-11" aria-hidden="true"></a> tex.sprint(convert(input))</span> -<span id="cb71-12"><a href="#cb71-12" aria-hidden="true"></a></span> -<span id="cb71-13"><a href="#cb71-13" aria-hidden="true"></a> convert = markdown.new({blankBeforeBlockquote = true})</span> -<span id="cb71-14"><a href="#cb71-14" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb71-15"><a href="#cb71-15" aria-hidden="true"></a> "> Not a quote." .. newline</span> -<span id="cb71-16"><a href="#cb71-16" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb71-17"><a href="#cb71-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 class="unnumbered" id="lua-module-example-2">Lua Module Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb85"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb85-1"><a href="#cb85-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb85-2"><a href="#cb85-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb85-3"><a href="#cb85-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb85-4"><a href="#cb85-4" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb85-5"><a href="#cb85-5" aria-hidden="true" tabindex="-1"></a> local newline = [[^^J^^J]]</span> +<span id="cb85-6"><a href="#cb85-6" aria-hidden="true" tabindex="-1"></a> local convert, input</span> +<span id="cb85-7"><a href="#cb85-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb85-8"><a href="#cb85-8" aria-hidden="true" tabindex="-1"></a> convert = markdown.new()</span> +<span id="cb85-9"><a href="#cb85-9" aria-hidden="true" tabindex="-1"></a> input = "A paragraph." .. newline ..</span> +<span id="cb85-10"><a href="#cb85-10" aria-hidden="true" tabindex="-1"></a> "> A quote." .. newline</span> +<span id="cb85-11"><a href="#cb85-11" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input))</span> +<span id="cb85-12"><a href="#cb85-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb85-13"><a href="#cb85-13" aria-hidden="true" tabindex="-1"></a> convert = markdown.new({blankBeforeBlockquote = true})</span> +<span id="cb85-14"><a href="#cb85-14" aria-hidden="true" tabindex="-1"></a> input = "A paragraph." .. newline ..</span> +<span id="cb85-15"><a href="#cb85-15" aria-hidden="true" tabindex="-1"></a> "> Not a quote." .. newline</span> +<span id="cb85-16"><a href="#cb85-16" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb85-17"><a href="#cb85-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb72"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb72-1"><a href="#cb72-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb86"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb86-1"><a href="#cb86-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:</p> <blockquote> <p>A paragraph.</p> <blockquote> @@ -648,22 +1284,36 @@ </blockquote> <p>A paragraph > Not a quote.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-2">Lua CLI Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb73"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb73-1"><a href="#cb73-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb73-2"><a href="#cb73-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb73-3"><a href="#cb73-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb73-4"><a href="#cb73-4" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb73-5"><a href="#cb73-5" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb74"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb74-1"><a href="#cb74-1" aria-hidden="true"></a>A paragraph.</span> -<span id="cb74-2"><a href="#cb74-2" aria-hidden="true"></a><span class="at">> A quote?</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb75"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb75-1"><a href="#cb75-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb75-2"><a href="#cb75-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ blankBeforeBlockquote=true -- content.md optiontrue.tex</span> -<span id="cb75-3"><a href="#cb75-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="lua-cli-example-2">Lua CLI Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb87"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb87-1"><a href="#cb87-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb87-2"><a href="#cb87-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb87-3"><a href="#cb87-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb87-4"><a href="#cb87-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb87-5"><a href="#cb87-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>content.md</code> with the following content:</p> +<div class="sourceCode" id="cb88"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb88-1"><a href="#cb88-1" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb88-2"><a href="#cb88-2" aria-hidden="true" tabindex="-1"></a><span class="at">> A quote?</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb89"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb89-1"><a href="#cb89-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span> +<span id="cb89-2"><a href="#cb89-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ blankBeforeBlockquote=true <span class="at">--</span> content.md optiontrue.tex</span> +<span id="cb89-3"><a href="#cb89-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>A paragraph.</p> <blockquote> @@ -671,25 +1321,30 @@ </blockquote> <p>A paragraph. > A quote?</p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-2">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb76"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb76-1"><a href="#cb76-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb76-2"><a href="#cb76-2" aria-hidden="true"></a></span> -<span id="cb76-3"><a href="#cb76-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb76-4"><a href="#cb76-4" aria-hidden="true"></a>A paragraph.</span> -<span id="cb76-5"><a href="#cb76-5" aria-hidden="true"></a>> A quote.</span> -<span id="cb76-6"><a href="#cb76-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb76-7"><a href="#cb76-7" aria-hidden="true"></a></span> -<span id="cb76-8"><a href="#cb76-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionBlankBeforeBlockquote</span>{true}</span> -<span id="cb76-9"><a href="#cb76-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb76-10"><a href="#cb76-10" aria-hidden="true"></a>A paragraph.</span> -<span id="cb76-11"><a href="#cb76-11" aria-hidden="true"></a>> Not a quote.</span> -<span id="cb76-12"><a href="#cb76-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb76-13"><a href="#cb76-13" aria-hidden="true"></a></span> -<span id="cb76-14"><a href="#cb76-14" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb77"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb77-1"><a href="#cb77-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="plain-tex-example-2">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb90"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb90-1"><a href="#cb90-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb90-2"><a href="#cb90-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb90-3"><a href="#cb90-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb90-4"><a href="#cb90-4" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb90-5"><a href="#cb90-5" aria-hidden="true" tabindex="-1"></a>> A quote.</span> +<span id="cb90-6"><a href="#cb90-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb90-7"><a href="#cb90-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb90-8"><a href="#cb90-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionBlankBeforeBlockquote</span>{true}</span> +<span id="cb90-9"><a href="#cb90-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb90-10"><a href="#cb90-10" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb90-11"><a href="#cb90-11" aria-hidden="true" tabindex="-1"></a>> Not a quote.</span> +<span id="cb90-12"><a href="#cb90-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb90-13"><a href="#cb90-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb90-14"><a href="#cb90-14" 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="cb91"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb91-1"><a href="#cb91-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:</p> <blockquote> <p>A paragraph.</p> <blockquote> @@ -697,26 +1352,31 @@ </blockquote> <p>A paragraph > Not a quote.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-2"><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="cb78"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb78-1"><a href="#cb78-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb78-2"><a href="#cb78-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb78-3"><a href="#cb78-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb78-4"><a href="#cb78-4" aria-hidden="true"></a></span> -<span id="cb78-5"><a href="#cb78-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb78-6"><a href="#cb78-6" aria-hidden="true"></a>A paragraph.</span> -<span id="cb78-7"><a href="#cb78-7" aria-hidden="true"></a>> A quote.</span> -<span id="cb78-8"><a href="#cb78-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb78-9"><a href="#cb78-9" aria-hidden="true"></a></span> -<span id="cb78-10"><a href="#cb78-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeBlockquote}</span> -<span id="cb78-11"><a href="#cb78-11" aria-hidden="true"></a>A paragraph.</span> -<span id="cb78-12"><a href="#cb78-12" aria-hidden="true"></a>> Not a quote.</span> -<span id="cb78-13"><a href="#cb78-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb78-14"><a href="#cb78-14" aria-hidden="true"></a></span> -<span id="cb78-15"><a href="#cb78-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb79"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb79-1"><a href="#cb79-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-3"><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="cb92"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb92-1"><a href="#cb92-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb92-2"><a href="#cb92-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb92-3"><a href="#cb92-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb92-4"><a href="#cb92-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb92-5"><a href="#cb92-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb92-6"><a href="#cb92-6" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb92-7"><a href="#cb92-7" aria-hidden="true" tabindex="-1"></a>> A quote.</span> +<span id="cb92-8"><a href="#cb92-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb92-9"><a href="#cb92-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb92-10"><a href="#cb92-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeBlockquote}</span> +<span id="cb92-11"><a href="#cb92-11" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb92-12"><a href="#cb92-12" aria-hidden="true" tabindex="-1"></a>> Not a quote.</span> +<span id="cb92-13"><a href="#cb92-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb92-14"><a href="#cb92-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb92-15"><a href="#cb92-15" 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="cb93"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb93-1"><a href="#cb93-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 text:</p> <blockquote> <p>A paragraph.</p> <blockquote> @@ -724,26 +1384,31 @@ </blockquote> <p>A paragraph > Not a quote.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-2">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb80"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb80-1"><a href="#cb80-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb80-2"><a href="#cb80-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb80-3"><a href="#cb80-3" aria-hidden="true"></a></span> -<span id="cb80-4"><a href="#cb80-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb80-5"><a href="#cb80-5" aria-hidden="true"></a>A paragraph.</span> -<span id="cb80-6"><a href="#cb80-6" aria-hidden="true"></a>> A quote.</span> -<span id="cb80-7"><a href="#cb80-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb80-8"><a href="#cb80-8" aria-hidden="true"></a></span> -<span id="cb80-9"><a href="#cb80-9" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[blankBeforeBlockquote = yes]</span> -<span id="cb80-10"><a href="#cb80-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb80-11"><a href="#cb80-11" aria-hidden="true"></a>A paragraph.</span> -<span id="cb80-12"><a href="#cb80-12" aria-hidden="true"></a>> Not a quote.</span> -<span id="cb80-13"><a href="#cb80-13" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb80-14"><a href="#cb80-14" aria-hidden="true"></a></span> -<span id="cb80-15"><a href="#cb80-15" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb81"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb81-1"><a href="#cb81-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-3">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb94"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb94-1"><a href="#cb94-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb94-2"><a href="#cb94-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb94-3"><a href="#cb94-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb94-4"><a href="#cb94-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb94-5"><a href="#cb94-5" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb94-6"><a href="#cb94-6" aria-hidden="true" tabindex="-1"></a>> A quote.</span> +<span id="cb94-7"><a href="#cb94-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb94-8"><a href="#cb94-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb94-9"><a href="#cb94-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[blankBeforeBlockquote = yes]</span> +<span id="cb94-10"><a href="#cb94-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb94-11"><a href="#cb94-11" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb94-12"><a href="#cb94-12" aria-hidden="true" tabindex="-1"></a>> Not a quote.</span> +<span id="cb94-13"><a href="#cb94-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb94-14"><a href="#cb94-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb94-15"><a href="#cb94-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb95"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb95-1"><a href="#cb95-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>A paragraph.</p> <blockquote> @@ -751,343 +1416,435 @@ </blockquote> <p>A paragraph > Not a quote.</p> </blockquote> -<h4 data-number="2.2.1.4" id="option-blankbeforecodefence"><span class="header-section-number">2.2.1.4</span> Option <code>blankBeforeCodeFence</code></h4> +<h4 data-number="2.2.1.6" id="option-blankbeforecodefence"><span +class="header-section-number">2.2.1.6</span> Option +<code>blankBeforeCodeFence</code></h4> +<dl> +<dt><code>blankBeforeCodeFence</code> (default value: +<code>false</code>)</dt> +<dd> <dl> -<dt><code>blankBeforeCodeFence</code> (default value: <code>false</code>)</dt> -<dd><dl> <dt>true</dt> -<dd><p>Require a blank line between a paragraph and the following fenced code block.</p> +<dd> +<p>Require a blank line between a paragraph and the following fenced +code block.</p> </dd> <dt>false</dt> -<dd><p>Do not require a blank line between a paragraph and the following fenced code block.</p> +<dd> +<p>Do not require a blank line between a paragraph and the following +fenced code block.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-3">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb82"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb82-1"><a href="#cb82-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb82-2"><a href="#cb82-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb82-3"><a href="#cb82-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb82-4"><a href="#cb82-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb82-5"><a href="#cb82-5" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb82-6"><a href="#cb82-6" aria-hidden="true"></a> local convert, input</span> -<span id="cb82-7"><a href="#cb82-7" aria-hidden="true"></a></span> -<span id="cb82-8"><a href="#cb82-8" aria-hidden="true"></a> convert = markdown.new({fencedCode = true})</span> -<span id="cb82-9"><a href="#cb82-9" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb82-10"><a href="#cb82-10" aria-hidden="true"></a> "```" .. newline ..</span> -<span id="cb82-11"><a href="#cb82-11" aria-hidden="true"></a> "A code fence." .. newline ..</span> -<span id="cb82-12"><a href="#cb82-12" aria-hidden="true"></a> "```" .. newline</span> -<span id="cb82-13"><a href="#cb82-13" aria-hidden="true"></a> tex.sprint(convert(input))</span> -<span id="cb82-14"><a href="#cb82-14" aria-hidden="true"></a></span> -<span id="cb82-15"><a href="#cb82-15" aria-hidden="true"></a> convert = markdown.new({</span> -<span id="cb82-16"><a href="#cb82-16" aria-hidden="true"></a> fencedCode = true, blankBeforeCodeFence = true})</span> -<span id="cb82-17"><a href="#cb82-17" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb82-18"><a href="#cb82-18" aria-hidden="true"></a> "```" .. newline ..</span> -<span id="cb82-19"><a href="#cb82-19" aria-hidden="true"></a> "Not a code fence." .. newline ..</span> -<span id="cb82-20"><a href="#cb82-20" aria-hidden="true"></a> "```" .. newline</span> -<span id="cb82-21"><a href="#cb82-21" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb82-22"><a href="#cb82-22" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 class="unnumbered" id="lua-module-example-3">Lua Module Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb96"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb96-1"><a href="#cb96-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb96-2"><a href="#cb96-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb96-3"><a href="#cb96-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb96-4"><a href="#cb96-4" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb96-5"><a href="#cb96-5" aria-hidden="true" tabindex="-1"></a> local newline = [[^^J^^J]]</span> +<span id="cb96-6"><a href="#cb96-6" aria-hidden="true" tabindex="-1"></a> local convert, input</span> +<span id="cb96-7"><a href="#cb96-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb96-8"><a href="#cb96-8" aria-hidden="true" tabindex="-1"></a> convert = markdown.new({fencedCode = true})</span> +<span id="cb96-9"><a href="#cb96-9" aria-hidden="true" tabindex="-1"></a> input = "A paragraph." .. newline ..</span> +<span id="cb96-10"><a href="#cb96-10" aria-hidden="true" tabindex="-1"></a> "```" .. newline ..</span> +<span id="cb96-11"><a href="#cb96-11" aria-hidden="true" tabindex="-1"></a> "A code fence." .. newline ..</span> +<span id="cb96-12"><a href="#cb96-12" aria-hidden="true" tabindex="-1"></a> "```" .. newline</span> +<span id="cb96-13"><a href="#cb96-13" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input))</span> +<span id="cb96-14"><a href="#cb96-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb96-15"><a href="#cb96-15" aria-hidden="true" tabindex="-1"></a> convert = markdown.new({</span> +<span id="cb96-16"><a href="#cb96-16" aria-hidden="true" tabindex="-1"></a> fencedCode = true, blankBeforeCodeFence = true})</span> +<span id="cb96-17"><a href="#cb96-17" aria-hidden="true" tabindex="-1"></a> input = "A paragraph." .. newline ..</span> +<span id="cb96-18"><a href="#cb96-18" aria-hidden="true" tabindex="-1"></a> "```" .. newline ..</span> +<span id="cb96-19"><a href="#cb96-19" aria-hidden="true" tabindex="-1"></a> "Not a code fence." .. newline ..</span> +<span id="cb96-20"><a href="#cb96-20" aria-hidden="true" tabindex="-1"></a> "```" .. newline</span> +<span id="cb96-21"><a href="#cb96-21" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb96-22"><a href="#cb96-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb83"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb83-1"><a href="#cb83-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb97"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb97-1"><a href="#cb97-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:</p> <blockquote> <p>A paragraph.</p> <pre><code>A code fence.</code></pre> <p>A paragraph. <code>Not a code fence.</code></p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-3">Lua CLI Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb85"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb85-1"><a href="#cb85-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb85-2"><a href="#cb85-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb85-3"><a href="#cb85-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb85-4"><a href="#cb85-4" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb85-5"><a href="#cb85-5" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb86"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb86-1"><a href="#cb86-1" aria-hidden="true"></a>A paragraph.</span> -<span id="cb86-2"><a href="#cb86-2" aria-hidden="true"></a><span class="in">```</span></span> -<span id="cb86-3"><a href="#cb86-3" aria-hidden="true"></a><span class="in">A code fence?</span></span> -<span id="cb86-4"><a href="#cb86-4" aria-hidden="true"></a><span class="in">```</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb87"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb87-1"><a href="#cb87-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ fencedCode=true -- content.md optionfalse.tex</span> -<span id="cb87-2"><a href="#cb87-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ fencedCode=true blankBeforeCodeFence=true -- content.md optiontrue.tex</span> -<span id="cb87-3"><a href="#cb87-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="lua-cli-example-3">Lua CLI Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb99"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb99-1"><a href="#cb99-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb99-2"><a href="#cb99-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb99-3"><a href="#cb99-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb99-4"><a href="#cb99-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb99-5"><a href="#cb99-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>content.md</code> with the following content:</p> +<div class="sourceCode" id="cb100"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb100-1"><a href="#cb100-1" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb100-2"><a href="#cb100-2" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span> +<span id="cb100-3"><a href="#cb100-3" aria-hidden="true" tabindex="-1"></a><span class="in">A code fence?</span></span> +<span id="cb100-4"><a href="#cb100-4" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb101"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb101-1"><a href="#cb101-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ fencedCode=true <span class="at">--</span> content.md optionfalse.tex</span> +<span id="cb101-2"><a href="#cb101-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ fencedCode=true blankBeforeCodeFence=true <span class="at">--</span> content.md optiontrue.tex</span> +<span id="cb101-3"><a href="#cb101-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>A paragraph.</p> <pre><code>A code fence?</code></pre> <p>A paragraph. <code>A code fence?</code></p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-3">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb89"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb89-1"><a href="#cb89-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb89-2"><a href="#cb89-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFencedCode</span>{true}</span> -<span id="cb89-3"><a href="#cb89-3" aria-hidden="true"></a></span> -<span id="cb89-4"><a href="#cb89-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb89-5"><a href="#cb89-5" aria-hidden="true"></a>A paragraph.</span> -<span id="cb89-6"><a href="#cb89-6" aria-hidden="true"></a>```</span> -<span id="cb89-7"><a href="#cb89-7" aria-hidden="true"></a>A code fence.</span> -<span id="cb89-8"><a href="#cb89-8" aria-hidden="true"></a>```</span> -<span id="cb89-9"><a href="#cb89-9" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb89-10"><a href="#cb89-10" aria-hidden="true"></a></span> -<span id="cb89-11"><a href="#cb89-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionBlankBeforeCodeFence</span>{true}</span> -<span id="cb89-12"><a href="#cb89-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb89-13"><a href="#cb89-13" aria-hidden="true"></a>A paragraph.</span> -<span id="cb89-14"><a href="#cb89-14" aria-hidden="true"></a>```</span> -<span id="cb89-15"><a href="#cb89-15" aria-hidden="true"></a>Not a code fence.</span> -<span id="cb89-16"><a href="#cb89-16" aria-hidden="true"></a>```</span> -<span id="cb89-17"><a href="#cb89-17" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb89-18"><a href="#cb89-18" aria-hidden="true"></a></span> -<span id="cb89-19"><a href="#cb89-19" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb90"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb90-1"><a href="#cb90-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="plain-tex-example-3">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb103"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb103-1"><a href="#cb103-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb103-2"><a href="#cb103-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFencedCode</span>{true}</span> +<span id="cb103-3"><a href="#cb103-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb103-4"><a href="#cb103-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb103-5"><a href="#cb103-5" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb103-6"><a href="#cb103-6" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb103-7"><a href="#cb103-7" aria-hidden="true" tabindex="-1"></a>A code fence.</span> +<span id="cb103-8"><a href="#cb103-8" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb103-9"><a href="#cb103-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb103-10"><a href="#cb103-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb103-11"><a href="#cb103-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionBlankBeforeCodeFence</span>{true}</span> +<span id="cb103-12"><a href="#cb103-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb103-13"><a href="#cb103-13" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb103-14"><a href="#cb103-14" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb103-15"><a href="#cb103-15" aria-hidden="true" tabindex="-1"></a>Not a code fence.</span> +<span id="cb103-16"><a href="#cb103-16" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb103-17"><a href="#cb103-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb103-18"><a href="#cb103-18" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb103-19"><a href="#cb103-19" 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="cb104"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb104-1"><a href="#cb104-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:</p> <blockquote> <p>A paragraph.</p> <pre><code>A code fence.</code></pre> <p>A paragraph. <code>Not a code fence.</code></p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-3"><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="cb92"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb92-1"><a href="#cb92-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb92-2"><a href="#cb92-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> -<span id="cb92-3"><a href="#cb92-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb92-4"><a href="#cb92-4" aria-hidden="true"></a></span> -<span id="cb92-5"><a href="#cb92-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb92-6"><a href="#cb92-6" aria-hidden="true"></a>A paragraph.</span> -<span id="cb92-7"><a href="#cb92-7" aria-hidden="true"></a>```</span> -<span id="cb92-8"><a href="#cb92-8" aria-hidden="true"></a>A code fence.</span> -<span id="cb92-9"><a href="#cb92-9" aria-hidden="true"></a>```</span> -<span id="cb92-10"><a href="#cb92-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb92-11"><a href="#cb92-11" aria-hidden="true"></a></span> -<span id="cb92-12"><a href="#cb92-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeCodeFence}</span> -<span id="cb92-13"><a href="#cb92-13" aria-hidden="true"></a>A paragraph.</span> -<span id="cb92-14"><a href="#cb92-14" aria-hidden="true"></a>```</span> -<span id="cb92-15"><a href="#cb92-15" aria-hidden="true"></a>Not a code fence.</span> -<span id="cb92-16"><a href="#cb92-16" aria-hidden="true"></a>```</span> -<span id="cb92-17"><a href="#cb92-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb92-18"><a href="#cb92-18" aria-hidden="true"></a></span> -<span id="cb92-19"><a href="#cb92-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb93"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb93-1"><a href="#cb93-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-4"><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="cb106"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb106-1"><a href="#cb106-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb106-2"><a href="#cb106-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> +<span id="cb106-3"><a href="#cb106-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb106-4"><a href="#cb106-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb106-5"><a href="#cb106-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb106-6"><a href="#cb106-6" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb106-7"><a href="#cb106-7" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb106-8"><a href="#cb106-8" aria-hidden="true" tabindex="-1"></a>A code fence.</span> +<span id="cb106-9"><a href="#cb106-9" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb106-10"><a href="#cb106-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb106-11"><a href="#cb106-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb106-12"><a href="#cb106-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeCodeFence}</span> +<span id="cb106-13"><a href="#cb106-13" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb106-14"><a href="#cb106-14" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb106-15"><a href="#cb106-15" aria-hidden="true" tabindex="-1"></a>Not a code fence.</span> +<span id="cb106-16"><a href="#cb106-16" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb106-17"><a href="#cb106-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb106-18"><a href="#cb106-18" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb106-19"><a href="#cb106-19" 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="cb107"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb107-1"><a href="#cb107-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 text:</p> <blockquote> <p>A paragraph.</p> <pre><code>A code fence.</code></pre> <p>A paragraph. <code>Not a code fence.</code></p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-3">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb95"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb95-1"><a href="#cb95-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb95-2"><a href="#cb95-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[fencedCode = yes]</span> -<span id="cb95-3"><a href="#cb95-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb95-4"><a href="#cb95-4" aria-hidden="true"></a></span> -<span id="cb95-5"><a href="#cb95-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb95-6"><a href="#cb95-6" aria-hidden="true"></a>A paragraph.</span> -<span id="cb95-7"><a href="#cb95-7" aria-hidden="true"></a>```</span> -<span id="cb95-8"><a href="#cb95-8" aria-hidden="true"></a>A code fence.</span> -<span id="cb95-9"><a href="#cb95-9" aria-hidden="true"></a>```</span> -<span id="cb95-10"><a href="#cb95-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb95-11"><a href="#cb95-11" aria-hidden="true"></a></span> -<span id="cb95-12"><a href="#cb95-12" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[blankBeforeCodeFence = yes]</span> -<span id="cb95-13"><a href="#cb95-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb95-14"><a href="#cb95-14" aria-hidden="true"></a>A paragraph.</span> -<span id="cb95-15"><a href="#cb95-15" aria-hidden="true"></a>```</span> -<span id="cb95-16"><a href="#cb95-16" aria-hidden="true"></a>Not a code fence.</span> -<span id="cb95-17"><a href="#cb95-17" aria-hidden="true"></a>```</span> -<span id="cb95-18"><a href="#cb95-18" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb95-19"><a href="#cb95-19" aria-hidden="true"></a></span> -<span id="cb95-20"><a href="#cb95-20" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb96"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb96-1"><a href="#cb96-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-4">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb109"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb109-1"><a href="#cb109-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb109-2"><a href="#cb109-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[fencedCode = yes]</span> +<span id="cb109-3"><a href="#cb109-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb109-4"><a href="#cb109-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb109-5"><a href="#cb109-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb109-6"><a href="#cb109-6" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb109-7"><a href="#cb109-7" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb109-8"><a href="#cb109-8" aria-hidden="true" tabindex="-1"></a>A code fence.</span> +<span id="cb109-9"><a href="#cb109-9" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb109-10"><a href="#cb109-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb109-11"><a href="#cb109-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb109-12"><a href="#cb109-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[blankBeforeCodeFence = yes]</span> +<span id="cb109-13"><a href="#cb109-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb109-14"><a href="#cb109-14" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb109-15"><a href="#cb109-15" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb109-16"><a href="#cb109-16" aria-hidden="true" tabindex="-1"></a>Not a code fence.</span> +<span id="cb109-17"><a href="#cb109-17" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb109-18"><a href="#cb109-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb109-19"><a href="#cb109-19" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb109-20"><a href="#cb109-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb110"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb110-1"><a href="#cb110-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>A paragraph.</p> <pre><code>A code fence.</code></pre> <p>A paragraph. <code>Not a code fence.</code></p> </blockquote> -<h4 data-number="2.2.1.5" id="option-blankbeforeheading"><span class="header-section-number">2.2.1.5</span> Option <code>blankBeforeHeading</code></h4> +<h4 data-number="2.2.1.7" id="option-blankbeforeheading"><span +class="header-section-number">2.2.1.7</span> Option +<code>blankBeforeHeading</code></h4> +<dl> +<dt><code>blankBeforeHeading</code> (default value: +<code>false</code>)</dt> +<dd> <dl> -<dt><code>blankBeforeHeading</code> (default value: <code>false</code>)</dt> -<dd><dl> <dt>true</dt> -<dd><p>Require a blank line between a paragraph and the following header.</p> +<dd> +<p>Require a blank line between a paragraph and the following +header.</p> </dd> <dt>false</dt> -<dd><p>Do not require a blank line between a paragraph and the following header.</p> +<dd> +<p>Do not require a blank line between a paragraph and the following +header.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-4">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb98"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb98-1"><a href="#cb98-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb98-2"><a href="#cb98-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb98-3"><a href="#cb98-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bf</span> #1}<span class="fu">\par</span>}</span> -<span id="cb98-4"><a href="#cb98-4" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb98-5"><a href="#cb98-5" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb98-6"><a href="#cb98-6" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb98-7"><a href="#cb98-7" aria-hidden="true"></a> local convert, input</span> -<span id="cb98-8"><a href="#cb98-8" aria-hidden="true"></a></span> -<span id="cb98-9"><a href="#cb98-9" aria-hidden="true"></a> convert = markdown.new()</span> -<span id="cb98-10"><a href="#cb98-10" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb98-11"><a href="#cb98-11" aria-hidden="true"></a> "A heading." .. newline ..</span> -<span id="cb98-12"><a href="#cb98-12" aria-hidden="true"></a> "==========" .. newline</span> -<span id="cb98-13"><a href="#cb98-13" aria-hidden="true"></a> tex.sprint(convert(input))</span> -<span id="cb98-14"><a href="#cb98-14" aria-hidden="true"></a></span> -<span id="cb98-15"><a href="#cb98-15" aria-hidden="true"></a> convert = markdown.new({blankBeforeHeading = true})</span> -<span id="cb98-16"><a href="#cb98-16" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb98-17"><a href="#cb98-17" aria-hidden="true"></a> "Not a heading." .. newline ..</span> -<span id="cb98-18"><a href="#cb98-18" aria-hidden="true"></a> "==============" .. newline</span> -<span id="cb98-19"><a href="#cb98-19" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb98-20"><a href="#cb98-20" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 class="unnumbered" id="lua-module-example-4">Lua Module Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb112"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb112-1"><a href="#cb112-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb112-2"><a href="#cb112-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb112-3"><a href="#cb112-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bf</span> #1}<span class="fu">\par</span>}</span> +<span id="cb112-4"><a href="#cb112-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb112-5"><a href="#cb112-5" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb112-6"><a href="#cb112-6" aria-hidden="true" tabindex="-1"></a> local newline = [[^^J^^J]]</span> +<span id="cb112-7"><a href="#cb112-7" aria-hidden="true" tabindex="-1"></a> local convert, input</span> +<span id="cb112-8"><a href="#cb112-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb112-9"><a href="#cb112-9" aria-hidden="true" tabindex="-1"></a> convert = markdown.new()</span> +<span id="cb112-10"><a href="#cb112-10" aria-hidden="true" tabindex="-1"></a> input = "A paragraph." .. newline ..</span> +<span id="cb112-11"><a href="#cb112-11" aria-hidden="true" tabindex="-1"></a> "A heading." .. newline ..</span> +<span id="cb112-12"><a href="#cb112-12" aria-hidden="true" tabindex="-1"></a> "==========" .. newline</span> +<span id="cb112-13"><a href="#cb112-13" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input))</span> +<span id="cb112-14"><a href="#cb112-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb112-15"><a href="#cb112-15" aria-hidden="true" tabindex="-1"></a> convert = markdown.new({blankBeforeHeading = true})</span> +<span id="cb112-16"><a href="#cb112-16" aria-hidden="true" tabindex="-1"></a> input = "A paragraph." .. newline ..</span> +<span id="cb112-17"><a href="#cb112-17" aria-hidden="true" tabindex="-1"></a> "Not a heading." .. newline ..</span> +<span id="cb112-18"><a href="#cb112-18" aria-hidden="true" tabindex="-1"></a> "==============" .. newline</span> +<span id="cb112-19"><a href="#cb112-19" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb112-20"><a href="#cb112-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb99"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb99-1"><a href="#cb99-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb113"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb113-1"><a href="#cb113-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:</p> <blockquote> <p>A paragraph.</p> <h1 id="a-heading.">A heading.</h1> <p>A paragraph. Not a heading. ==============</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-4">Lua CLI Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb100"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb100-1"><a href="#cb100-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb100-2"><a href="#cb100-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb100-3"><a href="#cb100-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb100-4"><a href="#cb100-4" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb100-5"><a href="#cb100-5" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb101"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb101-1"><a href="#cb101-1" aria-hidden="true"></a>A paragraph.</span> -<span id="cb101-2"><a href="#cb101-2" aria-hidden="true"></a>A heading?</span> -<span id="cb101-3"><a href="#cb101-3" aria-hidden="true"></a><span class="fu">==========</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb102"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb102-1"><a href="#cb102-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb102-2"><a href="#cb102-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ blankBeforeHeading=true -- content.md optiontrue.tex</span> -<span id="cb102-3"><a href="#cb102-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="lua-cli-example-4">Lua CLI Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb114"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb114-1"><a href="#cb114-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb114-2"><a href="#cb114-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb114-3"><a href="#cb114-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb114-4"><a href="#cb114-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb114-5"><a href="#cb114-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>content.md</code> with the following content:</p> +<div class="sourceCode" id="cb115"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb115-1"><a href="#cb115-1" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb115-2"><a href="#cb115-2" aria-hidden="true" tabindex="-1"></a>A heading?</span> +<span id="cb115-3"><a href="#cb115-3" aria-hidden="true" tabindex="-1"></a><span class="fu">==========</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb116"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb116-1"><a href="#cb116-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span> +<span id="cb116-2"><a href="#cb116-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ blankBeforeHeading=true <span class="at">--</span> content.md optiontrue.tex</span> +<span id="cb116-3"><a href="#cb116-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>A paragraph.</p> <h1 id="a-heading">A heading?</h1> <p>A paragraph. A heading? ==========</p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-4">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb103"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb103-1"><a href="#cb103-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb103-2"><a href="#cb103-2" aria-hidden="true"></a></span> -<span id="cb103-3"><a href="#cb103-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb103-4"><a href="#cb103-4" aria-hidden="true"></a>A paragraph.</span> -<span id="cb103-5"><a href="#cb103-5" aria-hidden="true"></a>A heading.</span> -<span id="cb103-6"><a href="#cb103-6" aria-hidden="true"></a>==========</span> -<span id="cb103-7"><a href="#cb103-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb103-8"><a href="#cb103-8" aria-hidden="true"></a></span> -<span id="cb103-9"><a href="#cb103-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionBlankBeforeHeading</span>{true}</span> -<span id="cb103-10"><a href="#cb103-10" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb103-11"><a href="#cb103-11" aria-hidden="true"></a>A paragraph.</span> -<span id="cb103-12"><a href="#cb103-12" aria-hidden="true"></a>Not a heading.</span> -<span id="cb103-13"><a href="#cb103-13" aria-hidden="true"></a>==============</span> -<span id="cb103-14"><a href="#cb103-14" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb103-15"><a href="#cb103-15" aria-hidden="true"></a></span> -<span id="cb103-16"><a href="#cb103-16" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb104"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb104-1"><a href="#cb104-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="plain-tex-example-4">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb117"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb117-1"><a href="#cb117-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb117-2"><a href="#cb117-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb117-3"><a href="#cb117-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb117-4"><a href="#cb117-4" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb117-5"><a href="#cb117-5" aria-hidden="true" tabindex="-1"></a>A heading.</span> +<span id="cb117-6"><a href="#cb117-6" aria-hidden="true" tabindex="-1"></a>==========</span> +<span id="cb117-7"><a href="#cb117-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb117-8"><a href="#cb117-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb117-9"><a href="#cb117-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionBlankBeforeHeading</span>{true}</span> +<span id="cb117-10"><a href="#cb117-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb117-11"><a href="#cb117-11" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb117-12"><a href="#cb117-12" aria-hidden="true" tabindex="-1"></a>Not a heading.</span> +<span id="cb117-13"><a href="#cb117-13" aria-hidden="true" tabindex="-1"></a>==============</span> +<span id="cb117-14"><a href="#cb117-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb117-15"><a href="#cb117-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb117-16"><a href="#cb117-16" 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="cb118"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb118-1"><a href="#cb118-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:</p> <blockquote> <p>A paragraph.</p> <h1 id="a-heading.-1">A heading.</h1> <p>A paragraph. Not a heading. ==============</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-4"><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="cb105"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb105-1"><a href="#cb105-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb105-2"><a href="#cb105-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb105-3"><a href="#cb105-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb105-4"><a href="#cb105-4" aria-hidden="true"></a></span> -<span id="cb105-5"><a href="#cb105-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb105-6"><a href="#cb105-6" aria-hidden="true"></a>A paragraph.</span> -<span id="cb105-7"><a href="#cb105-7" aria-hidden="true"></a>A heading.</span> -<span id="cb105-8"><a href="#cb105-8" aria-hidden="true"></a>==========</span> -<span id="cb105-9"><a href="#cb105-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb105-10"><a href="#cb105-10" aria-hidden="true"></a></span> -<span id="cb105-11"><a href="#cb105-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeHeading}</span> -<span id="cb105-12"><a href="#cb105-12" aria-hidden="true"></a>A paragraph.</span> -<span id="cb105-13"><a href="#cb105-13" aria-hidden="true"></a>Not a heading.</span> -<span id="cb105-14"><a href="#cb105-14" aria-hidden="true"></a>==============</span> -<span id="cb105-15"><a href="#cb105-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb105-16"><a href="#cb105-16" aria-hidden="true"></a></span> -<span id="cb105-17"><a href="#cb105-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb106"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb106-1"><a href="#cb106-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-5"><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="cb119"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb119-1"><a href="#cb119-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb119-2"><a href="#cb119-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb119-3"><a href="#cb119-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb119-4"><a href="#cb119-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb119-5"><a href="#cb119-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb119-6"><a href="#cb119-6" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb119-7"><a href="#cb119-7" aria-hidden="true" tabindex="-1"></a>A heading.</span> +<span id="cb119-8"><a href="#cb119-8" aria-hidden="true" tabindex="-1"></a>==========</span> +<span id="cb119-9"><a href="#cb119-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb119-10"><a href="#cb119-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb119-11"><a href="#cb119-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeHeading}</span> +<span id="cb119-12"><a href="#cb119-12" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb119-13"><a href="#cb119-13" aria-hidden="true" tabindex="-1"></a>Not a heading.</span> +<span id="cb119-14"><a href="#cb119-14" aria-hidden="true" tabindex="-1"></a>==============</span> +<span id="cb119-15"><a href="#cb119-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb119-16"><a href="#cb119-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb119-17"><a href="#cb119-17" 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="cb120"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb120-1"><a href="#cb120-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 text:</p> <blockquote> <p>A paragraph.</p> <h1 id="a-heading.-2">A heading.</h1> <p>A paragraph. Not a heading. ==============</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-4">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb107"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb107-1"><a href="#cb107-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb107-2"><a href="#cb107-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb107-3"><a href="#cb107-3" aria-hidden="true"></a></span> -<span id="cb107-4"><a href="#cb107-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb107-5"><a href="#cb107-5" aria-hidden="true"></a>A paragraph.</span> -<span id="cb107-6"><a href="#cb107-6" aria-hidden="true"></a>A heading.</span> -<span id="cb107-7"><a href="#cb107-7" aria-hidden="true"></a>==========</span> -<span id="cb107-8"><a href="#cb107-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb107-9"><a href="#cb107-9" aria-hidden="true"></a></span> -<span id="cb107-10"><a href="#cb107-10" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[blankBeforeHeading = yes]</span> -<span id="cb107-11"><a href="#cb107-11" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb107-12"><a href="#cb107-12" aria-hidden="true"></a>A paragraph.</span> -<span id="cb107-13"><a href="#cb107-13" aria-hidden="true"></a>Not a heading.</span> -<span id="cb107-14"><a href="#cb107-14" aria-hidden="true"></a>==============</span> -<span id="cb107-15"><a href="#cb107-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb107-16"><a href="#cb107-16" aria-hidden="true"></a></span> -<span id="cb107-17"><a href="#cb107-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb108"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb108-1"><a href="#cb108-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-5">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb121"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb121-1"><a href="#cb121-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb121-2"><a href="#cb121-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb121-3"><a href="#cb121-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb121-4"><a href="#cb121-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb121-5"><a href="#cb121-5" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb121-6"><a href="#cb121-6" aria-hidden="true" tabindex="-1"></a>A heading.</span> +<span id="cb121-7"><a href="#cb121-7" aria-hidden="true" tabindex="-1"></a>==========</span> +<span id="cb121-8"><a href="#cb121-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb121-9"><a href="#cb121-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb121-10"><a href="#cb121-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[blankBeforeHeading = yes]</span> +<span id="cb121-11"><a href="#cb121-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb121-12"><a href="#cb121-12" aria-hidden="true" tabindex="-1"></a>A paragraph.</span> +<span id="cb121-13"><a href="#cb121-13" aria-hidden="true" tabindex="-1"></a>Not a heading.</span> +<span id="cb121-14"><a href="#cb121-14" aria-hidden="true" tabindex="-1"></a>==============</span> +<span id="cb121-15"><a href="#cb121-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb121-16"><a href="#cb121-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb121-17"><a href="#cb121-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb122"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb122-1"><a href="#cb122-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>A paragraph.</p> <h1 id="a-heading.-3">A heading.</h1> <p>A paragraph. Not a heading. ==============</p> </blockquote> -<h4 data-number="2.2.1.6" id="option-breakableblockquotes"><span class="header-section-number">2.2.1.6</span> Option <code>breakableBlockquotes</code></h4> +<h4 data-number="2.2.1.8" id="option-breakableblockquotes"><span +class="header-section-number">2.2.1.8</span> Option +<code>breakableBlockquotes</code></h4> +<dl> +<dt><code>breakableBlockquotes</code> (default value: +<code>false</code>)</dt> +<dd> <dl> -<dt><code>breakableBlockquotes</code> (default value: <code>false</code>)</dt> -<dd><dl> <dt>true</dt> -<dd><p>A blank line separates block quotes.</p> +<dd> +<p>A blank line separates block quotes.</p> </dd> <dt>false</dt> -<dd><p>Blank lines in the middle of a block quote are ignored.</p> +<dd> +<p>Blank lines in the middle of a block quote are ignored.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-5">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb109"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb109-1"><a href="#cb109-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb109-2"><a href="#cb109-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb109-3"><a href="#cb109-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bf</span> #1}<span class="fu">\par</span>}</span> -<span id="cb109-4"><a href="#cb109-4" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb109-5"><a href="#cb109-5" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb109-6"><a href="#cb109-6" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb109-7"><a href="#cb109-7" aria-hidden="true"></a> local convert, input</span> -<span id="cb109-8"><a href="#cb109-8" aria-hidden="true"></a></span> -<span id="cb109-9"><a href="#cb109-9" aria-hidden="true"></a> convert = markdown.new()</span> -<span id="cb109-10"><a href="#cb109-10" aria-hidden="true"></a> input = "> A single" .. newline .. newline ..</span> -<span id="cb109-11"><a href="#cb109-11" aria-hidden="true"></a> "> block quote." .. newline</span> -<span id="cb109-12"><a href="#cb109-12" aria-hidden="true"></a> tex.sprint(convert(input))</span> -<span id="cb109-13"><a href="#cb109-13" aria-hidden="true"></a></span> -<span id="cb109-14"><a href="#cb109-14" aria-hidden="true"></a> convert = markdown.new({breakableBlockquotes = true})</span> -<span id="cb109-15"><a href="#cb109-15" aria-hidden="true"></a> input = "> A block quote." .. newline .. newline ..</span> -<span id="cb109-16"><a href="#cb109-16" aria-hidden="true"></a> "> Another block quote." .. newline</span> -<span id="cb109-17"><a href="#cb109-17" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb109-18"><a href="#cb109-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 class="unnumbered" id="lua-module-example-5">Lua Module Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb123"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb123-1"><a href="#cb123-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb123-2"><a href="#cb123-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb123-3"><a href="#cb123-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bf</span> #1}<span class="fu">\par</span>}</span> +<span id="cb123-4"><a href="#cb123-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb123-5"><a href="#cb123-5" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb123-6"><a href="#cb123-6" aria-hidden="true" tabindex="-1"></a> local newline = [[^^J^^J]]</span> +<span id="cb123-7"><a href="#cb123-7" aria-hidden="true" tabindex="-1"></a> local convert, input</span> +<span id="cb123-8"><a href="#cb123-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb123-9"><a href="#cb123-9" aria-hidden="true" tabindex="-1"></a> convert = markdown.new()</span> +<span id="cb123-10"><a href="#cb123-10" aria-hidden="true" tabindex="-1"></a> input = "> A single" .. newline .. newline ..</span> +<span id="cb123-11"><a href="#cb123-11" aria-hidden="true" tabindex="-1"></a> "> block quote." .. newline</span> +<span id="cb123-12"><a href="#cb123-12" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input))</span> +<span id="cb123-13"><a href="#cb123-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb123-14"><a href="#cb123-14" aria-hidden="true" tabindex="-1"></a> convert = markdown.new({breakableBlockquotes = true})</span> +<span id="cb123-15"><a href="#cb123-15" aria-hidden="true" tabindex="-1"></a> input = "> A block quote." .. newline .. newline ..</span> +<span id="cb123-16"><a href="#cb123-16" aria-hidden="true" tabindex="-1"></a> "> Another block quote." .. newline</span> +<span id="cb123-17"><a href="#cb123-17" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb123-18"><a href="#cb123-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb110"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb110-1"><a href="#cb110-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb124"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb124-1"><a href="#cb124-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:</p> <blockquote> <blockquote> <p>A single block quote.</p> @@ -1099,23 +1856,37 @@ <p>Another block quote.</p> </blockquote> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-5">Lua CLI Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb111"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb111-1"><a href="#cb111-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb111-2"><a href="#cb111-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb111-3"><a href="#cb111-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb111-4"><a href="#cb111-4" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb111-5"><a href="#cb111-5" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb112"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb112-1"><a href="#cb112-1" aria-hidden="true"></a><span class="at">> A single block quote</span></span> -<span id="cb112-2"><a href="#cb112-2" aria-hidden="true"></a></span> -<span id="cb112-3"><a href="#cb112-3" aria-hidden="true"></a><span class="at">> or two block quotes?</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb113"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb113-1"><a href="#cb113-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb113-2"><a href="#cb113-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ breakableBlockquotes=true -- content.md optiontrue.tex</span> -<span id="cb113-3"><a href="#cb113-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="lua-cli-example-5">Lua CLI Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb125"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb125-1"><a href="#cb125-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb125-2"><a href="#cb125-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb125-3"><a href="#cb125-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb125-4"><a href="#cb125-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb125-5"><a href="#cb125-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>content.md</code> with the following content:</p> +<div class="sourceCode" id="cb126"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb126-1"><a href="#cb126-1" aria-hidden="true" tabindex="-1"></a><span class="at">> A single block quote</span></span> +<span id="cb126-2"><a href="#cb126-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb126-3"><a href="#cb126-3" aria-hidden="true" tabindex="-1"></a><span class="at">> or two block quotes?</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb127"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb127-1"><a href="#cb127-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span> +<span id="cb127-2"><a href="#cb127-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ breakableBlockquotes=true <span class="at">--</span> content.md optiontrue.tex</span> +<span id="cb127-3"><a href="#cb127-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <blockquote> <p>A single block quote or two block quotes?</p> @@ -1127,27 +1898,32 @@ <p>or two block quotes?</p> </blockquote> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-5">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb114"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb114-1"><a href="#cb114-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb114-2"><a href="#cb114-2" aria-hidden="true"></a></span> -<span id="cb114-3"><a href="#cb114-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb114-4"><a href="#cb114-4" aria-hidden="true"></a>> A single</span> -<span id="cb114-5"><a href="#cb114-5" aria-hidden="true"></a></span> -<span id="cb114-6"><a href="#cb114-6" aria-hidden="true"></a>> block quote.</span> -<span id="cb114-7"><a href="#cb114-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb114-8"><a href="#cb114-8" aria-hidden="true"></a></span> -<span id="cb114-9"><a href="#cb114-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionBreakableBlockquotes</span>{true}</span> -<span id="cb114-10"><a href="#cb114-10" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb114-11"><a href="#cb114-11" aria-hidden="true"></a>> A block quote.</span> -<span id="cb114-12"><a href="#cb114-12" aria-hidden="true"></a></span> -<span id="cb114-13"><a href="#cb114-13" aria-hidden="true"></a>> Another block quote.</span> -<span id="cb114-14"><a href="#cb114-14" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb114-15"><a href="#cb114-15" aria-hidden="true"></a></span> -<span id="cb114-16"><a href="#cb114-16" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb115"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb115-1"><a href="#cb115-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="plain-tex-example-5">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb128"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb128-1"><a href="#cb128-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb128-2"><a href="#cb128-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb128-3"><a href="#cb128-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb128-4"><a href="#cb128-4" aria-hidden="true" tabindex="-1"></a>> A single</span> +<span id="cb128-5"><a href="#cb128-5" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb128-6"><a href="#cb128-6" aria-hidden="true" tabindex="-1"></a>> block quote.</span> +<span id="cb128-7"><a href="#cb128-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb128-8"><a href="#cb128-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb128-9"><a href="#cb128-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionBreakableBlockquotes</span>{true}</span> +<span id="cb128-10"><a href="#cb128-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb128-11"><a href="#cb128-11" aria-hidden="true" tabindex="-1"></a>> A block quote.</span> +<span id="cb128-12"><a href="#cb128-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb128-13"><a href="#cb128-13" aria-hidden="true" tabindex="-1"></a>> Another block quote.</span> +<span id="cb128-14"><a href="#cb128-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb128-15"><a href="#cb128-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb128-16"><a href="#cb128-16" 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="cb129"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb129-1"><a href="#cb129-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:</p> <blockquote> <blockquote> <p>A single block quote.</p> @@ -1159,28 +1935,33 @@ <p>Another block quote.</p> </blockquote> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-5"><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="cb116"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb116-1"><a href="#cb116-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb116-2"><a href="#cb116-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb116-3"><a href="#cb116-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb116-4"><a href="#cb116-4" aria-hidden="true"></a></span> -<span id="cb116-5"><a href="#cb116-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb116-6"><a href="#cb116-6" aria-hidden="true"></a>> A single</span> -<span id="cb116-7"><a href="#cb116-7" aria-hidden="true"></a></span> -<span id="cb116-8"><a href="#cb116-8" aria-hidden="true"></a>> block quote.</span> -<span id="cb116-9"><a href="#cb116-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb116-10"><a href="#cb116-10" aria-hidden="true"></a></span> -<span id="cb116-11"><a href="#cb116-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{breakableBlockquotes}</span> -<span id="cb116-12"><a href="#cb116-12" aria-hidden="true"></a>> A block quote.</span> -<span id="cb116-13"><a href="#cb116-13" aria-hidden="true"></a></span> -<span id="cb116-14"><a href="#cb116-14" aria-hidden="true"></a>> Another block quote.</span> -<span id="cb116-15"><a href="#cb116-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb116-16"><a href="#cb116-16" aria-hidden="true"></a></span> -<span id="cb116-17"><a href="#cb116-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb117"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb117-1"><a href="#cb117-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-6"><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="cb130"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb130-1"><a href="#cb130-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb130-2"><a href="#cb130-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb130-3"><a href="#cb130-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb130-4"><a href="#cb130-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb130-5"><a href="#cb130-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb130-6"><a href="#cb130-6" aria-hidden="true" tabindex="-1"></a>> A single</span> +<span id="cb130-7"><a href="#cb130-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb130-8"><a href="#cb130-8" aria-hidden="true" tabindex="-1"></a>> block quote.</span> +<span id="cb130-9"><a href="#cb130-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb130-10"><a href="#cb130-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb130-11"><a href="#cb130-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{breakableBlockquotes}</span> +<span id="cb130-12"><a href="#cb130-12" aria-hidden="true" tabindex="-1"></a>> A block quote.</span> +<span id="cb130-13"><a href="#cb130-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb130-14"><a href="#cb130-14" aria-hidden="true" tabindex="-1"></a>> Another block quote.</span> +<span id="cb130-15"><a href="#cb130-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb130-16"><a href="#cb130-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb130-17"><a href="#cb130-17" 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="cb131"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb131-1"><a href="#cb131-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 text:</p> <blockquote> <blockquote> <p>A single block quote.</p> @@ -1192,28 +1973,33 @@ <p>Another block quote.</p> </blockquote> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-5">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb118"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb118-1"><a href="#cb118-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb118-2"><a href="#cb118-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb118-3"><a href="#cb118-3" aria-hidden="true"></a></span> -<span id="cb118-4"><a href="#cb118-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb118-5"><a href="#cb118-5" aria-hidden="true"></a>> A single</span> -<span id="cb118-6"><a href="#cb118-6" aria-hidden="true"></a></span> -<span id="cb118-7"><a href="#cb118-7" aria-hidden="true"></a>> block quote.</span> -<span id="cb118-8"><a href="#cb118-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb118-9"><a href="#cb118-9" aria-hidden="true"></a></span> -<span id="cb118-10"><a href="#cb118-10" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[breakableBlockquotes = yes]</span> -<span id="cb118-11"><a href="#cb118-11" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb118-12"><a href="#cb118-12" aria-hidden="true"></a>> A block quote.</span> -<span id="cb118-13"><a href="#cb118-13" aria-hidden="true"></a></span> -<span id="cb118-14"><a href="#cb118-14" aria-hidden="true"></a>> Another block quote.</span> -<span id="cb118-15"><a href="#cb118-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb118-16"><a href="#cb118-16" aria-hidden="true"></a></span> -<span id="cb118-17"><a href="#cb118-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb119"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb119-1"><a href="#cb119-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-6">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb132"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb132-1"><a href="#cb132-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb132-2"><a href="#cb132-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb132-3"><a href="#cb132-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb132-4"><a href="#cb132-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb132-5"><a href="#cb132-5" aria-hidden="true" tabindex="-1"></a>> A single</span> +<span id="cb132-6"><a href="#cb132-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb132-7"><a href="#cb132-7" aria-hidden="true" tabindex="-1"></a>> block quote.</span> +<span id="cb132-8"><a href="#cb132-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb132-9"><a href="#cb132-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb132-10"><a href="#cb132-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[breakableBlockquotes = yes]</span> +<span id="cb132-11"><a href="#cb132-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb132-12"><a href="#cb132-12" aria-hidden="true" tabindex="-1"></a>> A block quote.</span> +<span id="cb132-13"><a href="#cb132-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb132-14"><a href="#cb132-14" aria-hidden="true" tabindex="-1"></a>> Another block quote.</span> +<span id="cb132-15"><a href="#cb132-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb132-16"><a href="#cb132-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb132-17"><a href="#cb132-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb133"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb133-1"><a href="#cb133-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <blockquote> <p>A single block quote.</p> @@ -1225,303 +2011,405 @@ <p>Another block quote.</p> </blockquote> </blockquote> -<h4 data-number="2.2.1.7" id="option-citationnbsps"><span class="header-section-number">2.2.1.7</span> Option <code>citationNbsps</code></h4> +<h4 data-number="2.2.1.9" id="option-citationnbsps"><span +class="header-section-number">2.2.1.9</span> Option +<code>citationNbsps</code></h4> <dl> <dt><code>citationNbsps</code> (default value: <code>true</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Replace regular spaces with non-breaking spaces inside the prenotes and postnotes of citations produced via the pandoc citation syntax extension.</p> +<dd> +<p>Replace regular spaces with non-breaking spaces inside the prenotes +and postnotes of citations produced via the pandoc citation syntax +extension.</p> </dd> <dt>false</dt> -<dd><p>Do not replace regular spaces with non-breaking spaces inside the prenotes and postnotes of citations produced via the pandoc citation syntax extension.</p> +<dd> +<p>Do not replace regular spaces with non-breaking spaces inside the +prenotes and postnotes of citations produced via the pandoc citation +syntax extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-6"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.bib</code> with the following content:</p> -<div class="sourceCode" id="cb120"><pre class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb120-1"><a href="#cb120-1" aria-hidden="true"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> -<span id="cb120-2"><a href="#cb120-2" aria-hidden="true"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> -<span id="cb120-3"><a href="#cb120-3" aria-hidden="true"></a> <span class="dt">title</span> = "<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>",</span> -<span id="cb120-4"><a href="#cb120-4" aria-hidden="true"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> -<span id="cb120-5"><a href="#cb120-5" aria-hidden="true"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> -<span id="cb120-6"><a href="#cb120-6" aria-hidden="true"></a>}</span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb121"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb121-1"><a href="#cb121-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb121-2"><a href="#cb121-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb121-3"><a href="#cb121-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb121-4"><a href="#cb121-4" aria-hidden="true"></a></span> -<span id="cb121-5"><a href="#cb121-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb121-6"><a href="#cb121-6" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> -<span id="cb121-7"><a href="#cb121-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb121-8"><a href="#cb121-8" aria-hidden="true"></a></span> -<span id="cb121-9"><a href="#cb121-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{citationNbsps = false}</span> -<span id="cb121-10"><a href="#cb121-10" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> -<span id="cb121-11"><a href="#cb121-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb121-12"><a href="#cb121-12" aria-hidden="true"></a></span> -<span id="cb121-13"><a href="#cb121-13" aria-hidden="true"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span> -<span id="cb121-14"><a href="#cb121-14" aria-hidden="true"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span> -<span id="cb121-15"><a href="#cb121-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<h5 class="unnumbered" id="latex-example-7"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.bib</code> with the following content:</p> +<div class="sourceCode" id="cb134"><pre +class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb134-1"><a href="#cb134-1" aria-hidden="true" tabindex="-1"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> +<span id="cb134-2"><a href="#cb134-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> +<span id="cb134-3"><a href="#cb134-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">title</span> = "<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>",</span> +<span id="cb134-4"><a href="#cb134-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> +<span id="cb134-5"><a href="#cb134-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> +<span id="cb134-6"><a href="#cb134-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb135"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb135-1"><a href="#cb135-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb135-2"><a href="#cb135-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> +<span id="cb135-3"><a href="#cb135-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb135-4"><a href="#cb135-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb135-5"><a href="#cb135-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb135-6"><a href="#cb135-6" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> +<span id="cb135-7"><a href="#cb135-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb135-8"><a href="#cb135-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb135-9"><a href="#cb135-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{citationNbsps = false}</span> +<span id="cb135-10"><a href="#cb135-10" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> +<span id="cb135-11"><a href="#cb135-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb135-12"><a href="#cb135-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb135-13"><a href="#cb135-13" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span> +<span id="cb135-14"><a href="#cb135-14" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span> +<span id="cb135-15"><a href="#cb135-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX and BibTeX from the terminal:</p> -<div class="sourceCode" id="cb122"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb122-1"><a href="#cb122-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb122-2"><a href="#cb122-2" aria-hidden="true"></a><span class="ex">bibtex</span> document.aux</span> -<span id="cb122-3"><a href="#cb122-3" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb122-4"><a href="#cb122-4" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, where the middot (<code>·</code>) denotes a non-breaking space:</p> +<div class="sourceCode" id="cb136"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb136-1"><a href="#cb136-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb136-2"><a href="#cb136-2" aria-hidden="true" tabindex="-1"></a><span class="ex">bibtex</span> document.aux</span> +<span id="cb136-3"><a href="#cb136-3" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb136-4"><a href="#cb136-4" 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 text, where the middot (<code>·</code>) denotes a +non-breaking space:</p> <blockquote> <p>The TeXbook [1, p.·123·and·130] is good.</p> <p>The TeXbook [1, p. 123 and 130] is good.</p> <h3 id="references">References</h3> -<p><a href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a> Donald·Ervin Knuth. <em>The TeXbook, volume A of Computers and typesetting.</em> Addison-Wesley, 1984.</p> -</blockquote> -<h4 data-number="2.2.1.8" id="option-citations"><span class="header-section-number">2.2.1.8</span> Option <code>citations</code></h4> +<p><a +href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a> +Donald·Ervin Knuth. <em>The TeXbook, volume A of Computers and +typesetting.</em> Addison-Wesley, 1984.</p> +</blockquote> +<h4 data-number="2.2.1.10" id="option-citations"><span +class="header-section-number">2.2.1.10</span> Option +<code>citations</code></h4> <dl> <dt><code>citations</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the Pandoc citation syntax extension:</p> -<div class="sourceCode" id="cb123"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb123-1"><a href="#cb123-1" aria-hidden="true"></a>Here is a simple parenthetical citation <span class="co">[</span><span class="ot">@doe99</span><span class="co">]</span> and here</span> -<span id="cb123-2"><a href="#cb123-2" aria-hidden="true"></a>is a string of several [see @doe99, pp. 33-35; also</span> -<span id="cb123-3"><a href="#cb123-3" aria-hidden="true"></a>@smith04, chap. 1].</span> -<span id="cb123-4"><a href="#cb123-4" aria-hidden="true"></a></span> -<span id="cb123-5"><a href="#cb123-5" aria-hidden="true"></a>A parenthetical citation can have a <span class="co">[</span><span class="ot">prenote @doe99</span><span class="co">]</span> and</span> -<span id="cb123-6"><a href="#cb123-6" aria-hidden="true"></a>a <span class="co">[</span><span class="ot">@smith04 postnote</span><span class="co">]</span>. The name of the author can be</span> -<span id="cb123-7"><a href="#cb123-7" aria-hidden="true"></a>suppressed by inserting a dash before the name of an</span> -<span id="cb123-8"><a href="#cb123-8" aria-hidden="true"></a>author as follows <span class="co">[</span><span class="ot">-@smith04</span><span class="co">]</span>.</span> -<span id="cb123-9"><a href="#cb123-9" aria-hidden="true"></a></span> -<span id="cb123-10"><a href="#cb123-10" aria-hidden="true"></a>Here is a simple text citation @doe99 and here is</span> -<span id="cb123-11"><a href="#cb123-11" aria-hidden="true"></a>a string of several @doe99 [pp. 33-35; also @smith04,</span> -<span id="cb123-12"><a href="#cb123-12" aria-hidden="true"></a>chap. 1]. Here is one with the name of the author</span> -<span id="cb123-13"><a href="#cb123-13" aria-hidden="true"></a>suppressed -@doe99.</span></code></pre></div> +<dd> +<p>Enable the Pandoc citation syntax extension:</p> +<div class="sourceCode" id="cb137"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb137-1"><a href="#cb137-1" aria-hidden="true" tabindex="-1"></a>Here is a simple parenthetical citation <span class="co">[</span><span class="ot">@doe99</span><span class="co">]</span> and here</span> +<span id="cb137-2"><a href="#cb137-2" aria-hidden="true" tabindex="-1"></a>is a string of several [see @doe99, pp. 33-35; also</span> +<span id="cb137-3"><a href="#cb137-3" aria-hidden="true" tabindex="-1"></a>@smith04, chap. 1].</span> +<span id="cb137-4"><a href="#cb137-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb137-5"><a href="#cb137-5" aria-hidden="true" tabindex="-1"></a>A parenthetical citation can have a <span class="co">[</span><span class="ot">prenote @doe99</span><span class="co">]</span> and</span> +<span id="cb137-6"><a href="#cb137-6" aria-hidden="true" tabindex="-1"></a>a <span class="co">[</span><span class="ot">@smith04 postnote</span><span class="co">]</span>. The name of the author can be</span> +<span id="cb137-7"><a href="#cb137-7" aria-hidden="true" tabindex="-1"></a>suppressed by inserting a dash before the name of an</span> +<span id="cb137-8"><a href="#cb137-8" aria-hidden="true" tabindex="-1"></a>author as follows <span class="co">[</span><span class="ot">-@smith04</span><span class="co">]</span>.</span> +<span id="cb137-9"><a href="#cb137-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb137-10"><a href="#cb137-10" aria-hidden="true" tabindex="-1"></a>Here is a simple text citation @doe99 and here is</span> +<span id="cb137-11"><a href="#cb137-11" aria-hidden="true" tabindex="-1"></a>a string of several @doe99 [pp. 33-35; also @smith04,</span> +<span id="cb137-12"><a href="#cb137-12" aria-hidden="true" tabindex="-1"></a>chap. 1]. Here is one with the name of the author</span> +<span id="cb137-13"><a href="#cb137-13" aria-hidden="true" tabindex="-1"></a>suppressed -@doe99.</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the Pandoc citation syntax extension.</p> +<dd> +<p>Disable the Pandoc citation syntax extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-7"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.bib</code> with the following content:</p> -<div class="sourceCode" id="cb124"><pre class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb124-1"><a href="#cb124-1" aria-hidden="true"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> -<span id="cb124-2"><a href="#cb124-2" aria-hidden="true"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> -<span id="cb124-3"><a href="#cb124-3" aria-hidden="true"></a> <span class="dt">title</span> = "<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>",</span> -<span id="cb124-4"><a href="#cb124-4" aria-hidden="true"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> -<span id="cb124-5"><a href="#cb124-5" aria-hidden="true"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> -<span id="cb124-6"><a href="#cb124-6" aria-hidden="true"></a>}</span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb125"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb125-1"><a href="#cb125-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb125-2"><a href="#cb125-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[backend=biber]{<span class="ex">biblatex</span>}</span> -<span id="cb125-3"><a href="#cb125-3" aria-hidden="true"></a><span class="fu">\addbibresource</span>{document.bib}</span> -<span id="cb125-4"><a href="#cb125-4" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb125-5"><a href="#cb125-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb125-6"><a href="#cb125-6" aria-hidden="true"></a></span> -<span id="cb125-7"><a href="#cb125-7" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb125-8"><a href="#cb125-8" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] was written by @knuth:tex.</span> -<span id="cb125-9"><a href="#cb125-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb125-10"><a href="#cb125-10" aria-hidden="true"></a></span> -<span id="cb125-11"><a href="#cb125-11" aria-hidden="true"></a><span class="fu">\printbibliography</span></span> -<span id="cb125-12"><a href="#cb125-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<h5 class="unnumbered" id="latex-example-8"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.bib</code> with the following content:</p> +<div class="sourceCode" id="cb138"><pre +class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb138-1"><a href="#cb138-1" aria-hidden="true" tabindex="-1"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> +<span id="cb138-2"><a href="#cb138-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> +<span id="cb138-3"><a href="#cb138-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">title</span> = "<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>",</span> +<span id="cb138-4"><a href="#cb138-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> +<span id="cb138-5"><a href="#cb138-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> +<span id="cb138-6"><a href="#cb138-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb139"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb139-1"><a href="#cb139-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb139-2"><a href="#cb139-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[backend=biber]{<span class="ex">biblatex</span>}</span> +<span id="cb139-3"><a href="#cb139-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\addbibresource</span>{document.bib}</span> +<span id="cb139-4"><a href="#cb139-4" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> +<span id="cb139-5"><a href="#cb139-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb139-6"><a href="#cb139-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb139-7"><a href="#cb139-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb139-8"><a href="#cb139-8" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] was written by @knuth:tex.</span> +<span id="cb139-9"><a href="#cb139-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb139-10"><a href="#cb139-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb139-11"><a href="#cb139-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\printbibliography</span></span> +<span id="cb139-12"><a href="#cb139-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX and Biber from the terminal:</p> -<div class="sourceCode" id="cb126"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb126-1"><a href="#cb126-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb126-2"><a href="#cb126-2" aria-hidden="true"></a><span class="ex">biber</span> document.bcf</span> -<span id="cb126-3"><a href="#cb126-3" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb126-4"><a href="#cb126-4" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>The TeXbook [1, p.·123 and 130] was written by Knuth <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a>.</p> +<div class="sourceCode" id="cb140"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb140-1"><a href="#cb140-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb140-2"><a href="#cb140-2" aria-hidden="true" tabindex="-1"></a><span class="ex">biber</span> document.bcf</span> +<span id="cb140-3"><a href="#cb140-3" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb140-4"><a href="#cb140-4" 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 text:</p> +<blockquote> +<p>The TeXbook [1, p.·123 and 130] was written by Knuth <a +href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a>.</p> <h3 id="references-1">References</h3> -<p><a href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a> Donald Ervin Knuth. <em>The <span class="tex">T<sub>e</sub>X</span>book, volume A of Computers and typesetting.</em> Addison-Wesley, 1984.</p> -</blockquote> -<h4 data-number="2.2.1.9" id="option-codespans"><span class="header-section-number">2.2.1.9</span> Option <code>codeSpans</code></h4> +<p><a +href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a> +Donald Ervin Knuth. <em>The <span class="tex">T<sub>e</sub>X</span>book, +volume A of Computers and typesetting.</em> Addison-Wesley, 1984.</p> +</blockquote> +<h4 data-number="2.2.1.11" id="option-codespans"><span +class="header-section-number">2.2.1.11</span> Option +<code>codeSpans</code></h4> <dl> <dt><code>codeSpans</code> (default value: <code>true</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the code span syntax:</p> -<div class="sourceCode" id="cb127"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb127-1"><a href="#cb127-1" aria-hidden="true"></a>Use the <span class="in">`printf()`</span> function.</span> -<span id="cb127-2"><a href="#cb127-2" aria-hidden="true"></a><span class="in">``There is a literal backtick (`) here.``</span></span></code></pre></div> +<dd> +<p>Enable the code span syntax:</p> +<div class="sourceCode" id="cb141"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb141-1"><a href="#cb141-1" aria-hidden="true" tabindex="-1"></a>Use the <span class="in">`printf()`</span> function.</span> +<span id="cb141-2"><a href="#cb141-2" aria-hidden="true" tabindex="-1"></a>`<span class="in">`There is a literal backtick (`</span>) here.``</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the code span syntax. This allows you to easily use the quotation mark ligatures in texts that do not contain code spans:</p> +<dd> +<p>Disable the code span syntax. This allows you to easily use the +quotation mark ligatures in texts that do not contain code spans:</p> <pre><code>``This is a quote.''</code></pre> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-6">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb129"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb129-1"><a href="#cb129-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb129-2"><a href="#cb129-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb129-3"><a href="#cb129-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb129-4"><a href="#cb129-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb129-5"><a href="#cb129-5" aria-hidden="true"></a> local convert = markdown.new()</span> -<span id="cb129-6"><a href="#cb129-6" aria-hidden="true"></a> local input =</span> -<span id="cb129-7"><a href="#cb129-7" aria-hidden="true"></a> "``This is a code span.'' " ..</span> -<span id="cb129-8"><a href="#cb129-8" aria-hidden="true"></a> "``This is no longer a code span.''"</span> -<span id="cb129-9"><a href="#cb129-9" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb129-10"><a href="#cb129-10" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb129-11"><a href="#cb129-11" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb129-12"><a href="#cb129-12" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb129-13"><a href="#cb129-13" aria-hidden="true"></a> local convert = markdown.new({codeSpans = false})</span> -<span id="cb129-14"><a href="#cb129-14" aria-hidden="true"></a> local input =</span> -<span id="cb129-15"><a href="#cb129-15" aria-hidden="true"></a> "``This is a quote.'' " ..</span> -<span id="cb129-16"><a href="#cb129-16" aria-hidden="true"></a> "``This is another quote.''"</span> -<span id="cb129-17"><a href="#cb129-17" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb129-18"><a href="#cb129-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 class="unnumbered" id="lua-module-example-6">Lua Module Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb143"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb143-1"><a href="#cb143-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb143-2"><a href="#cb143-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb143-3"><a href="#cb143-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb143-4"><a href="#cb143-4" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb143-5"><a href="#cb143-5" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new()</span> +<span id="cb143-6"><a href="#cb143-6" aria-hidden="true" tabindex="-1"></a> local input =</span> +<span id="cb143-7"><a href="#cb143-7" aria-hidden="true" tabindex="-1"></a> "``This is a code span.'' " ..</span> +<span id="cb143-8"><a href="#cb143-8" aria-hidden="true" tabindex="-1"></a> "``This is no longer a code span.''"</span> +<span id="cb143-9"><a href="#cb143-9" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb143-10"><a href="#cb143-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span> +<span id="cb143-11"><a href="#cb143-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb143-12"><a href="#cb143-12" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb143-13"><a href="#cb143-13" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new({codeSpans = false})</span> +<span id="cb143-14"><a href="#cb143-14" aria-hidden="true" tabindex="-1"></a> local input =</span> +<span id="cb143-15"><a href="#cb143-15" aria-hidden="true" tabindex="-1"></a> "``This is a quote.'' " ..</span> +<span id="cb143-16"><a href="#cb143-16" aria-hidden="true" tabindex="-1"></a> "``This is another quote.''"</span> +<span id="cb143-17"><a href="#cb143-17" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb143-18"><a href="#cb143-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb130"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb130-1"><a href="#cb130-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb144"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb144-1"><a href="#cb144-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:</p> <blockquote> -<p><code>This is a code span.''</code>This is no longer a code span.’’</p> +<p><code>This is a code span.''</code>This is no longer a code +span.’’</p> <p>“This is a quote.” “This is another quote.”</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-6">Lua CLI Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb131"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb131-1"><a href="#cb131-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb131-2"><a href="#cb131-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb131-3"><a href="#cb131-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb131-4"><a href="#cb131-4" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb131-5"><a href="#cb131-5" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb131-6"><a href="#cb131-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb132"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb132-1"><a href="#cb132-1" aria-hidden="true"></a><span class="in">``Is this a code span?'' ``</span>Or a quote?''</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb133"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb133-1"><a href="#cb133-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ codeSpans=false -- content.md optionfalse.tex</span> -<span id="cb133-2"><a href="#cb133-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optiontrue.tex</span> -<span id="cb133-3"><a href="#cb133-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="lua-cli-example-6">Lua CLI Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb145"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb145-1"><a href="#cb145-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb145-2"><a href="#cb145-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb145-3"><a href="#cb145-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb145-4"><a href="#cb145-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span> +<span id="cb145-5"><a href="#cb145-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb145-6"><a href="#cb145-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>content.md</code> with the following content:</p> +<div class="sourceCode" id="cb146"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb146-1"><a href="#cb146-1" aria-hidden="true" tabindex="-1"></a>``Is this a code span?'' ``Or a quote?''</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb147"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb147-1"><a href="#cb147-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ codeSpans=false <span class="at">--</span> content.md optionfalse.tex</span> +<span id="cb147-2"><a href="#cb147-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optiontrue.tex</span> +<span id="cb147-3"><a href="#cb147-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>“Is this a code span?” “Or a quote?”</p> <p><code>Is this a code span?''</code>Or a quote?’’</p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-6">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb134"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb134-1"><a href="#cb134-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb134-2"><a href="#cb134-2" aria-hidden="true"></a></span> -<span id="cb134-3"><a href="#cb134-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb134-4"><a href="#cb134-4" aria-hidden="true"></a>``This is a code span.''</span> -<span id="cb134-5"><a href="#cb134-5" aria-hidden="true"></a>``This is no longer a code span.''</span> -<span id="cb134-6"><a href="#cb134-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb134-7"><a href="#cb134-7" aria-hidden="true"></a></span> -<span id="cb134-8"><a href="#cb134-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionCodeSpans</span>{false}</span> -<span id="cb134-9"><a href="#cb134-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb134-10"><a href="#cb134-10" aria-hidden="true"></a>``This is a quote.''</span> -<span id="cb134-11"><a href="#cb134-11" aria-hidden="true"></a>``This is another quote.''</span> -<span id="cb134-12"><a href="#cb134-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb134-13"><a href="#cb134-13" aria-hidden="true"></a></span> -<span id="cb134-14"><a href="#cb134-14" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb135"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb135-1"><a href="#cb135-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p><code>This is a code span.''</code>This is no longer a code span.’’</p> +<h5 class="unnumbered" id="plain-tex-example-6">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb148"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb148-1"><a href="#cb148-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb148-2"><a href="#cb148-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb148-3"><a href="#cb148-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb148-4"><a href="#cb148-4" aria-hidden="true" tabindex="-1"></a>``This is a code span.''</span> +<span id="cb148-5"><a href="#cb148-5" aria-hidden="true" tabindex="-1"></a>``This is no longer a code span.''</span> +<span id="cb148-6"><a href="#cb148-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb148-7"><a href="#cb148-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb148-8"><a href="#cb148-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionCodeSpans</span>{false}</span> +<span id="cb148-9"><a href="#cb148-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb148-10"><a href="#cb148-10" aria-hidden="true" tabindex="-1"></a>``This is a quote.''</span> +<span id="cb148-11"><a href="#cb148-11" aria-hidden="true" tabindex="-1"></a>``This is another quote.''</span> +<span id="cb148-12"><a href="#cb148-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb148-13"><a href="#cb148-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb148-14"><a href="#cb148-14" 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="cb149"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb149-1"><a href="#cb149-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:</p> +<blockquote> +<p><code>This is a code span.''</code>This is no longer a code +span.’’</p> <p>“This is a quote.” “This is another quote.”</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-8"><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="cb136"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb136-1"><a href="#cb136-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb136-2"><a href="#cb136-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb136-3"><a href="#cb136-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb136-4"><a href="#cb136-4" aria-hidden="true"></a></span> -<span id="cb136-5"><a href="#cb136-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb136-6"><a href="#cb136-6" aria-hidden="true"></a>``This is a code span.''</span> -<span id="cb136-7"><a href="#cb136-7" aria-hidden="true"></a>``This is no longer a code span.''</span> -<span id="cb136-8"><a href="#cb136-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb136-9"><a href="#cb136-9" aria-hidden="true"></a></span> -<span id="cb136-10"><a href="#cb136-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{codeSpans=false}</span> -<span id="cb136-11"><a href="#cb136-11" aria-hidden="true"></a>``This is a quote.''</span> -<span id="cb136-12"><a href="#cb136-12" aria-hidden="true"></a>``This is another quote.''</span> -<span id="cb136-13"><a href="#cb136-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb136-14"><a href="#cb136-14" aria-hidden="true"></a></span> -<span id="cb136-15"><a href="#cb136-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb137"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb137-1"><a href="#cb137-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p><code>This is a code span.''</code>This is no longer a code span.’’</p> +<h5 class="unnumbered" id="latex-example-9"><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="cb150"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb150-1"><a href="#cb150-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb150-2"><a href="#cb150-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb150-3"><a href="#cb150-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb150-4"><a href="#cb150-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb150-5"><a href="#cb150-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb150-6"><a href="#cb150-6" aria-hidden="true" tabindex="-1"></a>``This is a code span.''</span> +<span id="cb150-7"><a href="#cb150-7" aria-hidden="true" tabindex="-1"></a>``This is no longer a code span.''</span> +<span id="cb150-8"><a href="#cb150-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb150-9"><a href="#cb150-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb150-10"><a href="#cb150-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{codeSpans=false}</span> +<span id="cb150-11"><a href="#cb150-11" aria-hidden="true" tabindex="-1"></a>``This is a quote.''</span> +<span id="cb150-12"><a href="#cb150-12" aria-hidden="true" tabindex="-1"></a>``This is another quote.''</span> +<span id="cb150-13"><a href="#cb150-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb150-14"><a href="#cb150-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb150-15"><a href="#cb150-15" 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="cb151"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb151-1"><a href="#cb151-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 text:</p> +<blockquote> +<p><code>This is a code span.''</code>This is no longer a code +span.’’</p> <p>“This is a quote.” “This is another quote.”</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-6">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb138"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb138-1"><a href="#cb138-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb138-2"><a href="#cb138-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb138-3"><a href="#cb138-3" aria-hidden="true"></a></span> -<span id="cb138-4"><a href="#cb138-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb138-5"><a href="#cb138-5" aria-hidden="true"></a>``This is a code span.''</span> -<span id="cb138-6"><a href="#cb138-6" aria-hidden="true"></a>``This is no longer a code span.''</span> -<span id="cb138-7"><a href="#cb138-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb138-8"><a href="#cb138-8" aria-hidden="true"></a></span> -<span id="cb138-9"><a href="#cb138-9" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[codeSpans = no]</span> -<span id="cb138-10"><a href="#cb138-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb138-11"><a href="#cb138-11" aria-hidden="true"></a>``This is a quote.''</span> -<span id="cb138-12"><a href="#cb138-12" aria-hidden="true"></a>``This is another quote.''</span> -<span id="cb138-13"><a href="#cb138-13" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb138-14"><a href="#cb138-14" aria-hidden="true"></a></span> -<span id="cb138-15"><a href="#cb138-15" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb139"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb139-1"><a href="#cb139-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p><code>This is a code span.''</code>This is no longer a code span.’’</p> +<h5 class="unnumbered" id="context-example-7">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb152"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb152-1"><a href="#cb152-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb152-2"><a href="#cb152-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb152-3"><a href="#cb152-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb152-4"><a href="#cb152-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb152-5"><a href="#cb152-5" aria-hidden="true" tabindex="-1"></a>``This is a code span.''</span> +<span id="cb152-6"><a href="#cb152-6" aria-hidden="true" tabindex="-1"></a>``This is no longer a code span.''</span> +<span id="cb152-7"><a href="#cb152-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb152-8"><a href="#cb152-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb152-9"><a href="#cb152-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[codeSpans = no]</span> +<span id="cb152-10"><a href="#cb152-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb152-11"><a href="#cb152-11" aria-hidden="true" tabindex="-1"></a>``This is a quote.''</span> +<span id="cb152-12"><a href="#cb152-12" aria-hidden="true" tabindex="-1"></a>``This is another quote.''</span> +<span id="cb152-13"><a href="#cb152-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb152-14"><a href="#cb152-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb152-15"><a href="#cb152-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb153"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb153-1"><a href="#cb153-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<p><code>This is a code span.''</code>This is no longer a code +span.’’</p> <p>“This is a quote.” “This is another quote.”</p> </blockquote> -<h4 data-number="2.2.1.10" id="option-contentblocks"><span class="header-section-number">2.2.1.10</span> Option <code>contentBlocks</code></h4> +<h4 data-number="2.2.1.12" id="option-contentblocks"><span +class="header-section-number">2.2.1.12</span> Option +<code>contentBlocks</code></h4> <dl> <dt><code>contentBlocks</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the iA Writer content blocks syntax extension:</p> -<div class="sourceCode" id="cb140"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb140-1"><a href="#cb140-1" aria-hidden="true"></a>http://example.com/minard.jpg (Napoleon's</span> -<span id="cb140-2"><a href="#cb140-2" aria-hidden="true"></a> disastrous Russian campaign of 1812)</span> -<span id="cb140-3"><a href="#cb140-3" aria-hidden="true"></a>/Flowchart.png "Engineering Flowchart"</span> -<span id="cb140-4"><a href="#cb140-4" aria-hidden="true"></a>/Savings Account.csv 'Recent Transactions'</span> -<span id="cb140-5"><a href="#cb140-5" aria-hidden="true"></a>/Example.swift</span> -<span id="cb140-6"><a href="#cb140-6" aria-hidden="true"></a>/Lorem Ipsum.txt</span></code></pre></div> +<dd> +<p>Enable the iA Writer content blocks syntax extension:</p> +<div class="sourceCode" id="cb154"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb154-1"><a href="#cb154-1" aria-hidden="true" tabindex="-1"></a>http://example.com/minard.jpg (Napoleon's</span> +<span id="cb154-2"><a href="#cb154-2" aria-hidden="true" tabindex="-1"></a> disastrous Russian campaign of 1812)</span> +<span id="cb154-3"><a href="#cb154-3" aria-hidden="true" tabindex="-1"></a>/Flowchart.png "Engineering Flowchart"</span> +<span id="cb154-4"><a href="#cb154-4" aria-hidden="true" tabindex="-1"></a>/Savings Account.csv 'Recent Transactions'</span> +<span id="cb154-5"><a href="#cb154-5" aria-hidden="true" tabindex="-1"></a>/Example.swift</span> +<span id="cb154-6"><a href="#cb154-6" aria-hidden="true" tabindex="-1"></a>/Lorem Ipsum.txt</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the iA Writer content blocks syntax extension.</p> +<dd> +<p>Disable the iA Writer content blocks syntax extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-9"><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>table.csv</code> with the following content:</p> +<h5 class="unnumbered" id="latex-example-10"><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>table.csv</code> with the following content:</p> <pre class="csv"><code>Name,Surname,Born Albert,Einstein,1879 Marie,Curie,1867 Thomas,Edison,1847</code></pre> -<p>Create also a text document named <code>markdown-languages.json</code> with the following content:</p> -<div class="sourceCode" id="cb142"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb142-1"><a href="#cb142-1" aria-hidden="true"></a>{</span> -<span id="cb142-2"><a href="#cb142-2" aria-hidden="true"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"LaTeX"</span></span> -<span id="cb142-3"><a href="#cb142-3" aria-hidden="true"></a>}</span></code></pre></div> -<p>Create also a text document named <code>code.tex</code> with the following content:</p> -<div class="sourceCode" id="cb143"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb143-1"><a href="#cb143-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> -<p>Create also a text document named <code>part.md</code> with the following content:</p> -<div class="sourceCode" id="cb144"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb144-1"><a href="#cb144-1" aria-hidden="true"></a>This is a *transcluded markdown document*.</span></code></pre></div> -<p>Create also a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb145"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb145-1"><a href="#cb145-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb145-2"><a href="#cb145-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> -<span id="cb145-3"><a href="#cb145-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> -<span id="cb145-4"><a href="#cb145-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb145-5"><a href="#cb145-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb145-6"><a href="#cb145-6" aria-hidden="true"></a>/table.csv (An example table)</span> -<span id="cb145-7"><a href="#cb145-7" aria-hidden="true"></a>/code.tex (An example code listing)</span> -<span id="cb145-8"><a href="#cb145-8" aria-hidden="true"></a>/part.md (A file transclusion example)</span> -<span id="cb145-9"><a href="#cb145-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb145-10"><a href="#cb145-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb146"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb146-1"><a href="#cb146-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>Create also a text document named +<code>markdown-languages.json</code> with the following content:</p> +<div class="sourceCode" id="cb156"><pre +class="sourceCode js"><code class="sourceCode javascript"><span id="cb156-1"><a href="#cb156-1" aria-hidden="true" tabindex="-1"></a>{</span> +<span id="cb156-2"><a href="#cb156-2" aria-hidden="true" tabindex="-1"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"LaTeX"</span></span> +<span id="cb156-3"><a href="#cb156-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<p>Create also a text document named <code>code.tex</code> with the +following content:</p> +<div class="sourceCode" id="cb157"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb157-1"><a href="#cb157-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> +<p>Create also a text document named <code>part.md</code> with the +following content:</p> +<div class="sourceCode" id="cb158"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb158-1"><a href="#cb158-1" aria-hidden="true" tabindex="-1"></a>This is a *transcluded markdown document*.</span></code></pre></div> +<p>Create also a text document named <code>document.tex</code> with the +following content:</p> +<div class="sourceCode" id="cb159"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb159-1"><a href="#cb159-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb159-2"><a href="#cb159-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> +<span id="cb159-3"><a href="#cb159-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> +<span id="cb159-4"><a href="#cb159-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb159-5"><a href="#cb159-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb159-6"><a href="#cb159-6" aria-hidden="true" tabindex="-1"></a>/table.csv (An example table)</span> +<span id="cb159-7"><a href="#cb159-7" aria-hidden="true" tabindex="-1"></a>/code.tex (An example code listing)</span> +<span id="cb159-8"><a href="#cb159-8" aria-hidden="true" tabindex="-1"></a>/part.md (A file transclusion example)</span> +<span id="cb159-9"><a href="#cb159-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb159-10"><a href="#cb159-10" 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="cb160"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb160-1"><a href="#cb160-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 text:</p> <blockquote> <table> <thead> @@ -1550,38 +2438,51 @@ Thomas,Edison,1847</code></pre> </tbody> </table> <p>Table 1: An example table</p> -<div class="sourceCode" id="cb147"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb147-1"><a href="#cb147-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> +<div class="sourceCode" id="cb161"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb161-1"><a href="#cb161-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> <p>This is a <em>transcluded markdown document</em>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-7">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>table.csv</code> with the following content:</p> +<h5 class="unnumbered" id="context-example-8">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>table.csv</code> with the following content:</p> <pre class="csv"><code>Name,Surname,Born Albert,Einstein,1879 Marie,Curie,1867 Thomas,Edison,1847</code></pre> -<p>Create also a text document named <code>markdown-languages.json</code> with the following content:</p> -<div class="sourceCode" id="cb149"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb149-1"><a href="#cb149-1" aria-hidden="true"></a>{</span> -<span id="cb149-2"><a href="#cb149-2" aria-hidden="true"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"ConTeXt"</span></span> -<span id="cb149-3"><a href="#cb149-3" aria-hidden="true"></a>}</span></code></pre></div> -<p>Create also a text document named <code>code.tex</code> with the following content:</p> -<div class="sourceCode" id="cb150"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb150-1"><a href="#cb150-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> -<p>Create also a text document named <code>part.md</code> with the following content:</p> -<div class="sourceCode" id="cb151"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb151-1"><a href="#cb151-1" aria-hidden="true"></a>This is a *transcluded markdown document*.</span></code></pre></div> -<p>Create also a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb152"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb152-1"><a href="#cb152-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb152-2"><a href="#cb152-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[contentBlocks = yes]</span> -<span id="cb152-3"><a href="#cb152-3" aria-hidden="true"></a><span class="fu">\definetyping</span> [ConTeXt]</span> -<span id="cb152-4"><a href="#cb152-4" aria-hidden="true"></a><span class="fu">\setuptyping</span> [ConTeXt] [option=TEX]</span> -<span id="cb152-5"><a href="#cb152-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb152-6"><a href="#cb152-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb152-7"><a href="#cb152-7" aria-hidden="true"></a>/table.csv (An example table)</span> -<span id="cb152-8"><a href="#cb152-8" aria-hidden="true"></a>/code.tex (An example code listing)</span> -<span id="cb152-9"><a href="#cb152-9" aria-hidden="true"></a>/part.md (A file transclusion example)</span> -<span id="cb152-10"><a href="#cb152-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb152-11"><a href="#cb152-11" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb153"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb153-1"><a href="#cb153-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>Create also a text document named +<code>markdown-languages.json</code> with the following content:</p> +<div class="sourceCode" id="cb163"><pre +class="sourceCode js"><code class="sourceCode javascript"><span id="cb163-1"><a href="#cb163-1" aria-hidden="true" tabindex="-1"></a>{</span> +<span id="cb163-2"><a href="#cb163-2" aria-hidden="true" tabindex="-1"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"ConTeXt"</span></span> +<span id="cb163-3"><a href="#cb163-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<p>Create also a text document named <code>code.tex</code> with the +following content:</p> +<div class="sourceCode" id="cb164"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb164-1"><a href="#cb164-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> +<p>Create also a text document named <code>part.md</code> with the +following content:</p> +<div class="sourceCode" id="cb165"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb165-1"><a href="#cb165-1" aria-hidden="true" tabindex="-1"></a>This is a *transcluded markdown document*.</span></code></pre></div> +<p>Create also a text document named <code>document.tex</code> with the +following content:</p> +<div class="sourceCode" id="cb166"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb166-1"><a href="#cb166-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb166-2"><a href="#cb166-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[contentBlocks = yes]</span> +<span id="cb166-3"><a href="#cb166-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\definetyping</span> [ConTeXt]</span> +<span id="cb166-4"><a href="#cb166-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\setuptyping</span> [ConTeXt] [option=TEX]</span> +<span id="cb166-5"><a href="#cb166-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb166-6"><a href="#cb166-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb166-7"><a href="#cb166-7" aria-hidden="true" tabindex="-1"></a>/table.csv (An example table)</span> +<span id="cb166-8"><a href="#cb166-8" aria-hidden="true" tabindex="-1"></a>/code.tex (An example code listing)</span> +<span id="cb166-9"><a href="#cb166-9" aria-hidden="true" tabindex="-1"></a>/part.md (A file transclusion example)</span> +<span id="cb166-10"><a href="#cb166-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb166-11"><a href="#cb166-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb167"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb167-1"><a href="#cb167-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <table> <thead> @@ -1610,424 +2511,525 @@ Thomas,Edison,1847</code></pre> </tbody> </table> <p>Table 1: An example table</p> -<div class="sourceCode" id="cb154"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb154-1"><a href="#cb154-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> +<div class="sourceCode" id="cb168"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb168-1"><a href="#cb168-1" aria-hidden="true" tabindex="-1"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> <p>This is a <em>transcluded markdown document</em>.</p> </blockquote> -<h4 data-number="2.2.1.11" id="option-contentblockslanguagemap"><span class="header-section-number">2.2.1.11</span> Option <code>contentBlocksLanguageMap</code></h4> +<h4 data-number="2.2.1.13" id="option-debugextensions"><span +class="header-section-number">2.2.1.13</span> Option +<code>debugExtensions</code></h4> <dl> -<dt><code>contentBlocksLanguageMap</code> (default value: <code>"markdown-languages.json"</code>)</dt> -<dd><p>The filename of the <abbr>JSON</abbr> file that maps filename extensions to programming language names in the iA Writer content blocks.</p> +<dt><code>debugExtensions</code> (default value: +<code>false</code>)</dt> +<dd> +<dl> +<dt>true</dt> +<dd> +<p>Produce a <abbr>JSON</abbr> file that will contain the extensible +subset of the <abbr>peg</abbr> grammar of markdown after built-in syntax +extensions (see options <strong><code>citations</code></strong>, +<strong><code>contentBlocks</code></strong>, +<strong><code>definitionLists</code></strong>, etc.) and user-defined +syntax extensions (see option <strong><code>extensions</code></strong>) +have been applied. This helps you to see how the different extensions +interact. The name of the produced <abbr>JSON</abbr> file is controlled +by the <strong><code>debugExtensionsFileName</code></strong> option.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-10"><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>table.csv</code> with the following content:</p> -<pre class="csv"><code>Name,Surname,Born -Albert,Einstein,1879 -Marie,Curie,1867 -Thomas,Edison,1847</code></pre> -<p>Create also a text document named <code>language-map.json</code> with the following content:</p> -<div class="sourceCode" id="cb156"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb156-1"><a href="#cb156-1" aria-hidden="true"></a>{</span> -<span id="cb156-2"><a href="#cb156-2" aria-hidden="true"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"LaTeX"</span></span> -<span id="cb156-3"><a href="#cb156-3" aria-hidden="true"></a>}</span></code></pre></div> -<p>Create also a text document named <code>code.tex</code> with the following content:</p> -<div class="sourceCode" id="cb157"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb157-1"><a href="#cb157-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> -<p>Create also a text document named <code>part.md</code> with the following content:</p> -<div class="sourceCode" id="cb158"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb158-1"><a href="#cb158-1" aria-hidden="true"></a>This is a *transcluded markdown document*.</span></code></pre></div> -<p>Create also a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb159"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb159-1"><a href="#cb159-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb159-2"><a href="#cb159-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> -<span id="cb159-3"><a href="#cb159-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> -<span id="cb159-4"><a href="#cb159-4" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb159-5"><a href="#cb159-5" aria-hidden="true"></a> contentBlocksLanguageMap = {language-map.json},</span> -<span id="cb159-6"><a href="#cb159-6" aria-hidden="true"></a>}</span> -<span id="cb159-7"><a href="#cb159-7" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb159-8"><a href="#cb159-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb159-9"><a href="#cb159-9" aria-hidden="true"></a>/table.csv (An example table)</span> -<span id="cb159-10"><a href="#cb159-10" aria-hidden="true"></a>/code.tex (An example code listing)</span> -<span id="cb159-11"><a href="#cb159-11" aria-hidden="true"></a>/part.md (A file transclusion example)</span> -<span id="cb159-12"><a href="#cb159-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb159-13"><a href="#cb159-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb160"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb160-1"><a href="#cb160-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<table> -<thead> -<tr class="header"> -<th>Name</th> -<th>Surname</th> -<th>Born</th> -</tr> -</thead> -<tbody> -<tr class="odd"> -<td>Albert</td> -<td>Einstein</td> -<td>1879</td> -</tr> -<tr class="even"> -<td>Marie</td> -<td>Curie</td> -<td>1867</td> -</tr> -<tr class="odd"> -<td>Thomas</td> -<td>Edison</td> -<td>1847</td> -</tr> -</tbody> -</table> -<p>Table 1: An example table</p> -<div class="sourceCode" id="cb161"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb161-1"><a href="#cb161-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> -<p>This is a <em>transcluded markdown document</em>.</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="context-example-8">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>table.csv</code> with the following content:</p> -<pre class="csv"><code>Name,Surname,Born -Albert,Einstein,1879 -Marie,Curie,1867 -Thomas,Edison,1847</code></pre> -<p>Create also a text document named <code>language-map.json</code> with the following content:</p> -<div class="sourceCode" id="cb163"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb163-1"><a href="#cb163-1" aria-hidden="true"></a>{</span> -<span id="cb163-2"><a href="#cb163-2" aria-hidden="true"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"ConTeXt"</span></span> -<span id="cb163-3"><a href="#cb163-3" aria-hidden="true"></a>}</span></code></pre></div> -<p>Create also a text document named <code>code.tex</code> with the following content:</p> -<div class="sourceCode" id="cb164"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb164-1"><a href="#cb164-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> -<p>Create also a text document named <code>part.md</code> with the following content:</p> -<div class="sourceCode" id="cb165"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb165-1"><a href="#cb165-1" aria-hidden="true"></a>This is a *transcluded markdown document*.</span></code></pre></div> -<p>Create also a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb166"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb166-1"><a href="#cb166-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb166-2"><a href="#cb166-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span></span> -<span id="cb166-3"><a href="#cb166-3" aria-hidden="true"></a> [</span> -<span id="cb166-4"><a href="#cb166-4" aria-hidden="true"></a> contentBlocks = yes,</span> -<span id="cb166-5"><a href="#cb166-5" aria-hidden="true"></a> contentBlocksLanguageMap = language-map.json,</span> -<span id="cb166-6"><a href="#cb166-6" aria-hidden="true"></a> ]</span> -<span id="cb166-7"><a href="#cb166-7" aria-hidden="true"></a><span class="fu">\definetyping</span> [ConTeXt]</span> -<span id="cb166-8"><a href="#cb166-8" aria-hidden="true"></a><span class="fu">\setuptyping</span> [ConTeXt] [option=TEX]</span> -<span id="cb166-9"><a href="#cb166-9" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb166-10"><a href="#cb166-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb166-11"><a href="#cb166-11" aria-hidden="true"></a>/table.csv (An example table)</span> -<span id="cb166-12"><a href="#cb166-12" aria-hidden="true"></a>/code.tex (An example code listing)</span> -<span id="cb166-13"><a href="#cb166-13" aria-hidden="true"></a>/part.md (A file transclusion example)</span> -<span id="cb166-14"><a href="#cb166-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb166-15"><a href="#cb166-15" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb167"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb167-1"><a href="#cb167-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +</dd> +<dd> +<dl> +<dt>false</dt> +<dd> +<p>Do not produce a <abbr>JSON</abbr> file with the <abbr>peg</abbr> +grammar of markdown.</p> +</dd> +</dl> +</dd> +</dl> +<h5 class="unnumbered" id="latex-example-11"><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>strike-through.lua</code> with the following content:</p> +<div class="sourceCode" id="cb169"><pre +class="sourceCode lua"><code class="sourceCode lua"><span id="cb169-1"><a href="#cb169-1" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> strike_through <span class="op">=</span> <span class="op">{</span></span> +<span id="cb169-2"><a href="#cb169-2" aria-hidden="true" tabindex="-1"></a> api_version <span class="op">=</span> <span class="dv">2</span><span class="op">,</span></span> +<span id="cb169-3"><a href="#cb169-3" aria-hidden="true" tabindex="-1"></a> grammar_version <span class="op">=</span> <span class="dv">1</span><span class="op">,</span></span> +<span id="cb169-4"><a href="#cb169-4" aria-hidden="true" tabindex="-1"></a> finalize_grammar <span class="op">=</span> <span class="kw">function</span><span class="op">(</span>reader<span class="op">)</span></span> +<span id="cb169-5"><a href="#cb169-5" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> nonspacechar <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="dv">1</span><span class="op">)</span> <span class="op">-</span> lpeg<span class="op">.</span>S<span class="op">(</span><span class="st">"</span><span class="sc">\t</span><span class="st"> "</span><span class="op">)</span></span> +<span id="cb169-6"><a href="#cb169-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> doubleslashes <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="st">"//"</span><span class="op">)</span></span> +<span id="cb169-7"><a href="#cb169-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> <span class="kw">function</span> between<span class="op">(</span>p<span class="op">,</span> starter<span class="op">,</span> ender<span class="op">)</span></span> +<span id="cb169-8"><a href="#cb169-8" aria-hidden="true" tabindex="-1"></a> ender <span class="op">=</span> lpeg<span class="op">.</span>B<span class="op">(</span>nonspacechar<span class="op">)</span> <span class="op">*</span> ender</span> +<span id="cb169-9"><a href="#cb169-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="op">(</span>starter <span class="op">*</span> <span class="op">#</span>nonspacechar</span> +<span id="cb169-10"><a href="#cb169-10" aria-hidden="true" tabindex="-1"></a> <span class="op">*</span> lpeg<span class="op">.</span>Ct<span class="op">(</span>p <span class="op">*</span> <span class="op">(</span>p <span class="op">-</span> ender<span class="op">)^</span><span class="dv">0</span><span class="op">)</span> <span class="op">*</span> ender<span class="op">)</span></span> +<span id="cb169-11"><a href="#cb169-11" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span> +<span id="cb169-12"><a href="#cb169-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb169-13"><a href="#cb169-13" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> read_strike_through <span class="op">=</span> between<span class="op">(</span></span> +<span id="cb169-14"><a href="#cb169-14" aria-hidden="true" tabindex="-1"></a> lpeg<span class="op">.</span>V<span class="op">(</span><span class="st">"Inline"</span><span class="op">),</span> doubleslashes<span class="op">,</span> doubleslashes</span> +<span id="cb169-15"><a href="#cb169-15" aria-hidden="true" tabindex="-1"></a> <span class="op">)</span> <span class="op">/</span> <span class="kw">function</span><span class="op">(</span>s<span class="op">)</span> <span class="cf">return</span> <span class="op">{</span><span class="st">"</span><span class="sc">\\</span><span class="st">st{"</span><span class="op">,</span> s<span class="op">,</span> <span class="st">"}"</span><span class="op">}</span> <span class="kw">end</span></span> +<span id="cb169-16"><a href="#cb169-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb169-17"><a href="#cb169-17" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>insert_pattern<span class="op">(</span><span class="st">"Inline after Emph"</span><span class="op">,</span> read_strike_through<span class="op">,</span></span> +<span id="cb169-18"><a href="#cb169-18" aria-hidden="true" tabindex="-1"></a> <span class="st">"StrikeThrough"</span><span class="op">)</span></span> +<span id="cb169-19"><a href="#cb169-19" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>add_special_character<span class="op">(</span><span class="st">"/"</span><span class="op">)</span></span> +<span id="cb169-20"><a href="#cb169-20" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span> +<span id="cb169-21"><a href="#cb169-21" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span> +<span id="cb169-22"><a href="#cb169-22" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb169-23"><a href="#cb169-23" aria-hidden="true" tabindex="-1"></a><span class="cf">return</span> strike_through</span></code></pre></div> +<p>Using a text editor, create also a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb170"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb170-1"><a href="#cb170-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb170-2"><a href="#cb170-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soul</span>}</span> +<span id="cb170-3"><a href="#cb170-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[extension = strike-through.lua,</span> +<span id="cb170-4"><a href="#cb170-4" aria-hidden="true" tabindex="-1"></a> debugExtensions]{<span class="ex">markdown</span>}</span> +<span id="cb170-5"><a href="#cb170-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb170-6"><a href="#cb170-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb170-7"><a href="#cb170-7" aria-hidden="true" tabindex="-1"></a>This is //a lunar roving vehicle// strike-through text.</span> +<span id="cb170-8"><a href="#cb170-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb170-9"><a href="#cb170-9" 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="cb171"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb171-1"><a href="#cb171-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 text:</p> <blockquote> -<table> -<thead> -<tr class="header"> -<th>Name</th> -<th>Surname</th> -<th>Born</th> -</tr> -</thead> -<tbody> -<tr class="odd"> -<td>Albert</td> -<td>Einstein</td> -<td>1879</td> -</tr> -<tr class="even"> -<td>Marie</td> -<td>Curie</td> -<td>1867</td> -</tr> -<tr class="odd"> -<td>Thomas</td> -<td>Edison</td> -<td>1847</td> -</tr> -</tbody> -</table> -<p>Table 1: An example table</p> -<div class="sourceCode" id="cb168"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb168-1"><a href="#cb168-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> -<p>This is a <em>transcluded markdown document</em>.</p> +<p>This is <del>a lunar roving vehicle</del> strike-through text.</p> </blockquote> -<h4 data-number="2.2.1.12" id="option-definitionlists"><span class="header-section-number">2.2.1.12</span> Option <code>definitionLists</code></h4> +<p>Furthermore, a JSON document named +<code>document.debug-extensions.json</code> should also be produced and +contain the following text:</p> +<div class="sourceCode" id="cb172"><pre +class="sourceCode json"><code class="sourceCode json"><span id="cb172-1"><a href="#cb172-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span> +<span id="cb172-2"><a href="#cb172-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">"Block"</span><span class="fu">:</span> <span class="ot">[</span></span> +<span id="cb172-3"><a href="#cb172-3" aria-hidden="true" tabindex="-1"></a> <span class="st">"Blockquote"</span><span class="ot">,</span></span> +<span id="cb172-4"><a href="#cb172-4" aria-hidden="true" tabindex="-1"></a> <span class="st">"Verbatim"</span><span class="ot">,</span></span> +<span id="cb172-5"><a href="#cb172-5" aria-hidden="true" tabindex="-1"></a> <span class="st">"HorizontalRule"</span><span class="ot">,</span></span> +<span id="cb172-6"><a href="#cb172-6" aria-hidden="true" tabindex="-1"></a> <span class="st">"BulletList"</span><span class="ot">,</span></span> +<span id="cb172-7"><a href="#cb172-7" aria-hidden="true" tabindex="-1"></a> <span class="st">"OrderedList"</span><span class="ot">,</span></span> +<span id="cb172-8"><a href="#cb172-8" aria-hidden="true" tabindex="-1"></a> <span class="st">"Heading"</span><span class="ot">,</span></span> +<span id="cb172-9"><a href="#cb172-9" aria-hidden="true" tabindex="-1"></a> <span class="st">"DisplayHtml"</span><span class="ot">,</span></span> +<span id="cb172-10"><a href="#cb172-10" aria-hidden="true" tabindex="-1"></a> <span class="st">"Paragraph"</span><span class="ot">,</span></span> +<span id="cb172-11"><a href="#cb172-11" aria-hidden="true" tabindex="-1"></a> <span class="st">"Plain"</span></span> +<span id="cb172-12"><a href="#cb172-12" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span> +<span id="cb172-13"><a href="#cb172-13" aria-hidden="true" tabindex="-1"></a> <span class="dt">"Inline"</span><span class="fu">:</span> <span class="ot">[</span></span> +<span id="cb172-14"><a href="#cb172-14" aria-hidden="true" tabindex="-1"></a> <span class="st">"Str"</span><span class="ot">,</span></span> +<span id="cb172-15"><a href="#cb172-15" aria-hidden="true" tabindex="-1"></a> <span class="st">"Space"</span><span class="ot">,</span></span> +<span id="cb172-16"><a href="#cb172-16" aria-hidden="true" tabindex="-1"></a> <span class="st">"Endline"</span><span class="ot">,</span></span> +<span id="cb172-17"><a href="#cb172-17" aria-hidden="true" tabindex="-1"></a> <span class="st">"UlOrStarLine"</span><span class="ot">,</span></span> +<span id="cb172-18"><a href="#cb172-18" aria-hidden="true" tabindex="-1"></a> <span class="st">"Strong"</span><span class="ot">,</span></span> +<span id="cb172-19"><a href="#cb172-19" aria-hidden="true" tabindex="-1"></a> <span class="st">"Emph"</span><span class="ot">,</span></span> +<span id="cb172-20"><a href="#cb172-20" aria-hidden="true" tabindex="-1"></a> <span class="st">"StrikeThrough (user-defined </span><span class="ch">\"</span><span class="st">./strike-through.lua</span><span class="ch">\"</span><span class="st"> syntax extension)"</span><span class="ot">,</span></span> +<span id="cb172-21"><a href="#cb172-21" aria-hidden="true" tabindex="-1"></a> <span class="st">"Link"</span><span class="ot">,</span></span> +<span id="cb172-22"><a href="#cb172-22" aria-hidden="true" tabindex="-1"></a> <span class="st">"Image"</span><span class="ot">,</span></span> +<span id="cb172-23"><a href="#cb172-23" aria-hidden="true" tabindex="-1"></a> <span class="st">"Code"</span><span class="ot">,</span></span> +<span id="cb172-24"><a href="#cb172-24" aria-hidden="true" tabindex="-1"></a> <span class="st">"AutoLinkUrl"</span><span class="ot">,</span></span> +<span id="cb172-25"><a href="#cb172-25" aria-hidden="true" tabindex="-1"></a> <span class="st">"AutoLinkEmail"</span><span class="ot">,</span></span> +<span id="cb172-26"><a href="#cb172-26" aria-hidden="true" tabindex="-1"></a> <span class="st">"AutoLinkRelativeReference"</span><span class="ot">,</span></span> +<span id="cb172-27"><a href="#cb172-27" aria-hidden="true" tabindex="-1"></a> <span class="st">"InlineHtml"</span><span class="ot">,</span></span> +<span id="cb172-28"><a href="#cb172-28" aria-hidden="true" tabindex="-1"></a> <span class="st">"HtmlEntity"</span><span class="ot">,</span></span> +<span id="cb172-29"><a href="#cb172-29" aria-hidden="true" tabindex="-1"></a> <span class="st">"EscapedChar"</span><span class="ot">,</span></span> +<span id="cb172-30"><a href="#cb172-30" aria-hidden="true" tabindex="-1"></a> <span class="st">"Smart"</span><span class="ot">,</span></span> +<span id="cb172-31"><a href="#cb172-31" aria-hidden="true" tabindex="-1"></a> <span class="st">"Symbol"</span></span> +<span id="cb172-32"><a href="#cb172-32" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span></span> +<span id="cb172-33"><a href="#cb172-33" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div> +<p>This output shows us that our user-defined syntax extension has been +correctly inserted to the grammar of markdown.</p> +<h4 data-number="2.2.1.14" id="option-definitionlists"><span +class="header-section-number">2.2.1.14</span> Option +<code>definitionLists</code></h4> +<dl> +<dt><code>definitionLists</code> (default value: +<code>false</code>)</dt> +<dd> <dl> -<dt><code>definitionLists</code> (default value: <code>false</code>)</dt> -<dd><dl> <dt>true</dt> -<dd><p>Enable the pandoc definition list syntax extension:</p> -<div class="sourceCode" id="cb169"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb169-1"><a href="#cb169-1" aria-hidden="true"></a>Term 1</span> -<span id="cb169-2"><a href="#cb169-2" aria-hidden="true"></a></span> -<span id="cb169-3"><a href="#cb169-3" aria-hidden="true"></a>: Definition 1</span> -<span id="cb169-4"><a href="#cb169-4" aria-hidden="true"></a></span> -<span id="cb169-5"><a href="#cb169-5" aria-hidden="true"></a>Term 2 with *inline markup*</span> -<span id="cb169-6"><a href="#cb169-6" aria-hidden="true"></a></span> -<span id="cb169-7"><a href="#cb169-7" aria-hidden="true"></a>: Definition 2</span> -<span id="cb169-8"><a href="#cb169-8" aria-hidden="true"></a></span> -<span id="cb169-9"><a href="#cb169-9" aria-hidden="true"></a><span class="in"> { some code, part of Definition 2 }</span></span> -<span id="cb169-10"><a href="#cb169-10" aria-hidden="true"></a></span> -<span id="cb169-11"><a href="#cb169-11" aria-hidden="true"></a><span class="in"> Third paragraph of definition 2.</span></span></code></pre></div> +<dd> +<p>Enable the pandoc definition list syntax extension:</p> +<div class="sourceCode" id="cb173"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb173-1"><a href="#cb173-1" aria-hidden="true" tabindex="-1"></a>Term 1</span> +<span id="cb173-2"><a href="#cb173-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb173-3"><a href="#cb173-3" aria-hidden="true" tabindex="-1"></a>: Definition 1</span> +<span id="cb173-4"><a href="#cb173-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb173-5"><a href="#cb173-5" aria-hidden="true" tabindex="-1"></a>Term 2 with *inline markup*</span> +<span id="cb173-6"><a href="#cb173-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb173-7"><a href="#cb173-7" aria-hidden="true" tabindex="-1"></a>: Definition 2</span> +<span id="cb173-8"><a href="#cb173-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb173-9"><a href="#cb173-9" aria-hidden="true" tabindex="-1"></a><span class="in"> { some code, part of Definition 2 }</span></span> +<span id="cb173-10"><a href="#cb173-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb173-11"><a href="#cb173-11" aria-hidden="true" tabindex="-1"></a><span class="in"> Third paragraph of definition 2.</span></span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the pandoc definition list syntax extension.</p> +<dd> +<p>Disable the pandoc definition list syntax extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-11"><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="cb170"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb170-1"><a href="#cb170-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb170-2"><a href="#cb170-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[definitionLists]{<span class="ex">markdown</span>}</span> -<span id="cb170-3"><a href="#cb170-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb170-4"><a href="#cb170-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb170-5"><a href="#cb170-5" aria-hidden="true"></a>Term 1</span> -<span id="cb170-6"><a href="#cb170-6" aria-hidden="true"></a></span> -<span id="cb170-7"><a href="#cb170-7" aria-hidden="true"></a>: Definition 1</span> -<span id="cb170-8"><a href="#cb170-8" aria-hidden="true"></a></span> -<span id="cb170-9"><a href="#cb170-9" aria-hidden="true"></a>Term 2 with *inline markup*</span> -<span id="cb170-10"><a href="#cb170-10" aria-hidden="true"></a></span> -<span id="cb170-11"><a href="#cb170-11" aria-hidden="true"></a>: Definition 2</span> -<span id="cb170-12"><a href="#cb170-12" aria-hidden="true"></a></span> -<span id="cb170-13"><a href="#cb170-13" aria-hidden="true"></a> { some code, part of Definition 2 }</span> -<span id="cb170-14"><a href="#cb170-14" aria-hidden="true"></a></span> -<span id="cb170-15"><a href="#cb170-15" aria-hidden="true"></a> Third paragraph of definition 2.</span> -<span id="cb170-16"><a href="#cb170-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb170-17"><a href="#cb170-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb171"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb171-1"><a href="#cb171-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-12"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb174"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb174-1"><a href="#cb174-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb174-2"><a href="#cb174-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[definitionLists]{<span class="ex">markdown</span>}</span> +<span id="cb174-3"><a href="#cb174-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb174-4"><a href="#cb174-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb174-5"><a href="#cb174-5" aria-hidden="true" tabindex="-1"></a>Term 1</span> +<span id="cb174-6"><a href="#cb174-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb174-7"><a href="#cb174-7" aria-hidden="true" tabindex="-1"></a>: Definition 1</span> +<span id="cb174-8"><a href="#cb174-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb174-9"><a href="#cb174-9" aria-hidden="true" tabindex="-1"></a>Term 2 with *inline markup*</span> +<span id="cb174-10"><a href="#cb174-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb174-11"><a href="#cb174-11" aria-hidden="true" tabindex="-1"></a>: Definition 2</span> +<span id="cb174-12"><a href="#cb174-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb174-13"><a href="#cb174-13" aria-hidden="true" tabindex="-1"></a> { some code, part of Definition 2 }</span> +<span id="cb174-14"><a href="#cb174-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb174-15"><a href="#cb174-15" aria-hidden="true" tabindex="-1"></a> Third paragraph of definition 2.</span> +<span id="cb174-16"><a href="#cb174-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb174-17"><a href="#cb174-17" 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="cb175"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb175-1"><a href="#cb175-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 text:</p> <blockquote> <dl> <dt>Term 1</dt> -<dd><p>Definition 1</p> +<dd> +<p>Definition 1</p> </dd> <dt>Term 2 with <em>inline markup</em></dt> -<dd><p>Definition 2</p> +<dd> +<p>Definition 2</p> <pre><code>{ some code, part of Definition 2 }</code></pre> <p>Third paragraph of definition 2.</p> </dd> </dl> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-9">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb173"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb173-1"><a href="#cb173-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb173-2"><a href="#cb173-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[definitionLists = yes]</span> -<span id="cb173-3"><a href="#cb173-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb173-4"><a href="#cb173-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb173-5"><a href="#cb173-5" aria-hidden="true"></a>Term 1</span> -<span id="cb173-6"><a href="#cb173-6" aria-hidden="true"></a></span> -<span id="cb173-7"><a href="#cb173-7" aria-hidden="true"></a>: Definition 1</span> -<span id="cb173-8"><a href="#cb173-8" aria-hidden="true"></a></span> -<span id="cb173-9"><a href="#cb173-9" aria-hidden="true"></a>Term 2 with *inline markup*</span> -<span id="cb173-10"><a href="#cb173-10" aria-hidden="true"></a></span> -<span id="cb173-11"><a href="#cb173-11" aria-hidden="true"></a>: Definition 2</span> -<span id="cb173-12"><a href="#cb173-12" aria-hidden="true"></a></span> -<span id="cb173-13"><a href="#cb173-13" aria-hidden="true"></a> { some code, part of Definition 2 }</span> -<span id="cb173-14"><a href="#cb173-14" aria-hidden="true"></a></span> -<span id="cb173-15"><a href="#cb173-15" aria-hidden="true"></a> Third paragraph of definition 2.</span> -<span id="cb173-16"><a href="#cb173-16" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb173-17"><a href="#cb173-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb174"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb174-1"><a href="#cb174-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-9">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb177"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb177-1"><a href="#cb177-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb177-2"><a href="#cb177-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[definitionLists = yes]</span> +<span id="cb177-3"><a href="#cb177-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb177-4"><a href="#cb177-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb177-5"><a href="#cb177-5" aria-hidden="true" tabindex="-1"></a>Term 1</span> +<span id="cb177-6"><a href="#cb177-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb177-7"><a href="#cb177-7" aria-hidden="true" tabindex="-1"></a>: Definition 1</span> +<span id="cb177-8"><a href="#cb177-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb177-9"><a href="#cb177-9" aria-hidden="true" tabindex="-1"></a>Term 2 with *inline markup*</span> +<span id="cb177-10"><a href="#cb177-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb177-11"><a href="#cb177-11" aria-hidden="true" tabindex="-1"></a>: Definition 2</span> +<span id="cb177-12"><a href="#cb177-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb177-13"><a href="#cb177-13" aria-hidden="true" tabindex="-1"></a> { some code, part of Definition 2 }</span> +<span id="cb177-14"><a href="#cb177-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb177-15"><a href="#cb177-15" aria-hidden="true" tabindex="-1"></a> Third paragraph of definition 2.</span> +<span id="cb177-16"><a href="#cb177-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb177-17"><a href="#cb177-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb178"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb178-1"><a href="#cb178-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <dl> <dt>Term 1</dt> -<dd><p>Definition 1</p> +<dd> +<p>Definition 1</p> </dd> <dt>Term 2 with <em>inline markup</em></dt> -<dd><p>Definition 2</p> +<dd> +<p>Definition 2</p> <pre><code>{ some code, part of Definition 2 }</code></pre> <p>Third paragraph of definition 2.</p> </dd> </dl> </blockquote> -<h4 data-number="2.2.1.13" id="option-eagercache"><span class="header-section-number">2.2.1.13</span> Option <code>eagerCache</code></h4> +<h4 data-number="2.2.1.15" id="option-eagercache"><span +class="header-section-number">2.2.1.15</span> Option +<code>eagerCache</code></h4> <dl> <dt><code>eagerCache</code> (default value: <code>true</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Converted markdown documents will be cached in <strong><code>cacheDir</code></strong>. This can be useful for post-processing the converted documents and for recovering historical versions of the documents from the cache. However, it also produces a large number of auxiliary files on the disk and obscures the output of the Lua command-line interface when it is used for plumbing.</p> -<p>This behavior will always be used if the <strong><code>finalizeCache</code></strong> option is enabled.</p> +<dd> +<p>Converted markdown documents will be cached in +<strong><code>cacheDir</code></strong>. This can be useful for +post-processing the converted documents and for recovering historical +versions of the documents from the cache. However, it also produces a +large number of auxiliary files on the disk and obscures the output of +the Lua command-line interface when it is used for plumbing.</p> +<p>This behavior will always be used if the +<strong><code>finalizeCache</code></strong> option is enabled.</p> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Converted markdown documents will not be cached. This decreases the number of auxiliary files that we produce and makes it easier to use the Lua command-line interface for plumbing.</p> -<p>This behavior will only be used when the <strong><code>finalizeCache</code></strong> option is disabled. Recursive nesting of markdown document fragments is undefined behavior when <strong><code>eagerCache</code></strong> is disabled.</p> +<dd> +<p>Converted markdown documents will not be cached. This decreases the +number of auxiliary files that we produce and makes it easier to use the +Lua command-line interface for plumbing.</p> +<p>This behavior will only be used when the +<strong><code>finalizeCache</code></strong> option is disabled. +Recursive nesting of markdown document fragments is undefined behavior +when <strong><code>eagerCache</code></strong> is disabled.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-7">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>hello.md</code> with the following content:</p> -<div class="sourceCode" id="cb176"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb176-1"><a href="#cb176-1" aria-hidden="true"></a>Hello *world*!</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal with the <strong><code>eagerCache</code></strong> option disabled:</p> -<div class="sourceCode" id="cb177"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb177-1"><a href="#cb177-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ eagerCache=false -- hello.md hello.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A <span class="tex">T<sub>e</sub>X</span> document named <code>hello.tex</code> should be produced and contain the following code:</p> -<div class="sourceCode" id="cb178"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb178-1"><a href="#cb178-1" aria-hidden="true"></a>Hello <span class="fu">\markdownRendererEmphasis</span>{world}!<span class="fu">\relax</span></span></code></pre></div> +<h5 class="unnumbered" id="lua-module-example-7">Lua Module Example</h5> +<p>Using a text editor, create a text document named +<code>hello.md</code> with the following content:</p> +<div class="sourceCode" id="cb180"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb180-1"><a href="#cb180-1" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal with the +<strong><code>eagerCache</code></strong> option disabled:</p> +<div class="sourceCode" id="cb181"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb181-1"><a href="#cb181-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ eagerCache=false <span class="at">--</span> hello.md hello.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A <span class="tex">T<sub>e</sub>X</span> document named +<code>hello.tex</code> should be produced and contain the following +code:</p> +<div class="sourceCode" id="cb182"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb182-1"><a href="#cb182-1" aria-hidden="true" tabindex="-1"></a>Hello <span class="fu">\markdownRendererEmphasis</span>{world}!<span class="fu">\relax</span></span></code></pre></div> <hr /> -<p>Invoke LuaTeX from the terminal again, this time with the <strong><code>eagerCache</code></strong> option enabled:</p> -<div class="sourceCode" id="cb179"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb179-1"><a href="#cb179-1" aria-hidden="true"></a>texlua ⟨CLI pathname⟩ eagerCache=true -- hello.md hello.tex</span></code></pre></div> -<p>A <span class="tex">T<sub>e</sub>X</span> document named <code>hello.tex</code> should be produced and contain the following code:</p> -<div class="sourceCode" id="cb180"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb180-1"><a href="#cb180-1" aria-hidden="true"></a><span class="fu">\input</span> ./⟨hash⟩.md.tex<span class="fu">\relax</span></span></code></pre></div> -<p>Additionally, a <span class="tex">T<sub>e</sub>X</span> document named <code>⟨hash⟩.md.tex</code> should be produced and contain the following code:</p> -<div class="sourceCode" id="cb181"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb181-1"><a href="#cb181-1" aria-hidden="true"></a>Hello <span class="fu">\markdownRendererEmphasis</span>{world}!<span class="fu">\relax</span></span></code></pre></div> -<h4 data-number="2.2.1.14" id="option-extensions"><span class="header-section-number">2.2.1.14</span> Option <code>extensions</code></h4> +<p>Invoke LuaTeX from the terminal again, this time with the +<strong><code>eagerCache</code></strong> option enabled:</p> +<div class="sourceCode" id="cb183"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb183-1"><a href="#cb183-1" aria-hidden="true" tabindex="-1"></a>texlua ⟨CLI pathname⟩ eagerCache=true -- hello.md hello.tex</span></code></pre></div> +<p>A <span class="tex">T<sub>e</sub>X</span> document named +<code>hello.tex</code> should be produced and contain the following +code:</p> +<div class="sourceCode" id="cb184"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb184-1"><a href="#cb184-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> ./⟨hash⟩.md.tex<span class="fu">\relax</span></span></code></pre></div> +<p>Additionally, a <span class="tex">T<sub>e</sub>X</span> document +named <code>⟨hash⟩.md.tex</code> should be produced and contain the +following code:</p> +<div class="sourceCode" id="cb185"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb185-1"><a href="#cb185-1" aria-hidden="true" tabindex="-1"></a>Hello <span class="fu">\markdownRendererEmphasis</span>{world}!<span class="fu">\relax</span></span></code></pre></div> +<h4 data-number="2.2.1.16" id="option-extensions"><span +class="header-section-number">2.2.1.16</span> Option +<code>extensions</code></h4> <dl> <dt><code>extensions</code> (default value: <code>{}</code>)</dt> -<dd><p>The filenames of user-defined syntax extensions that will be applied to the markdown reader. If the <strong><code>kpathsea</code></strong> library is available, files will be searched for not only in the current working directory but also in the <span class="tex">T<sub>e</sub>X</span> directory structure.</p> +<dd> +<p>The filenames of user-defined syntax extensions that will be applied +to the markdown reader. If the <strong><code>kpathsea</code></strong> +library is available, files will be searched for not only in the current +working directory but also in the <span +class="tex">T<sub>e</sub>X</span> directory structure.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-12"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>strike-through.lua</code> with the following content:</p> -<div class="sourceCode" id="cb182"><pre class="sourceCode lua"><code class="sourceCode lua"><span id="cb182-1"><a href="#cb182-1" aria-hidden="true"></a><span class="kw">local</span> strike_through <span class="op">=</span> <span class="op">{</span></span> -<span id="cb182-2"><a href="#cb182-2" aria-hidden="true"></a> api_version <span class="op">=</span> <span class="dv">1</span><span class="op">,</span></span> -<span id="cb182-3"><a href="#cb182-3" aria-hidden="true"></a> grammar_version <span class="op">=</span> <span class="dv">1</span><span class="op">,</span></span> -<span id="cb182-4"><a href="#cb182-4" aria-hidden="true"></a> finalize_grammar <span class="op">=</span> <span class="kw">function</span><span class="op">(</span>reader<span class="op">)</span></span> -<span id="cb182-5"><a href="#cb182-5" aria-hidden="true"></a> <span class="kw">local</span> nonspacechar <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="dv">1</span><span class="op">)</span> <span class="op">-</span> lpeg<span class="op">.</span>S<span class="op">(</span><span class="st">"</span><span class="sc">\t</span><span class="st"> "</span><span class="op">)</span></span> -<span id="cb182-6"><a href="#cb182-6" aria-hidden="true"></a> <span class="kw">local</span> doubleslashes <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="st">"//"</span><span class="op">)</span></span> -<span id="cb182-7"><a href="#cb182-7" aria-hidden="true"></a> <span class="kw">local</span> <span class="kw">function</span> between<span class="op">(</span>p<span class="op">,</span> starter<span class="op">,</span> ender<span class="op">)</span></span> -<span id="cb182-8"><a href="#cb182-8" aria-hidden="true"></a> ender <span class="op">=</span> lpeg<span class="op">.</span>B<span class="op">(</span>nonspacechar<span class="op">)</span> <span class="op">*</span> ender</span> -<span id="cb182-9"><a href="#cb182-9" aria-hidden="true"></a> <span class="cf">return</span> <span class="op">(</span>starter <span class="op">*</span> <span class="op">#</span>nonspacechar</span> -<span id="cb182-10"><a href="#cb182-10" aria-hidden="true"></a> <span class="op">*</span> lpeg<span class="op">.</span>Ct<span class="op">(</span>p <span class="op">*</span> <span class="op">(</span>p <span class="op">-</span> ender<span class="op">)^</span><span class="dv">0</span><span class="op">)</span> <span class="op">*</span> ender<span class="op">)</span></span> -<span id="cb182-11"><a href="#cb182-11" aria-hidden="true"></a> <span class="kw">end</span></span> -<span id="cb182-12"><a href="#cb182-12" aria-hidden="true"></a></span> -<span id="cb182-13"><a href="#cb182-13" aria-hidden="true"></a> <span class="kw">local</span> read_strike_through <span class="op">=</span> between<span class="op">(</span></span> -<span id="cb182-14"><a href="#cb182-14" aria-hidden="true"></a> lpeg<span class="op">.</span>V<span class="op">(</span><span class="st">"Inline"</span><span class="op">),</span> doubletildes<span class="op">,</span> doubletildes</span> -<span id="cb182-15"><a href="#cb182-15" aria-hidden="true"></a> <span class="op">)</span> <span class="op">/</span> <span class="kw">function</span><span class="op">(</span>s<span class="op">)</span> <span class="cf">return</span> <span class="op">{</span><span class="st">"</span><span class="sc">\\</span><span class="st">st{"</span><span class="op">,</span> s<span class="op">,</span> <span class="st">"}"</span><span class="op">}</span> <span class="kw">end</span></span> -<span id="cb182-16"><a href="#cb182-16" aria-hidden="true"></a></span> -<span id="cb182-17"><a href="#cb182-17" aria-hidden="true"></a> reader<span class="op">.</span>insert_pattern<span class="op">(</span><span class="st">"Inline after Emph"</span><span class="op">,</span> read_strike_through<span class="op">)</span></span> -<span id="cb182-18"><a href="#cb182-18" aria-hidden="true"></a> reader<span class="op">.</span>add_special_character<span class="op">(</span><span class="st">"/"</span><span class="op">)</span></span> -<span id="cb182-19"><a href="#cb182-19" aria-hidden="true"></a> <span class="kw">end</span></span> -<span id="cb182-20"><a href="#cb182-20" aria-hidden="true"></a><span class="op">}</span></span></code></pre></div> -<p>Using a text editor, create also a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb183"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb183-1"><a href="#cb183-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb183-2"><a href="#cb183-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">soul</span>}</span> -<span id="cb183-3"><a href="#cb183-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[extension = strike-through.lua]{<span class="ex">markdown</span>}</span> -<span id="cb183-4"><a href="#cb183-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb183-5"><a href="#cb183-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb183-6"><a href="#cb183-6" aria-hidden="true"></a>This is //a lunar roving vehicle// strike-through text.</span> -<span id="cb183-7"><a href="#cb183-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb183-8"><a href="#cb183-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb184"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb184-1"><a href="#cb184-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-13"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>strike-through.lua</code> with the following content:</p> +<div class="sourceCode" id="cb186"><pre +class="sourceCode lua"><code class="sourceCode lua"><span id="cb186-1"><a href="#cb186-1" aria-hidden="true" tabindex="-1"></a><span class="kw">local</span> strike_through <span class="op">=</span> <span class="op">{</span></span> +<span id="cb186-2"><a href="#cb186-2" aria-hidden="true" tabindex="-1"></a> api_version <span class="op">=</span> <span class="dv">2</span><span class="op">,</span></span> +<span id="cb186-3"><a href="#cb186-3" aria-hidden="true" tabindex="-1"></a> grammar_version <span class="op">=</span> <span class="dv">1</span><span class="op">,</span></span> +<span id="cb186-4"><a href="#cb186-4" aria-hidden="true" tabindex="-1"></a> finalize_grammar <span class="op">=</span> <span class="kw">function</span><span class="op">(</span>reader<span class="op">)</span></span> +<span id="cb186-5"><a href="#cb186-5" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> nonspacechar <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="dv">1</span><span class="op">)</span> <span class="op">-</span> lpeg<span class="op">.</span>S<span class="op">(</span><span class="st">"</span><span class="sc">\t</span><span class="st"> "</span><span class="op">)</span></span> +<span id="cb186-6"><a href="#cb186-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> doubleslashes <span class="op">=</span> lpeg<span class="op">.</span>P<span class="op">(</span><span class="st">"//"</span><span class="op">)</span></span> +<span id="cb186-7"><a href="#cb186-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> <span class="kw">function</span> between<span class="op">(</span>p<span class="op">,</span> starter<span class="op">,</span> ender<span class="op">)</span></span> +<span id="cb186-8"><a href="#cb186-8" aria-hidden="true" tabindex="-1"></a> ender <span class="op">=</span> lpeg<span class="op">.</span>B<span class="op">(</span>nonspacechar<span class="op">)</span> <span class="op">*</span> ender</span> +<span id="cb186-9"><a href="#cb186-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="op">(</span>starter <span class="op">*</span> <span class="op">#</span>nonspacechar</span> +<span id="cb186-10"><a href="#cb186-10" aria-hidden="true" tabindex="-1"></a> <span class="op">*</span> lpeg<span class="op">.</span>Ct<span class="op">(</span>p <span class="op">*</span> <span class="op">(</span>p <span class="op">-</span> ender<span class="op">)^</span><span class="dv">0</span><span class="op">)</span> <span class="op">*</span> ender<span class="op">)</span></span> +<span id="cb186-11"><a href="#cb186-11" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span> +<span id="cb186-12"><a href="#cb186-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb186-13"><a href="#cb186-13" aria-hidden="true" tabindex="-1"></a> <span class="kw">local</span> read_strike_through <span class="op">=</span> between<span class="op">(</span></span> +<span id="cb186-14"><a href="#cb186-14" aria-hidden="true" tabindex="-1"></a> lpeg<span class="op">.</span>V<span class="op">(</span><span class="st">"Inline"</span><span class="op">),</span> doubleslashes<span class="op">,</span> doubleslashes</span> +<span id="cb186-15"><a href="#cb186-15" aria-hidden="true" tabindex="-1"></a> <span class="op">)</span> <span class="op">/</span> <span class="kw">function</span><span class="op">(</span>s<span class="op">)</span> <span class="cf">return</span> <span class="op">{</span><span class="st">"</span><span class="sc">\\</span><span class="st">st{"</span><span class="op">,</span> s<span class="op">,</span> <span class="st">"}"</span><span class="op">}</span> <span class="kw">end</span></span> +<span id="cb186-16"><a href="#cb186-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb186-17"><a href="#cb186-17" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>insert_pattern<span class="op">(</span><span class="st">"Inline after Emph"</span><span class="op">,</span> read_strike_through<span class="op">,</span></span> +<span id="cb186-18"><a href="#cb186-18" aria-hidden="true" tabindex="-1"></a> <span class="st">"StrikeThrough"</span><span class="op">)</span></span> +<span id="cb186-19"><a href="#cb186-19" aria-hidden="true" tabindex="-1"></a> reader<span class="op">.</span>add_special_character<span class="op">(</span><span class="st">"/"</span><span class="op">)</span></span> +<span id="cb186-20"><a href="#cb186-20" aria-hidden="true" tabindex="-1"></a> <span class="kw">end</span></span> +<span id="cb186-21"><a href="#cb186-21" aria-hidden="true" tabindex="-1"></a><span class="op">}</span></span> +<span id="cb186-22"><a href="#cb186-22" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb186-23"><a href="#cb186-23" aria-hidden="true" tabindex="-1"></a><span class="cf">return</span> strike_through</span></code></pre></div> +<p>Using a text editor, create also a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb187"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb187-1"><a href="#cb187-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb187-2"><a href="#cb187-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soul</span>}</span> +<span id="cb187-3"><a href="#cb187-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[extension = strike-through.lua]{<span class="ex">markdown</span>}</span> +<span id="cb187-4"><a href="#cb187-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb187-5"><a href="#cb187-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb187-6"><a href="#cb187-6" aria-hidden="true" tabindex="-1"></a>This is //a lunar roving vehicle// strike-through text.</span> +<span id="cb187-7"><a href="#cb187-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb187-8"><a href="#cb187-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="cb188"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb188-1"><a href="#cb188-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 text:</p> <blockquote> <p>This is <del>a lunar roving vehicle</del> strike-through text.</p> </blockquote> -<h4 data-number="2.2.1.15" id="option-expectjekylldata"><span class="header-section-number">2.2.1.15</span> Option <code>expectJekyllData</code></h4> +<h4 data-number="2.2.1.17" id="option-expectjekylldata"><span +class="header-section-number">2.2.1.17</span> Option +<code>expectJekyllData</code></h4> +<dl> +<dt><code>expectJekyllData</code> (default value: +<code>false</code>)</dt> +<dd> <dl> -<dt><code>expectJekyllData</code> (default value: <code>false</code>)</dt> -<dd><dl> <dt>false</dt> -<dd><p>When the <strong><code>jekyllData</code></strong> option is enabled, then a markdown document may begin with <abbr>yaml</abbr> metadata if and only if the metadata begin with the end-of-directives marker (<code>---</code>) and they end with either the end-of-directives or the end-of-document marker (<code>...</code>):</p> -<div class="sourceCode" id="cb185"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb185-1"><a href="#cb185-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb185-2"><a href="#cb185-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> -<span id="cb185-3"><a href="#cb185-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb185-4"><a href="#cb185-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb185-5"><a href="#cb185-5" aria-hidden="true"></a>---</span> -<span id="cb185-6"><a href="#cb185-6" aria-hidden="true"></a>- this</span> -<span id="cb185-7"><a href="#cb185-7" aria-hidden="true"></a>- is</span> -<span id="cb185-8"><a href="#cb185-8" aria-hidden="true"></a>- YAML</span> -<span id="cb185-9"><a href="#cb185-9" aria-hidden="true"></a>...</span> -<span id="cb185-10"><a href="#cb185-10" aria-hidden="true"></a>- followed</span> -<span id="cb185-11"><a href="#cb185-11" aria-hidden="true"></a>- by</span> -<span id="cb185-12"><a href="#cb185-12" aria-hidden="true"></a>- Markdown</span> -<span id="cb185-13"><a href="#cb185-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb185-14"><a href="#cb185-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb185-15"><a href="#cb185-15" aria-hidden="true"></a>- this</span> -<span id="cb185-16"><a href="#cb185-16" aria-hidden="true"></a>- is</span> -<span id="cb185-17"><a href="#cb185-17" aria-hidden="true"></a>- Markdown</span> -<span id="cb185-18"><a href="#cb185-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb185-19"><a href="#cb185-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<dd> +<p>When the <strong><code>jekyllData</code></strong> option is enabled, +then a markdown document may begin with <abbr>yaml</abbr> metadata if +and only if the metadata begin with the end-of-directives marker +(<code>---</code>) and they end with either the end-of-directives or the +end-of-document marker (<code>...</code>):</p> +<div class="sourceCode" id="cb189"><pre +class="sourceCode latex"><code class="sourceCode latex"><span id="cb189-1"><a href="#cb189-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb189-2"><a href="#cb189-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb189-3"><a href="#cb189-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb189-4"><a href="#cb189-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb189-5"><a href="#cb189-5" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb189-6"><a href="#cb189-6" aria-hidden="true" tabindex="-1"></a>- this</span> +<span id="cb189-7"><a href="#cb189-7" aria-hidden="true" tabindex="-1"></a>- is</span> +<span id="cb189-8"><a href="#cb189-8" aria-hidden="true" tabindex="-1"></a>- YAML</span> +<span id="cb189-9"><a href="#cb189-9" aria-hidden="true" tabindex="-1"></a>...</span> +<span id="cb189-10"><a href="#cb189-10" aria-hidden="true" tabindex="-1"></a>- followed</span> +<span id="cb189-11"><a href="#cb189-11" aria-hidden="true" tabindex="-1"></a>- by</span> +<span id="cb189-12"><a href="#cb189-12" aria-hidden="true" tabindex="-1"></a>- Markdown</span> +<span id="cb189-13"><a href="#cb189-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb189-14"><a href="#cb189-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb189-15"><a href="#cb189-15" aria-hidden="true" tabindex="-1"></a>- this</span> +<span id="cb189-16"><a href="#cb189-16" aria-hidden="true" tabindex="-1"></a>- is</span> +<span id="cb189-17"><a href="#cb189-17" aria-hidden="true" tabindex="-1"></a>- Markdown</span> +<span id="cb189-18"><a href="#cb189-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb189-19"><a href="#cb189-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>When the <strong><code>jekyllData</code></strong> option is enabled, then a markdown document may begin directly with <abbr>yaml</abbr> metadata and may contain nothing but <abbr>yaml</abbr> metadata.</p> -<div class="sourceCode" id="cb186"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb186-1"><a href="#cb186-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb186-2"><a href="#cb186-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData, expectJekyllData]{<span class="ex">markdown</span>}</span> -<span id="cb186-3"><a href="#cb186-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb186-4"><a href="#cb186-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb186-5"><a href="#cb186-5" aria-hidden="true"></a>- this</span> -<span id="cb186-6"><a href="#cb186-6" aria-hidden="true"></a>- is</span> -<span id="cb186-7"><a href="#cb186-7" aria-hidden="true"></a>- YAML</span> -<span id="cb186-8"><a href="#cb186-8" aria-hidden="true"></a>...</span> -<span id="cb186-9"><a href="#cb186-9" aria-hidden="true"></a>- followed</span> -<span id="cb186-10"><a href="#cb186-10" aria-hidden="true"></a>- by</span> -<span id="cb186-11"><a href="#cb186-11" aria-hidden="true"></a>- Markdown</span> -<span id="cb186-12"><a href="#cb186-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb186-13"><a href="#cb186-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb186-14"><a href="#cb186-14" aria-hidden="true"></a>- this</span> -<span id="cb186-15"><a href="#cb186-15" aria-hidden="true"></a>- is</span> -<span id="cb186-16"><a href="#cb186-16" aria-hidden="true"></a>- YAML</span> -<span id="cb186-17"><a href="#cb186-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb186-18"><a href="#cb186-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<dd> +<p>When the <strong><code>jekyllData</code></strong> option is enabled, +then a markdown document may begin directly with <abbr>yaml</abbr> +metadata and may contain nothing but <abbr>yaml</abbr> metadata.</p> +<div class="sourceCode" id="cb190"><pre +class="sourceCode latex"><code class="sourceCode latex"><span id="cb190-1"><a href="#cb190-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb190-2"><a href="#cb190-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData, expectJekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb190-3"><a href="#cb190-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb190-4"><a href="#cb190-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb190-5"><a href="#cb190-5" aria-hidden="true" tabindex="-1"></a>- this</span> +<span id="cb190-6"><a href="#cb190-6" aria-hidden="true" tabindex="-1"></a>- is</span> +<span id="cb190-7"><a href="#cb190-7" aria-hidden="true" tabindex="-1"></a>- YAML</span> +<span id="cb190-8"><a href="#cb190-8" aria-hidden="true" tabindex="-1"></a>...</span> +<span id="cb190-9"><a href="#cb190-9" aria-hidden="true" tabindex="-1"></a>- followed</span> +<span id="cb190-10"><a href="#cb190-10" aria-hidden="true" tabindex="-1"></a>- by</span> +<span id="cb190-11"><a href="#cb190-11" aria-hidden="true" tabindex="-1"></a>- Markdown</span> +<span id="cb190-12"><a href="#cb190-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb190-13"><a href="#cb190-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb190-14"><a href="#cb190-14" aria-hidden="true" tabindex="-1"></a>- this</span> +<span id="cb190-15"><a href="#cb190-15" aria-hidden="true" tabindex="-1"></a>- is</span> +<span id="cb190-16"><a href="#cb190-16" aria-hidden="true" tabindex="-1"></a>- YAML</span> +<span id="cb190-17"><a href="#cb190-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb190-18"><a href="#cb190-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-13"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>jane-doe.yml</code> with the following content:</p> -<div class="sourceCode" id="cb187"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb187-1"><a href="#cb187-1" aria-hidden="true"></a><span class="fu">name</span><span class="kw">:</span><span class="at"> Jane Doe</span></span> -<span id="cb187-2"><a href="#cb187-2" aria-hidden="true"></a><span class="fu">age</span><span class="kw">:</span><span class="at"> </span><span class="dv">99</span></span></code></pre></div> -<p>Using a text editor, create also a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb188"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb188-1"><a href="#cb188-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb188-2"><a href="#cb188-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> -<span id="cb188-3"><a href="#cb188-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb188-4"><a href="#cb188-4" aria-hidden="true"></a> jekyllDataRenderers = {</span> -<span id="cb188-5"><a href="#cb188-5" aria-hidden="true"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span> -<span id="cb188-6"><a href="#cb188-6" aria-hidden="true"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span> -<span id="cb188-7"><a href="#cb188-7" aria-hidden="true"></a> },</span> -<span id="cb188-8"><a href="#cb188-8" aria-hidden="true"></a> renderers = {</span> -<span id="cb188-9"><a href="#cb188-9" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> -<span id="cb188-10"><a href="#cb188-10" aria-hidden="true"></a> }</span> -<span id="cb188-11"><a href="#cb188-11" aria-hidden="true"></a>}</span> -<span id="cb188-12"><a href="#cb188-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb188-13"><a href="#cb188-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>[expectJekyllData]{jane-doe.yml}</span> -<span id="cb188-14"><a href="#cb188-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb189"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb189-1"><a href="#cb189-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-14"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>jane-doe.yml</code> with the following content:</p> +<div class="sourceCode" id="cb191"><pre +class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb191-1"><a href="#cb191-1" aria-hidden="true" tabindex="-1"></a><span class="fu">name</span><span class="kw">:</span><span class="at"> Jane Doe</span></span> +<span id="cb191-2"><a href="#cb191-2" aria-hidden="true" tabindex="-1"></a><span class="fu">age</span><span class="kw">:</span><span class="at"> </span><span class="dv">99</span></span></code></pre></div> +<p>Using a text editor, create also a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb192"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb192-1"><a href="#cb192-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb192-2"><a href="#cb192-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb192-3"><a href="#cb192-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb192-4"><a href="#cb192-4" aria-hidden="true" tabindex="-1"></a> jekyllDataRenderers = {</span> +<span id="cb192-5"><a href="#cb192-5" aria-hidden="true" tabindex="-1"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span> +<span id="cb192-6"><a href="#cb192-6" aria-hidden="true" tabindex="-1"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span> +<span id="cb192-7"><a href="#cb192-7" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb192-8"><a href="#cb192-8" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb192-9"><a href="#cb192-9" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> +<span id="cb192-10"><a href="#cb192-10" aria-hidden="true" tabindex="-1"></a> }</span> +<span id="cb192-11"><a href="#cb192-11" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb192-12"><a href="#cb192-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb192-13"><a href="#cb192-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[expectJekyllData]{jane-doe.yml}</span> +<span id="cb192-14"><a href="#cb192-14" 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="cb193"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb193-1"><a href="#cb193-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 text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h4 data-number="2.2.1.16" id="option-fancylists"><span class="header-section-number">2.2.1.16</span> Option <code>fancyLists</code></h4> +<h4 data-number="2.2.1.18" id="option-fancylists"><span +class="header-section-number">2.2.1.18</span> Option +<code>fancyLists</code></h4> <dl> <dt><code>fancyLists</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the Pandoc fancy list extension:</p> -<div class="sourceCode" id="cb190"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb190-1"><a href="#cb190-1" aria-hidden="true"></a>a) first item</span> -<span id="cb190-2"><a href="#cb190-2" aria-hidden="true"></a>b) second item</span> -<span id="cb190-3"><a href="#cb190-3" aria-hidden="true"></a>c) third item</span></code></pre></div> +<dd> +<p>Enable the Pandoc fancy list extension:</p> +<div class="sourceCode" id="cb194"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb194-1"><a href="#cb194-1" aria-hidden="true" tabindex="-1"></a>a) first item</span> +<span id="cb194-2"><a href="#cb194-2" aria-hidden="true" tabindex="-1"></a>b) second item</span> +<span id="cb194-3"><a href="#cb194-3" aria-hidden="true" tabindex="-1"></a>c) third item</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the Pandoc fancy list extension.</p> +<dd> +<p>Disable the Pandoc fancy list extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-14"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb191"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb191-1"><a href="#cb191-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb191-2"><a href="#cb191-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> -<span id="cb191-3"><a href="#cb191-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[fancyLists]{<span class="ex">markdown</span>}</span> -<span id="cb191-4"><a href="#cb191-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb191-5"><a href="#cb191-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb191-6"><a href="#cb191-6" aria-hidden="true"></a>a) first item</span> -<span id="cb191-7"><a href="#cb191-7" aria-hidden="true"></a>b) second item</span> -<span id="cb191-8"><a href="#cb191-8" aria-hidden="true"></a>c) third item</span> -<span id="cb191-9"><a href="#cb191-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb191-10"><a href="#cb191-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb192"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb192-1"><a href="#cb192-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-15"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb195"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb195-1"><a href="#cb195-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb195-2"><a href="#cb195-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> +<span id="cb195-3"><a href="#cb195-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fancyLists]{<span class="ex">markdown</span>}</span> +<span id="cb195-4"><a href="#cb195-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb195-5"><a href="#cb195-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb195-6"><a href="#cb195-6" aria-hidden="true" tabindex="-1"></a>a) first item</span> +<span id="cb195-7"><a href="#cb195-7" aria-hidden="true" tabindex="-1"></a>b) second item</span> +<span id="cb195-8"><a href="#cb195-8" aria-hidden="true" tabindex="-1"></a>c) third item</span> +<span id="cb195-9"><a href="#cb195-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb195-10"><a href="#cb195-10" 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="cb196"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb196-1"><a href="#cb196-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 text:</p> <blockquote> <ol type="a"> <li>first item</li> @@ -2035,20 +3037,25 @@ Thomas,Edison,1847</code></pre> <li>third item</li> </ol> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-10">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb193"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb193-1"><a href="#cb193-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb193-2"><a href="#cb193-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[fancyLists = yes]</span> -<span id="cb193-3"><a href="#cb193-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb193-4"><a href="#cb193-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb193-5"><a href="#cb193-5" aria-hidden="true"></a>a) first item</span> -<span id="cb193-6"><a href="#cb193-6" aria-hidden="true"></a>b) second item</span> -<span id="cb193-7"><a href="#cb193-7" aria-hidden="true"></a>c) third item</span> -<span id="cb193-8"><a href="#cb193-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb193-9"><a href="#cb193-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb194"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb194-1"><a href="#cb194-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-10">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb197"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb197-1"><a href="#cb197-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb197-2"><a href="#cb197-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[fancyLists = yes]</span> +<span id="cb197-3"><a href="#cb197-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb197-4"><a href="#cb197-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb197-5"><a href="#cb197-5" aria-hidden="true" tabindex="-1"></a>a) first item</span> +<span id="cb197-6"><a href="#cb197-6" aria-hidden="true" tabindex="-1"></a>b) second item</span> +<span id="cb197-7"><a href="#cb197-7" aria-hidden="true" tabindex="-1"></a>c) third item</span> +<span id="cb197-8"><a href="#cb197-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb197-9"><a href="#cb197-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb198"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb198-1"><a href="#cb198-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <ol type="a"> <li>first item</li> @@ -2056,399 +3063,548 @@ Thomas,Edison,1847</code></pre> <li>third item</li> </ol> </blockquote> -<h4 data-number="2.2.1.17" id="option-fencedcode"><span class="header-section-number">2.2.1.17</span> Option <code>fencedCode</code></h4> +<h4 data-number="2.2.1.19" id="option-fencedcode"><span +class="header-section-number">2.2.1.19</span> Option +<code>fencedCode</code></h4> <dl> <dt><code>fencedCode</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the commonmark fenced code block extension:</p> -<div class="sourceCode" id="cb195"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb195-1"><a href="#cb195-1" aria-hidden="true"></a><span class="in">~~~ js</span></span> -<span id="cb195-2"><a href="#cb195-2" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb195-3"><a href="#cb195-3" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> -<span id="cb195-4"><a href="#cb195-4" aria-hidden="true"></a>}</span> -<span id="cb195-5"><a href="#cb195-5" aria-hidden="true"></a><span class="op">~~~~~~</span></span> -<span id="cb195-6"><a href="#cb195-6" aria-hidden="true"></a></span> -<span id="cb195-7"><a href="#cb195-7" aria-hidden="true"></a> <span class="vs">``` html</span></span> -<span id="cb195-8"><a href="#cb195-8" aria-hidden="true"></a><span class="vs"> <pre></span></span> -<span id="cb195-9"><a href="#cb195-9" aria-hidden="true"></a><span class="vs"> <code></span></span> -<span id="cb195-10"><a href="#cb195-10" aria-hidden="true"></a><span class="vs"> // Some comments</span></span> -<span id="cb195-11"><a href="#cb195-11" aria-hidden="true"></a><span class="vs"> line 1 of code</span></span> -<span id="cb195-12"><a href="#cb195-12" aria-hidden="true"></a><span class="vs"> line 2 of code</span></span> -<span id="cb195-13"><a href="#cb195-13" aria-hidden="true"></a><span class="vs"> line 3 of code</span></span> -<span id="cb195-14"><a href="#cb195-14" aria-hidden="true"></a><span class="vs"> </code></span></span> -<span id="cb195-15"><a href="#cb195-15" aria-hidden="true"></a><span class="vs"> </pre></span></span> -<span id="cb195-16"><a href="#cb195-16" aria-hidden="true"></a><span class="vs"> ```</span></span></code></pre></div> +<dd> +<p>Enable the commonmark fenced code block extension:</p> +<div class="sourceCode" id="cb199"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb199-1"><a href="#cb199-1" aria-hidden="true" tabindex="-1"></a><span class="in">~~~ js</span></span> +<span id="cb199-2"><a href="#cb199-2" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> +<span id="cb199-3"><a href="#cb199-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> +<span id="cb199-4"><a href="#cb199-4" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb199-5"><a href="#cb199-5" aria-hidden="true" tabindex="-1"></a><span class="op">~~~~~~</span></span> +<span id="cb199-6"><a href="#cb199-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb199-7"><a href="#cb199-7" aria-hidden="true" tabindex="-1"></a> <span class="vs">``` html</span></span> +<span id="cb199-8"><a href="#cb199-8" aria-hidden="true" tabindex="-1"></a><span class="vs"> <pre></span></span> +<span id="cb199-9"><a href="#cb199-9" aria-hidden="true" tabindex="-1"></a><span class="vs"> <code></span></span> +<span id="cb199-10"><a href="#cb199-10" aria-hidden="true" tabindex="-1"></a><span class="vs"> // Some comments</span></span> +<span id="cb199-11"><a href="#cb199-11" aria-hidden="true" tabindex="-1"></a><span class="vs"> line 1 of code</span></span> +<span id="cb199-12"><a href="#cb199-12" aria-hidden="true" tabindex="-1"></a><span class="vs"> line 2 of code</span></span> +<span id="cb199-13"><a href="#cb199-13" aria-hidden="true" tabindex="-1"></a><span class="vs"> line 3 of code</span></span> +<span id="cb199-14"><a href="#cb199-14" aria-hidden="true" tabindex="-1"></a><span class="vs"> </code></span></span> +<span id="cb199-15"><a href="#cb199-15" aria-hidden="true" tabindex="-1"></a><span class="vs"> </pre></span></span> +<span id="cb199-16"><a href="#cb199-16" aria-hidden="true" tabindex="-1"></a><span class="vs"> ```</span></span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the commonmark fenced code block extension.</p> +<dd> +<p>Disable the commonmark fenced code block extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-15"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb196"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb196-1"><a href="#cb196-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb196-2"><a href="#cb196-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> -<span id="cb196-3"><a href="#cb196-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> -<span id="cb196-4"><a href="#cb196-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb196-5"><a href="#cb196-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb196-6"><a href="#cb196-6" aria-hidden="true"></a>~~~ js</span> -<span id="cb196-7"><a href="#cb196-7" aria-hidden="true"></a>if (a > 3) {</span> -<span id="cb196-8"><a href="#cb196-8" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> -<span id="cb196-9"><a href="#cb196-9" aria-hidden="true"></a>}</span> -<span id="cb196-10"><a href="#cb196-10" aria-hidden="true"></a>~~~~~~</span> -<span id="cb196-11"><a href="#cb196-11" aria-hidden="true"></a></span> -<span id="cb196-12"><a href="#cb196-12" aria-hidden="true"></a> ``` html</span> -<span id="cb196-13"><a href="#cb196-13" aria-hidden="true"></a> <pre></span> -<span id="cb196-14"><a href="#cb196-14" aria-hidden="true"></a> <code></span> -<span id="cb196-15"><a href="#cb196-15" aria-hidden="true"></a> // Some comments</span> -<span id="cb196-16"><a href="#cb196-16" aria-hidden="true"></a> line 1 of code</span> -<span id="cb196-17"><a href="#cb196-17" aria-hidden="true"></a> line 2 of code</span> -<span id="cb196-18"><a href="#cb196-18" aria-hidden="true"></a> line 3 of code</span> -<span id="cb196-19"><a href="#cb196-19" aria-hidden="true"></a> </code></span> -<span id="cb196-20"><a href="#cb196-20" aria-hidden="true"></a> </pre></span> -<span id="cb196-21"><a href="#cb196-21" aria-hidden="true"></a> ```</span> -<span id="cb196-22"><a href="#cb196-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb196-23"><a href="#cb196-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb197"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb197-1"><a href="#cb197-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<div class="sourceCode" id="cb198"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb198-1"><a href="#cb198-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb198-2"><a href="#cb198-2" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> -<span id="cb198-3"><a href="#cb198-3" aria-hidden="true"></a>}</span></code></pre></div> -<div class="sourceCode" id="cb199"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb199-1"><a href="#cb199-1" aria-hidden="true"></a><span class="kw"><pre></span></span> -<span id="cb199-2"><a href="#cb199-2" aria-hidden="true"></a> <span class="kw"><code></span></span> -<span id="cb199-3"><a href="#cb199-3" aria-hidden="true"></a> // Some comments</span> -<span id="cb199-4"><a href="#cb199-4" aria-hidden="true"></a> line 1 of code</span> -<span id="cb199-5"><a href="#cb199-5" aria-hidden="true"></a> line 2 of code</span> -<span id="cb199-6"><a href="#cb199-6" aria-hidden="true"></a> line 3 of code</span> -<span id="cb199-7"><a href="#cb199-7" aria-hidden="true"></a> <span class="kw"></code></span></span> -<span id="cb199-8"><a href="#cb199-8" aria-hidden="true"></a><span class="kw"></pre></span></span></code></pre></div> -</blockquote> -<h5 class="unnumbered" data-number="" id="context-example-11">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb200"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb200-1"><a href="#cb200-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb200-2"><a href="#cb200-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[fencedCode = yes]</span> -<span id="cb200-3"><a href="#cb200-3" aria-hidden="true"></a><span class="fu">\definetyping</span> [js]</span> -<span id="cb200-4"><a href="#cb200-4" aria-hidden="true"></a><span class="fu">\definetyping</span> [html]</span> -<span id="cb200-5"><a href="#cb200-5" aria-hidden="true"></a><span class="fu">\setuptyping</span> [html] [option=XML]</span> -<span id="cb200-6"><a href="#cb200-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb200-7"><a href="#cb200-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb200-8"><a href="#cb200-8" aria-hidden="true"></a>~~~ js</span> -<span id="cb200-9"><a href="#cb200-9" aria-hidden="true"></a>if (a > 3) {</span> -<span id="cb200-10"><a href="#cb200-10" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> -<span id="cb200-11"><a href="#cb200-11" aria-hidden="true"></a>}</span> -<span id="cb200-12"><a href="#cb200-12" aria-hidden="true"></a>~~~~~~</span> -<span id="cb200-13"><a href="#cb200-13" aria-hidden="true"></a></span> -<span id="cb200-14"><a href="#cb200-14" aria-hidden="true"></a> ``` html</span> -<span id="cb200-15"><a href="#cb200-15" aria-hidden="true"></a> <pre></span> -<span id="cb200-16"><a href="#cb200-16" aria-hidden="true"></a> <code></span> -<span id="cb200-17"><a href="#cb200-17" aria-hidden="true"></a> // Some comments</span> -<span id="cb200-18"><a href="#cb200-18" aria-hidden="true"></a> line 1 of code</span> -<span id="cb200-19"><a href="#cb200-19" aria-hidden="true"></a> line 2 of code</span> -<span id="cb200-20"><a href="#cb200-20" aria-hidden="true"></a> line 3 of code</span> -<span id="cb200-21"><a href="#cb200-21" aria-hidden="true"></a> </code></span> -<span id="cb200-22"><a href="#cb200-22" aria-hidden="true"></a> </pre></span> -<span id="cb200-23"><a href="#cb200-23" aria-hidden="true"></a> ```</span> -<span id="cb200-24"><a href="#cb200-24" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb200-25"><a href="#cb200-25" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb201"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb201-1"><a href="#cb201-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<div class="sourceCode" id="cb202"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb202-1"><a href="#cb202-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb202-2"><a href="#cb202-2" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> -<span id="cb202-3"><a href="#cb202-3" aria-hidden="true"></a>}</span></code></pre></div> -<div class="sourceCode" id="cb203"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb203-1"><a href="#cb203-1" aria-hidden="true"></a><span class="kw"><pre></span></span> -<span id="cb203-2"><a href="#cb203-2" aria-hidden="true"></a> <span class="kw"><code></span></span> -<span id="cb203-3"><a href="#cb203-3" aria-hidden="true"></a> // Some comments</span> -<span id="cb203-4"><a href="#cb203-4" aria-hidden="true"></a> line 1 of code</span> -<span id="cb203-5"><a href="#cb203-5" aria-hidden="true"></a> line 2 of code</span> -<span id="cb203-6"><a href="#cb203-6" aria-hidden="true"></a> line 3 of code</span> -<span id="cb203-7"><a href="#cb203-7" aria-hidden="true"></a> <span class="kw"></code></span></span> -<span id="cb203-8"><a href="#cb203-8" aria-hidden="true"></a><span class="kw"></pre></span></span></code></pre></div> -</blockquote> -<h4 data-number="2.2.1.18" id="option-finalizecache"><span class="header-section-number">2.2.1.18</span> Option <code>finalizeCache</code></h4> +<h5 class="unnumbered" id="latex-example-16"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb200"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb200-1"><a href="#cb200-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb200-2"><a href="#cb200-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> +<span id="cb200-3"><a href="#cb200-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> +<span id="cb200-4"><a href="#cb200-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb200-5"><a href="#cb200-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb200-6"><a href="#cb200-6" aria-hidden="true" tabindex="-1"></a>~~~ js</span> +<span id="cb200-7"><a href="#cb200-7" aria-hidden="true" tabindex="-1"></a>if (a > 3) {</span> +<span id="cb200-8"><a href="#cb200-8" aria-hidden="true" tabindex="-1"></a> moveShip(5 * gravity, DOWN);</span> +<span id="cb200-9"><a href="#cb200-9" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb200-10"><a href="#cb200-10" aria-hidden="true" tabindex="-1"></a>~~~~~~</span> +<span id="cb200-11"><a href="#cb200-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb200-12"><a href="#cb200-12" aria-hidden="true" tabindex="-1"></a> ``` html</span> +<span id="cb200-13"><a href="#cb200-13" aria-hidden="true" tabindex="-1"></a> <pre></span> +<span id="cb200-14"><a href="#cb200-14" aria-hidden="true" tabindex="-1"></a> <code></span> +<span id="cb200-15"><a href="#cb200-15" aria-hidden="true" tabindex="-1"></a> // Some comments</span> +<span id="cb200-16"><a href="#cb200-16" aria-hidden="true" tabindex="-1"></a> line 1 of code</span> +<span id="cb200-17"><a href="#cb200-17" aria-hidden="true" tabindex="-1"></a> line 2 of code</span> +<span id="cb200-18"><a href="#cb200-18" aria-hidden="true" tabindex="-1"></a> line 3 of code</span> +<span id="cb200-19"><a href="#cb200-19" aria-hidden="true" tabindex="-1"></a> </code></span> +<span id="cb200-20"><a href="#cb200-20" aria-hidden="true" tabindex="-1"></a> </pre></span> +<span id="cb200-21"><a href="#cb200-21" aria-hidden="true" tabindex="-1"></a> ```</span> +<span id="cb200-22"><a href="#cb200-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb200-23"><a href="#cb200-23" 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="cb201"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb201-1"><a href="#cb201-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 text:</p> +<blockquote> +<div class="sourceCode" id="cb202"><pre +class="sourceCode js"><code class="sourceCode javascript"><span id="cb202-1"><a href="#cb202-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> +<span id="cb202-2"><a href="#cb202-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> +<span id="cb202-3"><a href="#cb202-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb203"><pre +class="sourceCode html"><code class="sourceCode html"><span id="cb203-1"><a href="#cb203-1" aria-hidden="true" tabindex="-1"></a><span class="kw"><pre></span></span> +<span id="cb203-2"><a href="#cb203-2" aria-hidden="true" tabindex="-1"></a> <span class="kw"><code></span></span> +<span id="cb203-3"><a href="#cb203-3" aria-hidden="true" tabindex="-1"></a> // Some comments</span> +<span id="cb203-4"><a href="#cb203-4" aria-hidden="true" tabindex="-1"></a> line 1 of code</span> +<span id="cb203-5"><a href="#cb203-5" aria-hidden="true" tabindex="-1"></a> line 2 of code</span> +<span id="cb203-6"><a href="#cb203-6" aria-hidden="true" tabindex="-1"></a> line 3 of code</span> +<span id="cb203-7"><a href="#cb203-7" aria-hidden="true" tabindex="-1"></a> <span class="kw"></code></span></span> +<span id="cb203-8"><a href="#cb203-8" aria-hidden="true" tabindex="-1"></a><span class="kw"></pre></span></span></code></pre></div> +</blockquote> +<h5 class="unnumbered" id="context-example-11">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb204"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb204-1"><a href="#cb204-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb204-2"><a href="#cb204-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[fencedCode = yes]</span> +<span id="cb204-3"><a href="#cb204-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\definetyping</span> [js]</span> +<span id="cb204-4"><a href="#cb204-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\definetyping</span> [html]</span> +<span id="cb204-5"><a href="#cb204-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\setuptyping</span> [html] [option=XML]</span> +<span id="cb204-6"><a href="#cb204-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb204-7"><a href="#cb204-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb204-8"><a href="#cb204-8" aria-hidden="true" tabindex="-1"></a>~~~ js</span> +<span id="cb204-9"><a href="#cb204-9" aria-hidden="true" tabindex="-1"></a>if (a > 3) {</span> +<span id="cb204-10"><a href="#cb204-10" aria-hidden="true" tabindex="-1"></a> moveShip(5 * gravity, DOWN);</span> +<span id="cb204-11"><a href="#cb204-11" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb204-12"><a href="#cb204-12" aria-hidden="true" tabindex="-1"></a>~~~~~~</span> +<span id="cb204-13"><a href="#cb204-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb204-14"><a href="#cb204-14" aria-hidden="true" tabindex="-1"></a> ``` html</span> +<span id="cb204-15"><a href="#cb204-15" aria-hidden="true" tabindex="-1"></a> <pre></span> +<span id="cb204-16"><a href="#cb204-16" aria-hidden="true" tabindex="-1"></a> <code></span> +<span id="cb204-17"><a href="#cb204-17" aria-hidden="true" tabindex="-1"></a> // Some comments</span> +<span id="cb204-18"><a href="#cb204-18" aria-hidden="true" tabindex="-1"></a> line 1 of code</span> +<span id="cb204-19"><a href="#cb204-19" aria-hidden="true" tabindex="-1"></a> line 2 of code</span> +<span id="cb204-20"><a href="#cb204-20" aria-hidden="true" tabindex="-1"></a> line 3 of code</span> +<span id="cb204-21"><a href="#cb204-21" aria-hidden="true" tabindex="-1"></a> </code></span> +<span id="cb204-22"><a href="#cb204-22" aria-hidden="true" tabindex="-1"></a> </pre></span> +<span id="cb204-23"><a href="#cb204-23" aria-hidden="true" tabindex="-1"></a> ```</span> +<span id="cb204-24"><a href="#cb204-24" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb204-25"><a href="#cb204-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb205"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb205-1"><a href="#cb205-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<div class="sourceCode" id="cb206"><pre +class="sourceCode js"><code class="sourceCode javascript"><span id="cb206-1"><a href="#cb206-1" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> +<span id="cb206-2"><a href="#cb206-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> +<span id="cb206-3"><a href="#cb206-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb207"><pre +class="sourceCode html"><code class="sourceCode html"><span id="cb207-1"><a href="#cb207-1" aria-hidden="true" tabindex="-1"></a><span class="kw"><pre></span></span> +<span id="cb207-2"><a href="#cb207-2" aria-hidden="true" tabindex="-1"></a> <span class="kw"><code></span></span> +<span id="cb207-3"><a href="#cb207-3" aria-hidden="true" tabindex="-1"></a> // Some comments</span> +<span id="cb207-4"><a href="#cb207-4" aria-hidden="true" tabindex="-1"></a> line 1 of code</span> +<span id="cb207-5"><a href="#cb207-5" aria-hidden="true" tabindex="-1"></a> line 2 of code</span> +<span id="cb207-6"><a href="#cb207-6" aria-hidden="true" tabindex="-1"></a> line 3 of code</span> +<span id="cb207-7"><a href="#cb207-7" aria-hidden="true" tabindex="-1"></a> <span class="kw"></code></span></span> +<span id="cb207-8"><a href="#cb207-8" aria-hidden="true" tabindex="-1"></a><span class="kw"></pre></span></span></code></pre></div> +</blockquote> +<h4 data-number="2.2.1.20" id="option-finalizecache"><span +class="header-section-number">2.2.1.20</span> Option +<code>finalizeCache</code></h4> <dl> <dt><code>finalizeCache</code> (default value: <code>false</code>)</dt> -<dd><p>Whether an output file specified with the <strong><code>frozenCacheFileName</code></strong> option (frozen cache) that contains a mapping between an enumeration of markdown documents and their auxiliary cache files will be created.</p> -<p>The frozen cache makes it possible to later typeset a plain <span class="tex">T<sub>e</sub>X</span> document that contains markdown documents without invoking Lua using the <code>\markdownOptionFrozenCache</code> plain <span class="tex">T<sub>e</sub>X</span> option. As a result, the plain <span class="tex">T<sub>e</sub>X</span> document becomes more portable, but further changes in the order and the content of markdown documents will not be reflected.</p> +<dd> +<p>Whether an output file specified with the +<strong><code>frozenCacheFileName</code></strong> option (frozen cache) +that contains a mapping between an enumeration of markdown documents and +their auxiliary cache files will be created.</p> +<p>The frozen cache makes it possible to later typeset a plain <span +class="tex">T<sub>e</sub>X</span> document that contains markdown +documents without invoking Lua using the +<code>\markdownOptionFrozenCache</code> plain <span +class="tex">T<sub>e</sub>X</span> option. As a result, the plain <span +class="tex">T<sub>e</sub>X</span> document becomes more portable, but +further changes in the order and the content of markdown documents will +not be reflected.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-7">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb204"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb204-1"><a href="#cb204-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb204-2"><a href="#cb204-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> -<span id="cb204-3"><a href="#cb204-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb204-4"><a href="#cb204-4" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb204-5"><a href="#cb204-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb204-6"><a href="#cb204-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb205"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb205-1"><a href="#cb205-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced as we requested using the <code>finalizeCache</code> option.</p> +<h5 class="unnumbered" id="plain-tex-example-7">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb208"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb208-1"><a href="#cb208-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb208-2"><a href="#cb208-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> +<span id="cb208-3"><a href="#cb208-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb208-4"><a href="#cb208-4" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb208-5"><a href="#cb208-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb208-6"><a href="#cb208-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="cb209"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb209-1"><a href="#cb209-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 text “Hello <em>world</em>!” A frozen cache will also be +produced as we requested using the <code>finalizeCache</code> +option.</p> <p>Next, change the content of <code>document.tex</code> as follows:</p> -<div class="sourceCode" id="cb206"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb206-1"><a href="#cb206-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb206-2"><a href="#cb206-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> -<span id="cb206-3"><a href="#cb206-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb206-4"><a href="#cb206-4" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb206-5"><a href="#cb206-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb206-6"><a href="#cb206-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb210"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb210-1"><a href="#cb210-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb210-2"><a href="#cb210-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> +<span id="cb210-3"><a href="#cb210-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb210-4"><a href="#cb210-4" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span> +<span id="cb210-5"><a href="#cb210-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb210-6"><a href="#cb210-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb207"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb207-1"><a href="#cb207-1" aria-hidden="true"></a><span class="ex">pdftex</span> -no-shell-escape document.tex</span></code></pre></div> -<p>A new PDF document named <code>document.pdf</code> should be produced and contain the same text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h5 class="unnumbered" data-number="" id="latex-example-16"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb208"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb208-1"><a href="#cb208-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</span> -<span id="cb208-2"><a href="#cb208-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb208-3"><a href="#cb208-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb208-4"><a href="#cb208-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb208-5"><a href="#cb208-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb208-6"><a href="#cb208-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb208-7"><a href="#cb208-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb209"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb209-1"><a href="#cb209-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced as we requested using the <code>finalizecache</code> option.</p> +<div class="sourceCode" id="cb211"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb211-1"><a href="#cb211-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> <span class="at">-no-shell-escape</span> document.tex</span></code></pre></div> +<p>A new PDF document named <code>document.pdf</code> should be produced +and contain the same text “Hello <em>world</em>!” Since we used the +contents of the frozen cache using the +<code>\markdownOptionFrozenCache</code> option, we were able to typeset +the document without accessing the shell or invoking Lua, but the change +in the content of the markdown document from “Hello <em>world</em>!” to +“Hi <em>world</em>!” was not reflected.</p> +<h5 class="unnumbered" id="latex-example-17"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb212"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb212-1"><a href="#cb212-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</span> +<span id="cb212-2"><a href="#cb212-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb212-3"><a href="#cb212-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb212-4"><a href="#cb212-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb212-5"><a href="#cb212-5" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb212-6"><a href="#cb212-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb212-7"><a href="#cb212-7" 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="cb213"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb213-1"><a href="#cb213-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 text “Hello <em>world</em>!” A frozen cache will also be +produced as we requested using the <code>finalizecache</code> +option.</p> <p>Next, change the content of <code>document.tex</code> as follows:</p> -<div class="sourceCode" id="cb210"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb210-1"><a href="#cb210-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span> -<span id="cb210-2"><a href="#cb210-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb210-3"><a href="#cb210-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb210-4"><a href="#cb210-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb210-5"><a href="#cb210-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb210-6"><a href="#cb210-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb210-7"><a href="#cb210-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb214"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb214-1"><a href="#cb214-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span> +<span id="cb214-2"><a href="#cb214-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb214-3"><a href="#cb214-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb214-4"><a href="#cb214-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb214-5"><a href="#cb214-5" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span> +<span id="cb214-6"><a href="#cb214-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb214-7"><a href="#cb214-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb211"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb211-1"><a href="#cb211-1" aria-hidden="true"></a><span class="ex">pdflatex</span> -no-shell-escape document.tex</span></code></pre></div> -<p>A new PDF document named <code>document.pdf</code> should be produced and contain the same text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h5 class="unnumbered" data-number="" id="context-example-12">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb212"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb212-1"><a href="#cb212-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb212-2"><a href="#cb212-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[finalizeCache = yes]</span> -<span id="cb212-3"><a href="#cb212-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb212-4"><a href="#cb212-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb212-5"><a href="#cb212-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb212-6"><a href="#cb212-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb212-7"><a href="#cb212-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb213"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb213-1"><a href="#cb213-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizeCache</code> option.</p> +<div class="sourceCode" id="cb215"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb215-1"><a href="#cb215-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdflatex</span> <span class="at">-no-shell-escape</span> document.tex</span></code></pre></div> +<p>A new PDF document named <code>document.pdf</code> should be produced +and contain the same text “Hello <em>world</em>!” Since we used the +contents of the frozen cache using the +<code>\markdownOptionFrozenCache</code> option, we were able to typeset +the document without accessing the shell or invoking Lua, but the change +in the content of the markdown document from “Hello <em>world</em>!” to +“Hi <em>world</em>!” was not reflected.</p> +<h5 class="unnumbered" id="context-example-12">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb216"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb216-1"><a href="#cb216-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb216-2"><a href="#cb216-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[finalizeCache = yes]</span> +<span id="cb216-3"><a href="#cb216-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb216-4"><a href="#cb216-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb216-5"><a href="#cb216-5" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb216-6"><a href="#cb216-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb216-7"><a href="#cb216-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb217"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb217-1"><a href="#cb217-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the text “Hello <em>world</em>!” A frozen cache will also be +produced in the <code>cache.tex</code> output file as we requested using +the <code>finalizeCache</code> option.</p> <p>Next, change the content of <code>document.tex</code> as follows:</p> -<div class="sourceCode" id="cb214"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb214-1"><a href="#cb214-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb214-2"><a href="#cb214-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[frozenCache = yes]</span> -<span id="cb214-3"><a href="#cb214-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb214-4"><a href="#cb214-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb214-5"><a href="#cb214-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb214-6"><a href="#cb214-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb214-7"><a href="#cb214-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb218"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb218-1"><a href="#cb218-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb218-2"><a href="#cb218-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[frozenCache = yes]</span> +<span id="cb218-3"><a href="#cb218-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb218-4"><a href="#cb218-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb218-5"><a href="#cb218-5" aria-hidden="true" tabindex="-1"></a>Hi *world*!</span> +<span id="cb218-6"><a href="#cb218-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb218-7"><a href="#cb218-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb215"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb215-1"><a href="#cb215-1" aria-hidden="true"></a><span class="ex">texexec</span> --passon=--no-shell-escape document.tex</span></code></pre></div> -<p>A new PDF document named <code>document.pdf</code> should be produced and contain the same text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h4 data-number="2.2.1.19" id="option-footnotes"><span class="header-section-number">2.2.1.19</span> Option <code>footnotes</code></h4> +<div class="sourceCode" id="cb219"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb219-1"><a href="#cb219-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texexec</span> <span class="at">--passon</span><span class="op">=</span>--no-shell-escape document.tex</span></code></pre></div> +<p>A new PDF document named <code>document.pdf</code> should be produced +and contain the same text “Hello <em>world</em>!” Since we used the +contents of the frozen cache using the +<code>\markdownOptionFrozenCache</code> option, we were able to typeset +the document without accessing the shell or invoking Lua, but the change +in the content of the markdown document from “Hello <em>world</em>!” to +“Hi <em>world</em>!” was not reflected.</p> +<h4 data-number="2.2.1.21" id="option-footnotes"><span +class="header-section-number">2.2.1.21</span> Option +<code>footnotes</code></h4> <dl> <dt><code>footnotes</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the Pandoc footnote syntax extension:</p> -<div class="sourceCode" id="cb216"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb216-1"><a href="#cb216-1" aria-hidden="true"></a>Here is a footnote reference,<span class="ot">[^1]</span> and another.<span class="ot">[^longnote]</span></span> -<span id="cb216-2"><a href="#cb216-2" aria-hidden="true"></a></span> -<span id="cb216-3"><a href="#cb216-3" aria-hidden="true"></a><span class="ot">[^1]: </span>Here is the footnote.</span> -<span id="cb216-4"><a href="#cb216-4" aria-hidden="true"></a></span> -<span id="cb216-5"><a href="#cb216-5" aria-hidden="true"></a><span class="ot">[^longnote]: </span>Here's one with multiple blocks.</span> -<span id="cb216-6"><a href="#cb216-6" aria-hidden="true"></a></span> -<span id="cb216-7"><a href="#cb216-7" aria-hidden="true"></a><span class="in"> Subsequent paragraphs are indented to show that they</span></span> -<span id="cb216-8"><a href="#cb216-8" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb216-9"><a href="#cb216-9" aria-hidden="true"></a></span> -<span id="cb216-10"><a href="#cb216-10" aria-hidden="true"></a><span class="in"> { some.code }</span></span> -<span id="cb216-11"><a href="#cb216-11" aria-hidden="true"></a></span> -<span id="cb216-12"><a href="#cb216-12" aria-hidden="true"></a><span class="in"> The whole paragraph can be indented, or just the</span></span> -<span id="cb216-13"><a href="#cb216-13" aria-hidden="true"></a><span class="in"> first line. In this way, multi-paragraph footnotes</span></span> -<span id="cb216-14"><a href="#cb216-14" aria-hidden="true"></a><span class="in"> work like multi-paragraph list items.</span></span> -<span id="cb216-15"><a href="#cb216-15" aria-hidden="true"></a></span> -<span id="cb216-16"><a href="#cb216-16" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb216-17"><a href="#cb216-17" aria-hidden="true"></a>isn't indented.</span></code></pre></div> +<dd> +<p>Enable the Pandoc footnote syntax extension:</p> +<div class="sourceCode" id="cb220"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb220-1"><a href="#cb220-1" aria-hidden="true" tabindex="-1"></a>Here is a footnote reference,<span class="ot">[^1]</span> and another.<span class="ot">[^longnote]</span></span> +<span id="cb220-2"><a href="#cb220-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb220-3"><a href="#cb220-3" aria-hidden="true" tabindex="-1"></a><span class="ot">[^1]: </span>Here is the footnote.</span> +<span id="cb220-4"><a href="#cb220-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb220-5"><a href="#cb220-5" aria-hidden="true" tabindex="-1"></a><span class="ot">[^longnote]: </span>Here's one with multiple blocks.</span> +<span id="cb220-6"><a href="#cb220-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb220-7"><a href="#cb220-7" aria-hidden="true" tabindex="-1"></a><span class="in"> Subsequent paragraphs are indented to show that they</span></span> +<span id="cb220-8"><a href="#cb220-8" aria-hidden="true" tabindex="-1"></a>belong to the previous footnote.</span> +<span id="cb220-9"><a href="#cb220-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb220-10"><a href="#cb220-10" aria-hidden="true" tabindex="-1"></a><span class="in"> { some.code }</span></span> +<span id="cb220-11"><a href="#cb220-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb220-12"><a href="#cb220-12" aria-hidden="true" tabindex="-1"></a><span class="in"> The whole paragraph can be indented, or just the</span></span> +<span id="cb220-13"><a href="#cb220-13" aria-hidden="true" tabindex="-1"></a><span class="in"> first line. In this way, multi-paragraph footnotes</span></span> +<span id="cb220-14"><a href="#cb220-14" aria-hidden="true" tabindex="-1"></a><span class="in"> work like multi-paragraph list items.</span></span> +<span id="cb220-15"><a href="#cb220-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb220-16"><a href="#cb220-16" aria-hidden="true" tabindex="-1"></a>This paragraph won't be part of the note, because it</span> +<span id="cb220-17"><a href="#cb220-17" aria-hidden="true" tabindex="-1"></a>isn't indented.</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the Pandoc footnote syntax extension.</p> +<dd> +<p>Disable the Pandoc footnote syntax extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-17"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb217"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb217-1"><a href="#cb217-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb217-2"><a href="#cb217-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> -<span id="cb217-3"><a href="#cb217-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb217-4"><a href="#cb217-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb217-5"><a href="#cb217-5" aria-hidden="true"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> -<span id="cb217-6"><a href="#cb217-6" aria-hidden="true"></a></span> -<span id="cb217-7"><a href="#cb217-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> -<span id="cb217-8"><a href="#cb217-8" aria-hidden="true"></a></span> -<span id="cb217-9"><a href="#cb217-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> -<span id="cb217-10"><a href="#cb217-10" aria-hidden="true"></a></span> -<span id="cb217-11"><a href="#cb217-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> -<span id="cb217-12"><a href="#cb217-12" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb217-13"><a href="#cb217-13" aria-hidden="true"></a></span> -<span id="cb217-14"><a href="#cb217-14" aria-hidden="true"></a> { some.code }</span> -<span id="cb217-15"><a href="#cb217-15" aria-hidden="true"></a></span> -<span id="cb217-16"><a href="#cb217-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> -<span id="cb217-17"><a href="#cb217-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> -<span id="cb217-18"><a href="#cb217-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> -<span id="cb217-19"><a href="#cb217-19" aria-hidden="true"></a></span> -<span id="cb217-20"><a href="#cb217-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb217-21"><a href="#cb217-21" aria-hidden="true"></a>isn't indented.</span> -<span id="cb217-22"><a href="#cb217-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb217-23"><a href="#cb217-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb218"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb218-1"><a href="#cb218-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>Here is a footnote reference,<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> and another.<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a></p> -<p>This paragraph won’t be part of the note, because it isn’t indented.</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="context-example-13">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb220"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb220-1"><a href="#cb220-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb220-2"><a href="#cb220-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[footnotes = yes]</span> -<span id="cb220-3"><a href="#cb220-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb220-4"><a href="#cb220-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb220-5"><a href="#cb220-5" aria-hidden="true"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> -<span id="cb220-6"><a href="#cb220-6" aria-hidden="true"></a></span> -<span id="cb220-7"><a href="#cb220-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> -<span id="cb220-8"><a href="#cb220-8" aria-hidden="true"></a></span> -<span id="cb220-9"><a href="#cb220-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> -<span id="cb220-10"><a href="#cb220-10" aria-hidden="true"></a></span> -<span id="cb220-11"><a href="#cb220-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> -<span id="cb220-12"><a href="#cb220-12" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb220-13"><a href="#cb220-13" aria-hidden="true"></a></span> -<span id="cb220-14"><a href="#cb220-14" aria-hidden="true"></a> { some.code }</span> -<span id="cb220-15"><a href="#cb220-15" aria-hidden="true"></a></span> -<span id="cb220-16"><a href="#cb220-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> -<span id="cb220-17"><a href="#cb220-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> -<span id="cb220-18"><a href="#cb220-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> -<span id="cb220-19"><a href="#cb220-19" aria-hidden="true"></a></span> -<span id="cb220-20"><a href="#cb220-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb220-21"><a href="#cb220-21" aria-hidden="true"></a>isn't indented.</span> -<span id="cb220-22"><a href="#cb220-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb220-23"><a href="#cb220-23" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb221"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb221-1"><a href="#cb221-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>Here is a footnote reference,<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a> and another.<a href="#fn4" class="footnote-ref" id="fnref4" role="doc-noteref"><sup>4</sup></a></p> -<p>This paragraph won’t be part of the note, because it isn’t indented.</p> -</blockquote> -<h4 data-number="2.2.1.20" id="option-frozencachecounter"><span class="header-section-number">2.2.1.20</span> Option <code>frozenCacheCounter</code></h4> +<h5 class="unnumbered" id="latex-example-18"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb221"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb221-1"><a href="#cb221-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb221-2"><a href="#cb221-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> +<span id="cb221-3"><a href="#cb221-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb221-4"><a href="#cb221-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb221-5"><a href="#cb221-5" aria-hidden="true" tabindex="-1"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> +<span id="cb221-6"><a href="#cb221-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb221-7"><a href="#cb221-7" aria-hidden="true" tabindex="-1"></a>[^1]: Here is the footnote.</span> +<span id="cb221-8"><a href="#cb221-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb221-9"><a href="#cb221-9" aria-hidden="true" tabindex="-1"></a>[^longnote]: Here's one with multiple blocks.</span> +<span id="cb221-10"><a href="#cb221-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb221-11"><a href="#cb221-11" aria-hidden="true" tabindex="-1"></a> Subsequent paragraphs are indented to show that they</span> +<span id="cb221-12"><a href="#cb221-12" aria-hidden="true" tabindex="-1"></a>belong to the previous footnote.</span> +<span id="cb221-13"><a href="#cb221-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb221-14"><a href="#cb221-14" aria-hidden="true" tabindex="-1"></a> { some.code }</span> +<span id="cb221-15"><a href="#cb221-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb221-16"><a href="#cb221-16" aria-hidden="true" tabindex="-1"></a> The whole paragraph can be indented, or just the</span> +<span id="cb221-17"><a href="#cb221-17" aria-hidden="true" tabindex="-1"></a> first line. In this way, multi-paragraph footnotes</span> +<span id="cb221-18"><a href="#cb221-18" aria-hidden="true" tabindex="-1"></a> work like multi-paragraph list items.</span> +<span id="cb221-19"><a href="#cb221-19" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb221-20"><a href="#cb221-20" aria-hidden="true" tabindex="-1"></a>This paragraph won't be part of the note, because it</span> +<span id="cb221-21"><a href="#cb221-21" aria-hidden="true" tabindex="-1"></a>isn't indented.</span> +<span id="cb221-22"><a href="#cb221-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb221-23"><a href="#cb221-23" 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="cb222"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb222-1"><a href="#cb222-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 text:</p> +<blockquote> +<p>Here is a footnote reference,<a href="#fn1" class="footnote-ref" +id="fnref1" role="doc-noteref"><sup>1</sup></a> and another.<a +href="#fn2" class="footnote-ref" id="fnref2" +role="doc-noteref"><sup>2</sup></a></p> +<p>This paragraph won’t be part of the note, because it isn’t +indented.</p> +</blockquote> +<h5 class="unnumbered" id="context-example-13">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb224"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb224-1"><a href="#cb224-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb224-2"><a href="#cb224-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[footnotes = yes]</span> +<span id="cb224-3"><a href="#cb224-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb224-4"><a href="#cb224-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb224-5"><a href="#cb224-5" aria-hidden="true" tabindex="-1"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> +<span id="cb224-6"><a href="#cb224-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb224-7"><a href="#cb224-7" aria-hidden="true" tabindex="-1"></a>[^1]: Here is the footnote.</span> +<span id="cb224-8"><a href="#cb224-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb224-9"><a href="#cb224-9" aria-hidden="true" tabindex="-1"></a>[^longnote]: Here's one with multiple blocks.</span> +<span id="cb224-10"><a href="#cb224-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb224-11"><a href="#cb224-11" aria-hidden="true" tabindex="-1"></a> Subsequent paragraphs are indented to show that they</span> +<span id="cb224-12"><a href="#cb224-12" aria-hidden="true" tabindex="-1"></a>belong to the previous footnote.</span> +<span id="cb224-13"><a href="#cb224-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb224-14"><a href="#cb224-14" aria-hidden="true" tabindex="-1"></a> { some.code }</span> +<span id="cb224-15"><a href="#cb224-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb224-16"><a href="#cb224-16" aria-hidden="true" tabindex="-1"></a> The whole paragraph can be indented, or just the</span> +<span id="cb224-17"><a href="#cb224-17" aria-hidden="true" tabindex="-1"></a> first line. In this way, multi-paragraph footnotes</span> +<span id="cb224-18"><a href="#cb224-18" aria-hidden="true" tabindex="-1"></a> work like multi-paragraph list items.</span> +<span id="cb224-19"><a href="#cb224-19" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb224-20"><a href="#cb224-20" aria-hidden="true" tabindex="-1"></a>This paragraph won't be part of the note, because it</span> +<span id="cb224-21"><a href="#cb224-21" aria-hidden="true" tabindex="-1"></a>isn't indented.</span> +<span id="cb224-22"><a href="#cb224-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb224-23"><a href="#cb224-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb225"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb225-1"><a href="#cb225-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<p>Here is a footnote reference,<a href="#fn3" class="footnote-ref" +id="fnref3" role="doc-noteref"><sup>3</sup></a> and another.<a +href="#fn4" class="footnote-ref" id="fnref4" +role="doc-noteref"><sup>4</sup></a></p> +<p>This paragraph won’t be part of the note, because it isn’t +indented.</p> +</blockquote> +<h4 data-number="2.2.1.22" id="option-frozencachecounter"><span +class="header-section-number">2.2.1.22</span> Option +<code>frozenCacheCounter</code></h4> <dl> <dt><code>frozenCacheCounter</code> (default value: <code>0</code>)</dt> -<dd><p>The number of the current markdown document that will be stored in an output file (frozen cache) when the <strong><code>finalizeCache</code></strong> is enabled. When the document number is 0, then a new frozen cache will be created. Otherwise, the frozen cache will be appended.</p> -<p>Each frozen cache entry will define a <span class="tex">T<sub>e</sub>X</span> macro <code>\markdownFrozenCache</code>⟨<em>number</em>⟩ that will typeset markdown document number ⟨<em>number</em>⟩.</p> +<dd> +<p>The number of the current markdown document that will be stored in an +output file (frozen cache) when the +<strong><code>finalizeCache</code></strong> is enabled. When the +document number is 0, then a new frozen cache will be created. +Otherwise, the frozen cache will be appended.</p> +<p>Each frozen cache entry will define a <span +class="tex">T<sub>e</sub>X</span> macro +<code>\markdownFrozenCache</code>⟨<em>number</em>⟩ that will typeset +markdown document number ⟨<em>number</em>⟩.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-8">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb223"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb223-1"><a href="#cb223-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb223-2"><a href="#cb223-2" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb223-3"><a href="#cb223-3" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb223-4"><a href="#cb223-4" aria-hidden="true"></a> local firstConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 0})</span> -<span id="cb223-5"><a href="#cb223-5" aria-hidden="true"></a> local firstInput = "Hello"</span> -<span id="cb223-6"><a href="#cb223-6" aria-hidden="true"></a> local secondConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 1})</span> -<span id="cb223-7"><a href="#cb223-7" aria-hidden="true"></a> local secondInput = "*world*!"</span> -<span id="cb223-8"><a href="#cb223-8" aria-hidden="true"></a> tex.sprint(firstConvert(firstInput) .. [[ ]] .. secondConvert(secondInput)) }</span> -<span id="cb223-9"><a href="#cb223-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 class="unnumbered" id="lua-module-example-8">Lua Module Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb227"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb227-1"><a href="#cb227-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb227-2"><a href="#cb227-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb227-3"><a href="#cb227-3" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb227-4"><a href="#cb227-4" aria-hidden="true" tabindex="-1"></a> local firstConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 0})</span> +<span id="cb227-5"><a href="#cb227-5" aria-hidden="true" tabindex="-1"></a> local firstInput = "Hello"</span> +<span id="cb227-6"><a href="#cb227-6" aria-hidden="true" tabindex="-1"></a> local secondConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 1})</span> +<span id="cb227-7"><a href="#cb227-7" aria-hidden="true" tabindex="-1"></a> local secondInput = "*world*!"</span> +<span id="cb227-8"><a href="#cb227-8" aria-hidden="true" tabindex="-1"></a> tex.sprint(firstConvert(firstInput) .. [[ ]] .. secondConvert(secondInput)) }</span> +<span id="cb227-9"><a href="#cb227-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb224"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb224-1"><a href="#cb224-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache with two entries will also be produced as we requested using the <code>frozenCacheCounter</code> option.</p> -<h4 data-number="2.2.1.21" id="option-hardlinebreaks"><span class="header-section-number">2.2.1.21</span> Option <code>hardLineBreaks</code></h4> +<div class="sourceCode" id="cb228"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb228-1"><a href="#cb228-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 text “Hello <em>world</em>!” A frozen cache with two entries +will also be produced as we requested using the +<code>frozenCacheCounter</code> option.</p> +<h4 data-number="2.2.1.23" id="option-hardlinebreaks"><span +class="header-section-number">2.2.1.23</span> Option +<code>hardLineBreaks</code></h4> <dl> <dt><code>hardLineBreaks</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Interpret all newlines within a paragraph as hard line breaks instead of spaces.</p> +<dd> +<p>Interpret all newlines within a paragraph as hard line breaks instead +of spaces.</p> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Interpret all newlines within a paragraph as spaces.</p> +<dd> +<p>Interpret all newlines within a paragraph as spaces.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-18"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb225"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb225-1"><a href="#cb225-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb225-2"><a href="#cb225-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb225-3"><a href="#cb225-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb225-4"><a href="#cb225-4" aria-hidden="true"></a></span> -<span id="cb225-5"><a href="#cb225-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb225-6"><a href="#cb225-6" aria-hidden="true"></a>'Twas brillig, and the slithy toves</span> -<span id="cb225-7"><a href="#cb225-7" aria-hidden="true"></a>Did gyre and gimble in the wabe;</span> -<span id="cb225-8"><a href="#cb225-8" aria-hidden="true"></a>All mimsy were the borogoves,</span> -<span id="cb225-9"><a href="#cb225-9" aria-hidden="true"></a>And the mome raths outgrabe.</span> -<span id="cb225-10"><a href="#cb225-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb225-11"><a href="#cb225-11" aria-hidden="true"></a></span> -<span id="cb225-12"><a href="#cb225-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hardLineBreaks}</span> -<span id="cb225-13"><a href="#cb225-13" aria-hidden="true"></a>'Twas brillig, and the slithy toves</span> -<span id="cb225-14"><a href="#cb225-14" aria-hidden="true"></a>Did gyre and gimble in the wabe;</span> -<span id="cb225-15"><a href="#cb225-15" aria-hidden="true"></a>All mimsy were the borogoves,</span> -<span id="cb225-16"><a href="#cb225-16" aria-hidden="true"></a>And the mome raths outgrabe.</span> -<span id="cb225-17"><a href="#cb225-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb225-18"><a href="#cb225-18" aria-hidden="true"></a></span> -<span id="cb225-19"><a href="#cb225-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb226"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb226-1"><a href="#cb226-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>’Twas brillig, and the slithy toves Did gyre and gimble in the wabe; All mimsy were the borogoves, And the mome raths outgrabe.</p> -<p>’Twas brillig, and the slithy toves Did gyre and gimble in the wabe; All mimsy were the borogoves, And the mome raths outgrabe.</p> -</blockquote> -<h4 data-number="2.2.1.22" id="option-hashenumerators"><span class="header-section-number">2.2.1.22</span> Option <code>hashEnumerators</code></h4> +<h5 class="unnumbered" id="latex-example-19"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb229"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb229-1"><a href="#cb229-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb229-2"><a href="#cb229-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb229-3"><a href="#cb229-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb229-4"><a href="#cb229-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb229-5"><a href="#cb229-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb229-6"><a href="#cb229-6" aria-hidden="true" tabindex="-1"></a>'Twas brillig, and the slithy toves</span> +<span id="cb229-7"><a href="#cb229-7" aria-hidden="true" tabindex="-1"></a>Did gyre and gimble in the wabe;</span> +<span id="cb229-8"><a href="#cb229-8" aria-hidden="true" tabindex="-1"></a>All mimsy were the borogoves,</span> +<span id="cb229-9"><a href="#cb229-9" aria-hidden="true" tabindex="-1"></a>And the mome raths outgrabe.</span> +<span id="cb229-10"><a href="#cb229-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb229-11"><a href="#cb229-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb229-12"><a href="#cb229-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hardLineBreaks}</span> +<span id="cb229-13"><a href="#cb229-13" aria-hidden="true" tabindex="-1"></a>'Twas brillig, and the slithy toves</span> +<span id="cb229-14"><a href="#cb229-14" aria-hidden="true" tabindex="-1"></a>Did gyre and gimble in the wabe;</span> +<span id="cb229-15"><a href="#cb229-15" aria-hidden="true" tabindex="-1"></a>All mimsy were the borogoves,</span> +<span id="cb229-16"><a href="#cb229-16" aria-hidden="true" tabindex="-1"></a>And the mome raths outgrabe.</span> +<span id="cb229-17"><a href="#cb229-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb229-18"><a href="#cb229-18" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb229-19"><a href="#cb229-19" 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="cb230"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb230-1"><a href="#cb230-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 text:</p> +<blockquote> +<p>’Twas brillig, and the slithy toves Did gyre and gimble in the wabe; +All mimsy were the borogoves, And the mome raths outgrabe.</p> +<p>’Twas brillig, and the slithy toves Did gyre and gimble in the wabe; +All mimsy were the borogoves, And the mome raths outgrabe.</p> +</blockquote> +<h4 data-number="2.2.1.24" id="option-hashenumerators"><span +class="header-section-number">2.2.1.24</span> Option +<code>hashEnumerators</code></h4> +<dl> +<dt><code>hashEnumerators</code> (default value: +<code>false</code>)</dt> +<dd> <dl> -<dt><code>hashEnumerators</code> (default value: <code>false</code>)</dt> -<dd><dl> <dt>true</dt> -<dd><p>Enable the use of hash symbols (<code>#</code>) as ordered item list markers:</p> -<div class="sourceCode" id="cb227"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb227-1"><a href="#cb227-1" aria-hidden="true"></a>#. Bird</span> -<span id="cb227-2"><a href="#cb227-2" aria-hidden="true"></a>#. McHale</span> -<span id="cb227-3"><a href="#cb227-3" aria-hidden="true"></a>#. Parish</span></code></pre></div> +<dd> +<p>Enable the use of hash symbols (<code>#</code>) as ordered item list +markers:</p> +<div class="sourceCode" id="cb231"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb231-1"><a href="#cb231-1" aria-hidden="true" tabindex="-1"></a>#. Bird</span> +<span id="cb231-2"><a href="#cb231-2" aria-hidden="true" tabindex="-1"></a>#. McHale</span> +<span id="cb231-3"><a href="#cb231-3" aria-hidden="true" tabindex="-1"></a>#. Parish</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the use of hash symbols (<code>#</code>) as ordered item list markers.</p> +<dd> +<p>Disable the use of hash symbols (<code>#</code>) as ordered item list +markers.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-19"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb228"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb228-1"><a href="#cb228-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb228-2"><a href="#cb228-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb228-3"><a href="#cb228-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb228-4"><a href="#cb228-4" aria-hidden="true"></a></span> -<span id="cb228-5"><a href="#cb228-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb228-6"><a href="#cb228-6" aria-hidden="true"></a>#. Bird</span> -<span id="cb228-7"><a href="#cb228-7" aria-hidden="true"></a>#. McHale</span> -<span id="cb228-8"><a href="#cb228-8" aria-hidden="true"></a>#. Parish</span> -<span id="cb228-9"><a href="#cb228-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb228-10"><a href="#cb228-10" aria-hidden="true"></a></span> -<span id="cb228-11"><a href="#cb228-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hashEnumerators}</span> -<span id="cb228-12"><a href="#cb228-12" aria-hidden="true"></a>#. Bird</span> -<span id="cb228-13"><a href="#cb228-13" aria-hidden="true"></a>#. McHale</span> -<span id="cb228-14"><a href="#cb228-14" aria-hidden="true"></a>#. Parish</span> -<span id="cb228-15"><a href="#cb228-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb228-16"><a href="#cb228-16" aria-hidden="true"></a></span> -<span id="cb228-17"><a href="#cb228-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb229"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb229-1"><a href="#cb229-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-20"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb232"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb232-1"><a href="#cb232-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb232-2"><a href="#cb232-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb232-3"><a href="#cb232-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb232-4"><a href="#cb232-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb232-5"><a href="#cb232-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb232-6"><a href="#cb232-6" aria-hidden="true" tabindex="-1"></a>#. Bird</span> +<span id="cb232-7"><a href="#cb232-7" aria-hidden="true" tabindex="-1"></a>#. McHale</span> +<span id="cb232-8"><a href="#cb232-8" aria-hidden="true" tabindex="-1"></a>#. Parish</span> +<span id="cb232-9"><a href="#cb232-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb232-10"><a href="#cb232-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb232-11"><a href="#cb232-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hashEnumerators}</span> +<span id="cb232-12"><a href="#cb232-12" aria-hidden="true" tabindex="-1"></a>#. Bird</span> +<span id="cb232-13"><a href="#cb232-13" aria-hidden="true" tabindex="-1"></a>#. McHale</span> +<span id="cb232-14"><a href="#cb232-14" aria-hidden="true" tabindex="-1"></a>#. Parish</span> +<span id="cb232-15"><a href="#cb232-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb232-16"><a href="#cb232-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb232-17"><a href="#cb232-17" 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="cb233"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb233-1"><a href="#cb233-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 text:</p> <blockquote> <h1 id="bird">. Bird</h1> <h1 id="mchale">. McHale</h1> @@ -2459,28 +3615,33 @@ Thomas,Edison,1847</code></pre> <li>Parish</li> </ol> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-14">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb230"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb230-1"><a href="#cb230-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb230-2"><a href="#cb230-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb230-3"><a href="#cb230-3" aria-hidden="true"></a></span> -<span id="cb230-4"><a href="#cb230-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb230-5"><a href="#cb230-5" aria-hidden="true"></a>#. Bird</span> -<span id="cb230-6"><a href="#cb230-6" aria-hidden="true"></a>#. McHale</span> -<span id="cb230-7"><a href="#cb230-7" aria-hidden="true"></a>#. Parish</span> -<span id="cb230-8"><a href="#cb230-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb230-9"><a href="#cb230-9" aria-hidden="true"></a></span> -<span id="cb230-10"><a href="#cb230-10" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[hashEnumerators = yes]</span> -<span id="cb230-11"><a href="#cb230-11" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb230-12"><a href="#cb230-12" aria-hidden="true"></a>#. Bird</span> -<span id="cb230-13"><a href="#cb230-13" aria-hidden="true"></a>#. McHale</span> -<span id="cb230-14"><a href="#cb230-14" aria-hidden="true"></a>#. Parish</span> -<span id="cb230-15"><a href="#cb230-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb230-16"><a href="#cb230-16" aria-hidden="true"></a></span> -<span id="cb230-17"><a href="#cb230-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb231"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb231-1"><a href="#cb231-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-14">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb234"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb234-1"><a href="#cb234-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb234-2"><a href="#cb234-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb234-3"><a href="#cb234-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb234-4"><a href="#cb234-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb234-5"><a href="#cb234-5" aria-hidden="true" tabindex="-1"></a>#. Bird</span> +<span id="cb234-6"><a href="#cb234-6" aria-hidden="true" tabindex="-1"></a>#. McHale</span> +<span id="cb234-7"><a href="#cb234-7" aria-hidden="true" tabindex="-1"></a>#. Parish</span> +<span id="cb234-8"><a href="#cb234-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb234-9"><a href="#cb234-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb234-10"><a href="#cb234-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hashEnumerators = yes]</span> +<span id="cb234-11"><a href="#cb234-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb234-12"><a href="#cb234-12" aria-hidden="true" tabindex="-1"></a>#. Bird</span> +<span id="cb234-13"><a href="#cb234-13" aria-hidden="true" tabindex="-1"></a>#. McHale</span> +<span id="cb234-14"><a href="#cb234-14" aria-hidden="true" tabindex="-1"></a>#. Parish</span> +<span id="cb234-15"><a href="#cb234-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb234-16"><a href="#cb234-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb234-17"><a href="#cb234-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb235"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb235-1"><a href="#cb235-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <h1 id="bird-1">. Bird</h1> <h1 id="mchale-1">. McHale</h1> @@ -2491,532 +3652,707 @@ Thomas,Edison,1847</code></pre> <li>Parish</li> </ol> </blockquote> -<h4 data-number="2.2.1.23" id="header-attributes"><span class="header-section-number">2.2.1.23</span> Option <code>headerAttributes</code></h4> +<h4 data-number="2.2.1.25" id="header-attributes"><span +class="header-section-number">2.2.1.25</span> Option +<code>headerAttributes</code></h4> +<dl> +<dt><code>headerAttributes</code> (default value: +<code>false</code>)</dt> +<dd> <dl> -<dt><code>headerAttributes</code> (default value: <code>false</code>)</dt> -<dd><dl> <dt>true</dt> -<dd><p>Enable the assignment of HTML attributes to headings:</p> -<div class="sourceCode" id="cb232"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb232-1"><a href="#cb232-1" aria-hidden="true"></a><span class="fu"># My first heading {#foo}</span></span> -<span id="cb232-2"><a href="#cb232-2" aria-hidden="true"></a></span> -<span id="cb232-3"><a href="#cb232-3" aria-hidden="true"></a><span class="fu">## My second heading ## {#bar .baz}</span></span> -<span id="cb232-4"><a href="#cb232-4" aria-hidden="true"></a></span> -<span id="cb232-5"><a href="#cb232-5" aria-hidden="true"></a>Yet another heading {key=value}</span> -<span id="cb232-6"><a href="#cb232-6" aria-hidden="true"></a><span class="fu">===================</span></span></code></pre></div> -<p>These HTML attributes have currently no effect other than enabling <a href="#slice">content slicing</a>.</p> +<dd> +<p>Enable the assignment of HTML attributes to headings:</p> +<div class="sourceCode" id="cb236"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb236-1"><a href="#cb236-1" aria-hidden="true" tabindex="-1"></a><span class="fu"># My first heading {#foo}</span></span> +<span id="cb236-2"><a href="#cb236-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb236-3"><a href="#cb236-3" aria-hidden="true" tabindex="-1"></a><span class="fu">## My second heading ## {#bar .baz}</span></span> +<span id="cb236-4"><a href="#cb236-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb236-5"><a href="#cb236-5" aria-hidden="true" tabindex="-1"></a>Yet another heading {key=value}</span> +<span id="cb236-6"><a href="#cb236-6" aria-hidden="true" tabindex="-1"></a><span class="fu">===================</span></span></code></pre></div> +<p>These HTML attributes have currently no effect other than enabling <a +href="#slice">content slicing</a>.</p> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the assignment of HTML attributes to headings.</p> +<dd> +<p>Disable the assignment of HTML attributes to headings.</p> </dd> </dl> </dd> </dl> -<h4 data-number="2.2.1.24" id="option-html"><span class="header-section-number">2.2.1.24</span> Option <code>html</code></h4> +<h4 data-number="2.2.1.26" id="option-html"><span +class="header-section-number">2.2.1.26</span> Option +<code>html</code></h4> <dl> <dt><code>html</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the recognition of inline HTML tags, block HTML elements, HTML comments, HTML instructions, and entities in the input. Inline HTML tags, block HTML elements and HTML comments will be rendered, HTML instructions will be ignored, and HTML entities will be replaced with the corresponding Unicode codepoints.</p> +<dd> +<p>Enable the recognition of inline HTML tags, block HTML elements, HTML +comments, HTML instructions, and entities in the input. Inline HTML +tags, block HTML elements and HTML comments will be rendered, HTML +instructions will be ignored, and HTML entities will be replaced with +the corresponding Unicode codepoints.</p> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the recognition of HTML markup. Any HTML markup in the input will be rendered as plain text.</p> +<dd> +<p>Disable the recognition of HTML markup. Any HTML markup in the input +will be rendered as plain text.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-9">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb233"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb233-1"><a href="#cb233-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb233-2"><a href="#cb233-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb233-3"><a href="#cb233-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb233-4"><a href="#cb233-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb233-5"><a href="#cb233-5" aria-hidden="true"></a> local convert = markdown.new()</span> -<span id="cb233-6"><a href="#cb233-6" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb233-7"><a href="#cb233-7" aria-hidden="true"></a> local input =</span> -<span id="cb233-8"><a href="#cb233-8" aria-hidden="true"></a> "<div>*There is no block tag support.*</div>" .. newline ..</span> -<span id="cb233-9"><a href="#cb233-9" aria-hidden="true"></a> "*There is no <inline tag="tag"></inline> support.*" .. newline ..</span> -<span id="cb233-10"><a href="#cb233-10" aria-hidden="true"></a> "_There is no <!-- comment --> support._" .. newline ..</span> -<span id="cb233-11"><a href="#cb233-11" aria-hidden="true"></a> "_There is no <? HTML instruction ?> support._"</span> -<span id="cb233-12"><a href="#cb233-12" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb233-13"><a href="#cb233-13" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb233-14"><a href="#cb233-14" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb233-15"><a href="#cb233-15" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb233-16"><a href="#cb233-16" aria-hidden="true"></a> local convert = markdown.new({html = true})</span> -<span id="cb233-17"><a href="#cb233-17" aria-hidden="true"></a> local input =</span> -<span id="cb233-18"><a href="#cb233-18" aria-hidden="true"></a> "<div>*There is block tag support.*</div>" .. newline ..</span> -<span id="cb233-19"><a href="#cb233-19" aria-hidden="true"></a> "*There is <inline tag="tag"></inline> support.*" .. newline ..</span> -<span id="cb233-20"><a href="#cb233-20" aria-hidden="true"></a> "_There is <!-- comment --> support._" .. newline ..</span> -<span id="cb233-21"><a href="#cb233-21" aria-hidden="true"></a> "_There is <? HTML instruction ?> support._"</span> -<span id="cb233-22"><a href="#cb233-22" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb233-23"><a href="#cb233-23" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 class="unnumbered" id="lua-module-example-9">Lua Module Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb237"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb237-1"><a href="#cb237-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb237-2"><a href="#cb237-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb237-3"><a href="#cb237-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb237-4"><a href="#cb237-4" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb237-5"><a href="#cb237-5" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new()</span> +<span id="cb237-6"><a href="#cb237-6" aria-hidden="true" tabindex="-1"></a> local newline = [[^^J^^J]]</span> +<span id="cb237-7"><a href="#cb237-7" aria-hidden="true" tabindex="-1"></a> local input =</span> +<span id="cb237-8"><a href="#cb237-8" aria-hidden="true" tabindex="-1"></a> "<div>*There is no block tag support.*</div>" .. newline ..</span> +<span id="cb237-9"><a href="#cb237-9" aria-hidden="true" tabindex="-1"></a> "*There is no <inline tag="tag"></inline> support.*" .. newline ..</span> +<span id="cb237-10"><a href="#cb237-10" aria-hidden="true" tabindex="-1"></a> "_There is no <!-- comment --> support._" .. newline ..</span> +<span id="cb237-11"><a href="#cb237-11" aria-hidden="true" tabindex="-1"></a> "_There is no <? HTML instruction ?> support._"</span> +<span id="cb237-12"><a href="#cb237-12" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb237-13"><a href="#cb237-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span> +<span id="cb237-14"><a href="#cb237-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb237-15"><a href="#cb237-15" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb237-16"><a href="#cb237-16" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new({html = true})</span> +<span id="cb237-17"><a href="#cb237-17" aria-hidden="true" tabindex="-1"></a> local input =</span> +<span id="cb237-18"><a href="#cb237-18" aria-hidden="true" tabindex="-1"></a> "<div>*There is block tag support.*</div>" .. newline ..</span> +<span id="cb237-19"><a href="#cb237-19" aria-hidden="true" tabindex="-1"></a> "*There is <inline tag="tag"></inline> support.*" .. newline ..</span> +<span id="cb237-20"><a href="#cb237-20" aria-hidden="true" tabindex="-1"></a> "_There is <!-- comment --> support._" .. newline ..</span> +<span id="cb237-21"><a href="#cb237-21" aria-hidden="true" tabindex="-1"></a> "_There is <? HTML instruction ?> support._"</span> +<span id="cb237-22"><a href="#cb237-22" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb237-23"><a href="#cb237-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb234"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb234-1"><a href="#cb234-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> +<div class="sourceCode" id="cb238"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb238-1"><a href="#cb238-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:</p> +<blockquote> +<p><div>There is no block tag support.</div> There is no +<inline tag=”tag”></inline> support. There is no <!– +comment –> support. There is no <? HTML instruction ?> +support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-7">Lua CLI Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb235"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb235-1"><a href="#cb235-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb235-2"><a href="#cb235-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb235-3"><a href="#cb235-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb235-4"><a href="#cb235-4" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb235-5"><a href="#cb235-5" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb235-6"><a href="#cb235-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb236"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb236-1"><a href="#cb236-1" aria-hidden="true"></a><span class="kw"><div></span></span> -<span id="cb236-2"><a href="#cb236-2" aria-hidden="true"></a>*Is there block tag support?*</span> -<span id="cb236-3"><a href="#cb236-3" aria-hidden="true"></a><span class="kw"></div></span></span> -<span id="cb236-4"><a href="#cb236-4" aria-hidden="true"></a>*Is there <span class="kw"><inline</span><span class="ot"> tag=</span><span class="st">"tag"</span><span class="kw">></inline></span> support?*</span> -<span id="cb236-5"><a href="#cb236-5" aria-hidden="true"></a>_Is there <span class="co"><!-- comment --></span> support?_</span> -<span id="cb236-6"><a href="#cb236-6" aria-hidden="true"></a>_Is there <span class="kw"><?</span> HTML instruction <span class="kw">?></span> support?_</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb237"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb237-1"><a href="#cb237-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb237-2"><a href="#cb237-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ html=true -- content.md optiontrue.tex</span> -<span id="cb237-3"><a href="#cb237-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p><div>Is there block tag support?</div> Is there <inline tag=”tag”></inline> support? Is there <!– comment –> support? Is there <? HTML instruction ?> support?</p> +<h5 class="unnumbered" id="lua-cli-example-7">Lua CLI Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb239"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb239-1"><a href="#cb239-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb239-2"><a href="#cb239-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb239-3"><a href="#cb239-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb239-4"><a href="#cb239-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span> +<span id="cb239-5"><a href="#cb239-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb239-6"><a href="#cb239-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>content.md</code> with the following content:</p> +<div class="sourceCode" id="cb240"><pre +class="sourceCode html"><code class="sourceCode html"><span id="cb240-1"><a href="#cb240-1" aria-hidden="true" tabindex="-1"></a><span class="kw"><div></span></span> +<span id="cb240-2"><a href="#cb240-2" aria-hidden="true" tabindex="-1"></a>*Is there block tag support?*</span> +<span id="cb240-3"><a href="#cb240-3" aria-hidden="true" tabindex="-1"></a><span class="kw"></div></span></span> +<span id="cb240-4"><a href="#cb240-4" aria-hidden="true" tabindex="-1"></a>*Is there <span class="kw"><inline</span> <span class="er">tag</span><span class="ot">=</span><span class="st">"tag"</span><span class="kw">></inline></span> support?*</span> +<span id="cb240-5"><a href="#cb240-5" aria-hidden="true" tabindex="-1"></a>_Is there <span class="co"><!-- comment --></span> support?_</span> +<span id="cb240-6"><a href="#cb240-6" aria-hidden="true" tabindex="-1"></a>_Is there <span class="kw"><?</span> HTML instruction <span class="kw">?></span> support?_</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb241"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb241-1"><a href="#cb241-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span> +<span id="cb241-2"><a href="#cb241-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ html=true <span class="at">--</span> content.md optiontrue.tex</span> +<span id="cb241-3"><a href="#cb241-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<p><div>Is there block tag support?</div> Is there +<inline tag=”tag”></inline> support? Is there <!– comment +–> support? Is there <? HTML instruction ?> support?</p> <p>Is there support? Is there support? Is there support?</p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-8">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb238"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb238-1"><a href="#cb238-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb238-2"><a href="#cb238-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb238-3"><a href="#cb238-3" aria-hidden="true"></a></span> -<span id="cb238-4"><a href="#cb238-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb238-5"><a href="#cb238-5" aria-hidden="true"></a><div></span> -<span id="cb238-6"><a href="#cb238-6" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb238-7"><a href="#cb238-7" aria-hidden="true"></a></div></span> -<span id="cb238-8"><a href="#cb238-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb238-9"><a href="#cb238-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb238-10"><a href="#cb238-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb238-11"><a href="#cb238-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb238-12"><a href="#cb238-12" aria-hidden="true"></a></span> -<span id="cb238-13"><a href="#cb238-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> -<span id="cb238-14"><a href="#cb238-14" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb238-15"><a href="#cb238-15" aria-hidden="true"></a><div></span> -<span id="cb238-16"><a href="#cb238-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb238-17"><a href="#cb238-17" aria-hidden="true"></a></div></span> -<span id="cb238-18"><a href="#cb238-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb238-19"><a href="#cb238-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb238-20"><a href="#cb238-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb238-21"><a href="#cb238-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb238-22"><a href="#cb238-22" aria-hidden="true"></a></span> -<span id="cb238-23"><a href="#cb238-23" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb239"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb239-1"><a href="#cb239-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> +<h5 class="unnumbered" id="plain-tex-example-8">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb242"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb242-1"><a href="#cb242-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb242-2"><a href="#cb242-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb242-3"><a href="#cb242-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb242-4"><a href="#cb242-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb242-5"><a href="#cb242-5" aria-hidden="true" tabindex="-1"></a><div></span> +<span id="cb242-6"><a href="#cb242-6" aria-hidden="true" tabindex="-1"></a>*There is no block tag support.*</span> +<span id="cb242-7"><a href="#cb242-7" aria-hidden="true" tabindex="-1"></a></div></span> +<span id="cb242-8"><a href="#cb242-8" aria-hidden="true" tabindex="-1"></a>*There is no <inline tag="tag"></inline> support.*</span> +<span id="cb242-9"><a href="#cb242-9" aria-hidden="true" tabindex="-1"></a>_There is no <!-- comment --> support._</span> +<span id="cb242-10"><a href="#cb242-10" aria-hidden="true" tabindex="-1"></a>_There is no <? HTML instruction ?> support._</span> +<span id="cb242-11"><a href="#cb242-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb242-12"><a href="#cb242-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb242-13"><a href="#cb242-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> +<span id="cb242-14"><a href="#cb242-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb242-15"><a href="#cb242-15" aria-hidden="true" tabindex="-1"></a><div></span> +<span id="cb242-16"><a href="#cb242-16" aria-hidden="true" tabindex="-1"></a>*There is block tag support.*</span> +<span id="cb242-17"><a href="#cb242-17" aria-hidden="true" tabindex="-1"></a></div></span> +<span id="cb242-18"><a href="#cb242-18" aria-hidden="true" tabindex="-1"></a>*There is <inline tag="tag"></inline> support.*</span> +<span id="cb242-19"><a href="#cb242-19" aria-hidden="true" tabindex="-1"></a>_There is <!-- comment --> support._</span> +<span id="cb242-20"><a href="#cb242-20" aria-hidden="true" tabindex="-1"></a>_There is <? HTML instruction ?> support._</span> +<span id="cb242-21"><a href="#cb242-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb242-22"><a href="#cb242-22" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb242-23"><a href="#cb242-23" 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="cb243"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb243-1"><a href="#cb243-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:</p> +<blockquote> +<p><div>There is no block tag support.</div> There is no +<inline tag=”tag”></inline> support. There is no <!– +comment –> support. There is no <? HTML instruction ?> +support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-20"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb240"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb240-1"><a href="#cb240-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb240-2"><a href="#cb240-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb240-3"><a href="#cb240-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb240-4"><a href="#cb240-4" aria-hidden="true"></a></span> -<span id="cb240-5"><a href="#cb240-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb240-6"><a href="#cb240-6" aria-hidden="true"></a><div></span> -<span id="cb240-7"><a href="#cb240-7" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb240-8"><a href="#cb240-8" aria-hidden="true"></a></div></span> -<span id="cb240-9"><a href="#cb240-9" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb240-10"><a href="#cb240-10" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb240-11"><a href="#cb240-11" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb240-12"><a href="#cb240-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb240-13"><a href="#cb240-13" aria-hidden="true"></a></span> -<span id="cb240-14"><a href="#cb240-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{html}</span> -<span id="cb240-15"><a href="#cb240-15" aria-hidden="true"></a><div></span> -<span id="cb240-16"><a href="#cb240-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb240-17"><a href="#cb240-17" aria-hidden="true"></a></div></span> -<span id="cb240-18"><a href="#cb240-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb240-19"><a href="#cb240-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb240-20"><a href="#cb240-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb240-21"><a href="#cb240-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb240-22"><a href="#cb240-22" aria-hidden="true"></a></span> -<span id="cb240-23"><a href="#cb240-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb241"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb241-1"><a href="#cb241-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> +<h5 class="unnumbered" id="latex-example-21"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb244"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb244-1"><a href="#cb244-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb244-2"><a href="#cb244-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb244-3"><a href="#cb244-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb244-4"><a href="#cb244-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb244-5"><a href="#cb244-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb244-6"><a href="#cb244-6" aria-hidden="true" tabindex="-1"></a><div></span> +<span id="cb244-7"><a href="#cb244-7" aria-hidden="true" tabindex="-1"></a>*There is no block tag support.*</span> +<span id="cb244-8"><a href="#cb244-8" aria-hidden="true" tabindex="-1"></a></div></span> +<span id="cb244-9"><a href="#cb244-9" aria-hidden="true" tabindex="-1"></a>*There is no <inline tag="tag"></inline> support.*</span> +<span id="cb244-10"><a href="#cb244-10" aria-hidden="true" tabindex="-1"></a>_There is no <!-- comment --> support._</span> +<span id="cb244-11"><a href="#cb244-11" aria-hidden="true" tabindex="-1"></a>_There is no <? HTML instruction ?> support._</span> +<span id="cb244-12"><a href="#cb244-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb244-13"><a href="#cb244-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb244-14"><a href="#cb244-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{html}</span> +<span id="cb244-15"><a href="#cb244-15" aria-hidden="true" tabindex="-1"></a><div></span> +<span id="cb244-16"><a href="#cb244-16" aria-hidden="true" tabindex="-1"></a>*There is block tag support.*</span> +<span id="cb244-17"><a href="#cb244-17" aria-hidden="true" tabindex="-1"></a></div></span> +<span id="cb244-18"><a href="#cb244-18" aria-hidden="true" tabindex="-1"></a>*There is <inline tag="tag"></inline> support.*</span> +<span id="cb244-19"><a href="#cb244-19" aria-hidden="true" tabindex="-1"></a>_There is <!-- comment --> support._</span> +<span id="cb244-20"><a href="#cb244-20" aria-hidden="true" tabindex="-1"></a>_There is <? HTML instruction ?> support._</span> +<span id="cb244-21"><a href="#cb244-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb244-22"><a href="#cb244-22" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb244-23"><a href="#cb244-23" 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="cb245"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb245-1"><a href="#cb245-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 text:</p> +<blockquote> +<p><div>There is no block tag support.</div> There is no +<inline tag=”tag”></inline> support. There is no <!– +comment –> support. There is no <? HTML instruction ?> +support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-15">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb242"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb242-1"><a href="#cb242-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb242-2"><a href="#cb242-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb242-3"><a href="#cb242-3" aria-hidden="true"></a></span> -<span id="cb242-4"><a href="#cb242-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb242-5"><a href="#cb242-5" aria-hidden="true"></a><div></span> -<span id="cb242-6"><a href="#cb242-6" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb242-7"><a href="#cb242-7" aria-hidden="true"></a></div></span> -<span id="cb242-8"><a href="#cb242-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb242-9"><a href="#cb242-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb242-10"><a href="#cb242-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb242-11"><a href="#cb242-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb242-12"><a href="#cb242-12" aria-hidden="true"></a></span> -<span id="cb242-13"><a href="#cb242-13" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[html = yes]</span> -<span id="cb242-14"><a href="#cb242-14" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb242-15"><a href="#cb242-15" aria-hidden="true"></a><div></span> -<span id="cb242-16"><a href="#cb242-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb242-17"><a href="#cb242-17" aria-hidden="true"></a></div></span> -<span id="cb242-18"><a href="#cb242-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb242-19"><a href="#cb242-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb242-20"><a href="#cb242-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb242-21"><a href="#cb242-21" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb242-22"><a href="#cb242-22" aria-hidden="true"></a></span> -<span id="cb242-23"><a href="#cb242-23" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb243"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb243-1"><a href="#cb243-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> +<h5 class="unnumbered" id="context-example-15">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb246"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb246-1"><a href="#cb246-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb246-2"><a href="#cb246-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb246-3"><a href="#cb246-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb246-4"><a href="#cb246-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb246-5"><a href="#cb246-5" aria-hidden="true" tabindex="-1"></a><div></span> +<span id="cb246-6"><a href="#cb246-6" aria-hidden="true" tabindex="-1"></a>*There is no block tag support.*</span> +<span id="cb246-7"><a href="#cb246-7" aria-hidden="true" tabindex="-1"></a></div></span> +<span id="cb246-8"><a href="#cb246-8" aria-hidden="true" tabindex="-1"></a>*There is no <inline tag="tag"></inline> support.*</span> +<span id="cb246-9"><a href="#cb246-9" aria-hidden="true" tabindex="-1"></a>_There is no <!-- comment --> support._</span> +<span id="cb246-10"><a href="#cb246-10" aria-hidden="true" tabindex="-1"></a>_There is no <? HTML instruction ?> support._</span> +<span id="cb246-11"><a href="#cb246-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb246-12"><a href="#cb246-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb246-13"><a href="#cb246-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[html = yes]</span> +<span id="cb246-14"><a href="#cb246-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb246-15"><a href="#cb246-15" aria-hidden="true" tabindex="-1"></a><div></span> +<span id="cb246-16"><a href="#cb246-16" aria-hidden="true" tabindex="-1"></a>*There is block tag support.*</span> +<span id="cb246-17"><a href="#cb246-17" aria-hidden="true" tabindex="-1"></a></div></span> +<span id="cb246-18"><a href="#cb246-18" aria-hidden="true" tabindex="-1"></a>*There is <inline tag="tag"></inline> support.*</span> +<span id="cb246-19"><a href="#cb246-19" aria-hidden="true" tabindex="-1"></a>_There is <!-- comment --> support._</span> +<span id="cb246-20"><a href="#cb246-20" aria-hidden="true" tabindex="-1"></a>_There is <? HTML instruction ?> support._</span> +<span id="cb246-21"><a href="#cb246-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb246-22"><a href="#cb246-22" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb246-23"><a href="#cb246-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb247"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb247-1"><a href="#cb247-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<p><div>There is no block tag support.</div> There is no +<inline tag=”tag”></inline> support. There is no <!– +comment –> support. There is no <? HTML instruction ?> +support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h4 data-number="2.2.1.25" id="option-hybrid"><span class="header-section-number">2.2.1.25</span> Option <code>hybrid</code></h4> +<h4 data-number="2.2.1.27" id="option-hybrid"><span +class="header-section-number">2.2.1.27</span> Option +<code>hybrid</code></h4> <dl> <dt><code>hybrid</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Disable the escaping of special plain <span class="tex">T<sub>e</sub>X</span> characters, which makes it possible to intersperse your markdown markup with <span class="tex">T<sub>e</sub>X</span> code. The intended usage is in documents prepared manually by a human author. In such documents, it can often be desirable to mix <span class="tex">T<sub>e</sub>X</span> and markdown markup freely.</p> +<dd> +<p>Disable the escaping of special plain <span +class="tex">T<sub>e</sub>X</span> characters, which makes it possible to +intersperse your markdown markup with <span +class="tex">T<sub>e</sub>X</span> code. The intended usage is in +documents prepared manually by a human author. In such documents, it can +often be desirable to mix <span class="tex">T<sub>e</sub>X</span> and +markdown markup freely.</p> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Enable the escaping of special plain <span class="tex">T<sub>e</sub>X</span> characters outside verbatim environments, so that they are not interpretted by <span class="tex">T<sub>e</sub>X</span>. This is encouraged when typesetting automatically generated content or markdown documents that were not prepared with this package in mind.</p> +<dd> +<p>Enable the escaping of special plain <span +class="tex">T<sub>e</sub>X</span> characters outside verbatim +environments, so that they are not interpretted by <span +class="tex">T<sub>e</sub>X</span>. This is encouraged when typesetting +automatically generated content or markdown documents that were not +prepared with this package in mind.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-10">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb244"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb244-1"><a href="#cb244-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb244-2"><a href="#cb244-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb244-3"><a href="#cb244-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb244-4"><a href="#cb244-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb244-5"><a href="#cb244-5" aria-hidden="true"></a> local input, convert_safe, convert_unsafe, paragraph</span> -<span id="cb244-6"><a href="#cb244-6" aria-hidden="true"></a></span> -<span id="cb244-7"><a href="#cb244-7" aria-hidden="true"></a> input = [[<span class="ss">$</span><span class="sc">\string\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.]]</span> -<span id="cb244-8"><a href="#cb244-8" aria-hidden="true"></a> convert_safe = markdown.new()</span> -<span id="cb244-9"><a href="#cb244-9" aria-hidden="true"></a> convert_unsafe = markdown.new({hybrid = true})</span> -<span id="cb244-10"><a href="#cb244-10" aria-hidden="true"></a> paragraph = [[<span class="fu">\par</span>]]</span> -<span id="cb244-11"><a href="#cb244-11" aria-hidden="true"></a></span> -<span id="cb244-12"><a href="#cb244-12" aria-hidden="true"></a> tex.sprint(</span> -<span id="cb244-13"><a href="#cb244-13" aria-hidden="true"></a> convert_safe(input) .. paragraph ..</span> -<span id="cb244-14"><a href="#cb244-14" aria-hidden="true"></a> convert_unsafe(input)</span> -<span id="cb244-15"><a href="#cb244-15" aria-hidden="true"></a> )</span> -<span id="cb244-16"><a href="#cb244-16" aria-hidden="true"></a>}</span> -<span id="cb244-17"><a href="#cb244-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 class="unnumbered" id="lua-module-example-10">Lua Module +Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb248"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb248-1"><a href="#cb248-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb248-2"><a href="#cb248-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb248-3"><a href="#cb248-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb248-4"><a href="#cb248-4" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb248-5"><a href="#cb248-5" aria-hidden="true" tabindex="-1"></a> local input, convert_safe, convert_unsafe, paragraph</span> +<span id="cb248-6"><a href="#cb248-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb248-7"><a href="#cb248-7" aria-hidden="true" tabindex="-1"></a> input = [[<span class="ss">$</span><span class="sc">\string\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.]]</span> +<span id="cb248-8"><a href="#cb248-8" aria-hidden="true" tabindex="-1"></a> convert_safe = markdown.new()</span> +<span id="cb248-9"><a href="#cb248-9" aria-hidden="true" tabindex="-1"></a> convert_unsafe = markdown.new({hybrid = true})</span> +<span id="cb248-10"><a href="#cb248-10" aria-hidden="true" tabindex="-1"></a> paragraph = [[<span class="fu">\par</span>]]</span> +<span id="cb248-11"><a href="#cb248-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb248-12"><a href="#cb248-12" aria-hidden="true" tabindex="-1"></a> tex.sprint(</span> +<span id="cb248-13"><a href="#cb248-13" aria-hidden="true" tabindex="-1"></a> convert_safe(input) .. paragraph ..</span> +<span id="cb248-14"><a href="#cb248-14" aria-hidden="true" tabindex="-1"></a> convert_unsafe(input)</span> +<span id="cb248-15"><a href="#cb248-15" aria-hidden="true" tabindex="-1"></a> )</span> +<span id="cb248-16"><a href="#cb248-16" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb248-17"><a href="#cb248-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb245"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb245-1"><a href="#cb245-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb249"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb249-1"><a href="#cb249-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:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-8">Lua CLI Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb246"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb246-1"><a href="#cb246-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb246-2"><a href="#cb246-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb246-3"><a href="#cb246-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb246-4"><a href="#cb246-4" aria-hidden="true"></a></span> -<span id="cb246-5"><a href="#cb246-5" aria-hidden="true"></a><span class="fu">\begingroup</span></span> -<span id="cb246-6"><a href="#cb246-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> -<span id="cb246-7"><a href="#cb246-7" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb246-8"><a href="#cb246-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> -<span id="cb246-9"><a href="#cb246-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb247"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb247-1"><a href="#cb247-1" aria-hidden="true"></a>$\sqrt{-1}$ *equals* $i$.</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb248"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb248-1"><a href="#cb248-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb248-2"><a href="#cb248-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- content.md optiontrue.tex</span> -<span id="cb248-3"><a href="#cb248-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="lua-cli-example-8">Lua CLI Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb250"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb250-1"><a href="#cb250-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb250-2"><a href="#cb250-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb250-3"><a href="#cb250-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb250-4"><a href="#cb250-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb250-5"><a href="#cb250-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\begingroup</span></span> +<span id="cb250-6"><a href="#cb250-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> +<span id="cb250-7"><a href="#cb250-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb250-8"><a href="#cb250-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\endgroup</span></span> +<span id="cb250-9"><a href="#cb250-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>content.md</code> with the following content:</p> +<div class="sourceCode" id="cb251"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb251-1"><a href="#cb251-1" aria-hidden="true" tabindex="-1"></a>$\sqrt{-1}$ *equals* $i$.</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb252"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb252-1"><a href="#cb252-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span> +<span id="cb252-2"><a href="#cb252-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true <span class="at">--</span> content.md optiontrue.tex</span> +<span id="cb252-3"><a href="#cb252-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-9">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb249"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb249-1"><a href="#cb249-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb249-2"><a href="#cb249-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb249-3"><a href="#cb249-3" aria-hidden="true"></a></span> -<span id="cb249-4"><a href="#cb249-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb249-5"><a href="#cb249-5" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb249-6"><a href="#cb249-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb249-7"><a href="#cb249-7" aria-hidden="true"></a></span> -<span id="cb249-8"><a href="#cb249-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb249-9"><a href="#cb249-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb249-10"><a href="#cb249-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb249-11"><a href="#cb249-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb249-12"><a href="#cb249-12" aria-hidden="true"></a></span> -<span id="cb249-13"><a href="#cb249-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb250"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb250-1"><a href="#cb250-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="plain-tex-example-9">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb253"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb253-1"><a href="#cb253-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb253-2"><a href="#cb253-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb253-3"><a href="#cb253-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb253-4"><a href="#cb253-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb253-5"><a href="#cb253-5" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb253-6"><a href="#cb253-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb253-7"><a href="#cb253-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb253-8"><a href="#cb253-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb253-9"><a href="#cb253-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb253-10"><a href="#cb253-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb253-11"><a href="#cb253-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb253-12"><a href="#cb253-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb253-13"><a href="#cb253-13" 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="cb254"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb254-1"><a href="#cb254-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:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-21"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb251"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb251-1"><a href="#cb251-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb251-2"><a href="#cb251-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb251-3"><a href="#cb251-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb251-4"><a href="#cb251-4" aria-hidden="true"></a></span> -<span id="cb251-5"><a href="#cb251-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb251-6"><a href="#cb251-6" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb251-7"><a href="#cb251-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb251-8"><a href="#cb251-8" aria-hidden="true"></a></span> -<span id="cb251-9"><a href="#cb251-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> -<span id="cb251-10"><a href="#cb251-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb251-11"><a href="#cb251-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb251-12"><a href="#cb251-12" aria-hidden="true"></a></span> -<span id="cb251-13"><a href="#cb251-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb252"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb252-1"><a href="#cb252-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-22"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb255"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb255-1"><a href="#cb255-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb255-2"><a href="#cb255-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb255-3"><a href="#cb255-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb255-4"><a href="#cb255-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb255-5"><a href="#cb255-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb255-6"><a href="#cb255-6" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb255-7"><a href="#cb255-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb255-8"><a href="#cb255-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb255-9"><a href="#cb255-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> +<span id="cb255-10"><a href="#cb255-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb255-11"><a href="#cb255-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb255-12"><a href="#cb255-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb255-13"><a href="#cb255-13" 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="cb256"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb256-1"><a href="#cb256-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 text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-16">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb253"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb253-1"><a href="#cb253-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb253-2"><a href="#cb253-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb253-3"><a href="#cb253-3" aria-hidden="true"></a></span> -<span id="cb253-4"><a href="#cb253-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb253-5"><a href="#cb253-5" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb253-6"><a href="#cb253-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb253-7"><a href="#cb253-7" aria-hidden="true"></a></span> -<span id="cb253-8"><a href="#cb253-8" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span> -<span id="cb253-9"><a href="#cb253-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb253-10"><a href="#cb253-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb253-11"><a href="#cb253-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb253-12"><a href="#cb253-12" aria-hidden="true"></a></span> -<span id="cb253-13"><a href="#cb253-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb254"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb254-1"><a href="#cb254-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-16">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb257"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb257-1"><a href="#cb257-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb257-2"><a href="#cb257-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb257-3"><a href="#cb257-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb257-4"><a href="#cb257-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb257-5"><a href="#cb257-5" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb257-6"><a href="#cb257-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb257-7"><a href="#cb257-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb257-8"><a href="#cb257-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span> +<span id="cb257-9"><a href="#cb257-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb257-10"><a href="#cb257-10" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb257-11"><a href="#cb257-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb257-12"><a href="#cb257-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb257-13"><a href="#cb257-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb258"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb258-1"><a href="#cb258-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h4 data-number="2.2.1.26" id="option-inlinefootnotes"><span class="header-section-number">2.2.1.26</span> Option <code>inlineFootnotes</code></h4> +<h4 data-number="2.2.1.28" id="option-inlinefootnotes"><span +class="header-section-number">2.2.1.28</span> Option +<code>inlineFootnotes</code></h4> +<dl> +<dt><code>inlineFootnotes</code> (default value: +<code>false</code>)</dt> +<dd> <dl> -<dt><code>inlineFootnotes</code> (default value: <code>false</code>)</dt> -<dd><dl> <dt>true</dt> -<dd><p>Enable the Pandoc inline footnote syntax extension:</p> -<div class="sourceCode" id="cb255"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb255-1"><a href="#cb255-1" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb255-2"><a href="#cb255-2" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb255-3"><a href="#cb255-3" aria-hidden="true"></a>move down to type the note.]</span></code></pre></div> +<dd> +<p>Enable the Pandoc inline footnote syntax extension:</p> +<div class="sourceCode" id="cb259"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb259-1"><a href="#cb259-1" aria-hidden="true" tabindex="-1"></a>Here is an inline note.^[Inlines notes are easier to</span> +<span id="cb259-2"><a href="#cb259-2" aria-hidden="true" tabindex="-1"></a>write, since you don't have to pick an identifier and</span> +<span id="cb259-3"><a href="#cb259-3" aria-hidden="true" tabindex="-1"></a>move down to type the note.]</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the Pandoc inline footnote syntax extension.</p> +<dd> +<p>Disable the Pandoc inline footnote syntax extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-22"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb256"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb256-1"><a href="#cb256-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb256-2"><a href="#cb256-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[inlineFootnotes]{<span class="ex">markdown</span>}</span> -<span id="cb256-3"><a href="#cb256-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb256-4"><a href="#cb256-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb256-5"><a href="#cb256-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb256-6"><a href="#cb256-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb256-7"><a href="#cb256-7" aria-hidden="true"></a>move down to type the note.]</span> -<span id="cb256-8"><a href="#cb256-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb256-9"><a href="#cb256-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb257"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb257-1"><a href="#cb257-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>Here is an inline note.<a href="#fn5" class="footnote-ref" id="fnref5" role="doc-noteref"><sup>5</sup></a></p> -</blockquote> -<h5 class="unnumbered" data-number="" id="context-example-17">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb258"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb258-1"><a href="#cb258-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb258-2"><a href="#cb258-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[inlineFootnotes = yes]</span> -<span id="cb258-3"><a href="#cb258-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb258-4"><a href="#cb258-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb258-5"><a href="#cb258-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb258-6"><a href="#cb258-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb258-7"><a href="#cb258-7" aria-hidden="true"></a>move down to type the note.]</span> -<span id="cb258-8"><a href="#cb258-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb258-9"><a href="#cb258-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb259"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb259-1"><a href="#cb259-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>Here is an inline note.<a href="#fn6" class="footnote-ref" id="fnref6" role="doc-noteref"><sup>6</sup></a></p> -</blockquote> -<h4 data-number="2.2.1.27" id="option-jekylldata"><span class="header-section-number">2.2.1.27</span> Option <code>jekyllData</code></h4> +<h5 class="unnumbered" id="latex-example-23"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb260"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb260-1"><a href="#cb260-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb260-2"><a href="#cb260-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[inlineFootnotes]{<span class="ex">markdown</span>}</span> +<span id="cb260-3"><a href="#cb260-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb260-4"><a href="#cb260-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb260-5"><a href="#cb260-5" aria-hidden="true" tabindex="-1"></a>Here is an inline note.^[Inlines notes are easier to</span> +<span id="cb260-6"><a href="#cb260-6" aria-hidden="true" tabindex="-1"></a>write, since you don't have to pick an identifier and</span> +<span id="cb260-7"><a href="#cb260-7" aria-hidden="true" tabindex="-1"></a>move down to type the note.]</span> +<span id="cb260-8"><a href="#cb260-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb260-9"><a href="#cb260-9" 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="cb261"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb261-1"><a href="#cb261-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 text:</p> +<blockquote> +<p>Here is an inline note.<a href="#fn5" class="footnote-ref" +id="fnref5" role="doc-noteref"><sup>5</sup></a></p> +</blockquote> +<h5 class="unnumbered" id="context-example-17">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb262"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb262-1"><a href="#cb262-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb262-2"><a href="#cb262-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[inlineFootnotes = yes]</span> +<span id="cb262-3"><a href="#cb262-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb262-4"><a href="#cb262-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb262-5"><a href="#cb262-5" aria-hidden="true" tabindex="-1"></a>Here is an inline note.^[Inlines notes are easier to</span> +<span id="cb262-6"><a href="#cb262-6" aria-hidden="true" tabindex="-1"></a>write, since you don't have to pick an identifier and</span> +<span id="cb262-7"><a href="#cb262-7" aria-hidden="true" tabindex="-1"></a>move down to type the note.]</span> +<span id="cb262-8"><a href="#cb262-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb262-9"><a href="#cb262-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb263"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb263-1"><a href="#cb263-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<p>Here is an inline note.<a href="#fn6" class="footnote-ref" +id="fnref6" role="doc-noteref"><sup>6</sup></a></p> +</blockquote> +<h4 data-number="2.2.1.29" id="option-jekylldata"><span +class="header-section-number">2.2.1.29</span> Option +<code>jekyllData</code></h4> <dl> <dt><code>jekyllData</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the Pandoc <code>yaml_metadata_block</code> syntax extension for entering metadata in <abbr>yaml</abbr>:</p> -<div class="sourceCode" id="cb260"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb260-1"><a href="#cb260-1" aria-hidden="true"></a><span class="pp">---</span></span> -<span id="cb260-2"><a href="#cb260-2" aria-hidden="true"></a><span class="fu">title</span><span class="kw">:</span><span class="at"> </span><span class="st">'This is the title: it contains a colon'</span></span> -<span id="cb260-3"><a href="#cb260-3" aria-hidden="true"></a><span class="fu">author</span><span class="kw">:</span></span> -<span id="cb260-4"><a href="#cb260-4" aria-hidden="true"></a><span class="kw">-</span><span class="at"> Author One</span></span> -<span id="cb260-5"><a href="#cb260-5" aria-hidden="true"></a><span class="kw">-</span><span class="at"> Author Two</span></span> -<span id="cb260-6"><a href="#cb260-6" aria-hidden="true"></a><span class="fu">keywords</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">nothing</span><span class="kw">,</span><span class="at"> nothingness</span><span class="kw">]</span></span> -<span id="cb260-7"><a href="#cb260-7" aria-hidden="true"></a><span class="fu">abstract</span><span class="kw">: </span><span class="ch">|</span></span> -<span id="cb260-8"><a href="#cb260-8" aria-hidden="true"></a> This is the abstract.</span> -<span id="cb260-9"><a href="#cb260-9" aria-hidden="true"></a></span> -<span id="cb260-10"><a href="#cb260-10" aria-hidden="true"></a> It consists of two paragraphs.</span> -<span id="cb260-11"><a href="#cb260-11" aria-hidden="true"></a><span class="pp">---</span></span></code></pre></div> +<dd> +<p>Enable the Pandoc <code>yaml_metadata_block</code> syntax extension +for entering metadata in <abbr>yaml</abbr>:</p> +<div class="sourceCode" id="cb264"><pre +class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb264-1"><a href="#cb264-1" aria-hidden="true" tabindex="-1"></a><span class="pp">---</span></span> +<span id="cb264-2"><a href="#cb264-2" aria-hidden="true" tabindex="-1"></a><span class="fu">title</span><span class="kw">:</span><span class="at"> </span><span class="st">'This is the title: it contains a colon'</span></span> +<span id="cb264-3"><a href="#cb264-3" aria-hidden="true" tabindex="-1"></a><span class="fu">author</span><span class="kw">:</span></span> +<span id="cb264-4"><a href="#cb264-4" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> Author One</span></span> +<span id="cb264-5"><a href="#cb264-5" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> Author Two</span></span> +<span id="cb264-6"><a href="#cb264-6" aria-hidden="true" tabindex="-1"></a><span class="fu">keywords</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">nothing</span><span class="kw">,</span><span class="at"> nothingness</span><span class="kw">]</span></span> +<span id="cb264-7"><a href="#cb264-7" aria-hidden="true" tabindex="-1"></a><span class="fu">abstract</span><span class="kw">: </span><span class="ch">|</span></span> +<span id="cb264-8"><a href="#cb264-8" aria-hidden="true" tabindex="-1"></a> This is the abstract.</span> +<span id="cb264-9"><a href="#cb264-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb264-10"><a href="#cb264-10" aria-hidden="true" tabindex="-1"></a> It consists of two paragraphs.</span> +<span id="cb264-11"><a href="#cb264-11" aria-hidden="true" tabindex="-1"></a><span class="pp">---</span></span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the Pandoc <code>yaml_metadata_block</code> syntax extension for entering metadata in <abbr>yaml</abbr>.</p> +<dd> +<p>Disable the Pandoc <code>yaml_metadata_block</code> syntax extension +for entering metadata in <abbr>yaml</abbr>.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-10">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb261"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb261-1"><a href="#cb261-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb261-2"><a href="#cb261-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> -<span id="cb261-3"><a href="#cb261-3" aria-hidden="true"></a><span class="fu">\ExplSyntaxOn</span></span> -<span id="cb261-4"><a href="#cb261-4" aria-hidden="true"></a><span class="fu">\keys</span>_define:nn</span> -<span id="cb261-5"><a href="#cb261-5" aria-hidden="true"></a> { markdown/jekyllData }</span> -<span id="cb261-6"><a href="#cb261-6" aria-hidden="true"></a> {</span> -<span id="cb261-7"><a href="#cb261-7" aria-hidden="true"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> -<span id="cb261-8"><a href="#cb261-8" aria-hidden="true"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> -<span id="cb261-9"><a href="#cb261-9" aria-hidden="true"></a> }</span> -<span id="cb261-10"><a href="#cb261-10" aria-hidden="true"></a><span class="fu">\ExplSyntaxOff</span></span> -<span id="cb261-11"><a href="#cb261-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb261-12"><a href="#cb261-12" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb261-13"><a href="#cb261-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb261-14"><a href="#cb261-14" aria-hidden="true"></a>---</span> -<span id="cb261-15"><a href="#cb261-15" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb261-16"><a href="#cb261-16" aria-hidden="true"></a>age: 99</span> -<span id="cb261-17"><a href="#cb261-17" aria-hidden="true"></a>---</span> -<span id="cb261-18"><a href="#cb261-18" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb261-19"><a href="#cb261-19" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb262"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb262-1"><a href="#cb262-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="plain-tex-example-10">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb265"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb265-1"><a href="#cb265-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb265-2"><a href="#cb265-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb265-3"><a href="#cb265-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span> +<span id="cb265-4"><a href="#cb265-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span> +<span id="cb265-5"><a href="#cb265-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span> +<span id="cb265-6"><a href="#cb265-6" aria-hidden="true" tabindex="-1"></a> {</span> +<span id="cb265-7"><a href="#cb265-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> +<span id="cb265-8"><a href="#cb265-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> +<span id="cb265-9"><a href="#cb265-9" aria-hidden="true" tabindex="-1"></a> }</span> +<span id="cb265-10"><a href="#cb265-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span> +<span id="cb265-11"><a href="#cb265-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb265-12"><a href="#cb265-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb265-13"><a href="#cb265-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb265-14"><a href="#cb265-14" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb265-15"><a href="#cb265-15" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span> +<span id="cb265-16"><a href="#cb265-16" aria-hidden="true" tabindex="-1"></a>age: 99</span> +<span id="cb265-17"><a href="#cb265-17" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb265-18"><a href="#cb265-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb265-19"><a href="#cb265-19" 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="cb266"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb266-1"><a href="#cb266-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:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-23"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb263"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb263-1"><a href="#cb263-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb263-2"><a href="#cb263-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> -<span id="cb263-3"><a href="#cb263-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb263-4"><a href="#cb263-4" aria-hidden="true"></a> jekyllDataRenderers = {</span> -<span id="cb263-5"><a href="#cb263-5" aria-hidden="true"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span> -<span id="cb263-6"><a href="#cb263-6" aria-hidden="true"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span> -<span id="cb263-7"><a href="#cb263-7" aria-hidden="true"></a> },</span> -<span id="cb263-8"><a href="#cb263-8" aria-hidden="true"></a> renderers = {</span> -<span id="cb263-9"><a href="#cb263-9" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> -<span id="cb263-10"><a href="#cb263-10" aria-hidden="true"></a> }</span> -<span id="cb263-11"><a href="#cb263-11" aria-hidden="true"></a>}</span> -<span id="cb263-12"><a href="#cb263-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb263-13"><a href="#cb263-13" aria-hidden="true"></a></span> -<span id="cb263-14"><a href="#cb263-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb263-15"><a href="#cb263-15" aria-hidden="true"></a>---</span> -<span id="cb263-16"><a href="#cb263-16" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb263-17"><a href="#cb263-17" aria-hidden="true"></a>age: 99</span> -<span id="cb263-18"><a href="#cb263-18" aria-hidden="true"></a>---</span> -<span id="cb263-19"><a href="#cb263-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb263-20"><a href="#cb263-20" aria-hidden="true"></a></span> -<span id="cb263-21"><a href="#cb263-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb264"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb264-1"><a href="#cb264-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-24"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb267"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb267-1"><a href="#cb267-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb267-2"><a href="#cb267-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb267-3"><a href="#cb267-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb267-4"><a href="#cb267-4" aria-hidden="true" tabindex="-1"></a> jekyllDataRenderers = {</span> +<span id="cb267-5"><a href="#cb267-5" aria-hidden="true" tabindex="-1"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span> +<span id="cb267-6"><a href="#cb267-6" aria-hidden="true" tabindex="-1"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span> +<span id="cb267-7"><a href="#cb267-7" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb267-8"><a href="#cb267-8" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb267-9"><a href="#cb267-9" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> +<span id="cb267-10"><a href="#cb267-10" aria-hidden="true" tabindex="-1"></a> }</span> +<span id="cb267-11"><a href="#cb267-11" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb267-12"><a href="#cb267-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb267-13"><a href="#cb267-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb267-14"><a href="#cb267-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb267-15"><a href="#cb267-15" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb267-16"><a href="#cb267-16" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span> +<span id="cb267-17"><a href="#cb267-17" aria-hidden="true" tabindex="-1"></a>age: 99</span> +<span id="cb267-18"><a href="#cb267-18" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb267-19"><a href="#cb267-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb267-20"><a href="#cb267-20" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb267-21"><a href="#cb267-21" 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="cb268"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb268-1"><a href="#cb268-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 text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-18">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb265"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb265-1"><a href="#cb265-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb265-2"><a href="#cb265-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[jekyllData = yes]</span> -<span id="cb265-3"><a href="#cb265-3" aria-hidden="true"></a><span class="fu">\ExplSyntaxOn</span></span> -<span id="cb265-4"><a href="#cb265-4" aria-hidden="true"></a><span class="fu">\keys</span>_define:nn</span> -<span id="cb265-5"><a href="#cb265-5" aria-hidden="true"></a> { markdown/jekyllData }</span> -<span id="cb265-6"><a href="#cb265-6" aria-hidden="true"></a> {</span> -<span id="cb265-7"><a href="#cb265-7" aria-hidden="true"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> -<span id="cb265-8"><a href="#cb265-8" aria-hidden="true"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> -<span id="cb265-9"><a href="#cb265-9" aria-hidden="true"></a> }</span> -<span id="cb265-10"><a href="#cb265-10" aria-hidden="true"></a><span class="fu">\ExplSyntaxOff</span></span> -<span id="cb265-11"><a href="#cb265-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb265-12"><a href="#cb265-12" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb265-13"><a href="#cb265-13" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb265-14"><a href="#cb265-14" aria-hidden="true"></a></span> -<span id="cb265-15"><a href="#cb265-15" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb265-16"><a href="#cb265-16" aria-hidden="true"></a>---</span> -<span id="cb265-17"><a href="#cb265-17" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb265-18"><a href="#cb265-18" aria-hidden="true"></a>age: 99</span> -<span id="cb265-19"><a href="#cb265-19" aria-hidden="true"></a>---</span> -<span id="cb265-20"><a href="#cb265-20" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb265-21"><a href="#cb265-21" aria-hidden="true"></a></span> -<span id="cb265-22"><a href="#cb265-22" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb266"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb266-1"><a href="#cb266-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-18">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb269"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb269-1"><a href="#cb269-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb269-2"><a href="#cb269-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[jekyllData = yes]</span> +<span id="cb269-3"><a href="#cb269-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span> +<span id="cb269-4"><a href="#cb269-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span> +<span id="cb269-5"><a href="#cb269-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span> +<span id="cb269-6"><a href="#cb269-6" aria-hidden="true" tabindex="-1"></a> {</span> +<span id="cb269-7"><a href="#cb269-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> +<span id="cb269-8"><a href="#cb269-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> +<span id="cb269-9"><a href="#cb269-9" aria-hidden="true" tabindex="-1"></a> }</span> +<span id="cb269-10"><a href="#cb269-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span> +<span id="cb269-11"><a href="#cb269-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb269-12"><a href="#cb269-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb269-13"><a href="#cb269-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb269-14"><a href="#cb269-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb269-15"><a href="#cb269-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb269-16"><a href="#cb269-16" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb269-17"><a href="#cb269-17" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span> +<span id="cb269-18"><a href="#cb269-18" aria-hidden="true" tabindex="-1"></a>age: 99</span> +<span id="cb269-19"><a href="#cb269-19" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb269-20"><a href="#cb269-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb269-21"><a href="#cb269-21" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb269-22"><a href="#cb269-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb270"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb270-1"><a href="#cb270-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h4 data-number="2.2.1.28" id="pipe-tables"><span class="header-section-number">2.2.1.28</span> Option <code>pipeTables</code></h4> +<h4 data-number="2.2.1.30" id="pipe-tables"><span +class="header-section-number">2.2.1.30</span> Option +<code>pipeTables</code></h4> <dl> <dt><code>pipeTables</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the <abbr>PHP</abbr> Markdown pipe table syntax extension:</p> -<div class="sourceCode" id="cb267"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb267-1"><a href="#cb267-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb267-2"><a href="#cb267-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb267-3"><a href="#cb267-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb267-4"><a href="#cb267-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb267-5"><a href="#cb267-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span></code></pre></div> +<dd> +<p>Enable the <abbr>PHP</abbr> Markdown pipe table syntax extension:</p> +<div class="sourceCode" id="cb271"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb271-1"><a href="#cb271-1" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span> +<span id="cb271-2"><a href="#cb271-2" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span> +<span id="cb271-3"><a href="#cb271-3" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb271-4"><a href="#cb271-4" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb271-5"><a href="#cb271-5" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the <abbr>PHP</abbr> Markdown pipe table syntax extension.</p> +<dd> +<p>Disable the <abbr>PHP</abbr> Markdown pipe table syntax +extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-24"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb268"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb268-1"><a href="#cb268-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb268-2"><a href="#cb268-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables]{<span class="ex">markdown</span>}</span> -<span id="cb268-3"><a href="#cb268-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb268-4"><a href="#cb268-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb268-5"><a href="#cb268-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb268-6"><a href="#cb268-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb268-7"><a href="#cb268-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb268-8"><a href="#cb268-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb268-9"><a href="#cb268-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb268-10"><a href="#cb268-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb268-11"><a href="#cb268-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb269"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb269-1"><a href="#cb269-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-25"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb272"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb272-1"><a href="#cb272-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb272-2"><a href="#cb272-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[pipeTables]{<span class="ex">markdown</span>}</span> +<span id="cb272-3"><a href="#cb272-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb272-4"><a href="#cb272-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb272-5"><a href="#cb272-5" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span> +<span id="cb272-6"><a href="#cb272-6" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span> +<span id="cb272-7"><a href="#cb272-7" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb272-8"><a href="#cb272-8" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb272-9"><a href="#cb272-9" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb272-10"><a href="#cb272-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb272-11"><a href="#cb272-11" 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="cb273"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb273-1"><a href="#cb273-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 text:</p> <blockquote> <table> <thead> @@ -3049,22 +4385,27 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-19">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb270"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb270-1"><a href="#cb270-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb270-2"><a href="#cb270-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[pipeTables = yes]</span> -<span id="cb270-3"><a href="#cb270-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb270-4"><a href="#cb270-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb270-5"><a href="#cb270-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb270-6"><a href="#cb270-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb270-7"><a href="#cb270-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb270-8"><a href="#cb270-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb270-9"><a href="#cb270-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb270-10"><a href="#cb270-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb270-11"><a href="#cb270-11" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb271"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb271-1"><a href="#cb271-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-19">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb274"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb274-1"><a href="#cb274-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb274-2"><a href="#cb274-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[pipeTables = yes]</span> +<span id="cb274-3"><a href="#cb274-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb274-4"><a href="#cb274-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb274-5"><a href="#cb274-5" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span> +<span id="cb274-6"><a href="#cb274-6" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span> +<span id="cb274-7"><a href="#cb274-7" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb274-8"><a href="#cb274-8" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb274-9"><a href="#cb274-9" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb274-10"><a href="#cb274-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb274-11"><a href="#cb274-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb275"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb275-1"><a href="#cb275-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <table> <thead> @@ -3097,197 +4438,269 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </blockquote> -<h4 data-number="2.2.1.29" id="option-preservetabs"><span class="header-section-number">2.2.1.29</span> Option <code>preserveTabs</code></h4> +<h4 data-number="2.2.1.31" id="option-preservetabs"><span +class="header-section-number">2.2.1.31</span> Option +<code>preserveTabs</code></h4> <dl> <dt><code>preserveTabs</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Preserve tabs in code block and fenced code blocks.</p> +<dd> +<p>Preserve tabs in code block and fenced code blocks.</p> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Convert any tabs in the input to spaces.</p> +<dd> +<p>Convert any tabs in the input to spaces.</p> </dd> </dl> </dd> </dl> -<h4 data-number="2.2.1.30" id="option-relativereferences"><span class="header-section-number">2.2.1.30</span> Option <code>relativeReferences</code></h4> +<h4 data-number="2.2.1.32" id="option-relativereferences"><span +class="header-section-number">2.2.1.32</span> Option +<code>relativeReferences</code></h4> +<dl> +<dt><code>relativeReferences</code> (default value: +<code>false</code>)</dt> +<dd> <dl> -<dt><code>relativeReferences</code> (default value: <code>false</code>)</dt> -<dd><dl> <dt>true</dt> -<dd><p>Enable <a href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">relative references</a> in autolinks:</p> -<div class="sourceCode" id="cb272"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb272-1"><a href="#cb272-1" aria-hidden="true"></a>I conclude in Section <#conclusion>.</span> -<span id="cb272-2"><a href="#cb272-2" aria-hidden="true"></a></span> -<span id="cb272-3"><a href="#cb272-3" aria-hidden="true"></a>Conclusion {#conclusion}</span> -<span id="cb272-4"><a href="#cb272-4" aria-hidden="true"></a><span class="fu">==========</span></span> -<span id="cb272-5"><a href="#cb272-5" aria-hidden="true"></a>In this paper, we have discovered that most</span> -<span id="cb272-6"><a href="#cb272-6" aria-hidden="true"></a>grandmas would rather eat dinner with their</span> -<span id="cb272-7"><a href="#cb272-7" aria-hidden="true"></a>grandchildren than get eaten. Begone, wolf!</span></code></pre></div> +<dd> +<p>Enable <a +href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">relative +references</a> in autolinks:</p> +<div class="sourceCode" id="cb276"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb276-1"><a href="#cb276-1" aria-hidden="true" tabindex="-1"></a>I conclude in Section <#conclusion>.</span> +<span id="cb276-2"><a href="#cb276-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb276-3"><a href="#cb276-3" aria-hidden="true" tabindex="-1"></a>Conclusion {#conclusion}</span> +<span id="cb276-4"><a href="#cb276-4" aria-hidden="true" tabindex="-1"></a><span class="fu">==========</span></span> +<span id="cb276-5"><a href="#cb276-5" aria-hidden="true" tabindex="-1"></a>In this paper, we have discovered that most</span> +<span id="cb276-6"><a href="#cb276-6" aria-hidden="true" tabindex="-1"></a>grandmas would rather eat dinner with their</span> +<span id="cb276-7"><a href="#cb276-7" aria-hidden="true" tabindex="-1"></a>grandchildren than get eaten. Begone, wolf!</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable relative references in autolinks.</p> +<dd> +<p>Disable relative references in autolinks.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-25"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb273"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb273-1"><a href="#cb273-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb273-2"><a href="#cb273-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes, relativeReferences]{<span class="ex">markdown</span>}</span> -<span id="cb273-3"><a href="#cb273-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb273-4"><a href="#cb273-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb273-5"><a href="#cb273-5" aria-hidden="true"></a></span> -<span id="cb273-6"><a href="#cb273-6" aria-hidden="true"></a>I conclude in Section <#conclusion>.</span> -<span id="cb273-7"><a href="#cb273-7" aria-hidden="true"></a></span> -<span id="cb273-8"><a href="#cb273-8" aria-hidden="true"></a>Conclusion {#conclusion}</span> -<span id="cb273-9"><a href="#cb273-9" aria-hidden="true"></a>==========</span> -<span id="cb273-10"><a href="#cb273-10" aria-hidden="true"></a>In this paper, we have discovered that most</span> -<span id="cb273-11"><a href="#cb273-11" aria-hidden="true"></a>grandmas would rather eat dinner with their</span> -<span id="cb273-12"><a href="#cb273-12" aria-hidden="true"></a>grandchildren than get eaten. Begone, wolf!</span> -<span id="cb273-13"><a href="#cb273-13" aria-hidden="true"></a></span> -<span id="cb273-14"><a href="#cb273-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb273-15"><a href="#cb273-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<h5 class="unnumbered" id="latex-example-26"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb277"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb277-1"><a href="#cb277-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb277-2"><a href="#cb277-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes, relativeReferences]{<span class="ex">markdown</span>}</span> +<span id="cb277-3"><a href="#cb277-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb277-4"><a href="#cb277-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb277-5"><a href="#cb277-5" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb277-6"><a href="#cb277-6" aria-hidden="true" tabindex="-1"></a>I conclude in Section <#conclusion>.</span> +<span id="cb277-7"><a href="#cb277-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb277-8"><a href="#cb277-8" aria-hidden="true" tabindex="-1"></a>Conclusion {#conclusion}</span> +<span id="cb277-9"><a href="#cb277-9" aria-hidden="true" tabindex="-1"></a>==========</span> +<span id="cb277-10"><a href="#cb277-10" aria-hidden="true" tabindex="-1"></a>In this paper, we have discovered that most</span> +<span id="cb277-11"><a href="#cb277-11" aria-hidden="true" tabindex="-1"></a>grandmas would rather eat dinner with their</span> +<span id="cb277-12"><a href="#cb277-12" aria-hidden="true" tabindex="-1"></a>grandchildren than get eaten. Begone, wolf!</span> +<span id="cb277-13"><a href="#cb277-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb277-14"><a href="#cb277-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb277-15"><a href="#cb277-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX twice from the terminal:</p> -<div class="sourceCode" id="cb274"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb274-1"><a href="#cb274-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb274-2"><a href="#cb274-2" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb278"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb278-1"><a href="#cb278-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb278-2"><a href="#cb278-2" 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 text:</p> <blockquote> <p>I conclude in Section 1.</p> <h1 id="conclusion">1. Conclusion</h1> -<p>In this paper, we have discovered that most grandmas would rather eat dinner with their grandchildren than get eaten. Begone, wolf!</p> +<p>In this paper, we have discovered that most grandmas would rather eat +dinner with their grandchildren than get eaten. Begone, wolf!</p> </blockquote> -<h4 data-number="2.2.1.31" id="option-shiftheadings"><span class="header-section-number">2.2.1.31</span> Option <code>shiftHeadings</code></h4> +<h4 data-number="2.2.1.33" id="option-shiftheadings"><span +class="header-section-number">2.2.1.33</span> Option +<code>shiftHeadings</code></h4> <dl> <dt><code>shiftHeadings</code> (default value: <code>0</code>)</dt> -<dd><p>All headings will be shifted by ⟨<em>shift amount</em>⟩, which can be both positive and negative. Headings will not be shifted beyond level 6 or below level 1. Instead, those headings will be shifted to level 6, when ⟨<em>shift amount</em>⟩ is positive, and to level 1, when ⟨<em>shift amount</em>⟩ is negative.</p> +<dd> +<p>All headings will be shifted by ⟨<em>shift amount</em>⟩, which can be +both positive and negative. Headings will not be shifted beyond level 6 +or below level 1. Instead, those headings will be shifted to level 6, +when ⟨<em>shift amount</em>⟩ is positive, and to level 1, when +⟨<em>shift amount</em>⟩ is negative.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-11">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>example.md</code> with the following content:</p> -<div class="sourceCode" id="cb275"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb275-1"><a href="#cb275-1" aria-hidden="true"></a><span class="fu">## A section</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb276"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb276-1"><a href="#cb276-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb276-2"><a href="#cb276-2" aria-hidden="true"></a></span> -<span id="cb276-3"><a href="#cb276-3" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> -<span id="cb276-4"><a href="#cb276-4" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> -<span id="cb276-5"><a href="#cb276-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span> -<span id="cb276-6"><a href="#cb276-6" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> -<span id="cb276-7"><a href="#cb276-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span> -<span id="cb276-8"><a href="#cb276-8" aria-hidden="true"></a></span> -<span id="cb276-9"><a href="#cb276-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> -<span id="cb276-10"><a href="#cb276-10" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb276-11"><a href="#cb276-11" aria-hidden="true"></a></span> -<span id="cb276-12"><a href="#cb276-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span> -<span id="cb276-13"><a href="#cb276-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb276-14"><a href="#cb276-14" aria-hidden="true"></a></span> -<span id="cb276-15"><a href="#cb276-15" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> -<span id="cb276-16"><a href="#cb276-16" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb276-17"><a href="#cb276-17" aria-hidden="true"></a></span> -<span id="cb276-18"><a href="#cb276-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb277"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb277-1"><a href="#cb277-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="plain-tex-example-11">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>example.md</code> with the following content:</p> +<div class="sourceCode" id="cb279"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb279-1"><a href="#cb279-1" aria-hidden="true" tabindex="-1"></a><span class="fu">## A section</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb280"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb280-1"><a href="#cb280-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb280-2"><a href="#cb280-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb280-3"><a href="#cb280-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> +<span id="cb280-4"><a href="#cb280-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> +<span id="cb280-5"><a href="#cb280-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span> +<span id="cb280-6"><a href="#cb280-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> +<span id="cb280-7"><a href="#cb280-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span> +<span id="cb280-8"><a href="#cb280-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb280-9"><a href="#cb280-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> +<span id="cb280-10"><a href="#cb280-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb280-11"><a href="#cb280-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb280-12"><a href="#cb280-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span> +<span id="cb280-13"><a href="#cb280-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb280-14"><a href="#cb280-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb280-15"><a href="#cb280-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> +<span id="cb280-16"><a href="#cb280-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb280-17"><a href="#cb280-17" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb280-18"><a href="#cb280-18" 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="cb281"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb281-1"><a href="#cb281-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:</p> <blockquote> <h1 id="a-section">A section</h1> <h2 id="a-section-1">A section</h2> <h3 id="a-section-2">A section</h3> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-26"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb278"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb278-1"><a href="#cb278-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb278-2"><a href="#cb278-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb278-3"><a href="#cb278-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{example.md}</span> -<span id="cb278-4"><a href="#cb278-4" aria-hidden="true"></a>## A section</span> -<span id="cb278-5"><a href="#cb278-5" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb278-6"><a href="#cb278-6" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb278-7"><a href="#cb278-7" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=-1]{example.md}</span> -<span id="cb278-8"><a href="#cb278-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb278-9"><a href="#cb278-9" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=+1]{example.md}</span> -<span id="cb278-10"><a href="#cb278-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb279"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb279-1"><a href="#cb279-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-27"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb282"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb282-1"><a href="#cb282-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb282-2"><a href="#cb282-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb282-3"><a href="#cb282-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{example.md}</span> +<span id="cb282-4"><a href="#cb282-4" aria-hidden="true" tabindex="-1"></a>## A section</span> +<span id="cb282-5"><a href="#cb282-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> +<span id="cb282-6"><a href="#cb282-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb282-7"><a href="#cb282-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[shiftHeadings=-1]{example.md}</span> +<span id="cb282-8"><a href="#cb282-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb282-9"><a href="#cb282-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[shiftHeadings=+1]{example.md}</span> +<span id="cb282-10"><a href="#cb282-10" 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="cb283"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb283-1"><a href="#cb283-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 text:</p> <blockquote> <h1 id="a-section-3">A section</h1> <h2 id="a-section-4">A section</h2> <h3 id="a-section-5">A section</h3> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-20">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>example.md</code> with the following content:</p> -<div class="sourceCode" id="cb280"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb280-1"><a href="#cb280-1" aria-hidden="true"></a><span class="fu">## A section</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb281"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb281-1"><a href="#cb281-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb281-2"><a href="#cb281-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb281-3"><a href="#cb281-3" aria-hidden="true"></a></span> -<span id="cb281-4"><a href="#cb281-4" aria-hidden="true"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = -1]{example.md}</span> -<span id="cb281-5"><a href="#cb281-5" aria-hidden="true"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = 0]{example.md}</span> -<span id="cb281-6"><a href="#cb281-6" aria-hidden="true"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = +1]{example.md}</span> -<span id="cb281-7"><a href="#cb281-7" aria-hidden="true"></a></span> -<span id="cb281-8"><a href="#cb281-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb282"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb282-1"><a href="#cb282-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-20">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>example.md</code> with the following content:</p> +<div class="sourceCode" id="cb284"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb284-1"><a href="#cb284-1" aria-hidden="true" tabindex="-1"></a><span class="fu">## A section</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb285"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb285-1"><a href="#cb285-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb285-2"><a href="#cb285-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb285-3"><a href="#cb285-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb285-4"><a href="#cb285-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = -1]{example.md}</span> +<span id="cb285-5"><a href="#cb285-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = 0]{example.md}</span> +<span id="cb285-6"><a href="#cb285-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[shiftHeadings = +1]{example.md}</span> +<span id="cb285-7"><a href="#cb285-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb285-8"><a href="#cb285-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb286"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb286-1"><a href="#cb286-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <h1 id="a-section-6">A section</h1> <h2 id="a-section-7">A section</h2> <h3 id="a-section-8">A section</h3> </blockquote> -<h4 data-number="2.2.1.32" id="slice"><span class="header-section-number">2.2.1.32</span> Option <code>slice</code></h4> +<h4 data-number="2.2.1.34" id="slice"><span +class="header-section-number">2.2.1.34</span> Option +<code>slice</code></h4> <dl> <dt><code>slice</code> (default value: <code>^ $</code>)</dt> -<dd><p>Two space-separated selectors that specify the slice of a document that will be processed, whereas the remainder of the document will be ignored. The following selectors are recognized:</p> +<dd> +<p>Two space-separated selectors that specify the slice of a document +that will be processed, whereas the remainder of the document will be +ignored. The following selectors are recognized:</p> <ul> -<li>The circumflex (<code>^</code>) selects the beginning of a document.</li> +<li>The circumflex (<code>^</code>) selects the beginning of a +document.</li> <li>The dollar sign (<code>$</code>) selects the end of a document.</li> -<li><code>^</code>⟨<em>identifier</em>⟩ selects the beginning of a section with the <a href="#header-attributes"><abbr>HTML</abbr> attribute</a> <code>#</code>⟨<em>identifier</em>⟩.</li> -<li><code>$</code>⟨<em>identifier</em>⟩ selects the end of a section with the <abbr>HTML</abbr> attribute <code>#</code>⟨<em>identifier</em>⟩.</li> -<li>⟨<em>identifier</em>⟩ corresponds to <code>^</code>⟨<em>identifier</em>⟩ for the first selector and to <code>$</code>⟨<em>identifier</em>⟩ for the second selector.</li> +<li><code>^</code>⟨<em>identifier</em>⟩ selects the beginning of a +section with the <a href="#header-attributes"><abbr>HTML</abbr> +attribute</a> <code>#</code>⟨<em>identifier</em>⟩.</li> +<li><code>$</code>⟨<em>identifier</em>⟩ selects the end of a section +with the <abbr>HTML</abbr> attribute +<code>#</code>⟨<em>identifier</em>⟩.</li> +<li>⟨<em>identifier</em>⟩ corresponds to +<code>^</code>⟨<em>identifier</em>⟩ for the first selector and to +<code>$</code>⟨<em>identifier</em>⟩ for the second selector.</li> </ul> -<p>Specifying only a single selector, ⟨<em>identifier</em>⟩, is equivalent to specifying the two selectors ⟨<em>identifier</em>⟩ ⟨<em>identifier</em>⟩, which is equivalent to <code>^</code>⟨<em>identifier</em>⟩ <code>$</code>⟨<em>identifier</em>⟩, i.e. the entire section with the <abbr>HTML</abbr> attribute <code>#</code>⟨<em>identifier</em>⟩ will be selected.</p> +<p>Specifying only a single selector, ⟨<em>identifier</em>⟩, is +equivalent to specifying the two selectors ⟨<em>identifier</em>⟩ +⟨<em>identifier</em>⟩, which is equivalent to +<code>^</code>⟨<em>identifier</em>⟩ <code>$</code>⟨<em>identifier</em>⟩, +i.e. the entire section with the <abbr>HTML</abbr> attribute +<code>#</code>⟨<em>identifier</em>⟩ will be selected.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-12">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>hamlet.md</code> with the following content:</p> -<div class="sourceCode" id="cb283"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb283-1"><a href="#cb283-1" aria-hidden="true"></a><span class="fu"># The Tragedy of Hamlet</span></span> -<span id="cb283-2"><a href="#cb283-2" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb283-3"><a href="#cb283-3" aria-hidden="true"></a></span> -<span id="cb283-4"><a href="#cb283-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> -<span id="cb283-5"><a href="#cb283-5" aria-hidden="true"></a>Hamlet kills Polonius.</span> -<span id="cb283-6"><a href="#cb283-6" aria-hidden="true"></a></span> -<span id="cb283-7"><a href="#cb283-7" aria-hidden="true"></a><span class="fu">## Act V {#act-5}</span></span> -<span id="cb283-8"><a href="#cb283-8" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb283-9"><a href="#cb283-9" aria-hidden="true"></a></span> -<span id="cb283-10"><a href="#cb283-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> -<span id="cb283-11"><a href="#cb283-11" aria-hidden="true"></a>Hamlet talks to ghost.</span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb284"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb284-1"><a href="#cb284-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb284-2"><a href="#cb284-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span> -<span id="cb284-3"><a href="#cb284-3" aria-hidden="true"></a></span> -<span id="cb284-4"><a href="#cb284-4" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> -<span id="cb284-5"><a href="#cb284-5" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> -<span id="cb284-6"><a href="#cb284-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span> -<span id="cb284-7"><a href="#cb284-7" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> -<span id="cb284-8"><a href="#cb284-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span> -<span id="cb284-9"><a href="#cb284-9" aria-hidden="true"></a></span> -<span id="cb284-10"><a href="#cb284-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> -<span id="cb284-11"><a href="#cb284-11" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb284-12"><a href="#cb284-12" aria-hidden="true"></a></span> -<span id="cb284-13"><a href="#cb284-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span> -<span id="cb284-14"><a href="#cb284-14" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb284-15"><a href="#cb284-15" aria-hidden="true"></a></span> -<span id="cb284-16"><a href="#cb284-16" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span> -<span id="cb284-17"><a href="#cb284-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb284-18"><a href="#cb284-18" aria-hidden="true"></a></span> -<span id="cb284-19"><a href="#cb284-19" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb285"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb285-1"><a href="#cb285-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="plain-tex-example-12">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>hamlet.md</code> with the following content:</p> +<div class="sourceCode" id="cb287"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb287-1"><a href="#cb287-1" aria-hidden="true" tabindex="-1"></a><span class="fu"># The Tragedy of Hamlet</span></span> +<span id="cb287-2"><a href="#cb287-2" aria-hidden="true" tabindex="-1"></a>Shakespeare's longest play.</span> +<span id="cb287-3"><a href="#cb287-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb287-4"><a href="#cb287-4" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act III {#act-3}</span></span> +<span id="cb287-5"><a href="#cb287-5" aria-hidden="true" tabindex="-1"></a>Hamlet kills Polonius.</span> +<span id="cb287-6"><a href="#cb287-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb287-7"><a href="#cb287-7" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act V {#act-5}</span></span> +<span id="cb287-8"><a href="#cb287-8" aria-hidden="true" tabindex="-1"></a>Hamlet dies.</span> +<span id="cb287-9"><a href="#cb287-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb287-10"><a href="#cb287-10" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act I {#act-1}</span></span> +<span id="cb287-11"><a href="#cb287-11" aria-hidden="true" tabindex="-1"></a>Hamlet talks to ghost.</span></code></pre></div> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb288"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb288-1"><a href="#cb288-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb288-2"><a href="#cb288-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span> +<span id="cb288-3"><a href="#cb288-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb288-4"><a href="#cb288-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> +<span id="cb288-5"><a href="#cb288-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> +<span id="cb288-6"><a href="#cb288-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>#1{{<span class="fu">\big</span> #1<span class="fu">\par</span>}}</span> +<span id="cb288-7"><a href="#cb288-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> +<span id="cb288-8"><a href="#cb288-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bigger</span> #1<span class="fu">\par</span>}}</span> +<span id="cb288-9"><a href="#cb288-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb288-10"><a href="#cb288-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> +<span id="cb288-11"><a href="#cb288-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb288-12"><a href="#cb288-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb288-13"><a href="#cb288-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span> +<span id="cb288-14"><a href="#cb288-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb288-15"><a href="#cb288-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb288-16"><a href="#cb288-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span> +<span id="cb288-17"><a href="#cb288-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb288-18"><a href="#cb288-18" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb288-19"><a href="#cb288-19" 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="cb289"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb289-1"><a href="#cb289-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:</p> <blockquote> <h1 id="the-tragedy-of-hamlet">The Tragedy of Hamlet</h1> <p>Shakespeare’s longest play.</p> @@ -3298,31 +4711,36 @@ Thomas,Edison,1847</code></pre> <h2 id="act-v">Act V</h2> <p>Hamlet dies.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-27"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb286"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb286-1"><a href="#cb286-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb286-2"><a href="#cb286-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span> -<span id="cb286-3"><a href="#cb286-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{hamlet.md}</span> -<span id="cb286-4"><a href="#cb286-4" aria-hidden="true"></a># The Tragedy of Hamlet</span> -<span id="cb286-5"><a href="#cb286-5" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb286-6"><a href="#cb286-6" aria-hidden="true"></a></span> -<span id="cb286-7"><a href="#cb286-7" aria-hidden="true"></a>## Act III {#act-3}</span> -<span id="cb286-8"><a href="#cb286-8" aria-hidden="true"></a>Hamlet kills Polonius.</span> -<span id="cb286-9"><a href="#cb286-9" aria-hidden="true"></a></span> -<span id="cb286-10"><a href="#cb286-10" aria-hidden="true"></a>## Act V {#act-5}</span> -<span id="cb286-11"><a href="#cb286-11" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb286-12"><a href="#cb286-12" aria-hidden="true"></a></span> -<span id="cb286-13"><a href="#cb286-13" aria-hidden="true"></a>## Act I {#act-1}</span> -<span id="cb286-14"><a href="#cb286-14" aria-hidden="true"></a>Hamlet talks to ghost.</span> -<span id="cb286-15"><a href="#cb286-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb286-16"><a href="#cb286-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb286-17"><a href="#cb286-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=^ ^act-3]{hamlet.md}</span> -<span id="cb286-18"><a href="#cb286-18" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-1]{hamlet.md}</span> -<span id="cb286-19"><a href="#cb286-19" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-3 act-5]{hamlet.md}</span> -<span id="cb286-20"><a href="#cb286-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb287"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb287-1"><a href="#cb287-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-28"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb290"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb290-1"><a href="#cb290-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb290-2"><a href="#cb290-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span> +<span id="cb290-3"><a href="#cb290-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{hamlet.md}</span> +<span id="cb290-4"><a href="#cb290-4" aria-hidden="true" tabindex="-1"></a># The Tragedy of Hamlet</span> +<span id="cb290-5"><a href="#cb290-5" aria-hidden="true" tabindex="-1"></a>Shakespeare's longest play.</span> +<span id="cb290-6"><a href="#cb290-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb290-7"><a href="#cb290-7" aria-hidden="true" tabindex="-1"></a>## Act III {#act-3}</span> +<span id="cb290-8"><a href="#cb290-8" aria-hidden="true" tabindex="-1"></a>Hamlet kills Polonius.</span> +<span id="cb290-9"><a href="#cb290-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb290-10"><a href="#cb290-10" aria-hidden="true" tabindex="-1"></a>## Act V {#act-5}</span> +<span id="cb290-11"><a href="#cb290-11" aria-hidden="true" tabindex="-1"></a>Hamlet dies.</span> +<span id="cb290-12"><a href="#cb290-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb290-13"><a href="#cb290-13" aria-hidden="true" tabindex="-1"></a>## Act I {#act-1}</span> +<span id="cb290-14"><a href="#cb290-14" aria-hidden="true" tabindex="-1"></a>Hamlet talks to ghost.</span> +<span id="cb290-15"><a href="#cb290-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> +<span id="cb290-16"><a href="#cb290-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb290-17"><a href="#cb290-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[slice=^ ^act-3]{hamlet.md}</span> +<span id="cb290-18"><a href="#cb290-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[slice=act-1]{hamlet.md}</span> +<span id="cb290-19"><a href="#cb290-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>[slice=act-3 act-5]{hamlet.md}</span> +<span id="cb290-20"><a href="#cb290-20" 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="cb291"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb291-1"><a href="#cb291-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 text:</p> <blockquote> <h1 id="the-tragedy-of-hamlet-1">The Tragedy of Hamlet</h1> <p>Shakespeare’s longest play.</p> @@ -3333,32 +4751,39 @@ Thomas,Edison,1847</code></pre> <h2 id="act-v-1">Act V</h2> <p>Hamlet dies.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-21">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>hamlet.md</code> with the following content:</p> -<div class="sourceCode" id="cb288"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb288-1"><a href="#cb288-1" aria-hidden="true"></a><span class="fu"># The Tragedy of Hamlet</span></span> -<span id="cb288-2"><a href="#cb288-2" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb288-3"><a href="#cb288-3" aria-hidden="true"></a></span> -<span id="cb288-4"><a href="#cb288-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> -<span id="cb288-5"><a href="#cb288-5" aria-hidden="true"></a>Hamlet kills Polonius.</span> -<span id="cb288-6"><a href="#cb288-6" aria-hidden="true"></a></span> -<span id="cb288-7"><a href="#cb288-7" aria-hidden="true"></a><span class="fu">## Act V {#act-5}</span></span> -<span id="cb288-8"><a href="#cb288-8" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb288-9"><a href="#cb288-9" aria-hidden="true"></a></span> -<span id="cb288-10"><a href="#cb288-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> -<span id="cb288-11"><a href="#cb288-11" aria-hidden="true"></a>Hamlet talks to ghost.</span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb289"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb289-1"><a href="#cb289-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb289-2"><a href="#cb289-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[headerAttributes = yes]</span> -<span id="cb289-3"><a href="#cb289-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb289-4"><a href="#cb289-4" aria-hidden="true"></a></span> -<span id="cb289-5"><a href="#cb289-5" aria-hidden="true"></a><span class="fu">\inputmarkdown</span>[slice = ^ ^act-3]{example.md}</span> -<span id="cb289-6"><a href="#cb289-6" aria-hidden="true"></a><span class="fu">\inputmarkdown</span>[slice = act-1]{example.md}</span> -<span id="cb289-7"><a href="#cb289-7" aria-hidden="true"></a><span class="fu">\inputmarkdown</span>[slice = act-3 act-5]{example.md}</span> -<span id="cb289-8"><a href="#cb289-8" aria-hidden="true"></a></span> -<span id="cb289-9"><a href="#cb289-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb290"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb290-1"><a href="#cb290-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-21">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>hamlet.md</code> with the following content:</p> +<div class="sourceCode" id="cb292"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb292-1"><a href="#cb292-1" aria-hidden="true" tabindex="-1"></a><span class="fu"># The Tragedy of Hamlet</span></span> +<span id="cb292-2"><a href="#cb292-2" aria-hidden="true" tabindex="-1"></a>Shakespeare's longest play.</span> +<span id="cb292-3"><a href="#cb292-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb292-4"><a href="#cb292-4" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act III {#act-3}</span></span> +<span id="cb292-5"><a href="#cb292-5" aria-hidden="true" tabindex="-1"></a>Hamlet kills Polonius.</span> +<span id="cb292-6"><a href="#cb292-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb292-7"><a href="#cb292-7" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act V {#act-5}</span></span> +<span id="cb292-8"><a href="#cb292-8" aria-hidden="true" tabindex="-1"></a>Hamlet dies.</span> +<span id="cb292-9"><a href="#cb292-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb292-10"><a href="#cb292-10" aria-hidden="true" tabindex="-1"></a><span class="fu">## Act I {#act-1}</span></span> +<span id="cb292-11"><a href="#cb292-11" aria-hidden="true" tabindex="-1"></a>Hamlet talks to ghost.</span></code></pre></div> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb293"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb293-1"><a href="#cb293-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb293-2"><a href="#cb293-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[headerAttributes = yes]</span> +<span id="cb293-3"><a href="#cb293-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb293-4"><a href="#cb293-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb293-5"><a href="#cb293-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[slice = ^ ^act-3]{example.md}</span> +<span id="cb293-6"><a href="#cb293-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[slice = act-1]{example.md}</span> +<span id="cb293-7"><a href="#cb293-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\inputmarkdown</span>[slice = act-3 act-5]{example.md}</span> +<span id="cb293-8"><a href="#cb293-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb293-9"><a href="#cb293-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb294"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb294-1"><a href="#cb294-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <h1 id="the-tragedy-of-hamlet-2">The Tragedy of Hamlet</h1> <p>Shakespeare’s longest play.</p> @@ -3369,182 +4794,241 @@ Thomas,Edison,1847</code></pre> <h2 id="act-v-2">Act V</h2> <p>Hamlet dies.</p> </blockquote> -<h4 data-number="2.2.1.33" id="option-smartellipses"><span class="header-section-number">2.2.1.33</span> Option <code>smartEllipses</code></h4> +<h4 data-number="2.2.1.35" id="option-smartellipses"><span +class="header-section-number">2.2.1.35</span> Option +<code>smartEllipses</code></h4> <dl> <dt><code>smartEllipses</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Convert any ellipses in the input to the <code>\markdownRendererEllipsis</code> <span class="tex">T<sub>e</sub>X</span> macro.</p> +<dd> +<p>Convert any ellipses in the input to the +<code>\markdownRendererEllipsis</code> <span +class="tex">T<sub>e</sub>X</span> macro.</p> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Preserve all ellipses in the input.</p> +<dd> +<p>Preserve all ellipses in the input.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-11">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb291"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb291-1"><a href="#cb291-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb291-2"><a href="#cb291-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb291-3"><a href="#cb291-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb291-4"><a href="#cb291-4" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb291-5"><a href="#cb291-5" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb291-6"><a href="#cb291-6" aria-hidden="true"></a> local convert = markdown.new()</span> -<span id="cb291-7"><a href="#cb291-7" aria-hidden="true"></a> local input = "These are just three regular dots ..."</span> -<span id="cb291-8"><a href="#cb291-8" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb291-9"><a href="#cb291-9" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb291-10"><a href="#cb291-10" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb291-11"><a href="#cb291-11" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb291-12"><a href="#cb291-12" aria-hidden="true"></a> local convert = markdown.new({smartEllipses = true})</span> -<span id="cb291-13"><a href="#cb291-13" aria-hidden="true"></a> local input = "... and this is a victorian ellipsis."</span> -<span id="cb291-14"><a href="#cb291-14" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb291-15"><a href="#cb291-15" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 class="unnumbered" id="lua-module-example-11">Lua Module +Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb295"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb295-1"><a href="#cb295-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb295-2"><a href="#cb295-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb295-3"><a href="#cb295-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb295-4"><a href="#cb295-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb295-5"><a href="#cb295-5" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb295-6"><a href="#cb295-6" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new()</span> +<span id="cb295-7"><a href="#cb295-7" aria-hidden="true" tabindex="-1"></a> local input = "These are just three regular dots ..."</span> +<span id="cb295-8"><a href="#cb295-8" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb295-9"><a href="#cb295-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span> +<span id="cb295-10"><a href="#cb295-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\directlua</span>{</span> +<span id="cb295-11"><a href="#cb295-11" aria-hidden="true" tabindex="-1"></a> local markdown = require("markdown")</span> +<span id="cb295-12"><a href="#cb295-12" aria-hidden="true" tabindex="-1"></a> local convert = markdown.new({smartEllipses = true})</span> +<span id="cb295-13"><a href="#cb295-13" aria-hidden="true" tabindex="-1"></a> local input = "... and this is a victorian ellipsis."</span> +<span id="cb295-14"><a href="#cb295-14" aria-hidden="true" tabindex="-1"></a> tex.sprint(convert(input)) }</span> +<span id="cb295-15"><a href="#cb295-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb292"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb292-1"><a href="#cb292-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb296"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb296-1"><a href="#cb296-1" aria-hidden="true" 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:</p> <blockquote> <p>These are just three regular dots …</p> <p>. . . and this is a victorian ellipsis.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-9">Lua CLI Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb293"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb293-1"><a href="#cb293-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb293-2"><a href="#cb293-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb293-3"><a href="#cb293-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb293-4"><a href="#cb293-4" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb293-5"><a href="#cb293-5" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb293-6"><a href="#cb293-6" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb293-7"><a href="#cb293-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb294"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb294-1"><a href="#cb294-1" aria-hidden="true"></a>Are these just three regular dots, a victorian ellipsis, or ... ?</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb295"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb295-1"><a href="#cb295-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb295-2"><a href="#cb295-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ smartEllipses=true -- content.md optiontrue.tex</span> -<span id="cb295-3"><a href="#cb295-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="lua-cli-example-9">Lua CLI Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb297"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb297-1"><a href="#cb297-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb297-2"><a href="#cb297-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb297-3"><a href="#cb297-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb297-4"><a href="#cb297-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb297-5"><a href="#cb297-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\par</span></span> +<span id="cb297-6"><a href="#cb297-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb297-7"><a href="#cb297-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>content.md</code> with the following content:</p> +<div class="sourceCode" id="cb298"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb298-1"><a href="#cb298-1" aria-hidden="true" tabindex="-1"></a>Are these just three regular dots, a victorian ellipsis, or ... ?</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb299"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb299-1"><a href="#cb299-1" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ <span class="at">--</span> content.md optionfalse.tex</span> +<span id="cb299-2"><a href="#cb299-2" aria-hidden="true" tabindex="-1"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ smartEllipses=true <span class="at">--</span> content.md optiontrue.tex</span> +<span id="cb299-3"><a href="#cb299-3" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua +CLI script file, such as +<code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems +or <code>C:\Users\</code>⟨<em>Your +username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on +Windows systems. Use the command +<code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script +file using <a href="https://tug.org/kpathsea/" +title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>Are these just three regular dots, a victorian ellipsis, or … ?</p> -<p>Are these just three regular dots, a victorian ellipsis, or . . . ?</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-13">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb296"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb296-1"><a href="#cb296-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb296-2"><a href="#cb296-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb296-3"><a href="#cb296-3" aria-hidden="true"></a></span> -<span id="cb296-4"><a href="#cb296-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb296-5"><a href="#cb296-5" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb296-6"><a href="#cb296-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb296-7"><a href="#cb296-7" aria-hidden="true"></a></span> -<span id="cb296-8"><a href="#cb296-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb296-9"><a href="#cb296-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb296-10"><a href="#cb296-10" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb296-11"><a href="#cb296-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb296-12"><a href="#cb296-12" aria-hidden="true"></a></span> -<span id="cb296-13"><a href="#cb296-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb297"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb297-1"><a href="#cb297-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>Are these just three regular dots, a victorian ellipsis, or . . . +?</p> +</blockquote> +<h5 class="unnumbered" id="plain-tex-example-13">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb300"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb300-1"><a href="#cb300-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb300-2"><a href="#cb300-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb300-3"><a href="#cb300-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb300-4"><a href="#cb300-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb300-5"><a href="#cb300-5" aria-hidden="true" tabindex="-1"></a>These are just three regular dots ...</span> +<span id="cb300-6"><a href="#cb300-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb300-7"><a href="#cb300-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb300-8"><a href="#cb300-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> +<span id="cb300-9"><a href="#cb300-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb300-10"><a href="#cb300-10" aria-hidden="true" tabindex="-1"></a>... and this is a victorian ellipsis.</span> +<span id="cb300-11"><a href="#cb300-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb300-12"><a href="#cb300-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb300-13"><a href="#cb300-13" 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="cb301"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb301-1"><a href="#cb301-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:</p> <blockquote> <p>These are just three regular dots …</p> <p>. . . and this is a victorian ellipsis.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-28"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb298"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb298-1"><a href="#cb298-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb298-2"><a href="#cb298-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb298-3"><a href="#cb298-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb298-4"><a href="#cb298-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb298-5"><a href="#cb298-5" aria-hidden="true"></a> ellipsis = {. . .}</span> -<span id="cb298-6"><a href="#cb298-6" aria-hidden="true"></a> }</span> -<span id="cb298-7"><a href="#cb298-7" aria-hidden="true"></a>}</span> -<span id="cb298-8"><a href="#cb298-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb298-9"><a href="#cb298-9" aria-hidden="true"></a></span> -<span id="cb298-10"><a href="#cb298-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb298-11"><a href="#cb298-11" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb298-12"><a href="#cb298-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb298-13"><a href="#cb298-13" aria-hidden="true"></a></span> -<span id="cb298-14"><a href="#cb298-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{smartEllipses}</span> -<span id="cb298-15"><a href="#cb298-15" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb298-16"><a href="#cb298-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb298-17"><a href="#cb298-17" aria-hidden="true"></a></span> -<span id="cb298-18"><a href="#cb298-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb299"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb299-1"><a href="#cb299-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-29"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb302"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb302-1"><a href="#cb302-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb302-2"><a href="#cb302-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb302-3"><a href="#cb302-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb302-4"><a href="#cb302-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb302-5"><a href="#cb302-5" aria-hidden="true" tabindex="-1"></a> ellipsis = {. . .}</span> +<span id="cb302-6"><a href="#cb302-6" aria-hidden="true" tabindex="-1"></a> }</span> +<span id="cb302-7"><a href="#cb302-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb302-8"><a href="#cb302-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb302-9"><a href="#cb302-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb302-10"><a href="#cb302-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb302-11"><a href="#cb302-11" aria-hidden="true" tabindex="-1"></a>These are just three regular dots ...</span> +<span id="cb302-12"><a href="#cb302-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb302-13"><a href="#cb302-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb302-14"><a href="#cb302-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{smartEllipses}</span> +<span id="cb302-15"><a href="#cb302-15" aria-hidden="true" tabindex="-1"></a>... and this is a victorian ellipsis.</span> +<span id="cb302-16"><a href="#cb302-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb302-17"><a href="#cb302-17" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb302-18"><a href="#cb302-18" 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="cb303"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb303-1"><a href="#cb303-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 text:</p> <blockquote> <p>These are just three regular dots …</p> <p>. . . and this is a victorian ellipsis.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-22">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb300"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb300-1"><a href="#cb300-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb300-2"><a href="#cb300-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb300-3"><a href="#cb300-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb300-4"><a href="#cb300-4" aria-hidden="true"></a></span> -<span id="cb300-5"><a href="#cb300-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb300-6"><a href="#cb300-6" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb300-7"><a href="#cb300-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb300-8"><a href="#cb300-8" aria-hidden="true"></a></span> -<span id="cb300-9"><a href="#cb300-9" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[smartEllipses = yes]</span> -<span id="cb300-10"><a href="#cb300-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb300-11"><a href="#cb300-11" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb300-12"><a href="#cb300-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb300-13"><a href="#cb300-13" aria-hidden="true"></a></span> -<span id="cb300-14"><a href="#cb300-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb301"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb301-1"><a href="#cb301-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-22">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb304"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb304-1"><a href="#cb304-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb304-2"><a href="#cb304-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb304-3"><a href="#cb304-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb304-4"><a href="#cb304-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb304-5"><a href="#cb304-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb304-6"><a href="#cb304-6" aria-hidden="true" tabindex="-1"></a>These are just three regular dots ...</span> +<span id="cb304-7"><a href="#cb304-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb304-8"><a href="#cb304-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb304-9"><a href="#cb304-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[smartEllipses = yes]</span> +<span id="cb304-10"><a href="#cb304-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb304-11"><a href="#cb304-11" aria-hidden="true" tabindex="-1"></a>... and this is a victorian ellipsis.</span> +<span id="cb304-12"><a href="#cb304-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb304-13"><a href="#cb304-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb304-14"><a href="#cb304-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb305"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb305-1"><a href="#cb305-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>These are just three regular dots …</p> <p>. . . and this is a victorian ellipsis.</p> </blockquote> -<h4 data-number="2.2.1.34" id="option-startnumber"><span class="header-section-number">2.2.1.34</span> Option <code>startNumber</code></h4> +<h4 data-number="2.2.1.36" id="option-startnumber"><span +class="header-section-number">2.2.1.36</span> Option +<code>startNumber</code></h4> <dl> <dt><code>startNumber</code> (default value: <code>true</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Make the number in the first item of an ordered lists significant. The item numbers will be passed to the <code>\markdownRendererOlItemWithNumber</code> <span class="tex">T<sub>e</sub>X</span> macro.</p> +<dd> +<p>Make the number in the first item of an ordered lists significant. +The item numbers will be passed to the +<code>\markdownRendererOlItemWithNumber</code> <span +class="tex">T<sub>e</sub>X</span> macro.</p> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Ignore the numbers in the ordered list items. Each item will only produce a <code>\markdownRendererOlItem</code> <span class="tex">T<sub>e</sub>X</span> macro.</p> +<dd> +<p>Ignore the numbers in the ordered list items. Each item will only +produce a <code>\markdownRendererOlItem</code> <span +class="tex">T<sub>e</sub>X</span> macro.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-29"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb302"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb302-1"><a href="#cb302-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb302-2"><a href="#cb302-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb302-3"><a href="#cb302-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb302-4"><a href="#cb302-4" aria-hidden="true"></a></span> -<span id="cb302-5"><a href="#cb302-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb302-6"><a href="#cb302-6" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb302-7"><a href="#cb302-7" aria-hidden="true"></a></span> -<span id="cb302-8"><a href="#cb302-8" aria-hidden="true"></a>3. third item</span> -<span id="cb302-9"><a href="#cb302-9" aria-hidden="true"></a>4. fourth item</span> -<span id="cb302-10"><a href="#cb302-10" aria-hidden="true"></a>5. fifth item</span> -<span id="cb302-11"><a href="#cb302-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb302-12"><a href="#cb302-12" aria-hidden="true"></a></span> -<span id="cb302-13"><a href="#cb302-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{startNumber=false}</span> -<span id="cb302-14"><a href="#cb302-14" aria-hidden="true"></a>The following list does not respect the numbers specified in the</span> -<span id="cb302-15"><a href="#cb302-15" aria-hidden="true"></a>markup:</span> -<span id="cb302-16"><a href="#cb302-16" aria-hidden="true"></a></span> -<span id="cb302-17"><a href="#cb302-17" aria-hidden="true"></a>3. third item</span> -<span id="cb302-18"><a href="#cb302-18" aria-hidden="true"></a>4. fourth item</span> -<span id="cb302-19"><a href="#cb302-19" aria-hidden="true"></a>5. fifth item</span> -<span id="cb302-20"><a href="#cb302-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb302-21"><a href="#cb302-21" aria-hidden="true"></a></span> -<span id="cb302-22"><a href="#cb302-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb303"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb303-1"><a href="#cb303-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-30"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb306"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb306-1"><a href="#cb306-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb306-2"><a href="#cb306-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb306-3"><a href="#cb306-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb306-4"><a href="#cb306-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb306-5"><a href="#cb306-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb306-6"><a href="#cb306-6" aria-hidden="true" tabindex="-1"></a>The following list respects the numbers specified in the markup:</span> +<span id="cb306-7"><a href="#cb306-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb306-8"><a href="#cb306-8" aria-hidden="true" tabindex="-1"></a>3. third item</span> +<span id="cb306-9"><a href="#cb306-9" aria-hidden="true" tabindex="-1"></a>4. fourth item</span> +<span id="cb306-10"><a href="#cb306-10" aria-hidden="true" tabindex="-1"></a>5. fifth item</span> +<span id="cb306-11"><a href="#cb306-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb306-12"><a href="#cb306-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb306-13"><a href="#cb306-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{startNumber=false}</span> +<span id="cb306-14"><a href="#cb306-14" aria-hidden="true" tabindex="-1"></a>The following list does not respect the numbers specified in the</span> +<span id="cb306-15"><a href="#cb306-15" aria-hidden="true" tabindex="-1"></a>markup:</span> +<span id="cb306-16"><a href="#cb306-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb306-17"><a href="#cb306-17" aria-hidden="true" tabindex="-1"></a>3. third item</span> +<span id="cb306-18"><a href="#cb306-18" aria-hidden="true" tabindex="-1"></a>4. fourth item</span> +<span id="cb306-19"><a href="#cb306-19" aria-hidden="true" tabindex="-1"></a>5. fifth item</span> +<span id="cb306-20"><a href="#cb306-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb306-21"><a href="#cb306-21" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb306-22"><a href="#cb306-22" 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="cb307"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb307-1"><a href="#cb307-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 text:</p> <blockquote> <p>The following list respects the numbers specified in the markup:</p> <ol start="3" type="1"> @@ -3552,38 +5036,44 @@ Thomas,Edison,1847</code></pre> <li>fourth item</li> <li>fifth item</li> </ol> -<p>The following list does not respect the numbers specified in the markup:</p> +<p>The following list does not respect the numbers specified in the +markup:</p> <ol type="1"> <li>third item</li> <li>fourth item</li> <li>fifth item</li> </ol> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-23">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb304"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb304-1"><a href="#cb304-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb304-2"><a href="#cb304-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb304-3"><a href="#cb304-3" aria-hidden="true"></a></span> -<span id="cb304-4"><a href="#cb304-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb304-5"><a href="#cb304-5" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb304-6"><a href="#cb304-6" aria-hidden="true"></a></span> -<span id="cb304-7"><a href="#cb304-7" aria-hidden="true"></a>3. third item</span> -<span id="cb304-8"><a href="#cb304-8" aria-hidden="true"></a>4. fourth item</span> -<span id="cb304-9"><a href="#cb304-9" aria-hidden="true"></a>5. fifth item</span> -<span id="cb304-10"><a href="#cb304-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb304-11"><a href="#cb304-11" aria-hidden="true"></a></span> -<span id="cb304-12"><a href="#cb304-12" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[startNumber = no]</span> -<span id="cb304-13"><a href="#cb304-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb304-14"><a href="#cb304-14" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb304-15"><a href="#cb304-15" aria-hidden="true"></a></span> -<span id="cb304-16"><a href="#cb304-16" aria-hidden="true"></a>3. third item</span> -<span id="cb304-17"><a href="#cb304-17" aria-hidden="true"></a>4. fourth item</span> -<span id="cb304-18"><a href="#cb304-18" aria-hidden="true"></a>5. fifth item</span> -<span id="cb304-19"><a href="#cb304-19" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb304-20"><a href="#cb304-20" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb305"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb305-1"><a href="#cb305-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-23">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb308"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb308-1"><a href="#cb308-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb308-2"><a href="#cb308-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb308-3"><a href="#cb308-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb308-4"><a href="#cb308-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb308-5"><a href="#cb308-5" aria-hidden="true" tabindex="-1"></a>The following list respects the numbers specified in the markup:</span> +<span id="cb308-6"><a href="#cb308-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb308-7"><a href="#cb308-7" aria-hidden="true" tabindex="-1"></a>3. third item</span> +<span id="cb308-8"><a href="#cb308-8" aria-hidden="true" tabindex="-1"></a>4. fourth item</span> +<span id="cb308-9"><a href="#cb308-9" aria-hidden="true" tabindex="-1"></a>5. fifth item</span> +<span id="cb308-10"><a href="#cb308-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb308-11"><a href="#cb308-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb308-12"><a href="#cb308-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[startNumber = no]</span> +<span id="cb308-13"><a href="#cb308-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb308-14"><a href="#cb308-14" aria-hidden="true" tabindex="-1"></a>The following list respects the numbers specified in the markup:</span> +<span id="cb308-15"><a href="#cb308-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb308-16"><a href="#cb308-16" aria-hidden="true" tabindex="-1"></a>3. third item</span> +<span id="cb308-17"><a href="#cb308-17" aria-hidden="true" tabindex="-1"></a>4. fourth item</span> +<span id="cb308-18"><a href="#cb308-18" aria-hidden="true" tabindex="-1"></a>5. fifth item</span> +<span id="cb308-19"><a href="#cb308-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb308-20"><a href="#cb308-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb309"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb309-1"><a href="#cb309-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>The following list respects the numbers specified in the markup:</p> <ol start="3" type="1"> @@ -3591,276 +5081,371 @@ Thomas,Edison,1847</code></pre> <li>fourth item</li> <li>fifth item</li> </ol> -<p>The following list does not respect the numbers specified in the markup:</p> +<p>The following list does not respect the numbers specified in the +markup:</p> <ol type="1"> <li>third item</li> <li>fourth item</li> <li>fifth item</li> </ol> </blockquote> -<h4 data-number="2.2.1.35" id="option-strikethrough"><span class="header-section-number">2.2.1.35</span> Option <code>strikeThrough</code></h4> +<h4 data-number="2.2.1.37" id="option-strikethrough"><span +class="header-section-number">2.2.1.37</span> Option +<code>strikeThrough</code></h4> <dl> <dt><code>strikeThrough</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the Pandoc strike-through syntax extension:</p> -<div class="sourceCode" id="cb306"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb306-1"><a href="#cb306-1" aria-hidden="true"></a>This ~~is deleted text.~~</span></code></pre></div> +<dd> +<p>Enable the Pandoc strike-through syntax extension:</p> +<div class="sourceCode" id="cb310"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb310-1"><a href="#cb310-1" aria-hidden="true" tabindex="-1"></a>This ~~is deleted text.~~</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the Pandoc strike-through syntax extension.</p> +<dd> +<p>Disable the Pandoc strike-through syntax extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-14">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb307"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb307-1"><a href="#cb307-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb307-2"><a href="#cb307-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStrikeThrough</span>{true}</span> -<span id="cb307-3"><a href="#cb307-3" aria-hidden="true"></a><span class="fu">\input</span> soulutf8.sty</span> -<span id="cb307-4"><a href="#cb307-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\st</span>{#1}}</span> -<span id="cb307-5"><a href="#cb307-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb307-6"><a href="#cb307-6" aria-hidden="true"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> -<span id="cb307-7"><a href="#cb307-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb307-8"><a href="#cb307-8" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb308"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb308-1"><a href="#cb308-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="plain-tex-example-14">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb311"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb311-1"><a href="#cb311-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb311-2"><a href="#cb311-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStrikeThrough</span>{true}</span> +<span id="cb311-3"><a href="#cb311-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> soulutf8.sty</span> +<span id="cb311-4"><a href="#cb311-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\st</span>{#1}}</span> +<span id="cb311-5"><a href="#cb311-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb311-6"><a href="#cb311-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> +<span id="cb311-7"><a href="#cb311-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb311-8"><a href="#cb311-8" 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="cb312"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb312-1"><a href="#cb312-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:</p> <blockquote> <p>This is <del>a lunar roving vehicle</del> strike-through text.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-30"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb309"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb309-1"><a href="#cb309-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb309-2"><a href="#cb309-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[strikeThrough]{<span class="ex">markdown</span>}</span> -<span id="cb309-3"><a href="#cb309-3" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">soulutf8</span>}</span> -<span id="cb309-4"><a href="#cb309-4" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb309-5"><a href="#cb309-5" aria-hidden="true"></a> renderers = {</span> -<span id="cb309-6"><a href="#cb309-6" aria-hidden="true"></a> strikeThrough = {<span class="fu">\st</span>{#1}},</span> -<span id="cb309-7"><a href="#cb309-7" aria-hidden="true"></a> },</span> -<span id="cb309-8"><a href="#cb309-8" aria-hidden="true"></a>}</span> -<span id="cb309-9"><a href="#cb309-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb309-10"><a href="#cb309-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb309-11"><a href="#cb309-11" aria-hidden="true"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> -<span id="cb309-12"><a href="#cb309-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb309-13"><a href="#cb309-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb310"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb310-1"><a href="#cb310-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-31"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb313"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb313-1"><a href="#cb313-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb313-2"><a href="#cb313-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[strikeThrough]{<span class="ex">markdown</span>}</span> +<span id="cb313-3"><a href="#cb313-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soulutf8</span>}</span> +<span id="cb313-4"><a href="#cb313-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb313-5"><a href="#cb313-5" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb313-6"><a href="#cb313-6" aria-hidden="true" tabindex="-1"></a> strikeThrough = {<span class="fu">\st</span>{#1}},</span> +<span id="cb313-7"><a href="#cb313-7" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb313-8"><a href="#cb313-8" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb313-9"><a href="#cb313-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb313-10"><a href="#cb313-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb313-11"><a href="#cb313-11" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> +<span id="cb313-12"><a href="#cb313-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb313-13"><a href="#cb313-13" 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="cb314"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb314-1"><a href="#cb314-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 text:</p> <blockquote> <p>This is <del>a lunar roving vehicle</del> strike-through text.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-24">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb311"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb311-1"><a href="#cb311-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb311-2"><a href="#cb311-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[strikeThrough = yes]</span> -<span id="cb311-3"><a href="#cb311-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\overstrikes</span>{#1}}</span> -<span id="cb311-4"><a href="#cb311-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb311-5"><a href="#cb311-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb311-6"><a href="#cb311-6" aria-hidden="true"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> -<span id="cb311-7"><a href="#cb311-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb311-8"><a href="#cb311-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb312"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb312-1"><a href="#cb312-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-24">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb315"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb315-1"><a href="#cb315-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb315-2"><a href="#cb315-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[strikeThrough = yes]</span> +<span id="cb315-3"><a href="#cb315-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\overstrikes</span>{#1}}</span> +<span id="cb315-4"><a href="#cb315-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb315-5"><a href="#cb315-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb315-6"><a href="#cb315-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> +<span id="cb315-7"><a href="#cb315-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb315-8"><a href="#cb315-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb316"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb316-1"><a href="#cb316-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>This is <del>a lunar roving vehicle</del> strike-through text.</p> </blockquote> -<h4 data-number="2.2.1.36" id="option-stripindent"><span class="header-section-number">2.2.1.36</span> Option <code>stripIndent</code></h4> +<h4 data-number="2.2.1.38" id="option-stripindent"><span +class="header-section-number">2.2.1.38</span> Option +<code>stripIndent</code></h4> <dl> <dt><code>stripIndent</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Strip the minimal indentation of non-blank lines from all lines in a markdown document. Requires that the <strong><code>preserveTabs</code></strong> Lua option is disabled:</p> -<div class="sourceCode" id="cb313"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb313-1"><a href="#cb313-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb313-2"><a href="#cb313-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> -<span id="cb313-3"><a href="#cb313-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb313-4"><a href="#cb313-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb313-5"><a href="#cb313-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb313-6"><a href="#cb313-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb313-7"><a href="#cb313-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<dd> +<p>Strip the minimal indentation of non-blank lines from all lines in a +markdown document. Requires that the +<strong><code>preserveTabs</code></strong> Lua option is disabled:</p> +<div class="sourceCode" id="cb317"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb317-1"><a href="#cb317-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb317-2"><a href="#cb317-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> +<span id="cb317-3"><a href="#cb317-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb317-4"><a href="#cb317-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb317-5"><a href="#cb317-5" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span> +<span id="cb317-6"><a href="#cb317-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb317-7"><a href="#cb317-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Do not strip any indentation from the lines in a markdown document.</p> +<dd> +<p>Do not strip any indentation from the lines in a markdown +document.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-15">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb314"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb314-1"><a href="#cb314-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb314-2"><a href="#cb314-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> -<span id="cb314-3"><a href="#cb314-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb314-4"><a href="#cb314-4" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb314-5"><a href="#cb314-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb314-6"><a href="#cb314-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb315"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb315-1"><a href="#cb315-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h5 class="unnumbered" data-number="" id="latex-example-31"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb316"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb316-1"><a href="#cb316-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb316-2"><a href="#cb316-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> -<span id="cb316-3"><a href="#cb316-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb316-4"><a href="#cb316-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb316-5"><a href="#cb316-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb316-6"><a href="#cb316-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb316-7"><a href="#cb316-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb317"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb317-1"><a href="#cb317-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h5 class="unnumbered" data-number="" id="context-example-25">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb318"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb318-1"><a href="#cb318-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb318-2"><a href="#cb318-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[stripIndent = yes]</span> -<span id="cb318-3"><a href="#cb318-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb318-4"><a href="#cb318-4" aria-hidden="true"></a> <span class="fu">\startmarkdown</span></span> -<span id="cb318-5"><a href="#cb318-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb318-6"><a href="#cb318-6" aria-hidden="true"></a> <span class="fu">\stopmarkdown</span></span> -<span id="cb318-7"><a href="#cb318-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb319"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb319-1"><a href="#cb319-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h4 data-number="2.2.1.37" id="option-subscripts"><span class="header-section-number">2.2.1.37</span> Option <code>subscripts</code></h4> +<h5 class="unnumbered" id="plain-tex-example-15">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb318"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb318-1"><a href="#cb318-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb318-2"><a href="#cb318-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> +<span id="cb318-3"><a href="#cb318-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb318-4"><a href="#cb318-4" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span> +<span id="cb318-5"><a href="#cb318-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb318-6"><a href="#cb318-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="cb319"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb319-1"><a href="#cb319-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 text “Hello <em>world</em>!”</p> +<h5 class="unnumbered" id="latex-example-32"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb320"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb320-1"><a href="#cb320-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb320-2"><a href="#cb320-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> +<span id="cb320-3"><a href="#cb320-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb320-4"><a href="#cb320-4" aria-hidden="true" tabindex="-1"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb320-5"><a href="#cb320-5" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span> +<span id="cb320-6"><a href="#cb320-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb320-7"><a href="#cb320-7" 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="cb321"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb321-1"><a href="#cb321-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 text “Hello <em>world</em>!”</p> +<h5 class="unnumbered" id="context-example-25">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb322"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb322-1"><a href="#cb322-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb322-2"><a href="#cb322-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[stripIndent = yes]</span> +<span id="cb322-3"><a href="#cb322-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb322-4"><a href="#cb322-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\startmarkdown</span></span> +<span id="cb322-5"><a href="#cb322-5" aria-hidden="true" tabindex="-1"></a> Hello *world*!</span> +<span id="cb322-6"><a href="#cb322-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\stopmarkdown</span></span> +<span id="cb322-7"><a href="#cb322-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb323"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb323-1"><a href="#cb323-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the text “Hello <em>world</em>!”</p> +<h4 data-number="2.2.1.39" id="option-subscripts"><span +class="header-section-number">2.2.1.39</span> Option +<code>subscripts</code></h4> <dl> <dt><code>subscripts</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the Pandoc subscript syntax extension:</p> -<div class="sourceCode" id="cb320"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb320-1"><a href="#cb320-1" aria-hidden="true"></a>H~2~O is a liquid.</span></code></pre></div> +<dd> +<p>Enable the Pandoc subscript syntax extension:</p> +<div class="sourceCode" id="cb324"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb324-1"><a href="#cb324-1" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the Pandoc subscript syntax extension.</p> +<dd> +<p>Disable the Pandoc subscript syntax extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-32"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb321"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb321-1"><a href="#cb321-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb321-2"><a href="#cb321-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[subscripts]{<span class="ex">markdown</span>}</span> -<span id="cb321-3"><a href="#cb321-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb321-4"><a href="#cb321-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb321-5"><a href="#cb321-5" aria-hidden="true"></a>H~2~O is a liquid.</span> -<span id="cb321-6"><a href="#cb321-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb321-7"><a href="#cb321-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb322"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb322-1"><a href="#cb322-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-33"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb325"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb325-1"><a href="#cb325-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb325-2"><a href="#cb325-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[subscripts]{<span class="ex">markdown</span>}</span> +<span id="cb325-3"><a href="#cb325-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb325-4"><a href="#cb325-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb325-5"><a href="#cb325-5" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span> +<span id="cb325-6"><a href="#cb325-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb325-7"><a href="#cb325-7" 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="cb326"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb326-1"><a href="#cb326-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 text:</p> <blockquote> <p>H<sub>2</sub>O is a liquid.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-26">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb323"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb323-1"><a href="#cb323-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb323-2"><a href="#cb323-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[subscripts = yes]</span> -<span id="cb323-3"><a href="#cb323-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb323-4"><a href="#cb323-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb323-5"><a href="#cb323-5" aria-hidden="true"></a>H~2~O is a liquid.</span> -<span id="cb323-6"><a href="#cb323-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb323-7"><a href="#cb323-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb324"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb324-1"><a href="#cb324-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-26">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb327"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb327-1"><a href="#cb327-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb327-2"><a href="#cb327-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[subscripts = yes]</span> +<span id="cb327-3"><a href="#cb327-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb327-4"><a href="#cb327-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb327-5"><a href="#cb327-5" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span> +<span id="cb327-6"><a href="#cb327-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb327-7"><a href="#cb327-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb328"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb328-1"><a href="#cb328-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>H<sub>2</sub>O is a liquid.</p> </blockquote> -<h4 data-number="2.2.1.38" id="option-superscripts"><span class="header-section-number">2.2.1.38</span> Option <code>superscripts</code></h4> +<h4 data-number="2.2.1.40" id="option-superscripts"><span +class="header-section-number">2.2.1.40</span> Option +<code>superscripts</code></h4> <dl> <dt><code>superscripts</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the Pandoc superscript syntax extension:</p> -<div class="sourceCode" id="cb325"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb325-1"><a href="#cb325-1" aria-hidden="true"></a>2^10^ is 1024.</span></code></pre></div> +<dd> +<p>Enable the Pandoc superscript syntax extension:</p> +<div class="sourceCode" id="cb329"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb329-1"><a href="#cb329-1" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the Pandoc superscript syntax extension.</p> +<dd> +<p>Disable the Pandoc superscript syntax extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-33"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb326"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb326-1"><a href="#cb326-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb326-2"><a href="#cb326-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[superscripts]{<span class="ex">markdown</span>}</span> -<span id="cb326-3"><a href="#cb326-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb326-4"><a href="#cb326-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb326-5"><a href="#cb326-5" aria-hidden="true"></a>2^10^ is 1024.</span> -<span id="cb326-6"><a href="#cb326-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb326-7"><a href="#cb326-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb327"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb327-1"><a href="#cb327-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-34"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb330"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb330-1"><a href="#cb330-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb330-2"><a href="#cb330-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[superscripts]{<span class="ex">markdown</span>}</span> +<span id="cb330-3"><a href="#cb330-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb330-4"><a href="#cb330-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb330-5"><a href="#cb330-5" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span> +<span id="cb330-6"><a href="#cb330-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb330-7"><a href="#cb330-7" 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="cb331"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb331-1"><a href="#cb331-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 text:</p> <blockquote> <p>2<sup>10</sup> is 1024.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-27">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb328"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb328-1"><a href="#cb328-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb328-2"><a href="#cb328-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[superscripts = yes]</span> -<span id="cb328-3"><a href="#cb328-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb328-4"><a href="#cb328-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb328-5"><a href="#cb328-5" aria-hidden="true"></a>2^10^ is 1024.</span> -<span id="cb328-6"><a href="#cb328-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb328-7"><a href="#cb328-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb329"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb329-1"><a href="#cb329-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-27">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb332"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb332-1"><a href="#cb332-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb332-2"><a href="#cb332-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[superscripts = yes]</span> +<span id="cb332-3"><a href="#cb332-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb332-4"><a href="#cb332-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb332-5"><a href="#cb332-5" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span> +<span id="cb332-6"><a href="#cb332-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb332-7"><a href="#cb332-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb333"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb333-1"><a href="#cb333-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>2<sup>10</sup> is 1024.</p> </blockquote> -<h4 data-number="2.2.1.39" id="option-tablecaptions"><span class="header-section-number">2.2.1.39</span> Option <code>tableCaptions</code></h4> +<h4 data-number="2.2.1.41" id="option-tablecaptions"><span +class="header-section-number">2.2.1.41</span> Option +<code>tableCaptions</code></h4> <dl> <dt><code>tableCaptions</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the Pandoc <code>table_captions</code> syntax extension for <a href="#pipe-tables">pipe tables</a>.</p> -<div class="sourceCode" id="cb330"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb330-1"><a href="#cb330-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb330-2"><a href="#cb330-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb330-3"><a href="#cb330-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb330-4"><a href="#cb330-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb330-5"><a href="#cb330-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb330-6"><a href="#cb330-6" aria-hidden="true"></a></span> -<span id="cb330-7"><a href="#cb330-7" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span></code></pre></div> +<dd> +<p>Enable the Pandoc <code>table_captions</code> syntax extension for <a +href="#pipe-tables">pipe tables</a>.</p> +<div class="sourceCode" id="cb334"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb334-1"><a href="#cb334-1" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span> +<span id="cb334-2"><a href="#cb334-2" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span> +<span id="cb334-3"><a href="#cb334-3" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb334-4"><a href="#cb334-4" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb334-5"><a href="#cb334-5" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb334-6"><a href="#cb334-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb334-7"><a href="#cb334-7" aria-hidden="true" tabindex="-1"></a> : Demonstration of pipe table syntax.</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the Pandoc <code>table_captions</code> syntax extension.</p> +<dd> +<p>Disable the Pandoc <code>table_captions</code> syntax extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-34"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb331"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb331-1"><a href="#cb331-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb331-2"><a href="#cb331-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> -<span id="cb331-3"><a href="#cb331-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb331-4"><a href="#cb331-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb331-5"><a href="#cb331-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb331-6"><a href="#cb331-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb331-7"><a href="#cb331-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb331-8"><a href="#cb331-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb331-9"><a href="#cb331-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb331-10"><a href="#cb331-10" aria-hidden="true"></a></span> -<span id="cb331-11"><a href="#cb331-11" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> -<span id="cb331-12"><a href="#cb331-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb331-13"><a href="#cb331-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb332"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb332-1"><a href="#cb332-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-35"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb335"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb335-1"><a href="#cb335-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb335-2"><a href="#cb335-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> +<span id="cb335-3"><a href="#cb335-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb335-4"><a href="#cb335-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb335-5"><a href="#cb335-5" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span> +<span id="cb335-6"><a href="#cb335-6" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span> +<span id="cb335-7"><a href="#cb335-7" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb335-8"><a href="#cb335-8" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb335-9"><a href="#cb335-9" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb335-10"><a href="#cb335-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb335-11"><a href="#cb335-11" aria-hidden="true" tabindex="-1"></a> : Demonstration of pipe table syntax.</span> +<span id="cb335-12"><a href="#cb335-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb335-13"><a href="#cb335-13" 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="cb336"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb336-1"><a href="#cb336-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 text:</p> <blockquote> <table> <caption>Demonstration of pipe table syntax.</caption> @@ -3894,28 +5479,33 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-28">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb333"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb333-1"><a href="#cb333-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb333-2"><a href="#cb333-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span></span> -<span id="cb333-3"><a href="#cb333-3" aria-hidden="true"></a> [</span> -<span id="cb333-4"><a href="#cb333-4" aria-hidden="true"></a> pipeTables = yes,</span> -<span id="cb333-5"><a href="#cb333-5" aria-hidden="true"></a> tableCaptions = yes,</span> -<span id="cb333-6"><a href="#cb333-6" aria-hidden="true"></a> ]</span> -<span id="cb333-7"><a href="#cb333-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb333-8"><a href="#cb333-8" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb333-9"><a href="#cb333-9" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb333-10"><a href="#cb333-10" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb333-11"><a href="#cb333-11" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb333-12"><a href="#cb333-12" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb333-13"><a href="#cb333-13" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb333-14"><a href="#cb333-14" aria-hidden="true"></a></span> -<span id="cb333-15"><a href="#cb333-15" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> -<span id="cb333-16"><a href="#cb333-16" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb333-17"><a href="#cb333-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb334"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb334-1"><a href="#cb334-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-28">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb337"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb337-1"><a href="#cb337-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb337-2"><a href="#cb337-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span> +<span id="cb337-3"><a href="#cb337-3" aria-hidden="true" tabindex="-1"></a> [</span> +<span id="cb337-4"><a href="#cb337-4" aria-hidden="true" tabindex="-1"></a> pipeTables = yes,</span> +<span id="cb337-5"><a href="#cb337-5" aria-hidden="true" tabindex="-1"></a> tableCaptions = yes,</span> +<span id="cb337-6"><a href="#cb337-6" aria-hidden="true" tabindex="-1"></a> ]</span> +<span id="cb337-7"><a href="#cb337-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb337-8"><a href="#cb337-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb337-9"><a href="#cb337-9" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span> +<span id="cb337-10"><a href="#cb337-10" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span> +<span id="cb337-11"><a href="#cb337-11" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb337-12"><a href="#cb337-12" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb337-13"><a href="#cb337-13" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb337-14"><a href="#cb337-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb337-15"><a href="#cb337-15" aria-hidden="true" tabindex="-1"></a> : Demonstration of pipe table syntax.</span> +<span id="cb337-16"><a href="#cb337-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb337-17"><a href="#cb337-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb338"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb338-1"><a href="#cb338-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <table> <caption>Demonstration of pipe table syntax.</caption> @@ -3949,46 +5539,58 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </blockquote> -<h4 data-number="2.2.1.40" id="option-tasklists"><span class="header-section-number">2.2.1.40</span> Option <code>taskLists</code></h4> +<h4 data-number="2.2.1.42" id="option-tasklists"><span +class="header-section-number">2.2.1.42</span> Option +<code>taskLists</code></h4> <dl> <dt><code>taskLists</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Enable the Pandoc <code>task_lists</code> syntax extension.</p> -<div class="sourceCode" id="cb335"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb335-1"><a href="#cb335-1" aria-hidden="true"></a><span class="ss">- </span><span class="va">[ ]</span> an unticked task list item</span> -<span id="cb335-2"><a href="#cb335-2" aria-hidden="true"></a><span class="ss">- </span><span class="co">[</span><span class="ot">/</span><span class="co">]</span> a half-checked task list item</span> -<span id="cb335-3"><a href="#cb335-3" aria-hidden="true"></a><span class="ss">- </span><span class="co">[</span><span class="ot">X</span><span class="co">]</span> a ticked task list item</span></code></pre></div> +<dd> +<p>Enable the Pandoc <code>task_lists</code> syntax extension.</p> +<div class="sourceCode" id="cb339"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb339-1"><a href="#cb339-1" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span><span class="va">[ ]</span> an unticked task list item</span> +<span id="cb339-2"><a href="#cb339-2" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span><span class="co">[</span><span class="ot">/</span><span class="co">]</span> a half-checked task list item</span> +<span id="cb339-3"><a href="#cb339-3" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span><span class="co">[</span><span class="ot">X</span><span class="co">]</span> a ticked task list item</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Disable the Pandoc <code>task_lists</code> syntax extension.</p> +<dd> +<p>Disable the Pandoc <code>task_lists</code> syntax extension.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-35"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb336"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb336-1"><a href="#cb336-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb336-2"><a href="#cb336-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span> -<span id="cb336-3"><a href="#cb336-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb336-4"><a href="#cb336-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb336-5"><a href="#cb336-5" aria-hidden="true"></a> untickedBox = No,</span> -<span id="cb336-6"><a href="#cb336-6" aria-hidden="true"></a> halfTickedBox = Maybe,</span> -<span id="cb336-7"><a href="#cb336-7" aria-hidden="true"></a> tickedBox = Yes,</span> -<span id="cb336-8"><a href="#cb336-8" aria-hidden="true"></a> },</span> -<span id="cb336-9"><a href="#cb336-9" aria-hidden="true"></a>}</span> -<span id="cb336-10"><a href="#cb336-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb336-11"><a href="#cb336-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb336-12"><a href="#cb336-12" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb336-13"><a href="#cb336-13" aria-hidden="true"></a>- [/] I can?</span> -<span id="cb336-14"><a href="#cb336-14" aria-hidden="true"></a>- [X] I can!</span> -<span id="cb336-15"><a href="#cb336-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb336-16"><a href="#cb336-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb337"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb337-1"><a href="#cb337-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-36"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb340"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb340-1"><a href="#cb340-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb340-2"><a href="#cb340-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span> +<span id="cb340-3"><a href="#cb340-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb340-4"><a href="#cb340-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb340-5"><a href="#cb340-5" aria-hidden="true" tabindex="-1"></a> untickedBox = No,</span> +<span id="cb340-6"><a href="#cb340-6" aria-hidden="true" tabindex="-1"></a> halfTickedBox = Maybe,</span> +<span id="cb340-7"><a href="#cb340-7" aria-hidden="true" tabindex="-1"></a> tickedBox = Yes,</span> +<span id="cb340-8"><a href="#cb340-8" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb340-9"><a href="#cb340-9" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb340-10"><a href="#cb340-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb340-11"><a href="#cb340-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb340-12"><a href="#cb340-12" aria-hidden="true" tabindex="-1"></a>- [ ] you can't.</span> +<span id="cb340-13"><a href="#cb340-13" aria-hidden="true" tabindex="-1"></a>- [/] I can?</span> +<span id="cb340-14"><a href="#cb340-14" aria-hidden="true" tabindex="-1"></a>- [X] I can!</span> +<span id="cb340-15"><a href="#cb340-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb340-16"><a href="#cb340-16" 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="cb341"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb341-1"><a href="#cb341-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 text:</p> <blockquote> <ul> <li>No you can’t.</li> @@ -3996,23 +5598,28 @@ Thomas,Edison,1847</code></pre> <li>Yes I can!</li> </ul> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-29">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb338"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb338-1"><a href="#cb338-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb338-2"><a href="#cb338-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[taskLists = yes]</span> -<span id="cb338-3"><a href="#cb338-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> -<span id="cb338-4"><a href="#cb338-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHalftickedBox</span>{Maybe}</span> -<span id="cb338-5"><a href="#cb338-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> -<span id="cb338-6"><a href="#cb338-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb338-7"><a href="#cb338-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb338-8"><a href="#cb338-8" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb338-9"><a href="#cb338-9" aria-hidden="true"></a>- [/] I can?</span> -<span id="cb338-10"><a href="#cb338-10" aria-hidden="true"></a>- [X] I can!</span> -<span id="cb338-11"><a href="#cb338-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb338-12"><a href="#cb338-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb339"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb339-1"><a href="#cb339-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-29">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb342"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb342-1"><a href="#cb342-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb342-2"><a href="#cb342-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[taskLists = yes]</span> +<span id="cb342-3"><a href="#cb342-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> +<span id="cb342-4"><a href="#cb342-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHalftickedBox</span>{Maybe}</span> +<span id="cb342-5"><a href="#cb342-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> +<span id="cb342-6"><a href="#cb342-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb342-7"><a href="#cb342-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb342-8"><a href="#cb342-8" aria-hidden="true" tabindex="-1"></a>- [ ] you can't.</span> +<span id="cb342-9"><a href="#cb342-9" aria-hidden="true" tabindex="-1"></a>- [/] I can?</span> +<span id="cb342-10"><a href="#cb342-10" aria-hidden="true" tabindex="-1"></a>- [X] I can!</span> +<span id="cb342-11"><a href="#cb342-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb342-12"><a href="#cb342-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb343"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb343-1"><a href="#cb343-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <ul> <li>No you can’t.</li> @@ -4020,128 +5627,169 @@ Thomas,Edison,1847</code></pre> <li>Yes I can!</li> </ul> </blockquote> -<h4 data-number="2.2.1.41" id="option-texcomments"><span class="header-section-number">2.2.1.41</span> Option <code>texComments</code></h4> +<h4 data-number="2.2.1.43" id="option-texcomments"><span +class="header-section-number">2.2.1.43</span> Option +<code>texComments</code></h4> <dl> <dt><code>texComments</code> (default value: <code>false</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Strip <span class="tex">T<sub>e</sub>X</span>-style comments.</p> -<div class="sourceCode" id="cb340"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb340-1"><a href="#cb340-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb340-2"><a href="#cb340-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> -<span id="cb340-3"><a href="#cb340-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb340-4"><a href="#cb340-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb340-5"><a href="#cb340-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb340-6"><a href="#cb340-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb340-7"><a href="#cb340-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb340-8"><a href="#cb340-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Always enabled when <strong><code>hybrid</code></strong> is enabled.</p> +<dd> +<p>Strip <span class="tex">T<sub>e</sub>X</span>-style comments.</p> +<div class="sourceCode" id="cb344"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb344-1"><a href="#cb344-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb344-2"><a href="#cb344-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> +<span id="cb344-3"><a href="#cb344-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb344-4"><a href="#cb344-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb344-5"><a href="#cb344-5" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb344-6"><a href="#cb344-6" aria-hidden="true" tabindex="-1"></a> lo *world*!</span> +<span id="cb344-7"><a href="#cb344-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb344-8"><a href="#cb344-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Always enabled when <strong><code>hybrid</code></strong> is +enabled.</p> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Do not strip <span class="tex">T<sub>e</sub>X</span>-style comments.</p> +<dd> +<p>Do not strip <span class="tex">T<sub>e</sub>X</span>-style +comments.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-16">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb341"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb341-1"><a href="#cb341-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb341-2"><a href="#cb341-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTexComments</span>{true}</span> -<span id="cb341-3"><a href="#cb341-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb341-4"><a href="#cb341-4" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb341-5"><a href="#cb341-5" aria-hidden="true"></a> lo *world*!</span> -<span id="cb341-6"><a href="#cb341-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb341-7"><a href="#cb341-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb342"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb342-1"><a href="#cb342-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h5 class="unnumbered" data-number="" id="latex-example-36"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb343"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb343-1"><a href="#cb343-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb343-2"><a href="#cb343-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> -<span id="cb343-3"><a href="#cb343-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb343-4"><a href="#cb343-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb343-5"><a href="#cb343-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb343-6"><a href="#cb343-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb343-7"><a href="#cb343-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb343-8"><a href="#cb343-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb344"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb344-1"><a href="#cb344-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h5 class="unnumbered" data-number="" id="context-example-30">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb345"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb345-1"><a href="#cb345-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb345-2"><a href="#cb345-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[texComments = yes]</span> -<span id="cb345-3"><a href="#cb345-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb345-4"><a href="#cb345-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb345-5"><a href="#cb345-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb345-6"><a href="#cb345-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb345-7"><a href="#cb345-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb345-8"><a href="#cb345-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb346"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb346-1"><a href="#cb346-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h4 data-number="2.2.1.42" id="option-tightlists"><span class="header-section-number">2.2.1.42</span> Option <code>tightLists</code></h4> +<h5 class="unnumbered" id="plain-tex-example-16">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb345"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb345-1"><a href="#cb345-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb345-2"><a href="#cb345-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTexComments</span>{true}</span> +<span id="cb345-3"><a href="#cb345-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb345-4"><a href="#cb345-4" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb345-5"><a href="#cb345-5" aria-hidden="true" tabindex="-1"></a> lo *world*!</span> +<span id="cb345-6"><a href="#cb345-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb345-7"><a href="#cb345-7" 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="cb346"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb346-1"><a href="#cb346-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 text “Hello <em>world</em>!”</p> +<h5 class="unnumbered" id="latex-example-37"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb347"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb347-1"><a href="#cb347-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb347-2"><a href="#cb347-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> +<span id="cb347-3"><a href="#cb347-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb347-4"><a href="#cb347-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb347-5"><a href="#cb347-5" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb347-6"><a href="#cb347-6" aria-hidden="true" tabindex="-1"></a> lo *world*!</span> +<span id="cb347-7"><a href="#cb347-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb347-8"><a href="#cb347-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="cb348"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb348-1"><a href="#cb348-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 text “Hello <em>world</em>!”</p> +<h5 class="unnumbered" id="context-example-30">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb349"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb349-1"><a href="#cb349-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb349-2"><a href="#cb349-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[texComments = yes]</span> +<span id="cb349-3"><a href="#cb349-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb349-4"><a href="#cb349-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb349-5"><a href="#cb349-5" aria-hidden="true" tabindex="-1"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb349-6"><a href="#cb349-6" aria-hidden="true" tabindex="-1"></a> lo *world*!</span> +<span id="cb349-7"><a href="#cb349-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb349-8"><a href="#cb349-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb350"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb350-1"><a href="#cb350-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the text “Hello <em>world</em>!”</p> +<h4 data-number="2.2.1.44" id="option-tightlists"><span +class="header-section-number">2.2.1.44</span> Option +<code>tightLists</code></h4> <dl> <dt><code>tightLists</code> (default value: <code>true</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Unordered and ordered lists whose items do not consist of multiple paragraphs will be considered <em>tight</em>. Tight lists will produce tight renderers that may produce different output than lists that are not tight:</p> -<div class="sourceCode" id="cb347"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb347-1"><a href="#cb347-1" aria-hidden="true"></a><span class="ss">- </span>This is</span> -<span id="cb347-2"><a href="#cb347-2" aria-hidden="true"></a><span class="ss">- </span>a tight</span> -<span id="cb347-3"><a href="#cb347-3" aria-hidden="true"></a><span class="ss">- </span>unordered list.</span> -<span id="cb347-4"><a href="#cb347-4" aria-hidden="true"></a></span> -<span id="cb347-5"><a href="#cb347-5" aria-hidden="true"></a><span class="ss">- </span>This is</span> -<span id="cb347-6"><a href="#cb347-6" aria-hidden="true"></a></span> -<span id="cb347-7"><a href="#cb347-7" aria-hidden="true"></a> not a tight</span> -<span id="cb347-8"><a href="#cb347-8" aria-hidden="true"></a></span> -<span id="cb347-9"><a href="#cb347-9" aria-hidden="true"></a><span class="ss">- </span>unordered list.</span></code></pre></div> +<dd> +<p>Unordered and ordered lists whose items do not consist of multiple +paragraphs will be considered <em>tight</em>. Tight lists will produce +tight renderers that may produce different output than lists that are +not tight:</p> +<div class="sourceCode" id="cb351"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb351-1"><a href="#cb351-1" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>This is</span> +<span id="cb351-2"><a href="#cb351-2" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>a tight</span> +<span id="cb351-3"><a href="#cb351-3" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>unordered list.</span> +<span id="cb351-4"><a href="#cb351-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb351-5"><a href="#cb351-5" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>This is</span> +<span id="cb351-6"><a href="#cb351-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb351-7"><a href="#cb351-7" aria-hidden="true" tabindex="-1"></a> not a tight</span> +<span id="cb351-8"><a href="#cb351-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb351-9"><a href="#cb351-9" aria-hidden="true" tabindex="-1"></a><span class="ss">- </span>unordered list.</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Unordered and ordered lists whose items consist of multiple paragraphs will be treated the same way as lists that consist of multiple paragraphs.</p> +<dd> +<p>Unordered and ordered lists whose items consist of multiple +paragraphs will be treated the same way as lists that consist of +multiple paragraphs.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-37"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb348"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb348-1"><a href="#cb348-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb348-2"><a href="#cb348-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb348-3"><a href="#cb348-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb348-4"><a href="#cb348-4" aria-hidden="true"></a></span> -<span id="cb348-5"><a href="#cb348-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb348-6"><a href="#cb348-6" aria-hidden="true"></a>The following list is tight:</span> -<span id="cb348-7"><a href="#cb348-7" aria-hidden="true"></a></span> -<span id="cb348-8"><a href="#cb348-8" aria-hidden="true"></a> - first item</span> -<span id="cb348-9"><a href="#cb348-9" aria-hidden="true"></a> - second item</span> -<span id="cb348-10"><a href="#cb348-10" aria-hidden="true"></a> - third item</span> -<span id="cb348-11"><a href="#cb348-11" aria-hidden="true"></a></span> -<span id="cb348-12"><a href="#cb348-12" aria-hidden="true"></a>The following list is loose:</span> -<span id="cb348-13"><a href="#cb348-13" aria-hidden="true"></a></span> -<span id="cb348-14"><a href="#cb348-14" aria-hidden="true"></a> - first item</span> -<span id="cb348-15"><a href="#cb348-15" aria-hidden="true"></a> - second item that spans</span> -<span id="cb348-16"><a href="#cb348-16" aria-hidden="true"></a></span> -<span id="cb348-17"><a href="#cb348-17" aria-hidden="true"></a> multiple paragraphs</span> -<span id="cb348-18"><a href="#cb348-18" aria-hidden="true"></a> - third item</span> -<span id="cb348-19"><a href="#cb348-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb348-20"><a href="#cb348-20" aria-hidden="true"></a></span> -<span id="cb348-21"><a href="#cb348-21" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{tightLists=false}</span> -<span id="cb348-22"><a href="#cb348-22" aria-hidden="true"></a>The following list is now also loose:</span> -<span id="cb348-23"><a href="#cb348-23" aria-hidden="true"></a></span> -<span id="cb348-24"><a href="#cb348-24" aria-hidden="true"></a> - first item</span> -<span id="cb348-25"><a href="#cb348-25" aria-hidden="true"></a> - second item</span> -<span id="cb348-26"><a href="#cb348-26" aria-hidden="true"></a> - third item</span> -<span id="cb348-27"><a href="#cb348-27" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb348-28"><a href="#cb348-28" aria-hidden="true"></a></span> -<span id="cb348-29"><a href="#cb348-29" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb349"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb349-1"><a href="#cb349-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-38"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb352"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb352-1"><a href="#cb352-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb352-2"><a href="#cb352-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb352-3"><a href="#cb352-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb352-4"><a href="#cb352-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb352-5"><a href="#cb352-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb352-6"><a href="#cb352-6" aria-hidden="true" tabindex="-1"></a>The following list is tight:</span> +<span id="cb352-7"><a href="#cb352-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb352-8"><a href="#cb352-8" aria-hidden="true" tabindex="-1"></a> - first item</span> +<span id="cb352-9"><a href="#cb352-9" aria-hidden="true" tabindex="-1"></a> - second item</span> +<span id="cb352-10"><a href="#cb352-10" aria-hidden="true" tabindex="-1"></a> - third item</span> +<span id="cb352-11"><a href="#cb352-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb352-12"><a href="#cb352-12" aria-hidden="true" tabindex="-1"></a>The following list is loose:</span> +<span id="cb352-13"><a href="#cb352-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb352-14"><a href="#cb352-14" aria-hidden="true" tabindex="-1"></a> - first item</span> +<span id="cb352-15"><a href="#cb352-15" aria-hidden="true" tabindex="-1"></a> - second item that spans</span> +<span id="cb352-16"><a href="#cb352-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb352-17"><a href="#cb352-17" aria-hidden="true" tabindex="-1"></a> multiple paragraphs</span> +<span id="cb352-18"><a href="#cb352-18" aria-hidden="true" tabindex="-1"></a> - third item</span> +<span id="cb352-19"><a href="#cb352-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb352-20"><a href="#cb352-20" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb352-21"><a href="#cb352-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{tightLists=false}</span> +<span id="cb352-22"><a href="#cb352-22" aria-hidden="true" tabindex="-1"></a>The following list is now also loose:</span> +<span id="cb352-23"><a href="#cb352-23" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb352-24"><a href="#cb352-24" aria-hidden="true" tabindex="-1"></a> - first item</span> +<span id="cb352-25"><a href="#cb352-25" aria-hidden="true" tabindex="-1"></a> - second item</span> +<span id="cb352-26"><a href="#cb352-26" aria-hidden="true" tabindex="-1"></a> - third item</span> +<span id="cb352-27"><a href="#cb352-27" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb352-28"><a href="#cb352-28" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb352-29"><a href="#cb352-29" 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="cb353"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb353-1"><a href="#cb353-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 text:</p> <blockquote> <p>The following list is tight:</p> <ul> @@ -4163,111 +5811,178 @@ Thomas,Edison,1847</code></pre> <li><p>third item</p></li> </ul> </blockquote> -<h4 data-number="2.2.1.43" id="option-underscores"><span class="header-section-number">2.2.1.43</span> Option <code>underscores</code></h4> +<h4 data-number="2.2.1.45" id="option-underscores"><span +class="header-section-number">2.2.1.45</span> Option +<code>underscores</code></h4> <dl> <dt><code>underscores</code> (default value: <code>true</code>)</dt> -<dd><dl> +<dd> +<dl> <dt>true</dt> -<dd><p>Both underscores and asterisks can be used to denote emphasis and strong emphasis:</p> -<div class="sourceCode" id="cb350"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb350-1"><a href="#cb350-1" aria-hidden="true"></a>*single asterisks*</span> -<span id="cb350-2"><a href="#cb350-2" aria-hidden="true"></a>_single underscores_</span> -<span id="cb350-3"><a href="#cb350-3" aria-hidden="true"></a>**double asterisks**</span> -<span id="cb350-4"><a href="#cb350-4" aria-hidden="true"></a>__double underscores__</span></code></pre></div> +<dd> +<p>Both underscores and asterisks can be used to denote emphasis and +strong emphasis:</p> +<div class="sourceCode" id="cb354"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb354-1"><a href="#cb354-1" aria-hidden="true" tabindex="-1"></a>*single asterisks*</span> +<span id="cb354-2"><a href="#cb354-2" aria-hidden="true" tabindex="-1"></a>_single underscores_</span> +<span id="cb354-3"><a href="#cb354-3" aria-hidden="true" tabindex="-1"></a>**double asterisks**</span> +<span id="cb354-4"><a href="#cb354-4" aria-hidden="true" tabindex="-1"></a>__double underscores__</span></code></pre></div> </dd> </dl> </dd> -<dd><dl> +<dd> +<dl> <dt>false</dt> -<dd><p>Only asterisks can be used to denote emphasis and strong emphasis. This makes it easy to write math with the <strong><code>hybrid</code></strong> option without the need to constantly escape subscripts.</p> +<dd> +<p>Only asterisks can be used to denote emphasis and strong emphasis. +This makes it easy to write math with the +<strong><code>hybrid</code></strong> option without the need to +constantly escape subscripts.</p> </dd> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-17">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb351"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb351-1"><a href="#cb351-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb351-2"><a href="#cb351-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb351-3"><a href="#cb351-3" aria-hidden="true"></a></span> -<span id="cb351-4"><a href="#cb351-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb351-5"><a href="#cb351-5" aria-hidden="true"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> -<span id="cb351-6"><a href="#cb351-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb351-7"><a href="#cb351-7" aria-hidden="true"></a></span> -<span id="cb351-8"><a href="#cb351-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> -<span id="cb351-9"><a href="#cb351-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb351-10"><a href="#cb351-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb351-11"><a href="#cb351-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb351-12"><a href="#cb351-12" aria-hidden="true"></a></span> -<span id="cb351-13"><a href="#cb351-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb352"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb352-1"><a href="#cb352-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> -<p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-38"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb353"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb353-1"><a href="#cb353-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb353-2"><a href="#cb353-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[hybrid]{<span class="ex">markdown</span>}</span> -<span id="cb353-3"><a href="#cb353-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb353-4"><a href="#cb353-4" aria-hidden="true"></a></span> -<span id="cb353-5"><a href="#cb353-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb353-6"><a href="#cb353-6" aria-hidden="true"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> -<span id="cb353-7"><a href="#cb353-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb353-8"><a href="#cb353-8" aria-hidden="true"></a></span> -<span id="cb353-9"><a href="#cb353-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{underscores=false}</span> -<span id="cb353-10"><a href="#cb353-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb353-11"><a href="#cb353-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb353-12"><a href="#cb353-12" aria-hidden="true"></a></span> -<span id="cb353-13"><a href="#cb353-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb354"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb354-1"><a href="#cb354-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> -<p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="context-example-31">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb355"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb355-1"><a href="#cb355-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb355-2"><a href="#cb355-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span> -<span id="cb355-3"><a href="#cb355-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb355-4"><a href="#cb355-4" aria-hidden="true"></a></span> -<span id="cb355-5"><a href="#cb355-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb355-6"><a href="#cb355-6" aria-hidden="true"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> -<span id="cb355-7"><a href="#cb355-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb355-8"><a href="#cb355-8" aria-hidden="true"></a></span> -<span id="cb355-9"><a href="#cb355-9" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[underscores = yes]</span> -<span id="cb355-10"><a href="#cb355-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb355-11"><a href="#cb355-11" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb355-12"><a href="#cb355-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb355-13"><a href="#cb355-13" aria-hidden="true"></a></span> -<span id="cb355-14"><a href="#cb355-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb356"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb356-1"><a href="#cb356-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> -<p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> -</blockquote> -<h3 data-number="2.2.2" id="plain-tex-1"><span class="header-section-number">2.2.2</span> Plain <span class="tex">T<sub>e</sub>X</span></h3> -<p>Plain <span class="tex">T<sub>e</sub>X</span> options control the communication between the <span class="tex">T<sub>e</sub>X</span> interface and the <code>markdown</code> Lua module. They are supported by all higher-level interfaces of the Markdown package, i.e. the plain <span class="tex">T<sub>e</sub>X</span>, <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> and Con<span class="tex">T<sub>e</sub>X</span>t interfaces.</p> -<h4 data-number="2.2.2.1" id="setting-lua-options-from-plain-tex"><span class="header-section-number">2.2.2.1</span> Setting Lua options from plain <span class="tex">T<sub>e</sub>X</span></h4> -<p>As a rule of thumb, you can set all Lua options directly from plain <span class="tex">T<sub>e</sub>X</span>. For example, to set the <strong><code>taskLists</code></strong> Lua option to <code>true</code>, you would include the following code in your plain <span class="tex">T<sub>e</sub>X</span> document:</p> -<div class="sourceCode" id="cb357"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb357-1"><a href="#cb357-1" aria-hidden="true"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span></code></pre></div> -<h4 data-number="2.2.2.2" id="finalizing-and-freezing-the-cache"><span class="header-section-number">2.2.2.2</span> Finalizing and Freezing the Cache</h4> -<p>The <code>\markdownOptionFrozenCache</code> option uses the mapping previously created by the Lua interface <strong><code>finalizeCache</code></strong> option, and uses it to typeset the plain <span class="tex">T<sub>e</sub>X</span> document without invoking Lua. As a result, the plain <span class="tex">T<sub>e</sub>X</span> document becomes more portable, but further changes in the order and the content of markdown documents will not be reflected. It defaults to <code>false</code>.</p> -<p>The standard usage of the <strong><code>finalizeCache</code></strong> and <strong><code>frozenCache</code></strong> options is as follows:</p> +<h5 class="unnumbered" id="plain-tex-example-17">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb355"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb355-1"><a href="#cb355-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb355-2"><a href="#cb355-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb355-3"><a href="#cb355-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb355-4"><a href="#cb355-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb355-5"><a href="#cb355-5" aria-hidden="true" tabindex="-1"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> +<span id="cb355-6"><a href="#cb355-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb355-7"><a href="#cb355-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb355-8"><a href="#cb355-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> +<span id="cb355-9"><a href="#cb355-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb355-10"><a href="#cb355-10" aria-hidden="true" tabindex="-1"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> +<span id="cb355-11"><a href="#cb355-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb355-12"><a href="#cb355-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb355-13"><a href="#cb355-13" 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="cb356"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb356-1"><a href="#cb356-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:</p> +<blockquote> +<p>This is <em>emphasized text</em> and this is a math subscript: +<em>mₙ</em>.</p> +<p>This is <em>emphasized text</em> and this is a math subscript: +<em>mₙ</em>.</p> +</blockquote> +<h5 class="unnumbered" id="latex-example-39"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb357"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb357-1"><a href="#cb357-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb357-2"><a href="#cb357-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[hybrid]{<span class="ex">markdown</span>}</span> +<span id="cb357-3"><a href="#cb357-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb357-4"><a href="#cb357-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb357-5"><a href="#cb357-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb357-6"><a href="#cb357-6" aria-hidden="true" tabindex="-1"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> +<span id="cb357-7"><a href="#cb357-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb357-8"><a href="#cb357-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb357-9"><a href="#cb357-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{underscores=false}</span> +<span id="cb357-10"><a href="#cb357-10" aria-hidden="true" tabindex="-1"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> +<span id="cb357-11"><a href="#cb357-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb357-12"><a href="#cb357-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb357-13"><a href="#cb357-13" 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="cb358"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb358-1"><a href="#cb358-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 text:</p> +<blockquote> +<p>This is <em>emphasized text</em> and this is a math subscript: +<em>mₙ</em>.</p> +<p>This is <em>emphasized text</em> and this is a math subscript: +<em>mₙ</em>.</p> +</blockquote> +<h5 class="unnumbered" id="context-example-31">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb359"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb359-1"><a href="#cb359-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb359-2"><a href="#cb359-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span> +<span id="cb359-3"><a href="#cb359-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb359-4"><a href="#cb359-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb359-5"><a href="#cb359-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb359-6"><a href="#cb359-6" aria-hidden="true" tabindex="-1"></a>This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</span> +<span id="cb359-7"><a href="#cb359-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb359-8"><a href="#cb359-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb359-9"><a href="#cb359-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[underscores = yes]</span> +<span id="cb359-10"><a href="#cb359-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb359-11"><a href="#cb359-11" aria-hidden="true" tabindex="-1"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> +<span id="cb359-12"><a href="#cb359-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb359-13"><a href="#cb359-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb359-14"><a href="#cb359-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb360"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb360-1"><a href="#cb360-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<p>This is <em>emphasized text</em> and this is a math subscript: +<em>mₙ</em>.</p> +<p>This is <em>emphasized text</em> and this is a math subscript: +<em>mₙ</em>.</p> +</blockquote> +<h3 data-number="2.2.2" id="plain-tex-1"><span +class="header-section-number">2.2.2</span> Plain <span +class="tex">T<sub>e</sub>X</span></h3> +<p>Plain <span class="tex">T<sub>e</sub>X</span> options control the +communication between the <span class="tex">T<sub>e</sub>X</span> +interface and the <code>markdown</code> Lua module. They are supported +by all higher-level interfaces of the Markdown package, i.e. the plain +<span class="tex">T<sub>e</sub>X</span>, <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> and Con<span +class="tex">T<sub>e</sub>X</span>t interfaces.</p> +<h4 data-number="2.2.2.1" id="setting-lua-options-from-plain-tex"><span +class="header-section-number">2.2.2.1</span> Setting Lua options from +plain <span class="tex">T<sub>e</sub>X</span></h4> +<p>As a rule of thumb, you can set all Lua options directly from plain +<span class="tex">T<sub>e</sub>X</span>. For example, to set the +<strong><code>taskLists</code></strong> Lua option to <code>true</code>, +you would include the following code in your plain <span +class="tex">T<sub>e</sub>X</span> document:</p> +<div class="sourceCode" id="cb361"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb361-1"><a href="#cb361-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span></code></pre></div> +<h4 data-number="2.2.2.2" id="finalizing-and-freezing-the-cache"><span +class="header-section-number">2.2.2.2</span> Finalizing and Freezing the +Cache</h4> +<p>The <code>\markdownOptionFrozenCache</code> option uses the mapping +previously created by the Lua interface +<strong><code>finalizeCache</code></strong> option, and uses it to +typeset the plain <span class="tex">T<sub>e</sub>X</span> document +without invoking Lua. As a result, the plain <span +class="tex">T<sub>e</sub>X</span> document becomes more portable, but +further changes in the order and the content of markdown documents will +not be reflected. It defaults to <code>false</code>.</p> +<p>The standard usage of the <strong><code>finalizeCache</code></strong> +and <strong><code>frozenCache</code></strong> options is as follows:</p> <ol type="1"> -<li>Remove the <strong><code>cacheDir</code></strong> cache directory with stale auxiliary cache files.</li> +<li>Remove the <strong><code>cacheDir</code></strong> cache directory +with stale auxiliary cache files.</li> <li>Enable the <strong><code>finalizeCache</code></strong> option.</li> -<li>Typeset the plain <span class="tex">T<sub>e</sub>X</span> document to populate and finalize the cache.</li> +<li>Typeset the plain <span class="tex">T<sub>e</sub>X</span> document +to populate and finalize the cache.</li> <li>Enable the <code>\markdownOptionFrozenCache</code> option.</li> -<li>Publish the source code of the plain <span class="tex">T<sub>e</sub>X</span> document and the <strong><code>cacheDir</code></strong> directory.</li> +<li>Publish the source code of the plain <span +class="tex">T<sub>e</sub>X</span> document and the +<strong><code>cacheDir</code></strong> directory.</li> </ol> -<p>For more information, see the examples for the <strong><code>finalizeCache</code></strong> option.</p> -<h4 data-number="2.2.2.3" id="file-and-directory-names"><span class="header-section-number">2.2.2.3</span> File and Directory Names</h4> -<p>The plain <span class="tex">T<sub>e</sub>X</span> interface provides the following commands that you can use to specify the location of temporary files produced during the conversion from Markdown to <span class="tex">T<sub>e</sub>X</span>:</p> +<p>For more information, see the examples for the +<strong><code>finalizeCache</code></strong> option.</p> +<h4 data-number="2.2.2.3" id="file-and-directory-names"><span +class="header-section-number">2.2.2.3</span> File and Directory +Names</h4> +<p>The plain <span class="tex">T<sub>e</sub>X</span> interface provides +the following commands that you can use to specify the location of +temporary files produced during the conversion from Markdown to <span +class="tex">T<sub>e</sub>X</span>:</p> <ul> <li><code>\markdownOptionHelperScriptFileName</code>,</li> <li><code>\markdownOptionInputTempFileName</code>,</li> @@ -4277,313 +5992,495 @@ Thomas,Edison,1847</code></pre> <li><code>\markdownOptionCacheDir</code>, and</li> <li><code>\markdownOptionFrozenCacheFileName</code>.</li> </ul> -<p>The <code>\markdownOptionCacheDir</code> and <code>\markdownOptionFrozenCacheFileName</code> commands correspond to the <code>cacheDir</code> and <code>frozenCacheFileName</code> Lua options.</p> -<p>Using a text editor, create a folder named <code>output-directory</code> and a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb358"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb358-1"><a href="#cb358-1" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb358-2"><a href="#cb358-2" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb358-3"><a href="#cb358-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionHelperScriptFileName</span>{helper-script.lua}</span> -<span id="cb358-4"><a href="#cb358-4" aria-hidden="true"></a><span class="fu">\def\markdownOptionInputTempFileName</span>{temporary-input.md}</span> -<span id="cb358-5"><a href="#cb358-5" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputTempFileName</span>{temporary-output.tex}</span> -<span id="cb358-6"><a href="#cb358-6" aria-hidden="true"></a><span class="fu">\def\markdownOptionErrorTempFileName</span>{error-output.txt}</span> -<span id="cb358-7"><a href="#cb358-7" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputDir</span>{output-directory}</span> -<span id="cb358-8"><a href="#cb358-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionCacheDir</span>{output-directory/cache-directory}</span> -<span id="cb358-9"><a href="#cb358-9" aria-hidden="true"></a><span class="fu">\markdownOptionFinalizeCachetrue</span></span> -<span id="cb358-10"><a href="#cb358-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{output-directory/cache-directory/frozen-cache.tex}</span> -<span id="cb358-11"><a href="#cb358-11" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb358-12"><a href="#cb358-12" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb358-13"><a href="#cb358-13" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb358-14"><a href="#cb358-14" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb359"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb359-1"><a href="#cb359-1" aria-hidden="true"></a><span class="ex">luatex</span> --output-directory output-directory document.tex</span></code></pre></div> -<p>A text document named <code>temporary-input.md</code> should be produced in the folder named <code>output-directory</code> and contain the following text:</p> +<p>The <code>\markdownOptionCacheDir</code> and +<code>\markdownOptionFrozenCacheFileName</code> commands correspond to +the <code>cacheDir</code> and <code>frozenCacheFileName</code> Lua +options.</p> +<p>Using a text editor, create a folder named +<code>output-directory</code> and a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb362"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb362-1"><a href="#cb362-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb362-2"><a href="#cb362-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb362-3"><a href="#cb362-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHelperScriptFileName</span>{helper-script.lua}</span> +<span id="cb362-4"><a href="#cb362-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionInputTempFileName</span>{temporary-input.md}</span> +<span id="cb362-5"><a href="#cb362-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionOutputTempFileName</span>{temporary-output.tex}</span> +<span id="cb362-6"><a href="#cb362-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionErrorTempFileName</span>{error-output.txt}</span> +<span id="cb362-7"><a href="#cb362-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionOutputDir</span>{output-directory}</span> +<span id="cb362-8"><a href="#cb362-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionCacheDir</span>{output-directory/cache-directory}</span> +<span id="cb362-9"><a href="#cb362-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownOptionFinalizeCachetrue</span></span> +<span id="cb362-10"><a href="#cb362-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{output-directory/cache-directory/frozen-cache.tex}</span> +<span id="cb362-11"><a href="#cb362-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb362-12"><a href="#cb362-12" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb362-13"><a href="#cb362-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb362-14"><a href="#cb362-14" 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="cb363"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb363-1"><a href="#cb363-1" aria-hidden="true" tabindex="-1"></a><span class="ex">luatex</span> <span class="at">--output-directory</span> output-directory document.tex</span></code></pre></div> +<p>A text document named <code>temporary-input.md</code> should be +produced in the folder named <code>output-directory</code> and contain +the following text:</p> <blockquote> <p>Hello *world*!</p> </blockquote> -<p>A folder named <code>output-directory/cache-directory</code> should also be produced and contain fragments of the converted markdown document. LuaTeX does not need other temporary files to perform the conversion from markdown to <span class="tex">T<sub>e</sub>X</span>. To produce the remaining temporary files, invoke pdfTeX from the terminal:</p> -<div class="sourceCode" id="cb360"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb360-1"><a href="#cb360-1" aria-hidden="true"></a><span class="ex">pdftex</span> --output-directory output-directory --shell-escape document.tex</span></code></pre></div> -<p>Text documents named <code>helper-script.lua</code>, and <code>temporary-output.md</code> should be produced in the folder named <code>output-directory</code>. The document named <code>helper-script.lua</code> will contain Lua code that was executed to convert markdown to plain <span class="tex">T<sub>e</sub>X</span>. The document named <code>temporary-output.tex</code> will contain the input markdown document converted to <span class="tex">T<sub>e</sub>X</span>.</p> -<p>No document named <code>error-output.txt</code> should be produced in the folder named <code>output-directory</code>. This document would only be produced if an error had occured while executing the Lua code. If this happens, please <a href="https://github.com/witiko/markdown/issues">file a bug</a>.</p> -<h4 data-number="2.2.2.4" id="package-documentation"><span class="header-section-number">2.2.2.4</span> Package Documentation</h4> -<p>The <code>\markdownOptionStripPercentSigns</code> macro controls whether a percent sign (<code>\%</code>) at the beginning of a line will be discarded when reading Markdown input from a <span class="tex">T<sub>e</sub>X</span> document. This enables the use of markdown when writing <span class="tex">T<sub>e</sub>X</span> package documentation using the <a href="https://ctan.org/pkg/doc" title="doc – Format LaTeX documentation">Doc <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> package</a> by Frank Mittelbach. The recognized values of the macro are <code>true</code> (discard) and <code>false</code> (retain). It defaults to <code>false</code>.</p> -<p>Using a text editor, create a text document named <code>document.dtx</code> with the following content:</p> -<div class="sourceCode" id="cb361"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb361-1"><a href="#cb361-1" aria-hidden="true"></a><span class="co">% \iffalse</span></span> -<span id="cb361-2"><a href="#cb361-2" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">ltxdoc</span>}</span> -<span id="cb361-3"><a href="#cb361-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripPercentSigns]{<span class="ex">markdown</span>}</span> -<span id="cb361-4"><a href="#cb361-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb361-5"><a href="#cb361-5" aria-hidden="true"></a><span class="fu">\DocInput</span>{document.dtx}</span> -<span id="cb361-6"><a href="#cb361-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span> -<span id="cb361-7"><a href="#cb361-7" aria-hidden="true"></a><span class="co">% \fi</span></span> -<span id="cb361-8"><a href="#cb361-8" aria-hidden="true"></a><span class="co">%</span></span> -<span id="cb361-9"><a href="#cb361-9" aria-hidden="true"></a><span class="co">% \begin{markdown}</span></span> -<span id="cb361-10"><a href="#cb361-10" aria-hidden="true"></a><span class="co">% Hello *world*!</span></span> -<span id="cb361-11"><a href="#cb361-11" aria-hidden="true"></a><span class="co">% \end{markdown}</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb362"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb362-1"><a href="#cb362-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.dtx</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h3 data-number="2.2.3" id="latex-1"><span class="header-section-number">2.2.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> -<p><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> options allow us to disable the redefinition of the default renderer prototypes from plain <span class="tex">T<sub>e</sub>X</span>, load user-defined themes, and invoke user-defined setup snippets.</p> -<h4 data-number="2.2.3.1" id="setting-lua-and-plain-tex-options-from-latex"><span class="header-section-number">2.2.3.1</span> Setting Lua and plain <span class="tex">T<sub>e</sub>X</span> options from <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h4> -<p>As a rule of thumb, we can set all Lua options directly from <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>. For example, to set the <strong><code>taskLists</code></strong> Lua option to <code>true</code>, we would include the following code in our <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document:</p> -<div class="sourceCode" id="cb363"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb363-1"><a href="#cb363-1" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb363-2"><a href="#cb363-2" aria-hidden="true"></a> taskLists = true,</span> -<span id="cb363-3"><a href="#cb363-3" aria-hidden="true"></a>}</span></code></pre></div> -<p>We can also set all plain <span class="tex">T<sub>e</sub>X</span> options directly from <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>. For example, to set the <code>\markdownOptionHelperScriptFileName</code> plain <span class="tex">T<sub>e</sub>X</span> option to <code>helper-script.lua</code>, we would inclde the following code in our <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document:</p> -<div class="sourceCode" id="cb364"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb364-1"><a href="#cb364-1" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb364-2"><a href="#cb364-2" aria-hidden="true"></a> helperScriptFileName = helper-script.lua,</span> -<span id="cb364-3"><a href="#cb364-3" aria-hidden="true"></a>}</span></code></pre></div> -<h4 data-number="2.2.3.2" id="latexplain"><span class="header-section-number">2.2.3.2</span> No default token renderer prototypes</h4> -<p>Default token renderer prototypes require <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> packages that may clash with other packages used in a document. Additionally, if we redefine token renderers and renderer prototypes ourselves, the default definitions will bring no benefit to us. Using the <code>plain</code> package option, we can keep the default definitions from the plain <span class="tex">T<sub>e</sub>X</span> implementation and prevent the soft <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> prerequisites from being loaded: The plain option must be set before or when loading the package. Setting the option after loading the package will have no effect.</p> -<div class="sourceCode" id="cb365"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb365-1"><a href="#cb365-1" aria-hidden="true"></a><span class="bu">\usepackage</span>[plain]{<span class="ex">markdown</span>}</span></code></pre></div> -<h4 data-number="2.2.3.3" id="latexthemes"><span class="header-section-number">2.2.3.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes</h4> -<p>User-defined <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes for the Markdown package provide a domain-specific interpretation of Markdown tokens. Similarly to <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> packages, themes allow the authors to achieve a specific look and other high-level goals without low-level programming.</p> -<p>For example, to load themes named <code>witiko/beamer/MU</code> and <code>witiko/dot</code>, you would use the following code in the preamble of your document:</p> -<div class="sourceCode" id="cb366"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb366-1"><a href="#cb366-1" aria-hidden="true"></a><span class="bu">\usepackage</span>[</span> -<span id="cb366-2"><a href="#cb366-2" aria-hidden="true"></a> theme = witiko/beamer/MU,</span> -<span id="cb366-3"><a href="#cb366-3" aria-hidden="true"></a> theme = witiko/dot,</span> -<span id="cb366-4"><a href="#cb366-4" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span></code></pre></div> -<p>Due to limitations of <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>, themes may not be loaded after the beginning of a <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document.</p> +<p>A folder named <code>output-directory/cache-directory</code> should +also be produced and contain fragments of the converted markdown +document. LuaTeX does not need other temporary files to perform the +conversion from markdown to <span class="tex">T<sub>e</sub>X</span>. To +produce the remaining temporary files, invoke pdfTeX from the +terminal:</p> +<div class="sourceCode" id="cb364"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb364-1"><a href="#cb364-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pdftex</span> <span class="at">--output-directory</span> output-directory <span class="at">--shell-escape</span> document.tex</span></code></pre></div> +<p>Text documents named <code>helper-script.lua</code>, and +<code>temporary-output.md</code> should be produced in the folder named +<code>output-directory</code>. The document named +<code>helper-script.lua</code> will contain Lua code that was executed +to convert markdown to plain <span class="tex">T<sub>e</sub>X</span>. +The document named <code>temporary-output.tex</code> will contain the +input markdown document converted to <span +class="tex">T<sub>e</sub>X</span>.</p> +<p>No document named <code>error-output.txt</code> should be produced in +the folder named <code>output-directory</code>. This document would only +be produced if an error had occured while executing the Lua code. If +this happens, please <a +href="https://github.com/witiko/markdown/issues">file a bug</a>.</p> +<h4 data-number="2.2.2.4" id="package-documentation"><span +class="header-section-number">2.2.2.4</span> Package Documentation</h4> +<p>The <code>\markdownOptionStripPercentSigns</code> macro controls +whether a percent sign (<code>\%</code>) at the beginning of a line will +be discarded when reading Markdown input from a <span +class="tex">T<sub>e</sub>X</span> document. This enables the use of +markdown when writing <span class="tex">T<sub>e</sub>X</span> package +documentation using the <a href="https://ctan.org/pkg/doc" +title="doc – Format LaTeX documentation">Doc <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> package</a> by Frank +Mittelbach. The recognized values of the macro are <code>true</code> +(discard) and <code>false</code> (retain). It defaults to +<code>false</code>.</p> +<p>Using a text editor, create a text document named +<code>document.dtx</code> with the following content:</p> +<div class="sourceCode" id="cb365"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb365-1"><a href="#cb365-1" aria-hidden="true" tabindex="-1"></a><span class="co">% \iffalse</span></span> +<span id="cb365-2"><a href="#cb365-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">ltxdoc</span>}</span> +<span id="cb365-3"><a href="#cb365-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[stripPercentSigns]{<span class="ex">markdown</span>}</span> +<span id="cb365-4"><a href="#cb365-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb365-5"><a href="#cb365-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\DocInput</span>{document.dtx}</span> +<span id="cb365-6"><a href="#cb365-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span> +<span id="cb365-7"><a href="#cb365-7" aria-hidden="true" tabindex="-1"></a><span class="co">% \fi</span></span> +<span id="cb365-8"><a href="#cb365-8" aria-hidden="true" tabindex="-1"></a><span class="co">%</span></span> +<span id="cb365-9"><a href="#cb365-9" aria-hidden="true" tabindex="-1"></a><span class="co">% \begin{markdown}</span></span> +<span id="cb365-10"><a href="#cb365-10" aria-hidden="true" tabindex="-1"></a><span class="co">% Hello *world*!</span></span> +<span id="cb365-11"><a href="#cb365-11" aria-hidden="true" tabindex="-1"></a><span class="co">% \end{markdown}</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb366"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb366-1"><a href="#cb366-1" aria-hidden="true" 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="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 setup snippets.</p> +<h4 data-number="2.2.3.1" +id="setting-lua-and-plain-tex-options-from-latex"><span +class="header-section-number">2.2.3.1</span> Setting Lua and plain <span +class="tex">T<sub>e</sub>X</span> options from <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h4> +<p>As a rule of thumb, we can set all Lua options directly from <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span>. For example, to set +the <strong><code>taskLists</code></strong> Lua option to +<code>true</code>, we would include the following code in our <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document:</p> +<div class="sourceCode" id="cb367"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb367-1"><a href="#cb367-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb367-2"><a href="#cb367-2" aria-hidden="true" tabindex="-1"></a> taskLists = true,</span> +<span id="cb367-3"><a href="#cb367-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 +the <code>\markdownOptionHelperScriptFileName</code> plain <span +class="tex">T<sub>e</sub>X</span> option to +<code>helper-script.lua</code>, we would inclde the following code in +our <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document:</p> +<div class="sourceCode" id="cb368"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb368-1"><a href="#cb368-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb368-2"><a href="#cb368-2" aria-hidden="true" tabindex="-1"></a> helperScriptFileName = helper-script.lua,</span> +<span id="cb368-3"><a href="#cb368-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<h4 data-number="2.2.3.2" id="latexplain"><span +class="header-section-number">2.2.3.2</span> No default token renderer +prototypes</h4> +<p>Default token renderer prototypes require <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> packages that may clash +with other packages used in a document. Additionally, if we redefine +token renderers and renderer prototypes ourselves, the default +definitions will bring no benefit to us. Using the <code>plain</code> +package option, we can keep the default definitions from the plain <span +class="tex">T<sub>e</sub>X</span> implementation and prevent the soft +<span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> prerequisites +from being loaded: The plain option must be set before or when loading +the package. Setting the option after loading the package will have no +effect.</p> +<div class="sourceCode" id="cb369"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb369-1"><a href="#cb369-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[plain]{<span class="ex">markdown</span>}</span></code></pre></div> +<h4 data-number="2.2.3.3" id="latexthemes"><span +class="header-section-number">2.2.3.3</span> <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes</h4> +<p>User-defined <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> +themes for the Markdown package provide a domain-specific interpretation +of Markdown tokens. Similarly to <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> packages, themes allow +the authors to achieve a specific look and other high-level goals +without low-level programming.</p> +<p>For example, to load themes named <code>witiko/beamer/MU</code> and +<code>witiko/dot</code>, you would use the following code in the +preamble of your document:</p> +<div class="sourceCode" id="cb370"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb370-1"><a href="#cb370-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[</span> +<span id="cb370-2"><a href="#cb370-2" aria-hidden="true" tabindex="-1"></a> theme = witiko/beamer/MU,</span> +<span id="cb370-3"><a href="#cb370-3" aria-hidden="true" tabindex="-1"></a> theme = witiko/dot,</span> +<span id="cb370-4"><a href="#cb370-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 +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document.</p> <p>Example themes provided with the Markdown package include:</p> <dl> <dt><strong><code>witiko/dot</code></strong></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>\markdownOptionFrozenCache</code> plain <span class="tex">T<sub>e</sub>X</span> option is enabled.</p> +<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>\markdownOptionFrozenCache</code> plain <span +class="tex">T<sub>e</sub>X</span> option is enabled.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-39"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb367"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb367-1"><a href="#cb367-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb367-2"><a href="#cb367-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/dot]{<span class="ex">markdown</span>}</span> -<span id="cb367-3"><a href="#cb367-3" aria-hidden="true"></a><span class="fu">\setkeys</span>{Gin}{</span> -<span id="cb367-4"><a href="#cb367-4" aria-hidden="true"></a> width=<span class="fu">\columnwidth</span>,</span> -<span id="cb367-5"><a href="#cb367-5" aria-hidden="true"></a> height=0.65<span class="fu">\paperheight</span>,</span> -<span id="cb367-6"><a href="#cb367-6" aria-hidden="true"></a> keepaspectratio}</span> -<span id="cb367-7"><a href="#cb367-7" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb367-8"><a href="#cb367-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb367-9"><a href="#cb367-9" aria-hidden="true"></a>``` dot Various formats of mathemathical formulae</span> -<span id="cb367-10"><a href="#cb367-10" aria-hidden="true"></a>digraph tree {</span> -<span id="cb367-11"><a href="#cb367-11" aria-hidden="true"></a> margin = 0;</span> -<span id="cb367-12"><a href="#cb367-12" aria-hidden="true"></a> rankdir = "LR";</span> -<span id="cb367-13"><a href="#cb367-13" aria-hidden="true"></a></span> -<span id="cb367-14"><a href="#cb367-14" aria-hidden="true"></a> latex -> pmml;</span> -<span id="cb367-15"><a href="#cb367-15" aria-hidden="true"></a> latex -> cmml;</span> -<span id="cb367-16"><a href="#cb367-16" aria-hidden="true"></a> pmml -> slt;</span> -<span id="cb367-17"><a href="#cb367-17" aria-hidden="true"></a> cmml -> opt;</span> -<span id="cb367-18"><a href="#cb367-18" aria-hidden="true"></a> cmml -> prefix;</span> -<span id="cb367-19"><a href="#cb367-19" aria-hidden="true"></a> cmml -> infix;</span> -<span id="cb367-20"><a href="#cb367-20" aria-hidden="true"></a> pmml -> mterms [style=dashed];</span> -<span id="cb367-21"><a href="#cb367-21" aria-hidden="true"></a> cmml -> mterms;</span> -<span id="cb367-22"><a href="#cb367-22" aria-hidden="true"></a></span> -<span id="cb367-23"><a href="#cb367-23" aria-hidden="true"></a> latex [label = "LaTeX"];</span> -<span id="cb367-24"><a href="#cb367-24" aria-hidden="true"></a> pmml [label = "Presentation MathML"];</span> -<span id="cb367-25"><a href="#cb367-25" aria-hidden="true"></a> cmml [label = "Content MathML"];</span> -<span id="cb367-26"><a href="#cb367-26" aria-hidden="true"></a> slt [label = "Symbol Layout Tree"];</span> -<span id="cb367-27"><a href="#cb367-27" aria-hidden="true"></a> opt [label = "Operator Tree"];</span> -<span id="cb367-28"><a href="#cb367-28" aria-hidden="true"></a> prefix [label = "Prefix"];</span> -<span id="cb367-29"><a href="#cb367-29" aria-hidden="true"></a> infix [label = "Infix"];</span> -<span id="cb367-30"><a href="#cb367-30" aria-hidden="true"></a> mterms [label = "M-Terms"];</span> -<span id="cb367-31"><a href="#cb367-31" aria-hidden="true"></a>}</span> -<span id="cb367-32"><a href="#cb367-32" aria-hidden="true"></a>```</span> -<span id="cb367-33"><a href="#cb367-33" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb367-34"><a href="#cb367-34" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb368"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb368-1"><a href="#cb368-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain 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> +<h5 class="unnumbered" id="latex-example-40"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb371"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb371-1"><a href="#cb371-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb371-2"><a href="#cb371-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[theme=witiko/dot]{<span class="ex">markdown</span>}</span> +<span id="cb371-3"><a href="#cb371-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\setkeys</span>{Gin}{</span> +<span id="cb371-4"><a href="#cb371-4" aria-hidden="true" tabindex="-1"></a> width=<span class="fu">\columnwidth</span>,</span> +<span id="cb371-5"><a href="#cb371-5" aria-hidden="true" tabindex="-1"></a> height=0.65<span class="fu">\paperheight</span>,</span> +<span id="cb371-6"><a href="#cb371-6" aria-hidden="true" tabindex="-1"></a> keepaspectratio}</span> +<span id="cb371-7"><a href="#cb371-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb371-8"><a href="#cb371-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb371-9"><a href="#cb371-9" aria-hidden="true" tabindex="-1"></a>``` dot Various formats of mathemathical formulae</span> +<span id="cb371-10"><a href="#cb371-10" aria-hidden="true" tabindex="-1"></a>digraph tree {</span> +<span id="cb371-11"><a href="#cb371-11" aria-hidden="true" tabindex="-1"></a> margin = 0;</span> +<span id="cb371-12"><a href="#cb371-12" aria-hidden="true" tabindex="-1"></a> rankdir = "LR";</span> +<span id="cb371-13"><a href="#cb371-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb371-14"><a href="#cb371-14" aria-hidden="true" tabindex="-1"></a> latex -> pmml;</span> +<span id="cb371-15"><a href="#cb371-15" aria-hidden="true" tabindex="-1"></a> latex -> cmml;</span> +<span id="cb371-16"><a href="#cb371-16" aria-hidden="true" tabindex="-1"></a> pmml -> slt;</span> +<span id="cb371-17"><a href="#cb371-17" aria-hidden="true" tabindex="-1"></a> cmml -> opt;</span> +<span id="cb371-18"><a href="#cb371-18" aria-hidden="true" tabindex="-1"></a> cmml -> prefix;</span> +<span id="cb371-19"><a href="#cb371-19" aria-hidden="true" tabindex="-1"></a> cmml -> infix;</span> +<span id="cb371-20"><a href="#cb371-20" aria-hidden="true" tabindex="-1"></a> pmml -> mterms [style=dashed];</span> +<span id="cb371-21"><a href="#cb371-21" aria-hidden="true" tabindex="-1"></a> cmml -> mterms;</span> +<span id="cb371-22"><a href="#cb371-22" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb371-23"><a href="#cb371-23" aria-hidden="true" tabindex="-1"></a> latex [label = "LaTeX"];</span> +<span id="cb371-24"><a href="#cb371-24" aria-hidden="true" tabindex="-1"></a> pmml [label = "Presentation MathML"];</span> +<span id="cb371-25"><a href="#cb371-25" aria-hidden="true" tabindex="-1"></a> cmml [label = "Content MathML"];</span> +<span id="cb371-26"><a href="#cb371-26" aria-hidden="true" tabindex="-1"></a> slt [label = "Symbol Layout Tree"];</span> +<span id="cb371-27"><a href="#cb371-27" aria-hidden="true" tabindex="-1"></a> opt [label = "Operator Tree"];</span> +<span id="cb371-28"><a href="#cb371-28" aria-hidden="true" tabindex="-1"></a> prefix [label = "Prefix"];</span> +<span id="cb371-29"><a href="#cb371-29" aria-hidden="true" tabindex="-1"></a> infix [label = "Infix"];</span> +<span id="cb371-30"><a href="#cb371-30" aria-hidden="true" tabindex="-1"></a> mterms [label = "M-Terms"];</span> +<span id="cb371-31"><a href="#cb371-31" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb371-32"><a href="#cb371-32" aria-hidden="true" tabindex="-1"></a>```</span> +<span id="cb371-33"><a href="#cb371-33" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb371-34"><a href="#cb371-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="cb372"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb372-1"><a href="#cb372-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><strong><code>witiko/graphicx/http</code></strong></dt> -<dd><p>A theme that adds support for downloading images whose URL has the http or https protocol. The theme requires the <strong><code>catchfile</code></strong> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> package and a Unix-like operating system with GNU Coreutils <code>md5sum</code> and either GNU Wget or cURL installed. The theme also requires shell access unless the <code>\markdownOptionFrozenCache</code> plain <span class="tex">T<sub>e</sub>X</span> option is enabled.</p> +<dd> +<p>A theme that adds support for downloading images whose URL has the +http or https protocol. The theme requires the +<strong><code>catchfile</code></strong> <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> package and a Unix-like +operating system with GNU Coreutils <code>md5sum</code> and either GNU +Wget or cURL installed. The theme also requires shell access unless the +<code>\markdownOptionFrozenCache</code> plain <span +class="tex">T<sub>e</sub>X</span> option is enabled.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-40"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb369"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb369-1"><a href="#cb369-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb369-2"><a href="#cb369-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/graphicx/http]{<span class="ex">markdown</span>}</span> -<span id="cb369-3"><a href="#cb369-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb369-4"><a href="#cb369-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb369-5"><a href="#cb369-5" aria-hidden="true"></a>![img](https://github.com/witiko/markdown/raw/main/markdown.png</span> -<span id="cb369-6"><a href="#cb369-6" aria-hidden="true"></a> "The banner of the Markdown package")</span> -<span id="cb369-7"><a href="#cb369-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb369-8"><a href="#cb369-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb370"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb370-1"><a href="#cb370-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following image:</p> +<h5 class="unnumbered" id="latex-example-41"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb373"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb373-1"><a href="#cb373-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb373-2"><a href="#cb373-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[theme=witiko/graphicx/http]{<span class="ex">markdown</span>}</span> +<span id="cb373-3"><a href="#cb373-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb373-4"><a href="#cb373-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb373-5"><a href="#cb373-5" aria-hidden="true" tabindex="-1"></a>![img](https://github.com/witiko/markdown/raw/main/markdown.png</span> +<span id="cb373-6"><a href="#cb373-6" aria-hidden="true" tabindex="-1"></a> "The banner of the Markdown package")</span> +<span id="cb373-7"><a href="#cb373-7" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb373-8"><a href="#cb373-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="cb374"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb374-1"><a href="#cb374-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="" /><figcaption>img</figcaption> +<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><strong><code>witiko/tilde</code></strong></dt> -<dd><p>A theme that makes tilde (<code>~</code>) always typeset the non-breaking space even when the <strong><code>hybrid</code></strong> Lua option is disabled.</p> +<dd> +<p>A theme that makes tilde (<code>~</code>) always typeset the +non-breaking space even when the <strong><code>hybrid</code></strong> +Lua option is disabled.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-41"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb371"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb371-1"><a href="#cb371-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb371-2"><a href="#cb371-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/tilde]{<span class="ex">markdown</span>}</span> -<span id="cb371-3"><a href="#cb371-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb371-4"><a href="#cb371-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb371-5"><a href="#cb371-5" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb371-6"><a href="#cb371-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb371-7"><a href="#cb371-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb372"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb372-1"><a href="#cb372-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, where the middot (<code>·</code>) denotes a non-breaking space:</p> +<h5 class="unnumbered" id="latex-example-42"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb375"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb375-1"><a href="#cb375-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb375-2"><a href="#cb375-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[theme=witiko/tilde]{<span class="ex">markdown</span>}</span> +<span id="cb375-3"><a href="#cb375-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb375-4"><a href="#cb375-4" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb375-5"><a href="#cb375-5" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb375-6"><a href="#cb375-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb375-7"><a href="#cb375-7" 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="cb376"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb376-1"><a href="#cb376-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 text, where the middot (<code>·</code>) denotes a +non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> </blockquote> -<h4 data-number="2.2.3.4" id="latexsetupsnippets"><span class="header-section-number">2.2.3.4</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> setup snippets</h4> -<p>User-defined <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes provide global control over high-level goals. However, it is often desirable to change only some local aspects of a document. <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> setup snippets provide syntactic sugar for defining and invoking various options locally.</p> -<p>Here is how we can use setup snippets to store options and invoke them later:</p> -<div class="sourceCode" id="cb373"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb373-1"><a href="#cb373-1" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</span> -<span id="cb373-2"><a href="#cb373-2" aria-hidden="true"></a> renderers = {</span> -<span id="cb373-3"><a href="#cb373-3" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb373-4"><a href="#cb373-4" aria-hidden="true"></a> <span class="fu">\item</span>[<span class="fu">\romannumeral</span>#1<span class="fu">\relax</span>.]<span class="co">%</span></span> -<span id="cb373-5"><a href="#cb373-5" aria-hidden="true"></a> },</span> -<span id="cb373-6"><a href="#cb373-6" aria-hidden="true"></a> },</span> -<span id="cb373-7"><a href="#cb373-7" aria-hidden="true"></a>}</span> -<span id="cb373-8"><a href="#cb373-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb373-9"><a href="#cb373-9" aria-hidden="true"></a></span> -<span id="cb373-10"><a href="#cb373-10" aria-hidden="true"></a>The following ordered list will be preceded by arabic numerals:</span> -<span id="cb373-11"><a href="#cb373-11" aria-hidden="true"></a></span> -<span id="cb373-12"><a href="#cb373-12" aria-hidden="true"></a>1. wahid</span> -<span id="cb373-13"><a href="#cb373-13" aria-hidden="true"></a>2. aithnayn</span> -<span id="cb373-14"><a href="#cb373-14" aria-hidden="true"></a></span> -<span id="cb373-15"><a href="#cb373-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb373-16"><a href="#cb373-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{snippet=romanNumerals}</span> -<span id="cb373-17"><a href="#cb373-17" aria-hidden="true"></a></span> -<span id="cb373-18"><a href="#cb373-18" aria-hidden="true"></a>The following ordered list will be preceded by roman numerals:</span> -<span id="cb373-19"><a href="#cb373-19" aria-hidden="true"></a></span> -<span id="cb373-20"><a href="#cb373-20" aria-hidden="true"></a>3. tres</span> -<span id="cb373-21"><a href="#cb373-21" aria-hidden="true"></a>4. quattuor</span> -<span id="cb373-22"><a href="#cb373-22" aria-hidden="true"></a></span> -<span id="cb373-23"><a href="#cb373-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span></code></pre></div> -<h2 data-number="2.3" id="markdown-tokens"><span class="header-section-number">2.3</span> Markdown Tokens</h2> -<p>A key feature of the Markdown package is the support for manipulating markdown tokens, such as headings, emphasized text, links, and lists, in <span class="tex">T<sub>e</sub>X</span>. Instead of reducing <span class="tex">T<sub>e</sub>X</span> to a PDF document producer, the Markdown package allows the user to specify how every markdown token should be processed and rendered.</p> -<h3 data-number="2.3.1" id="texrenderersuser"><span class="header-section-number">2.3.1</span> Token Renderers</h3> -<p>Token renderers are user-defined <span class="tex">T<sub>e</sub>X</span> macros, which render markdown tokens. In this section, I will describe the individual token renderers.</p> -<h4 data-number="2.3.1.1" id="tickbox-renderers"><span class="header-section-number">2.3.1.1</span> Tickbox Renderers</h4> -<p>The macros named <code>\markdownRendererTickedBox</code>, <code>\markdownRendererHalfTickedBox</code>, and <code>\markdownRendererUntickedBox</code> represent ticked and unticked boxes, respectively. These macros will either be produced, when the <strong><code>taskLists</code></strong> option is enabled, or when the Ballot Box with X (☒, U+2612), Hourglass (⌛, U+231B) or Ballot Box (☐, U+2610) Unicode characters are encountered in the markdown input, respectively.</p> -<h5 class="unnumbered" data-number="" id="latex-example-42"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb374"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb374-1"><a href="#cb374-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb374-2"><a href="#cb374-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span> -<span id="cb374-3"><a href="#cb374-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb374-4"><a href="#cb374-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb374-5"><a href="#cb374-5" aria-hidden="true"></a> untickedBox = No,</span> -<span id="cb374-6"><a href="#cb374-6" aria-hidden="true"></a> tickedBox = Yes,</span> -<span id="cb374-7"><a href="#cb374-7" aria-hidden="true"></a> },</span> -<span id="cb374-8"><a href="#cb374-8" aria-hidden="true"></a>}</span> -<span id="cb374-9"><a href="#cb374-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb374-10"><a href="#cb374-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb374-11"><a href="#cb374-11" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb374-12"><a href="#cb374-12" aria-hidden="true"></a>- [x] I can!</span> -<span id="cb374-13"><a href="#cb374-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb374-14"><a href="#cb374-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb375"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb375-1"><a href="#cb375-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.2.3.4" id="latexsetupsnippets"><span +class="header-section-number">2.2.3.4</span> <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> setup snippets</h4> +<p>User-defined <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> +themes provide global control over high-level goals. However, it is +often desirable to change only some local aspects of a document. <span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> setup snippets provide +syntactic sugar for defining and invoking various options locally.</p> +<p>Here is how we can use setup snippets to store options and invoke +them later:</p> +<div class="sourceCode" id="cb377"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb377-1"><a href="#cb377-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</span> +<span id="cb377-2"><a href="#cb377-2" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb377-3"><a href="#cb377-3" aria-hidden="true" tabindex="-1"></a> olItemWithNumber = {<span class="co">%</span></span> +<span id="cb377-4"><a href="#cb377-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="cb377-5"><a href="#cb377-5" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb377-6"><a href="#cb377-6" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb377-7"><a href="#cb377-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb377-8"><a href="#cb377-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb377-9"><a href="#cb377-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb377-10"><a href="#cb377-10" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by arabic numerals:</span> +<span id="cb377-11"><a href="#cb377-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb377-12"><a href="#cb377-12" aria-hidden="true" tabindex="-1"></a>1. wahid</span> +<span id="cb377-13"><a href="#cb377-13" aria-hidden="true" tabindex="-1"></a>2. aithnayn</span> +<span id="cb377-14"><a href="#cb377-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb377-15"><a href="#cb377-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb377-16"><a href="#cb377-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{snippet=romanNumerals}</span> +<span id="cb377-17"><a href="#cb377-17" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb377-18"><a href="#cb377-18" aria-hidden="true" tabindex="-1"></a>The following ordered list will be preceded by roman numerals:</span> +<span id="cb377-19"><a href="#cb377-19" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb377-20"><a href="#cb377-20" aria-hidden="true" tabindex="-1"></a>3. tres</span> +<span id="cb377-21"><a href="#cb377-21" aria-hidden="true" tabindex="-1"></a>4. quattuor</span> +<span id="cb377-22"><a href="#cb377-22" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb377-23"><a href="#cb377-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span></code></pre></div> +<h2 data-number="2.3" id="markdown-tokens"><span +class="header-section-number">2.3</span> Markdown Tokens</h2> +<p>A key feature of the Markdown package is the support for manipulating +markdown tokens, such as headings, emphasized text, links, and lists, in +<span class="tex">T<sub>e</sub>X</span>. Instead of reducing <span +class="tex">T<sub>e</sub>X</span> to a PDF document producer, the +Markdown package allows the user to specify how every markdown token +should be processed and rendered.</p> +<h3 data-number="2.3.1" id="texrenderersuser"><span +class="header-section-number">2.3.1</span> Token Renderers</h3> +<p>Token renderers are user-defined <span +class="tex">T<sub>e</sub>X</span> macros, which render markdown tokens. +In this section, I will describe the individual token renderers.</p> +<h4 data-number="2.3.1.1" id="tickbox-renderers"><span +class="header-section-number">2.3.1.1</span> Tickbox Renderers</h4> +<p>The macros named <code>\markdownRendererTickedBox</code>, +<code>\markdownRendererHalfTickedBox</code>, and +<code>\markdownRendererUntickedBox</code> represent ticked and unticked +boxes, respectively. These macros will either be produced, when the +<strong><code>taskLists</code></strong> option is enabled, or when the +Ballot Box with X (☒, U+2612), Hourglass (⌛, U+231B) or Ballot Box (☐, +U+2610) Unicode characters are encountered in the markdown input, +respectively.</p> +<h5 class="unnumbered" id="latex-example-43"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb378"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb378-1"><a href="#cb378-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb378-2"><a href="#cb378-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span> +<span id="cb378-3"><a href="#cb378-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb378-4"><a href="#cb378-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb378-5"><a href="#cb378-5" aria-hidden="true" tabindex="-1"></a> untickedBox = No,</span> +<span id="cb378-6"><a href="#cb378-6" aria-hidden="true" tabindex="-1"></a> tickedBox = Yes,</span> +<span id="cb378-7"><a href="#cb378-7" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb378-8"><a href="#cb378-8" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb378-9"><a href="#cb378-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb378-10"><a href="#cb378-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb378-11"><a href="#cb378-11" aria-hidden="true" tabindex="-1"></a>- [ ] you can't.</span> +<span id="cb378-12"><a href="#cb378-12" aria-hidden="true" tabindex="-1"></a>- [x] I can!</span> +<span id="cb378-13"><a href="#cb378-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb378-14"><a href="#cb378-14" 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="cb379"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb379-1"><a href="#cb379-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 text:</p> <blockquote> <ul> <li>No you can’t.</li> <li>Yes I can!</li> </ul> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-32">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb376"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb376-1"><a href="#cb376-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb376-2"><a href="#cb376-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[taskLists = yes]</span> -<span id="cb376-3"><a href="#cb376-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> -<span id="cb376-4"><a href="#cb376-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> -<span id="cb376-5"><a href="#cb376-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb376-6"><a href="#cb376-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb376-7"><a href="#cb376-7" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb376-8"><a href="#cb376-8" aria-hidden="true"></a>- [x] I can!</span> -<span id="cb376-9"><a href="#cb376-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb376-10"><a href="#cb376-10" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb377"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb377-1"><a href="#cb377-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-32">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb380"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb380-1"><a href="#cb380-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb380-2"><a href="#cb380-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[taskLists = yes]</span> +<span id="cb380-3"><a href="#cb380-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> +<span id="cb380-4"><a href="#cb380-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> +<span id="cb380-5"><a href="#cb380-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb380-6"><a href="#cb380-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb380-7"><a href="#cb380-7" aria-hidden="true" tabindex="-1"></a>- [ ] you can't.</span> +<span id="cb380-8"><a href="#cb380-8" aria-hidden="true" tabindex="-1"></a>- [x] I can!</span> +<span id="cb380-9"><a href="#cb380-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb380-10"><a href="#cb380-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb381"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb381-1"><a href="#cb381-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <ul> <li>No you can’t.</li> <li>Yes I can!</li> </ul> </blockquote> -<h4 data-number="2.3.1.2" id="markdown-document-renderers"><span class="header-section-number">2.3.1.2</span> Markdown Document Renderers</h4> -<p>The <code>\markdownRendererDocumentBegin</code> and <code>\markdownRendererDocumentEnd</code> macros represent the beginning and the end of a <em>markdown</em> document. The macros receive no arguments.</p> -<p>A <span class="tex">T<sub>e</sub>X</span> document may contain any number of markdown documents. Additionally, markdown documents may appear not only in a sequence, but several markdown documents may also be <em>nested</em>. Redefinitions of the macros should take this into account.</p> -<h5 class="unnumbered" data-number="" id="latex-example-43"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>nested.md</code> with the following content:</p> -<div class="sourceCode" id="cb378"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb378-1"><a href="#cb378-1" aria-hidden="true"></a>This is a *nested* markdown document.</span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb379"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb379-1"><a href="#cb379-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb379-2"><a href="#cb379-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> -<span id="cb379-3"><a href="#cb379-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb379-4"><a href="#cb379-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb379-5"><a href="#cb379-5" aria-hidden="true"></a> contentBlock = {<span class="co">%</span></span> -<span id="cb379-6"><a href="#cb379-6" aria-hidden="true"></a> <span class="fu">\markdownInput</span>{#3}<span class="co">%</span></span> -<span id="cb379-7"><a href="#cb379-7" aria-hidden="true"></a> },</span> -<span id="cb379-8"><a href="#cb379-8" aria-hidden="true"></a> documentBegin = {<span class="co">%</span></span> -<span id="cb379-9"><a href="#cb379-9" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb379-10"><a href="#cb379-10" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a document)}</span> -<span id="cb379-11"><a href="#cb379-11" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb379-12"><a href="#cb379-12" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb379-13"><a href="#cb379-13" aria-hidden="true"></a> <span class="fu">\markdownSetup</span>{snippet=first-nesting-level}<span class="co">%</span></span> -<span id="cb379-14"><a href="#cb379-14" aria-hidden="true"></a> },</span> -<span id="cb379-15"><a href="#cb379-15" aria-hidden="true"></a> documentEnd = {<span class="co">%</span></span> -<span id="cb379-16"><a href="#cb379-16" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> -<span id="cb379-17"><a href="#cb379-17" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb379-18"><a href="#cb379-18" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a document)}</span> -<span id="cb379-19"><a href="#cb379-19" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb379-20"><a href="#cb379-20" aria-hidden="true"></a> },</span> -<span id="cb379-21"><a href="#cb379-21" aria-hidden="true"></a> },</span> -<span id="cb379-22"><a href="#cb379-22" aria-hidden="true"></a>}</span> -<span id="cb379-23"><a href="#cb379-23" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{first-nesting-level}{</span> -<span id="cb379-24"><a href="#cb379-24" aria-hidden="true"></a> renderers = {</span> -<span id="cb379-25"><a href="#cb379-25" aria-hidden="true"></a> documentBegin = {</span> -<span id="cb379-26"><a href="#cb379-26" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb379-27"><a href="#cb379-27" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span> -<span id="cb379-28"><a href="#cb379-28" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb379-29"><a href="#cb379-29" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb379-30"><a href="#cb379-30" aria-hidden="true"></a> <span class="fu">\markdownSetup</span>{snippet=second-nesting-level-and-below}</span> -<span id="cb379-31"><a href="#cb379-31" aria-hidden="true"></a> },</span> -<span id="cb379-32"><a href="#cb379-32" aria-hidden="true"></a> },</span> -<span id="cb379-33"><a href="#cb379-33" aria-hidden="true"></a>}</span> -<span id="cb379-34"><a href="#cb379-34" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{second-nesting-level-and-below}{</span> -<span id="cb379-35"><a href="#cb379-35" aria-hidden="true"></a> renderers = {</span> -<span id="cb379-36"><a href="#cb379-36" aria-hidden="true"></a> documentBegin = {</span> -<span id="cb379-37"><a href="#cb379-37" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb379-38"><a href="#cb379-38" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span> -<span id="cb379-39"><a href="#cb379-39" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb379-40"><a href="#cb379-40" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb379-41"><a href="#cb379-41" aria-hidden="true"></a> },</span> -<span id="cb379-42"><a href="#cb379-42" aria-hidden="true"></a> documentEnd = {</span> -<span id="cb379-43"><a href="#cb379-43" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> -<span id="cb379-44"><a href="#cb379-44" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb379-45"><a href="#cb379-45" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a nested document)}</span> -<span id="cb379-46"><a href="#cb379-46" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb379-47"><a href="#cb379-47" aria-hidden="true"></a> },</span> -<span id="cb379-48"><a href="#cb379-48" aria-hidden="true"></a> },</span> -<span id="cb379-49"><a href="#cb379-49" aria-hidden="true"></a>}</span> -<span id="cb379-50"><a href="#cb379-50" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb379-51"><a href="#cb379-51" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb379-52"><a href="#cb379-52" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb379-53"><a href="#cb379-53" aria-hidden="true"></a></span> -<span id="cb379-54"><a href="#cb379-54" aria-hidden="true"></a>/nested.md</span> -<span id="cb379-55"><a href="#cb379-55" aria-hidden="true"></a></span> -<span id="cb379-56"><a href="#cb379-56" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb379-57"><a href="#cb379-57" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb379-58"><a href="#cb379-58" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb379-59"><a href="#cb379-59" aria-hidden="true"></a></span> -<span id="cb379-60"><a href="#cb379-60" aria-hidden="true"></a>Bar baz!</span> -<span id="cb379-61"><a href="#cb379-61" aria-hidden="true"></a></span> -<span id="cb379-62"><a href="#cb379-62" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb379-63"><a href="#cb379-63" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb380"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb380-1"><a href="#cb380-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.2" id="markdown-document-renderers"><span +class="header-section-number">2.3.1.2</span> Markdown Document +Renderers</h4> +<p>The <code>\markdownRendererDocumentBegin</code> and +<code>\markdownRendererDocumentEnd</code> macros represent the beginning +and the end of a <em>markdown</em> document. The macros receive no +arguments.</p> +<p>A <span class="tex">T<sub>e</sub>X</span> document may contain any +number of markdown documents. Additionally, markdown documents may +appear not only in a sequence, but several markdown documents may also +be <em>nested</em>. Redefinitions of the macros should take this into +account.</p> +<h5 class="unnumbered" id="latex-example-44"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>nested.md</code> with the following content:</p> +<div class="sourceCode" id="cb382"><pre +class="sourceCode md"><code class="sourceCode markdown"><span id="cb382-1"><a href="#cb382-1" aria-hidden="true" tabindex="-1"></a>This is a *nested* markdown document.</span></code></pre></div> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb383"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb383-1"><a href="#cb383-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb383-2"><a href="#cb383-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> +<span id="cb383-3"><a href="#cb383-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb383-4"><a href="#cb383-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb383-5"><a href="#cb383-5" aria-hidden="true" tabindex="-1"></a> contentBlock = {<span class="co">%</span></span> +<span id="cb383-6"><a href="#cb383-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\markdownInput</span>{#3}<span class="co">%</span></span> +<span id="cb383-7"><a href="#cb383-7" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb383-8"><a href="#cb383-8" aria-hidden="true" tabindex="-1"></a> documentBegin = {<span class="co">%</span></span> +<span id="cb383-9"><a href="#cb383-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb383-10"><a href="#cb383-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a document)}</span> +<span id="cb383-11"><a href="#cb383-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb383-12"><a href="#cb383-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span> +<span id="cb383-13"><a href="#cb383-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\markdownSetup</span>{snippet=first-nesting-level}<span class="co">%</span></span> +<span id="cb383-14"><a href="#cb383-14" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb383-15"><a href="#cb383-15" aria-hidden="true" tabindex="-1"></a> documentEnd = {<span class="co">%</span></span> +<span id="cb383-16"><a href="#cb383-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\endgroup</span></span> +<span id="cb383-17"><a href="#cb383-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb383-18"><a href="#cb383-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a document)}</span> +<span id="cb383-19"><a href="#cb383-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb383-20"><a href="#cb383-20" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb383-21"><a href="#cb383-21" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb383-22"><a href="#cb383-22" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb383-23"><a href="#cb383-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetupSnippet</span>{first-nesting-level}{</span> +<span id="cb383-24"><a href="#cb383-24" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb383-25"><a href="#cb383-25" aria-hidden="true" tabindex="-1"></a> documentBegin = {</span> +<span id="cb383-26"><a href="#cb383-26" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb383-27"><a href="#cb383-27" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span> +<span id="cb383-28"><a href="#cb383-28" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb383-29"><a href="#cb383-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span> +<span id="cb383-30"><a href="#cb383-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\markdownSetup</span>{snippet=second-nesting-level-and-below}</span> +<span id="cb383-31"><a href="#cb383-31" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb383-32"><a href="#cb383-32" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb383-33"><a href="#cb383-33" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb383-34"><a href="#cb383-34" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetupSnippet</span>{second-nesting-level-and-below}{</span> +<span id="cb383-35"><a href="#cb383-35" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb383-36"><a href="#cb383-36" aria-hidden="true" tabindex="-1"></a> documentBegin = {</span> +<span id="cb383-37"><a href="#cb383-37" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb383-38"><a href="#cb383-38" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span> +<span id="cb383-39"><a href="#cb383-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb383-40"><a href="#cb383-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span> +<span id="cb383-41"><a href="#cb383-41" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb383-42"><a href="#cb383-42" aria-hidden="true" tabindex="-1"></a> documentEnd = {</span> +<span id="cb383-43"><a href="#cb383-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\endgroup</span></span> +<span id="cb383-44"><a href="#cb383-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb383-45"><a href="#cb383-45" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a nested document)}</span> +<span id="cb383-46"><a href="#cb383-46" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb383-47"><a href="#cb383-47" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb383-48"><a href="#cb383-48" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb383-49"><a href="#cb383-49" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb383-50"><a href="#cb383-50" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb383-51"><a href="#cb383-51" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb383-52"><a href="#cb383-52" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb383-53"><a href="#cb383-53" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb383-54"><a href="#cb383-54" aria-hidden="true" tabindex="-1"></a>/nested.md</span> +<span id="cb383-55"><a href="#cb383-55" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb383-56"><a href="#cb383-56" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span> +<span id="cb383-57"><a href="#cb383-57" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb383-58"><a href="#cb383-58" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb383-59"><a href="#cb383-59" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb383-60"><a href="#cb383-60" aria-hidden="true" tabindex="-1"></a>Bar baz!</span> +<span id="cb383-61"><a href="#cb383-61" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb383-62"><a href="#cb383-62" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb383-63"><a href="#cb383-63" 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="cb384"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb384-1"><a href="#cb384-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 text:</p> <blockquote> <p><em>(The beginning of a document)</em></p> <p>Hello <em>world</em>!</p> @@ -4596,664 +6493,937 @@ Thomas,Edison,1847</code></pre> <p>Bar baz!</p> <p><em>(The end of a document)</em></p> </blockquote> -<h4 data-number="2.3.1.3" id="interblock-separator-renderer"><span class="header-section-number">2.3.1.3</span> Interblock Separator Renderer</h4> -<p>The <code>\markdownRendererInterblockSeparator</code> macro represents a separator between two markdown block elements. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-18">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb381"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb381-1"><a href="#cb381-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb381-2"><a href="#cb381-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb381-3"><a href="#cb381-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb381-4"><a href="#cb381-4" aria-hidden="true"></a> {<span class="fu">\it</span>(The end of a block)}<span class="co">%</span></span> -<span id="cb381-5"><a href="#cb381-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb381-6"><a href="#cb381-6" aria-hidden="true"></a>}</span> -<span id="cb381-7"><a href="#cb381-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb381-8"><a href="#cb381-8" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb381-9"><a href="#cb381-9" aria-hidden="true"></a></span> -<span id="cb381-10"><a href="#cb381-10" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb381-11"><a href="#cb381-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb381-12"><a href="#cb381-12" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb382"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb382-1"><a href="#cb382-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.3" id="interblock-separator-renderer"><span +class="header-section-number">2.3.1.3</span> Interblock Separator +Renderer</h4> +<p>The <code>\markdownRendererInterblockSeparator</code> macro +represents a separator between two markdown block elements. The macro +receives no arguments.</p> +<h5 class="unnumbered" id="plain-tex-example-18">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb385"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb385-1"><a href="#cb385-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb385-2"><a href="#cb385-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb385-3"><a href="#cb385-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb385-4"><a href="#cb385-4" aria-hidden="true" tabindex="-1"></a> {<span class="fu">\it</span>(The end of a block)}<span class="co">%</span></span> +<span id="cb385-5"><a href="#cb385-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb385-6"><a href="#cb385-6" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb385-7"><a href="#cb385-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb385-8"><a href="#cb385-8" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb385-9"><a href="#cb385-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb385-10"><a href="#cb385-10" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span> +<span id="cb385-11"><a href="#cb385-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb385-12"><a href="#cb385-12" 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="cb386"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb386-1"><a href="#cb386-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:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(The end of a block)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-44"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb383"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb383-1"><a href="#cb383-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb383-2"><a href="#cb383-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb383-3"><a href="#cb383-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb383-4"><a href="#cb383-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb383-5"><a href="#cb383-5" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb383-6"><a href="#cb383-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb383-7"><a href="#cb383-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> -<span id="cb383-8"><a href="#cb383-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb383-9"><a href="#cb383-9" aria-hidden="true"></a> },</span> -<span id="cb383-10"><a href="#cb383-10" aria-hidden="true"></a> },</span> -<span id="cb383-11"><a href="#cb383-11" aria-hidden="true"></a>}</span> -<span id="cb383-12"><a href="#cb383-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb383-13"><a href="#cb383-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb383-14"><a href="#cb383-14" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb383-15"><a href="#cb383-15" aria-hidden="true"></a></span> -<span id="cb383-16"><a href="#cb383-16" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb383-17"><a href="#cb383-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb383-18"><a href="#cb383-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb384"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb384-1"><a href="#cb384-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-45"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb387"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb387-1"><a href="#cb387-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb387-2"><a href="#cb387-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb387-3"><a href="#cb387-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb387-4"><a href="#cb387-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb387-5"><a href="#cb387-5" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb387-6"><a href="#cb387-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb387-7"><a href="#cb387-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> +<span id="cb387-8"><a href="#cb387-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb387-9"><a href="#cb387-9" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb387-10"><a href="#cb387-10" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb387-11"><a href="#cb387-11" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb387-12"><a href="#cb387-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb387-13"><a href="#cb387-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb387-14"><a href="#cb387-14" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb387-15"><a href="#cb387-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb387-16"><a href="#cb387-16" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span> +<span id="cb387-17"><a href="#cb387-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb387-18"><a href="#cb387-18" 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="cb388"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb388-1"><a href="#cb388-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 text:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(The end of a block)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-33">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb385"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb385-1"><a href="#cb385-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb385-2"><a href="#cb385-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb385-3"><a href="#cb385-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb385-4"><a href="#cb385-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> -<span id="cb385-5"><a href="#cb385-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb385-6"><a href="#cb385-6" aria-hidden="true"></a>}</span> -<span id="cb385-7"><a href="#cb385-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb385-8"><a href="#cb385-8" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb385-9"><a href="#cb385-9" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb385-10"><a href="#cb385-10" aria-hidden="true"></a></span> -<span id="cb385-11"><a href="#cb385-11" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb385-12"><a href="#cb385-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb385-13"><a href="#cb385-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb386"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb386-1"><a href="#cb386-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-33">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb389"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb389-1"><a href="#cb389-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb389-2"><a href="#cb389-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb389-3"><a href="#cb389-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb389-4"><a href="#cb389-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> +<span id="cb389-5"><a href="#cb389-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb389-6"><a href="#cb389-6" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb389-7"><a href="#cb389-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb389-8"><a href="#cb389-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb389-9"><a href="#cb389-9" aria-hidden="true" tabindex="-1"></a>Hello *world*!</span> +<span id="cb389-10"><a href="#cb389-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb389-11"><a href="#cb389-11" aria-hidden="true" tabindex="-1"></a>_Foo_ bar!</span> +<span id="cb389-12"><a href="#cb389-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb389-13"><a href="#cb389-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb390"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb390-1"><a href="#cb390-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(The end of a block)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h4 data-number="2.3.1.4" id="line-break-renderer"><span class="header-section-number">2.3.1.4</span> Line Break Renderer</h4> -<p>The <code>\markdownRendererLineBreak</code> macro represents a forced line break. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-19">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb387"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb387-1"><a href="#cb387-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb387-2"><a href="#cb387-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> -<span id="cb387-3"><a href="#cb387-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb387-4"><a href="#cb387-4" aria-hidden="true"></a> {<span class="fu">\it</span>(A forced linebreak)}<span class="co">%</span></span> -<span id="cb387-5"><a href="#cb387-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb387-6"><a href="#cb387-6" aria-hidden="true"></a>}</span> -<span id="cb387-7"><a href="#cb387-7" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb387-8"><a href="#cb387-8" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>example.md</code> with the following content. Note the two spaces at the end of the first line, which specify a hard linebreak. Due to the limitations of the <span class="tex">T<sub>e</sub>X</span> input processor, hard linebreaks would be ignored if we typed them directly into the <code>document.tex</code> document.</p> +<h4 data-number="2.3.1.4" id="line-break-renderer"><span +class="header-section-number">2.3.1.4</span> Line Break Renderer</h4> +<p>The <code>\markdownRendererLineBreak</code> macro represents a forced +line break. The macro receives no arguments.</p> +<h5 class="unnumbered" id="plain-tex-example-19">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb391"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb391-1"><a href="#cb391-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb391-2"><a href="#cb391-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> +<span id="cb391-3"><a href="#cb391-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb391-4"><a href="#cb391-4" aria-hidden="true" tabindex="-1"></a> {<span class="fu">\it</span>(A forced linebreak)}<span class="co">%</span></span> +<span id="cb391-5"><a href="#cb391-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb391-6"><a href="#cb391-6" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb391-7"><a href="#cb391-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb391-8"><a href="#cb391-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>example.md</code> with the following content. Note the two spaces +at the end of the first line, which specify a hard linebreak. Due to the +limitations of the <span class="tex">T<sub>e</sub>X</span> input +processor, hard linebreaks would be ignored if we typed them directly +into the <code>document.tex</code> document.</p> <pre><code>Hello world! <br/>_Foo_ bar!</code></pre> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb388"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb388-1"><a href="#cb388-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb392"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb392-1"><a href="#cb392-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:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(A forced linebreak)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-45"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb389"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb389-1"><a href="#cb389-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb389-2"><a href="#cb389-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb389-3"><a href="#cb389-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb389-4"><a href="#cb389-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb389-5"><a href="#cb389-5" aria-hidden="true"></a> lineBreak = {<span class="co">%</span></span> -<span id="cb389-6"><a href="#cb389-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb389-7"><a href="#cb389-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> -<span id="cb389-8"><a href="#cb389-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb389-9"><a href="#cb389-9" aria-hidden="true"></a> },</span> -<span id="cb389-10"><a href="#cb389-10" aria-hidden="true"></a> },</span> -<span id="cb389-11"><a href="#cb389-11" aria-hidden="true"></a>}</span> -<span id="cb389-12"><a href="#cb389-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb389-13"><a href="#cb389-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb389-14"><a href="#cb389-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Using a text editor, create a text document named <code>example.md</code> with the following content. Note the two spaces at the end of the first line, which specify a hard linebreak. Due to the limitations of the <span class="tex">T<sub>e</sub>X</span> input processor, hard linebreaks would be ignored if we typed them directly into the <code>document.tex</code> document.</p> +<h5 class="unnumbered" id="latex-example-46"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb393"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb393-1"><a href="#cb393-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb393-2"><a href="#cb393-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb393-3"><a href="#cb393-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb393-4"><a href="#cb393-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb393-5"><a href="#cb393-5" aria-hidden="true" tabindex="-1"></a> lineBreak = {<span class="co">%</span></span> +<span id="cb393-6"><a href="#cb393-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb393-7"><a href="#cb393-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> +<span id="cb393-8"><a href="#cb393-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb393-9"><a href="#cb393-9" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb393-10"><a href="#cb393-10" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb393-11"><a href="#cb393-11" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb393-12"><a href="#cb393-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb393-13"><a href="#cb393-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb393-14"><a href="#cb393-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<p>Using a text editor, create a text document named +<code>example.md</code> with the following content. Note the two spaces +at the end of the first line, which specify a hard linebreak. Due to the +limitations of the <span class="tex">T<sub>e</sub>X</span> input +processor, hard linebreaks would be ignored if we typed them directly +into the <code>document.tex</code> document.</p> <pre><code>Hello world! <br/>_Foo_ bar!</code></pre> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb390"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb390-1"><a href="#cb390-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb394"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb394-1"><a href="#cb394-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 text:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(A forced linebreak)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-34">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb391"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb391-1"><a href="#cb391-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb391-2"><a href="#cb391-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> -<span id="cb391-3"><a href="#cb391-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb391-4"><a href="#cb391-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> -<span id="cb391-5"><a href="#cb391-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb391-6"><a href="#cb391-6" aria-hidden="true"></a>}</span> -<span id="cb391-7"><a href="#cb391-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb391-8"><a href="#cb391-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb391-9"><a href="#cb391-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Using a text editor, create a text document named <code>example.md</code> with the following content. Note the two spaces at the end of the first line, which specify a hard linebreak. Due to the limitations of the <span class="tex">T<sub>e</sub>X</span> input processor, hard linebreaks would be ignored if we typed them directly into the <code>document.tex</code> document.</p> +<h5 class="unnumbered" id="context-example-34">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb395"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb395-1"><a href="#cb395-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb395-2"><a href="#cb395-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> +<span id="cb395-3"><a href="#cb395-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb395-4"><a href="#cb395-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> +<span id="cb395-5"><a href="#cb395-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb395-6"><a href="#cb395-6" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb395-7"><a href="#cb395-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb395-8"><a href="#cb395-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb395-9"><a href="#cb395-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Using a text editor, create a text document named +<code>example.md</code> with the following content. Note the two spaces +at the end of the first line, which specify a hard linebreak. Due to the +limitations of the <span class="tex">T<sub>e</sub>X</span> input +processor, hard linebreaks would be ignored if we typed them directly +into the <code>document.tex</code> document.</p> <pre><code>Hello world! <br/>_Foo_ bar!</code></pre> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb392"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb392-1"><a href="#cb392-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb396"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb396-1"><a href="#cb396-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:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(A forced linebreak)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h4 data-number="2.3.1.5" id="ellipsis-renderer"><span class="header-section-number">2.3.1.5</span> Ellipsis Renderer</h4> -<p>The <code>\markdownRendererEllipsis</code> macro replaces any occurance of ASCII ellipses in the input text. This macro will only be produced, when the <strong><code>smartEllipses</code></strong> option is enabled. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-20">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb393"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb393-1"><a href="#cb393-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb393-2"><a href="#cb393-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb393-3"><a href="#cb393-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{{<span class="fu">\it</span> SHAZAM}!}</span> -<span id="cb393-4"><a href="#cb393-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb393-5"><a href="#cb393-5" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb393-6"><a href="#cb393-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb393-7"><a href="#cb393-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb394"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb394-1"><a href="#cb394-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.5" id="ellipsis-renderer"><span +class="header-section-number">2.3.1.5</span> Ellipsis Renderer</h4> +<p>The <code>\markdownRendererEllipsis</code> macro replaces any +occurance of ASCII ellipses in the input text. This macro will only be +produced, when the <strong><code>smartEllipses</code></strong> option is +enabled. The macro receives no arguments.</p> +<h5 class="unnumbered" id="plain-tex-example-20">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb397"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb397-1"><a href="#cb397-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb397-2"><a href="#cb397-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> +<span id="cb397-3"><a href="#cb397-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{{<span class="fu">\it</span> SHAZAM}!}</span> +<span id="cb397-4"><a href="#cb397-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb397-5"><a href="#cb397-5" aria-hidden="true" tabindex="-1"></a>The secret word is ...</span> +<span id="cb397-6"><a href="#cb397-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb397-7"><a href="#cb397-7" 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="cb398"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb398-1"><a href="#cb398-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:</p> <blockquote> <p>The secret word is <em>SHAZAM</em>!</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-46"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb395"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb395-1"><a href="#cb395-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb395-2"><a href="#cb395-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> -<span id="cb395-3"><a href="#cb395-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb395-4"><a href="#cb395-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb395-5"><a href="#cb395-5" aria-hidden="true"></a> ellipsis = <span class="fu">\emph</span>{SHAZAM}!,</span> -<span id="cb395-6"><a href="#cb395-6" aria-hidden="true"></a> },</span> -<span id="cb395-7"><a href="#cb395-7" aria-hidden="true"></a>}</span> -<span id="cb395-8"><a href="#cb395-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb395-9"><a href="#cb395-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb395-10"><a href="#cb395-10" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb395-11"><a href="#cb395-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb395-12"><a href="#cb395-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb396"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb396-1"><a href="#cb396-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-47"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb399"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb399-1"><a href="#cb399-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb399-2"><a href="#cb399-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> +<span id="cb399-3"><a href="#cb399-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb399-4"><a href="#cb399-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb399-5"><a href="#cb399-5" aria-hidden="true" tabindex="-1"></a> ellipsis = <span class="fu">\emph</span>{SHAZAM}!,</span> +<span id="cb399-6"><a href="#cb399-6" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb399-7"><a href="#cb399-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb399-8"><a href="#cb399-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb399-9"><a href="#cb399-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb399-10"><a href="#cb399-10" aria-hidden="true" tabindex="-1"></a>The secret word is ...</span> +<span id="cb399-11"><a href="#cb399-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb399-12"><a href="#cb399-12" 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="cb400"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb400-1"><a href="#cb400-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 text:</p> <blockquote> <p>The secret word is <em>SHAZAM</em>!</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-35">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb397"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb397-1"><a href="#cb397-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb397-2"><a href="#cb397-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[smartEllipses = yes]</span> -<span id="cb397-3"><a href="#cb397-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{<span class="fu">\emph</span>{SHAZAM}!}</span> -<span id="cb397-4"><a href="#cb397-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb397-5"><a href="#cb397-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb397-6"><a href="#cb397-6" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb397-7"><a href="#cb397-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb397-8"><a href="#cb397-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb398"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb398-1"><a href="#cb398-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-35">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb401"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb401-1"><a href="#cb401-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb401-2"><a href="#cb401-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[smartEllipses = yes]</span> +<span id="cb401-3"><a href="#cb401-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEllipsis</span>{<span class="fu">\emph</span>{SHAZAM}!}</span> +<span id="cb401-4"><a href="#cb401-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb401-5"><a href="#cb401-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb401-6"><a href="#cb401-6" aria-hidden="true" tabindex="-1"></a>The secret word is ...</span> +<span id="cb401-7"><a href="#cb401-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb401-8"><a href="#cb401-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb402"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb402-1"><a href="#cb402-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(The end of a block)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h4 data-number="2.3.1.6" id="non-breaking-space-renderer"><span class="header-section-number">2.3.1.6</span> Non-Breaking Space Renderer</h4> -<p>The <code>\markdownRendererNbsp</code> macro represents a non-breaking space.</p> -<h5 class="unnumbered" data-number="" id="latex-example-47"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.bib</code> with the following content:</p> -<div class="sourceCode" id="cb399"><pre class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb399-1"><a href="#cb399-1" aria-hidden="true"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> -<span id="cb399-2"><a href="#cb399-2" aria-hidden="true"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> -<span id="cb399-3"><a href="#cb399-3" aria-hidden="true"></a> <span class="dt">title</span> = "<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>",</span> -<span id="cb399-4"><a href="#cb399-4" aria-hidden="true"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> -<span id="cb399-5"><a href="#cb399-5" aria-hidden="true"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> -<span id="cb399-6"><a href="#cb399-6" aria-hidden="true"></a>}</span></code></pre></div> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb400"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb400-1"><a href="#cb400-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb400-2"><a href="#cb400-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[</span> -<span id="cb400-3"><a href="#cb400-3" aria-hidden="true"></a> citations,</span> -<span id="cb400-4"><a href="#cb400-4" aria-hidden="true"></a> citationNbsps,</span> -<span id="cb400-5"><a href="#cb400-5" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span> -<span id="cb400-6"><a href="#cb400-6" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb400-7"><a href="#cb400-7" aria-hidden="true"></a> renderers = {</span> -<span id="cb400-8"><a href="#cb400-8" aria-hidden="true"></a> nbsp = {<span class="ss">$</span><span class="sc">\cdot</span><span class="ss">$</span>},</span> -<span id="cb400-9"><a href="#cb400-9" aria-hidden="true"></a> },</span> -<span id="cb400-10"><a href="#cb400-10" aria-hidden="true"></a>}</span> -<span id="cb400-11"><a href="#cb400-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb400-12"><a href="#cb400-12" aria-hidden="true"></a></span> -<span id="cb400-13"><a href="#cb400-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb400-14"><a href="#cb400-14" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> -<span id="cb400-15"><a href="#cb400-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb400-16"><a href="#cb400-16" aria-hidden="true"></a></span> -<span id="cb400-17"><a href="#cb400-17" aria-hidden="true"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span> -<span id="cb400-18"><a href="#cb400-18" aria-hidden="true"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span> -<span id="cb400-19"><a href="#cb400-19" aria-hidden="true"></a></span> -<span id="cb400-20"><a href="#cb400-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<h4 data-number="2.3.1.6" id="non-breaking-space-renderer"><span +class="header-section-number">2.3.1.6</span> Non-Breaking Space +Renderer</h4> +<p>The <code>\markdownRendererNbsp</code> macro represents a +non-breaking space.</p> +<h5 class="unnumbered" id="latex-example-48"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.bib</code> with the following content:</p> +<div class="sourceCode" id="cb403"><pre +class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb403-1"><a href="#cb403-1" aria-hidden="true" tabindex="-1"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> +<span id="cb403-2"><a href="#cb403-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> +<span id="cb403-3"><a href="#cb403-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">title</span> = "<span class="st">The </span><span class="ch">\TeX</span><span class="st"> book, volume A of Computers and typesetting</span>",</span> +<span id="cb403-4"><a href="#cb403-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> +<span id="cb403-5"><a href="#cb403-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> +<span id="cb403-6"><a href="#cb403-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb404"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb404-1"><a href="#cb404-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb404-2"><a href="#cb404-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[</span> +<span id="cb404-3"><a href="#cb404-3" aria-hidden="true" tabindex="-1"></a> citations,</span> +<span id="cb404-4"><a href="#cb404-4" aria-hidden="true" tabindex="-1"></a> citationNbsps,</span> +<span id="cb404-5"><a href="#cb404-5" aria-hidden="true" tabindex="-1"></a>]{<span class="ex">markdown</span>}</span> +<span id="cb404-6"><a href="#cb404-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb404-7"><a href="#cb404-7" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb404-8"><a href="#cb404-8" aria-hidden="true" tabindex="-1"></a> nbsp = {<span class="ss">$</span><span class="sc">\cdot</span><span class="ss">$</span>},</span> +<span id="cb404-9"><a href="#cb404-9" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb404-10"><a href="#cb404-10" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb404-11"><a href="#cb404-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb404-12"><a href="#cb404-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb404-13"><a href="#cb404-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb404-14"><a href="#cb404-14" aria-hidden="true" tabindex="-1"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> +<span id="cb404-15"><a href="#cb404-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb404-16"><a href="#cb404-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb404-17"><a href="#cb404-17" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span> +<span id="cb404-18"><a href="#cb404-18" aria-hidden="true" tabindex="-1"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span> +<span id="cb404-19"><a href="#cb404-19" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb404-20"><a href="#cb404-20" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX and BibTeX from the terminal:</p> -<div class="sourceCode" id="cb401"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb401-1"><a href="#cb401-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb401-2"><a href="#cb401-2" aria-hidden="true"></a><span class="ex">bibtex</span> document.aux</span> -<span id="cb401-3"><a href="#cb401-3" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb401-4"><a href="#cb401-4" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<div class="sourceCode" id="cb405"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb405-1"><a href="#cb405-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb405-2"><a href="#cb405-2" aria-hidden="true" tabindex="-1"></a><span class="ex">bibtex</span> document.aux</span> +<span id="cb405-3"><a href="#cb405-3" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb405-4"><a href="#cb405-4" 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 text:</p> <blockquote> <p>The TeXbook [1, p.·123·and·130] is good.</p> <h3 id="references-2">References</h3> -<p><a href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a> Donald Ervin Knuth. <em>The TeXbook, volume A of Computers and typesetting.</em> Addison-Wesley, 1984.</p> -</blockquote> -<h4 data-number="2.3.1.7" id="special-character-renderers"><span class="header-section-number">2.3.1.7</span> Special Character Renderers</h4> -<p>The following macros replace any special plain <span class="tex">T<sub>e</sub>X</span> characters, including the active pipe character (<code>|</code>) of Con<span class="tex">T<sub>e</sub>X</span>t, in the input text:</p> +<p><a +href="https://datatracker.ietf.org/doc/html/rfc3986#section-4.2">1</a> +Donald Ervin Knuth. <em>The TeXbook, volume A of Computers and +typesetting.</em> Addison-Wesley, 1984.</p> +</blockquote> +<h4 data-number="2.3.1.7" id="special-character-renderers"><span +class="header-section-number">2.3.1.7</span> Special Character +Renderers</h4> +<p>The following macros replace any special plain <span +class="tex">T<sub>e</sub>X</span> characters, including the active pipe +character (<code>|</code>) of Con<span +class="tex">T<sub>e</sub>X</span>t, in the input text:</p> <ul> -<li><code>\markdownRendererAmpersand</code> replaces the ampersand (<code>&</code>).</li> -<li><code>\markdownRendererBackslash</code> replaces the backslash (<code>\</code>).</li> -<li><code>\markdownRendererCircumflex</code> replaces the circumflex (<code>^</code>).</li> -<li><code>\markdownRendererDollarSign</code> replaces the dollar sign (<code>$</code>).</li> -<li><code>\markdownRendererHash</code> replaces the hash sign (<code>#</code>).</li> -<li><code>\markdownRendererLeftBrace</code> replaces the left brace (<code>{</code>).</li> -<li><code>\markdownRendererPercentSign</code> replaces the percent sign (<code>%</code>).</li> -<li><code>\markdownRendererPipe</code> replaces the pipe character (<code>|</code>).</li> -<li><code>\markdownRendererRightBrace</code> replaces the right brace (<code>}</code>).</li> -<li><code>\markdownRendererTilde</code> replaces the tilde (<code>~</code>).</li> -<li><code>\markdownRendererUnderscore</code> replaces the underscore (<code>_</code>).</li> +<li><code>\markdownRendererAmpersand</code> replaces the ampersand +(<code>&</code>).</li> +<li><code>\markdownRendererBackslash</code> replaces the backslash +(<code>\</code>).</li> +<li><code>\markdownRendererCircumflex</code> replaces the circumflex +(<code>^</code>).</li> +<li><code>\markdownRendererDollarSign</code> replaces the dollar sign +(<code>$</code>).</li> +<li><code>\markdownRendererHash</code> replaces the hash sign +(<code>#</code>).</li> +<li><code>\markdownRendererLeftBrace</code> replaces the left brace +(<code>{</code>).</li> +<li><code>\markdownRendererPercentSign</code> replaces the percent sign +(<code>%</code>).</li> +<li><code>\markdownRendererPipe</code> replaces the pipe character +(<code>|</code>).</li> +<li><code>\markdownRendererRightBrace</code> replaces the right brace +(<code>}</code>).</li> +<li><code>\markdownRendererTilde</code> replaces the tilde +(<code>~</code>).</li> +<li><code>\markdownRendererUnderscore</code> replaces the underscore +(<code>_</code>).</li> </ul> -<h5 class="unnumbered" data-number="" id="plain-tex-example-21">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content. We will make the tilde behave as if it were written in <span class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking space.</p> -<div class="sourceCode" id="cb402"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb402-1"><a href="#cb402-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb402-2"><a href="#cb402-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> -<span id="cb402-3"><a href="#cb402-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb402-4"><a href="#cb402-4" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb402-5"><a href="#cb402-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb402-6"><a href="#cb402-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb403"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb403-1"><a href="#cb403-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<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> +<h5 class="unnumbered" id="plain-tex-example-21">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content. We will make the +tilde behave as if it were written in <span +class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking +space.</p> +<div class="sourceCode" id="cb406"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb406-1"><a href="#cb406-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb406-2"><a href="#cb406-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> +<span id="cb406-3"><a href="#cb406-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb406-4"><a href="#cb406-4" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb406-5"><a href="#cb406-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb406-6"><a href="#cb406-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="cb407"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb407-1"><a href="#cb407-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> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-48"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content. We will make the tilde behave as if it were written in <span class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking space.</p> -<div class="sourceCode" id="cb404"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb404-1"><a href="#cb404-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb404-2"><a href="#cb404-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb404-3"><a href="#cb404-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb404-4"><a href="#cb404-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb404-5"><a href="#cb404-5" aria-hidden="true"></a> tilde = ~,</span> -<span id="cb404-6"><a href="#cb404-6" aria-hidden="true"></a> },</span> -<span id="cb404-7"><a href="#cb404-7" aria-hidden="true"></a>}</span> -<span id="cb404-8"><a href="#cb404-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb404-9"><a href="#cb404-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb404-10"><a href="#cb404-10" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb404-11"><a href="#cb404-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb404-12"><a href="#cb404-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb405"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb405-1"><a href="#cb405-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<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> +<h5 class="unnumbered" id="latex-example-49"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content. We will make the +tilde behave as if it were written in <span +class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking +space.</p> +<div class="sourceCode" id="cb408"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb408-1"><a href="#cb408-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb408-2"><a href="#cb408-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb408-3"><a href="#cb408-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb408-4"><a href="#cb408-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb408-5"><a href="#cb408-5" aria-hidden="true" tabindex="-1"></a> tilde = ~,</span> +<span id="cb408-6"><a href="#cb408-6" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb408-7"><a href="#cb408-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb408-8"><a href="#cb408-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb408-9"><a href="#cb408-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb408-10"><a href="#cb408-10" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb408-11"><a href="#cb408-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb408-12"><a href="#cb408-12" 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="cb409"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb409-1"><a href="#cb409-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 text, where the middot (<code>·</code>) denotes a +non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-36">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content. We will make the tilde behave as if it were written in <span class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking space.</p> -<div class="sourceCode" id="cb406"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb406-1"><a href="#cb406-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb406-2"><a href="#cb406-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> -<span id="cb406-3"><a href="#cb406-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb406-4"><a href="#cb406-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb406-5"><a href="#cb406-5" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb406-6"><a href="#cb406-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb406-7"><a href="#cb406-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb407"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb407-1"><a href="#cb407-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<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> +<h5 class="unnumbered" id="context-example-36">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content. We will make the +tilde behave as if it were written in <span +class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking +space.</p> +<div class="sourceCode" id="cb410"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb410-1"><a href="#cb410-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb410-2"><a href="#cb410-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> +<span id="cb410-3"><a href="#cb410-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb410-4"><a href="#cb410-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb410-5"><a href="#cb410-5" aria-hidden="true" tabindex="-1"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb410-6"><a href="#cb410-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb410-7"><a href="#cb410-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb411"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb411-1"><a href="#cb411-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text, where the middot (<code>·</code>) denotes a +non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> </blockquote> -<h4 data-number="2.3.1.8" id="code-span-renderer"><span class="header-section-number">2.3.1.8</span> Code Span Renderer</h4> -<p>The <code>\markdownRendererCodeSpan</code> macro represents inlined code span in the input text. It receives a single argument that corresponds to the inlined code span.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-22">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb408"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb408-1"><a href="#cb408-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb408-2"><a href="#cb408-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb408-3"><a href="#cb408-3" aria-hidden="true"></a></span> -<span id="cb408-4"><a href="#cb408-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> -<span id="cb408-5"><a href="#cb408-5" aria-hidden="true"></a></span> -<span id="cb408-6"><a href="#cb408-6" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb408-7"><a href="#cb408-7" aria-hidden="true"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> -<span id="cb408-8"><a href="#cb408-8" aria-hidden="true"></a></span> -<span id="cb408-9"><a href="#cb408-9" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb408-10"><a href="#cb408-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb408-11"><a href="#cb408-11" aria-hidden="true"></a></span> -<span id="cb408-12"><a href="#cb408-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb408-13"><a href="#cb408-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb408-14"><a href="#cb408-14" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb408-15"><a href="#cb408-15" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb408-16"><a href="#cb408-16" aria-hidden="true"></a></span> -<span id="cb408-17"><a href="#cb408-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb409"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb409-1"><a href="#cb409-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.8" id="code-span-renderer"><span +class="header-section-number">2.3.1.8</span> Code Span Renderer</h4> +<p>The <code>\markdownRendererCodeSpan</code> macro represents inlined +code span in the input text. It receives a single argument that +corresponds to the inlined code span.</p> +<h5 class="unnumbered" id="plain-tex-example-22">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb412"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb412-1"><a href="#cb412-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb412-2"><a href="#cb412-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb412-3"><a href="#cb412-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb412-4"><a href="#cb412-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> +<span id="cb412-5"><a href="#cb412-5" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb412-6"><a href="#cb412-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb412-7"><a href="#cb412-7" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> +<span id="cb412-8"><a href="#cb412-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb412-9"><a href="#cb412-9" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb412-10"><a href="#cb412-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb412-11"><a href="#cb412-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb412-12"><a href="#cb412-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb412-13"><a href="#cb412-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb412-14"><a href="#cb412-14" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb412-15"><a href="#cb412-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb412-16"><a href="#cb412-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb412-17"><a href="#cb412-17" 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="cb413"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb413-1"><a href="#cb413-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:</p> <blockquote> <p>$\sqrt{-1}$ *equals* $i$.</p> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-49"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb410"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb410-1"><a href="#cb410-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb410-2"><a href="#cb410-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> -<span id="cb410-3"><a href="#cb410-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb410-4"><a href="#cb410-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb410-5"><a href="#cb410-5" aria-hidden="true"></a> codeSpan = {#1},</span> -<span id="cb410-6"><a href="#cb410-6" aria-hidden="true"></a> },</span> -<span id="cb410-7"><a href="#cb410-7" aria-hidden="true"></a>}</span> -<span id="cb410-8"><a href="#cb410-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb410-9"><a href="#cb410-9" aria-hidden="true"></a></span> -<span id="cb410-10"><a href="#cb410-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb410-11"><a href="#cb410-11" aria-hidden="true"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> -<span id="cb410-12"><a href="#cb410-12" aria-hidden="true"></a></span> -<span id="cb410-13"><a href="#cb410-13" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb410-14"><a href="#cb410-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb410-15"><a href="#cb410-15" aria-hidden="true"></a></span> -<span id="cb410-16"><a href="#cb410-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> -<span id="cb410-17"><a href="#cb410-17" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb410-18"><a href="#cb410-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb410-19"><a href="#cb410-19" aria-hidden="true"></a></span> -<span id="cb410-20"><a href="#cb410-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb411"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb411-1"><a href="#cb411-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-50"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb414"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb414-1"><a href="#cb414-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb414-2"><a href="#cb414-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> +<span id="cb414-3"><a href="#cb414-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb414-4"><a href="#cb414-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb414-5"><a href="#cb414-5" aria-hidden="true" tabindex="-1"></a> codeSpan = {#1},</span> +<span id="cb414-6"><a href="#cb414-6" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb414-7"><a href="#cb414-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb414-8"><a href="#cb414-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb414-9"><a href="#cb414-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb414-10"><a href="#cb414-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb414-11"><a href="#cb414-11" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> +<span id="cb414-12"><a href="#cb414-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb414-13"><a href="#cb414-13" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb414-14"><a href="#cb414-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb414-15"><a href="#cb414-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb414-16"><a href="#cb414-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> +<span id="cb414-17"><a href="#cb414-17" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb414-18"><a href="#cb414-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb414-19"><a href="#cb414-19" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb414-20"><a href="#cb414-20" 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="cb415"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb415-1"><a href="#cb415-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 text:</p> <blockquote> <p>$\sqrt{-1}$ *equals* $i$.</p> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-37">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb412"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb412-1"><a href="#cb412-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb412-2"><a href="#cb412-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> -<span id="cb412-3"><a href="#cb412-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb412-4"><a href="#cb412-4" aria-hidden="true"></a></span> -<span id="cb412-5"><a href="#cb412-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb412-6"><a href="#cb412-6" aria-hidden="true"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> -<span id="cb412-7"><a href="#cb412-7" aria-hidden="true"></a></span> -<span id="cb412-8"><a href="#cb412-8" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb412-9"><a href="#cb412-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb412-10"><a href="#cb412-10" aria-hidden="true"></a></span> -<span id="cb412-11"><a href="#cb412-11" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span> -<span id="cb412-12"><a href="#cb412-12" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb412-13"><a href="#cb412-13" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb412-14"><a href="#cb412-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb412-15"><a href="#cb412-15" aria-hidden="true"></a></span> -<span id="cb412-16"><a href="#cb412-16" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb413"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb413-1"><a href="#cb413-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-37">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb416"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb416-1"><a href="#cb416-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb416-2"><a href="#cb416-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> +<span id="cb416-3"><a href="#cb416-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb416-4"><a href="#cb416-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb416-5"><a href="#cb416-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb416-6"><a href="#cb416-6" aria-hidden="true" tabindex="-1"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> +<span id="cb416-7"><a href="#cb416-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb416-8"><a href="#cb416-8" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb416-9"><a href="#cb416-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb416-10"><a href="#cb416-10" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb416-11"><a href="#cb416-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[hybrid = yes]</span> +<span id="cb416-12"><a href="#cb416-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb416-13"><a href="#cb416-13" aria-hidden="true" tabindex="-1"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> +<span id="cb416-14"><a href="#cb416-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb416-15"><a href="#cb416-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb416-16"><a href="#cb416-16" 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="cb417"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb417-1"><a href="#cb417-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ *equals* $i$.</p> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h4 data-number="2.3.1.9" id="link-renderer"><span class="header-section-number">2.3.1.9</span> Link Renderer</h4> -<p>The <code>\markdownRendererLink</code> macro represents a hyperlink. It receives four arguments: the label, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the link.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-23">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb414"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb414-1"><a href="#cb414-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb414-2"><a href="#cb414-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb414-3"><a href="#cb414-3" aria-hidden="true"></a> #1 {<span class="fu">\tt</span>#2} titled {<span class="fu">\it</span>#4}<span class="co">%</span></span> -<span id="cb414-4"><a href="#cb414-4" aria-hidden="true"></a>}</span> -<span id="cb414-5"><a href="#cb414-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb414-6"><a href="#cb414-6" aria-hidden="true"></a>Please visit [the link][ctan].</span> -<span id="cb414-7"><a href="#cb414-7" aria-hidden="true"></a></span> -<span id="cb414-8"><a href="#cb414-8" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> -<span id="cb414-9"><a href="#cb414-9" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb414-10"><a href="#cb414-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb414-11"><a href="#cb414-11" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb415"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb415-1"><a href="#cb415-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>Please visit the link <a href="https://ctan.org/" class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX Archive Network</em>.</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-50"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb416"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb416-1"><a href="#cb416-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb416-2"><a href="#cb416-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb416-3"><a href="#cb416-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb416-4"><a href="#cb416-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb416-5"><a href="#cb416-5" aria-hidden="true"></a> link = {<span class="co">%</span></span> -<span id="cb416-6"><a href="#cb416-6" aria-hidden="true"></a> #1 <span class="fu">\texttt</span>{#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span> -<span id="cb416-7"><a href="#cb416-7" aria-hidden="true"></a> },</span> -<span id="cb416-8"><a href="#cb416-8" aria-hidden="true"></a> },</span> -<span id="cb416-9"><a href="#cb416-9" aria-hidden="true"></a>}</span> -<span id="cb416-10"><a href="#cb416-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb416-11"><a href="#cb416-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb416-12"><a href="#cb416-12" aria-hidden="true"></a>Please visit [the link][ctan].</span> -<span id="cb416-13"><a href="#cb416-13" aria-hidden="true"></a></span> -<span id="cb416-14"><a href="#cb416-14" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> -<span id="cb416-15"><a href="#cb416-15" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb416-16"><a href="#cb416-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb416-17"><a href="#cb416-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb417"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb417-1"><a href="#cb417-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>Please visit the link <a href="https://ctan.org/" class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX Archive Network</em>.</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="context-example-38">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb418"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb418-1"><a href="#cb418-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb418-2"><a href="#cb418-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb418-3"><a href="#cb418-3" aria-hidden="true"></a> #1 {<span class="fu">\tt</span>#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span> -<span id="cb418-4"><a href="#cb418-4" aria-hidden="true"></a>}</span> -<span id="cb418-5"><a href="#cb418-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb418-6"><a href="#cb418-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb418-7"><a href="#cb418-7" aria-hidden="true"></a>Please visit [the link][ctan].</span> -<span id="cb418-8"><a href="#cb418-8" aria-hidden="true"></a></span> -<span id="cb418-9"><a href="#cb418-9" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> -<span id="cb418-10"><a href="#cb418-10" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb418-11"><a href="#cb418-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb418-12"><a href="#cb418-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb419"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb419-1"><a href="#cb419-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>Please visit the link <a href="https://ctan.org/" class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX Archive Network</em>.</p> -</blockquote> -<h4 data-number="2.3.1.10" id="image-renderer"><span class="header-section-number">2.3.1.10</span> Image Renderer</h4> -<p>The <code>\markdownRendererImage</code> macro represents an image. It receives four arguments: the label, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the link.</p> -<h5 class="unnumbered" data-number="" id="latex-example-51"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb420"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb420-1"><a href="#cb420-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb420-2"><a href="#cb420-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb420-3"><a href="#cb420-3" aria-hidden="true"></a><span class="fu">\begingroup</span></span> -<span id="cb420-4"><a href="#cb420-4" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\@</span>=11</span> -<span id="cb420-5"><a href="#cb420-5" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> -<span id="cb420-6"><a href="#cb420-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\^</span>^A=14</span> -<span id="cb420-7"><a href="#cb420-7" aria-hidden="true"></a><span class="fu">\global\def\markdownRendererImage</span>#1#2#3#4{^^A</span> -<span id="cb420-8"><a href="#cb420-8" aria-hidden="true"></a> <span class="fu">\immediate\write</span>18{^^A</span></code></pre></div> -<div class="sourceCode" id="cb421"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb421-1"><a href="#cb421-1" aria-hidden="true"></a> <span class="kw">if</span> <span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="fu">grep</span> -q ^http<span class="kw">;</span> <span class="kw">then</span></span> -<span id="cb421-2"><a href="#cb421-2" aria-hidden="true"></a> <span class="va">OUTPUT=</span><span class="st">"</span><span class="va">$(</span><span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="ex">md5sum</span> <span class="kw">|</span> <span class="fu">cut</span> -d<span class="st">' '</span> -f1<span class="va">)</span><span class="st">.^^A</span></span> -<span id="cb421-3"><a href="#cb421-3" aria-hidden="true"></a><span class="st"> </span><span class="va">$(</span><span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="fu">sed</span> <span class="st">'s/.*[.]//'</span><span class="va">)</span><span class="st">"</span>;</span> -<span id="cb421-4"><a href="#cb421-4" aria-hidden="true"></a> <span class="kw">if</span> !<span class="bu"> [</span> <span class="ot">-e</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span><span class="bu"> ]</span>; <span class="kw">then</span></span> -<span id="cb421-5"><a href="#cb421-5" aria-hidden="true"></a> <span class="fu">wget</span> -O <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> <span class="st">'#3'</span> <span class="kw">||</span> <span class="fu">rm</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span><span class="kw">;</span></span> -<span id="cb421-6"><a href="#cb421-6" aria-hidden="true"></a> <span class="ex">convert</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> png:<span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span><span class="kw">;</span></span> -<span id="cb421-7"><a href="#cb421-7" aria-hidden="true"></a> <span class="kw">fi</span>;</span> -<span id="cb421-8"><a href="#cb421-8" aria-hidden="true"></a> <span class="bu">printf</span> <span class="st">'%s%%'</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> <span class="op">></span> \jobname.fetched<span class="kw">;</span></span> -<span id="cb421-9"><a href="#cb421-9" aria-hidden="true"></a> <span class="kw">else</span></span> -<span id="cb421-10"><a href="#cb421-10" aria-hidden="true"></a> <span class="bu">printf</span> <span class="st">'%s%%'</span> <span class="st">"#3"</span> <span class="op">></span> \jobname.fetched<span class="kw">;</span></span> -<span id="cb421-11"><a href="#cb421-11" aria-hidden="true"></a> <span class="kw">fi</span>^^<span class="ex">A</span></span></code></pre></div> -<div class="sourceCode" id="cb422"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb422-1"><a href="#cb422-1" aria-hidden="true"></a> }^^A</span> -<span id="cb422-2"><a href="#cb422-2" aria-hidden="true"></a> {^^A</span> -<span id="cb422-3"><a href="#cb422-3" aria-hidden="true"></a> <span class="fu">\everyeof</span>={<span class="fu">\noexpand</span>}^^A</span> -<span id="cb422-4"><a href="#cb422-4" aria-hidden="true"></a> <span class="fu">\edef\filename</span>{<span class="fu">\_</span>_markdowninput"<span class="fu">\jobname</span>.fetched" }^^A</span> -<span id="cb422-5"><a href="#cb422-5" aria-hidden="true"></a> <span class="bu">\includegraphics</span>[width=<span class="fu">\textwidth</span>]{<span class="fu">\filename</span>}^^A</span> -<span id="cb422-6"><a href="#cb422-6" aria-hidden="true"></a> }^^A</span> -<span id="cb422-7"><a href="#cb422-7" aria-hidden="true"></a>}</span> -<span id="cb422-8"><a href="#cb422-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> -<span id="cb422-9"><a href="#cb422-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb422-10"><a href="#cb422-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb422-11"><a href="#cb422-11" aria-hidden="true"></a>![TUGboat](https://tug.org/tugboat/noword.jpg)</span> -<span id="cb422-12"><a href="#cb422-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb422-13"><a href="#cb422-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb423"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb423-1"><a href="#cb423-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following content. This assumes that you use a Unix-like operating system with Bourne or Bourne again shell as the default shell of the current user. It also assumes that the <code>md5sum</code>, <code>wget</code>, and <code>convert</code> binaries are installed and that the <span class="tex">T<sub>e</sub>X</span> engine has shell access.</p> -<blockquote> -<p><img src="https://tug.org/tugboat/noword.jpg" title="The Communications of the TeX Users Group" /></p> -</blockquote> -<h4 data-number="2.3.1.11" id="texcontentblockrenderers"><span class="header-section-number">2.3.1.11</span> Content Block Renderers</h4> -<p>The <code>\markdownRendererContentBlock</code> macro represents an iA Writer content block. It receives four arguments: the local file or online image filename extension cast to the lower case, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the content block.</p> -<p>The <code>\markdownRendererContentBlockOnlineImage</code> macro represents an iA Writer online image content block. The macro receives the same arguments as <code>\markdownRendererContentBlock</code>.</p> -<p>The <code>\markdownRendererContentBlockCode</code> macro represents an iA Writer content block that was recognized as a file in a known programming language by its filename extension <span class="math inline"><em>s</em></span>. If any <code>markdown-languages.json</code> file found by <strong><code>kpathsea</code></strong> contains a record <span class="math inline">(<em>k</em>, <em>v</em>)</span>, then a non-online-image content block with the filename extension <span class="math inline"><em>s</em>, <em>s</em></span><code>:lower()</code><span class="math inline"> = <em>k</em></span> is considered to be in a known programming language <span class="math inline"><em>v</em></span>. The macro receives five arguments: the local file name extension <span class="math inline"><em>s</em></span> cast to the lower case, the language <span class="math inline"><em>v</em></span>, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the content block.</p> -<p>Note that you will need to place place a <code>markdown-languages.json</code> file inside your working directory or inside your local <span class="tex">T<sub>e</sub>X</span> directory structure. In this file, you will define a mapping between filename extensions and the language names recognized by your favorite syntax highlighter; there may exist other creative uses beside syntax highlighting. <a href="https://github.com/iainc/Markdown-Content-Blocks" title="File transclusion syntax for Markdown">The <code>Languages.json</code> file provided by Anton Sotkov</a> is a good starting point.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-24">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb424"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb424-1"><a href="#cb424-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb424-2"><a href="#cb424-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> -<span id="cb424-3"><a href="#cb424-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb424-4"><a href="#cb424-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb424-5"><a href="#cb424-5" aria-hidden="true"></a>}</span> -<span id="cb424-6"><a href="#cb424-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb424-7"><a href="#cb424-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb424-8"><a href="#cb424-8" aria-hidden="true"></a>}</span> -<span id="cb424-9"><a href="#cb424-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> -<span id="cb424-10"><a href="#cb424-10" aria-hidden="true"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span> -<span id="cb424-11"><a href="#cb424-11" aria-hidden="true"></a>}</span> -<span id="cb424-12"><a href="#cb424-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb424-13"><a href="#cb424-13" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb424-14"><a href="#cb424-14" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb424-15"><a href="#cb424-15" aria-hidden="true"></a> and programming language names)</span> -<span id="cb424-16"><a href="#cb424-16" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb424-17"><a href="#cb424-17" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb424-18"><a href="#cb424-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Create also a text document named <code>markdown-languages.json</code> with the following content:</p> -<div class="sourceCode" id="cb425"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb425-1"><a href="#cb425-1" aria-hidden="true"></a>{</span> -<span id="cb425-2"><a href="#cb425-2" aria-hidden="true"></a> <span class="st">"json"</span><span class="op">:</span> <span class="st">"JavaScript Object Notation"</span><span class="op">,</span></span> -<span id="cb425-3"><a href="#cb425-3" aria-hidden="true"></a>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb426"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb426-1"><a href="#cb426-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is <code>document.tex</code>, the document that we are currently typesetting.</p> -<p>This is the JavaScript Object Notation (JSON) document <code>markdown-languages.json</code>, the mapping between filename extensions and programming language names.</p> -<p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>, the logotype of TUGboat.</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-52"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb427"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb427-1"><a href="#cb427-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb427-2"><a href="#cb427-2" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{markdown-languages.json}</span> -<span id="cb427-3"><a href="#cb427-3" aria-hidden="true"></a>{</span> -<span id="cb427-4"><a href="#cb427-4" aria-hidden="true"></a> "json": "JavaScript Object Notation",</span> -<span id="cb427-5"><a href="#cb427-5" aria-hidden="true"></a>}</span> -<span id="cb427-6"><a href="#cb427-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb427-7"><a href="#cb427-7" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> -<span id="cb427-8"><a href="#cb427-8" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb427-9"><a href="#cb427-9" aria-hidden="true"></a> renderers = {</span> -<span id="cb427-10"><a href="#cb427-10" aria-hidden="true"></a> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</span> -<span id="cb427-11"><a href="#cb427-11" aria-hidden="true"></a> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</span> -<span id="cb427-12"><a href="#cb427-12" aria-hidden="true"></a> contentBlockCode = {<span class="co">%</span></span> -<span id="cb427-13"><a href="#cb427-13" aria-hidden="true"></a> This is the #2 (<span class="fu">\MakeUppercase</span>{#1}) document <span class="fu">\texttt</span>{#3}, #5.</span> -<span id="cb427-14"><a href="#cb427-14" aria-hidden="true"></a> },</span> -<span id="cb427-15"><a href="#cb427-15" aria-hidden="true"></a> },</span> -<span id="cb427-16"><a href="#cb427-16" aria-hidden="true"></a>}</span> -<span id="cb427-17"><a href="#cb427-17" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb427-18"><a href="#cb427-18" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb427-19"><a href="#cb427-19" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb427-20"><a href="#cb427-20" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb427-21"><a href="#cb427-21" aria-hidden="true"></a> and programming language names)</span> -<span id="cb427-22"><a href="#cb427-22" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb427-23"><a href="#cb427-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb427-24"><a href="#cb427-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb428"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb428-1"><a href="#cb428-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is <code>document.tex</code>, the document that we are currently typesetting.</p> -<p>This is the JavaScript Object Notation (JSON) document <code>markdown-languages.json</code>, the mapping between filename extensions and programming language names.</p> -<p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>, the logotype of TUGboat.</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="context-example-39">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb429"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb429-1"><a href="#cb429-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb429-2"><a href="#cb429-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[contentBlocks = yes]</span> -<span id="cb429-3"><a href="#cb429-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb429-4"><a href="#cb429-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb429-5"><a href="#cb429-5" aria-hidden="true"></a>}</span> -<span id="cb429-6"><a href="#cb429-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb429-7"><a href="#cb429-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb429-8"><a href="#cb429-8" aria-hidden="true"></a>}</span> -<span id="cb429-9"><a href="#cb429-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> -<span id="cb429-10"><a href="#cb429-10" aria-hidden="true"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span> -<span id="cb429-11"><a href="#cb429-11" aria-hidden="true"></a>}</span> -<span id="cb429-12"><a href="#cb429-12" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb429-13"><a href="#cb429-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb429-14"><a href="#cb429-14" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb429-15"><a href="#cb429-15" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb429-16"><a href="#cb429-16" aria-hidden="true"></a> and programming language names)</span> -<span id="cb429-17"><a href="#cb429-17" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb429-18"><a href="#cb429-18" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb429-19"><a href="#cb429-19" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Create also a text document named <code>markdown-languages.json</code> with the following content:</p> -<div class="sourceCode" id="cb430"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb430-1"><a href="#cb430-1" aria-hidden="true"></a>{</span> -<span id="cb430-2"><a href="#cb430-2" aria-hidden="true"></a> <span class="st">"json"</span><span class="op">:</span> <span class="st">"JavaScript Object Notation"</span><span class="op">,</span></span> -<span id="cb430-3"><a href="#cb430-3" aria-hidden="true"></a>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb431"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb431-1"><a href="#cb431-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is <code>document.tex</code>, the document that we are currently typesetting.</p> -<p>This is the JavaScript Object Notation (JSON) document <code>markdown-languages.json</code>, the mapping between filename extensions and programming language names.</p> -<p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>, the logotype of TUGboat.</p> -</blockquote> -<h4 data-number="2.3.1.12" id="bullet-list-renderers"><span class="header-section-number">2.3.1.12</span> Bullet List Renderers</h4> -<p>The <code>\markdownRendererUlBegin</code> macro represents the beginning of a bulleted list that contains an item with several paragraphs of text (the list is not tight). The macro receives no arguments.</p> -<p>The <code>\markdownRendererUlBeginTight</code> macro represents the beginning of a bulleted list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is disabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererUlItem</code> macro represents an item in a bulleted list. The macro receives no arguments.</p> -<p>The <code>\markdownRendererUlItemEnd</code> macro represents the end of an item in a bulleted list. The macro receives no arguments.</p> -<p>The <code>\markdownRendererUlEnd</code> macro represents the end of a bulleted list that contains an item with several paragraphs of text (the list is not tight). The macro receives no arguments.</p> -<p>The <code>\markdownRendererUlEndTight</code> macro represents the end of a bulleted list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is disabled. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-25">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb432"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb432-1"><a href="#cb432-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb432-2"><a href="#cb432-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb432-3"><a href="#cb432-3" aria-hidden="true"></a></span> -<span id="cb432-4"><a href="#cb432-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb432-5"><a href="#cb432-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> -<span id="cb432-6"><a href="#cb432-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb432-7"><a href="#cb432-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb432-8"><a href="#cb432-8" aria-hidden="true"></a> ,</span> -<span id="cb432-9"><a href="#cb432-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb432-10"><a href="#cb432-10" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb432-11"><a href="#cb432-11" aria-hidden="true"></a>}</span> -<span id="cb432-12"><a href="#cb432-12" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> -<span id="cb432-13"><a href="#cb432-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> -<span id="cb432-14"><a href="#cb432-14" aria-hidden="true"></a></span> -<span id="cb432-15"><a href="#cb432-15" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb432-16"><a href="#cb432-16" aria-hidden="true"></a>This is a tight list</span> -<span id="cb432-17"><a href="#cb432-17" aria-hidden="true"></a></span> -<span id="cb432-18"><a href="#cb432-18" aria-hidden="true"></a>- the first item</span> -<span id="cb432-19"><a href="#cb432-19" aria-hidden="true"></a>- the second item</span> -<span id="cb432-20"><a href="#cb432-20" aria-hidden="true"></a>- the third item</span> -<span id="cb432-21"><a href="#cb432-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb432-22"><a href="#cb432-22" aria-hidden="true"></a></span> -<span id="cb432-23"><a href="#cb432-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb432-24"><a href="#cb432-24" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb432-25"><a href="#cb432-25" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb432-26"><a href="#cb432-26" aria-hidden="true"></a>}</span> -<span id="cb432-27"><a href="#cb432-27" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{}</span> -<span id="cb432-28"><a href="#cb432-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{--<span class="fu">\kern</span> 0.5em}</span> -<span id="cb432-29"><a href="#cb432-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb432-30"><a href="#cb432-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{}</span> -<span id="cb432-31"><a href="#cb432-31" aria-hidden="true"></a></span> -<span id="cb432-32"><a href="#cb432-32" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb432-33"><a href="#cb432-33" aria-hidden="true"></a>This is a loose list</span> -<span id="cb432-34"><a href="#cb432-34" aria-hidden="true"></a></span> -<span id="cb432-35"><a href="#cb432-35" aria-hidden="true"></a>- This is the first item</span> -<span id="cb432-36"><a href="#cb432-36" aria-hidden="true"></a></span> -<span id="cb432-37"><a href="#cb432-37" aria-hidden="true"></a>- This is the second item</span> -<span id="cb432-38"><a href="#cb432-38" aria-hidden="true"></a></span> -<span id="cb432-39"><a href="#cb432-39" aria-hidden="true"></a>- This is the third item</span> -<span id="cb432-40"><a href="#cb432-40" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb432-41"><a href="#cb432-41" aria-hidden="true"></a></span> -<span id="cb432-42"><a href="#cb432-42" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb433"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb433-1"><a href="#cb433-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is a tight list (the first item, the second item, and the third item).</p> +<h4 data-number="2.3.1.9" id="link-renderer"><span +class="header-section-number">2.3.1.9</span> Link Renderer</h4> +<p>The <code>\markdownRendererLink</code> macro represents a hyperlink. +It receives four arguments: the label, the fully escaped +<abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> +that can be used outside typesetting, and the title of the link.</p> +<h5 class="unnumbered" id="plain-tex-example-23">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb418"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb418-1"><a href="#cb418-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb418-2"><a href="#cb418-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb418-3"><a href="#cb418-3" aria-hidden="true" tabindex="-1"></a> #1 {<span class="fu">\tt</span>#2} titled {<span class="fu">\it</span>#4}<span class="co">%</span></span> +<span id="cb418-4"><a href="#cb418-4" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb418-5"><a href="#cb418-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb418-6"><a href="#cb418-6" aria-hidden="true" tabindex="-1"></a>Please visit [the link][ctan].</span> +<span id="cb418-7"><a href="#cb418-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb418-8"><a href="#cb418-8" aria-hidden="true" tabindex="-1"></a> [ctan]: https://ctan.org/</span> +<span id="cb418-9"><a href="#cb418-9" aria-hidden="true" tabindex="-1"></a> (the Comprehensive TeX Archive Network)</span> +<span id="cb418-10"><a href="#cb418-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb418-11"><a href="#cb418-11" 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="cb419"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb419-1"><a href="#cb419-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:</p> +<blockquote> +<p>Please visit the link <a href="https://ctan.org/" +class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX +Archive Network</em>.</p> +</blockquote> +<h5 class="unnumbered" id="latex-example-51"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb420"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb420-1"><a href="#cb420-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb420-2"><a href="#cb420-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb420-3"><a href="#cb420-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb420-4"><a href="#cb420-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb420-5"><a href="#cb420-5" aria-hidden="true" tabindex="-1"></a> link = {<span class="co">%</span></span> +<span id="cb420-6"><a href="#cb420-6" aria-hidden="true" tabindex="-1"></a> #1 <span class="fu">\texttt</span>{#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span> +<span id="cb420-7"><a href="#cb420-7" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb420-8"><a href="#cb420-8" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb420-9"><a href="#cb420-9" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb420-10"><a href="#cb420-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb420-11"><a href="#cb420-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb420-12"><a href="#cb420-12" aria-hidden="true" tabindex="-1"></a>Please visit [the link][ctan].</span> +<span id="cb420-13"><a href="#cb420-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb420-14"><a href="#cb420-14" aria-hidden="true" tabindex="-1"></a> [ctan]: https://ctan.org/</span> +<span id="cb420-15"><a href="#cb420-15" aria-hidden="true" tabindex="-1"></a> (the Comprehensive TeX Archive Network)</span> +<span id="cb420-16"><a href="#cb420-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb420-17"><a href="#cb420-17" 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="cb421"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb421-1"><a href="#cb421-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 text:</p> +<blockquote> +<p>Please visit the link <a href="https://ctan.org/" +class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX +Archive Network</em>.</p> +</blockquote> +<h5 class="unnumbered" id="context-example-38">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb422"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb422-1"><a href="#cb422-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb422-2"><a href="#cb422-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb422-3"><a href="#cb422-3" aria-hidden="true" tabindex="-1"></a> #1 {<span class="fu">\tt</span>#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></span> +<span id="cb422-4"><a href="#cb422-4" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb422-5"><a href="#cb422-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb422-6"><a href="#cb422-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb422-7"><a href="#cb422-7" aria-hidden="true" tabindex="-1"></a>Please visit [the link][ctan].</span> +<span id="cb422-8"><a href="#cb422-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb422-9"><a href="#cb422-9" aria-hidden="true" tabindex="-1"></a> [ctan]: https://ctan.org/</span> +<span id="cb422-10"><a href="#cb422-10" aria-hidden="true" tabindex="-1"></a> (the Comprehensive TeX Archive Network)</span> +<span id="cb422-11"><a href="#cb422-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb422-12"><a href="#cb422-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb423"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb423-1"><a href="#cb423-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<p>Please visit the link <a href="https://ctan.org/" +class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX +Archive Network</em>.</p> +</blockquote> +<h4 data-number="2.3.1.10" id="image-renderer"><span +class="header-section-number">2.3.1.10</span> Image Renderer</h4> +<p>The <code>\markdownRendererImage</code> macro represents an image. It +receives four arguments: the label, the fully escaped <abbr>uri</abbr> +that can be directly typeset, the raw <abbr>uri</abbr> that can be used +outside typesetting, and the title of the link.</p> +<h5 class="unnumbered" id="latex-example-52"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb424"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb424-1"><a href="#cb424-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb424-2"><a href="#cb424-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb424-3"><a href="#cb424-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\begingroup</span></span> +<span id="cb424-4"><a href="#cb424-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\@</span>=11</span> +<span id="cb424-5"><a href="#cb424-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> +<span id="cb424-6"><a href="#cb424-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\catcode</span>`<span class="fu">\^</span>^A=14</span> +<span id="cb424-7"><a href="#cb424-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\global\def\markdownRendererImage</span>#1#2#3#4{^^A</span> +<span id="cb424-8"><a href="#cb424-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\immediate\write</span>18{^^A</span></code></pre></div> +<div class="sourceCode" id="cb425"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb425-1"><a href="#cb425-1" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="fu">grep</span> <span class="at">-q</span> ^http<span class="kw">;</span> <span class="cf">then</span></span> +<span id="cb425-2"><a href="#cb425-2" aria-hidden="true" tabindex="-1"></a> <span class="va">OUTPUT</span><span class="op">=</span><span class="st">"</span><span class="va">$(</span><span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="fu">md5sum</span> <span class="kw">|</span> <span class="fu">cut</span> <span class="at">-d</span><span class="st">' '</span> <span class="at">-f1</span><span class="va">)</span><span class="st">.^^A</span></span> +<span id="cb425-3"><a href="#cb425-3" aria-hidden="true" tabindex="-1"></a><span class="st"> </span><span class="va">$(</span><span class="bu">printf</span> <span class="st">'%s'</span> <span class="st">"#3"</span> <span class="kw">|</span> <span class="fu">sed</span> <span class="st">'s/.*[.]//'</span><span class="va">)</span><span class="st">"</span><span class="kw">;</span></span> +<span id="cb425-4"><a href="#cb425-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="ot">! </span><span class="bu">[</span> <span class="ot">-e</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> <span class="bu">]</span><span class="kw">;</span> <span class="cf">then</span></span> +<span id="cb425-5"><a href="#cb425-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">wget</span> <span class="at">-O</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> <span class="st">'#3'</span> <span class="kw">||</span> <span class="fu">rm</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span><span class="kw">;</span></span> +<span id="cb425-6"><a href="#cb425-6" aria-hidden="true" tabindex="-1"></a> <span class="ex">convert</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> png:<span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span><span class="kw">;</span></span> +<span id="cb425-7"><a href="#cb425-7" aria-hidden="true" tabindex="-1"></a> <span class="cf">fi</span><span class="kw">;</span></span> +<span id="cb425-8"><a href="#cb425-8" aria-hidden="true" tabindex="-1"></a> <span class="bu">printf</span> <span class="st">'%s%%'</span> <span class="st">"</span><span class="va">$OUTPUT</span><span class="st">"</span> <span class="op">></span> <span class="dt">\j</span>obname.fetched<span class="kw">;</span></span> +<span id="cb425-9"><a href="#cb425-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span></span> +<span id="cb425-10"><a href="#cb425-10" aria-hidden="true" tabindex="-1"></a> <span class="bu">printf</span> <span class="st">'%s%%'</span> <span class="st">"#3"</span> <span class="op">></span> <span class="dt">\j</span>obname.fetched<span class="kw">;</span></span> +<span id="cb425-11"><a href="#cb425-11" aria-hidden="true" tabindex="-1"></a> <span class="ex">fi^^A</span></span></code></pre></div> +<div class="sourceCode" id="cb426"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb426-1"><a href="#cb426-1" aria-hidden="true" tabindex="-1"></a> }^^A</span> +<span id="cb426-2"><a href="#cb426-2" aria-hidden="true" tabindex="-1"></a> {^^A</span> +<span id="cb426-3"><a href="#cb426-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\everyeof</span>={<span class="fu">\noexpand</span>}^^A</span> +<span id="cb426-4"><a href="#cb426-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\edef\filename</span>{<span class="fu">\_</span>_markdowninput"<span class="fu">\jobname</span>.fetched" }^^A</span> +<span id="cb426-5"><a href="#cb426-5" aria-hidden="true" tabindex="-1"></a> <span class="bu">\includegraphics</span>[width=<span class="fu">\textwidth</span>]{<span class="fu">\filename</span>}^^A</span> +<span id="cb426-6"><a href="#cb426-6" aria-hidden="true" tabindex="-1"></a> }^^A</span> +<span id="cb426-7"><a href="#cb426-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb426-8"><a href="#cb426-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\endgroup</span></span> +<span id="cb426-9"><a href="#cb426-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb426-10"><a href="#cb426-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb426-11"><a href="#cb426-11" aria-hidden="true" tabindex="-1"></a>![TUGboat](https://tug.org/tugboat/noword.jpg)</span> +<span id="cb426-12"><a href="#cb426-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb426-13"><a href="#cb426-13" 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="cb427"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb427-1"><a href="#cb427-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 content. This assumes that you use a Unix-like +operating system with Bourne or Bourne again shell as the default shell +of the current user. It also assumes that the <code>md5sum</code>, +<code>wget</code>, and <code>convert</code> binaries are installed and +that the <span class="tex">T<sub>e</sub>X</span> engine has shell +access.</p> +<blockquote> +<p><img src="https://tug.org/tugboat/noword.jpg" +title="The Communications of the TeX Users Group" /></p> +</blockquote> +<h4 data-number="2.3.1.11" id="texcontentblockrenderers"><span +class="header-section-number">2.3.1.11</span> Content Block +Renderers</h4> +<p>The <code>\markdownRendererContentBlock</code> macro represents an iA +Writer content block. It receives four arguments: the local file or +online image filename extension cast to the lower case, the fully +escaped <abbr>uri</abbr> that can be directly typeset, the raw +<abbr>uri</abbr> that can be used outside typesetting, and the title of +the content block.</p> +<p>The <code>\markdownRendererContentBlockOnlineImage</code> macro +represents an iA Writer online image content block. The macro receives +the same arguments as <code>\markdownRendererContentBlock</code>.</p> +<p>The <code>\markdownRendererContentBlockCode</code> macro represents +an iA Writer content block that was recognized as a file in a known +programming language by its filename extension <span +class="math inline"><em>s</em></span>. If any +<code>markdown-languages.json</code> file found by +<strong><code>kpathsea</code></strong> contains a record <span +class="math inline">(<em>k</em>,<em>v</em>)</span>, then a +non-online-image content block with the filename extension <span +class="math inline"><em>s</em>, <em>s</em></span><code>:lower()</code><span +class="math inline"> = <em>k</em></span> is considered to be in a known +programming language <span class="math inline"><em>v</em></span>. The +macro receives five arguments: the local file name extension <span +class="math inline"><em>s</em></span> cast to the lower case, the +language <span class="math inline"><em>v</em></span>, the fully escaped +<abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> +that can be used outside typesetting, and the title of the content +block.</p> +<p>Note that you will need to place place a +<code>markdown-languages.json</code> file inside your working directory +or inside your local <span class="tex">T<sub>e</sub>X</span> directory +structure. In this file, you will define a mapping between filename +extensions and the language names recognized by your favorite syntax +highlighter; there may exist other creative uses beside syntax +highlighting. <a href="https://github.com/iainc/Markdown-Content-Blocks" +title="File transclusion syntax for Markdown">The +<code>Languages.json</code> file provided by Anton Sotkov</a> is a good +starting point.</p> +<h5 class="unnumbered" id="plain-tex-example-24">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb428"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb428-1"><a href="#cb428-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb428-2"><a href="#cb428-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> +<span id="cb428-3"><a href="#cb428-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb428-4"><a href="#cb428-4" aria-hidden="true" tabindex="-1"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb428-5"><a href="#cb428-5" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb428-6"><a href="#cb428-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb428-7"><a href="#cb428-7" aria-hidden="true" tabindex="-1"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb428-8"><a href="#cb428-8" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb428-9"><a href="#cb428-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> +<span id="cb428-10"><a href="#cb428-10" aria-hidden="true" tabindex="-1"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span> +<span id="cb428-11"><a href="#cb428-11" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb428-12"><a href="#cb428-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb428-13"><a href="#cb428-13" aria-hidden="true" tabindex="-1"></a>/document.tex (the document that we are currently typesetting)</span> +<span id="cb428-14"><a href="#cb428-14" aria-hidden="true" tabindex="-1"></a>/markdown-languages.json (the mapping between filename extensions</span> +<span id="cb428-15"><a href="#cb428-15" aria-hidden="true" tabindex="-1"></a> and programming language names)</span> +<span id="cb428-16"><a href="#cb428-16" aria-hidden="true" tabindex="-1"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> +<span id="cb428-17"><a href="#cb428-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb428-18"><a href="#cb428-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\bye</span></span></code></pre></div> +<p>Create also a text document named +<code>markdown-languages.json</code> with the following content:</p> +<div class="sourceCode" id="cb429"><pre +class="sourceCode js"><code class="sourceCode javascript"><span id="cb429-1"><a href="#cb429-1" aria-hidden="true" tabindex="-1"></a>{</span> +<span id="cb429-2"><a href="#cb429-2" aria-hidden="true" tabindex="-1"></a> <span class="st">"json"</span><span class="op">:</span> <span class="st">"JavaScript Object Notation"</span><span class="op">,</span></span> +<span id="cb429-3"><a href="#cb429-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb430"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb430-1"><a href="#cb430-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:</p> +<blockquote> +<p>This is <code>document.tex</code>, the document that we are currently +typesetting.</p> +<p>This is the JavaScript Object Notation (JSON) document +<code>markdown-languages.json</code>, the mapping between filename +extensions and programming language names.</p> +<p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>, +the logotype of TUGboat.</p> +</blockquote> +<h5 class="unnumbered" id="latex-example-53"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb431"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb431-1"><a href="#cb431-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb431-2"><a href="#cb431-2" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{markdown-languages.json}</span> +<span id="cb431-3"><a href="#cb431-3" aria-hidden="true" tabindex="-1"></a>{</span> +<span id="cb431-4"><a href="#cb431-4" aria-hidden="true" tabindex="-1"></a> "json": "JavaScript Object Notation",</span> +<span id="cb431-5"><a href="#cb431-5" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb431-6"><a href="#cb431-6" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> +<span id="cb431-7"><a href="#cb431-7" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> +<span id="cb431-8"><a href="#cb431-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb431-9"><a href="#cb431-9" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb431-10"><a href="#cb431-10" aria-hidden="true" tabindex="-1"></a> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</span> +<span id="cb431-11"><a href="#cb431-11" aria-hidden="true" tabindex="-1"></a> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</span> +<span id="cb431-12"><a href="#cb431-12" aria-hidden="true" tabindex="-1"></a> contentBlockCode = {<span class="co">%</span></span> +<span id="cb431-13"><a href="#cb431-13" aria-hidden="true" tabindex="-1"></a> This is the #2 (<span class="fu">\MakeUppercase</span>{#1}) document <span class="fu">\texttt</span>{#3}, #5.</span> +<span id="cb431-14"><a href="#cb431-14" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb431-15"><a href="#cb431-15" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb431-16"><a href="#cb431-16" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb431-17"><a href="#cb431-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb431-18"><a href="#cb431-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb431-19"><a href="#cb431-19" aria-hidden="true" tabindex="-1"></a>/document.tex (the document that we are currently typesetting)</span> +<span id="cb431-20"><a href="#cb431-20" aria-hidden="true" tabindex="-1"></a>/markdown-languages.json (the mapping between filename extensions</span> +<span id="cb431-21"><a href="#cb431-21" aria-hidden="true" tabindex="-1"></a> and programming language names)</span> +<span id="cb431-22"><a href="#cb431-22" aria-hidden="true" tabindex="-1"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> +<span id="cb431-23"><a href="#cb431-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb431-24"><a href="#cb431-24" 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="cb432"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb432-1"><a href="#cb432-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 text:</p> +<blockquote> +<p>This is <code>document.tex</code>, the document that we are currently +typesetting.</p> +<p>This is the JavaScript Object Notation (JSON) document +<code>markdown-languages.json</code>, the mapping between filename +extensions and programming language names.</p> +<p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>, +the logotype of TUGboat.</p> +</blockquote> +<h5 class="unnumbered" id="context-example-39">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb433"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb433-1"><a href="#cb433-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb433-2"><a href="#cb433-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[contentBlocks = yes]</span> +<span id="cb433-3"><a href="#cb433-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb433-4"><a href="#cb433-4" aria-hidden="true" tabindex="-1"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb433-5"><a href="#cb433-5" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb433-6"><a href="#cb433-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb433-7"><a href="#cb433-7" aria-hidden="true" tabindex="-1"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb433-8"><a href="#cb433-8" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb433-9"><a href="#cb433-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> +<span id="cb433-10"><a href="#cb433-10" aria-hidden="true" tabindex="-1"></a> This is the #2 (<span class="fu">\uppercase</span>{#1}) document {<span class="fu">\tt</span> #3}, #5.</span> +<span id="cb433-11"><a href="#cb433-11" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb433-12"><a href="#cb433-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb433-13"><a href="#cb433-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb433-14"><a href="#cb433-14" aria-hidden="true" tabindex="-1"></a>/document.tex (the document that we are currently typesetting)</span> +<span id="cb433-15"><a href="#cb433-15" aria-hidden="true" tabindex="-1"></a>/markdown-languages.json (the mapping between filename extensions</span> +<span id="cb433-16"><a href="#cb433-16" aria-hidden="true" tabindex="-1"></a> and programming language names)</span> +<span id="cb433-17"><a href="#cb433-17" aria-hidden="true" tabindex="-1"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> +<span id="cb433-18"><a href="#cb433-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb433-19"><a href="#cb433-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Create also a text document named +<code>markdown-languages.json</code> with the following content:</p> +<div class="sourceCode" id="cb434"><pre +class="sourceCode js"><code class="sourceCode javascript"><span id="cb434-1"><a href="#cb434-1" aria-hidden="true" tabindex="-1"></a>{</span> +<span id="cb434-2"><a href="#cb434-2" aria-hidden="true" tabindex="-1"></a> <span class="st">"json"</span><span class="op">:</span> <span class="st">"JavaScript Object Notation"</span><span class="op">,</span></span> +<span id="cb434-3"><a href="#cb434-3" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb435"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb435-1"><a href="#cb435-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<p>This is <code>document.tex</code>, the document that we are currently +typesetting.</p> +<p>This is the JavaScript Object Notation (JSON) document +<code>markdown-languages.json</code>, the mapping between filename +extensions and programming language names.</p> +<p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>, +the logotype of TUGboat.</p> +</blockquote> +<h4 data-number="2.3.1.12" id="bullet-list-renderers"><span +class="header-section-number">2.3.1.12</span> Bullet List Renderers</h4> +<p>The <code>\markdownRendererUlBegin</code> macro represents the +beginning of a bulleted list that contains an item with several +paragraphs of text (the list is not tight). The macro receives no +arguments.</p> +<p>The <code>\markdownRendererUlBeginTight</code> macro represents the +beginning of a bulleted list that contains no item with several +paragraphs of text (the list is tight). This macro will only be +produced, when the <strong><code>tightLists</code></strong> option is +disabled. The macro receives no arguments.</p> +<p>The <code>\markdownRendererUlItem</code> macro represents an item in +a bulleted list. The macro receives no arguments.</p> +<p>The <code>\markdownRendererUlItemEnd</code> macro represents the end +of an item in a bulleted list. The macro receives no arguments.</p> +<p>The <code>\markdownRendererUlEnd</code> macro represents the end of a +bulleted list that contains an item with several paragraphs of text (the +list is not tight). The macro receives no arguments.</p> +<p>The <code>\markdownRendererUlEndTight</code> macro represents the end +of a bulleted list that contains no item with several paragraphs of text +(the list is tight). This macro will only be produced, when the +<strong><code>tightLists</code></strong> option is disabled. The macro +receives no arguments.</p> +<h5 class="unnumbered" id="plain-tex-example-25">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb436"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb436-1"><a href="#cb436-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb436-2"><a href="#cb436-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb436-3"><a href="#cb436-3" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb436-4"><a href="#cb436-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb436-5"><a href="#cb436-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> +<span id="cb436-6"><a href="#cb436-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb436-7"><a href="#cb436-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb436-8"><a href="#cb436-8" aria-hidden="true" tabindex="-1"></a> ,</span> +<span id="cb436-9"><a href="#cb436-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> +<span id="cb436-10"><a href="#cb436-10" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb436-11"><a href="#cb436-11" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb436-12"><a href="#cb436-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> +<span id="cb436-13"><a href="#cb436-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> +<span id="cb436-14"><a href="#cb436-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb436-15"><a href="#cb436-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb436-16"><a href="#cb436-16" aria-hidden="true" tabindex="-1"></a>This is a tight list</span> +<span id="cb436-17"><a href="#cb436-17" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb436-18"><a href="#cb436-18" aria-hidden="true" tabindex="-1"></a>- the first item</span> +<span id="cb436-19"><a href="#cb436-19" aria-hidden="true" tabindex="-1"></a>- the second item</span> +<span id="cb436-20"><a href="#cb436-20" aria-hidden="true" tabindex="-1"></a>- the third item</span> +<span id="cb436-21"><a href="#cb436-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb436-22"><a href="#cb436-22" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb436-23"><a href="#cb436-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb436-24"><a href="#cb436-24" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span> +<span id="cb436-25"><a href="#cb436-25" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb436-26"><a href="#cb436-26" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb436-27"><a href="#cb436-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBegin</span>{}</span> +<span id="cb436-28"><a href="#cb436-28" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{--<span class="fu">\kern</span> 0.5em}</span> +<span id="cb436-29"><a href="#cb436-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.<span class="fu">\par</span>}</span> +<span id="cb436-30"><a href="#cb436-30" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEnd</span>{}</span> +<span id="cb436-31"><a href="#cb436-31" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb436-32"><a href="#cb436-32" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb436-33"><a href="#cb436-33" aria-hidden="true" tabindex="-1"></a>This is a loose list</span> +<span id="cb436-34"><a href="#cb436-34" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb436-35"><a href="#cb436-35" aria-hidden="true" tabindex="-1"></a>- This is the first item</span> +<span id="cb436-36"><a href="#cb436-36" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb436-37"><a href="#cb436-37" aria-hidden="true" tabindex="-1"></a>- This is the second item</span> +<span id="cb436-38"><a href="#cb436-38" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb436-39"><a href="#cb436-39" aria-hidden="true" tabindex="-1"></a>- This is the third item</span> +<span id="cb436-40"><a href="#cb436-40" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb436-41"><a href="#cb436-41" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb436-42"><a href="#cb436-42" 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="cb437"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb437-1"><a href="#cb437-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:</p> +<blockquote> +<p>This is a tight list (the first item, the second item, and the third +item).</p> <p>This is a loose list:</p> <ul> <li><p>This is the first item.</p></li> @@ -5261,60 +7431,66 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ul> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-53"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb434"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb434-1"><a href="#cb434-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb434-2"><a href="#cb434-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[tightLists]{<span class="ex">markdown</span>}</span> -<span id="cb434-3"><a href="#cb434-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb434-4"><a href="#cb434-4" aria-hidden="true"></a></span> -<span id="cb434-5"><a href="#cb434-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb434-6"><a href="#cb434-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb434-7"><a href="#cb434-7" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb434-8"><a href="#cb434-8" aria-hidden="true"></a> ulBeginTight = { (},</span> -<span id="cb434-9"><a href="#cb434-9" aria-hidden="true"></a> ulItem = {<span class="co">%</span></span> -<span id="cb434-10"><a href="#cb434-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb434-11"><a href="#cb434-11" aria-hidden="true"></a> ,</span> -<span id="cb434-12"><a href="#cb434-12" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb434-13"><a href="#cb434-13" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb434-14"><a href="#cb434-14" aria-hidden="true"></a> },</span> -<span id="cb434-15"><a href="#cb434-15" aria-hidden="true"></a> ulItemEnd = {},</span> -<span id="cb434-16"><a href="#cb434-16" aria-hidden="true"></a> ulEndTight = {).},</span> -<span id="cb434-17"><a href="#cb434-17" aria-hidden="true"></a> },</span> -<span id="cb434-18"><a href="#cb434-18" aria-hidden="true"></a>}</span> -<span id="cb434-19"><a href="#cb434-19" aria-hidden="true"></a>This is a tight list</span> -<span id="cb434-20"><a href="#cb434-20" aria-hidden="true"></a></span> -<span id="cb434-21"><a href="#cb434-21" aria-hidden="true"></a>- the first item</span> -<span id="cb434-22"><a href="#cb434-22" aria-hidden="true"></a>- the second item</span> -<span id="cb434-23"><a href="#cb434-23" aria-hidden="true"></a>- the third item</span> -<span id="cb434-24"><a href="#cb434-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb434-25"><a href="#cb434-25" aria-hidden="true"></a></span> -<span id="cb434-26"><a href="#cb434-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb434-27"><a href="#cb434-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb434-28"><a href="#cb434-28" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb434-29"><a href="#cb434-29" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb434-30"><a href="#cb434-30" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb434-31"><a href="#cb434-31" aria-hidden="true"></a> },</span> -<span id="cb434-32"><a href="#cb434-32" aria-hidden="true"></a> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</span> -<span id="cb434-33"><a href="#cb434-33" aria-hidden="true"></a> ulItem = {<span class="fu">\item</span>},</span> -<span id="cb434-34"><a href="#cb434-34" aria-hidden="true"></a> ulItemEnd = {.},</span> -<span id="cb434-35"><a href="#cb434-35" aria-hidden="true"></a> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> -<span id="cb434-36"><a href="#cb434-36" aria-hidden="true"></a> },</span> -<span id="cb434-37"><a href="#cb434-37" aria-hidden="true"></a>}</span> -<span id="cb434-38"><a href="#cb434-38" aria-hidden="true"></a>This is a loose list</span> -<span id="cb434-39"><a href="#cb434-39" aria-hidden="true"></a></span> -<span id="cb434-40"><a href="#cb434-40" aria-hidden="true"></a>- This is the first item</span> -<span id="cb434-41"><a href="#cb434-41" aria-hidden="true"></a></span> -<span id="cb434-42"><a href="#cb434-42" aria-hidden="true"></a>- This is the second item</span> -<span id="cb434-43"><a href="#cb434-43" aria-hidden="true"></a></span> -<span id="cb434-44"><a href="#cb434-44" aria-hidden="true"></a>- This is the third item</span> -<span id="cb434-45"><a href="#cb434-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb434-46"><a href="#cb434-46" aria-hidden="true"></a></span> -<span id="cb434-47"><a href="#cb434-47" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb435"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb435-1"><a href="#cb435-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is a tight list (the first item, the second item, and the third item).</p> +<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="cb438"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb438-1"><a href="#cb438-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb438-2"><a href="#cb438-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[tightLists]{<span class="ex">markdown</span>}</span> +<span id="cb438-3"><a href="#cb438-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb438-4"><a href="#cb438-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb438-5"><a href="#cb438-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb438-6"><a href="#cb438-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb438-7"><a href="#cb438-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {},</span> +<span id="cb438-8"><a href="#cb438-8" aria-hidden="true" tabindex="-1"></a> ulBeginTight = { (},</span> +<span id="cb438-9"><a href="#cb438-9" aria-hidden="true" tabindex="-1"></a> ulItem = {<span class="co">%</span></span> +<span id="cb438-10"><a href="#cb438-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb438-11"><a href="#cb438-11" aria-hidden="true" tabindex="-1"></a> ,</span> +<span id="cb438-12"><a href="#cb438-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> +<span id="cb438-13"><a href="#cb438-13" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb438-14"><a href="#cb438-14" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb438-15"><a href="#cb438-15" aria-hidden="true" tabindex="-1"></a> ulItemEnd = {},</span> +<span id="cb438-16"><a href="#cb438-16" aria-hidden="true" tabindex="-1"></a> ulEndTight = {).},</span> +<span id="cb438-17"><a href="#cb438-17" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb438-18"><a href="#cb438-18" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb438-19"><a href="#cb438-19" aria-hidden="true" tabindex="-1"></a>This is a tight list</span> +<span id="cb438-20"><a href="#cb438-20" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb438-21"><a href="#cb438-21" aria-hidden="true" tabindex="-1"></a>- the first item</span> +<span id="cb438-22"><a href="#cb438-22" aria-hidden="true" tabindex="-1"></a>- the second item</span> +<span id="cb438-23"><a href="#cb438-23" aria-hidden="true" tabindex="-1"></a>- the third item</span> +<span id="cb438-24"><a href="#cb438-24" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb438-25"><a href="#cb438-25" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb438-26"><a href="#cb438-26" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb438-27"><a href="#cb438-27" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb438-28"><a href="#cb438-28" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb438-29"><a href="#cb438-29" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span> +<span id="cb438-30"><a href="#cb438-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb438-31"><a href="#cb438-31" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb438-32"><a href="#cb438-32" aria-hidden="true" tabindex="-1"></a> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</span> +<span id="cb438-33"><a href="#cb438-33" aria-hidden="true" tabindex="-1"></a> ulItem = {<span class="fu">\item</span>},</span> +<span id="cb438-34"><a href="#cb438-34" aria-hidden="true" tabindex="-1"></a> ulItemEnd = {.},</span> +<span id="cb438-35"><a href="#cb438-35" aria-hidden="true" tabindex="-1"></a> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> +<span id="cb438-36"><a href="#cb438-36" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb438-37"><a href="#cb438-37" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb438-38"><a href="#cb438-38" aria-hidden="true" tabindex="-1"></a>This is a loose list</span> +<span id="cb438-39"><a href="#cb438-39" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb438-40"><a href="#cb438-40" aria-hidden="true" tabindex="-1"></a>- This is the first item</span> +<span id="cb438-41"><a href="#cb438-41" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb438-42"><a href="#cb438-42" aria-hidden="true" tabindex="-1"></a>- This is the second item</span> +<span id="cb438-43"><a href="#cb438-43" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb438-44"><a href="#cb438-44" aria-hidden="true" tabindex="-1"></a>- This is the third item</span> +<span id="cb438-45"><a href="#cb438-45" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb438-46"><a href="#cb438-46" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb438-47"><a href="#cb438-47" 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="cb439"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb439-1"><a href="#cb439-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 text:</p> +<blockquote> +<p>This is a tight list (the first item, the second item, and the third +item).</p> <p>This is a loose list:</p> <ul> <li><p>This is the first item.</p></li> @@ -5322,56 +7498,62 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ul> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-40">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb436"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb436-1"><a href="#cb436-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb436-2"><a href="#cb436-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[tightLists = yes]</span> -<span id="cb436-3"><a href="#cb436-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb436-4"><a href="#cb436-4" aria-hidden="true"></a></span> -<span id="cb436-5"><a href="#cb436-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb436-6"><a href="#cb436-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> -<span id="cb436-7"><a href="#cb436-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb436-8"><a href="#cb436-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb436-9"><a href="#cb436-9" aria-hidden="true"></a> ,</span> -<span id="cb436-10"><a href="#cb436-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb436-11"><a href="#cb436-11" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb436-12"><a href="#cb436-12" aria-hidden="true"></a>}</span> -<span id="cb436-13"><a href="#cb436-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> -<span id="cb436-14"><a href="#cb436-14" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> -<span id="cb436-15"><a href="#cb436-15" aria-hidden="true"></a></span> -<span id="cb436-16"><a href="#cb436-16" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb436-17"><a href="#cb436-17" aria-hidden="true"></a>This is a tight list</span> -<span id="cb436-18"><a href="#cb436-18" aria-hidden="true"></a></span> -<span id="cb436-19"><a href="#cb436-19" aria-hidden="true"></a>- the first item</span> -<span id="cb436-20"><a href="#cb436-20" aria-hidden="true"></a>- the second item</span> -<span id="cb436-21"><a href="#cb436-21" aria-hidden="true"></a>- the third item</span> -<span id="cb436-22"><a href="#cb436-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb436-23"><a href="#cb436-23" aria-hidden="true"></a></span> -<span id="cb436-24"><a href="#cb436-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb436-25"><a href="#cb436-25" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb436-26"><a href="#cb436-26" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb436-27"><a href="#cb436-27" aria-hidden="true"></a>}</span> -<span id="cb436-28"><a href="#cb436-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{<span class="fu">\startitemize</span>}</span> -<span id="cb436-29"><a href="#cb436-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="fu">\item</span>}</span> -<span id="cb436-30"><a href="#cb436-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.}</span> -<span id="cb436-31"><a href="#cb436-31" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb436-32"><a href="#cb436-32" aria-hidden="true"></a></span> -<span id="cb436-33"><a href="#cb436-33" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb436-34"><a href="#cb436-34" aria-hidden="true"></a>This is a loose list</span> -<span id="cb436-35"><a href="#cb436-35" aria-hidden="true"></a></span> -<span id="cb436-36"><a href="#cb436-36" aria-hidden="true"></a>- This is the first item</span> -<span id="cb436-37"><a href="#cb436-37" aria-hidden="true"></a></span> -<span id="cb436-38"><a href="#cb436-38" aria-hidden="true"></a>- This is the second item</span> -<span id="cb436-39"><a href="#cb436-39" aria-hidden="true"></a></span> -<span id="cb436-40"><a href="#cb436-40" aria-hidden="true"></a>- This is the third item</span> -<span id="cb436-41"><a href="#cb436-41" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb436-42"><a href="#cb436-42" aria-hidden="true"></a></span> -<span id="cb436-43"><a href="#cb436-43" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb437"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb437-1"><a href="#cb437-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is a tight list (the first item, the second item, and the third item).</p> +<h5 class="unnumbered" id="context-example-40">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb440"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb440-1"><a href="#cb440-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb440-2"><a href="#cb440-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[tightLists = yes]</span> +<span id="cb440-3"><a href="#cb440-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb440-4"><a href="#cb440-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb440-5"><a href="#cb440-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb440-6"><a href="#cb440-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> +<span id="cb440-7"><a href="#cb440-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb440-8"><a href="#cb440-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb440-9"><a href="#cb440-9" aria-hidden="true" tabindex="-1"></a> ,</span> +<span id="cb440-10"><a href="#cb440-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> +<span id="cb440-11"><a href="#cb440-11" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb440-12"><a href="#cb440-12" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb440-13"><a href="#cb440-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> +<span id="cb440-14"><a href="#cb440-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> +<span id="cb440-15"><a href="#cb440-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb440-16"><a href="#cb440-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb440-17"><a href="#cb440-17" aria-hidden="true" tabindex="-1"></a>This is a tight list</span> +<span id="cb440-18"><a href="#cb440-18" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb440-19"><a href="#cb440-19" aria-hidden="true" tabindex="-1"></a>- the first item</span> +<span id="cb440-20"><a href="#cb440-20" aria-hidden="true" tabindex="-1"></a>- the second item</span> +<span id="cb440-21"><a href="#cb440-21" aria-hidden="true" tabindex="-1"></a>- the third item</span> +<span id="cb440-22"><a href="#cb440-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb440-23"><a href="#cb440-23" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb440-24"><a href="#cb440-24" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb440-25"><a href="#cb440-25" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span> +<span id="cb440-26"><a href="#cb440-26" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb440-27"><a href="#cb440-27" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb440-28"><a href="#cb440-28" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlBegin</span>{<span class="fu">\startitemize</span>}</span> +<span id="cb440-29"><a href="#cb440-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="fu">\item</span>}</span> +<span id="cb440-30"><a href="#cb440-30" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.}</span> +<span id="cb440-31"><a href="#cb440-31" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererUlEnd</span>{<span class="fu">\stopitemize</span>}</span> +<span id="cb440-32"><a href="#cb440-32" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb440-33"><a href="#cb440-33" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb440-34"><a href="#cb440-34" aria-hidden="true" tabindex="-1"></a>This is a loose list</span> +<span id="cb440-35"><a href="#cb440-35" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb440-36"><a href="#cb440-36" aria-hidden="true" tabindex="-1"></a>- This is the first item</span> +<span id="cb440-37"><a href="#cb440-37" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb440-38"><a href="#cb440-38" aria-hidden="true" tabindex="-1"></a>- This is the second item</span> +<span id="cb440-39"><a href="#cb440-39" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb440-40"><a href="#cb440-40" aria-hidden="true" tabindex="-1"></a>- This is the third item</span> +<span id="cb440-41"><a href="#cb440-41" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb440-42"><a href="#cb440-42" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb440-43"><a href="#cb440-43" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb441"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb441-1"><a href="#cb441-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<p>This is a tight list (the first item, the second item, and the third +item).</p> <p>This is a loose list:</p> <ul> <li><p>This is the first item.</p></li> @@ -5379,88 +7561,164 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ul> </blockquote> -<h4 data-number="2.3.1.13" id="ordered-list-renderers"><span class="header-section-number">2.3.1.13</span> Ordered List Renderers</h4> -<p>The <code>\markdownRendererOlBegin</code> macro represents the beginning of an ordered list that contains an item with several paragraphs of text (the list is not tight). This macro will only be produced, when the <strong><code>fancyLists</code></strong> option is disabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererOlBeginTight</code> macro represents the beginning of an ordered list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is enabled and the <strong><code>fancyLists</code></strong> option is disabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererFancyOlBegin</code> macro represents the beginning of a fancy ordered list that contains an item with several paragraphs of text (the list is not tight). This macro will only be produced, when the <strong><code>fancyLists</code></strong> option is enabled. The macro receives two arguments: the style of the list item labels (<code>Decimal</code>, <code>LowerRoman</code>, <code>UpperRoman</code>, <code>LowerAlpha</code>, and <code>UpperAlpha</code>), and the style of delimiters between list item labels and texts (<code>Default</code>, <code>OneParen</code>, and <code>Period</code>).</p> -<p>The <code>\markdownRendererFancyOlBeginTight</code> macro represents the beginning of a fancy ordered list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>fancyLists</code></strong> and <strong><code>tightLists</code></strong> options are enabled. The macro receives two arguments: the style of the list item labels, and the style of delimiters between list item labels and texts. See the <code>\markdownRendererFancyOlBegin</code> macro for the valid style values.</p> -<p>The <code>\markdownRendererOlItem</code> macro represents an item in an ordered list. This macro will only be produced, when the <strong><code>startNumber</code></strong> option is disabled and the <strong><code>fancyLists</code></strong> option is disabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererOlItemEnd</code> macro represents the end of an item in an ordered list. This macro will only be produced, when the <strong><code>fancyLists</code></strong> option is disabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererOlItemWithNumber</code> macro represents an item in an ordered list. This macro will only be produced, when the <strong><code>startNumber</code></strong> option is enabled and the <strong><code>fancyLists</code></strong> option is disabled. The macro receives a single numeric argument that corresponds to the item number.</p> -<p>The <code>\markdownRendererFancyOlItem</code> macro represents an item in a fancy ordered list. This macro will only be produced, when the <strong><code>startNumber</code></strong> option is disabled and the <strong><code>fancyLists</code></strong> option is enabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererFancyOlItemEnd</code> macro represents the end of an item in a fancy ordered list. This macro will only be produced, when the <strong><code>fancyLists</code></strong> option is enabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererFancyOlItemWithNumber</code> macro represents an item in a fancy ordered list. This macro will only be produced, when the <strong><code>startNumber</code></strong> and <strong><code>fancyLists</code></strong> options are enabled. The macro receives a single numeric argument that corresponds to the item number.</p> -<p>The <code>\markdownRendererOlEnd</code> macro represents the end of an ordered list that contains an item with several paragraphs of text (the list is not tight). This macro will only be produced, when the <strong><code>fancyLists</code></strong> option is disabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererOlEndTight</code> macro represents the end of an ordered list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is enabled and the <strong><code>fancyLists</code></strong> option is disabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererFancyOlEnd</code> macro represents the end of a fancy ordered list that contains an item with several paragraphs of text (the list is not tight). This macro will only be produced, when the <strong><code>fancyLists</code></strong> option is enabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererFancyOlEndTight</code> macro represents the end of a fancy ordered list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>fancyLists</code></strong> and <strong><code>tightLists</code></strong> options are enabled. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-26">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb438"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb438-1"><a href="#cb438-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb438-2"><a href="#cb438-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb438-3"><a href="#cb438-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> -<span id="cb438-4"><a href="#cb438-4" aria-hidden="true"></a></span> -<span id="cb438-5"><a href="#cb438-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb438-6"><a href="#cb438-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> -<span id="cb438-7"><a href="#cb438-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb438-8"><a href="#cb438-8" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb438-9"><a href="#cb438-9" aria-hidden="true"></a> the first</span> -<span id="cb438-10"><a href="#cb438-10" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb438-11"><a href="#cb438-11" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb438-12"><a href="#cb438-12" aria-hidden="true"></a> , the second</span> -<span id="cb438-13"><a href="#cb438-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb438-14"><a href="#cb438-14" aria-hidden="true"></a> , and the third</span> -<span id="cb438-15"><a href="#cb438-15" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb438-16"><a href="#cb438-16" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb438-17"><a href="#cb438-17" aria-hidden="true"></a>}</span> -<span id="cb438-18"><a href="#cb438-18" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> -<span id="cb438-19"><a href="#cb438-19" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> -<span id="cb438-20"><a href="#cb438-20" aria-hidden="true"></a></span> -<span id="cb438-21"><a href="#cb438-21" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb438-22"><a href="#cb438-22" aria-hidden="true"></a>This is a tight list</span> -<span id="cb438-23"><a href="#cb438-23" aria-hidden="true"></a></span> -<span id="cb438-24"><a href="#cb438-24" aria-hidden="true"></a>1. item</span> -<span id="cb438-25"><a href="#cb438-25" aria-hidden="true"></a>2. item</span> -<span id="cb438-26"><a href="#cb438-26" aria-hidden="true"></a>3. item</span> -<span id="cb438-27"><a href="#cb438-27" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb438-28"><a href="#cb438-28" aria-hidden="true"></a></span> -<span id="cb438-29"><a href="#cb438-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb438-30"><a href="#cb438-30" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb438-31"><a href="#cb438-31" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb438-32"><a href="#cb438-32" aria-hidden="true"></a>}</span> -<span id="cb438-33"><a href="#cb438-33" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{}</span> -<span id="cb438-34"><a href="#cb438-34" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb438-35"><a href="#cb438-35" aria-hidden="true"></a> #1.<span class="fu">\kern</span> 0.5em<span class="co">%</span></span> -<span id="cb438-36"><a href="#cb438-36" aria-hidden="true"></a> This is the</span> -<span id="cb438-37"><a href="#cb438-37" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb438-38"><a href="#cb438-38" aria-hidden="true"></a> first</span> -<span id="cb438-39"><a href="#cb438-39" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb438-40"><a href="#cb438-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb438-41"><a href="#cb438-41" aria-hidden="true"></a> second</span> -<span id="cb438-42"><a href="#cb438-42" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb438-43"><a href="#cb438-43" aria-hidden="true"></a> third</span> -<span id="cb438-44"><a href="#cb438-44" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb438-45"><a href="#cb438-45" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb438-46"><a href="#cb438-46" aria-hidden="true"></a>}</span> -<span id="cb438-47"><a href="#cb438-47" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb438-48"><a href="#cb438-48" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{}</span> -<span id="cb438-49"><a href="#cb438-49" aria-hidden="true"></a></span> -<span id="cb438-50"><a href="#cb438-50" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb438-51"><a href="#cb438-51" aria-hidden="true"></a>This is a loose list</span> -<span id="cb438-52"><a href="#cb438-52" aria-hidden="true"></a></span> -<span id="cb438-53"><a href="#cb438-53" aria-hidden="true"></a>1. item</span> -<span id="cb438-54"><a href="#cb438-54" aria-hidden="true"></a></span> -<span id="cb438-55"><a href="#cb438-55" aria-hidden="true"></a>2. item</span> -<span id="cb438-56"><a href="#cb438-56" aria-hidden="true"></a></span> -<span id="cb438-57"><a href="#cb438-57" aria-hidden="true"></a>3. item</span> -<span id="cb438-58"><a href="#cb438-58" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb438-59"><a href="#cb438-59" aria-hidden="true"></a></span> -<span id="cb438-60"><a href="#cb438-60" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb439"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb439-1"><a href="#cb439-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is a tight list (the first item, the second item, and the third item).</p> +<h4 data-number="2.3.1.13" id="ordered-list-renderers"><span +class="header-section-number">2.3.1.13</span> Ordered List +Renderers</h4> +<p>The <code>\markdownRendererOlBegin</code> macro represents the +beginning of an ordered list that contains an item with several +paragraphs of text (the list is not tight). This macro will only be +produced, when the <strong><code>fancyLists</code></strong> option is +disabled. The macro receives no arguments.</p> +<p>The <code>\markdownRendererOlBeginTight</code> macro represents the +beginning of an ordered list that contains no item with several +paragraphs of text (the list is tight). This macro will only be +produced, when the <strong><code>tightLists</code></strong> option is +enabled and the <strong><code>fancyLists</code></strong> option is +disabled. The macro receives no arguments.</p> +<p>The <code>\markdownRendererFancyOlBegin</code> macro represents the +beginning of a fancy ordered list that contains an item with several +paragraphs of text (the list is not tight). This macro will only be +produced, when the <strong><code>fancyLists</code></strong> option is +enabled. The macro receives two arguments: the style of the list item +labels (<code>Decimal</code>, <code>LowerRoman</code>, +<code>UpperRoman</code>, <code>LowerAlpha</code>, and +<code>UpperAlpha</code>), and the style of delimiters between list item +labels and texts (<code>Default</code>, <code>OneParen</code>, and +<code>Period</code>).</p> +<p>The <code>\markdownRendererFancyOlBeginTight</code> macro represents +the beginning of a fancy ordered list that contains no item with several +paragraphs of text (the list is tight). This macro will only be +produced, when the <strong><code>fancyLists</code></strong> and +<strong><code>tightLists</code></strong> options are enabled. The macro +receives two arguments: the style of the list item labels, and the style +of delimiters between list item labels and texts. See the +<code>\markdownRendererFancyOlBegin</code> macro for the valid style +values.</p> +<p>The <code>\markdownRendererOlItem</code> macro represents an item in +an ordered list. This macro will only be produced, when the +<strong><code>startNumber</code></strong> option is disabled and the +<strong><code>fancyLists</code></strong> option is disabled. The macro +receives no arguments.</p> +<p>The <code>\markdownRendererOlItemEnd</code> macro represents the end +of an item in an ordered list. This macro will only be produced, when +the <strong><code>fancyLists</code></strong> option is disabled. The +macro receives no arguments.</p> +<p>The <code>\markdownRendererOlItemWithNumber</code> macro represents +an item in an ordered list. This macro will only be produced, when the +<strong><code>startNumber</code></strong> option is enabled and the +<strong><code>fancyLists</code></strong> option is disabled. The macro +receives a single numeric argument that corresponds to the item +number.</p> +<p>The <code>\markdownRendererFancyOlItem</code> macro represents an +item in a fancy ordered list. This macro will only be produced, when the +<strong><code>startNumber</code></strong> option is disabled and the +<strong><code>fancyLists</code></strong> option is enabled. The macro +receives no arguments.</p> +<p>The <code>\markdownRendererFancyOlItemEnd</code> macro represents the +end of an item in a fancy ordered list. This macro will only be +produced, when the <strong><code>fancyLists</code></strong> option is +enabled. The macro receives no arguments.</p> +<p>The <code>\markdownRendererFancyOlItemWithNumber</code> macro +represents an item in a fancy ordered list. This macro will only be +produced, when the <strong><code>startNumber</code></strong> and +<strong><code>fancyLists</code></strong> options are enabled. The macro +receives a single numeric argument that corresponds to the item +number.</p> +<p>The <code>\markdownRendererOlEnd</code> macro represents the end of +an ordered list that contains an item with several paragraphs of text +(the list is not tight). This macro will only be produced, when the +<strong><code>fancyLists</code></strong> option is disabled. The macro +receives no arguments.</p> +<p>The <code>\markdownRendererOlEndTight</code> macro represents the end +of an ordered list that contains no item with several paragraphs of text +(the list is tight). This macro will only be produced, when the +<strong><code>tightLists</code></strong> option is enabled and the +<strong><code>fancyLists</code></strong> option is disabled. The macro +receives no arguments.</p> +<p>The <code>\markdownRendererFancyOlEnd</code> macro represents the end +of a fancy ordered list that contains an item with several paragraphs of +text (the list is not tight). This macro will only be produced, when the +<strong><code>fancyLists</code></strong> option is enabled. The macro +receives no arguments.</p> +<p>The <code>\markdownRendererFancyOlEndTight</code> macro represents +the end of a fancy ordered list that contains no item with several +paragraphs of text (the list is tight). This macro will only be +produced, when the <strong><code>fancyLists</code></strong> and +<strong><code>tightLists</code></strong> options are enabled. The macro +receives no arguments.</p> +<h5 class="unnumbered" id="plain-tex-example-26">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb442"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb442-1"><a href="#cb442-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb442-2"><a href="#cb442-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb442-3"><a href="#cb442-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> +<span id="cb442-4"><a href="#cb442-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb442-5"><a href="#cb442-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb442-6"><a href="#cb442-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> +<span id="cb442-7"><a href="#cb442-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb442-8"><a href="#cb442-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb442-9"><a href="#cb442-9" aria-hidden="true" tabindex="-1"></a> the first</span> +<span id="cb442-10"><a href="#cb442-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb442-11"><a href="#cb442-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb442-12"><a href="#cb442-12" aria-hidden="true" tabindex="-1"></a> , the second</span> +<span id="cb442-13"><a href="#cb442-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb442-14"><a href="#cb442-14" aria-hidden="true" tabindex="-1"></a> , and the third</span> +<span id="cb442-15"><a href="#cb442-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb442-16"><a href="#cb442-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb442-17"><a href="#cb442-17" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb442-18"><a href="#cb442-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> +<span id="cb442-19"><a href="#cb442-19" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> +<span id="cb442-20"><a href="#cb442-20" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb442-21"><a href="#cb442-21" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb442-22"><a href="#cb442-22" aria-hidden="true" tabindex="-1"></a>This is a tight list</span> +<span id="cb442-23"><a href="#cb442-23" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb442-24"><a href="#cb442-24" aria-hidden="true" tabindex="-1"></a>1. item</span> +<span id="cb442-25"><a href="#cb442-25" aria-hidden="true" tabindex="-1"></a>2. item</span> +<span id="cb442-26"><a href="#cb442-26" aria-hidden="true" tabindex="-1"></a>3. item</span> +<span id="cb442-27"><a href="#cb442-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb442-28"><a href="#cb442-28" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb442-29"><a href="#cb442-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb442-30"><a href="#cb442-30" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span> +<span id="cb442-31"><a href="#cb442-31" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb442-32"><a href="#cb442-32" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb442-33"><a href="#cb442-33" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBegin</span>{}</span> +<span id="cb442-34"><a href="#cb442-34" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb442-35"><a href="#cb442-35" aria-hidden="true" tabindex="-1"></a> #1.<span class="fu">\kern</span> 0.5em<span class="co">%</span></span> +<span id="cb442-36"><a href="#cb442-36" aria-hidden="true" tabindex="-1"></a> This is the</span> +<span id="cb442-37"><a href="#cb442-37" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb442-38"><a href="#cb442-38" aria-hidden="true" tabindex="-1"></a> first</span> +<span id="cb442-39"><a href="#cb442-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb442-40"><a href="#cb442-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb442-41"><a href="#cb442-41" aria-hidden="true" tabindex="-1"></a> second</span> +<span id="cb442-42"><a href="#cb442-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb442-43"><a href="#cb442-43" aria-hidden="true" tabindex="-1"></a> third</span> +<span id="cb442-44"><a href="#cb442-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb442-45"><a href="#cb442-45" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb442-46"><a href="#cb442-46" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb442-47"><a href="#cb442-47" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> +<span id="cb442-48"><a href="#cb442-48" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEnd</span>{}</span> +<span id="cb442-49"><a href="#cb442-49" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb442-50"><a href="#cb442-50" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb442-51"><a href="#cb442-51" aria-hidden="true" tabindex="-1"></a>This is a loose list</span> +<span id="cb442-52"><a href="#cb442-52" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb442-53"><a href="#cb442-53" aria-hidden="true" tabindex="-1"></a>1. item</span> +<span id="cb442-54"><a href="#cb442-54" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb442-55"><a href="#cb442-55" aria-hidden="true" tabindex="-1"></a>2. item</span> +<span id="cb442-56"><a href="#cb442-56" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb442-57"><a href="#cb442-57" aria-hidden="true" tabindex="-1"></a>3. item</span> +<span id="cb442-58"><a href="#cb442-58" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb442-59"><a href="#cb442-59" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb442-60"><a href="#cb442-60" 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="cb443"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb443-1"><a href="#cb443-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:</p> +<blockquote> +<p>This is a tight list (the first item, the second item, and the third +item).</p> <p>This is a loose list:</p> <ol type="1"> <li><p>This is the first item.</p></li> @@ -5468,76 +7726,82 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ol> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-54"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb440"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb440-1"><a href="#cb440-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb440-2"><a href="#cb440-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[tightLists, startNumber]{<span class="ex">markdown</span>}</span> -<span id="cb440-3"><a href="#cb440-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb440-4"><a href="#cb440-4" aria-hidden="true"></a></span> -<span id="cb440-5"><a href="#cb440-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb440-6"><a href="#cb440-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb440-7"><a href="#cb440-7" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb440-8"><a href="#cb440-8" aria-hidden="true"></a> olBeginTight = { (},</span> -<span id="cb440-9"><a href="#cb440-9" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb440-10"><a href="#cb440-10" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb440-11"><a href="#cb440-11" aria-hidden="true"></a> the first</span> -<span id="cb440-12"><a href="#cb440-12" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb440-13"><a href="#cb440-13" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb440-14"><a href="#cb440-14" aria-hidden="true"></a> , the second</span> -<span id="cb440-15"><a href="#cb440-15" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb440-16"><a href="#cb440-16" aria-hidden="true"></a> , and the third</span> -<span id="cb440-17"><a href="#cb440-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb440-18"><a href="#cb440-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb440-19"><a href="#cb440-19" aria-hidden="true"></a> },</span> -<span id="cb440-20"><a href="#cb440-20" aria-hidden="true"></a> olItemEnd = {},</span> -<span id="cb440-21"><a href="#cb440-21" aria-hidden="true"></a> olEndTight = {).},</span> -<span id="cb440-22"><a href="#cb440-22" aria-hidden="true"></a> },</span> -<span id="cb440-23"><a href="#cb440-23" aria-hidden="true"></a>}</span> -<span id="cb440-24"><a href="#cb440-24" aria-hidden="true"></a>This is a tight list</span> -<span id="cb440-25"><a href="#cb440-25" aria-hidden="true"></a></span> -<span id="cb440-26"><a href="#cb440-26" aria-hidden="true"></a>1. item</span> -<span id="cb440-27"><a href="#cb440-27" aria-hidden="true"></a>2. item</span> -<span id="cb440-28"><a href="#cb440-28" aria-hidden="true"></a>3. item</span> -<span id="cb440-29"><a href="#cb440-29" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb440-30"><a href="#cb440-30" aria-hidden="true"></a></span> -<span id="cb440-31"><a href="#cb440-31" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb440-32"><a href="#cb440-32" aria-hidden="true"></a> renderers = {</span> -<span id="cb440-33"><a href="#cb440-33" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb440-34"><a href="#cb440-34" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb440-35"><a href="#cb440-35" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb440-36"><a href="#cb440-36" aria-hidden="true"></a> },</span> -<span id="cb440-37"><a href="#cb440-37" aria-hidden="true"></a> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</span> -<span id="cb440-38"><a href="#cb440-38" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb440-39"><a href="#cb440-39" aria-hidden="true"></a> <span class="fu">\item</span> This is the</span> -<span id="cb440-40"><a href="#cb440-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb440-41"><a href="#cb440-41" aria-hidden="true"></a> first</span> -<span id="cb440-42"><a href="#cb440-42" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb440-43"><a href="#cb440-43" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb440-44"><a href="#cb440-44" aria-hidden="true"></a> second</span> -<span id="cb440-45"><a href="#cb440-45" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb440-46"><a href="#cb440-46" aria-hidden="true"></a> third</span> -<span id="cb440-47"><a href="#cb440-47" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb440-48"><a href="#cb440-48" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb440-49"><a href="#cb440-49" aria-hidden="true"></a> },</span> -<span id="cb440-50"><a href="#cb440-50" aria-hidden="true"></a> olItemEnd = {.},</span> -<span id="cb440-51"><a href="#cb440-51" aria-hidden="true"></a> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</span> -<span id="cb440-52"><a href="#cb440-52" aria-hidden="true"></a> },</span> -<span id="cb440-53"><a href="#cb440-53" aria-hidden="true"></a>}</span> -<span id="cb440-54"><a href="#cb440-54" aria-hidden="true"></a>This is a loose list</span> -<span id="cb440-55"><a href="#cb440-55" aria-hidden="true"></a></span> -<span id="cb440-56"><a href="#cb440-56" aria-hidden="true"></a>1. item</span> -<span id="cb440-57"><a href="#cb440-57" aria-hidden="true"></a></span> -<span id="cb440-58"><a href="#cb440-58" aria-hidden="true"></a>2. item</span> -<span id="cb440-59"><a href="#cb440-59" aria-hidden="true"></a></span> -<span id="cb440-60"><a href="#cb440-60" aria-hidden="true"></a>3. item</span> -<span id="cb440-61"><a href="#cb440-61" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb440-62"><a href="#cb440-62" aria-hidden="true"></a></span> -<span id="cb440-63"><a href="#cb440-63" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb441"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb441-1"><a href="#cb441-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is a tight list (the first item, the second item, and the third item).</p> +<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="cb444"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb444-1"><a href="#cb444-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb444-2"><a href="#cb444-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[tightLists, startNumber]{<span class="ex">markdown</span>}</span> +<span id="cb444-3"><a href="#cb444-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb444-4"><a href="#cb444-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb444-5"><a href="#cb444-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb444-6"><a href="#cb444-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb444-7"><a href="#cb444-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {},</span> +<span id="cb444-8"><a href="#cb444-8" aria-hidden="true" tabindex="-1"></a> olBeginTight = { (},</span> +<span id="cb444-9"><a href="#cb444-9" aria-hidden="true" tabindex="-1"></a> olItemWithNumber = {<span class="co">%</span></span> +<span id="cb444-10"><a href="#cb444-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb444-11"><a href="#cb444-11" aria-hidden="true" tabindex="-1"></a> the first</span> +<span id="cb444-12"><a href="#cb444-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb444-13"><a href="#cb444-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb444-14"><a href="#cb444-14" aria-hidden="true" tabindex="-1"></a> , the second</span> +<span id="cb444-15"><a href="#cb444-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb444-16"><a href="#cb444-16" aria-hidden="true" tabindex="-1"></a> , and the third</span> +<span id="cb444-17"><a href="#cb444-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb444-18"><a href="#cb444-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb444-19"><a href="#cb444-19" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb444-20"><a href="#cb444-20" aria-hidden="true" tabindex="-1"></a> olItemEnd = {},</span> +<span id="cb444-21"><a href="#cb444-21" aria-hidden="true" tabindex="-1"></a> olEndTight = {).},</span> +<span id="cb444-22"><a href="#cb444-22" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb444-23"><a href="#cb444-23" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb444-24"><a href="#cb444-24" aria-hidden="true" tabindex="-1"></a>This is a tight list</span> +<span id="cb444-25"><a href="#cb444-25" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb444-26"><a href="#cb444-26" aria-hidden="true" tabindex="-1"></a>1. item</span> +<span id="cb444-27"><a href="#cb444-27" aria-hidden="true" tabindex="-1"></a>2. item</span> +<span id="cb444-28"><a href="#cb444-28" aria-hidden="true" tabindex="-1"></a>3. item</span> +<span id="cb444-29"><a href="#cb444-29" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb444-30"><a href="#cb444-30" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb444-31"><a href="#cb444-31" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb444-32"><a href="#cb444-32" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb444-33"><a href="#cb444-33" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb444-34"><a href="#cb444-34" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span> +<span id="cb444-35"><a href="#cb444-35" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb444-36"><a href="#cb444-36" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb444-37"><a href="#cb444-37" aria-hidden="true" tabindex="-1"></a> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</span> +<span id="cb444-38"><a href="#cb444-38" aria-hidden="true" tabindex="-1"></a> olItemWithNumber = {<span class="co">%</span></span> +<span id="cb444-39"><a href="#cb444-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\item</span> This is the</span> +<span id="cb444-40"><a href="#cb444-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb444-41"><a href="#cb444-41" aria-hidden="true" tabindex="-1"></a> first</span> +<span id="cb444-42"><a href="#cb444-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb444-43"><a href="#cb444-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb444-44"><a href="#cb444-44" aria-hidden="true" tabindex="-1"></a> second</span> +<span id="cb444-45"><a href="#cb444-45" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb444-46"><a href="#cb444-46" aria-hidden="true" tabindex="-1"></a> third</span> +<span id="cb444-47"><a href="#cb444-47" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb444-48"><a href="#cb444-48" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb444-49"><a href="#cb444-49" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb444-50"><a href="#cb444-50" aria-hidden="true" tabindex="-1"></a> olItemEnd = {.},</span> +<span id="cb444-51"><a href="#cb444-51" aria-hidden="true" tabindex="-1"></a> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</span> +<span id="cb444-52"><a href="#cb444-52" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb444-53"><a href="#cb444-53" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb444-54"><a href="#cb444-54" aria-hidden="true" tabindex="-1"></a>This is a loose list</span> +<span id="cb444-55"><a href="#cb444-55" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb444-56"><a href="#cb444-56" aria-hidden="true" tabindex="-1"></a>1. item</span> +<span id="cb444-57"><a href="#cb444-57" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb444-58"><a href="#cb444-58" aria-hidden="true" tabindex="-1"></a>2. item</span> +<span id="cb444-59"><a href="#cb444-59" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb444-60"><a href="#cb444-60" aria-hidden="true" tabindex="-1"></a>3. item</span> +<span id="cb444-61"><a href="#cb444-61" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb444-62"><a href="#cb444-62" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb444-63"><a href="#cb444-63" 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="cb445"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb445-1"><a href="#cb445-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 text:</p> +<blockquote> +<p>This is a tight list (the first item, the second item, and the third +item).</p> <p>This is a loose list:</p> <ol type="1"> <li><p>This is the first item.</p></li> @@ -5545,77 +7809,83 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ol> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-41">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb442"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb442-1"><a href="#cb442-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb442-2"><a href="#cb442-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span></span> -<span id="cb442-3"><a href="#cb442-3" aria-hidden="true"></a> [</span> -<span id="cb442-4"><a href="#cb442-4" aria-hidden="true"></a> tightLists = yes,</span> -<span id="cb442-5"><a href="#cb442-5" aria-hidden="true"></a> startNumber = yes,</span> -<span id="cb442-6"><a href="#cb442-6" aria-hidden="true"></a> ]</span> -<span id="cb442-7"><a href="#cb442-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb442-8"><a href="#cb442-8" aria-hidden="true"></a></span> -<span id="cb442-9"><a href="#cb442-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb442-10"><a href="#cb442-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> -<span id="cb442-11"><a href="#cb442-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb442-12"><a href="#cb442-12" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb442-13"><a href="#cb442-13" aria-hidden="true"></a> the first</span> -<span id="cb442-14"><a href="#cb442-14" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb442-15"><a href="#cb442-15" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb442-16"><a href="#cb442-16" aria-hidden="true"></a> , the second</span> -<span id="cb442-17"><a href="#cb442-17" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb442-18"><a href="#cb442-18" aria-hidden="true"></a> , and the third</span> -<span id="cb442-19"><a href="#cb442-19" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb442-20"><a href="#cb442-20" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb442-21"><a href="#cb442-21" aria-hidden="true"></a>}</span> -<span id="cb442-22"><a href="#cb442-22" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> -<span id="cb442-23"><a href="#cb442-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> -<span id="cb442-24"><a href="#cb442-24" aria-hidden="true"></a></span> -<span id="cb442-25"><a href="#cb442-25" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb442-26"><a href="#cb442-26" aria-hidden="true"></a>This is a tight list</span> -<span id="cb442-27"><a href="#cb442-27" aria-hidden="true"></a></span> -<span id="cb442-28"><a href="#cb442-28" aria-hidden="true"></a>1. item</span> -<span id="cb442-29"><a href="#cb442-29" aria-hidden="true"></a>2. item</span> -<span id="cb442-30"><a href="#cb442-30" aria-hidden="true"></a>3. item</span> -<span id="cb442-31"><a href="#cb442-31" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb442-32"><a href="#cb442-32" aria-hidden="true"></a></span> -<span id="cb442-33"><a href="#cb442-33" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb442-34"><a href="#cb442-34" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb442-35"><a href="#cb442-35" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb442-36"><a href="#cb442-36" aria-hidden="true"></a>}</span> -<span id="cb442-37"><a href="#cb442-37" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{<span class="fu">\startitemize</span>}</span> -<span id="cb442-38"><a href="#cb442-38" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb442-39"><a href="#cb442-39" aria-hidden="true"></a> <span class="fu">\sym</span>{#1.}</span> -<span id="cb442-40"><a href="#cb442-40" aria-hidden="true"></a> This is the</span> -<span id="cb442-41"><a href="#cb442-41" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb442-42"><a href="#cb442-42" aria-hidden="true"></a> first</span> -<span id="cb442-43"><a href="#cb442-43" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb442-44"><a href="#cb442-44" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb442-45"><a href="#cb442-45" aria-hidden="true"></a> second</span> -<span id="cb442-46"><a href="#cb442-46" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb442-47"><a href="#cb442-47" aria-hidden="true"></a> third</span> -<span id="cb442-48"><a href="#cb442-48" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb442-49"><a href="#cb442-49" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb442-50"><a href="#cb442-50" aria-hidden="true"></a>}</span> -<span id="cb442-51"><a href="#cb442-51" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb442-52"><a href="#cb442-52" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb442-53"><a href="#cb442-53" aria-hidden="true"></a></span> -<span id="cb442-54"><a href="#cb442-54" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb442-55"><a href="#cb442-55" aria-hidden="true"></a>This is a loose list</span> -<span id="cb442-56"><a href="#cb442-56" aria-hidden="true"></a></span> -<span id="cb442-57"><a href="#cb442-57" aria-hidden="true"></a>1. item</span> -<span id="cb442-58"><a href="#cb442-58" aria-hidden="true"></a></span> -<span id="cb442-59"><a href="#cb442-59" aria-hidden="true"></a>2. item</span> -<span id="cb442-60"><a href="#cb442-60" aria-hidden="true"></a></span> -<span id="cb442-61"><a href="#cb442-61" aria-hidden="true"></a>3. item</span> -<span id="cb442-62"><a href="#cb442-62" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb442-63"><a href="#cb442-63" aria-hidden="true"></a></span> -<span id="cb442-64"><a href="#cb442-64" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb443"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb443-1"><a href="#cb443-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is a tight list (the first item, the second item, and the third item).</p> +<h5 class="unnumbered" id="context-example-41">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb446"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb446-1"><a href="#cb446-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb446-2"><a href="#cb446-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span> +<span id="cb446-3"><a href="#cb446-3" aria-hidden="true" tabindex="-1"></a> [</span> +<span id="cb446-4"><a href="#cb446-4" aria-hidden="true" tabindex="-1"></a> tightLists = yes,</span> +<span id="cb446-5"><a href="#cb446-5" aria-hidden="true" tabindex="-1"></a> startNumber = yes,</span> +<span id="cb446-6"><a href="#cb446-6" aria-hidden="true" tabindex="-1"></a> ]</span> +<span id="cb446-7"><a href="#cb446-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb446-8"><a href="#cb446-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb446-9"><a href="#cb446-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb446-10"><a href="#cb446-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> +<span id="cb446-11"><a href="#cb446-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb446-12"><a href="#cb446-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb446-13"><a href="#cb446-13" aria-hidden="true" tabindex="-1"></a> the first</span> +<span id="cb446-14"><a href="#cb446-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb446-15"><a href="#cb446-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb446-16"><a href="#cb446-16" aria-hidden="true" tabindex="-1"></a> , the second</span> +<span id="cb446-17"><a href="#cb446-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb446-18"><a href="#cb446-18" aria-hidden="true" tabindex="-1"></a> , and the third</span> +<span id="cb446-19"><a href="#cb446-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb446-20"><a href="#cb446-20" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb446-21"><a href="#cb446-21" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb446-22"><a href="#cb446-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> +<span id="cb446-23"><a href="#cb446-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> +<span id="cb446-24"><a href="#cb446-24" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb446-25"><a href="#cb446-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb446-26"><a href="#cb446-26" aria-hidden="true" tabindex="-1"></a>This is a tight list</span> +<span id="cb446-27"><a href="#cb446-27" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb446-28"><a href="#cb446-28" aria-hidden="true" tabindex="-1"></a>1. item</span> +<span id="cb446-29"><a href="#cb446-29" aria-hidden="true" tabindex="-1"></a>2. item</span> +<span id="cb446-30"><a href="#cb446-30" aria-hidden="true" tabindex="-1"></a>3. item</span> +<span id="cb446-31"><a href="#cb446-31" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb446-32"><a href="#cb446-32" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb446-33"><a href="#cb446-33" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb446-34"><a href="#cb446-34" aria-hidden="true" tabindex="-1"></a> :<span class="fu">\par</span></span> +<span id="cb446-35"><a href="#cb446-35" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb446-36"><a href="#cb446-36" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb446-37"><a href="#cb446-37" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlBegin</span>{<span class="fu">\startitemize</span>}</span> +<span id="cb446-38"><a href="#cb446-38" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb446-39"><a href="#cb446-39" aria-hidden="true" tabindex="-1"></a> <span class="fu">\sym</span>{#1.}</span> +<span id="cb446-40"><a href="#cb446-40" aria-hidden="true" tabindex="-1"></a> This is the</span> +<span id="cb446-41"><a href="#cb446-41" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb446-42"><a href="#cb446-42" aria-hidden="true" tabindex="-1"></a> first</span> +<span id="cb446-43"><a href="#cb446-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb446-44"><a href="#cb446-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb446-45"><a href="#cb446-45" aria-hidden="true" tabindex="-1"></a> second</span> +<span id="cb446-46"><a href="#cb446-46" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb446-47"><a href="#cb446-47" aria-hidden="true" tabindex="-1"></a> third</span> +<span id="cb446-48"><a href="#cb446-48" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb446-49"><a href="#cb446-49" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb446-50"><a href="#cb446-50" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb446-51"><a href="#cb446-51" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> +<span id="cb446-52"><a href="#cb446-52" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererOlEnd</span>{<span class="fu">\stopitemize</span>}</span> +<span id="cb446-53"><a href="#cb446-53" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb446-54"><a href="#cb446-54" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb446-55"><a href="#cb446-55" aria-hidden="true" tabindex="-1"></a>This is a loose list</span> +<span id="cb446-56"><a href="#cb446-56" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb446-57"><a href="#cb446-57" aria-hidden="true" tabindex="-1"></a>1. item</span> +<span id="cb446-58"><a href="#cb446-58" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb446-59"><a href="#cb446-59" aria-hidden="true" tabindex="-1"></a>2. item</span> +<span id="cb446-60"><a href="#cb446-60" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb446-61"><a href="#cb446-61" aria-hidden="true" tabindex="-1"></a>3. item</span> +<span id="cb446-62"><a href="#cb446-62" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb446-63"><a href="#cb446-63" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb446-64"><a href="#cb446-64" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb447"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb447-1"><a href="#cb447-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<p>This is a tight list (the first item, the second item, and the third +item).</p> <p>This is a loose list:</p> <ol type="1"> <li><p>This is the first item.</p></li> @@ -5623,99 +7893,127 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ol> </blockquote> -<h4 data-number="2.3.1.14" id="definition-list-renderers"><span class="header-section-number">2.3.1.14</span> Definition List Renderers</h4> -<p>The following macros are only produced, when the <strong><code>definitionLists</code></strong> option is enabled.</p> -<p>The <code>\markdownRendererDlBegin</code> macro represents the beginning of a definition list that contains an item with several paragraphs of text (the list is not tight). The macro receives no arguments.</p> -<p>The <code>\markdownRendererDlBeginTight</code> macro represents the beginning of a definition list that contains an item with several paragraphs of text (the list is not tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is disabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererDlItem</code> macro represents a term in a definition list. The macro receives a single argument that corresponds to the term being defined.</p> -<p>The <code>\markdownRendererDlItemEnd</code> macro represents the end of a list of definitions for a single term.</p> -<p>The <code>\markdownRendererDlDefinitionBegin</code> macro represents the beginning of a definition in a definition list. There can be several definitions for a single term.</p> -<p>The <code>\markdownRendererDlDefinitionEnd</code> macro represents the end of a definition in a definition list. There can be several definitions for a single term.</p> -<p>The <code>\markdownRendererDlEnd</code> macro represents the end of a definition list that contains an item with several paragraphs of text (the list is not tight). The macro receives no arguments.</p> -<p>The <code>\markdownRendererDlEndTight</code> macro represents the end of a definition list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is disabled. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-27">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb444"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb444-1"><a href="#cb444-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb444-2"><a href="#cb444-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> -<span id="cb444-3"><a href="#cb444-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb444-4"><a href="#cb444-4" aria-hidden="true"></a></span> -<span id="cb444-5"><a href="#cb444-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb444-6"><a href="#cb444-6" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb444-7"><a href="#cb444-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb444-8"><a href="#cb444-8" aria-hidden="true"></a>}</span> -<span id="cb444-9"><a href="#cb444-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{<span class="co">%</span></span> -<span id="cb444-10"><a href="#cb444-10" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb444-11"><a href="#cb444-11" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</span> -<span id="cb444-12"><a href="#cb444-12" aria-hidden="true"></a>}</span> -<span id="cb444-13"><a href="#cb444-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb444-14"><a href="#cb444-14" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> -<span id="cb444-15"><a href="#cb444-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb444-16"><a href="#cb444-16" aria-hidden="true"></a> ,</span> -<span id="cb444-17"><a href="#cb444-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb444-18"><a href="#cb444-18" aria-hidden="true"></a> , and</span> -<span id="cb444-19"><a href="#cb444-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb444-20"><a href="#cb444-20" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb444-21"><a href="#cb444-21" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb444-22"><a href="#cb444-22" aria-hidden="true"></a>}</span> -<span id="cb444-23"><a href="#cb444-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb444-24"><a href="#cb444-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\par</span>--<span class="fu">\kern</span> 0.5em}</span> -<span id="cb444-25"><a href="#cb444-25" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{<span class="fu">\endgroup</span>}</span> -<span id="cb444-26"><a href="#cb444-26" aria-hidden="true"></a></span> -<span id="cb444-27"><a href="#cb444-27" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb444-28"><a href="#cb444-28" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb444-29"><a href="#cb444-29" aria-hidden="true"></a></span> -<span id="cb444-30"><a href="#cb444-30" aria-hidden="true"></a>Coffee</span> -<span id="cb444-31"><a href="#cb444-31" aria-hidden="true"></a>: black hot drink</span> -<span id="cb444-32"><a href="#cb444-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb444-33"><a href="#cb444-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb444-34"><a href="#cb444-34" aria-hidden="true"></a></span> -<span id="cb444-35"><a href="#cb444-35" aria-hidden="true"></a>Milk</span> -<span id="cb444-36"><a href="#cb444-36" aria-hidden="true"></a>: white cold drink</span> -<span id="cb444-37"><a href="#cb444-37" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb444-38"><a href="#cb444-38" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb444-39"><a href="#cb444-39" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb444-40"><a href="#cb444-40" aria-hidden="true"></a></span> -<span id="cb444-41"><a href="#cb444-41" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb444-42"><a href="#cb444-42" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb444-43"><a href="#cb444-43" aria-hidden="true"></a>}</span> -<span id="cb444-44"><a href="#cb444-44" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> -<span id="cb444-45"><a href="#cb444-45" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb444-46"><a href="#cb444-46" aria-hidden="true"></a> . #1 is a</span> -<span id="cb444-47"><a href="#cb444-47" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb444-48"><a href="#cb444-48" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb444-49"><a href="#cb444-49" aria-hidden="true"></a> ,</span> -<span id="cb444-50"><a href="#cb444-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb444-51"><a href="#cb444-51" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb444-52"><a href="#cb444-52" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb444-53"><a href="#cb444-53" aria-hidden="true"></a>}</span> -<span id="cb444-54"><a href="#cb444-54" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb444-55"><a href="#cb444-55" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> -<span id="cb444-56"><a href="#cb444-56" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> -<span id="cb444-57"><a href="#cb444-57" aria-hidden="true"></a></span> -<span id="cb444-58"><a href="#cb444-58" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb444-59"><a href="#cb444-59" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb444-60"><a href="#cb444-60" aria-hidden="true"></a></span> -<span id="cb444-61"><a href="#cb444-61" aria-hidden="true"></a>Coffee</span> -<span id="cb444-62"><a href="#cb444-62" aria-hidden="true"></a></span> -<span id="cb444-63"><a href="#cb444-63" aria-hidden="true"></a>: black hot drink</span> -<span id="cb444-64"><a href="#cb444-64" aria-hidden="true"></a></span> -<span id="cb444-65"><a href="#cb444-65" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb444-66"><a href="#cb444-66" aria-hidden="true"></a></span> -<span id="cb444-67"><a href="#cb444-67" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb444-68"><a href="#cb444-68" aria-hidden="true"></a></span> -<span id="cb444-69"><a href="#cb444-69" aria-hidden="true"></a>Milk</span> -<span id="cb444-70"><a href="#cb444-70" aria-hidden="true"></a></span> -<span id="cb444-71"><a href="#cb444-71" aria-hidden="true"></a>: white cold drink</span> -<span id="cb444-72"><a href="#cb444-72" aria-hidden="true"></a></span> -<span id="cb444-73"><a href="#cb444-73" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb444-74"><a href="#cb444-74" aria-hidden="true"></a></span> -<span id="cb444-75"><a href="#cb444-75" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb444-76"><a href="#cb444-76" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb444-77"><a href="#cb444-77" aria-hidden="true"></a></span> -<span id="cb444-78"><a href="#cb444-78" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb445"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb445-1"><a href="#cb445-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.14" id="definition-list-renderers"><span +class="header-section-number">2.3.1.14</span> Definition List +Renderers</h4> +<p>The following macros are only produced, when the +<strong><code>definitionLists</code></strong> option is enabled.</p> +<p>The <code>\markdownRendererDlBegin</code> macro represents the +beginning of a definition list that contains an item with several +paragraphs of text (the list is not tight). The macro receives no +arguments.</p> +<p>The <code>\markdownRendererDlBeginTight</code> macro represents the +beginning of a definition list that contains an item with several +paragraphs of text (the list is not tight). This macro will only be +produced, when the <strong><code>tightLists</code></strong> option is +disabled. The macro receives no arguments.</p> +<p>The <code>\markdownRendererDlItem</code> macro represents a term in a +definition list. The macro receives a single argument that corresponds +to the term being defined.</p> +<p>The <code>\markdownRendererDlItemEnd</code> macro represents the end +of a list of definitions for a single term.</p> +<p>The <code>\markdownRendererDlDefinitionBegin</code> macro represents +the beginning of a definition in a definition list. There can be several +definitions for a single term.</p> +<p>The <code>\markdownRendererDlDefinitionEnd</code> macro represents +the end of a definition in a definition list. There can be several +definitions for a single term.</p> +<p>The <code>\markdownRendererDlEnd</code> macro represents the end of a +definition list that contains an item with several paragraphs of text +(the list is not tight). The macro receives no arguments.</p> +<p>The <code>\markdownRendererDlEndTight</code> macro represents the end +of a definition list that contains no item with several paragraphs of +text (the list is tight). This macro will only be produced, when the +<strong><code>tightLists</code></strong> option is disabled. The macro +receives no arguments.</p> +<h5 class="unnumbered" id="plain-tex-example-27">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb448"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb448-1"><a href="#cb448-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb448-2"><a href="#cb448-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> +<span id="cb448-3"><a href="#cb448-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb448-4"><a href="#cb448-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-5"><a href="#cb448-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb448-6"><a href="#cb448-6" aria-hidden="true" tabindex="-1"></a> :<span class="co">%</span></span> +<span id="cb448-7"><a href="#cb448-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb448-8"><a href="#cb448-8" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb448-9"><a href="#cb448-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{<span class="co">%</span></span> +<span id="cb448-10"><a href="#cb448-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span> +<span id="cb448-11"><a href="#cb448-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\parindent</span>=0pt</span> +<span id="cb448-12"><a href="#cb448-12" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb448-13"><a href="#cb448-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb448-14"><a href="#cb448-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> +<span id="cb448-15"><a href="#cb448-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb448-16"><a href="#cb448-16" aria-hidden="true" tabindex="-1"></a> ,</span> +<span id="cb448-17"><a href="#cb448-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb448-18"><a href="#cb448-18" aria-hidden="true" tabindex="-1"></a> , and</span> +<span id="cb448-19"><a href="#cb448-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> +<span id="cb448-20"><a href="#cb448-20" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb448-21"><a href="#cb448-21" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb448-22"><a href="#cb448-22" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb448-23"><a href="#cb448-23" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> +<span id="cb448-24"><a href="#cb448-24" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\par</span>--<span class="fu">\kern</span> 0.5em}</span> +<span id="cb448-25"><a href="#cb448-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEndTight</span>{<span class="fu">\endgroup</span>}</span> +<span id="cb448-26"><a href="#cb448-26" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-27"><a href="#cb448-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb448-28"><a href="#cb448-28" aria-hidden="true" tabindex="-1"></a>This is a tight definition list</span> +<span id="cb448-29"><a href="#cb448-29" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-30"><a href="#cb448-30" aria-hidden="true" tabindex="-1"></a>Coffee</span> +<span id="cb448-31"><a href="#cb448-31" aria-hidden="true" tabindex="-1"></a>: black hot drink</span> +<span id="cb448-32"><a href="#cb448-32" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span> +<span id="cb448-33"><a href="#cb448-33" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb448-34"><a href="#cb448-34" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-35"><a href="#cb448-35" aria-hidden="true" tabindex="-1"></a>Milk</span> +<span id="cb448-36"><a href="#cb448-36" aria-hidden="true" tabindex="-1"></a>: white cold drink</span> +<span id="cb448-37"><a href="#cb448-37" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span> +<span id="cb448-38"><a href="#cb448-38" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span> +<span id="cb448-39"><a href="#cb448-39" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb448-40"><a href="#cb448-40" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-41"><a href="#cb448-41" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb448-42"><a href="#cb448-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb448-43"><a href="#cb448-43" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb448-44"><a href="#cb448-44" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> +<span id="cb448-45"><a href="#cb448-45" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb448-46"><a href="#cb448-46" aria-hidden="true" tabindex="-1"></a> . #1 is a</span> +<span id="cb448-47"><a href="#cb448-47" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb448-48"><a href="#cb448-48" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb448-49"><a href="#cb448-49" aria-hidden="true" tabindex="-1"></a> ,</span> +<span id="cb448-50"><a href="#cb448-50" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> +<span id="cb448-51"><a href="#cb448-51" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb448-52"><a href="#cb448-52" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb448-53"><a href="#cb448-53" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb448-54"><a href="#cb448-54" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> +<span id="cb448-55"><a href="#cb448-55" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> +<span id="cb448-56"><a href="#cb448-56" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> +<span id="cb448-57"><a href="#cb448-57" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-58"><a href="#cb448-58" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb448-59"><a href="#cb448-59" aria-hidden="true" tabindex="-1"></a>This is a loose definition list</span> +<span id="cb448-60"><a href="#cb448-60" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-61"><a href="#cb448-61" aria-hidden="true" tabindex="-1"></a>Coffee</span> +<span id="cb448-62"><a href="#cb448-62" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-63"><a href="#cb448-63" aria-hidden="true" tabindex="-1"></a>: black hot drink</span> +<span id="cb448-64"><a href="#cb448-64" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-65"><a href="#cb448-65" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span> +<span id="cb448-66"><a href="#cb448-66" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-67"><a href="#cb448-67" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb448-68"><a href="#cb448-68" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-69"><a href="#cb448-69" aria-hidden="true" tabindex="-1"></a>Milk</span> +<span id="cb448-70"><a href="#cb448-70" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-71"><a href="#cb448-71" aria-hidden="true" tabindex="-1"></a>: white cold drink</span> +<span id="cb448-72"><a href="#cb448-72" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-73"><a href="#cb448-73" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span> +<span id="cb448-74"><a href="#cb448-74" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-75"><a href="#cb448-75" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span> +<span id="cb448-76"><a href="#cb448-76" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb448-77"><a href="#cb448-77" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb448-78"><a href="#cb448-78" 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="cb449"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb449-1"><a href="#cb449-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:</p> <blockquote> <p>This is a tight definition list:</p> <p><strong>Coffee</strong></p> @@ -5730,93 +8028,101 @@ Thomas,Edison,1847</code></pre> <li>nutrient-rich, and</li> <li>produced on an industrial scale.</li> </ul> -<p>This is a loose definition list. Coffee is a black hot drink, prepared from roasted coffee beans, and one of the most traded agricultural commodities in the world. Milk is a white cold drink, nutrient-rich, and produced on an industrial scale.</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-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="cb446"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb446-1"><a href="#cb446-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb446-2"><a href="#cb446-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</span> -<span id="cb446-3"><a href="#cb446-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb446-4"><a href="#cb446-4" aria-hidden="true"></a></span> -<span id="cb446-5"><a href="#cb446-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb446-6"><a href="#cb446-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb446-7"><a href="#cb446-7" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb446-8"><a href="#cb446-8" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb446-9"><a href="#cb446-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb446-10"><a href="#cb446-10" aria-hidden="true"></a> },</span> -<span id="cb446-11"><a href="#cb446-11" aria-hidden="true"></a> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</span> -<span id="cb446-12"><a href="#cb446-12" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> -<span id="cb446-13"><a href="#cb446-13" aria-hidden="true"></a> <span class="fu">\item</span>[#1]</span> -<span id="cb446-14"><a href="#cb446-14" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</span> -<span id="cb446-15"><a href="#cb446-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb446-16"><a href="#cb446-16" aria-hidden="true"></a> ,</span> -<span id="cb446-17"><a href="#cb446-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb446-18"><a href="#cb446-18" aria-hidden="true"></a> , and</span> -<span id="cb446-19"><a href="#cb446-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb446-20"><a href="#cb446-20" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb446-21"><a href="#cb446-21" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb446-22"><a href="#cb446-22" aria-hidden="true"></a> },</span> -<span id="cb446-23"><a href="#cb446-23" aria-hidden="true"></a> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> -<span id="cb446-24"><a href="#cb446-24" aria-hidden="true"></a> dlDefinitionBegin = <span class="fu">\item</span>,</span> -<span id="cb446-25"><a href="#cb446-25" aria-hidden="true"></a> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</span> -<span id="cb446-26"><a href="#cb446-26" aria-hidden="true"></a> },</span> -<span id="cb446-27"><a href="#cb446-27" aria-hidden="true"></a>}</span> -<span id="cb446-28"><a href="#cb446-28" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb446-29"><a href="#cb446-29" aria-hidden="true"></a></span> -<span id="cb446-30"><a href="#cb446-30" aria-hidden="true"></a>Coffee</span> -<span id="cb446-31"><a href="#cb446-31" aria-hidden="true"></a>: black hot drink</span> -<span id="cb446-32"><a href="#cb446-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb446-33"><a href="#cb446-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb446-34"><a href="#cb446-34" aria-hidden="true"></a></span> -<span id="cb446-35"><a href="#cb446-35" aria-hidden="true"></a>Milk</span> -<span id="cb446-36"><a href="#cb446-36" aria-hidden="true"></a>: white cold drink</span> -<span id="cb446-37"><a href="#cb446-37" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb446-38"><a href="#cb446-38" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb446-39"><a href="#cb446-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb446-40"><a href="#cb446-40" aria-hidden="true"></a></span> -<span id="cb446-41"><a href="#cb446-41" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb446-42"><a href="#cb446-42" aria-hidden="true"></a> renderers = {</span> -<span id="cb446-43"><a href="#cb446-43" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb446-44"><a href="#cb446-44" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb446-45"><a href="#cb446-45" aria-hidden="true"></a> },</span> -<span id="cb446-46"><a href="#cb446-46" aria-hidden="true"></a> dlBegin = {},</span> -<span id="cb446-47"><a href="#cb446-47" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> -<span id="cb446-48"><a href="#cb446-48" aria-hidden="true"></a> . #1 is a</span> -<span id="cb446-49"><a href="#cb446-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb446-50"><a href="#cb446-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb446-51"><a href="#cb446-51" aria-hidden="true"></a> ,</span> -<span id="cb446-52"><a href="#cb446-52" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb446-53"><a href="#cb446-53" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb446-54"><a href="#cb446-54" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb446-55"><a href="#cb446-55" aria-hidden="true"></a> },</span> -<span id="cb446-56"><a href="#cb446-56" aria-hidden="true"></a> dlItemEnd = {},</span> -<span id="cb446-57"><a href="#cb446-57" aria-hidden="true"></a> dlDefinitionEnd = {},</span> -<span id="cb446-58"><a href="#cb446-58" aria-hidden="true"></a> dlEnd = {.},</span> -<span id="cb446-59"><a href="#cb446-59" aria-hidden="true"></a> },</span> -<span id="cb446-60"><a href="#cb446-60" aria-hidden="true"></a>}</span> -<span id="cb446-61"><a href="#cb446-61" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb446-62"><a href="#cb446-62" aria-hidden="true"></a></span> -<span id="cb446-63"><a href="#cb446-63" aria-hidden="true"></a>Coffee</span> -<span id="cb446-64"><a href="#cb446-64" aria-hidden="true"></a></span> -<span id="cb446-65"><a href="#cb446-65" aria-hidden="true"></a>: black hot drink</span> -<span id="cb446-66"><a href="#cb446-66" aria-hidden="true"></a></span> -<span id="cb446-67"><a href="#cb446-67" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb446-68"><a href="#cb446-68" aria-hidden="true"></a></span> -<span id="cb446-69"><a href="#cb446-69" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb446-70"><a href="#cb446-70" aria-hidden="true"></a></span> -<span id="cb446-71"><a href="#cb446-71" aria-hidden="true"></a>Milk</span> -<span id="cb446-72"><a href="#cb446-72" aria-hidden="true"></a></span> -<span id="cb446-73"><a href="#cb446-73" aria-hidden="true"></a>: white cold drink</span> -<span id="cb446-74"><a href="#cb446-74" aria-hidden="true"></a></span> -<span id="cb446-75"><a href="#cb446-75" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb446-76"><a href="#cb446-76" aria-hidden="true"></a></span> -<span id="cb446-77"><a href="#cb446-77" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb446-78"><a href="#cb446-78" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb446-79"><a href="#cb446-79" aria-hidden="true"></a></span> -<span id="cb446-80"><a href="#cb446-80" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb447"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb447-1"><a href="#cb447-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>This is a loose definition list. Coffee is a black hot drink, +prepared from roasted coffee beans, and one of the most traded +agricultural commodities in the world. Milk is a white cold drink, +nutrient-rich, and produced on an industrial scale.</p> +</blockquote> +<h5 class="unnumbered" id="latex-example-56"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb450"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb450-1"><a href="#cb450-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb450-2"><a href="#cb450-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</span> +<span id="cb450-3"><a href="#cb450-3" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb450-4"><a href="#cb450-4" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-5"><a href="#cb450-5" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb450-6"><a href="#cb450-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb450-7"><a href="#cb450-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb450-8"><a href="#cb450-8" aria-hidden="true" tabindex="-1"></a> :<span class="co">%</span></span> +<span id="cb450-9"><a href="#cb450-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb450-10"><a href="#cb450-10" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb450-11"><a href="#cb450-11" aria-hidden="true" tabindex="-1"></a> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</span> +<span id="cb450-12"><a href="#cb450-12" aria-hidden="true" tabindex="-1"></a> dlItem = {<span class="co">%</span></span> +<span id="cb450-13"><a href="#cb450-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\item</span>[#1]</span> +<span id="cb450-14"><a href="#cb450-14" aria-hidden="true" tabindex="-1"></a> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</span> +<span id="cb450-15"><a href="#cb450-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb450-16"><a href="#cb450-16" aria-hidden="true" tabindex="-1"></a> ,</span> +<span id="cb450-17"><a href="#cb450-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb450-18"><a href="#cb450-18" aria-hidden="true" tabindex="-1"></a> , and</span> +<span id="cb450-19"><a href="#cb450-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> +<span id="cb450-20"><a href="#cb450-20" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb450-21"><a href="#cb450-21" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb450-22"><a href="#cb450-22" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb450-23"><a href="#cb450-23" aria-hidden="true" tabindex="-1"></a> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> +<span id="cb450-24"><a href="#cb450-24" aria-hidden="true" tabindex="-1"></a> dlDefinitionBegin = <span class="fu">\item</span>,</span> +<span id="cb450-25"><a href="#cb450-25" aria-hidden="true" tabindex="-1"></a> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</span> +<span id="cb450-26"><a href="#cb450-26" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb450-27"><a href="#cb450-27" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb450-28"><a href="#cb450-28" aria-hidden="true" tabindex="-1"></a>This is a tight definition list</span> +<span id="cb450-29"><a href="#cb450-29" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-30"><a href="#cb450-30" aria-hidden="true" tabindex="-1"></a>Coffee</span> +<span id="cb450-31"><a href="#cb450-31" aria-hidden="true" tabindex="-1"></a>: black hot drink</span> +<span id="cb450-32"><a href="#cb450-32" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span> +<span id="cb450-33"><a href="#cb450-33" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb450-34"><a href="#cb450-34" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-35"><a href="#cb450-35" aria-hidden="true" tabindex="-1"></a>Milk</span> +<span id="cb450-36"><a href="#cb450-36" aria-hidden="true" tabindex="-1"></a>: white cold drink</span> +<span id="cb450-37"><a href="#cb450-37" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span> +<span id="cb450-38"><a href="#cb450-38" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span> +<span id="cb450-39"><a href="#cb450-39" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb450-40"><a href="#cb450-40" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-41"><a href="#cb450-41" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb450-42"><a href="#cb450-42" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb450-43"><a href="#cb450-43" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb450-44"><a href="#cb450-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb450-45"><a href="#cb450-45" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb450-46"><a href="#cb450-46" aria-hidden="true" tabindex="-1"></a> dlBegin = {},</span> +<span id="cb450-47"><a href="#cb450-47" aria-hidden="true" tabindex="-1"></a> dlItem = {<span class="co">%</span></span> +<span id="cb450-48"><a href="#cb450-48" aria-hidden="true" tabindex="-1"></a> . #1 is a</span> +<span id="cb450-49"><a href="#cb450-49" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb450-50"><a href="#cb450-50" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb450-51"><a href="#cb450-51" aria-hidden="true" tabindex="-1"></a> ,</span> +<span id="cb450-52"><a href="#cb450-52" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> +<span id="cb450-53"><a href="#cb450-53" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb450-54"><a href="#cb450-54" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb450-55"><a href="#cb450-55" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb450-56"><a href="#cb450-56" aria-hidden="true" tabindex="-1"></a> dlItemEnd = {},</span> +<span id="cb450-57"><a href="#cb450-57" aria-hidden="true" tabindex="-1"></a> dlDefinitionEnd = {},</span> +<span id="cb450-58"><a href="#cb450-58" aria-hidden="true" tabindex="-1"></a> dlEnd = {.},</span> +<span id="cb450-59"><a href="#cb450-59" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb450-60"><a href="#cb450-60" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb450-61"><a href="#cb450-61" aria-hidden="true" tabindex="-1"></a>This is a loose definition list</span> +<span id="cb450-62"><a href="#cb450-62" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-63"><a href="#cb450-63" aria-hidden="true" tabindex="-1"></a>Coffee</span> +<span id="cb450-64"><a href="#cb450-64" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-65"><a href="#cb450-65" aria-hidden="true" tabindex="-1"></a>: black hot drink</span> +<span id="cb450-66"><a href="#cb450-66" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-67"><a href="#cb450-67" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span> +<span id="cb450-68"><a href="#cb450-68" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-69"><a href="#cb450-69" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb450-70"><a href="#cb450-70" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-71"><a href="#cb450-71" aria-hidden="true" tabindex="-1"></a>Milk</span> +<span id="cb450-72"><a href="#cb450-72" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-73"><a href="#cb450-73" aria-hidden="true" tabindex="-1"></a>: white cold drink</span> +<span id="cb450-74"><a href="#cb450-74" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-75"><a href="#cb450-75" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span> +<span id="cb450-76"><a href="#cb450-76" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-77"><a href="#cb450-77" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span> +<span id="cb450-78"><a href="#cb450-78" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb450-79"><a href="#cb450-79" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb450-80"><a href="#cb450-80" 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="cb451"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb451-1"><a href="#cb451-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 text:</p> <blockquote> <p>This is a tight definition list:</p> <p><strong>Coffee</strong></p> @@ -5831,93 +8137,101 @@ Thomas,Edison,1847</code></pre> <li>nutrient-rich, and</li> <li>produced on an industrial scale.</li> </ul> -<p>This is a loose definition list. Coffee is a black hot drink, prepared from roasted coffee beans, and one of the most traded agricultural commodities in the world. Milk is a white cold drink, nutrient-rich, and produced on an industrial scale.</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="context-example-42">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb448"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb448-1"><a href="#cb448-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb448-2"><a href="#cb448-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span></span> -<span id="cb448-3"><a href="#cb448-3" aria-hidden="true"></a> [</span> -<span id="cb448-4"><a href="#cb448-4" aria-hidden="true"></a> definitionLists = yes,</span> -<span id="cb448-5"><a href="#cb448-5" aria-hidden="true"></a> tightLists = yes,</span> -<span id="cb448-6"><a href="#cb448-6" aria-hidden="true"></a> ]</span> -<span id="cb448-7"><a href="#cb448-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb448-8"><a href="#cb448-8" aria-hidden="true"></a></span> -<span id="cb448-9"><a href="#cb448-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb448-10"><a href="#cb448-10" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb448-11"><a href="#cb448-11" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb448-12"><a href="#cb448-12" aria-hidden="true"></a>}</span> -<span id="cb448-13"><a href="#cb448-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{}</span> -<span id="cb448-14"><a href="#cb448-14" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb448-15"><a href="#cb448-15" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> -<span id="cb448-16"><a href="#cb448-16" aria-hidden="true"></a> <span class="fu">\startitemize</span></span> -<span id="cb448-17"><a href="#cb448-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb448-18"><a href="#cb448-18" aria-hidden="true"></a> ,</span> -<span id="cb448-19"><a href="#cb448-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb448-20"><a href="#cb448-20" aria-hidden="true"></a> , and</span> -<span id="cb448-21"><a href="#cb448-21" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb448-22"><a href="#cb448-22" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb448-23"><a href="#cb448-23" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb448-24"><a href="#cb448-24" aria-hidden="true"></a>}</span> -<span id="cb448-25"><a href="#cb448-25" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb448-26"><a href="#cb448-26" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\item</span>}</span> -<span id="cb448-27"><a href="#cb448-27" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{}</span> -<span id="cb448-28"><a href="#cb448-28" aria-hidden="true"></a></span> -<span id="cb448-29"><a href="#cb448-29" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb448-30"><a href="#cb448-30" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb448-31"><a href="#cb448-31" aria-hidden="true"></a></span> -<span id="cb448-32"><a href="#cb448-32" aria-hidden="true"></a>Coffee</span> -<span id="cb448-33"><a href="#cb448-33" aria-hidden="true"></a>: black hot drink</span> -<span id="cb448-34"><a href="#cb448-34" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb448-35"><a href="#cb448-35" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb448-36"><a href="#cb448-36" aria-hidden="true"></a></span> -<span id="cb448-37"><a href="#cb448-37" aria-hidden="true"></a>Milk</span> -<span id="cb448-38"><a href="#cb448-38" aria-hidden="true"></a>: white cold drink</span> -<span id="cb448-39"><a href="#cb448-39" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb448-40"><a href="#cb448-40" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb448-41"><a href="#cb448-41" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb448-42"><a href="#cb448-42" aria-hidden="true"></a></span> -<span id="cb448-43"><a href="#cb448-43" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb448-44"><a href="#cb448-44" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb448-45"><a href="#cb448-45" aria-hidden="true"></a>}</span> -<span id="cb448-46"><a href="#cb448-46" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> -<span id="cb448-47"><a href="#cb448-47" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb448-48"><a href="#cb448-48" aria-hidden="true"></a> . #1 is a</span> -<span id="cb448-49"><a href="#cb448-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb448-50"><a href="#cb448-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb448-51"><a href="#cb448-51" aria-hidden="true"></a> ,</span> -<span id="cb448-52"><a href="#cb448-52" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb448-53"><a href="#cb448-53" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb448-54"><a href="#cb448-54" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb448-55"><a href="#cb448-55" aria-hidden="true"></a>}</span> -<span id="cb448-56"><a href="#cb448-56" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb448-57"><a href="#cb448-57" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> -<span id="cb448-58"><a href="#cb448-58" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> -<span id="cb448-59"><a href="#cb448-59" aria-hidden="true"></a></span> -<span id="cb448-60"><a href="#cb448-60" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb448-61"><a href="#cb448-61" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb448-62"><a href="#cb448-62" aria-hidden="true"></a></span> -<span id="cb448-63"><a href="#cb448-63" aria-hidden="true"></a>Coffee</span> -<span id="cb448-64"><a href="#cb448-64" aria-hidden="true"></a></span> -<span id="cb448-65"><a href="#cb448-65" aria-hidden="true"></a>: black hot drink</span> -<span id="cb448-66"><a href="#cb448-66" aria-hidden="true"></a></span> -<span id="cb448-67"><a href="#cb448-67" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb448-68"><a href="#cb448-68" aria-hidden="true"></a></span> -<span id="cb448-69"><a href="#cb448-69" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb448-70"><a href="#cb448-70" aria-hidden="true"></a></span> -<span id="cb448-71"><a href="#cb448-71" aria-hidden="true"></a>Milk</span> -<span id="cb448-72"><a href="#cb448-72" aria-hidden="true"></a></span> -<span id="cb448-73"><a href="#cb448-73" aria-hidden="true"></a>: white cold drink</span> -<span id="cb448-74"><a href="#cb448-74" aria-hidden="true"></a></span> -<span id="cb448-75"><a href="#cb448-75" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb448-76"><a href="#cb448-76" aria-hidden="true"></a></span> -<span id="cb448-77"><a href="#cb448-77" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb448-78"><a href="#cb448-78" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb448-79"><a href="#cb448-79" aria-hidden="true"></a></span> -<span id="cb448-80"><a href="#cb448-80" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb449"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb449-1"><a href="#cb449-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>This is a loose definition list. Coffee is a black hot drink, +prepared from roasted coffee beans, and one of the most traded +agricultural commodities in the world. Milk is a white cold drink, +nutrient-rich, and produced on an industrial scale.</p> +</blockquote> +<h5 class="unnumbered" id="context-example-42">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb452"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb452-1"><a href="#cb452-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb452-2"><a href="#cb452-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span></span> +<span id="cb452-3"><a href="#cb452-3" aria-hidden="true" tabindex="-1"></a> [</span> +<span id="cb452-4"><a href="#cb452-4" aria-hidden="true" tabindex="-1"></a> definitionLists = yes,</span> +<span id="cb452-5"><a href="#cb452-5" aria-hidden="true" tabindex="-1"></a> tightLists = yes,</span> +<span id="cb452-6"><a href="#cb452-6" aria-hidden="true" tabindex="-1"></a> ]</span> +<span id="cb452-7"><a href="#cb452-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb452-8"><a href="#cb452-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-9"><a href="#cb452-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb452-10"><a href="#cb452-10" aria-hidden="true" tabindex="-1"></a> :<span class="co">%</span></span> +<span id="cb452-11"><a href="#cb452-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb452-12"><a href="#cb452-12" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb452-13"><a href="#cb452-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{}</span> +<span id="cb452-14"><a href="#cb452-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb452-15"><a href="#cb452-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> +<span id="cb452-16"><a href="#cb452-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\startitemize</span></span> +<span id="cb452-17"><a href="#cb452-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb452-18"><a href="#cb452-18" aria-hidden="true" tabindex="-1"></a> ,</span> +<span id="cb452-19"><a href="#cb452-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb452-20"><a href="#cb452-20" aria-hidden="true" tabindex="-1"></a> , and</span> +<span id="cb452-21"><a href="#cb452-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> +<span id="cb452-22"><a href="#cb452-22" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb452-23"><a href="#cb452-23" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb452-24"><a href="#cb452-24" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb452-25"><a href="#cb452-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{<span class="fu">\stopitemize</span>}</span> +<span id="cb452-26"><a href="#cb452-26" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\item</span>}</span> +<span id="cb452-27"><a href="#cb452-27" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEndTight</span>{}</span> +<span id="cb452-28"><a href="#cb452-28" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-29"><a href="#cb452-29" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb452-30"><a href="#cb452-30" aria-hidden="true" tabindex="-1"></a>This is a tight definition list</span> +<span id="cb452-31"><a href="#cb452-31" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-32"><a href="#cb452-32" aria-hidden="true" tabindex="-1"></a>Coffee</span> +<span id="cb452-33"><a href="#cb452-33" aria-hidden="true" tabindex="-1"></a>: black hot drink</span> +<span id="cb452-34"><a href="#cb452-34" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span> +<span id="cb452-35"><a href="#cb452-35" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb452-36"><a href="#cb452-36" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-37"><a href="#cb452-37" aria-hidden="true" tabindex="-1"></a>Milk</span> +<span id="cb452-38"><a href="#cb452-38" aria-hidden="true" tabindex="-1"></a>: white cold drink</span> +<span id="cb452-39"><a href="#cb452-39" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span> +<span id="cb452-40"><a href="#cb452-40" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span> +<span id="cb452-41"><a href="#cb452-41" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb452-42"><a href="#cb452-42" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-43"><a href="#cb452-43" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb452-44"><a href="#cb452-44" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb452-45"><a href="#cb452-45" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb452-46"><a href="#cb452-46" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> +<span id="cb452-47"><a href="#cb452-47" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb452-48"><a href="#cb452-48" aria-hidden="true" tabindex="-1"></a> . #1 is a</span> +<span id="cb452-49"><a href="#cb452-49" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb452-50"><a href="#cb452-50" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb452-51"><a href="#cb452-51" aria-hidden="true" tabindex="-1"></a> ,</span> +<span id="cb452-52"><a href="#cb452-52" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> +<span id="cb452-53"><a href="#cb452-53" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb452-54"><a href="#cb452-54" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb452-55"><a href="#cb452-55" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb452-56"><a href="#cb452-56" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> +<span id="cb452-57"><a href="#cb452-57" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> +<span id="cb452-58"><a href="#cb452-58" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> +<span id="cb452-59"><a href="#cb452-59" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-60"><a href="#cb452-60" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb452-61"><a href="#cb452-61" aria-hidden="true" tabindex="-1"></a>This is a loose definition list</span> +<span id="cb452-62"><a href="#cb452-62" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-63"><a href="#cb452-63" aria-hidden="true" tabindex="-1"></a>Coffee</span> +<span id="cb452-64"><a href="#cb452-64" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-65"><a href="#cb452-65" aria-hidden="true" tabindex="-1"></a>: black hot drink</span> +<span id="cb452-66"><a href="#cb452-66" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-67"><a href="#cb452-67" aria-hidden="true" tabindex="-1"></a>: prepared from roasted coffee beans</span> +<span id="cb452-68"><a href="#cb452-68" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-69"><a href="#cb452-69" aria-hidden="true" tabindex="-1"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb452-70"><a href="#cb452-70" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-71"><a href="#cb452-71" aria-hidden="true" tabindex="-1"></a>Milk</span> +<span id="cb452-72"><a href="#cb452-72" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-73"><a href="#cb452-73" aria-hidden="true" tabindex="-1"></a>: white cold drink</span> +<span id="cb452-74"><a href="#cb452-74" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-75"><a href="#cb452-75" aria-hidden="true" tabindex="-1"></a>: nutrient-rich</span> +<span id="cb452-76"><a href="#cb452-76" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-77"><a href="#cb452-77" aria-hidden="true" tabindex="-1"></a>: produced on an industrial scale</span> +<span id="cb452-78"><a href="#cb452-78" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb452-79"><a href="#cb452-79" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb452-80"><a href="#cb452-80" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb453"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb453-1"><a href="#cb453-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>This is a tight definition list:</p> <p><strong>Coffee</strong></p> @@ -5932,825 +8246,1135 @@ Thomas,Edison,1847</code></pre> <li>nutrient-rich, and</li> <li>produced on an industrial scale.</li> </ul> -<p>This is a loose definition list. Coffee is a black hot drink, prepared from roasted coffee beans, and one of the most traded agricultural commodities in the world. Milk is a white cold drink, nutrient-rich, and produced on an industrial scale.</p> -</blockquote> -<h4 data-number="2.3.1.15" id="emphasis-renderers"><span class="header-section-number">2.3.1.15</span> Emphasis Renderers</h4> -<p>The <code>\markdownRendererEmphasis</code> macro represents an emphasized span of text. The macro receives a single argument that corresponds to the emphasized span of text.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-28">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb450"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb450-1"><a href="#cb450-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb450-2"><a href="#cb450-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{{<span class="fu">\it</span>#1}}</span> -<span id="cb450-3"><a href="#cb450-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{{<span class="fu">\bf</span>#1}}</span> -<span id="cb450-4"><a href="#cb450-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb450-5"><a href="#cb450-5" aria-hidden="true"></a>This is *emphasis*.</span> -<span id="cb450-6"><a href="#cb450-6" aria-hidden="true"></a></span> -<span id="cb450-7"><a href="#cb450-7" aria-hidden="true"></a>This is **strong emphasis**.</span> -<span id="cb450-8"><a href="#cb450-8" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb450-9"><a href="#cb450-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb451"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb451-1"><a href="#cb451-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>This is a loose definition list. Coffee is a black hot drink, +prepared from roasted coffee beans, and one of the most traded +agricultural commodities in the world. Milk is a white cold drink, +nutrient-rich, and produced on an industrial scale.</p> +</blockquote> +<h4 data-number="2.3.1.15" id="emphasis-renderers"><span +class="header-section-number">2.3.1.15</span> Emphasis Renderers</h4> +<p>The <code>\markdownRendererEmphasis</code> macro represents an +emphasized span of text. The macro receives a single argument that +corresponds to the emphasized span of text.</p> +<h5 class="unnumbered" id="plain-tex-example-28">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb454"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb454-1"><a href="#cb454-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb454-2"><a href="#cb454-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{{<span class="fu">\it</span>#1}}</span> +<span id="cb454-3"><a href="#cb454-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{{<span class="fu">\bf</span>#1}}</span> +<span id="cb454-4"><a href="#cb454-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb454-5"><a href="#cb454-5" aria-hidden="true" tabindex="-1"></a>This is *emphasis*.</span> +<span id="cb454-6"><a href="#cb454-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb454-7"><a href="#cb454-7" aria-hidden="true" tabindex="-1"></a>This is **strong emphasis**.</span> +<span id="cb454-8"><a href="#cb454-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb454-9"><a href="#cb454-9" 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="cb455"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb455-1"><a href="#cb455-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:</p> <blockquote> <p>This is <em>emphasis</em>.</p> <p>This is <strong>strong emphasis</strong>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-56"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb452"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb452-1"><a href="#cb452-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb452-2"><a href="#cb452-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb452-3"><a href="#cb452-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb452-4"><a href="#cb452-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb452-5"><a href="#cb452-5" aria-hidden="true"></a> emphasis = {<span class="fu">\emph</span>{#1}},</span> -<span id="cb452-6"><a href="#cb452-6" aria-hidden="true"></a> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</span> -<span id="cb452-7"><a href="#cb452-7" aria-hidden="true"></a> },</span> -<span id="cb452-8"><a href="#cb452-8" aria-hidden="true"></a>}</span> -<span id="cb452-9"><a href="#cb452-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb452-10"><a href="#cb452-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb452-11"><a href="#cb452-11" aria-hidden="true"></a>This is *emphasis*.</span> -<span id="cb452-12"><a href="#cb452-12" aria-hidden="true"></a></span> -<span id="cb452-13"><a href="#cb452-13" aria-hidden="true"></a>This is **strong emphasis**.</span> -<span id="cb452-14"><a href="#cb452-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb452-15"><a href="#cb452-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb453"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb453-1"><a href="#cb453-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-57"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb456"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb456-1"><a href="#cb456-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb456-2"><a href="#cb456-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb456-3"><a href="#cb456-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb456-4"><a href="#cb456-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb456-5"><a href="#cb456-5" aria-hidden="true" tabindex="-1"></a> emphasis = {<span class="fu">\emph</span>{#1}},</span> +<span id="cb456-6"><a href="#cb456-6" aria-hidden="true" tabindex="-1"></a> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</span> +<span id="cb456-7"><a href="#cb456-7" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb456-8"><a href="#cb456-8" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb456-9"><a href="#cb456-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb456-10"><a href="#cb456-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb456-11"><a href="#cb456-11" aria-hidden="true" tabindex="-1"></a>This is *emphasis*.</span> +<span id="cb456-12"><a href="#cb456-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb456-13"><a href="#cb456-13" aria-hidden="true" tabindex="-1"></a>This is **strong emphasis**.</span> +<span id="cb456-14"><a href="#cb456-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb456-15"><a href="#cb456-15" 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="cb457"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb457-1"><a href="#cb457-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 text:</p> <blockquote> <p>This is <em>emphasis</em>.</p> <p>This is <strong>strong emphasis</strong>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-43">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb454"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb454-1"><a href="#cb454-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb454-2"><a href="#cb454-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{<span class="fu">\emph</span>{#1}}</span> -<span id="cb454-3"><a href="#cb454-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{<span class="fu">\bold</span>{#1}}</span> -<span id="cb454-4"><a href="#cb454-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb454-5"><a href="#cb454-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb454-6"><a href="#cb454-6" aria-hidden="true"></a>This is *emphasis*.</span> -<span id="cb454-7"><a href="#cb454-7" aria-hidden="true"></a></span> -<span id="cb454-8"><a href="#cb454-8" aria-hidden="true"></a>This is **strong emphasis**.</span> -<span id="cb454-9"><a href="#cb454-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb454-10"><a href="#cb454-10" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb455"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb455-1"><a href="#cb455-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-43">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb458"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb458-1"><a href="#cb458-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb458-2"><a href="#cb458-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{<span class="fu">\emph</span>{#1}}</span> +<span id="cb458-3"><a href="#cb458-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{<span class="fu">\bold</span>{#1}}</span> +<span id="cb458-4"><a href="#cb458-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb458-5"><a href="#cb458-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb458-6"><a href="#cb458-6" aria-hidden="true" tabindex="-1"></a>This is *emphasis*.</span> +<span id="cb458-7"><a href="#cb458-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb458-8"><a href="#cb458-8" aria-hidden="true" tabindex="-1"></a>This is **strong emphasis**.</span> +<span id="cb458-9"><a href="#cb458-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb458-10"><a href="#cb458-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb459"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb459-1"><a href="#cb459-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>This is <em>emphasis</em>.</p> <p>This is <strong>strong emphasis</strong>.</p> </blockquote> -<p>The <code>\markdownRendererStrongEmphasis</code> macro represents a strongly emphasized span of text. The macro receives a single argument that corresponds to the emphasized span of text.</p> -<h4 data-number="2.3.1.16" id="block-quote-renderers"><span class="header-section-number">2.3.1.16</span> Block Quote Renderers</h4> -<p>The <code>\markdownRendererBlockQuoteBegin</code> macro represents the beginning of a block quote. The macro receives no arguments.</p> -<p>The <code>\markdownRendererBlockQuoteEnd</code> macro represents the end of a block quote. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-29">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb456"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb456-1"><a href="#cb456-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb456-2"><a href="#cb456-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="co">%</span></span> -<span id="cb456-3"><a href="#cb456-3" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb456-4"><a href="#cb456-4" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> -<span id="cb456-5"><a href="#cb456-5" aria-hidden="true"></a> <span class="fu">\leftskip</span>=2<span class="fu">\parindent</span></span> -<span id="cb456-6"><a href="#cb456-6" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</span> -<span id="cb456-7"><a href="#cb456-7" aria-hidden="true"></a>}</span> -<span id="cb456-8"><a href="#cb456-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="co">%</span></span> -<span id="cb456-9"><a href="#cb456-9" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb456-10"><a href="#cb456-10" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> -<span id="cb456-11"><a href="#cb456-11" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> -<span id="cb456-12"><a href="#cb456-12" aria-hidden="true"></a>}</span> -<span id="cb456-13"><a href="#cb456-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb456-14"><a href="#cb456-14" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb456-15"><a href="#cb456-15" aria-hidden="true"></a></span> -<span id="cb456-16"><a href="#cb456-16" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb456-17"><a href="#cb456-17" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb456-18"><a href="#cb456-18" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb456-19"><a href="#cb456-19" aria-hidden="true"></a>> stars [...]</span> -<span id="cb456-20"><a href="#cb456-20" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb456-21"><a href="#cb456-21" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb457"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb457-1"><a href="#cb457-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>The <code>\markdownRendererStrongEmphasis</code> macro represents a +strongly emphasized span of text. The macro receives a single argument +that corresponds to the emphasized span of text.</p> +<h4 data-number="2.3.1.16" id="block-quote-renderers"><span +class="header-section-number">2.3.1.16</span> Block Quote Renderers</h4> +<p>The <code>\markdownRendererBlockQuoteBegin</code> macro represents +the beginning of a block quote. The macro receives no arguments.</p> +<p>The <code>\markdownRendererBlockQuoteEnd</code> macro represents the +end of a block quote. The macro receives no arguments.</p> +<h5 class="unnumbered" id="plain-tex-example-29">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb460"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb460-1"><a href="#cb460-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb460-2"><a href="#cb460-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="co">%</span></span> +<span id="cb460-3"><a href="#cb460-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">\begingroup</span></span> +<span id="cb460-4"><a href="#cb460-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">\vskip\parindent</span></span> +<span id="cb460-5"><a href="#cb460-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">\leftskip</span>=2<span class="fu">\parindent</span></span> +<span id="cb460-6"><a href="#cb460-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\parindent</span>=0pt</span> +<span id="cb460-7"><a href="#cb460-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb460-8"><a href="#cb460-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="co">%</span></span> +<span id="cb460-9"><a href="#cb460-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb460-10"><a href="#cb460-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\vskip\parindent</span></span> +<span id="cb460-11"><a href="#cb460-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\endgroup</span></span> +<span id="cb460-12"><a href="#cb460-12" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb460-13"><a href="#cb460-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb460-14"><a href="#cb460-14" aria-hidden="true" tabindex="-1"></a>A quote from William Shakespeare's King Lear:</span> +<span id="cb460-15"><a href="#cb460-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb460-16"><a href="#cb460-16" aria-hidden="true" tabindex="-1"></a>> This is the excellent foppery of the world that when we are</span> +<span id="cb460-17"><a href="#cb460-17" aria-hidden="true" tabindex="-1"></a>> sick in fortune---often the surfeit of our own behavior---we</span> +<span id="cb460-18"><a href="#cb460-18" aria-hidden="true" tabindex="-1"></a>> make guilty of our disasters the sun, the moon, and the</span> +<span id="cb460-19"><a href="#cb460-19" aria-hidden="true" tabindex="-1"></a>> stars [...]</span> +<span id="cb460-20"><a href="#cb460-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb460-21"><a href="#cb460-21" 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="cb461"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb461-1"><a href="#cb461-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:</p> <blockquote> <p>A quote from William Shakespeare’s King Lear:</p> <blockquote> -<p>This is the excellent foppery of the world that when we are sick in fortune—often the surfeit of our own behavior—we make guilty of our disasters the sun, the moon, and the stars […]</p> -</blockquote> -</blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-57"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb458"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb458-1"><a href="#cb458-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb458-2"><a href="#cb458-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb458-3"><a href="#cb458-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb458-4"><a href="#cb458-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb458-5"><a href="#cb458-5" aria-hidden="true"></a> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span> -<span id="cb458-6"><a href="#cb458-6" aria-hidden="true"></a> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span> -<span id="cb458-7"><a href="#cb458-7" aria-hidden="true"></a> },</span> -<span id="cb458-8"><a href="#cb458-8" aria-hidden="true"></a>}</span> -<span id="cb458-9"><a href="#cb458-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb458-10"><a href="#cb458-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb458-11"><a href="#cb458-11" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb458-12"><a href="#cb458-12" aria-hidden="true"></a></span> -<span id="cb458-13"><a href="#cb458-13" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb458-14"><a href="#cb458-14" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb458-15"><a href="#cb458-15" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb458-16"><a href="#cb458-16" aria-hidden="true"></a>> stars [...]</span> -<span id="cb458-17"><a href="#cb458-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb458-18"><a href="#cb458-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb459"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb459-1"><a href="#cb459-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>This is the excellent foppery of the world that when we are sick in +fortune—often the surfeit of our own behavior—we make guilty of our +disasters the sun, the moon, and the stars […]</p> +</blockquote> +</blockquote> +<h5 class="unnumbered" id="latex-example-58"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb462"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb462-1"><a href="#cb462-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb462-2"><a href="#cb462-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb462-3"><a href="#cb462-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb462-4"><a href="#cb462-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb462-5"><a href="#cb462-5" aria-hidden="true" tabindex="-1"></a> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span> +<span id="cb462-6"><a href="#cb462-6" aria-hidden="true" tabindex="-1"></a> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span> +<span id="cb462-7"><a href="#cb462-7" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb462-8"><a href="#cb462-8" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb462-9"><a href="#cb462-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb462-10"><a href="#cb462-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb462-11"><a href="#cb462-11" aria-hidden="true" tabindex="-1"></a>A quote from William Shakespeare's King Lear:</span> +<span id="cb462-12"><a href="#cb462-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb462-13"><a href="#cb462-13" aria-hidden="true" tabindex="-1"></a>> This is the excellent foppery of the world that when we are</span> +<span id="cb462-14"><a href="#cb462-14" aria-hidden="true" tabindex="-1"></a>> sick in fortune---often the surfeit of our own behavior---we</span> +<span id="cb462-15"><a href="#cb462-15" aria-hidden="true" tabindex="-1"></a>> make guilty of our disasters the sun, the moon, and the</span> +<span id="cb462-16"><a href="#cb462-16" aria-hidden="true" tabindex="-1"></a>> stars [...]</span> +<span id="cb462-17"><a href="#cb462-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb462-18"><a href="#cb462-18" 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="cb463"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb463-1"><a href="#cb463-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 text:</p> <blockquote> <p>A quote from William Shakespeare’s King Lear:</p> <blockquote> -<p>This is the excellent foppery of the world that when we are sick in fortune—often the surfeit of our own behavior—we make guilty of our disasters the sun, the moon, and the stars […]</p> -</blockquote> -</blockquote> -<h5 class="unnumbered" data-number="" id="context-example-44">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb460"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb460-1"><a href="#cb460-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb460-2"><a href="#cb460-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="fu">\startquotation</span>}</span> -<span id="cb460-3"><a href="#cb460-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="fu">\stopquotation</span>}</span> -<span id="cb460-4"><a href="#cb460-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb460-5"><a href="#cb460-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb460-6"><a href="#cb460-6" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb460-7"><a href="#cb460-7" aria-hidden="true"></a></span> -<span id="cb460-8"><a href="#cb460-8" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb460-9"><a href="#cb460-9" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb460-10"><a href="#cb460-10" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb460-11"><a href="#cb460-11" aria-hidden="true"></a>> stars [...]</span> -<span id="cb460-12"><a href="#cb460-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb460-13"><a href="#cb460-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb461"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb461-1"><a href="#cb461-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>This is the excellent foppery of the world that when we are sick in +fortune—often the surfeit of our own behavior—we make guilty of our +disasters the sun, the moon, and the stars […]</p> +</blockquote> +</blockquote> +<h5 class="unnumbered" id="context-example-44">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb464"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb464-1"><a href="#cb464-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb464-2"><a href="#cb464-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="fu">\startquotation</span>}</span> +<span id="cb464-3"><a href="#cb464-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="fu">\stopquotation</span>}</span> +<span id="cb464-4"><a href="#cb464-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb464-5"><a href="#cb464-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb464-6"><a href="#cb464-6" aria-hidden="true" tabindex="-1"></a>A quote from William Shakespeare's King Lear:</span> +<span id="cb464-7"><a href="#cb464-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb464-8"><a href="#cb464-8" aria-hidden="true" tabindex="-1"></a>> This is the excellent foppery of the world that when we are</span> +<span id="cb464-9"><a href="#cb464-9" aria-hidden="true" tabindex="-1"></a>> sick in fortune---often the surfeit of our own behavior---we</span> +<span id="cb464-10"><a href="#cb464-10" aria-hidden="true" tabindex="-1"></a>> make guilty of our disasters the sun, the moon, and the</span> +<span id="cb464-11"><a href="#cb464-11" aria-hidden="true" tabindex="-1"></a>> stars [...]</span> +<span id="cb464-12"><a href="#cb464-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb464-13"><a href="#cb464-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb465"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb465-1"><a href="#cb465-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>A quote from William Shakespeare’s King Lear:</p> <blockquote> -<p>This is the excellent foppery of the world that when we are sick in fortune—often the surfeit of our own behavior—we make guilty of our disasters the sun, the moon, and the stars […]</p> -</blockquote> -</blockquote> -<h4 data-number="2.3.1.17" id="code-block-renderers"><span class="header-section-number">2.3.1.17</span> Code Block Renderers</h4> -<p>The <code>\markdownRendererInputVerbatim</code> macro represents a code block. The macro receives a single argument that corresponds to the filename of a file contaning the code block contents.</p> -<p>The <code>\markdownRendererInputFencedCode</code> macro represents a fenced code block. This macro will only be produced, when the <strong><code>fencedCode</code></strong> option is enabled. The macro receives two arguments that correspond to the filename of a file contaning the code block contents and to the code fence infostring.</p> -<h5 class="unnumbered" data-number="" id="latex-example-58"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb462"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb462-1"><a href="#cb462-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb462-2"><a href="#cb462-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span> -<span id="cb462-3"><a href="#cb462-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</span> -<span id="cb462-4"><a href="#cb462-4" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> -<span id="cb462-5"><a href="#cb462-5" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb462-6"><a href="#cb462-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb462-7"><a href="#cb462-7" aria-hidden="true"></a> interblockSeparator = {</span> -<span id="cb462-8"><a href="#cb462-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb462-9"><a href="#cb462-9" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb462-10"><a href="#cb462-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb462-11"><a href="#cb462-11" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb462-12"><a href="#cb462-12" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb462-13"><a href="#cb462-13" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb462-14"><a href="#cb462-14" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb462-15"><a href="#cb462-15" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb462-16"><a href="#cb462-16" aria-hidden="true"></a> },</span> -<span id="cb462-17"><a href="#cb462-17" aria-hidden="true"></a> inputVerbatim = {</span> -<span id="cb462-18"><a href="#cb462-18" aria-hidden="true"></a> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></span> -<span id="cb462-19"><a href="#cb462-19" aria-hidden="true"></a> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></span> -<span id="cb462-20"><a href="#cb462-20" aria-hidden="true"></a> },</span> -<span id="cb462-21"><a href="#cb462-21" aria-hidden="true"></a> inputFencedCode = {</span> -<span id="cb462-22"><a href="#cb462-22" aria-hidden="true"></a> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></span> -<span id="cb462-23"><a href="#cb462-23" aria-hidden="true"></a> },</span> -<span id="cb462-24"><a href="#cb462-24" aria-hidden="true"></a> },</span> -<span id="cb462-25"><a href="#cb462-25" aria-hidden="true"></a>}</span> -<span id="cb462-26"><a href="#cb462-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb462-27"><a href="#cb462-27" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb462-28"><a href="#cb462-28" aria-hidden="true"></a>The following code</span> -<span id="cb462-29"><a href="#cb462-29" aria-hidden="true"></a></span> -<span id="cb462-30"><a href="#cb462-30" aria-hidden="true"></a> def foo(bar):</span> -<span id="cb462-31"><a href="#cb462-31" aria-hidden="true"></a> if len(bar) <= 1:</span> -<span id="cb462-32"><a href="#cb462-32" aria-hidden="true"></a> return bar[0]</span> -<span id="cb462-33"><a href="#cb462-33" aria-hidden="true"></a> elif len(bar) == 2:</span> -<span id="cb462-34"><a href="#cb462-34" aria-hidden="true"></a> return sorted(bar)</span> -<span id="cb462-35"><a href="#cb462-35" aria-hidden="true"></a> else:</span> -<span id="cb462-36"><a href="#cb462-36" aria-hidden="true"></a> baz = len(bar) // 2</span> -<span id="cb462-37"><a href="#cb462-37" aria-hidden="true"></a> return foo(bar[baz:], bar[:baz])</span> -<span id="cb462-38"><a href="#cb462-38" aria-hidden="true"></a></span> -<span id="cb462-39"><a href="#cb462-39" aria-hidden="true"></a>The following code</span> -<span id="cb462-40"><a href="#cb462-40" aria-hidden="true"></a></span> -<span id="cb462-41"><a href="#cb462-41" aria-hidden="true"></a>~~~ Python</span> -<span id="cb462-42"><a href="#cb462-42" aria-hidden="true"></a>>>> foo([4, 2, 1, 3])</span> -<span id="cb462-43"><a href="#cb462-43" aria-hidden="true"></a>[1, 2, 3, 4]</span> -<span id="cb462-44"><a href="#cb462-44" aria-hidden="true"></a>~~~~~~~~~~</span> -<span id="cb462-45"><a href="#cb462-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb462-46"><a href="#cb462-46" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb463"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb463-1"><a href="#cb463-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text except for the filename, which may differ:</p> -<blockquote> -<p>The following code is contained in file <code>./_markdown_document/882453149edcf288976647f6fe147ada.verbatim</code>:</p> -<div class="sourceCode" id="cb464"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb464-1"><a href="#cb464-1" aria-hidden="true"></a><span class="kw">def</span> foo(bar):</span> -<span id="cb464-2"><a href="#cb464-2" aria-hidden="true"></a> <span class="cf">if</span> <span class="bu">len</span>(bar) <span class="op"><=</span> <span class="dv">1</span>:</span> -<span id="cb464-3"><a href="#cb464-3" aria-hidden="true"></a> <span class="cf">return</span> bar[:<span class="dv">1</span>]</span> -<span id="cb464-4"><a href="#cb464-4" aria-hidden="true"></a> <span class="cf">elif</span> <span class="bu">len</span>(bar) <span class="op">==</span> <span class="dv">2</span>:</span> -<span id="cb464-5"><a href="#cb464-5" aria-hidden="true"></a> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</span> -<span id="cb464-6"><a href="#cb464-6" aria-hidden="true"></a> <span class="cf">else</span>:</span> -<span id="cb464-7"><a href="#cb464-7" aria-hidden="true"></a> baz <span class="op">=</span> bar[<span class="bu">len</span>(bar) <span class="op">//</span> <span class="dv">2</span>]</span> -<span id="cb464-8"><a href="#cb464-8" aria-hidden="true"></a> <span class="cf">return</span> (</span> -<span id="cb464-9"><a href="#cb464-9" aria-hidden="true"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op"><</span> baz]) <span class="op">+</span> [baz] <span class="op">+</span></span> -<span id="cb464-10"><a href="#cb464-10" aria-hidden="true"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op">></span> baz])</span> -<span id="cb464-11"><a href="#cb464-11" aria-hidden="true"></a> )</span></code></pre></div> -<p>The following code in Python contained in file <code>./_markdown_document/cf2a96e2120cef5b1fae5fea36fcc27b.verbatim</code>:</p> -<div class="sourceCode" id="cb465"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb465-1"><a href="#cb465-1" aria-hidden="true"></a><span class="op">>>></span> foo([<span class="dv">4</span>, <span class="dv">2</span>, <span class="dv">1</span>, <span class="dv">3</span>])</span> -<span id="cb465-2"><a href="#cb465-2" aria-hidden="true"></a>[<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>]</span></code></pre></div> -</blockquote> -<h4 data-number="2.3.1.18" id="yamlmetadatarenderers"><span class="header-section-number">2.3.1.18</span> YAML Metadata Renderers</h4> -<p>The <code>\markdownRendererJekyllDataBegin</code> macro represents the beginning of a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererJekyllDataEnd</code> macro represents the end of a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererJekyllDataMappingBegin</code> macro represents the beginning of a mapping in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives two arguments: the scalar key in the parent structure, cast to a string following <abbr>yaml</abbr> serialization rules, and the number of items in the mapping.</p> -<p>The <code>\markdownRendererJekyllDataMappingEnd</code> macro represents the end of a mapping in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererJekyllDataSequenceBegin</code> macro represents the beginning of a sequence in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives two arguments: the scalar key in the parent structure, cast to a string following <abbr>yaml</abbr> serialization rules, and the number of items in the sequence.</p> -<p>The <code>\markdownRendererJekyllDataSequenceEnd</code> macro represents the end of a sequence in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives no arguments.</p> -<p>The <code>\markdownRendererJekyllDataBoolean</code> macro represents a boolean scalar value in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives two arguments: the scalar key in the parent structure, and the scalar value, both cast to a string following <abbr>yaml</abbr> serialization rules.</p> -<p>The <code>\markdownRendererJekyllDataNumber</code> macro represents a numeric scalar value in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives two arguments: the scalar key in the parent structure, and the scalar value, both cast to a string following <abbr>yaml</abbr> serialization rules.</p> -<p>The <code>\markdownRendererJekyllDataString</code> macro represents a string scalar value in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives two arguments: the scalar key in the parent structure, cast to a string following <abbr>yaml</abbr> serialization rules, and the scalar value.</p> -<p>The <code>\markdownRendererJekyllDataEmpty</code> macro represents an empty scalar value in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives one argument: the scalar key in the parent structure, cast to a string following <abbr>yaml</abbr> serialization rules.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-30">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb466"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb466-1"><a href="#cb466-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb466-2"><a href="#cb466-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> -<span id="cb466-3"><a href="#cb466-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> -<span id="cb466-4"><a href="#cb466-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> -<span id="cb466-5"><a href="#cb466-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb466-6"><a href="#cb466-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb466-7"><a href="#cb466-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb466-8"><a href="#cb466-8" aria-hidden="true"></a>---</span> -<span id="cb466-9"><a href="#cb466-9" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb466-10"><a href="#cb466-10" aria-hidden="true"></a>age: 99</span> -<span id="cb466-11"><a href="#cb466-11" aria-hidden="true"></a>---</span> -<span id="cb466-12"><a href="#cb466-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb466-13"><a href="#cb466-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb467"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb467-1"><a href="#cb467-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<p>This is the excellent foppery of the world that when we are sick in +fortune—often the surfeit of our own behavior—we make guilty of our +disasters the sun, the moon, and the stars […]</p> +</blockquote> +</blockquote> +<h4 data-number="2.3.1.17" id="code-block-renderers"><span +class="header-section-number">2.3.1.17</span> Code Block Renderers</h4> +<p>The <code>\markdownRendererInputVerbatim</code> macro represents a +code block. The macro receives a single argument that corresponds to the +filename of a file contaning the code block contents.</p> +<p>The <code>\markdownRendererInputFencedCode</code> macro represents a +fenced code block. This macro will only be produced, when the +<strong><code>fencedCode</code></strong> option is enabled. The macro +receives two arguments that correspond to the filename of a file +contaning the code block contents and to the code fence infostring.</p> +<h5 class="unnumbered" id="latex-example-59"><span +class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb466"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb466-1"><a href="#cb466-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb466-2"><a href="#cb466-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span> +<span id="cb466-3"><a href="#cb466-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</span> +<span id="cb466-4"><a href="#cb466-4" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> +<span id="cb466-5"><a href="#cb466-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb466-6"><a href="#cb466-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb466-7"><a href="#cb466-7" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {</span> +<span id="cb466-8"><a href="#cb466-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb466-9"><a href="#cb466-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb466-10"><a href="#cb466-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb466-11"><a href="#cb466-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb466-12"><a href="#cb466-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb466-13"><a href="#cb466-13" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb466-14"><a href="#cb466-14" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb466-15"><a href="#cb466-15" aria-hidden="true" tabindex="-1"></a> }<span class="co">%</span></span> +<span id="cb466-16"><a href="#cb466-16" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb466-17"><a href="#cb466-17" aria-hidden="true" tabindex="-1"></a> inputVerbatim = {</span> +<span id="cb466-18"><a href="#cb466-18" aria-hidden="true" tabindex="-1"></a> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></span> +<span id="cb466-19"><a href="#cb466-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></span> +<span id="cb466-20"><a href="#cb466-20" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb466-21"><a href="#cb466-21" aria-hidden="true" tabindex="-1"></a> inputFencedCode = {</span> +<span id="cb466-22"><a href="#cb466-22" aria-hidden="true" tabindex="-1"></a> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></span> +<span id="cb466-23"><a href="#cb466-23" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb466-24"><a href="#cb466-24" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb466-25"><a href="#cb466-25" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb466-26"><a href="#cb466-26" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb466-27"><a href="#cb466-27" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb466-28"><a href="#cb466-28" aria-hidden="true" tabindex="-1"></a>The following code</span> +<span id="cb466-29"><a href="#cb466-29" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb466-30"><a href="#cb466-30" aria-hidden="true" tabindex="-1"></a> def foo(bar):</span> +<span id="cb466-31"><a href="#cb466-31" aria-hidden="true" tabindex="-1"></a> if len(bar) <= 1:</span> +<span id="cb466-32"><a href="#cb466-32" aria-hidden="true" tabindex="-1"></a> return bar[0]</span> +<span id="cb466-33"><a href="#cb466-33" aria-hidden="true" tabindex="-1"></a> elif len(bar) == 2:</span> +<span id="cb466-34"><a href="#cb466-34" aria-hidden="true" tabindex="-1"></a> return sorted(bar)</span> +<span id="cb466-35"><a href="#cb466-35" aria-hidden="true" tabindex="-1"></a> else:</span> +<span id="cb466-36"><a href="#cb466-36" aria-hidden="true" tabindex="-1"></a> baz = len(bar) // 2</span> +<span id="cb466-37"><a href="#cb466-37" aria-hidden="true" tabindex="-1"></a> return foo(bar[baz:], bar[:baz])</span> +<span id="cb466-38"><a href="#cb466-38" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb466-39"><a href="#cb466-39" aria-hidden="true" tabindex="-1"></a>The following code</span> +<span id="cb466-40"><a href="#cb466-40" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb466-41"><a href="#cb466-41" aria-hidden="true" tabindex="-1"></a>~~~ Python</span> +<span id="cb466-42"><a href="#cb466-42" aria-hidden="true" tabindex="-1"></a>>>> foo([4, 2, 1, 3])</span> +<span id="cb466-43"><a href="#cb466-43" aria-hidden="true" tabindex="-1"></a>[1, 2, 3, 4]</span> +<span id="cb466-44"><a href="#cb466-44" aria-hidden="true" tabindex="-1"></a>~~~~~~~~~~</span> +<span id="cb466-45"><a href="#cb466-45" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb466-46"><a href="#cb466-46" 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="cb467"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb467-1"><a href="#cb467-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 text except for the filename, which may +differ:</p> +<blockquote> +<p>The following code is contained in file +<code>./_markdown_document/882453149edcf288976647f6fe147ada.verbatim</code>:</p> +<div class="sourceCode" id="cb468"><pre +class="sourceCode py"><code class="sourceCode python"><span id="cb468-1"><a href="#cb468-1" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> foo(bar):</span> +<span id="cb468-2"><a href="#cb468-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> <span class="bu">len</span>(bar) <span class="op"><=</span> <span class="dv">1</span>:</span> +<span id="cb468-3"><a href="#cb468-3" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> bar[:<span class="dv">1</span>]</span> +<span id="cb468-4"><a href="#cb468-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">elif</span> <span class="bu">len</span>(bar) <span class="op">==</span> <span class="dv">2</span>:</span> +<span id="cb468-5"><a href="#cb468-5" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</span> +<span id="cb468-6"><a href="#cb468-6" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span>:</span> +<span id="cb468-7"><a href="#cb468-7" aria-hidden="true" tabindex="-1"></a> baz <span class="op">=</span> bar[<span class="bu">len</span>(bar) <span class="op">//</span> <span class="dv">2</span>]</span> +<span id="cb468-8"><a href="#cb468-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> (</span> +<span id="cb468-9"><a href="#cb468-9" aria-hidden="true" tabindex="-1"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op"><</span> baz]) <span class="op">+</span> [baz] <span class="op">+</span></span> +<span id="cb468-10"><a href="#cb468-10" aria-hidden="true" tabindex="-1"></a> foo([qux <span class="cf">for</span> qux <span class="kw">in</span> bar <span class="cf">if</span> qux <span class="op">></span> baz])</span> +<span id="cb468-11"><a href="#cb468-11" aria-hidden="true" tabindex="-1"></a> )</span></code></pre></div> +<p>The following code in Python contained in file +<code>./_markdown_document/cf2a96e2120cef5b1fae5fea36fcc27b.verbatim</code>:</p> +<div class="sourceCode" id="cb469"><pre +class="sourceCode py"><code class="sourceCode python"><span id="cb469-1"><a href="#cb469-1" aria-hidden="true" tabindex="-1"></a><span class="op">>>></span> foo([<span class="dv">4</span>, <span class="dv">2</span>, <span class="dv">1</span>, <span class="dv">3</span>])</span> +<span id="cb469-2"><a href="#cb469-2" aria-hidden="true" tabindex="-1"></a>[<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>]</span></code></pre></div> +</blockquote> +<h4 data-number="2.3.1.18" id="yamlmetadatarenderers"><span +class="header-section-number">2.3.1.18</span> YAML Metadata +Renderers</h4> +<p>The <code>\markdownRendererJekyllDataBegin</code> macro represents +the beginning of a <abbr>yaml</abbr> document. This macro will only be +produced when the <strong><code>jekyllData</code></strong> option is +enabled. The macro receives no arguments.</p> +<p>The <code>\markdownRendererJekyllDataEnd</code> macro represents the +end of a <abbr>yaml</abbr> document. This macro will only be produced +when the <strong><code>jekyllData</code></strong> option is enabled. The +macro receives no arguments.</p> +<p>The <code>\markdownRendererJekyllDataMappingBegin</code> macro +represents the beginning of a mapping in a <abbr>yaml</abbr> document. +This macro will only be produced when the +<strong><code>jekyllData</code></strong> option is enabled. The macro +receives two arguments: the scalar key in the parent structure, cast to +a string following <abbr>yaml</abbr> serialization rules, and the number +of items in the mapping.</p> +<p>The <code>\markdownRendererJekyllDataMappingEnd</code> macro +represents the end of a mapping in a <abbr>yaml</abbr> document. This +macro will only be produced when the +<strong><code>jekyllData</code></strong> option is enabled. The macro +receives no arguments.</p> +<p>The <code>\markdownRendererJekyllDataSequenceBegin</code> macro +represents the beginning of a sequence in a <abbr>yaml</abbr> document. +This macro will only be produced when the +<strong><code>jekyllData</code></strong> option is enabled. The macro +receives two arguments: the scalar key in the parent structure, cast to +a string following <abbr>yaml</abbr> serialization rules, and the number +of items in the sequence.</p> +<p>The <code>\markdownRendererJekyllDataSequenceEnd</code> macro +represents the end of a sequence in a <abbr>yaml</abbr> document. This +macro will only be produced when the +<strong><code>jekyllData</code></strong> option is enabled. The macro +receives no arguments.</p> +<p>The <code>\markdownRendererJekyllDataBoolean</code> macro represents +a boolean scalar value in a <abbr>yaml</abbr> document. This macro will +only be produced when the <strong><code>jekyllData</code></strong> +option is enabled. The macro receives two arguments: the scalar key in +the parent structure, and the scalar value, both cast to a string +following <abbr>yaml</abbr> serialization rules.</p> +<p>The <code>\markdownRendererJekyllDataNumber</code> macro represents a +numeric scalar value in a <abbr>yaml</abbr> document. This macro will +only be produced when the <strong><code>jekyllData</code></strong> +option is enabled. The macro receives two arguments: the scalar key in +the parent structure, and the scalar value, both cast to a string +following <abbr>yaml</abbr> serialization rules.</p> +<p>The <code>\markdownRendererJekyllDataString</code> macro represents a +string scalar value in a <abbr>yaml</abbr> document. This macro will +only be produced when the <strong><code>jekyllData</code></strong> +option is enabled. The macro receives two arguments: the scalar key in +the parent structure, cast to a string following <abbr>yaml</abbr> +serialization rules, and the scalar value.</p> +<p>The <code>\markdownRendererJekyllDataEmpty</code> macro represents an +empty scalar value in a <abbr>yaml</abbr> document. This macro will only +be produced when the <strong><code>jekyllData</code></strong> option is +enabled. The macro receives one argument: the scalar key in the parent +structure, cast to a string following <abbr>yaml</abbr> serialization +rules.</p> +<h5 class="unnumbered" id="plain-tex-example-30">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb470"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb470-1"><a href="#cb470-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb470-2"><a href="#cb470-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb470-3"><a href="#cb470-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> +<span id="cb470-4"><a href="#cb470-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> +<span id="cb470-5"><a href="#cb470-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb470-6"><a href="#cb470-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb470-7"><a href="#cb470-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb470-8"><a href="#cb470-8" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb470-9"><a href="#cb470-9" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span> +<span id="cb470-10"><a href="#cb470-10" aria-hidden="true" tabindex="-1"></a>age: 99</span> +<span id="cb470-11"><a href="#cb470-11" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb470-12"><a href="#cb470-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb470-13"><a href="#cb470-13" 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="cb471"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb471-1"><a href="#cb471-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:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-59"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb468"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb468-1"><a href="#cb468-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb468-2"><a href="#cb468-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> -<span id="cb468-3"><a href="#cb468-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb468-4"><a href="#cb468-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb468-5"><a href="#cb468-5" aria-hidden="true"></a> jekyllDataString = {<span class="fu">\gdef\name</span>{#2}},</span> -<span id="cb468-6"><a href="#cb468-6" aria-hidden="true"></a> jekyllDataNumber = {<span class="fu">\gdef\age</span>{#2}},</span> -<span id="cb468-7"><a href="#cb468-7" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> -<span id="cb468-8"><a href="#cb468-8" aria-hidden="true"></a> }</span> -<span id="cb468-9"><a href="#cb468-9" aria-hidden="true"></a>}</span> -<span id="cb468-10"><a href="#cb468-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb468-11"><a href="#cb468-11" aria-hidden="true"></a></span> -<span id="cb468-12"><a href="#cb468-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb468-13"><a href="#cb468-13" aria-hidden="true"></a>---</span> -<span id="cb468-14"><a href="#cb468-14" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb468-15"><a href="#cb468-15" aria-hidden="true"></a>age: 99</span> -<span id="cb468-16"><a href="#cb468-16" aria-hidden="true"></a>---</span> -<span id="cb468-17"><a href="#cb468-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb468-18"><a href="#cb468-18" aria-hidden="true"></a></span> -<span id="cb468-19"><a href="#cb468-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb469"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb469-1"><a href="#cb469-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-60"><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>[jekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb472-3"><a href="#cb472-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb472-4"><a href="#cb472-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb472-5"><a href="#cb472-5" aria-hidden="true" tabindex="-1"></a> jekyllDataString = {<span class="fu">\gdef\name</span>{#2}},</span> +<span id="cb472-6"><a href="#cb472-6" aria-hidden="true" tabindex="-1"></a> jekyllDataNumber = {<span class="fu">\gdef\age</span>{#2}},</span> +<span id="cb472-7"><a href="#cb472-7" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> +<span id="cb472-8"><a href="#cb472-8" aria-hidden="true" tabindex="-1"></a> }</span> +<span id="cb472-9"><a href="#cb472-9" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb472-10"><a href="#cb472-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb472-11"><a href="#cb472-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb472-12"><a href="#cb472-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</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>name: Jane Doe</span> +<span id="cb472-15"><a href="#cb472-15" aria-hidden="true" tabindex="-1"></a>age: 99</span> +<span id="cb472-16"><a href="#cb472-16" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb472-17"><a href="#cb472-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb472-18"><a href="#cb472-18" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb472-19"><a href="#cb472-19" 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> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-45">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb470"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb470-1"><a href="#cb470-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb470-2"><a href="#cb470-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[jekyllData = yes]</span> -<span id="cb470-3"><a href="#cb470-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> -<span id="cb470-4"><a href="#cb470-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> -<span id="cb470-5"><a href="#cb470-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb470-6"><a href="#cb470-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb470-7"><a href="#cb470-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb470-8"><a href="#cb470-8" aria-hidden="true"></a></span> -<span id="cb470-9"><a href="#cb470-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb470-10"><a href="#cb470-10" aria-hidden="true"></a>---</span> -<span id="cb470-11"><a href="#cb470-11" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb470-12"><a href="#cb470-12" aria-hidden="true"></a>age: 99</span> -<span id="cb470-13"><a href="#cb470-13" aria-hidden="true"></a>---</span> -<span id="cb470-14"><a href="#cb470-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb470-15"><a href="#cb470-15" aria-hidden="true"></a></span> -<span id="cb470-16"><a href="#cb470-16" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb471"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb471-1"><a href="#cb471-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-45">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="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">\usemodule</span>[t][markdown]</span> +<span id="cb474-2"><a href="#cb474-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[jekyllData = yes]</span> +<span id="cb474-3"><a href="#cb474-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> +<span id="cb474-4"><a href="#cb474-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> +<span id="cb474-5"><a href="#cb474-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb474-6"><a href="#cb474-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb474-7"><a href="#cb474-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb474-8"><a href="#cb474-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb474-9"><a href="#cb474-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb474-10"><a href="#cb474-10" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb474-11"><a href="#cb474-11" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span> +<span id="cb474-12"><a href="#cb474-12" aria-hidden="true" tabindex="-1"></a>age: 99</span> +<span id="cb474-13"><a href="#cb474-13" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb474-14"><a href="#cb474-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb474-15"><a href="#cb474-15" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb474-16"><a href="#cb474-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</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">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h4 data-number="2.3.1.19" id="heading-renderers"><span class="header-section-number">2.3.1.19</span> Heading Renderers</h4> -<p>The <code>\markdownRendererHeadingOne</code> macro represents a first level heading. The macro receives a single argument that corresponds to the heading text.</p> -<p>The <code>\markdownRendererHeadingTwo</code> macro represents a second level heading. The macro receives a single argument that corresponds to the heading text.</p> -<p>The <code>\markdownRendererHeadingThree</code> macro represents a third level heading. The macro receives a single argument that corresponds to the heading text.</p> -<p>The <code>\markdownRendererHeadingFour</code> macro represents a fourth level heading. The macro receives a single argument that corresponds to the heading text.</p> -<p>The <code>\markdownRendererHeadingFive</code> macro represents a fifth level heading. The macro receives a single argument that corresponds to the heading text.</p> -<p>The <code>\markdownRendererHeadingSix</code> macro represents a sixth level heading. The macro receives a single argument that corresponds to the heading text.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-31">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb472"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb472-1"><a href="#cb472-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb472-2"><a href="#cb472-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb472-3"><a href="#cb472-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> -<span id="cb472-4"><a href="#cb472-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> -<span id="cb472-5"><a href="#cb472-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> -<span id="cb472-6"><a href="#cb472-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> -<span id="cb472-7"><a href="#cb472-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> -<span id="cb472-8"><a href="#cb472-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> -<span id="cb472-9"><a href="#cb472-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb472-10"><a href="#cb472-10" aria-hidden="true"></a>######</span> -<span id="cb472-11"><a href="#cb472-11" aria-hidden="true"></a>#####</span> -<span id="cb472-12"><a href="#cb472-12" aria-hidden="true"></a>#####</span> -<span id="cb472-13"><a href="#cb472-13" aria-hidden="true"></a>###</span> -<span id="cb472-14"><a href="#cb472-14" aria-hidden="true"></a>######</span> -<span id="cb472-15"><a href="#cb472-15" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb472-16"><a href="#cb472-16" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb473"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb473-1"><a href="#cb473-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.19" id="heading-renderers"><span +class="header-section-number">2.3.1.19</span> Heading Renderers</h4> +<p>The <code>\markdownRendererHeadingOne</code> macro represents a first +level heading. The macro receives a single argument that corresponds to +the heading text.</p> +<p>The <code>\markdownRendererHeadingTwo</code> macro represents a +second level heading. The macro receives a single argument that +corresponds to the heading text.</p> +<p>The <code>\markdownRendererHeadingThree</code> macro represents a +third level heading. The macro receives a single argument that +corresponds to the heading text.</p> +<p>The <code>\markdownRendererHeadingFour</code> macro represents a +fourth level heading. The macro receives a single argument that +corresponds to the heading text.</p> +<p>The <code>\markdownRendererHeadingFive</code> macro represents a +fifth level heading. The macro receives a single argument that +corresponds to the heading text.</p> +<p>The <code>\markdownRendererHeadingSix</code> macro represents a sixth +level heading. The macro receives a single argument that corresponds to +the heading text.</p> +<h5 class="unnumbered" id="plain-tex-example-31">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="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">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb476-3"><a href="#cb476-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> +<span id="cb476-4"><a href="#cb476-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> +<span id="cb476-5"><a href="#cb476-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> +<span id="cb476-6"><a href="#cb476-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> +<span id="cb476-7"><a href="#cb476-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> +<span id="cb476-8"><a href="#cb476-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> +<span id="cb476-9"><a href="#cb476-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb476-10"><a href="#cb476-10" aria-hidden="true" tabindex="-1"></a>######</span> +<span id="cb476-11"><a href="#cb476-11" aria-hidden="true" tabindex="-1"></a>#####</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> +<span id="cb476-14"><a href="#cb476-14" aria-hidden="true" tabindex="-1"></a>######</span> +<span id="cb476-15"><a href="#cb476-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb476-16"><a href="#cb476-16" 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="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:</p> <blockquote> <p>65536</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-60"><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"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb474-2"><a href="#cb474-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb474-3"><a href="#cb474-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb474-4"><a href="#cb474-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb474-5"><a href="#cb474-5" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb474-6"><a href="#cb474-6" aria-hidden="true"></a> headingOne = 1,</span> -<span id="cb474-7"><a href="#cb474-7" aria-hidden="true"></a> headingTwo = 2,</span> -<span id="cb474-8"><a href="#cb474-8" aria-hidden="true"></a> headingThree = 3,</span> -<span id="cb474-9"><a href="#cb474-9" aria-hidden="true"></a> headingFour = 4,</span> -<span id="cb474-10"><a href="#cb474-10" aria-hidden="true"></a> headingFive = 5,</span> -<span id="cb474-11"><a href="#cb474-11" aria-hidden="true"></a> headingSix = 6,</span> -<span id="cb474-12"><a href="#cb474-12" aria-hidden="true"></a> },</span> -<span id="cb474-13"><a href="#cb474-13" aria-hidden="true"></a>}</span> -<span id="cb474-14"><a href="#cb474-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb474-15"><a href="#cb474-15" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb474-16"><a href="#cb474-16" aria-hidden="true"></a>######</span> -<span id="cb474-17"><a href="#cb474-17" aria-hidden="true"></a>#####</span> -<span id="cb474-18"><a href="#cb474-18" aria-hidden="true"></a>#####</span> -<span id="cb474-19"><a href="#cb474-19" aria-hidden="true"></a>###</span> -<span id="cb474-20"><a href="#cb474-20" aria-hidden="true"></a>######</span> -<span id="cb474-21"><a href="#cb474-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb474-22"><a href="#cb474-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb475"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb475-1"><a href="#cb475-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-61"><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="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="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb478-2"><a href="#cb478-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb478-3"><a href="#cb478-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb478-4"><a href="#cb478-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb478-5"><a href="#cb478-5" aria-hidden="true" tabindex="-1"></a> interblockSeparator = {},</span> +<span id="cb478-6"><a href="#cb478-6" aria-hidden="true" tabindex="-1"></a> headingOne = 1,</span> +<span id="cb478-7"><a href="#cb478-7" aria-hidden="true" tabindex="-1"></a> headingTwo = 2,</span> +<span id="cb478-8"><a href="#cb478-8" aria-hidden="true" tabindex="-1"></a> headingThree = 3,</span> +<span id="cb478-9"><a href="#cb478-9" aria-hidden="true" tabindex="-1"></a> headingFour = 4,</span> +<span id="cb478-10"><a href="#cb478-10" aria-hidden="true" tabindex="-1"></a> headingFive = 5,</span> +<span id="cb478-11"><a href="#cb478-11" aria-hidden="true" tabindex="-1"></a> headingSix = 6,</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> +<span id="cb478-14"><a href="#cb478-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb478-15"><a href="#cb478-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb478-16"><a href="#cb478-16" aria-hidden="true" tabindex="-1"></a>######</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>#####</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>######</span> +<span id="cb478-21"><a href="#cb478-21" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb478-22"><a href="#cb478-22" 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="cb479"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb479-1"><a href="#cb479-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 text:</p> <blockquote> <p>65536</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-46">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb476"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb476-1"><a href="#cb476-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb476-2"><a href="#cb476-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb476-3"><a href="#cb476-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> -<span id="cb476-4"><a href="#cb476-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> -<span id="cb476-5"><a href="#cb476-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> -<span id="cb476-6"><a href="#cb476-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> -<span id="cb476-7"><a href="#cb476-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> -<span id="cb476-8"><a href="#cb476-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> -<span id="cb476-9"><a href="#cb476-9" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb476-10"><a href="#cb476-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb476-11"><a href="#cb476-11" aria-hidden="true"></a>######</span> -<span id="cb476-12"><a href="#cb476-12" aria-hidden="true"></a>#####</span> -<span id="cb476-13"><a href="#cb476-13" aria-hidden="true"></a>#####</span> -<span id="cb476-14"><a href="#cb476-14" aria-hidden="true"></a>###</span> -<span id="cb476-15"><a href="#cb476-15" aria-hidden="true"></a>######</span> -<span id="cb476-16"><a href="#cb476-16" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb476-17"><a href="#cb476-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb477"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb477-1"><a href="#cb477-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-46">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="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">\usemodule</span>[t][markdown]</span> +<span id="cb480-2"><a href="#cb480-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb480-3"><a href="#cb480-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> +<span id="cb480-4"><a href="#cb480-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> +<span id="cb480-5"><a href="#cb480-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> +<span id="cb480-6"><a href="#cb480-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> +<span id="cb480-7"><a href="#cb480-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> +<span id="cb480-8"><a href="#cb480-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> +<span id="cb480-9"><a href="#cb480-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb480-10"><a href="#cb480-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb480-11"><a href="#cb480-11" aria-hidden="true" tabindex="-1"></a>######</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> +<span id="cb480-14"><a href="#cb480-14" aria-hidden="true" tabindex="-1"></a>###</span> +<span id="cb480-15"><a href="#cb480-15" aria-hidden="true" tabindex="-1"></a>######</span> +<span id="cb480-16"><a href="#cb480-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb480-17"><a href="#cb480-17" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb481"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb481-1"><a href="#cb481-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>65536</p> </blockquote> -<h4 data-number="2.3.1.20" id="horizontal-rule-renderer"><span class="header-section-number">2.3.1.20</span> Horizontal Rule Renderer</h4> -<p>The <code>\markdownRendererHorizontalRule</code> macro represents a horizontal rule. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-32">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb478"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb478-1"><a href="#cb478-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb478-2"><a href="#cb478-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\vfil\break</span>}</span> -<span id="cb478-3"><a href="#cb478-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb478-4"><a href="#cb478-4" aria-hidden="true"></a>This is the first page.</span> -<span id="cb478-5"><a href="#cb478-5" aria-hidden="true"></a></span> -<span id="cb478-6"><a href="#cb478-6" aria-hidden="true"></a>***</span> -<span id="cb478-7"><a href="#cb478-7" aria-hidden="true"></a></span> -<span id="cb478-8"><a href="#cb478-8" aria-hidden="true"></a>This is the second page.</span> -<span id="cb478-9"><a href="#cb478-9" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb478-10"><a href="#cb478-10" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb479"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb479-1"><a href="#cb479-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.20" id="horizontal-rule-renderer"><span +class="header-section-number">2.3.1.20</span> Horizontal Rule +Renderer</h4> +<p>The <code>\markdownRendererHorizontalRule</code> macro represents a +horizontal rule. The macro receives no arguments.</p> +<h5 class="unnumbered" id="plain-tex-example-32">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="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">\input</span> markdown</span> +<span id="cb482-2"><a href="#cb482-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\vfil\break</span>}</span> +<span id="cb482-3"><a href="#cb482-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb482-4"><a href="#cb482-4" aria-hidden="true" tabindex="-1"></a>This is the first page.</span> +<span id="cb482-5"><a href="#cb482-5" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb482-6"><a href="#cb482-6" aria-hidden="true" tabindex="-1"></a>***</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>This is the second page.</span> +<span id="cb482-9"><a href="#cb482-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb482-10"><a href="#cb482-10" 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="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">luatex</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>This is the first page.</p> <hr /> <p>This is the second page.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-61"><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="cb480"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb480-1"><a href="#cb480-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb480-2"><a href="#cb480-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb480-3"><a href="#cb480-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb480-4"><a href="#cb480-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb480-5"><a href="#cb480-5" aria-hidden="true"></a> horizontalRule = <span class="fu">\newpage</span>,</span> -<span id="cb480-6"><a href="#cb480-6" aria-hidden="true"></a> },</span> -<span id="cb480-7"><a href="#cb480-7" aria-hidden="true"></a>}</span> -<span id="cb480-8"><a href="#cb480-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb480-9"><a href="#cb480-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb480-10"><a href="#cb480-10" aria-hidden="true"></a>This is the first page.</span> -<span id="cb480-11"><a href="#cb480-11" aria-hidden="true"></a></span> -<span id="cb480-12"><a href="#cb480-12" aria-hidden="true"></a>***</span> -<span id="cb480-13"><a href="#cb480-13" aria-hidden="true"></a></span> -<span id="cb480-14"><a href="#cb480-14" aria-hidden="true"></a>This is the second page.</span> -<span id="cb480-15"><a href="#cb480-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb480-16"><a href="#cb480-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb481"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb481-1"><a href="#cb481-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-62"><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>{<span class="ex">markdown</span>}</span> +<span id="cb484-3"><a href="#cb484-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb484-4"><a href="#cb484-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb484-5"><a href="#cb484-5" aria-hidden="true" tabindex="-1"></a> horizontalRule = <span class="fu">\newpage</span>,</span> +<span id="cb484-6"><a href="#cb484-6" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb484-7"><a href="#cb484-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb484-8"><a href="#cb484-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb484-9"><a href="#cb484-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb484-10"><a href="#cb484-10" aria-hidden="true" tabindex="-1"></a>This is the first page.</span> +<span id="cb484-11"><a href="#cb484-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb484-12"><a href="#cb484-12" aria-hidden="true" tabindex="-1"></a>***</span> +<span id="cb484-13"><a href="#cb484-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb484-14"><a href="#cb484-14" aria-hidden="true" tabindex="-1"></a>This is the second page.</span> +<span id="cb484-15"><a href="#cb484-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb484-16"><a href="#cb484-16" 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 text:</p> <blockquote> <p>This is the first page.</p> <hr /> <p>This is the second page.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-47">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb482"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb482-1"><a href="#cb482-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb482-2"><a href="#cb482-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\page</span>[yes]}</span> -<span id="cb482-3"><a href="#cb482-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb482-4"><a href="#cb482-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb482-5"><a href="#cb482-5" aria-hidden="true"></a>This is the first page.</span> -<span id="cb482-6"><a href="#cb482-6" aria-hidden="true"></a></span> -<span id="cb482-7"><a href="#cb482-7" aria-hidden="true"></a>***</span> -<span id="cb482-8"><a href="#cb482-8" aria-hidden="true"></a></span> -<span id="cb482-9"><a href="#cb482-9" aria-hidden="true"></a>This is the second page.</span> -<span id="cb482-10"><a href="#cb482-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb482-11"><a href="#cb482-11" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb483"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb483-1"><a href="#cb483-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-47">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb486"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb486-1"><a href="#cb486-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb486-2"><a href="#cb486-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\page</span>[yes]}</span> +<span id="cb486-3"><a href="#cb486-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb486-4"><a href="#cb486-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb486-5"><a href="#cb486-5" aria-hidden="true" tabindex="-1"></a>This is the first page.</span> +<span id="cb486-6"><a href="#cb486-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb486-7"><a href="#cb486-7" aria-hidden="true" tabindex="-1"></a>***</span> +<span id="cb486-8"><a href="#cb486-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb486-9"><a href="#cb486-9" aria-hidden="true" tabindex="-1"></a>This is the second page.</span> +<span id="cb486-10"><a href="#cb486-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb486-11"><a href="#cb486-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb487"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb487-1"><a href="#cb487-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>This is the first page.</p> <hr /> <p>This is the second page.</p> </blockquote> -<h4 data-number="2.3.1.21" id="footnote-renderer"><span class="header-section-number">2.3.1.21</span> Footnote Renderer</h4> -<p>The <code>\markdownRendererFootnote</code> macro represents a footnote. This macro will only be produced, when the <strong><code>footnotes</code></strong> option is enabled. The macro receives a single argument that corresponds to the footnote text.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-33">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb484"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb484-1"><a href="#cb484-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb484-2"><a href="#cb484-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> -<span id="cb484-3"><a href="#cb484-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> -<span id="cb484-4"><a href="#cb484-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb484-5"><a href="#cb484-5" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb484-6"><a href="#cb484-6" aria-hidden="true"></a></span> -<span id="cb484-7"><a href="#cb484-7" aria-hidden="true"></a> [^1]: this is a footnote</span> -<span id="cb484-8"><a href="#cb484-8" aria-hidden="true"></a></span> -<span id="cb484-9"><a href="#cb484-9" aria-hidden="true"></a> [^2]: this is some other footnote</span> -<span id="cb484-10"><a href="#cb484-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb484-11"><a href="#cb484-11" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb485"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb485-1"><a href="#cb485-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is some text (and this is a footnote) and this is some other text (and this is some other footnote).</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-62"><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="cb486"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb486-1"><a href="#cb486-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb486-2"><a href="#cb486-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> -<span id="cb486-3"><a href="#cb486-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb486-4"><a href="#cb486-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb486-5"><a href="#cb486-5" aria-hidden="true"></a> footnote = { (and <span class="fu">\MakeLowercase</span>{#1})},</span> -<span id="cb486-6"><a href="#cb486-6" aria-hidden="true"></a> },</span> -<span id="cb486-7"><a href="#cb486-7" aria-hidden="true"></a>}</span> -<span id="cb486-8"><a href="#cb486-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb486-9"><a href="#cb486-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb486-10"><a href="#cb486-10" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb486-11"><a href="#cb486-11" aria-hidden="true"></a></span> -<span id="cb486-12"><a href="#cb486-12" aria-hidden="true"></a> [^1]: this is a footnote</span> -<span id="cb486-13"><a href="#cb486-13" aria-hidden="true"></a></span> -<span id="cb486-14"><a href="#cb486-14" aria-hidden="true"></a> [^2]: this is some other footnote</span> -<span id="cb486-15"><a href="#cb486-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb486-16"><a href="#cb486-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb487"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb487-1"><a href="#cb487-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is some text (and this is a footnote) and this is some other text (and this is some other footnote).</p> -</blockquote> -<h5 class="unnumbered" data-number="" id="context-example-48">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb488"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb488-1"><a href="#cb488-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb488-2"><a href="#cb488-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[footnotes = yes]</span> -<span id="cb488-3"><a href="#cb488-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> -<span id="cb488-4"><a href="#cb488-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb488-5"><a href="#cb488-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb488-6"><a href="#cb488-6" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb488-7"><a href="#cb488-7" aria-hidden="true"></a></span> -<span id="cb488-8"><a href="#cb488-8" aria-hidden="true"></a> [^1]: this is a footnote</span> -<span id="cb488-9"><a href="#cb488-9" aria-hidden="true"></a></span> -<span id="cb488-10"><a href="#cb488-10" aria-hidden="true"></a> [^2]: this is some other footnote</span> -<span id="cb488-11"><a href="#cb488-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb488-12"><a href="#cb488-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb489"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb489-1"><a href="#cb489-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is some text (and this is a footnote) and this is some other text (and this is some other footnote).</p> -</blockquote> -<h4 data-number="2.3.1.22" id="parenthesized-citations-renderer"><span class="header-section-number">2.3.1.22</span> Parenthesized Citations Renderer</h4> -<p>The <code>\markdownRendererCite</code> macro represents a string of one or more parenthetical citations. This macro will only be produced, when the <strong><code>citations</code></strong> option is enabled. The macro receives the parameter <code>{</code>⟨<em>number of citations</em>⟩<code>}</code> followed by ⟨<em>suppress author</em>⟩ <code>{</code>⟨<em>prenote</em>⟩<code>}{</code>⟨<em>postnote</em>⟩<code>}{</code>⟨<em>name</em>⟩<code>}</code> repeated ⟨<em>number of citations</em>⟩ times. The ⟨<em>suppress author</em>⟩ parameter is either the token <code>-</code>, when the author’s name is to be suppressed, or <code>+</code> otherwise.</p> -<h5 class="unnumbered" data-number="" id="latex-example-63"><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="cb490"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb490-1"><a href="#cb490-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb490-2"><a href="#cb490-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb490-3"><a href="#cb490-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> -<span id="cb490-4"><a href="#cb490-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> -<span id="cb490-5"><a href="#cb490-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb490-6"><a href="#cb490-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb490-7"><a href="#cb490-7" aria-hidden="true"></a> a parenthesized citation <span class="fu">\emph</span>{#4}</span> -<span id="cb490-8"><a href="#cb490-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb490-9"><a href="#cb490-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> -<span id="cb490-10"><a href="#cb490-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb490-11"><a href="#cb490-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb490-12"><a href="#cb490-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb490-13"><a href="#cb490-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb490-14"><a href="#cb490-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> -<span id="cb490-15"><a href="#cb490-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb490-16"><a href="#cb490-16" aria-hidden="true"></a> <span class="fu">\ </span>and a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb490-17"><a href="#cb490-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb490-18"><a href="#cb490-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb490-19"><a href="#cb490-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> -<span id="cb490-20"><a href="#cb490-20" aria-hidden="true"></a> .<span class="co">%</span></span> -<span id="cb490-21"><a href="#cb490-21" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> -<span id="cb490-22"><a href="#cb490-22" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb490-23"><a href="#cb490-23" aria-hidden="true"></a> , and</span> -<span id="cb490-24"><a href="#cb490-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> -<span id="cb490-25"><a href="#cb490-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb490-26"><a href="#cb490-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb490-27"><a href="#cb490-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb490-28"><a href="#cb490-28" aria-hidden="true"></a> cite = {<span class="co">%</span></span> -<span id="cb490-29"><a href="#cb490-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> -<span id="cb490-30"><a href="#cb490-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> -<span id="cb490-31"><a href="#cb490-31" aria-hidden="true"></a> This is</span> -<span id="cb490-32"><a href="#cb490-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> -<span id="cb490-33"><a href="#cb490-33" aria-hidden="true"></a> },</span> -<span id="cb490-34"><a href="#cb490-34" aria-hidden="true"></a> },</span> -<span id="cb490-35"><a href="#cb490-35" aria-hidden="true"></a>}</span> -<span id="cb490-36"><a href="#cb490-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb490-37"><a href="#cb490-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb490-38"><a href="#cb490-38" aria-hidden="true"></a>[see @abrahams90, pp. 12; @eijkhout91, pp. 34]</span> -<span id="cb490-39"><a href="#cb490-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb490-40"><a href="#cb490-40" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb491"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb491-1"><a href="#cb491-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is a parenthesized citation <em>abrahams90</em> with a prefix see and a postfix <em>pp. 12</em>, and a citation <em>eijkhout91</em> with a postfix <em>pp. 34</em>.</p> -</blockquote> -<h4 data-number="2.3.1.23" id="text-citations-renderer"><span class="header-section-number">2.3.1.23</span> Text Citations Renderer</h4> -<p>The <code>\markdownRendererTextCite</code> macro represents a string of one or more text citations. This macro will only be produced, when the <strong><code>citations</code></strong> option is enabled. The macro receives parameters in the same format as the <code>\markdownRendererCite</code> macro.</p> -<h5 class="unnumbered" data-number="" id="latex-example-64"><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="cb492"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb492-1"><a href="#cb492-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb492-2"><a href="#cb492-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb492-3"><a href="#cb492-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> -<span id="cb492-4"><a href="#cb492-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> -<span id="cb492-5"><a href="#cb492-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb492-6"><a href="#cb492-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb492-7"><a href="#cb492-7" aria-hidden="true"></a> a text citation <span class="fu">\emph</span>{#4}</span> -<span id="cb492-8"><a href="#cb492-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb492-9"><a href="#cb492-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> -<span id="cb492-10"><a href="#cb492-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb492-11"><a href="#cb492-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb492-12"><a href="#cb492-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb492-13"><a href="#cb492-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb492-14"><a href="#cb492-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> -<span id="cb492-15"><a href="#cb492-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb492-16"><a href="#cb492-16" aria-hidden="true"></a> <span class="fu">\ </span>and a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb492-17"><a href="#cb492-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb492-18"><a href="#cb492-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb492-19"><a href="#cb492-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> -<span id="cb492-20"><a href="#cb492-20" aria-hidden="true"></a> .<span class="co">%</span></span> -<span id="cb492-21"><a href="#cb492-21" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> -<span id="cb492-22"><a href="#cb492-22" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb492-23"><a href="#cb492-23" aria-hidden="true"></a> , and</span> -<span id="cb492-24"><a href="#cb492-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> -<span id="cb492-25"><a href="#cb492-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb492-26"><a href="#cb492-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb492-27"><a href="#cb492-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb492-28"><a href="#cb492-28" aria-hidden="true"></a> textCite = {<span class="co">%</span></span> -<span id="cb492-29"><a href="#cb492-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> -<span id="cb492-30"><a href="#cb492-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> -<span id="cb492-31"><a href="#cb492-31" aria-hidden="true"></a> This is</span> -<span id="cb492-32"><a href="#cb492-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> -<span id="cb492-33"><a href="#cb492-33" aria-hidden="true"></a> },</span> -<span id="cb492-34"><a href="#cb492-34" aria-hidden="true"></a> },</span> -<span id="cb492-35"><a href="#cb492-35" aria-hidden="true"></a>}</span> -<span id="cb492-36"><a href="#cb492-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb492-37"><a href="#cb492-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb492-38"><a href="#cb492-38" aria-hidden="true"></a>@abrahams90 [pp. 12; also @eijkhout91]</span> -<span id="cb492-39"><a href="#cb492-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb492-40"><a href="#cb492-40" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb493"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb493-1"><a href="#cb493-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is a text citation <em>abrahams90</em> with a postfix <em>pp. 12</em>, and a citation <em>eijkhout91</em> with a prefix <em>also</em>.</p> -</blockquote> -<h4 data-number="2.3.1.24" id="table-renderer"><span class="header-section-number">2.3.1.24</span> Table Renderer</h4> -<p>The <code>\markdownRendererTable</code> macro represents a table. This macro will only be produced, when the <strong><code>pipeTables</code></strong> option is enabled. The macro receives the parameters <code>{</code>⟨<em>caption</em>⟩<code>}{</code>⟨<em>number of rows</em>⟩<code>}{</code>⟨<em>number of columns</em>⟩<code>}</code> followed by <code>{</code>⟨<em>alignments</em>⟩<code>}</code> and then by <code>{</code>⟨<em>row</em>⟩<code>}</code> repeated ⟨<em>number of rows</em>⟩ times, where ⟨<em>row</em>⟩ is <code>{</code>⟨<em>column</em>⟩<code>}</code> repeated ⟨<em>number of columns</em>⟩ times, ⟨<em>alignments</em>⟩ is ⟨<em>alignment</em>⟩ repeated ⟨<em>number of columns</em>⟩ times, and ⟨<em>alignment</em>⟩ is one of the following:</p> +<h4 data-number="2.3.1.21" id="footnote-renderer"><span +class="header-section-number">2.3.1.21</span> Footnote Renderer</h4> +<p>The <code>\markdownRendererFootnote</code> macro represents a +footnote. This macro will only be produced, when the +<strong><code>footnotes</code></strong> option is enabled. The macro +receives a single argument that corresponds to the footnote text.</p> +<h5 class="unnumbered" id="plain-tex-example-33">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb488"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb488-1"><a href="#cb488-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb488-2"><a href="#cb488-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> +<span id="cb488-3"><a href="#cb488-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> +<span id="cb488-4"><a href="#cb488-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb488-5"><a href="#cb488-5" aria-hidden="true" tabindex="-1"></a>This is some text[^1] and this is some other text[^2].</span> +<span id="cb488-6"><a href="#cb488-6" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb488-7"><a href="#cb488-7" aria-hidden="true" tabindex="-1"></a> [^1]: this is a footnote</span> +<span id="cb488-8"><a href="#cb488-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb488-9"><a href="#cb488-9" aria-hidden="true" tabindex="-1"></a> [^2]: this is some other footnote</span> +<span id="cb488-10"><a href="#cb488-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb488-11"><a href="#cb488-11" 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="cb489"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb489-1"><a href="#cb489-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:</p> +<blockquote> +<p>This is some text (and this is a footnote) and this is some other +text (and this is some other footnote).</p> +</blockquote> +<h5 class="unnumbered" id="latex-example-63"><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="cb490"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb490-1"><a href="#cb490-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb490-2"><a href="#cb490-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> +<span id="cb490-3"><a href="#cb490-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb490-4"><a href="#cb490-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb490-5"><a href="#cb490-5" aria-hidden="true" tabindex="-1"></a> footnote = { (and <span class="fu">\MakeLowercase</span>{#1})},</span> +<span id="cb490-6"><a href="#cb490-6" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb490-7"><a href="#cb490-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb490-8"><a href="#cb490-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb490-9"><a href="#cb490-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb490-10"><a href="#cb490-10" aria-hidden="true" tabindex="-1"></a>This is some text[^1] and this is some other text[^2].</span> +<span id="cb490-11"><a href="#cb490-11" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb490-12"><a href="#cb490-12" aria-hidden="true" tabindex="-1"></a> [^1]: this is a footnote</span> +<span id="cb490-13"><a href="#cb490-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb490-14"><a href="#cb490-14" aria-hidden="true" tabindex="-1"></a> [^2]: this is some other footnote</span> +<span id="cb490-15"><a href="#cb490-15" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb490-16"><a href="#cb490-16" 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="cb491"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb491-1"><a href="#cb491-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 text:</p> +<blockquote> +<p>This is some text (and this is a footnote) and this is some other +text (and this is some other footnote).</p> +</blockquote> +<h5 class="unnumbered" id="context-example-48">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb492"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb492-1"><a href="#cb492-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb492-2"><a href="#cb492-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[footnotes = yes]</span> +<span id="cb492-3"><a href="#cb492-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> +<span id="cb492-4"><a href="#cb492-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb492-5"><a href="#cb492-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb492-6"><a href="#cb492-6" aria-hidden="true" tabindex="-1"></a>This is some text[^1] and this is some other text[^2].</span> +<span id="cb492-7"><a href="#cb492-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb492-8"><a href="#cb492-8" aria-hidden="true" tabindex="-1"></a> [^1]: this is a footnote</span> +<span id="cb492-9"><a href="#cb492-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb492-10"><a href="#cb492-10" aria-hidden="true" tabindex="-1"></a> [^2]: this is some other footnote</span> +<span id="cb492-11"><a href="#cb492-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb492-12"><a href="#cb492-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb493"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb493-1"><a href="#cb493-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> +<blockquote> +<p>This is some text (and this is a footnote) and this is some other +text (and this is some other footnote).</p> +</blockquote> +<h4 data-number="2.3.1.22" id="parenthesized-citations-renderer"><span +class="header-section-number">2.3.1.22</span> Parenthesized Citations +Renderer</h4> +<p>The <code>\markdownRendererCite</code> macro represents a string of +one or more parenthetical citations. This macro will only be produced, +when the <strong><code>citations</code></strong> option is enabled. The +macro receives the parameter <code>{</code>⟨<em>number of +citations</em>⟩<code>}</code> followed by ⟨<em>suppress author</em>⟩ +<code>{</code>⟨<em>prenote</em>⟩<code>}{</code>⟨<em>postnote</em>⟩<code>}{</code>⟨<em>name</em>⟩<code>}</code> +repeated ⟨<em>number of citations</em>⟩ times. The ⟨<em>suppress +author</em>⟩ parameter is either the token <code>-</code>, when the +author’s name is to be suppressed, or <code>+</code> otherwise.</p> +<h5 class="unnumbered" id="latex-example-64"><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="cb494"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb494-1"><a href="#cb494-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb494-2"><a href="#cb494-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> +<span id="cb494-3"><a href="#cb494-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\citationsCounter</span></span> +<span id="cb494-4"><a href="#cb494-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\citationsTotal</span></span> +<span id="cb494-5"><a href="#cb494-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatletter</span></span> +<span id="cb494-6"><a href="#cb494-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb494-7"><a href="#cb494-7" aria-hidden="true" tabindex="-1"></a> a parenthesized citation <span class="fu">\emph</span>{#4}</span> +<span id="cb494-8"><a href="#cb494-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb494-9"><a href="#cb494-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> +<span id="cb494-10"><a href="#cb494-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb494-11"><a href="#cb494-11" aria-hidden="true" tabindex="-1"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> +<span id="cb494-12"><a href="#cb494-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb494-13"><a href="#cb494-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb494-14"><a href="#cb494-14" aria-hidden="true" tabindex="-1"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> +<span id="cb494-15"><a href="#cb494-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb494-16"><a href="#cb494-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ </span>and a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> +<span id="cb494-17"><a href="#cb494-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb494-18"><a href="#cb494-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb494-19"><a href="#cb494-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> +<span id="cb494-20"><a href="#cb494-20" aria-hidden="true" tabindex="-1"></a> .<span class="co">%</span></span> +<span id="cb494-21"><a href="#cb494-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">\expandafter\@gobble</span></span> +<span id="cb494-22"><a href="#cb494-22" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb494-23"><a href="#cb494-23" aria-hidden="true" tabindex="-1"></a> , and</span> +<span id="cb494-24"><a href="#cb494-24" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi\citations</span>}</span> +<span id="cb494-25"><a href="#cb494-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatother</span></span> +<span id="cb494-26"><a href="#cb494-26" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb494-27"><a href="#cb494-27" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb494-28"><a href="#cb494-28" aria-hidden="true" tabindex="-1"></a> cite = {<span class="co">%</span></span> +<span id="cb494-29"><a href="#cb494-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> +<span id="cb494-30"><a href="#cb494-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> +<span id="cb494-31"><a href="#cb494-31" aria-hidden="true" tabindex="-1"></a> This is</span> +<span id="cb494-32"><a href="#cb494-32" aria-hidden="true" tabindex="-1"></a> <span class="fu">\expandafter\citations</span></span> +<span id="cb494-33"><a href="#cb494-33" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb494-34"><a href="#cb494-34" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb494-35"><a href="#cb494-35" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb494-36"><a href="#cb494-36" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb494-37"><a href="#cb494-37" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb494-38"><a href="#cb494-38" aria-hidden="true" tabindex="-1"></a>[see @abrahams90, pp. 12; @eijkhout91, pp. 34]</span> +<span id="cb494-39"><a href="#cb494-39" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb494-40"><a href="#cb494-40" 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="cb495"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb495-1"><a href="#cb495-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 text:</p> +<blockquote> +<p>This is a parenthesized citation <em>abrahams90</em> with a prefix +see and a postfix <em>pp. 12</em>, and a citation <em>eijkhout91</em> +with a postfix <em>pp. 34</em>.</p> +</blockquote> +<h4 data-number="2.3.1.23" id="text-citations-renderer"><span +class="header-section-number">2.3.1.23</span> Text Citations +Renderer</h4> +<p>The <code>\markdownRendererTextCite</code> macro represents a string +of one or more text citations. This macro will only be produced, when +the <strong><code>citations</code></strong> option is enabled. The macro +receives parameters in the same format as the +<code>\markdownRendererCite</code> macro.</p> +<h5 class="unnumbered" id="latex-example-65"><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="cb496"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb496-1"><a href="#cb496-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb496-2"><a href="#cb496-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> +<span id="cb496-3"><a href="#cb496-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\citationsCounter</span></span> +<span id="cb496-4"><a href="#cb496-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\citationsTotal</span></span> +<span id="cb496-5"><a href="#cb496-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatletter</span></span> +<span id="cb496-6"><a href="#cb496-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb496-7"><a href="#cb496-7" aria-hidden="true" tabindex="-1"></a> a text citation <span class="fu">\emph</span>{#4}</span> +<span id="cb496-8"><a href="#cb496-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb496-9"><a href="#cb496-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> +<span id="cb496-10"><a href="#cb496-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb496-11"><a href="#cb496-11" aria-hidden="true" tabindex="-1"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> +<span id="cb496-12"><a href="#cb496-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb496-13"><a href="#cb496-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb496-14"><a href="#cb496-14" aria-hidden="true" tabindex="-1"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> +<span id="cb496-15"><a href="#cb496-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb496-16"><a href="#cb496-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ </span>and a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> +<span id="cb496-17"><a href="#cb496-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb496-18"><a href="#cb496-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb496-19"><a href="#cb496-19" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> +<span id="cb496-20"><a href="#cb496-20" aria-hidden="true" tabindex="-1"></a> .<span class="co">%</span></span> +<span id="cb496-21"><a href="#cb496-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">\expandafter\@gobble</span></span> +<span id="cb496-22"><a href="#cb496-22" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb496-23"><a href="#cb496-23" aria-hidden="true" tabindex="-1"></a> , and</span> +<span id="cb496-24"><a href="#cb496-24" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi\citations</span>}</span> +<span id="cb496-25"><a href="#cb496-25" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatother</span></span> +<span id="cb496-26"><a href="#cb496-26" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb496-27"><a href="#cb496-27" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb496-28"><a href="#cb496-28" aria-hidden="true" tabindex="-1"></a> textCite = {<span class="co">%</span></span> +<span id="cb496-29"><a href="#cb496-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> +<span id="cb496-30"><a href="#cb496-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> +<span id="cb496-31"><a href="#cb496-31" aria-hidden="true" tabindex="-1"></a> This is</span> +<span id="cb496-32"><a href="#cb496-32" aria-hidden="true" tabindex="-1"></a> <span class="fu">\expandafter\citations</span></span> +<span id="cb496-33"><a href="#cb496-33" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb496-34"><a href="#cb496-34" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb496-35"><a href="#cb496-35" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb496-36"><a href="#cb496-36" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb496-37"><a href="#cb496-37" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb496-38"><a href="#cb496-38" aria-hidden="true" tabindex="-1"></a>@abrahams90 [pp. 12; also @eijkhout91]</span> +<span id="cb496-39"><a href="#cb496-39" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb496-40"><a href="#cb496-40" 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="cb497"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb497-1"><a href="#cb497-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 text:</p> +<blockquote> +<p>This is a text citation <em>abrahams90</em> with a postfix +<em>pp. 12</em>, and a citation <em>eijkhout91</em> with a prefix +<em>also</em>.</p> +</blockquote> +<h4 data-number="2.3.1.24" id="table-renderer"><span +class="header-section-number">2.3.1.24</span> Table Renderer</h4> +<p>The <code>\markdownRendererTable</code> macro represents a table. +This macro will only be produced, when the +<strong><code>pipeTables</code></strong> option is enabled. The macro +receives the parameters +<code>{</code>⟨<em>caption</em>⟩<code>}{</code>⟨<em>number of +rows</em>⟩<code>}{</code>⟨<em>number of columns</em>⟩<code>}</code> +followed by <code>{</code>⟨<em>alignments</em>⟩<code>}</code> and then +by <code>{</code>⟨<em>row</em>⟩<code>}</code> repeated ⟨<em>number of +rows</em>⟩ times, where ⟨<em>row</em>⟩ is +<code>{</code>⟨<em>column</em>⟩<code>}</code> repeated ⟨<em>number of +columns</em>⟩ times, ⟨<em>alignments</em>⟩ is ⟨<em>alignment</em>⟩ +repeated ⟨<em>number of columns</em>⟩ times, and ⟨<em>alignment</em>⟩ is +one of the following:</p> <ul> -<li><code>d</code> – The corresponding column has an unspecified (default) alignment.</li> +<li><code>d</code> – The corresponding column has an unspecified +(default) alignment.</li> <li><code>l</code> – The corresponding column is left-aligned.</li> <li><code>c</code> – The corresponding column is centered.</li> <li><code>r</code> – The corresponding column is right-aligned.</li> </ul> -<h5 class="unnumbered" data-number="" id="latex-example-65"><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="cb494"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb494-1"><a href="#cb494-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb494-2"><a href="#cb494-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> -<span id="cb494-3"><a href="#cb494-3" aria-hidden="true"></a><span class="fu">\newcount\rowCounter</span></span> -<span id="cb494-4"><a href="#cb494-4" aria-hidden="true"></a><span class="fu">\newcount\columnCounter</span></span> -<span id="cb494-5"><a href="#cb494-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb494-6"><a href="#cb494-6" aria-hidden="true"></a><span class="fu">\def\processRow</span>#1{<span class="co">%</span></span> -<span id="cb494-7"><a href="#cb494-7" aria-hidden="true"></a> <span class="fu">\columnCounter</span>=1<span class="co">%</span></span> -<span id="cb494-8"><a href="#cb494-8" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> -<span id="cb494-9"><a href="#cb494-9" aria-hidden="true"></a> As for the alignment,</span> -<span id="cb494-10"><a href="#cb494-10" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb494-11"><a href="#cb494-11" aria-hidden="true"></a> In row <span class="fu">\the\rowCounter</span>,</span> -<span id="cb494-12"><a href="#cb494-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb494-13"><a href="#cb494-13" aria-hidden="true"></a> <span class="fu">\processColumn</span>#1</span> -<span id="cb494-14"><a href="#cb494-14" aria-hidden="true"></a> <span class="fu">\advance\rowCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb494-15"><a href="#cb494-15" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>><span class="fu">\rowTotal\relax</span></span> -<span id="cb494-16"><a href="#cb494-16" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> -<span id="cb494-17"><a href="#cb494-17" aria-hidden="true"></a> <span class="fu">\fi\processRow</span>}<span class="co">%</span></span> -<span id="cb494-18"><a href="#cb494-18" aria-hidden="true"></a><span class="fu">\def\processColumn</span>#1{<span class="co">%</span></span> -<span id="cb494-19"><a href="#cb494-19" aria-hidden="true"></a> column number <span class="fu">\the\columnCounter</span>{}</span> -<span id="cb494-20"><a href="#cb494-20" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> -<span id="cb494-21"><a href="#cb494-21" aria-hidden="true"></a> <span class="fu">\if</span>#1d{}has default alignment<span class="fu">\fi</span></span> -<span id="cb494-22"><a href="#cb494-22" aria-hidden="true"></a> <span class="fu">\if</span>#1l{}is left-aligned<span class="fu">\fi</span></span> -<span id="cb494-23"><a href="#cb494-23" aria-hidden="true"></a> <span class="fu">\if</span>#1c{}is centered<span class="fu">\fi</span></span> -<span id="cb494-24"><a href="#cb494-24" aria-hidden="true"></a> <span class="fu">\if</span>#1r{}is right-aligned<span class="fu">\fi</span></span> -<span id="cb494-25"><a href="#cb494-25" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb494-26"><a href="#cb494-26" aria-hidden="true"></a> says <span class="fu">\emph</span>{#1}<span class="co">%</span></span> -<span id="cb494-27"><a href="#cb494-27" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb494-28"><a href="#cb494-28" aria-hidden="true"></a> <span class="fu">\advance\columnCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb494-29"><a href="#cb494-29" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span><<span class="fu">\columnTotal\relax</span>, <span class="fu">\fi</span></span> -<span id="cb494-30"><a href="#cb494-30" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span>=<span class="fu">\columnTotal\relax</span>, and <span class="fu">\fi</span></span> -<span id="cb494-31"><a href="#cb494-31" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span>><span class="fu">\columnTotal\relax</span></span> -<span id="cb494-32"><a href="#cb494-32" aria-hidden="true"></a> .<span class="fu">\expandafter\@gobble</span></span> -<span id="cb494-33"><a href="#cb494-33" aria-hidden="true"></a> <span class="fu">\fi\processColumn</span>}<span class="co">%</span></span> -<span id="cb494-34"><a href="#cb494-34" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb494-35"><a href="#cb494-35" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb494-36"><a href="#cb494-36" aria-hidden="true"></a> renderers = {</span> -<span id="cb494-37"><a href="#cb494-37" aria-hidden="true"></a> table = {<span class="co">%</span></span> -<span id="cb494-38"><a href="#cb494-38" aria-hidden="true"></a> This is a table with caption <span class="fu">\emph</span>{#1} that is #3 colums wide</span> -<span id="cb494-39"><a href="#cb494-39" aria-hidden="true"></a> and #2 rows long.</span> -<span id="cb494-40"><a href="#cb494-40" aria-hidden="true"></a> <span class="fu">\rowCounter</span>=0<span class="co">%</span></span> -<span id="cb494-41"><a href="#cb494-41" aria-hidden="true"></a> <span class="fu">\def\rowTotal</span>{#2}<span class="co">%</span></span> -<span id="cb494-42"><a href="#cb494-42" aria-hidden="true"></a> <span class="fu">\def\columnTotal</span>{#3}<span class="co">%</span></span> -<span id="cb494-43"><a href="#cb494-43" aria-hidden="true"></a> <span class="fu">\processRow</span></span> -<span id="cb494-44"><a href="#cb494-44" aria-hidden="true"></a> },</span> -<span id="cb494-45"><a href="#cb494-45" aria-hidden="true"></a> },</span> -<span id="cb494-46"><a href="#cb494-46" aria-hidden="true"></a>}</span> -<span id="cb494-47"><a href="#cb494-47" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb494-48"><a href="#cb494-48" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb494-49"><a href="#cb494-49" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb494-50"><a href="#cb494-50" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb494-51"><a href="#cb494-51" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb494-52"><a href="#cb494-52" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb494-53"><a href="#cb494-53" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb494-54"><a href="#cb494-54" aria-hidden="true"></a></span> -<span id="cb494-55"><a href="#cb494-55" aria-hidden="true"></a> : Demonstration of pipe table syntax</span> -<span id="cb494-56"><a href="#cb494-56" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb494-57"><a href="#cb494-57" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb495"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb495-1"><a href="#cb495-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<p>This is a table with caption <em>Demonstration of pipe table syntax</em> that is 4 colums wide and 4 rows long. As for the alignment, column number 1 is right-aligned, column number 2 is left-aligned, column number 3 has default alignment, and column number 4 is centered. In row 1, column number 1 says <em>Right</em>, column number 2 says <em>Left</em>, column number 3 says <em>Default</em>, and column number 4 says <em>Center</em>. In row 2, column number 1 says <em>12</em>, column number 2 says <em>12</em>, column number 3 says <em>12</em>, and column number 4 says <em>12</em>. In row 3, column number 1 says <em>123</em>, column number 2 says <em>123</em>, column number 3 says <em>123</em>, and column number 4 says <em>123</em>. In row 4, column number 1 says <em>1</em>, column number 2 says <em>1</em>, column number 3 says <em>1</em>, and column number 4 says <em>1</em>.</p> -</blockquote> -<h4 data-number="2.3.1.25" id="html-comment-renderers"><span class="header-section-number">2.3.1.25</span> HTML Comment Renderers</h4> -<p>The <code>\markdownRendererInlineHtmlComment</code> macro represents the contents of an inline <abbr>HTML</abbr> comment. This macro will only be produced, when the <strong><code>html</code></strong> option is enabled. The macro receives a single argument that corresponds to the contents of the <abbr>HTML</abbr> comment.</p> -<p>The <code>\markdownRendererBlockHtmlCommentBegin</code> and <code>\markdownRendererBlockHtmlCommentEnd</code> macros represent the beginning and the end of a block <abbr>HTML</abbr> comment. The macros receive no arguments.</p> -<h5 class="unnumbered" data-number="" id="latex-example-66"><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="cb496"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb496-1"><a href="#cb496-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb496-2"><a href="#cb496-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span> -<span id="cb496-3"><a href="#cb496-3" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span> -<span id="cb496-4"><a href="#cb496-4" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb496-5"><a href="#cb496-5" aria-hidden="true"></a> renderers = {</span> -<span id="cb496-6"><a href="#cb496-6" aria-hidden="true"></a> inlineHtmlComment = {<span class="fu">\marginnote</span>{#1}},</span> -<span id="cb496-7"><a href="#cb496-7" aria-hidden="true"></a> blockHtmlCommentBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span> -<span id="cb496-8"><a href="#cb496-8" aria-hidden="true"></a> blockHtmlCommentEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span> -<span id="cb496-9"><a href="#cb496-9" aria-hidden="true"></a> },</span> -<span id="cb496-10"><a href="#cb496-10" aria-hidden="true"></a>}</span> -<span id="cb496-11"><a href="#cb496-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb496-12"><a href="#cb496-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb496-13"><a href="#cb496-13" aria-hidden="true"></a>A useful use of inline HTML comments are side notes.</span> -<span id="cb496-14"><a href="#cb496-14" aria-hidden="true"></a><!-- Side notes are displayed in the horizontal margins next to the relevant</span> -<span id="cb496-15"><a href="#cb496-15" aria-hidden="true"></a>passages, which makes them *easier for the reader to find* than footnotes. --></span> -<span id="cb496-16"><a href="#cb496-16" aria-hidden="true"></a></span> -<span id="cb496-17"><a href="#cb496-17" aria-hidden="true"></a>We can render block HTML comments as blockquotes:</span> -<span id="cb496-18"><a href="#cb496-18" aria-hidden="true"></a></span> -<span id="cb496-19"><a href="#cb496-19" aria-hidden="true"></a><!--</span> -<span id="cb496-20"><a href="#cb496-20" aria-hidden="true"></a>Here is a block HTML comment with a code example that a programmer might understand:</span> -<span id="cb496-21"><a href="#cb496-21" aria-hidden="true"></a></span> -<span id="cb496-22"><a href="#cb496-22" aria-hidden="true"></a> foo = bar + baz - 42</span> -<span id="cb496-23"><a href="#cb496-23" aria-hidden="true"></a>--></span> -<span id="cb496-24"><a href="#cb496-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb496-25"><a href="#cb496-25" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb497"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb497-1"><a href="#cb497-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb497-2"><a href="#cb497-2" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following body text:</p> +<h5 class="unnumbered" id="latex-example-66"><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="cb498"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb498-1"><a href="#cb498-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb498-2"><a href="#cb498-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> +<span id="cb498-3"><a href="#cb498-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\rowCounter</span></span> +<span id="cb498-4"><a href="#cb498-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\newcount\columnCounter</span></span> +<span id="cb498-5"><a href="#cb498-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatletter</span></span> +<span id="cb498-6"><a href="#cb498-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\processRow</span>#1{<span class="co">%</span></span> +<span id="cb498-7"><a href="#cb498-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\columnCounter</span>=1<span class="co">%</span></span> +<span id="cb498-8"><a href="#cb498-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> +<span id="cb498-9"><a href="#cb498-9" aria-hidden="true" tabindex="-1"></a> As for the alignment,</span> +<span id="cb498-10"><a href="#cb498-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb498-11"><a href="#cb498-11" aria-hidden="true" tabindex="-1"></a> In row <span class="fu">\the\rowCounter</span>,</span> +<span id="cb498-12"><a href="#cb498-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb498-13"><a href="#cb498-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\processColumn</span>#1</span> +<span id="cb498-14"><a href="#cb498-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">\advance\rowCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb498-15"><a href="#cb498-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\rowCounter</span>><span class="fu">\rowTotal\relax</span></span> +<span id="cb498-16"><a href="#cb498-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\expandafter\@gobble</span></span> +<span id="cb498-17"><a href="#cb498-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi\processRow</span>}<span class="co">%</span></span> +<span id="cb498-18"><a href="#cb498-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\processColumn</span>#1{<span class="co">%</span></span> +<span id="cb498-19"><a href="#cb498-19" aria-hidden="true" tabindex="-1"></a> column number <span class="fu">\the\columnCounter</span>{}</span> +<span id="cb498-20"><a href="#cb498-20" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> +<span id="cb498-21"><a href="#cb498-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1d{}has default alignment<span class="fu">\fi</span></span> +<span id="cb498-22"><a href="#cb498-22" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1l{}is left-aligned<span class="fu">\fi</span></span> +<span id="cb498-23"><a href="#cb498-23" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1c{}is centered<span class="fu">\fi</span></span> +<span id="cb498-24"><a href="#cb498-24" aria-hidden="true" tabindex="-1"></a> <span class="fu">\if</span>#1r{}is right-aligned<span class="fu">\fi</span></span> +<span id="cb498-25"><a href="#cb498-25" aria-hidden="true" tabindex="-1"></a> <span class="fu">\else</span></span> +<span id="cb498-26"><a href="#cb498-26" aria-hidden="true" tabindex="-1"></a> says <span class="fu">\emph</span>{#1}<span class="co">%</span></span> +<span id="cb498-27"><a href="#cb498-27" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi</span></span> +<span id="cb498-28"><a href="#cb498-28" aria-hidden="true" tabindex="-1"></a> <span class="fu">\advance\columnCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb498-29"><a href="#cb498-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\columnCounter</span><<span class="fu">\columnTotal\relax</span>, <span class="fu">\fi</span></span> +<span id="cb498-30"><a href="#cb498-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\columnCounter</span>=<span class="fu">\columnTotal\relax</span>, and <span class="fu">\fi</span></span> +<span id="cb498-31"><a href="#cb498-31" aria-hidden="true" tabindex="-1"></a> <span class="fu">\ifnum\columnCounter</span>><span class="fu">\columnTotal\relax</span></span> +<span id="cb498-32"><a href="#cb498-32" aria-hidden="true" tabindex="-1"></a> .<span class="fu">\expandafter\@gobble</span></span> +<span id="cb498-33"><a href="#cb498-33" aria-hidden="true" tabindex="-1"></a> <span class="fu">\fi\processColumn</span>}<span class="co">%</span></span> +<span id="cb498-34"><a href="#cb498-34" aria-hidden="true" tabindex="-1"></a><span class="fu">\makeatother</span></span> +<span id="cb498-35"><a href="#cb498-35" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb498-36"><a href="#cb498-36" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb498-37"><a href="#cb498-37" aria-hidden="true" tabindex="-1"></a> table = {<span class="co">%</span></span> +<span id="cb498-38"><a href="#cb498-38" aria-hidden="true" tabindex="-1"></a> This is a table with caption <span class="fu">\emph</span>{#1} that is #3 colums wide</span> +<span id="cb498-39"><a href="#cb498-39" aria-hidden="true" tabindex="-1"></a> and #2 rows long.</span> +<span id="cb498-40"><a href="#cb498-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">\rowCounter</span>=0<span class="co">%</span></span> +<span id="cb498-41"><a href="#cb498-41" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\rowTotal</span>{#2}<span class="co">%</span></span> +<span id="cb498-42"><a href="#cb498-42" aria-hidden="true" tabindex="-1"></a> <span class="fu">\def\columnTotal</span>{#3}<span class="co">%</span></span> +<span id="cb498-43"><a href="#cb498-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">\processRow</span></span> +<span id="cb498-44"><a href="#cb498-44" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb498-45"><a href="#cb498-45" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb498-46"><a href="#cb498-46" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb498-47"><a href="#cb498-47" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb498-48"><a href="#cb498-48" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb498-49"><a href="#cb498-49" aria-hidden="true" tabindex="-1"></a>| Right | Left | Default | Center |</span> +<span id="cb498-50"><a href="#cb498-50" aria-hidden="true" tabindex="-1"></a>|------:|:-----|---------|:------:|</span> +<span id="cb498-51"><a href="#cb498-51" aria-hidden="true" tabindex="-1"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb498-52"><a href="#cb498-52" aria-hidden="true" tabindex="-1"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb498-53"><a href="#cb498-53" aria-hidden="true" tabindex="-1"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb498-54"><a href="#cb498-54" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb498-55"><a href="#cb498-55" aria-hidden="true" tabindex="-1"></a> : Demonstration of pipe table syntax</span> +<span id="cb498-56"><a href="#cb498-56" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb498-57"><a href="#cb498-57" 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="cb499"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb499-1"><a href="#cb499-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 text:</p> +<blockquote> +<p>This is a table with caption <em>Demonstration of pipe table +syntax</em> that is 4 colums wide and 4 rows long. As for the alignment, +column number 1 is right-aligned, column number 2 is left-aligned, +column number 3 has default alignment, and column number 4 is centered. +In row 1, column number 1 says <em>Right</em>, column number 2 says +<em>Left</em>, column number 3 says <em>Default</em>, and column number +4 says <em>Center</em>. In row 2, column number 1 says <em>12</em>, +column number 2 says <em>12</em>, column number 3 says <em>12</em>, and +column number 4 says <em>12</em>. In row 3, column number 1 says +<em>123</em>, column number 2 says <em>123</em>, column number 3 says +<em>123</em>, and column number 4 says <em>123</em>. In row 4, column +number 1 says <em>1</em>, column number 2 says <em>1</em>, column number +3 says <em>1</em>, and column number 4 says <em>1</em>.</p> +</blockquote> +<h4 data-number="2.3.1.25" id="html-comment-renderers"><span +class="header-section-number">2.3.1.25</span> HTML Comment +Renderers</h4> +<p>The <code>\markdownRendererInlineHtmlComment</code> macro represents +the contents of an inline <abbr>HTML</abbr> comment. This macro will +only be produced, when the <strong><code>html</code></strong> option is +enabled. The macro receives a single argument that corresponds to the +contents of the <abbr>HTML</abbr> comment.</p> +<p>The <code>\markdownRendererBlockHtmlCommentBegin</code> and +<code>\markdownRendererBlockHtmlCommentEnd</code> macros represent the +beginning and the end of a block <abbr>HTML</abbr> comment. The macros +receive no arguments.</p> +<h5 class="unnumbered" id="latex-example-67"><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="cb500"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb500-1"><a href="#cb500-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb500-2"><a href="#cb500-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span> +<span id="cb500-3"><a href="#cb500-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span> +<span id="cb500-4"><a href="#cb500-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb500-5"><a href="#cb500-5" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb500-6"><a href="#cb500-6" aria-hidden="true" tabindex="-1"></a> inlineHtmlComment = {<span class="fu">\marginnote</span>{#1}},</span> +<span id="cb500-7"><a href="#cb500-7" aria-hidden="true" tabindex="-1"></a> blockHtmlCommentBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span> +<span id="cb500-8"><a href="#cb500-8" aria-hidden="true" tabindex="-1"></a> blockHtmlCommentEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span> +<span id="cb500-9"><a href="#cb500-9" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb500-10"><a href="#cb500-10" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb500-11"><a href="#cb500-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb500-12"><a href="#cb500-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb500-13"><a href="#cb500-13" aria-hidden="true" tabindex="-1"></a>A useful use of inline HTML comments are side notes.</span> +<span id="cb500-14"><a href="#cb500-14" aria-hidden="true" tabindex="-1"></a><!-- Side notes are displayed in the horizontal margins next to the relevant</span> +<span id="cb500-15"><a href="#cb500-15" aria-hidden="true" tabindex="-1"></a>passages, which makes them *easier for the reader to find* than footnotes. --></span> +<span id="cb500-16"><a href="#cb500-16" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb500-17"><a href="#cb500-17" aria-hidden="true" tabindex="-1"></a>We can render block HTML comments as blockquotes:</span> +<span id="cb500-18"><a href="#cb500-18" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb500-19"><a href="#cb500-19" aria-hidden="true" tabindex="-1"></a><!--</span> +<span id="cb500-20"><a href="#cb500-20" aria-hidden="true" tabindex="-1"></a>Here is a block HTML comment with a code example that a programmer might understand:</span> +<span id="cb500-21"><a href="#cb500-21" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb500-22"><a href="#cb500-22" aria-hidden="true" tabindex="-1"></a> foo = bar + baz - 42</span> +<span id="cb500-23"><a href="#cb500-23" aria-hidden="true" tabindex="-1"></a>--></span> +<span id="cb500-24"><a href="#cb500-24" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb500-25"><a href="#cb500-25" 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="cb501"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb501-1"><a href="#cb501-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb501-2"><a href="#cb501-2" 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 body text:</p> <blockquote> <p>A useful use of HTML comments are side notes.</p> <p>We can render block HTML comments as blockquotes:</p> <blockquote> -<p>Here is a block HTML comment with a code example that a programmer might understand:</p> +<p>Here is a block HTML comment with a code example that a programmer +might understand:</p> <pre><code>foo = bar + baz - 42</code></pre> </blockquote> </blockquote> <p>The horizontal margins should contain the following text:</p> <blockquote> -<p>Side notes are displayed in the horizontal margins next to the relevant passages, which makes them <em>easier for the reader to find</em> than footnotes.</p> -</blockquote> -<h4 data-number="2.3.1.26" id="html-tag-and-element-renderers"><span class="header-section-number">2.3.1.26</span> HTML Tag and Element Renderers</h4> -<p>The <code>\markdownRendererInlineHtmlTag</code> macro represents an opening, closing, or empty inline <abbr>HTML</abbr> tag. This macro will only be produced, when the <strong><code>html</code></strong> option is enabled. The macro receives a single argument that corresponds to the contents of the <abbr>HTML</abbr> tag.</p> -<p>The <code>\markdownRendererInputBlockHtmlElement</code> macro represents a block <abbr>HTML</abbr> element. This macro will only be produced, when the <strong><code>html</code></strong> option is enabled. The macro receives a single argument that filename of a file containing the contents of the <abbr>HTML</abbr> element.</p> -<h5 class="unnumbered" data-number="" id="latex-example-67"><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="cb499"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb499-1"><a href="#cb499-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb499-2"><a href="#cb499-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span> -<span id="cb499-3"><a href="#cb499-3" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span> -<span id="cb499-4"><a href="#cb499-4" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span> -<span id="cb499-5"><a href="#cb499-5" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb499-6"><a href="#cb499-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb499-7"><a href="#cb499-7" aria-hidden="true"></a> inlineHtmlTag = {<span class="fu">\textbf</span>{#1}},</span> -<span id="cb499-8"><a href="#cb499-8" aria-hidden="true"></a> inputBlockHtmlElement = {<span class="fu">\verbatiminput</span>{#1}},</span> -<span id="cb499-9"><a href="#cb499-9" aria-hidden="true"></a> },</span> -<span id="cb499-10"><a href="#cb499-10" aria-hidden="true"></a>}</span> -<span id="cb499-11"><a href="#cb499-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb499-12"><a href="#cb499-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb499-13"><a href="#cb499-13" aria-hidden="true"></a><b>_Hello,_ world!</b><br/></span> -<span id="cb499-14"><a href="#cb499-14" aria-hidden="true"></a></span> -<span id="cb499-15"><a href="#cb499-15" aria-hidden="true"></a><div>_Hello,_ world!</div></span> -<span id="cb499-16"><a href="#cb499-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb499-17"><a href="#cb499-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb500"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb500-1"><a href="#cb500-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb500-2"><a href="#cb500-2" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following body text:</p> +<p>Side notes are displayed in the horizontal margins next to the +relevant passages, which makes them <em>easier for the reader to +find</em> than footnotes.</p> +</blockquote> +<h4 data-number="2.3.1.26" id="html-tag-and-element-renderers"><span +class="header-section-number">2.3.1.26</span> HTML Tag and Element +Renderers</h4> +<p>The <code>\markdownRendererInlineHtmlTag</code> macro represents an +opening, closing, or empty inline <abbr>HTML</abbr> tag. This macro will +only be produced, when the <strong><code>html</code></strong> option is +enabled. The macro receives a single argument that corresponds to the +contents of the <abbr>HTML</abbr> tag.</p> +<p>The <code>\markdownRendererInputBlockHtmlElement</code> macro +represents a block <abbr>HTML</abbr> element. This macro will only be +produced, when the <strong><code>html</code></strong> option is enabled. +The macro receives a single argument that filename of a file containing +the contents of the <abbr>HTML</abbr> element.</p> +<h5 class="unnumbered" id="latex-example-68"><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="cb503"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb503-1"><a href="#cb503-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb503-2"><a href="#cb503-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span> +<span id="cb503-3"><a href="#cb503-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span> +<span id="cb503-4"><a href="#cb503-4" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span> +<span id="cb503-5"><a href="#cb503-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb503-6"><a href="#cb503-6" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb503-7"><a href="#cb503-7" aria-hidden="true" tabindex="-1"></a> inlineHtmlTag = {<span class="fu">\textbf</span>{#1}},</span> +<span id="cb503-8"><a href="#cb503-8" aria-hidden="true" tabindex="-1"></a> inputBlockHtmlElement = {<span class="fu">\verbatiminput</span>{#1}},</span> +<span id="cb503-9"><a href="#cb503-9" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb503-10"><a href="#cb503-10" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb503-11"><a href="#cb503-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb503-12"><a href="#cb503-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb503-13"><a href="#cb503-13" aria-hidden="true" tabindex="-1"></a><b>_Hello,_ world!</b><br/></span> +<span id="cb503-14"><a href="#cb503-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb503-15"><a href="#cb503-15" aria-hidden="true" tabindex="-1"></a><div>_Hello,_ world!</div></span> +<span id="cb503-16"><a href="#cb503-16" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb503-17"><a href="#cb503-17" 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="cb504"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb504-1"><a href="#cb504-1" aria-hidden="true" tabindex="-1"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb504-2"><a href="#cb504-2" 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 body text:</p> <blockquote> <p><strong><b></strong>_Hello,_ world!<strong></b><br/></strong></p> <pre><code><div>_Hello,_ world!</div></code></pre> </blockquote> -<h4 data-number="2.3.1.27" id="attribute-renderers"><span class="header-section-number">2.3.1.27</span> Attribute Renderers</h4> -<p>The following macros are only produced, when the <strong><code>headerAttributes</code></strong> option is enabled.</p> -<p><code>\markdownRendererAttributeIdentifier</code> represents the ⟨<em>identifier</em>⟩ of a markdown element (<code>id="</code>⟨<em>identifier</em>⟩<code>"</code> in HTML and <code>#</code>⟨<em>identifier</em>⟩ in Markdown’s <strong><code>headerAttributes</code></strong> syntax extension). The macro receives a single attribute that corresponds to the ⟨<em>identifier</em>⟩.</p> -<p><code>\markdownRendererAttributeClassName</code> represents the ⟨<em>class name</em>⟩ of a markdown element (<code>class="</code>⟨<em>class name</em>⟩ …<code>"</code> in HTML and <code>.</code>⟨<em>class name</em>⟩ in Markdown’s <strong><code>headerAttributes</code></strong> syntax extension). The macro receives a single attribute that corresponds to the .</p> -<p><code>\markdownRendererAttributeKeyValue</code> represents a HTML attribute in the form ⟨<em>key</em>⟩<code>=</code>⟨<em>value</em>⟩ that is neither an identifier nor a class name. The macro receives two attributes that correspond to the ⟨<em>key</em>⟩ and the ⟨<em>value</em>⟩, respectively.</p> -<h5 class="unnumbered" data-number="" id="latex-example-68"><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="cb502"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb502-1"><a href="#cb502-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb502-2"><a href="#cb502-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes, underscores=false]{<span class="ex">markdown</span>}</span> -<span id="cb502-3"><a href="#cb502-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb502-4"><a href="#cb502-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb502-5"><a href="#cb502-5" aria-hidden="true"></a> attributeIdentifier = {<span class="co">%</span></span> -<span id="cb502-6"><a href="#cb502-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb502-7"><a href="#cb502-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(Identifier: #1)}</span> -<span id="cb502-8"><a href="#cb502-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb502-9"><a href="#cb502-9" aria-hidden="true"></a> },</span> -<span id="cb502-10"><a href="#cb502-10" aria-hidden="true"></a> attributeClassName = {<span class="co">%</span></span> -<span id="cb502-11"><a href="#cb502-11" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb502-12"><a href="#cb502-12" aria-hidden="true"></a> <span class="fu">\emph</span>{(Class name: #1)}</span> -<span id="cb502-13"><a href="#cb502-13" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb502-14"><a href="#cb502-14" aria-hidden="true"></a> },</span> -<span id="cb502-15"><a href="#cb502-15" aria-hidden="true"></a> attributeKeyValue = {<span class="co">%</span></span> -<span id="cb502-16"><a href="#cb502-16" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb502-17"><a href="#cb502-17" aria-hidden="true"></a> <span class="fu">\emph</span>{(Key: #1, Value: #2)}</span> -<span id="cb502-18"><a href="#cb502-18" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb502-19"><a href="#cb502-19" aria-hidden="true"></a> },</span> -<span id="cb502-20"><a href="#cb502-20" aria-hidden="true"></a> },</span> -<span id="cb502-21"><a href="#cb502-21" aria-hidden="true"></a>}</span> -<span id="cb502-22"><a href="#cb502-22" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb502-23"><a href="#cb502-23" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb502-24"><a href="#cb502-24" aria-hidden="true"></a></span> -<span id="cb502-25"><a href="#cb502-25" aria-hidden="true"></a># First top-level heading {jane=doe}</span> -<span id="cb502-26"><a href="#cb502-26" aria-hidden="true"></a></span> -<span id="cb502-27"><a href="#cb502-27" aria-hidden="true"></a>## A subheading {#identifier}</span> -<span id="cb502-28"><a href="#cb502-28" aria-hidden="true"></a></span> -<span id="cb502-29"><a href="#cb502-29" aria-hidden="true"></a># Second top-level heading {.class_name}</span> -<span id="cb502-30"><a href="#cb502-30" aria-hidden="true"></a></span> -<span id="cb502-31"><a href="#cb502-31" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb502-32"><a href="#cb502-32" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb503"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb503-1"><a href="#cb503-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.27" id="attribute-renderers"><span +class="header-section-number">2.3.1.27</span> Attribute Renderers</h4> +<p>The following macros are only produced, when the +<strong><code>headerAttributes</code></strong> option is enabled.</p> +<p><code>\markdownRendererAttributeIdentifier</code> represents the +⟨<em>identifier</em>⟩ of a markdown element +(<code>id="</code>⟨<em>identifier</em>⟩<code>"</code> in HTML and +<code>#</code>⟨<em>identifier</em>⟩ in Markdown’s +<strong><code>headerAttributes</code></strong> syntax extension). The +macro receives a single attribute that corresponds to the +⟨<em>identifier</em>⟩.</p> +<p><code>\markdownRendererAttributeClassName</code> represents the +⟨<em>class name</em>⟩ of a markdown element +(<code>class="</code>⟨<em>class name</em>⟩ …<code>"</code> in HTML and +<code>.</code>⟨<em>class name</em>⟩ in Markdown’s +<strong><code>headerAttributes</code></strong> syntax extension). The +macro receives a single attribute that corresponds to the .</p> +<p><code>\markdownRendererAttributeKeyValue</code> represents a HTML +attribute in the form ⟨<em>key</em>⟩<code>=</code>⟨<em>value</em>⟩ that +is neither an identifier nor a class name. The macro receives two +attributes that correspond to the ⟨<em>key</em>⟩ and the +⟨<em>value</em>⟩, respectively.</p> +<h5 class="unnumbered" id="latex-example-69"><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="cb506"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb506-1"><a href="#cb506-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb506-2"><a href="#cb506-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes, underscores=false]{<span class="ex">markdown</span>}</span> +<span id="cb506-3"><a href="#cb506-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb506-4"><a href="#cb506-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb506-5"><a href="#cb506-5" aria-hidden="true" tabindex="-1"></a> attributeIdentifier = {<span class="co">%</span></span> +<span id="cb506-6"><a href="#cb506-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb506-7"><a href="#cb506-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(Identifier: #1)}</span> +<span id="cb506-8"><a href="#cb506-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb506-9"><a href="#cb506-9" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb506-10"><a href="#cb506-10" aria-hidden="true" tabindex="-1"></a> attributeClassName = {<span class="co">%</span></span> +<span id="cb506-11"><a href="#cb506-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb506-12"><a href="#cb506-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(Class name: #1)}</span> +<span id="cb506-13"><a href="#cb506-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb506-14"><a href="#cb506-14" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb506-15"><a href="#cb506-15" aria-hidden="true" tabindex="-1"></a> attributeKeyValue = {<span class="co">%</span></span> +<span id="cb506-16"><a href="#cb506-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb506-17"><a href="#cb506-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(Key: #1, Value: #2)}</span> +<span id="cb506-18"><a href="#cb506-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb506-19"><a href="#cb506-19" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb506-20"><a href="#cb506-20" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb506-21"><a href="#cb506-21" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb506-22"><a href="#cb506-22" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb506-23"><a href="#cb506-23" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb506-24"><a href="#cb506-24" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb506-25"><a href="#cb506-25" aria-hidden="true" tabindex="-1"></a># First top-level heading {jane=doe}</span> +<span id="cb506-26"><a href="#cb506-26" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb506-27"><a href="#cb506-27" aria-hidden="true" tabindex="-1"></a>## A subheading {#identifier}</span> +<span id="cb506-28"><a href="#cb506-28" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb506-29"><a href="#cb506-29" aria-hidden="true" tabindex="-1"></a># Second top-level heading {.class_name}</span> +<span id="cb506-30"><a href="#cb506-30" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb506-31"><a href="#cb506-31" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb506-32"><a href="#cb506-32" 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="cb507"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb507-1"><a href="#cb507-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 text:</p> <blockquote> <h1 id="first-top-level-heading">First top-level heading</h1> <p><em>(Key: Jane, Value: Doe)</em></p> @@ -6759,41 +9383,52 @@ Thomas,Edison,1847</code></pre> <h1 id="second-top-level-heading">Second top-level heading</h1> <p><em>(Class name: class_name)</em></p> </blockquote> -<h4 data-number="2.3.1.28" id="header-attribute-context-renderers"><span class="header-section-number">2.3.1.28</span> Header Attribute Context Renderers</h4> -<p>The following macros are only produced, when the <strong><code>headerAttributes</code></strong> option is enabled.</p> -<p>The <code>\markdownRendererHeaderAttributeContextBegin</code> and <code>\markdownRendererHeaderAttributeContextEnd</code> macros represent the beginning and the end of a section in which the attributes of a heading apply. The macros receive no arguments.</p> -<h5 class="unnumbered" data-number="" id="latex-example-69"><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="cb504"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb504-1"><a href="#cb504-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb504-2"><a href="#cb504-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span> -<span id="cb504-3"><a href="#cb504-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb504-4"><a href="#cb504-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb504-5"><a href="#cb504-5" aria-hidden="true"></a> headerAttributeContextBegin = {<span class="co">%</span></span> -<span id="cb504-6"><a href="#cb504-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb504-7"><a href="#cb504-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a header attribute context)}</span> -<span id="cb504-8"><a href="#cb504-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb504-9"><a href="#cb504-9" aria-hidden="true"></a> },</span> -<span id="cb504-10"><a href="#cb504-10" aria-hidden="true"></a> headerAttributeContextBegin = {<span class="co">%</span></span> -<span id="cb504-11"><a href="#cb504-11" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb504-12"><a href="#cb504-12" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a header attribute context)}</span> -<span id="cb504-13"><a href="#cb504-13" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb504-14"><a href="#cb504-14" aria-hidden="true"></a> },</span> -<span id="cb504-15"><a href="#cb504-15" aria-hidden="true"></a> },</span> -<span id="cb504-16"><a href="#cb504-16" aria-hidden="true"></a>}</span> -<span id="cb504-17"><a href="#cb504-17" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb504-18"><a href="#cb504-18" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb504-19"><a href="#cb504-19" aria-hidden="true"></a></span> -<span id="cb504-20"><a href="#cb504-20" aria-hidden="true"></a># First top-level heading</span> -<span id="cb504-21"><a href="#cb504-21" aria-hidden="true"></a></span> -<span id="cb504-22"><a href="#cb504-22" aria-hidden="true"></a>## A subheading {#identifier}</span> -<span id="cb504-23"><a href="#cb504-23" aria-hidden="true"></a></span> -<span id="cb504-24"><a href="#cb504-24" aria-hidden="true"></a># Second top-level heading {.class_name}</span> -<span id="cb504-25"><a href="#cb504-25" aria-hidden="true"></a></span> -<span id="cb504-26"><a href="#cb504-26" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb504-27"><a href="#cb504-27" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb505"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb505-1"><a href="#cb505-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.28" id="header-attribute-context-renderers"><span +class="header-section-number">2.3.1.28</span> Header Attribute Context +Renderers</h4> +<p>The following macros are only produced, when the +<strong><code>headerAttributes</code></strong> option is enabled.</p> +<p>The <code>\markdownRendererHeaderAttributeContextBegin</code> and +<code>\markdownRendererHeaderAttributeContextEnd</code> macros represent +the beginning and the end of a section in which the attributes of a +heading apply. The macros receive no arguments.</p> +<h5 class="unnumbered" id="latex-example-70"><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="cb508"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb508-1"><a href="#cb508-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb508-2"><a href="#cb508-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span> +<span id="cb508-3"><a href="#cb508-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb508-4"><a href="#cb508-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb508-5"><a href="#cb508-5" aria-hidden="true" tabindex="-1"></a> headerAttributeContextBegin = {<span class="co">%</span></span> +<span id="cb508-6"><a href="#cb508-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb508-7"><a href="#cb508-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The beginning of a header attribute context)}</span> +<span id="cb508-8"><a href="#cb508-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb508-9"><a href="#cb508-9" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb508-10"><a href="#cb508-10" aria-hidden="true" tabindex="-1"></a> headerAttributeContextBegin = {<span class="co">%</span></span> +<span id="cb508-11"><a href="#cb508-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb508-12"><a href="#cb508-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\emph</span>{(The end of a header attribute context)}</span> +<span id="cb508-13"><a href="#cb508-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">\par</span></span> +<span id="cb508-14"><a href="#cb508-14" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb508-15"><a href="#cb508-15" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb508-16"><a href="#cb508-16" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb508-17"><a href="#cb508-17" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb508-18"><a href="#cb508-18" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb508-19"><a href="#cb508-19" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb508-20"><a href="#cb508-20" aria-hidden="true" tabindex="-1"></a># First top-level heading</span> +<span id="cb508-21"><a href="#cb508-21" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb508-22"><a href="#cb508-22" aria-hidden="true" tabindex="-1"></a>## A subheading {#identifier}</span> +<span id="cb508-23"><a href="#cb508-23" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb508-24"><a href="#cb508-24" aria-hidden="true" tabindex="-1"></a># Second top-level heading {.class_name}</span> +<span id="cb508-25"><a href="#cb508-25" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb508-26"><a href="#cb508-26" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb508-27"><a href="#cb508-27" 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="cb509"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb509-1"><a href="#cb509-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 text:</p> <blockquote> <h1 id="first-top-level-heading-1">First top-level heading</h1> <p><em>(The beginning of a header attribute context)</em></p> @@ -6803,350 +9438,465 @@ Thomas,Edison,1847</code></pre> <h1 id="second-top-level-heading-1">Second top-level heading</h1> <p><em>(The end of a header attribute context)</em></p> </blockquote> -<h4 data-number="2.3.1.29" id="strike-through-renderer"><span class="header-section-number">2.3.1.29</span> Strike-Through Renderer</h4> -<p>The <code>\markdownRendererStrikeThrough</code> macro represents a strike-through span of text. The macro receives a single argument that corresponds to the striked-out span of text. This macro will only be produced, when the <strong><code>strikeThrough</code></strong> option is enabled.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-34">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb506"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb506-1"><a href="#cb506-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb506-2"><a href="#cb506-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStrikeThrough</span>{true}</span> -<span id="cb506-3"><a href="#cb506-3" aria-hidden="true"></a><span class="fu">\input</span> soulutf8.sty</span> -<span id="cb506-4"><a href="#cb506-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\st</span>{#1}}</span> -<span id="cb506-5"><a href="#cb506-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb506-6"><a href="#cb506-6" aria-hidden="true"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> -<span id="cb506-7"><a href="#cb506-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb506-8"><a href="#cb506-8" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb507"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb507-1"><a href="#cb507-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.29" id="strike-through-renderer"><span +class="header-section-number">2.3.1.29</span> Strike-Through +Renderer</h4> +<p>The <code>\markdownRendererStrikeThrough</code> macro represents a +strike-through span of text. The macro receives a single argument that +corresponds to the striked-out span of text. This macro will only be +produced, when the <strong><code>strikeThrough</code></strong> option is +enabled.</p> +<h5 class="unnumbered" id="plain-tex-example-34">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb510"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb510-1"><a href="#cb510-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb510-2"><a href="#cb510-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionStrikeThrough</span>{true}</span> +<span id="cb510-3"><a href="#cb510-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> soulutf8.sty</span> +<span id="cb510-4"><a href="#cb510-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\st</span>{#1}}</span> +<span id="cb510-5"><a href="#cb510-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb510-6"><a href="#cb510-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> +<span id="cb510-7"><a href="#cb510-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb510-8"><a href="#cb510-8" 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="cb511"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb511-1"><a href="#cb511-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:</p> <blockquote> <p>This is <del>a lunar roving vehicle</del> strike-through text.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-70"><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="cb508"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb508-1"><a href="#cb508-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb508-2"><a href="#cb508-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[strikeThrough]{<span class="ex">markdown</span>}</span> -<span id="cb508-3"><a href="#cb508-3" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">soulutf8</span>}</span> -<span id="cb508-4"><a href="#cb508-4" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb508-5"><a href="#cb508-5" aria-hidden="true"></a> renderers = {</span> -<span id="cb508-6"><a href="#cb508-6" aria-hidden="true"></a> strikeThrough = {<span class="fu">\st</span>{#1}},</span> -<span id="cb508-7"><a href="#cb508-7" aria-hidden="true"></a> },</span> -<span id="cb508-8"><a href="#cb508-8" aria-hidden="true"></a>}</span> -<span id="cb508-9"><a href="#cb508-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb508-10"><a href="#cb508-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb508-11"><a href="#cb508-11" aria-hidden="true"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> -<span id="cb508-12"><a href="#cb508-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb508-13"><a href="#cb508-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb509"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb509-1"><a href="#cb509-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-71"><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="cb512"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb512-1"><a href="#cb512-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb512-2"><a href="#cb512-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[strikeThrough]{<span class="ex">markdown</span>}</span> +<span id="cb512-3"><a href="#cb512-3" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">soulutf8</span>}</span> +<span id="cb512-4"><a href="#cb512-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb512-5"><a href="#cb512-5" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb512-6"><a href="#cb512-6" aria-hidden="true" tabindex="-1"></a> strikeThrough = {<span class="fu">\st</span>{#1}},</span> +<span id="cb512-7"><a href="#cb512-7" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb512-8"><a href="#cb512-8" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb512-9"><a href="#cb512-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb512-10"><a href="#cb512-10" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb512-11"><a href="#cb512-11" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> +<span id="cb512-12"><a href="#cb512-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb512-13"><a href="#cb512-13" 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="cb513"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb513-1"><a href="#cb513-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 text:</p> <blockquote> <p>This is <del>a lunar roving vehicle</del> strike-through text.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-49">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb510"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb510-1"><a href="#cb510-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb510-2"><a href="#cb510-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[strikeThrough = yes]</span> -<span id="cb510-3"><a href="#cb510-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\overstrikes</span>{#1}}</span> -<span id="cb510-4"><a href="#cb510-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb510-5"><a href="#cb510-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb510-6"><a href="#cb510-6" aria-hidden="true"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> -<span id="cb510-7"><a href="#cb510-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb510-8"><a href="#cb510-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb511"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb511-1"><a href="#cb511-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-49">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb514"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb514-1"><a href="#cb514-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb514-2"><a href="#cb514-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[strikeThrough = yes]</span> +<span id="cb514-3"><a href="#cb514-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererStrikeThrough</span>#1{<span class="fu">\overstrikes</span>{#1}}</span> +<span id="cb514-4"><a href="#cb514-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb514-5"><a href="#cb514-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb514-6"><a href="#cb514-6" aria-hidden="true" tabindex="-1"></a>This is ~~a lunar roving vehicle~~ strike-through text.</span> +<span id="cb514-7"><a href="#cb514-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb514-8"><a href="#cb514-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb515"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb515-1"><a href="#cb515-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>This is <del>a lunar roving vehicle</del> strike-through text.</p> </blockquote> -<h4 data-number="2.3.1.30" id="superscript-renderer"><span class="header-section-number">2.3.1.30</span> Superscript Renderer</h4> -<p>The <code>\markdownRendererSuperscript</code> macro represents a superscript span of text. The macro receives a single argument that corresponds to the superscript span of text. This macro will only be produced, when the <strong><code>superscripts</code></strong> option is enabled.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-35">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb512"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb512-1"><a href="#cb512-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb512-2"><a href="#cb512-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSuperscripts</span>{true}</span> -<span id="cb512-3"><a href="#cb512-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererSuperscript</span>#1{ taken to the power of #1}</span> -<span id="cb512-4"><a href="#cb512-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb512-5"><a href="#cb512-5" aria-hidden="true"></a>2^10^ is 1024.</span> -<span id="cb512-6"><a href="#cb512-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb512-7"><a href="#cb512-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb513"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb513-1"><a href="#cb513-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.30" id="superscript-renderer"><span +class="header-section-number">2.3.1.30</span> Superscript Renderer</h4> +<p>The <code>\markdownRendererSuperscript</code> macro represents a +superscript span of text. The macro receives a single argument that +corresponds to the superscript span of text. This macro will only be +produced, when the <strong><code>superscripts</code></strong> option is +enabled.</p> +<h5 class="unnumbered" id="plain-tex-example-35">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb516"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb516-1"><a href="#cb516-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb516-2"><a href="#cb516-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSuperscripts</span>{true}</span> +<span id="cb516-3"><a href="#cb516-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererSuperscript</span>#1{ taken to the power of #1}</span> +<span id="cb516-4"><a href="#cb516-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb516-5"><a href="#cb516-5" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span> +<span id="cb516-6"><a href="#cb516-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb516-7"><a href="#cb516-7" 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="cb517"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb517-1"><a href="#cb517-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:</p> <blockquote> <p>2 taken to the power of 10 is 1024.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-71"><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="cb514"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb514-1"><a href="#cb514-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb514-2"><a href="#cb514-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[superscripts]{<span class="ex">markdown</span>}</span> -<span id="cb514-3"><a href="#cb514-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb514-4"><a href="#cb514-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb514-5"><a href="#cb514-5" aria-hidden="true"></a> superscript = { taken to the power of #1},</span> -<span id="cb514-6"><a href="#cb514-6" aria-hidden="true"></a> },</span> -<span id="cb514-7"><a href="#cb514-7" aria-hidden="true"></a>}</span> -<span id="cb514-8"><a href="#cb514-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb514-9"><a href="#cb514-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb514-10"><a href="#cb514-10" aria-hidden="true"></a>2^10^ is 1024.</span> -<span id="cb514-11"><a href="#cb514-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb514-12"><a href="#cb514-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb515"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb515-1"><a href="#cb515-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-72"><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="cb518"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb518-1"><a href="#cb518-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb518-2"><a href="#cb518-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[superscripts]{<span class="ex">markdown</span>}</span> +<span id="cb518-3"><a href="#cb518-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb518-4"><a href="#cb518-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb518-5"><a href="#cb518-5" aria-hidden="true" tabindex="-1"></a> superscript = { taken to the power of #1},</span> +<span id="cb518-6"><a href="#cb518-6" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb518-7"><a href="#cb518-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb518-8"><a href="#cb518-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb518-9"><a href="#cb518-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb518-10"><a href="#cb518-10" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span> +<span id="cb518-11"><a href="#cb518-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb518-12"><a href="#cb518-12" 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="cb519"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb519-1"><a href="#cb519-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 text:</p> <blockquote> <p>2 taken to the power of 10 is 1024.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-50">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb516"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb516-1"><a href="#cb516-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb516-2"><a href="#cb516-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[superscripts = yes]</span> -<span id="cb516-3"><a href="#cb516-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererSuperscript</span>#1{ taken to the power of #1}</span> -<span id="cb516-4"><a href="#cb516-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb516-5"><a href="#cb516-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb516-6"><a href="#cb516-6" aria-hidden="true"></a>2^10^ is 1024.</span> -<span id="cb516-7"><a href="#cb516-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb516-8"><a href="#cb516-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb517"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb517-1"><a href="#cb517-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-50">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb520"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb520-1"><a href="#cb520-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb520-2"><a href="#cb520-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[superscripts = yes]</span> +<span id="cb520-3"><a href="#cb520-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererSuperscript</span>#1{ taken to the power of #1}</span> +<span id="cb520-4"><a href="#cb520-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb520-5"><a href="#cb520-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb520-6"><a href="#cb520-6" aria-hidden="true" tabindex="-1"></a>2^10^ is 1024.</span> +<span id="cb520-7"><a href="#cb520-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb520-8"><a href="#cb520-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb521"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb521-1"><a href="#cb521-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>2 taken to the power of 10 is 1024.</p> </blockquote> -<h4 data-number="2.3.1.31" id="subscript-renderer"><span class="header-section-number">2.3.1.31</span> Subscript Renderer</h4> -<p>The <code>\markdownRendererSubscript</code> macro represents a subscript span of text. The macro receives a single argument that corresponds to the subscript span of text. This macro will only be produced, when the <strong><code>subscripts</code></strong> option is enabled.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-36">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb518"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb518-1"><a href="#cb518-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb518-2"><a href="#cb518-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSubscripts</span>{true}</span> -<span id="cb518-3"><a href="#cb518-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererSubscript</span>#1{ (#1 moles) and }</span> -<span id="cb518-4"><a href="#cb518-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb518-5"><a href="#cb518-5" aria-hidden="true"></a>H~2~O is a liquid.</span> -<span id="cb518-6"><a href="#cb518-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb518-7"><a href="#cb518-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb519"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb519-1"><a href="#cb519-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.1.31" id="subscript-renderer"><span +class="header-section-number">2.3.1.31</span> Subscript Renderer</h4> +<p>The <code>\markdownRendererSubscript</code> macro represents a +subscript span of text. The macro receives a single argument that +corresponds to the subscript span of text. This macro will only be +produced, when the <strong><code>subscripts</code></strong> option is +enabled.</p> +<h5 class="unnumbered" id="plain-tex-example-36">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb522"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb522-1"><a href="#cb522-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb522-2"><a href="#cb522-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionSubscripts</span>{true}</span> +<span id="cb522-3"><a href="#cb522-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererSubscript</span>#1{ (#1 moles) and }</span> +<span id="cb522-4"><a href="#cb522-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb522-5"><a href="#cb522-5" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span> +<span id="cb522-6"><a href="#cb522-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb522-7"><a href="#cb522-7" 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="cb523"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb523-1"><a href="#cb523-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:</p> <blockquote> <p>H (2 moles) and O is liquid.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-72"><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="cb520"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb520-1"><a href="#cb520-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb520-2"><a href="#cb520-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[subscripts]{<span class="ex">markdown</span>}</span> -<span id="cb520-3"><a href="#cb520-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb520-4"><a href="#cb520-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb520-5"><a href="#cb520-5" aria-hidden="true"></a> subscript = { (#1 moles) and },</span> -<span id="cb520-6"><a href="#cb520-6" aria-hidden="true"></a> },</span> -<span id="cb520-7"><a href="#cb520-7" aria-hidden="true"></a>}</span> -<span id="cb520-8"><a href="#cb520-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb520-9"><a href="#cb520-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb520-10"><a href="#cb520-10" aria-hidden="true"></a>H~2~O is a liquid.</span> -<span id="cb520-11"><a href="#cb520-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb520-12"><a href="#cb520-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb521"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb521-1"><a href="#cb521-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-73"><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="cb524"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb524-1"><a href="#cb524-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb524-2"><a href="#cb524-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[subscripts]{<span class="ex">markdown</span>}</span> +<span id="cb524-3"><a href="#cb524-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb524-4"><a href="#cb524-4" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb524-5"><a href="#cb524-5" aria-hidden="true" tabindex="-1"></a> subscript = { (#1 moles) and },</span> +<span id="cb524-6"><a href="#cb524-6" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb524-7"><a href="#cb524-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb524-8"><a href="#cb524-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb524-9"><a href="#cb524-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb524-10"><a href="#cb524-10" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span> +<span id="cb524-11"><a href="#cb524-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb524-12"><a href="#cb524-12" 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="cb525"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb525-1"><a href="#cb525-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 text:</p> <blockquote> <p>H (2 moles) and O is liquid.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-51">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb522"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb522-1"><a href="#cb522-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb522-2"><a href="#cb522-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[subscripts = yes]</span> -<span id="cb522-3"><a href="#cb522-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererSubscript</span>#1{ (#1 moles) and }</span> -<span id="cb522-4"><a href="#cb522-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb522-5"><a href="#cb522-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb522-6"><a href="#cb522-6" aria-hidden="true"></a>H~2~O is a liquid.</span> -<span id="cb522-7"><a href="#cb522-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb522-8"><a href="#cb522-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb523"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb523-1"><a href="#cb523-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-51">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb526"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb526-1"><a href="#cb526-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb526-2"><a href="#cb526-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[subscripts = yes]</span> +<span id="cb526-3"><a href="#cb526-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererSubscript</span>#1{ (#1 moles) and }</span> +<span id="cb526-4"><a href="#cb526-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb526-5"><a href="#cb526-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb526-6"><a href="#cb526-6" aria-hidden="true" tabindex="-1"></a>H~2~O is a liquid.</span> +<span id="cb526-7"><a href="#cb526-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb526-8"><a href="#cb526-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb527"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb527-1"><a href="#cb527-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>H (2 moles) and O is liquid.</p> </blockquote> -<h3 data-number="2.3.2" id="texrendererprototypes"><span class="header-section-number">2.3.2</span> Token Renderer Prototypes</h3> -<p>By default, token renderers point to package-defined <span class="tex">T<sub>e</sub>X</span> macros, further referred to as <em>prototypes</em>, which provide useful default definitions.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-37">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb524"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb524-1"><a href="#cb524-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb524-2"><a href="#cb524-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> -<span id="cb524-3"><a href="#cb524-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> -<span id="cb524-4"><a href="#cb524-4" aria-hidden="true"></a>}</span> -<span id="cb524-5"><a href="#cb524-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb524-6"><a href="#cb524-6" aria-hidden="true"></a>~</span> -<span id="cb524-7"><a href="#cb524-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb524-8"><a href="#cb524-8" aria-hidden="true"></a></span> -<span id="cb524-9"><a href="#cb524-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> -<span id="cb524-10"><a href="#cb524-10" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</span></span> -<span id="cb524-11"><a href="#cb524-11" aria-hidden="true"></a>}</span> -<span id="cb524-12"><a href="#cb524-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb524-13"><a href="#cb524-13" aria-hidden="true"></a>~</span> -<span id="cb524-14"><a href="#cb524-14" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb524-15"><a href="#cb524-15" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb525"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb525-1"><a href="#cb525-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h3 data-number="2.3.2" id="texrendererprototypes"><span +class="header-section-number">2.3.2</span> Token Renderer +Prototypes</h3> +<p>By default, token renderers point to package-defined <span +class="tex">T<sub>e</sub>X</span> macros, further referred to as +<em>prototypes</em>, which provide useful default definitions.</p> +<h5 class="unnumbered" id="plain-tex-example-37">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb528"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb528-1"><a href="#cb528-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb528-2"><a href="#cb528-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> +<span id="cb528-3"><a href="#cb528-3" aria-hidden="true" tabindex="-1"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> +<span id="cb528-4"><a href="#cb528-4" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb528-5"><a href="#cb528-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb528-6"><a href="#cb528-6" aria-hidden="true" tabindex="-1"></a>~</span> +<span id="cb528-7"><a href="#cb528-7" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb528-8"><a href="#cb528-8" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb528-9"><a href="#cb528-9" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> +<span id="cb528-10"><a href="#cb528-10" aria-hidden="true" tabindex="-1"></a> User-defined token renderers take precedence.<span class="co">%</span></span> +<span id="cb528-11"><a href="#cb528-11" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb528-12"><a href="#cb528-12" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb528-13"><a href="#cb528-13" aria-hidden="true" tabindex="-1"></a>~</span> +<span id="cb528-14"><a href="#cb528-14" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb528-15"><a href="#cb528-15" 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="cb529"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb529-1"><a href="#cb529-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:</p> <blockquote> <p>Packages can specify token renderer prototypes.</p> <p>User-defined token renderers take precedence.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-73"><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="cb526"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb526-1"><a href="#cb526-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb526-2"><a href="#cb526-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb526-3"><a href="#cb526-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb526-4"><a href="#cb526-4" aria-hidden="true"></a> rendererPrototypes = {</span> -<span id="cb526-5"><a href="#cb526-5" aria-hidden="true"></a> tilde = {Packages can specify token renderer prototypes.},</span> -<span id="cb526-6"><a href="#cb526-6" aria-hidden="true"></a> },</span> -<span id="cb526-7"><a href="#cb526-7" aria-hidden="true"></a>}</span> -<span id="cb526-8"><a href="#cb526-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb526-9"><a href="#cb526-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb526-10"><a href="#cb526-10" aria-hidden="true"></a>~</span> -<span id="cb526-11"><a href="#cb526-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb526-12"><a href="#cb526-12" aria-hidden="true"></a></span> -<span id="cb526-13"><a href="#cb526-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb526-14"><a href="#cb526-14" aria-hidden="true"></a> renderers = {</span> -<span id="cb526-15"><a href="#cb526-15" aria-hidden="true"></a> tilde = {User-defined token renderers take precedence.},</span> -<span id="cb526-16"><a href="#cb526-16" aria-hidden="true"></a> },</span> -<span id="cb526-17"><a href="#cb526-17" aria-hidden="true"></a>}</span> -<span id="cb526-18"><a href="#cb526-18" aria-hidden="true"></a>~</span> -<span id="cb526-19"><a href="#cb526-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb526-20"><a href="#cb526-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb527"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb527-1"><a href="#cb527-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-74"><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="cb530"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb530-1"><a href="#cb530-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb530-2"><a href="#cb530-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb530-3"><a href="#cb530-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb530-4"><a href="#cb530-4" aria-hidden="true" tabindex="-1"></a> rendererPrototypes = {</span> +<span id="cb530-5"><a href="#cb530-5" aria-hidden="true" tabindex="-1"></a> tilde = {Packages can specify token renderer prototypes.},</span> +<span id="cb530-6"><a href="#cb530-6" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb530-7"><a href="#cb530-7" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb530-8"><a href="#cb530-8" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb530-9"><a href="#cb530-9" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb530-10"><a href="#cb530-10" aria-hidden="true" tabindex="-1"></a>~</span> +<span id="cb530-11"><a href="#cb530-11" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb530-12"><a href="#cb530-12" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb530-13"><a href="#cb530-13" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb530-14"><a href="#cb530-14" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb530-15"><a href="#cb530-15" aria-hidden="true" tabindex="-1"></a> tilde = {User-defined token renderers take precedence.},</span> +<span id="cb530-16"><a href="#cb530-16" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb530-17"><a href="#cb530-17" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb530-18"><a href="#cb530-18" aria-hidden="true" tabindex="-1"></a>~</span> +<span id="cb530-19"><a href="#cb530-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb530-20"><a href="#cb530-20" 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="cb531"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb531-1"><a href="#cb531-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 text:</p> <blockquote> <p>Packages can specify token renderer prototypes.</p> <p>User-defined token renderers take precedence.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-52">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb528"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb528-1"><a href="#cb528-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb528-2"><a href="#cb528-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> -<span id="cb528-3"><a href="#cb528-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> -<span id="cb528-4"><a href="#cb528-4" aria-hidden="true"></a>}</span> -<span id="cb528-5"><a href="#cb528-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb528-6"><a href="#cb528-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb528-7"><a href="#cb528-7" aria-hidden="true"></a>~</span> -<span id="cb528-8"><a href="#cb528-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb528-9"><a href="#cb528-9" aria-hidden="true"></a></span> -<span id="cb528-10"><a href="#cb528-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> -<span id="cb528-11"><a href="#cb528-11" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</span></span> -<span id="cb528-12"><a href="#cb528-12" aria-hidden="true"></a>}</span> -<span id="cb528-13"><a href="#cb528-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb528-14"><a href="#cb528-14" aria-hidden="true"></a>~</span> -<span id="cb528-15"><a href="#cb528-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb528-16"><a href="#cb528-16" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb529"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb529-1"><a href="#cb529-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-52">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb532"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb532-1"><a href="#cb532-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb532-2"><a href="#cb532-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> +<span id="cb532-3"><a href="#cb532-3" aria-hidden="true" tabindex="-1"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> +<span id="cb532-4"><a href="#cb532-4" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb532-5"><a href="#cb532-5" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb532-6"><a href="#cb532-6" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb532-7"><a href="#cb532-7" aria-hidden="true" tabindex="-1"></a>~</span> +<span id="cb532-8"><a href="#cb532-8" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb532-9"><a href="#cb532-9" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb532-10"><a href="#cb532-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> +<span id="cb532-11"><a href="#cb532-11" aria-hidden="true" tabindex="-1"></a> User-defined token renderers take precedence.<span class="co">%</span></span> +<span id="cb532-12"><a href="#cb532-12" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb532-13"><a href="#cb532-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb532-14"><a href="#cb532-14" aria-hidden="true" tabindex="-1"></a>~</span> +<span id="cb532-15"><a href="#cb532-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb532-16"><a href="#cb532-16" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb533"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb533-1"><a href="#cb533-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>Packages can specify token renderer prototypes.</p> <p>User-defined token renderers take precedence.</p> </blockquote> -<h4 data-number="2.3.2.1" id="expl3yamlmetadata"><span class="header-section-number">2.3.2.1</span> YAML Metadata Renderer Prototypes</h4> -<p>By default, the renderer prototypes for YAML metadata provide a high-level interface that can be programmed using the <code>markdown/jekyllData</code> key–values from the l3keys module of the 3 kernel.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-38">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb530"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb530-1"><a href="#cb530-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb530-2"><a href="#cb530-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> -<span id="cb530-3"><a href="#cb530-3" aria-hidden="true"></a><span class="fu">\ExplSyntaxOn</span></span> -<span id="cb530-4"><a href="#cb530-4" aria-hidden="true"></a><span class="fu">\keys</span>_define:nn</span> -<span id="cb530-5"><a href="#cb530-5" aria-hidden="true"></a> { markdown/jekyllData }</span> -<span id="cb530-6"><a href="#cb530-6" aria-hidden="true"></a> {</span> -<span id="cb530-7"><a href="#cb530-7" aria-hidden="true"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> -<span id="cb530-8"><a href="#cb530-8" aria-hidden="true"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> -<span id="cb530-9"><a href="#cb530-9" aria-hidden="true"></a> }</span> -<span id="cb530-10"><a href="#cb530-10" aria-hidden="true"></a><span class="fu">\ExplSyntaxOff</span></span> -<span id="cb530-11"><a href="#cb530-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb530-12"><a href="#cb530-12" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb530-13"><a href="#cb530-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb530-14"><a href="#cb530-14" aria-hidden="true"></a>---</span> -<span id="cb530-15"><a href="#cb530-15" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb530-16"><a href="#cb530-16" aria-hidden="true"></a>age: 99</span> -<span id="cb530-17"><a href="#cb530-17" aria-hidden="true"></a>---</span> -<span id="cb530-18"><a href="#cb530-18" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb530-19"><a href="#cb530-19" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb531"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb531-1"><a href="#cb531-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h4 data-number="2.3.2.1" id="expl3yamlmetadata"><span +class="header-section-number">2.3.2.1</span> YAML Metadata Renderer +Prototypes</h4> +<p>By default, the renderer prototypes for YAML metadata provide a +high-level interface that can be programmed using the +<code>markdown/jekyllData</code> key–values from the l3keys module of +the 3 kernel.</p> +<h5 class="unnumbered" id="plain-tex-example-38">Plain <span +class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb534"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb534-1"><a href="#cb534-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\input</span> markdown</span> +<span id="cb534-2"><a href="#cb534-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb534-3"><a href="#cb534-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span> +<span id="cb534-4"><a href="#cb534-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span> +<span id="cb534-5"><a href="#cb534-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span> +<span id="cb534-6"><a href="#cb534-6" aria-hidden="true" tabindex="-1"></a> {</span> +<span id="cb534-7"><a href="#cb534-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> +<span id="cb534-8"><a href="#cb534-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> +<span id="cb534-9"><a href="#cb534-9" aria-hidden="true" tabindex="-1"></a> }</span> +<span id="cb534-10"><a href="#cb534-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span> +<span id="cb534-11"><a href="#cb534-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb534-12"><a href="#cb534-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb534-13"><a href="#cb534-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownBegin</span></span> +<span id="cb534-14"><a href="#cb534-14" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb534-15"><a href="#cb534-15" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span> +<span id="cb534-16"><a href="#cb534-16" aria-hidden="true" tabindex="-1"></a>age: 99</span> +<span id="cb534-17"><a href="#cb534-17" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb534-18"><a href="#cb534-18" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownEnd</span></span> +<span id="cb534-19"><a href="#cb534-19" 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="cb535"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb535-1"><a href="#cb535-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:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-74"><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="cb532"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb532-1"><a href="#cb532-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb532-2"><a href="#cb532-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> -<span id="cb532-3"><a href="#cb532-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb532-4"><a href="#cb532-4" aria-hidden="true"></a> jekyllDataRenderers = {</span> -<span id="cb532-5"><a href="#cb532-5" aria-hidden="true"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span> -<span id="cb532-6"><a href="#cb532-6" aria-hidden="true"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span> -<span id="cb532-7"><a href="#cb532-7" aria-hidden="true"></a> },</span> -<span id="cb532-8"><a href="#cb532-8" aria-hidden="true"></a> renderers = {</span> -<span id="cb532-9"><a href="#cb532-9" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> -<span id="cb532-10"><a href="#cb532-10" aria-hidden="true"></a> }</span> -<span id="cb532-11"><a href="#cb532-11" aria-hidden="true"></a>}</span> -<span id="cb532-12"><a href="#cb532-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb532-13"><a href="#cb532-13" aria-hidden="true"></a></span> -<span id="cb532-14"><a href="#cb532-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb532-15"><a href="#cb532-15" aria-hidden="true"></a>---</span> -<span id="cb532-16"><a href="#cb532-16" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb532-17"><a href="#cb532-17" aria-hidden="true"></a>age: 99</span> -<span id="cb532-18"><a href="#cb532-18" aria-hidden="true"></a>---</span> -<span id="cb532-19"><a href="#cb532-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb532-20"><a href="#cb532-20" aria-hidden="true"></a></span> -<span id="cb532-21"><a href="#cb532-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb533"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb533-1"><a href="#cb533-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="latex-example-75"><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="cb536"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb536-1"><a href="#cb536-1" aria-hidden="true" tabindex="-1"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb536-2"><a href="#cb536-2" aria-hidden="true" tabindex="-1"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb536-3"><a href="#cb536-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb536-4"><a href="#cb536-4" aria-hidden="true" tabindex="-1"></a> jekyllDataRenderers = {</span> +<span id="cb536-5"><a href="#cb536-5" aria-hidden="true" tabindex="-1"></a> name = {<span class="fu">\gdef\name</span>{#1}},</span> +<span id="cb536-6"><a href="#cb536-6" aria-hidden="true" tabindex="-1"></a> code = {<span class="fu">\gdef\age</span>{#1}},</span> +<span id="cb536-7"><a href="#cb536-7" aria-hidden="true" tabindex="-1"></a> },</span> +<span id="cb536-8"><a href="#cb536-8" aria-hidden="true" tabindex="-1"></a> renderers = {</span> +<span id="cb536-9"><a href="#cb536-9" aria-hidden="true" tabindex="-1"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> +<span id="cb536-10"><a href="#cb536-10" aria-hidden="true" tabindex="-1"></a> }</span> +<span id="cb536-11"><a href="#cb536-11" aria-hidden="true" tabindex="-1"></a>}</span> +<span id="cb536-12"><a href="#cb536-12" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb536-13"><a href="#cb536-13" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb536-14"><a href="#cb536-14" aria-hidden="true" tabindex="-1"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb536-15"><a href="#cb536-15" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb536-16"><a href="#cb536-16" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span> +<span id="cb536-17"><a href="#cb536-17" aria-hidden="true" tabindex="-1"></a>age: 99</span> +<span id="cb536-18"><a href="#cb536-18" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb536-19"><a href="#cb536-19" aria-hidden="true" tabindex="-1"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb536-20"><a href="#cb536-20" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb536-21"><a href="#cb536-21" 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="cb537"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb537-1"><a href="#cb537-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 text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-53">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb534"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb534-1"><a href="#cb534-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb534-2"><a href="#cb534-2" aria-hidden="true"></a><span class="fu">\setupmarkdown</span>[jekyllData = yes]</span> -<span id="cb534-3"><a href="#cb534-3" aria-hidden="true"></a><span class="fu">\ExplSyntaxOn</span></span> -<span id="cb534-4"><a href="#cb534-4" aria-hidden="true"></a><span class="fu">\keys</span>_define:nn</span> -<span id="cb534-5"><a href="#cb534-5" aria-hidden="true"></a> { markdown/jekyllData }</span> -<span id="cb534-6"><a href="#cb534-6" aria-hidden="true"></a> {</span> -<span id="cb534-7"><a href="#cb534-7" aria-hidden="true"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> -<span id="cb534-8"><a href="#cb534-8" aria-hidden="true"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> -<span id="cb534-9"><a href="#cb534-9" aria-hidden="true"></a> }</span> -<span id="cb534-10"><a href="#cb534-10" aria-hidden="true"></a><span class="fu">\ExplSyntaxOff</span></span> -<span id="cb534-11"><a href="#cb534-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb534-12"><a href="#cb534-12" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb534-13"><a href="#cb534-13" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb534-14"><a href="#cb534-14" aria-hidden="true"></a></span> -<span id="cb534-15"><a href="#cb534-15" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb534-16"><a href="#cb534-16" aria-hidden="true"></a>---</span> -<span id="cb534-17"><a href="#cb534-17" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb534-18"><a href="#cb534-18" aria-hidden="true"></a>age: 99</span> -<span id="cb534-19"><a href="#cb534-19" aria-hidden="true"></a>---</span> -<span id="cb534-20"><a href="#cb534-20" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb534-21"><a href="#cb534-21" aria-hidden="true"></a></span> -<span id="cb534-22"><a href="#cb534-22" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb535"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb535-1"><a href="#cb535-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<h5 class="unnumbered" id="context-example-53">Con<span +class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named +<code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb538"><pre +class="sourceCode tex"><code class="sourceCode latex"><span id="cb538-1"><a href="#cb538-1" aria-hidden="true" tabindex="-1"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb538-2"><a href="#cb538-2" aria-hidden="true" tabindex="-1"></a><span class="fu">\setupmarkdown</span>[jekyllData = yes]</span> +<span id="cb538-3"><a href="#cb538-3" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOn</span></span> +<span id="cb538-4"><a href="#cb538-4" aria-hidden="true" tabindex="-1"></a><span class="fu">\keys</span>_define:nn</span> +<span id="cb538-5"><a href="#cb538-5" aria-hidden="true" tabindex="-1"></a> { markdown/jekyllData }</span> +<span id="cb538-6"><a href="#cb538-6" aria-hidden="true" tabindex="-1"></a> {</span> +<span id="cb538-7"><a href="#cb538-7" aria-hidden="true" tabindex="-1"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> +<span id="cb538-8"><a href="#cb538-8" aria-hidden="true" tabindex="-1"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> +<span id="cb538-9"><a href="#cb538-9" aria-hidden="true" tabindex="-1"></a> }</span> +<span id="cb538-10"><a href="#cb538-10" aria-hidden="true" tabindex="-1"></a><span class="fu">\ExplSyntaxOff</span></span> +<span id="cb538-11"><a href="#cb538-11" aria-hidden="true" tabindex="-1"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb538-12"><a href="#cb538-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb538-13"><a href="#cb538-13" aria-hidden="true" tabindex="-1"></a><span class="fu">\starttext</span></span> +<span id="cb538-14"><a href="#cb538-14" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb538-15"><a href="#cb538-15" aria-hidden="true" tabindex="-1"></a><span class="fu">\startmarkdown</span></span> +<span id="cb538-16"><a href="#cb538-16" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb538-17"><a href="#cb538-17" aria-hidden="true" tabindex="-1"></a>name: Jane Doe</span> +<span id="cb538-18"><a href="#cb538-18" aria-hidden="true" tabindex="-1"></a>age: 99</span> +<span id="cb538-19"><a href="#cb538-19" aria-hidden="true" tabindex="-1"></a>---</span> +<span id="cb538-20"><a href="#cb538-20" aria-hidden="true" tabindex="-1"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb538-21"><a href="#cb538-21" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb538-22"><a href="#cb538-22" aria-hidden="true" tabindex="-1"></a><span class="fu">\stoptext</span></span></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb539"><pre +class="sourceCode sh"><code class="sourceCode bash"><span id="cb539-1"><a href="#cb539-1" aria-hidden="true" tabindex="-1"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and +contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<section class="footnotes" role="doc-endnotes"> +<section class="footnotes footnotes-end-of-document" +role="doc-endnotes"> <hr /> <ol> -<li id="fn1" role="doc-endnote"><p>Here is the footnote.<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li> +<li id="fn1" role="doc-endnote"><p>Here is the footnote.<a +href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li> <li id="fn2" role="doc-endnote"><p>Here’s one with multiple blocks.</p> -<p>Subsequent paragraphs are indented to show that they belong to the previous footnote.</p> +<p>Subsequent paragraphs are indented to show that they belong to the +previous footnote.</p> <pre><code>{ some.code }</code></pre> -<p>The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.<a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li> -<li id="fn3" role="doc-endnote"><p>Here is the footnote.<a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li> +<p>The whole paragraph can be indented, or just the first line. In this +way, multi-paragraph footnotes work like multi-paragraph list items.<a +href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li> +<li id="fn3" role="doc-endnote"><p>Here is the footnote.<a +href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li> <li id="fn4" role="doc-endnote"><p>Here’s one with multiple blocks.</p> -<p>Subsequent paragraphs are indented to show that they belong to the previous footnote.</p> +<p>Subsequent paragraphs are indented to show that they belong to the +previous footnote.</p> <pre><code>{ some.code }</code></pre> -<p>The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.<a href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li> -<li id="fn5" role="doc-endnote"><p>Inlines notes are easier to write, since you don’t have to pick an identifier and move down to type the note.<a href="#fnref5" class="footnote-back" role="doc-backlink">↩︎</a></p></li> -<li id="fn6" role="doc-endnote"><p>Inlines notes are easier to write, since you don’t have to pick an identifier and move down to type the note.<a href="#fnref6" class="footnote-back" role="doc-backlink">↩︎</a></p></li> +<p>The whole paragraph can be indented, or just the first line. In this +way, multi-paragraph footnotes work like multi-paragraph list items.<a +href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li> +<li id="fn5" role="doc-endnote"><p>Inlines notes are easier to write, +since you don’t have to pick an identifier and move down to type the +note.<a href="#fnref5" class="footnote-back" +role="doc-backlink">↩︎</a></p></li> +<li id="fn6" role="doc-endnote"><p>Inlines notes are easier to write, +since you don’t have to pick an identifier and move down to type the +note.<a href="#fnref6" class="footnote-back" +role="doc-backlink">↩︎</a></p></li> </ol> </section> </body> diff --git a/macros/generic/markdown/markdown.pdf b/macros/generic/markdown/markdown.pdf Binary files differindex b3ab782400..8d6d35f4b9 100644 --- a/macros/generic/markdown/markdown.pdf +++ b/macros/generic/markdown/markdown.pdf |