diff options
Diffstat (limited to 'macros/generic')
-rw-r--r-- | macros/generic/markdown/README.md | 12 | ||||
-rw-r--r-- | macros/generic/markdown/VERSION | 2 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.dtx | 3268 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.html | 6163 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.pdf | bin | 760842 -> 799016 bytes |
5 files changed, 5623 insertions, 3822 deletions
diff --git a/macros/generic/markdown/README.md b/macros/generic/markdown/README.md index 38661d1c3a..8460bb5c89 100644 --- a/macros/generic/markdown/README.md +++ b/macros/generic/markdown/README.md @@ -245,8 +245,8 @@ Acknowledgements [option-slice]: https://mirrors.ctan.org/macros/generic/markdown/markdown.html#slice "Markdown Package User Manual" [option-table-captions]: https://mirrors.ctan.org/macros/generic/markdown/markdown.html#option-tablecaptions "Markdown Package User Manual" -Contributing ------------- +Contributing to the Development of Markdown +------------------------------------------- Apart from the example markdown documents, tests, and continuous integration, which are placed in the `examples/`, `tests/`, and `.github/` directories, @@ -282,6 +282,14 @@ reproduced by running the `docker build` command on `Dockerfile` (`docker build [literate programming]: https://en.wikipedia.org/wiki/Literate_programming "Literate programming" [ltxdockit]: https://ctan.org/pkg/ltxdockit "ltxdockit – Documentation support" +Contributed Software +-------------------- + +Links to contributed third-party software for the Markdown package are +available in the `contributions/` directory. The intention is to show +interesting tools for the Markdown package and to give them wider exposure +without taking responsibility for their development or maintenance. + Citing Markdown --------------- diff --git a/macros/generic/markdown/VERSION b/macros/generic/markdown/VERSION index db73644a40..58060d5509 100644 --- a/macros/generic/markdown/VERSION +++ b/macros/generic/markdown/VERSION @@ -1 +1 @@ -2.14.1-0-gb933d81 (2022/03/01) +2.15.0-0-g9296cf1 (2022/03/31) diff --git a/macros/generic/markdown/markdown.dtx b/macros/generic/markdown/markdown.dtx index 60d7626990..d43c7ab3cd 100644 --- a/macros/generic/markdown/markdown.dtx +++ b/macros/generic/markdown/markdown.dtx @@ -869,17 +869,17 @@ author: Vít Novotný date: \markdownVersion{} (\markdownLastModified{}) --- +<link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet" /> + % \fi % \par % \begin{markdown} -<link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet" /> - Introduction ============ The [Markdown package][pkg] converts [markdown][] markup to \TeX{} commands. The functionality is provided both as a Lua module and as plain \TeX{}, \LaTeX{}, and -\Hologo{ConTeXt} macro packages that can be used to directly typeset \TeX documents +\Hologo{ConTeXt} macro packages that can be used to directly typeset \TeX{} documents containing markdown markup. Unlike other convertors, the Markdown package does not require any external programs, and makes it easy to redefine how each and every markdown element is rendered. Creative abuse of the markdown @@ -916,7 +916,7 @@ documentation][techdoc]. % \fi % \begin{macrocode} local metadata = { - version = "$(VERSION)", + version = "(((VERSION)))", comment = "A module for the conversion from markdown to plain TeX", author = "John MacFarlane, Hans Hagen, Vít Novotný", copyright = {"2009-2016 John MacFarlane, Hans Hagen", @@ -942,7 +942,7 @@ Requirements The package requires either [our official Docker image][docker], which contains the latest development version of the Markdown package, or a \TeX{} -distribution: [\TeX{} Live][tl] ≥ 2018 is known to work with the current +distribution: [\TeX{} Live][tl] ≥ 2020 is known to work with the current version of the Markdown package and so are recent versions of [Mik\TeX{}][mik]. If you are using an older, incomplete, or atypical \TeX{} distribution, please consult the [technical documentation][techdoc] for a detailed list of @@ -1104,7 +1104,22 @@ local md5 = require("md5") % % The plain \TeX{} part of the package requires that the plain \TeX{} % format (or its superset) is loaded, all the Lua prerequisites (see -% Section <#sec:luaprerequisites>), and the following Lua module: +% Section <#sec:luaprerequisites>), and the following package: +% +% \pkg{expl3} +% +%: A package that enables the expl3 language from the \LaTeX3 kernel in +% \TeX{} Live${}\leq{}2019$. It is not used for anything... yet. +% +% \end{markdown} +% \begin{macrocode} +\ifx\ExplSyntaxOn\undefined + \input expl3-generic\relax +\fi +% \end{macrocode} +% \begin{markdown} +% +% The plain \TeX{} part of the package also requires the following Lua module: % % \pkg{Lua File System} % @@ -1210,10 +1225,8 @@ local md5 = require("md5") % \pkg{ifthen} % %: A package that provides a concise syntax for the inspection of macro -% values. It is used to determine whether or not the \pkg{paralist} package -% should be loaded based on the user options, in the `witiko/dot` \LaTeX{} -% theme (see Section <#sec:latexthemes>), and to provide default token -% renderer prototypes. +% values. It is used in the `witiko/dot` \LaTeX{} theme (see Section +% <#sec:latexthemes>), and to provide default token renderer prototypes. % % \pkg{fancyvrb} % @@ -1804,6 +1817,33 @@ Lua options control the conversion from markdown to \TeX{}. They are supported by all interfaces of the Markdown package starting with the low-level Lua interfaces and all the way up to the \LaTeX{} and \Hologo{ConTeXt} interfaces. +%</manual-options> +%<*tex> +% \fi +% \begin{markdown} +% +% To enable the enumeration of Lua options, we will maintain the +% \mdef{g_\@\@_lua_options_seq} sequence. +% +% \end{markdown} +% \begin{macrocode} +\ExplSyntaxOn +\seq_new:N \g_@@_lua_options_seq +% \end{macrocode} +% \begin{markdown} +% +% To enable the reflection of default Lua options and their types, we will +% maintain the \mdef{g_\@\@_default_lua_options_prop} and +% \mdef{g_\@\@_lua_option_types_prop} property lists, respectively. +% +% \end{markdown} +% \begin{macrocode} +\prop_new:N \g_@@_lua_option_types_prop +\prop_new:N \g_@@_default_lua_options_prop +% \end{macrocode} +% \iffalse +%</tex> +%<*manual-options> % \fi % \begin{markdown} % @@ -1953,6 +1993,23 @@ Markdown package will also be produced as we requested using the `cacheDir` option. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { cacheDir } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { cacheDir } + { string } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { cacheDir } + { . } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -2171,6 +2228,23 @@ without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello *world*!” to “Hi *world*!” was not reflected. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { frozenCacheFileName } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { frozenCacheFileName } + { string } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { frozenCacheFileName } + { frozenCache.tex } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -2385,6 +2459,23 @@ following text: > A paragraph > Not a quote. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { blankBeforeBlockquote } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { blankBeforeBlockquote } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { blankBeforeBlockquote } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -2624,6 +2715,23 @@ following text: > A paragraph. ``` Not a code fence. ``` %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { blankBeforeCodeFence } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { blankBeforeCodeFence } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { blankBeforeCodeFence } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -2846,6 +2954,23 @@ following text: > A paragraph. Not a heading. ============== %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { blankBeforeHeading } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { blankBeforeHeading } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { blankBeforeHeading } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -3060,6 +3185,23 @@ following text: > > Another block quote. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { breakableBlockquotes } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { breakableBlockquotes } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { breakableBlockquotes } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -3144,6 +3286,23 @@ following text, where the middot (`·`) denotes a non-breaking space: > Addison-Wesley, 1984. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { citationNbsps } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { citationNbsps } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { citationNbsps } + { true } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -3235,6 +3394,23 @@ following text: > Addison-Wesley, 1984. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { citations } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { citations } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { citations } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -3443,6 +3619,23 @@ following text: > “This is a quote.” “This is another quote.” %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { codeSpans } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { codeSpans } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { codeSpans } + { true } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -3607,6 +3800,23 @@ following text: > This is a *transcluded markdown document*. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { contentBlocks } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { contentBlocks } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { contentBlocks } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -3757,6 +3967,23 @@ following text: > This is a *transcluded markdown document*. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { contentBlocksLanguageMap } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { contentBlocksLanguageMap } + { string } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { contentBlocksLanguageMap } + { markdown-languages.json } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -3886,6 +4113,23 @@ following text: > Third paragraph of definition 2. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { definitionLists } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { definitionLists } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { definitionLists } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -3907,24 +4151,24 @@ defaultOptions.definitionLists = false % : true - Converted markdown documents will be cached in \Opt{cacheDir}. This can be - useful for post-processing the converted documents and for recovering - historical versions of the documents from the cache. However, it also - produces a large number of auxiliary files on the disk and obscures the - output of the Lua command-line interface when it is used for plumbing. + : Converted markdown documents will be cached in \Opt{cacheDir}. This can be + useful for post-processing the converted documents and for recovering + historical versions of the documents from the cache. However, it also + produces a large number of auxiliary files on the disk and obscures the + output of the Lua command-line interface when it is used for plumbing. - This behavior will always be used if the \Opt{finalizeCache} option is - enabled. + This behavior will always be used if the \Opt{finalizeCache} option is + enabled. : false - Converted markdown documents will not be cached. This decreases the number - of auxiliary files that we produce and makes it easier to use the Lua - command-line interface for plumbing. + : Converted markdown documents will not be cached. This decreases the number + of auxiliary files that we produce and makes it easier to use the Lua + command-line interface for plumbing. - This behavior will only be used when the \Opt{finalizeCache} option is - disabled. Furthermore, this behavior is planned to be the new default in - the next major release of the Markdown package. + This behavior will only be used when the \Opt{finalizeCache} option is + disabled. Furthermore, this behavior is planned to be the new default in + the next major release of the Markdown package. % \end{markdown} % \iffalse @@ -3977,6 +4221,23 @@ Hello \markdownRendererEmphasis{world}!\relax ``` %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { eagerCache } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { eagerCache } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { eagerCache } + { true } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -3987,6 +4248,141 @@ defaultOptions.eagerCache = true %</lua,lua-cli> %<*manual-options> +#### Option `expectJekyllData` + +`expectJekyllData` (default value: `false`) + +% \fi +% \markdownBegin +% +% \Optitem[false]{expectJekyllData}{\opt{true}, \opt{false}} +% +: false + + : When the \Opt{jekyllData} option is enabled, then a markdown document + may begin with \acro{yaml} metadata if and only if the metadata begin + with the end-of-directives marker (`---`) and they end with either the + end-of-directives or the end-of-document marker (`...`): + + ~~~~~ latex + \documentclass{article} + \usepackage[jekyllData]{markdown} + \begin{document} + \begin{markdown} + --- + - this + - is + - YAML + ... + - followed + - by + - Markdown + \end{markdown} + \begin{markdown} + - this + - is + - Markdown + \end{markdown} + \end{document} + ~~~~~~~~~~~ + +: true + + : When the \Opt{jekyllData} option is enabled, then a markdown document may + begin directly with \acro{yaml} metadata and may contain nothing but + \acro{yaml} metadata. + + ~~~~~ latex + \documentclass{article} + \usepackage[jekyllData, expectJekyllData]{markdown} + \begin{document} + \begin{markdown} + - this + - is + - YAML + ... + - followed + - by + - Markdown + \end{markdown} + \begin{markdown} + - this + - is + - YAML + \end{markdown} + \end{document} + ~~~~~~~~~~~ + +% \markdownEnd +% \iffalse + +##### \LaTeX{} Example {.unnumbered} + +Using a text editor, create a text document named `jane-doe.yml` with the +following content: +``` yaml +name: Jane Doe +age: 99 +``` +Using a text editor, create also a text document named `document.tex` with the +following content: +``` tex +\documentclass{article} +\usepackage[jekyllData]{markdown} +\ExplSyntaxOn +\keys_define:nn + { markdown/jekyllData } + { + name .code:n = { \gdef\name{#1} }, + age .code:n = { \gdef\age{#1} }, + } +\ExplSyntaxOff +\markdownSetup{ + renderers = { + jekyllDataEnd = {\name{} is \age{} years old.}, + } +} +\begin{document} +\markdownInput[expectJekyllData]{jane-doe.yml} +\end{document} +``````` +Next, invoke LuaTeX from the terminal: +``` sh +lualatex document.tex +`````` +A PDF document named `document.pdf` should be produced and contain the +following text: + +> Jane Doe is 99 years old. + +%</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { expectJekyllData } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { expectJekyllData } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { expectJekyllData } + { false } +% \end{macrocode} +% \iffalse +%</tex> +%<*lua,lua-cli> +% \fi +% \begin{macrocode} +defaultOptions.expectJekyllData = false +% \end{macrocode} +% \par +% \iffalse +%</lua,lua-cli> +%<*manual-options> + #### Option `fencedCode` `fencedCode` (default value: `false`) @@ -4135,6 +4531,23 @@ following text: > ``` %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { fencedCode } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { fencedCode } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { fencedCode } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -4289,6 +4702,23 @@ without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello *world*!” to “Hi *world*!” was not reflected. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { finalizeCache } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { finalizeCache } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { finalizeCache } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -4448,6 +4878,23 @@ following text: > isn't indented. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { footnotes } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { footnotes } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { footnotes } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -4503,6 +4950,23 @@ A PDF document named `document.pdf` should be produced and contain the text requested using the `frozenCacheCounter` option. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { frozenCacheCounter } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { frozenCacheCounter } + { counter } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { frozenCacheCounter } + { 0 } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -4577,6 +5041,23 @@ following text: > And the mome raths outgrabe. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { hardLineBreaks } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { hardLineBreaks } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { hardLineBreaks } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -4698,6 +5179,23 @@ following text: > #. Parish %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { hashEnumerators } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { hashEnumerators } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { hashEnumerators } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -4743,6 +5241,23 @@ defaultOptions.hashEnumerators = false % \end{markdown} % \iffalse %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { headerAttributes } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { headerAttributes } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { headerAttributes } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -4995,6 +5510,23 @@ following text: > There is support. There is support. There is support. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { html } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { html } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { html } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -5196,6 +5728,23 @@ following text: > √-̅1̅ *equals* $i$. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { hybrid } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { hybrid } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { hybrid } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -5285,6 +5834,23 @@ following text: > move down to type the note.] %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { inlineFootnotes } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { inlineFootnotes } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { inlineFootnotes } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -5338,8 +5904,14 @@ following content: ``` tex \input markdown \def\markdownOptionJekyllData{true} -\def\markdownRendererJekyllDataString#1#2{\gdef\name{#2}} -\def\markdownRendererJekyllDataNumber#1#2{\gdef\age{#2}} +\ExplSyntaxOn +\keys_define:nn + { markdown/jekyllData } + { + name .code:n = { \gdef\name{#1} }, + age .code:n = { \gdef\age{#1} }, + } +\ExplSyntaxOff \def\markdownRendererJekyllDataEnd{% \name{} is \age{} years old.} \markdownBegin @@ -5366,10 +5938,16 @@ following content: ``` tex \documentclass{article} \usepackage[jekyllData]{markdown} +\ExplSyntaxOn +\keys_define:nn + { markdown/jekyllData } + { + name .code:n = { \gdef\name{#1} }, + age .code:n = { \gdef\age{#1} }, + } +\ExplSyntaxOff \markdownSetup{ renderers = { - jekyllDataString = {\gdef\name{#2}}, - jekyllDataNumber = {\gdef\age{#2}}, jekyllDataEnd = {\name{} is \age{} years old.}, } } @@ -5400,8 +5978,14 @@ following content: ``` tex \usemodule[t][markdown] \def\markdownOptionJekyllData{true} -\def\markdownRendererJekyllDataString#1#2{\gdef\name{#2}} -\def\markdownRendererJekyllDataNumber#1#2{\gdef\age{#2}} +\ExplSyntaxOn +\keys_define:nn + { markdown/jekyllData } + { + name .code:n = { \gdef\name{#1} }, + age .code:n = { \gdef\age{#1} }, + } +\ExplSyntaxOff \def\markdownRendererJekyllDataEnd{% \name{} is \age{} years old.} \starttext @@ -5425,6 +6009,23 @@ following text: > Jane Doe is 99 years old. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { jekyllData } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { jekyllData } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { jekyllData } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -5524,6 +6125,23 @@ following text: > | 1 | 1 | 1 | 1 | %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { pipeTables } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { pipeTables } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { pipeTables } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -5554,6 +6172,23 @@ defaultOptions.pipeTables = false % \end{markdown} % \iffalse %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { preserveTabs } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { preserveTabs } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { preserveTabs } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -5633,6 +6268,23 @@ following text: > with their grandchildren than get eaten. Begone, wolf! %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { relativeReferences } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { relativeReferences } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { relativeReferences } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -5768,6 +6420,23 @@ following text: > ### A section %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { shiftHeadings } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { shiftHeadings } + { number } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { shiftHeadings } + { 0 } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -5976,6 +6645,23 @@ following text: > Hamlet dies. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { slice } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { slice } + { string } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { slice } + { ^~$ } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -6173,6 +6859,23 @@ following text: > . . . and this is a victorian ellipsis. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { smartEllipses } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { smartEllipses } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { smartEllipses } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -6299,6 +7002,23 @@ following text: > 3. fifth item %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { startNumber } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { startNumber } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { startNumber } + { true } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -6402,6 +7122,23 @@ A PDF document named `document.pdf` should be produced and contain the text “Hello *world*!” %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { stripIndent } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { stripIndent } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { stripIndent } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -6516,6 +7253,23 @@ following text: > : Demonstration of pipe table syntax. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { tableCaptions } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { tableCaptions } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { tableCaptions } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -6616,6 +7370,23 @@ following text: > - Yes I can! %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { taskLists } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { taskLists } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { taskLists } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -6665,7 +7436,7 @@ Using a text editor, create a text document named `document.tex` with the following content: ``` tex \input markdown -\def\markdownOptionTeXComments{true} +\def\markdownOptionTexComments{true} \markdownBegin Hel% this is a comment lo *world*! @@ -6706,7 +7477,7 @@ Using a text editor, create a text document named `document.tex` with the following content: ``` tex \usemodule[t][markdown] -\def\markdownOptionTeXComments{true} +\def\markdownOptionTexComments{true} \starttext \startmarkdown Hel% this is a comment @@ -6722,6 +7493,23 @@ A PDF document named `document.pdf` should be produced and contain the text “Hello *world*!” %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { texComments } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { texComments } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { texComments } + { false } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -6744,17 +7532,27 @@ defaultOptions.texComments = false % : true - : Lists whose bullets do not consist of multiple paragraphs will be - passed to the - \mref{markdownRendererOlBeginTight}, \mref{markdownRendererOlEndTight}, - \mref{markdownRendererUlBeginTight}, \mref{markdownRendererUlEndTight}, - \mref{markdownRendererDlBeginTight}, and - \mref{markdownRendererDlEndTight} \TeX{} macros. + : Unordered and ordered Lists whose items do not consist of multiple + paragraphs will be considered *tight*. Tight lists will produce tight + renderers that may produce different output than lists that are not + tight: + + ``` md + - This is + - a tight + - unordered list. + + - This is + + not a tight + + - unordered list. + ``` : false - : Lists whose bullets do not consist of multiple paragraphs will be - treated the same way as lists that do consist of multiple paragraphs. + : Unordered and ordered lists whose items consist of multiple paragraphs + will be treated the same way as lists that consist of multiple paragraphs. % \end{markdown} % \iffalse @@ -6824,6 +7622,23 @@ following text: > - third item %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { tightLists } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { tightLists } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { tightLists } + { true } +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -6956,6 +7771,24 @@ following text: > This is _emphasized text_ and this is a math subscript: *mₙ*. %</manual-options> +%<*tex> +% \fi +% \begin{macrocode} +\seq_put_right:Nn + \g_@@_lua_options_seq + { underscores } +\prop_put:Nnn + \g_@@_lua_option_types_prop + { underscores } + { boolean } +\prop_put:Nnn + \g_@@_default_lua_options_prop + { underscores } + { true } +\ExplSyntaxOff +% \end{macrocode} +% \iffalse +%</tex> %<*lua,lua-cli> % \fi % \begin{macrocode} @@ -7239,8 +8072,8 @@ pdftex --shell-escape document.tex % % \end{markdown} % \begin{macrocode} -\def\markdownLastModified{$(LAST_MODIFIED)}% -\def\markdownVersion{$(VERSION)}% +\def\markdownLastModified{(((LASTMODIFIED)))}% +\def\markdownVersion{(((VERSION)))}% % \end{macrocode} % \par % \begin{markdown} @@ -7645,7 +8478,7 @@ bug](https://github.com/witiko/markdown/issues). \let\markdownOptionStripIndent\undefined \let\markdownOptionTableCaptions\undefined \let\markdownOptionTaskLists\undefined -\let\markdownOptionTeXComments\undefined +\let\markdownOptionTexComments\undefined \let\markdownOptionTightLists\undefined % \end{macrocode} % \par @@ -7656,7 +8489,7 @@ bug](https://github.com/witiko/markdown/issues). #### Package Documentation The \mdef{markdownOptionStripPercentSigns} macro controls whether a percent -sign (`%`) at the beginning of a line will be discarded when reading Markdown +sign (`\%`) at the beginning of a line will be discarded when reading Markdown input from a \TeX{} document. This enables the use of markdown when writing \TeX{} package documentation using the [Doc \LaTeX{} package][doc] by Frank Mittelbach. The recognized values of the macro are `true` (discard) and `false` @@ -7696,7 +8529,7 @@ A PDF document named `document.pdf` should be produced and contain the text %#### Miscellaneous Options % % The \mdef{markdownOptionStripPercentSigns} macro controls whether a percent -% sign (`%`) at the beginning of a line will be discarded when buffering +% sign (`\%`) at the beginning of a line will be discarded when buffering % Markdown input (see Section <#sec:buffering>) or not. Notably, this % enables the use of markdown when writing \TeX{} package documentation using % the \pkg{Doc} \LaTeX{}~package~[@mittelbach17] or similar. The recognized @@ -7738,6 +8571,38 @@ In this section, I will describe the individual token renderers. % macros are intended to be redefined by the user who is typesetting a % document. By default, they point to the corresponding prototypes (see Section % <#sec:texrendererprototypes>). +% +% \end{markdown} +% +% \iffalse +%</manual-tokens> +%<*tex> +% \fi +% \begin{markdown} +% +% To enable the enumeration of token renderers, we will maintain the +% \mdef{g_\@\@_renderers_seq} sequence. +% +% \end{markdown} +% \begin{macrocode} +\ExplSyntaxOn +\seq_new:N \g_@@_renderers_seq +% \end{macrocode} +% \begin{markdown} +% +% To enable the reflection of token renderers and their parameters, we will +% maintain the \mdef{g_\@\@_renderer_arities_prop} property list. +% +% \end{markdown} +% \begin{macrocode} +\prop_new:N \g_@@_renderer_arities_prop +\ExplSyntaxOff +% \end{macrocode} +% \iffalse +%</tex> +%<*manual-tokens> +% \fi +% \begin{markdown} #### Tickbox Renderers The macros named \mdef{markdownRendererTickedBox}, @@ -7814,10 +8679,37 @@ following text: % \begin{macrocode} \def\markdownRendererTickedBox{% \markdownRendererTickedBoxPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { tickedBox } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { tickedBox } + { 0 } +\ExplSyntaxOff \def\markdownRendererHalfTickedBox{% \markdownRendererHalfTickedBoxPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { halfTickedBox } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { halfTickedBox } + { 0 } +\ExplSyntaxOff \def\markdownRendererUntickedBox{% \markdownRendererUntickedBoxPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { untickedBox } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { untickedBox } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -7951,8 +8843,26 @@ following text: % \begin{macrocode} \def\markdownRendererDocumentBegin{% \markdownRendererDocumentBeginPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { documentBegin } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { documentBegin } + { 0 } +\ExplSyntaxOff \def\markdownRendererDocumentEnd{% \markdownRendererDocumentEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { documentEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { documentEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -8078,6 +8988,15 @@ following text: % \begin{macrocode} \def\markdownRendererInterblockSeparator{% \markdownRendererInterblockSeparatorPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { interblockSeparator } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { interblockSeparator } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -8215,6 +9134,15 @@ following text: % \begin{macrocode} \def\markdownRendererLineBreak{% \markdownRendererLineBreakPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { lineBreak } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { lineBreak } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -8317,6 +9245,15 @@ following text: % \begin{macrocode} \def\markdownRendererEllipsis{% \markdownRendererEllipsisPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { ellipsis } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { ellipsis } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -8393,6 +9330,15 @@ following text: % \begin{macrocode} \def\markdownRendererNbsp{% \markdownRendererNbspPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { nbsp } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { nbsp } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -8509,26 +9455,125 @@ following text, where the middot (`·`) denotes a non-breaking space: % \begin{macrocode} \def\markdownRendererLeftBrace{% \markdownRendererLeftBracePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { leftBrace } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { leftBrace } + { 0 } +\ExplSyntaxOff \def\markdownRendererRightBrace{% \markdownRendererRightBracePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { rightBrace } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { rightBrace } + { 0 } +\ExplSyntaxOff \def\markdownRendererDollarSign{% \markdownRendererDollarSignPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { dollarSign } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { dollarSign } + { 0 } +\ExplSyntaxOff \def\markdownRendererPercentSign{% \markdownRendererPercentSignPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { percentSign } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { percentSign } + { 0 } +\ExplSyntaxOff \def\markdownRendererAmpersand{% \markdownRendererAmpersandPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { ampersand } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { ampersand } + { 0 } +\ExplSyntaxOff \def\markdownRendererUnderscore{% \markdownRendererUnderscorePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { underscore } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { underscore } + { 0 } +\ExplSyntaxOff \def\markdownRendererHash{% \markdownRendererHashPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { hash } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { hash } + { 0 } +\ExplSyntaxOff \def\markdownRendererCircumflex{% \markdownRendererCircumflexPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { circumflex } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { circumflex } + { 0 } +\ExplSyntaxOff \def\markdownRendererBackslash{% \markdownRendererBackslashPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { backslash } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { backslash } + { 0 } +\ExplSyntaxOff \def\markdownRendererTilde{% \markdownRendererTildePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { tilde } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { tilde } + { 0 } +\ExplSyntaxOff \def\markdownRendererPipe{% \markdownRendererPipePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { pipe } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { pipe } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -8665,6 +9710,15 @@ following text: % \begin{macrocode} \def\markdownRendererCodeSpan{% \markdownRendererCodeSpanPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { codeSpan } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { codeSpan } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -8780,6 +9834,15 @@ following text: % \begin{macrocode} \def\markdownRendererLink{% \markdownRendererLinkPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { link } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { link } + { 4 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -8861,6 +9924,15 @@ that the \TeX{} engine has shell access. % \begin{macrocode} \def\markdownRendererImage{% \markdownRendererImagePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { image } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { image } + { 4 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -8889,6 +9961,15 @@ and the title of the content block. % \begin{macrocode} \def\markdownRendererContentBlock{% \markdownRendererContentBlockPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { contentBlock } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { contentBlock } + { 4 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -8913,6 +9994,15 @@ as \mref{markdownRendererContentBlock}. % \begin{macrocode} \def\markdownRendererContentBlockOnlineImage{% \markdownRendererContentBlockOnlineImagePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { contentBlockOnlineImage } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { contentBlockOnlineImage } + { 4 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9099,6 +10189,15 @@ following text: % \begin{macrocode} \def\markdownRendererContentBlockCode{% \markdownRendererContentBlockCodePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { contentBlockCode } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { contentBlockCode } + { 5 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9124,6 +10223,15 @@ list is not tight). The macro receives no arguments. % \begin{macrocode} \def\markdownRendererUlBegin{% \markdownRendererUlBeginPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { ulBegin } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { ulBegin } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9149,6 +10257,15 @@ is `false`. The macro receives no arguments. % \begin{macrocode} \def\markdownRendererUlBeginTight{% \markdownRendererUlBeginTightPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { ulBeginTight } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { ulBeginTight } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9172,6 +10289,15 @@ list. The macro receives no arguments. % \begin{macrocode} \def\markdownRendererUlItem{% \markdownRendererUlItemPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { ulItem } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { ulItem } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9195,6 +10321,15 @@ bulleted list. The macro receives no arguments. % \begin{macrocode} \def\markdownRendererUlItemEnd{% \markdownRendererUlItemEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { ulItemEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { ulItemEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9219,6 +10354,15 @@ tight). The macro receives no arguments. % \begin{macrocode} \def\markdownRendererUlEnd{% \markdownRendererUlEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { ulEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { ulEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9446,6 +10590,15 @@ following text: % \begin{macrocode} \def\markdownRendererUlEndTight{% \markdownRendererUlEndTightPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { ulEndTight } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { ulEndTight } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9471,6 +10624,15 @@ list is not tight). The macro receives no arguments. % \begin{macrocode} \def\markdownRendererOlBegin{% \markdownRendererOlBeginPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { olBegin } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { olBegin } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9496,6 +10658,15 @@ option is `false`. The macro receives no arguments. % \begin{macrocode} \def\markdownRendererOlBeginTight{% \markdownRendererOlBeginTightPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { olBeginTight } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { olBeginTight } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9520,6 +10691,15 @@ This macro will only be produced, when the \Opt{startNumber} option is % \begin{macrocode} \def\markdownRendererOlItem{% \markdownRendererOlItemPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { olItem } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { olItem } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9543,6 +10723,15 @@ an ordered list. The macro receives no arguments. % \begin{macrocode} \def\markdownRendererOlItemEnd{% \markdownRendererOlItemEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { olItemEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { olItemEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9568,6 +10757,15 @@ corresponds to the item number. % \begin{macrocode} \def\markdownRendererOlItemWithNumber{% \markdownRendererOlItemWithNumberPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { olItemWithNumber } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { olItemWithNumber } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9592,6 +10790,15 @@ tight). The macro receives no arguments. % \begin{macrocode} \def\markdownRendererOlEnd{% \markdownRendererOlEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { olEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { olEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9871,6 +11078,15 @@ following text: % \begin{macrocode} \def\markdownRendererOlEndTight{% \markdownRendererOlEndTightPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { olEndTight } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { olEndTight } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9899,6 +11115,15 @@ list is not tight). The macro receives no arguments. % \begin{macrocode} \def\markdownRendererDlBegin{% \markdownRendererDlBeginPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { dlBegin } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { dlBegin } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9924,6 +11149,15 @@ list is not tight). This macro will only be produced, when the % \begin{macrocode} \def\markdownRendererDlBeginTight{% \markdownRendererDlBeginTightPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { dlBeginTight } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { dlBeginTight } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9948,6 +11182,15 @@ being defined. % \begin{macrocode} \def\markdownRendererDlItem{% \markdownRendererDlItemPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { dlItem } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { dlItem } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9971,6 +11214,15 @@ definitions for a single term. % \begin{macrocode} \def\markdownRendererDlItemEnd{% \markdownRendererDlItemEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { dlItemEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { dlItemEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -9995,6 +11247,15 @@ a single term. % \begin{macrocode} \def\markdownRendererDlDefinitionBegin{% \markdownRendererDlDefinitionBeginPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { dlDefinitionBegin } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { dlDefinitionBegin } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10019,6 +11280,15 @@ single term. % \begin{macrocode} \def\markdownRendererDlDefinitionEnd{% \markdownRendererDlDefinitionEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { dlDefinitionEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { dlDefinitionEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10043,6 +11313,15 @@ tight). The macro receives no arguments. % \begin{macrocode} \def\markdownRendererDlEnd{% \markdownRendererDlEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { dlEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { dlEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10400,6 +11679,15 @@ following text: % \begin{macrocode} \def\markdownRendererDlEndTight{% \markdownRendererDlEndTightPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { dlEndTight } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { dlEndTight } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10511,6 +11799,15 @@ following text: % \begin{macrocode} \def\markdownRendererEmphasis{% \markdownRendererEmphasisPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { emphasis } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { emphasis } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10535,6 +11832,15 @@ corresponds to the emphasized span of text. % \begin{macrocode} \def\markdownRendererStrongEmphasis{% \markdownRendererStrongEmphasisPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { strongEmphasis } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { strongEmphasis } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10559,6 +11865,15 @@ a block quote. The macro receives no arguments. % \begin{macrocode} \def\markdownRendererBlockQuoteBegin{% \markdownRendererBlockQuoteBeginPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { blockQuoteBegin } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { blockQuoteBegin } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10695,6 +12010,15 @@ following text: % \begin{macrocode} \def\markdownRendererBlockQuoteEnd{% \markdownRendererBlockQuoteEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { blockQuoteEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { blockQuoteEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10720,6 +12044,15 @@ filename of a file contaning the code block contents. % \begin{macrocode} \def\markdownRendererInputVerbatim{% \markdownRendererInputVerbatimPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { inputVerbatim } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { inputVerbatim } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10827,6 +12160,15 @@ following text except for the filename, which may differ: % \begin{macrocode} \def\markdownRendererInputFencedCode{% \markdownRendererInputFencedCodePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { inputFencedCode } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { inputFencedCode } + { 2 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10836,7 +12178,8 @@ following text except for the filename, which may differ: % \fi % \begin{markdown} -#### YAML Metadata Renderers +#### YAML Metadata Renderers {#yamlmetadatarenderers} + The \mdef{markdownRendererJekyllDataBegin} macro represents the beginning of a \acro{yaml} document. This macro will only be produced when the \Opt{jekyllData} option is enabled. The macro receives no arguments. @@ -10851,6 +12194,15 @@ option is enabled. The macro receives no arguments. % \begin{macrocode} \def\markdownRendererJekyllDataBegin{% \markdownRendererJekyllDataBeginPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { jekyllDataBegin } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { jekyllDataBegin } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10875,6 +12227,15 @@ The \mdef{markdownRendererJekyllDataEnd} macro represents the end of a % \begin{macrocode} \def\markdownRendererJekyllDataEnd{% \markdownRendererJekyllDataEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { jekyllDataEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { jekyllDataEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10901,6 +12262,15 @@ arguments: the scalar key in the parent structure, cast to a string following % \begin{macrocode} \def\markdownRendererJekyllDataMappingBegin{% \markdownRendererJekyllDataMappingBeginPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { jekyllDataMappingBegin } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { jekyllDataMappingBegin } + { 2 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10925,6 +12295,15 @@ when the \Opt{jekyllData} option is enabled. The macro receives no arguments. % \begin{macrocode} \def\markdownRendererJekyllDataMappingEnd{% \markdownRendererJekyllDataMappingEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { jekyllDataMappingEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { jekyllDataMappingEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10951,6 +12330,15 @@ arguments: the scalar key in the parent structure, cast to a string following % \begin{macrocode} \def\markdownRendererJekyllDataSequenceBegin{% \markdownRendererJekyllDataSequenceBeginPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { jekyllDataSequenceBegin } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { jekyllDataSequenceBegin } + { 2 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -10975,6 +12363,15 @@ when the \Opt{jekyllData} option is enabled. The macro receives no arguments. % \begin{macrocode} \def\markdownRendererJekyllDataSequenceEnd{% \markdownRendererJekyllDataSequenceEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { jekyllDataSequenceEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { jekyllDataSequenceEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11001,6 +12398,15 @@ following \acro{yaml} serialization rules. % \begin{macrocode} \def\markdownRendererJekyllDataBoolean{% \markdownRendererJekyllDataBooleanPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { jekyllDataBoolean } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { jekyllDataBoolean } + { 2 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11027,6 +12433,15 @@ following \acro{yaml} serialization rules. % \begin{macrocode} \def\markdownRendererJekyllDataNumber{% \markdownRendererJekyllDataNumberPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { jekyllDataNumber } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { jekyllDataNumber } + { 2 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11053,6 +12468,15 @@ serialization rules, and the scalar value. % \begin{macrocode} \def\markdownRendererJekyllDataString{% \markdownRendererJekyllDataStringPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { jekyllDataString } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { jekyllDataString } + { 2 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11069,6 +12493,10 @@ value in a \acro{yaml} document. This macro will only be produced when the scalar key in the parent structure, cast to a string following \acro{yaml} serialization rules. +% See also Section <#sec:expl3yamlmetadata> for the description of the +% high-level expl3 interface that you can also use to react to \acro{yaml} +% metadata. +% % \end{markdown} % % \iffalse @@ -11079,6 +12507,15 @@ serialization rules. % \begin{macrocode} \def\markdownRendererJekyllDataEmpty{% \markdownRendererJekyllDataEmptyPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { jekyllDataEmpty } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { jekyllDataEmpty } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11197,6 +12634,15 @@ The macro receives a single argument that corresponds to the heading text. % \begin{macrocode} \def\markdownRendererHeadingOne{% \markdownRendererHeadingOnePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { headingOne } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { headingOne } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11221,6 +12667,15 @@ text. % \begin{macrocode} \def\markdownRendererHeadingTwo{% \markdownRendererHeadingTwoPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { headingTwo } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { headingTwo } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11245,6 +12700,15 @@ text. % \begin{macrocode} \def\markdownRendererHeadingThree{% \markdownRendererHeadingThreePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { headingThree } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { headingThree } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11269,6 +12733,15 @@ text. % \begin{macrocode} \def\markdownRendererHeadingFour{% \markdownRendererHeadingFourPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { headingFour } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { headingFour } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11293,6 +12766,15 @@ text. % \begin{macrocode} \def\markdownRendererHeadingFive{% \markdownRendererHeadingFivePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { headingFive } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { headingFive } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11418,6 +12900,15 @@ following text: % \begin{macrocode} \def\markdownRendererHeadingSix{% \markdownRendererHeadingSixPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { headingSix } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { headingSix } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11537,6 +13028,15 @@ following text: % \begin{macrocode} \def\markdownRendererHorizontalRule{% \markdownRendererHorizontalRulePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { horizontalRule } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { horizontalRule } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11650,6 +13150,15 @@ following text: % \begin{macrocode} \def\markdownRendererFootnote{% \markdownRendererFootnotePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { footnote } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { footnote } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11738,6 +13247,15 @@ following text: % \begin{macrocode} \def\markdownRendererCite{% \markdownRendererCitePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { cite } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { cite } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11821,6 +13339,15 @@ following text: % \begin{macrocode} \def\markdownRendererTextCite{% \markdownRendererTextCitePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { textCite } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { textCite } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -11939,6 +13466,15 @@ following text: % \begin{macrocode} \def\markdownRendererTable{% \markdownRendererTablePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { table } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { table } + { 3 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -12024,10 +13560,37 @@ The horizontal margins should contain the following text: % \begin{macrocode} \def\markdownRendererInlineHtmlComment{% \markdownRendererInlineHtmlCommentPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { inlineHtmlComment } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { inlineHtmlComment } + { 1 } +\ExplSyntaxOff \def\markdownRendererBlockHtmlCommentBegin{% \markdownRendererBlockHtmlCommentBeginPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { blockHtmlCommentBegin } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { blockHtmlCommentBegin } + { 0 } +\ExplSyntaxOff \def\markdownRendererBlockHtmlCommentEnd{% \markdownRendererBlockHtmlCommentEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { blockHtmlCommentEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { blockHtmlCommentEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -12096,8 +13659,26 @@ following body text: % \begin{macrocode} \def\markdownRendererInlineHtmlTag{% \markdownRendererInlineHtmlTagPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { inlineHtmlTag } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { inlineHtmlTag } + { 1 } +\ExplSyntaxOff \def\markdownRendererInputBlockHtmlElement{% \markdownRendererInputBlockHtmlElementPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { inputBlockHtmlElement } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { inputBlockHtmlElement } + { 1 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -12196,10 +13777,37 @@ following text: % \begin{macrocode} \def\markdownRendererAttributeIdentifier{% \markdownRendererAttributeIdentifierPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { attributeIdentifier } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { attributeIdentifier } + { 1 } +\ExplSyntaxOff \def\markdownRendererAttributeClassName{% \markdownRendererAttributeClassNamePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { attributeClassName } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { attributeClassName } + { 1 } +\ExplSyntaxOff \def\markdownRendererAttributeKeyValue{% \markdownRendererAttributeKeyValuePrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { attributeKeyValue } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { attributeKeyValue } + { 2 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -12284,8 +13892,26 @@ following text: % \begin{macrocode} \def\markdownRendererHeaderAttributeContextBegin{% \markdownRendererHeaderAttributeContextBeginPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { headerAttributeContextBegin } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { headerAttributeContextBegin } + { 0 } +\ExplSyntaxOff \def\markdownRendererHeaderAttributeContextEnd{% \markdownRendererHeaderAttributeContextEndPrototype}% +\ExplSyntaxOn +\seq_put_right:Nn + \g_@@_renderers_seq + { headerAttributeContextEnd } +\prop_put:Nnn + \g_@@_renderer_arities_prop + { headerAttributeContextEnd } + { 0 } +\ExplSyntaxOff % \end{macrocode} % \par % @@ -12298,17 +13924,12 @@ following text: ### Token Renderer Prototypes {#texrendererprototypes} -% % \end{markdown} % \iffalse By default, token renderers point to package-defined \TeX{} macros, further referred to as *prototypes*, which provide useful default definitions. -% \fi -% -% \iffalse - ##### Plain \TeX{} Example {.unnumbered} Using a text editor, create a text document named `document.tex` with the @@ -12411,9 +14032,140 @@ following text: > > User-defined token renderers take precedence. +% \fi +% +% \begin{markdown} + +#### YAML Metadata Renderer Prototypes {#expl3yamlmetadata} + +By default, the renderer prototypes for YAML metadata provide a high-level +interface that can be programmed using the `markdown/jekyllData` key--values +from the l3keys module of the \LaTeX3 kernel. + +% \end{markdown} +% \iffalse + +##### Plain \TeX{} Example {.unnumbered} + +Using a text editor, create a text document named `document.tex` with the +following content: +``` tex +\input markdown +\def\markdownOptionJekyllData{true} +\ExplSyntaxOn +\keys_define:nn + { markdown/jekyllData } + { + name .code:n = { \gdef\name{#1} }, + age .code:n = { \gdef\age{#1} }, + } +\ExplSyntaxOff +\def\markdownRendererJekyllDataEnd{% + \name{} is \age{} years old.} +\markdownBegin +--- +name: Jane Doe +age: 99 +--- +\markdownEnd +\bye +``````` +Next, invoke LuaTeX from the terminal: +``` sh +luatex document.tex +`````` +A PDF document named `document.pdf` should be produced and contain the +following text: + +> Jane Doe is 99 years old. + +##### \LaTeX{} Example {.unnumbered} + +Using a text editor, create a text document named `document.tex` with the +following content: +``` tex +\documentclass{article} +\usepackage[jekyllData]{markdown} +\ExplSyntaxOn +\keys_define:nn + { markdown/jekyllData } + { + name .code:n = { \gdef\name{#1} }, + age .code:n = { \gdef\age{#1} }, + } +\ExplSyntaxOff +\markdownSetup{ + renderers = { + jekyllDataEnd = {\name{} is \age{} years old.}, + } +} +\begin{document} + +\begin{markdown} +--- +name: Jane Doe +age: 99 +--- +\end{markdown} + +\end{document} +``````` +Next, invoke LuaTeX from the terminal: +``` sh +lualatex document.tex +`````` +A PDF document named `document.pdf` should be produced and contain the +following text: + +> Jane Doe is 99 years old. + +##### \Hologo{ConTeXt} Example {.unnumbered} + +Using a text editor, create a text document named `document.tex` with the +following content: +``` tex +\usemodule[t][markdown] +\def\markdownOptionJekyllData{true} +\ExplSyntaxOn +\keys_define:nn + { markdown/jekyllData } + { + name .code:n = { \gdef\name{#1} }, + age .code:n = { \gdef\age{#1} }, + } +\ExplSyntaxOff +\def\markdownRendererJekyllDataEnd{% + \name{} is \age{} years old.} +\starttext + +\startmarkdown +--- +name: Jane Doe +age: 99 +--- +\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: + +> Jane Doe is 99 years old. + %</manual-tokens> %<*tex> % \fi +% \begin{macrocode} +\ExplSyntaxOn +\keys_define:nn + { markdown/jekyllData } + { } +\ExplSyntaxOff +% \end{macrocode} % % \begin{markdown} % @@ -12481,16 +14233,8 @@ following text: \def\markdownRendererBlockQuoteEndPrototype{}% \def\markdownRendererInputVerbatimPrototype#1{}% \def\markdownRendererInputFencedCodePrototype#1#2{}% -\def\markdownRendererJekyllDataBooleanPrototype#1#2{}% -\def\markdownRendererJekyllDataEmptyPrototype#1{}% -\def\markdownRendererJekyllDataNumberPrototype#1#2{}% -\def\markdownRendererJekyllDataStringPrototype#1#2{}% \def\markdownRendererJekyllDataBeginPrototype{}% \def\markdownRendererJekyllDataEndPrototype{}% -\def\markdownRendererJekyllDataSequenceBeginPrototype#1#2{}% -\def\markdownRendererJekyllDataSequenceEndPrototype{}% -\def\markdownRendererJekyllDataMappingBeginPrototype#1#2{}% -\def\markdownRendererJekyllDataMappingEndPrototype{}% \def\markdownRendererHeadingOnePrototype#1{}% \def\markdownRendererHeadingTwoPrototype#1{}% \def\markdownRendererHeadingThreePrototype#1{}% @@ -12791,21 +14535,33 @@ pdflatex --shell-escape document.tex % \end{markdown} % \begin{macrocode} \newcommand\markdownSetupSnippet[2]{% - \@ifundefined - {markdownLaTeXSetupSnippet\markdownLaTeXThemeName#1}{% - \newtoks\next - \next={#2}% - \expandafter\let\csname markdownLaTeXSetupSnippet% - \markdownLaTeXThemeName#1\endcsname=\next - }{% + \markdownIfSnippetExists{#1}% + {% \markdownWarning {Redefined setup snippet \markdownLaTeXThemeName#1}% \csname markdownLaTeXSetupSnippet% \markdownLaTeXThemeName#1\endcsname={#2}% + }{% + \newtoks\next + \next={#2}% + \expandafter\let\csname markdownLaTeXSetupSnippet% + \markdownLaTeXThemeName#1\endcsname=\next }}% % \end{macrocode} % \begin{markdown} % +% To decide whether a setup snippet exists, we can use the +% \mdef{markdownIfSnippetExists} macro: +% +% \end{markdown} +% \begin{macrocode} +\newcommand\markdownIfSnippetExists[3]{% + \@ifundefined + {markdownLaTeXSetupSnippet\markdownLaTeXThemeName#1}% + {#3}{#2}}% +% \end{macrocode} +% \begin{markdown} +% % See Section <#sec:latexthemes> for information on interactions between % setup snippets and \LaTeX{} themes. See Section <#sec:latexsetupsnippets> % for information about invoking the stored setup snippets. @@ -13282,14 +15038,15 @@ various options locally. % \fi % \begin{macrocode} \define@key{markdownOptions}{snippet}{% - \@ifundefined - {markdownLaTeXSetupSnippet#1}{% + \markdownIfSnippetExists{#1}% + {% + \expandafter\markdownSetup\expandafter{% + \the\csname markdownLaTeXSetupSnippet% + \markdownLaTeXThemeName#1\endcsname}% + }{% \markdownError {Can't invoke setup snippet #1}% {The setup snippet is undefined}% - }{% - \expandafter\markdownSetup\expandafter{% - \the\csname markdownLaTeXSetupSnippet#1\endcsname}% }% }% % \end{macrocode} @@ -13373,6 +15130,8 @@ The following ordered list will be preceded by roman numerals: \def\markdownOptionDefinitionLists{#1}}% \define@key{markdownOptions}{eagerCache}[true]{% \def\markdownOptionEagerCache{#1}}% +\define@key{markdownOptions}{expectJekyllData}[true]{% + \def\markdownOptionExpectJekyllData{#1}}% \define@key{markdownOptions}{footnotes}[true]{% \def\markdownOptionFootnotes{#1}}% \define@key{markdownOptions}{fencedCode}[true]{% @@ -13412,7 +15171,7 @@ The following ordered list will be preceded by roman numerals: \define@key{markdownOptions}{taskLists}[true]{% \def\markdownOptionTaskLists{#1}}% \define@key{markdownOptions}{texComments}[true]{% - \def\markdownOptionTeXComments{#1}}% + \def\markdownOptionTexComments{#1}}% \define@key{markdownOptions}{tightLists}[true]{% \def\markdownOptionTightLists{#1}}% \define@key{markdownOptions}{underscores}[true]{% @@ -13480,174 +15239,52 @@ The following ordered list will be preceded by roman numerals: % % \end{markdown} % \begin{macrocode} -\define@key{markdownRenderers}{attributeIdentifier}{% - \renewcommand\markdownRendererAttributeIdentifier[1]{#1}}% -\define@key{markdownRenderers}{attributeClassName}{% - \renewcommand\markdownRendererAttributeClassName[1]{#1}}% -\define@key{markdownRenderers}{attributeKeyValue}{% - \renewcommand\markdownRendererAttributeKeyValue[2]{#1}}% -\define@key{markdownRenderers}{documentBegin}{% - \renewcommand\markdownRendererDocumentBegin{#1}}% -\define@key{markdownRenderers}{documentEnd}{% - \renewcommand\markdownRendererDocumentEnd{#1}}% -\define@key{markdownRenderers}{interblockSeparator}{% - \renewcommand\markdownRendererInterblockSeparator{#1}}% -\define@key{markdownRenderers}{lineBreak}{% - \renewcommand\markdownRendererLineBreak{#1}}% -\define@key{markdownRenderers}{ellipsis}{% - \renewcommand\markdownRendererEllipsis{#1}}% -\define@key{markdownRenderers}{headerAttributeContextBegin}{% - \renewcommand\markdownRendererHeaderAttributeContextBegin{#1}}% -\define@key{markdownRenderers}{headerAttributeContextEnd}{% - \renewcommand\markdownRendererHeaderAttributeContextEnd{#1}}% -\define@key{markdownRenderers}{nbsp}{% - \renewcommand\markdownRendererNbsp{#1}}% -\define@key{markdownRenderers}{leftBrace}{% - \renewcommand\markdownRendererLeftBrace{#1}}% -\define@key{markdownRenderers}{rightBrace}{% - \renewcommand\markdownRendererRightBrace{#1}}% -\define@key{markdownRenderers}{dollarSign}{% - \renewcommand\markdownRendererDollarSign{#1}}% -\define@key{markdownRenderers}{percentSign}{% - \renewcommand\markdownRendererPercentSign{#1}}% -\define@key{markdownRenderers}{ampersand}{% - \renewcommand\markdownRendererAmpersand{#1}}% -\define@key{markdownRenderers}{underscore}{% - \renewcommand\markdownRendererUnderscore{#1}}% -\define@key{markdownRenderers}{hash}{% - \renewcommand\markdownRendererHash{#1}}% -\define@key{markdownRenderers}{circumflex}{% - \renewcommand\markdownRendererCircumflex{#1}}% -\define@key{markdownRenderers}{backslash}{% - \renewcommand\markdownRendererBackslash{#1}}% -\define@key{markdownRenderers}{tilde}{% - \renewcommand\markdownRendererTilde{#1}}% -\define@key{markdownRenderers}{pipe}{% - \renewcommand\markdownRendererPipe{#1}}% -\define@key{markdownRenderers}{codeSpan}{% - \renewcommand\markdownRendererCodeSpan[1]{#1}}% -\define@key{markdownRenderers}{link}{% - \renewcommand\markdownRendererLink[4]{#1}}% -\define@key{markdownRenderers}{contentBlock}{% - \renewcommand\markdownRendererContentBlock[4]{#1}}% -\define@key{markdownRenderers}{contentBlockOnlineImage}{% - \renewcommand\markdownRendererContentBlockOnlineImage[4]{#1}}% -\define@key{markdownRenderers}{contentBlockCode}{% - \renewcommand\markdownRendererContentBlockCode[5]{#1}}% -\define@key{markdownRenderers}{image}{% - \renewcommand\markdownRendererImage[4]{#1}}% -\define@key{markdownRenderers}{ulBegin}{% - \renewcommand\markdownRendererUlBegin{#1}}% -\define@key{markdownRenderers}{ulBeginTight}{% - \renewcommand\markdownRendererUlBeginTight{#1}}% -\define@key{markdownRenderers}{ulItem}{% - \renewcommand\markdownRendererUlItem{#1}}% -\define@key{markdownRenderers}{ulItemEnd}{% - \renewcommand\markdownRendererUlItemEnd{#1}}% -\define@key{markdownRenderers}{ulEnd}{% - \renewcommand\markdownRendererUlEnd{#1}}% -\define@key{markdownRenderers}{ulEndTight}{% - \renewcommand\markdownRendererUlEndTight{#1}}% -\define@key{markdownRenderers}{olBegin}{% - \renewcommand\markdownRendererOlBegin{#1}}% -\define@key{markdownRenderers}{olBeginTight}{% - \renewcommand\markdownRendererOlBeginTight{#1}}% -\define@key{markdownRenderers}{olItem}{% - \renewcommand\markdownRendererOlItem{#1}}% -\define@key{markdownRenderers}{olItemWithNumber}{% - \renewcommand\markdownRendererOlItemWithNumber[1]{#1}}% -\define@key{markdownRenderers}{olItemEnd}{% - \renewcommand\markdownRendererOlItemEnd{#1}}% -\define@key{markdownRenderers}{olEnd}{% - \renewcommand\markdownRendererOlEnd{#1}}% -\define@key{markdownRenderers}{olEndTight}{% - \renewcommand\markdownRendererOlEndTight{#1}}% -\define@key{markdownRenderers}{dlBegin}{% - \renewcommand\markdownRendererDlBegin{#1}}% -\define@key{markdownRenderers}{dlBeginTight}{% - \renewcommand\markdownRendererDlBeginTight{#1}}% -\define@key{markdownRenderers}{dlItem}{% - \renewcommand\markdownRendererDlItem[1]{#1}}% -\define@key{markdownRenderers}{dlItemEnd}{% - \renewcommand\markdownRendererDlItemEnd{#1}}% -\define@key{markdownRenderers}{dlDefinitionBegin}{% - \renewcommand\markdownRendererDlDefinitionBegin{#1}}% -\define@key{markdownRenderers}{dlDefinitionEnd}{% - \renewcommand\markdownRendererDlDefinitionEnd{#1}}% -\define@key{markdownRenderers}{dlEnd}{% - \renewcommand\markdownRendererDlEnd{#1}}% -\define@key{markdownRenderers}{dlEndTight}{% - \renewcommand\markdownRendererDlEndTight{#1}}% -\define@key{markdownRenderers}{emphasis}{% - \renewcommand\markdownRendererEmphasis[1]{#1}}% -\define@key{markdownRenderers}{strongEmphasis}{% - \renewcommand\markdownRendererStrongEmphasis[1]{#1}}% -\define@key{markdownRenderers}{blockQuoteBegin}{% - \renewcommand\markdownRendererBlockQuoteBegin{#1}}% -\define@key{markdownRenderers}{blockQuoteEnd}{% - \renewcommand\markdownRendererBlockQuoteEnd{#1}}% -\define@key{markdownRenderers}{inputVerbatim}{% - \renewcommand\markdownRendererInputVerbatim[1]{#1}}% -\define@key{markdownRenderers}{inputFencedCode}{% - \renewcommand\markdownRendererInputFencedCode[2]{#1}}% -\define@key{markdownRenderers}{jekyllDataBoolean}{% - \renewcommand\markdownRendererJekyllDataBoolean[2]{#1}}% -\define@key{markdownRenderers}{jekyllDataEmpty}{% - \renewcommand\markdownRendererJekyllDataEmpty[1]{#1}}% -\define@key{markdownRenderers}{jekyllDataNumber}{% - \renewcommand\markdownRendererJekyllDataNumber[2]{#1}}% -\define@key{markdownRenderers}{jekyllDataString}{% - \renewcommand\markdownRendererJekyllDataString[2]{#1}}% -\define@key{markdownRenderers}{jekyllDataBegin}{% - \renewcommand\markdownRendererJekyllDataBegin{#1}}% -\define@key{markdownRenderers}{jekyllDataEnd}{% - \renewcommand\markdownRendererJekyllDataEnd{#1}}% -\define@key{markdownRenderers}{jekyllDataSequenceBegin}{% - \renewcommand\markdownRendererJekyllDataSequenceBegin[2]{#1}}% -\define@key{markdownRenderers}{jekyllDataSequenceEnd}{% - \renewcommand\markdownRendererJekyllDataSequenceEnd{#1}}% -\define@key{markdownRenderers}{jekyllDataMappingBegin}{% - \renewcommand\markdownRendererJekyllDataMappingBegin[2]{#1}}% -\define@key{markdownRenderers}{jekyllDataMappingEnd}{% - \renewcommand\markdownRendererJekyllDataMappingEnd{#1}}% -\define@key{markdownRenderers}{headingOne}{% - \renewcommand\markdownRendererHeadingOne[1]{#1}}% -\define@key{markdownRenderers}{headingTwo}{% - \renewcommand\markdownRendererHeadingTwo[1]{#1}}% -\define@key{markdownRenderers}{headingThree}{% - \renewcommand\markdownRendererHeadingThree[1]{#1}}% -\define@key{markdownRenderers}{headingFour}{% - \renewcommand\markdownRendererHeadingFour[1]{#1}}% -\define@key{markdownRenderers}{headingFive}{% - \renewcommand\markdownRendererHeadingFive[1]{#1}}% -\define@key{markdownRenderers}{headingSix}{% - \renewcommand\markdownRendererHeadingSix[1]{#1}}% -\define@key{markdownRenderers}{horizontalRule}{% - \renewcommand\markdownRendererHorizontalRule{#1}}% -\define@key{markdownRenderers}{footnote}{% - \renewcommand\markdownRendererFootnote[1]{#1}}% -\define@key{markdownRenderers}{cite}{% - \renewcommand\markdownRendererCite[1]{#1}}% -\define@key{markdownRenderers}{textCite}{% - \renewcommand\markdownRendererTextCite[1]{#1}}% -\define@key{markdownRenderers}{table}{% - \renewcommand\markdownRendererTable[3]{#1}}% -\define@key{markdownRenderers}{inlineHtmlComment}{% - \renewcommand\markdownRendererInlineHtmlComment[1]{#1}}% -\define@key{markdownRenderers}{blockHtmlCommentBegin}{% - \renewcommand\markdownRendererBlockHtmlCommentBegin{#1}}% -\define@key{markdownRenderers}{blockHtmlCommentEnd}{% - \renewcommand\markdownRendererBlockHtmlCommentEnd{#1}}% -\define@key{markdownRenderers}{inlineHtmlTag}{% - \renewcommand\markdownRendererInlineHtmlTag[1]{#1}}% -\define@key{markdownRenderers}{inputBlockHtmlElement}{% - \renewcommand\markdownRendererInputBlockHtmlElement[1]{#1}}% -\define@key{markdownRenderers}{tickedBox}{% - \renewcommand\markdownRendererTickedBox{#1}}% -\define@key{markdownRenderers}{halfTickedBox}{% - \renewcommand\markdownRendererHalfTickedBox{#1}}% -\define@key{markdownRenderers}{untickedBox}{% - \renewcommand\markdownRendererUntickedBox{#1}}% +\ExplSyntaxOn +\cs_new:Nn \@@_latex_define_renderers: + { + \seq_map_function:NN + \g_@@_renderers_seq + \@@_latex_define_renderer:n + } +\cs_new:Nn \@@_latex_define_renderer:n + { + \tl_set:Nn + \l_tmpb_tl +% TODO: Replace with \str_uppercase:n in TeX Live 2020. + { \str_upper_case:n { #1 } } + \tl_set:Nx + \l_tmpa_tl + { + markdownRenderer + \tl_head:f { \l_tmpb_tl } + \tl_tail:n { #1 } + } + \prop_get:NnN + \g_@@_renderer_arities_prop + { #1 } + \l_tmpb_tl + \@@_latex_define_renderer:ncV + { #1 } + { \l_tmpa_tl } + \l_tmpb_tl + } +\cs_new:Nn \@@_latex_define_renderer:nNn + { + \define@key + { markdownRenderers } + { #1 } + { + \cs_generate_from_arg_count:NNnn + #2 + \cs_set:Npn + { #3 } + { ##1 } + } + } +\cs_generate_variant:Nn + \@@_latex_define_renderer:nNn + { ncV } +\ExplSyntaxOff % \end{macrocode} % \par % \begin{markdown} @@ -13673,174 +15310,53 @@ The following ordered list will be preceded by roman numerals: % % \end{markdown} % \begin{macrocode} -\define@key{markdownRendererPrototypes}{attributeIdentifier}{% - \renewcommand\markdownRendererAttributeIdentifierPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{attributeClassName}{% - \renewcommand\markdownRendererAttributeClassNamePrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{attributeKeyValue}{% - \renewcommand\markdownRendererAttributeKeyValuePrototype[2]{#1}}% -\define@key{markdownRendererPrototypes}{documentBegin}{% - \renewcommand\markdownRendererDocumentBeginPrototype{#1}}% -\define@key{markdownRendererPrototypes}{documentEnd}{% - \renewcommand\markdownRendererDocumentEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{interblockSeparator}{% - \renewcommand\markdownRendererInterblockSeparatorPrototype{#1}}% -\define@key{markdownRendererPrototypes}{lineBreak}{% - \renewcommand\markdownRendererLineBreakPrototype{#1}}% -\define@key{markdownRendererPrototypes}{ellipsis}{% - \renewcommand\markdownRendererEllipsisPrototype{#1}}% -\define@key{markdownRendererPrototypes}{headerAttributeContextBegin}{% - \renewcommand\markdownRendererHeaderAttributeContextBeginPrototype{#1}}% -\define@key{markdownRendererPrototypes}{headerAttributeContextEnd}{% - \renewcommand\markdownRendererHeaderAttributeContextEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{nbsp}{% - \renewcommand\markdownRendererNbspPrototype{#1}}% -\define@key{markdownRendererPrototypes}{leftBrace}{% - \renewcommand\markdownRendererLeftBracePrototype{#1}}% -\define@key{markdownRendererPrototypes}{rightBrace}{% - \renewcommand\markdownRendererRightBracePrototype{#1}}% -\define@key{markdownRendererPrototypes}{dollarSign}{% - \renewcommand\markdownRendererDollarSignPrototype{#1}}% -\define@key{markdownRendererPrototypes}{percentSign}{% - \renewcommand\markdownRendererPercentSignPrototype{#1}}% -\define@key{markdownRendererPrototypes}{ampersand}{% - \renewcommand\markdownRendererAmpersandPrototype{#1}}% -\define@key{markdownRendererPrototypes}{underscore}{% - \renewcommand\markdownRendererUnderscorePrototype{#1}}% -\define@key{markdownRendererPrototypes}{hash}{% - \renewcommand\markdownRendererHashPrototype{#1}}% -\define@key{markdownRendererPrototypes}{circumflex}{% - \renewcommand\markdownRendererCircumflexPrototype{#1}}% -\define@key{markdownRendererPrototypes}{backslash}{% - \renewcommand\markdownRendererBackslashPrototype{#1}}% -\define@key{markdownRendererPrototypes}{tilde}{% - \renewcommand\markdownRendererTildePrototype{#1}}% -\define@key{markdownRendererPrototypes}{pipe}{% - \renewcommand\markdownRendererPipePrototype{#1}}% -\define@key{markdownRendererPrototypes}{codeSpan}{% - \renewcommand\markdownRendererCodeSpanPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{link}{% - \renewcommand\markdownRendererLinkPrototype[4]{#1}}% -\define@key{markdownRendererPrototypes}{contentBlock}{% - \renewcommand\markdownRendererContentBlockPrototype[4]{#1}}% -\define@key{markdownRendererPrototypes}{contentBlockOnlineImage}{% - \renewcommand\markdownRendererContentBlockOnlineImagePrototype[4]{#1}}% -\define@key{markdownRendererPrototypes}{contentBlockCode}{% - \renewcommand\markdownRendererContentBlockCodePrototype[5]{#1}}% -\define@key{markdownRendererPrototypes}{image}{% - \renewcommand\markdownRendererImagePrototype[4]{#1}}% -\define@key{markdownRendererPrototypes}{ulBegin}{% - \renewcommand\markdownRendererUlBeginPrototype{#1}}% -\define@key{markdownRendererPrototypes}{ulBeginTight}{% - \renewcommand\markdownRendererUlBeginTightPrototype{#1}}% -\define@key{markdownRendererPrototypes}{ulItem}{% - \renewcommand\markdownRendererUlItemPrototype{#1}}% -\define@key{markdownRendererPrototypes}{ulItemEnd}{% - \renewcommand\markdownRendererUlItemEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{ulEnd}{% - \renewcommand\markdownRendererUlEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{ulEndTight}{% - \renewcommand\markdownRendererUlEndTightPrototype{#1}}% -\define@key{markdownRendererPrototypes}{olBegin}{% - \renewcommand\markdownRendererOlBeginPrototype{#1}}% -\define@key{markdownRendererPrototypes}{olBeginTight}{% - \renewcommand\markdownRendererOlBeginTightPrototype{#1}}% -\define@key{markdownRendererPrototypes}{olItem}{% - \renewcommand\markdownRendererOlItemPrototype{#1}}% -\define@key{markdownRendererPrototypes}{olItemWithNumber}{% - \renewcommand\markdownRendererOlItemWithNumberPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{olItemEnd}{% - \renewcommand\markdownRendererOlItemEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{olEnd}{% - \renewcommand\markdownRendererOlEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{olEndTight}{% - \renewcommand\markdownRendererOlEndTightPrototype{#1}}% -\define@key{markdownRendererPrototypes}{dlBegin}{% - \renewcommand\markdownRendererDlBeginPrototype{#1}}% -\define@key{markdownRendererPrototypes}{dlBeginTight}{% - \renewcommand\markdownRendererDlBeginTightPrototype{#1}}% -\define@key{markdownRendererPrototypes}{dlItem}{% - \renewcommand\markdownRendererDlItemPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{dlItemEnd}{% - \renewcommand\markdownRendererDlItemEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{dlDefinitionBegin}{% - \renewcommand\markdownRendererDlDefinitionBeginPrototype{#1}}% -\define@key{markdownRendererPrototypes}{dlDefinitionEnd}{% - \renewcommand\markdownRendererDlDefinitionEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{dlEnd}{% - \renewcommand\markdownRendererDlEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{dlEndTight}{% - \renewcommand\markdownRendererDlEndTightPrototype{#1}}% -\define@key{markdownRendererPrototypes}{emphasis}{% - \renewcommand\markdownRendererEmphasisPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{strongEmphasis}{% - \renewcommand\markdownRendererStrongEmphasisPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{blockQuoteBegin}{% - \renewcommand\markdownRendererBlockQuoteBeginPrototype{#1}}% -\define@key{markdownRendererPrototypes}{blockQuoteEnd}{% - \renewcommand\markdownRendererBlockQuoteEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{inputVerbatim}{% - \renewcommand\markdownRendererInputVerbatimPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{inputFencedCode}{% - \renewcommand\markdownRendererInputFencedCodePrototype[2]{#1}}% -\define@key{markdownRendererPrototypes}{jekyllDataBoolean}{% - \renewcommand\markdownRendererJekyllDataBooleanPrototype[2]{#1}}% -\define@key{markdownRendererPrototypes}{jekyllDataEmpty}{% - \renewcommand\markdownRendererJekyllDataEmptyPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{jekyllDataNumber}{% - \renewcommand\markdownRendererJekyllDataNumberPrototype[2]{#1}}% -\define@key{markdownRendererPrototypes}{jekyllDataString}{% - \renewcommand\markdownRendererJekyllDataStringPrototype[2]{#1}}% -\define@key{markdownRendererPrototypes}{jekyllDataBegin}{% - \renewcommand\markdownRendererJekyllDataBeginPrototype{#1}}% -\define@key{markdownRendererPrototypes}{jekyllDataEnd}{% - \renewcommand\markdownRendererJekyllDataEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{jekyllDataSequenceBegin}{% - \renewcommand\markdownRendererJekyllDataSequenceBeginPrototype[2]{#1}}% -\define@key{markdownRendererPrototypes}{jekyllDataSequenceEnd}{% - \renewcommand\markdownRendererJekyllDataSequenceEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{jekyllDataMappingBegin}{% - \renewcommand\markdownRendererJekyllDataMappingBeginPrototype[2]{#1}}% -\define@key{markdownRendererPrototypes}{jekyllDataMappingEnd}{% - \renewcommand\markdownRendererJekyllDataMappingEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{headingOne}{% - \renewcommand\markdownRendererHeadingOnePrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{headingTwo}{% - \renewcommand\markdownRendererHeadingTwoPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{headingThree}{% - \renewcommand\markdownRendererHeadingThreePrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{headingFour}{% - \renewcommand\markdownRendererHeadingFourPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{headingFive}{% - \renewcommand\markdownRendererHeadingFivePrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{headingSix}{% - \renewcommand\markdownRendererHeadingSixPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{horizontalRule}{% - \renewcommand\markdownRendererHorizontalRulePrototype{#1}}% -\define@key{markdownRendererPrototypes}{footnote}{% - \renewcommand\markdownRendererFootnotePrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{cite}{% - \renewcommand\markdownRendererCitePrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{textCite}{% - \renewcommand\markdownRendererTextCitePrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{table}{% - \renewcommand\markdownRendererTablePrototype[3]{#1}}% -\define@key{markdownRendererPrototypes}{inlineHtmlComment}{% - \renewcommand\markdownRendererInlineHtmlCommentPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{blockHtmlCommentBegin}{% - \renewcommand\markdownRendererBlockHtmlCommentBeginPrototype{#1}}% -\define@key{markdownRendererPrototypes}{blockHtmlCommentEnd}{% - \renewcommand\markdownRendererBlockHtmlCommentEndPrototype{#1}}% -\define@key{markdownRendererPrototypes}{inlineHtmlTag}{% - \renewcommand\markdownRendererInlineHtmlTagPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{inputBlockHtmlElement}{% - \renewcommand\markdownRendererInputBlockHtmlElementPrototype[1]{#1}}% -\define@key{markdownRendererPrototypes}{tickedBox}{% - \renewcommand\markdownRendererTickedBoxPrototype{#1}}% -\define@key{markdownRendererPrototypes}{halfTickedBox}{% - \renewcommand\markdownRendererHalfTickedBoxPrototype{#1}}% -\define@key{markdownRendererPrototypes}{untickedBox}{% - \renewcommand\markdownRendererUntickedBoxPrototype{#1}}% +\ExplSyntaxOn +\cs_new:Nn \@@_latex_define_renderer_prototypes: + { + \seq_map_function:NN + \g_@@_renderers_seq + \@@_latex_define_renderer_prototype:n + } +\cs_new:Nn \@@_latex_define_renderer_prototype:n + { + \tl_set:Nn + \l_tmpb_tl +% TODO: Replace with \str_uppercase:n in TeX Live 2020. + { \str_upper_case:n { #1 } } + \tl_set:Nx + \l_tmpa_tl + { + markdownRenderer + \tl_head:f { \l_tmpb_tl } + \tl_tail:n { #1 } + Prototype + } + \prop_get:NnN + \g_@@_renderer_arities_prop + { #1 } + \l_tmpb_tl + \@@_latex_define_renderer_prototype:ncV + { #1 } + { \l_tmpa_tl } + \l_tmpb_tl + } +\cs_new:Nn \@@_latex_define_renderer_prototype:nNn + { + \define@key + { markdownRendererPrototypes } + { #1 } + { + \cs_generate_from_arg_count:NNnn + #2 + \cs_set:Npn + { #3 } + { ##1 } + } + } +\cs_generate_variant:Nn + \@@_latex_define_renderer_prototype:nNn + { ncV } +\ExplSyntaxOff % \end{macrocode} % \par % \begin{markdown} @@ -18241,8 +19757,6 @@ parsers.urlchar = parsers.anyescaped - parsers.newline - parsers.more % % \end{markdown} % \begin{macrocode} -parsers.Block = V("Block") - parsers.OnlineImageURL = parsers.leader * parsers.onlineimageurl @@ -18495,13 +20009,13 @@ function M.reader.new(writer, options) = create_parser("parse_blocks", function() return larsers.blocks - end, false) + end, true) - local parse_blocks_toplevel - = create_parser("parse_blocks_toplevel", + local parse_blocks_nested + = create_parser("parse_blocks_nested", function() - return larsers.blocks_toplevel - end, true) + return larsers.blocks_nested + end, false) local parse_inlines = create_parser("parse_inlines", @@ -18622,7 +20136,7 @@ function M.reader.new(writer, options) return writer.defer_call(function() local found = rawnotes[normalize_tag(ref)] if found then - return writer.note(parse_blocks_toplevel(found)) + return writer.note(parse_blocks_nested(found)) else return {"[", parse_inlines("^" .. ref), "]"} end @@ -18953,7 +20467,7 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline * parsers.contentblock_tail / writer.contentblock - larsers.DisplayHtml = (parsers.htmlcomment / parse_blocks) + larsers.DisplayHtml = (parsers.htmlcomment / parse_blocks_nested) / writer.block_html_comment + parsers.emptyelt_block / writer.block_html_element + parsers.openelt_exact("hr") / writer.block_html_element @@ -18971,21 +20485,40 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline expandtabs(code)) end - larsers.JekyllData = P("---") + larsers.JekyllData = Cmt( C((parsers.line - P("---") - P("..."))^0) + , function(s, i, text) + local data + local ran_ok, error = pcall(function() + local tinyyaml = require("markdown-tinyyaml") + data = tinyyaml.parse(text, {timestamps=false}) + end) + if ran_ok and data ~= nil then + return true, writer.jekyllData(data, function(s) + return parse_blocks_nested(s) + end, nil) + else + return false + end + end + ) + + larsers.UnexpectedJekyllData + = P("---") * parsers.blankline / 0 * #(-parsers.blankline) -- if followed by blank, it's an hrule - * C((parsers.line - P("---") - P("..."))^0) + * larsers.JekyllData * (P("---") + P("...")) - / function(text) - local tinyyaml = require("markdown-tinyyaml") - data = tinyyaml.parse(text,{timestamps=false}) - return writer.jekyllData(data, function(s) - return parse_blocks(s) - end, nil) - end + + larsers.ExpectedJekyllData + = ( P("---") + * parsers.blankline / 0 + * #(-parsers.blankline) -- if followed by blank, it's an hrule + )^-1 + * larsers.JekyllData + * (P("---") + P("..."))^-1 larsers.Blockquote = Cs(larsers.blockquote_body^1) - / parse_blocks_toplevel / writer.blockquote + / parse_blocks_nested / writer.blockquote larsers.HorizontalRule = ( parsers.lineof(parsers.asterisk) + parsers.lineof(parsers.dash) @@ -18995,15 +20528,6 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline larsers.Reference = parsers.define_reference_parser / register_link larsers.Paragraph = parsers.nonindentspace * Ct(parsers.Inline^1) - * parsers.newline - * ( parsers.blankline^1 - + #parsers.hash - + #(parsers.leader * parsers.more * parsers.space^-1) - ) - / writer.paragraph - - larsers.ToplevelParagraph - = parsers.nonindentspace * Ct(parsers.Inline^1) * ( parsers.newline * ( parsers.blankline^1 + #parsers.hash @@ -19052,7 +20576,7 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline larsers.TightListItem = function(starter) return -larsers.HorizontalRule * (Cs(starter / "" * larsers.tickbox^-1 * larsers.ListBlock * larsers.NestedList^-1) - / parse_blocks) + / parse_blocks_nested) * -(parsers.blanklines * parsers.indent) end @@ -19061,7 +20585,7 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline * Cs( starter / "" * larsers.tickbox^-1 * larsers.ListBlock * Cc("\n") * (larsers.NestedList + larsers.ListContinuationBlock^0) * (parsers.blanklines / "\n\n") - ) / parse_blocks + ) / parse_blocks_nested end larsers.BulletList = ( Ct(larsers.TightListItem(parsers.bullet)^1) * Cc(true) @@ -19098,12 +20622,12 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline larsers.DefinitionListItemLoose = C(parsers.line) * parsers.skipblanklines * Ct((parsers.defstart * parsers.indented_blocks(parsers.dlchunk) - / parse_blocks_toplevel)^1) + / parse_blocks_nested)^1) * Cc(false) / definition_list_item larsers.DefinitionListItemTight = C(parsers.line) * Ct((parsers.defstart * parsers.dlchunk - / parse_blocks)^1) + / parse_blocks_nested)^1) * Cc(true) / definition_list_item larsers.DefinitionList = ( Ct(larsers.DefinitionListItemLoose^1) * Cc(false) @@ -19202,17 +20726,22 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline local syntax = { "Blocks", - Blocks = larsers.Blank^0 * parsers.Block^-1 - * (larsers.Blank^0 / writer.interblocksep - * parsers.Block)^0 - * larsers.Blank^0 * parsers.eof, + Blocks = ( V("ExpectedJekyllData") + * (V("Blank")^0 / writer.interblocksep) + )^-1 + * V("Blank")^0 + * V("Block")^-1 + * (V("Blank")^0 / writer.interblocksep + * V("Block"))^0 + * V("Blank")^0 * parsers.eof, Blank = larsers.Blank, - JekyllData = larsers.JekyllData, + UnexpectedJekyllData = larsers.UnexpectedJekyllData, + ExpectedJekyllData = larsers.ExpectedJekyllData, Block = V("ContentBlock") - + V("JekyllData") + + V("UnexpectedJekyllData") + V("Blockquote") + V("PipeTable") + V("Verbatim") @@ -19341,7 +20870,11 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline end if not options.jekyllData then - syntax.JekyllData = parsers.fail + syntax.UnexpectedJekyllData = parsers.fail + end + + if not options.jekyllData or not options.expectJekyllData then + syntax.ExpectedJekyllData = parsers.fail end if options.preserveTabs then @@ -19360,9 +20893,9 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline syntax.AutoLinkRelativeReference = parsers.fail end - local blocks_toplevel_t = util.table_copy(syntax) - blocks_toplevel_t.Paragraph = larsers.ToplevelParagraph - larsers.blocks_toplevel = Ct(blocks_toplevel_t) + local blocks_nested_t = util.table_copy(syntax) + blocks_nested_t.ExpectedJekyllData = parsers.fail + larsers.blocks_nested = Ct(blocks_nested_t) larsers.blocks = Ct(syntax) @@ -19427,7 +20960,7 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline % \end{markdown} % \begin{macrocode} local function convert(input) - local document = parse_blocks_toplevel(input) + local document = parse_blocks(input) return util.rope_to_string(writer.document(document)) end if options.eagerCache or options.finalizeCache then @@ -19684,121 +21217,377 @@ end % \par % \begin{markdown} % +%#### YAML Metadata Renderer Prototypes {#expl3yamlmetadataimplementation} +% +% To keep track of the current type of structure we inhabit when we are +% traversing a \acro{yaml} document, we will maintain the +% \mdef{g_\@\@_jekyll_data_datatypes_seq} stack. At every step of the traversal, +% the stack will contain one of the following constants at any position $p$: +% +% \mdef{c_\@\@_jekyll_data_sequence_tl} +% +%: The currently traversed branch of the \acro{yaml} document contains a sequence +% at depth $p$. +% +% \mdef{c_\@\@_jekyll_data_mapping_tl} +% +%: The currently traversed branch of the \acro{yaml} document contains a mapping +% at depth $p$. +% +% \mdef{c_\@\@_jekyll_data_scalar_tl} +% +%: The currently traversed branch of the \acro{yaml} document contains a scalar +% value at depth $p$. +% +% \end{markdown} +% \begin{macrocode} +\ExplSyntaxOn +\seq_new:N \g_@@_jekyll_data_datatypes_seq +\tl_const:Nn \c_@@_jekyll_data_sequence_tl { sequence } +\tl_const:Nn \c_@@_jekyll_data_mapping_tl { mapping } +\tl_const:Nn \c_@@_jekyll_data_scalar_tl { scalar } +% \end{macrocode} +% \par +% \begin{markdown} +% +% To keep track of our current place when we are traversing a \acro{yaml} +% document, we will maintain the +% \mdef{g_\@\@_jekyll_data_wildcard_absolute_address_seq} stack of keys using +% the \mdef{markdown_jekyll_data_push_address_segment:n} macro. +% +% \end{markdown} +% \begin{macrocode} +\seq_new:N \g_@@_jekyll_data_wildcard_absolute_address_seq +\cs_new:Nn \markdown_jekyll_data_push_address_segment:n + { + \seq_if_empty:NF + \g_@@_jekyll_data_datatypes_seq + { + \seq_get_right:NN + \g_@@_jekyll_data_datatypes_seq + \l_tmpa_tl +% \end{macrocode} +% \begin{markdown} +% +% If we are currently in a sequence, we will put an asterisk (`*`) instead of +% a key into \mref{g_\@\@_jekyll_data_wildcard_absolute_address_seq} to make +% it represent a *wildcard*. Keeping a wildcard instead of a precise address +% makes it easy for the users to react to *any* item of a sequence regardless +% of how many there are, which can often be useful. +% +% \end{markdown} +% \begin{macrocode} + \tl_if_eq:NNTF + \l_tmpa_tl + \c_@@_jekyll_data_sequence_tl + { + \seq_put_right:Nn + \g_@@_jekyll_data_wildcard_absolute_address_seq + { * } + } + { + \seq_put_right:Nn + \g_@@_jekyll_data_wildcard_absolute_address_seq + { #1 } + } + } + } +% \end{macrocode} +% \par +% \begin{markdown} +% +% Out of \mref{g_\@\@_jekyll_data_wildcard_absolute_address_seq}, we will +% construct the following two token lists: +% +% \mdef{g_\@\@_jekyll_data_wildcard_absolute_address_tl} +% +%: An *absolute wildcard*: The wildcard from the root of the document +% prefixed with a slash (`/`) with individual keys and asterisks also +% delimited by slashes. Allows the users to react to complex +% context-sensitive structures with ease. +% +%: For example, the `name` key in the following \acro{yaml} document +% would correspond to the `/*/person/name` absolute wildcard: +% ``` yaml +% [{person: {name: Elon, surname: Musk}}] +% ``` +% +% \mdef{g_\@\@_jekyll_data_wildcard_relative_address_tl} +% +%: A *relative wildcard*: The rightmost segment of the wildcard. Allows the +% users to react to simple context-free structures. +% +%: For example, the `name` key in the following \acro{yaml} document +% would correspond to the `name` relative wildcard: +% ``` yaml +% [{person: {name: Elon, surname: Musk}}] +% ``` +% +% We will construct \mref{g_\@\@_jekyll_data_wildcard_absolute_address_tl} +% using the \mdef{markdown_jekyll_data_concatenate_address:NN} macro and +% we will construct both token lists using the +% \mdef{markdown_jekyll_data_update_address_tls:} macro. +% +% \end{markdown} +% \begin{macrocode} +\tl_new:N \g_@@_jekyll_data_wildcard_absolute_address_tl +\tl_new:N \g_@@_jekyll_data_wildcard_relative_address_tl +\cs_new:Nn \markdown_jekyll_data_concatenate_address:NN + { + \seq_pop_left:NN #1 \l_tmpa_tl + \tl_set:Nx #2 { / \seq_use:Nn #1 { / } } + \seq_put_left:NV #1 \l_tmpa_tl + } +\cs_new:Nn \markdown_jekyll_data_update_address_tls: + { + \markdown_jekyll_data_concatenate_address:NN + \g_@@_jekyll_data_wildcard_absolute_address_seq + \g_@@_jekyll_data_wildcard_absolute_address_tl + \seq_get_right:NN + \g_@@_jekyll_data_wildcard_absolute_address_seq + \g_@@_jekyll_data_wildcard_relative_address_tl + } +% \end{macrocode} +% \par +% \begin{markdown} +% +% To make sure that the stacks and token lists stay in sync, we will use the +% \mdef{markdown_jekyll_data_push:nN} and \mdef{markdown_jekyll_data_pop:} +% macros. +% +% \end{markdown} +% \begin{macrocode} +\cs_new:Nn \markdown_jekyll_data_push:nN + { + \markdown_jekyll_data_push_address_segment:n + { #1 } + \seq_put_right:NV + \g_@@_jekyll_data_datatypes_seq + #2 + \markdown_jekyll_data_update_address_tls: + } +\cs_new:Nn \markdown_jekyll_data_pop: + { + \seq_pop_right:NN + \g_@@_jekyll_data_wildcard_absolute_address_seq + \l_tmpa_tl + \seq_pop_right:NN + \g_@@_jekyll_data_datatypes_seq + \l_tmpa_tl + \markdown_jekyll_data_update_address_tls: + } +% \end{macrocode} +% \par +% \begin{markdown} +% +% To set a single key--value, we will use the +% \mdef{markdown_jekyll_data_set_keyval:Nn} macro, ignoring unknown keys. +% To set key--values for both absolute and relative wildcards, we will use the +% \mdef{markdown_jekyll_data_set_keyvals:nn} macro. +% +% \end{markdown} +% \begin{macrocode} +\cs_new:Nn \markdown_jekyll_data_set_keyval:nn + { + \keys_set_known:nn + { markdown/jekyllData } + { { #1 } = { #2 } } + } +\cs_generate_variant:Nn + \markdown_jekyll_data_set_keyval:nn + { Vn } +\cs_new:Nn \markdown_jekyll_data_set_keyvals:nn + { + \markdown_jekyll_data_push:nN + { #1 } + \c_@@_jekyll_data_scalar_tl + \markdown_jekyll_data_set_keyval:Vn + \g_@@_jekyll_data_wildcard_absolute_address_tl + { #2 } + \markdown_jekyll_data_set_keyval:Vn + \g_@@_jekyll_data_wildcard_relative_address_tl + { #2 } + \markdown_jekyll_data_pop: + } +% \end{macrocode} +% \par +% \begin{markdown} +% +% Finally, we will register our macros as token renderer prototypes +% to be able to react to the traversal of a \acro{yaml} document. +% +% \end{markdown} +% \begin{macrocode} +\def\markdownRendererJekyllDataSequenceBeginPrototype#1#2{ + \markdown_jekyll_data_push:nN + { #1 } + \c_@@_jekyll_data_sequence_tl +} +\def\markdownRendererJekyllDataMappingBeginPrototype#1#2{ + \markdown_jekyll_data_push:nN + { #1 } + \c_@@_jekyll_data_mapping_tl +} +\def\markdownRendererJekyllDataSequenceEndPrototype{ + \markdown_jekyll_data_pop: +} +\def\markdownRendererJekyllDataMappingEndPrototype{ + \markdown_jekyll_data_pop: +} +\def\markdownRendererJekyllDataBooleanPrototype#1#2{ + \markdown_jekyll_data_set_keyvals:nn + { #1 } + { #2 } +} +\def\markdownRendererJekyllDataEmptyPrototype#1{} +\def\markdownRendererJekyllDataNumberPrototype#1#2{ + \markdown_jekyll_data_set_keyvals:nn + { #1 } + { #2 } +} +\def\markdownRendererJekyllDataStringPrototype#1#2{ + \markdown_jekyll_data_set_keyvals:nn + { #1 } + { #2 } +} +\ExplSyntaxOff +% \end{macrocode} +% \begin{markdown} +% %### Lua Snippets -% The \mdef{markdownLuaOptions} macro expands to a Lua table that +% After the \mdef{markdownPrepareLuaOptions} macro has been fully expanded, +% the \mdef{markdownLuaOptions} macro will expands to a Lua table that % contains the plain \TeX{} options (see Section <#sec:texoptions>) in a % format recognized by Lua (see Section <#sec:luaoptions>). % % \end{markdown} % \begin{macrocode} -\def\markdownLuaOptions{{% -\ifx\markdownOptionBlankBeforeBlockquote\undefined\else - blankBeforeBlockquote = \markdownOptionBlankBeforeBlockquote, -\fi -\ifx\markdownOptionBlankBeforeCodeFence\undefined\else - blankBeforeCodeFence = \markdownOptionBlankBeforeCodeFence, -\fi -\ifx\markdownOptionBlankBeforeHeading\undefined\else - blankBeforeHeading = \markdownOptionBlankBeforeHeading, -\fi -\ifx\markdownOptionBreakableBlockquotes\undefined\else - breakableBlockquotes = \markdownOptionBreakableBlockquotes, -\fi - cacheDir = "\markdownOptionCacheDir", -\ifx\markdownOptionCitations\undefined\else - citations = \markdownOptionCitations, -\fi -\ifx\markdownOptionCitationNbsps\undefined\else - citationNbsps = \markdownOptionCitationNbsps, -\fi -\ifx\markdownOptionCodeSpans\undefined\else - codeSpans = \markdownOptionCodeSpans, -\fi -\ifx\markdownOptionContentBlocks\undefined\else - contentBlocks = \markdownOptionContentBlocks, -\fi -\ifx\markdownOptionContentBlocksLanguageMap\undefined\else - contentBlocksLanguageMap = - "\markdownOptionContentBlocksLanguageMap", -\fi -\ifx\markdownOptionDefinitionLists\undefined\else - definitionLists = \markdownOptionDefinitionLists, -\fi -\ifx\markdownOptionEagerCache\undefined\else - eagerCache = \markdownOptionEagerCache, -\fi -\ifx\markdownOptionFinalizeCache\undefined\else - finalizeCache = \markdownOptionFinalizeCache, -\fi - frozenCacheFileName = "\markdownOptionFrozenCacheFileName", - frozenCacheCounter = \the\markdownFrozenCacheCounter, -\ifx\markdownOptionFootnotes\undefined\else - footnotes = \markdownOptionFootnotes, -\fi -\ifx\markdownOptionFencedCode\undefined\else - fencedCode = \markdownOptionFencedCode, -\fi -\ifx\markdownOptionHardLineBreaks\undefined\else - hardLineBreaks = \markdownOptionHardLineBreaks, -\fi -\ifx\markdownOptionHashEnumerators\undefined\else - hashEnumerators = \markdownOptionHashEnumerators, -\fi -\ifx\markdownOptionHeaderAttributes\undefined\else - headerAttributes = \markdownOptionHeaderAttributes, -\fi -\ifx\markdownOptionHtml\undefined\else - html = \markdownOptionHtml, -\fi -\ifx\markdownOptionHybrid\undefined\else - hybrid = \markdownOptionHybrid, -\fi -\ifx\markdownOptionInlineFootnotes\undefined\else - inlineFootnotes = \markdownOptionInlineFootnotes, -\fi -\ifx\markdownOptionJekyllData\undefined\else - jekyllData = \markdownOptionJekyllData, -\fi -\ifx\markdownOptionPipeTables\undefined\else - pipeTables = \markdownOptionPipeTables, -\fi -\ifx\markdownOptionPreserveTabs\undefined\else - preserveTabs = \markdownOptionPreserveTabs, -\fi -\ifx\markdownOptionRelativeReferences\undefined\else - relativeReferences = \markdownOptionRelativeReferences, -\fi -\ifx\markdownOptionShiftHeadings\undefined\else - shiftHeadings = "\markdownOptionShiftHeadings", -\fi -\ifx\markdownOptionSlice\undefined\else - slice = "\markdownOptionSlice", -\fi -\ifx\markdownOptionSmartEllipses\undefined\else - smartEllipses = \markdownOptionSmartEllipses, -\fi -\ifx\markdownOptionStartNumber\undefined\else - startNumber = \markdownOptionStartNumber, -\fi -\ifx\markdownOptionStripIndent\undefined\else - stripIndent = \markdownOptionStripIndent, -\fi -\ifx\markdownOptionTableCaptions\undefined\else - tableCaptions = \markdownOptionTableCaptions, -\fi -\ifx\markdownOptionTaskLists\undefined\else - taskLists = \markdownOptionTaskLists, -\fi -\ifx\markdownOptionTeXComments\undefined\else - texComments = \markdownOptionTeXComments, -\fi -\ifx\markdownOptionTightLists\undefined\else - tightLists = \markdownOptionTightLists, -\fi -\ifx\markdownOptionUnderscores\undefined\else - underscores = \markdownOptionUnderscores, -\fi} -}% +\ExplSyntaxOn +\tl_new:N \g_@@_formatted_lua_options_tl +\tl_const:Nn \c_@@_lua_option_type_boolean { boolean } +\tl_const:Nn \c_@@_lua_option_type_counter { counter } +\tl_const:Nn \c_@@_lua_option_type_number { number } +\tl_const:Nn \c_@@_lua_option_type_string { string } +\cs_new:Nn \@@_format_lua_options: + { + \tl_gclear:N + \g_@@_formatted_lua_options_tl + \seq_map_function:NN + \g_@@_lua_options_seq + \@@_format_lua_option:n + } +\cs_new:Nn \@@_format_lua_option:n + { + \@@_typecheck_lua_option:n { #1 } + \tl_set:Nn + \l_tmpb_tl +% TODO: Replace with \str_uppercase:n in TeX Live 2020. + { \str_upper_case:n { #1 } } + \tl_set:Nx + \l_tmpa_tl + { + markdownOption + \tl_head:f { \l_tmpb_tl } + \tl_tail:n { #1 } + } + \prop_get:NnN + \g_@@_lua_option_types_prop + { #1 } + \l_tmpb_tl + \cs_if_free:cTF + { \l_tmpa_tl } + { } + { + \tl_case:NnF + \l_tmpb_tl + { + \c_@@_lua_option_type_string + { + \tl_gput_right:Nx + \g_@@_formatted_lua_options_tl + { #1~=~" \cs:w \l_tmpa_tl \cs_end: ",~ } + } + \c_@@_lua_option_type_counter + { + \tl_gput_right:Nx + \g_@@_formatted_lua_options_tl + { #1~=~ \the \cs:w \l_tmpa_tl \cs_end: ,~ } + } + } + { + \tl_gput_right:Nx + \g_@@_formatted_lua_options_tl + { #1~=~ \cs:w \l_tmpa_tl \cs_end: ,~ } + } + } + } +\msg_new:nnn + { markdown } + { undefined-lua-option } + { + Lua~option~#1~is~undefined. + } +\msg_new:nnn + { markdown } + { failed-typecheck-for-boolean-lua-option } + { + Lua~option~#1~has~value~#2,~ + but~a~boolean~(true~or~false)~was~expected. + } +\cs_new:Nn \@@_typecheck_lua_option:n + { + \tl_set:Nn + \l_tmpb_tl +% TODO: Replace with \str_uppercase:n in TeX Live 2020. + { \str_upper_case:n { #1 } } + \tl_set:Nx + \l_tmpa_tl + { + markdownOption + \tl_head:f { \l_tmpb_tl } + \tl_tail:n { #1 } + } + \prop_get:NnNTF + \g_@@_lua_option_types_prop + { #1 } + \l_tmpb_tl + { + \cs_if_free:cTF + { \l_tmpa_tl } + { } + { + \tl_case:Nn + \l_tmpb_tl + { + \c_@@_lua_option_type_boolean + { + \tl_case:cnF + { \l_tmpa_tl } + { + \c_@@_lua_option_value_true { } + \c_@@_lua_option_value_false { } + } + { + \msg_error:nnxx + { markdown } + { failed-typecheck-for-boolean-lua-option } + { #1 } + { \l_tmpa_tl } + } + } + } + } + } + { + \msg_error:nnn + { markdown } + { undefined-lua-option } + { #1 } + } + } +\let\markdownPrepareLuaOptions=\@@_format_lua_options: +\def\markdownLuaOptions{{ \g_@@_formatted_lua_options_tl }} +\ExplSyntaxOff % \end{macrocode} % \par % \begin{markdown} @@ -19844,11 +21633,43 @@ end % % \end{markdown} % \begin{macrocode} -\def\markdownIfOption#1#2#3{% - \begingroup - \def\next{true}% - \expandafter\ifx\csname markdownOption#1\endcsname\next - \endgroup#2\else\endgroup#3\fi}% +\ExplSyntaxOn +\tl_const:Nn \c_@@_lua_option_value_true { true } +\tl_const:Nn \c_@@_lua_option_value_false { false } +\cs_new:Nn \@@_if_option:nTF + { + \tl_set:Nn + \l_tmpb_tl +% TODO: Replace with \str_uppercase:n in TeX Live 2020. + { \str_upper_case:n { #1 } } + \tl_set:Nx + \l_tmpa_tl + { + markdownOption + \tl_head:f { \l_tmpb_tl } + \tl_tail:n { #1 } + } + \cs_if_free:cTF + { \l_tmpa_tl } + { + \prop_get:NnN + \g_@@_default_lua_options_prop + { #1 } + \l_tmpb_tl + } + { + \tl_set:Nf + \l_tmpb_tl + { \cs:w \l_tmpa_tl \cs_end: } + } + \tl_if_eq:NNTF + \l_tmpb_tl + \c_@@_lua_option_value_true + { #2 } + { #3 } + } +\let\markdownIfOption=\@@_if_option:nTF +\ExplSyntaxOff % \end{macrocode} % \par % \begin{markdown} @@ -19888,7 +21709,7 @@ end % Make the newline and tab characters active and swap the character codes of % the backslash symbol (`\`) and the pipe symbol (`|`), so that we can use the % backslash as an ordinary character inside the macro definition. Likewise, -% swap the character codes of the percent sign (`%`) and the ampersand (`@`), +% swap the character codes of the percent sign (`\%`) and the ampersand (`@`), % so that we can remove percent signs from the beginning of lines when % \mref{markdownOptionStripPercentSigns} is enabled. % \end{markdown} @@ -19907,7 +21728,7 @@ end % open the \mref{markdownOptionInputTempFileName} file for writing. % \end{markdown} % \begin{macrocode} - |markdownIfOption{FrozenCache}{}{@ + |markdownIfOption{frozenCache}{}{@ |immediate|openout|markdownOutputFileStream@ |markdownOptionInputTempFileName|relax@ |markdownInfo{Buffering markdown input into the temporary @ @@ -19928,7 +21749,7 @@ end % \end{macrocode} % \begin{markdown} % The \mdef{markdownReadAndConvertStripPercentSigns} macro will process the -% individual lines of output, stipping away leading percent signs (`%`) when +% individual lines of output, stipping away leading percent signs (`\%`) when % \mref{markdownOptionStripPercentSigns} is enabled. % Notice the use of the comments (`@`) to ensure that the entire macro is at % a single line and therefore no (active) newline symbols @@ -19936,7 +21757,7 @@ end % \end{markdown} % \begin{macrocode} |def|markdownReadAndConvertStripPercentSign##1{@ - |markdownIfOption{StripPercentSigns}{@ + |markdownIfOption{stripPercentSigns}{@ |if##1%@ |expandafter|expandafter|expandafter@ |markdownReadAndConvertProcessLine@ @@ -19971,7 +21792,7 @@ end % \end{markdown} % \begin{macrocode} |ifx|relax##3|relax@ - |markdownIfOption{FrozenCache}{}{@ + |markdownIfOption{frozenCache}{}{@ |immediate|write|markdownOutputFileStream{##1}@ }@ |else@ @@ -19987,7 +21808,7 @@ end % \begin{macrocode} |def^^M{@ |markdownInfo{The ending token sequence was found}@ - |markdownIfOption{FrozenCache}{}{@ + |markdownIfOption{frozenCache}{}{@ |immediate|closeout|markdownOutputFileStream@ }@ |endgroup@ @@ -20275,7 +22096,7 @@ end |gdef|markdownInput#1{% % \end{macrocode} % \begin{markdown} -% Change the category code of the percent sign (`%`) to other, so that a user +% Change the category code of the percent sign (`\%`) to other, so that a user % of the \Opt{hybrid} Lua option or a malevolent actor can't produce TeX % comments in the plain TeX output of the Markdown package. % \end{markdown} @@ -20289,7 +22110,7 @@ end % \mref{markdownFrozenCacheCounter}. % \end{markdown} % \begin{macrocode} - |markdownIfOption{FrozenCache}{% + |markdownIfOption{frozenCache}{% |ifnum|markdownFrozenCacheCounter=0|relax |markdownInfo{Reading frozen cache from "|markdownOptionFrozenCacheFileName"}% @@ -20310,6 +22131,7 @@ end % \begin{macrocode} |openin|markdownInputFileStream#1 |closein|markdownInputFileStream + |markdownPrepareLuaOptions |markdownLuaExecute{% |markdownPrepare local file = assert(io.open("#1", "r"), @@ -20330,7 +22152,7 @@ end % \mref{markdownFrozenCacheCounter}. % \end{markdown} % \begin{macrocode} - |markdownIfOption{FinalizeCache}{% + |markdownIfOption{finalizeCache}{% |global|advance|markdownFrozenCacheCounter by 1|relax }% }% @@ -20370,6 +22192,19 @@ end % \par % \begin{markdown} % +% Use reflection to define the `renderers` and `rendererPrototypes` keys of +% \mref{markdownSetup} as well as the keys that correspond to Lua options. +% +% \end{markdown} +% \begin{macrocode} +\ExplSyntaxOn +\@@_latex_define_renderers: +\@@_latex_define_renderer_prototypes: +\ExplSyntaxOff +% \end{macrocode} +% \par +% \begin{markdown} +% %### Logging Facilities % The \LaTeX{} implementation redefines the plain \TeX{} logging macros (see % Section <#sec:texinterfacelogging>) to use the \LaTeX{} \mref{PackageInfo}, @@ -20520,7 +22355,7 @@ end \renewcommand\markdownRendererInputFencedCode[2]{% \def\next##1 ##2\relax{% \ifthenelse{\equal{##1}{dot}}{% - \markdownIfOption{FrozenCache}{}{% + \markdownIfOption{frozenCache}{}{% \immediate\write18{% if ! test -e #1.pdf.source || ! diff #1 #1.pdf.source; then @@ -20630,7 +22465,7 @@ end % % \end{markdown} % \begin{macrocode} - \markdownIfOption{FrozenCache}{}{^^A + \markdownIfOption{frozenCache}{}{^^A \immediate\write18{^^A if printf '%s' "#3" | grep -q -E '^https?:'; then @@ -20717,8 +22552,9 @@ end % \end{macrocode} % \begin{markdown} % -% After processing the options, activate the `renderers` and -% `rendererPrototypes` keys. +% After processing the options, activate the `renderers`, `rendererPrototypes`, +% and `code` keys. The `code` key is used to immediately expand and execute code, +% which can be especially useful in \LaTeX{} setup snippets. % % \end{markdown} % \begin{macrocode} @@ -20728,6 +22564,7 @@ end \define@key{markdownOptions}{rendererPrototypes}{% \setkeys{markdownRendererPrototypes}{#1}% \def\KV@prefix{KV@markdownOptions@}}% +\define@key{markdownOptions}{code}{#1}% % \end{macrocode} % \par % \begin{markdown} @@ -20743,23 +22580,14 @@ end % \end{macrocode} % \par % \begin{markdown}% -% If the \mref{markdownOptionTightLists} macro expands to `false`, do not load -% the \pkg{paralist} package. This is necessary for \Hologo{LaTeX2e} document -% classes that do not play nice with \pkg{paralist}, such as \pkg{beamer}. -% If the \mref{markdownOptionTightLists} is undefined and the \pkg{beamer} -% document class is in use, then do not load the \pkg{paralist} package either. +% If the \Opt{tightLists} Lua option is disabled or the current document class +% is \pkg{beamer}, do not load the \pkg{paralist} package. % % \end{markdown} % \begin{macrocode} -\RequirePackage{ifthen} - -\ifx\markdownOptionTightLists\undefined - \@ifclassloaded{beamer}{}{% - \RequirePackage{paralist}}% -\else - \ifthenelse{\equal{\markdownOptionTightLists}{false}}{}{% - \RequirePackage{paralist}}% -\fi +\markdownIfOption{tightLists}{ + \@ifclassloaded{beamer}{}{\RequirePackage{paralist}}% +}{} % \end{macrocode} % \par % \begin{markdown} @@ -20787,7 +22615,7 @@ end olEndTight = {\markdownRendererOlEnd}, dlBeginTight = {\markdownRendererDlBegin}, dlEndTight = {\markdownRendererDlEnd}}}} -\RequirePackage{amsmath} +\RequirePackage{amsmath,ifthen} % \end{macrocode} % \par % \begin{markdown} @@ -21431,180 +23259,14 @@ end % %#### YAML Metadata {#latexyamlmetadata} % -% \end{markdown} -% \begin{macrocode} -\ExplSyntaxOn -% \end{macrocode} -% \begin{markdown} -% -% To keep track of the current type of structure we inhabit when we are -% traversing a \acro{yaml} document, we will maintain the -% \mdef{g_\@\@_jekyll_data_datatypes_seq} stack. At every step of the traversal, -% the stack will contain one of the following constants at any position $p$: -% -% \mdef{c_\@\@_jekyll_data_sequence_tl} -% -%: The currently traversed branch of the \acro{yaml} document contains a sequence -% at depth $p$. -% -% \mdef{c_\@\@_jekyll_data_mapping_tl} -% -%: The currently traversed branch of the \acro{yaml} document contains a mapping -% at depth $p$. -% -% \mdef{c_\@\@_jekyll_data_scalar_tl} -% -%: The currently traversed branch of the \acro{yaml} document contains a scalar -% value at depth $p$. -% -% \end{markdown} -% \begin{macrocode} -\seq_new:N \g_@@_jekyll_data_datatypes_seq -\tl_const:Nn \c_@@_jekyll_data_sequence_tl { sequence } -\tl_const:Nn \c_@@_jekyll_data_mapping_tl { mapping } -\tl_const:Nn \c_@@_jekyll_data_scalar_tl { scalar } -% \end{macrocode} -% \par -% \begin{markdown} -% -% To keep track of our current place when we are traversing a \acro{yaml} -% document, we will maintain the -% \mdef{g_\@\@_jekyll_data_wildcard_absolute_address_seq} stack of keys using -% the \mdef{markdown_jekyll_data_push_address_segment:n} macro. -% -% \end{markdown} -% \begin{macrocode} -\seq_new:N \g_@@_jekyll_data_wildcard_absolute_address_seq -\cs_new:Nn \markdown_jekyll_data_push_address_segment:n - { - \seq_if_empty:NF - \g_@@_jekyll_data_datatypes_seq - { - \seq_get_right:NN - \g_@@_jekyll_data_datatypes_seq - \l_tmpa_tl -% \end{macrocode} -% \begin{markdown} -% -% If we are currently in a sequence, we will put an asterisk (`*`) instead of -% a key into \mref{g_\@\@_jekyll_data_wildcard_absolute_address_seq} to make -% it represent a *wildcard*. Keeping a wildcard instead of a precise address -% makes it easy for the users to react to *any* item of a sequence regardless -% of how many there are, which can often be useful. -% -% \end{markdown} -% \begin{macrocode} - \tl_if_eq:NNTF - \l_tmpa_tl - \c_@@_jekyll_data_sequence_tl - { - \seq_put_right:Nn - \g_@@_jekyll_data_wildcard_absolute_address_seq - { * } - } - { - \seq_put_right:Nn - \g_@@_jekyll_data_wildcard_absolute_address_seq - { #1 } - } - } - } -% \end{macrocode} -% \par -% \begin{markdown} -% -% Out of \mref{g_\@\@_jekyll_data_wildcard_absolute_address_seq}, we will -% construct the following two token lists: -% -% \mdef{g_\@\@_jekyll_data_wildcard_absolute_address_tl} -% -%: An *absolute wildcard*: The wildcard from the root of the document -% prefixed with a slash (`/`) with individual keys and asterisks also -% delimited by slashes. Allows the users to react to complex -% context-sensitive structures with ease. -% -%: For example, the `name` key in the following \acro{yaml} document -% would correspond to the `/*/person/name` absolute wildcard: -% ``` yaml -% [{person: {name: Elon, surname: Musk}}] -% ``` -% -% \mdef{g_\@\@_jekyll_data_wildcard_relative_address_tl} -% -%: A *relative wildcard*: The rightmost segment of the wildcard. Allows the -% users to react to simple context-free structures. -% -%: For example, the `name` key in the following \acro{yaml} document -% would correspond to the `name` relative wildcard: -% ``` yaml -% [{person: {name: Elon, surname: Musk}}] -% ``` -% -% We will construct \mref{g_\@\@_jekyll_data_wildcard_absolute_address_tl} -% using the \mdef{markdown_jekyll_data_concatenate_address:NN} macro and -% we will construct both token lists using the -% \mdef{markdown_jekyll_data_update_address_tls:} macro. -% -% \end{markdown} -% \begin{macrocode} -\tl_new:N \g_@@_jekyll_data_wildcard_absolute_address_tl -\tl_new:N \g_@@_jekyll_data_wildcard_relative_address_tl -\cs_new:Nn \markdown_jekyll_data_concatenate_address:NN - { - \seq_pop_left:NN #1 \l_tmpa_tl - \tl_set:Nx #2 { / \seq_use:Nn #1 { / } } - \seq_put_left:NV #1 \l_tmpa_tl - } -\cs_new:Nn \markdown_jekyll_data_update_address_tls: - { - \markdown_jekyll_data_concatenate_address:NN - \g_@@_jekyll_data_wildcard_absolute_address_seq - \g_@@_jekyll_data_wildcard_absolute_address_tl - \seq_get_right:NN - \g_@@_jekyll_data_wildcard_absolute_address_seq - \g_@@_jekyll_data_wildcard_relative_address_tl - } -% \end{macrocode} -% \par -% \begin{markdown} -% -% To make sure that the stacks and token lists stay in sync, we will use the -% \mdef{markdown_jekyll_data_push:nN} and \mdef{markdown_jekyll_data_pop:} -% macros. -% -% \end{markdown} -% \begin{macrocode} -\cs_new:Nn \markdown_jekyll_data_push:nN - { - \markdown_jekyll_data_push_address_segment:n - { #1 } - \seq_put_right:NV - \g_@@_jekyll_data_datatypes_seq - #2 - \markdown_jekyll_data_update_address_tls: - } -\cs_new:Nn \markdown_jekyll_data_pop: - { - \seq_pop_right:NN - \g_@@_jekyll_data_wildcard_absolute_address_seq - \l_tmpa_tl - \seq_pop_right:NN - \g_@@_jekyll_data_datatypes_seq - \l_tmpa_tl - \markdown_jekyll_data_update_address_tls: - } -% \end{macrocode} -% \par -% \begin{markdown} -% -% To interface with the user, we use `markdown/jekyllData` key--values from the -% l3keys module of the \LaTeX3 kernel. The default setup will invoke the -% \mref{title}, \mref{author}, and \mref{date} macros when scalar values for -% keys that correspond to the `title`, `author`, and `date` relative wildcards -% are encountered, respectively. +% The default setup of \acro{yaml} metadata will invoke the \mref{title}, +% \mref{author}, and \mref{date} macros when scalar values for keys that +% correspond to the `title`, `author`, and `date` relative wildcards are +% encountered, respectively. % % \end{markdown} % \begin{macrocode} +\ExplSyntaxOn \keys_define:nn { markdown/jekyllData } { @@ -21615,81 +23277,6 @@ end % \end{macrocode} % \begin{markdown} % -% To set a single key--value, we will use the -% \mdef{markdown_jekyll_data_set_keyval:Nn} macro, ignoring unknown keys. -% To set key--values for both absolute and relative wildcards, we will use the -% \mdef{markdown_jekyll_data_set_keyvals:nn} macro. -% -% \end{markdown} -% \begin{macrocode} -\cs_new:Nn \markdown_jekyll_data_set_keyval:nn - { - \keys_set_known:nn - { markdown/jekyllData } - { { #1 } = { #2 } } - } -\cs_generate_variant:Nn - \markdown_jekyll_data_set_keyval:nn - { Vn } -\cs_new:Nn \markdown_jekyll_data_set_keyvals:nn - { - \markdown_jekyll_data_push:nN - { #1 } - \c_@@_jekyll_data_scalar_tl - \markdown_jekyll_data_set_keyval:Vn - \g_@@_jekyll_data_wildcard_absolute_address_tl - { #2 } - \markdown_jekyll_data_set_keyval:Vn - \g_@@_jekyll_data_wildcard_relative_address_tl - { #2 } - \markdown_jekyll_data_pop: - } -% \end{macrocode} -% \par -% \begin{markdown} -% -% Finally, we will register our macros as token renderer prototypes -% to be able to react to the traversal of a \acro{yaml} document. -% -% \end{markdown} -% \begin{macrocode} -\markdownSetup{ - rendererPrototypes = { - jekyllDataSequenceBegin = { - \markdown_jekyll_data_push:nN - { #1 } - \c_@@_jekyll_data_sequence_tl - }, - jekyllDataMappingBegin = { - \markdown_jekyll_data_push:nN - { #1 } - \c_@@_jekyll_data_mapping_tl - }, - jekyllDataSequenceEnd = { - \markdown_jekyll_data_pop: - }, - jekyllDataMappingEnd = { - \markdown_jekyll_data_pop: - }, - jekyllDataBoolean = { - \markdown_jekyll_data_set_keyvals:nn - { #1 } - { #2 } - }, - jekyllDataEmpty = { }, - jekyllDataNumber = { - \markdown_jekyll_data_set_keyvals:nn - { #1 } - { #2 } - }, - jekyllDataString = { - \markdown_jekyll_data_set_keyvals:nn - { #1 } - { #2 } - }, -% \end{macrocode} -% \begin{markdown} -% % To complement the default setup of our key--values, we will use % the \mref{maketitle} macro to typeset the title page of a document % at the end of \acro{yaml} metadata. If we are in the preamble, we will wait @@ -21698,12 +23285,12 @@ end % % \end{markdown} % \begin{macrocode} - }, -} +% TODO: Remove the command definition in TeX Live 2021. \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \markdownSetup{ rendererPrototypes = { jekyllDataEnd = { +% TODO: Remove the else branch in TeX Live 2021. \IfFormatAtLeastTF { 2020-10-01 } { \AddToHook{begindocument/end}{\maketitle} } @@ -21720,7 +23307,6 @@ end }, }, } - \ExplSyntaxOff % \end{macrocode} % \par diff --git a/macros/generic/markdown/markdown.html b/macros/generic/markdown/markdown.html index 3711e5ae22..4ccaeb8bf1 100644 --- a/macros/generic/markdown/markdown.html +++ b/macros/generic/markdown/markdown.html @@ -82,7 +82,7 @@ <header id="title-block-header"> <h1 class="title">Markdown Package User Manual</h1> <p class="author">Vít Novotný</p> -<p class="date">2.14.1-0-gb933d81 (2022/03/01)</p> +<p class="date">2.15.0-0-g9296cf1 (2022/03/31)</p> </header> <nav id="TOC" role="doc-toc"> <ul> @@ -127,10 +127,10 @@ </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 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>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> ≥ 2018 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> +<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> @@ -1834,15 +1834,21 @@ Thomas,Edison,1847</code></pre> <h4 data-number="2.2.1.13" id="option-eagercache"><span class="header-section-number">2.2.1.13</span> Option <code>eagerCache</code></h4> <dl> <dt><code>eagerCache</code> (default value: <code>true</code>)</dt> -<dd><p>true</p> -<p>Converted markdown documents will be cached in <strong><code>cacheDir</code></strong>. This can be useful for post-processing the converted documents and for recovering historical versions of the documents from the cache. However, it also produces a large number of auxiliary files on the disk and obscures the output of the Lua command-line interface when it is used for plumbing.</p> +<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> -<dd><p>false</p> -<p>Converted markdown documents will not be cached. This decreases the number of auxiliary files that we produce and makes it easier to use the Lua command-line interface for plumbing.</p> +</dl> +</dd> +<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. Furthermore, this behavior is planned to be the new default in the next major release of the Markdown package.</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> @@ -1858,28 +1864,110 @@ Thomas,Edison,1847</code></pre> <div class="sourceCode" id="cb180"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb180-1"><a href="#cb180-1" aria-hidden="true"></a><span class="fu">\input</span> ./⟨hash⟩.md.tex<span class="fu">\relax</span></span></code></pre></div> <p>Additionally, a <span class="tex">T<sub>e</sub>X</span> document named <code>⟨hash⟩.md.tex</code> should be produced and contain the following code:</p> <div class="sourceCode" id="cb181"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb181-1"><a href="#cb181-1" aria-hidden="true"></a>Hello <span class="fu">\markdownRendererEmphasis</span>{world}!<span class="fu">\relax</span></span></code></pre></div> -<h4 data-number="2.2.1.14" id="option-fencedcode"><span class="header-section-number">2.2.1.14</span> Option <code>fencedCode</code></h4> +<h4 data-number="2.2.1.14" id="option-expectjekylldata"><span class="header-section-number">2.2.1.14</span> Option <code>expectJekyllData</code></h4> +<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="cb182"><pre class="sourceCode latex"><code class="sourceCode latex"><span id="cb182-1"><a href="#cb182-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb182-2"><a href="#cb182-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb182-3"><a href="#cb182-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb182-4"><a href="#cb182-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb182-5"><a href="#cb182-5" aria-hidden="true"></a>---</span> +<span id="cb182-6"><a href="#cb182-6" aria-hidden="true"></a>- this</span> +<span id="cb182-7"><a href="#cb182-7" aria-hidden="true"></a>- is</span> +<span id="cb182-8"><a href="#cb182-8" aria-hidden="true"></a>- YAML</span> +<span id="cb182-9"><a href="#cb182-9" aria-hidden="true"></a>...</span> +<span id="cb182-10"><a href="#cb182-10" aria-hidden="true"></a>- followed</span> +<span id="cb182-11"><a href="#cb182-11" aria-hidden="true"></a>- by</span> +<span id="cb182-12"><a href="#cb182-12" aria-hidden="true"></a>- Markdown</span> +<span id="cb182-13"><a href="#cb182-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb182-14"><a href="#cb182-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb182-15"><a href="#cb182-15" aria-hidden="true"></a>- this</span> +<span id="cb182-16"><a href="#cb182-16" aria-hidden="true"></a>- is</span> +<span id="cb182-17"><a href="#cb182-17" aria-hidden="true"></a>- Markdown</span> +<span id="cb182-18"><a href="#cb182-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb182-19"><a href="#cb182-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +</dd> +</dl> +</dd> +<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="cb183"><pre class="sourceCode latex"><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>[jekyllData, expectJekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb183-3"><a href="#cb183-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb183-4"><a href="#cb183-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb183-5"><a href="#cb183-5" aria-hidden="true"></a>- this</span> +<span id="cb183-6"><a href="#cb183-6" aria-hidden="true"></a>- is</span> +<span id="cb183-7"><a href="#cb183-7" aria-hidden="true"></a>- YAML</span> +<span id="cb183-8"><a href="#cb183-8" aria-hidden="true"></a>...</span> +<span id="cb183-9"><a href="#cb183-9" aria-hidden="true"></a>- followed</span> +<span id="cb183-10"><a href="#cb183-10" aria-hidden="true"></a>- by</span> +<span id="cb183-11"><a href="#cb183-11" aria-hidden="true"></a>- Markdown</span> +<span id="cb183-12"><a href="#cb183-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb183-13"><a href="#cb183-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb183-14"><a href="#cb183-14" aria-hidden="true"></a>- this</span> +<span id="cb183-15"><a href="#cb183-15" aria-hidden="true"></a>- is</span> +<span id="cb183-16"><a href="#cb183-16" aria-hidden="true"></a>- YAML</span> +<span id="cb183-17"><a href="#cb183-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb183-18"><a href="#cb183-18" aria-hidden="true"></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-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>jane-doe.yml</code> with the following content:</p> +<div class="sourceCode" id="cb184"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb184-1"><a href="#cb184-1" aria-hidden="true"></a><span class="fu">name</span><span class="kw">:</span><span class="at"> Jane Doe</span></span> +<span id="cb184-2"><a href="#cb184-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="cb185"><pre class="sourceCode tex"><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="fu">\ExplSyntaxOn</span></span> +<span id="cb185-4"><a href="#cb185-4" aria-hidden="true"></a><span class="fu">\keys</span>_define:nn</span> +<span id="cb185-5"><a href="#cb185-5" aria-hidden="true"></a> { markdown/jekyllData }</span> +<span id="cb185-6"><a href="#cb185-6" aria-hidden="true"></a> {</span> +<span id="cb185-7"><a href="#cb185-7" aria-hidden="true"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> +<span id="cb185-8"><a href="#cb185-8" aria-hidden="true"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</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><span class="fu">\ExplSyntaxOff</span></span> +<span id="cb185-11"><a href="#cb185-11" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb185-12"><a href="#cb185-12" aria-hidden="true"></a> renderers = {</span> +<span id="cb185-13"><a href="#cb185-13" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> +<span id="cb185-14"><a href="#cb185-14" aria-hidden="true"></a> }</span> +<span id="cb185-15"><a href="#cb185-15" aria-hidden="true"></a>}</span> +<span id="cb185-16"><a href="#cb185-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb185-17"><a href="#cb185-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>[expectJekyllData]{jane-doe.yml}</span> +<span id="cb185-18"><a href="#cb185-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="cb186"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb186-1"><a href="#cb186-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<blockquote> +<p>Jane Doe is 99 years old.</p> +</blockquote> +<h4 data-number="2.2.1.15" id="option-fencedcode"><span class="header-section-number">2.2.1.15</span> Option <code>fencedCode</code></h4> <dl> <dt><code>fencedCode</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the commonmark fenced code block extension:</p> -<div class="sourceCode" id="cb182"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb182-1"><a href="#cb182-1" aria-hidden="true"></a><span class="in">~~~ js</span></span> -<span id="cb182-2"><a href="#cb182-2" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb182-3"><a href="#cb182-3" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> -<span id="cb182-4"><a href="#cb182-4" aria-hidden="true"></a>}</span> -<span id="cb182-5"><a href="#cb182-5" aria-hidden="true"></a><span class="op">~~~~~~</span></span> -<span id="cb182-6"><a href="#cb182-6" aria-hidden="true"></a></span> -<span id="cb182-7"><a href="#cb182-7" aria-hidden="true"></a> <span class="vs">``` html</span></span> -<span id="cb182-8"><a href="#cb182-8" aria-hidden="true"></a><span class="vs"> <pre></span></span> -<span id="cb182-9"><a href="#cb182-9" aria-hidden="true"></a><span class="vs"> <code></span></span> -<span id="cb182-10"><a href="#cb182-10" aria-hidden="true"></a><span class="vs"> // Some comments</span></span> -<span id="cb182-11"><a href="#cb182-11" aria-hidden="true"></a><span class="vs"> line 1 of code</span></span> -<span id="cb182-12"><a href="#cb182-12" aria-hidden="true"></a><span class="vs"> line 2 of code</span></span> -<span id="cb182-13"><a href="#cb182-13" aria-hidden="true"></a><span class="vs"> line 3 of code</span></span> -<span id="cb182-14"><a href="#cb182-14" aria-hidden="true"></a><span class="vs"> </code></span></span> -<span id="cb182-15"><a href="#cb182-15" aria-hidden="true"></a><span class="vs"> </pre></span></span> -<span id="cb182-16"><a href="#cb182-16" aria-hidden="true"></a><span class="vs"> ```</span></span></code></pre></div> +<div class="sourceCode" id="cb187"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb187-1"><a href="#cb187-1" aria-hidden="true"></a><span class="in">~~~ js</span></span> +<span id="cb187-2"><a href="#cb187-2" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> +<span id="cb187-3"><a href="#cb187-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="cb187-4"><a href="#cb187-4" aria-hidden="true"></a>}</span> +<span id="cb187-5"><a href="#cb187-5" aria-hidden="true"></a><span class="op">~~~~~~</span></span> +<span id="cb187-6"><a href="#cb187-6" aria-hidden="true"></a></span> +<span id="cb187-7"><a href="#cb187-7" aria-hidden="true"></a> <span class="vs">``` html</span></span> +<span id="cb187-8"><a href="#cb187-8" aria-hidden="true"></a><span class="vs"> <pre></span></span> +<span id="cb187-9"><a href="#cb187-9" aria-hidden="true"></a><span class="vs"> <code></span></span> +<span id="cb187-10"><a href="#cb187-10" aria-hidden="true"></a><span class="vs"> // Some comments</span></span> +<span id="cb187-11"><a href="#cb187-11" aria-hidden="true"></a><span class="vs"> line 1 of code</span></span> +<span id="cb187-12"><a href="#cb187-12" aria-hidden="true"></a><span class="vs"> line 2 of code</span></span> +<span id="cb187-13"><a href="#cb187-13" aria-hidden="true"></a><span class="vs"> line 3 of code</span></span> +<span id="cb187-14"><a href="#cb187-14" aria-hidden="true"></a><span class="vs"> </code></span></span> +<span id="cb187-15"><a href="#cb187-15" aria-hidden="true"></a><span class="vs"> </pre></span></span> +<span id="cb187-16"><a href="#cb187-16" aria-hidden="true"></a><span class="vs"> ```</span></span></code></pre></div> </dd> </dl> </dd> @@ -1890,91 +1978,91 @@ Thomas,Edison,1847</code></pre> </dl> </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> +<h5 class="unnumbered" data-number="" id="latex-example-13"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb183"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb183-1"><a href="#cb183-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb183-2"><a href="#cb183-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> -<span id="cb183-3"><a href="#cb183-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> -<span id="cb183-4"><a href="#cb183-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb183-5"><a href="#cb183-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb183-6"><a href="#cb183-6" aria-hidden="true"></a>~~~ js</span> -<span id="cb183-7"><a href="#cb183-7" aria-hidden="true"></a>if (a > 3) {</span> -<span id="cb183-8"><a href="#cb183-8" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> -<span id="cb183-9"><a href="#cb183-9" aria-hidden="true"></a>}</span> -<span id="cb183-10"><a href="#cb183-10" aria-hidden="true"></a>~~~~~~</span> -<span id="cb183-11"><a href="#cb183-11" aria-hidden="true"></a></span> -<span id="cb183-12"><a href="#cb183-12" aria-hidden="true"></a> ``` html</span> -<span id="cb183-13"><a href="#cb183-13" aria-hidden="true"></a> <pre></span> -<span id="cb183-14"><a href="#cb183-14" aria-hidden="true"></a> <code></span> -<span id="cb183-15"><a href="#cb183-15" aria-hidden="true"></a> // Some comments</span> -<span id="cb183-16"><a href="#cb183-16" aria-hidden="true"></a> line 1 of code</span> -<span id="cb183-17"><a href="#cb183-17" aria-hidden="true"></a> line 2 of code</span> -<span id="cb183-18"><a href="#cb183-18" aria-hidden="true"></a> line 3 of code</span> -<span id="cb183-19"><a href="#cb183-19" aria-hidden="true"></a> </code></span> -<span id="cb183-20"><a href="#cb183-20" aria-hidden="true"></a> </pre></span> -<span id="cb183-21"><a href="#cb183-21" aria-hidden="true"></a> ```</span> -<span id="cb183-22"><a href="#cb183-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb183-23"><a href="#cb183-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb184"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb184-1"><a href="#cb184-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<div class="sourceCode" id="cb185"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb185-1"><a href="#cb185-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb185-2"><a href="#cb185-2" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> -<span id="cb185-3"><a href="#cb185-3" aria-hidden="true"></a>}</span></code></pre></div> -<div class="sourceCode" id="cb186"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb186-1"><a href="#cb186-1" aria-hidden="true"></a><span class="kw"><pre></span></span> -<span id="cb186-2"><a href="#cb186-2" aria-hidden="true"></a> <span class="kw"><code></span></span> -<span id="cb186-3"><a href="#cb186-3" aria-hidden="true"></a> // Some comments</span> -<span id="cb186-4"><a href="#cb186-4" aria-hidden="true"></a> line 1 of code</span> -<span id="cb186-5"><a href="#cb186-5" aria-hidden="true"></a> line 2 of code</span> -<span id="cb186-6"><a href="#cb186-6" aria-hidden="true"></a> line 3 of code</span> -<span id="cb186-7"><a href="#cb186-7" aria-hidden="true"></a> <span class="kw"></code></span></span> -<span id="cb186-8"><a href="#cb186-8" aria-hidden="true"></a><span class="kw"></pre></span></span></code></pre></div> +<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>{<span class="ex">minted</span>}</span> +<span id="cb188-3"><a href="#cb188-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> +<span id="cb188-4"><a href="#cb188-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb188-5"><a href="#cb188-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb188-6"><a href="#cb188-6" aria-hidden="true"></a>~~~ js</span> +<span id="cb188-7"><a href="#cb188-7" aria-hidden="true"></a>if (a > 3) {</span> +<span id="cb188-8"><a href="#cb188-8" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> +<span id="cb188-9"><a href="#cb188-9" aria-hidden="true"></a>}</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> ``` html</span> +<span id="cb188-13"><a href="#cb188-13" aria-hidden="true"></a> <pre></span> +<span id="cb188-14"><a href="#cb188-14" aria-hidden="true"></a> <code></span> +<span id="cb188-15"><a href="#cb188-15" aria-hidden="true"></a> // Some comments</span> +<span id="cb188-16"><a href="#cb188-16" aria-hidden="true"></a> line 1 of code</span> +<span id="cb188-17"><a href="#cb188-17" aria-hidden="true"></a> line 2 of code</span> +<span id="cb188-18"><a href="#cb188-18" aria-hidden="true"></a> line 3 of code</span> +<span id="cb188-19"><a href="#cb188-19" aria-hidden="true"></a> </code></span> +<span id="cb188-20"><a href="#cb188-20" aria-hidden="true"></a> </pre></span> +<span id="cb188-21"><a href="#cb188-21" aria-hidden="true"></a> ```</span> +<span id="cb188-22"><a href="#cb188-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb188-23"><a href="#cb188-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="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> --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="cb190"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb190-1"><a href="#cb190-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> +<span id="cb190-2"><a href="#cb190-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="cb190-3"><a href="#cb190-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb191"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb191-1"><a href="#cb191-1" aria-hidden="true"></a><span class="kw"><pre></span></span> +<span id="cb191-2"><a href="#cb191-2" aria-hidden="true"></a> <span class="kw"><code></span></span> +<span id="cb191-3"><a href="#cb191-3" aria-hidden="true"></a> // Some comments</span> +<span id="cb191-4"><a href="#cb191-4" aria-hidden="true"></a> line 1 of code</span> +<span id="cb191-5"><a href="#cb191-5" aria-hidden="true"></a> line 2 of code</span> +<span id="cb191-6"><a href="#cb191-6" aria-hidden="true"></a> line 3 of code</span> +<span id="cb191-7"><a href="#cb191-7" aria-hidden="true"></a> <span class="kw"></code></span></span> +<span id="cb191-8"><a href="#cb191-8" aria-hidden="true"></a><span class="kw"></pre></span></span></code></pre></div> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-10">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb187"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb187-1"><a href="#cb187-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb187-2"><a href="#cb187-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFencedCode</span>{true}</span> -<span id="cb187-3"><a href="#cb187-3" aria-hidden="true"></a><span class="fu">\definetyping</span> [js]</span> -<span id="cb187-4"><a href="#cb187-4" aria-hidden="true"></a><span class="fu">\definetyping</span> [html]</span> -<span id="cb187-5"><a href="#cb187-5" aria-hidden="true"></a><span class="fu">\setuptyping</span> [html] [option=XML]</span> -<span id="cb187-6"><a href="#cb187-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb187-7"><a href="#cb187-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb187-8"><a href="#cb187-8" aria-hidden="true"></a>~~~ js</span> -<span id="cb187-9"><a href="#cb187-9" aria-hidden="true"></a>if (a > 3) {</span> -<span id="cb187-10"><a href="#cb187-10" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> -<span id="cb187-11"><a href="#cb187-11" aria-hidden="true"></a>}</span> -<span id="cb187-12"><a href="#cb187-12" aria-hidden="true"></a>~~~~~~</span> -<span id="cb187-13"><a href="#cb187-13" aria-hidden="true"></a></span> -<span id="cb187-14"><a href="#cb187-14" aria-hidden="true"></a> ``` html</span> -<span id="cb187-15"><a href="#cb187-15" aria-hidden="true"></a> <pre></span> -<span id="cb187-16"><a href="#cb187-16" aria-hidden="true"></a> <code></span> -<span id="cb187-17"><a href="#cb187-17" aria-hidden="true"></a> // Some comments</span> -<span id="cb187-18"><a href="#cb187-18" aria-hidden="true"></a> line 1 of code</span> -<span id="cb187-19"><a href="#cb187-19" aria-hidden="true"></a> line 2 of code</span> -<span id="cb187-20"><a href="#cb187-20" aria-hidden="true"></a> line 3 of code</span> -<span id="cb187-21"><a href="#cb187-21" aria-hidden="true"></a> </code></span> -<span id="cb187-22"><a href="#cb187-22" aria-hidden="true"></a> </pre></span> -<span id="cb187-23"><a href="#cb187-23" aria-hidden="true"></a> ```</span> -<span id="cb187-24"><a href="#cb187-24" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb187-25"><a href="#cb187-25" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb188"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb188-1"><a href="#cb188-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> -<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> -<blockquote> -<div class="sourceCode" id="cb189"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb189-1"><a href="#cb189-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb189-2"><a href="#cb189-2" aria-hidden="true"></a> <span class="fu">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></span> -<span id="cb189-3"><a href="#cb189-3" aria-hidden="true"></a>}</span></code></pre></div> -<div class="sourceCode" id="cb190"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb190-1"><a href="#cb190-1" aria-hidden="true"></a><span class="kw"><pre></span></span> -<span id="cb190-2"><a href="#cb190-2" aria-hidden="true"></a> <span class="kw"><code></span></span> -<span id="cb190-3"><a href="#cb190-3" aria-hidden="true"></a> // Some comments</span> -<span id="cb190-4"><a href="#cb190-4" aria-hidden="true"></a> line 1 of code</span> -<span id="cb190-5"><a href="#cb190-5" aria-hidden="true"></a> line 2 of code</span> -<span id="cb190-6"><a href="#cb190-6" aria-hidden="true"></a> line 3 of code</span> -<span id="cb190-7"><a href="#cb190-7" aria-hidden="true"></a> <span class="kw"></code></span></span> -<span id="cb190-8"><a href="#cb190-8" aria-hidden="true"></a><span class="kw"></pre></span></span></code></pre></div> -</blockquote> -<h4 data-number="2.2.1.15" id="option-finalizecache"><span class="header-section-number">2.2.1.15</span> Option <code>finalizeCache</code></h4> +<div class="sourceCode" id="cb192"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb192-1"><a href="#cb192-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb192-2"><a href="#cb192-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFencedCode</span>{true}</span> +<span id="cb192-3"><a href="#cb192-3" aria-hidden="true"></a><span class="fu">\definetyping</span> [js]</span> +<span id="cb192-4"><a href="#cb192-4" aria-hidden="true"></a><span class="fu">\definetyping</span> [html]</span> +<span id="cb192-5"><a href="#cb192-5" aria-hidden="true"></a><span class="fu">\setuptyping</span> [html] [option=XML]</span> +<span id="cb192-6"><a href="#cb192-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb192-7"><a href="#cb192-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb192-8"><a href="#cb192-8" aria-hidden="true"></a>~~~ js</span> +<span id="cb192-9"><a href="#cb192-9" aria-hidden="true"></a>if (a > 3) {</span> +<span id="cb192-10"><a href="#cb192-10" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> +<span id="cb192-11"><a href="#cb192-11" aria-hidden="true"></a>}</span> +<span id="cb192-12"><a href="#cb192-12" aria-hidden="true"></a>~~~~~~</span> +<span id="cb192-13"><a href="#cb192-13" aria-hidden="true"></a></span> +<span id="cb192-14"><a href="#cb192-14" aria-hidden="true"></a> ``` html</span> +<span id="cb192-15"><a href="#cb192-15" aria-hidden="true"></a> <pre></span> +<span id="cb192-16"><a href="#cb192-16" aria-hidden="true"></a> <code></span> +<span id="cb192-17"><a href="#cb192-17" aria-hidden="true"></a> // Some comments</span> +<span id="cb192-18"><a href="#cb192-18" aria-hidden="true"></a> line 1 of code</span> +<span id="cb192-19"><a href="#cb192-19" aria-hidden="true"></a> line 2 of code</span> +<span id="cb192-20"><a href="#cb192-20" aria-hidden="true"></a> line 3 of code</span> +<span id="cb192-21"><a href="#cb192-21" aria-hidden="true"></a> </code></span> +<span id="cb192-22"><a href="#cb192-22" aria-hidden="true"></a> </pre></span> +<span id="cb192-23"><a href="#cb192-23" aria-hidden="true"></a> ```</span> +<span id="cb192-24"><a href="#cb192-24" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb192-25"><a href="#cb192-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="cb193"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb193-1"><a href="#cb193-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="cb194"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb194-1"><a href="#cb194-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> +<span id="cb194-2"><a href="#cb194-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="cb194-3"><a href="#cb194-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb195"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb195-1"><a href="#cb195-1" aria-hidden="true"></a><span class="kw"><pre></span></span> +<span id="cb195-2"><a href="#cb195-2" aria-hidden="true"></a> <span class="kw"><code></span></span> +<span id="cb195-3"><a href="#cb195-3" aria-hidden="true"></a> // Some comments</span> +<span id="cb195-4"><a href="#cb195-4" aria-hidden="true"></a> line 1 of code</span> +<span id="cb195-5"><a href="#cb195-5" aria-hidden="true"></a> line 2 of code</span> +<span id="cb195-6"><a href="#cb195-6" aria-hidden="true"></a> line 3 of code</span> +<span id="cb195-7"><a href="#cb195-7" aria-hidden="true"></a> <span class="kw"></code></span></span> +<span id="cb195-8"><a href="#cb195-8" aria-hidden="true"></a><span class="kw"></pre></span></span></code></pre></div> +</blockquote> +<h4 data-number="2.2.1.16" id="option-finalizecache"><span class="header-section-number">2.2.1.16</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> @@ -1983,94 +2071,94 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-7">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb191"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb191-1"><a href="#cb191-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb191-2"><a href="#cb191-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> -<span id="cb191-3"><a href="#cb191-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb191-4"><a href="#cb191-4" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb191-5"><a href="#cb191-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb191-6"><a href="#cb191-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<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="fu">\input</span> markdown</span> +<span id="cb196-2"><a href="#cb196-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> +<span id="cb196-3"><a href="#cb196-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb196-4"><a href="#cb196-4" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb196-5"><a href="#cb196-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb196-6"><a href="#cb196-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="cb192"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb192-1"><a href="#cb192-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<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">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="cb193"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb193-1"><a href="#cb193-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb193-2"><a href="#cb193-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> -<span id="cb193-3"><a href="#cb193-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb193-4"><a href="#cb193-4" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb193-5"><a href="#cb193-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb193-6"><a href="#cb193-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb198"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb198-1"><a href="#cb198-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb198-2"><a href="#cb198-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> +<span id="cb198-3"><a href="#cb198-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb198-4"><a href="#cb198-4" aria-hidden="true"></a>Hi *world*!</span> +<span id="cb198-5"><a href="#cb198-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb198-6"><a href="#cb198-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb194"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb194-1"><a href="#cb194-1" aria-hidden="true"></a><span class="ex">pdftex</span> -no-shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb199"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb199-1"><a href="#cb199-1" aria-hidden="true"></a><span class="ex">pdftex</span> -no-shell-escape document.tex</span></code></pre></div> <p>A new PDF document named <code>document.pdf</code> should be produced and contain the same text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h5 class="unnumbered" data-number="" id="latex-example-13"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<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="cb195"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb195-1"><a href="#cb195-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</span> -<span id="cb195-2"><a href="#cb195-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb195-3"><a href="#cb195-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb195-4"><a href="#cb195-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb195-5"><a href="#cb195-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb195-6"><a href="#cb195-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb195-7"><a href="#cb195-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<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="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</span> +<span id="cb200-2"><a href="#cb200-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb200-3"><a href="#cb200-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb200-4"><a href="#cb200-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb200-5"><a href="#cb200-5" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb200-6"><a href="#cb200-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb200-7"><a href="#cb200-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="cb196"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb196-1"><a href="#cb196-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<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">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="cb197"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb197-1"><a href="#cb197-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span> -<span id="cb197-2"><a href="#cb197-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb197-3"><a href="#cb197-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb197-4"><a href="#cb197-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb197-5"><a href="#cb197-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb197-6"><a href="#cb197-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb197-7"><a href="#cb197-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb202"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb202-1"><a href="#cb202-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span> +<span id="cb202-2"><a href="#cb202-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb202-3"><a href="#cb202-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb202-4"><a href="#cb202-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb202-5"><a href="#cb202-5" aria-hidden="true"></a>Hi *world*!</span> +<span id="cb202-6"><a href="#cb202-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb202-7"><a href="#cb202-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb198"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb198-1"><a href="#cb198-1" aria-hidden="true"></a><span class="ex">pdflatex</span> -no-shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb203"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb203-1"><a href="#cb203-1" aria-hidden="true"></a><span class="ex">pdflatex</span> -no-shell-escape document.tex</span></code></pre></div> <p>A new PDF document named <code>document.pdf</code> should be produced and contain the same text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> <h5 class="unnumbered" data-number="" id="context-example-11">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb199"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb199-1"><a href="#cb199-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb199-2"><a href="#cb199-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> -<span id="cb199-3"><a href="#cb199-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb199-4"><a href="#cb199-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb199-5"><a href="#cb199-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb199-6"><a href="#cb199-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb199-7"><a href="#cb199-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<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">\usemodule</span>[t][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">\starttext</span></span> +<span id="cb204-4"><a href="#cb204-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb204-5"><a href="#cb204-5" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb204-6"><a href="#cb204-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb204-7"><a href="#cb204-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="cb200"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb200-1"><a href="#cb200-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<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">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="cb201"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb201-1"><a href="#cb201-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb201-2"><a href="#cb201-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> -<span id="cb201-3"><a href="#cb201-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb201-4"><a href="#cb201-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb201-5"><a href="#cb201-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb201-6"><a href="#cb201-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb201-7"><a href="#cb201-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<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">\usemodule</span>[t][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">\starttext</span></span> +<span id="cb206-4"><a href="#cb206-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb206-5"><a href="#cb206-5" aria-hidden="true"></a>Hi *world*!</span> +<span id="cb206-6"><a href="#cb206-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb206-7"><a href="#cb206-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb202"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb202-1"><a href="#cb202-1" aria-hidden="true"></a><span class="ex">texexec</span> --passon=--no-shell-escape document.tex</span></code></pre></div> +<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">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.16" id="option-footnotes"><span class="header-section-number">2.2.1.16</span> Option <code>footnotes</code></h4> +<h4 data-number="2.2.1.17" id="option-footnotes"><span class="header-section-number">2.2.1.17</span> Option <code>footnotes</code></h4> <dl> <dt><code>footnotes</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the pandoc footnote syntax extension:</p> -<div class="sourceCode" id="cb203"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb203-1"><a href="#cb203-1" aria-hidden="true"></a>Here is a footnote reference,<span class="ot">[^1]</span> and another.<span class="ot">[^longnote]</span></span> -<span id="cb203-2"><a href="#cb203-2" aria-hidden="true"></a></span> -<span id="cb203-3"><a href="#cb203-3" aria-hidden="true"></a><span class="ot">[^1]: </span>Here is the footnote.</span> -<span id="cb203-4"><a href="#cb203-4" aria-hidden="true"></a></span> -<span id="cb203-5"><a href="#cb203-5" aria-hidden="true"></a><span class="ot">[^longnote]: </span>Here's one with multiple blocks.</span> -<span id="cb203-6"><a href="#cb203-6" aria-hidden="true"></a></span> -<span id="cb203-7"><a href="#cb203-7" aria-hidden="true"></a><span class="in"> Subsequent paragraphs are indented to show that they</span></span> -<span id="cb203-8"><a href="#cb203-8" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb203-9"><a href="#cb203-9" aria-hidden="true"></a></span> -<span id="cb203-10"><a href="#cb203-10" aria-hidden="true"></a><span class="in"> { some.code }</span></span> -<span id="cb203-11"><a href="#cb203-11" aria-hidden="true"></a></span> -<span id="cb203-12"><a href="#cb203-12" aria-hidden="true"></a><span class="in"> The whole paragraph can be indented, or just the</span></span> -<span id="cb203-13"><a href="#cb203-13" aria-hidden="true"></a><span class="in"> first line. In this way, multi-paragraph footnotes</span></span> -<span id="cb203-14"><a href="#cb203-14" aria-hidden="true"></a><span class="in"> work like multi-paragraph list items.</span></span> -<span id="cb203-15"><a href="#cb203-15" aria-hidden="true"></a></span> -<span id="cb203-16"><a href="#cb203-16" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb203-17"><a href="#cb203-17" aria-hidden="true"></a>isn't indented.</span></code></pre></div> +<div class="sourceCode" id="cb208"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb208-1"><a href="#cb208-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="cb208-2"><a href="#cb208-2" aria-hidden="true"></a></span> +<span id="cb208-3"><a href="#cb208-3" aria-hidden="true"></a><span class="ot">[^1]: </span>Here is the footnote.</span> +<span id="cb208-4"><a href="#cb208-4" aria-hidden="true"></a></span> +<span id="cb208-5"><a href="#cb208-5" aria-hidden="true"></a><span class="ot">[^longnote]: </span>Here's one with multiple blocks.</span> +<span id="cb208-6"><a href="#cb208-6" aria-hidden="true"></a></span> +<span id="cb208-7"><a href="#cb208-7" aria-hidden="true"></a><span class="in"> Subsequent paragraphs are indented to show that they</span></span> +<span id="cb208-8"><a href="#cb208-8" aria-hidden="true"></a>belong to the previous footnote.</span> +<span id="cb208-9"><a href="#cb208-9" aria-hidden="true"></a></span> +<span id="cb208-10"><a href="#cb208-10" aria-hidden="true"></a><span class="in"> { some.code }</span></span> +<span id="cb208-11"><a href="#cb208-11" aria-hidden="true"></a></span> +<span id="cb208-12"><a href="#cb208-12" aria-hidden="true"></a><span class="in"> The whole paragraph can be indented, or just the</span></span> +<span id="cb208-13"><a href="#cb208-13" aria-hidden="true"></a><span class="in"> first line. In this way, multi-paragraph footnotes</span></span> +<span id="cb208-14"><a href="#cb208-14" aria-hidden="true"></a><span class="in"> work like multi-paragraph list items.</span></span> +<span id="cb208-15"><a href="#cb208-15" aria-hidden="true"></a></span> +<span id="cb208-16"><a href="#cb208-16" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> +<span id="cb208-17"><a href="#cb208-17" aria-hidden="true"></a>isn't indented.</span></code></pre></div> </dd> </dl> </dd> @@ -2081,33 +2169,33 @@ Thomas,Edison,1847</code></pre> </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> +<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="cb204"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb204-1"><a href="#cb204-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb204-2"><a href="#cb204-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> -<span id="cb204-3"><a href="#cb204-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb204-4"><a href="#cb204-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb204-5"><a href="#cb204-5" aria-hidden="true"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> -<span id="cb204-6"><a href="#cb204-6" aria-hidden="true"></a></span> -<span id="cb204-7"><a href="#cb204-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> -<span id="cb204-8"><a href="#cb204-8" aria-hidden="true"></a></span> -<span id="cb204-9"><a href="#cb204-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> -<span id="cb204-10"><a href="#cb204-10" aria-hidden="true"></a></span> -<span id="cb204-11"><a href="#cb204-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> -<span id="cb204-12"><a href="#cb204-12" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb204-13"><a href="#cb204-13" aria-hidden="true"></a></span> -<span id="cb204-14"><a href="#cb204-14" aria-hidden="true"></a> { some.code }</span> -<span id="cb204-15"><a href="#cb204-15" aria-hidden="true"></a></span> -<span id="cb204-16"><a href="#cb204-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> -<span id="cb204-17"><a href="#cb204-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> -<span id="cb204-18"><a href="#cb204-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> -<span id="cb204-19"><a href="#cb204-19" aria-hidden="true"></a></span> -<span id="cb204-20"><a href="#cb204-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb204-21"><a href="#cb204-21" aria-hidden="true"></a>isn't indented.</span> -<span id="cb204-22"><a href="#cb204-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb204-23"><a href="#cb204-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb205"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb205-1"><a href="#cb205-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb209"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb209-1"><a href="#cb209-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb209-2"><a href="#cb209-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> +<span id="cb209-3"><a href="#cb209-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb209-4"><a href="#cb209-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb209-5"><a href="#cb209-5" aria-hidden="true"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> +<span id="cb209-6"><a href="#cb209-6" aria-hidden="true"></a></span> +<span id="cb209-7"><a href="#cb209-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> +<span id="cb209-8"><a href="#cb209-8" aria-hidden="true"></a></span> +<span id="cb209-9"><a href="#cb209-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> +<span id="cb209-10"><a href="#cb209-10" aria-hidden="true"></a></span> +<span id="cb209-11"><a href="#cb209-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> +<span id="cb209-12"><a href="#cb209-12" aria-hidden="true"></a>belong to the previous footnote.</span> +<span id="cb209-13"><a href="#cb209-13" aria-hidden="true"></a></span> +<span id="cb209-14"><a href="#cb209-14" aria-hidden="true"></a> { some.code }</span> +<span id="cb209-15"><a href="#cb209-15" aria-hidden="true"></a></span> +<span id="cb209-16"><a href="#cb209-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> +<span id="cb209-17"><a href="#cb209-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> +<span id="cb209-18"><a href="#cb209-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> +<span id="cb209-19"><a href="#cb209-19" aria-hidden="true"></a></span> +<span id="cb209-20"><a href="#cb209-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> +<span id="cb209-21"><a href="#cb209-21" aria-hidden="true"></a>isn't indented.</span> +<span id="cb209-22"><a href="#cb209-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb209-23"><a href="#cb209-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="cb210"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb210-1"><a href="#cb210-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> @@ -2115,37 +2203,37 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-12">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb207"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb207-1"><a href="#cb207-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb207-2"><a href="#cb207-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> -<span id="cb207-3"><a href="#cb207-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb207-4"><a href="#cb207-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb207-5"><a href="#cb207-5" aria-hidden="true"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> -<span id="cb207-6"><a href="#cb207-6" aria-hidden="true"></a></span> -<span id="cb207-7"><a href="#cb207-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> -<span id="cb207-8"><a href="#cb207-8" aria-hidden="true"></a></span> -<span id="cb207-9"><a href="#cb207-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> -<span id="cb207-10"><a href="#cb207-10" aria-hidden="true"></a></span> -<span id="cb207-11"><a href="#cb207-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> -<span id="cb207-12"><a href="#cb207-12" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb207-13"><a href="#cb207-13" aria-hidden="true"></a></span> -<span id="cb207-14"><a href="#cb207-14" aria-hidden="true"></a> { some.code }</span> -<span id="cb207-15"><a href="#cb207-15" aria-hidden="true"></a></span> -<span id="cb207-16"><a href="#cb207-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> -<span id="cb207-17"><a href="#cb207-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> -<span id="cb207-18"><a href="#cb207-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> -<span id="cb207-19"><a href="#cb207-19" aria-hidden="true"></a></span> -<span id="cb207-20"><a href="#cb207-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb207-21"><a href="#cb207-21" aria-hidden="true"></a>isn't indented.</span> -<span id="cb207-22"><a href="#cb207-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb207-23"><a href="#cb207-23" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb208"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb208-1"><a href="#cb208-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<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">\def\markdownOptionFootnotes</span>{true}</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>Here is a footnote reference,[^1] and another.[^longnote]</span> +<span id="cb212-6"><a href="#cb212-6" aria-hidden="true"></a></span> +<span id="cb212-7"><a href="#cb212-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> +<span id="cb212-8"><a href="#cb212-8" aria-hidden="true"></a></span> +<span id="cb212-9"><a href="#cb212-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> +<span id="cb212-10"><a href="#cb212-10" aria-hidden="true"></a></span> +<span id="cb212-11"><a href="#cb212-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> +<span id="cb212-12"><a href="#cb212-12" aria-hidden="true"></a>belong to the previous footnote.</span> +<span id="cb212-13"><a href="#cb212-13" aria-hidden="true"></a></span> +<span id="cb212-14"><a href="#cb212-14" aria-hidden="true"></a> { some.code }</span> +<span id="cb212-15"><a href="#cb212-15" aria-hidden="true"></a></span> +<span id="cb212-16"><a href="#cb212-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> +<span id="cb212-17"><a href="#cb212-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> +<span id="cb212-18"><a href="#cb212-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> +<span id="cb212-19"><a href="#cb212-19" aria-hidden="true"></a></span> +<span id="cb212-20"><a href="#cb212-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> +<span id="cb212-21"><a href="#cb212-21" aria-hidden="true"></a>isn't indented.</span> +<span id="cb212-22"><a href="#cb212-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb212-23"><a href="#cb212-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="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 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.17" id="option-frozencachecounter"><span class="header-section-number">2.2.1.17</span> Option <code>frozenCacheCounter</code></h4> +<h4 data-number="2.2.1.18" id="option-frozencachecounter"><span class="header-section-number">2.2.1.18</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> @@ -2154,19 +2242,19 @@ Thomas,Edison,1847</code></pre> </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="cb210"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb210-1"><a href="#cb210-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb210-2"><a href="#cb210-2" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb210-3"><a href="#cb210-3" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb210-4"><a href="#cb210-4" aria-hidden="true"></a> local firstConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 0})</span> -<span id="cb210-5"><a href="#cb210-5" aria-hidden="true"></a> local firstInput = "Hello"</span> -<span id="cb210-6"><a href="#cb210-6" aria-hidden="true"></a> local secondConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 1})</span> -<span id="cb210-7"><a href="#cb210-7" aria-hidden="true"></a> local secondInput = "*world*!"</span> -<span id="cb210-8"><a href="#cb210-8" aria-hidden="true"></a> tex.sprint(firstConvert(firstInput) .. [[ ]] .. secondConvert(secondInput)) }</span> -<span id="cb210-9"><a href="#cb210-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb215"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb215-1"><a href="#cb215-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb215-2"><a href="#cb215-2" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb215-3"><a href="#cb215-3" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb215-4"><a href="#cb215-4" aria-hidden="true"></a> local firstConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 0})</span> +<span id="cb215-5"><a href="#cb215-5" aria-hidden="true"></a> local firstInput = "Hello"</span> +<span id="cb215-6"><a href="#cb215-6" aria-hidden="true"></a> local secondConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 1})</span> +<span id="cb215-7"><a href="#cb215-7" aria-hidden="true"></a> local secondInput = "*world*!"</span> +<span id="cb215-8"><a href="#cb215-8" aria-hidden="true"></a> tex.sprint(firstConvert(firstInput) .. [[ ]] .. secondConvert(secondInput)) }</span> +<span id="cb215-9"><a href="#cb215-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb211"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb211-1"><a href="#cb211-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb216"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb216-1"><a href="#cb216-1" aria-hidden="true"></a><span class="ex">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.18" id="option-hardlinebreaks"><span class="header-section-number">2.2.1.18</span> Option <code>hardLineBreaks</code></h4> +<h4 data-number="2.2.1.19" id="option-hardlinebreaks"><span class="header-section-number">2.2.1.19</span> Option <code>hardLineBreaks</code></h4> <dl> <dt><code>hardLineBreaks</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -2182,43 +2270,43 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-15"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-16"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb212"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb212-1"><a href="#cb212-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb212-2"><a href="#cb212-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb212-3"><a href="#cb212-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb212-4"><a href="#cb212-4" aria-hidden="true"></a></span> -<span id="cb212-5"><a href="#cb212-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb212-6"><a href="#cb212-6" aria-hidden="true"></a>'Twas brillig, and the slithy toves</span> -<span id="cb212-7"><a href="#cb212-7" aria-hidden="true"></a>Did gyre and gimble in the wabe;</span> -<span id="cb212-8"><a href="#cb212-8" aria-hidden="true"></a>All mimsy were the borogoves,</span> -<span id="cb212-9"><a href="#cb212-9" aria-hidden="true"></a>And the mome raths outgrabe.</span> -<span id="cb212-10"><a href="#cb212-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb212-11"><a href="#cb212-11" aria-hidden="true"></a></span> -<span id="cb212-12"><a href="#cb212-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hardLineBreaks}</span> -<span id="cb212-13"><a href="#cb212-13" aria-hidden="true"></a>'Twas brillig, and the slithy toves</span> -<span id="cb212-14"><a href="#cb212-14" aria-hidden="true"></a>Did gyre and gimble in the wabe;</span> -<span id="cb212-15"><a href="#cb212-15" aria-hidden="true"></a>All mimsy were the borogoves,</span> -<span id="cb212-16"><a href="#cb212-16" aria-hidden="true"></a>And the mome raths outgrabe.</span> -<span id="cb212-17"><a href="#cb212-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb212-18"><a href="#cb212-18" aria-hidden="true"></a></span> -<span id="cb212-19"><a href="#cb212-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb213"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb213-1"><a href="#cb213-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<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>{<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> +<span id="cb217-5"><a href="#cb217-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb217-6"><a href="#cb217-6" aria-hidden="true"></a>'Twas brillig, and the slithy toves</span> +<span id="cb217-7"><a href="#cb217-7" aria-hidden="true"></a>Did gyre and gimble in the wabe;</span> +<span id="cb217-8"><a href="#cb217-8" aria-hidden="true"></a>All mimsy were the borogoves,</span> +<span id="cb217-9"><a href="#cb217-9" aria-hidden="true"></a>And the mome raths outgrabe.</span> +<span id="cb217-10"><a href="#cb217-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb217-11"><a href="#cb217-11" aria-hidden="true"></a></span> +<span id="cb217-12"><a href="#cb217-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hardLineBreaks}</span> +<span id="cb217-13"><a href="#cb217-13" aria-hidden="true"></a>'Twas brillig, and the slithy toves</span> +<span id="cb217-14"><a href="#cb217-14" aria-hidden="true"></a>Did gyre and gimble in the wabe;</span> +<span id="cb217-15"><a href="#cb217-15" aria-hidden="true"></a>All mimsy were the borogoves,</span> +<span id="cb217-16"><a href="#cb217-16" aria-hidden="true"></a>And the mome raths outgrabe.</span> +<span id="cb217-17"><a href="#cb217-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb217-18"><a href="#cb217-18" aria-hidden="true"></a></span> +<span id="cb217-19"><a href="#cb217-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="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>’Twas brillig, and the slithy toves Did gyre and gimble in the wabe; All mimsy were the borogoves, And the mome raths outgrabe.</p> <p>’Twas brillig, and the slithy toves Did gyre and gimble in the wabe; All mimsy were the borogoves, And the mome raths outgrabe.</p> </blockquote> -<h4 data-number="2.2.1.19" id="option-hashenumerators"><span class="header-section-number">2.2.1.19</span> Option <code>hashEnumerators</code></h4> +<h4 data-number="2.2.1.20" id="option-hashenumerators"><span class="header-section-number">2.2.1.20</span> Option <code>hashEnumerators</code></h4> <dl> <dt><code>hashEnumerators</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the use of hash symbols (<code>#</code>) as ordered item list markers:</p> -<div class="sourceCode" id="cb214"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb214-1"><a href="#cb214-1" aria-hidden="true"></a>#. Bird</span> -<span id="cb214-2"><a href="#cb214-2" aria-hidden="true"></a>#. McHale</span> -<span id="cb214-3"><a href="#cb214-3" aria-hidden="true"></a>#. Parish</span></code></pre></div> +<div class="sourceCode" id="cb219"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb219-1"><a href="#cb219-1" aria-hidden="true"></a>#. Bird</span> +<span id="cb219-2"><a href="#cb219-2" aria-hidden="true"></a>#. McHale</span> +<span id="cb219-3"><a href="#cb219-3" aria-hidden="true"></a>#. Parish</span></code></pre></div> </dd> </dl> </dd> @@ -2229,27 +2317,27 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-16"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-17"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb215"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb215-1"><a href="#cb215-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb215-2"><a href="#cb215-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb215-3"><a href="#cb215-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb215-4"><a href="#cb215-4" aria-hidden="true"></a></span> -<span id="cb215-5"><a href="#cb215-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb215-6"><a href="#cb215-6" aria-hidden="true"></a>. Bird</span> -<span id="cb215-7"><a href="#cb215-7" aria-hidden="true"></a>. McHale</span> -<span id="cb215-8"><a href="#cb215-8" aria-hidden="true"></a>. Parish</span> -<span id="cb215-9"><a href="#cb215-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb215-10"><a href="#cb215-10" aria-hidden="true"></a></span> -<span id="cb215-11"><a href="#cb215-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hashEnumerators}</span> -<span id="cb215-12"><a href="#cb215-12" aria-hidden="true"></a>. Bird</span> -<span id="cb215-13"><a href="#cb215-13" aria-hidden="true"></a>. McHale</span> -<span id="cb215-14"><a href="#cb215-14" aria-hidden="true"></a>. Parish</span> -<span id="cb215-15"><a href="#cb215-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb215-16"><a href="#cb215-16" aria-hidden="true"></a></span> -<span id="cb215-17"><a href="#cb215-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb216"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb216-1"><a href="#cb216-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<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="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb220-2"><a href="#cb220-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb220-3"><a href="#cb220-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb220-4"><a href="#cb220-4" aria-hidden="true"></a></span> +<span id="cb220-5"><a href="#cb220-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb220-6"><a href="#cb220-6" aria-hidden="true"></a>. Bird</span> +<span id="cb220-7"><a href="#cb220-7" aria-hidden="true"></a>. McHale</span> +<span id="cb220-8"><a href="#cb220-8" aria-hidden="true"></a>. Parish</span> +<span id="cb220-9"><a href="#cb220-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</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><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hashEnumerators}</span> +<span id="cb220-12"><a href="#cb220-12" aria-hidden="true"></a>. Bird</span> +<span id="cb220-13"><a href="#cb220-13" aria-hidden="true"></a>. McHale</span> +<span id="cb220-14"><a href="#cb220-14" aria-hidden="true"></a>. Parish</span> +<span id="cb220-15"><a href="#cb220-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb220-16"><a href="#cb220-16" aria-hidden="true"></a></span> +<span id="cb220-17"><a href="#cb220-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="cb221"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb221-1"><a href="#cb221-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="bird">. Bird</h1> @@ -2263,25 +2351,25 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-13">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb217"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb217-1"><a href="#cb217-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb217-2"><a href="#cb217-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb217-3"><a href="#cb217-3" aria-hidden="true"></a></span> -<span id="cb217-4"><a href="#cb217-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb217-5"><a href="#cb217-5" aria-hidden="true"></a>. Bird</span> -<span id="cb217-6"><a href="#cb217-6" aria-hidden="true"></a>. McHale</span> -<span id="cb217-7"><a href="#cb217-7" aria-hidden="true"></a>. Parish</span> -<span id="cb217-8"><a href="#cb217-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb217-9"><a href="#cb217-9" aria-hidden="true"></a></span> -<span id="cb217-10"><a href="#cb217-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionHashEnumerators</span>{true}</span> -<span id="cb217-11"><a href="#cb217-11" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb217-12"><a href="#cb217-12" aria-hidden="true"></a>. Bird</span> -<span id="cb217-13"><a href="#cb217-13" aria-hidden="true"></a>. McHale</span> -<span id="cb217-14"><a href="#cb217-14" aria-hidden="true"></a>. Parish</span> -<span id="cb217-15"><a href="#cb217-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb217-16"><a href="#cb217-16" aria-hidden="true"></a></span> -<span id="cb217-17"><a href="#cb217-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb218"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb218-1"><a href="#cb218-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb222"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb222-1"><a href="#cb222-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb222-2"><a href="#cb222-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb222-3"><a href="#cb222-3" aria-hidden="true"></a></span> +<span id="cb222-4"><a href="#cb222-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb222-5"><a href="#cb222-5" aria-hidden="true"></a>. Bird</span> +<span id="cb222-6"><a href="#cb222-6" aria-hidden="true"></a>. McHale</span> +<span id="cb222-7"><a href="#cb222-7" aria-hidden="true"></a>. Parish</span> +<span id="cb222-8"><a href="#cb222-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb222-9"><a href="#cb222-9" aria-hidden="true"></a></span> +<span id="cb222-10"><a href="#cb222-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionHashEnumerators</span>{true}</span> +<span id="cb222-11"><a href="#cb222-11" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb222-12"><a href="#cb222-12" aria-hidden="true"></a>. Bird</span> +<span id="cb222-13"><a href="#cb222-13" aria-hidden="true"></a>. McHale</span> +<span id="cb222-14"><a href="#cb222-14" aria-hidden="true"></a>. Parish</span> +<span id="cb222-15"><a href="#cb222-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb222-16"><a href="#cb222-16" aria-hidden="true"></a></span> +<span id="cb222-17"><a href="#cb222-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="cb223"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb223-1"><a href="#cb223-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="bird-1">. Bird</h1> @@ -2293,18 +2381,18 @@ Thomas,Edison,1847</code></pre> <li>Parish</li> </ol> </blockquote> -<h4 data-number="2.2.1.20" id="header-attributes"><span class="header-section-number">2.2.1.20</span> Option <code>headerAttributes</code></h4> +<h4 data-number="2.2.1.21" id="header-attributes"><span class="header-section-number">2.2.1.21</span> Option <code>headerAttributes</code></h4> <dl> <dt><code>headerAttributes</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the assignment of HTML attributes to headings:</p> -<div class="sourceCode" id="cb219"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb219-1"><a href="#cb219-1" aria-hidden="true"></a><span class="fu"># My first heading {#foo}</span></span> -<span id="cb219-2"><a href="#cb219-2" aria-hidden="true"></a></span> -<span id="cb219-3"><a href="#cb219-3" aria-hidden="true"></a><span class="fu">## My second heading ## {#bar .baz}</span></span> -<span id="cb219-4"><a href="#cb219-4" aria-hidden="true"></a></span> -<span id="cb219-5"><a href="#cb219-5" aria-hidden="true"></a>Yet another heading {key=value}</span> -<span id="cb219-6"><a href="#cb219-6" aria-hidden="true"></a><span class="fu">===================</span></span></code></pre></div> +<div class="sourceCode" id="cb224"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb224-1"><a href="#cb224-1" aria-hidden="true"></a><span class="fu"># My first heading {#foo}</span></span> +<span id="cb224-2"><a href="#cb224-2" aria-hidden="true"></a></span> +<span id="cb224-3"><a href="#cb224-3" aria-hidden="true"></a><span class="fu">## My second heading ## {#bar .baz}</span></span> +<span id="cb224-4"><a href="#cb224-4" aria-hidden="true"></a></span> +<span id="cb224-5"><a href="#cb224-5" aria-hidden="true"></a>Yet another heading {key=value}</span> +<span id="cb224-6"><a href="#cb224-6" aria-hidden="true"></a><span class="fu">===================</span></span></code></pre></div> <p>These HTML attributes have currently no effect other than enabling <a href="#slice">content slicing</a>.</p> </dd> </dl> @@ -2316,7 +2404,7 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h4 data-number="2.2.1.21" id="option-html"><span class="header-section-number">2.2.1.21</span> Option <code>html</code></h4> +<h4 data-number="2.2.1.22" id="option-html"><span class="header-section-number">2.2.1.22</span> Option <code>html</code></h4> <dl> <dt><code>html</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -2334,31 +2422,31 @@ Thomas,Edison,1847</code></pre> </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="cb220"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb220-1"><a href="#cb220-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb220-2"><a href="#cb220-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb220-3"><a href="#cb220-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb220-4"><a href="#cb220-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb220-5"><a href="#cb220-5" aria-hidden="true"></a> local convert = markdown.new()</span> -<span id="cb220-6"><a href="#cb220-6" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb220-7"><a href="#cb220-7" aria-hidden="true"></a> local input =</span> -<span id="cb220-8"><a href="#cb220-8" aria-hidden="true"></a> "<div>*There is no block tag support.*</div>" .. newline ..</span> -<span id="cb220-9"><a href="#cb220-9" aria-hidden="true"></a> "*There is no <inline tag="tag"></inline> support.*" .. newline ..</span> -<span id="cb220-10"><a href="#cb220-10" aria-hidden="true"></a> "_There is no <!-- comment --> support._" .. newline ..</span> -<span id="cb220-11"><a href="#cb220-11" aria-hidden="true"></a> "_There is no <? HTML instruction ?> support._"</span> -<span id="cb220-12"><a href="#cb220-12" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb220-13"><a href="#cb220-13" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb220-14"><a href="#cb220-14" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb220-15"><a href="#cb220-15" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb220-16"><a href="#cb220-16" aria-hidden="true"></a> local convert = markdown.new({html = true})</span> -<span id="cb220-17"><a href="#cb220-17" aria-hidden="true"></a> local input =</span> -<span id="cb220-18"><a href="#cb220-18" aria-hidden="true"></a> "<div>*There is block tag support.*</div>" .. newline ..</span> -<span id="cb220-19"><a href="#cb220-19" aria-hidden="true"></a> "*There is <inline tag="tag"></inline> support.*" .. newline ..</span> -<span id="cb220-20"><a href="#cb220-20" aria-hidden="true"></a> "_There is <!-- comment --> support._" .. newline ..</span> -<span id="cb220-21"><a href="#cb220-21" aria-hidden="true"></a> "_There is <? HTML instruction ?> support._"</span> -<span id="cb220-22"><a href="#cb220-22" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb220-23"><a href="#cb220-23" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb225"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb225-1"><a href="#cb225-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb225-2"><a href="#cb225-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb225-3"><a href="#cb225-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb225-4"><a href="#cb225-4" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb225-5"><a href="#cb225-5" aria-hidden="true"></a> local convert = markdown.new()</span> +<span id="cb225-6"><a href="#cb225-6" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> +<span id="cb225-7"><a href="#cb225-7" aria-hidden="true"></a> local input =</span> +<span id="cb225-8"><a href="#cb225-8" aria-hidden="true"></a> "<div>*There is no block tag support.*</div>" .. newline ..</span> +<span id="cb225-9"><a href="#cb225-9" aria-hidden="true"></a> "*There is no <inline tag="tag"></inline> support.*" .. newline ..</span> +<span id="cb225-10"><a href="#cb225-10" aria-hidden="true"></a> "_There is no <!-- comment --> support._" .. newline ..</span> +<span id="cb225-11"><a href="#cb225-11" aria-hidden="true"></a> "_There is no <? HTML instruction ?> support._"</span> +<span id="cb225-12"><a href="#cb225-12" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> +<span id="cb225-13"><a href="#cb225-13" aria-hidden="true"></a><span class="fu">\par</span></span> +<span id="cb225-14"><a href="#cb225-14" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb225-15"><a href="#cb225-15" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb225-16"><a href="#cb225-16" aria-hidden="true"></a> local convert = markdown.new({html = true})</span> +<span id="cb225-17"><a href="#cb225-17" aria-hidden="true"></a> local input =</span> +<span id="cb225-18"><a href="#cb225-18" aria-hidden="true"></a> "<div>*There is block tag support.*</div>" .. newline ..</span> +<span id="cb225-19"><a href="#cb225-19" aria-hidden="true"></a> "*There is <inline tag="tag"></inline> support.*" .. newline ..</span> +<span id="cb225-20"><a href="#cb225-20" aria-hidden="true"></a> "_There is <!-- comment --> support._" .. newline ..</span> +<span id="cb225-21"><a href="#cb225-21" aria-hidden="true"></a> "_There is <? HTML instruction ?> support._"</span> +<span id="cb225-22"><a href="#cb225-22" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> +<span id="cb225-23"><a href="#cb225-23" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb221"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb221-1"><a href="#cb221-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb226"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb226-1"><a href="#cb226-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> @@ -2366,23 +2454,23 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="lua-cli-example-7">Lua CLI Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb222"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb222-1"><a href="#cb222-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb222-2"><a href="#cb222-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb222-3"><a href="#cb222-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb222-4"><a href="#cb222-4" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb222-5"><a href="#cb222-5" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb222-6"><a href="#cb222-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb227"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb227-1"><a href="#cb227-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb227-2"><a href="#cb227-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb227-3"><a href="#cb227-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb227-4"><a href="#cb227-4" aria-hidden="true"></a><span class="fu">\par</span></span> +<span id="cb227-5"><a href="#cb227-5" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb227-6"><a href="#cb227-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="cb223"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb223-1"><a href="#cb223-1" aria-hidden="true"></a><span class="kw"><div></span></span> -<span id="cb223-2"><a href="#cb223-2" aria-hidden="true"></a>*Is there block tag support?*</span> -<span id="cb223-3"><a href="#cb223-3" aria-hidden="true"></a><span class="kw"></div></span></span> -<span id="cb223-4"><a href="#cb223-4" aria-hidden="true"></a>*Is there <span class="kw"><inline</span><span class="ot"> tag=</span><span class="st">"tag"</span><span class="kw">></inline></span> support?*</span> -<span id="cb223-5"><a href="#cb223-5" aria-hidden="true"></a>_Is there <span class="co"><!-- comment --></span> support?_</span> -<span id="cb223-6"><a href="#cb223-6" aria-hidden="true"></a>_Is there <span class="kw"><?</span> HTML instruction <span class="kw">?></span> support?_</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb224"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb224-1"><a href="#cb224-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb224-2"><a href="#cb224-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ html=true -- content.md optiontrue.tex</span> -<span id="cb224-3"><a href="#cb224-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb228"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb228-1"><a href="#cb228-1" aria-hidden="true"></a><span class="kw"><div></span></span> +<span id="cb228-2"><a href="#cb228-2" aria-hidden="true"></a>*Is there block tag support?*</span> +<span id="cb228-3"><a href="#cb228-3" aria-hidden="true"></a><span class="kw"></div></span></span> +<span id="cb228-4"><a href="#cb228-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="cb228-5"><a href="#cb228-5" aria-hidden="true"></a>_Is there <span class="co"><!-- comment --></span> support?_</span> +<span id="cb228-6"><a href="#cb228-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="cb229"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb229-1"><a href="#cb229-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> +<span id="cb229-2"><a href="#cb229-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ html=true -- content.md optiontrue.tex</span> +<span id="cb229-3"><a href="#cb229-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> @@ -2391,63 +2479,63 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="plain-tex-example-8">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb225"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb225-1"><a href="#cb225-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb225-2"><a href="#cb225-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb225-3"><a href="#cb225-3" aria-hidden="true"></a></span> -<span id="cb225-4"><a href="#cb225-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb225-5"><a href="#cb225-5" aria-hidden="true"></a><div></span> -<span id="cb225-6"><a href="#cb225-6" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb225-7"><a href="#cb225-7" aria-hidden="true"></a></div></span> -<span id="cb225-8"><a href="#cb225-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb225-9"><a href="#cb225-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb225-10"><a href="#cb225-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb225-11"><a href="#cb225-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb225-12"><a href="#cb225-12" aria-hidden="true"></a></span> -<span id="cb225-13"><a href="#cb225-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> -<span id="cb225-14"><a href="#cb225-14" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb225-15"><a href="#cb225-15" aria-hidden="true"></a><div></span> -<span id="cb225-16"><a href="#cb225-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb225-17"><a href="#cb225-17" aria-hidden="true"></a></div></span> -<span id="cb225-18"><a href="#cb225-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb225-19"><a href="#cb225-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb225-20"><a href="#cb225-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb225-21"><a href="#cb225-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb225-22"><a href="#cb225-22" aria-hidden="true"></a></span> -<span id="cb225-23"><a href="#cb225-23" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb226"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb226-1"><a href="#cb226-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<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">\input</span> markdown</span> +<span id="cb230-2"><a href="#cb230-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</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">\markdownBegin</span></span> +<span id="cb230-5"><a href="#cb230-5" aria-hidden="true"></a><div></span> +<span id="cb230-6"><a href="#cb230-6" aria-hidden="true"></a>*There is no block tag support.*</span> +<span id="cb230-7"><a href="#cb230-7" aria-hidden="true"></a></div></span> +<span id="cb230-8"><a href="#cb230-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> +<span id="cb230-9"><a href="#cb230-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> +<span id="cb230-10"><a href="#cb230-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> +<span id="cb230-11"><a href="#cb230-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb230-12"><a href="#cb230-12" aria-hidden="true"></a></span> +<span id="cb230-13"><a href="#cb230-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> +<span id="cb230-14"><a href="#cb230-14" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb230-15"><a href="#cb230-15" aria-hidden="true"></a><div></span> +<span id="cb230-16"><a href="#cb230-16" aria-hidden="true"></a>*There is block tag support.*</span> +<span id="cb230-17"><a href="#cb230-17" aria-hidden="true"></a></div></span> +<span id="cb230-18"><a href="#cb230-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> +<span id="cb230-19"><a href="#cb230-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> +<span id="cb230-20"><a href="#cb230-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> +<span id="cb230-21"><a href="#cb230-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb230-22"><a href="#cb230-22" aria-hidden="true"></a></span> +<span id="cb230-23"><a href="#cb230-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="cb231"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb231-1"><a href="#cb231-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-17"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-18"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb227"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb227-1"><a href="#cb227-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb227-2"><a href="#cb227-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb227-3"><a href="#cb227-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb227-4"><a href="#cb227-4" aria-hidden="true"></a></span> -<span id="cb227-5"><a href="#cb227-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb227-6"><a href="#cb227-6" aria-hidden="true"></a><div></span> -<span id="cb227-7"><a href="#cb227-7" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb227-8"><a href="#cb227-8" aria-hidden="true"></a></div></span> -<span id="cb227-9"><a href="#cb227-9" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb227-10"><a href="#cb227-10" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb227-11"><a href="#cb227-11" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb227-12"><a href="#cb227-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb227-13"><a href="#cb227-13" aria-hidden="true"></a></span> -<span id="cb227-14"><a href="#cb227-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{html}</span> -<span id="cb227-15"><a href="#cb227-15" aria-hidden="true"></a><div></span> -<span id="cb227-16"><a href="#cb227-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb227-17"><a href="#cb227-17" aria-hidden="true"></a></div></span> -<span id="cb227-18"><a href="#cb227-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb227-19"><a href="#cb227-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb227-20"><a href="#cb227-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb227-21"><a href="#cb227-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb227-22"><a href="#cb227-22" aria-hidden="true"></a></span> -<span id="cb227-23"><a href="#cb227-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb228"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb228-1"><a href="#cb228-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb232"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb232-1"><a href="#cb232-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb232-2"><a href="#cb232-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb232-3"><a href="#cb232-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</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><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb232-6"><a href="#cb232-6" aria-hidden="true"></a><div></span> +<span id="cb232-7"><a href="#cb232-7" aria-hidden="true"></a>*There is no block tag support.*</span> +<span id="cb232-8"><a href="#cb232-8" aria-hidden="true"></a></div></span> +<span id="cb232-9"><a href="#cb232-9" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> +<span id="cb232-10"><a href="#cb232-10" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> +<span id="cb232-11"><a href="#cb232-11" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> +<span id="cb232-12"><a href="#cb232-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb232-13"><a href="#cb232-13" aria-hidden="true"></a></span> +<span id="cb232-14"><a href="#cb232-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{html}</span> +<span id="cb232-15"><a href="#cb232-15" aria-hidden="true"></a><div></span> +<span id="cb232-16"><a href="#cb232-16" aria-hidden="true"></a>*There is block tag support.*</span> +<span id="cb232-17"><a href="#cb232-17" aria-hidden="true"></a></div></span> +<span id="cb232-18"><a href="#cb232-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> +<span id="cb232-19"><a href="#cb232-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> +<span id="cb232-20"><a href="#cb232-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> +<span id="cb232-21"><a href="#cb232-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb232-22"><a href="#cb232-22" aria-hidden="true"></a></span> +<span id="cb232-23"><a href="#cb232-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="cb233"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb233-1"><a href="#cb233-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> @@ -2455,37 +2543,37 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-14">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb229"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb229-1"><a href="#cb229-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb229-2"><a href="#cb229-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb229-3"><a href="#cb229-3" aria-hidden="true"></a></span> -<span id="cb229-4"><a href="#cb229-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb229-5"><a href="#cb229-5" aria-hidden="true"></a><div></span> -<span id="cb229-6"><a href="#cb229-6" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb229-7"><a href="#cb229-7" aria-hidden="true"></a></div></span> -<span id="cb229-8"><a href="#cb229-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb229-9"><a href="#cb229-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb229-10"><a href="#cb229-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb229-11"><a href="#cb229-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb229-12"><a href="#cb229-12" aria-hidden="true"></a></span> -<span id="cb229-13"><a href="#cb229-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> -<span id="cb229-14"><a href="#cb229-14" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb229-15"><a href="#cb229-15" aria-hidden="true"></a><div></span> -<span id="cb229-16"><a href="#cb229-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb229-17"><a href="#cb229-17" aria-hidden="true"></a></div></span> -<span id="cb229-18"><a href="#cb229-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb229-19"><a href="#cb229-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb229-20"><a href="#cb229-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb229-21"><a href="#cb229-21" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb229-22"><a href="#cb229-22" aria-hidden="true"></a></span> -<span id="cb229-23"><a href="#cb229-23" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb230"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb230-1"><a href="#cb230-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb234"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb234-1"><a href="#cb234-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb234-2"><a href="#cb234-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb234-3"><a href="#cb234-3" aria-hidden="true"></a></span> +<span id="cb234-4"><a href="#cb234-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb234-5"><a href="#cb234-5" aria-hidden="true"></a><div></span> +<span id="cb234-6"><a href="#cb234-6" aria-hidden="true"></a>*There is no block tag support.*</span> +<span id="cb234-7"><a href="#cb234-7" aria-hidden="true"></a></div></span> +<span id="cb234-8"><a href="#cb234-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> +<span id="cb234-9"><a href="#cb234-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> +<span id="cb234-10"><a href="#cb234-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> +<span id="cb234-11"><a href="#cb234-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb234-12"><a href="#cb234-12" aria-hidden="true"></a></span> +<span id="cb234-13"><a href="#cb234-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> +<span id="cb234-14"><a href="#cb234-14" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb234-15"><a href="#cb234-15" aria-hidden="true"></a><div></span> +<span id="cb234-16"><a href="#cb234-16" aria-hidden="true"></a>*There is block tag support.*</span> +<span id="cb234-17"><a href="#cb234-17" aria-hidden="true"></a></div></span> +<span id="cb234-18"><a href="#cb234-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> +<span id="cb234-19"><a href="#cb234-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> +<span id="cb234-20"><a href="#cb234-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> +<span id="cb234-21"><a href="#cb234-21" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb234-22"><a href="#cb234-22" aria-hidden="true"></a></span> +<span id="cb234-23"><a href="#cb234-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="cb235"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb235-1"><a href="#cb235-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h4 data-number="2.2.1.22" id="option-hybrid"><span class="header-section-number">2.2.1.22</span> Option <code>hybrid</code></h4> +<h4 data-number="2.2.1.23" id="option-hybrid"><span class="header-section-number">2.2.1.23</span> Option <code>hybrid</code></h4> <dl> <dt><code>hybrid</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -2503,25 +2591,25 @@ Thomas,Edison,1847</code></pre> </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="cb231"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb231-1"><a href="#cb231-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb231-2"><a href="#cb231-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb231-3"><a href="#cb231-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb231-4"><a href="#cb231-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb231-5"><a href="#cb231-5" aria-hidden="true"></a> local input, convert_safe, convert_unsafe, paragraph</span> -<span id="cb231-6"><a href="#cb231-6" aria-hidden="true"></a></span> -<span id="cb231-7"><a href="#cb231-7" aria-hidden="true"></a> input = [[<span class="ss">$</span><span class="sc">\string\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.]]</span> -<span id="cb231-8"><a href="#cb231-8" aria-hidden="true"></a> convert_safe = markdown.new()</span> -<span id="cb231-9"><a href="#cb231-9" aria-hidden="true"></a> convert_unsafe = markdown.new({hybrid = true})</span> -<span id="cb231-10"><a href="#cb231-10" aria-hidden="true"></a> paragraph = [[<span class="fu">\par</span>]]</span> -<span id="cb231-11"><a href="#cb231-11" aria-hidden="true"></a></span> -<span id="cb231-12"><a href="#cb231-12" aria-hidden="true"></a> tex.sprint(</span> -<span id="cb231-13"><a href="#cb231-13" aria-hidden="true"></a> convert_safe(input) .. paragraph ..</span> -<span id="cb231-14"><a href="#cb231-14" aria-hidden="true"></a> convert_unsafe(input)</span> -<span id="cb231-15"><a href="#cb231-15" aria-hidden="true"></a> )</span> -<span id="cb231-16"><a href="#cb231-16" aria-hidden="true"></a>}</span> -<span id="cb231-17"><a href="#cb231-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb236"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb236-1"><a href="#cb236-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb236-2"><a href="#cb236-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb236-3"><a href="#cb236-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb236-4"><a href="#cb236-4" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb236-5"><a href="#cb236-5" aria-hidden="true"></a> local input, convert_safe, convert_unsafe, paragraph</span> +<span id="cb236-6"><a href="#cb236-6" aria-hidden="true"></a></span> +<span id="cb236-7"><a href="#cb236-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="cb236-8"><a href="#cb236-8" aria-hidden="true"></a> convert_safe = markdown.new()</span> +<span id="cb236-9"><a href="#cb236-9" aria-hidden="true"></a> convert_unsafe = markdown.new({hybrid = true})</span> +<span id="cb236-10"><a href="#cb236-10" aria-hidden="true"></a> paragraph = [[<span class="fu">\par</span>]]</span> +<span id="cb236-11"><a href="#cb236-11" aria-hidden="true"></a></span> +<span id="cb236-12"><a href="#cb236-12" aria-hidden="true"></a> tex.sprint(</span> +<span id="cb236-13"><a href="#cb236-13" aria-hidden="true"></a> convert_safe(input) .. paragraph ..</span> +<span id="cb236-14"><a href="#cb236-14" aria-hidden="true"></a> convert_unsafe(input)</span> +<span id="cb236-15"><a href="#cb236-15" aria-hidden="true"></a> )</span> +<span id="cb236-16"><a href="#cb236-16" aria-hidden="true"></a>}</span> +<span id="cb236-17"><a href="#cb236-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb232"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb232-1"><a href="#cb232-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb237"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb237-1"><a href="#cb237-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> @@ -2529,21 +2617,21 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="lua-cli-example-8">Lua CLI Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb233"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb233-1"><a href="#cb233-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb233-2"><a href="#cb233-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb233-3"><a href="#cb233-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb233-4"><a href="#cb233-4" aria-hidden="true"></a></span> -<span id="cb233-5"><a href="#cb233-5" aria-hidden="true"></a><span class="fu">\begingroup</span></span> -<span id="cb233-6"><a href="#cb233-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> -<span id="cb233-7"><a href="#cb233-7" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb233-8"><a href="#cb233-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> -<span id="cb233-9"><a href="#cb233-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<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 class="fu">\input</span> optionfalse</span> +<span id="cb238-4"><a href="#cb238-4" aria-hidden="true"></a></span> +<span id="cb238-5"><a href="#cb238-5" aria-hidden="true"></a><span class="fu">\begingroup</span></span> +<span id="cb238-6"><a href="#cb238-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> +<span id="cb238-7"><a href="#cb238-7" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb238-8"><a href="#cb238-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> +<span id="cb238-9"><a href="#cb238-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="cb234"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb234-1"><a href="#cb234-1" aria-hidden="true"></a>$\sqrt{-1}$ *equals* $i$.</span></code></pre></div> +<div class="sourceCode" id="cb239"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb239-1"><a href="#cb239-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="cb235"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb235-1"><a href="#cb235-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb235-2"><a href="#cb235-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- content.md optiontrue.tex</span> -<span id="cb235-3"><a href="#cb235-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb240"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb240-1"><a href="#cb240-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> +<span id="cb240-2"><a href="#cb240-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- content.md optiontrue.tex</span> +<span id="cb240-3"><a href="#cb240-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> @@ -2552,43 +2640,43 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="plain-tex-example-9">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb236"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb236-1"><a href="#cb236-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb236-2"><a href="#cb236-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb236-3"><a href="#cb236-3" aria-hidden="true"></a></span> -<span id="cb236-4"><a href="#cb236-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb236-5"><a href="#cb236-5" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb236-6"><a href="#cb236-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb236-7"><a href="#cb236-7" aria-hidden="true"></a></span> -<span id="cb236-8"><a href="#cb236-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb236-9"><a href="#cb236-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb236-10"><a href="#cb236-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb236-11"><a href="#cb236-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb236-12"><a href="#cb236-12" aria-hidden="true"></a></span> -<span id="cb236-13"><a href="#cb236-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb241"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb241-1"><a href="#cb241-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb241-2"><a href="#cb241-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb241-3"><a href="#cb241-3" aria-hidden="true"></a></span> +<span id="cb241-4"><a href="#cb241-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb241-5"><a href="#cb241-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="cb241-6"><a href="#cb241-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb241-7"><a href="#cb241-7" aria-hidden="true"></a></span> +<span id="cb241-8"><a href="#cb241-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb241-9"><a href="#cb241-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb241-10"><a href="#cb241-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="cb241-11"><a href="#cb241-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb241-12"><a href="#cb241-12" aria-hidden="true"></a></span> +<span id="cb241-13"><a href="#cb241-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="cb237"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb237-1"><a href="#cb237-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb242"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb242-1"><a href="#cb242-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-18"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-19"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb238"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb238-1"><a href="#cb238-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb238-2"><a href="#cb238-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb238-3"><a href="#cb238-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb238-4"><a href="#cb238-4" aria-hidden="true"></a></span> -<span id="cb238-5"><a href="#cb238-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb238-6"><a href="#cb238-6" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb238-7"><a href="#cb238-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb238-8"><a href="#cb238-8" aria-hidden="true"></a></span> -<span id="cb238-9"><a href="#cb238-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> -<span id="cb238-10"><a href="#cb238-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb238-11"><a href="#cb238-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb238-12"><a href="#cb238-12" aria-hidden="true"></a></span> -<span id="cb238-13"><a href="#cb238-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb243"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb243-1"><a href="#cb243-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb243-2"><a href="#cb243-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb243-3"><a href="#cb243-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb243-4"><a href="#cb243-4" aria-hidden="true"></a></span> +<span id="cb243-5"><a href="#cb243-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb243-6"><a href="#cb243-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="cb243-7"><a href="#cb243-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb243-8"><a href="#cb243-8" aria-hidden="true"></a></span> +<span id="cb243-9"><a href="#cb243-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> +<span id="cb243-10"><a href="#cb243-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="cb243-11"><a href="#cb243-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb243-12"><a href="#cb243-12" aria-hidden="true"></a></span> +<span id="cb243-13"><a href="#cb243-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="cb239"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb239-1"><a href="#cb239-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb244"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb244-1"><a href="#cb244-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> @@ -2596,35 +2684,35 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-15">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb240"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb240-1"><a href="#cb240-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb240-2"><a href="#cb240-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb240-3"><a href="#cb240-3" aria-hidden="true"></a></span> -<span id="cb240-4"><a href="#cb240-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb240-5"><a href="#cb240-5" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb240-6"><a href="#cb240-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb240-7"><a href="#cb240-7" aria-hidden="true"></a></span> -<span id="cb240-8"><a href="#cb240-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb240-9"><a href="#cb240-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb240-10"><a href="#cb240-10" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> -<span id="cb240-11"><a href="#cb240-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb240-12"><a href="#cb240-12" aria-hidden="true"></a></span> -<span id="cb240-13"><a href="#cb240-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb245"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb245-1"><a href="#cb245-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb245-2"><a href="#cb245-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb245-3"><a href="#cb245-3" aria-hidden="true"></a></span> +<span id="cb245-4"><a href="#cb245-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb245-5"><a href="#cb245-5" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</span> +<span id="cb245-6"><a href="#cb245-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb245-7"><a href="#cb245-7" aria-hidden="true"></a></span> +<span id="cb245-8"><a href="#cb245-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb245-9"><a href="#cb245-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb245-10"><a href="#cb245-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="cb245-11"><a href="#cb245-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb245-12"><a href="#cb245-12" aria-hidden="true"></a></span> +<span id="cb245-13"><a href="#cb245-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="cb241"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb241-1"><a href="#cb241-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb246"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb246-1"><a href="#cb246-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\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.23" id="option-inlinefootnotes"><span class="header-section-number">2.2.1.23</span> Option <code>inlineFootnotes</code></h4> +<h4 data-number="2.2.1.24" id="option-inlinefootnotes"><span class="header-section-number">2.2.1.24</span> Option <code>inlineFootnotes</code></h4> <dl> <dt><code>inlineFootnotes</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the pandoc inline footnote syntax extension:</p> -<div class="sourceCode" id="cb242"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb242-1"><a href="#cb242-1" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb242-2"><a href="#cb242-2" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb242-3"><a href="#cb242-3" aria-hidden="true"></a>move down to type the note.]</span></code></pre></div> +<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>Here is an inline note.^[Inlines notes are easier to</span> +<span id="cb247-2"><a href="#cb247-2" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> +<span id="cb247-3"><a href="#cb247-3" aria-hidden="true"></a>move down to type the note.]</span></code></pre></div> </dd> </dl> </dd> @@ -2635,57 +2723,57 @@ Thomas,Edison,1847</code></pre> </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> +<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="cb243"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb243-1"><a href="#cb243-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb243-2"><a href="#cb243-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[inlineFootnotes]{<span class="ex">markdown</span>}</span> -<span id="cb243-3"><a href="#cb243-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb243-4"><a href="#cb243-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb243-5"><a href="#cb243-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb243-6"><a href="#cb243-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb243-7"><a href="#cb243-7" aria-hidden="true"></a>move down to type the note.]</span> -<span id="cb243-8"><a href="#cb243-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb243-9"><a href="#cb243-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb248"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb248-1"><a href="#cb248-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb248-2"><a href="#cb248-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[inlineFootnotes]{<span class="ex">markdown</span>}</span> +<span id="cb248-3"><a href="#cb248-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb248-4"><a href="#cb248-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb248-5"><a href="#cb248-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> +<span id="cb248-6"><a href="#cb248-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> +<span id="cb248-7"><a href="#cb248-7" aria-hidden="true"></a>move down to type the note.]</span> +<span id="cb248-8"><a href="#cb248-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb248-9"><a href="#cb248-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="cb244"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb244-1"><a href="#cb244-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb249"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb249-1"><a href="#cb249-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Here is an inline note.<a href="#fn5" class="footnote-ref" id="fnref5" role="doc-noteref"><sup>5</sup></a></p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-16">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb245"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb245-1"><a href="#cb245-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb245-2"><a href="#cb245-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionInlineFootnotes</span>{true}</span> -<span id="cb245-3"><a href="#cb245-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb245-4"><a href="#cb245-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb245-5"><a href="#cb245-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb245-6"><a href="#cb245-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb245-7"><a href="#cb245-7" aria-hidden="true"></a>move down to type the note.]</span> -<span id="cb245-8"><a href="#cb245-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb245-9"><a href="#cb245-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb250"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb250-1"><a href="#cb250-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb250-2"><a href="#cb250-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionInlineFootnotes</span>{true}</span> +<span id="cb250-3"><a href="#cb250-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb250-4"><a href="#cb250-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb250-5"><a href="#cb250-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> +<span id="cb250-6"><a href="#cb250-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> +<span id="cb250-7"><a href="#cb250-7" aria-hidden="true"></a>move down to type the note.]</span> +<span id="cb250-8"><a href="#cb250-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb250-9"><a href="#cb250-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="cb246"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb246-1"><a href="#cb246-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb251"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb251-1"><a href="#cb251-1" aria-hidden="true"></a><span class="ex">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.24" id="option-jekylldata"><span class="header-section-number">2.2.1.24</span> Option <code>jekyllData</code></h4> +<h4 data-number="2.2.1.25" id="option-jekylldata"><span class="header-section-number">2.2.1.25</span> Option <code>jekyllData</code></h4> <dl> <dt><code>jekyllData</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the Pandoc <code>yaml_metadata_block</code> syntax extension for entering metadata in <abbr>yaml</abbr>:</p> -<div class="sourceCode" id="cb247"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb247-1"><a href="#cb247-1" aria-hidden="true"></a><span class="pp">---</span></span> -<span id="cb247-2"><a href="#cb247-2" aria-hidden="true"></a><span class="fu">title</span><span class="kw">:</span><span class="at"> </span><span class="st">'This is the title: it contains a colon'</span></span> -<span id="cb247-3"><a href="#cb247-3" aria-hidden="true"></a><span class="fu">author</span><span class="kw">:</span></span> -<span id="cb247-4"><a href="#cb247-4" aria-hidden="true"></a><span class="kw">-</span><span class="at"> Author One</span></span> -<span id="cb247-5"><a href="#cb247-5" aria-hidden="true"></a><span class="kw">-</span><span class="at"> Author Two</span></span> -<span id="cb247-6"><a href="#cb247-6" aria-hidden="true"></a><span class="fu">keywords</span><span class="kw">:</span><span class="at"> </span><span class="kw">[</span><span class="at">nothing</span><span class="kw">,</span><span class="at"> nothingness</span><span class="kw">]</span></span> -<span id="cb247-7"><a href="#cb247-7" aria-hidden="true"></a><span class="fu">abstract</span><span class="kw">: </span><span class="ch">|</span></span> -<span id="cb247-8"><a href="#cb247-8" aria-hidden="true"></a> This is the abstract.</span> -<span id="cb247-9"><a href="#cb247-9" aria-hidden="true"></a></span> -<span id="cb247-10"><a href="#cb247-10" aria-hidden="true"></a> It consists of two paragraphs.</span> -<span id="cb247-11"><a href="#cb247-11" aria-hidden="true"></a><span class="pp">---</span></span></code></pre></div> +<div class="sourceCode" id="cb252"><pre class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb252-1"><a href="#cb252-1" aria-hidden="true"></a><span class="pp">---</span></span> +<span id="cb252-2"><a href="#cb252-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="cb252-3"><a href="#cb252-3" aria-hidden="true"></a><span class="fu">author</span><span class="kw">:</span></span> +<span id="cb252-4"><a href="#cb252-4" aria-hidden="true"></a><span class="kw">-</span><span class="at"> Author One</span></span> +<span id="cb252-5"><a href="#cb252-5" aria-hidden="true"></a><span class="kw">-</span><span class="at"> Author Two</span></span> +<span id="cb252-6"><a href="#cb252-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="cb252-7"><a href="#cb252-7" aria-hidden="true"></a><span class="fu">abstract</span><span class="kw">: </span><span class="ch">|</span></span> +<span id="cb252-8"><a href="#cb252-8" aria-hidden="true"></a> This is the abstract.</span> +<span id="cb252-9"><a href="#cb252-9" aria-hidden="true"></a></span> +<span id="cb252-10"><a href="#cb252-10" aria-hidden="true"></a> It consists of two paragraphs.</span> +<span id="cb252-11"><a href="#cb252-11" aria-hidden="true"></a><span class="pp">---</span></span></code></pre></div> </dd> </dl> </dd> @@ -2698,87 +2786,105 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-10">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb248"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb248-1"><a href="#cb248-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb248-2"><a href="#cb248-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> -<span id="cb248-3"><a href="#cb248-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> -<span id="cb248-4"><a href="#cb248-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> -<span id="cb248-5"><a href="#cb248-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb248-6"><a href="#cb248-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb248-7"><a href="#cb248-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb248-8"><a href="#cb248-8" aria-hidden="true"></a>---</span> -<span id="cb248-9"><a href="#cb248-9" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb248-10"><a href="#cb248-10" aria-hidden="true"></a>age: 99</span> -<span id="cb248-11"><a href="#cb248-11" aria-hidden="true"></a>---</span> -<span id="cb248-12"><a href="#cb248-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb248-13"><a href="#cb248-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb249"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb249-1"><a href="#cb249-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<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">\input</span> markdown</span> +<span id="cb253-2"><a href="#cb253-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb253-3"><a href="#cb253-3" aria-hidden="true"></a><span class="fu">\ExplSyntaxOn</span></span> +<span id="cb253-4"><a href="#cb253-4" aria-hidden="true"></a><span class="fu">\keys</span>_define:nn</span> +<span id="cb253-5"><a href="#cb253-5" aria-hidden="true"></a> { markdown/jekyllData }</span> +<span id="cb253-6"><a href="#cb253-6" aria-hidden="true"></a> {</span> +<span id="cb253-7"><a href="#cb253-7" aria-hidden="true"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> +<span id="cb253-8"><a href="#cb253-8" aria-hidden="true"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> +<span id="cb253-9"><a href="#cb253-9" aria-hidden="true"></a> }</span> +<span id="cb253-10"><a href="#cb253-10" aria-hidden="true"></a><span class="fu">\ExplSyntaxOff</span></span> +<span id="cb253-11"><a href="#cb253-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb253-12"><a href="#cb253-12" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb253-13"><a href="#cb253-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb253-14"><a href="#cb253-14" aria-hidden="true"></a>---</span> +<span id="cb253-15"><a href="#cb253-15" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb253-16"><a href="#cb253-16" aria-hidden="true"></a>age: 99</span> +<span id="cb253-17"><a href="#cb253-17" aria-hidden="true"></a>---</span> +<span id="cb253-18"><a href="#cb253-18" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb253-19"><a href="#cb253-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="cb254"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb254-1"><a href="#cb254-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-20"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-21"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb250"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb250-1"><a href="#cb250-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb250-2"><a href="#cb250-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> -<span id="cb250-3"><a href="#cb250-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb250-4"><a href="#cb250-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb250-5"><a href="#cb250-5" aria-hidden="true"></a> jekyllDataString = {<span class="fu">\gdef\name</span>{#2}},</span> -<span id="cb250-6"><a href="#cb250-6" aria-hidden="true"></a> jekyllDataNumber = {<span class="fu">\gdef\age</span>{#2}},</span> -<span id="cb250-7"><a href="#cb250-7" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> -<span id="cb250-8"><a href="#cb250-8" aria-hidden="true"></a> }</span> -<span id="cb250-9"><a href="#cb250-9" aria-hidden="true"></a>}</span> -<span id="cb250-10"><a href="#cb250-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb250-11"><a href="#cb250-11" aria-hidden="true"></a></span> -<span id="cb250-12"><a href="#cb250-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb250-13"><a href="#cb250-13" aria-hidden="true"></a>---</span> -<span id="cb250-14"><a href="#cb250-14" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb250-15"><a href="#cb250-15" aria-hidden="true"></a>age: 99</span> -<span id="cb250-16"><a href="#cb250-16" aria-hidden="true"></a>---</span> -<span id="cb250-17"><a href="#cb250-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb250-18"><a href="#cb250-18" aria-hidden="true"></a></span> -<span id="cb250-19"><a href="#cb250-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb251"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb251-1"><a href="#cb251-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb255"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb255-1"><a href="#cb255-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb255-2"><a href="#cb255-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb255-3"><a href="#cb255-3" aria-hidden="true"></a><span class="fu">\ExplSyntaxOn</span></span> +<span id="cb255-4"><a href="#cb255-4" aria-hidden="true"></a><span class="fu">\keys</span>_define:nn</span> +<span id="cb255-5"><a href="#cb255-5" aria-hidden="true"></a> { markdown/jekyllData }</span> +<span id="cb255-6"><a href="#cb255-6" aria-hidden="true"></a> {</span> +<span id="cb255-7"><a href="#cb255-7" aria-hidden="true"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> +<span id="cb255-8"><a href="#cb255-8" aria-hidden="true"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> +<span id="cb255-9"><a href="#cb255-9" aria-hidden="true"></a> }</span> +<span id="cb255-10"><a href="#cb255-10" aria-hidden="true"></a><span class="fu">\ExplSyntaxOff</span></span> +<span id="cb255-11"><a href="#cb255-11" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb255-12"><a href="#cb255-12" aria-hidden="true"></a> renderers = {</span> +<span id="cb255-13"><a href="#cb255-13" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> +<span id="cb255-14"><a href="#cb255-14" aria-hidden="true"></a> }</span> +<span id="cb255-15"><a href="#cb255-15" aria-hidden="true"></a>}</span> +<span id="cb255-16"><a href="#cb255-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb255-17"><a href="#cb255-17" aria-hidden="true"></a></span> +<span id="cb255-18"><a href="#cb255-18" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb255-19"><a href="#cb255-19" aria-hidden="true"></a>---</span> +<span id="cb255-20"><a href="#cb255-20" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb255-21"><a href="#cb255-21" aria-hidden="true"></a>age: 99</span> +<span id="cb255-22"><a href="#cb255-22" aria-hidden="true"></a>---</span> +<span id="cb255-23"><a href="#cb255-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb255-24"><a href="#cb255-24" aria-hidden="true"></a></span> +<span id="cb255-25"><a href="#cb255-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="cb256"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb256-1"><a href="#cb256-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-17">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb252"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb252-1"><a href="#cb252-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb252-2"><a href="#cb252-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> -<span id="cb252-3"><a href="#cb252-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> -<span id="cb252-4"><a href="#cb252-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> -<span id="cb252-5"><a href="#cb252-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb252-6"><a href="#cb252-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb252-7"><a href="#cb252-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb252-8"><a href="#cb252-8" aria-hidden="true"></a></span> -<span id="cb252-9"><a href="#cb252-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb252-10"><a href="#cb252-10" aria-hidden="true"></a>---</span> -<span id="cb252-11"><a href="#cb252-11" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb252-12"><a href="#cb252-12" aria-hidden="true"></a>age: 99</span> -<span id="cb252-13"><a href="#cb252-13" aria-hidden="true"></a>---</span> -<span id="cb252-14"><a href="#cb252-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb252-15"><a href="#cb252-15" aria-hidden="true"></a></span> -<span id="cb252-16"><a href="#cb252-16" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb253"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb253-1"><a href="#cb253-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb257"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb257-1"><a href="#cb257-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb257-2"><a href="#cb257-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb257-3"><a href="#cb257-3" aria-hidden="true"></a><span class="fu">\ExplSyntaxOn</span></span> +<span id="cb257-4"><a href="#cb257-4" aria-hidden="true"></a><span class="fu">\keys</span>_define:nn</span> +<span id="cb257-5"><a href="#cb257-5" aria-hidden="true"></a> { markdown/jekyllData }</span> +<span id="cb257-6"><a href="#cb257-6" aria-hidden="true"></a> {</span> +<span id="cb257-7"><a href="#cb257-7" aria-hidden="true"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> +<span id="cb257-8"><a href="#cb257-8" aria-hidden="true"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> +<span id="cb257-9"><a href="#cb257-9" aria-hidden="true"></a> }</span> +<span id="cb257-10"><a href="#cb257-10" aria-hidden="true"></a><span class="fu">\ExplSyntaxOff</span></span> +<span id="cb257-11"><a href="#cb257-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb257-12"><a href="#cb257-12" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb257-13"><a href="#cb257-13" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb257-14"><a href="#cb257-14" aria-hidden="true"></a></span> +<span id="cb257-15"><a href="#cb257-15" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb257-16"><a href="#cb257-16" aria-hidden="true"></a>---</span> +<span id="cb257-17"><a href="#cb257-17" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb257-18"><a href="#cb257-18" aria-hidden="true"></a>age: 99</span> +<span id="cb257-19"><a href="#cb257-19" aria-hidden="true"></a>---</span> +<span id="cb257-20"><a href="#cb257-20" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb257-21"><a href="#cb257-21" aria-hidden="true"></a></span> +<span id="cb257-22"><a href="#cb257-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="cb258"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb258-1"><a href="#cb258-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h4 data-number="2.2.1.25" id="pipe-tables"><span class="header-section-number">2.2.1.25</span> Option <code>pipeTables</code></h4> +<h4 data-number="2.2.1.26" id="pipe-tables"><span class="header-section-number">2.2.1.26</span> Option <code>pipeTables</code></h4> <dl> <dt><code>pipeTables</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the <abbr>PHP</abbr> Markdown table syntax extension:</p> -<div class="sourceCode" id="cb254"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb254-1"><a href="#cb254-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb254-2"><a href="#cb254-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb254-3"><a href="#cb254-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb254-4"><a href="#cb254-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb254-5"><a href="#cb254-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span></code></pre></div> +<div class="sourceCode" id="cb259"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb259-1"><a href="#cb259-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb259-2"><a href="#cb259-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb259-3"><a href="#cb259-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb259-4"><a href="#cb259-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb259-5"><a href="#cb259-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span></code></pre></div> </dd> </dl> </dd> @@ -2789,21 +2895,21 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-21"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-22"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb255"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb255-1"><a href="#cb255-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb255-2"><a href="#cb255-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables]{<span class="ex">markdown</span>}</span> -<span id="cb255-3"><a href="#cb255-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb255-4"><a href="#cb255-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb255-5"><a href="#cb255-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb255-6"><a href="#cb255-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb255-7"><a href="#cb255-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb255-8"><a href="#cb255-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb255-9"><a href="#cb255-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb255-10"><a href="#cb255-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb255-11"><a href="#cb255-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb260"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb260-1"><a href="#cb260-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb260-2"><a href="#cb260-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables]{<span class="ex">markdown</span>}</span> +<span id="cb260-3"><a href="#cb260-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb260-4"><a href="#cb260-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb260-5"><a href="#cb260-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb260-6"><a href="#cb260-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb260-7"><a href="#cb260-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb260-8"><a href="#cb260-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb260-9"><a href="#cb260-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb260-10"><a href="#cb260-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb260-11"><a href="#cb260-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="cb256"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb256-1"><a href="#cb256-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb261"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb261-1"><a href="#cb261-1" aria-hidden="true"></a><span class="ex">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> @@ -2839,19 +2945,19 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-18">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb257"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb257-1"><a href="#cb257-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb257-2"><a href="#cb257-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionPipeTables</span>{true}</span> -<span id="cb257-3"><a href="#cb257-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb257-4"><a href="#cb257-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb257-5"><a href="#cb257-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb257-6"><a href="#cb257-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb257-7"><a href="#cb257-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb257-8"><a href="#cb257-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb257-9"><a href="#cb257-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb257-10"><a href="#cb257-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb257-11"><a href="#cb257-11" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb262"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb262-1"><a href="#cb262-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb262-2"><a href="#cb262-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionPipeTables</span>{true}</span> +<span id="cb262-3"><a href="#cb262-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb262-4"><a href="#cb262-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb262-5"><a href="#cb262-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb262-6"><a href="#cb262-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb262-7"><a href="#cb262-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb262-8"><a href="#cb262-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb262-9"><a href="#cb262-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb262-10"><a href="#cb262-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb262-11"><a href="#cb262-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="cb258"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb258-1"><a href="#cb258-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb263"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb263-1"><a href="#cb263-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -2885,7 +2991,7 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </blockquote> -<h4 data-number="2.2.1.26" id="option-preservetabs"><span class="header-section-number">2.2.1.26</span> Option <code>preserveTabs</code></h4> +<h4 data-number="2.2.1.27" id="option-preservetabs"><span class="header-section-number">2.2.1.27</span> Option <code>preserveTabs</code></h4> <dl> <dt><code>preserveTabs</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -2901,19 +3007,19 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h4 data-number="2.2.1.27" id="option-relativereferences"><span class="header-section-number">2.2.1.27</span> Option <code>relativeReferences</code></h4> +<h4 data-number="2.2.1.28" id="option-relativereferences"><span class="header-section-number">2.2.1.28</span> Option <code>relativeReferences</code></h4> <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="cb259"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb259-1"><a href="#cb259-1" aria-hidden="true"></a>I conclude in Section <#conclusion>.</span> -<span id="cb259-2"><a href="#cb259-2" aria-hidden="true"></a></span> -<span id="cb259-3"><a href="#cb259-3" aria-hidden="true"></a>Conclusion {#conclusion}</span> -<span id="cb259-4"><a href="#cb259-4" aria-hidden="true"></a><span class="fu">==========</span></span> -<span id="cb259-5"><a href="#cb259-5" aria-hidden="true"></a>In this paper, we have discovered that most</span> -<span id="cb259-6"><a href="#cb259-6" aria-hidden="true"></a>grandmas would rather eat dinner with their</span> -<span id="cb259-7"><a href="#cb259-7" aria-hidden="true"></a>grandchildren than get eaten. Begone, wolf!</span></code></pre></div> +<div class="sourceCode" id="cb264"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb264-1"><a href="#cb264-1" aria-hidden="true"></a>I conclude in Section <#conclusion>.</span> +<span id="cb264-2"><a href="#cb264-2" aria-hidden="true"></a></span> +<span id="cb264-3"><a href="#cb264-3" aria-hidden="true"></a>Conclusion {#conclusion}</span> +<span id="cb264-4"><a href="#cb264-4" aria-hidden="true"></a><span class="fu">==========</span></span> +<span id="cb264-5"><a href="#cb264-5" aria-hidden="true"></a>In this paper, we have discovered that most</span> +<span id="cb264-6"><a href="#cb264-6" aria-hidden="true"></a>grandmas would rather eat dinner with their</span> +<span id="cb264-7"><a href="#cb264-7" aria-hidden="true"></a>grandchildren than get eaten. Begone, wolf!</span></code></pre></div> </dd> </dl> </dd> @@ -2924,33 +3030,33 @@ Thomas,Edison,1847</code></pre> </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> +<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="cb260"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb260-1"><a href="#cb260-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb260-2"><a href="#cb260-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes, relativeReferences]{<span class="ex">markdown</span>}</span> -<span id="cb260-3"><a href="#cb260-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb260-4"><a href="#cb260-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb260-5"><a href="#cb260-5" aria-hidden="true"></a></span> -<span id="cb260-6"><a href="#cb260-6" aria-hidden="true"></a>I conclude in Section <#conclusion>.</span> -<span id="cb260-7"><a href="#cb260-7" aria-hidden="true"></a></span> -<span id="cb260-8"><a href="#cb260-8" aria-hidden="true"></a>Conclusion {#conclusion}</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>In this paper, we have discovered that most</span> -<span id="cb260-11"><a href="#cb260-11" aria-hidden="true"></a>grandmas would rather eat dinner with their</span> -<span id="cb260-12"><a href="#cb260-12" aria-hidden="true"></a>grandchildren than get eaten. Begone, wolf!</span> -<span id="cb260-13"><a href="#cb260-13" aria-hidden="true"></a></span> -<span id="cb260-14"><a href="#cb260-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb260-15"><a href="#cb260-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb265"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb265-1"><a href="#cb265-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb265-2"><a href="#cb265-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes, relativeReferences]{<span class="ex">markdown</span>}</span> +<span id="cb265-3"><a href="#cb265-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb265-4"><a href="#cb265-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb265-5"><a href="#cb265-5" aria-hidden="true"></a></span> +<span id="cb265-6"><a href="#cb265-6" aria-hidden="true"></a>I conclude in Section <#conclusion>.</span> +<span id="cb265-7"><a href="#cb265-7" aria-hidden="true"></a></span> +<span id="cb265-8"><a href="#cb265-8" aria-hidden="true"></a>Conclusion {#conclusion}</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>In this paper, we have discovered that most</span> +<span id="cb265-11"><a href="#cb265-11" aria-hidden="true"></a>grandmas would rather eat dinner with their</span> +<span id="cb265-12"><a href="#cb265-12" aria-hidden="true"></a>grandchildren than get eaten. Begone, wolf!</span> +<span id="cb265-13"><a href="#cb265-13" aria-hidden="true"></a></span> +<span id="cb265-14"><a href="#cb265-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb265-15"><a href="#cb265-15" aria-hidden="true"></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="cb261"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb261-1"><a href="#cb261-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb261-2"><a href="#cb261-2" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb266"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb266-1"><a href="#cb266-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb266-2"><a href="#cb266-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> <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> </blockquote> -<h4 data-number="2.2.1.28" id="option-shiftheadings"><span class="header-section-number">2.2.1.28</span> Option <code>shiftHeadings</code></h4> +<h4 data-number="2.2.1.29" id="option-shiftheadings"><span class="header-section-number">2.2.1.29</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> @@ -2958,48 +3064,48 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-11">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>example.md</code> with the following content:</p> -<div class="sourceCode" id="cb262"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb262-1"><a href="#cb262-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="cb263"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb263-1"><a href="#cb263-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb263-2"><a href="#cb263-2" aria-hidden="true"></a></span> -<span id="cb263-3"><a href="#cb263-3" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> -<span id="cb263-4"><a href="#cb263-4" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> -<span id="cb263-5"><a href="#cb263-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="cb263-6"><a href="#cb263-6" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> -<span id="cb263-7"><a href="#cb263-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="cb263-8"><a href="#cb263-8" aria-hidden="true"></a></span> -<span id="cb263-9"><a href="#cb263-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> -<span id="cb263-10"><a href="#cb263-10" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</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="fu">\def\markdownOptionShiftHeadings</span>{0}</span> -<span id="cb263-13"><a href="#cb263-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb263-14"><a href="#cb263-14" aria-hidden="true"></a></span> -<span id="cb263-15"><a href="#cb263-15" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> -<span id="cb263-16"><a href="#cb263-16" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb263-17"><a href="#cb263-17" aria-hidden="true"></a></span> -<span id="cb263-18"><a href="#cb263-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="cb264"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb264-1"><a href="#cb264-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb267"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb267-1"><a href="#cb267-1" aria-hidden="true"></a><span class="fu">## 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="cb268"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb268-1"><a href="#cb268-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb268-2"><a href="#cb268-2" aria-hidden="true"></a></span> +<span id="cb268-3"><a href="#cb268-3" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> +<span id="cb268-4"><a href="#cb268-4" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> +<span id="cb268-5"><a href="#cb268-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="cb268-6"><a href="#cb268-6" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> +<span id="cb268-7"><a href="#cb268-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="cb268-8"><a href="#cb268-8" aria-hidden="true"></a></span> +<span id="cb268-9"><a href="#cb268-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> +<span id="cb268-10"><a href="#cb268-10" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb268-11"><a href="#cb268-11" aria-hidden="true"></a></span> +<span id="cb268-12"><a href="#cb268-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span> +<span id="cb268-13"><a href="#cb268-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb268-14"><a href="#cb268-14" aria-hidden="true"></a></span> +<span id="cb268-15"><a href="#cb268-15" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> +<span id="cb268-16"><a href="#cb268-16" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb268-17"><a href="#cb268-17" aria-hidden="true"></a></span> +<span id="cb268-18"><a href="#cb268-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="cb269"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb269-1"><a href="#cb269-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="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-23"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-24"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb265"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb265-1"><a href="#cb265-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb265-2"><a href="#cb265-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb265-3"><a href="#cb265-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{example.md}</span> -<span id="cb265-4"><a href="#cb265-4" aria-hidden="true"></a>## A section</span> -<span id="cb265-5"><a href="#cb265-5" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb265-6"><a href="#cb265-6" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb265-7"><a href="#cb265-7" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=-1]{example.md}</span> -<span id="cb265-8"><a href="#cb265-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb265-9"><a href="#cb265-9" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=+1]{example.md}</span> -<span id="cb265-10"><a href="#cb265-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb270"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb270-1"><a href="#cb270-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb270-2"><a href="#cb270-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb270-3"><a href="#cb270-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{example.md}</span> +<span id="cb270-4"><a href="#cb270-4" aria-hidden="true"></a>## A section</span> +<span id="cb270-5"><a href="#cb270-5" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> +<span id="cb270-6"><a href="#cb270-6" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb270-7"><a href="#cb270-7" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=-1]{example.md}</span> +<span id="cb270-8"><a href="#cb270-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb270-9"><a href="#cb270-9" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=+1]{example.md}</span> +<span id="cb270-10"><a href="#cb270-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="cb266"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb266-1"><a href="#cb266-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb271"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb271-1"><a href="#cb271-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="a-section-3">A section</h1> @@ -3008,30 +3114,30 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-19">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>example.md</code> with the following content:</p> -<div class="sourceCode" id="cb267"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb267-1"><a href="#cb267-1" aria-hidden="true"></a><span class="fu">## A section</span></span></code></pre></div> +<div class="sourceCode" id="cb272"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb272-1"><a href="#cb272-1" aria-hidden="true"></a><span class="fu">## 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="cb268"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb268-1"><a href="#cb268-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb268-2"><a href="#cb268-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb268-3"><a href="#cb268-3" aria-hidden="true"></a></span> -<span id="cb268-4"><a href="#cb268-4" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> -<span id="cb268-5"><a href="#cb268-5" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</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><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span> -<span id="cb268-8"><a href="#cb268-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb268-9"><a href="#cb268-9" aria-hidden="true"></a></span> -<span id="cb268-10"><a href="#cb268-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> -<span id="cb268-11"><a href="#cb268-11" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb268-12"><a href="#cb268-12" aria-hidden="true"></a></span> -<span id="cb268-13"><a href="#cb268-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb273"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb273-1"><a href="#cb273-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb273-2"><a href="#cb273-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb273-3"><a href="#cb273-3" aria-hidden="true"></a></span> +<span id="cb273-4"><a href="#cb273-4" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> +<span id="cb273-5"><a href="#cb273-5" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb273-6"><a href="#cb273-6" aria-hidden="true"></a></span> +<span id="cb273-7"><a href="#cb273-7" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span> +<span id="cb273-8"><a href="#cb273-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</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><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> +<span id="cb273-11"><a href="#cb273-11" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb273-12"><a href="#cb273-12" aria-hidden="true"></a></span> +<span id="cb273-13"><a href="#cb273-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="cb269"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb269-1"><a href="#cb269-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb274"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb274-1"><a href="#cb274-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="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.29" id="slice"><span class="header-section-number">2.2.1.29</span> Option <code>slice</code></h4> +<h4 data-number="2.2.1.30" id="slice"><span class="header-section-number">2.2.1.30</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> @@ -3047,39 +3153,39 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-12">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>hamlet.md</code> with the following content:</p> -<div class="sourceCode" id="cb270"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb270-1"><a href="#cb270-1" aria-hidden="true"></a><span class="fu"># The Tragedy of Hamlet</span></span> -<span id="cb270-2"><a href="#cb270-2" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb270-3"><a href="#cb270-3" aria-hidden="true"></a></span> -<span id="cb270-4"><a href="#cb270-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> -<span id="cb270-5"><a href="#cb270-5" aria-hidden="true"></a>Hamlet kills Polonius.</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><span class="fu">## Act V {#act-5}</span></span> -<span id="cb270-8"><a href="#cb270-8" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb270-9"><a href="#cb270-9" aria-hidden="true"></a></span> -<span id="cb270-10"><a href="#cb270-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> -<span id="cb270-11"><a href="#cb270-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="cb271"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb271-1"><a href="#cb271-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb271-2"><a href="#cb271-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span> -<span id="cb271-3"><a href="#cb271-3" aria-hidden="true"></a></span> -<span id="cb271-4"><a href="#cb271-4" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> -<span id="cb271-5"><a href="#cb271-5" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> -<span id="cb271-6"><a href="#cb271-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="cb271-7"><a href="#cb271-7" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> -<span id="cb271-8"><a href="#cb271-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="cb271-9"><a href="#cb271-9" aria-hidden="true"></a></span> -<span id="cb271-10"><a href="#cb271-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> -<span id="cb271-11"><a href="#cb271-11" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb271-12"><a href="#cb271-12" aria-hidden="true"></a></span> -<span id="cb271-13"><a href="#cb271-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span> -<span id="cb271-14"><a href="#cb271-14" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb271-15"><a href="#cb271-15" aria-hidden="true"></a></span> -<span id="cb271-16"><a href="#cb271-16" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span> -<span id="cb271-17"><a href="#cb271-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb271-18"><a href="#cb271-18" aria-hidden="true"></a></span> -<span id="cb271-19"><a href="#cb271-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="cb272"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb272-1"><a href="#cb272-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<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"># The Tragedy of Hamlet</span></span> +<span id="cb275-2"><a href="#cb275-2" aria-hidden="true"></a>Shakespeare's longest play.</span> +<span id="cb275-3"><a href="#cb275-3" aria-hidden="true"></a></span> +<span id="cb275-4"><a href="#cb275-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> +<span id="cb275-5"><a href="#cb275-5" aria-hidden="true"></a>Hamlet kills Polonius.</span> +<span id="cb275-6"><a href="#cb275-6" aria-hidden="true"></a></span> +<span id="cb275-7"><a href="#cb275-7" aria-hidden="true"></a><span class="fu">## Act V {#act-5}</span></span> +<span id="cb275-8"><a href="#cb275-8" aria-hidden="true"></a>Hamlet dies.</span> +<span id="cb275-9"><a href="#cb275-9" aria-hidden="true"></a></span> +<span id="cb275-10"><a href="#cb275-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> +<span id="cb275-11"><a href="#cb275-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="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 class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span> +<span id="cb276-3"><a href="#cb276-3" aria-hidden="true"></a></span> +<span id="cb276-4"><a href="#cb276-4" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> +<span id="cb276-5"><a href="#cb276-5" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> +<span id="cb276-6"><a href="#cb276-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="cb276-7"><a href="#cb276-7" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> +<span id="cb276-8"><a href="#cb276-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="cb276-9"><a href="#cb276-9" aria-hidden="true"></a></span> +<span id="cb276-10"><a href="#cb276-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> +<span id="cb276-11"><a href="#cb276-11" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb276-12"><a href="#cb276-12" aria-hidden="true"></a></span> +<span id="cb276-13"><a href="#cb276-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span> +<span id="cb276-14"><a href="#cb276-14" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb276-15"><a href="#cb276-15" aria-hidden="true"></a></span> +<span id="cb276-16"><a href="#cb276-16" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span> +<span id="cb276-17"><a href="#cb276-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb276-18"><a href="#cb276-18" aria-hidden="true"></a></span> +<span id="cb276-19"><a href="#cb276-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="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> <blockquote> <h1 id="the-tragedy-of-hamlet">The Tragedy of Hamlet</h1> @@ -3091,30 +3197,30 @@ Thomas,Edison,1847</code></pre> <h2 id="act-v">Act V</h2> <p>Hamlet dies.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-24"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-25"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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]{<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">filecontents</span>}[overwrite,nosearch,noheader]{hamlet.md}</span> -<span id="cb273-4"><a href="#cb273-4" aria-hidden="true"></a># The Tragedy of Hamlet</span> -<span id="cb273-5"><a href="#cb273-5" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb273-6"><a href="#cb273-6" aria-hidden="true"></a></span> -<span id="cb273-7"><a href="#cb273-7" aria-hidden="true"></a>## Act III {#act-3}</span> -<span id="cb273-8"><a href="#cb273-8" aria-hidden="true"></a>Hamlet kills Polonius.</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>## Act V {#act-5}</span> -<span id="cb273-11"><a href="#cb273-11" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb273-12"><a href="#cb273-12" aria-hidden="true"></a></span> -<span id="cb273-13"><a href="#cb273-13" aria-hidden="true"></a>## Act I {#act-1}</span> -<span id="cb273-14"><a href="#cb273-14" aria-hidden="true"></a>Hamlet talks to ghost.</span> -<span id="cb273-15"><a href="#cb273-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb273-16"><a href="#cb273-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb273-17"><a href="#cb273-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=^ ^act-3]{hamlet.md}</span> -<span id="cb273-18"><a href="#cb273-18" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-1]{hamlet.md}</span> -<span id="cb273-19"><a href="#cb273-19" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-3 act-5]{hamlet.md}</span> -<span id="cb273-20"><a href="#cb273-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="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></code></pre></div> +<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>[headerAttributes]{<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]{hamlet.md}</span> +<span id="cb278-4"><a href="#cb278-4" aria-hidden="true"></a># The Tragedy of Hamlet</span> +<span id="cb278-5"><a href="#cb278-5" aria-hidden="true"></a>Shakespeare's longest play.</span> +<span id="cb278-6"><a href="#cb278-6" aria-hidden="true"></a></span> +<span id="cb278-7"><a href="#cb278-7" aria-hidden="true"></a>## Act III {#act-3}</span> +<span id="cb278-8"><a href="#cb278-8" aria-hidden="true"></a>Hamlet kills Polonius.</span> +<span id="cb278-9"><a href="#cb278-9" aria-hidden="true"></a></span> +<span id="cb278-10"><a href="#cb278-10" aria-hidden="true"></a>## Act V {#act-5}</span> +<span id="cb278-11"><a href="#cb278-11" aria-hidden="true"></a>Hamlet dies.</span> +<span id="cb278-12"><a href="#cb278-12" aria-hidden="true"></a></span> +<span id="cb278-13"><a href="#cb278-13" aria-hidden="true"></a>## Act I {#act-1}</span> +<span id="cb278-14"><a href="#cb278-14" aria-hidden="true"></a>Hamlet talks to ghost.</span> +<span id="cb278-15"><a href="#cb278-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> +<span id="cb278-16"><a href="#cb278-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb278-17"><a href="#cb278-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=^ ^act-3]{hamlet.md}</span> +<span id="cb278-18"><a href="#cb278-18" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-1]{hamlet.md}</span> +<span id="cb278-19"><a href="#cb278-19" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-3 act-5]{hamlet.md}</span> +<span id="cb278-20"><a href="#cb278-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="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> <blockquote> <h1 id="the-tragedy-of-hamlet-1">The Tragedy of Hamlet</h1> @@ -3128,34 +3234,34 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-20">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>hamlet.md</code> with the following content:</p> -<div class="sourceCode" id="cb275"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb275-1"><a href="#cb275-1" aria-hidden="true"></a><span class="fu"># The Tragedy of Hamlet</span></span> -<span id="cb275-2"><a href="#cb275-2" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb275-3"><a href="#cb275-3" aria-hidden="true"></a></span> -<span id="cb275-4"><a href="#cb275-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> -<span id="cb275-5"><a href="#cb275-5" aria-hidden="true"></a>Hamlet kills Polonius.</span> -<span id="cb275-6"><a href="#cb275-6" aria-hidden="true"></a></span> -<span id="cb275-7"><a href="#cb275-7" aria-hidden="true"></a><span class="fu">## Act V {#act-5}</span></span> -<span id="cb275-8"><a href="#cb275-8" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb275-9"><a href="#cb275-9" aria-hidden="true"></a></span> -<span id="cb275-10"><a href="#cb275-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> -<span id="cb275-11"><a href="#cb275-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="cb276"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb276-1"><a href="#cb276-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb276-2"><a href="#cb276-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span> -<span id="cb276-3"><a href="#cb276-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb276-4"><a href="#cb276-4" aria-hidden="true"></a></span> -<span id="cb276-5"><a href="#cb276-5" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> -<span id="cb276-6"><a href="#cb276-6" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb276-7"><a href="#cb276-7" aria-hidden="true"></a></span> -<span id="cb276-8"><a href="#cb276-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span> -<span id="cb276-9"><a href="#cb276-9" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb276-10"><a href="#cb276-10" aria-hidden="true"></a></span> -<span id="cb276-11"><a href="#cb276-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span> -<span id="cb276-12"><a href="#cb276-12" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb276-13"><a href="#cb276-13" aria-hidden="true"></a></span> -<span id="cb276-14"><a href="#cb276-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb277"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb277-1"><a href="#cb277-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb280"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb280-1"><a href="#cb280-1" aria-hidden="true"></a><span class="fu"># The Tragedy of Hamlet</span></span> +<span id="cb280-2"><a href="#cb280-2" aria-hidden="true"></a>Shakespeare's longest play.</span> +<span id="cb280-3"><a href="#cb280-3" aria-hidden="true"></a></span> +<span id="cb280-4"><a href="#cb280-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> +<span id="cb280-5"><a href="#cb280-5" aria-hidden="true"></a>Hamlet kills Polonius.</span> +<span id="cb280-6"><a href="#cb280-6" aria-hidden="true"></a></span> +<span id="cb280-7"><a href="#cb280-7" aria-hidden="true"></a><span class="fu">## Act V {#act-5}</span></span> +<span id="cb280-8"><a href="#cb280-8" aria-hidden="true"></a>Hamlet dies.</span> +<span id="cb280-9"><a href="#cb280-9" aria-hidden="true"></a></span> +<span id="cb280-10"><a href="#cb280-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> +<span id="cb280-11"><a href="#cb280-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="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">\def\markdownOptionHeaderAttributes</span>{true}</span> +<span id="cb281-3"><a href="#cb281-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb281-4"><a href="#cb281-4" aria-hidden="true"></a></span> +<span id="cb281-5"><a href="#cb281-5" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> +<span id="cb281-6"><a href="#cb281-6" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.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">\def\markdownOptionSlice</span>{act-1}</span> +<span id="cb281-9"><a href="#cb281-9" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb281-10"><a href="#cb281-10" aria-hidden="true"></a></span> +<span id="cb281-11"><a href="#cb281-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span> +<span id="cb281-12"><a href="#cb281-12" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> +<span id="cb281-13"><a href="#cb281-13" aria-hidden="true"></a></span> +<span id="cb281-14"><a href="#cb281-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="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> <blockquote> <h1 id="the-tragedy-of-hamlet-2">The Tragedy of Hamlet</h1> @@ -3167,7 +3273,7 @@ Thomas,Edison,1847</code></pre> <h2 id="act-v-2">Act V</h2> <p>Hamlet dies.</p> </blockquote> -<h4 data-number="2.2.1.30" id="option-smartellipses"><span class="header-section-number">2.2.1.30</span> Option <code>smartEllipses</code></h4> +<h4 data-number="2.2.1.31" id="option-smartellipses"><span class="header-section-number">2.2.1.31</span> Option <code>smartEllipses</code></h4> <dl> <dt><code>smartEllipses</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -3185,23 +3291,23 @@ Thomas,Edison,1847</code></pre> </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="cb278"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb278-1"><a href="#cb278-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb278-2"><a href="#cb278-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb278-3"><a href="#cb278-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb278-4"><a href="#cb278-4" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb278-5"><a href="#cb278-5" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb278-6"><a href="#cb278-6" aria-hidden="true"></a> local convert = markdown.new()</span> -<span id="cb278-7"><a href="#cb278-7" aria-hidden="true"></a> local input = "These are just three regular dots ..."</span> -<span id="cb278-8"><a href="#cb278-8" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb278-9"><a href="#cb278-9" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb278-10"><a href="#cb278-10" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb278-11"><a href="#cb278-11" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb278-12"><a href="#cb278-12" aria-hidden="true"></a> local convert = markdown.new({smartEllipses = true})</span> -<span id="cb278-13"><a href="#cb278-13" aria-hidden="true"></a> local input = "... and this is a victorian ellipsis."</span> -<span id="cb278-14"><a href="#cb278-14" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb278-15"><a href="#cb278-15" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb283"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb283-1"><a href="#cb283-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb283-2"><a href="#cb283-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb283-3"><a href="#cb283-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb283-4"><a href="#cb283-4" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb283-5"><a href="#cb283-5" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb283-6"><a href="#cb283-6" aria-hidden="true"></a> local convert = markdown.new()</span> +<span id="cb283-7"><a href="#cb283-7" aria-hidden="true"></a> local input = "These are just three regular dots ..."</span> +<span id="cb283-8"><a href="#cb283-8" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> +<span id="cb283-9"><a href="#cb283-9" aria-hidden="true"></a><span class="fu">\par</span></span> +<span id="cb283-10"><a href="#cb283-10" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> +<span id="cb283-11"><a href="#cb283-11" aria-hidden="true"></a> local markdown = require("markdown")</span> +<span id="cb283-12"><a href="#cb283-12" aria-hidden="true"></a> local convert = markdown.new({smartEllipses = true})</span> +<span id="cb283-13"><a href="#cb283-13" aria-hidden="true"></a> local input = "... and this is a victorian ellipsis."</span> +<span id="cb283-14"><a href="#cb283-14" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> +<span id="cb283-15"><a href="#cb283-15" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb279"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb279-1"><a href="#cb279-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb284"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb284-1"><a href="#cb284-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <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> @@ -3209,19 +3315,19 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="lua-cli-example-9">Lua CLI Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb280"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb280-1"><a href="#cb280-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb280-2"><a href="#cb280-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb280-3"><a href="#cb280-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb280-4"><a href="#cb280-4" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb280-5"><a href="#cb280-5" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb280-6"><a href="#cb280-6" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb280-7"><a href="#cb280-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb285"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb285-1"><a href="#cb285-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb285-2"><a href="#cb285-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb285-3"><a href="#cb285-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb285-4"><a href="#cb285-4" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> +<span id="cb285-5"><a href="#cb285-5" aria-hidden="true"></a><span class="fu">\par</span></span> +<span id="cb285-6"><a href="#cb285-6" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> +<span id="cb285-7"><a href="#cb285-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="cb281"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb281-1"><a href="#cb281-1" aria-hidden="true"></a>Are these just three regular dots, a victorian ellipsis, or ... ?</span></code></pre></div> +<div class="sourceCode" id="cb286"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb286-1"><a href="#cb286-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="cb282"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb282-1"><a href="#cb282-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb282-2"><a href="#cb282-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ smartEllipses=true -- content.md optiontrue.tex</span> -<span id="cb282-3"><a href="#cb282-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<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">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> +<span id="cb287-2"><a href="#cb287-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ smartEllipses=true -- content.md optiontrue.tex</span> +<span id="cb287-3"><a href="#cb287-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> @@ -3230,48 +3336,48 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="plain-tex-example-13">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb283"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb283-1"><a href="#cb283-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb283-2"><a href="#cb283-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</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">\markdownBegin</span></span> -<span id="cb283-5"><a href="#cb283-5" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb283-6"><a href="#cb283-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb283-7"><a href="#cb283-7" aria-hidden="true"></a></span> -<span id="cb283-8"><a href="#cb283-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb283-9"><a href="#cb283-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb283-10"><a href="#cb283-10" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb283-11"><a href="#cb283-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb283-12"><a href="#cb283-12" aria-hidden="true"></a></span> -<span id="cb283-13"><a href="#cb283-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb288"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb288-1"><a href="#cb288-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb288-2"><a href="#cb288-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb288-3"><a href="#cb288-3" aria-hidden="true"></a></span> +<span id="cb288-4"><a href="#cb288-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb288-5"><a href="#cb288-5" aria-hidden="true"></a>These are just three regular dots ...</span> +<span id="cb288-6"><a href="#cb288-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb288-7"><a href="#cb288-7" aria-hidden="true"></a></span> +<span id="cb288-8"><a href="#cb288-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> +<span id="cb288-9"><a href="#cb288-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb288-10"><a href="#cb288-10" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> +<span id="cb288-11"><a href="#cb288-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb288-12"><a href="#cb288-12" aria-hidden="true"></a></span> +<span id="cb288-13"><a href="#cb288-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="cb284"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb284-1"><a href="#cb284-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb289"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb289-1"><a href="#cb289-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>These are just three regular dots …</p> <p>. . . and this is a victorian ellipsis.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-25"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-26"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb285"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb285-1"><a href="#cb285-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb285-2"><a href="#cb285-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb285-3"><a href="#cb285-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb285-4"><a href="#cb285-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb285-5"><a href="#cb285-5" aria-hidden="true"></a> ellipsis = {. . .}</span> -<span id="cb285-6"><a href="#cb285-6" aria-hidden="true"></a> }</span> -<span id="cb285-7"><a href="#cb285-7" aria-hidden="true"></a>}</span> -<span id="cb285-8"><a href="#cb285-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb285-9"><a href="#cb285-9" aria-hidden="true"></a></span> -<span id="cb285-10"><a href="#cb285-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb285-11"><a href="#cb285-11" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb285-12"><a href="#cb285-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb285-13"><a href="#cb285-13" aria-hidden="true"></a></span> -<span id="cb285-14"><a href="#cb285-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{smartEllipses}</span> -<span id="cb285-15"><a href="#cb285-15" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb285-16"><a href="#cb285-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb285-17"><a href="#cb285-17" aria-hidden="true"></a></span> -<span id="cb285-18"><a href="#cb285-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="cb286"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb286-1"><a href="#cb286-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb290"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb290-1"><a href="#cb290-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb290-2"><a href="#cb290-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb290-3"><a href="#cb290-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb290-4"><a href="#cb290-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb290-5"><a href="#cb290-5" aria-hidden="true"></a> ellipsis = {. . .}</span> +<span id="cb290-6"><a href="#cb290-6" aria-hidden="true"></a> }</span> +<span id="cb290-7"><a href="#cb290-7" aria-hidden="true"></a>}</span> +<span id="cb290-8"><a href="#cb290-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb290-9"><a href="#cb290-9" aria-hidden="true"></a></span> +<span id="cb290-10"><a href="#cb290-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb290-11"><a href="#cb290-11" aria-hidden="true"></a>These are just three regular dots ...</span> +<span id="cb290-12"><a href="#cb290-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb290-13"><a href="#cb290-13" aria-hidden="true"></a></span> +<span id="cb290-14"><a href="#cb290-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{smartEllipses}</span> +<span id="cb290-15"><a href="#cb290-15" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> +<span id="cb290-16"><a href="#cb290-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb290-17"><a href="#cb290-17" aria-hidden="true"></a></span> +<span id="cb290-18"><a href="#cb290-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="cb291"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb291-1"><a href="#cb291-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <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> @@ -3279,28 +3385,28 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-21">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb287"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb287-1"><a href="#cb287-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb287-2"><a href="#cb287-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb287-3"><a href="#cb287-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb287-4"><a href="#cb287-4" aria-hidden="true"></a></span> -<span id="cb287-5"><a href="#cb287-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb287-6"><a href="#cb287-6" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb287-7"><a href="#cb287-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb287-8"><a href="#cb287-8" aria-hidden="true"></a></span> -<span id="cb287-9"><a href="#cb287-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb287-10"><a href="#cb287-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb287-11"><a href="#cb287-11" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb287-12"><a href="#cb287-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb287-13"><a href="#cb287-13" aria-hidden="true"></a></span> -<span id="cb287-14"><a href="#cb287-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb292"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb292-1"><a href="#cb292-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb292-2"><a href="#cb292-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> +<span id="cb292-3"><a href="#cb292-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb292-4"><a href="#cb292-4" aria-hidden="true"></a></span> +<span id="cb292-5"><a href="#cb292-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb292-6"><a href="#cb292-6" aria-hidden="true"></a>These are just three regular dots ...</span> +<span id="cb292-7"><a href="#cb292-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb292-8"><a href="#cb292-8" aria-hidden="true"></a></span> +<span id="cb292-9"><a href="#cb292-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> +<span id="cb292-10"><a href="#cb292-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb292-11"><a href="#cb292-11" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> +<span id="cb292-12"><a href="#cb292-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb292-13"><a href="#cb292-13" aria-hidden="true"></a></span> +<span id="cb292-14"><a href="#cb292-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="cb288"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb288-1"><a href="#cb288-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb293"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb293-1"><a href="#cb293-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <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.31" id="option-startnumber"><span class="header-section-number">2.2.1.31</span> Option <code>startNumber</code></h4> +<h4 data-number="2.2.1.32" id="option-startnumber"><span class="header-section-number">2.2.1.32</span> Option <code>startNumber</code></h4> <dl> <dt><code>startNumber</code> (default value: <code>true</code>)</dt> <dd><dl> @@ -3316,32 +3422,32 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-26"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-27"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb289"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb289-1"><a href="#cb289-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb289-2"><a href="#cb289-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb289-3"><a href="#cb289-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</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="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb289-6"><a href="#cb289-6" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb289-7"><a href="#cb289-7" aria-hidden="true"></a></span> -<span id="cb289-8"><a href="#cb289-8" aria-hidden="true"></a>3. third item</span> -<span id="cb289-9"><a href="#cb289-9" aria-hidden="true"></a>4. fourth item</span> -<span id="cb289-10"><a href="#cb289-10" aria-hidden="true"></a>5. fifth item</span> -<span id="cb289-11"><a href="#cb289-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb289-12"><a href="#cb289-12" aria-hidden="true"></a></span> -<span id="cb289-13"><a href="#cb289-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{startNumber=false}</span> -<span id="cb289-14"><a href="#cb289-14" aria-hidden="true"></a>The following list does not respect the numbers specified in the</span> -<span id="cb289-15"><a href="#cb289-15" aria-hidden="true"></a>markup:</span> -<span id="cb289-16"><a href="#cb289-16" aria-hidden="true"></a></span> -<span id="cb289-17"><a href="#cb289-17" aria-hidden="true"></a>3. third item</span> -<span id="cb289-18"><a href="#cb289-18" aria-hidden="true"></a>4. fourth item</span> -<span id="cb289-19"><a href="#cb289-19" aria-hidden="true"></a>5. fifth item</span> -<span id="cb289-20"><a href="#cb289-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb289-21"><a href="#cb289-21" aria-hidden="true"></a></span> -<span id="cb289-22"><a href="#cb289-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="cb290"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb290-1"><a href="#cb290-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb294"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb294-1"><a href="#cb294-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb294-2"><a href="#cb294-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb294-3"><a href="#cb294-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb294-4"><a href="#cb294-4" aria-hidden="true"></a></span> +<span id="cb294-5"><a href="#cb294-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb294-6"><a href="#cb294-6" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> +<span id="cb294-7"><a href="#cb294-7" aria-hidden="true"></a></span> +<span id="cb294-8"><a href="#cb294-8" aria-hidden="true"></a>3. third item</span> +<span id="cb294-9"><a href="#cb294-9" aria-hidden="true"></a>4. fourth item</span> +<span id="cb294-10"><a href="#cb294-10" aria-hidden="true"></a>5. fifth item</span> +<span id="cb294-11"><a href="#cb294-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb294-12"><a href="#cb294-12" aria-hidden="true"></a></span> +<span id="cb294-13"><a href="#cb294-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{startNumber=false}</span> +<span id="cb294-14"><a href="#cb294-14" aria-hidden="true"></a>The following list does not respect the numbers specified in the</span> +<span id="cb294-15"><a href="#cb294-15" aria-hidden="true"></a>markup:</span> +<span id="cb294-16"><a href="#cb294-16" aria-hidden="true"></a></span> +<span id="cb294-17"><a href="#cb294-17" aria-hidden="true"></a>3. third item</span> +<span id="cb294-18"><a href="#cb294-18" aria-hidden="true"></a>4. fourth item</span> +<span id="cb294-19"><a href="#cb294-19" aria-hidden="true"></a>5. fifth item</span> +<span id="cb294-20"><a href="#cb294-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb294-21"><a href="#cb294-21" aria-hidden="true"></a></span> +<span id="cb294-22"><a href="#cb294-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="cb295"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb295-1"><a href="#cb295-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The following list respects the numbers specified in the markup:</p> @@ -3359,28 +3465,28 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-22">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb291"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb291-1"><a href="#cb291-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb291-2"><a href="#cb291-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb291-3"><a href="#cb291-3" aria-hidden="true"></a></span> -<span id="cb291-4"><a href="#cb291-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb291-5"><a href="#cb291-5" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb291-6"><a href="#cb291-6" aria-hidden="true"></a></span> -<span id="cb291-7"><a href="#cb291-7" aria-hidden="true"></a>3. third item</span> -<span id="cb291-8"><a href="#cb291-8" aria-hidden="true"></a>4. fourth item</span> -<span id="cb291-9"><a href="#cb291-9" aria-hidden="true"></a>5. fifth item</span> -<span id="cb291-10"><a href="#cb291-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb291-11"><a href="#cb291-11" aria-hidden="true"></a></span> -<span id="cb291-12"><a href="#cb291-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{false}</span> -<span id="cb291-13"><a href="#cb291-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb291-14"><a href="#cb291-14" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb291-15"><a href="#cb291-15" aria-hidden="true"></a></span> -<span id="cb291-16"><a href="#cb291-16" aria-hidden="true"></a>3. third item</span> -<span id="cb291-17"><a href="#cb291-17" aria-hidden="true"></a>4. fourth item</span> -<span id="cb291-18"><a href="#cb291-18" aria-hidden="true"></a>5. fifth item</span> -<span id="cb291-19"><a href="#cb291-19" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb291-20"><a href="#cb291-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="cb292"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb292-1"><a href="#cb292-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<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">\usemodule</span>[t][markdown]</span> +<span id="cb296-2"><a href="#cb296-2" aria-hidden="true"></a><span class="fu">\starttext</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">\startmarkdown</span></span> +<span id="cb296-5"><a href="#cb296-5" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> +<span id="cb296-6"><a href="#cb296-6" aria-hidden="true"></a></span> +<span id="cb296-7"><a href="#cb296-7" aria-hidden="true"></a>3. third item</span> +<span id="cb296-8"><a href="#cb296-8" aria-hidden="true"></a>4. fourth item</span> +<span id="cb296-9"><a href="#cb296-9" aria-hidden="true"></a>5. fifth item</span> +<span id="cb296-10"><a href="#cb296-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb296-11"><a href="#cb296-11" aria-hidden="true"></a></span> +<span id="cb296-12"><a href="#cb296-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{false}</span> +<span id="cb296-13"><a href="#cb296-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb296-14"><a href="#cb296-14" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> +<span id="cb296-15"><a href="#cb296-15" aria-hidden="true"></a></span> +<span id="cb296-16"><a href="#cb296-16" aria-hidden="true"></a>3. third item</span> +<span id="cb296-17"><a href="#cb296-17" aria-hidden="true"></a>4. fourth item</span> +<span id="cb296-18"><a href="#cb296-18" aria-hidden="true"></a>5. fifth item</span> +<span id="cb296-19"><a href="#cb296-19" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb296-20"><a href="#cb296-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="cb297"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb297-1"><a href="#cb297-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The following list respects the numbers specified in the markup:</p> @@ -3396,19 +3502,19 @@ Thomas,Edison,1847</code></pre> <li>fifth item</li> </ol> </blockquote> -<h4 data-number="2.2.1.32" id="option-stripindent"><span class="header-section-number">2.2.1.32</span> Option <code>stripIndent</code></h4> +<h4 data-number="2.2.1.33" id="option-stripindent"><span class="header-section-number">2.2.1.33</span> Option <code>stripIndent</code></h4> <dl> <dt><code>stripIndent</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Strip the minimal indentation of non-blank lines from all lines in a markdown document. Requires that the <strong><code>preserveTabs</code></strong> Lua option is :</p> -<div class="sourceCode" id="cb293"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb293-1"><a href="#cb293-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb293-2"><a href="#cb293-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> -<span id="cb293-3"><a href="#cb293-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb293-4"><a href="#cb293-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb293-5"><a href="#cb293-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb293-6"><a href="#cb293-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb293-7"><a href="#cb293-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<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>[stripIndent]{<span class="ex">markdown</span>}</span> +<span id="cb298-3"><a href="#cb298-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb298-4"><a href="#cb298-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb298-5"><a href="#cb298-5" aria-hidden="true"></a> Hello *world*!</span> +<span id="cb298-6"><a href="#cb298-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb298-7"><a href="#cb298-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> </dd> </dl> </dd> @@ -3421,52 +3527,52 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-14">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb294"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb294-1"><a href="#cb294-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb294-2"><a href="#cb294-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> -<span id="cb294-3"><a href="#cb294-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb294-4"><a href="#cb294-4" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb294-5"><a href="#cb294-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb294-6"><a href="#cb294-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb299"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb299-1"><a href="#cb299-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb299-2"><a href="#cb299-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> +<span id="cb299-3"><a href="#cb299-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb299-4"><a href="#cb299-4" aria-hidden="true"></a> Hello *world*!</span> +<span id="cb299-5"><a href="#cb299-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb299-6"><a href="#cb299-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="cb295"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb295-1"><a href="#cb295-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb300"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb300-1"><a href="#cb300-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-27"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-28"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb296"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb296-1"><a href="#cb296-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb296-2"><a href="#cb296-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> -<span id="cb296-3"><a href="#cb296-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb296-4"><a href="#cb296-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb296-5"><a href="#cb296-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb296-6"><a href="#cb296-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb296-7"><a href="#cb296-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb301"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb301-1"><a href="#cb301-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb301-2"><a href="#cb301-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> +<span id="cb301-3"><a href="#cb301-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb301-4"><a href="#cb301-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb301-5"><a href="#cb301-5" aria-hidden="true"></a> Hello *world*!</span> +<span id="cb301-6"><a href="#cb301-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb301-7"><a href="#cb301-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="cb297"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb297-1"><a href="#cb297-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb302"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb302-1"><a href="#cb302-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> <h5 class="unnumbered" data-number="" id="context-example-23">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb298"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb298-1"><a href="#cb298-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb298-2"><a href="#cb298-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> -<span id="cb298-3"><a href="#cb298-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb298-4"><a href="#cb298-4" aria-hidden="true"></a> <span class="fu">\startmarkdown</span></span> -<span id="cb298-5"><a href="#cb298-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb298-6"><a href="#cb298-6" aria-hidden="true"></a> <span class="fu">\stopmarkdown</span></span> -<span id="cb298-7"><a href="#cb298-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb303"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb303-1"><a href="#cb303-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb303-2"><a href="#cb303-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> +<span id="cb303-3"><a href="#cb303-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb303-4"><a href="#cb303-4" aria-hidden="true"></a> <span class="fu">\startmarkdown</span></span> +<span id="cb303-5"><a href="#cb303-5" aria-hidden="true"></a> Hello *world*!</span> +<span id="cb303-6"><a href="#cb303-6" aria-hidden="true"></a> <span class="fu">\stopmarkdown</span></span> +<span id="cb303-7"><a href="#cb303-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="cb299"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb299-1"><a href="#cb299-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb304"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb304-1"><a href="#cb304-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> -<h4 data-number="2.2.1.33" id="option-tablecaptions"><span class="header-section-number">2.2.1.33</span> Option <code>tableCaptions</code></h4> +<h4 data-number="2.2.1.34" id="option-tablecaptions"><span class="header-section-number">2.2.1.34</span> Option <code>tableCaptions</code></h4> <dl> <dt><code>tableCaptions</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the Pandoc <code>table_captions</code> syntax extension for <a href="#pipe-tables">pipe tables</a>.</p> -<div class="sourceCode" id="cb300"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb300-1"><a href="#cb300-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb300-2"><a href="#cb300-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb300-3"><a href="#cb300-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb300-4"><a href="#cb300-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb300-5"><a href="#cb300-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb300-6"><a href="#cb300-6" aria-hidden="true"></a></span> -<span id="cb300-7"><a href="#cb300-7" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span></code></pre></div> +<div class="sourceCode" id="cb305"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb305-1"><a href="#cb305-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb305-2"><a href="#cb305-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb305-3"><a href="#cb305-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb305-4"><a href="#cb305-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb305-5"><a href="#cb305-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb305-6"><a href="#cb305-6" aria-hidden="true"></a></span> +<span id="cb305-7"><a href="#cb305-7" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span></code></pre></div> </dd> </dl> </dd> @@ -3477,23 +3583,23 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-28"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-29"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb301"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb301-1"><a href="#cb301-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb301-2"><a href="#cb301-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> -<span id="cb301-3"><a href="#cb301-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb301-4"><a href="#cb301-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb301-5"><a href="#cb301-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb301-6"><a href="#cb301-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb301-7"><a href="#cb301-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb301-8"><a href="#cb301-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb301-9"><a href="#cb301-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb301-10"><a href="#cb301-10" aria-hidden="true"></a></span> -<span id="cb301-11"><a href="#cb301-11" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> -<span id="cb301-12"><a href="#cb301-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb301-13"><a href="#cb301-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb306"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb306-1"><a href="#cb306-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb306-2"><a href="#cb306-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> +<span id="cb306-3"><a href="#cb306-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb306-4"><a href="#cb306-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb306-5"><a href="#cb306-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb306-6"><a href="#cb306-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb306-7"><a href="#cb306-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb306-8"><a href="#cb306-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb306-9"><a href="#cb306-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb306-10"><a href="#cb306-10" aria-hidden="true"></a></span> +<span id="cb306-11"><a href="#cb306-11" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> +<span id="cb306-12"><a href="#cb306-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb306-13"><a href="#cb306-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="cb302"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb302-1"><a href="#cb302-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb307"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb307-1"><a href="#cb307-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -3530,22 +3636,22 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-24">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb303"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb303-1"><a href="#cb303-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb303-2"><a href="#cb303-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionPipeTables</span>{true}</span> -<span id="cb303-3"><a href="#cb303-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTableCaptions</span>{true}</span> -<span id="cb303-4"><a href="#cb303-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb303-5"><a href="#cb303-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb303-6"><a href="#cb303-6" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb303-7"><a href="#cb303-7" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb303-8"><a href="#cb303-8" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb303-9"><a href="#cb303-9" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb303-10"><a href="#cb303-10" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb303-11"><a href="#cb303-11" aria-hidden="true"></a></span> -<span id="cb303-12"><a href="#cb303-12" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> -<span id="cb303-13"><a href="#cb303-13" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb303-14"><a href="#cb303-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb308"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb308-1"><a href="#cb308-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb308-2"><a href="#cb308-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionPipeTables</span>{true}</span> +<span id="cb308-3"><a href="#cb308-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTableCaptions</span>{true}</span> +<span id="cb308-4"><a href="#cb308-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb308-5"><a href="#cb308-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb308-6"><a href="#cb308-6" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb308-7"><a href="#cb308-7" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb308-8"><a href="#cb308-8" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb308-9"><a href="#cb308-9" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb308-10"><a href="#cb308-10" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb308-11"><a href="#cb308-11" aria-hidden="true"></a></span> +<span id="cb308-12"><a href="#cb308-12" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> +<span id="cb308-13"><a href="#cb308-13" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb308-14"><a href="#cb308-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="cb304"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb304-1"><a href="#cb304-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb309"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb309-1"><a href="#cb309-1" aria-hidden="true"></a><span class="ex">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> @@ -3580,15 +3686,15 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </blockquote> -<h4 data-number="2.2.1.34" id="option-tasklists"><span class="header-section-number">2.2.1.34</span> Option <code>taskLists</code></h4> +<h4 data-number="2.2.1.35" id="option-tasklists"><span class="header-section-number">2.2.1.35</span> Option <code>taskLists</code></h4> <dl> <dt><code>taskLists</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the Pandoc <code>task_lists</code> syntax extension.</p> -<div class="sourceCode" id="cb305"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb305-1"><a href="#cb305-1" aria-hidden="true"></a><span class="ss">- </span><span class="va">[ ]</span> an unticked task list item</span> -<span id="cb305-2"><a href="#cb305-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="cb305-3"><a href="#cb305-3" aria-hidden="true"></a><span class="ss">- </span><span class="co">[</span><span class="ot">X</span><span class="co">]</span> a ticked task list item</span></code></pre></div> +<div class="sourceCode" id="cb310"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb310-1"><a href="#cb310-1" aria-hidden="true"></a><span class="ss">- </span><span class="va">[ ]</span> an unticked task list item</span> +<span id="cb310-2"><a href="#cb310-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="cb310-3"><a href="#cb310-3" aria-hidden="true"></a><span class="ss">- </span><span class="co">[</span><span class="ot">X</span><span class="co">]</span> a ticked task list item</span></code></pre></div> </dd> </dl> </dd> @@ -3599,26 +3705,26 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-29"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-30"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb306"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb306-1"><a href="#cb306-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb306-2"><a href="#cb306-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span> -<span id="cb306-3"><a href="#cb306-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb306-4"><a href="#cb306-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb306-5"><a href="#cb306-5" aria-hidden="true"></a> untickedBox = No,</span> -<span id="cb306-6"><a href="#cb306-6" aria-hidden="true"></a> halfTickedBox = Maybe,</span> -<span id="cb306-7"><a href="#cb306-7" aria-hidden="true"></a> tickedBox = Yes,</span> -<span id="cb306-8"><a href="#cb306-8" aria-hidden="true"></a> },</span> -<span id="cb306-9"><a href="#cb306-9" aria-hidden="true"></a>}</span> -<span id="cb306-10"><a href="#cb306-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb306-11"><a href="#cb306-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb306-12"><a href="#cb306-12" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb306-13"><a href="#cb306-13" aria-hidden="true"></a>- [/] I can?</span> -<span id="cb306-14"><a href="#cb306-14" aria-hidden="true"></a>- [X] I can!</span> -<span id="cb306-15"><a href="#cb306-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb306-16"><a href="#cb306-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="cb307"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb307-1"><a href="#cb307-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb311"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb311-1"><a href="#cb311-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb311-2"><a href="#cb311-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span> +<span id="cb311-3"><a href="#cb311-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb311-4"><a href="#cb311-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb311-5"><a href="#cb311-5" aria-hidden="true"></a> untickedBox = No,</span> +<span id="cb311-6"><a href="#cb311-6" aria-hidden="true"></a> halfTickedBox = Maybe,</span> +<span id="cb311-7"><a href="#cb311-7" aria-hidden="true"></a> tickedBox = Yes,</span> +<span id="cb311-8"><a href="#cb311-8" aria-hidden="true"></a> },</span> +<span id="cb311-9"><a href="#cb311-9" aria-hidden="true"></a>}</span> +<span id="cb311-10"><a href="#cb311-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb311-11"><a href="#cb311-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb311-12"><a href="#cb311-12" aria-hidden="true"></a>- [ ] you can't.</span> +<span id="cb311-13"><a href="#cb311-13" aria-hidden="true"></a>- [/] I can?</span> +<span id="cb311-14"><a href="#cb311-14" aria-hidden="true"></a>- [X] I can!</span> +<span id="cb311-15"><a href="#cb311-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb311-16"><a href="#cb311-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="cb312"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb312-1"><a href="#cb312-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <ul> @@ -3629,20 +3735,20 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-25">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb308"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb308-1"><a href="#cb308-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb308-2"><a href="#cb308-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span> -<span id="cb308-3"><a href="#cb308-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> -<span id="cb308-4"><a href="#cb308-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHalftickedBox</span>{Maybe}</span> -<span id="cb308-5"><a href="#cb308-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> -<span id="cb308-6"><a href="#cb308-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb308-7"><a href="#cb308-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb308-8"><a href="#cb308-8" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb308-9"><a href="#cb308-9" aria-hidden="true"></a>- [/] I can?</span> -<span id="cb308-10"><a href="#cb308-10" aria-hidden="true"></a>- [X] I can!</span> -<span id="cb308-11"><a href="#cb308-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb308-12"><a href="#cb308-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb313"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb313-1"><a href="#cb313-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb313-2"><a href="#cb313-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span> +<span id="cb313-3"><a href="#cb313-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> +<span id="cb313-4"><a href="#cb313-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHalftickedBox</span>{Maybe}</span> +<span id="cb313-5"><a href="#cb313-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> +<span id="cb313-6"><a href="#cb313-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb313-7"><a href="#cb313-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb313-8"><a href="#cb313-8" aria-hidden="true"></a>- [ ] you can't.</span> +<span id="cb313-9"><a href="#cb313-9" aria-hidden="true"></a>- [/] I can?</span> +<span id="cb313-10"><a href="#cb313-10" aria-hidden="true"></a>- [X] I can!</span> +<span id="cb313-11"><a href="#cb313-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb313-12"><a href="#cb313-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="cb309"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb309-1"><a href="#cb309-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb314"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb314-1"><a href="#cb314-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <ul> @@ -3651,20 +3757,20 @@ Thomas,Edison,1847</code></pre> <li>Yes I can!</li> </ul> </blockquote> -<h4 data-number="2.2.1.35" id="option-texcomments"><span class="header-section-number">2.2.1.35</span> Option <code>texComments</code></h4> +<h4 data-number="2.2.1.36" id="option-texcomments"><span class="header-section-number">2.2.1.36</span> Option <code>texComments</code></h4> <dl> <dt><code>texComments</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Strip <span class="tex">T<sub>e</sub>X</span>-style comments.</p> -<div class="sourceCode" id="cb310"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb310-1"><a href="#cb310-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb310-2"><a href="#cb310-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> -<span id="cb310-3"><a href="#cb310-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb310-4"><a href="#cb310-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb310-5"><a href="#cb310-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb310-6"><a href="#cb310-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb310-7"><a href="#cb310-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb310-8"><a href="#cb310-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb315"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb315-1"><a href="#cb315-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb315-2"><a href="#cb315-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> +<span id="cb315-3"><a href="#cb315-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb315-4"><a href="#cb315-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb315-5"><a href="#cb315-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb315-6"><a href="#cb315-6" aria-hidden="true"></a> lo *world*!</span> +<span id="cb315-7"><a href="#cb315-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb315-8"><a href="#cb315-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Always enabled when <strong><code>hybrid</code></strong> is enabled.</p> </dd> </dl> @@ -3678,91 +3784,100 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-15">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb311"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb311-1"><a href="#cb311-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb311-2"><a href="#cb311-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTeXComments</span>{true}</span> -<span id="cb311-3"><a href="#cb311-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb311-4"><a href="#cb311-4" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb311-5"><a href="#cb311-5" aria-hidden="true"></a> lo *world*!</span> -<span id="cb311-6"><a href="#cb311-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb311-7"><a href="#cb311-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<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="fu">\input</span> markdown</span> +<span id="cb316-2"><a href="#cb316-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTexComments</span>{true}</span> +<span id="cb316-3"><a href="#cb316-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb316-4"><a href="#cb316-4" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb316-5"><a href="#cb316-5" aria-hidden="true"></a> lo *world*!</span> +<span id="cb316-6"><a href="#cb316-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb316-7"><a href="#cb316-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="cb312"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb312-1"><a href="#cb312-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<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">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-30"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-31"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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>[texComments]{<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>Hel<span class="co">% this is a comment</span></span> -<span id="cb313-6"><a href="#cb313-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb313-7"><a href="#cb313-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb313-8"><a href="#cb313-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<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="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb318-2"><a href="#cb318-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> +<span id="cb318-3"><a href="#cb318-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb318-4"><a href="#cb318-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb318-5"><a href="#cb318-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb318-6"><a href="#cb318-6" aria-hidden="true"></a> lo *world*!</span> +<span id="cb318-7"><a href="#cb318-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb318-8"><a href="#cb318-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="cb314"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb314-1"><a href="#cb314-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb319"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb319-1"><a href="#cb319-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> <h5 class="unnumbered" data-number="" id="context-example-26">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb315"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb315-1"><a href="#cb315-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb315-2"><a href="#cb315-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTeXComments</span>{true}</span> -<span id="cb315-3"><a href="#cb315-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb315-4"><a href="#cb315-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb315-5"><a href="#cb315-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb315-6"><a href="#cb315-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb315-7"><a href="#cb315-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb315-8"><a href="#cb315-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb320"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb320-1"><a href="#cb320-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb320-2"><a href="#cb320-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTexComments</span>{true}</span> +<span id="cb320-3"><a href="#cb320-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb320-4"><a href="#cb320-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb320-5"><a href="#cb320-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> +<span id="cb320-6"><a href="#cb320-6" aria-hidden="true"></a> lo *world*!</span> +<span id="cb320-7"><a href="#cb320-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb320-8"><a href="#cb320-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="cb316"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb316-1"><a href="#cb316-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb321"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb321-1"><a href="#cb321-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.36" id="option-tightlists"><span class="header-section-number">2.2.1.36</span> Option <code>tightLists</code></h4> +<h4 data-number="2.2.1.37" id="option-tightlists"><span class="header-section-number">2.2.1.37</span> Option <code>tightLists</code></h4> <dl> <dt><code>tightLists</code> (default value: <code>true</code>)</dt> <dd><dl> <dt>true</dt> -<dd><p>Lists whose bullets do not consist of multiple paragraphs will be passed to the , , , , , and <span class="tex">T<sub>e</sub>X</span> macros.</p> +<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="cb322"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb322-1"><a href="#cb322-1" aria-hidden="true"></a><span class="ss">- </span>This is</span> +<span id="cb322-2"><a href="#cb322-2" aria-hidden="true"></a><span class="ss">- </span>a tight</span> +<span id="cb322-3"><a href="#cb322-3" aria-hidden="true"></a><span class="ss">- </span>unordered list.</span> +<span id="cb322-4"><a href="#cb322-4" aria-hidden="true"></a></span> +<span id="cb322-5"><a href="#cb322-5" aria-hidden="true"></a><span class="ss">- </span>This is</span> +<span id="cb322-6"><a href="#cb322-6" aria-hidden="true"></a></span> +<span id="cb322-7"><a href="#cb322-7" aria-hidden="true"></a> not a tight</span> +<span id="cb322-8"><a href="#cb322-8" aria-hidden="true"></a></span> +<span id="cb322-9"><a href="#cb322-9" aria-hidden="true"></a><span class="ss">- </span>unordered list.</span></code></pre></div> </dd> </dl> </dd> <dd><dl> <dt>false</dt> -<dd><p>Lists whose bullets do not consist of multiple paragraphs will be treated the same way as lists that do 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-31"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-32"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb317"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb317-1"><a href="#cb317-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb317-2"><a href="#cb317-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb317-3"><a href="#cb317-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb317-4"><a href="#cb317-4" aria-hidden="true"></a></span> -<span id="cb317-5"><a href="#cb317-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb317-6"><a href="#cb317-6" aria-hidden="true"></a>The following list is tight:</span> -<span id="cb317-7"><a href="#cb317-7" aria-hidden="true"></a></span> -<span id="cb317-8"><a href="#cb317-8" aria-hidden="true"></a> - first item</span> -<span id="cb317-9"><a href="#cb317-9" aria-hidden="true"></a> - second item</span> -<span id="cb317-10"><a href="#cb317-10" aria-hidden="true"></a> - third item</span> -<span id="cb317-11"><a href="#cb317-11" aria-hidden="true"></a></span> -<span id="cb317-12"><a href="#cb317-12" aria-hidden="true"></a>The following list is loose:</span> -<span id="cb317-13"><a href="#cb317-13" aria-hidden="true"></a></span> -<span id="cb317-14"><a href="#cb317-14" aria-hidden="true"></a> - first item</span> -<span id="cb317-15"><a href="#cb317-15" aria-hidden="true"></a> - second item that spans</span> -<span id="cb317-16"><a href="#cb317-16" aria-hidden="true"></a></span> -<span id="cb317-17"><a href="#cb317-17" aria-hidden="true"></a> multiple paragraphs</span> -<span id="cb317-18"><a href="#cb317-18" aria-hidden="true"></a> - third item</span> -<span id="cb317-19"><a href="#cb317-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb317-20"><a href="#cb317-20" aria-hidden="true"></a></span> -<span id="cb317-21"><a href="#cb317-21" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{tightLists=false}</span> -<span id="cb317-22"><a href="#cb317-22" aria-hidden="true"></a>The following list is now also loose:</span> -<span id="cb317-23"><a href="#cb317-23" aria-hidden="true"></a></span> -<span id="cb317-24"><a href="#cb317-24" aria-hidden="true"></a> - first item</span> -<span id="cb317-25"><a href="#cb317-25" aria-hidden="true"></a> - second item</span> -<span id="cb317-26"><a href="#cb317-26" aria-hidden="true"></a> - third item</span> -<span id="cb317-27"><a href="#cb317-27" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb317-28"><a href="#cb317-28" aria-hidden="true"></a></span> -<span id="cb317-29"><a href="#cb317-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="cb318"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb318-1"><a href="#cb318-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<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="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb323-2"><a href="#cb323-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb323-3"><a href="#cb323-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb323-4"><a href="#cb323-4" aria-hidden="true"></a></span> +<span id="cb323-5"><a href="#cb323-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb323-6"><a href="#cb323-6" aria-hidden="true"></a>The following list is tight:</span> +<span id="cb323-7"><a href="#cb323-7" aria-hidden="true"></a></span> +<span id="cb323-8"><a href="#cb323-8" aria-hidden="true"></a> - first item</span> +<span id="cb323-9"><a href="#cb323-9" aria-hidden="true"></a> - second item</span> +<span id="cb323-10"><a href="#cb323-10" aria-hidden="true"></a> - third item</span> +<span id="cb323-11"><a href="#cb323-11" aria-hidden="true"></a></span> +<span id="cb323-12"><a href="#cb323-12" aria-hidden="true"></a>The following list is loose:</span> +<span id="cb323-13"><a href="#cb323-13" aria-hidden="true"></a></span> +<span id="cb323-14"><a href="#cb323-14" aria-hidden="true"></a> - first item</span> +<span id="cb323-15"><a href="#cb323-15" aria-hidden="true"></a> - second item that spans</span> +<span id="cb323-16"><a href="#cb323-16" aria-hidden="true"></a></span> +<span id="cb323-17"><a href="#cb323-17" aria-hidden="true"></a> multiple paragraphs</span> +<span id="cb323-18"><a href="#cb323-18" aria-hidden="true"></a> - third item</span> +<span id="cb323-19"><a href="#cb323-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb323-20"><a href="#cb323-20" aria-hidden="true"></a></span> +<span id="cb323-21"><a href="#cb323-21" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{tightLists=false}</span> +<span id="cb323-22"><a href="#cb323-22" aria-hidden="true"></a>The following list is now also loose:</span> +<span id="cb323-23"><a href="#cb323-23" aria-hidden="true"></a></span> +<span id="cb323-24"><a href="#cb323-24" aria-hidden="true"></a> - first item</span> +<span id="cb323-25"><a href="#cb323-25" aria-hidden="true"></a> - second item</span> +<span id="cb323-26"><a href="#cb323-26" aria-hidden="true"></a> - third item</span> +<span id="cb323-27"><a href="#cb323-27" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb323-28"><a href="#cb323-28" aria-hidden="true"></a></span> +<span id="cb323-29"><a href="#cb323-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="cb324"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb324-1"><a href="#cb324-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The following list is tight:</p> @@ -3785,16 +3900,16 @@ Thomas,Edison,1847</code></pre> <li><p>third item</p></li> </ul> </blockquote> -<h4 data-number="2.2.1.37" id="option-underscores"><span class="header-section-number">2.2.1.37</span> Option <code>underscores</code></h4> +<h4 data-number="2.2.1.38" id="option-underscores"><span class="header-section-number">2.2.1.38</span> Option <code>underscores</code></h4> <dl> <dt><code>underscores</code> (default value: <code>true</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Both underscores and asterisks can be used to denote emphasis and strong emphasis:</p> -<div class="sourceCode" id="cb319"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb319-1"><a href="#cb319-1" aria-hidden="true"></a>*single asterisks*</span> -<span id="cb319-2"><a href="#cb319-2" aria-hidden="true"></a>_single underscores_</span> -<span id="cb319-3"><a href="#cb319-3" aria-hidden="true"></a>**double asterisks**</span> -<span id="cb319-4"><a href="#cb319-4" aria-hidden="true"></a>__double underscores__</span></code></pre></div> +<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>*single asterisks*</span> +<span id="cb325-2"><a href="#cb325-2" aria-hidden="true"></a>_single underscores_</span> +<span id="cb325-3"><a href="#cb325-3" aria-hidden="true"></a>**double asterisks**</span> +<span id="cb325-4"><a href="#cb325-4" aria-hidden="true"></a>__double underscores__</span></code></pre></div> </dd> </dl> </dd> @@ -3807,43 +3922,43 @@ Thomas,Edison,1847</code></pre> </dl> <h5 class="unnumbered" data-number="" id="plain-tex-example-16">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb320"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb320-1"><a href="#cb320-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb320-2"><a href="#cb320-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb320-3"><a href="#cb320-3" aria-hidden="true"></a></span> -<span id="cb320-4"><a href="#cb320-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb320-5"><a href="#cb320-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="cb320-6"><a href="#cb320-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb320-7"><a href="#cb320-7" aria-hidden="true"></a></span> -<span id="cb320-8"><a href="#cb320-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> -<span id="cb320-9"><a href="#cb320-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb320-10"><a href="#cb320-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb320-11"><a href="#cb320-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb320-12"><a href="#cb320-12" aria-hidden="true"></a></span> -<span id="cb320-13"><a href="#cb320-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<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="fu">\input</span> markdown</span> +<span id="cb326-2"><a href="#cb326-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb326-3"><a href="#cb326-3" aria-hidden="true"></a></span> +<span id="cb326-4"><a href="#cb326-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb326-5"><a href="#cb326-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="cb326-6"><a href="#cb326-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb326-7"><a href="#cb326-7" aria-hidden="true"></a></span> +<span id="cb326-8"><a href="#cb326-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> +<span id="cb326-9"><a href="#cb326-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb326-10"><a href="#cb326-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> +<span id="cb326-11"><a href="#cb326-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb326-12"><a href="#cb326-12" aria-hidden="true"></a></span> +<span id="cb326-13"><a href="#cb326-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="cb321"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb321-1"><a href="#cb321-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<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">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-32"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-33"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb322"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb322-1"><a href="#cb322-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb322-2"><a href="#cb322-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[hybrid]{<span class="ex">markdown</span>}</span> -<span id="cb322-3"><a href="#cb322-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb322-4"><a href="#cb322-4" aria-hidden="true"></a></span> -<span id="cb322-5"><a href="#cb322-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb322-6"><a href="#cb322-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="cb322-7"><a href="#cb322-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb322-8"><a href="#cb322-8" aria-hidden="true"></a></span> -<span id="cb322-9"><a href="#cb322-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{underscores=false}</span> -<span id="cb322-10"><a href="#cb322-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb322-11"><a href="#cb322-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb322-12"><a href="#cb322-12" aria-hidden="true"></a></span> -<span id="cb322-13"><a href="#cb322-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<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="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb328-2"><a href="#cb328-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[hybrid]{<span class="ex">markdown</span>}</span> +<span id="cb328-3"><a href="#cb328-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb328-4"><a href="#cb328-4" aria-hidden="true"></a></span> +<span id="cb328-5"><a href="#cb328-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb328-6"><a href="#cb328-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="cb328-7"><a href="#cb328-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb328-8"><a href="#cb328-8" aria-hidden="true"></a></span> +<span id="cb328-9"><a href="#cb328-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{underscores=false}</span> +<span id="cb328-10"><a href="#cb328-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> +<span id="cb328-11"><a href="#cb328-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb328-12"><a href="#cb328-12" aria-hidden="true"></a></span> +<span id="cb328-13"><a href="#cb328-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="cb323"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb323-1"><a href="#cb323-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb329"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb329-1"><a href="#cb329-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> @@ -3851,22 +3966,22 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-27">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb324"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb324-1"><a href="#cb324-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb324-2"><a href="#cb324-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb324-3"><a href="#cb324-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb324-4"><a href="#cb324-4" aria-hidden="true"></a></span> -<span id="cb324-5"><a href="#cb324-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb324-6"><a href="#cb324-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="cb324-7"><a href="#cb324-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb324-8"><a href="#cb324-8" aria-hidden="true"></a></span> -<span id="cb324-9"><a href="#cb324-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> -<span id="cb324-10"><a href="#cb324-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb324-11"><a href="#cb324-11" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb324-12"><a href="#cb324-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb324-13"><a href="#cb324-13" aria-hidden="true"></a></span> -<span id="cb324-14"><a href="#cb324-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb330"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb330-1"><a href="#cb330-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb330-2"><a href="#cb330-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb330-3"><a href="#cb330-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb330-4"><a href="#cb330-4" aria-hidden="true"></a></span> +<span id="cb330-5"><a href="#cb330-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb330-6"><a href="#cb330-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="cb330-7"><a href="#cb330-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb330-8"><a href="#cb330-8" aria-hidden="true"></a></span> +<span id="cb330-9"><a href="#cb330-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> +<span id="cb330-10"><a href="#cb330-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb330-11"><a href="#cb330-11" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> +<span id="cb330-12"><a href="#cb330-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb330-13"><a href="#cb330-13" aria-hidden="true"></a></span> +<span id="cb330-14"><a href="#cb330-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="cb325"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb325-1"><a href="#cb325-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb331"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb331-1"><a href="#cb331-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> @@ -3876,7 +3991,7 @@ Thomas,Edison,1847</code></pre> <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="cb326"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb326-1"><a href="#cb326-1" aria-hidden="true"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span></code></pre></div> +<div class="sourceCode" id="cb332"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb332-1"><a href="#cb332-1" aria-hidden="true"></a><span class="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> @@ -3901,68 +4016,68 @@ Thomas,Edison,1847</code></pre> </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="cb327"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb327-1"><a href="#cb327-1" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb327-2"><a href="#cb327-2" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb327-3"><a href="#cb327-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionHelperScriptFileName</span>{helper-script.lua}</span> -<span id="cb327-4"><a href="#cb327-4" aria-hidden="true"></a><span class="fu">\def\markdownOptionInputTempFileName</span>{temporary-input.md}</span> -<span id="cb327-5"><a href="#cb327-5" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputTempFileName</span>{temporary-output.tex}</span> -<span id="cb327-6"><a href="#cb327-6" aria-hidden="true"></a><span class="fu">\def\markdownOptionErrorTempFileName</span>{error-output.txt}</span> -<span id="cb327-7"><a href="#cb327-7" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputDir</span>{output-directory}</span> -<span id="cb327-8"><a href="#cb327-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionCacheDir</span>{output-directory/cache-directory}</span> -<span id="cb327-9"><a href="#cb327-9" aria-hidden="true"></a><span class="fu">\markdownOptionFinalizeCachetrue</span></span> -<span id="cb327-10"><a href="#cb327-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{output-directory/cache-directory/frozen-cache.tex}</span> -<span id="cb327-11"><a href="#cb327-11" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb327-12"><a href="#cb327-12" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb327-13"><a href="#cb327-13" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb327-14"><a href="#cb327-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="cb328"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb328-1"><a href="#cb328-1" aria-hidden="true"></a><span class="ex">luatex</span> --output-directory output-directory document.tex</span></code></pre></div> +<div class="sourceCode" id="cb333"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb333-1"><a href="#cb333-1" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb333-2"><a href="#cb333-2" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb333-3"><a href="#cb333-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionHelperScriptFileName</span>{helper-script.lua}</span> +<span id="cb333-4"><a href="#cb333-4" aria-hidden="true"></a><span class="fu">\def\markdownOptionInputTempFileName</span>{temporary-input.md}</span> +<span id="cb333-5"><a href="#cb333-5" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputTempFileName</span>{temporary-output.tex}</span> +<span id="cb333-6"><a href="#cb333-6" aria-hidden="true"></a><span class="fu">\def\markdownOptionErrorTempFileName</span>{error-output.txt}</span> +<span id="cb333-7"><a href="#cb333-7" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputDir</span>{output-directory}</span> +<span id="cb333-8"><a href="#cb333-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionCacheDir</span>{output-directory/cache-directory}</span> +<span id="cb333-9"><a href="#cb333-9" aria-hidden="true"></a><span class="fu">\markdownOptionFinalizeCachetrue</span></span> +<span id="cb333-10"><a href="#cb333-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{output-directory/cache-directory/frozen-cache.tex}</span> +<span id="cb333-11"><a href="#cb333-11" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb333-12"><a href="#cb333-12" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb333-13"><a href="#cb333-13" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb333-14"><a href="#cb333-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="cb334"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb334-1"><a href="#cb334-1" aria-hidden="true"></a><span class="ex">luatex</span> --output-directory output-directory document.tex</span></code></pre></div> <p>A text document named <code>temporary-input.md</code> should be produced in the folder named <code>output-directory</code> and contain the following text:</p> <blockquote> <p>Hello *world*!</p> </blockquote> <p>A folder named <code>output-directory/cache-directory</code> should also be produced and contain fragments of the converted markdown document. LuaTeX does not need other temporary files to perform the conversion from markdown to <span class="tex">T<sub>e</sub>X</span>. To produce the remaining temporary files, invoke pdfTeX from the terminal:</p> -<div class="sourceCode" id="cb329"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb329-1"><a href="#cb329-1" aria-hidden="true"></a><span class="ex">pdftex</span> --output-directory output-directory --shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb335"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb335-1"><a href="#cb335-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>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="cb330"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb330-1"><a href="#cb330-1" aria-hidden="true"></a><span class="co">% \iffalse</span></span> -<span id="cb330-2"><a href="#cb330-2" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">ltxdoc</span>}</span> -<span id="cb330-3"><a href="#cb330-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripPercentSigns]{<span class="ex">markdown</span>}</span> -<span id="cb330-4"><a href="#cb330-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb330-5"><a href="#cb330-5" aria-hidden="true"></a><span class="fu">\DocInput</span>{document.dtx}</span> -<span id="cb330-6"><a href="#cb330-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span> -<span id="cb330-7"><a href="#cb330-7" aria-hidden="true"></a><span class="co">% \fi</span></span> -<span id="cb330-8"><a href="#cb330-8" aria-hidden="true"></a><span class="co">%</span></span> -<span id="cb330-9"><a href="#cb330-9" aria-hidden="true"></a><span class="co">% \begin{markdown}</span></span> -<span id="cb330-10"><a href="#cb330-10" aria-hidden="true"></a><span class="co">% Hello *world*!</span></span> -<span id="cb330-11"><a href="#cb330-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="cb331"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb331-1"><a href="#cb331-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.dtx</span></code></pre></div> +<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="co">% \iffalse</span></span> +<span id="cb336-2"><a href="#cb336-2" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">ltxdoc</span>}</span> +<span id="cb336-3"><a href="#cb336-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripPercentSigns]{<span class="ex">markdown</span>}</span> +<span id="cb336-4"><a href="#cb336-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb336-5"><a href="#cb336-5" aria-hidden="true"></a><span class="fu">\DocInput</span>{document.dtx}</span> +<span id="cb336-6"><a href="#cb336-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span> +<span id="cb336-7"><a href="#cb336-7" aria-hidden="true"></a><span class="co">% \fi</span></span> +<span id="cb336-8"><a href="#cb336-8" aria-hidden="true"></a><span class="co">%</span></span> +<span id="cb336-9"><a href="#cb336-9" aria-hidden="true"></a><span class="co">% \begin{markdown}</span></span> +<span id="cb336-10"><a href="#cb336-10" aria-hidden="true"></a><span class="co">% Hello *world*!</span></span> +<span id="cb336-11"><a href="#cb336-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="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.dtx</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!”</p> <h3 data-number="2.2.3" id="latex-1"><span class="header-section-number">2.2.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> <p><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> options allow us to disable the redefinition of the default renderer prototypes from plain <span class="tex">T<sub>e</sub>X</span>, load user-contributed themes, and invoke user-defined setup snippets.</p> <h4 data-number="2.2.3.1" id="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="cb332"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb332-1"><a href="#cb332-1" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb332-2"><a href="#cb332-2" aria-hidden="true"></a> taskLists = true,</span> -<span id="cb332-3"><a href="#cb332-3" aria-hidden="true"></a>}</span></code></pre></div> +<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">\markdownSetup</span>{</span> +<span id="cb338-2"><a href="#cb338-2" aria-hidden="true"></a> taskLists = true,</span> +<span id="cb338-3"><a href="#cb338-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="cb333"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb333-1"><a href="#cb333-1" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb333-2"><a href="#cb333-2" aria-hidden="true"></a> helperScriptFileName = helper-script.lua,</span> -<span id="cb333-3"><a href="#cb333-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb339"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb339-1"><a href="#cb339-1" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb339-2"><a href="#cb339-2" aria-hidden="true"></a> helperScriptFileName = helper-script.lua,</span> +<span id="cb339-3"><a href="#cb339-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:</p> -<div class="sourceCode" id="cb334"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb334-1"><a href="#cb334-1" aria-hidden="true"></a><span class="bu">\usepackage</span>[plain]{<span class="ex">markdown</span>}</span></code></pre></div> +<div class="sourceCode" id="cb340"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb340-1"><a href="#cb340-1" aria-hidden="true"></a><span class="bu">\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-contributed <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes for the Markdown package provide a domain-specific interpretation of some Markdown tokens. Similarly to <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> packages, themes allow the authors to achieve a specific look and other high-level goals without low-level programming.</p> <p>For example, to load themes named <code>witiko/beamer/MU</code> and <code>witiko/dot</code>, you would use the following code in the preamble of your document:</p> -<div class="sourceCode" id="cb335"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb335-1"><a href="#cb335-1" aria-hidden="true"></a><span class="bu">\usepackage</span>[</span> -<span id="cb335-2"><a href="#cb335-2" aria-hidden="true"></a> theme = witiko/beamer/MU,</span> -<span id="cb335-3"><a href="#cb335-3" aria-hidden="true"></a> theme = witiko/dot,</span> -<span id="cb335-4"><a href="#cb335-4" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span></code></pre></div> +<div class="sourceCode" id="cb341"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb341-1"><a href="#cb341-1" aria-hidden="true"></a><span class="bu">\usepackage</span>[</span> +<span id="cb341-2"><a href="#cb341-2" aria-hidden="true"></a> theme = witiko/beamer/MU,</span> +<span id="cb341-3"><a href="#cb341-3" aria-hidden="true"></a> theme = witiko/dot,</span> +<span id="cb341-4"><a href="#cb341-4" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span></code></pre></div> <p>Due to limitations of <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>, themes may not be loaded after the beginning of a <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> document.</p> <p>Example themes provided with the Markdown package include:</p> <dl> @@ -3970,44 +4085,44 @@ Thomas,Edison,1847</code></pre> <dd><p>A theme that typesets fenced code blocks with the <code>dot …</code> infostring as images of directed graphs rendered by the Graphviz tools. The right tail of the infostring is used as the image title. The theme requires a Unix-like operating system with GNU Diffutils and Graphviz installed. The theme also requires shell access unless the plain <span class="tex">T<sub>e</sub>X</span> option is enabled.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-33"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-34"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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>[theme=witiko/dot]{<span class="ex">markdown</span>}</span> -<span id="cb336-3"><a href="#cb336-3" aria-hidden="true"></a><span class="fu">\setkeys</span>{Gin}{</span> -<span id="cb336-4"><a href="#cb336-4" aria-hidden="true"></a> width=<span class="fu">\columnwidth</span>,</span> -<span id="cb336-5"><a href="#cb336-5" aria-hidden="true"></a> height=0.65<span class="fu">\paperheight</span>,</span> -<span id="cb336-6"><a href="#cb336-6" aria-hidden="true"></a> keepaspectratio}</span> -<span id="cb336-7"><a href="#cb336-7" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb336-8"><a href="#cb336-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb336-9"><a href="#cb336-9" aria-hidden="true"></a>``` dot Various formats of mathemathical formulae</span> -<span id="cb336-10"><a href="#cb336-10" aria-hidden="true"></a>digraph tree {</span> -<span id="cb336-11"><a href="#cb336-11" aria-hidden="true"></a> margin = 0;</span> -<span id="cb336-12"><a href="#cb336-12" aria-hidden="true"></a> rankdir = "LR";</span> -<span id="cb336-13"><a href="#cb336-13" aria-hidden="true"></a></span> -<span id="cb336-14"><a href="#cb336-14" aria-hidden="true"></a> latex -> pmml;</span> -<span id="cb336-15"><a href="#cb336-15" aria-hidden="true"></a> latex -> cmml;</span> -<span id="cb336-16"><a href="#cb336-16" aria-hidden="true"></a> pmml -> slt;</span> -<span id="cb336-17"><a href="#cb336-17" aria-hidden="true"></a> cmml -> opt;</span> -<span id="cb336-18"><a href="#cb336-18" aria-hidden="true"></a> cmml -> prefix;</span> -<span id="cb336-19"><a href="#cb336-19" aria-hidden="true"></a> cmml -> infix;</span> -<span id="cb336-20"><a href="#cb336-20" aria-hidden="true"></a> pmml -> mterms [style=dashed];</span> -<span id="cb336-21"><a href="#cb336-21" aria-hidden="true"></a> cmml -> mterms;</span> -<span id="cb336-22"><a href="#cb336-22" aria-hidden="true"></a></span> -<span id="cb336-23"><a href="#cb336-23" aria-hidden="true"></a> latex [label = "LaTeX"];</span> -<span id="cb336-24"><a href="#cb336-24" aria-hidden="true"></a> pmml [label = "Presentation MathML"];</span> -<span id="cb336-25"><a href="#cb336-25" aria-hidden="true"></a> cmml [label = "Content MathML"];</span> -<span id="cb336-26"><a href="#cb336-26" aria-hidden="true"></a> slt [label = "Symbol Layout Tree"];</span> -<span id="cb336-27"><a href="#cb336-27" aria-hidden="true"></a> opt [label = "Operator Tree"];</span> -<span id="cb336-28"><a href="#cb336-28" aria-hidden="true"></a> prefix [label = "Prefix"];</span> -<span id="cb336-29"><a href="#cb336-29" aria-hidden="true"></a> infix [label = "Infix"];</span> -<span id="cb336-30"><a href="#cb336-30" aria-hidden="true"></a> mterms [label = "M-Terms"];</span> -<span id="cb336-31"><a href="#cb336-31" aria-hidden="true"></a>}</span> -<span id="cb336-32"><a href="#cb336-32" aria-hidden="true"></a>```</span> -<span id="cb336-33"><a href="#cb336-33" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb336-34"><a href="#cb336-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="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> +<div class="sourceCode" id="cb342"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb342-1"><a href="#cb342-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb342-2"><a href="#cb342-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/dot]{<span class="ex">markdown</span>}</span> +<span id="cb342-3"><a href="#cb342-3" aria-hidden="true"></a><span class="fu">\setkeys</span>{Gin}{</span> +<span id="cb342-4"><a href="#cb342-4" aria-hidden="true"></a> width=<span class="fu">\columnwidth</span>,</span> +<span id="cb342-5"><a href="#cb342-5" aria-hidden="true"></a> height=0.65<span class="fu">\paperheight</span>,</span> +<span id="cb342-6"><a href="#cb342-6" aria-hidden="true"></a> keepaspectratio}</span> +<span id="cb342-7"><a href="#cb342-7" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb342-8"><a href="#cb342-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb342-9"><a href="#cb342-9" aria-hidden="true"></a>``` dot Various formats of mathemathical formulae</span> +<span id="cb342-10"><a href="#cb342-10" aria-hidden="true"></a>digraph tree {</span> +<span id="cb342-11"><a href="#cb342-11" aria-hidden="true"></a> margin = 0;</span> +<span id="cb342-12"><a href="#cb342-12" aria-hidden="true"></a> rankdir = "LR";</span> +<span id="cb342-13"><a href="#cb342-13" aria-hidden="true"></a></span> +<span id="cb342-14"><a href="#cb342-14" aria-hidden="true"></a> latex -> pmml;</span> +<span id="cb342-15"><a href="#cb342-15" aria-hidden="true"></a> latex -> cmml;</span> +<span id="cb342-16"><a href="#cb342-16" aria-hidden="true"></a> pmml -> slt;</span> +<span id="cb342-17"><a href="#cb342-17" aria-hidden="true"></a> cmml -> opt;</span> +<span id="cb342-18"><a href="#cb342-18" aria-hidden="true"></a> cmml -> prefix;</span> +<span id="cb342-19"><a href="#cb342-19" aria-hidden="true"></a> cmml -> infix;</span> +<span id="cb342-20"><a href="#cb342-20" aria-hidden="true"></a> pmml -> mterms [style=dashed];</span> +<span id="cb342-21"><a href="#cb342-21" aria-hidden="true"></a> cmml -> mterms;</span> +<span id="cb342-22"><a href="#cb342-22" aria-hidden="true"></a></span> +<span id="cb342-23"><a href="#cb342-23" aria-hidden="true"></a> latex [label = "LaTeX"];</span> +<span id="cb342-24"><a href="#cb342-24" aria-hidden="true"></a> pmml [label = "Presentation MathML"];</span> +<span id="cb342-25"><a href="#cb342-25" aria-hidden="true"></a> cmml [label = "Content MathML"];</span> +<span id="cb342-26"><a href="#cb342-26" aria-hidden="true"></a> slt [label = "Symbol Layout Tree"];</span> +<span id="cb342-27"><a href="#cb342-27" aria-hidden="true"></a> opt [label = "Operator Tree"];</span> +<span id="cb342-28"><a href="#cb342-28" aria-hidden="true"></a> prefix [label = "Prefix"];</span> +<span id="cb342-29"><a href="#cb342-29" aria-hidden="true"></a> infix [label = "Infix"];</span> +<span id="cb342-30"><a href="#cb342-30" aria-hidden="true"></a> mterms [label = "M-Terms"];</span> +<span id="cb342-31"><a href="#cb342-31" aria-hidden="true"></a>}</span> +<span id="cb342-32"><a href="#cb342-32" aria-hidden="true"></a>```</span> +<span id="cb342-33"><a href="#cb342-33" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb342-34"><a href="#cb342-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="cb343"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb343-1"><a href="#cb343-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> @@ -4017,18 +4132,18 @@ Thomas,Edison,1847</code></pre> <dd><p>A theme that adds support for downloading images whose URL has the http or https protocol. The theme requires the <strong><code>catchfile</code></strong> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> package and a Unix-like operating system with GNU Coreutils <code>md5sum</code> and either GNU Wget or cURL installed. The theme also requires shell access unless the plain <span class="tex">T<sub>e</sub>X</span> option is enabled.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-34"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-35"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb338"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb338-1"><a href="#cb338-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb338-2"><a href="#cb338-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/graphicx/http]{<span class="ex">markdown</span>}</span> -<span id="cb338-3"><a href="#cb338-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb338-4"><a href="#cb338-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb338-5"><a href="#cb338-5" aria-hidden="true"></a>![img](https://github.com/witiko/markdown/raw/main/markdown.png</span> -<span id="cb338-6"><a href="#cb338-6" aria-hidden="true"></a> "The banner of the Markdown package")</span> -<span id="cb338-7"><a href="#cb338-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb338-8"><a href="#cb338-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb344"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb344-1"><a href="#cb344-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb344-2"><a href="#cb344-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/graphicx/http]{<span class="ex">markdown</span>}</span> +<span id="cb344-3"><a href="#cb344-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb344-4"><a href="#cb344-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb344-5"><a href="#cb344-5" aria-hidden="true"></a>![img](https://github.com/witiko/markdown/raw/main/markdown.png</span> +<span id="cb344-6"><a href="#cb344-6" aria-hidden="true"></a> "The banner of the Markdown package")</span> +<span id="cb344-7"><a href="#cb344-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb344-8"><a href="#cb344-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="cb339"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb339-1"><a href="#cb339-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb345"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb345-1"><a href="#cb345-1" aria-hidden="true"></a><span class="ex">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> @@ -4040,17 +4155,17 @@ Thomas,Edison,1847</code></pre> <dd><p>A theme that makes tilde (<code>~</code>) always typeset the non-breaking space even when the <strong><code>hybrid</code></strong> Lua option is <code>false</code>.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-35"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-36"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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>[theme=witiko/tilde]{<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>Bartel~Leendert van~der~Waerden</span> -<span id="cb340-6"><a href="#cb340-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb340-7"><a href="#cb340-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb346"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb346-1"><a href="#cb346-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb346-2"><a href="#cb346-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/tilde]{<span class="ex">markdown</span>}</span> +<span id="cb346-3"><a href="#cb346-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb346-4"><a href="#cb346-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb346-5"><a href="#cb346-5" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb346-6"><a href="#cb346-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb346-7"><a href="#cb346-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="cb341"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb341-1"><a href="#cb341-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb347"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb347-1"><a href="#cb347-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, where the middot (<code>·</code>) denotes a non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> @@ -4058,53 +4173,53 @@ Thomas,Edison,1847</code></pre> <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-contributed <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes provide global control over high-level goals. However, it is often desirable to change only some local aspects of a document. <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> setup snippets provide syntactic sugar for defining and invoking various options locally.</p> <p>Here is how we can use setup snippets to store options and invoke them later:</p> -<div class="sourceCode" id="cb342"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb342-1"><a href="#cb342-1" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</span> -<span id="cb342-2"><a href="#cb342-2" aria-hidden="true"></a> renderers = {</span> -<span id="cb342-3"><a href="#cb342-3" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb342-4"><a href="#cb342-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="cb342-5"><a href="#cb342-5" aria-hidden="true"></a> },</span> -<span id="cb342-6"><a href="#cb342-6" aria-hidden="true"></a> },</span> -<span id="cb342-7"><a href="#cb342-7" aria-hidden="true"></a>}</span> -<span id="cb342-8"><a href="#cb342-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb342-9"><a href="#cb342-9" aria-hidden="true"></a></span> -<span id="cb342-10"><a href="#cb342-10" aria-hidden="true"></a>The following ordered list will be preceded by arabic numerals:</span> -<span id="cb342-11"><a href="#cb342-11" aria-hidden="true"></a></span> -<span id="cb342-12"><a href="#cb342-12" aria-hidden="true"></a>1. wahid</span> -<span id="cb342-13"><a href="#cb342-13" aria-hidden="true"></a>2. aithnayn</span> -<span id="cb342-14"><a href="#cb342-14" aria-hidden="true"></a></span> -<span id="cb342-15"><a href="#cb342-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb342-16"><a href="#cb342-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{snippet=romanNumerals}</span> -<span id="cb342-17"><a href="#cb342-17" aria-hidden="true"></a></span> -<span id="cb342-18"><a href="#cb342-18" aria-hidden="true"></a>The following ordered list will be preceded by roman numerals:</span> -<span id="cb342-19"><a href="#cb342-19" aria-hidden="true"></a></span> -<span id="cb342-20"><a href="#cb342-20" aria-hidden="true"></a>3. tres</span> -<span id="cb342-21"><a href="#cb342-21" aria-hidden="true"></a>4. quattuor</span> -<span id="cb342-22"><a href="#cb342-22" aria-hidden="true"></a></span> -<span id="cb342-23"><a href="#cb342-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span></code></pre></div> +<div class="sourceCode" id="cb348"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb348-1"><a href="#cb348-1" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</span> +<span id="cb348-2"><a href="#cb348-2" aria-hidden="true"></a> renderers = {</span> +<span id="cb348-3"><a href="#cb348-3" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> +<span id="cb348-4"><a href="#cb348-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="cb348-5"><a href="#cb348-5" aria-hidden="true"></a> },</span> +<span id="cb348-6"><a href="#cb348-6" aria-hidden="true"></a> },</span> +<span id="cb348-7"><a href="#cb348-7" aria-hidden="true"></a>}</span> +<span id="cb348-8"><a href="#cb348-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb348-9"><a href="#cb348-9" aria-hidden="true"></a></span> +<span id="cb348-10"><a href="#cb348-10" aria-hidden="true"></a>The following ordered list will be preceded by arabic numerals:</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>1. wahid</span> +<span id="cb348-13"><a href="#cb348-13" aria-hidden="true"></a>2. aithnayn</span> +<span id="cb348-14"><a href="#cb348-14" aria-hidden="true"></a></span> +<span id="cb348-15"><a href="#cb348-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb348-16"><a href="#cb348-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{snippet=romanNumerals}</span> +<span id="cb348-17"><a href="#cb348-17" aria-hidden="true"></a></span> +<span id="cb348-18"><a href="#cb348-18" aria-hidden="true"></a>The following ordered list will be preceded by roman numerals:</span> +<span id="cb348-19"><a href="#cb348-19" aria-hidden="true"></a></span> +<span id="cb348-20"><a href="#cb348-20" aria-hidden="true"></a>3. tres</span> +<span id="cb348-21"><a href="#cb348-21" aria-hidden="true"></a>4. quattuor</span> +<span id="cb348-22"><a href="#cb348-22" aria-hidden="true"></a></span> +<span id="cb348-23"><a href="#cb348-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-36"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-37"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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>[taskLists]{<span class="ex">markdown</span>}</span> -<span id="cb343-3"><a href="#cb343-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb343-4"><a href="#cb343-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb343-5"><a href="#cb343-5" aria-hidden="true"></a> untickedBox = No,</span> -<span id="cb343-6"><a href="#cb343-6" aria-hidden="true"></a> tickedBox = Yes,</span> -<span id="cb343-7"><a href="#cb343-7" aria-hidden="true"></a> },</span> -<span id="cb343-8"><a href="#cb343-8" aria-hidden="true"></a>}</span> -<span id="cb343-9"><a href="#cb343-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb343-10"><a href="#cb343-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb343-11"><a href="#cb343-11" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb343-12"><a href="#cb343-12" aria-hidden="true"></a>- [x] I can!</span> -<span id="cb343-13"><a href="#cb343-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb343-14"><a href="#cb343-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb349"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb349-1"><a href="#cb349-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb349-2"><a href="#cb349-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[taskLists]{<span class="ex">markdown</span>}</span> +<span id="cb349-3"><a href="#cb349-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb349-4"><a href="#cb349-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb349-5"><a href="#cb349-5" aria-hidden="true"></a> untickedBox = No,</span> +<span id="cb349-6"><a href="#cb349-6" aria-hidden="true"></a> tickedBox = Yes,</span> +<span id="cb349-7"><a href="#cb349-7" aria-hidden="true"></a> },</span> +<span id="cb349-8"><a href="#cb349-8" aria-hidden="true"></a>}</span> +<span id="cb349-9"><a href="#cb349-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb349-10"><a href="#cb349-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb349-11"><a href="#cb349-11" aria-hidden="true"></a>- [ ] you can't.</span> +<span id="cb349-12"><a href="#cb349-12" aria-hidden="true"></a>- [x] I can!</span> +<span id="cb349-13"><a href="#cb349-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb349-14"><a href="#cb349-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="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> +<div class="sourceCode" id="cb350"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb350-1"><a href="#cb350-1" aria-hidden="true"></a><span class="ex">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> @@ -4114,18 +4229,18 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-28">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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">\def\markdownOptionTaskLists</span>{true}</span> -<span id="cb345-3"><a href="#cb345-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> -<span id="cb345-4"><a href="#cb345-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> -<span id="cb345-5"><a href="#cb345-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb345-6"><a href="#cb345-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb345-7"><a href="#cb345-7" aria-hidden="true"></a>- [ ] you can't.</span> -<span id="cb345-8"><a href="#cb345-8" aria-hidden="true"></a>- [x] I can!</span> -<span id="cb345-9"><a href="#cb345-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb345-10"><a href="#cb345-10" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<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">\usemodule</span>[t][markdown]</span> +<span id="cb351-2"><a href="#cb351-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTaskLists</span>{true}</span> +<span id="cb351-3"><a href="#cb351-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererUntickedBox</span>{No}</span> +<span id="cb351-4"><a href="#cb351-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererTickedBox</span>{Yes}</span> +<span id="cb351-5"><a href="#cb351-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb351-6"><a href="#cb351-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb351-7"><a href="#cb351-7" aria-hidden="true"></a>- [ ] you can't.</span> +<span id="cb351-8"><a href="#cb351-8" aria-hidden="true"></a>- [x] I can!</span> +<span id="cb351-9"><a href="#cb351-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb351-10"><a href="#cb351-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="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> +<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">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> @@ -4136,75 +4251,75 @@ Thomas,Edison,1847</code></pre> <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-37"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-38"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>nested.md</code> with the following content:</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>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="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>[contentBlocks]{<span class="ex">markdown</span>}</span> -<span id="cb348-3"><a href="#cb348-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb348-4"><a href="#cb348-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb348-5"><a href="#cb348-5" aria-hidden="true"></a> contentBlock = {<span class="co">%</span></span> -<span id="cb348-6"><a href="#cb348-6" aria-hidden="true"></a> <span class="fu">\markdownInput</span>{#3}<span class="co">%</span></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> documentBegin = {<span class="co">%</span></span> -<span id="cb348-9"><a href="#cb348-9" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb348-10"><a href="#cb348-10" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a document)}</span> -<span id="cb348-11"><a href="#cb348-11" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb348-12"><a href="#cb348-12" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb348-13"><a href="#cb348-13" aria-hidden="true"></a> <span class="fu">\markdownSetup</span>{snippet=first-nesting-level}<span class="co">%</span></span> -<span id="cb348-14"><a href="#cb348-14" aria-hidden="true"></a> },</span> -<span id="cb348-15"><a href="#cb348-15" aria-hidden="true"></a> documentEnd = {<span class="co">%</span></span> -<span id="cb348-16"><a href="#cb348-16" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> -<span id="cb348-17"><a href="#cb348-17" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb348-18"><a href="#cb348-18" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a document)}</span> -<span id="cb348-19"><a href="#cb348-19" aria-hidden="true"></a> <span class="fu">\par</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> -<span id="cb348-22"><a href="#cb348-22" aria-hidden="true"></a>}</span> -<span id="cb348-23"><a href="#cb348-23" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{first-nesting-level}{</span> -<span id="cb348-24"><a href="#cb348-24" aria-hidden="true"></a> renderers = {</span> -<span id="cb348-25"><a href="#cb348-25" aria-hidden="true"></a> documentBegin = {</span> -<span id="cb348-26"><a href="#cb348-26" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb348-27"><a href="#cb348-27" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span> -<span id="cb348-28"><a href="#cb348-28" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb348-29"><a href="#cb348-29" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb348-30"><a href="#cb348-30" aria-hidden="true"></a> <span class="fu">\markdownSetup</span>{snippet=second-nesting-level-and-below}</span> -<span id="cb348-31"><a href="#cb348-31" aria-hidden="true"></a> },</span> -<span id="cb348-32"><a href="#cb348-32" aria-hidden="true"></a> },</span> -<span id="cb348-33"><a href="#cb348-33" aria-hidden="true"></a>}</span> -<span id="cb348-34"><a href="#cb348-34" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{second-nesting-level-and-below}{</span> -<span id="cb348-35"><a href="#cb348-35" aria-hidden="true"></a> renderers = {</span> -<span id="cb348-36"><a href="#cb348-36" aria-hidden="true"></a> documentBegin = {</span> -<span id="cb348-37"><a href="#cb348-37" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb348-38"><a href="#cb348-38" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span> -<span id="cb348-39"><a href="#cb348-39" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb348-40"><a href="#cb348-40" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb348-41"><a href="#cb348-41" aria-hidden="true"></a> },</span> -<span id="cb348-42"><a href="#cb348-42" aria-hidden="true"></a> documentEnd = {</span> -<span id="cb348-43"><a href="#cb348-43" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> -<span id="cb348-44"><a href="#cb348-44" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb348-45"><a href="#cb348-45" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a nested document)}</span> -<span id="cb348-46"><a href="#cb348-46" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb348-47"><a href="#cb348-47" aria-hidden="true"></a> },</span> -<span id="cb348-48"><a href="#cb348-48" aria-hidden="true"></a> },</span> -<span id="cb348-49"><a href="#cb348-49" aria-hidden="true"></a>}</span> -<span id="cb348-50"><a href="#cb348-50" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb348-51"><a href="#cb348-51" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb348-52"><a href="#cb348-52" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb348-53"><a href="#cb348-53" aria-hidden="true"></a></span> -<span id="cb348-54"><a href="#cb348-54" aria-hidden="true"></a>/nested.md</span> -<span id="cb348-55"><a href="#cb348-55" aria-hidden="true"></a></span> -<span id="cb348-56"><a href="#cb348-56" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb348-57"><a href="#cb348-57" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb348-58"><a href="#cb348-58" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb348-59"><a href="#cb348-59" aria-hidden="true"></a></span> -<span id="cb348-60"><a href="#cb348-60" aria-hidden="true"></a>Bar baz!</span> -<span id="cb348-61"><a href="#cb348-61" aria-hidden="true"></a></span> -<span id="cb348-62"><a href="#cb348-62" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb348-63"><a href="#cb348-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="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> +<div class="sourceCode" id="cb353"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb353-1"><a href="#cb353-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="cb354"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb354-1"><a href="#cb354-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb354-2"><a href="#cb354-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> +<span id="cb354-3"><a href="#cb354-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb354-4"><a href="#cb354-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb354-5"><a href="#cb354-5" aria-hidden="true"></a> contentBlock = {<span class="co">%</span></span> +<span id="cb354-6"><a href="#cb354-6" aria-hidden="true"></a> <span class="fu">\markdownInput</span>{#3}<span class="co">%</span></span> +<span id="cb354-7"><a href="#cb354-7" aria-hidden="true"></a> },</span> +<span id="cb354-8"><a href="#cb354-8" aria-hidden="true"></a> documentBegin = {<span class="co">%</span></span> +<span id="cb354-9"><a href="#cb354-9" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-10"><a href="#cb354-10" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a document)}</span> +<span id="cb354-11"><a href="#cb354-11" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-12"><a href="#cb354-12" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> +<span id="cb354-13"><a href="#cb354-13" aria-hidden="true"></a> <span class="fu">\markdownSetup</span>{snippet=first-nesting-level}<span class="co">%</span></span> +<span id="cb354-14"><a href="#cb354-14" aria-hidden="true"></a> },</span> +<span id="cb354-15"><a href="#cb354-15" aria-hidden="true"></a> documentEnd = {<span class="co">%</span></span> +<span id="cb354-16"><a href="#cb354-16" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> +<span id="cb354-17"><a href="#cb354-17" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-18"><a href="#cb354-18" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a document)}</span> +<span id="cb354-19"><a href="#cb354-19" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-20"><a href="#cb354-20" aria-hidden="true"></a> },</span> +<span id="cb354-21"><a href="#cb354-21" aria-hidden="true"></a> },</span> +<span id="cb354-22"><a href="#cb354-22" aria-hidden="true"></a>}</span> +<span id="cb354-23"><a href="#cb354-23" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{first-nesting-level}{</span> +<span id="cb354-24"><a href="#cb354-24" aria-hidden="true"></a> renderers = {</span> +<span id="cb354-25"><a href="#cb354-25" aria-hidden="true"></a> documentBegin = {</span> +<span id="cb354-26"><a href="#cb354-26" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-27"><a href="#cb354-27" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span> +<span id="cb354-28"><a href="#cb354-28" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-29"><a href="#cb354-29" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> +<span id="cb354-30"><a href="#cb354-30" aria-hidden="true"></a> <span class="fu">\markdownSetup</span>{snippet=second-nesting-level-and-below}</span> +<span id="cb354-31"><a href="#cb354-31" aria-hidden="true"></a> },</span> +<span id="cb354-32"><a href="#cb354-32" aria-hidden="true"></a> },</span> +<span id="cb354-33"><a href="#cb354-33" aria-hidden="true"></a>}</span> +<span id="cb354-34"><a href="#cb354-34" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{second-nesting-level-and-below}{</span> +<span id="cb354-35"><a href="#cb354-35" aria-hidden="true"></a> renderers = {</span> +<span id="cb354-36"><a href="#cb354-36" aria-hidden="true"></a> documentBegin = {</span> +<span id="cb354-37"><a href="#cb354-37" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-38"><a href="#cb354-38" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a nested document)}</span> +<span id="cb354-39"><a href="#cb354-39" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-40"><a href="#cb354-40" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> +<span id="cb354-41"><a href="#cb354-41" aria-hidden="true"></a> },</span> +<span id="cb354-42"><a href="#cb354-42" aria-hidden="true"></a> documentEnd = {</span> +<span id="cb354-43"><a href="#cb354-43" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> +<span id="cb354-44"><a href="#cb354-44" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-45"><a href="#cb354-45" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a nested document)}</span> +<span id="cb354-46"><a href="#cb354-46" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb354-47"><a href="#cb354-47" aria-hidden="true"></a> },</span> +<span id="cb354-48"><a href="#cb354-48" aria-hidden="true"></a> },</span> +<span id="cb354-49"><a href="#cb354-49" aria-hidden="true"></a>}</span> +<span id="cb354-50"><a href="#cb354-50" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb354-51"><a href="#cb354-51" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb354-52"><a href="#cb354-52" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb354-53"><a href="#cb354-53" aria-hidden="true"></a></span> +<span id="cb354-54"><a href="#cb354-54" aria-hidden="true"></a>/nested.md</span> +<span id="cb354-55"><a href="#cb354-55" aria-hidden="true"></a></span> +<span id="cb354-56"><a href="#cb354-56" aria-hidden="true"></a>_Foo_ bar!</span> +<span id="cb354-57"><a href="#cb354-57" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb354-58"><a href="#cb354-58" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb354-59"><a href="#cb354-59" aria-hidden="true"></a></span> +<span id="cb354-60"><a href="#cb354-60" aria-hidden="true"></a>Bar baz!</span> +<span id="cb354-61"><a href="#cb354-61" aria-hidden="true"></a></span> +<span id="cb354-62"><a href="#cb354-62" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb354-63"><a href="#cb354-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="cb355"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb355-1"><a href="#cb355-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><em>(The beginning of a document)</em></p> @@ -4222,48 +4337,48 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererInterblockSeparator</code> macro represents a separator between two markdown block elements. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-17">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb350"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb350-1"><a href="#cb350-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb350-2"><a href="#cb350-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb350-3"><a href="#cb350-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb350-4"><a href="#cb350-4" aria-hidden="true"></a> {<span class="fu">\it</span>(The end of a block)}<span class="co">%</span></span> -<span id="cb350-5"><a href="#cb350-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb350-6"><a href="#cb350-6" aria-hidden="true"></a>}</span> -<span id="cb350-7"><a href="#cb350-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb350-8"><a href="#cb350-8" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb350-9"><a href="#cb350-9" aria-hidden="true"></a></span> -<span id="cb350-10"><a href="#cb350-10" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb350-11"><a href="#cb350-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb350-12"><a href="#cb350-12" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb356"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb356-1"><a href="#cb356-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb356-2"><a href="#cb356-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb356-3"><a href="#cb356-3" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb356-4"><a href="#cb356-4" aria-hidden="true"></a> {<span class="fu">\it</span>(The end of a block)}<span class="co">%</span></span> +<span id="cb356-5"><a href="#cb356-5" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb356-6"><a href="#cb356-6" aria-hidden="true"></a>}</span> +<span id="cb356-7"><a href="#cb356-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb356-8"><a href="#cb356-8" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb356-9"><a href="#cb356-9" aria-hidden="true"></a></span> +<span id="cb356-10"><a href="#cb356-10" aria-hidden="true"></a>_Foo_ bar!</span> +<span id="cb356-11"><a href="#cb356-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb356-12"><a href="#cb356-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="cb351"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb351-1"><a href="#cb351-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb357"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb357-1"><a href="#cb357-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>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-38"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-39"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb352"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb352-1"><a href="#cb352-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb352-2"><a href="#cb352-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb352-3"><a href="#cb352-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb352-4"><a href="#cb352-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb352-5"><a href="#cb352-5" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb352-6"><a href="#cb352-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb352-7"><a href="#cb352-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> -<span id="cb352-8"><a href="#cb352-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb352-9"><a href="#cb352-9" aria-hidden="true"></a> },</span> -<span id="cb352-10"><a href="#cb352-10" aria-hidden="true"></a> },</span> -<span id="cb352-11"><a href="#cb352-11" aria-hidden="true"></a>}</span> -<span id="cb352-12"><a href="#cb352-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb352-13"><a href="#cb352-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb352-14"><a href="#cb352-14" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb352-15"><a href="#cb352-15" aria-hidden="true"></a></span> -<span id="cb352-16"><a href="#cb352-16" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb352-17"><a href="#cb352-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb352-18"><a href="#cb352-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="cb353"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb353-1"><a href="#cb353-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb358"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb358-1"><a href="#cb358-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb358-2"><a href="#cb358-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb358-3"><a href="#cb358-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb358-4"><a href="#cb358-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb358-5"><a href="#cb358-5" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb358-6"><a href="#cb358-6" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb358-7"><a href="#cb358-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> +<span id="cb358-8"><a href="#cb358-8" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb358-9"><a href="#cb358-9" aria-hidden="true"></a> },</span> +<span id="cb358-10"><a href="#cb358-10" aria-hidden="true"></a> },</span> +<span id="cb358-11"><a href="#cb358-11" aria-hidden="true"></a>}</span> +<span id="cb358-12"><a href="#cb358-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb358-13"><a href="#cb358-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb358-14"><a href="#cb358-14" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb358-15"><a href="#cb358-15" aria-hidden="true"></a></span> +<span id="cb358-16"><a href="#cb358-16" aria-hidden="true"></a>_Foo_ bar!</span> +<span id="cb358-17"><a href="#cb358-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb358-18"><a href="#cb358-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="cb359"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb359-1"><a href="#cb359-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> @@ -4272,21 +4387,21 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-29">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb354"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb354-1"><a href="#cb354-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb354-2"><a href="#cb354-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb354-3"><a href="#cb354-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb354-4"><a href="#cb354-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> -<span id="cb354-5"><a href="#cb354-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb354-6"><a href="#cb354-6" aria-hidden="true"></a>}</span> -<span id="cb354-7"><a href="#cb354-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb354-8"><a href="#cb354-8" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb354-9"><a href="#cb354-9" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb354-10"><a href="#cb354-10" aria-hidden="true"></a></span> -<span id="cb354-11"><a href="#cb354-11" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb354-12"><a href="#cb354-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb354-13"><a href="#cb354-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb360"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb360-1"><a href="#cb360-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb360-2"><a href="#cb360-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb360-3"><a href="#cb360-3" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb360-4"><a href="#cb360-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> +<span id="cb360-5"><a href="#cb360-5" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb360-6"><a href="#cb360-6" aria-hidden="true"></a>}</span> +<span id="cb360-7"><a href="#cb360-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb360-8"><a href="#cb360-8" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb360-9"><a href="#cb360-9" aria-hidden="true"></a>Hello *world*!</span> +<span id="cb360-10"><a href="#cb360-10" aria-hidden="true"></a></span> +<span id="cb360-11"><a href="#cb360-11" aria-hidden="true"></a>_Foo_ bar!</span> +<span id="cb360-12"><a href="#cb360-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb360-13"><a href="#cb360-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="cb355"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb355-1"><a href="#cb355-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb361"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb361-1"><a href="#cb361-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> @@ -4297,44 +4412,44 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererLineBreak</code> macro represents a forced line break. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-18">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb356"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb356-1"><a href="#cb356-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb356-2"><a href="#cb356-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> -<span id="cb356-3"><a href="#cb356-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb356-4"><a href="#cb356-4" aria-hidden="true"></a> {<span class="fu">\it</span>(A forced linebreak)}<span class="co">%</span></span> -<span id="cb356-5"><a href="#cb356-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb356-6"><a href="#cb356-6" aria-hidden="true"></a>}</span> -<span id="cb356-7"><a href="#cb356-7" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb356-8"><a href="#cb356-8" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb362"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb362-1"><a href="#cb362-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb362-2"><a href="#cb362-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> +<span id="cb362-3"><a href="#cb362-3" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb362-4"><a href="#cb362-4" aria-hidden="true"></a> {<span class="fu">\it</span>(A forced linebreak)}<span class="co">%</span></span> +<span id="cb362-5"><a href="#cb362-5" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb362-6"><a href="#cb362-6" aria-hidden="true"></a>}</span> +<span id="cb362-7"><a href="#cb362-7" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb362-8"><a href="#cb362-8" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> <p>Using a text editor, create a text document named <code>example.md</code> with the following content. Note the two spaces at the end of the first line, which specify a hard linebreak. Due to the limitations of the <span class="tex">T<sub>e</sub>X</span> input processor, hard linebreaks would be ignored if we typed them directly into the <code>document.tex</code> document.</p> <pre><code>Hello world! <br/>_Foo_ bar!</code></pre> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb357"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb357-1"><a href="#cb357-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb363"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb363-1"><a href="#cb363-1" aria-hidden="true"></a><span class="ex">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-39"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-40"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</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="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb358-2"><a href="#cb358-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb358-3"><a href="#cb358-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb358-4"><a href="#cb358-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb358-5"><a href="#cb358-5" aria-hidden="true"></a> lineBreak = {<span class="co">%</span></span> -<span id="cb358-6"><a href="#cb358-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb358-7"><a href="#cb358-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> -<span id="cb358-8"><a href="#cb358-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb358-9"><a href="#cb358-9" aria-hidden="true"></a> },</span> -<span id="cb358-10"><a href="#cb358-10" aria-hidden="true"></a> },</span> -<span id="cb358-11"><a href="#cb358-11" aria-hidden="true"></a>}</span> -<span id="cb358-12"><a href="#cb358-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb358-13"><a href="#cb358-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb358-14"><a href="#cb358-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<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="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb364-2"><a href="#cb364-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb364-3"><a href="#cb364-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb364-4"><a href="#cb364-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb364-5"><a href="#cb364-5" aria-hidden="true"></a> lineBreak = {<span class="co">%</span></span> +<span id="cb364-6"><a href="#cb364-6" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb364-7"><a href="#cb364-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> +<span id="cb364-8"><a href="#cb364-8" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb364-9"><a href="#cb364-9" aria-hidden="true"></a> },</span> +<span id="cb364-10"><a href="#cb364-10" aria-hidden="true"></a> },</span> +<span id="cb364-11"><a href="#cb364-11" aria-hidden="true"></a>}</span> +<span id="cb364-12"><a href="#cb364-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb364-13"><a href="#cb364-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb364-14"><a href="#cb364-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Using a text editor, create a text document named <code>example.md</code> with the following content. Note the two spaces at the end of the first line, which specify a hard linebreak. Due to the limitations of the <span class="tex">T<sub>e</sub>X</span> input processor, hard linebreaks would be ignored if we typed them directly into the <code>document.tex</code> document.</p> <pre><code>Hello world! <br/>_Foo_ bar!</code></pre> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb359"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb359-1"><a href="#cb359-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb365"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb365-1"><a href="#cb365-1" aria-hidden="true"></a><span class="ex">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> @@ -4343,19 +4458,19 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-30">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb360"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb360-1"><a href="#cb360-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb360-2"><a href="#cb360-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> -<span id="cb360-3"><a href="#cb360-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb360-4"><a href="#cb360-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> -<span id="cb360-5"><a href="#cb360-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb360-6"><a href="#cb360-6" aria-hidden="true"></a>}</span> -<span id="cb360-7"><a href="#cb360-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb360-8"><a href="#cb360-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb360-9"><a href="#cb360-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb366"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb366-1"><a href="#cb366-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb366-2"><a href="#cb366-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> +<span id="cb366-3"><a href="#cb366-3" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb366-4"><a href="#cb366-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> +<span id="cb366-5"><a href="#cb366-5" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb366-6"><a href="#cb366-6" aria-hidden="true"></a>}</span> +<span id="cb366-7"><a href="#cb366-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb366-8"><a href="#cb366-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> +<span id="cb366-9"><a href="#cb366-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Using a text editor, create a text document named <code>example.md</code> with the following content. Note the two spaces at the end of the first line, which specify a hard linebreak. Due to the limitations of the <span class="tex">T<sub>e</sub>X</span> input processor, hard linebreaks would be ignored if we typed them directly into the <code>document.tex</code> document.</p> <pre><code>Hello world! <br/>_Foo_ bar!</code></pre> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb361"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb361-1"><a href="#cb361-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb367"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb367-1"><a href="#cb367-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <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> @@ -4366,51 +4481,51 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererEllipsis</code> macro replaces any occurance of ASCII ellipses in the input text. This macro will only be produced, when the <strong><code>smartEllipses</code></strong> option is enabled. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-19">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb362"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb362-1"><a href="#cb362-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb362-2"><a href="#cb362-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb362-3"><a href="#cb362-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{{<span class="fu">\it</span> SHAZAM}!}</span> -<span id="cb362-4"><a href="#cb362-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb362-5"><a href="#cb362-5" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb362-6"><a href="#cb362-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb362-7"><a href="#cb362-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb368"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb368-1"><a href="#cb368-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb368-2"><a href="#cb368-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> +<span id="cb368-3"><a href="#cb368-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{{<span class="fu">\it</span> SHAZAM}!}</span> +<span id="cb368-4"><a href="#cb368-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb368-5"><a href="#cb368-5" aria-hidden="true"></a>The secret word is ...</span> +<span id="cb368-6"><a href="#cb368-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb368-7"><a href="#cb368-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="cb363"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb363-1"><a href="#cb363-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb369"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb369-1"><a href="#cb369-1" aria-hidden="true"></a><span class="ex">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-40"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-41"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb364"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb364-1"><a href="#cb364-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb364-2"><a href="#cb364-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> -<span id="cb364-3"><a href="#cb364-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb364-4"><a href="#cb364-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb364-5"><a href="#cb364-5" aria-hidden="true"></a> ellipsis = <span class="fu">\emph</span>{SHAZAM}!,</span> -<span id="cb364-6"><a href="#cb364-6" aria-hidden="true"></a> },</span> -<span id="cb364-7"><a href="#cb364-7" aria-hidden="true"></a>}</span> -<span id="cb364-8"><a href="#cb364-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb364-9"><a href="#cb364-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb364-10"><a href="#cb364-10" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb364-11"><a href="#cb364-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb364-12"><a href="#cb364-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb370"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb370-1"><a href="#cb370-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb370-2"><a href="#cb370-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> +<span id="cb370-3"><a href="#cb370-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb370-4"><a href="#cb370-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb370-5"><a href="#cb370-5" aria-hidden="true"></a> ellipsis = <span class="fu">\emph</span>{SHAZAM}!,</span> +<span id="cb370-6"><a href="#cb370-6" aria-hidden="true"></a> },</span> +<span id="cb370-7"><a href="#cb370-7" aria-hidden="true"></a>}</span> +<span id="cb370-8"><a href="#cb370-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb370-9"><a href="#cb370-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb370-10"><a href="#cb370-10" aria-hidden="true"></a>The secret word is ...</span> +<span id="cb370-11"><a href="#cb370-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb370-12"><a href="#cb370-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="cb365"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb365-1"><a href="#cb365-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb371"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb371-1"><a href="#cb371-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The secret word is <em>SHAZAM</em>!</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-31">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb366"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb366-1"><a href="#cb366-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb366-2"><a href="#cb366-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb366-3"><a href="#cb366-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{<span class="fu">\emph</span>{SHAZAM}!}</span> -<span id="cb366-4"><a href="#cb366-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb366-5"><a href="#cb366-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb366-6"><a href="#cb366-6" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb366-7"><a href="#cb366-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb366-8"><a href="#cb366-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb372"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb372-1"><a href="#cb372-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb372-2"><a href="#cb372-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> +<span id="cb372-3"><a href="#cb372-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{<span class="fu">\emph</span>{SHAZAM}!}</span> +<span id="cb372-4"><a href="#cb372-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb372-5"><a href="#cb372-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb372-6"><a href="#cb372-6" aria-hidden="true"></a>The secret word is ...</span> +<span id="cb372-7"><a href="#cb372-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb372-8"><a href="#cb372-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="cb367"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb367-1"><a href="#cb367-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb373"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb373-1"><a href="#cb373-1" aria-hidden="true"></a><span class="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> @@ -4419,40 +4534,40 @@ Thomas,Edison,1847</code></pre> </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-41"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-42"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.bib</code> with the following content:</p> -<div class="sourceCode" id="cb368"><pre class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb368-1"><a href="#cb368-1" aria-hidden="true"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> -<span id="cb368-2"><a href="#cb368-2" aria-hidden="true"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> -<span id="cb368-3"><a href="#cb368-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="cb368-4"><a href="#cb368-4" aria-hidden="true"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> -<span id="cb368-5"><a href="#cb368-5" aria-hidden="true"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> -<span id="cb368-6"><a href="#cb368-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="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>[</span> -<span id="cb369-3"><a href="#cb369-3" aria-hidden="true"></a> citations,</span> -<span id="cb369-4"><a href="#cb369-4" aria-hidden="true"></a> citationNbsps,</span> -<span id="cb369-5"><a href="#cb369-5" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span> -<span id="cb369-6"><a href="#cb369-6" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb369-7"><a href="#cb369-7" aria-hidden="true"></a> renderers = {</span> -<span id="cb369-8"><a href="#cb369-8" aria-hidden="true"></a> nbsp = {<span class="ss">$</span><span class="sc">\cdot</span><span class="ss">$</span>},</span> -<span id="cb369-9"><a href="#cb369-9" aria-hidden="true"></a> },</span> -<span id="cb369-10"><a href="#cb369-10" aria-hidden="true"></a>}</span> -<span id="cb369-11"><a href="#cb369-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb369-12"><a href="#cb369-12" aria-hidden="true"></a></span> -<span id="cb369-13"><a href="#cb369-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb369-14"><a href="#cb369-14" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> -<span id="cb369-15"><a href="#cb369-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb369-16"><a href="#cb369-16" aria-hidden="true"></a></span> -<span id="cb369-17"><a href="#cb369-17" aria-hidden="true"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span> -<span id="cb369-18"><a href="#cb369-18" aria-hidden="true"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span> -<span id="cb369-19"><a href="#cb369-19" aria-hidden="true"></a></span> -<span id="cb369-20"><a href="#cb369-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb374"><pre class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb374-1"><a href="#cb374-1" aria-hidden="true"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> +<span id="cb374-2"><a href="#cb374-2" aria-hidden="true"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> +<span id="cb374-3"><a href="#cb374-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="cb374-4"><a href="#cb374-4" aria-hidden="true"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> +<span id="cb374-5"><a href="#cb374-5" aria-hidden="true"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> +<span id="cb374-6"><a href="#cb374-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="cb375"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb375-1"><a href="#cb375-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb375-2"><a href="#cb375-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[</span> +<span id="cb375-3"><a href="#cb375-3" aria-hidden="true"></a> citations,</span> +<span id="cb375-4"><a href="#cb375-4" aria-hidden="true"></a> citationNbsps,</span> +<span id="cb375-5"><a href="#cb375-5" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span> +<span id="cb375-6"><a href="#cb375-6" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb375-7"><a href="#cb375-7" aria-hidden="true"></a> renderers = {</span> +<span id="cb375-8"><a href="#cb375-8" aria-hidden="true"></a> nbsp = {<span class="ss">$</span><span class="sc">\cdot</span><span class="ss">$</span>},</span> +<span id="cb375-9"><a href="#cb375-9" aria-hidden="true"></a> },</span> +<span id="cb375-10"><a href="#cb375-10" aria-hidden="true"></a>}</span> +<span id="cb375-11"><a href="#cb375-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb375-12"><a href="#cb375-12" aria-hidden="true"></a></span> +<span id="cb375-13"><a href="#cb375-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb375-14"><a href="#cb375-14" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> +<span id="cb375-15"><a href="#cb375-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb375-16"><a href="#cb375-16" aria-hidden="true"></a></span> +<span id="cb375-17"><a href="#cb375-17" aria-hidden="true"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span> +<span id="cb375-18"><a href="#cb375-18" aria-hidden="true"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span> +<span id="cb375-19"><a href="#cb375-19" aria-hidden="true"></a></span> +<span id="cb375-20"><a href="#cb375-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX and BibTeX from the terminal:</p> -<div class="sourceCode" id="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> -<span id="cb370-2"><a href="#cb370-2" aria-hidden="true"></a><span class="ex">bibtex</span> document.aux</span> -<span id="cb370-3"><a href="#cb370-3" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb370-4"><a href="#cb370-4" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb376"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb376-1"><a href="#cb376-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb376-2"><a href="#cb376-2" aria-hidden="true"></a><span class="ex">bibtex</span> document.aux</span> +<span id="cb376-3"><a href="#cb376-3" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb376-4"><a href="#cb376-4" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The TeXbook [1, p.·123·and·130] is good.</p> @@ -4476,49 +4591,49 @@ Thomas,Edison,1847</code></pre> </ul> <h5 class="unnumbered" data-number="" id="plain-tex-example-20">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content. We will make the tilde behave as if it were written in <span class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking space.</p> -<div class="sourceCode" id="cb371"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb371-1"><a href="#cb371-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb371-2"><a href="#cb371-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> -<span id="cb371-3"><a href="#cb371-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb371-4"><a href="#cb371-4" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb371-5"><a href="#cb371-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb371-6"><a href="#cb371-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="cb372"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb372-1"><a href="#cb372-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb377"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb377-1"><a href="#cb377-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb377-2"><a href="#cb377-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> +<span id="cb377-3"><a href="#cb377-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb377-4"><a href="#cb377-4" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb377-5"><a href="#cb377-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb377-6"><a href="#cb377-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="cb378"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb378-1"><a href="#cb378-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, 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-42"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-43"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content. 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="cb373"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb373-1"><a href="#cb373-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb373-2"><a href="#cb373-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb373-3"><a href="#cb373-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb373-4"><a href="#cb373-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb373-5"><a href="#cb373-5" aria-hidden="true"></a> tilde = ~,</span> -<span id="cb373-6"><a href="#cb373-6" aria-hidden="true"></a> },</span> -<span id="cb373-7"><a href="#cb373-7" aria-hidden="true"></a>}</span> -<span id="cb373-8"><a href="#cb373-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb373-9"><a href="#cb373-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb373-10"><a href="#cb373-10" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb373-11"><a href="#cb373-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb373-12"><a href="#cb373-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="cb374"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb374-1"><a href="#cb374-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb379"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb379-1"><a href="#cb379-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb379-2"><a href="#cb379-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb379-3"><a href="#cb379-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb379-4"><a href="#cb379-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb379-5"><a href="#cb379-5" aria-hidden="true"></a> tilde = ~,</span> +<span id="cb379-6"><a href="#cb379-6" aria-hidden="true"></a> },</span> +<span id="cb379-7"><a href="#cb379-7" aria-hidden="true"></a>}</span> +<span id="cb379-8"><a href="#cb379-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb379-9"><a href="#cb379-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb379-10"><a href="#cb379-10" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb379-11"><a href="#cb379-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb379-12"><a href="#cb379-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="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, where the middot (<code>·</code>) denotes a non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-32">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content. We will make the tilde behave as if it were written in <span class="tex">T<sub>e</sub>X</span>, where it represents a non-breaking space.</p> -<div class="sourceCode" id="cb375"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb375-1"><a href="#cb375-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb375-2"><a href="#cb375-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> -<span id="cb375-3"><a href="#cb375-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb375-4"><a href="#cb375-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb375-5"><a href="#cb375-5" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb375-6"><a href="#cb375-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb375-7"><a href="#cb375-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="cb376"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb376-1"><a href="#cb376-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb381"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb381-1"><a href="#cb381-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb381-2"><a href="#cb381-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> +<span id="cb381-3"><a href="#cb381-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb381-4"><a href="#cb381-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb381-5"><a href="#cb381-5" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> +<span id="cb381-6"><a href="#cb381-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb381-7"><a href="#cb381-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="cb382"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb382-1"><a href="#cb382-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, where the middot (<code>·</code>) denotes a non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> @@ -4527,55 +4642,55 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererCodeSpan</code> macro represents inlined code span in the input text. It receives a single argument that corresponds to the inlined code span.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-21">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb377"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb377-1"><a href="#cb377-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb377-2"><a href="#cb377-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb377-3"><a href="#cb377-3" aria-hidden="true"></a></span> -<span id="cb377-4"><a href="#cb377-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> -<span id="cb377-5"><a href="#cb377-5" aria-hidden="true"></a></span> -<span id="cb377-6"><a href="#cb377-6" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb377-7"><a href="#cb377-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="cb377-8"><a href="#cb377-8" aria-hidden="true"></a></span> -<span id="cb377-9"><a href="#cb377-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="cb377-10"><a href="#cb377-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb377-11"><a href="#cb377-11" aria-hidden="true"></a></span> -<span id="cb377-12"><a href="#cb377-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb377-13"><a href="#cb377-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb377-14"><a href="#cb377-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="cb377-15"><a href="#cb377-15" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb377-16"><a href="#cb377-16" aria-hidden="true"></a></span> -<span id="cb377-17"><a href="#cb377-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb383"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb383-1"><a href="#cb383-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb383-2"><a href="#cb383-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> +<span id="cb383-3"><a href="#cb383-3" aria-hidden="true"></a></span> +<span id="cb383-4"><a href="#cb383-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> +<span id="cb383-5"><a href="#cb383-5" aria-hidden="true"></a></span> +<span id="cb383-6"><a href="#cb383-6" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb383-7"><a href="#cb383-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="cb383-8"><a href="#cb383-8" aria-hidden="true"></a></span> +<span id="cb383-9"><a href="#cb383-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="cb383-10"><a href="#cb383-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></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="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb383-13"><a href="#cb383-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb383-14"><a href="#cb383-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="cb383-15"><a href="#cb383-15" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb383-16"><a href="#cb383-16" aria-hidden="true"></a></span> +<span id="cb383-17"><a href="#cb383-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="cb378"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb378-1"><a href="#cb378-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb384"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb384-1"><a href="#cb384-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ *equals* $i$.</p> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-43"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-44"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb379"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb379-1"><a href="#cb379-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb379-2"><a href="#cb379-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<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> codeSpan = {#1},</span> -<span id="cb379-6"><a href="#cb379-6" aria-hidden="true"></a> },</span> -<span id="cb379-7"><a href="#cb379-7" aria-hidden="true"></a>}</span> -<span id="cb379-8"><a href="#cb379-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb379-9"><a href="#cb379-9" aria-hidden="true"></a></span> -<span id="cb379-10"><a href="#cb379-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb379-11"><a href="#cb379-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="cb379-12"><a href="#cb379-12" aria-hidden="true"></a></span> -<span id="cb379-13"><a href="#cb379-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="cb379-14"><a href="#cb379-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb379-15"><a href="#cb379-15" aria-hidden="true"></a></span> -<span id="cb379-16"><a href="#cb379-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> -<span id="cb379-17"><a href="#cb379-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="cb379-18"><a href="#cb379-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb379-19"><a href="#cb379-19" aria-hidden="true"></a></span> -<span id="cb379-20"><a href="#cb379-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb385"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb385-1"><a href="#cb385-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb385-2"><a href="#cb385-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> +<span id="cb385-3"><a href="#cb385-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb385-4"><a href="#cb385-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb385-5"><a href="#cb385-5" aria-hidden="true"></a> codeSpan = {#1},</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> +<span id="cb385-8"><a href="#cb385-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb385-9"><a href="#cb385-9" aria-hidden="true"></a></span> +<span id="cb385-10"><a href="#cb385-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb385-11"><a href="#cb385-11" aria-hidden="true"></a>`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</span> +<span id="cb385-12"><a href="#cb385-12" aria-hidden="true"></a></span> +<span id="cb385-13"><a href="#cb385-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="cb385-14"><a href="#cb385-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb385-15"><a href="#cb385-15" aria-hidden="true"></a></span> +<span id="cb385-16"><a href="#cb385-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> +<span id="cb385-17"><a href="#cb385-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="cb385-18"><a href="#cb385-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb385-19"><a href="#cb385-19" aria-hidden="true"></a></span> +<span id="cb385-20"><a href="#cb385-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="cb380"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb380-1"><a href="#cb380-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb386"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb386-1"><a href="#cb386-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.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> @@ -4584,24 +4699,24 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-33">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb381"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb381-1"><a href="#cb381-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb381-2"><a href="#cb381-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> -<span id="cb381-3"><a href="#cb381-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb381-4"><a href="#cb381-4" aria-hidden="true"></a></span> -<span id="cb381-5"><a href="#cb381-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb381-6"><a href="#cb381-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="cb381-7"><a href="#cb381-7" aria-hidden="true"></a></span> -<span id="cb381-8"><a href="#cb381-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="cb381-9"><a href="#cb381-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb381-10"><a href="#cb381-10" aria-hidden="true"></a></span> -<span id="cb381-11"><a href="#cb381-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb381-12"><a href="#cb381-12" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb381-13"><a href="#cb381-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="cb381-14"><a href="#cb381-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb381-15"><a href="#cb381-15" aria-hidden="true"></a></span> -<span id="cb381-16"><a href="#cb381-16" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb387"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb387-1"><a href="#cb387-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb387-2"><a href="#cb387-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> +<span id="cb387-3"><a href="#cb387-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb387-4"><a href="#cb387-4" aria-hidden="true"></a></span> +<span id="cb387-5"><a href="#cb387-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb387-6"><a href="#cb387-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="cb387-7"><a href="#cb387-7" aria-hidden="true"></a></span> +<span id="cb387-8"><a href="#cb387-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="cb387-9"><a href="#cb387-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb387-10"><a href="#cb387-10" aria-hidden="true"></a></span> +<span id="cb387-11"><a href="#cb387-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> +<span id="cb387-12"><a href="#cb387-12" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb387-13"><a href="#cb387-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="cb387-14"><a href="#cb387-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb387-15"><a href="#cb387-15" aria-hidden="true"></a></span> +<span id="cb387-16"><a href="#cb387-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="cb382"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb382-1"><a href="#cb382-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<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">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> @@ -4612,106 +4727,106 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererLink</code> macro represents a hyperlink. It receives four arguments: the label, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the link.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-22">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb383"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb383-1"><a href="#cb383-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb383-2"><a href="#cb383-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb383-3"><a href="#cb383-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="cb383-4"><a href="#cb383-4" aria-hidden="true"></a>}</span> -<span id="cb383-5"><a href="#cb383-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb383-6"><a href="#cb383-6" aria-hidden="true"></a>Please visit [the link][ctan].</span> -<span id="cb383-7"><a href="#cb383-7" aria-hidden="true"></a></span> -<span id="cb383-8"><a href="#cb383-8" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> -<span id="cb383-9"><a href="#cb383-9" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb383-10"><a href="#cb383-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb383-11"><a href="#cb383-11" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<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="fu">\input</span> markdown</span> +<span id="cb389-2"><a href="#cb389-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb389-3"><a href="#cb389-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="cb389-4"><a href="#cb389-4" aria-hidden="true"></a>}</span> +<span id="cb389-5"><a href="#cb389-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb389-6"><a href="#cb389-6" aria-hidden="true"></a>Please visit [the link][ctan].</span> +<span id="cb389-7"><a href="#cb389-7" aria-hidden="true"></a></span> +<span id="cb389-8"><a href="#cb389-8" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> +<span id="cb389-9"><a href="#cb389-9" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> +<span id="cb389-10"><a href="#cb389-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb389-11"><a href="#cb389-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="cb384"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb384-1"><a href="#cb384-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<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">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-44"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-45"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb385"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb385-1"><a href="#cb385-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb385-2"><a href="#cb385-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb385-3"><a href="#cb385-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb385-4"><a href="#cb385-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb385-5"><a href="#cb385-5" aria-hidden="true"></a> link = {<span class="co">%</span></span> -<span id="cb385-6"><a href="#cb385-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="cb385-7"><a href="#cb385-7" aria-hidden="true"></a> },</span> -<span id="cb385-8"><a href="#cb385-8" aria-hidden="true"></a> },</span> -<span id="cb385-9"><a href="#cb385-9" aria-hidden="true"></a>}</span> -<span id="cb385-10"><a href="#cb385-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb385-11"><a href="#cb385-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb385-12"><a href="#cb385-12" aria-hidden="true"></a>Please visit [the link][ctan].</span> -<span id="cb385-13"><a href="#cb385-13" aria-hidden="true"></a></span> -<span id="cb385-14"><a href="#cb385-14" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> -<span id="cb385-15"><a href="#cb385-15" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb385-16"><a href="#cb385-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb385-17"><a href="#cb385-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="cb386"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb386-1"><a href="#cb386-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<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="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb391-2"><a href="#cb391-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb391-3"><a href="#cb391-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb391-4"><a href="#cb391-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb391-5"><a href="#cb391-5" aria-hidden="true"></a> link = {<span class="co">%</span></span> +<span id="cb391-6"><a href="#cb391-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="cb391-7"><a href="#cb391-7" aria-hidden="true"></a> },</span> +<span id="cb391-8"><a href="#cb391-8" aria-hidden="true"></a> },</span> +<span id="cb391-9"><a href="#cb391-9" aria-hidden="true"></a>}</span> +<span id="cb391-10"><a href="#cb391-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb391-11"><a href="#cb391-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb391-12"><a href="#cb391-12" aria-hidden="true"></a>Please visit [the link][ctan].</span> +<span id="cb391-13"><a href="#cb391-13" aria-hidden="true"></a></span> +<span id="cb391-14"><a href="#cb391-14" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> +<span id="cb391-15"><a href="#cb391-15" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> +<span id="cb391-16"><a href="#cb391-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb391-17"><a href="#cb391-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="cb392"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb392-1"><a href="#cb392-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Please visit the link <a href="https://ctan.org/" class="uri">https://ctan.org/</a> titled <em>the Comprehensive TeX Archive Network</em>.</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-34">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb387"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb387-1"><a href="#cb387-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb387-2"><a href="#cb387-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb387-3"><a href="#cb387-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="cb387-4"><a href="#cb387-4" aria-hidden="true"></a>}</span> -<span id="cb387-5"><a href="#cb387-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb387-6"><a href="#cb387-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb387-7"><a href="#cb387-7" aria-hidden="true"></a>Please visit [the link][ctan].</span> -<span id="cb387-8"><a href="#cb387-8" aria-hidden="true"></a></span> -<span id="cb387-9"><a href="#cb387-9" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> -<span id="cb387-10"><a href="#cb387-10" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb387-11"><a href="#cb387-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb387-12"><a href="#cb387-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<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">\usemodule</span>[t][markdown]</span> +<span id="cb393-2"><a href="#cb393-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb393-3"><a href="#cb393-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="cb393-4"><a href="#cb393-4" aria-hidden="true"></a>}</span> +<span id="cb393-5"><a href="#cb393-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb393-6"><a href="#cb393-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb393-7"><a href="#cb393-7" aria-hidden="true"></a>Please visit [the link][ctan].</span> +<span id="cb393-8"><a href="#cb393-8" aria-hidden="true"></a></span> +<span id="cb393-9"><a href="#cb393-9" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> +<span id="cb393-10"><a href="#cb393-10" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> +<span id="cb393-11"><a href="#cb393-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb393-12"><a href="#cb393-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="cb388"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb388-1"><a href="#cb388-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb394"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb394-1"><a href="#cb394-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>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-45"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-46"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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">\begingroup</span></span> -<span id="cb389-4"><a href="#cb389-4" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\@</span>=11</span> -<span id="cb389-5"><a href="#cb389-5" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> -<span id="cb389-6"><a href="#cb389-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\^</span>^A=14</span> -<span id="cb389-7"><a href="#cb389-7" aria-hidden="true"></a><span class="fu">\global\def\markdownRendererImage</span>#1#2#3#4{^^A</span> -<span id="cb389-8"><a href="#cb389-8" aria-hidden="true"></a> <span class="fu">\immediate\write</span>18{^^A</span></code></pre></div> -<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="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="cb390-2"><a href="#cb390-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="cb390-3"><a href="#cb390-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="cb390-4"><a href="#cb390-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="cb390-5"><a href="#cb390-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="cb390-6"><a href="#cb390-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="cb390-7"><a href="#cb390-7" aria-hidden="true"></a> <span class="kw">fi</span>;</span> -<span id="cb390-8"><a href="#cb390-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="cb390-9"><a href="#cb390-9" aria-hidden="true"></a> <span class="kw">else</span></span> -<span id="cb390-10"><a href="#cb390-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="cb390-11"><a href="#cb390-11" aria-hidden="true"></a> <span class="kw">fi</span>^^<span class="ex">A</span></span></code></pre></div> -<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> }^^A</span> -<span id="cb391-2"><a href="#cb391-2" aria-hidden="true"></a> {^^A</span> -<span id="cb391-3"><a href="#cb391-3" aria-hidden="true"></a> <span class="fu">\everyeof</span>={<span class="fu">\noexpand</span>}^^A</span> -<span id="cb391-4"><a href="#cb391-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="cb391-5"><a href="#cb391-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="cb391-6"><a href="#cb391-6" aria-hidden="true"></a> }^^A</span> -<span id="cb391-7"><a href="#cb391-7" aria-hidden="true"></a>}</span> -<span id="cb391-8"><a href="#cb391-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> -<span id="cb391-9"><a href="#cb391-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb391-10"><a href="#cb391-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb391-11"><a href="#cb391-11" aria-hidden="true"></a>![TUGboat](https://tug.org/tugboat/noword.jpg)</span> -<span id="cb391-12"><a href="#cb391-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb391-13"><a href="#cb391-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="cb392"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb392-1"><a href="#cb392-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb395"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb395-1"><a href="#cb395-1" aria-hidden="true"></a><span class="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>{<span class="ex">markdown</span>}</span> +<span id="cb395-3"><a href="#cb395-3" aria-hidden="true"></a><span class="fu">\begingroup</span></span> +<span id="cb395-4"><a href="#cb395-4" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\@</span>=11</span> +<span id="cb395-5"><a href="#cb395-5" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> +<span id="cb395-6"><a href="#cb395-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\^</span>^A=14</span> +<span id="cb395-7"><a href="#cb395-7" aria-hidden="true"></a><span class="fu">\global\def\markdownRendererImage</span>#1#2#3#4{^^A</span> +<span id="cb395-8"><a href="#cb395-8" aria-hidden="true"></a> <span class="fu">\immediate\write</span>18{^^A</span></code></pre></div> +<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="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="cb396-2"><a href="#cb396-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="cb396-3"><a href="#cb396-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="cb396-4"><a href="#cb396-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="cb396-5"><a href="#cb396-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="cb396-6"><a href="#cb396-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="cb396-7"><a href="#cb396-7" aria-hidden="true"></a> <span class="kw">fi</span>;</span> +<span id="cb396-8"><a href="#cb396-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="cb396-9"><a href="#cb396-9" aria-hidden="true"></a> <span class="kw">else</span></span> +<span id="cb396-10"><a href="#cb396-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="cb396-11"><a href="#cb396-11" aria-hidden="true"></a> <span class="kw">fi</span>^^<span class="ex">A</span></span></code></pre></div> +<div class="sourceCode" id="cb397"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb397-1"><a href="#cb397-1" aria-hidden="true"></a> }^^A</span> +<span id="cb397-2"><a href="#cb397-2" aria-hidden="true"></a> {^^A</span> +<span id="cb397-3"><a href="#cb397-3" aria-hidden="true"></a> <span class="fu">\everyeof</span>={<span class="fu">\noexpand</span>}^^A</span> +<span id="cb397-4"><a href="#cb397-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="cb397-5"><a href="#cb397-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="cb397-6"><a href="#cb397-6" aria-hidden="true"></a> }^^A</span> +<span id="cb397-7"><a href="#cb397-7" aria-hidden="true"></a>}</span> +<span id="cb397-8"><a href="#cb397-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> +<span id="cb397-9"><a href="#cb397-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb397-10"><a href="#cb397-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb397-11"><a href="#cb397-11" aria-hidden="true"></a>![TUGboat](https://tug.org/tugboat/noword.jpg)</span> +<span id="cb397-12"><a href="#cb397-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb397-13"><a href="#cb397-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="cb398"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb398-1"><a href="#cb398-1" aria-hidden="true"></a><span class="ex">lualatex</span> --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> @@ -4723,64 +4838,64 @@ Thomas,Edison,1847</code></pre> <p>Note that you will need to place place a <code>markdown-languages.json</code> file inside your working directory or inside your local <span class="tex">T<sub>e</sub>X</span> directory structure. In this file, you will define a mapping between filename extensions and the language names recognized by your favorite syntax highlighter; there may exist other creative uses beside syntax highlighting. <a href="https://github.com/iainc/Markdown-Content-Blocks" title="File transclusion syntax for Markdown">The <code>Languages.json</code> file provided by Anton Sotkov</a> is a good starting point.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-23">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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\markdownOptionContentBlocks</span>{true}</span> -<span id="cb393-3"><a href="#cb393-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb393-4"><a href="#cb393-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb393-5"><a href="#cb393-5" aria-hidden="true"></a>}</span> -<span id="cb393-6"><a href="#cb393-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb393-7"><a href="#cb393-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb393-8"><a href="#cb393-8" aria-hidden="true"></a>}</span> -<span id="cb393-9"><a href="#cb393-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> -<span id="cb393-10"><a href="#cb393-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="cb393-11"><a href="#cb393-11" aria-hidden="true"></a>}</span> -<span id="cb393-12"><a href="#cb393-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb393-13"><a href="#cb393-13" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb393-14"><a href="#cb393-14" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb393-15"><a href="#cb393-15" aria-hidden="true"></a> and programming language names)</span> -<span id="cb393-16"><a href="#cb393-16" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb393-17"><a href="#cb393-17" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb393-18"><a href="#cb393-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb399"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb399-1"><a href="#cb399-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb399-2"><a href="#cb399-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> +<span id="cb399-3"><a href="#cb399-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb399-4"><a href="#cb399-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb399-5"><a href="#cb399-5" aria-hidden="true"></a>}</span> +<span id="cb399-6"><a href="#cb399-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb399-7"><a href="#cb399-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb399-8"><a href="#cb399-8" aria-hidden="true"></a>}</span> +<span id="cb399-9"><a href="#cb399-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> +<span id="cb399-10"><a href="#cb399-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="cb399-11"><a href="#cb399-11" aria-hidden="true"></a>}</span> +<span id="cb399-12"><a href="#cb399-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb399-13"><a href="#cb399-13" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> +<span id="cb399-14"><a href="#cb399-14" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> +<span id="cb399-15"><a href="#cb399-15" aria-hidden="true"></a> and programming language names)</span> +<span id="cb399-16"><a href="#cb399-16" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> +<span id="cb399-17"><a href="#cb399-17" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb399-18"><a href="#cb399-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="cb394"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb394-1"><a href="#cb394-1" aria-hidden="true"></a>{</span> -<span id="cb394-2"><a href="#cb394-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="cb394-3"><a href="#cb394-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb400"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb400-1"><a href="#cb400-1" aria-hidden="true"></a>{</span> +<span id="cb400-2"><a href="#cb400-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="cb400-3"><a href="#cb400-3" aria-hidden="true"></a>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb395"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb395-1"><a href="#cb395-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<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">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-46"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-47"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb396"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb396-1"><a href="#cb396-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb396-2"><a href="#cb396-2" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{markdown-languages.json}</span> -<span id="cb396-3"><a href="#cb396-3" aria-hidden="true"></a>{</span> -<span id="cb396-4"><a href="#cb396-4" aria-hidden="true"></a> "json": "JavaScript Object Notation",</span> -<span id="cb396-5"><a href="#cb396-5" aria-hidden="true"></a>}</span> -<span id="cb396-6"><a href="#cb396-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb396-7"><a href="#cb396-7" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> -<span id="cb396-8"><a href="#cb396-8" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb396-9"><a href="#cb396-9" aria-hidden="true"></a> renderers = {</span> -<span id="cb396-10"><a href="#cb396-10" aria-hidden="true"></a> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</span> -<span id="cb396-11"><a href="#cb396-11" aria-hidden="true"></a> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</span> -<span id="cb396-12"><a href="#cb396-12" aria-hidden="true"></a> contentBlockCode = {<span class="co">%</span></span> -<span id="cb396-13"><a href="#cb396-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="cb396-14"><a href="#cb396-14" aria-hidden="true"></a> },</span> -<span id="cb396-15"><a href="#cb396-15" aria-hidden="true"></a> },</span> -<span id="cb396-16"><a href="#cb396-16" aria-hidden="true"></a>}</span> -<span id="cb396-17"><a href="#cb396-17" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb396-18"><a href="#cb396-18" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb396-19"><a href="#cb396-19" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb396-20"><a href="#cb396-20" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb396-21"><a href="#cb396-21" aria-hidden="true"></a> and programming language names)</span> -<span id="cb396-22"><a href="#cb396-22" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb396-23"><a href="#cb396-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb396-24"><a href="#cb396-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="cb397"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb397-1"><a href="#cb397-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<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="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb402-2"><a href="#cb402-2" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{markdown-languages.json}</span> +<span id="cb402-3"><a href="#cb402-3" aria-hidden="true"></a>{</span> +<span id="cb402-4"><a href="#cb402-4" aria-hidden="true"></a> "json": "JavaScript Object Notation",</span> +<span id="cb402-5"><a href="#cb402-5" aria-hidden="true"></a>}</span> +<span id="cb402-6"><a href="#cb402-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> +<span id="cb402-7"><a href="#cb402-7" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> +<span id="cb402-8"><a href="#cb402-8" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb402-9"><a href="#cb402-9" aria-hidden="true"></a> renderers = {</span> +<span id="cb402-10"><a href="#cb402-10" aria-hidden="true"></a> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</span> +<span id="cb402-11"><a href="#cb402-11" aria-hidden="true"></a> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</span> +<span id="cb402-12"><a href="#cb402-12" aria-hidden="true"></a> contentBlockCode = {<span class="co">%</span></span> +<span id="cb402-13"><a href="#cb402-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="cb402-14"><a href="#cb402-14" aria-hidden="true"></a> },</span> +<span id="cb402-15"><a href="#cb402-15" aria-hidden="true"></a> },</span> +<span id="cb402-16"><a href="#cb402-16" aria-hidden="true"></a>}</span> +<span id="cb402-17"><a href="#cb402-17" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb402-18"><a href="#cb402-18" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb402-19"><a href="#cb402-19" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> +<span id="cb402-20"><a href="#cb402-20" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> +<span id="cb402-21"><a href="#cb402-21" aria-hidden="true"></a> and programming language names)</span> +<span id="cb402-22"><a href="#cb402-22" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> +<span id="cb402-23"><a href="#cb402-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb402-24"><a href="#cb402-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="cb403"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb403-1"><a href="#cb403-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> @@ -4789,31 +4904,31 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-35">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb398"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb398-1"><a href="#cb398-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb398-2"><a href="#cb398-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> -<span id="cb398-3"><a href="#cb398-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb398-4"><a href="#cb398-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb398-5"><a href="#cb398-5" aria-hidden="true"></a>}</span> -<span id="cb398-6"><a href="#cb398-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb398-7"><a href="#cb398-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb398-8"><a href="#cb398-8" aria-hidden="true"></a>}</span> -<span id="cb398-9"><a href="#cb398-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> -<span id="cb398-10"><a href="#cb398-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="cb398-11"><a href="#cb398-11" aria-hidden="true"></a>}</span> -<span id="cb398-12"><a href="#cb398-12" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb398-13"><a href="#cb398-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb398-14"><a href="#cb398-14" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb398-15"><a href="#cb398-15" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb398-16"><a href="#cb398-16" aria-hidden="true"></a> and programming language names)</span> -<span id="cb398-17"><a href="#cb398-17" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb398-18"><a href="#cb398-18" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb398-19"><a href="#cb398-19" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<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="fu">\usemodule</span>[t][markdown]</span> +<span id="cb404-2"><a href="#cb404-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> +<span id="cb404-3"><a href="#cb404-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb404-4"><a href="#cb404-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb404-5"><a href="#cb404-5" aria-hidden="true"></a>}</span> +<span id="cb404-6"><a href="#cb404-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb404-7"><a href="#cb404-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> +<span id="cb404-8"><a href="#cb404-8" aria-hidden="true"></a>}</span> +<span id="cb404-9"><a href="#cb404-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> +<span id="cb404-10"><a href="#cb404-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="cb404-11"><a href="#cb404-11" aria-hidden="true"></a>}</span> +<span id="cb404-12"><a href="#cb404-12" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb404-13"><a href="#cb404-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb404-14"><a href="#cb404-14" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> +<span id="cb404-15"><a href="#cb404-15" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> +<span id="cb404-16"><a href="#cb404-16" aria-hidden="true"></a> and programming language names)</span> +<span id="cb404-17"><a href="#cb404-17" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> +<span id="cb404-18"><a href="#cb404-18" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb404-19"><a href="#cb404-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="cb399"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb399-1"><a href="#cb399-1" aria-hidden="true"></a>{</span> -<span id="cb399-2"><a href="#cb399-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="cb399-3"><a href="#cb399-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb405"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb405-1"><a href="#cb405-1" aria-hidden="true"></a>{</span> +<span id="cb405-2"><a href="#cb405-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="cb405-3"><a href="#cb405-3" aria-hidden="true"></a>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb400"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb400-1"><a href="#cb400-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb406"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb406-1"><a href="#cb406-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <code>document.tex</code>, the document that we are currently typesetting.</p> @@ -4829,50 +4944,50 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererUlEndTight</code> macro represents the end of a bulleted list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <code>false</code>. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-24">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb401"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb401-1"><a href="#cb401-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb401-2"><a href="#cb401-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb401-3"><a href="#cb401-3" aria-hidden="true"></a></span> -<span id="cb401-4"><a href="#cb401-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb401-5"><a href="#cb401-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> -<span id="cb401-6"><a href="#cb401-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb401-7"><a href="#cb401-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb401-8"><a href="#cb401-8" aria-hidden="true"></a> ,</span> -<span id="cb401-9"><a href="#cb401-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb401-10"><a href="#cb401-10" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb401-11"><a href="#cb401-11" aria-hidden="true"></a>}</span> -<span id="cb401-12"><a href="#cb401-12" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> -<span id="cb401-13"><a href="#cb401-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> -<span id="cb401-14"><a href="#cb401-14" aria-hidden="true"></a></span> -<span id="cb401-15"><a href="#cb401-15" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb401-16"><a href="#cb401-16" aria-hidden="true"></a>This is a tight list</span> -<span id="cb401-17"><a href="#cb401-17" aria-hidden="true"></a></span> -<span id="cb401-18"><a href="#cb401-18" aria-hidden="true"></a>- the first item</span> -<span id="cb401-19"><a href="#cb401-19" aria-hidden="true"></a>- the second item</span> -<span id="cb401-20"><a href="#cb401-20" aria-hidden="true"></a>- the third item</span> -<span id="cb401-21"><a href="#cb401-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb401-22"><a href="#cb401-22" aria-hidden="true"></a></span> -<span id="cb401-23"><a href="#cb401-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb401-24"><a href="#cb401-24" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb401-25"><a href="#cb401-25" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb401-26"><a href="#cb401-26" aria-hidden="true"></a>}</span> -<span id="cb401-27"><a href="#cb401-27" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{}</span> -<span id="cb401-28"><a href="#cb401-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{--<span class="fu">\kern</span> 0.5em}</span> -<span id="cb401-29"><a href="#cb401-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb401-30"><a href="#cb401-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{}</span> -<span id="cb401-31"><a href="#cb401-31" aria-hidden="true"></a></span> -<span id="cb401-32"><a href="#cb401-32" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb401-33"><a href="#cb401-33" aria-hidden="true"></a>This is a loose list</span> -<span id="cb401-34"><a href="#cb401-34" aria-hidden="true"></a></span> -<span id="cb401-35"><a href="#cb401-35" aria-hidden="true"></a>- This is the first item</span> -<span id="cb401-36"><a href="#cb401-36" aria-hidden="true"></a></span> -<span id="cb401-37"><a href="#cb401-37" aria-hidden="true"></a>- This is the second item</span> -<span id="cb401-38"><a href="#cb401-38" aria-hidden="true"></a></span> -<span id="cb401-39"><a href="#cb401-39" aria-hidden="true"></a>- This is the third item</span> -<span id="cb401-40"><a href="#cb401-40" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb401-41"><a href="#cb401-41" aria-hidden="true"></a></span> -<span id="cb401-42"><a href="#cb401-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="cb402"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb402-1"><a href="#cb402-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb407"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb407-1"><a href="#cb407-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb407-2"><a href="#cb407-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb407-3"><a href="#cb407-3" aria-hidden="true"></a></span> +<span id="cb407-4"><a href="#cb407-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb407-5"><a href="#cb407-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> +<span id="cb407-6"><a href="#cb407-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb407-7"><a href="#cb407-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb407-8"><a href="#cb407-8" aria-hidden="true"></a> ,</span> +<span id="cb407-9"><a href="#cb407-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> +<span id="cb407-10"><a href="#cb407-10" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb407-11"><a href="#cb407-11" aria-hidden="true"></a>}</span> +<span id="cb407-12"><a href="#cb407-12" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> +<span id="cb407-13"><a href="#cb407-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> +<span id="cb407-14"><a href="#cb407-14" aria-hidden="true"></a></span> +<span id="cb407-15"><a href="#cb407-15" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb407-16"><a href="#cb407-16" aria-hidden="true"></a>This is a tight list</span> +<span id="cb407-17"><a href="#cb407-17" aria-hidden="true"></a></span> +<span id="cb407-18"><a href="#cb407-18" aria-hidden="true"></a>- the first item</span> +<span id="cb407-19"><a href="#cb407-19" aria-hidden="true"></a>- the second item</span> +<span id="cb407-20"><a href="#cb407-20" aria-hidden="true"></a>- the third item</span> +<span id="cb407-21"><a href="#cb407-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb407-22"><a href="#cb407-22" aria-hidden="true"></a></span> +<span id="cb407-23"><a href="#cb407-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb407-24"><a href="#cb407-24" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb407-25"><a href="#cb407-25" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb407-26"><a href="#cb407-26" aria-hidden="true"></a>}</span> +<span id="cb407-27"><a href="#cb407-27" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{}</span> +<span id="cb407-28"><a href="#cb407-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{--<span class="fu">\kern</span> 0.5em}</span> +<span id="cb407-29"><a href="#cb407-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.<span class="fu">\par</span>}</span> +<span id="cb407-30"><a href="#cb407-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{}</span> +<span id="cb407-31"><a href="#cb407-31" aria-hidden="true"></a></span> +<span id="cb407-32"><a href="#cb407-32" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb407-33"><a href="#cb407-33" aria-hidden="true"></a>This is a loose list</span> +<span id="cb407-34"><a href="#cb407-34" aria-hidden="true"></a></span> +<span id="cb407-35"><a href="#cb407-35" aria-hidden="true"></a>- This is the first item</span> +<span id="cb407-36"><a href="#cb407-36" aria-hidden="true"></a></span> +<span id="cb407-37"><a href="#cb407-37" aria-hidden="true"></a>- This is the second item</span> +<span id="cb407-38"><a href="#cb407-38" aria-hidden="true"></a></span> +<span id="cb407-39"><a href="#cb407-39" aria-hidden="true"></a>- This is the third item</span> +<span id="cb407-40"><a href="#cb407-40" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb407-41"><a href="#cb407-41" aria-hidden="true"></a></span> +<span id="cb407-42"><a href="#cb407-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="cb408"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb408-1"><a href="#cb408-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -4883,57 +4998,57 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ul> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-47"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-48"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb403"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb403-1"><a href="#cb403-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb403-2"><a href="#cb403-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[tightLists]{<span class="ex">markdown</span>}</span> -<span id="cb403-3"><a href="#cb403-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb403-4"><a href="#cb403-4" aria-hidden="true"></a></span> -<span id="cb403-5"><a href="#cb403-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb403-6"><a href="#cb403-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb403-7"><a href="#cb403-7" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb403-8"><a href="#cb403-8" aria-hidden="true"></a> ulBeginTight = { (},</span> -<span id="cb403-9"><a href="#cb403-9" aria-hidden="true"></a> ulItem = {<span class="co">%</span></span> -<span id="cb403-10"><a href="#cb403-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb403-11"><a href="#cb403-11" aria-hidden="true"></a> ,</span> -<span id="cb403-12"><a href="#cb403-12" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb403-13"><a href="#cb403-13" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb403-14"><a href="#cb403-14" aria-hidden="true"></a> },</span> -<span id="cb403-15"><a href="#cb403-15" aria-hidden="true"></a> ulItemEnd = {},</span> -<span id="cb403-16"><a href="#cb403-16" aria-hidden="true"></a> ulEndTight = {).},</span> -<span id="cb403-17"><a href="#cb403-17" aria-hidden="true"></a> },</span> -<span id="cb403-18"><a href="#cb403-18" aria-hidden="true"></a>}</span> -<span id="cb403-19"><a href="#cb403-19" aria-hidden="true"></a>This is a tight list</span> -<span id="cb403-20"><a href="#cb403-20" aria-hidden="true"></a></span> -<span id="cb403-21"><a href="#cb403-21" aria-hidden="true"></a>- the first item</span> -<span id="cb403-22"><a href="#cb403-22" aria-hidden="true"></a>- the second item</span> -<span id="cb403-23"><a href="#cb403-23" aria-hidden="true"></a>- the third item</span> -<span id="cb403-24"><a href="#cb403-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb403-25"><a href="#cb403-25" aria-hidden="true"></a></span> -<span id="cb403-26"><a href="#cb403-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb403-27"><a href="#cb403-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb403-28"><a href="#cb403-28" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb403-29"><a href="#cb403-29" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb403-30"><a href="#cb403-30" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb403-31"><a href="#cb403-31" aria-hidden="true"></a> },</span> -<span id="cb403-32"><a href="#cb403-32" aria-hidden="true"></a> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</span> -<span id="cb403-33"><a href="#cb403-33" aria-hidden="true"></a> ulItem = {<span class="fu">\item</span>},</span> -<span id="cb403-34"><a href="#cb403-34" aria-hidden="true"></a> ulItemEnd = {.},</span> -<span id="cb403-35"><a href="#cb403-35" aria-hidden="true"></a> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> -<span id="cb403-36"><a href="#cb403-36" aria-hidden="true"></a> },</span> -<span id="cb403-37"><a href="#cb403-37" aria-hidden="true"></a>}</span> -<span id="cb403-38"><a href="#cb403-38" aria-hidden="true"></a>This is a loose list</span> -<span id="cb403-39"><a href="#cb403-39" aria-hidden="true"></a></span> -<span id="cb403-40"><a href="#cb403-40" aria-hidden="true"></a>- This is the first item</span> -<span id="cb403-41"><a href="#cb403-41" aria-hidden="true"></a></span> -<span id="cb403-42"><a href="#cb403-42" aria-hidden="true"></a>- This is the second item</span> -<span id="cb403-43"><a href="#cb403-43" aria-hidden="true"></a></span> -<span id="cb403-44"><a href="#cb403-44" aria-hidden="true"></a>- This is the third item</span> -<span id="cb403-45"><a href="#cb403-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb403-46"><a href="#cb403-46" aria-hidden="true"></a></span> -<span id="cb403-47"><a href="#cb403-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="cb404"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb404-1"><a href="#cb404-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb409"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb409-1"><a href="#cb409-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb409-2"><a href="#cb409-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[tightLists]{<span class="ex">markdown</span>}</span> +<span id="cb409-3"><a href="#cb409-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb409-4"><a href="#cb409-4" aria-hidden="true"></a></span> +<span id="cb409-5"><a href="#cb409-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb409-6"><a href="#cb409-6" aria-hidden="true"></a> renderers = {</span> +<span id="cb409-7"><a href="#cb409-7" aria-hidden="true"></a> interblockSeparator = {},</span> +<span id="cb409-8"><a href="#cb409-8" aria-hidden="true"></a> ulBeginTight = { (},</span> +<span id="cb409-9"><a href="#cb409-9" aria-hidden="true"></a> ulItem = {<span class="co">%</span></span> +<span id="cb409-10"><a href="#cb409-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb409-11"><a href="#cb409-11" aria-hidden="true"></a> ,</span> +<span id="cb409-12"><a href="#cb409-12" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> +<span id="cb409-13"><a href="#cb409-13" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb409-14"><a href="#cb409-14" aria-hidden="true"></a> },</span> +<span id="cb409-15"><a href="#cb409-15" aria-hidden="true"></a> ulItemEnd = {},</span> +<span id="cb409-16"><a href="#cb409-16" aria-hidden="true"></a> ulEndTight = {).},</span> +<span id="cb409-17"><a href="#cb409-17" aria-hidden="true"></a> },</span> +<span id="cb409-18"><a href="#cb409-18" aria-hidden="true"></a>}</span> +<span id="cb409-19"><a href="#cb409-19" aria-hidden="true"></a>This is a tight list</span> +<span id="cb409-20"><a href="#cb409-20" aria-hidden="true"></a></span> +<span id="cb409-21"><a href="#cb409-21" aria-hidden="true"></a>- the first item</span> +<span id="cb409-22"><a href="#cb409-22" aria-hidden="true"></a>- the second item</span> +<span id="cb409-23"><a href="#cb409-23" aria-hidden="true"></a>- the third item</span> +<span id="cb409-24"><a href="#cb409-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb409-25"><a href="#cb409-25" aria-hidden="true"></a></span> +<span id="cb409-26"><a href="#cb409-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb409-27"><a href="#cb409-27" aria-hidden="true"></a> renderers = {</span> +<span id="cb409-28"><a href="#cb409-28" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb409-29"><a href="#cb409-29" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb409-30"><a href="#cb409-30" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb409-31"><a href="#cb409-31" aria-hidden="true"></a> },</span> +<span id="cb409-32"><a href="#cb409-32" aria-hidden="true"></a> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</span> +<span id="cb409-33"><a href="#cb409-33" aria-hidden="true"></a> ulItem = {<span class="fu">\item</span>},</span> +<span id="cb409-34"><a href="#cb409-34" aria-hidden="true"></a> ulItemEnd = {.},</span> +<span id="cb409-35"><a href="#cb409-35" aria-hidden="true"></a> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> +<span id="cb409-36"><a href="#cb409-36" aria-hidden="true"></a> },</span> +<span id="cb409-37"><a href="#cb409-37" aria-hidden="true"></a>}</span> +<span id="cb409-38"><a href="#cb409-38" aria-hidden="true"></a>This is a loose list</span> +<span id="cb409-39"><a href="#cb409-39" aria-hidden="true"></a></span> +<span id="cb409-40"><a href="#cb409-40" aria-hidden="true"></a>- This is the first item</span> +<span id="cb409-41"><a href="#cb409-41" aria-hidden="true"></a></span> +<span id="cb409-42"><a href="#cb409-42" aria-hidden="true"></a>- This is the second item</span> +<span id="cb409-43"><a href="#cb409-43" aria-hidden="true"></a></span> +<span id="cb409-44"><a href="#cb409-44" aria-hidden="true"></a>- This is the third item</span> +<span id="cb409-45"><a href="#cb409-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb409-46"><a href="#cb409-46" aria-hidden="true"></a></span> +<span id="cb409-47"><a href="#cb409-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="cb410"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb410-1"><a href="#cb410-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -4946,51 +5061,51 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-36">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb405"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb405-1"><a href="#cb405-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb405-2"><a href="#cb405-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb405-3"><a href="#cb405-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb405-4"><a href="#cb405-4" aria-hidden="true"></a></span> -<span id="cb405-5"><a href="#cb405-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb405-6"><a href="#cb405-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> -<span id="cb405-7"><a href="#cb405-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb405-8"><a href="#cb405-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb405-9"><a href="#cb405-9" aria-hidden="true"></a> ,</span> -<span id="cb405-10"><a href="#cb405-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb405-11"><a href="#cb405-11" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb405-12"><a href="#cb405-12" aria-hidden="true"></a>}</span> -<span id="cb405-13"><a href="#cb405-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> -<span id="cb405-14"><a href="#cb405-14" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> -<span id="cb405-15"><a href="#cb405-15" aria-hidden="true"></a></span> -<span id="cb405-16"><a href="#cb405-16" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb405-17"><a href="#cb405-17" aria-hidden="true"></a>This is a tight list</span> -<span id="cb405-18"><a href="#cb405-18" aria-hidden="true"></a></span> -<span id="cb405-19"><a href="#cb405-19" aria-hidden="true"></a>- the first item</span> -<span id="cb405-20"><a href="#cb405-20" aria-hidden="true"></a>- the second item</span> -<span id="cb405-21"><a href="#cb405-21" aria-hidden="true"></a>- the third item</span> -<span id="cb405-22"><a href="#cb405-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb405-23"><a href="#cb405-23" aria-hidden="true"></a></span> -<span id="cb405-24"><a href="#cb405-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb405-25"><a href="#cb405-25" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb405-26"><a href="#cb405-26" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb405-27"><a href="#cb405-27" aria-hidden="true"></a>}</span> -<span id="cb405-28"><a href="#cb405-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{<span class="fu">\startitemize</span>}</span> -<span id="cb405-29"><a href="#cb405-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="fu">\item</span>}</span> -<span id="cb405-30"><a href="#cb405-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.}</span> -<span id="cb405-31"><a href="#cb405-31" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb405-32"><a href="#cb405-32" aria-hidden="true"></a></span> -<span id="cb405-33"><a href="#cb405-33" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb405-34"><a href="#cb405-34" aria-hidden="true"></a>This is a loose list</span> -<span id="cb405-35"><a href="#cb405-35" aria-hidden="true"></a></span> -<span id="cb405-36"><a href="#cb405-36" aria-hidden="true"></a>- This is the first item</span> -<span id="cb405-37"><a href="#cb405-37" aria-hidden="true"></a></span> -<span id="cb405-38"><a href="#cb405-38" aria-hidden="true"></a>- This is the second item</span> -<span id="cb405-39"><a href="#cb405-39" aria-hidden="true"></a></span> -<span id="cb405-40"><a href="#cb405-40" aria-hidden="true"></a>- This is the third item</span> -<span id="cb405-41"><a href="#cb405-41" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb405-42"><a href="#cb405-42" aria-hidden="true"></a></span> -<span id="cb405-43"><a href="#cb405-43" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb411"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb411-1"><a href="#cb411-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb411-2"><a href="#cb411-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb411-3"><a href="#cb411-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb411-4"><a href="#cb411-4" aria-hidden="true"></a></span> +<span id="cb411-5"><a href="#cb411-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb411-6"><a href="#cb411-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> +<span id="cb411-7"><a href="#cb411-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb411-8"><a href="#cb411-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> +<span id="cb411-9"><a href="#cb411-9" aria-hidden="true"></a> ,</span> +<span id="cb411-10"><a href="#cb411-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> +<span id="cb411-11"><a href="#cb411-11" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb411-12"><a href="#cb411-12" aria-hidden="true"></a>}</span> +<span id="cb411-13"><a href="#cb411-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> +<span id="cb411-14"><a href="#cb411-14" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> +<span id="cb411-15"><a href="#cb411-15" aria-hidden="true"></a></span> +<span id="cb411-16"><a href="#cb411-16" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb411-17"><a href="#cb411-17" aria-hidden="true"></a>This is a tight list</span> +<span id="cb411-18"><a href="#cb411-18" aria-hidden="true"></a></span> +<span id="cb411-19"><a href="#cb411-19" aria-hidden="true"></a>- the first item</span> +<span id="cb411-20"><a href="#cb411-20" aria-hidden="true"></a>- the second item</span> +<span id="cb411-21"><a href="#cb411-21" aria-hidden="true"></a>- the third item</span> +<span id="cb411-22"><a href="#cb411-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb411-23"><a href="#cb411-23" aria-hidden="true"></a></span> +<span id="cb411-24"><a href="#cb411-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb411-25"><a href="#cb411-25" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb411-26"><a href="#cb411-26" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb411-27"><a href="#cb411-27" aria-hidden="true"></a>}</span> +<span id="cb411-28"><a href="#cb411-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{<span class="fu">\startitemize</span>}</span> +<span id="cb411-29"><a href="#cb411-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="fu">\item</span>}</span> +<span id="cb411-30"><a href="#cb411-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.}</span> +<span id="cb411-31"><a href="#cb411-31" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{<span class="fu">\stopitemize</span>}</span> +<span id="cb411-32"><a href="#cb411-32" aria-hidden="true"></a></span> +<span id="cb411-33"><a href="#cb411-33" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb411-34"><a href="#cb411-34" aria-hidden="true"></a>This is a loose list</span> +<span id="cb411-35"><a href="#cb411-35" aria-hidden="true"></a></span> +<span id="cb411-36"><a href="#cb411-36" aria-hidden="true"></a>- This is the first item</span> +<span id="cb411-37"><a href="#cb411-37" aria-hidden="true"></a></span> +<span id="cb411-38"><a href="#cb411-38" aria-hidden="true"></a>- This is the second item</span> +<span id="cb411-39"><a href="#cb411-39" aria-hidden="true"></a></span> +<span id="cb411-40"><a href="#cb411-40" aria-hidden="true"></a>- This is the third item</span> +<span id="cb411-41"><a href="#cb411-41" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb411-42"><a href="#cb411-42" aria-hidden="true"></a></span> +<span id="cb411-43"><a href="#cb411-43" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb406"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb406-1"><a href="#cb406-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb412"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb412-1"><a href="#cb412-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -5011,68 +5126,68 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererOlEndTight</code> macro represents the end of an ordered list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <code>false</code>. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-25">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb407"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb407-1"><a href="#cb407-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb407-2"><a href="#cb407-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb407-3"><a href="#cb407-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> -<span id="cb407-4"><a href="#cb407-4" aria-hidden="true"></a></span> -<span id="cb407-5"><a href="#cb407-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb407-6"><a href="#cb407-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> -<span id="cb407-7"><a href="#cb407-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb407-8"><a href="#cb407-8" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb407-9"><a href="#cb407-9" aria-hidden="true"></a> the first</span> -<span id="cb407-10"><a href="#cb407-10" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb407-11"><a href="#cb407-11" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb407-12"><a href="#cb407-12" aria-hidden="true"></a> , the second</span> -<span id="cb407-13"><a href="#cb407-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb407-14"><a href="#cb407-14" aria-hidden="true"></a> , and the third</span> -<span id="cb407-15"><a href="#cb407-15" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb407-16"><a href="#cb407-16" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb407-17"><a href="#cb407-17" aria-hidden="true"></a>}</span> -<span id="cb407-18"><a href="#cb407-18" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> -<span id="cb407-19"><a href="#cb407-19" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> -<span id="cb407-20"><a href="#cb407-20" aria-hidden="true"></a></span> -<span id="cb407-21"><a href="#cb407-21" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb407-22"><a href="#cb407-22" aria-hidden="true"></a>This is a tight list</span> -<span id="cb407-23"><a href="#cb407-23" aria-hidden="true"></a></span> -<span id="cb407-24"><a href="#cb407-24" aria-hidden="true"></a>1. item</span> -<span id="cb407-25"><a href="#cb407-25" aria-hidden="true"></a>2. item</span> -<span id="cb407-26"><a href="#cb407-26" aria-hidden="true"></a>3. item</span> -<span id="cb407-27"><a href="#cb407-27" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb407-28"><a href="#cb407-28" aria-hidden="true"></a></span> -<span id="cb407-29"><a href="#cb407-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb407-30"><a href="#cb407-30" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb407-31"><a href="#cb407-31" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb407-32"><a href="#cb407-32" aria-hidden="true"></a>}</span> -<span id="cb407-33"><a href="#cb407-33" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{}</span> -<span id="cb407-34"><a href="#cb407-34" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb407-35"><a href="#cb407-35" aria-hidden="true"></a> #1.<span class="fu">\kern</span> 0.5em<span class="co">%</span></span> -<span id="cb407-36"><a href="#cb407-36" aria-hidden="true"></a> This is the</span> -<span id="cb407-37"><a href="#cb407-37" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb407-38"><a href="#cb407-38" aria-hidden="true"></a> first</span> -<span id="cb407-39"><a href="#cb407-39" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb407-40"><a href="#cb407-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb407-41"><a href="#cb407-41" aria-hidden="true"></a> second</span> -<span id="cb407-42"><a href="#cb407-42" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb407-43"><a href="#cb407-43" aria-hidden="true"></a> third</span> -<span id="cb407-44"><a href="#cb407-44" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb407-45"><a href="#cb407-45" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb407-46"><a href="#cb407-46" aria-hidden="true"></a>}</span> -<span id="cb407-47"><a href="#cb407-47" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb407-48"><a href="#cb407-48" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{}</span> -<span id="cb407-49"><a href="#cb407-49" aria-hidden="true"></a></span> -<span id="cb407-50"><a href="#cb407-50" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb407-51"><a href="#cb407-51" aria-hidden="true"></a>This is a loose list</span> -<span id="cb407-52"><a href="#cb407-52" aria-hidden="true"></a></span> -<span id="cb407-53"><a href="#cb407-53" aria-hidden="true"></a>1. item</span> -<span id="cb407-54"><a href="#cb407-54" aria-hidden="true"></a></span> -<span id="cb407-55"><a href="#cb407-55" aria-hidden="true"></a>2. item</span> -<span id="cb407-56"><a href="#cb407-56" aria-hidden="true"></a></span> -<span id="cb407-57"><a href="#cb407-57" aria-hidden="true"></a>3. item</span> -<span id="cb407-58"><a href="#cb407-58" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb407-59"><a href="#cb407-59" aria-hidden="true"></a></span> -<span id="cb407-60"><a href="#cb407-60" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb413"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb413-1"><a href="#cb413-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb413-2"><a href="#cb413-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb413-3"><a href="#cb413-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> +<span id="cb413-4"><a href="#cb413-4" aria-hidden="true"></a></span> +<span id="cb413-5"><a href="#cb413-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb413-6"><a href="#cb413-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> +<span id="cb413-7"><a href="#cb413-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb413-8"><a href="#cb413-8" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb413-9"><a href="#cb413-9" aria-hidden="true"></a> the first</span> +<span id="cb413-10"><a href="#cb413-10" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb413-11"><a href="#cb413-11" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb413-12"><a href="#cb413-12" aria-hidden="true"></a> , the second</span> +<span id="cb413-13"><a href="#cb413-13" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb413-14"><a href="#cb413-14" aria-hidden="true"></a> , and the third</span> +<span id="cb413-15"><a href="#cb413-15" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb413-16"><a href="#cb413-16" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb413-17"><a href="#cb413-17" aria-hidden="true"></a>}</span> +<span id="cb413-18"><a href="#cb413-18" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> +<span id="cb413-19"><a href="#cb413-19" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> +<span id="cb413-20"><a href="#cb413-20" aria-hidden="true"></a></span> +<span id="cb413-21"><a href="#cb413-21" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb413-22"><a href="#cb413-22" aria-hidden="true"></a>This is a tight list</span> +<span id="cb413-23"><a href="#cb413-23" aria-hidden="true"></a></span> +<span id="cb413-24"><a href="#cb413-24" aria-hidden="true"></a>1. item</span> +<span id="cb413-25"><a href="#cb413-25" aria-hidden="true"></a>2. item</span> +<span id="cb413-26"><a href="#cb413-26" aria-hidden="true"></a>3. item</span> +<span id="cb413-27"><a href="#cb413-27" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb413-28"><a href="#cb413-28" aria-hidden="true"></a></span> +<span id="cb413-29"><a href="#cb413-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb413-30"><a href="#cb413-30" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb413-31"><a href="#cb413-31" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb413-32"><a href="#cb413-32" aria-hidden="true"></a>}</span> +<span id="cb413-33"><a href="#cb413-33" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{}</span> +<span id="cb413-34"><a href="#cb413-34" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb413-35"><a href="#cb413-35" aria-hidden="true"></a> #1.<span class="fu">\kern</span> 0.5em<span class="co">%</span></span> +<span id="cb413-36"><a href="#cb413-36" aria-hidden="true"></a> This is the</span> +<span id="cb413-37"><a href="#cb413-37" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb413-38"><a href="#cb413-38" aria-hidden="true"></a> first</span> +<span id="cb413-39"><a href="#cb413-39" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb413-40"><a href="#cb413-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb413-41"><a href="#cb413-41" aria-hidden="true"></a> second</span> +<span id="cb413-42"><a href="#cb413-42" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb413-43"><a href="#cb413-43" aria-hidden="true"></a> third</span> +<span id="cb413-44"><a href="#cb413-44" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb413-45"><a href="#cb413-45" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb413-46"><a href="#cb413-46" aria-hidden="true"></a>}</span> +<span id="cb413-47"><a href="#cb413-47" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> +<span id="cb413-48"><a href="#cb413-48" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{}</span> +<span id="cb413-49"><a href="#cb413-49" aria-hidden="true"></a></span> +<span id="cb413-50"><a href="#cb413-50" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb413-51"><a href="#cb413-51" aria-hidden="true"></a>This is a loose list</span> +<span id="cb413-52"><a href="#cb413-52" aria-hidden="true"></a></span> +<span id="cb413-53"><a href="#cb413-53" aria-hidden="true"></a>1. item</span> +<span id="cb413-54"><a href="#cb413-54" aria-hidden="true"></a></span> +<span id="cb413-55"><a href="#cb413-55" aria-hidden="true"></a>2. item</span> +<span id="cb413-56"><a href="#cb413-56" aria-hidden="true"></a></span> +<span id="cb413-57"><a href="#cb413-57" aria-hidden="true"></a>3. item</span> +<span id="cb413-58"><a href="#cb413-58" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb413-59"><a href="#cb413-59" aria-hidden="true"></a></span> +<span id="cb413-60"><a href="#cb413-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="cb408"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb408-1"><a href="#cb408-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb414"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb414-1"><a href="#cb414-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -5083,73 +5198,73 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ol> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-48"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-49"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb409"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb409-1"><a href="#cb409-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb409-2"><a href="#cb409-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[tightLists, startNumber]{<span class="ex">markdown</span>}</span> -<span id="cb409-3"><a href="#cb409-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb409-4"><a href="#cb409-4" aria-hidden="true"></a></span> -<span id="cb409-5"><a href="#cb409-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb409-6"><a href="#cb409-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb409-7"><a href="#cb409-7" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb409-8"><a href="#cb409-8" aria-hidden="true"></a> olBeginTight = { (},</span> -<span id="cb409-9"><a href="#cb409-9" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb409-10"><a href="#cb409-10" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb409-11"><a href="#cb409-11" aria-hidden="true"></a> the first</span> -<span id="cb409-12"><a href="#cb409-12" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb409-13"><a href="#cb409-13" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb409-14"><a href="#cb409-14" aria-hidden="true"></a> , the second</span> -<span id="cb409-15"><a href="#cb409-15" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb409-16"><a href="#cb409-16" aria-hidden="true"></a> , and the third</span> -<span id="cb409-17"><a href="#cb409-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb409-18"><a href="#cb409-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb409-19"><a href="#cb409-19" aria-hidden="true"></a> },</span> -<span id="cb409-20"><a href="#cb409-20" aria-hidden="true"></a> olItemEnd = {},</span> -<span id="cb409-21"><a href="#cb409-21" aria-hidden="true"></a> olEndTight = {).},</span> -<span id="cb409-22"><a href="#cb409-22" aria-hidden="true"></a> },</span> -<span id="cb409-23"><a href="#cb409-23" aria-hidden="true"></a>}</span> -<span id="cb409-24"><a href="#cb409-24" aria-hidden="true"></a>This is a tight list</span> -<span id="cb409-25"><a href="#cb409-25" aria-hidden="true"></a></span> -<span id="cb409-26"><a href="#cb409-26" aria-hidden="true"></a>1. item</span> -<span id="cb409-27"><a href="#cb409-27" aria-hidden="true"></a>2. item</span> -<span id="cb409-28"><a href="#cb409-28" aria-hidden="true"></a>3. item</span> -<span id="cb409-29"><a href="#cb409-29" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb409-30"><a href="#cb409-30" aria-hidden="true"></a></span> -<span id="cb409-31"><a href="#cb409-31" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb409-32"><a href="#cb409-32" aria-hidden="true"></a> renderers = {</span> -<span id="cb409-33"><a href="#cb409-33" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb409-34"><a href="#cb409-34" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb409-35"><a href="#cb409-35" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb409-36"><a href="#cb409-36" aria-hidden="true"></a> },</span> -<span id="cb409-37"><a href="#cb409-37" aria-hidden="true"></a> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</span> -<span id="cb409-38"><a href="#cb409-38" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb409-39"><a href="#cb409-39" aria-hidden="true"></a> <span class="fu">\item</span> This is the</span> -<span id="cb409-40"><a href="#cb409-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb409-41"><a href="#cb409-41" aria-hidden="true"></a> first</span> -<span id="cb409-42"><a href="#cb409-42" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb409-43"><a href="#cb409-43" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb409-44"><a href="#cb409-44" aria-hidden="true"></a> second</span> -<span id="cb409-45"><a href="#cb409-45" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb409-46"><a href="#cb409-46" aria-hidden="true"></a> third</span> -<span id="cb409-47"><a href="#cb409-47" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb409-48"><a href="#cb409-48" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb409-49"><a href="#cb409-49" aria-hidden="true"></a> },</span> -<span id="cb409-50"><a href="#cb409-50" aria-hidden="true"></a> olItemEnd = {.},</span> -<span id="cb409-51"><a href="#cb409-51" aria-hidden="true"></a> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</span> -<span id="cb409-52"><a href="#cb409-52" aria-hidden="true"></a> },</span> -<span id="cb409-53"><a href="#cb409-53" aria-hidden="true"></a>}</span> -<span id="cb409-54"><a href="#cb409-54" aria-hidden="true"></a>This is a loose list</span> -<span id="cb409-55"><a href="#cb409-55" aria-hidden="true"></a></span> -<span id="cb409-56"><a href="#cb409-56" aria-hidden="true"></a>1. item</span> -<span id="cb409-57"><a href="#cb409-57" aria-hidden="true"></a></span> -<span id="cb409-58"><a href="#cb409-58" aria-hidden="true"></a>2. item</span> -<span id="cb409-59"><a href="#cb409-59" aria-hidden="true"></a></span> -<span id="cb409-60"><a href="#cb409-60" aria-hidden="true"></a>3. item</span> -<span id="cb409-61"><a href="#cb409-61" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb409-62"><a href="#cb409-62" aria-hidden="true"></a></span> -<span id="cb409-63"><a href="#cb409-63" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb415"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb415-1"><a href="#cb415-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb415-2"><a href="#cb415-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[tightLists, startNumber]{<span class="ex">markdown</span>}</span> +<span id="cb415-3"><a href="#cb415-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb415-4"><a href="#cb415-4" aria-hidden="true"></a></span> +<span id="cb415-5"><a href="#cb415-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb415-6"><a href="#cb415-6" aria-hidden="true"></a> renderers = {</span> +<span id="cb415-7"><a href="#cb415-7" aria-hidden="true"></a> interblockSeparator = {},</span> +<span id="cb415-8"><a href="#cb415-8" aria-hidden="true"></a> olBeginTight = { (},</span> +<span id="cb415-9"><a href="#cb415-9" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> +<span id="cb415-10"><a href="#cb415-10" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb415-11"><a href="#cb415-11" aria-hidden="true"></a> the first</span> +<span id="cb415-12"><a href="#cb415-12" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb415-13"><a href="#cb415-13" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb415-14"><a href="#cb415-14" aria-hidden="true"></a> , the second</span> +<span id="cb415-15"><a href="#cb415-15" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb415-16"><a href="#cb415-16" aria-hidden="true"></a> , and the third</span> +<span id="cb415-17"><a href="#cb415-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb415-18"><a href="#cb415-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb415-19"><a href="#cb415-19" aria-hidden="true"></a> },</span> +<span id="cb415-20"><a href="#cb415-20" aria-hidden="true"></a> olItemEnd = {},</span> +<span id="cb415-21"><a href="#cb415-21" aria-hidden="true"></a> olEndTight = {).},</span> +<span id="cb415-22"><a href="#cb415-22" aria-hidden="true"></a> },</span> +<span id="cb415-23"><a href="#cb415-23" aria-hidden="true"></a>}</span> +<span id="cb415-24"><a href="#cb415-24" aria-hidden="true"></a>This is a tight list</span> +<span id="cb415-25"><a href="#cb415-25" aria-hidden="true"></a></span> +<span id="cb415-26"><a href="#cb415-26" aria-hidden="true"></a>1. item</span> +<span id="cb415-27"><a href="#cb415-27" aria-hidden="true"></a>2. item</span> +<span id="cb415-28"><a href="#cb415-28" aria-hidden="true"></a>3. item</span> +<span id="cb415-29"><a href="#cb415-29" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb415-30"><a href="#cb415-30" aria-hidden="true"></a></span> +<span id="cb415-31"><a href="#cb415-31" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb415-32"><a href="#cb415-32" aria-hidden="true"></a> renderers = {</span> +<span id="cb415-33"><a href="#cb415-33" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb415-34"><a href="#cb415-34" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb415-35"><a href="#cb415-35" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb415-36"><a href="#cb415-36" aria-hidden="true"></a> },</span> +<span id="cb415-37"><a href="#cb415-37" aria-hidden="true"></a> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</span> +<span id="cb415-38"><a href="#cb415-38" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> +<span id="cb415-39"><a href="#cb415-39" aria-hidden="true"></a> <span class="fu">\item</span> This is the</span> +<span id="cb415-40"><a href="#cb415-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb415-41"><a href="#cb415-41" aria-hidden="true"></a> first</span> +<span id="cb415-42"><a href="#cb415-42" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb415-43"><a href="#cb415-43" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb415-44"><a href="#cb415-44" aria-hidden="true"></a> second</span> +<span id="cb415-45"><a href="#cb415-45" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb415-46"><a href="#cb415-46" aria-hidden="true"></a> third</span> +<span id="cb415-47"><a href="#cb415-47" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb415-48"><a href="#cb415-48" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb415-49"><a href="#cb415-49" aria-hidden="true"></a> },</span> +<span id="cb415-50"><a href="#cb415-50" aria-hidden="true"></a> olItemEnd = {.},</span> +<span id="cb415-51"><a href="#cb415-51" aria-hidden="true"></a> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</span> +<span id="cb415-52"><a href="#cb415-52" aria-hidden="true"></a> },</span> +<span id="cb415-53"><a href="#cb415-53" aria-hidden="true"></a>}</span> +<span id="cb415-54"><a href="#cb415-54" aria-hidden="true"></a>This is a loose list</span> +<span id="cb415-55"><a href="#cb415-55" aria-hidden="true"></a></span> +<span id="cb415-56"><a href="#cb415-56" aria-hidden="true"></a>1. item</span> +<span id="cb415-57"><a href="#cb415-57" aria-hidden="true"></a></span> +<span id="cb415-58"><a href="#cb415-58" aria-hidden="true"></a>2. item</span> +<span id="cb415-59"><a href="#cb415-59" aria-hidden="true"></a></span> +<span id="cb415-60"><a href="#cb415-60" aria-hidden="true"></a>3. item</span> +<span id="cb415-61"><a href="#cb415-61" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb415-62"><a href="#cb415-62" aria-hidden="true"></a></span> +<span id="cb415-63"><a href="#cb415-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="cb410"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb410-1"><a href="#cb410-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb416"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb416-1"><a href="#cb416-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -5162,69 +5277,69 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-37">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb411"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb411-1"><a href="#cb411-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb411-2"><a href="#cb411-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb411-3"><a href="#cb411-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> -<span id="cb411-4"><a href="#cb411-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb411-5"><a href="#cb411-5" aria-hidden="true"></a></span> -<span id="cb411-6"><a href="#cb411-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb411-7"><a href="#cb411-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> -<span id="cb411-8"><a href="#cb411-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb411-9"><a href="#cb411-9" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb411-10"><a href="#cb411-10" aria-hidden="true"></a> the first</span> -<span id="cb411-11"><a href="#cb411-11" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb411-12"><a href="#cb411-12" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb411-13"><a href="#cb411-13" aria-hidden="true"></a> , the second</span> -<span id="cb411-14"><a href="#cb411-14" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb411-15"><a href="#cb411-15" aria-hidden="true"></a> , and the third</span> -<span id="cb411-16"><a href="#cb411-16" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb411-17"><a href="#cb411-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb411-18"><a href="#cb411-18" aria-hidden="true"></a>}</span> -<span id="cb411-19"><a href="#cb411-19" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> -<span id="cb411-20"><a href="#cb411-20" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> -<span id="cb411-21"><a href="#cb411-21" aria-hidden="true"></a></span> -<span id="cb411-22"><a href="#cb411-22" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb411-23"><a href="#cb411-23" aria-hidden="true"></a>This is a tight list</span> -<span id="cb411-24"><a href="#cb411-24" aria-hidden="true"></a></span> -<span id="cb411-25"><a href="#cb411-25" aria-hidden="true"></a>1. item</span> -<span id="cb411-26"><a href="#cb411-26" aria-hidden="true"></a>2. item</span> -<span id="cb411-27"><a href="#cb411-27" aria-hidden="true"></a>3. item</span> -<span id="cb411-28"><a href="#cb411-28" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb411-29"><a href="#cb411-29" aria-hidden="true"></a></span> -<span id="cb411-30"><a href="#cb411-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb411-31"><a href="#cb411-31" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb411-32"><a href="#cb411-32" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb411-33"><a href="#cb411-33" aria-hidden="true"></a>}</span> -<span id="cb411-34"><a href="#cb411-34" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{<span class="fu">\startitemize</span>}</span> -<span id="cb411-35"><a href="#cb411-35" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb411-36"><a href="#cb411-36" aria-hidden="true"></a> <span class="fu">\sym</span>{#1.}</span> -<span id="cb411-37"><a href="#cb411-37" aria-hidden="true"></a> This is the</span> -<span id="cb411-38"><a href="#cb411-38" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb411-39"><a href="#cb411-39" aria-hidden="true"></a> first</span> -<span id="cb411-40"><a href="#cb411-40" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb411-41"><a href="#cb411-41" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb411-42"><a href="#cb411-42" aria-hidden="true"></a> second</span> -<span id="cb411-43"><a href="#cb411-43" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb411-44"><a href="#cb411-44" aria-hidden="true"></a> third</span> -<span id="cb411-45"><a href="#cb411-45" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb411-46"><a href="#cb411-46" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb411-47"><a href="#cb411-47" aria-hidden="true"></a>}</span> -<span id="cb411-48"><a href="#cb411-48" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb411-49"><a href="#cb411-49" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb411-50"><a href="#cb411-50" aria-hidden="true"></a></span> -<span id="cb411-51"><a href="#cb411-51" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb411-52"><a href="#cb411-52" aria-hidden="true"></a>This is a loose list</span> -<span id="cb411-53"><a href="#cb411-53" aria-hidden="true"></a></span> -<span id="cb411-54"><a href="#cb411-54" aria-hidden="true"></a>1. item</span> -<span id="cb411-55"><a href="#cb411-55" aria-hidden="true"></a></span> -<span id="cb411-56"><a href="#cb411-56" aria-hidden="true"></a>2. item</span> -<span id="cb411-57"><a href="#cb411-57" aria-hidden="true"></a></span> -<span id="cb411-58"><a href="#cb411-58" aria-hidden="true"></a>3. item</span> -<span id="cb411-59"><a href="#cb411-59" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb411-60"><a href="#cb411-60" aria-hidden="true"></a></span> -<span id="cb411-61"><a href="#cb411-61" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb417"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb417-1"><a href="#cb417-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb417-2"><a href="#cb417-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb417-3"><a href="#cb417-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> +<span id="cb417-4"><a href="#cb417-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb417-5"><a href="#cb417-5" aria-hidden="true"></a></span> +<span id="cb417-6"><a href="#cb417-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb417-7"><a href="#cb417-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> +<span id="cb417-8"><a href="#cb417-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb417-9"><a href="#cb417-9" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb417-10"><a href="#cb417-10" aria-hidden="true"></a> the first</span> +<span id="cb417-11"><a href="#cb417-11" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb417-12"><a href="#cb417-12" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb417-13"><a href="#cb417-13" aria-hidden="true"></a> , the second</span> +<span id="cb417-14"><a href="#cb417-14" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb417-15"><a href="#cb417-15" aria-hidden="true"></a> , and the third</span> +<span id="cb417-16"><a href="#cb417-16" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb417-17"><a href="#cb417-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb417-18"><a href="#cb417-18" aria-hidden="true"></a>}</span> +<span id="cb417-19"><a href="#cb417-19" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> +<span id="cb417-20"><a href="#cb417-20" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> +<span id="cb417-21"><a href="#cb417-21" aria-hidden="true"></a></span> +<span id="cb417-22"><a href="#cb417-22" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb417-23"><a href="#cb417-23" aria-hidden="true"></a>This is a tight list</span> +<span id="cb417-24"><a href="#cb417-24" aria-hidden="true"></a></span> +<span id="cb417-25"><a href="#cb417-25" aria-hidden="true"></a>1. item</span> +<span id="cb417-26"><a href="#cb417-26" aria-hidden="true"></a>2. item</span> +<span id="cb417-27"><a href="#cb417-27" aria-hidden="true"></a>3. item</span> +<span id="cb417-28"><a href="#cb417-28" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb417-29"><a href="#cb417-29" aria-hidden="true"></a></span> +<span id="cb417-30"><a href="#cb417-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb417-31"><a href="#cb417-31" aria-hidden="true"></a> :<span class="fu">\par</span></span> +<span id="cb417-32"><a href="#cb417-32" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb417-33"><a href="#cb417-33" aria-hidden="true"></a>}</span> +<span id="cb417-34"><a href="#cb417-34" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{<span class="fu">\startitemize</span>}</span> +<span id="cb417-35"><a href="#cb417-35" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> +<span id="cb417-36"><a href="#cb417-36" aria-hidden="true"></a> <span class="fu">\sym</span>{#1.}</span> +<span id="cb417-37"><a href="#cb417-37" aria-hidden="true"></a> This is the</span> +<span id="cb417-38"><a href="#cb417-38" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> +<span id="cb417-39"><a href="#cb417-39" aria-hidden="true"></a> first</span> +<span id="cb417-40"><a href="#cb417-40" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb417-41"><a href="#cb417-41" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> +<span id="cb417-42"><a href="#cb417-42" aria-hidden="true"></a> second</span> +<span id="cb417-43"><a href="#cb417-43" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb417-44"><a href="#cb417-44" aria-hidden="true"></a> third</span> +<span id="cb417-45"><a href="#cb417-45" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb417-46"><a href="#cb417-46" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb417-47"><a href="#cb417-47" aria-hidden="true"></a>}</span> +<span id="cb417-48"><a href="#cb417-48" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> +<span id="cb417-49"><a href="#cb417-49" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{<span class="fu">\stopitemize</span>}</span> +<span id="cb417-50"><a href="#cb417-50" aria-hidden="true"></a></span> +<span id="cb417-51"><a href="#cb417-51" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb417-52"><a href="#cb417-52" aria-hidden="true"></a>This is a loose list</span> +<span id="cb417-53"><a href="#cb417-53" aria-hidden="true"></a></span> +<span id="cb417-54"><a href="#cb417-54" aria-hidden="true"></a>1. item</span> +<span id="cb417-55"><a href="#cb417-55" aria-hidden="true"></a></span> +<span id="cb417-56"><a href="#cb417-56" aria-hidden="true"></a>2. item</span> +<span id="cb417-57"><a href="#cb417-57" aria-hidden="true"></a></span> +<span id="cb417-58"><a href="#cb417-58" aria-hidden="true"></a>3. item</span> +<span id="cb417-59"><a href="#cb417-59" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb417-60"><a href="#cb417-60" aria-hidden="true"></a></span> +<span id="cb417-61"><a href="#cb417-61" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb412"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb412-1"><a href="#cb412-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb418"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb418-1"><a href="#cb418-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -5247,86 +5362,86 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererDlEndTight</code> macro represents the end of a definition list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <code>false</code>. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-26">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb413"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb413-1"><a href="#cb413-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb413-2"><a href="#cb413-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> -<span id="cb413-3"><a href="#cb413-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb413-4"><a href="#cb413-4" aria-hidden="true"></a></span> -<span id="cb413-5"><a href="#cb413-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb413-6"><a href="#cb413-6" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb413-7"><a href="#cb413-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb413-8"><a href="#cb413-8" aria-hidden="true"></a>}</span> -<span id="cb413-9"><a href="#cb413-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{<span class="co">%</span></span> -<span id="cb413-10"><a href="#cb413-10" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb413-11"><a href="#cb413-11" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</span> -<span id="cb413-12"><a href="#cb413-12" aria-hidden="true"></a>}</span> -<span id="cb413-13"><a href="#cb413-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb413-14"><a href="#cb413-14" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> -<span id="cb413-15"><a href="#cb413-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb413-16"><a href="#cb413-16" aria-hidden="true"></a> ,</span> -<span id="cb413-17"><a href="#cb413-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb413-18"><a href="#cb413-18" aria-hidden="true"></a> , and</span> -<span id="cb413-19"><a href="#cb413-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb413-20"><a href="#cb413-20" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb413-21"><a href="#cb413-21" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb413-22"><a href="#cb413-22" aria-hidden="true"></a>}</span> -<span id="cb413-23"><a href="#cb413-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb413-24"><a href="#cb413-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="cb413-25"><a href="#cb413-25" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{<span class="fu">\endgroup</span>}</span> -<span id="cb413-26"><a href="#cb413-26" aria-hidden="true"></a></span> -<span id="cb413-27"><a href="#cb413-27" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb413-28"><a href="#cb413-28" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb413-29"><a href="#cb413-29" aria-hidden="true"></a></span> -<span id="cb413-30"><a href="#cb413-30" aria-hidden="true"></a>Coffee</span> -<span id="cb413-31"><a href="#cb413-31" aria-hidden="true"></a>: black hot drink</span> -<span id="cb413-32"><a href="#cb413-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb413-33"><a href="#cb413-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb413-34"><a href="#cb413-34" aria-hidden="true"></a></span> -<span id="cb413-35"><a href="#cb413-35" aria-hidden="true"></a>Milk</span> -<span id="cb413-36"><a href="#cb413-36" aria-hidden="true"></a>: white cold drink</span> -<span id="cb413-37"><a href="#cb413-37" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb413-38"><a href="#cb413-38" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb413-39"><a href="#cb413-39" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb413-40"><a href="#cb413-40" aria-hidden="true"></a></span> -<span id="cb413-41"><a href="#cb413-41" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb413-42"><a href="#cb413-42" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb413-43"><a href="#cb413-43" aria-hidden="true"></a>}</span> -<span id="cb413-44"><a href="#cb413-44" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> -<span id="cb413-45"><a href="#cb413-45" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb413-46"><a href="#cb413-46" aria-hidden="true"></a> . #1 is a</span> -<span id="cb413-47"><a href="#cb413-47" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb413-48"><a href="#cb413-48" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb413-49"><a href="#cb413-49" aria-hidden="true"></a> ,</span> -<span id="cb413-50"><a href="#cb413-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb413-51"><a href="#cb413-51" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb413-52"><a href="#cb413-52" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb413-53"><a href="#cb413-53" aria-hidden="true"></a>}</span> -<span id="cb413-54"><a href="#cb413-54" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb413-55"><a href="#cb413-55" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> -<span id="cb413-56"><a href="#cb413-56" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> -<span id="cb413-57"><a href="#cb413-57" aria-hidden="true"></a></span> -<span id="cb413-58"><a href="#cb413-58" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb413-59"><a href="#cb413-59" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb413-60"><a href="#cb413-60" aria-hidden="true"></a></span> -<span id="cb413-61"><a href="#cb413-61" aria-hidden="true"></a>Coffee</span> -<span id="cb413-62"><a href="#cb413-62" aria-hidden="true"></a></span> -<span id="cb413-63"><a href="#cb413-63" aria-hidden="true"></a>: black hot drink</span> -<span id="cb413-64"><a href="#cb413-64" aria-hidden="true"></a></span> -<span id="cb413-65"><a href="#cb413-65" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb413-66"><a href="#cb413-66" aria-hidden="true"></a></span> -<span id="cb413-67"><a href="#cb413-67" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb413-68"><a href="#cb413-68" aria-hidden="true"></a></span> -<span id="cb413-69"><a href="#cb413-69" aria-hidden="true"></a>Milk</span> -<span id="cb413-70"><a href="#cb413-70" aria-hidden="true"></a></span> -<span id="cb413-71"><a href="#cb413-71" aria-hidden="true"></a>: white cold drink</span> -<span id="cb413-72"><a href="#cb413-72" aria-hidden="true"></a></span> -<span id="cb413-73"><a href="#cb413-73" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb413-74"><a href="#cb413-74" aria-hidden="true"></a></span> -<span id="cb413-75"><a href="#cb413-75" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb413-76"><a href="#cb413-76" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb413-77"><a href="#cb413-77" aria-hidden="true"></a></span> -<span id="cb413-78"><a href="#cb413-78" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb419"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb419-1"><a href="#cb419-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb419-2"><a href="#cb419-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> +<span id="cb419-3"><a href="#cb419-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb419-4"><a href="#cb419-4" aria-hidden="true"></a></span> +<span id="cb419-5"><a href="#cb419-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb419-6"><a href="#cb419-6" aria-hidden="true"></a> :<span class="co">%</span></span> +<span id="cb419-7"><a href="#cb419-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb419-8"><a href="#cb419-8" aria-hidden="true"></a>}</span> +<span id="cb419-9"><a href="#cb419-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{<span class="co">%</span></span> +<span id="cb419-10"><a href="#cb419-10" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> +<span id="cb419-11"><a href="#cb419-11" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</span> +<span id="cb419-12"><a href="#cb419-12" aria-hidden="true"></a>}</span> +<span id="cb419-13"><a href="#cb419-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb419-14"><a href="#cb419-14" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> +<span id="cb419-15"><a href="#cb419-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb419-16"><a href="#cb419-16" aria-hidden="true"></a> ,</span> +<span id="cb419-17"><a href="#cb419-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb419-18"><a href="#cb419-18" aria-hidden="true"></a> , and</span> +<span id="cb419-19"><a href="#cb419-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> +<span id="cb419-20"><a href="#cb419-20" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb419-21"><a href="#cb419-21" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb419-22"><a href="#cb419-22" aria-hidden="true"></a>}</span> +<span id="cb419-23"><a href="#cb419-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> +<span id="cb419-24"><a href="#cb419-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="cb419-25"><a href="#cb419-25" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{<span class="fu">\endgroup</span>}</span> +<span id="cb419-26"><a href="#cb419-26" aria-hidden="true"></a></span> +<span id="cb419-27"><a href="#cb419-27" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb419-28"><a href="#cb419-28" aria-hidden="true"></a>This is a tight definition list</span> +<span id="cb419-29"><a href="#cb419-29" aria-hidden="true"></a></span> +<span id="cb419-30"><a href="#cb419-30" aria-hidden="true"></a>Coffee</span> +<span id="cb419-31"><a href="#cb419-31" aria-hidden="true"></a>: black hot drink</span> +<span id="cb419-32"><a href="#cb419-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb419-33"><a href="#cb419-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb419-34"><a href="#cb419-34" aria-hidden="true"></a></span> +<span id="cb419-35"><a href="#cb419-35" aria-hidden="true"></a>Milk</span> +<span id="cb419-36"><a href="#cb419-36" aria-hidden="true"></a>: white cold drink</span> +<span id="cb419-37"><a href="#cb419-37" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb419-38"><a href="#cb419-38" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb419-39"><a href="#cb419-39" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb419-40"><a href="#cb419-40" aria-hidden="true"></a></span> +<span id="cb419-41"><a href="#cb419-41" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb419-42"><a href="#cb419-42" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb419-43"><a href="#cb419-43" aria-hidden="true"></a>}</span> +<span id="cb419-44"><a href="#cb419-44" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> +<span id="cb419-45"><a href="#cb419-45" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb419-46"><a href="#cb419-46" aria-hidden="true"></a> . #1 is a</span> +<span id="cb419-47"><a href="#cb419-47" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb419-48"><a href="#cb419-48" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb419-49"><a href="#cb419-49" aria-hidden="true"></a> ,</span> +<span id="cb419-50"><a href="#cb419-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> +<span id="cb419-51"><a href="#cb419-51" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb419-52"><a href="#cb419-52" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb419-53"><a href="#cb419-53" aria-hidden="true"></a>}</span> +<span id="cb419-54"><a href="#cb419-54" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> +<span id="cb419-55"><a href="#cb419-55" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> +<span id="cb419-56"><a href="#cb419-56" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> +<span id="cb419-57"><a href="#cb419-57" aria-hidden="true"></a></span> +<span id="cb419-58"><a href="#cb419-58" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb419-59"><a href="#cb419-59" aria-hidden="true"></a>This is a loose definition list</span> +<span id="cb419-60"><a href="#cb419-60" aria-hidden="true"></a></span> +<span id="cb419-61"><a href="#cb419-61" aria-hidden="true"></a>Coffee</span> +<span id="cb419-62"><a href="#cb419-62" aria-hidden="true"></a></span> +<span id="cb419-63"><a href="#cb419-63" aria-hidden="true"></a>: black hot drink</span> +<span id="cb419-64"><a href="#cb419-64" aria-hidden="true"></a></span> +<span id="cb419-65"><a href="#cb419-65" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb419-66"><a href="#cb419-66" aria-hidden="true"></a></span> +<span id="cb419-67"><a href="#cb419-67" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb419-68"><a href="#cb419-68" aria-hidden="true"></a></span> +<span id="cb419-69"><a href="#cb419-69" aria-hidden="true"></a>Milk</span> +<span id="cb419-70"><a href="#cb419-70" aria-hidden="true"></a></span> +<span id="cb419-71"><a href="#cb419-71" aria-hidden="true"></a>: white cold drink</span> +<span id="cb419-72"><a href="#cb419-72" aria-hidden="true"></a></span> +<span id="cb419-73"><a href="#cb419-73" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb419-74"><a href="#cb419-74" aria-hidden="true"></a></span> +<span id="cb419-75"><a href="#cb419-75" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb419-76"><a href="#cb419-76" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb419-77"><a href="#cb419-77" aria-hidden="true"></a></span> +<span id="cb419-78"><a href="#cb419-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="cb414"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb414-1"><a href="#cb414-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb420"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb420-1"><a href="#cb420-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight definition list:</p> @@ -5344,90 +5459,90 @@ Thomas,Edison,1847</code></pre> </ul> <p>This is a loose definition list. Coffee is a black hot drink, prepared from roasted coffee beans, and one of the most traded agricultural commodities in the world. Milk is a white cold drink, nutrient-rich, and produced on an industrial scale.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-49"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-50"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb415"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb415-1"><a href="#cb415-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb415-2"><a href="#cb415-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</span> -<span id="cb415-3"><a href="#cb415-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb415-4"><a href="#cb415-4" aria-hidden="true"></a></span> -<span id="cb415-5"><a href="#cb415-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb415-6"><a href="#cb415-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb415-7"><a href="#cb415-7" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb415-8"><a href="#cb415-8" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb415-9"><a href="#cb415-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb415-10"><a href="#cb415-10" aria-hidden="true"></a> },</span> -<span id="cb415-11"><a href="#cb415-11" aria-hidden="true"></a> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</span> -<span id="cb415-12"><a href="#cb415-12" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> -<span id="cb415-13"><a href="#cb415-13" aria-hidden="true"></a> <span class="fu">\item</span>[#1]</span> -<span id="cb415-14"><a href="#cb415-14" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</span> -<span id="cb415-15"><a href="#cb415-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb415-16"><a href="#cb415-16" aria-hidden="true"></a> ,</span> -<span id="cb415-17"><a href="#cb415-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb415-18"><a href="#cb415-18" aria-hidden="true"></a> , and</span> -<span id="cb415-19"><a href="#cb415-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb415-20"><a href="#cb415-20" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb415-21"><a href="#cb415-21" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb415-22"><a href="#cb415-22" aria-hidden="true"></a> },</span> -<span id="cb415-23"><a href="#cb415-23" aria-hidden="true"></a> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> -<span id="cb415-24"><a href="#cb415-24" aria-hidden="true"></a> dlDefinitionBegin = <span class="fu">\item</span>,</span> -<span id="cb415-25"><a href="#cb415-25" aria-hidden="true"></a> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</span> -<span id="cb415-26"><a href="#cb415-26" aria-hidden="true"></a> },</span> -<span id="cb415-27"><a href="#cb415-27" aria-hidden="true"></a>}</span> -<span id="cb415-28"><a href="#cb415-28" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb415-29"><a href="#cb415-29" aria-hidden="true"></a></span> -<span id="cb415-30"><a href="#cb415-30" aria-hidden="true"></a>Coffee</span> -<span id="cb415-31"><a href="#cb415-31" aria-hidden="true"></a>: black hot drink</span> -<span id="cb415-32"><a href="#cb415-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb415-33"><a href="#cb415-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb415-34"><a href="#cb415-34" aria-hidden="true"></a></span> -<span id="cb415-35"><a href="#cb415-35" aria-hidden="true"></a>Milk</span> -<span id="cb415-36"><a href="#cb415-36" aria-hidden="true"></a>: white cold drink</span> -<span id="cb415-37"><a href="#cb415-37" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb415-38"><a href="#cb415-38" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb415-39"><a href="#cb415-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb415-40"><a href="#cb415-40" aria-hidden="true"></a></span> -<span id="cb415-41"><a href="#cb415-41" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb415-42"><a href="#cb415-42" aria-hidden="true"></a> renderers = {</span> -<span id="cb415-43"><a href="#cb415-43" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb415-44"><a href="#cb415-44" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb415-45"><a href="#cb415-45" aria-hidden="true"></a> },</span> -<span id="cb415-46"><a href="#cb415-46" aria-hidden="true"></a> dlBegin = {},</span> -<span id="cb415-47"><a href="#cb415-47" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> -<span id="cb415-48"><a href="#cb415-48" aria-hidden="true"></a> . #1 is a</span> -<span id="cb415-49"><a href="#cb415-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb415-50"><a href="#cb415-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb415-51"><a href="#cb415-51" aria-hidden="true"></a> ,</span> -<span id="cb415-52"><a href="#cb415-52" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb415-53"><a href="#cb415-53" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb415-54"><a href="#cb415-54" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb415-55"><a href="#cb415-55" aria-hidden="true"></a> },</span> -<span id="cb415-56"><a href="#cb415-56" aria-hidden="true"></a> dlItemEnd = {},</span> -<span id="cb415-57"><a href="#cb415-57" aria-hidden="true"></a> dlDefinitionEnd = {},</span> -<span id="cb415-58"><a href="#cb415-58" aria-hidden="true"></a> dlEnd = {.},</span> -<span id="cb415-59"><a href="#cb415-59" aria-hidden="true"></a> },</span> -<span id="cb415-60"><a href="#cb415-60" aria-hidden="true"></a>}</span> -<span id="cb415-61"><a href="#cb415-61" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb415-62"><a href="#cb415-62" aria-hidden="true"></a></span> -<span id="cb415-63"><a href="#cb415-63" aria-hidden="true"></a>Coffee</span> -<span id="cb415-64"><a href="#cb415-64" aria-hidden="true"></a></span> -<span id="cb415-65"><a href="#cb415-65" aria-hidden="true"></a>: black hot drink</span> -<span id="cb415-66"><a href="#cb415-66" aria-hidden="true"></a></span> -<span id="cb415-67"><a href="#cb415-67" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb415-68"><a href="#cb415-68" aria-hidden="true"></a></span> -<span id="cb415-69"><a href="#cb415-69" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb415-70"><a href="#cb415-70" aria-hidden="true"></a></span> -<span id="cb415-71"><a href="#cb415-71" aria-hidden="true"></a>Milk</span> -<span id="cb415-72"><a href="#cb415-72" aria-hidden="true"></a></span> -<span id="cb415-73"><a href="#cb415-73" aria-hidden="true"></a>: white cold drink</span> -<span id="cb415-74"><a href="#cb415-74" aria-hidden="true"></a></span> -<span id="cb415-75"><a href="#cb415-75" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb415-76"><a href="#cb415-76" aria-hidden="true"></a></span> -<span id="cb415-77"><a href="#cb415-77" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb415-78"><a href="#cb415-78" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb415-79"><a href="#cb415-79" aria-hidden="true"></a></span> -<span id="cb415-80"><a href="#cb415-80" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb421"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb421-1"><a href="#cb421-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb421-2"><a href="#cb421-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</span> +<span id="cb421-3"><a href="#cb421-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb421-4"><a href="#cb421-4" aria-hidden="true"></a></span> +<span id="cb421-5"><a href="#cb421-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb421-6"><a href="#cb421-6" aria-hidden="true"></a> renderers = {</span> +<span id="cb421-7"><a href="#cb421-7" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb421-8"><a href="#cb421-8" aria-hidden="true"></a> :<span class="co">%</span></span> +<span id="cb421-9"><a href="#cb421-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb421-10"><a href="#cb421-10" aria-hidden="true"></a> },</span> +<span id="cb421-11"><a href="#cb421-11" aria-hidden="true"></a> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</span> +<span id="cb421-12"><a href="#cb421-12" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> +<span id="cb421-13"><a href="#cb421-13" aria-hidden="true"></a> <span class="fu">\item</span>[#1]</span> +<span id="cb421-14"><a href="#cb421-14" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</span> +<span id="cb421-15"><a href="#cb421-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb421-16"><a href="#cb421-16" aria-hidden="true"></a> ,</span> +<span id="cb421-17"><a href="#cb421-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb421-18"><a href="#cb421-18" aria-hidden="true"></a> , and</span> +<span id="cb421-19"><a href="#cb421-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> +<span id="cb421-20"><a href="#cb421-20" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb421-21"><a href="#cb421-21" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb421-22"><a href="#cb421-22" aria-hidden="true"></a> },</span> +<span id="cb421-23"><a href="#cb421-23" aria-hidden="true"></a> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> +<span id="cb421-24"><a href="#cb421-24" aria-hidden="true"></a> dlDefinitionBegin = <span class="fu">\item</span>,</span> +<span id="cb421-25"><a href="#cb421-25" aria-hidden="true"></a> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</span> +<span id="cb421-26"><a href="#cb421-26" aria-hidden="true"></a> },</span> +<span id="cb421-27"><a href="#cb421-27" aria-hidden="true"></a>}</span> +<span id="cb421-28"><a href="#cb421-28" aria-hidden="true"></a>This is a tight definition list</span> +<span id="cb421-29"><a href="#cb421-29" aria-hidden="true"></a></span> +<span id="cb421-30"><a href="#cb421-30" aria-hidden="true"></a>Coffee</span> +<span id="cb421-31"><a href="#cb421-31" aria-hidden="true"></a>: black hot drink</span> +<span id="cb421-32"><a href="#cb421-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb421-33"><a href="#cb421-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb421-34"><a href="#cb421-34" aria-hidden="true"></a></span> +<span id="cb421-35"><a href="#cb421-35" aria-hidden="true"></a>Milk</span> +<span id="cb421-36"><a href="#cb421-36" aria-hidden="true"></a>: white cold drink</span> +<span id="cb421-37"><a href="#cb421-37" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb421-38"><a href="#cb421-38" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb421-39"><a href="#cb421-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb421-40"><a href="#cb421-40" aria-hidden="true"></a></span> +<span id="cb421-41"><a href="#cb421-41" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb421-42"><a href="#cb421-42" aria-hidden="true"></a> renderers = {</span> +<span id="cb421-43"><a href="#cb421-43" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> +<span id="cb421-44"><a href="#cb421-44" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb421-45"><a href="#cb421-45" aria-hidden="true"></a> },</span> +<span id="cb421-46"><a href="#cb421-46" aria-hidden="true"></a> dlBegin = {},</span> +<span id="cb421-47"><a href="#cb421-47" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> +<span id="cb421-48"><a href="#cb421-48" aria-hidden="true"></a> . #1 is a</span> +<span id="cb421-49"><a href="#cb421-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb421-50"><a href="#cb421-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb421-51"><a href="#cb421-51" aria-hidden="true"></a> ,</span> +<span id="cb421-52"><a href="#cb421-52" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> +<span id="cb421-53"><a href="#cb421-53" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb421-54"><a href="#cb421-54" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb421-55"><a href="#cb421-55" aria-hidden="true"></a> },</span> +<span id="cb421-56"><a href="#cb421-56" aria-hidden="true"></a> dlItemEnd = {},</span> +<span id="cb421-57"><a href="#cb421-57" aria-hidden="true"></a> dlDefinitionEnd = {},</span> +<span id="cb421-58"><a href="#cb421-58" aria-hidden="true"></a> dlEnd = {.},</span> +<span id="cb421-59"><a href="#cb421-59" aria-hidden="true"></a> },</span> +<span id="cb421-60"><a href="#cb421-60" aria-hidden="true"></a>}</span> +<span id="cb421-61"><a href="#cb421-61" aria-hidden="true"></a>This is a loose definition list</span> +<span id="cb421-62"><a href="#cb421-62" aria-hidden="true"></a></span> +<span id="cb421-63"><a href="#cb421-63" aria-hidden="true"></a>Coffee</span> +<span id="cb421-64"><a href="#cb421-64" aria-hidden="true"></a></span> +<span id="cb421-65"><a href="#cb421-65" aria-hidden="true"></a>: black hot drink</span> +<span id="cb421-66"><a href="#cb421-66" aria-hidden="true"></a></span> +<span id="cb421-67"><a href="#cb421-67" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb421-68"><a href="#cb421-68" aria-hidden="true"></a></span> +<span id="cb421-69"><a href="#cb421-69" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb421-70"><a href="#cb421-70" aria-hidden="true"></a></span> +<span id="cb421-71"><a href="#cb421-71" aria-hidden="true"></a>Milk</span> +<span id="cb421-72"><a href="#cb421-72" aria-hidden="true"></a></span> +<span id="cb421-73"><a href="#cb421-73" aria-hidden="true"></a>: white cold drink</span> +<span id="cb421-74"><a href="#cb421-74" aria-hidden="true"></a></span> +<span id="cb421-75"><a href="#cb421-75" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb421-76"><a href="#cb421-76" aria-hidden="true"></a></span> +<span id="cb421-77"><a href="#cb421-77" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb421-78"><a href="#cb421-78" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb421-79"><a href="#cb421-79" aria-hidden="true"></a></span> +<span id="cb421-80"><a href="#cb421-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="cb416"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb416-1"><a href="#cb416-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb422"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb422-1"><a href="#cb422-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight definition list:</p> @@ -5447,85 +5562,85 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-38">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb417"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb417-1"><a href="#cb417-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb417-2"><a href="#cb417-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> -<span id="cb417-3"><a href="#cb417-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb417-4"><a href="#cb417-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb417-5"><a href="#cb417-5" aria-hidden="true"></a></span> -<span id="cb417-6"><a href="#cb417-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb417-7"><a href="#cb417-7" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb417-8"><a href="#cb417-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb417-9"><a href="#cb417-9" aria-hidden="true"></a>}</span> -<span id="cb417-10"><a href="#cb417-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{}</span> -<span id="cb417-11"><a href="#cb417-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb417-12"><a href="#cb417-12" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> -<span id="cb417-13"><a href="#cb417-13" aria-hidden="true"></a> <span class="fu">\startitemize</span></span> -<span id="cb417-14"><a href="#cb417-14" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb417-15"><a href="#cb417-15" aria-hidden="true"></a> ,</span> -<span id="cb417-16"><a href="#cb417-16" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb417-17"><a href="#cb417-17" aria-hidden="true"></a> , and</span> -<span id="cb417-18"><a href="#cb417-18" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb417-19"><a href="#cb417-19" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb417-20"><a href="#cb417-20" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb417-21"><a href="#cb417-21" aria-hidden="true"></a>}</span> -<span id="cb417-22"><a href="#cb417-22" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb417-23"><a href="#cb417-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\item</span>}</span> -<span id="cb417-24"><a href="#cb417-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{}</span> -<span id="cb417-25"><a href="#cb417-25" aria-hidden="true"></a></span> -<span id="cb417-26"><a href="#cb417-26" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb417-27"><a href="#cb417-27" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb417-28"><a href="#cb417-28" aria-hidden="true"></a></span> -<span id="cb417-29"><a href="#cb417-29" aria-hidden="true"></a>Coffee</span> -<span id="cb417-30"><a href="#cb417-30" aria-hidden="true"></a>: black hot drink</span> -<span id="cb417-31"><a href="#cb417-31" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb417-32"><a href="#cb417-32" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb417-33"><a href="#cb417-33" aria-hidden="true"></a></span> -<span id="cb417-34"><a href="#cb417-34" aria-hidden="true"></a>Milk</span> -<span id="cb417-35"><a href="#cb417-35" aria-hidden="true"></a>: white cold drink</span> -<span id="cb417-36"><a href="#cb417-36" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb417-37"><a href="#cb417-37" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb417-38"><a href="#cb417-38" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb417-39"><a href="#cb417-39" aria-hidden="true"></a></span> -<span id="cb417-40"><a href="#cb417-40" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb417-41"><a href="#cb417-41" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb417-42"><a href="#cb417-42" aria-hidden="true"></a>}</span> -<span id="cb417-43"><a href="#cb417-43" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> -<span id="cb417-44"><a href="#cb417-44" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb417-45"><a href="#cb417-45" aria-hidden="true"></a> . #1 is a</span> -<span id="cb417-46"><a href="#cb417-46" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb417-47"><a href="#cb417-47" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb417-48"><a href="#cb417-48" aria-hidden="true"></a> ,</span> -<span id="cb417-49"><a href="#cb417-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb417-50"><a href="#cb417-50" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb417-51"><a href="#cb417-51" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb417-52"><a href="#cb417-52" aria-hidden="true"></a>}</span> -<span id="cb417-53"><a href="#cb417-53" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb417-54"><a href="#cb417-54" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> -<span id="cb417-55"><a href="#cb417-55" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> -<span id="cb417-56"><a href="#cb417-56" aria-hidden="true"></a></span> -<span id="cb417-57"><a href="#cb417-57" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb417-58"><a href="#cb417-58" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb417-59"><a href="#cb417-59" aria-hidden="true"></a></span> -<span id="cb417-60"><a href="#cb417-60" aria-hidden="true"></a>Coffee</span> -<span id="cb417-61"><a href="#cb417-61" aria-hidden="true"></a></span> -<span id="cb417-62"><a href="#cb417-62" aria-hidden="true"></a>: black hot drink</span> -<span id="cb417-63"><a href="#cb417-63" aria-hidden="true"></a></span> -<span id="cb417-64"><a href="#cb417-64" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb417-65"><a href="#cb417-65" aria-hidden="true"></a></span> -<span id="cb417-66"><a href="#cb417-66" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb417-67"><a href="#cb417-67" aria-hidden="true"></a></span> -<span id="cb417-68"><a href="#cb417-68" aria-hidden="true"></a>Milk</span> -<span id="cb417-69"><a href="#cb417-69" aria-hidden="true"></a></span> -<span id="cb417-70"><a href="#cb417-70" aria-hidden="true"></a>: white cold drink</span> -<span id="cb417-71"><a href="#cb417-71" aria-hidden="true"></a></span> -<span id="cb417-72"><a href="#cb417-72" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb417-73"><a href="#cb417-73" aria-hidden="true"></a></span> -<span id="cb417-74"><a href="#cb417-74" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb417-75"><a href="#cb417-75" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb417-76"><a href="#cb417-76" aria-hidden="true"></a></span> -<span id="cb417-77"><a href="#cb417-77" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb423"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb423-1"><a href="#cb423-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb423-2"><a href="#cb423-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> +<span id="cb423-3"><a href="#cb423-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> +<span id="cb423-4"><a href="#cb423-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb423-5"><a href="#cb423-5" aria-hidden="true"></a></span> +<span id="cb423-6"><a href="#cb423-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb423-7"><a href="#cb423-7" aria-hidden="true"></a> :<span class="co">%</span></span> +<span id="cb423-8"><a href="#cb423-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb423-9"><a href="#cb423-9" aria-hidden="true"></a>}</span> +<span id="cb423-10"><a href="#cb423-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{}</span> +<span id="cb423-11"><a href="#cb423-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb423-12"><a href="#cb423-12" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> +<span id="cb423-13"><a href="#cb423-13" aria-hidden="true"></a> <span class="fu">\startitemize</span></span> +<span id="cb423-14"><a href="#cb423-14" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb423-15"><a href="#cb423-15" aria-hidden="true"></a> ,</span> +<span id="cb423-16"><a href="#cb423-16" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> +<span id="cb423-17"><a href="#cb423-17" aria-hidden="true"></a> , and</span> +<span id="cb423-18"><a href="#cb423-18" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> +<span id="cb423-19"><a href="#cb423-19" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb423-20"><a href="#cb423-20" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb423-21"><a href="#cb423-21" aria-hidden="true"></a>}</span> +<span id="cb423-22"><a href="#cb423-22" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{<span class="fu">\stopitemize</span>}</span> +<span id="cb423-23"><a href="#cb423-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\item</span>}</span> +<span id="cb423-24"><a href="#cb423-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{}</span> +<span id="cb423-25"><a href="#cb423-25" aria-hidden="true"></a></span> +<span id="cb423-26"><a href="#cb423-26" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb423-27"><a href="#cb423-27" aria-hidden="true"></a>This is a tight definition list</span> +<span id="cb423-28"><a href="#cb423-28" aria-hidden="true"></a></span> +<span id="cb423-29"><a href="#cb423-29" aria-hidden="true"></a>Coffee</span> +<span id="cb423-30"><a href="#cb423-30" aria-hidden="true"></a>: black hot drink</span> +<span id="cb423-31"><a href="#cb423-31" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb423-32"><a href="#cb423-32" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb423-33"><a href="#cb423-33" aria-hidden="true"></a></span> +<span id="cb423-34"><a href="#cb423-34" aria-hidden="true"></a>Milk</span> +<span id="cb423-35"><a href="#cb423-35" aria-hidden="true"></a>: white cold drink</span> +<span id="cb423-36"><a href="#cb423-36" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb423-37"><a href="#cb423-37" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb423-38"><a href="#cb423-38" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb423-39"><a href="#cb423-39" aria-hidden="true"></a></span> +<span id="cb423-40"><a href="#cb423-40" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb423-41"><a href="#cb423-41" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> +<span id="cb423-42"><a href="#cb423-42" aria-hidden="true"></a>}</span> +<span id="cb423-43"><a href="#cb423-43" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> +<span id="cb423-44"><a href="#cb423-44" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> +<span id="cb423-45"><a href="#cb423-45" aria-hidden="true"></a> . #1 is a</span> +<span id="cb423-46"><a href="#cb423-46" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb423-47"><a href="#cb423-47" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> +<span id="cb423-48"><a href="#cb423-48" aria-hidden="true"></a> ,</span> +<span id="cb423-49"><a href="#cb423-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> +<span id="cb423-50"><a href="#cb423-50" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb423-51"><a href="#cb423-51" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb423-52"><a href="#cb423-52" aria-hidden="true"></a>}</span> +<span id="cb423-53"><a href="#cb423-53" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> +<span id="cb423-54"><a href="#cb423-54" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> +<span id="cb423-55"><a href="#cb423-55" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> +<span id="cb423-56"><a href="#cb423-56" aria-hidden="true"></a></span> +<span id="cb423-57"><a href="#cb423-57" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb423-58"><a href="#cb423-58" aria-hidden="true"></a>This is a loose definition list</span> +<span id="cb423-59"><a href="#cb423-59" aria-hidden="true"></a></span> +<span id="cb423-60"><a href="#cb423-60" aria-hidden="true"></a>Coffee</span> +<span id="cb423-61"><a href="#cb423-61" aria-hidden="true"></a></span> +<span id="cb423-62"><a href="#cb423-62" aria-hidden="true"></a>: black hot drink</span> +<span id="cb423-63"><a href="#cb423-63" aria-hidden="true"></a></span> +<span id="cb423-64"><a href="#cb423-64" aria-hidden="true"></a>: prepared from roasted coffee beans</span> +<span id="cb423-65"><a href="#cb423-65" aria-hidden="true"></a></span> +<span id="cb423-66"><a href="#cb423-66" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> +<span id="cb423-67"><a href="#cb423-67" aria-hidden="true"></a></span> +<span id="cb423-68"><a href="#cb423-68" aria-hidden="true"></a>Milk</span> +<span id="cb423-69"><a href="#cb423-69" aria-hidden="true"></a></span> +<span id="cb423-70"><a href="#cb423-70" aria-hidden="true"></a>: white cold drink</span> +<span id="cb423-71"><a href="#cb423-71" aria-hidden="true"></a></span> +<span id="cb423-72"><a href="#cb423-72" aria-hidden="true"></a>: nutrient-rich</span> +<span id="cb423-73"><a href="#cb423-73" aria-hidden="true"></a></span> +<span id="cb423-74"><a href="#cb423-74" aria-hidden="true"></a>: produced on an industrial scale</span> +<span id="cb423-75"><a href="#cb423-75" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb423-76"><a href="#cb423-76" aria-hidden="true"></a></span> +<span id="cb423-77"><a href="#cb423-77" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb418"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb418-1"><a href="#cb418-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb424"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb424-1"><a href="#cb424-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight definition list:</p> @@ -5547,41 +5662,41 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererEmphasis</code> macro represents an emphasized span of text. The macro receives a single argument that corresponds to the emphasized span of text.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-27">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb419"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb419-1"><a href="#cb419-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb419-2"><a href="#cb419-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{{<span class="fu">\it</span>#1}}</span> -<span id="cb419-3"><a href="#cb419-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{{<span class="fu">\bf</span>#1}}</span> -<span id="cb419-4"><a href="#cb419-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb419-5"><a href="#cb419-5" aria-hidden="true"></a>This is *emphasis*.</span> -<span id="cb419-6"><a href="#cb419-6" aria-hidden="true"></a></span> -<span id="cb419-7"><a href="#cb419-7" aria-hidden="true"></a>This is **strong emphasis**.</span> -<span id="cb419-8"><a href="#cb419-8" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb419-9"><a href="#cb419-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb425"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb425-1"><a href="#cb425-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb425-2"><a href="#cb425-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{{<span class="fu">\it</span>#1}}</span> +<span id="cb425-3"><a href="#cb425-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{{<span class="fu">\bf</span>#1}}</span> +<span id="cb425-4"><a href="#cb425-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb425-5"><a href="#cb425-5" aria-hidden="true"></a>This is *emphasis*.</span> +<span id="cb425-6"><a href="#cb425-6" aria-hidden="true"></a></span> +<span id="cb425-7"><a href="#cb425-7" aria-hidden="true"></a>This is **strong emphasis**.</span> +<span id="cb425-8"><a href="#cb425-8" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb425-9"><a href="#cb425-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="cb420"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb420-1"><a href="#cb420-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<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 <em>emphasis</em>.</p> <p>This is <strong>strong emphasis</strong>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-50"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-51"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb421"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb421-1"><a href="#cb421-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb421-2"><a href="#cb421-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb421-3"><a href="#cb421-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb421-4"><a href="#cb421-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb421-5"><a href="#cb421-5" aria-hidden="true"></a> emphasis = {<span class="fu">\emph</span>{#1}},</span> -<span id="cb421-6"><a href="#cb421-6" aria-hidden="true"></a> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</span> -<span id="cb421-7"><a href="#cb421-7" aria-hidden="true"></a> },</span> -<span id="cb421-8"><a href="#cb421-8" aria-hidden="true"></a>}</span> -<span id="cb421-9"><a href="#cb421-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb421-10"><a href="#cb421-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb421-11"><a href="#cb421-11" aria-hidden="true"></a>This is *emphasis*.</span> -<span id="cb421-12"><a href="#cb421-12" aria-hidden="true"></a></span> -<span id="cb421-13"><a href="#cb421-13" aria-hidden="true"></a>This is **strong emphasis**.</span> -<span id="cb421-14"><a href="#cb421-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb421-15"><a href="#cb421-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<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="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb427-3"><a href="#cb427-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb427-4"><a href="#cb427-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb427-5"><a href="#cb427-5" aria-hidden="true"></a> emphasis = {<span class="fu">\emph</span>{#1}},</span> +<span id="cb427-6"><a href="#cb427-6" aria-hidden="true"></a> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</span> +<span id="cb427-7"><a href="#cb427-7" aria-hidden="true"></a> },</span> +<span id="cb427-8"><a href="#cb427-8" aria-hidden="true"></a>}</span> +<span id="cb427-9"><a href="#cb427-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb427-10"><a href="#cb427-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb427-11"><a href="#cb427-11" aria-hidden="true"></a>This is *emphasis*.</span> +<span id="cb427-12"><a href="#cb427-12" aria-hidden="true"></a></span> +<span id="cb427-13"><a href="#cb427-13" aria-hidden="true"></a>This is **strong emphasis**.</span> +<span id="cb427-14"><a href="#cb427-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb427-15"><a href="#cb427-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="cb422"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb422-1"><a href="#cb422-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<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 <em>emphasis</em>.</p> @@ -5589,18 +5704,18 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-39">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb423"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb423-1"><a href="#cb423-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb423-2"><a href="#cb423-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{<span class="fu">\emph</span>{#1}}</span> -<span id="cb423-3"><a href="#cb423-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{<span class="fu">\bold</span>{#1}}</span> -<span id="cb423-4"><a href="#cb423-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb423-5"><a href="#cb423-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb423-6"><a href="#cb423-6" aria-hidden="true"></a>This is *emphasis*.</span> -<span id="cb423-7"><a href="#cb423-7" aria-hidden="true"></a></span> -<span id="cb423-8"><a href="#cb423-8" aria-hidden="true"></a>This is **strong emphasis**.</span> -<span id="cb423-9"><a href="#cb423-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb423-10"><a href="#cb423-10" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb429"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb429-1"><a href="#cb429-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb429-2"><a href="#cb429-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{<span class="fu">\emph</span>{#1}}</span> +<span id="cb429-3"><a href="#cb429-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{<span class="fu">\bold</span>{#1}}</span> +<span id="cb429-4"><a href="#cb429-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb429-5"><a href="#cb429-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb429-6"><a href="#cb429-6" aria-hidden="true"></a>This is *emphasis*.</span> +<span id="cb429-7"><a href="#cb429-7" aria-hidden="true"></a></span> +<span id="cb429-8"><a href="#cb429-8" aria-hidden="true"></a>This is **strong emphasis**.</span> +<span id="cb429-9"><a href="#cb429-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb429-10"><a href="#cb429-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="cb424"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb424-1"><a href="#cb424-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb430"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb430-1"><a href="#cb430-1" aria-hidden="true"></a><span class="ex">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> @@ -5612,29 +5727,29 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererBlockQuoteEnd</code> macro represents the end of a block quote. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-28">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb425"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb425-1"><a href="#cb425-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb425-2"><a href="#cb425-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="co">%</span></span> -<span id="cb425-3"><a href="#cb425-3" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb425-4"><a href="#cb425-4" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> -<span id="cb425-5"><a href="#cb425-5" aria-hidden="true"></a> <span class="fu">\leftskip</span>=2<span class="fu">\parindent</span></span> -<span id="cb425-6"><a href="#cb425-6" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</span> -<span id="cb425-7"><a href="#cb425-7" aria-hidden="true"></a>}</span> -<span id="cb425-8"><a href="#cb425-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="co">%</span></span> -<span id="cb425-9"><a href="#cb425-9" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb425-10"><a href="#cb425-10" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> -<span id="cb425-11"><a href="#cb425-11" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> -<span id="cb425-12"><a href="#cb425-12" aria-hidden="true"></a>}</span> -<span id="cb425-13"><a href="#cb425-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb425-14"><a href="#cb425-14" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb425-15"><a href="#cb425-15" aria-hidden="true"></a></span> -<span id="cb425-16"><a href="#cb425-16" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb425-17"><a href="#cb425-17" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb425-18"><a href="#cb425-18" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb425-19"><a href="#cb425-19" aria-hidden="true"></a>> stars [...]</span> -<span id="cb425-20"><a href="#cb425-20" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb425-21"><a href="#cb425-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="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> +<div class="sourceCode" id="cb431"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb431-1"><a href="#cb431-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb431-2"><a href="#cb431-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="co">%</span></span> +<span id="cb431-3"><a href="#cb431-3" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> +<span id="cb431-4"><a href="#cb431-4" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> +<span id="cb431-5"><a href="#cb431-5" aria-hidden="true"></a> <span class="fu">\leftskip</span>=2<span class="fu">\parindent</span></span> +<span id="cb431-6"><a href="#cb431-6" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</span> +<span id="cb431-7"><a href="#cb431-7" aria-hidden="true"></a>}</span> +<span id="cb431-8"><a href="#cb431-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="co">%</span></span> +<span id="cb431-9"><a href="#cb431-9" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb431-10"><a href="#cb431-10" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> +<span id="cb431-11"><a href="#cb431-11" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> +<span id="cb431-12"><a href="#cb431-12" aria-hidden="true"></a>}</span> +<span id="cb431-13"><a href="#cb431-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb431-14"><a href="#cb431-14" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> +<span id="cb431-15"><a href="#cb431-15" aria-hidden="true"></a></span> +<span id="cb431-16"><a href="#cb431-16" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> +<span id="cb431-17"><a href="#cb431-17" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> +<span id="cb431-18"><a href="#cb431-18" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> +<span id="cb431-19"><a href="#cb431-19" aria-hidden="true"></a>> stars [...]</span> +<span id="cb431-20"><a href="#cb431-20" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb431-21"><a href="#cb431-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="cb432"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb432-1"><a href="#cb432-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A quote from William Shakespeare’s King Lear:</p> @@ -5642,28 +5757,28 @@ Thomas,Edison,1847</code></pre> <p>This is the excellent foppery of the world that when we are sick in fortune—often the surfeit of our own behavior—we make guilty of our disasters the sun, the moon, and the stars […]</p> </blockquote> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-51"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-52"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb427-3"><a href="#cb427-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb427-4"><a href="#cb427-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb427-5"><a href="#cb427-5" aria-hidden="true"></a> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span> -<span id="cb427-6"><a href="#cb427-6" aria-hidden="true"></a> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span> -<span id="cb427-7"><a href="#cb427-7" aria-hidden="true"></a> },</span> -<span id="cb427-8"><a href="#cb427-8" aria-hidden="true"></a>}</span> -<span id="cb427-9"><a href="#cb427-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb427-10"><a href="#cb427-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb427-11"><a href="#cb427-11" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb427-12"><a href="#cb427-12" aria-hidden="true"></a></span> -<span id="cb427-13"><a href="#cb427-13" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb427-14"><a href="#cb427-14" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb427-15"><a href="#cb427-15" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb427-16"><a href="#cb427-16" aria-hidden="true"></a>> stars [...]</span> -<span id="cb427-17"><a href="#cb427-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb427-18"><a href="#cb427-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="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> +<div class="sourceCode" id="cb433"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb433-1"><a href="#cb433-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb433-2"><a href="#cb433-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb433-3"><a href="#cb433-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb433-4"><a href="#cb433-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb433-5"><a href="#cb433-5" aria-hidden="true"></a> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span> +<span id="cb433-6"><a href="#cb433-6" aria-hidden="true"></a> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span> +<span id="cb433-7"><a href="#cb433-7" aria-hidden="true"></a> },</span> +<span id="cb433-8"><a href="#cb433-8" aria-hidden="true"></a>}</span> +<span id="cb433-9"><a href="#cb433-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb433-10"><a href="#cb433-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb433-11"><a href="#cb433-11" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> +<span id="cb433-12"><a href="#cb433-12" aria-hidden="true"></a></span> +<span id="cb433-13"><a href="#cb433-13" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> +<span id="cb433-14"><a href="#cb433-14" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> +<span id="cb433-15"><a href="#cb433-15" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> +<span id="cb433-16"><a href="#cb433-16" aria-hidden="true"></a>> stars [...]</span> +<span id="cb433-17"><a href="#cb433-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb433-18"><a href="#cb433-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="cb434"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb434-1"><a href="#cb434-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A quote from William Shakespeare’s King Lear:</p> @@ -5673,21 +5788,21 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-40">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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">\def\markdownRendererBlockQuoteBegin</span>{<span class="fu">\startquotation</span>}</span> -<span id="cb429-3"><a href="#cb429-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="fu">\stopquotation</span>}</span> -<span id="cb429-4"><a href="#cb429-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb429-5"><a href="#cb429-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb429-6"><a href="#cb429-6" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb429-7"><a href="#cb429-7" aria-hidden="true"></a></span> -<span id="cb429-8"><a href="#cb429-8" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb429-9"><a href="#cb429-9" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb429-10"><a href="#cb429-10" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb429-11"><a href="#cb429-11" aria-hidden="true"></a>> stars [...]</span> -<span id="cb429-12"><a href="#cb429-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb429-13"><a href="#cb429-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb435"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb435-1"><a href="#cb435-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb435-2"><a href="#cb435-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="fu">\startquotation</span>}</span> +<span id="cb435-3"><a href="#cb435-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="fu">\stopquotation</span>}</span> +<span id="cb435-4"><a href="#cb435-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb435-5"><a href="#cb435-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb435-6"><a href="#cb435-6" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> +<span id="cb435-7"><a href="#cb435-7" aria-hidden="true"></a></span> +<span id="cb435-8"><a href="#cb435-8" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> +<span id="cb435-9"><a href="#cb435-9" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> +<span id="cb435-10"><a href="#cb435-10" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> +<span id="cb435-11"><a href="#cb435-11" aria-hidden="true"></a>> stars [...]</span> +<span id="cb435-12"><a href="#cb435-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb435-13"><a href="#cb435-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="cb430"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb430-1"><a href="#cb430-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb436"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb436-1"><a href="#cb436-1" aria-hidden="true"></a><span class="ex">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> @@ -5698,75 +5813,75 @@ Thomas,Edison,1847</code></pre> <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-52"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-53"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb431"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb431-1"><a href="#cb431-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb431-2"><a href="#cb431-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span> -<span id="cb431-3"><a href="#cb431-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</span> -<span id="cb431-4"><a href="#cb431-4" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> -<span id="cb431-5"><a href="#cb431-5" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb431-6"><a href="#cb431-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb431-7"><a href="#cb431-7" aria-hidden="true"></a> interblockSeparator = {</span> -<span id="cb431-8"><a href="#cb431-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb431-9"><a href="#cb431-9" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb431-10"><a href="#cb431-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb431-11"><a href="#cb431-11" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb431-12"><a href="#cb431-12" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb431-13"><a href="#cb431-13" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb431-14"><a href="#cb431-14" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb431-15"><a href="#cb431-15" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb431-16"><a href="#cb431-16" aria-hidden="true"></a> },</span> -<span id="cb431-17"><a href="#cb431-17" aria-hidden="true"></a> inputVerbatim = {</span> -<span id="cb431-18"><a href="#cb431-18" aria-hidden="true"></a> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></span> -<span id="cb431-19"><a href="#cb431-19" aria-hidden="true"></a> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></span> -<span id="cb431-20"><a href="#cb431-20" aria-hidden="true"></a> },</span> -<span id="cb431-21"><a href="#cb431-21" aria-hidden="true"></a> inputFencedCode = {</span> -<span id="cb431-22"><a href="#cb431-22" aria-hidden="true"></a> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></span> -<span id="cb431-23"><a href="#cb431-23" aria-hidden="true"></a> },</span> -<span id="cb431-24"><a href="#cb431-24" aria-hidden="true"></a> },</span> -<span id="cb431-25"><a href="#cb431-25" aria-hidden="true"></a>}</span> -<span id="cb431-26"><a href="#cb431-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb431-27"><a href="#cb431-27" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb431-28"><a href="#cb431-28" aria-hidden="true"></a>The following code</span> -<span id="cb431-29"><a href="#cb431-29" aria-hidden="true"></a></span> -<span id="cb431-30"><a href="#cb431-30" aria-hidden="true"></a> def foo(bar):</span> -<span id="cb431-31"><a href="#cb431-31" aria-hidden="true"></a> if len(bar) <= 1:</span> -<span id="cb431-32"><a href="#cb431-32" aria-hidden="true"></a> return bar[0]</span> -<span id="cb431-33"><a href="#cb431-33" aria-hidden="true"></a> elif len(bar) == 2:</span> -<span id="cb431-34"><a href="#cb431-34" aria-hidden="true"></a> return sorted(bar)</span> -<span id="cb431-35"><a href="#cb431-35" aria-hidden="true"></a> else:</span> -<span id="cb431-36"><a href="#cb431-36" aria-hidden="true"></a> baz = len(bar) // 2</span> -<span id="cb431-37"><a href="#cb431-37" aria-hidden="true"></a> return foo(bar[baz:], bar[:baz])</span> -<span id="cb431-38"><a href="#cb431-38" aria-hidden="true"></a></span> -<span id="cb431-39"><a href="#cb431-39" aria-hidden="true"></a>The following code</span> -<span id="cb431-40"><a href="#cb431-40" aria-hidden="true"></a></span> -<span id="cb431-41"><a href="#cb431-41" aria-hidden="true"></a>~~~ Python</span> -<span id="cb431-42"><a href="#cb431-42" aria-hidden="true"></a>>>> foo([4, 2, 1, 3])</span> -<span id="cb431-43"><a href="#cb431-43" aria-hidden="true"></a>[1, 2, 3, 4]</span> -<span id="cb431-44"><a href="#cb431-44" aria-hidden="true"></a>~~~~~~~~~~</span> -<span id="cb431-45"><a href="#cb431-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb431-46"><a href="#cb431-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="cb432"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb432-1"><a href="#cb432-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb437"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb437-1"><a href="#cb437-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb437-2"><a href="#cb437-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span> +<span id="cb437-3"><a href="#cb437-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</span> +<span id="cb437-4"><a href="#cb437-4" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> +<span id="cb437-5"><a href="#cb437-5" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb437-6"><a href="#cb437-6" aria-hidden="true"></a> renderers = {</span> +<span id="cb437-7"><a href="#cb437-7" aria-hidden="true"></a> interblockSeparator = {</span> +<span id="cb437-8"><a href="#cb437-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb437-9"><a href="#cb437-9" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb437-10"><a href="#cb437-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb437-11"><a href="#cb437-11" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> +<span id="cb437-12"><a href="#cb437-12" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb437-13"><a href="#cb437-13" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb437-14"><a href="#cb437-14" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb437-15"><a href="#cb437-15" aria-hidden="true"></a> }<span class="co">%</span></span> +<span id="cb437-16"><a href="#cb437-16" aria-hidden="true"></a> },</span> +<span id="cb437-17"><a href="#cb437-17" aria-hidden="true"></a> inputVerbatim = {</span> +<span id="cb437-18"><a href="#cb437-18" aria-hidden="true"></a> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></span> +<span id="cb437-19"><a href="#cb437-19" aria-hidden="true"></a> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></span> +<span id="cb437-20"><a href="#cb437-20" aria-hidden="true"></a> },</span> +<span id="cb437-21"><a href="#cb437-21" aria-hidden="true"></a> inputFencedCode = {</span> +<span id="cb437-22"><a href="#cb437-22" aria-hidden="true"></a> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></span> +<span id="cb437-23"><a href="#cb437-23" aria-hidden="true"></a> },</span> +<span id="cb437-24"><a href="#cb437-24" aria-hidden="true"></a> },</span> +<span id="cb437-25"><a href="#cb437-25" aria-hidden="true"></a>}</span> +<span id="cb437-26"><a href="#cb437-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb437-27"><a href="#cb437-27" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb437-28"><a href="#cb437-28" aria-hidden="true"></a>The following code</span> +<span id="cb437-29"><a href="#cb437-29" aria-hidden="true"></a></span> +<span id="cb437-30"><a href="#cb437-30" aria-hidden="true"></a> def foo(bar):</span> +<span id="cb437-31"><a href="#cb437-31" aria-hidden="true"></a> if len(bar) <= 1:</span> +<span id="cb437-32"><a href="#cb437-32" aria-hidden="true"></a> return bar[0]</span> +<span id="cb437-33"><a href="#cb437-33" aria-hidden="true"></a> elif len(bar) == 2:</span> +<span id="cb437-34"><a href="#cb437-34" aria-hidden="true"></a> return sorted(bar)</span> +<span id="cb437-35"><a href="#cb437-35" aria-hidden="true"></a> else:</span> +<span id="cb437-36"><a href="#cb437-36" aria-hidden="true"></a> baz = len(bar) // 2</span> +<span id="cb437-37"><a href="#cb437-37" aria-hidden="true"></a> return foo(bar[baz:], bar[:baz])</span> +<span id="cb437-38"><a href="#cb437-38" aria-hidden="true"></a></span> +<span id="cb437-39"><a href="#cb437-39" aria-hidden="true"></a>The following code</span> +<span id="cb437-40"><a href="#cb437-40" aria-hidden="true"></a></span> +<span id="cb437-41"><a href="#cb437-41" aria-hidden="true"></a>~~~ Python</span> +<span id="cb437-42"><a href="#cb437-42" aria-hidden="true"></a>>>> foo([4, 2, 1, 3])</span> +<span id="cb437-43"><a href="#cb437-43" aria-hidden="true"></a>[1, 2, 3, 4]</span> +<span id="cb437-44"><a href="#cb437-44" aria-hidden="true"></a>~~~~~~~~~~</span> +<span id="cb437-45"><a href="#cb437-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb437-46"><a href="#cb437-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="cb438"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb438-1"><a href="#cb438-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text 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="cb433"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb433-1"><a href="#cb433-1" aria-hidden="true"></a><span class="kw">def</span> foo(bar):</span> -<span id="cb433-2"><a href="#cb433-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="cb433-3"><a href="#cb433-3" aria-hidden="true"></a> <span class="cf">return</span> bar[:<span class="dv">1</span>]</span> -<span id="cb433-4"><a href="#cb433-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="cb433-5"><a href="#cb433-5" aria-hidden="true"></a> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</span> -<span id="cb433-6"><a href="#cb433-6" aria-hidden="true"></a> <span class="cf">else</span>:</span> -<span id="cb433-7"><a href="#cb433-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="cb433-8"><a href="#cb433-8" aria-hidden="true"></a> <span class="cf">return</span> (</span> -<span id="cb433-9"><a href="#cb433-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="cb433-10"><a href="#cb433-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="cb433-11"><a href="#cb433-11" aria-hidden="true"></a> )</span></code></pre></div> +<div class="sourceCode" id="cb439"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb439-1"><a href="#cb439-1" aria-hidden="true"></a><span class="kw">def</span> foo(bar):</span> +<span id="cb439-2"><a href="#cb439-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="cb439-3"><a href="#cb439-3" aria-hidden="true"></a> <span class="cf">return</span> bar[:<span class="dv">1</span>]</span> +<span id="cb439-4"><a href="#cb439-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="cb439-5"><a href="#cb439-5" aria-hidden="true"></a> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</span> +<span id="cb439-6"><a href="#cb439-6" aria-hidden="true"></a> <span class="cf">else</span>:</span> +<span id="cb439-7"><a href="#cb439-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="cb439-8"><a href="#cb439-8" aria-hidden="true"></a> <span class="cf">return</span> (</span> +<span id="cb439-9"><a href="#cb439-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="cb439-10"><a href="#cb439-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="cb439-11"><a href="#cb439-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="cb434"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb434-1"><a href="#cb434-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="cb434-2"><a href="#cb434-2" aria-hidden="true"></a>[<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>]</span></code></pre></div> +<div class="sourceCode" id="cb440"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb440-1"><a href="#cb440-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="cb440-2"><a href="#cb440-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="yaml-metadata-renderers"><span class="header-section-number">2.3.1.18</span> YAML Metadata Renderers</h4> +<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> @@ -5779,72 +5894,72 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererJekyllDataEmpty</code> macro represents an empty scalar value in a <abbr>yaml</abbr> document. This macro will only be produced when the <strong><code>jekyllData</code></strong> option is enabled. The macro receives one argument: the scalar key in the parent structure, cast to a string following <abbr>yaml</abbr> serialization rules.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-29">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb435"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb435-1"><a href="#cb435-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb435-2"><a href="#cb435-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> -<span id="cb435-3"><a href="#cb435-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> -<span id="cb435-4"><a href="#cb435-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> -<span id="cb435-5"><a href="#cb435-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb435-6"><a href="#cb435-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb435-7"><a href="#cb435-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb435-8"><a href="#cb435-8" aria-hidden="true"></a>---</span> -<span id="cb435-9"><a href="#cb435-9" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb435-10"><a href="#cb435-10" aria-hidden="true"></a>age: 99</span> -<span id="cb435-11"><a href="#cb435-11" aria-hidden="true"></a>---</span> -<span id="cb435-12"><a href="#cb435-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb435-13"><a href="#cb435-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb441"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb441-1"><a href="#cb441-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb441-2"><a href="#cb441-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb441-3"><a href="#cb441-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> +<span id="cb441-4"><a href="#cb441-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> +<span id="cb441-5"><a href="#cb441-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb441-6"><a href="#cb441-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb441-7"><a href="#cb441-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb441-8"><a href="#cb441-8" aria-hidden="true"></a>---</span> +<span id="cb441-9"><a href="#cb441-9" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb441-10"><a href="#cb441-10" aria-hidden="true"></a>age: 99</span> +<span id="cb441-11"><a href="#cb441-11" aria-hidden="true"></a>---</span> +<span id="cb441-12"><a href="#cb441-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb441-13"><a href="#cb441-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="cb436"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb436-1"><a href="#cb436-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb442"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb442-1"><a href="#cb442-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-53"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-54"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb437"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb437-1"><a href="#cb437-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb437-2"><a href="#cb437-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> -<span id="cb437-3"><a href="#cb437-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb437-4"><a href="#cb437-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb437-5"><a href="#cb437-5" aria-hidden="true"></a> jekyllDataString = {<span class="fu">\gdef\name</span>{#2}},</span> -<span id="cb437-6"><a href="#cb437-6" aria-hidden="true"></a> jekyllDataNumber = {<span class="fu">\gdef\age</span>{#2}},</span> -<span id="cb437-7"><a href="#cb437-7" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> -<span id="cb437-8"><a href="#cb437-8" aria-hidden="true"></a> }</span> -<span id="cb437-9"><a href="#cb437-9" aria-hidden="true"></a>}</span> -<span id="cb437-10"><a href="#cb437-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb437-11"><a href="#cb437-11" aria-hidden="true"></a></span> -<span id="cb437-12"><a href="#cb437-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb437-13"><a href="#cb437-13" aria-hidden="true"></a>---</span> -<span id="cb437-14"><a href="#cb437-14" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb437-15"><a href="#cb437-15" aria-hidden="true"></a>age: 99</span> -<span id="cb437-16"><a href="#cb437-16" aria-hidden="true"></a>---</span> -<span id="cb437-17"><a href="#cb437-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb437-18"><a href="#cb437-18" aria-hidden="true"></a></span> -<span id="cb437-19"><a href="#cb437-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb443"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb443-1"><a href="#cb443-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb443-2"><a href="#cb443-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb443-3"><a href="#cb443-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb443-4"><a href="#cb443-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb443-5"><a href="#cb443-5" aria-hidden="true"></a> jekyllDataString = {<span class="fu">\gdef\name</span>{#2}},</span> +<span id="cb443-6"><a href="#cb443-6" aria-hidden="true"></a> jekyllDataNumber = {<span class="fu">\gdef\age</span>{#2}},</span> +<span id="cb443-7"><a href="#cb443-7" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> +<span id="cb443-8"><a href="#cb443-8" aria-hidden="true"></a> }</span> +<span id="cb443-9"><a href="#cb443-9" aria-hidden="true"></a>}</span> +<span id="cb443-10"><a href="#cb443-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb443-11"><a href="#cb443-11" aria-hidden="true"></a></span> +<span id="cb443-12"><a href="#cb443-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb443-13"><a href="#cb443-13" aria-hidden="true"></a>---</span> +<span id="cb443-14"><a href="#cb443-14" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb443-15"><a href="#cb443-15" aria-hidden="true"></a>age: 99</span> +<span id="cb443-16"><a href="#cb443-16" aria-hidden="true"></a>---</span> +<span id="cb443-17"><a href="#cb443-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb443-18"><a href="#cb443-18" aria-hidden="true"></a></span> +<span id="cb443-19"><a href="#cb443-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="cb438"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb438-1"><a href="#cb438-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb444"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb444-1"><a href="#cb444-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-41">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb439"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb439-1"><a href="#cb439-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb439-2"><a href="#cb439-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> -<span id="cb439-3"><a href="#cb439-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> -<span id="cb439-4"><a href="#cb439-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> -<span id="cb439-5"><a href="#cb439-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> -<span id="cb439-6"><a href="#cb439-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> -<span id="cb439-7"><a href="#cb439-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb439-8"><a href="#cb439-8" aria-hidden="true"></a></span> -<span id="cb439-9"><a href="#cb439-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb439-10"><a href="#cb439-10" aria-hidden="true"></a>---</span> -<span id="cb439-11"><a href="#cb439-11" aria-hidden="true"></a>name: Jane Doe</span> -<span id="cb439-12"><a href="#cb439-12" aria-hidden="true"></a>age: 99</span> -<span id="cb439-13"><a href="#cb439-13" aria-hidden="true"></a>---</span> -<span id="cb439-14"><a href="#cb439-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb439-15"><a href="#cb439-15" aria-hidden="true"></a></span> -<span id="cb439-16"><a href="#cb439-16" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb440"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb440-1"><a href="#cb440-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb445"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb445-1"><a href="#cb445-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb445-2"><a href="#cb445-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb445-3"><a href="#cb445-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataString</span>#1#2{<span class="fu">\gdef\name</span>{#2}}</span> +<span id="cb445-4"><a href="#cb445-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataNumber</span>#1#2{<span class="fu">\gdef\age</span>{#2}}</span> +<span id="cb445-5"><a href="#cb445-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb445-6"><a href="#cb445-6" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb445-7"><a href="#cb445-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb445-8"><a href="#cb445-8" aria-hidden="true"></a></span> +<span id="cb445-9"><a href="#cb445-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb445-10"><a href="#cb445-10" aria-hidden="true"></a>---</span> +<span id="cb445-11"><a href="#cb445-11" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb445-12"><a href="#cb445-12" aria-hidden="true"></a>age: 99</span> +<span id="cb445-13"><a href="#cb445-13" aria-hidden="true"></a>---</span> +<span id="cb445-14"><a href="#cb445-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb445-15"><a href="#cb445-15" aria-hidden="true"></a></span> +<span id="cb445-16"><a href="#cb445-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="cb446"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb446-1"><a href="#cb446-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Jane Doe is 99 years old.</p> @@ -5858,79 +5973,79 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererHeadingSix</code> macro represents a sixth level heading. The macro receives a single argument that corresponds to the heading text.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-30">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb441"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb441-1"><a href="#cb441-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb441-2"><a href="#cb441-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb441-3"><a href="#cb441-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> -<span id="cb441-4"><a href="#cb441-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> -<span id="cb441-5"><a href="#cb441-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> -<span id="cb441-6"><a href="#cb441-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> -<span id="cb441-7"><a href="#cb441-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> -<span id="cb441-8"><a href="#cb441-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> -<span id="cb441-9"><a href="#cb441-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb441-10"><a href="#cb441-10" aria-hidden="true"></a>######</span> -<span id="cb441-11"><a href="#cb441-11" aria-hidden="true"></a>#####</span> -<span id="cb441-12"><a href="#cb441-12" aria-hidden="true"></a>#####</span> -<span id="cb441-13"><a href="#cb441-13" aria-hidden="true"></a>###</span> -<span id="cb441-14"><a href="#cb441-14" aria-hidden="true"></a>######</span> -<span id="cb441-15"><a href="#cb441-15" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb441-16"><a href="#cb441-16" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb447"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb447-1"><a href="#cb447-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb447-2"><a href="#cb447-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb447-3"><a href="#cb447-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> +<span id="cb447-4"><a href="#cb447-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> +<span id="cb447-5"><a href="#cb447-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> +<span id="cb447-6"><a href="#cb447-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> +<span id="cb447-7"><a href="#cb447-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> +<span id="cb447-8"><a href="#cb447-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> +<span id="cb447-9"><a href="#cb447-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb447-10"><a href="#cb447-10" aria-hidden="true"></a>######</span> +<span id="cb447-11"><a href="#cb447-11" aria-hidden="true"></a>#####</span> +<span id="cb447-12"><a href="#cb447-12" aria-hidden="true"></a>#####</span> +<span id="cb447-13"><a href="#cb447-13" aria-hidden="true"></a>###</span> +<span id="cb447-14"><a href="#cb447-14" aria-hidden="true"></a>######</span> +<span id="cb447-15"><a href="#cb447-15" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb447-16"><a href="#cb447-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="cb442"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb442-1"><a href="#cb442-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb448"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb448-1"><a href="#cb448-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>65536</p> </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> +<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="cb443"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb443-1"><a href="#cb443-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb443-2"><a href="#cb443-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb443-3"><a href="#cb443-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb443-4"><a href="#cb443-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb443-5"><a href="#cb443-5" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb443-6"><a href="#cb443-6" aria-hidden="true"></a> headingOne = 1,</span> -<span id="cb443-7"><a href="#cb443-7" aria-hidden="true"></a> headingTwo = 2,</span> -<span id="cb443-8"><a href="#cb443-8" aria-hidden="true"></a> headingThree = 3,</span> -<span id="cb443-9"><a href="#cb443-9" aria-hidden="true"></a> headingFour = 4,</span> -<span id="cb443-10"><a href="#cb443-10" aria-hidden="true"></a> headingFive = 5,</span> -<span id="cb443-11"><a href="#cb443-11" aria-hidden="true"></a> headingSix = 6,</span> -<span id="cb443-12"><a href="#cb443-12" aria-hidden="true"></a> },</span> -<span id="cb443-13"><a href="#cb443-13" aria-hidden="true"></a>}</span> -<span id="cb443-14"><a href="#cb443-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb443-15"><a href="#cb443-15" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb443-16"><a href="#cb443-16" aria-hidden="true"></a>######</span> -<span id="cb443-17"><a href="#cb443-17" aria-hidden="true"></a>#####</span> -<span id="cb443-18"><a href="#cb443-18" aria-hidden="true"></a>#####</span> -<span id="cb443-19"><a href="#cb443-19" aria-hidden="true"></a>###</span> -<span id="cb443-20"><a href="#cb443-20" aria-hidden="true"></a>######</span> -<span id="cb443-21"><a href="#cb443-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb443-22"><a href="#cb443-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb449"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb449-1"><a href="#cb449-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb449-2"><a href="#cb449-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb449-3"><a href="#cb449-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb449-4"><a href="#cb449-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb449-5"><a href="#cb449-5" aria-hidden="true"></a> interblockSeparator = {},</span> +<span id="cb449-6"><a href="#cb449-6" aria-hidden="true"></a> headingOne = 1,</span> +<span id="cb449-7"><a href="#cb449-7" aria-hidden="true"></a> headingTwo = 2,</span> +<span id="cb449-8"><a href="#cb449-8" aria-hidden="true"></a> headingThree = 3,</span> +<span id="cb449-9"><a href="#cb449-9" aria-hidden="true"></a> headingFour = 4,</span> +<span id="cb449-10"><a href="#cb449-10" aria-hidden="true"></a> headingFive = 5,</span> +<span id="cb449-11"><a href="#cb449-11" aria-hidden="true"></a> headingSix = 6,</span> +<span id="cb449-12"><a href="#cb449-12" aria-hidden="true"></a> },</span> +<span id="cb449-13"><a href="#cb449-13" aria-hidden="true"></a>}</span> +<span id="cb449-14"><a href="#cb449-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb449-15"><a href="#cb449-15" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb449-16"><a href="#cb449-16" aria-hidden="true"></a>######</span> +<span id="cb449-17"><a href="#cb449-17" aria-hidden="true"></a>#####</span> +<span id="cb449-18"><a href="#cb449-18" aria-hidden="true"></a>#####</span> +<span id="cb449-19"><a href="#cb449-19" aria-hidden="true"></a>###</span> +<span id="cb449-20"><a href="#cb449-20" aria-hidden="true"></a>######</span> +<span id="cb449-21"><a href="#cb449-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb449-22"><a href="#cb449-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="cb444"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb444-1"><a href="#cb444-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb450"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb450-1"><a href="#cb450-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>65536</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-42">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb445"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb445-1"><a href="#cb445-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb445-2"><a href="#cb445-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb445-3"><a href="#cb445-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> -<span id="cb445-4"><a href="#cb445-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> -<span id="cb445-5"><a href="#cb445-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> -<span id="cb445-6"><a href="#cb445-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> -<span id="cb445-7"><a href="#cb445-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> -<span id="cb445-8"><a href="#cb445-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> -<span id="cb445-9"><a href="#cb445-9" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb445-10"><a href="#cb445-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb445-11"><a href="#cb445-11" aria-hidden="true"></a>######</span> -<span id="cb445-12"><a href="#cb445-12" aria-hidden="true"></a>#####</span> -<span id="cb445-13"><a href="#cb445-13" aria-hidden="true"></a>#####</span> -<span id="cb445-14"><a href="#cb445-14" aria-hidden="true"></a>###</span> -<span id="cb445-15"><a href="#cb445-15" aria-hidden="true"></a>######</span> -<span id="cb445-16"><a href="#cb445-16" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb445-17"><a href="#cb445-17" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb451"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb451-1"><a href="#cb451-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb451-2"><a href="#cb451-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> +<span id="cb451-3"><a href="#cb451-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> +<span id="cb451-4"><a href="#cb451-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> +<span id="cb451-5"><a href="#cb451-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> +<span id="cb451-6"><a href="#cb451-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> +<span id="cb451-7"><a href="#cb451-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> +<span id="cb451-8"><a href="#cb451-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> +<span id="cb451-9"><a href="#cb451-9" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb451-10"><a href="#cb451-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb451-11"><a href="#cb451-11" aria-hidden="true"></a>######</span> +<span id="cb451-12"><a href="#cb451-12" aria-hidden="true"></a>#####</span> +<span id="cb451-13"><a href="#cb451-13" aria-hidden="true"></a>#####</span> +<span id="cb451-14"><a href="#cb451-14" aria-hidden="true"></a>###</span> +<span id="cb451-15"><a href="#cb451-15" aria-hidden="true"></a>######</span> +<span id="cb451-16"><a href="#cb451-16" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb451-17"><a href="#cb451-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="cb446"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb446-1"><a href="#cb446-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb452"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb452-1"><a href="#cb452-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>65536</p> @@ -5939,44 +6054,44 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererHorizontalRule</code> macro represents a horizontal rule. The macro receives no arguments.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-31">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb447"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb447-1"><a href="#cb447-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb447-2"><a href="#cb447-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\vfil\break</span>}</span> -<span id="cb447-3"><a href="#cb447-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb447-4"><a href="#cb447-4" aria-hidden="true"></a>This is the first page.</span> -<span id="cb447-5"><a href="#cb447-5" aria-hidden="true"></a></span> -<span id="cb447-6"><a href="#cb447-6" aria-hidden="true"></a>***</span> -<span id="cb447-7"><a href="#cb447-7" aria-hidden="true"></a></span> -<span id="cb447-8"><a href="#cb447-8" aria-hidden="true"></a>This is the second page.</span> -<span id="cb447-9"><a href="#cb447-9" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb447-10"><a href="#cb447-10" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb453"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb453-1"><a href="#cb453-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb453-2"><a href="#cb453-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\vfil\break</span>}</span> +<span id="cb453-3"><a href="#cb453-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb453-4"><a href="#cb453-4" aria-hidden="true"></a>This is the first page.</span> +<span id="cb453-5"><a href="#cb453-5" aria-hidden="true"></a></span> +<span id="cb453-6"><a href="#cb453-6" aria-hidden="true"></a>***</span> +<span id="cb453-7"><a href="#cb453-7" aria-hidden="true"></a></span> +<span id="cb453-8"><a href="#cb453-8" aria-hidden="true"></a>This is the second page.</span> +<span id="cb453-9"><a href="#cb453-9" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb453-10"><a href="#cb453-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="cb448"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb448-1"><a href="#cb448-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb454"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb454-1"><a href="#cb454-1" aria-hidden="true"></a><span class="ex">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-55"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-56"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb449"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb449-1"><a href="#cb449-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb449-2"><a href="#cb449-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb449-3"><a href="#cb449-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb449-4"><a href="#cb449-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb449-5"><a href="#cb449-5" aria-hidden="true"></a> horizontalRule = <span class="fu">\newpage</span>,</span> -<span id="cb449-6"><a href="#cb449-6" aria-hidden="true"></a> },</span> -<span id="cb449-7"><a href="#cb449-7" aria-hidden="true"></a>}</span> -<span id="cb449-8"><a href="#cb449-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb449-9"><a href="#cb449-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb449-10"><a href="#cb449-10" aria-hidden="true"></a>This is the first page.</span> -<span id="cb449-11"><a href="#cb449-11" aria-hidden="true"></a></span> -<span id="cb449-12"><a href="#cb449-12" aria-hidden="true"></a>***</span> -<span id="cb449-13"><a href="#cb449-13" aria-hidden="true"></a></span> -<span id="cb449-14"><a href="#cb449-14" aria-hidden="true"></a>This is the second page.</span> -<span id="cb449-15"><a href="#cb449-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb449-16"><a href="#cb449-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb455"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb455-1"><a href="#cb455-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb455-2"><a href="#cb455-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb455-3"><a href="#cb455-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb455-4"><a href="#cb455-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb455-5"><a href="#cb455-5" aria-hidden="true"></a> horizontalRule = <span class="fu">\newpage</span>,</span> +<span id="cb455-6"><a href="#cb455-6" aria-hidden="true"></a> },</span> +<span id="cb455-7"><a href="#cb455-7" aria-hidden="true"></a>}</span> +<span id="cb455-8"><a href="#cb455-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb455-9"><a href="#cb455-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb455-10"><a href="#cb455-10" aria-hidden="true"></a>This is the first page.</span> +<span id="cb455-11"><a href="#cb455-11" aria-hidden="true"></a></span> +<span id="cb455-12"><a href="#cb455-12" aria-hidden="true"></a>***</span> +<span id="cb455-13"><a href="#cb455-13" aria-hidden="true"></a></span> +<span id="cb455-14"><a href="#cb455-14" aria-hidden="true"></a>This is the second page.</span> +<span id="cb455-15"><a href="#cb455-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb455-16"><a href="#cb455-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb450"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb450-1"><a href="#cb450-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb456"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb456-1"><a href="#cb456-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is the first page.</p> @@ -5985,19 +6100,19 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-43">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb451"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb451-1"><a href="#cb451-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb451-2"><a href="#cb451-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\page</span>[yes]}</span> -<span id="cb451-3"><a href="#cb451-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb451-4"><a href="#cb451-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb451-5"><a href="#cb451-5" aria-hidden="true"></a>This is the first page.</span> -<span id="cb451-6"><a href="#cb451-6" aria-hidden="true"></a></span> -<span id="cb451-7"><a href="#cb451-7" aria-hidden="true"></a>***</span> -<span id="cb451-8"><a href="#cb451-8" aria-hidden="true"></a></span> -<span id="cb451-9"><a href="#cb451-9" aria-hidden="true"></a>This is the second page.</span> -<span id="cb451-10"><a href="#cb451-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb451-11"><a href="#cb451-11" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb457"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb457-1"><a href="#cb457-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb457-2"><a href="#cb457-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererHorizontalRule</span>{<span class="fu">\page</span>[yes]}</span> +<span id="cb457-3"><a href="#cb457-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb457-4"><a href="#cb457-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb457-5"><a href="#cb457-5" aria-hidden="true"></a>This is the first page.</span> +<span id="cb457-6"><a href="#cb457-6" aria-hidden="true"></a></span> +<span id="cb457-7"><a href="#cb457-7" aria-hidden="true"></a>***</span> +<span id="cb457-8"><a href="#cb457-8" aria-hidden="true"></a></span> +<span id="cb457-9"><a href="#cb457-9" aria-hidden="true"></a>This is the second page.</span> +<span id="cb457-10"><a href="#cb457-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb457-11"><a href="#cb457-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="cb452"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb452-1"><a href="#cb452-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb458"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb458-1"><a href="#cb458-1" aria-hidden="true"></a><span class="ex">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> @@ -6008,163 +6123,163 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererFootnote</code> macro represents a footnote. This macro will only be produced, when the <strong><code>footnotes</code></strong> option is enabled. The macro receives a single argument that corresponds to the footnote text.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-32">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb453"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb453-1"><a href="#cb453-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb453-2"><a href="#cb453-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> -<span id="cb453-3"><a href="#cb453-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> -<span id="cb453-4"><a href="#cb453-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb453-5"><a href="#cb453-5" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb453-6"><a href="#cb453-6" aria-hidden="true"></a></span> -<span id="cb453-7"><a href="#cb453-7" aria-hidden="true"></a> [^1]: this is a footnote</span> -<span id="cb453-8"><a href="#cb453-8" aria-hidden="true"></a></span> -<span id="cb453-9"><a href="#cb453-9" aria-hidden="true"></a> [^2]: this is some other footnote</span> -<span id="cb453-10"><a href="#cb453-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb453-11"><a href="#cb453-11" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb459"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb459-1"><a href="#cb459-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb459-2"><a href="#cb459-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> +<span id="cb459-3"><a href="#cb459-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> +<span id="cb459-4"><a href="#cb459-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb459-5"><a href="#cb459-5" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> +<span id="cb459-6"><a href="#cb459-6" aria-hidden="true"></a></span> +<span id="cb459-7"><a href="#cb459-7" aria-hidden="true"></a> [^1]: this is a footnote</span> +<span id="cb459-8"><a href="#cb459-8" aria-hidden="true"></a></span> +<span id="cb459-9"><a href="#cb459-9" aria-hidden="true"></a> [^2]: this is some other footnote</span> +<span id="cb459-10"><a href="#cb459-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb459-11"><a href="#cb459-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="cb454"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb454-1"><a href="#cb454-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb460"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb460-1"><a href="#cb460-1" aria-hidden="true"></a><span class="ex">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-56"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-57"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb455"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb455-1"><a href="#cb455-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb455-2"><a href="#cb455-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> -<span id="cb455-3"><a href="#cb455-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb455-4"><a href="#cb455-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb455-5"><a href="#cb455-5" aria-hidden="true"></a> footnote = { (and <span class="fu">\MakeLowercase</span>{#1})},</span> -<span id="cb455-6"><a href="#cb455-6" aria-hidden="true"></a> },</span> -<span id="cb455-7"><a href="#cb455-7" aria-hidden="true"></a>}</span> -<span id="cb455-8"><a href="#cb455-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb455-9"><a href="#cb455-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb455-10"><a href="#cb455-10" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb455-11"><a href="#cb455-11" aria-hidden="true"></a></span> -<span id="cb455-12"><a href="#cb455-12" aria-hidden="true"></a> [^1]: this is a footnote</span> -<span id="cb455-13"><a href="#cb455-13" aria-hidden="true"></a></span> -<span id="cb455-14"><a href="#cb455-14" aria-hidden="true"></a> [^2]: this is some other footnote</span> -<span id="cb455-15"><a href="#cb455-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb455-16"><a href="#cb455-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb461"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb461-1"><a href="#cb461-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb461-2"><a href="#cb461-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</span> +<span id="cb461-3"><a href="#cb461-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb461-4"><a href="#cb461-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb461-5"><a href="#cb461-5" aria-hidden="true"></a> footnote = { (and <span class="fu">\MakeLowercase</span>{#1})},</span> +<span id="cb461-6"><a href="#cb461-6" aria-hidden="true"></a> },</span> +<span id="cb461-7"><a href="#cb461-7" aria-hidden="true"></a>}</span> +<span id="cb461-8"><a href="#cb461-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb461-9"><a href="#cb461-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb461-10"><a href="#cb461-10" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> +<span id="cb461-11"><a href="#cb461-11" aria-hidden="true"></a></span> +<span id="cb461-12"><a href="#cb461-12" aria-hidden="true"></a> [^1]: this is a footnote</span> +<span id="cb461-13"><a href="#cb461-13" aria-hidden="true"></a></span> +<span id="cb461-14"><a href="#cb461-14" aria-hidden="true"></a> [^2]: this is some other footnote</span> +<span id="cb461-15"><a href="#cb461-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb461-16"><a href="#cb461-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="cb456"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb456-1"><a href="#cb456-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb462"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb462-1"><a href="#cb462-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is some text (and this is a footnote) and this is some other text (and this is some other footnote).</p> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-44">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb457"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb457-1"><a href="#cb457-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb457-2"><a href="#cb457-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> -<span id="cb457-3"><a href="#cb457-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> -<span id="cb457-4"><a href="#cb457-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb457-5"><a href="#cb457-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb457-6"><a href="#cb457-6" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb457-7"><a href="#cb457-7" aria-hidden="true"></a></span> -<span id="cb457-8"><a href="#cb457-8" aria-hidden="true"></a> [^1]: this is a footnote</span> -<span id="cb457-9"><a href="#cb457-9" aria-hidden="true"></a></span> -<span id="cb457-10"><a href="#cb457-10" aria-hidden="true"></a> [^2]: this is some other footnote</span> -<span id="cb457-11"><a href="#cb457-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb457-12"><a href="#cb457-12" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb463"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb463-1"><a href="#cb463-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb463-2"><a href="#cb463-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> +<span id="cb463-3"><a href="#cb463-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> +<span id="cb463-4"><a href="#cb463-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb463-5"><a href="#cb463-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb463-6"><a href="#cb463-6" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> +<span id="cb463-7"><a href="#cb463-7" aria-hidden="true"></a></span> +<span id="cb463-8"><a href="#cb463-8" aria-hidden="true"></a> [^1]: this is a footnote</span> +<span id="cb463-9"><a href="#cb463-9" aria-hidden="true"></a></span> +<span id="cb463-10"><a href="#cb463-10" aria-hidden="true"></a> [^2]: this is some other footnote</span> +<span id="cb463-11"><a href="#cb463-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb463-12"><a href="#cb463-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="cb458"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb458-1"><a href="#cb458-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb464"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb464-1"><a href="#cb464-1" aria-hidden="true"></a><span class="ex">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-57"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 class="unnumbered" data-number="" id="latex-example-58"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb459"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb459-1"><a href="#cb459-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb459-2"><a href="#cb459-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb459-3"><a href="#cb459-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> -<span id="cb459-4"><a href="#cb459-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> -<span id="cb459-5"><a href="#cb459-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb459-6"><a href="#cb459-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb459-7"><a href="#cb459-7" aria-hidden="true"></a> a parenthesized citation <span class="fu">\emph</span>{#4}</span> -<span id="cb459-8"><a href="#cb459-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb459-9"><a href="#cb459-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> -<span id="cb459-10"><a href="#cb459-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb459-11"><a href="#cb459-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb459-12"><a href="#cb459-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb459-13"><a href="#cb459-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb459-14"><a href="#cb459-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> -<span id="cb459-15"><a href="#cb459-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb459-16"><a href="#cb459-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="cb459-17"><a href="#cb459-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb459-18"><a href="#cb459-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb459-19"><a href="#cb459-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> -<span id="cb459-20"><a href="#cb459-20" aria-hidden="true"></a> .<span class="co">%</span></span> -<span id="cb459-21"><a href="#cb459-21" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> -<span id="cb459-22"><a href="#cb459-22" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb459-23"><a href="#cb459-23" aria-hidden="true"></a> , and</span> -<span id="cb459-24"><a href="#cb459-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> -<span id="cb459-25"><a href="#cb459-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb459-26"><a href="#cb459-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb459-27"><a href="#cb459-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb459-28"><a href="#cb459-28" aria-hidden="true"></a> cite = {<span class="co">%</span></span> -<span id="cb459-29"><a href="#cb459-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> -<span id="cb459-30"><a href="#cb459-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> -<span id="cb459-31"><a href="#cb459-31" aria-hidden="true"></a> This is</span> -<span id="cb459-32"><a href="#cb459-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> -<span id="cb459-33"><a href="#cb459-33" aria-hidden="true"></a> },</span> -<span id="cb459-34"><a href="#cb459-34" aria-hidden="true"></a> },</span> -<span id="cb459-35"><a href="#cb459-35" aria-hidden="true"></a>}</span> -<span id="cb459-36"><a href="#cb459-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb459-37"><a href="#cb459-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb459-38"><a href="#cb459-38" aria-hidden="true"></a>[see @abrahams90, pp. 12; @eijkhout91, pp. 34]</span> -<span id="cb459-39"><a href="#cb459-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb459-40"><a href="#cb459-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="cb460"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb460-1"><a href="#cb460-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb465"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb465-1"><a href="#cb465-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb465-2"><a href="#cb465-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> +<span id="cb465-3"><a href="#cb465-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> +<span id="cb465-4"><a href="#cb465-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> +<span id="cb465-5"><a href="#cb465-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> +<span id="cb465-6"><a href="#cb465-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb465-7"><a href="#cb465-7" aria-hidden="true"></a> a parenthesized citation <span class="fu">\emph</span>{#4}</span> +<span id="cb465-8"><a href="#cb465-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb465-9"><a href="#cb465-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> +<span id="cb465-10"><a href="#cb465-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb465-11"><a href="#cb465-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> +<span id="cb465-12"><a href="#cb465-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb465-13"><a href="#cb465-13" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb465-14"><a href="#cb465-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> +<span id="cb465-15"><a href="#cb465-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb465-16"><a href="#cb465-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="cb465-17"><a href="#cb465-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb465-18"><a href="#cb465-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb465-19"><a href="#cb465-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> +<span id="cb465-20"><a href="#cb465-20" aria-hidden="true"></a> .<span class="co">%</span></span> +<span id="cb465-21"><a href="#cb465-21" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> +<span id="cb465-22"><a href="#cb465-22" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb465-23"><a href="#cb465-23" aria-hidden="true"></a> , and</span> +<span id="cb465-24"><a href="#cb465-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> +<span id="cb465-25"><a href="#cb465-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> +<span id="cb465-26"><a href="#cb465-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb465-27"><a href="#cb465-27" aria-hidden="true"></a> renderers = {</span> +<span id="cb465-28"><a href="#cb465-28" aria-hidden="true"></a> cite = {<span class="co">%</span></span> +<span id="cb465-29"><a href="#cb465-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> +<span id="cb465-30"><a href="#cb465-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> +<span id="cb465-31"><a href="#cb465-31" aria-hidden="true"></a> This is</span> +<span id="cb465-32"><a href="#cb465-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> +<span id="cb465-33"><a href="#cb465-33" aria-hidden="true"></a> },</span> +<span id="cb465-34"><a href="#cb465-34" aria-hidden="true"></a> },</span> +<span id="cb465-35"><a href="#cb465-35" aria-hidden="true"></a>}</span> +<span id="cb465-36"><a href="#cb465-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb465-37"><a href="#cb465-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb465-38"><a href="#cb465-38" aria-hidden="true"></a>[see @abrahams90, pp. 12; @eijkhout91, pp. 34]</span> +<span id="cb465-39"><a href="#cb465-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb465-40"><a href="#cb465-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="cb466"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb466-1"><a href="#cb466-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 macro.</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> +<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="cb461"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb461-1"><a href="#cb461-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb461-2"><a href="#cb461-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb461-3"><a href="#cb461-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> -<span id="cb461-4"><a href="#cb461-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> -<span id="cb461-5"><a href="#cb461-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb461-6"><a href="#cb461-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb461-7"><a href="#cb461-7" aria-hidden="true"></a> a text citation <span class="fu">\emph</span>{#4}</span> -<span id="cb461-8"><a href="#cb461-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb461-9"><a href="#cb461-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> -<span id="cb461-10"><a href="#cb461-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb461-11"><a href="#cb461-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb461-12"><a href="#cb461-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb461-13"><a href="#cb461-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb461-14"><a href="#cb461-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> -<span id="cb461-15"><a href="#cb461-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb461-16"><a href="#cb461-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="cb461-17"><a href="#cb461-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb461-18"><a href="#cb461-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb461-19"><a href="#cb461-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> -<span id="cb461-20"><a href="#cb461-20" aria-hidden="true"></a> .<span class="co">%</span></span> -<span id="cb461-21"><a href="#cb461-21" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> -<span id="cb461-22"><a href="#cb461-22" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb461-23"><a href="#cb461-23" aria-hidden="true"></a> , and</span> -<span id="cb461-24"><a href="#cb461-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> -<span id="cb461-25"><a href="#cb461-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb461-26"><a href="#cb461-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb461-27"><a href="#cb461-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb461-28"><a href="#cb461-28" aria-hidden="true"></a> textCite = {<span class="co">%</span></span> -<span id="cb461-29"><a href="#cb461-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> -<span id="cb461-30"><a href="#cb461-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> -<span id="cb461-31"><a href="#cb461-31" aria-hidden="true"></a> This is</span> -<span id="cb461-32"><a href="#cb461-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> -<span id="cb461-33"><a href="#cb461-33" aria-hidden="true"></a> },</span> -<span id="cb461-34"><a href="#cb461-34" aria-hidden="true"></a> },</span> -<span id="cb461-35"><a href="#cb461-35" aria-hidden="true"></a>}</span> -<span id="cb461-36"><a href="#cb461-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb461-37"><a href="#cb461-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb461-38"><a href="#cb461-38" aria-hidden="true"></a>@abrahams90 [pp. 12; also @eijkhout91]</span> -<span id="cb461-39"><a href="#cb461-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb461-40"><a href="#cb461-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="cb462"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb462-1"><a href="#cb462-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb467"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb467-1"><a href="#cb467-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb467-2"><a href="#cb467-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> +<span id="cb467-3"><a href="#cb467-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> +<span id="cb467-4"><a href="#cb467-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> +<span id="cb467-5"><a href="#cb467-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> +<span id="cb467-6"><a href="#cb467-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> +<span id="cb467-7"><a href="#cb467-7" aria-hidden="true"></a> a text citation <span class="fu">\emph</span>{#4}</span> +<span id="cb467-8"><a href="#cb467-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb467-9"><a href="#cb467-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> +<span id="cb467-10"><a href="#cb467-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb467-11"><a href="#cb467-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> +<span id="cb467-12"><a href="#cb467-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb467-13"><a href="#cb467-13" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb467-14"><a href="#cb467-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> +<span id="cb467-15"><a href="#cb467-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> +<span id="cb467-16"><a href="#cb467-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="cb467-17"><a href="#cb467-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb467-18"><a href="#cb467-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb467-19"><a href="#cb467-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</span></span> +<span id="cb467-20"><a href="#cb467-20" aria-hidden="true"></a> .<span class="co">%</span></span> +<span id="cb467-21"><a href="#cb467-21" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> +<span id="cb467-22"><a href="#cb467-22" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb467-23"><a href="#cb467-23" aria-hidden="true"></a> , and</span> +<span id="cb467-24"><a href="#cb467-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> +<span id="cb467-25"><a href="#cb467-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> +<span id="cb467-26"><a href="#cb467-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb467-27"><a href="#cb467-27" aria-hidden="true"></a> renderers = {</span> +<span id="cb467-28"><a href="#cb467-28" aria-hidden="true"></a> textCite = {<span class="co">%</span></span> +<span id="cb467-29"><a href="#cb467-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> +<span id="cb467-30"><a href="#cb467-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> +<span id="cb467-31"><a href="#cb467-31" aria-hidden="true"></a> This is</span> +<span id="cb467-32"><a href="#cb467-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> +<span id="cb467-33"><a href="#cb467-33" aria-hidden="true"></a> },</span> +<span id="cb467-34"><a href="#cb467-34" aria-hidden="true"></a> },</span> +<span id="cb467-35"><a href="#cb467-35" aria-hidden="true"></a>}</span> +<span id="cb467-36"><a href="#cb467-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb467-37"><a href="#cb467-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb467-38"><a href="#cb467-38" aria-hidden="true"></a>@abrahams90 [pp. 12; also @eijkhout91]</span> +<span id="cb467-39"><a href="#cb467-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb467-40"><a href="#cb467-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="cb468"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb468-1"><a href="#cb468-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> @@ -6177,67 +6292,67 @@ Thomas,Edison,1847</code></pre> <li><code>c</code> – The corresponding column is centered.</li> <li><code>r</code> – The corresponding column is right-aligned.</li> </ul> -<h5 class="unnumbered" data-number="" id="latex-example-59"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<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="cb463"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb463-1"><a href="#cb463-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb463-2"><a href="#cb463-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> -<span id="cb463-3"><a href="#cb463-3" aria-hidden="true"></a><span class="fu">\newcount\rowCounter</span></span> -<span id="cb463-4"><a href="#cb463-4" aria-hidden="true"></a><span class="fu">\newcount\columnCounter</span></span> -<span id="cb463-5"><a href="#cb463-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb463-6"><a href="#cb463-6" aria-hidden="true"></a><span class="fu">\def\processRow</span>#1{<span class="co">%</span></span> -<span id="cb463-7"><a href="#cb463-7" aria-hidden="true"></a> <span class="fu">\columnCounter</span>=1<span class="co">%</span></span> -<span id="cb463-8"><a href="#cb463-8" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> -<span id="cb463-9"><a href="#cb463-9" aria-hidden="true"></a> As for the alignment,</span> -<span id="cb463-10"><a href="#cb463-10" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb463-11"><a href="#cb463-11" aria-hidden="true"></a> In row <span class="fu">\the\rowCounter</span>,</span> -<span id="cb463-12"><a href="#cb463-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb463-13"><a href="#cb463-13" aria-hidden="true"></a> <span class="fu">\processColumn</span>#1</span> -<span id="cb463-14"><a href="#cb463-14" aria-hidden="true"></a> <span class="fu">\advance\rowCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb463-15"><a href="#cb463-15" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>><span class="fu">\rowTotal\relax</span></span> -<span id="cb463-16"><a href="#cb463-16" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> -<span id="cb463-17"><a href="#cb463-17" aria-hidden="true"></a> <span class="fu">\fi\processRow</span>}<span class="co">%</span></span> -<span id="cb463-18"><a href="#cb463-18" aria-hidden="true"></a><span class="fu">\def\processColumn</span>#1{<span class="co">%</span></span> -<span id="cb463-19"><a href="#cb463-19" aria-hidden="true"></a> column number <span class="fu">\the\columnCounter</span>{}</span> -<span id="cb463-20"><a href="#cb463-20" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> -<span id="cb463-21"><a href="#cb463-21" aria-hidden="true"></a> <span class="fu">\if</span>#1d{}has default alignment<span class="fu">\fi</span></span> -<span id="cb463-22"><a href="#cb463-22" aria-hidden="true"></a> <span class="fu">\if</span>#1l{}is left-aligned<span class="fu">\fi</span></span> -<span id="cb463-23"><a href="#cb463-23" aria-hidden="true"></a> <span class="fu">\if</span>#1c{}is centered<span class="fu">\fi</span></span> -<span id="cb463-24"><a href="#cb463-24" aria-hidden="true"></a> <span class="fu">\if</span>#1r{}is right-aligned<span class="fu">\fi</span></span> -<span id="cb463-25"><a href="#cb463-25" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb463-26"><a href="#cb463-26" aria-hidden="true"></a> says <span class="fu">\emph</span>{#1}<span class="co">%</span></span> -<span id="cb463-27"><a href="#cb463-27" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb463-28"><a href="#cb463-28" aria-hidden="true"></a> <span class="fu">\advance\columnCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb463-29"><a href="#cb463-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="cb463-30"><a href="#cb463-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="cb463-31"><a href="#cb463-31" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span>><span class="fu">\columnTotal\relax</span></span> -<span id="cb463-32"><a href="#cb463-32" aria-hidden="true"></a> .<span class="fu">\expandafter\@gobble</span></span> -<span id="cb463-33"><a href="#cb463-33" aria-hidden="true"></a> <span class="fu">\fi\processColumn</span>}<span class="co">%</span></span> -<span id="cb463-34"><a href="#cb463-34" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb463-35"><a href="#cb463-35" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb463-36"><a href="#cb463-36" aria-hidden="true"></a> renderers = {</span> -<span id="cb463-37"><a href="#cb463-37" aria-hidden="true"></a> table = {<span class="co">%</span></span> -<span id="cb463-38"><a href="#cb463-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="cb463-39"><a href="#cb463-39" aria-hidden="true"></a> and #2 rows long.</span> -<span id="cb463-40"><a href="#cb463-40" aria-hidden="true"></a> <span class="fu">\rowCounter</span>=0<span class="co">%</span></span> -<span id="cb463-41"><a href="#cb463-41" aria-hidden="true"></a> <span class="fu">\def\rowTotal</span>{#2}<span class="co">%</span></span> -<span id="cb463-42"><a href="#cb463-42" aria-hidden="true"></a> <span class="fu">\def\columnTotal</span>{#3}<span class="co">%</span></span> -<span id="cb463-43"><a href="#cb463-43" aria-hidden="true"></a> <span class="fu">\processRow</span></span> -<span id="cb463-44"><a href="#cb463-44" aria-hidden="true"></a> },</span> -<span id="cb463-45"><a href="#cb463-45" aria-hidden="true"></a> },</span> -<span id="cb463-46"><a href="#cb463-46" aria-hidden="true"></a>}</span> -<span id="cb463-47"><a href="#cb463-47" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb463-48"><a href="#cb463-48" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb463-49"><a href="#cb463-49" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb463-50"><a href="#cb463-50" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb463-51"><a href="#cb463-51" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb463-52"><a href="#cb463-52" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb463-53"><a href="#cb463-53" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb463-54"><a href="#cb463-54" aria-hidden="true"></a></span> -<span id="cb463-55"><a href="#cb463-55" aria-hidden="true"></a> : Demonstration of pipe table syntax</span> -<span id="cb463-56"><a href="#cb463-56" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb463-57"><a href="#cb463-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="cb464"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb464-1"><a href="#cb464-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb469"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb469-1"><a href="#cb469-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb469-2"><a href="#cb469-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> +<span id="cb469-3"><a href="#cb469-3" aria-hidden="true"></a><span class="fu">\newcount\rowCounter</span></span> +<span id="cb469-4"><a href="#cb469-4" aria-hidden="true"></a><span class="fu">\newcount\columnCounter</span></span> +<span id="cb469-5"><a href="#cb469-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> +<span id="cb469-6"><a href="#cb469-6" aria-hidden="true"></a><span class="fu">\def\processRow</span>#1{<span class="co">%</span></span> +<span id="cb469-7"><a href="#cb469-7" aria-hidden="true"></a> <span class="fu">\columnCounter</span>=1<span class="co">%</span></span> +<span id="cb469-8"><a href="#cb469-8" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> +<span id="cb469-9"><a href="#cb469-9" aria-hidden="true"></a> As for the alignment,</span> +<span id="cb469-10"><a href="#cb469-10" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb469-11"><a href="#cb469-11" aria-hidden="true"></a> In row <span class="fu">\the\rowCounter</span>,</span> +<span id="cb469-12"><a href="#cb469-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb469-13"><a href="#cb469-13" aria-hidden="true"></a> <span class="fu">\processColumn</span>#1</span> +<span id="cb469-14"><a href="#cb469-14" aria-hidden="true"></a> <span class="fu">\advance\rowCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb469-15"><a href="#cb469-15" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>><span class="fu">\rowTotal\relax</span></span> +<span id="cb469-16"><a href="#cb469-16" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> +<span id="cb469-17"><a href="#cb469-17" aria-hidden="true"></a> <span class="fu">\fi\processRow</span>}<span class="co">%</span></span> +<span id="cb469-18"><a href="#cb469-18" aria-hidden="true"></a><span class="fu">\def\processColumn</span>#1{<span class="co">%</span></span> +<span id="cb469-19"><a href="#cb469-19" aria-hidden="true"></a> column number <span class="fu">\the\columnCounter</span>{}</span> +<span id="cb469-20"><a href="#cb469-20" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> +<span id="cb469-21"><a href="#cb469-21" aria-hidden="true"></a> <span class="fu">\if</span>#1d{}has default alignment<span class="fu">\fi</span></span> +<span id="cb469-22"><a href="#cb469-22" aria-hidden="true"></a> <span class="fu">\if</span>#1l{}is left-aligned<span class="fu">\fi</span></span> +<span id="cb469-23"><a href="#cb469-23" aria-hidden="true"></a> <span class="fu">\if</span>#1c{}is centered<span class="fu">\fi</span></span> +<span id="cb469-24"><a href="#cb469-24" aria-hidden="true"></a> <span class="fu">\if</span>#1r{}is right-aligned<span class="fu">\fi</span></span> +<span id="cb469-25"><a href="#cb469-25" aria-hidden="true"></a> <span class="fu">\else</span></span> +<span id="cb469-26"><a href="#cb469-26" aria-hidden="true"></a> says <span class="fu">\emph</span>{#1}<span class="co">%</span></span> +<span id="cb469-27"><a href="#cb469-27" aria-hidden="true"></a> <span class="fu">\fi</span></span> +<span id="cb469-28"><a href="#cb469-28" aria-hidden="true"></a> <span class="fu">\advance\columnCounter</span> by 1<span class="fu">\relax</span></span> +<span id="cb469-29"><a href="#cb469-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="cb469-30"><a href="#cb469-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="cb469-31"><a href="#cb469-31" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span>><span class="fu">\columnTotal\relax</span></span> +<span id="cb469-32"><a href="#cb469-32" aria-hidden="true"></a> .<span class="fu">\expandafter\@gobble</span></span> +<span id="cb469-33"><a href="#cb469-33" aria-hidden="true"></a> <span class="fu">\fi\processColumn</span>}<span class="co">%</span></span> +<span id="cb469-34"><a href="#cb469-34" aria-hidden="true"></a><span class="fu">\makeatother</span></span> +<span id="cb469-35"><a href="#cb469-35" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb469-36"><a href="#cb469-36" aria-hidden="true"></a> renderers = {</span> +<span id="cb469-37"><a href="#cb469-37" aria-hidden="true"></a> table = {<span class="co">%</span></span> +<span id="cb469-38"><a href="#cb469-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="cb469-39"><a href="#cb469-39" aria-hidden="true"></a> and #2 rows long.</span> +<span id="cb469-40"><a href="#cb469-40" aria-hidden="true"></a> <span class="fu">\rowCounter</span>=0<span class="co">%</span></span> +<span id="cb469-41"><a href="#cb469-41" aria-hidden="true"></a> <span class="fu">\def\rowTotal</span>{#2}<span class="co">%</span></span> +<span id="cb469-42"><a href="#cb469-42" aria-hidden="true"></a> <span class="fu">\def\columnTotal</span>{#3}<span class="co">%</span></span> +<span id="cb469-43"><a href="#cb469-43" aria-hidden="true"></a> <span class="fu">\processRow</span></span> +<span id="cb469-44"><a href="#cb469-44" aria-hidden="true"></a> },</span> +<span id="cb469-45"><a href="#cb469-45" aria-hidden="true"></a> },</span> +<span id="cb469-46"><a href="#cb469-46" aria-hidden="true"></a>}</span> +<span id="cb469-47"><a href="#cb469-47" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb469-48"><a href="#cb469-48" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb469-49"><a href="#cb469-49" aria-hidden="true"></a>| Right | Left | Default | Center |</span> +<span id="cb469-50"><a href="#cb469-50" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> +<span id="cb469-51"><a href="#cb469-51" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> +<span id="cb469-52"><a href="#cb469-52" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> +<span id="cb469-53"><a href="#cb469-53" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> +<span id="cb469-54"><a href="#cb469-54" aria-hidden="true"></a></span> +<span id="cb469-55"><a href="#cb469-55" aria-hidden="true"></a> : Demonstration of pipe table syntax</span> +<span id="cb469-56"><a href="#cb469-56" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb469-57"><a href="#cb469-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="cb470"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb470-1"><a href="#cb470-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> @@ -6245,36 +6360,36 @@ Thomas,Edison,1847</code></pre> <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-60"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<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="cb465"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb465-1"><a href="#cb465-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb465-2"><a href="#cb465-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span> -<span id="cb465-3"><a href="#cb465-3" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span> -<span id="cb465-4"><a href="#cb465-4" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb465-5"><a href="#cb465-5" aria-hidden="true"></a> renderers = {</span> -<span id="cb465-6"><a href="#cb465-6" aria-hidden="true"></a> inlineHtmlComment = {<span class="fu">\marginnote</span>{#1}},</span> -<span id="cb465-7"><a href="#cb465-7" aria-hidden="true"></a> blockHtmlCommentBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span> -<span id="cb465-8"><a href="#cb465-8" aria-hidden="true"></a> blockHtmlCommentEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span> -<span id="cb465-9"><a href="#cb465-9" aria-hidden="true"></a> },</span> -<span id="cb465-10"><a href="#cb465-10" aria-hidden="true"></a>}</span> -<span id="cb465-11"><a href="#cb465-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb465-12"><a href="#cb465-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb465-13"><a href="#cb465-13" aria-hidden="true"></a>A useful use of inline HTML comments are side notes.</span> -<span id="cb465-14"><a href="#cb465-14" aria-hidden="true"></a><!-- Side notes are displayed in the horizontal margins next to the relevant</span> -<span id="cb465-15"><a href="#cb465-15" aria-hidden="true"></a>passages, which makes them *easier for the reader to find* than footnotes. --></span> -<span id="cb465-16"><a href="#cb465-16" aria-hidden="true"></a></span> -<span id="cb465-17"><a href="#cb465-17" aria-hidden="true"></a>We can render block HTML comments as blockquotes:</span> -<span id="cb465-18"><a href="#cb465-18" aria-hidden="true"></a></span> -<span id="cb465-19"><a href="#cb465-19" aria-hidden="true"></a><!--</span> -<span id="cb465-20"><a href="#cb465-20" aria-hidden="true"></a>Here is a block HTML comment with a code example that a programmer might understand:</span> -<span id="cb465-21"><a href="#cb465-21" aria-hidden="true"></a></span> -<span id="cb465-22"><a href="#cb465-22" aria-hidden="true"></a> foo = bar + baz - 42</span> -<span id="cb465-23"><a href="#cb465-23" aria-hidden="true"></a>--></span> -<span id="cb465-24"><a href="#cb465-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb465-25"><a href="#cb465-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="cb466"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb466-1"><a href="#cb466-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb466-2"><a href="#cb466-2" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb471"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb471-1"><a href="#cb471-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb471-2"><a href="#cb471-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span> +<span id="cb471-3"><a href="#cb471-3" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span> +<span id="cb471-4"><a href="#cb471-4" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb471-5"><a href="#cb471-5" aria-hidden="true"></a> renderers = {</span> +<span id="cb471-6"><a href="#cb471-6" aria-hidden="true"></a> inlineHtmlComment = {<span class="fu">\marginnote</span>{#1}},</span> +<span id="cb471-7"><a href="#cb471-7" aria-hidden="true"></a> blockHtmlCommentBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span> +<span id="cb471-8"><a href="#cb471-8" aria-hidden="true"></a> blockHtmlCommentEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span> +<span id="cb471-9"><a href="#cb471-9" aria-hidden="true"></a> },</span> +<span id="cb471-10"><a href="#cb471-10" aria-hidden="true"></a>}</span> +<span id="cb471-11"><a href="#cb471-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb471-12"><a href="#cb471-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb471-13"><a href="#cb471-13" aria-hidden="true"></a>A useful use of inline HTML comments are side notes.</span> +<span id="cb471-14"><a href="#cb471-14" aria-hidden="true"></a><!-- Side notes are displayed in the horizontal margins next to the relevant</span> +<span id="cb471-15"><a href="#cb471-15" aria-hidden="true"></a>passages, which makes them *easier for the reader to find* than footnotes. --></span> +<span id="cb471-16"><a href="#cb471-16" aria-hidden="true"></a></span> +<span id="cb471-17"><a href="#cb471-17" aria-hidden="true"></a>We can render block HTML comments as blockquotes:</span> +<span id="cb471-18"><a href="#cb471-18" aria-hidden="true"></a></span> +<span id="cb471-19"><a href="#cb471-19" aria-hidden="true"></a><!--</span> +<span id="cb471-20"><a href="#cb471-20" aria-hidden="true"></a>Here is a block HTML comment with a code example that a programmer might understand:</span> +<span id="cb471-21"><a href="#cb471-21" aria-hidden="true"></a></span> +<span id="cb471-22"><a href="#cb471-22" aria-hidden="true"></a> foo = bar + baz - 42</span> +<span id="cb471-23"><a href="#cb471-23" aria-hidden="true"></a>--></span> +<span id="cb471-24"><a href="#cb471-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb471-25"><a href="#cb471-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="cb472"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb472-1"><a href="#cb472-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> +<span id="cb472-2"><a href="#cb472-2" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following body text:</p> <blockquote> <p>A useful use of HTML comments are side notes.</p> @@ -6291,28 +6406,28 @@ Thomas,Edison,1847</code></pre> <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-61"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<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="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>[html]{<span class="ex">markdown</span>}</span> -<span id="cb468-3"><a href="#cb468-3" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span> -<span id="cb468-4"><a href="#cb468-4" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span> -<span id="cb468-5"><a href="#cb468-5" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb468-6"><a href="#cb468-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb468-7"><a href="#cb468-7" aria-hidden="true"></a> inlineHtmlTag = {<span class="fu">\textbf</span>{#1}},</span> -<span id="cb468-8"><a href="#cb468-8" aria-hidden="true"></a> inputBlockHtmlElement = {<span class="fu">\verbatiminput</span>{#1}},</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> -<span id="cb468-11"><a href="#cb468-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</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><b>_Hello,_ world!</b><br/></span> -<span id="cb468-14"><a href="#cb468-14" aria-hidden="true"></a></span> -<span id="cb468-15"><a href="#cb468-15" aria-hidden="true"></a><div>_Hello,_ world!</div></span> -<span id="cb468-16"><a href="#cb468-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb468-17"><a href="#cb468-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="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> -<span id="cb469-2"><a href="#cb469-2" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<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>[html]{<span class="ex">markdown</span>}</span> +<span id="cb474-3"><a href="#cb474-3" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span> +<span id="cb474-4"><a href="#cb474-4" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span> +<span id="cb474-5"><a href="#cb474-5" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb474-6"><a href="#cb474-6" aria-hidden="true"></a> renderers = {</span> +<span id="cb474-7"><a href="#cb474-7" aria-hidden="true"></a> inlineHtmlTag = {<span class="fu">\textbf</span>{#1}},</span> +<span id="cb474-8"><a href="#cb474-8" aria-hidden="true"></a> inputBlockHtmlElement = {<span class="fu">\verbatiminput</span>{#1}},</span> +<span id="cb474-9"><a href="#cb474-9" aria-hidden="true"></a> },</span> +<span id="cb474-10"><a href="#cb474-10" aria-hidden="true"></a>}</span> +<span id="cb474-11"><a href="#cb474-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb474-12"><a href="#cb474-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb474-13"><a href="#cb474-13" aria-hidden="true"></a><b>_Hello,_ world!</b><br/></span> +<span id="cb474-14"><a href="#cb474-14" aria-hidden="true"></a></span> +<span id="cb474-15"><a href="#cb474-15" aria-hidden="true"></a><div>_Hello,_ world!</div></span> +<span id="cb474-16"><a href="#cb474-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb474-17"><a href="#cb474-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="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> +<span id="cb475-2"><a href="#cb475-2" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following body text:</p> <blockquote> <p><strong><b></strong>_Hello,_ world!<strong></b><br/></strong></p> @@ -6323,42 +6438,42 @@ Thomas,Edison,1847</code></pre> <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-62"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<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="cb471"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb471-1"><a href="#cb471-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb471-2"><a href="#cb471-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes, underscores=false]{<span class="ex">markdown</span>}</span> -<span id="cb471-3"><a href="#cb471-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb471-4"><a href="#cb471-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb471-5"><a href="#cb471-5" aria-hidden="true"></a> attributeIdentifier = {<span class="co">%</span></span> -<span id="cb471-6"><a href="#cb471-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb471-7"><a href="#cb471-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(Identifier: #1)}</span> -<span id="cb471-8"><a href="#cb471-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb471-9"><a href="#cb471-9" aria-hidden="true"></a> },</span> -<span id="cb471-10"><a href="#cb471-10" aria-hidden="true"></a> attributeClassName = {<span class="co">%</span></span> -<span id="cb471-11"><a href="#cb471-11" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb471-12"><a href="#cb471-12" aria-hidden="true"></a> <span class="fu">\emph</span>{(Class name: #1)}</span> -<span id="cb471-13"><a href="#cb471-13" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb471-14"><a href="#cb471-14" aria-hidden="true"></a> },</span> -<span id="cb471-15"><a href="#cb471-15" aria-hidden="true"></a> attributeKeyValue = {<span class="co">%</span></span> -<span id="cb471-16"><a href="#cb471-16" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb471-17"><a href="#cb471-17" aria-hidden="true"></a> <span class="fu">\emph</span>{(Key: #1, Value: #2)}</span> -<span id="cb471-18"><a href="#cb471-18" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb471-19"><a href="#cb471-19" aria-hidden="true"></a> },</span> -<span id="cb471-20"><a href="#cb471-20" aria-hidden="true"></a> },</span> -<span id="cb471-21"><a href="#cb471-21" aria-hidden="true"></a>}</span> -<span id="cb471-22"><a href="#cb471-22" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb471-23"><a href="#cb471-23" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb471-24"><a href="#cb471-24" aria-hidden="true"></a></span> -<span id="cb471-25"><a href="#cb471-25" aria-hidden="true"></a># First top-level heading {jane=doe}</span> -<span id="cb471-26"><a href="#cb471-26" aria-hidden="true"></a></span> -<span id="cb471-27"><a href="#cb471-27" aria-hidden="true"></a>## A subheading {#identifier}</span> -<span id="cb471-28"><a href="#cb471-28" aria-hidden="true"></a></span> -<span id="cb471-29"><a href="#cb471-29" aria-hidden="true"></a># Second top-level heading {.class_name}</span> -<span id="cb471-30"><a href="#cb471-30" aria-hidden="true"></a></span> -<span id="cb471-31"><a href="#cb471-31" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb471-32"><a href="#cb471-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="cb472"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb472-1"><a href="#cb472-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb477"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb477-1"><a href="#cb477-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb477-2"><a href="#cb477-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes, underscores=false]{<span class="ex">markdown</span>}</span> +<span id="cb477-3"><a href="#cb477-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb477-4"><a href="#cb477-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb477-5"><a href="#cb477-5" aria-hidden="true"></a> attributeIdentifier = {<span class="co">%</span></span> +<span id="cb477-6"><a href="#cb477-6" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb477-7"><a href="#cb477-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(Identifier: #1)}</span> +<span id="cb477-8"><a href="#cb477-8" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb477-9"><a href="#cb477-9" aria-hidden="true"></a> },</span> +<span id="cb477-10"><a href="#cb477-10" aria-hidden="true"></a> attributeClassName = {<span class="co">%</span></span> +<span id="cb477-11"><a href="#cb477-11" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb477-12"><a href="#cb477-12" aria-hidden="true"></a> <span class="fu">\emph</span>{(Class name: #1)}</span> +<span id="cb477-13"><a href="#cb477-13" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb477-14"><a href="#cb477-14" aria-hidden="true"></a> },</span> +<span id="cb477-15"><a href="#cb477-15" aria-hidden="true"></a> attributeKeyValue = {<span class="co">%</span></span> +<span id="cb477-16"><a href="#cb477-16" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb477-17"><a href="#cb477-17" aria-hidden="true"></a> <span class="fu">\emph</span>{(Key: #1, Value: #2)}</span> +<span id="cb477-18"><a href="#cb477-18" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb477-19"><a href="#cb477-19" aria-hidden="true"></a> },</span> +<span id="cb477-20"><a href="#cb477-20" aria-hidden="true"></a> },</span> +<span id="cb477-21"><a href="#cb477-21" aria-hidden="true"></a>}</span> +<span id="cb477-22"><a href="#cb477-22" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb477-23"><a href="#cb477-23" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb477-24"><a href="#cb477-24" aria-hidden="true"></a></span> +<span id="cb477-25"><a href="#cb477-25" aria-hidden="true"></a># First top-level heading {jane=doe}</span> +<span id="cb477-26"><a href="#cb477-26" aria-hidden="true"></a></span> +<span id="cb477-27"><a href="#cb477-27" aria-hidden="true"></a>## A subheading {#identifier}</span> +<span id="cb477-28"><a href="#cb477-28" aria-hidden="true"></a></span> +<span id="cb477-29"><a href="#cb477-29" aria-hidden="true"></a># Second top-level heading {.class_name}</span> +<span id="cb477-30"><a href="#cb477-30" aria-hidden="true"></a></span> +<span id="cb477-31"><a href="#cb477-31" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb477-32"><a href="#cb477-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="cb478"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb478-1"><a href="#cb478-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="first-top-level-heading">First top-level heading</h1> @@ -6371,37 +6486,37 @@ Thomas,Edison,1847</code></pre> <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-63"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<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="cb473"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb473-1"><a href="#cb473-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb473-2"><a href="#cb473-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span> -<span id="cb473-3"><a href="#cb473-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb473-4"><a href="#cb473-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb473-5"><a href="#cb473-5" aria-hidden="true"></a> headerAttributeContextBegin = {<span class="co">%</span></span> -<span id="cb473-6"><a href="#cb473-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb473-7"><a href="#cb473-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a header attribute context)}</span> -<span id="cb473-8"><a href="#cb473-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb473-9"><a href="#cb473-9" aria-hidden="true"></a> },</span> -<span id="cb473-10"><a href="#cb473-10" aria-hidden="true"></a> headerAttributeContextBegin = {<span class="co">%</span></span> -<span id="cb473-11"><a href="#cb473-11" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb473-12"><a href="#cb473-12" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a header attribute context)}</span> -<span id="cb473-13"><a href="#cb473-13" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb473-14"><a href="#cb473-14" aria-hidden="true"></a> },</span> -<span id="cb473-15"><a href="#cb473-15" aria-hidden="true"></a> },</span> -<span id="cb473-16"><a href="#cb473-16" aria-hidden="true"></a>}</span> -<span id="cb473-17"><a href="#cb473-17" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb473-18"><a href="#cb473-18" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb473-19"><a href="#cb473-19" aria-hidden="true"></a></span> -<span id="cb473-20"><a href="#cb473-20" aria-hidden="true"></a># First top-level heading</span> -<span id="cb473-21"><a href="#cb473-21" aria-hidden="true"></a></span> -<span id="cb473-22"><a href="#cb473-22" aria-hidden="true"></a>## A subheading {#identifier}</span> -<span id="cb473-23"><a href="#cb473-23" aria-hidden="true"></a></span> -<span id="cb473-24"><a href="#cb473-24" aria-hidden="true"></a># Second top-level heading {.class_name}</span> -<span id="cb473-25"><a href="#cb473-25" aria-hidden="true"></a></span> -<span id="cb473-26"><a href="#cb473-26" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb473-27"><a href="#cb473-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="cb474"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb474-1"><a href="#cb474-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb479"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb479-1"><a href="#cb479-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb479-2"><a href="#cb479-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span> +<span id="cb479-3"><a href="#cb479-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb479-4"><a href="#cb479-4" aria-hidden="true"></a> renderers = {</span> +<span id="cb479-5"><a href="#cb479-5" aria-hidden="true"></a> headerAttributeContextBegin = {<span class="co">%</span></span> +<span id="cb479-6"><a href="#cb479-6" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb479-7"><a href="#cb479-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(The beginning of a header attribute context)}</span> +<span id="cb479-8"><a href="#cb479-8" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb479-9"><a href="#cb479-9" aria-hidden="true"></a> },</span> +<span id="cb479-10"><a href="#cb479-10" aria-hidden="true"></a> headerAttributeContextBegin = {<span class="co">%</span></span> +<span id="cb479-11"><a href="#cb479-11" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb479-12"><a href="#cb479-12" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a header attribute context)}</span> +<span id="cb479-13"><a href="#cb479-13" aria-hidden="true"></a> <span class="fu">\par</span></span> +<span id="cb479-14"><a href="#cb479-14" aria-hidden="true"></a> },</span> +<span id="cb479-15"><a href="#cb479-15" aria-hidden="true"></a> },</span> +<span id="cb479-16"><a href="#cb479-16" aria-hidden="true"></a>}</span> +<span id="cb479-17"><a href="#cb479-17" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb479-18"><a href="#cb479-18" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb479-19"><a href="#cb479-19" aria-hidden="true"></a></span> +<span id="cb479-20"><a href="#cb479-20" aria-hidden="true"></a># First top-level heading</span> +<span id="cb479-21"><a href="#cb479-21" aria-hidden="true"></a></span> +<span id="cb479-22"><a href="#cb479-22" aria-hidden="true"></a>## A subheading {#identifier}</span> +<span id="cb479-23"><a href="#cb479-23" aria-hidden="true"></a></span> +<span id="cb479-24"><a href="#cb479-24" aria-hidden="true"></a># Second top-level heading {.class_name}</span> +<span id="cb479-25"><a href="#cb479-25" aria-hidden="true"></a></span> +<span id="cb479-26"><a href="#cb479-26" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb479-27"><a href="#cb479-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="cb480"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb480-1"><a href="#cb480-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="first-top-level-heading-1">First top-level heading</h1> @@ -6416,52 +6531,52 @@ Thomas,Edison,1847</code></pre> <p>By default, token renderers point to package-defined <span class="tex">T<sub>e</sub>X</span> macros, further referred to as <em>prototypes</em>, which provide useful default definitions.</p> <h5 class="unnumbered" data-number="" id="plain-tex-example-33">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb475"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb475-1"><a href="#cb475-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb475-2"><a href="#cb475-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> -<span id="cb475-3"><a href="#cb475-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> -<span id="cb475-4"><a href="#cb475-4" aria-hidden="true"></a>}</span> -<span id="cb475-5"><a href="#cb475-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb475-6"><a href="#cb475-6" aria-hidden="true"></a>~</span> -<span id="cb475-7"><a href="#cb475-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb475-8"><a href="#cb475-8" aria-hidden="true"></a></span> -<span id="cb475-9"><a href="#cb475-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> -<span id="cb475-10"><a href="#cb475-10" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</span></span> -<span id="cb475-11"><a href="#cb475-11" aria-hidden="true"></a>}</span> -<span id="cb475-12"><a href="#cb475-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb475-13"><a href="#cb475-13" aria-hidden="true"></a>~</span> -<span id="cb475-14"><a href="#cb475-14" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb475-15"><a href="#cb475-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="cb476"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb476-1"><a href="#cb476-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb481"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb481-1"><a href="#cb481-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb481-2"><a href="#cb481-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> +<span id="cb481-3"><a href="#cb481-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> +<span id="cb481-4"><a href="#cb481-4" aria-hidden="true"></a>}</span> +<span id="cb481-5"><a href="#cb481-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb481-6"><a href="#cb481-6" aria-hidden="true"></a>~</span> +<span id="cb481-7"><a href="#cb481-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb481-8"><a href="#cb481-8" aria-hidden="true"></a></span> +<span id="cb481-9"><a href="#cb481-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> +<span id="cb481-10"><a href="#cb481-10" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</span></span> +<span id="cb481-11"><a href="#cb481-11" aria-hidden="true"></a>}</span> +<span id="cb481-12"><a href="#cb481-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb481-13"><a href="#cb481-13" aria-hidden="true"></a>~</span> +<span id="cb481-14"><a href="#cb481-14" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb481-15"><a href="#cb481-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="cb482"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb482-1"><a href="#cb482-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Packages can specify token renderer prototypes.</p> <p>User-defined token renderers take precedence.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-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="cb477"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb477-1"><a href="#cb477-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb477-2"><a href="#cb477-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb477-3"><a href="#cb477-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb477-4"><a href="#cb477-4" aria-hidden="true"></a> rendererPrototypes = {</span> -<span id="cb477-5"><a href="#cb477-5" aria-hidden="true"></a> tilde = {Packages can specify token renderer prototypes.},</span> -<span id="cb477-6"><a href="#cb477-6" aria-hidden="true"></a> },</span> -<span id="cb477-7"><a href="#cb477-7" aria-hidden="true"></a>}</span> -<span id="cb477-8"><a href="#cb477-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb477-9"><a href="#cb477-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb477-10"><a href="#cb477-10" aria-hidden="true"></a>~</span> -<span id="cb477-11"><a href="#cb477-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb477-12"><a href="#cb477-12" aria-hidden="true"></a></span> -<span id="cb477-13"><a href="#cb477-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb477-14"><a href="#cb477-14" aria-hidden="true"></a> renderers = {</span> -<span id="cb477-15"><a href="#cb477-15" aria-hidden="true"></a> tilde = {User-defined token renderers take precedence.},</span> -<span id="cb477-16"><a href="#cb477-16" aria-hidden="true"></a> },</span> -<span id="cb477-17"><a href="#cb477-17" aria-hidden="true"></a>}</span> -<span id="cb477-18"><a href="#cb477-18" aria-hidden="true"></a>~</span> -<span id="cb477-19"><a href="#cb477-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb477-20"><a href="#cb477-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="cb478"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb478-1"><a href="#cb478-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<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="cb483"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb483-1"><a href="#cb483-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb483-2"><a href="#cb483-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> +<span id="cb483-3"><a href="#cb483-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb483-4"><a href="#cb483-4" aria-hidden="true"></a> rendererPrototypes = {</span> +<span id="cb483-5"><a href="#cb483-5" aria-hidden="true"></a> tilde = {Packages can specify token renderer prototypes.},</span> +<span id="cb483-6"><a href="#cb483-6" aria-hidden="true"></a> },</span> +<span id="cb483-7"><a href="#cb483-7" aria-hidden="true"></a>}</span> +<span id="cb483-8"><a href="#cb483-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb483-9"><a href="#cb483-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb483-10"><a href="#cb483-10" aria-hidden="true"></a>~</span> +<span id="cb483-11"><a href="#cb483-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb483-12"><a href="#cb483-12" aria-hidden="true"></a></span> +<span id="cb483-13"><a href="#cb483-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> +<span id="cb483-14"><a href="#cb483-14" aria-hidden="true"></a> renderers = {</span> +<span id="cb483-15"><a href="#cb483-15" aria-hidden="true"></a> tilde = {User-defined token renderers take precedence.},</span> +<span id="cb483-16"><a href="#cb483-16" aria-hidden="true"></a> },</span> +<span id="cb483-17"><a href="#cb483-17" aria-hidden="true"></a>}</span> +<span id="cb483-18"><a href="#cb483-18" aria-hidden="true"></a>~</span> +<span id="cb483-19"><a href="#cb483-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> +<span id="cb483-20"><a href="#cb483-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="cb484"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb484-1"><a href="#cb484-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Packages can specify token renderer prototypes.</p> @@ -6469,29 +6584,121 @@ Thomas,Edison,1847</code></pre> </blockquote> <h5 class="unnumbered" data-number="" id="context-example-45">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb479"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb479-1"><a href="#cb479-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb479-2"><a href="#cb479-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> -<span id="cb479-3"><a href="#cb479-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> -<span id="cb479-4"><a href="#cb479-4" aria-hidden="true"></a>}</span> -<span id="cb479-5"><a href="#cb479-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb479-6"><a href="#cb479-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb479-7"><a href="#cb479-7" aria-hidden="true"></a>~</span> -<span id="cb479-8"><a href="#cb479-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb479-9"><a href="#cb479-9" aria-hidden="true"></a></span> -<span id="cb479-10"><a href="#cb479-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> -<span id="cb479-11"><a href="#cb479-11" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</span></span> -<span id="cb479-12"><a href="#cb479-12" aria-hidden="true"></a>}</span> -<span id="cb479-13"><a href="#cb479-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb479-14"><a href="#cb479-14" aria-hidden="true"></a>~</span> -<span id="cb479-15"><a href="#cb479-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb479-16"><a href="#cb479-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="cb480"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb480-1"><a href="#cb480-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb485"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb485-1"><a href="#cb485-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb485-2"><a href="#cb485-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> +<span id="cb485-3"><a href="#cb485-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> +<span id="cb485-4"><a href="#cb485-4" aria-hidden="true"></a>}</span> +<span id="cb485-5"><a href="#cb485-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb485-6"><a href="#cb485-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb485-7"><a href="#cb485-7" aria-hidden="true"></a>~</span> +<span id="cb485-8"><a href="#cb485-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb485-9"><a href="#cb485-9" aria-hidden="true"></a></span> +<span id="cb485-10"><a href="#cb485-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> +<span id="cb485-11"><a href="#cb485-11" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</span></span> +<span id="cb485-12"><a href="#cb485-12" aria-hidden="true"></a>}</span> +<span id="cb485-13"><a href="#cb485-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb485-14"><a href="#cb485-14" aria-hidden="true"></a>~</span> +<span id="cb485-15"><a href="#cb485-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb485-16"><a href="#cb485-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="cb486"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb486-1"><a href="#cb486-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Packages can specify token renderer prototypes.</p> <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-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="cb487"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb487-1"><a href="#cb487-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> +<span id="cb487-2"><a href="#cb487-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb487-3"><a href="#cb487-3" aria-hidden="true"></a><span class="fu">\ExplSyntaxOn</span></span> +<span id="cb487-4"><a href="#cb487-4" aria-hidden="true"></a><span class="fu">\keys</span>_define:nn</span> +<span id="cb487-5"><a href="#cb487-5" aria-hidden="true"></a> { markdown/jekyllData }</span> +<span id="cb487-6"><a href="#cb487-6" aria-hidden="true"></a> {</span> +<span id="cb487-7"><a href="#cb487-7" aria-hidden="true"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> +<span id="cb487-8"><a href="#cb487-8" aria-hidden="true"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> +<span id="cb487-9"><a href="#cb487-9" aria-hidden="true"></a> }</span> +<span id="cb487-10"><a href="#cb487-10" aria-hidden="true"></a><span class="fu">\ExplSyntaxOff</span></span> +<span id="cb487-11"><a href="#cb487-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb487-12"><a href="#cb487-12" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb487-13"><a href="#cb487-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> +<span id="cb487-14"><a href="#cb487-14" aria-hidden="true"></a>---</span> +<span id="cb487-15"><a href="#cb487-15" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb487-16"><a href="#cb487-16" aria-hidden="true"></a>age: 99</span> +<span id="cb487-17"><a href="#cb487-17" aria-hidden="true"></a>---</span> +<span id="cb487-18"><a href="#cb487-18" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> +<span id="cb487-19"><a href="#cb487-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="cb488"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb488-1"><a href="#cb488-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<blockquote> +<p>Jane Doe is 99 years old.</p> +</blockquote> +<h5 class="unnumbered" data-number="" id="latex-example-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="cb489"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb489-1"><a href="#cb489-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> +<span id="cb489-2"><a href="#cb489-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[jekyllData]{<span class="ex">markdown</span>}</span> +<span id="cb489-3"><a href="#cb489-3" aria-hidden="true"></a><span class="fu">\ExplSyntaxOn</span></span> +<span id="cb489-4"><a href="#cb489-4" aria-hidden="true"></a><span class="fu">\keys</span>_define:nn</span> +<span id="cb489-5"><a href="#cb489-5" aria-hidden="true"></a> { markdown/jekyllData }</span> +<span id="cb489-6"><a href="#cb489-6" aria-hidden="true"></a> {</span> +<span id="cb489-7"><a href="#cb489-7" aria-hidden="true"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> +<span id="cb489-8"><a href="#cb489-8" aria-hidden="true"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> +<span id="cb489-9"><a href="#cb489-9" aria-hidden="true"></a> }</span> +<span id="cb489-10"><a href="#cb489-10" aria-hidden="true"></a><span class="fu">\ExplSyntaxOff</span></span> +<span id="cb489-11"><a href="#cb489-11" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> +<span id="cb489-12"><a href="#cb489-12" aria-hidden="true"></a> renderers = {</span> +<span id="cb489-13"><a href="#cb489-13" aria-hidden="true"></a> jekyllDataEnd = {<span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.},</span> +<span id="cb489-14"><a href="#cb489-14" aria-hidden="true"></a> }</span> +<span id="cb489-15"><a href="#cb489-15" aria-hidden="true"></a>}</span> +<span id="cb489-16"><a href="#cb489-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> +<span id="cb489-17"><a href="#cb489-17" aria-hidden="true"></a></span> +<span id="cb489-18"><a href="#cb489-18" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> +<span id="cb489-19"><a href="#cb489-19" aria-hidden="true"></a>---</span> +<span id="cb489-20"><a href="#cb489-20" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb489-21"><a href="#cb489-21" aria-hidden="true"></a>age: 99</span> +<span id="cb489-22"><a href="#cb489-22" aria-hidden="true"></a>---</span> +<span id="cb489-23"><a href="#cb489-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> +<span id="cb489-24"><a href="#cb489-24" aria-hidden="true"></a></span> +<span id="cb489-25"><a href="#cb489-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="cb490"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb490-1"><a href="#cb490-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<blockquote> +<p>Jane Doe is 99 years old.</p> +</blockquote> +<h5 class="unnumbered" data-number="" id="context-example-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="cb491"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb491-1"><a href="#cb491-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> +<span id="cb491-2"><a href="#cb491-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionJekyllData</span>{true}</span> +<span id="cb491-3"><a href="#cb491-3" aria-hidden="true"></a><span class="fu">\ExplSyntaxOn</span></span> +<span id="cb491-4"><a href="#cb491-4" aria-hidden="true"></a><span class="fu">\keys</span>_define:nn</span> +<span id="cb491-5"><a href="#cb491-5" aria-hidden="true"></a> { markdown/jekyllData }</span> +<span id="cb491-6"><a href="#cb491-6" aria-hidden="true"></a> {</span> +<span id="cb491-7"><a href="#cb491-7" aria-hidden="true"></a> name .code:n = { <span class="fu">\gdef\name</span>{#1} },</span> +<span id="cb491-8"><a href="#cb491-8" aria-hidden="true"></a> age .code:n = { <span class="fu">\gdef\age</span>{#1} },</span> +<span id="cb491-9"><a href="#cb491-9" aria-hidden="true"></a> }</span> +<span id="cb491-10"><a href="#cb491-10" aria-hidden="true"></a><span class="fu">\ExplSyntaxOff</span></span> +<span id="cb491-11"><a href="#cb491-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererJekyllDataEnd</span>{<span class="co">%</span></span> +<span id="cb491-12"><a href="#cb491-12" aria-hidden="true"></a> <span class="fu">\name</span>{} is <span class="fu">\age</span>{} years old.}</span> +<span id="cb491-13"><a href="#cb491-13" aria-hidden="true"></a><span class="fu">\starttext</span></span> +<span id="cb491-14"><a href="#cb491-14" aria-hidden="true"></a></span> +<span id="cb491-15"><a href="#cb491-15" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> +<span id="cb491-16"><a href="#cb491-16" aria-hidden="true"></a>---</span> +<span id="cb491-17"><a href="#cb491-17" aria-hidden="true"></a>name: Jane Doe</span> +<span id="cb491-18"><a href="#cb491-18" aria-hidden="true"></a>age: 99</span> +<span id="cb491-19"><a href="#cb491-19" aria-hidden="true"></a>---</span> +<span id="cb491-20"><a href="#cb491-20" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> +<span id="cb491-21"><a href="#cb491-21" aria-hidden="true"></a></span> +<span id="cb491-22"><a href="#cb491-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="cb492"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb492-1"><a href="#cb492-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> +<blockquote> +<p>Jane Doe is 99 years old.</p> +</blockquote> <section class="footnotes" role="doc-endnotes"> <hr /> <ol> diff --git a/macros/generic/markdown/markdown.pdf b/macros/generic/markdown/markdown.pdf Binary files differindex 6a505363c1..ecad79cd26 100644 --- a/macros/generic/markdown/markdown.pdf +++ b/macros/generic/markdown/markdown.pdf |