diff options
author | Norbert Preining <norbert@preining.info> | 2021-09-01 03:02:13 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-09-01 03:02:13 +0000 |
commit | 692575a36c0469a733dc7a6f68e945db811fb0c6 (patch) | |
tree | ba036f23385aca10e8e7844420c25650cd9822cb /macros/generic/markdown | |
parent | 1a217cc34d8be62cccd53866a6ce55f7fdaad8d8 (diff) |
CTAN sync 202109010302
Diffstat (limited to 'macros/generic/markdown')
-rw-r--r-- | macros/generic/markdown/markdown.dtx | 69 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.html | 7768 | ||||
-rw-r--r-- | macros/generic/markdown/markdown.pdf | bin | 627901 -> 628207 bytes |
3 files changed, 3926 insertions, 3911 deletions
diff --git a/macros/generic/markdown/markdown.dtx b/macros/generic/markdown/markdown.dtx index f035985ca8..d32712738b 100644 --- a/macros/generic/markdown/markdown.dtx +++ b/macros/generic/markdown/markdown.dtx @@ -597,7 +597,7 @@ documentation][techdoc]. % \fi % \begin{macrocode} local metadata = { - version = "2.10.0", + version = "2.10.1", 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", @@ -5796,6 +5796,8 @@ defaultOptions.tableCaptions = false \end{document} ``````` + Always enabled when \Opt{hybrid} is enabled. + : false : Do not strip \TeX{}-style comments. @@ -6338,8 +6340,8 @@ pdftex --shell-escape document.tex % % \end{markdown} % \begin{macrocode} -\def\markdownLastModified{2021/08/06}% -\def\markdownVersion{2.10.0}% +\def\markdownLastModified{2021/08/31}% +\def\markdownVersion{2.10.1}% % \end{macrocode} % \par % \begin{markdown} @@ -15402,29 +15404,45 @@ parsers.spnl = parsers.optionalspace parsers.line = parsers.linechar^0 * parsers.newline parsers.nonemptyline = parsers.line - parsers.blankline -parsers.commented_line = Cs(((parsers.linechar -- initial - - parsers.backslash - - parsers.percent)^1 - + (parsers.backslash -- even backslash - * parsers.backslash)^1 - + (parsers.backslash -- odd backslash - * parsers.backslash)^0 - * (parsers.backslash / "" - * parsers.percent - + parsers.backslash - * (parsers.linechar -- initial - + parsers.newline - - parsers.backslash - - parsers.percent)) - )^0) +parsers.commented_line_letter = parsers.linechar + + parsers.newline + - parsers.backslash + - parsers.percent +parsers.commented_line = Cg(Cc(""), "backslashes") + * ((#(parsers.commented_line_letter + - parsers.newline) + * Cb("backslashes") + * Cs(parsers.commented_line_letter + - parsers.newline)^1 -- initial + * Cg(Cc(""), "backslashes")) + + #(parsers.backslash * parsers.backslash) + * Cg((parsers.backslash -- even backslash + * parsers.backslash)^1, "backslashes") + + (parsers.backslash + * (#parsers.percent + * Cb("backslashes") + / function(backslashes) + return string.rep("\\", #backslashes / 2) + end + * C(parsers.percent) + + #parsers.commented_line_letter + * Cb("backslashes") + * Cc("\\") + * C(parsers.commented_line_letter)) + * Cg(Cc(""), "backslashes")))^0 + * (#parsers.percent + * Cb("backslashes") + / function(backslashes) + return string.rep("\\", #backslashes / 2) + end * ((parsers.percent -- comment * parsers.line * #parsers.blankline) -- blank line - / "\n" + / "\n" + parsers.percent -- comment * parsers.line - * parsers.optionalspace -- leading tabs and spaces - + C(parsers.newline)) + * parsers.optionalspace) -- leading tabs and spaces + + C(parsers.newline)) parsers.chunk = parsers.line * (parsers.optionallyindentedline - parsers.blankline)^0 @@ -16238,16 +16256,15 @@ function M.reader.new(writer, options) % \par % \begin{markdown} % -% If the parser is top-level and the \Opt{texComments} Lua option is -% enabled, we will strip all plain \TeX{} comments from the input string `str` -% together with the trailing newline characters. +% If the parser is top-level and the \Opt{texComments} or \Opt{hybrid} Lua +% options are enabled, we will strip all plain \TeX{} comments from the input +% string `str` together with the trailing newline characters. % % \end{markdown} % \begin{macrocode} - if toplevel and options.texComments then + if toplevel and (options.texComments or options.hybrid) then str = lpeg.match(Ct(parsers.commented_line^1), str) str = util.rope_to_string(str) - print(str) end local res = lpeg.match(grammar(), str) if res == nil then diff --git a/macros/generic/markdown/markdown.html b/macros/generic/markdown/markdown.html index 7a53cfde6c..b0ff35085b 100644 --- a/macros/generic/markdown/markdown.html +++ b/macros/generic/markdown/markdown.html @@ -6,119 +6,116 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <meta name="author" content="Vít Novotný" /> <title>Markdown Package User Manual</title> - <style> - code{white-space: pre-wrap;} - span.smallcaps{font-variant: small-caps;} - span.underline{text-decoration: underline;} - div.column{display: inline-block; vertical-align: top; width: 50%;} - div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} - ul.task-list{list-style: none;} - pre > code.sourceCode { white-space: pre; position: relative; } - pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } - pre > code.sourceCode > span:empty { height: 1.2em; } - code.sourceCode > span { color: inherit; text-decoration: inherit; } - div.sourceCode { margin: 1em 0; } - pre.sourceCode { margin: 0; } - @media screen { - div.sourceCode { overflow: auto; } - } - @media print { - pre > code.sourceCode { white-space: pre-wrap; } - pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } - } - pre.numberSource code - { counter-reset: source-line 0; } - pre.numberSource code > span - { position: relative; left: -4em; counter-increment: source-line; } - pre.numberSource code > span > a:first-child::before - { content: counter(source-line); - position: relative; left: -1em; text-align: right; vertical-align: baseline; - border: none; display: inline-block; - -webkit-touch-callout: none; -webkit-user-select: none; - -khtml-user-select: none; -moz-user-select: none; - -ms-user-select: none; user-select: none; - padding: 0 4px; width: 4em; - color: #aaaaaa; - } - pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } - div.sourceCode - { } - @media screen { - pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } - } - code span.al { color: #ff0000; font-weight: bold; } /* Alert */ - code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ - code span.at { color: #7d9029; } /* Attribute */ - code span.bn { color: #40a070; } /* BaseN */ - code span.bu { } /* BuiltIn */ - code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ - code span.ch { color: #4070a0; } /* Char */ - code span.cn { color: #880000; } /* Constant */ - code span.co { color: #60a0b0; font-style: italic; } /* Comment */ - code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ - code span.do { color: #ba2121; font-style: italic; } /* Documentation */ - code span.dt { color: #902000; } /* DataType */ - code span.dv { color: #40a070; } /* DecVal */ - code span.er { color: #ff0000; font-weight: bold; } /* Error */ - code span.ex { } /* Extension */ - code span.fl { color: #40a070; } /* Float */ - code span.fu { color: #06287e; } /* Function */ - code span.im { } /* Import */ - code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ - code span.kw { color: #007020; font-weight: bold; } /* Keyword */ - code span.op { color: #666666; } /* Operator */ - code span.ot { color: #007020; } /* Other */ - code span.pp { color: #bc7a00; } /* Preprocessor */ - code span.sc { color: #4070a0; } /* SpecialChar */ - code span.ss { color: #bb6688; } /* SpecialString */ - code span.st { color: #4070a0; } /* String */ - code span.va { color: #19177c; } /* Variable */ - code span.vs { color: #4070a0; } /* VerbatimString */ - code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ + <style type="text/css"> + code{white-space: pre-wrap;} + span.smallcaps{font-variant: small-caps;} + span.underline{text-decoration: underline;} + div.column{display: inline-block; vertical-align: top; width: 50%;} + </style> + <style type="text/css"> +a.sourceLine { display: inline-block; line-height: 1.25; } +a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; } +a.sourceLine:empty { height: 1.2em; position: absolute; } +.sourceCode { overflow: visible; } +code.sourceCode { white-space: pre; position: relative; } +div.sourceCode { margin: 1em 0; } +pre.sourceCode { margin: 0; } +@media screen { +div.sourceCode { overflow: auto; } +} +@media print { +code.sourceCode { white-space: pre-wrap; } +a.sourceLine { text-indent: -1em; padding-left: 1em; } +} +pre.numberSource a.sourceLine + { position: relative; } +pre.numberSource a.sourceLine:empty + { position: absolute; } +pre.numberSource a.sourceLine::before + { content: attr(data-line-number); + position: absolute; left: -5em; text-align: right; vertical-align: baseline; + border: none; pointer-events: all; + -webkit-touch-callout: none; -webkit-user-select: none; + -khtml-user-select: none; -moz-user-select: none; + -ms-user-select: none; user-select: none; + padding: 0 4px; width: 4em; + color: #aaaaaa; + } +pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } +div.sourceCode + { } +@media screen { +a.sourceLine::before { text-decoration: underline; } +} +code span.al { color: #ff0000; font-weight: bold; } /* Alert */ +code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ +code span.at { color: #7d9029; } /* Attribute */ +code span.bn { color: #40a070; } /* BaseN */ +code span.bu { } /* BuiltIn */ +code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ +code span.ch { color: #4070a0; } /* Char */ +code span.cn { color: #880000; } /* Constant */ +code span.co { color: #60a0b0; font-style: italic; } /* Comment */ +code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ +code span.do { color: #ba2121; font-style: italic; } /* Documentation */ +code span.dt { color: #902000; } /* DataType */ +code span.dv { color: #40a070; } /* DecVal */ +code span.er { color: #ff0000; font-weight: bold; } /* Error */ +code span.ex { } /* Extension */ +code span.fl { color: #40a070; } /* Float */ +code span.fu { color: #06287e; } /* Function */ +code span.im { } /* Import */ +code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ +code span.kw { color: #007020; font-weight: bold; } /* Keyword */ +code span.op { color: #666666; } /* Operator */ +code span.ot { color: #007020; } /* Other */ +code span.pp { color: #bc7a00; } /* Preprocessor */ +code span.sc { color: #4070a0; } /* SpecialChar */ +code span.ss { color: #bb6688; } /* SpecialString */ +code span.st { color: #4070a0; } /* String */ +code span.va { color: #19177c; } /* Variable */ +code span.vs { color: #4070a0; } /* VerbatimString */ +code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ </style> <link rel="stylesheet" href="markdown.css" /> + <!--[if lt IE 9]> + <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> + <![endif]--> </head> <body> -<header id="title-block-header"> +<header> <h1 class="title">Markdown Package User Manual</h1> <p class="author">Vít Novotný</p> -<p class="date">v2.10.0 (2021/08/06)</p> +<p class="date">v2.10.1 (2021/08/31)</p> </header> -<nav id="TOC" role="doc-toc"> -<ul> -<li><a href="#introduction"><span class="toc-section-number">1</span> Introduction</a> +<nav id="TOC"> <ul> +<li><a href="#introduction"><span class="toc-section-number">1</span> Introduction</a><ul> <li><a href="#requirements"><span class="toc-section-number">1.1</span> Requirements</a></li> -<li><a href="#installation"><span class="toc-section-number">1.2</span> Installation</a> -<ul> +<li><a href="#installation"><span class="toc-section-number">1.2</span> Installation</a><ul> <li><a href="#local-installation"><span class="toc-section-number">1.2.1</span> Local Installation</a></li> <li><a href="#portable-installation"><span class="toc-section-number">1.2.2</span> Portable Installation</a></li> </ul></li> -<li><a href="#first-document"><span class="toc-section-number">1.3</span> First Document</a> -<ul> +<li><a href="#first-document"><span class="toc-section-number">1.3</span> First Document</a><ul> <li><a href="#using-lua"><span class="toc-section-number">1.3.1</span> Using Lua</a></li> <li><a href="#using-plain-tex"><span class="toc-section-number">1.3.2</span> Using Plain <span class="tex">T<sub>e</sub>X</span></a></li> <li><a href="#using-latex"><span class="toc-section-number">1.3.3</span> Using <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></a></li> <li><a href="#using-context"><span class="toc-section-number">1.3.4</span> Using Con<span class="tex">T<sub>e</sub>X</span>t</a></li> </ul></li> </ul></li> -<li><a href="#examples"><span class="toc-section-number">2</span> Examples</a> -<ul> -<li><a href="#interfaces"><span class="toc-section-number">2.1</span> Interfaces</a> -<ul> +<li><a href="#examples"><span class="toc-section-number">2</span> Examples</a><ul> +<li><a href="#interfaces"><span class="toc-section-number">2.1</span> Interfaces</a><ul> <li><a href="#lua"><span class="toc-section-number">2.1.1</span> Lua</a></li> <li><a href="#plain-tex"><span class="toc-section-number">2.1.2</span> Plain <span class="tex">T<sub>e</sub>X</span></a></li> <li><a href="#latex"><span class="toc-section-number">2.1.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></a></li> <li><a href="#context"><span class="toc-section-number">2.1.4</span> Con<span class="tex">T<sub>e</sub>X</span>t</a></li> </ul></li> -<li><a href="#options"><span class="toc-section-number">2.2</span> Options</a> -<ul> +<li><a href="#options"><span class="toc-section-number">2.2</span> Options</a><ul> <li><a href="#lua-1"><span class="toc-section-number">2.2.1</span> Lua</a></li> <li><a href="#plain-tex-1"><span class="toc-section-number">2.2.2</span> Plain <span class="tex">T<sub>e</sub>X</span></a></li> <li><a href="#latex-1"><span class="toc-section-number">2.2.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></a></li> </ul></li> -<li><a href="#markdown-tokens"><span class="toc-section-number">2.3</span> Markdown Tokens</a> -<ul> +<li><a href="#markdown-tokens"><span class="toc-section-number">2.3</span> Markdown Tokens</a><ul> <li><a href="#token-renderers"><span class="toc-section-number">2.3.1</span> Token Renderers</a></li> <li><a href="#token-renderer-prototypes"><span class="toc-section-number">2.3.2</span> Token Renderer Prototypes</a></li> </ul></li> @@ -126,18 +123,18 @@ </ul> </nav> <p><link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet" /></p> -<h1 data-number="1" id="introduction"><span class="header-section-number">1</span> Introduction</h1> +<h1 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>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="http://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> +<h2 id="requirements"><span class="header-section-number">1.1</span> Requirements</h2> <p>The package requires a working <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> ≥ 2013 is known to work and so are recent installation of <a href="https://miktex.org/" title="Home - MiKTeXorg">Mik<span class="tex">T<sub>e</sub>X</span></a>. If you are using a minimal installation of a <span class="tex">T<sub>e</sub>X</span> distribution, please consult the <a href="http://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 required packages.</p> -<h2 data-number="1.2" id="installation"><span class="header-section-number">1.2</span> Installation</h2> +<h2 id="installation"><span class="header-section-number">1.2</span> Installation</h2> <p>The package comes pre-installed with <a href="https://www.tug.org/texlive/" title="TeX Live - TeX Users Group"><span class="tex">T<sub>e</sub>X</span> Live</a> ≥ 2016 and with recent installations of <a href="https://miktex.org/" title="Home - MiKTeXorg">MikTeX</a>. Unless you explicitly wish to use the latest version of the package, you are encouraged to skip this step.</p> <p>To install the package, first download the package from the repository using Git:</p> -<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="fu">git</span> clone https://github.com/witiko/markdown</span></code></pre></div> +<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="fu">git</span> clone https://github.com/witiko/markdown</a></code></pre></div> <p>Next, enter the directory named <code>markdown</code> and interpret the file named <code>markdown.ins</code> file using a Unicode-aware <span class="tex">T<sub>e</sub>X</span> engine, such as XeTeX or LuaTeX:</p> -<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="bu">cd</span> markdown</span> -<span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a><span class="ex">luatex</span> markdown.ins</span></code></pre></div> +<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="bu">cd</span> markdown</a> +<a class="sourceLine" id="cb2-2" data-line-number="2"><span class="ex">luatex</span> markdown.ins</a></code></pre></div> <p>This should produce the following files:</p> <ul> <li><code>markdown.lua</code>, the Lua module,</li> @@ -149,7 +146,7 @@ <li><code>markdownthemewitiko_tilde.sty</code>, the <code>witiko/tilde</code> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> theme, and</li> <li><code>t-markdown.tex</code>, the Con<span class="tex">T<sub>e</sub>X</span>t module.</li> </ul> -<h3 data-number="1.2.1" id="local-installation"><span class="header-section-number">1.2.1</span> Local Installation</h3> +<h3 id="local-installation"><span class="header-section-number">1.2.1</span> Local Installation</h3> <p>To perform a local installation, place the above files into your <span class="tex">T<sub>e</sub>X</span> directory structure. This is generally where the individual files should be placed:</p> <ul> <li><code><TEXMF>/tex/luatex/markdown/markdown.lua</code></li> @@ -162,179 +159,179 @@ <li><code><TEXMF>/tex/context/third/markdown/t-markdown.tex</code></li> </ul> <p>where <code><TEXMF></code> corresponds to a root of your <span class="tex">T<sub>e</sub>X</span> distribution, such as <code>/usr/share/texmf</code> and <code>~/texmf</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf</code> on Windows systems. When in doubt, consult the manual of your <span class="tex">T<sub>e</sub>X</span> distribution.</p> -<h3 data-number="1.2.2" id="portable-installation"><span class="header-section-number">1.2.2</span> Portable Installation</h3> +<h3 id="portable-installation"><span class="header-section-number">1.2.2</span> Portable Installation</h3> <p>Alternatively, you can also store the above files in the same folder as your <span class="tex">T<sub>e</sub>X</span> document and distribute them together. This way your document can be portably typeset on legacy <span class="tex">T<sub>e</sub>X</span> distributions.</p> <p>Since Markdown version 2.10.0, the file <code>markdown.tex</code> must be placed in a directory named <code>markdown</code> due to <a href="https://github.com/witiko/markdown/issues/74" title="Does not compile if user names own document markdown.tex">issue #74</a>.</p> -<h2 data-number="1.3" id="first-document"><span class="header-section-number">1.3</span> First Document</h2> +<h2 id="first-document"><span class="header-section-number">1.3</span> First Document</h2> <p>In this section, we will take the necessary steps to typeset our first markdown document in <span class="tex">T<sub>e</sub>X</span>. This will serve as our first hands-on experience with the package and also as a reassurance that the package has been correctly installed.</p> -<h3 data-number="1.3.1" id="using-lua"><span class="header-section-number">1.3.1</span> Using Lua</h3> +<h3 id="using-lua"><span class="header-section-number">1.3.1</span> Using Lua</h3> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb3"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb3-2"><a href="#cb3-2" aria-hidden="true"></a><span class="fu">\input</span> hello</span> -<span id="cb3-3"><a href="#cb3-3" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<h4 data-number="1.3.1.1" id="using-the-lua-module"><span class="header-section-number">1.3.1.1</span> Using the Lua Module</h4> +<div class="sourceCode" id="cb3"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb3-2" data-line-number="2"><span class="fu">\input</span> hello</a> +<a class="sourceLine" id="cb3-3" data-line-number="3"><span class="fu">\bye</span></a></code></pre></div> +<h4 id="using-the-lua-module"><span class="header-section-number">1.3.1.1</span> Using the Lua Module</h4> <p>Using a text editor, create a text document named <code>hello.lua</code> with the following content:</p> -<div class="sourceCode" id="cb4"><pre class="sourceCode lua"><code class="sourceCode lua"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true"></a><span class="co">#!/usr/bin/env texlua</span></span> -<span id="cb4-2"><a href="#cb4-2" aria-hidden="true"></a><span class="kw">local</span> ran_ok<span class="op">,</span> kpse <span class="op">=</span> <span class="fu">pcall</span><span class="op">(</span><span class="fu">require</span><span class="op">,</span> <span class="st">"kpse"</span><span class="op">)</span></span> -<span id="cb4-3"><a href="#cb4-3" aria-hidden="true"></a><span class="cf">if</span> ran_ok <span class="cf">then</span> kpse<span class="op">.</span>set_program_name<span class="op">(</span><span class="st">"luatex"</span><span class="op">)</span> <span class="cf">end</span></span> -<span id="cb4-4"><a href="#cb4-4" aria-hidden="true"></a><span class="kw">local</span> markdown <span class="op">=</span> <span class="fu">require</span><span class="op">(</span><span class="st">"markdown"</span><span class="op">)</span></span> -<span id="cb4-5"><a href="#cb4-5" aria-hidden="true"></a><span class="kw">local</span> convert <span class="op">=</span> markdown<span class="op">.</span>new<span class="op">()</span></span> -<span id="cb4-6"><a href="#cb4-6" aria-hidden="true"></a><span class="fu">print</span><span class="op">(</span>convert<span class="op">(</span><span class="st">"Hello *world*!"</span><span class="op">))</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true"></a><span class="ex">texlua</span> hello.lua <span class="op">></span> hello.tex</span> -<span id="cb5-2"><a href="#cb5-2" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb4"><pre class="sourceCode lua"><code class="sourceCode lua"><a class="sourceLine" id="cb4-1" data-line-number="1"><span class="ot">#</span>!<span class="ot">/</span>usr<span class="ot">/</span>bin<span class="ot">/</span>env texlua</a> +<a class="sourceLine" id="cb4-2" data-line-number="2"><span class="kw">local</span> ran_ok<span class="ot">,</span> kpse <span class="ot">=</span> <span class="fu">pcall</span><span class="ot">(</span><span class="fu">require</span><span class="ot">,</span> <span class="st">"kpse"</span><span class="ot">)</span></a> +<a class="sourceLine" id="cb4-3" data-line-number="3"><span class="kw">if</span> ran_ok <span class="kw">then</span> kpse<span class="ot">.</span>set_program_name<span class="ot">(</span><span class="st">"luatex"</span><span class="ot">)</span> <span class="kw">end</span></a> +<a class="sourceLine" id="cb4-4" data-line-number="4"><span class="kw">local</span> markdown <span class="ot">=</span> <span class="fu">require</span><span class="ot">(</span><span class="st">"markdown"</span><span class="ot">)</span></a> +<a class="sourceLine" id="cb4-5" data-line-number="5"><span class="kw">local</span> convert <span class="ot">=</span> markdown<span class="ot">.</span>new<span class="ot">()</span></a> +<a class="sourceLine" id="cb4-6" data-line-number="6"><span class="fu">print</span><span class="ot">(</span>convert<span class="ot">(</span><span class="st">"Hello *world*!"</span><span class="ot">))</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb5-1" data-line-number="1"><span class="ex">texlua</span> hello.lua <span class="op">></span> hello.tex</a> +<a class="sourceLine" id="cb5-2" data-line-number="2"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true"></a><span class="ex">texlua</span> hello.lua <span class="op">></span> hello.tex</span> -<span id="cb6-2"><a href="#cb6-2" aria-hidden="true"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> -<h4 data-number="1.3.1.2" id="using-the-lua-command-line-interface"><span class="header-section-number">1.3.1.2</span> Using the Lua Command-Line Interface</h4> +<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb6-1" data-line-number="1"><span class="ex">texlua</span> hello.lua <span class="op">></span> hello.tex</a> +<a class="sourceLine" id="cb6-2" data-line-number="2"><span class="ex">pdftex</span> document.tex</a></code></pre></div> +<h4 id="using-the-lua-command-line-interface"><span class="header-section-number">1.3.1.2</span> Using the Lua Command-Line Interface</h4> <p>Using a text editor, create a text document named <code>hello.md</code> with the following content:</p> -<div class="sourceCode" id="cb7"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true"></a>Hello *world*!</span></code></pre></div> +<div class="sourceCode" id="cb7"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb7-1" data-line-number="1">Hello *world*!</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- hello.md hello.tex</span> -<span id="cb8-2"><a href="#cb8-2" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb8-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ -- hello.md hello.tex</a> +<a class="sourceLine" id="cb8-2" data-line-number="2"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- hello.md hello.tex</span> -<span id="cb9-2"><a href="#cb9-2" aria-hidden="true"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> -<h3 data-number="1.3.2" id="using-plain-tex"><span class="header-section-number">1.3.2</span> Using Plain <span class="tex">T<sub>e</sub>X</span></h3> +<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb9-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ -- hello.md hello.tex</a> +<a class="sourceLine" id="cb9-2" data-line-number="2"><span class="ex">pdftex</span> document.tex</a></code></pre></div> +<h3 id="using-plain-tex"><span class="header-section-number">1.3.2</span> Using Plain <span class="tex">T<sub>e</sub>X</span></h3> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb10"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb10-2"><a href="#cb10-2" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb10-3"><a href="#cb10-3" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb10-4"><a href="#cb10-4" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb10-5"><a href="#cb10-5" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb10"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb10-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb10-2" data-line-number="2"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb10-3" data-line-number="3">Hello *world*!</a> +<a class="sourceLine" id="cb10-4" data-line-number="4"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb10-5" data-line-number="5"><span class="fu">\bye</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb11-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true"></a><span class="ex">pdftex</span> --shell-escape document.tex</span></code></pre></div> -<h3 data-number="1.3.3" id="using-latex"><span class="header-section-number">1.3.3</span> Using <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb13"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb13-2"><a href="#cb13-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb13-3"><a href="#cb13-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb13-4"><a href="#cb13-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb13-5"><a href="#cb13-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb13-6"><a href="#cb13-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb13-7"><a href="#cb13-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="cb14"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb12-1" data-line-number="1"><span class="ex">pdftex</span> --shell-escape document.tex</a></code></pre></div> +<h3 id="using-latex"><span class="header-section-number">1.3.3</span> Using <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb13"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb13-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb13-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb13-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb13-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb13-5" data-line-number="5">Hello *world*!</a> +<a class="sourceLine" id="cb13-6" data-line-number="6"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb13-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb14"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb14-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb15"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true"></a><span class="ex">pdflatex</span> --shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb15"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb15-1" data-line-number="1"><span class="ex">pdflatex</span> --shell-escape document.tex</a></code></pre></div> <hr /> <p>As the next step, try typesetting the example documents distributed along with the Markdown package:</p> -<div class="sourceCode" id="cb16"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true"></a><span class="fu">git</span> clone https://github.com/witiko/markdown</span> -<span id="cb16-2"><a href="#cb16-2" aria-hidden="true"></a><span class="bu">cd</span> markdown/examples</span> -<span id="cb16-3"><a href="#cb16-3" aria-hidden="true"></a><span class="ex">lualatex</span> latex.tex</span></code></pre></div> +<div class="sourceCode" id="cb16"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb16-1" data-line-number="1"><span class="fu">git</span> clone https://github.com/witiko/markdown</a> +<a class="sourceLine" id="cb16-2" data-line-number="2"><span class="bu">cd</span> markdown/examples</a> +<a class="sourceLine" id="cb16-3" data-line-number="3"><span class="ex">lualatex</span> latex.tex</a></code></pre></div> <p>A PDF document named <code>latex.pdf</code> should be produced. Open the text documents <code>latex.tex</code> and <code>example.md</code> in a text editor to see how the example documents are structured. Try changing the documents and typesetting them as follows:</p> -<div class="sourceCode" id="cb17"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true"></a><span class="ex">lualatex</span> latex.tex</span></code></pre></div> +<div class="sourceCode" id="cb17"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb17-1" data-line-number="1"><span class="ex">lualatex</span> latex.tex</a></code></pre></div> <p>to see the effect of your changes.</p> -<h3 data-number="1.3.4" id="using-context"><span class="header-section-number">1.3.4</span> Using Con<span class="tex">T<sub>e</sub>X</span>t</h3> +<h3 id="using-context"><span class="header-section-number">1.3.4</span> Using Con<span class="tex">T<sub>e</sub>X</span>t</h3> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb18"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb18-2"><a href="#cb18-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb18-3"><a href="#cb18-3" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb18-4"><a href="#cb18-4" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb18-5"><a href="#cb18-5" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb18-6"><a href="#cb18-6" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb18"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb18-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb18-2" data-line-number="2"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb18-3" data-line-number="3"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb18-4" data-line-number="4">Hello *world*!</a> +<a class="sourceLine" id="cb18-5" data-line-number="5"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb18-6" data-line-number="6"><span class="fu">\stoptext</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb19"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb19"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb19-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb20"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true"></a><span class="ex">texexec</span> --passon=--shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb20"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb20-1" data-line-number="1"><span class="ex">texexec</span> --passon=--shell-escape document.tex</a></code></pre></div> <hr /> <p>As the next step, try typesetting the example documents distributed along with the Markdown package:</p> -<div class="sourceCode" id="cb21"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true"></a><span class="fu">git</span> clone https://github.com/witiko/markdown</span> -<span id="cb21-2"><a href="#cb21-2" aria-hidden="true"></a><span class="bu">cd</span> markdown/examples</span> -<span id="cb21-3"><a href="#cb21-3" aria-hidden="true"></a><span class="ex">context</span> context.tex</span></code></pre></div> +<div class="sourceCode" id="cb21"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb21-1" data-line-number="1"><span class="fu">git</span> clone https://github.com/witiko/markdown</a> +<a class="sourceLine" id="cb21-2" data-line-number="2"><span class="bu">cd</span> markdown/examples</a> +<a class="sourceLine" id="cb21-3" data-line-number="3"><span class="ex">context</span> context.tex</a></code></pre></div> <p>A PDF document named <code>context.pdf</code> should be produced. Open the text documents <code>context.tex</code> and <code>example.md</code> in a text editor to see how the example documents are structured. Try changing the documents and typesetting them as follows:</p> -<div class="sourceCode" id="cb22"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true"></a><span class="ex">context</span> context.tex</span></code></pre></div> +<div class="sourceCode" id="cb22"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb22-1" data-line-number="1"><span class="ex">context</span> context.tex</a></code></pre></div> <p>to see the effect of your changes.</p> -<h1 data-number="2" id="examples"><span class="header-section-number">2</span> Examples</h1> +<h1 id="examples"><span class="header-section-number">2</span> Examples</h1> <p>In this section, I will describe the individual parts of the Markdown package. Each part will be shown by example, leaving the implementation details to the <a href="http://mirrors.ctan.org/macros/generic/markdown/markdown.pdf" title="A Markdown Interpreter for <span class="tex">T<sub>e</sub>X</span>">technical documentation</a>.</p> -<h2 data-number="2.1" id="interfaces"><span class="header-section-number">2.1</span> Interfaces</h2> +<h2 id="interfaces"><span class="header-section-number">2.1</span> Interfaces</h2> <p>In this section, I will describe the individual interfaces exposed by the Markdown package starting with the low-level Lua interfaces and all the way up to the <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> and Con<span class="tex">T<sub>e</sub>X</span>t interfaces intended for the ordinary user.</p> -<h3 data-number="2.1.1" id="lua"><span class="header-section-number">2.1.1</span> Lua</h3> +<h3 id="lua"><span class="header-section-number">2.1.1</span> Lua</h3> <p>The Lua programming language is what drives the conversion from markdown to <span class="tex">T<sub>e</sub>X</span> in the Markdown package. Based on the <a href="https://github.com/jgm/lunamark" title="Lua library for conversion between markup formats">Lunamark</a> Lua library by John MacFarlane, the Lua implementation is largely independent on <span class="tex">T<sub>e</sub>X</span>, and can be used separately from typesetting a document. Lua provides two interfaces: a Lua module and a command-line interface (CLI).</p> -<h4 data-number="2.1.1.1" id="lua-module"><span class="header-section-number">2.1.1.1</span> Lua Module</h4> +<h4 id="lua-module"><span class="header-section-number">2.1.1.1</span> Lua Module</h4> <p>A Lua module is a software library that can be used from in other programs. The <code>markdown</code> Lua module makes it possible to convert markdown to <span class="tex">T<sub>e</sub>X</span> from within Lua<span class="tex">T<sub>e</sub>X</span> documents and Lua scripts.</p> <p>The <code>markdown</code> Lua module exposes the <code>new(</code>⟨<em>options</em>⟩<code>)</code> method, which creates a converter function from markdown to <span class="tex">T<sub>e</sub>X</span>. The properties of the converter function are specified by the Lua table <code>options</code>. The parameter is optional; when unspecified, the behaviour will be the same as if ⟨<em>options</em>⟩ were an empty table.</p> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb23"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb23-1"><a href="#cb23-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb23-2"><a href="#cb23-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb23-3"><a href="#cb23-3" aria-hidden="true"></a><span class="fu">\input</span> example</span> -<span id="cb23-4"><a href="#cb23-4" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb23"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb23-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb23-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb23-3" data-line-number="3"><span class="fu">\input</span> example</a> +<a class="sourceLine" id="cb23-4" data-line-number="4"><span class="fu">\bye</span></a></code></pre></div> <p>Using a text editor, create a text document named <code>example.lua</code> with the following content:</p> -<div class="sourceCode" id="cb24"><pre class="sourceCode lua"><code class="sourceCode lua"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true"></a><span class="co">#!/usr/bin/env texlua</span></span> -<span id="cb24-2"><a href="#cb24-2" aria-hidden="true"></a><span class="kw">local</span> ran_ok<span class="op">,</span> kpse <span class="op">=</span> <span class="fu">pcall</span><span class="op">(</span><span class="fu">require</span><span class="op">,</span> <span class="st">"kpse"</span><span class="op">)</span></span> -<span id="cb24-3"><a href="#cb24-3" aria-hidden="true"></a><span class="cf">if</span> ran_ok <span class="cf">then</span> kpse<span class="op">.</span>set_program_name<span class="op">(</span><span class="st">"luatex"</span><span class="op">)</span> <span class="cf">end</span></span> -<span id="cb24-4"><a href="#cb24-4" aria-hidden="true"></a><span class="kw">local</span> markdown <span class="op">=</span> <span class="fu">require</span><span class="op">(</span><span class="st">"markdown"</span><span class="op">)</span></span> -<span id="cb24-5"><a href="#cb24-5" aria-hidden="true"></a><span class="kw">local</span> input<span class="op">,</span> convert_safe<span class="op">,</span> convert_unsafe<span class="op">,</span> paragraph</span> -<span id="cb24-6"><a href="#cb24-6" aria-hidden="true"></a></span> -<span id="cb24-7"><a href="#cb24-7" aria-hidden="true"></a>input <span class="op">=</span> <span class="vs">[[$\sqrt{-1}$ *equals* $i$.]]</span></span> -<span id="cb24-8"><a href="#cb24-8" aria-hidden="true"></a>convert_safe <span class="op">=</span> markdown<span class="op">.</span>new<span class="op">()</span></span> -<span id="cb24-9"><a href="#cb24-9" aria-hidden="true"></a>convert_unsafe <span class="op">=</span> markdown<span class="op">.</span>new<span class="op">({</span>hybrid <span class="op">=</span> <span class="kw">true</span><span class="op">})</span></span> -<span id="cb24-10"><a href="#cb24-10" aria-hidden="true"></a>paragraph <span class="op">=</span> <span class="vs">[[\par]]</span></span> -<span id="cb24-11"><a href="#cb24-11" aria-hidden="true"></a></span> -<span id="cb24-12"><a href="#cb24-12" aria-hidden="true"></a><span class="fu">print</span><span class="op">(</span></span> -<span id="cb24-13"><a href="#cb24-13" aria-hidden="true"></a> convert_safe<span class="op">(</span>input<span class="op">)</span> <span class="op">..</span> paragraph <span class="op">..</span></span> -<span id="cb24-14"><a href="#cb24-14" aria-hidden="true"></a> convert_unsafe<span class="op">(</span>input<span class="op">)</span></span> -<span id="cb24-15"><a href="#cb24-15" aria-hidden="true"></a><span class="op">)</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb25"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true"></a><span class="ex">texlua</span> example.lua <span class="op">></span> example.tex</span> -<span id="cb25-2"><a href="#cb25-2" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb24"><pre class="sourceCode lua"><code class="sourceCode lua"><a class="sourceLine" id="cb24-1" data-line-number="1"><span class="ot">#</span>!<span class="ot">/</span>usr<span class="ot">/</span>bin<span class="ot">/</span>env texlua</a> +<a class="sourceLine" id="cb24-2" data-line-number="2"><span class="kw">local</span> ran_ok<span class="ot">,</span> kpse <span class="ot">=</span> <span class="fu">pcall</span><span class="ot">(</span><span class="fu">require</span><span class="ot">,</span> <span class="st">"kpse"</span><span class="ot">)</span></a> +<a class="sourceLine" id="cb24-3" data-line-number="3"><span class="kw">if</span> ran_ok <span class="kw">then</span> kpse<span class="ot">.</span>set_program_name<span class="ot">(</span><span class="st">"luatex"</span><span class="ot">)</span> <span class="kw">end</span></a> +<a class="sourceLine" id="cb24-4" data-line-number="4"><span class="kw">local</span> markdown <span class="ot">=</span> <span class="fu">require</span><span class="ot">(</span><span class="st">"markdown"</span><span class="ot">)</span></a> +<a class="sourceLine" id="cb24-5" data-line-number="5"><span class="kw">local</span> input<span class="ot">,</span> convert_safe<span class="ot">,</span> convert_unsafe<span class="ot">,</span> paragraph</a> +<a class="sourceLine" id="cb24-6" data-line-number="6"></a> +<a class="sourceLine" id="cb24-7" data-line-number="7">input <span class="ot">=</span> <span class="st">[[$\sqrt{-1}$ *equals* $i$.]]</span></a> +<a class="sourceLine" id="cb24-8" data-line-number="8">convert_safe <span class="ot">=</span> markdown<span class="ot">.</span>new<span class="ot">()</span></a> +<a class="sourceLine" id="cb24-9" data-line-number="9">convert_unsafe <span class="ot">=</span> markdown<span class="ot">.</span>new<span class="ot">({</span>hybrid <span class="ot">=</span> <span class="kw">true</span><span class="ot">})</span></a> +<a class="sourceLine" id="cb24-10" data-line-number="10">paragraph <span class="ot">=</span> <span class="st">[[\par]]</span></a> +<a class="sourceLine" id="cb24-11" data-line-number="11"></a> +<a class="sourceLine" id="cb24-12" data-line-number="12"><span class="fu">print</span><span class="ot">(</span></a> +<a class="sourceLine" id="cb24-13" data-line-number="13"> convert_safe<span class="ot">(</span>input<span class="ot">)</span> <span class="ot">..</span> paragraph <span class="ot">..</span></a> +<a class="sourceLine" id="cb24-14" data-line-number="14"> convert_unsafe<span class="ot">(</span>input<span class="ot">)</span></a> +<a class="sourceLine" id="cb24-15" data-line-number="15"><span class="ot">)</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb25"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb25-1" data-line-number="1"><span class="ex">texlua</span> example.lua <span class="op">></span> example.tex</a> +<a class="sourceLine" id="cb25-2" data-line-number="2"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> <p>Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb26"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb26-1"><a href="#cb26-1" aria-hidden="true"></a><span class="ex">texlua</span> example.lua <span class="op">></span> example.tex</span> -<span id="cb26-2"><a href="#cb26-2" aria-hidden="true"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb26"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb26-1" data-line-number="1"><span class="ex">texlua</span> example.lua <span class="op">></span> example.tex</a> +<a class="sourceLine" id="cb26-2" data-line-number="2"><span class="ex">pdftex</span> document.tex</a></code></pre></div> <hr /> <p>Rather than use the <code>texlua</code> interpreter, we can also access the <code>markdown</code> Lua module directly from our document. Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb27"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb27-1"><a href="#cb27-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb27-2"><a href="#cb27-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb27-3"><a href="#cb27-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb27-4"><a href="#cb27-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb27-5"><a href="#cb27-5" aria-hidden="true"></a> local input, convert_safe, convert_unsafe, paragraph</span> -<span id="cb27-6"><a href="#cb27-6" aria-hidden="true"></a></span> -<span id="cb27-7"><a href="#cb27-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="cb27-8"><a href="#cb27-8" aria-hidden="true"></a> convert_safe = markdown.new()</span> -<span id="cb27-9"><a href="#cb27-9" aria-hidden="true"></a> convert_unsafe = markdown.new({hybrid = true})</span> -<span id="cb27-10"><a href="#cb27-10" aria-hidden="true"></a> paragraph = [[<span class="fu">\par</span>]]</span> -<span id="cb27-11"><a href="#cb27-11" aria-hidden="true"></a></span> -<span id="cb27-12"><a href="#cb27-12" aria-hidden="true"></a> tex.sprint(</span> -<span id="cb27-13"><a href="#cb27-13" aria-hidden="true"></a> convert_safe(input) .. paragraph ..</span> -<span id="cb27-14"><a href="#cb27-14" aria-hidden="true"></a> convert_unsafe(input)</span> -<span id="cb27-15"><a href="#cb27-15" aria-hidden="true"></a> )</span> -<span id="cb27-16"><a href="#cb27-16" aria-hidden="true"></a>}</span> -<span id="cb27-17"><a href="#cb27-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="cb28"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb27"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb27-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb27-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb27-3" data-line-number="3"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb27-4" data-line-number="4"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb27-5" data-line-number="5"> local input, convert_safe, convert_unsafe, paragraph</a> +<a class="sourceLine" id="cb27-6" data-line-number="6"></a> +<a class="sourceLine" id="cb27-7" data-line-number="7"> input = [[<span class="ss">$</span><span class="sc">\string\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.]]</a> +<a class="sourceLine" id="cb27-8" data-line-number="8"> convert_safe = markdown.new()</a> +<a class="sourceLine" id="cb27-9" data-line-number="9"> convert_unsafe = markdown.new({hybrid = true})</a> +<a class="sourceLine" id="cb27-10" data-line-number="10"> paragraph = [[<span class="fu">\par</span>]]</a> +<a class="sourceLine" id="cb27-11" data-line-number="11"></a> +<a class="sourceLine" id="cb27-12" data-line-number="12"> tex.sprint(</a> +<a class="sourceLine" id="cb27-13" data-line-number="13"> convert_safe(input) .. paragraph ..</a> +<a class="sourceLine" id="cb27-14" data-line-number="14"> convert_unsafe(input)</a> +<a class="sourceLine" id="cb27-15" data-line-number="15"> )</a> +<a class="sourceLine" id="cb27-16" data-line-number="16">}</a> +<a class="sourceLine" id="cb27-17" data-line-number="17"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb28"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb28-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> <p>In this case, we cannot use pdfTeX, because pdfTeX does not define the <code>\directlua</code> <span class="tex">T<sub>e</sub>X</span> command.</p> -<h4 data-number="2.1.1.2" id="lua-command-line-interface"><span class="header-section-number">2.1.1.2</span> Lua Command-Line Interface</h4> +<h4 id="lua-command-line-interface"><span class="header-section-number">2.1.1.2</span> Lua Command-Line Interface</h4> <p>The Lua command-line interface (CLI) of the Markdown package makes the functionality of the Lua module accessible from the command line. This makes it possible to convert documents from markdown to <span class="tex">T<sub>e</sub>X</span> manually without any knowledge of the Lua programming language.</p> <p>The Lua command-line interface accepts the same options as the <code>markdown</code> Lua module, but now the options are specified as command-line parameters.</p> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb29"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb29-1"><a href="#cb29-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb29-2"><a href="#cb29-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb29-3"><a href="#cb29-3" aria-hidden="true"></a><span class="fu">\input</span> safe</span> -<span id="cb29-4"><a href="#cb29-4" aria-hidden="true"></a></span> -<span id="cb29-5"><a href="#cb29-5" aria-hidden="true"></a><span class="fu">\begingroup</span></span> -<span id="cb29-6"><a href="#cb29-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> -<span id="cb29-7"><a href="#cb29-7" aria-hidden="true"></a><span class="fu">\input</span> unsafe</span> -<span id="cb29-8"><a href="#cb29-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> -<span id="cb29-9"><a href="#cb29-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb29"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb29-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb29-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb29-3" data-line-number="3"><span class="fu">\input</span> safe</a> +<a class="sourceLine" id="cb29-4" data-line-number="4"></a> +<a class="sourceLine" id="cb29-5" data-line-number="5"><span class="fu">\begingroup</span></a> +<a class="sourceLine" id="cb29-6" data-line-number="6"><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</a> +<a class="sourceLine" id="cb29-7" data-line-number="7"><span class="fu">\input</span> unsafe</a> +<a class="sourceLine" id="cb29-8" data-line-number="8"><span class="fu">\endgroup</span></a> +<a class="sourceLine" id="cb29-9" data-line-number="9"><span class="fu">\bye</span></a></code></pre></div> <p>Using a text editor, create a text document named <code>example.md</code> with the following content:</p> -<div class="sourceCode" id="cb30"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb30-1"><a href="#cb30-1" aria-hidden="true"></a>$\sqrt{-1}$ *equals* $i$.</span></code></pre></div> +<div class="sourceCode" id="cb30"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb30-1" data-line-number="1">$\sqrt{-1}$ *equals* $i$.</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb31"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- example.md safe.tex</span> -<span id="cb31-2"><a href="#cb31-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- example.md unsafe.tex</span> -<span id="cb31-3"><a href="#cb31-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb31"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb31-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ -- example.md safe.tex</a> +<a class="sourceLine" id="cb31-2" data-line-number="2"><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- example.md unsafe.tex</a> +<a class="sourceLine" id="cb31-3" data-line-number="3"><span class="ex">luatex</span> document.tex</a></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> @@ -342,260 +339,260 @@ <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> <p>Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb32"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb32-1"><a href="#cb32-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- example.md safe.tex</span> -<span id="cb32-2"><a href="#cb32-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- example.md unsafe.tex</span> -<span id="cb32-3"><a href="#cb32-3" aria-hidden="true"></a><span class="ex">pdftex</span> document.tex</span></code></pre></div> -<h3 data-number="2.1.2" id="plain-tex"><span class="header-section-number">2.1.2</span> Plain <span class="tex">T<sub>e</sub>X</span></h3> +<div class="sourceCode" id="cb32"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb32-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ -- example.md safe.tex</a> +<a class="sourceLine" id="cb32-2" data-line-number="2"><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- example.md unsafe.tex</a> +<a class="sourceLine" id="cb32-3" data-line-number="3"><span class="ex">pdftex</span> document.tex</a></code></pre></div> +<h3 id="plain-tex"><span class="header-section-number">2.1.2</span> Plain <span class="tex">T<sub>e</sub>X</span></h3> <p>The plain <span class="tex">T<sub>e</sub>X</span> interface provides <span class="tex">T<sub>e</sub>X</span> commands that typeset markdown documents by using the Lua interface behind the scenes. Unlike the Lua interface, the plain TeX interface does not provide low-level tools for converting markdown to <span class="tex">T<sub>e</sub>X</span>. Instead, its goal is to provide high-level typesetting capabilities.</p> <p>The plain <span class="tex">T<sub>e</sub>X</span> interface accepts the same options as the <code>markdown</code> Lua module, in addition to its own options, but now the options are specified as <span class="tex">T<sub>e</sub>X</span> commands.</p> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb33"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb33-2"><a href="#cb33-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb33-3"><a href="#cb33-3" aria-hidden="true"></a></span> -<span id="cb33-4"><a href="#cb33-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb33-5"><a href="#cb33-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="cb33-6"><a href="#cb33-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb33-7"><a href="#cb33-7" aria-hidden="true"></a></span> -<span id="cb33-8"><a href="#cb33-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb33-9"><a href="#cb33-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb33-10"><a href="#cb33-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="cb33-11"><a href="#cb33-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb33-12"><a href="#cb33-12" aria-hidden="true"></a></span> -<span id="cb33-13"><a href="#cb33-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="cb34"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb33"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb33-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb33-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb33-3" data-line-number="3"></a> +<a class="sourceLine" id="cb33-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb33-5" data-line-number="5"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</a> +<a class="sourceLine" id="cb33-6" data-line-number="6"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb33-7" data-line-number="7"></a> +<a class="sourceLine" id="cb33-8" data-line-number="8"><span class="fu">\def</span>\markdownOptionHybrid{true}</a> +<a class="sourceLine" id="cb33-9" data-line-number="9"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb33-10" data-line-number="10"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</a> +<a class="sourceLine" id="cb33-11" data-line-number="11"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb33-12" data-line-number="12"></a> +<a class="sourceLine" id="cb33-13" data-line-number="13"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb34"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb34-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> <p>Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb35"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb35-1"><a href="#cb35-1" aria-hidden="true"></a><span class="ex">pdftex</span> --shell-escape document.tex</span></code></pre></div> -<h3 data-number="2.1.3" id="latex"><span class="header-section-number">2.1.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> +<div class="sourceCode" id="cb35"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb35-1" data-line-number="1"><span class="ex">pdftex</span> --shell-escape document.tex</a></code></pre></div> +<h3 id="latex"><span class="header-section-number">2.1.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> <p>The <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> interface provides the same level of functionality as the plain <span class="tex">T<sub>e</sub>X</span> interface by using the plain <span class="tex">T<sub>e</sub>X</span> interface behind the scenes. Unlike the plain <span class="tex">T<sub>e</sub>X</span> interface, the <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> interface uses familiar <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> idioms, such as package options and environments.</p> <p>The <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> interface accepts the same options as the plain <span class="tex">T<sub>e</sub>X</span> interface, but now the options are specified as ⟨<em>key</em>⟩<span class="math inline"> = </span>⟨<em>value</em>⟩ pairs and they are passed either as package options, in the <code>\markdownSetup</code> command, or as parameters for the <code>markdown*</code> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> environment.</p> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb36"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb36-1"><a href="#cb36-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb36-2"><a href="#cb36-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb36-3"><a href="#cb36-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb36-4"><a href="#cb36-4" aria-hidden="true"></a></span> -<span id="cb36-5"><a href="#cb36-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb36-6"><a href="#cb36-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="cb36-7"><a href="#cb36-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb36-8"><a href="#cb36-8" aria-hidden="true"></a></span> -<span id="cb36-9"><a href="#cb36-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> -<span id="cb36-10"><a href="#cb36-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="cb36-11"><a href="#cb36-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb36-12"><a href="#cb36-12" aria-hidden="true"></a></span> -<span id="cb36-13"><a href="#cb36-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="cb37"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb36"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb36-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb36-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb36-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb36-4" data-line-number="4"></a> +<a class="sourceLine" id="cb36-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb36-6" data-line-number="6"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></a> +<a class="sourceLine" id="cb36-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb36-8" data-line-number="8"></a> +<a class="sourceLine" id="cb36-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</a> +<a class="sourceLine" id="cb36-10" data-line-number="10"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></a> +<a class="sourceLine" id="cb36-11" data-line-number="11"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb36-12" data-line-number="12"></a> +<a class="sourceLine" id="cb36-13" data-line-number="13"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb37"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb37-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> <p>Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb38"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb38-1"><a href="#cb38-1" aria-hidden="true"></a><span class="ex">pdflatex</span> --shell-escape document.tex</span></code></pre></div> -<h3 data-number="2.1.4" id="context"><span class="header-section-number">2.1.4</span> Con<span class="tex">T<sub>e</sub>X</span>t</h3> +<div class="sourceCode" id="cb38"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb38-1" data-line-number="1"><span class="ex">pdflatex</span> --shell-escape document.tex</a></code></pre></div> +<h3 id="context"><span class="header-section-number">2.1.4</span> Con<span class="tex">T<sub>e</sub>X</span>t</h3> <p>The Con<span class="tex">T<sub>e</sub>X</span>t interface provides the same level of functionality as the plain <span class="tex">T<sub>e</sub>X</span> interface by using the plain <span class="tex">T<sub>e</sub>X</span> interface behind the scenes. Unlike the plain <span class="tex">T<sub>e</sub>X</span> interface, the Con<span class="tex">T<sub>e</sub>X</span>t interface uses familiar Con<span class="tex">T<sub>e</sub>X</span>t idioms, such as environments.</p> <p>The Con<span class="tex">T<sub>e</sub>X</span>t interface accepts the same options as the plain <span class="tex">T<sub>e</sub>X</span> interface.</p> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb39"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb39-1"><a href="#cb39-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb39-2"><a href="#cb39-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb39-3"><a href="#cb39-3" aria-hidden="true"></a></span> -<span id="cb39-4"><a href="#cb39-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb39-5"><a href="#cb39-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="cb39-6"><a href="#cb39-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb39-7"><a href="#cb39-7" aria-hidden="true"></a></span> -<span id="cb39-8"><a href="#cb39-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb39-9"><a href="#cb39-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb39-10"><a href="#cb39-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="cb39-11"><a href="#cb39-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb39-12"><a href="#cb39-12" aria-hidden="true"></a></span> -<span id="cb39-13"><a href="#cb39-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="cb40"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb39"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb39-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb39-2" data-line-number="2"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb39-3" data-line-number="3"></a> +<a class="sourceLine" id="cb39-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb39-5" data-line-number="5"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</a> +<a class="sourceLine" id="cb39-6" data-line-number="6"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb39-7" data-line-number="7"></a> +<a class="sourceLine" id="cb39-8" data-line-number="8"><span class="fu">\def</span>\markdownOptionHybrid{true}</a> +<a class="sourceLine" id="cb39-9" data-line-number="9"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb39-10" data-line-number="10"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</a> +<a class="sourceLine" id="cb39-11" data-line-number="11"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb39-12" data-line-number="12"></a> +<a class="sourceLine" id="cb39-13" data-line-number="13"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb40"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb40-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> <p>Invoking pdfTeX should have the same effect:</p> -<div class="sourceCode" id="cb41"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb41-1"><a href="#cb41-1" aria-hidden="true"></a><span class="ex">texexec</span> --passon=--shell-escape document.tex</span></code></pre></div> -<h2 data-number="2.2" id="options"><span class="header-section-number">2.2</span> Options</h2> +<div class="sourceCode" id="cb41"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb41-1" data-line-number="1"><span class="ex">texexec</span> --passon=--shell-escape document.tex</a></code></pre></div> +<h2 id="options"><span class="header-section-number">2.2</span> Options</h2> <p>In this section, I will describe all the options recognized by the Markdown package.</p> -<h3 data-number="2.2.1" id="lua-1"><span class="header-section-number">2.2.1</span> Lua</h3> +<h3 id="lua-1"><span class="header-section-number">2.2.1</span> Lua</h3> <p>Lua options control the conversion from markdown to <span class="tex">T<sub>e</sub>X</span>. They are supported by all interfaces of the Markdown package starting with the low-level Lua interfaces and all the way up to the <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> and Con<span class="tex">T<sub>e</sub>X</span>t interfaces.</p> -<h4 data-number="2.2.1.1" id="option-cachedir"><span class="header-section-number">2.2.1.1</span> Option <code>cacheDir</code></h4> +<h4 id="option-cachedir"><span class="header-section-number">2.2.1.1</span> Option <code>cacheDir</code></h4> <dl> -<dt><code>cacheDir</code> (default value: <code>"."</code>)</dt> +<dt><code>cacheDir</code> (default value: <code>"."</code>)</dt> <dd><p>A path to the directory containing auxiliary cache files. If the last segment of the path does not exist, it will be created by the Lua command-line and plain <span class="tex">T<sub>e</sub>X</span> implementations. The Lua implementation expects that the entire path already exists.</p> <p>When iteratively writing and typesetting a markdown document, the cache files are going to accumulate over time. You are advised to clean the cache directory every now and then, or to set it to a temporary filesystem (such as <code>/tmp</code> on UN*X systems), which gets periodically emptied.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb42"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb42-1"><a href="#cb42-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb42-2"><a href="#cb42-2" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb42-3"><a href="#cb42-3" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb42-4"><a href="#cb42-4" aria-hidden="true"></a> local convert = markdown.new({cacheDir = "cache"})</span> -<span id="cb42-5"><a href="#cb42-5" aria-hidden="true"></a> local input = "Hello *world*!"</span> -<span id="cb42-6"><a href="#cb42-6" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb42-7"><a href="#cb42-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="lua-module-example" class="unnumbered">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="cb42"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb42-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb42-2" data-line-number="2"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb42-3" data-line-number="3"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb42-4" data-line-number="4"> local convert = markdown.new({cacheDir = "cache"})</a> +<a class="sourceLine" id="cb42-5" data-line-number="5"> local input = "Hello *world*!"</a> +<a class="sourceLine" id="cb42-6" data-line-number="6"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb42-7" data-line-number="7"><span class="fu">\bye</span></a></code></pre></div> <p>Create an empty directory named <code>cache</code> next to our text document. Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb43"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb43"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb43-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Several cache files of the Markdown package will also be produced in the <code>cache</code> directory as we requested using the <code>cacheDir</code> option.</p> -<h5 class="unnumbered" data-number="" id="lua-cli-example">Lua CLI Example</h5> +<h5 id="lua-cli-example" class="unnumbered">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="cb44"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb44-1"><a href="#cb44-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb44-2"><a href="#cb44-2" aria-hidden="true"></a><span class="fu">\input</span> hello</span> -<span id="cb44-3"><a href="#cb44-3" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb44"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb44-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb44-2" data-line-number="2"><span class="fu">\input</span> hello</a> +<a class="sourceLine" id="cb44-3" data-line-number="3"><span class="fu">\bye</span></a></code></pre></div> <p>Using a text editor, create a text document named <code>hello.md</code> with the following content:</p> -<div class="sourceCode" id="cb45"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb45-1"><a href="#cb45-1" aria-hidden="true"></a>Hello *world*!</span></code></pre></div> +<div class="sourceCode" id="cb45"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb45-1" data-line-number="1">Hello *world*!</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb46"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ cacheDir=cache -- hello.md hello.tex</span> -<span id="cb46-2"><a href="#cb46-2" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb46"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb46-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ cacheDir=cache -- hello.md hello.tex</a> +<a class="sourceLine" id="cb46-2" data-line-number="2"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A directory named <code>cache</code> containing several cache files of the Markdown package will also be produced as we requested using the <code>cacheDir</code> option.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<h5 id="plain-tex-example" class="unnumbered">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="cb47"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb47-1"><a href="#cb47-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb47-2"><a href="#cb47-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionCacheDir</span>{cache}</span> -<span id="cb47-3"><a href="#cb47-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb47-4"><a href="#cb47-4" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb47-5"><a href="#cb47-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb47-6"><a href="#cb47-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb47"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb47-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb47-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionCacheDir{cache}</a> +<a class="sourceLine" id="cb47-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb47-4" data-line-number="4">Hello *world*!</a> +<a class="sourceLine" id="cb47-5" data-line-number="5"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb47-6" data-line-number="6"><span class="fu">\bye</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb48"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb48-1"><a href="#cb48-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb48"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb48-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A directory named <code>cache</code> containing several cache files of the Markdown package will also be produced as we requested using the <code>cacheDir</code> option.</p> -<h5 class="unnumbered" data-number="" id="latex-example"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 id="latex-example" class="unnumbered"><span class="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="cb49"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb49-1"><a href="#cb49-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb49-2"><a href="#cb49-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[cacheDir=cache]{<span class="ex">markdown</span>}</span> -<span id="cb49-3"><a href="#cb49-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb49-4"><a href="#cb49-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb49-5"><a href="#cb49-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb49-6"><a href="#cb49-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb49-7"><a href="#cb49-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb49"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb49-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb49-2" data-line-number="2"><span class="bu">\usepackage</span>[cacheDir=cache]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb49-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb49-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb49-5" data-line-number="5">Hello *world*!</a> +<a class="sourceLine" id="cb49-6" data-line-number="6"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb49-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb50"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb50-1"><a href="#cb50-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb50"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb50-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A directory named <code>cache</code> containing several cache files of the Markdown package will also be produced as we requested using the <code>cacheDir</code> option.</p> -<h5 class="unnumbered" data-number="" id="context-example">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<h5 id="context-example" class="unnumbered">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="cb51"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb51-1"><a href="#cb51-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb51-2"><a href="#cb51-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionCacheDir</span>{cache}</span> -<span id="cb51-3"><a href="#cb51-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb51-4"><a href="#cb51-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb51-5"><a href="#cb51-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb51-6"><a href="#cb51-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb51-7"><a href="#cb51-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb51"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb51-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb51-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionCacheDir{cache}</a> +<a class="sourceLine" id="cb51-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb51-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb51-5" data-line-number="5">Hello *world*!</a> +<a class="sourceLine" id="cb51-6" data-line-number="6"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb51-7" data-line-number="7"><span class="fu">\stoptext</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb52"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb52-1"><a href="#cb52-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb52"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb52-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A directory named <code>cache</code> containing several cache files of the Markdown package will also be produced as we requested using the <code>cacheDir</code> option.</p> -<h4 data-number="2.2.1.2" id="option-frozencachefilename"><span class="header-section-number">2.2.1.2</span> Option <code>frozenCacheFileName</code></h4> +<h4 id="option-frozencachefilename"><span class="header-section-number">2.2.1.2</span> Option <code>frozenCacheFileName</code></h4> <dl> -<dt><code>frozenCacheFileName</code> (default value: <code>"frozenCache.tex"</code>)</dt> +<dt><code>frozenCacheFileName</code> (default value: <code>"frozenCache.tex"</code>)</dt> <dd><p>A path to an output file (frozen cache) that will be created when the <strong><code>finalizeCache</code></strong> option is enabled and will contain a mapping between an enumeration of markdown documents and their auxiliary cache files.</p> <p>The frozen cache makes it possible to later typeset a plain <span class="tex">T<sub>e</sub>X</span> document that contains markdown documents without invoking Lua using the <code>\markdownOptionFrozenCache</code> plain <span class="tex">T<sub>e</sub>X</span> option. As a result, the plain <span class="tex">T<sub>e</sub>X</span> document becomes more portable, but further changes in the order and the content of markdown documents will not be reflected.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-1">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb53"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb53-1"><a href="#cb53-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb53-2"><a href="#cb53-2" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb53-3"><a href="#cb53-3" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb53-4"><a href="#cb53-4" aria-hidden="true"></a> local convert = markdown.new({finalizeCache = true, frozenCacheFileName = "cache.tex"})</span> -<span id="cb53-5"><a href="#cb53-5" aria-hidden="true"></a> local input = "Hello *world*!"</span> -<span id="cb53-6"><a href="#cb53-6" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb53-7"><a href="#cb53-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="lua-module-example-1" class="unnumbered">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="cb53"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb53-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb53-2" data-line-number="2"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb53-3" data-line-number="3"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb53-4" data-line-number="4"> local convert = markdown.new({finalizeCache = true, frozenCacheFileName = "cache.tex"})</a> +<a class="sourceLine" id="cb53-5" data-line-number="5"> local input = "Hello *world*!"</a> +<a class="sourceLine" id="cb53-6" data-line-number="6"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb53-7" data-line-number="7"><span class="fu">\bye</span></a></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb54"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb54-1"><a href="#cb54-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb54"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb54-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizeCache</code> and <code>frozenCacheFileName</code> options.</p> -<h5 class="unnumbered" data-number="" id="lua-cli-example-1">Lua CLI Example</h5> +<h5 id="lua-cli-example-1" class="unnumbered">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="cb55"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb55-1"><a href="#cb55-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb55-2"><a href="#cb55-2" aria-hidden="true"></a><span class="fu">\input</span> hello</span> -<span id="cb55-3"><a href="#cb55-3" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb55"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb55-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb55-2" data-line-number="2"><span class="fu">\input</span> hello</a> +<a class="sourceLine" id="cb55-3" data-line-number="3"><span class="fu">\bye</span></a></code></pre></div> <p>Using a text editor, create a text document named <code>hello.md</code> with the following content:</p> -<div class="sourceCode" id="cb56"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb56-1"><a href="#cb56-1" aria-hidden="true"></a>Hello *world*!</span></code></pre></div> +<div class="sourceCode" id="cb56"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb56-1" data-line-number="1">Hello *world*!</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb57"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb57-1"><a href="#cb57-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ finalizeCache=true frozenCacheFileName=cache.tex -- hello.md hello.tex</span> -<span id="cb57-2"><a href="#cb57-2" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb57"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb57-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ finalizeCache=true frozenCacheFileName=cache.tex -- hello.md hello.tex</a> +<a class="sourceLine" id="cb57-2" data-line-number="2"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizeCache</code> and <code>frozenCacheFileName</code> options.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-1">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<h5 id="plain-tex-example-1" class="unnumbered">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="cb58"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb58-1"><a href="#cb58-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb58-2"><a href="#cb58-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> -<span id="cb58-3"><a href="#cb58-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{cache.tex}</span> -<span id="cb58-4"><a href="#cb58-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb58-5"><a href="#cb58-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb58-6"><a href="#cb58-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb58-7"><a href="#cb58-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb58"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb58-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb58-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFinalizeCache{true}</a> +<a class="sourceLine" id="cb58-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionFrozenCacheFileName{cache.tex}</a> +<a class="sourceLine" id="cb58-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb58-5" data-line-number="5">Hello *world*!</a> +<a class="sourceLine" id="cb58-6" data-line-number="6"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb58-7" data-line-number="7"><span class="fu">\bye</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb59"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb59-1"><a href="#cb59-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb59"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb59-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizeCache</code> and <code>frozenCacheFileName</code> options.</p> <p>Next, create a new text document <code>frozen-document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb60"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb60-1"><a href="#cb60-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb60-2"><a href="#cb60-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> -<span id="cb60-3"><a href="#cb60-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{cache.tex}</span> -<span id="cb60-4"><a href="#cb60-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb60-5"><a href="#cb60-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb60-6"><a href="#cb60-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb60-7"><a href="#cb60-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb60"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb60-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb60-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFrozenCache{true}</a> +<a class="sourceLine" id="cb60-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionFrozenCacheFileName{cache.tex}</a> +<a class="sourceLine" id="cb60-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb60-5" data-line-number="5">Hi *world*!</a> +<a class="sourceLine" id="cb60-6" data-line-number="6"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb60-7" data-line-number="7"><span class="fu">\bye</span></a></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb61"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb61-1"><a href="#cb61-1" aria-hidden="true"></a><span class="ex">pdftex</span> -no-shell-escape frozen-document.tex</span></code></pre></div> +<div class="sourceCode" id="cb61"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb61-1" data-line-number="1"><span class="ex">pdftex</span> -no-shell-escape frozen-document.tex</a></code></pre></div> <p>A PDF document named <code>frozen-document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h5 class="unnumbered" data-number="" id="latex-example-1"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 id="latex-example-1" class="unnumbered"><span class="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="cb62"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb62-1"><a href="#cb62-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</span> -<span id="cb62-2"><a href="#cb62-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[frozenCacheFileName=cache.tex]{<span class="ex">markdown</span>}</span> -<span id="cb62-3"><a href="#cb62-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb62-4"><a href="#cb62-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb62-5"><a href="#cb62-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb62-6"><a href="#cb62-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb62-7"><a href="#cb62-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb62"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb62-1" data-line-number="1"><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb62-2" data-line-number="2"><span class="bu">\usepackage</span>[frozenCacheFileName=cache.tex]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb62-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb62-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb62-5" data-line-number="5">Hello *world*!</a> +<a class="sourceLine" id="cb62-6" data-line-number="6"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb62-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb63"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb63-1"><a href="#cb63-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb63"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb63-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizecache</code> and <code>frozenCacheFileName</code> options.</p> <p>Next, create a new text document <code>frozen-document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb64"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb64-1"><a href="#cb64-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span> -<span id="cb64-2"><a href="#cb64-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[frozenCacheFileName=cache.tex]{<span class="ex">markdown</span>}</span> -<span id="cb64-3"><a href="#cb64-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb64-4"><a href="#cb64-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb64-5"><a href="#cb64-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb64-6"><a href="#cb64-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb64-7"><a href="#cb64-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb64"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb64-1" data-line-number="1"><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb64-2" data-line-number="2"><span class="bu">\usepackage</span>[frozenCacheFileName=cache.tex]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb64-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb64-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb64-5" data-line-number="5">Hi *world*!</a> +<a class="sourceLine" id="cb64-6" data-line-number="6"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb64-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb65"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb65-1"><a href="#cb65-1" aria-hidden="true"></a><span class="ex">pdflatex</span> -no-shell-escape frozen-document.tex</span></code></pre></div> +<div class="sourceCode" id="cb65"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb65-1" data-line-number="1"><span class="ex">pdflatex</span> -no-shell-escape frozen-document.tex</a></code></pre></div> <p>A PDF document named <code>frozen-document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>frozencache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h5 class="unnumbered" data-number="" id="context-example-1">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb66"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb66-1"><a href="#cb66-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb66-2"><a href="#cb66-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> -<span id="cb66-3"><a href="#cb66-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{cache.tex}</span> -<span id="cb66-4"><a href="#cb66-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb66-5"><a href="#cb66-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb66-6"><a href="#cb66-6" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb66-7"><a href="#cb66-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb66-8"><a href="#cb66-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="cb67"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb67-1"><a href="#cb67-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-1" class="unnumbered">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="cb66"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb66-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb66-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFinalizeCache{true}</a> +<a class="sourceLine" id="cb66-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionFrozenCacheFileName{cache.tex}</a> +<a class="sourceLine" id="cb66-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb66-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb66-6" data-line-number="6">Hello *world*!</a> +<a class="sourceLine" id="cb66-7" data-line-number="7"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb66-8" data-line-number="8"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb67"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb67-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache will also be produced in the <code>cache.tex</code> output file as we requested using the <code>finalizeCache</code> and <code>frozenCacheFileName</code> options.</p> <p>Next, create a new text document <code>frozen-document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb68"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb68-1"><a href="#cb68-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb68-2"><a href="#cb68-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> -<span id="cb68-3"><a href="#cb68-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{cache.tex}</span> -<span id="cb68-4"><a href="#cb68-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb68-5"><a href="#cb68-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb68-6"><a href="#cb68-6" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb68-7"><a href="#cb68-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb68-8"><a href="#cb68-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb68"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb68-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb68-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFrozenCache{true}</a> +<a class="sourceLine" id="cb68-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionFrozenCacheFileName{cache.tex}</a> +<a class="sourceLine" id="cb68-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb68-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb68-6" data-line-number="6">Hi *world*!</a> +<a class="sourceLine" id="cb68-7" data-line-number="7"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb68-8" data-line-number="8"><span class="fu">\stoptext</span></a></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb69"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb69-1"><a href="#cb69-1" aria-hidden="true"></a><span class="ex">texexec</span> --passon=--no-shell-escape frozen-document.tex</span></code></pre></div> +<div class="sourceCode" id="cb69"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb69-1" data-line-number="1"><span class="ex">texexec</span> --passon=--no-shell-escape frozen-document.tex</a></code></pre></div> <p>A PDF document named <code>frozen-document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h4 data-number="2.2.1.3" id="option-blankbeforeblockquote"><span class="header-section-number">2.2.1.3</span> Option <code>blankBeforeBlockquote</code></h4> +<h4 id="option-blankbeforeblockquote"><span class="header-section-number">2.2.1.3</span> Option <code>blankBeforeBlockquote</code></h4> <dl> <dt><code>blankBeforeBlockquote</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -608,27 +605,27 @@ </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-2">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb70"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb70-1"><a href="#cb70-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb70-2"><a href="#cb70-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb70-3"><a href="#cb70-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb70-4"><a href="#cb70-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb70-5"><a href="#cb70-5" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb70-6"><a href="#cb70-6" aria-hidden="true"></a> local convert, input</span> -<span id="cb70-7"><a href="#cb70-7" aria-hidden="true"></a></span> -<span id="cb70-8"><a href="#cb70-8" aria-hidden="true"></a> convert = markdown.new()</span> -<span id="cb70-9"><a href="#cb70-9" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb70-10"><a href="#cb70-10" aria-hidden="true"></a> "> A quote." .. newline</span> -<span id="cb70-11"><a href="#cb70-11" aria-hidden="true"></a> tex.sprint(convert(input))</span> -<span id="cb70-12"><a href="#cb70-12" aria-hidden="true"></a></span> -<span id="cb70-13"><a href="#cb70-13" aria-hidden="true"></a> convert = markdown.new({blankBeforeBlockquote = true})</span> -<span id="cb70-14"><a href="#cb70-14" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb70-15"><a href="#cb70-15" aria-hidden="true"></a> "> Not a quote." .. newline</span> -<span id="cb70-16"><a href="#cb70-16" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb70-17"><a href="#cb70-17" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="lua-module-example-2" class="unnumbered">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="cb70"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb70-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb70-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb70-3" data-line-number="3"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb70-4" data-line-number="4"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb70-5" data-line-number="5"> local newline = [[^^J^^J]]</a> +<a class="sourceLine" id="cb70-6" data-line-number="6"> local convert, input</a> +<a class="sourceLine" id="cb70-7" data-line-number="7"></a> +<a class="sourceLine" id="cb70-8" data-line-number="8"> convert = markdown.new()</a> +<a class="sourceLine" id="cb70-9" data-line-number="9"> input = "A paragraph." .. newline ..</a> +<a class="sourceLine" id="cb70-10" data-line-number="10"> "> A quote." .. newline</a> +<a class="sourceLine" id="cb70-11" data-line-number="11"> tex.sprint(convert(input))</a> +<a class="sourceLine" id="cb70-12" data-line-number="12"></a> +<a class="sourceLine" id="cb70-13" data-line-number="13"> convert = markdown.new({blankBeforeBlockquote = true})</a> +<a class="sourceLine" id="cb70-14" data-line-number="14"> input = "A paragraph." .. newline ..</a> +<a class="sourceLine" id="cb70-15" data-line-number="15"> "> Not a quote." .. newline</a> +<a class="sourceLine" id="cb70-16" data-line-number="16"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb70-17" data-line-number="17"><span class="fu">\bye</span></a></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb71"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb71-1"><a href="#cb71-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb71"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb71-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> @@ -637,20 +634,20 @@ </blockquote> <p>A paragraph > Not a quote.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-2">Lua CLI Example</h5> +<h5 id="lua-cli-example-2" class="unnumbered">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="cb72"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb72-1"><a href="#cb72-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb72-2"><a href="#cb72-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb72-3"><a href="#cb72-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb72-4"><a href="#cb72-4" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb72-5"><a href="#cb72-5" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb72"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb72-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb72-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb72-3" data-line-number="3"><span class="fu">\input</span> optionfalse</a> +<a class="sourceLine" id="cb72-4" data-line-number="4"><span class="fu">\input</span> optiontrue</a> +<a class="sourceLine" id="cb72-5" data-line-number="5"><span class="fu">\bye</span></a></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="cb73"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb73-1"><a href="#cb73-1" aria-hidden="true"></a>A paragraph.</span> -<span id="cb73-2"><a href="#cb73-2" aria-hidden="true"></a><span class="at">> A quote?</span></span></code></pre></div> +<div class="sourceCode" id="cb73"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb73-1" data-line-number="1">A paragraph.</a> +<a class="sourceLine" id="cb73-2" data-line-number="2">><span class="dt"> A quote?</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb74"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb74-1"><a href="#cb74-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb74-2"><a href="#cb74-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ blankBeforeBlockquote=true -- content.md optiontrue.tex</span> -<span id="cb74-3"><a href="#cb74-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb74"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb74-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</a> +<a class="sourceLine" id="cb74-2" data-line-number="2"><span class="ex">texlua</span> ⟨CLI pathname⟩ blankBeforeBlockquote=true -- content.md optiontrue.tex</a> +<a class="sourceLine" id="cb74-3" data-line-number="3"><span class="ex">luatex</span> document.tex</a></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> @@ -660,24 +657,24 @@ </blockquote> <p>A paragraph. > A quote?</p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-2">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb75"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb75-1"><a href="#cb75-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb75-2"><a href="#cb75-2" aria-hidden="true"></a></span> -<span id="cb75-3"><a href="#cb75-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb75-4"><a href="#cb75-4" aria-hidden="true"></a>A paragraph.</span> -<span id="cb75-5"><a href="#cb75-5" aria-hidden="true"></a>> A quote.</span> -<span id="cb75-6"><a href="#cb75-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb75-7"><a href="#cb75-7" aria-hidden="true"></a></span> -<span id="cb75-8"><a href="#cb75-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionBlankBeforeBlockquote</span>{true}</span> -<span id="cb75-9"><a href="#cb75-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb75-10"><a href="#cb75-10" aria-hidden="true"></a>A paragraph.</span> -<span id="cb75-11"><a href="#cb75-11" aria-hidden="true"></a>> Not a quote.</span> -<span id="cb75-12"><a href="#cb75-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb75-13"><a href="#cb75-13" aria-hidden="true"></a></span> -<span id="cb75-14"><a href="#cb75-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="cb76"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb76-1"><a href="#cb76-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-2" class="unnumbered">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="cb75"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb75-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb75-2" data-line-number="2"></a> +<a class="sourceLine" id="cb75-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb75-4" data-line-number="4">A paragraph.</a> +<a class="sourceLine" id="cb75-5" data-line-number="5">> A quote.</a> +<a class="sourceLine" id="cb75-6" data-line-number="6"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb75-7" data-line-number="7"></a> +<a class="sourceLine" id="cb75-8" data-line-number="8"><span class="fu">\def</span>\markdownOptionBlankBeforeBlockquote{true}</a> +<a class="sourceLine" id="cb75-9" data-line-number="9"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb75-10" data-line-number="10">A paragraph.</a> +<a class="sourceLine" id="cb75-11" data-line-number="11">> Not a quote.</a> +<a class="sourceLine" id="cb75-12" data-line-number="12"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb75-13" data-line-number="13"></a> +<a class="sourceLine" id="cb75-14" data-line-number="14"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb76"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb76-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> @@ -686,25 +683,25 @@ </blockquote> <p>A paragraph > Not a quote.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-2"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb77"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb77-1"><a href="#cb77-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb77-2"><a href="#cb77-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb77-3"><a href="#cb77-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb77-4"><a href="#cb77-4" aria-hidden="true"></a></span> -<span id="cb77-5"><a href="#cb77-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb77-6"><a href="#cb77-6" aria-hidden="true"></a>A paragraph.</span> -<span id="cb77-7"><a href="#cb77-7" aria-hidden="true"></a>> A quote.</span> -<span id="cb77-8"><a href="#cb77-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb77-9"><a href="#cb77-9" aria-hidden="true"></a></span> -<span id="cb77-10"><a href="#cb77-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeBlockquote}</span> -<span id="cb77-11"><a href="#cb77-11" aria-hidden="true"></a>A paragraph.</span> -<span id="cb77-12"><a href="#cb77-12" aria-hidden="true"></a>> Not a quote.</span> -<span id="cb77-13"><a href="#cb77-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb77-14"><a href="#cb77-14" aria-hidden="true"></a></span> -<span id="cb77-15"><a href="#cb77-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="cb78"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb78-1"><a href="#cb78-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-2" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb77"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb77-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb77-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb77-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb77-4" data-line-number="4"></a> +<a class="sourceLine" id="cb77-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb77-6" data-line-number="6">A paragraph.</a> +<a class="sourceLine" id="cb77-7" data-line-number="7">> A quote.</a> +<a class="sourceLine" id="cb77-8" data-line-number="8"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb77-9" data-line-number="9"></a> +<a class="sourceLine" id="cb77-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeBlockquote}</a> +<a class="sourceLine" id="cb77-11" data-line-number="11">A paragraph.</a> +<a class="sourceLine" id="cb77-12" data-line-number="12">> Not a quote.</a> +<a class="sourceLine" id="cb77-13" data-line-number="13"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb77-14" data-line-number="14"></a> +<a class="sourceLine" id="cb77-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb78"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb78-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> @@ -713,25 +710,25 @@ </blockquote> <p>A paragraph > Not a quote.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-2">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb79"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb79-1"><a href="#cb79-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb79-2"><a href="#cb79-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb79-3"><a href="#cb79-3" aria-hidden="true"></a></span> -<span id="cb79-4"><a href="#cb79-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb79-5"><a href="#cb79-5" aria-hidden="true"></a>A paragraph.</span> -<span id="cb79-6"><a href="#cb79-6" aria-hidden="true"></a>> A quote.</span> -<span id="cb79-7"><a href="#cb79-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb79-8"><a href="#cb79-8" aria-hidden="true"></a></span> -<span id="cb79-9"><a href="#cb79-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionBlankBeforeBlockquote</span>{true}</span> -<span id="cb79-10"><a href="#cb79-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb79-11"><a href="#cb79-11" aria-hidden="true"></a>A paragraph.</span> -<span id="cb79-12"><a href="#cb79-12" aria-hidden="true"></a>> Not a quote.</span> -<span id="cb79-13"><a href="#cb79-13" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb79-14"><a href="#cb79-14" aria-hidden="true"></a></span> -<span id="cb79-15"><a href="#cb79-15" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb80"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb80-1"><a href="#cb80-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-2" class="unnumbered">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="cb79"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb79-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb79-2" data-line-number="2"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb79-3" data-line-number="3"></a> +<a class="sourceLine" id="cb79-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb79-5" data-line-number="5">A paragraph.</a> +<a class="sourceLine" id="cb79-6" data-line-number="6">> A quote.</a> +<a class="sourceLine" id="cb79-7" data-line-number="7"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb79-8" data-line-number="8"></a> +<a class="sourceLine" id="cb79-9" data-line-number="9"><span class="fu">\def</span>\markdownOptionBlankBeforeBlockquote{true}</a> +<a class="sourceLine" id="cb79-10" data-line-number="10"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb79-11" data-line-number="11">A paragraph.</a> +<a class="sourceLine" id="cb79-12" data-line-number="12">> Not a quote.</a> +<a class="sourceLine" id="cb79-13" data-line-number="13"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb79-14" data-line-number="14"></a> +<a class="sourceLine" id="cb79-15" data-line-number="15"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb80"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb80-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> @@ -740,7 +737,7 @@ </blockquote> <p>A paragraph > Not a quote.</p> </blockquote> -<h4 data-number="2.2.1.4" id="option-blankbeforecodefence"><span class="header-section-number">2.2.1.4</span> Option <code>blankBeforeCodeFence</code></h4> +<h4 id="option-blankbeforecodefence"><span class="header-section-number">2.2.1.4</span> Option <code>blankBeforeCodeFence</code></h4> <dl> <dt><code>blankBeforeCodeFence</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -753,54 +750,54 @@ </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-3">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb81"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb81-1"><a href="#cb81-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb81-2"><a href="#cb81-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb81-3"><a href="#cb81-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb81-4"><a href="#cb81-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb81-5"><a href="#cb81-5" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb81-6"><a href="#cb81-6" aria-hidden="true"></a> local convert, input</span> -<span id="cb81-7"><a href="#cb81-7" aria-hidden="true"></a></span> -<span id="cb81-8"><a href="#cb81-8" aria-hidden="true"></a> convert = markdown.new({fencedCode = true})</span> -<span id="cb81-9"><a href="#cb81-9" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb81-10"><a href="#cb81-10" aria-hidden="true"></a> "```" .. newline ..</span> -<span id="cb81-11"><a href="#cb81-11" aria-hidden="true"></a> "A code fence." .. newline ..</span> -<span id="cb81-12"><a href="#cb81-12" aria-hidden="true"></a> "```" .. newline</span> -<span id="cb81-13"><a href="#cb81-13" aria-hidden="true"></a> tex.sprint(convert(input))</span> -<span id="cb81-14"><a href="#cb81-14" aria-hidden="true"></a></span> -<span id="cb81-15"><a href="#cb81-15" aria-hidden="true"></a> convert = markdown.new({</span> -<span id="cb81-16"><a href="#cb81-16" aria-hidden="true"></a> fencedCode = true, blankBeforeCodeFence = true})</span> -<span id="cb81-17"><a href="#cb81-17" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb81-18"><a href="#cb81-18" aria-hidden="true"></a> "```" .. newline ..</span> -<span id="cb81-19"><a href="#cb81-19" aria-hidden="true"></a> "Not a code fence." .. newline ..</span> -<span id="cb81-20"><a href="#cb81-20" aria-hidden="true"></a> "```" .. newline</span> -<span id="cb81-21"><a href="#cb81-21" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb81-22"><a href="#cb81-22" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="lua-module-example-3" class="unnumbered">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="cb81"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb81-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb81-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb81-3" data-line-number="3"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb81-4" data-line-number="4"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb81-5" data-line-number="5"> local newline = [[^^J^^J]]</a> +<a class="sourceLine" id="cb81-6" data-line-number="6"> local convert, input</a> +<a class="sourceLine" id="cb81-7" data-line-number="7"></a> +<a class="sourceLine" id="cb81-8" data-line-number="8"> convert = markdown.new({fencedCode = true})</a> +<a class="sourceLine" id="cb81-9" data-line-number="9"> input = "A paragraph." .. newline ..</a> +<a class="sourceLine" id="cb81-10" data-line-number="10"> "```" .. newline ..</a> +<a class="sourceLine" id="cb81-11" data-line-number="11"> "A code fence." .. newline ..</a> +<a class="sourceLine" id="cb81-12" data-line-number="12"> "```" .. newline</a> +<a class="sourceLine" id="cb81-13" data-line-number="13"> tex.sprint(convert(input))</a> +<a class="sourceLine" id="cb81-14" data-line-number="14"></a> +<a class="sourceLine" id="cb81-15" data-line-number="15"> convert = markdown.new({</a> +<a class="sourceLine" id="cb81-16" data-line-number="16"> fencedCode = true, blankBeforeCodeFence = true})</a> +<a class="sourceLine" id="cb81-17" data-line-number="17"> input = "A paragraph." .. newline ..</a> +<a class="sourceLine" id="cb81-18" data-line-number="18"> "```" .. newline ..</a> +<a class="sourceLine" id="cb81-19" data-line-number="19"> "Not a code fence." .. newline ..</a> +<a class="sourceLine" id="cb81-20" data-line-number="20"> "```" .. newline</a> +<a class="sourceLine" id="cb81-21" data-line-number="21"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb81-22" data-line-number="22"><span class="fu">\bye</span></a></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb82"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb82-1"><a href="#cb82-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb82"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb82-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> <pre><code>A code fence.</code></pre> <p>A paragraph. <code>Not a code fence.</code></p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-3">Lua CLI Example</h5> +<h5 id="lua-cli-example-3" class="unnumbered">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="cb84"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb84-1"><a href="#cb84-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb84-2"><a href="#cb84-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb84-3"><a href="#cb84-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb84-4"><a href="#cb84-4" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb84-5"><a href="#cb84-5" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb84"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb84-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb84-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb84-3" data-line-number="3"><span class="fu">\input</span> optionfalse</a> +<a class="sourceLine" id="cb84-4" data-line-number="4"><span class="fu">\input</span> optiontrue</a> +<a class="sourceLine" id="cb84-5" data-line-number="5"><span class="fu">\bye</span></a></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="cb85"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb85-1"><a href="#cb85-1" aria-hidden="true"></a>A paragraph.</span> -<span id="cb85-2"><a href="#cb85-2" aria-hidden="true"></a><span class="in">```</span></span> -<span id="cb85-3"><a href="#cb85-3" aria-hidden="true"></a><span class="in">A code fence?</span></span> -<span id="cb85-4"><a href="#cb85-4" aria-hidden="true"></a><span class="in">```</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb86"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb86-1"><a href="#cb86-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ fencedCode=true -- content.md optionfalse.tex</span> -<span id="cb86-2"><a href="#cb86-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ fencedCode=true blankBeforeCodeFence=true -- content.md optiontrue.tex</span> -<span id="cb86-3"><a href="#cb86-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb85"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb85-1" data-line-number="1">A paragraph.</a> +<a class="sourceLine" id="cb85-2" data-line-number="2">```</a> +<a class="sourceLine" id="cb85-3" data-line-number="3">A code fence?</a> +<a class="sourceLine" id="cb85-4" data-line-number="4">```</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb86"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb86-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ fencedCode=true -- content.md optionfalse.tex</a> +<a class="sourceLine" id="cb86-2" data-line-number="2"><span class="ex">texlua</span> ⟨CLI pathname⟩ fencedCode=true blankBeforeCodeFence=true -- content.md optiontrue.tex</a> +<a class="sourceLine" id="cb86-3" data-line-number="3"><span class="ex">luatex</span> document.tex</a></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> @@ -808,95 +805,95 @@ <pre><code>A code fence?</code></pre> <p>A paragraph. <code>A code fence?</code></p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-3">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb88"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb88-1"><a href="#cb88-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb88-2"><a href="#cb88-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFencedCode</span>{true}</span> -<span id="cb88-3"><a href="#cb88-3" aria-hidden="true"></a></span> -<span id="cb88-4"><a href="#cb88-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb88-5"><a href="#cb88-5" aria-hidden="true"></a>A paragraph.</span> -<span id="cb88-6"><a href="#cb88-6" aria-hidden="true"></a>```</span> -<span id="cb88-7"><a href="#cb88-7" aria-hidden="true"></a>A code fence.</span> -<span id="cb88-8"><a href="#cb88-8" aria-hidden="true"></a>```</span> -<span id="cb88-9"><a href="#cb88-9" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb88-10"><a href="#cb88-10" aria-hidden="true"></a></span> -<span id="cb88-11"><a href="#cb88-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionBlankBeforeCodeFence</span>{true}</span> -<span id="cb88-12"><a href="#cb88-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb88-13"><a href="#cb88-13" aria-hidden="true"></a>A paragraph.</span> -<span id="cb88-14"><a href="#cb88-14" aria-hidden="true"></a>```</span> -<span id="cb88-15"><a href="#cb88-15" aria-hidden="true"></a>Not a code fence.</span> -<span id="cb88-16"><a href="#cb88-16" aria-hidden="true"></a>```</span> -<span id="cb88-17"><a href="#cb88-17" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb88-18"><a href="#cb88-18" aria-hidden="true"></a></span> -<span id="cb88-19"><a href="#cb88-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="cb89"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb89-1"><a href="#cb89-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-3" class="unnumbered">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="cb88"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb88-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb88-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFencedCode{true}</a> +<a class="sourceLine" id="cb88-3" data-line-number="3"></a> +<a class="sourceLine" id="cb88-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb88-5" data-line-number="5">A paragraph.</a> +<a class="sourceLine" id="cb88-6" data-line-number="6">```</a> +<a class="sourceLine" id="cb88-7" data-line-number="7">A code fence.</a> +<a class="sourceLine" id="cb88-8" data-line-number="8">```</a> +<a class="sourceLine" id="cb88-9" data-line-number="9"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb88-10" data-line-number="10"></a> +<a class="sourceLine" id="cb88-11" data-line-number="11"><span class="fu">\def</span>\markdownOptionBlankBeforeCodeFence{true}</a> +<a class="sourceLine" id="cb88-12" data-line-number="12"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb88-13" data-line-number="13">A paragraph.</a> +<a class="sourceLine" id="cb88-14" data-line-number="14">```</a> +<a class="sourceLine" id="cb88-15" data-line-number="15">Not a code fence.</a> +<a class="sourceLine" id="cb88-16" data-line-number="16">```</a> +<a class="sourceLine" id="cb88-17" data-line-number="17"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb88-18" data-line-number="18"></a> +<a class="sourceLine" id="cb88-19" data-line-number="19"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb89"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb89-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> <pre><code>A code fence.</code></pre> <p>A paragraph. <code>Not a code fence.</code></p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-3"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb91"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb91-1"><a href="#cb91-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb91-2"><a href="#cb91-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> -<span id="cb91-3"><a href="#cb91-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb91-4"><a href="#cb91-4" aria-hidden="true"></a></span> -<span id="cb91-5"><a href="#cb91-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb91-6"><a href="#cb91-6" aria-hidden="true"></a>A paragraph.</span> -<span id="cb91-7"><a href="#cb91-7" aria-hidden="true"></a>```</span> -<span id="cb91-8"><a href="#cb91-8" aria-hidden="true"></a>A code fence.</span> -<span id="cb91-9"><a href="#cb91-9" aria-hidden="true"></a>```</span> -<span id="cb91-10"><a href="#cb91-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb91-11"><a href="#cb91-11" aria-hidden="true"></a></span> -<span id="cb91-12"><a href="#cb91-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeCodeFence}</span> -<span id="cb91-13"><a href="#cb91-13" aria-hidden="true"></a>A paragraph.</span> -<span id="cb91-14"><a href="#cb91-14" aria-hidden="true"></a>```</span> -<span id="cb91-15"><a href="#cb91-15" aria-hidden="true"></a>Not a code fence.</span> -<span id="cb91-16"><a href="#cb91-16" aria-hidden="true"></a>```</span> -<span id="cb91-17"><a href="#cb91-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb91-18"><a href="#cb91-18" aria-hidden="true"></a></span> -<span id="cb91-19"><a href="#cb91-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="cb92"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb92-1"><a href="#cb92-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-3" class="unnumbered"><span class="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="cb91"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb91-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb91-2" data-line-number="2"><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb91-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb91-4" data-line-number="4"></a> +<a class="sourceLine" id="cb91-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb91-6" data-line-number="6">A paragraph.</a> +<a class="sourceLine" id="cb91-7" data-line-number="7">```</a> +<a class="sourceLine" id="cb91-8" data-line-number="8">A code fence.</a> +<a class="sourceLine" id="cb91-9" data-line-number="9">```</a> +<a class="sourceLine" id="cb91-10" data-line-number="10"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb91-11" data-line-number="11"></a> +<a class="sourceLine" id="cb91-12" data-line-number="12"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeCodeFence}</a> +<a class="sourceLine" id="cb91-13" data-line-number="13">A paragraph.</a> +<a class="sourceLine" id="cb91-14" data-line-number="14">```</a> +<a class="sourceLine" id="cb91-15" data-line-number="15">Not a code fence.</a> +<a class="sourceLine" id="cb91-16" data-line-number="16">```</a> +<a class="sourceLine" id="cb91-17" data-line-number="17"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb91-18" data-line-number="18"></a> +<a class="sourceLine" id="cb91-19" data-line-number="19"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb92"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb92-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> <pre><code>A code fence.</code></pre> <p>A paragraph. <code>Not a code fence.</code></p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-3">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb94"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb94-1"><a href="#cb94-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb94-2"><a href="#cb94-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFencedCode</span>{true}</span> -<span id="cb94-3"><a href="#cb94-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb94-4"><a href="#cb94-4" aria-hidden="true"></a></span> -<span id="cb94-5"><a href="#cb94-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb94-6"><a href="#cb94-6" aria-hidden="true"></a>A paragraph.</span> -<span id="cb94-7"><a href="#cb94-7" aria-hidden="true"></a>```</span> -<span id="cb94-8"><a href="#cb94-8" aria-hidden="true"></a>A code fence.</span> -<span id="cb94-9"><a href="#cb94-9" aria-hidden="true"></a>```</span> -<span id="cb94-10"><a href="#cb94-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb94-11"><a href="#cb94-11" aria-hidden="true"></a></span> -<span id="cb94-12"><a href="#cb94-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionBlankBeforeCodeFence</span>{true}</span> -<span id="cb94-13"><a href="#cb94-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb94-14"><a href="#cb94-14" aria-hidden="true"></a>A paragraph.</span> -<span id="cb94-15"><a href="#cb94-15" aria-hidden="true"></a>```</span> -<span id="cb94-16"><a href="#cb94-16" aria-hidden="true"></a>Not a code fence.</span> -<span id="cb94-17"><a href="#cb94-17" aria-hidden="true"></a>```</span> -<span id="cb94-18"><a href="#cb94-18" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb94-19"><a href="#cb94-19" aria-hidden="true"></a></span> -<span id="cb94-20"><a href="#cb94-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="cb95"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb95-1"><a href="#cb95-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-3" class="unnumbered">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb94"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb94-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb94-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFencedCode{true}</a> +<a class="sourceLine" id="cb94-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb94-4" data-line-number="4"></a> +<a class="sourceLine" id="cb94-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb94-6" data-line-number="6">A paragraph.</a> +<a class="sourceLine" id="cb94-7" data-line-number="7">```</a> +<a class="sourceLine" id="cb94-8" data-line-number="8">A code fence.</a> +<a class="sourceLine" id="cb94-9" data-line-number="9">```</a> +<a class="sourceLine" id="cb94-10" data-line-number="10"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb94-11" data-line-number="11"></a> +<a class="sourceLine" id="cb94-12" data-line-number="12"><span class="fu">\def</span>\markdownOptionBlankBeforeCodeFence{true}</a> +<a class="sourceLine" id="cb94-13" data-line-number="13"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb94-14" data-line-number="14">A paragraph.</a> +<a class="sourceLine" id="cb94-15" data-line-number="15">```</a> +<a class="sourceLine" id="cb94-16" data-line-number="16">Not a code fence.</a> +<a class="sourceLine" id="cb94-17" data-line-number="17">```</a> +<a class="sourceLine" id="cb94-18" data-line-number="18"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb94-19" data-line-number="19"></a> +<a class="sourceLine" id="cb94-20" data-line-number="20"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb95"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb95-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> <pre><code>A code fence.</code></pre> <p>A paragraph. <code>Not a code fence.</code></p> </blockquote> -<h4 data-number="2.2.1.5" id="option-blankbeforeheading"><span class="header-section-number">2.2.1.5</span> Option <code>blankBeforeHeading</code></h4> +<h4 id="option-blankbeforeheading"><span class="header-section-number">2.2.1.5</span> Option <code>blankBeforeHeading</code></h4> <dl> <dt><code>blankBeforeHeading</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -909,51 +906,51 @@ </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-4">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb97"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb97-1"><a href="#cb97-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb97-2"><a href="#cb97-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb97-3"><a href="#cb97-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bf</span> #1}<span class="fu">\par</span>}</span> -<span id="cb97-4"><a href="#cb97-4" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb97-5"><a href="#cb97-5" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb97-6"><a href="#cb97-6" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb97-7"><a href="#cb97-7" aria-hidden="true"></a> local convert, input</span> -<span id="cb97-8"><a href="#cb97-8" aria-hidden="true"></a></span> -<span id="cb97-9"><a href="#cb97-9" aria-hidden="true"></a> convert = markdown.new()</span> -<span id="cb97-10"><a href="#cb97-10" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb97-11"><a href="#cb97-11" aria-hidden="true"></a> "A heading." .. newline ..</span> -<span id="cb97-12"><a href="#cb97-12" aria-hidden="true"></a> "==========" .. newline</span> -<span id="cb97-13"><a href="#cb97-13" aria-hidden="true"></a> tex.sprint(convert(input))</span> -<span id="cb97-14"><a href="#cb97-14" aria-hidden="true"></a></span> -<span id="cb97-15"><a href="#cb97-15" aria-hidden="true"></a> convert = markdown.new({blankBeforeHeading = true})</span> -<span id="cb97-16"><a href="#cb97-16" aria-hidden="true"></a> input = "A paragraph." .. newline ..</span> -<span id="cb97-17"><a href="#cb97-17" aria-hidden="true"></a> "Not a heading." .. newline ..</span> -<span id="cb97-18"><a href="#cb97-18" aria-hidden="true"></a> "==============" .. newline</span> -<span id="cb97-19"><a href="#cb97-19" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb97-20"><a href="#cb97-20" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="lua-module-example-4" class="unnumbered">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="cb97"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb97-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb97-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb97-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererHeadingOne#1{{\bf #1}\par}</a> +<a class="sourceLine" id="cb97-4" data-line-number="4"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb97-5" data-line-number="5"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb97-6" data-line-number="6"> local newline = [[^^J^^J]]</a> +<a class="sourceLine" id="cb97-7" data-line-number="7"> local convert, input</a> +<a class="sourceLine" id="cb97-8" data-line-number="8"></a> +<a class="sourceLine" id="cb97-9" data-line-number="9"> convert = markdown.new()</a> +<a class="sourceLine" id="cb97-10" data-line-number="10"> input = "A paragraph." .. newline ..</a> +<a class="sourceLine" id="cb97-11" data-line-number="11"> "A heading." .. newline ..</a> +<a class="sourceLine" id="cb97-12" data-line-number="12"> "==========" .. newline</a> +<a class="sourceLine" id="cb97-13" data-line-number="13"> tex.sprint(convert(input))</a> +<a class="sourceLine" id="cb97-14" data-line-number="14"></a> +<a class="sourceLine" id="cb97-15" data-line-number="15"> convert = markdown.new({blankBeforeHeading = true})</a> +<a class="sourceLine" id="cb97-16" data-line-number="16"> input = "A paragraph." .. newline ..</a> +<a class="sourceLine" id="cb97-17" data-line-number="17"> "Not a heading." .. newline ..</a> +<a class="sourceLine" id="cb97-18" data-line-number="18"> "==============" .. newline</a> +<a class="sourceLine" id="cb97-19" data-line-number="19"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb97-20" data-line-number="20"><span class="fu">\bye</span></a></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb98"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb98-1"><a href="#cb98-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb98"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb98-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> <h1 id="a-heading.">A heading.</h1> <p>A paragraph. Not a heading. ==============</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-4">Lua CLI Example</h5> +<h5 id="lua-cli-example-4" class="unnumbered">Lua CLI Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb99"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb99-1"><a href="#cb99-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb99-2"><a href="#cb99-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb99-3"><a href="#cb99-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb99-4"><a href="#cb99-4" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb99-5"><a href="#cb99-5" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb99"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb99-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb99-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb99-3" data-line-number="3"><span class="fu">\input</span> optionfalse</a> +<a class="sourceLine" id="cb99-4" data-line-number="4"><span class="fu">\input</span> optiontrue</a> +<a class="sourceLine" id="cb99-5" data-line-number="5"><span class="fu">\bye</span></a></code></pre></div> <p>Using a text editor, create a text document named <code>content.md</code> with the following content:</p> -<div class="sourceCode" id="cb100"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb100-1"><a href="#cb100-1" aria-hidden="true"></a>A paragraph.</span> -<span id="cb100-2"><a href="#cb100-2" aria-hidden="true"></a>A heading?</span> -<span id="cb100-3"><a href="#cb100-3" aria-hidden="true"></a><span class="fu">==========</span></span></code></pre></div> +<div class="sourceCode" id="cb100"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb100-1" data-line-number="1">A paragraph.</a> +<a class="sourceLine" id="cb100-2" data-line-number="2">A heading?</a> +<a class="sourceLine" id="cb100-3" data-line-number="3">==========</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb101"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb101-1"><a href="#cb101-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb101-2"><a href="#cb101-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ blankBeforeHeading=true -- content.md optiontrue.tex</span> -<span id="cb101-3"><a href="#cb101-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb101"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb101-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</a> +<a class="sourceLine" id="cb101-2" data-line-number="2"><span class="ex">texlua</span> ⟨CLI pathname⟩ blankBeforeHeading=true -- content.md optiontrue.tex</a> +<a class="sourceLine" id="cb101-3" data-line-number="3"><span class="ex">luatex</span> document.tex</a></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> @@ -961,87 +958,87 @@ <h1 id="a-heading">A heading?</h1> <p>A paragraph. A heading? ==========</p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-4">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb102"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb102-1"><a href="#cb102-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb102-2"><a href="#cb102-2" aria-hidden="true"></a></span> -<span id="cb102-3"><a href="#cb102-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb102-4"><a href="#cb102-4" aria-hidden="true"></a>A paragraph.</span> -<span id="cb102-5"><a href="#cb102-5" aria-hidden="true"></a>A heading.</span> -<span id="cb102-6"><a href="#cb102-6" aria-hidden="true"></a>==========</span> -<span id="cb102-7"><a href="#cb102-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb102-8"><a href="#cb102-8" aria-hidden="true"></a></span> -<span id="cb102-9"><a href="#cb102-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionBlankBeforeHeading</span>{true}</span> -<span id="cb102-10"><a href="#cb102-10" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb102-11"><a href="#cb102-11" aria-hidden="true"></a>A paragraph.</span> -<span id="cb102-12"><a href="#cb102-12" aria-hidden="true"></a>Not a heading.</span> -<span id="cb102-13"><a href="#cb102-13" aria-hidden="true"></a>==============</span> -<span id="cb102-14"><a href="#cb102-14" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb102-15"><a href="#cb102-15" aria-hidden="true"></a></span> -<span id="cb102-16"><a href="#cb102-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="cb103"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb103-1"><a href="#cb103-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-4" class="unnumbered">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="cb102"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb102-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb102-2" data-line-number="2"></a> +<a class="sourceLine" id="cb102-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb102-4" data-line-number="4">A paragraph.</a> +<a class="sourceLine" id="cb102-5" data-line-number="5">A heading.</a> +<a class="sourceLine" id="cb102-6" data-line-number="6">==========</a> +<a class="sourceLine" id="cb102-7" data-line-number="7"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb102-8" data-line-number="8"></a> +<a class="sourceLine" id="cb102-9" data-line-number="9"><span class="fu">\def</span>\markdownOptionBlankBeforeHeading{true}</a> +<a class="sourceLine" id="cb102-10" data-line-number="10"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb102-11" data-line-number="11">A paragraph.</a> +<a class="sourceLine" id="cb102-12" data-line-number="12">Not a heading.</a> +<a class="sourceLine" id="cb102-13" data-line-number="13">==============</a> +<a class="sourceLine" id="cb102-14" data-line-number="14"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb102-15" data-line-number="15"></a> +<a class="sourceLine" id="cb102-16" data-line-number="16"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb103"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb103-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> <h1 id="a-heading.-1">A heading.</h1> <p>A paragraph. Not a heading. ==============</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-4"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb104"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb104-1"><a href="#cb104-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb104-2"><a href="#cb104-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb104-3"><a href="#cb104-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb104-4"><a href="#cb104-4" aria-hidden="true"></a></span> -<span id="cb104-5"><a href="#cb104-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb104-6"><a href="#cb104-6" aria-hidden="true"></a>A paragraph.</span> -<span id="cb104-7"><a href="#cb104-7" aria-hidden="true"></a>A heading.</span> -<span id="cb104-8"><a href="#cb104-8" aria-hidden="true"></a>==========</span> -<span id="cb104-9"><a href="#cb104-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb104-10"><a href="#cb104-10" aria-hidden="true"></a></span> -<span id="cb104-11"><a href="#cb104-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeHeading}</span> -<span id="cb104-12"><a href="#cb104-12" aria-hidden="true"></a>A paragraph.</span> -<span id="cb104-13"><a href="#cb104-13" aria-hidden="true"></a>Not a heading.</span> -<span id="cb104-14"><a href="#cb104-14" aria-hidden="true"></a>==============</span> -<span id="cb104-15"><a href="#cb104-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb104-16"><a href="#cb104-16" aria-hidden="true"></a></span> -<span id="cb104-17"><a href="#cb104-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="cb105"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb105-1"><a href="#cb105-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-4" class="unnumbered"><span class="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="cb104"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb104-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb104-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb104-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb104-4" data-line-number="4"></a> +<a class="sourceLine" id="cb104-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb104-6" data-line-number="6">A paragraph.</a> +<a class="sourceLine" id="cb104-7" data-line-number="7">A heading.</a> +<a class="sourceLine" id="cb104-8" data-line-number="8">==========</a> +<a class="sourceLine" id="cb104-9" data-line-number="9"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb104-10" data-line-number="10"></a> +<a class="sourceLine" id="cb104-11" data-line-number="11"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{blankBeforeHeading}</a> +<a class="sourceLine" id="cb104-12" data-line-number="12">A paragraph.</a> +<a class="sourceLine" id="cb104-13" data-line-number="13">Not a heading.</a> +<a class="sourceLine" id="cb104-14" data-line-number="14">==============</a> +<a class="sourceLine" id="cb104-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb104-16" data-line-number="16"></a> +<a class="sourceLine" id="cb104-17" data-line-number="17"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb105"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb105-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> <h1 id="a-heading.-2">A heading.</h1> <p>A paragraph. Not a heading. ==============</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-4">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb106"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb106-1"><a href="#cb106-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb106-2"><a href="#cb106-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb106-3"><a href="#cb106-3" aria-hidden="true"></a></span> -<span id="cb106-4"><a href="#cb106-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb106-5"><a href="#cb106-5" aria-hidden="true"></a>A paragraph.</span> -<span id="cb106-6"><a href="#cb106-6" aria-hidden="true"></a>A heading.</span> -<span id="cb106-7"><a href="#cb106-7" aria-hidden="true"></a>==========</span> -<span id="cb106-8"><a href="#cb106-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb106-9"><a href="#cb106-9" aria-hidden="true"></a></span> -<span id="cb106-10"><a href="#cb106-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionBlankBeforeHeading</span>{true}</span> -<span id="cb106-11"><a href="#cb106-11" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb106-12"><a href="#cb106-12" aria-hidden="true"></a>A paragraph.</span> -<span id="cb106-13"><a href="#cb106-13" aria-hidden="true"></a>Not a heading.</span> -<span id="cb106-14"><a href="#cb106-14" aria-hidden="true"></a>==============</span> -<span id="cb106-15"><a href="#cb106-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb106-16"><a href="#cb106-16" aria-hidden="true"></a></span> -<span id="cb106-17"><a href="#cb106-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="cb107"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb107-1"><a href="#cb107-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-4" class="unnumbered">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="cb106"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb106-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb106-2" data-line-number="2"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb106-3" data-line-number="3"></a> +<a class="sourceLine" id="cb106-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb106-5" data-line-number="5">A paragraph.</a> +<a class="sourceLine" id="cb106-6" data-line-number="6">A heading.</a> +<a class="sourceLine" id="cb106-7" data-line-number="7">==========</a> +<a class="sourceLine" id="cb106-8" data-line-number="8"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb106-9" data-line-number="9"></a> +<a class="sourceLine" id="cb106-10" data-line-number="10"><span class="fu">\def</span>\markdownOptionBlankBeforeHeading{true}</a> +<a class="sourceLine" id="cb106-11" data-line-number="11"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb106-12" data-line-number="12">A paragraph.</a> +<a class="sourceLine" id="cb106-13" data-line-number="13">Not a heading.</a> +<a class="sourceLine" id="cb106-14" data-line-number="14">==============</a> +<a class="sourceLine" id="cb106-15" data-line-number="15"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb106-16" data-line-number="16"></a> +<a class="sourceLine" id="cb106-17" data-line-number="17"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb107"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb107-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>A paragraph.</p> <h1 id="a-heading.-3">A heading.</h1> <p>A paragraph. Not a heading. ==============</p> </blockquote> -<h4 data-number="2.2.1.6" id="option-breakableblockquotes"><span class="header-section-number">2.2.1.6</span> Option <code>breakableBlockquotes</code></h4> +<h4 id="option-breakableblockquotes"><span class="header-section-number">2.2.1.6</span> Option <code>breakableBlockquotes</code></h4> <dl> <dt><code>breakableBlockquotes</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -1054,28 +1051,28 @@ </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-5">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb108"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb108-1"><a href="#cb108-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb108-2"><a href="#cb108-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb108-3"><a href="#cb108-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>#1{{<span class="fu">\bf</span> #1}<span class="fu">\par</span>}</span> -<span id="cb108-4"><a href="#cb108-4" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb108-5"><a href="#cb108-5" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb108-6"><a href="#cb108-6" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb108-7"><a href="#cb108-7" aria-hidden="true"></a> local convert, input</span> -<span id="cb108-8"><a href="#cb108-8" aria-hidden="true"></a></span> -<span id="cb108-9"><a href="#cb108-9" aria-hidden="true"></a> convert = markdown.new()</span> -<span id="cb108-10"><a href="#cb108-10" aria-hidden="true"></a> input = "> A single" .. newline .. newline ..</span> -<span id="cb108-11"><a href="#cb108-11" aria-hidden="true"></a> "> block quote." .. newline</span> -<span id="cb108-12"><a href="#cb108-12" aria-hidden="true"></a> tex.sprint(convert(input))</span> -<span id="cb108-13"><a href="#cb108-13" aria-hidden="true"></a></span> -<span id="cb108-14"><a href="#cb108-14" aria-hidden="true"></a> convert = markdown.new({breakableBlockquotes = true})</span> -<span id="cb108-15"><a href="#cb108-15" aria-hidden="true"></a> input = "> A block quote." .. newline .. newline ..</span> -<span id="cb108-16"><a href="#cb108-16" aria-hidden="true"></a> "> Another block quote." .. newline</span> -<span id="cb108-17"><a href="#cb108-17" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb108-18"><a href="#cb108-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="lua-module-example-5" class="unnumbered">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="cb108"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb108-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb108-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb108-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererHeadingOne#1{{\bf #1}\par}</a> +<a class="sourceLine" id="cb108-4" data-line-number="4"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb108-5" data-line-number="5"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb108-6" data-line-number="6"> local newline = [[^^J^^J]]</a> +<a class="sourceLine" id="cb108-7" data-line-number="7"> local convert, input</a> +<a class="sourceLine" id="cb108-8" data-line-number="8"></a> +<a class="sourceLine" id="cb108-9" data-line-number="9"> convert = markdown.new()</a> +<a class="sourceLine" id="cb108-10" data-line-number="10"> input = "> A single" .. newline .. newline ..</a> +<a class="sourceLine" id="cb108-11" data-line-number="11"> "> block quote." .. newline</a> +<a class="sourceLine" id="cb108-12" data-line-number="12"> tex.sprint(convert(input))</a> +<a class="sourceLine" id="cb108-13" data-line-number="13"></a> +<a class="sourceLine" id="cb108-14" data-line-number="14"> convert = markdown.new({breakableBlockquotes = true})</a> +<a class="sourceLine" id="cb108-15" data-line-number="15"> input = "> A block quote." .. newline .. newline ..</a> +<a class="sourceLine" id="cb108-16" data-line-number="16"> "> Another block quote." .. newline</a> +<a class="sourceLine" id="cb108-17" data-line-number="17"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb108-18" data-line-number="18"><span class="fu">\bye</span></a></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb109"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb109-1"><a href="#cb109-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb109"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb109-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <blockquote> @@ -1088,21 +1085,21 @@ <p>Another block quote.</p> </blockquote> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-5">Lua CLI Example</h5> +<h5 id="lua-cli-example-5" class="unnumbered">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="cb110"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb110-1"><a href="#cb110-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb110-2"><a href="#cb110-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb110-3"><a href="#cb110-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb110-4"><a href="#cb110-4" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb110-5"><a href="#cb110-5" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb110"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb110-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb110-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb110-3" data-line-number="3"><span class="fu">\input</span> optionfalse</a> +<a class="sourceLine" id="cb110-4" data-line-number="4"><span class="fu">\input</span> optiontrue</a> +<a class="sourceLine" id="cb110-5" data-line-number="5"><span class="fu">\bye</span></a></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="cb111"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb111-1"><a href="#cb111-1" aria-hidden="true"></a><span class="at">> A single block quote</span></span> -<span id="cb111-2"><a href="#cb111-2" aria-hidden="true"></a></span> -<span id="cb111-3"><a href="#cb111-3" aria-hidden="true"></a><span class="at">> or two block quotes?</span></span></code></pre></div> +<div class="sourceCode" id="cb111"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb111-1" data-line-number="1">><span class="dt"> A single block quote</span></a> +<a class="sourceLine" id="cb111-2" data-line-number="2"></a> +<a class="sourceLine" id="cb111-3" data-line-number="3">><span class="dt"> or two block quotes?</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb112"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb112-1"><a href="#cb112-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb112-2"><a href="#cb112-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ breakableBlockquotes=true -- content.md optiontrue.tex</span> -<span id="cb112-3"><a href="#cb112-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb112"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb112-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</a> +<a class="sourceLine" id="cb112-2" data-line-number="2"><span class="ex">texlua</span> ⟨CLI pathname⟩ breakableBlockquotes=true -- content.md optiontrue.tex</a> +<a class="sourceLine" id="cb112-3" data-line-number="3"><span class="ex">luatex</span> document.tex</a></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> @@ -1116,26 +1113,26 @@ <p>or two block quotes?</p> </blockquote> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-5">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb113"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb113-1"><a href="#cb113-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb113-2"><a href="#cb113-2" aria-hidden="true"></a></span> -<span id="cb113-3"><a href="#cb113-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb113-4"><a href="#cb113-4" aria-hidden="true"></a>> A single</span> -<span id="cb113-5"><a href="#cb113-5" aria-hidden="true"></a></span> -<span id="cb113-6"><a href="#cb113-6" aria-hidden="true"></a>> block quote.</span> -<span id="cb113-7"><a href="#cb113-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb113-8"><a href="#cb113-8" aria-hidden="true"></a></span> -<span id="cb113-9"><a href="#cb113-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionBreakableBlockquotes</span>{true}</span> -<span id="cb113-10"><a href="#cb113-10" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb113-11"><a href="#cb113-11" aria-hidden="true"></a>> A block quote.</span> -<span id="cb113-12"><a href="#cb113-12" aria-hidden="true"></a></span> -<span id="cb113-13"><a href="#cb113-13" aria-hidden="true"></a>> Another block quote.</span> -<span id="cb113-14"><a href="#cb113-14" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb113-15"><a href="#cb113-15" aria-hidden="true"></a></span> -<span id="cb113-16"><a href="#cb113-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="cb114"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb114-1"><a href="#cb114-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-5" class="unnumbered">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="cb113"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb113-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb113-2" data-line-number="2"></a> +<a class="sourceLine" id="cb113-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb113-4" data-line-number="4">> A single</a> +<a class="sourceLine" id="cb113-5" data-line-number="5"></a> +<a class="sourceLine" id="cb113-6" data-line-number="6">> block quote.</a> +<a class="sourceLine" id="cb113-7" data-line-number="7"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb113-8" data-line-number="8"></a> +<a class="sourceLine" id="cb113-9" data-line-number="9"><span class="fu">\def</span>\markdownOptionBreakableBlockquotes{true}</a> +<a class="sourceLine" id="cb113-10" data-line-number="10"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb113-11" data-line-number="11">> A block quote.</a> +<a class="sourceLine" id="cb113-12" data-line-number="12"></a> +<a class="sourceLine" id="cb113-13" data-line-number="13">> Another block quote.</a> +<a class="sourceLine" id="cb113-14" data-line-number="14"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb113-15" data-line-number="15"></a> +<a class="sourceLine" id="cb113-16" data-line-number="16"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb114"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb114-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <blockquote> @@ -1148,27 +1145,27 @@ <p>Another block quote.</p> </blockquote> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-5"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb115"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb115-1"><a href="#cb115-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb115-2"><a href="#cb115-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb115-3"><a href="#cb115-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb115-4"><a href="#cb115-4" aria-hidden="true"></a></span> -<span id="cb115-5"><a href="#cb115-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb115-6"><a href="#cb115-6" aria-hidden="true"></a>> A single</span> -<span id="cb115-7"><a href="#cb115-7" aria-hidden="true"></a></span> -<span id="cb115-8"><a href="#cb115-8" aria-hidden="true"></a>> block quote.</span> -<span id="cb115-9"><a href="#cb115-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb115-10"><a href="#cb115-10" aria-hidden="true"></a></span> -<span id="cb115-11"><a href="#cb115-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{breakableBlockquotes}</span> -<span id="cb115-12"><a href="#cb115-12" aria-hidden="true"></a>> A block quote.</span> -<span id="cb115-13"><a href="#cb115-13" aria-hidden="true"></a></span> -<span id="cb115-14"><a href="#cb115-14" aria-hidden="true"></a>> Another block quote.</span> -<span id="cb115-15"><a href="#cb115-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb115-16"><a href="#cb115-16" aria-hidden="true"></a></span> -<span id="cb115-17"><a href="#cb115-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="cb116"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb116-1"><a href="#cb116-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-5" class="unnumbered"><span class="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="cb115"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb115-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb115-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb115-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb115-4" data-line-number="4"></a> +<a class="sourceLine" id="cb115-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb115-6" data-line-number="6">> A single</a> +<a class="sourceLine" id="cb115-7" data-line-number="7"></a> +<a class="sourceLine" id="cb115-8" data-line-number="8">> block quote.</a> +<a class="sourceLine" id="cb115-9" data-line-number="9"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb115-10" data-line-number="10"></a> +<a class="sourceLine" id="cb115-11" data-line-number="11"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{breakableBlockquotes}</a> +<a class="sourceLine" id="cb115-12" data-line-number="12">> A block quote.</a> +<a class="sourceLine" id="cb115-13" data-line-number="13"></a> +<a class="sourceLine" id="cb115-14" data-line-number="14">> Another block quote.</a> +<a class="sourceLine" id="cb115-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb115-16" data-line-number="16"></a> +<a class="sourceLine" id="cb115-17" data-line-number="17"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb116"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb116-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <blockquote> @@ -1181,27 +1178,27 @@ <p>Another block quote.</p> </blockquote> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-5">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb117"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb117-1"><a href="#cb117-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb117-2"><a href="#cb117-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb117-3"><a href="#cb117-3" aria-hidden="true"></a></span> -<span id="cb117-4"><a href="#cb117-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb117-5"><a href="#cb117-5" aria-hidden="true"></a>> A single</span> -<span id="cb117-6"><a href="#cb117-6" aria-hidden="true"></a></span> -<span id="cb117-7"><a href="#cb117-7" aria-hidden="true"></a>> block quote.</span> -<span id="cb117-8"><a href="#cb117-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb117-9"><a href="#cb117-9" aria-hidden="true"></a></span> -<span id="cb117-10"><a href="#cb117-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionBreakableBlockquotes</span>{true}</span> -<span id="cb117-11"><a href="#cb117-11" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb117-12"><a href="#cb117-12" aria-hidden="true"></a>> A block quote.</span> -<span id="cb117-13"><a href="#cb117-13" aria-hidden="true"></a></span> -<span id="cb117-14"><a href="#cb117-14" aria-hidden="true"></a>> Another block quote.</span> -<span id="cb117-15"><a href="#cb117-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb117-16"><a href="#cb117-16" aria-hidden="true"></a></span> -<span id="cb117-17"><a href="#cb117-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="cb118"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb118-1"><a href="#cb118-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-5" class="unnumbered">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="cb117"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb117-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb117-2" data-line-number="2"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb117-3" data-line-number="3"></a> +<a class="sourceLine" id="cb117-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb117-5" data-line-number="5">> A single</a> +<a class="sourceLine" id="cb117-6" data-line-number="6"></a> +<a class="sourceLine" id="cb117-7" data-line-number="7">> block quote.</a> +<a class="sourceLine" id="cb117-8" data-line-number="8"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb117-9" data-line-number="9"></a> +<a class="sourceLine" id="cb117-10" data-line-number="10"><span class="fu">\def</span>\markdownOptionBreakableBlockquotes{true}</a> +<a class="sourceLine" id="cb117-11" data-line-number="11"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb117-12" data-line-number="12">> A block quote.</a> +<a class="sourceLine" id="cb117-13" data-line-number="13"></a> +<a class="sourceLine" id="cb117-14" data-line-number="14">> Another block quote.</a> +<a class="sourceLine" id="cb117-15" data-line-number="15"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb117-16" data-line-number="16"></a> +<a class="sourceLine" id="cb117-17" data-line-number="17"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb118"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb118-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <blockquote> @@ -1214,7 +1211,7 @@ <p>Another block quote.</p> </blockquote> </blockquote> -<h4 data-number="2.2.1.7" id="option-citationnbsps"><span class="header-section-number">2.2.1.7</span> Option <code>citationNbsps</code></h4> +<h4 id="option-citationnbsps"><span class="header-section-number">2.2.1.7</span> Option <code>citationNbsps</code></h4> <dl> <dt><code>citationNbsps</code> (default value: <code>true</code>)</dt> <dd><dl> @@ -1227,35 +1224,35 @@ </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-6"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 id="latex-example-6" class="unnumbered"><span class="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="cb119"><pre class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb119-1"><a href="#cb119-1" aria-hidden="true"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> -<span id="cb119-2"><a href="#cb119-2" aria-hidden="true"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> -<span id="cb119-3"><a href="#cb119-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="cb119-4"><a href="#cb119-4" aria-hidden="true"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> -<span id="cb119-5"><a href="#cb119-5" aria-hidden="true"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> -<span id="cb119-6"><a href="#cb119-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="cb120"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb120-1"><a href="#cb120-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb120-2"><a href="#cb120-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb120-3"><a href="#cb120-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb120-4"><a href="#cb120-4" aria-hidden="true"></a></span> -<span id="cb120-5"><a href="#cb120-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb120-6"><a href="#cb120-6" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> -<span id="cb120-7"><a href="#cb120-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb120-8"><a href="#cb120-8" aria-hidden="true"></a></span> -<span id="cb120-9"><a href="#cb120-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{citationNbsps = false}</span> -<span id="cb120-10"><a href="#cb120-10" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> -<span id="cb120-11"><a href="#cb120-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb120-12"><a href="#cb120-12" aria-hidden="true"></a></span> -<span id="cb120-13"><a href="#cb120-13" aria-hidden="true"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span> -<span id="cb120-14"><a href="#cb120-14" aria-hidden="true"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span> -<span id="cb120-15"><a href="#cb120-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb119"><pre class="sourceCode bib"><code class="sourceCode bibtex"><a class="sourceLine" id="cb119-1" data-line-number="1"><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</a> +<a class="sourceLine" id="cb119-2" data-line-number="2"> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</a> +<a class="sourceLine" id="cb119-3" data-line-number="3"> <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>",</a> +<a class="sourceLine" id="cb119-4" data-line-number="4"> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</a> +<a class="sourceLine" id="cb119-5" data-line-number="5"> <span class="dt">year</span> = "<span class="st">1984</span>"</a> +<a class="sourceLine" id="cb119-6" data-line-number="6">}</a></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="cb120"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb120-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb120-2" data-line-number="2"><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb120-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb120-4" data-line-number="4"></a> +<a class="sourceLine" id="cb120-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb120-6" data-line-number="6">The TeXbook [@knuth:tex, p. 123 and 130] is good.</a> +<a class="sourceLine" id="cb120-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb120-8" data-line-number="8"></a> +<a class="sourceLine" id="cb120-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{citationNbsps = false}</a> +<a class="sourceLine" id="cb120-10" data-line-number="10">The TeXbook [@knuth:tex, p. 123 and 130] is good.</a> +<a class="sourceLine" id="cb120-11" data-line-number="11"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb120-12" data-line-number="12"></a> +<a class="sourceLine" id="cb120-13" data-line-number="13"><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</a> +<a class="sourceLine" id="cb120-14" data-line-number="14"><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</a> +<a class="sourceLine" id="cb120-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> <p>Next, invoke LuaTeX and BibTeX from the terminal:</p> -<div class="sourceCode" id="cb121"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb121-1"><a href="#cb121-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb121-2"><a href="#cb121-2" aria-hidden="true"></a><span class="ex">bibtex</span> document.aux</span> -<span id="cb121-3"><a href="#cb121-3" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb121-4"><a href="#cb121-4" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb121"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb121-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a> +<a class="sourceLine" id="cb121-2" data-line-number="2"><span class="ex">bibtex</span> document.aux</a> +<a class="sourceLine" id="cb121-3" data-line-number="3"><span class="ex">lualatex</span> document.tex</a> +<a class="sourceLine" id="cb121-4" data-line-number="4"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, where the middot (<code>·</code>) denotes a non-breaking space:</p> <blockquote> <p>The TeXbook [1, p.·123·and·130] is good.</p> @@ -1263,25 +1260,25 @@ <h3 id="references">References</h3> <p>[1] Donald·Ervin Knuth. <em>The TeXbook, volume A of Computers and typesetting.</em> Addison-Wesley, 1984.</p> </blockquote> -<h4 data-number="2.2.1.8" id="option-citations"><span class="header-section-number">2.2.1.8</span> Option <code>citations</code></h4> +<h4 id="option-citations"><span class="header-section-number">2.2.1.8</span> Option <code>citations</code></h4> <dl> <dt><code>citations</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the pandoc citation syntax extension:</p> -<div class="sourceCode" id="cb122"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb122-1"><a href="#cb122-1" aria-hidden="true"></a>Here is a simple parenthetical citation <span class="co">[</span><span class="ot">@doe99</span><span class="co">]</span> and here</span> -<span id="cb122-2"><a href="#cb122-2" aria-hidden="true"></a>is a string of several [see @doe99, pp. 33-35; also</span> -<span id="cb122-3"><a href="#cb122-3" aria-hidden="true"></a>@smith04, chap. 1].</span> -<span id="cb122-4"><a href="#cb122-4" aria-hidden="true"></a></span> -<span id="cb122-5"><a href="#cb122-5" aria-hidden="true"></a>A parenthetical citation can have a <span class="co">[</span><span class="ot">prenote @doe99</span><span class="co">]</span> and</span> -<span id="cb122-6"><a href="#cb122-6" aria-hidden="true"></a>a <span class="co">[</span><span class="ot">@smith04 postnote</span><span class="co">]</span>. The name of the author can be</span> -<span id="cb122-7"><a href="#cb122-7" aria-hidden="true"></a>suppressed by inserting a dash before the name of an</span> -<span id="cb122-8"><a href="#cb122-8" aria-hidden="true"></a>author as follows <span class="co">[</span><span class="ot">-@smith04</span><span class="co">]</span>.</span> -<span id="cb122-9"><a href="#cb122-9" aria-hidden="true"></a></span> -<span id="cb122-10"><a href="#cb122-10" aria-hidden="true"></a>Here is a simple text citation @doe99 and here is</span> -<span id="cb122-11"><a href="#cb122-11" aria-hidden="true"></a>a string of several @doe99 [pp. 33-35; also @smith04,</span> -<span id="cb122-12"><a href="#cb122-12" aria-hidden="true"></a>chap. 1]. Here is one with the name of the author</span> -<span id="cb122-13"><a href="#cb122-13" aria-hidden="true"></a>suppressed -@doe99.</span></code></pre></div> +<div class="sourceCode" id="cb122"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb122-1" data-line-number="1">Here is a simple parenthetical citation [@doe99] and here</a> +<a class="sourceLine" id="cb122-2" data-line-number="2">is a string of several [see @doe99, pp. 33-35; also</a> +<a class="sourceLine" id="cb122-3" data-line-number="3">@smith04, chap. 1].</a> +<a class="sourceLine" id="cb122-4" data-line-number="4"></a> +<a class="sourceLine" id="cb122-5" data-line-number="5">A parenthetical citation can have a [prenote @doe99] and</a> +<a class="sourceLine" id="cb122-6" data-line-number="6">a [@smith04 postnote]. The name of the author can be</a> +<a class="sourceLine" id="cb122-7" data-line-number="7">suppressed by inserting a dash before the name of an</a> +<a class="sourceLine" id="cb122-8" data-line-number="8">author as follows [-@smith04].</a> +<a class="sourceLine" id="cb122-9" data-line-number="9"></a> +<a class="sourceLine" id="cb122-10" data-line-number="10">Here is a simple text citation @doe99 and here is</a> +<a class="sourceLine" id="cb122-11" data-line-number="11">a string of several @doe99 [pp. 33-35; also @smith04,</a> +<a class="sourceLine" id="cb122-12" data-line-number="12">chap. 1]. Here is one with the name of the author</a> +<a class="sourceLine" id="cb122-13" data-line-number="13">suppressed -@doe99.</a></code></pre></div> </dd> </dl> </dd> @@ -1292,46 +1289,46 @@ </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-7"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 id="latex-example-7" class="unnumbered"><span class="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="cb123"><pre class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb123-1"><a href="#cb123-1" aria-hidden="true"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> -<span id="cb123-2"><a href="#cb123-2" aria-hidden="true"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> -<span id="cb123-3"><a href="#cb123-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="cb123-4"><a href="#cb123-4" aria-hidden="true"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> -<span id="cb123-5"><a href="#cb123-5" aria-hidden="true"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> -<span id="cb123-6"><a href="#cb123-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="cb124"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb124-1"><a href="#cb124-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb124-2"><a href="#cb124-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[backend=biber]{<span class="ex">biblatex</span>}</span> -<span id="cb124-3"><a href="#cb124-3" aria-hidden="true"></a><span class="fu">\addbibresource</span>{document.bib}</span> -<span id="cb124-4"><a href="#cb124-4" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb124-5"><a href="#cb124-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb124-6"><a href="#cb124-6" aria-hidden="true"></a></span> -<span id="cb124-7"><a href="#cb124-7" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb124-8"><a href="#cb124-8" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] was written by @knuth:tex.</span> -<span id="cb124-9"><a href="#cb124-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb124-10"><a href="#cb124-10" aria-hidden="true"></a></span> -<span id="cb124-11"><a href="#cb124-11" aria-hidden="true"></a><span class="fu">\printbibliography</span></span> -<span id="cb124-12"><a href="#cb124-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb123"><pre class="sourceCode bib"><code class="sourceCode bibtex"><a class="sourceLine" id="cb123-1" data-line-number="1"><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</a> +<a class="sourceLine" id="cb123-2" data-line-number="2"> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</a> +<a class="sourceLine" id="cb123-3" data-line-number="3"> <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>",</a> +<a class="sourceLine" id="cb123-4" data-line-number="4"> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</a> +<a class="sourceLine" id="cb123-5" data-line-number="5"> <span class="dt">year</span> = "<span class="st">1984</span>"</a> +<a class="sourceLine" id="cb123-6" data-line-number="6">}</a></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="cb124"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb124-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb124-2" data-line-number="2"><span class="bu">\usepackage</span>[backend=biber]{<span class="ex">biblatex</span>}</a> +<a class="sourceLine" id="cb124-3" data-line-number="3"><span class="fu">\addbibresource</span>{document.bib}</a> +<a class="sourceLine" id="cb124-4" data-line-number="4"><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb124-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb124-6" data-line-number="6"></a> +<a class="sourceLine" id="cb124-7" data-line-number="7"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb124-8" data-line-number="8">The TeXbook [@knuth:tex, p. 123 and 130] was written by @knuth:tex.</a> +<a class="sourceLine" id="cb124-9" data-line-number="9"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb124-10" data-line-number="10"></a> +<a class="sourceLine" id="cb124-11" data-line-number="11"><span class="fu">\printbibliography</span></a> +<a class="sourceLine" id="cb124-12" data-line-number="12"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> <p>Next, invoke LuaTeX and Biber from the terminal:</p> -<div class="sourceCode" id="cb125"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb125-1"><a href="#cb125-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb125-2"><a href="#cb125-2" aria-hidden="true"></a><span class="ex">biber</span> document.bcf</span> -<span id="cb125-3"><a href="#cb125-3" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb125-4"><a href="#cb125-4" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb125"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb125-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a> +<a class="sourceLine" id="cb125-2" data-line-number="2"><span class="ex">biber</span> document.bcf</a> +<a class="sourceLine" id="cb125-3" data-line-number="3"><span class="ex">lualatex</span> document.tex</a> +<a class="sourceLine" id="cb125-4" data-line-number="4"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The TeXbook [1, p.·123 and 130] was written by Knuth [1].</p> <h3 id="references-1">References</h3> <p>[1] Donald Ervin Knuth. <em>The <span class="tex">T<sub>e</sub>X</span>book, volume A of Computers and typesetting.</em> Addison-Wesley, 1984.</p> </blockquote> -<h4 data-number="2.2.1.9" id="option-codespans"><span class="header-section-number">2.2.1.9</span> Option <code>codeSpans</code></h4> +<h4 id="option-codespans"><span class="header-section-number">2.2.1.9</span> Option <code>codeSpans</code></h4> <dl> <dt><code>codeSpans</code> (default value: <code>true</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the code span syntax:</p> -<div class="sourceCode" id="cb126"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb126-1"><a href="#cb126-1" aria-hidden="true"></a>Use the <span class="in">`printf()`</span> function.</span> -<span id="cb126-2"><a href="#cb126-2" aria-hidden="true"></a><span class="in">``There is a literal backtick (`) here.``</span></span></code></pre></div> +<div class="sourceCode" id="cb126"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb126-1" data-line-number="1">Use the <span class="bn">`printf()`</span> function.</a> +<a class="sourceLine" id="cb126-2" data-line-number="2">`<span class="bn">`There is a literal backtick (`</span>) here.``</a></code></pre></div> </dd> </dl> </dd> @@ -1343,136 +1340,136 @@ </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-6">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb128"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb128-1"><a href="#cb128-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb128-2"><a href="#cb128-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb128-3"><a href="#cb128-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb128-4"><a href="#cb128-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb128-5"><a href="#cb128-5" aria-hidden="true"></a> local convert = markdown.new()</span> -<span id="cb128-6"><a href="#cb128-6" aria-hidden="true"></a> local input =</span> -<span id="cb128-7"><a href="#cb128-7" aria-hidden="true"></a> "``This is a code span.'' " ..</span> -<span id="cb128-8"><a href="#cb128-8" aria-hidden="true"></a> "``This is no longer a code span.''"</span> -<span id="cb128-9"><a href="#cb128-9" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb128-10"><a href="#cb128-10" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb128-11"><a href="#cb128-11" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb128-12"><a href="#cb128-12" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb128-13"><a href="#cb128-13" aria-hidden="true"></a> local convert = markdown.new({codeSpans = false})</span> -<span id="cb128-14"><a href="#cb128-14" aria-hidden="true"></a> local input =</span> -<span id="cb128-15"><a href="#cb128-15" aria-hidden="true"></a> "``This is a quote.'' " ..</span> -<span id="cb128-16"><a href="#cb128-16" aria-hidden="true"></a> "``This is another quote.''"</span> -<span id="cb128-17"><a href="#cb128-17" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb128-18"><a href="#cb128-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="lua-module-example-6" class="unnumbered">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="cb128"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb128-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb128-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb128-3" data-line-number="3"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb128-4" data-line-number="4"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb128-5" data-line-number="5"> local convert = markdown.new()</a> +<a class="sourceLine" id="cb128-6" data-line-number="6"> local input =</a> +<a class="sourceLine" id="cb128-7" data-line-number="7"> "``This is a code span.'' " ..</a> +<a class="sourceLine" id="cb128-8" data-line-number="8"> "``This is no longer a code span.''"</a> +<a class="sourceLine" id="cb128-9" data-line-number="9"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb128-10" data-line-number="10"><span class="fu">\par</span></a> +<a class="sourceLine" id="cb128-11" data-line-number="11"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb128-12" data-line-number="12"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb128-13" data-line-number="13"> local convert = markdown.new({codeSpans = false})</a> +<a class="sourceLine" id="cb128-14" data-line-number="14"> local input =</a> +<a class="sourceLine" id="cb128-15" data-line-number="15"> "``This is a quote.'' " ..</a> +<a class="sourceLine" id="cb128-16" data-line-number="16"> "``This is another quote.''"</a> +<a class="sourceLine" id="cb128-17" data-line-number="17"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb128-18" data-line-number="18"><span class="fu">\bye</span></a></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb129"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb129-1"><a href="#cb129-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb129"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb129-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><code>This is a code span.''</code>This is no longer a code span.’’</p> <p>“This is a quote.” “This is another quote.”</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-6">Lua CLI Example</h5> +<h5 id="lua-cli-example-6" class="unnumbered">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="cb130"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb130-1"><a href="#cb130-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb130-2"><a href="#cb130-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb130-3"><a href="#cb130-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb130-4"><a href="#cb130-4" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb130-5"><a href="#cb130-5" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb130-6"><a href="#cb130-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb130"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb130-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb130-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb130-3" data-line-number="3"><span class="fu">\input</span> optionfalse</a> +<a class="sourceLine" id="cb130-4" data-line-number="4"><span class="fu">\par</span></a> +<a class="sourceLine" id="cb130-5" data-line-number="5"><span class="fu">\input</span> optiontrue</a> +<a class="sourceLine" id="cb130-6" data-line-number="6"><span class="fu">\bye</span></a></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="cb131"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb131-1"><a href="#cb131-1" aria-hidden="true"></a><span class="in">``Is this a code span?'' ``</span>Or a quote?''</span></code></pre></div> +<div class="sourceCode" id="cb131"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb131-1" data-line-number="1">`<span class="bn">`Is this a code span?'' `</span>`Or a quote?''</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb132"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb132-1"><a href="#cb132-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ codeSpans=false -- content.md optionfalse.tex</span> -<span id="cb132-2"><a href="#cb132-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optiontrue.tex</span> -<span id="cb132-3"><a href="#cb132-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb132"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb132-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ codeSpans=false -- content.md optionfalse.tex</a> +<a class="sourceLine" id="cb132-2" data-line-number="2"><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optiontrue.tex</a> +<a class="sourceLine" id="cb132-3" data-line-number="3"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>“Is this a code span?” “Or a quote?”</p> <p><code>Is this a code span?''</code>Or a quote?’’</p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-6">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb133"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb133-1"><a href="#cb133-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb133-2"><a href="#cb133-2" aria-hidden="true"></a></span> -<span id="cb133-3"><a href="#cb133-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb133-4"><a href="#cb133-4" aria-hidden="true"></a>``This is a code span.''</span> -<span id="cb133-5"><a href="#cb133-5" aria-hidden="true"></a>``This is no longer a code span.''</span> -<span id="cb133-6"><a href="#cb133-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb133-7"><a href="#cb133-7" aria-hidden="true"></a></span> -<span id="cb133-8"><a href="#cb133-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionCodeSpans</span>{false}</span> -<span id="cb133-9"><a href="#cb133-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb133-10"><a href="#cb133-10" aria-hidden="true"></a>``This is a quote.''</span> -<span id="cb133-11"><a href="#cb133-11" aria-hidden="true"></a>``This is another quote.''</span> -<span id="cb133-12"><a href="#cb133-12" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb133-13"><a href="#cb133-13" aria-hidden="true"></a></span> -<span id="cb133-14"><a href="#cb133-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="cb134"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb134-1"><a href="#cb134-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-6" class="unnumbered">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="cb133"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb133-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb133-2" data-line-number="2"></a> +<a class="sourceLine" id="cb133-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb133-4" data-line-number="4">``This is a code span.''</a> +<a class="sourceLine" id="cb133-5" data-line-number="5">``This is no longer a code span.''</a> +<a class="sourceLine" id="cb133-6" data-line-number="6"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb133-7" data-line-number="7"></a> +<a class="sourceLine" id="cb133-8" data-line-number="8"><span class="fu">\def</span>\markdownOptionCodeSpans{false}</a> +<a class="sourceLine" id="cb133-9" data-line-number="9"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb133-10" data-line-number="10">``This is a quote.''</a> +<a class="sourceLine" id="cb133-11" data-line-number="11">``This is another quote.''</a> +<a class="sourceLine" id="cb133-12" data-line-number="12"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb133-13" data-line-number="13"></a> +<a class="sourceLine" id="cb133-14" data-line-number="14"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb134"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb134-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><code>This is a code span.''</code>This is no longer a code span.’’</p> <p>“This is a quote.” “This is another quote.”</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-8"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb135"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb135-1"><a href="#cb135-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb135-2"><a href="#cb135-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb135-3"><a href="#cb135-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb135-4"><a href="#cb135-4" aria-hidden="true"></a></span> -<span id="cb135-5"><a href="#cb135-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb135-6"><a href="#cb135-6" aria-hidden="true"></a>``This is a code span.''</span> -<span id="cb135-7"><a href="#cb135-7" aria-hidden="true"></a>``This is no longer a code span.''</span> -<span id="cb135-8"><a href="#cb135-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb135-9"><a href="#cb135-9" aria-hidden="true"></a></span> -<span id="cb135-10"><a href="#cb135-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{codeSpans=false}</span> -<span id="cb135-11"><a href="#cb135-11" aria-hidden="true"></a>``This is a quote.''</span> -<span id="cb135-12"><a href="#cb135-12" aria-hidden="true"></a>``This is another quote.''</span> -<span id="cb135-13"><a href="#cb135-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb135-14"><a href="#cb135-14" aria-hidden="true"></a></span> -<span id="cb135-15"><a href="#cb135-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="cb136"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb136-1"><a href="#cb136-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-8" class="unnumbered"><span class="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="cb135"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb135-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb135-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb135-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb135-4" data-line-number="4"></a> +<a class="sourceLine" id="cb135-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb135-6" data-line-number="6">``This is a code span.''</a> +<a class="sourceLine" id="cb135-7" data-line-number="7">``This is no longer a code span.''</a> +<a class="sourceLine" id="cb135-8" data-line-number="8"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb135-9" data-line-number="9"></a> +<a class="sourceLine" id="cb135-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{codeSpans=false}</a> +<a class="sourceLine" id="cb135-11" data-line-number="11">``This is a quote.''</a> +<a class="sourceLine" id="cb135-12" data-line-number="12">``This is another quote.''</a> +<a class="sourceLine" id="cb135-13" data-line-number="13"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb135-14" data-line-number="14"></a> +<a class="sourceLine" id="cb135-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb136"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb136-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><code>This is a code span.''</code>This is no longer a code span.’’</p> <p>“This is a quote.” “This is another quote.”</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-6">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb137"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb137-1"><a href="#cb137-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb137-2"><a href="#cb137-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb137-3"><a href="#cb137-3" aria-hidden="true"></a></span> -<span id="cb137-4"><a href="#cb137-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb137-5"><a href="#cb137-5" aria-hidden="true"></a>``This is a code span.''</span> -<span id="cb137-6"><a href="#cb137-6" aria-hidden="true"></a>``This is no longer a code span.''</span> -<span id="cb137-7"><a href="#cb137-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb137-8"><a href="#cb137-8" aria-hidden="true"></a></span> -<span id="cb137-9"><a href="#cb137-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionCodeSpans</span>{false}</span> -<span id="cb137-10"><a href="#cb137-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb137-11"><a href="#cb137-11" aria-hidden="true"></a>``This is a quote.''</span> -<span id="cb137-12"><a href="#cb137-12" aria-hidden="true"></a>``This is another quote.''</span> -<span id="cb137-13"><a href="#cb137-13" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb137-14"><a href="#cb137-14" aria-hidden="true"></a></span> -<span id="cb137-15"><a href="#cb137-15" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb138"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb138-1"><a href="#cb138-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-6" class="unnumbered">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="cb137"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb137-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb137-2" data-line-number="2"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb137-3" data-line-number="3"></a> +<a class="sourceLine" id="cb137-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb137-5" data-line-number="5">``This is a code span.''</a> +<a class="sourceLine" id="cb137-6" data-line-number="6">``This is no longer a code span.''</a> +<a class="sourceLine" id="cb137-7" data-line-number="7"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb137-8" data-line-number="8"></a> +<a class="sourceLine" id="cb137-9" data-line-number="9"><span class="fu">\def</span>\markdownOptionCodeSpans{false}</a> +<a class="sourceLine" id="cb137-10" data-line-number="10"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb137-11" data-line-number="11">``This is a quote.''</a> +<a class="sourceLine" id="cb137-12" data-line-number="12">``This is another quote.''</a> +<a class="sourceLine" id="cb137-13" data-line-number="13"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb137-14" data-line-number="14"></a> +<a class="sourceLine" id="cb137-15" data-line-number="15"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb138"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb138-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><code>This is a code span.''</code>This is no longer a code span.’’</p> <p>“This is a quote.” “This is another quote.”</p> </blockquote> -<h4 data-number="2.2.1.10" id="option-contentblocks"><span class="header-section-number">2.2.1.10</span> Option <code>contentBlocks</code></h4> +<h4 id="option-contentblocks"><span class="header-section-number">2.2.1.10</span> Option <code>contentBlocks</code></h4> <dl> <dt><code>contentBlocks</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the iA Writer content blocks syntax extension:</p> -<div class="sourceCode" id="cb139"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb139-1"><a href="#cb139-1" aria-hidden="true"></a>http://example.com/minard.jpg (Napoleon's</span> -<span id="cb139-2"><a href="#cb139-2" aria-hidden="true"></a> disastrous Russian campaign of 1812)</span> -<span id="cb139-3"><a href="#cb139-3" aria-hidden="true"></a>/Flowchart.png "Engineering Flowchart"</span> -<span id="cb139-4"><a href="#cb139-4" aria-hidden="true"></a>/Savings Account.csv 'Recent Transactions'</span> -<span id="cb139-5"><a href="#cb139-5" aria-hidden="true"></a>/Example.swift</span> -<span id="cb139-6"><a href="#cb139-6" aria-hidden="true"></a>/Lorem Ipsum.txt</span></code></pre></div> +<div class="sourceCode" id="cb139"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb139-1" data-line-number="1">http://example.com/minard.jpg (Napoleon's</a> +<a class="sourceLine" id="cb139-2" data-line-number="2"> disastrous Russian campaign of 1812)</a> +<a class="sourceLine" id="cb139-3" data-line-number="3">/Flowchart.png "Engineering Flowchart"</a> +<a class="sourceLine" id="cb139-4" data-line-number="4">/Savings Account.csv 'Recent Transactions'</a> +<a class="sourceLine" id="cb139-5" data-line-number="5">/Example.swift</a> +<a class="sourceLine" id="cb139-6" data-line-number="6">/Lorem Ipsum.txt</a></code></pre></div> </dd> </dl> </dd> @@ -1483,33 +1480,33 @@ </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-9"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 id="latex-example-9" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>table.csv</code> with the following content:</p> <pre class="csv"><code>Name,Surname,Born Albert,Einstein,1879 Marie,Curie,1867 Thomas,Edison,1847</code></pre> <p>Create also a text document named <code>markdown-languages.json</code> with the following content:</p> -<div class="sourceCode" id="cb141"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb141-1"><a href="#cb141-1" aria-hidden="true"></a>{</span> -<span id="cb141-2"><a href="#cb141-2" aria-hidden="true"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"LaTeX"</span></span> -<span id="cb141-3"><a href="#cb141-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb141"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb141-1" data-line-number="1"><span class="op">{</span></a> +<a class="sourceLine" id="cb141-2" data-line-number="2"> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"LaTeX"</span></a> +<a class="sourceLine" id="cb141-3" data-line-number="3"><span class="op">}</span></a></code></pre></div> <p>Create also a text document named <code>code.tex</code> with the following content:</p> -<div class="sourceCode" id="cb142"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb142-1"><a href="#cb142-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> +<div class="sourceCode" id="cb142"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb142-1" data-line-number="1">This is an example code listing in <span class="fu">\LaTeX</span>.</a></code></pre></div> <p>Create also a text document named <code>part.md</code> with the following content:</p> -<div class="sourceCode" id="cb143"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb143-1"><a href="#cb143-1" aria-hidden="true"></a>This is a *transcluded markdown document*.</span></code></pre></div> +<div class="sourceCode" id="cb143"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb143-1" data-line-number="1">This is a *transcluded markdown document*.</a></code></pre></div> <p>Create also a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb144"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb144-1"><a href="#cb144-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb144-2"><a href="#cb144-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> -<span id="cb144-3"><a href="#cb144-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> -<span id="cb144-4"><a href="#cb144-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb144-5"><a href="#cb144-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb144-6"><a href="#cb144-6" aria-hidden="true"></a>/table.csv (An example table)</span> -<span id="cb144-7"><a href="#cb144-7" aria-hidden="true"></a>/code.tex (An example code listing)</span> -<span id="cb144-8"><a href="#cb144-8" aria-hidden="true"></a>/part.md (A file transclusion example)</span> -<span id="cb144-9"><a href="#cb144-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb144-10"><a href="#cb144-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="cb145"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb145-1"><a href="#cb145-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb144"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb144-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb144-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</a> +<a class="sourceLine" id="cb144-3" data-line-number="3"><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb144-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb144-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb144-6" data-line-number="6">/table.csv (An example table)</a> +<a class="sourceLine" id="cb144-7" data-line-number="7">/code.tex (An example code listing)</a> +<a class="sourceLine" id="cb144-8" data-line-number="8">/part.md (A file transclusion example)</a> +<a class="sourceLine" id="cb144-9" data-line-number="9"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb144-10" data-line-number="10"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb145"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb145-1" data-line-number="1"><span class="ex">lualatex</span> --shell-escape document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -1539,37 +1536,37 @@ Thomas,Edison,1847</code></pre> </tbody> </table> <p>Table 1: An example table</p> -<div class="sourceCode" id="cb146"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb146-1"><a href="#cb146-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> +<div class="sourceCode" id="cb146"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb146-1" data-line-number="1">This is an example code listing in <span class="fu">\LaTeX</span>.</a></code></pre></div> <p>This is a <em>transcluded markdown document</em>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-7">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<h5 id="context-example-7" class="unnumbered">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>table.csv</code> with the following content:</p> <pre class="csv"><code>Name,Surname,Born Albert,Einstein,1879 Marie,Curie,1867 Thomas,Edison,1847</code></pre> <p>Create also a text document named <code>markdown-languages.json</code> with the following content:</p> -<div class="sourceCode" id="cb148"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb148-1"><a href="#cb148-1" aria-hidden="true"></a>{</span> -<span id="cb148-2"><a href="#cb148-2" aria-hidden="true"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"ConTeXt"</span></span> -<span id="cb148-3"><a href="#cb148-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb148"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb148-1" data-line-number="1"><span class="op">{</span></a> +<a class="sourceLine" id="cb148-2" data-line-number="2"> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"ConTeXt"</span></a> +<a class="sourceLine" id="cb148-3" data-line-number="3"><span class="op">}</span></a></code></pre></div> <p>Create also a text document named <code>code.tex</code> with the following content:</p> -<div class="sourceCode" id="cb149"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb149-1"><a href="#cb149-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> +<div class="sourceCode" id="cb149"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb149-1" data-line-number="1">This is an example code listing in <span class="fu">\ConTeXt</span>.</a></code></pre></div> <p>Create also a text document named <code>part.md</code> with the following content:</p> -<div class="sourceCode" id="cb150"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb150-1"><a href="#cb150-1" aria-hidden="true"></a>This is a *transcluded markdown document*.</span></code></pre></div> +<div class="sourceCode" id="cb150"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb150-1" data-line-number="1">This is a *transcluded markdown document*.</a></code></pre></div> <p>Create also a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb151"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb151-1"><a href="#cb151-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb151-2"><a href="#cb151-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> -<span id="cb151-3"><a href="#cb151-3" aria-hidden="true"></a><span class="fu">\definetyping</span> [ConTeXt]</span> -<span id="cb151-4"><a href="#cb151-4" aria-hidden="true"></a><span class="fu">\setuptyping</span> [ConTeXt] [option=TEX]</span> -<span id="cb151-5"><a href="#cb151-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb151-6"><a href="#cb151-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb151-7"><a href="#cb151-7" aria-hidden="true"></a>/table.csv (An example table)</span> -<span id="cb151-8"><a href="#cb151-8" aria-hidden="true"></a>/code.tex (An example code listing)</span> -<span id="cb151-9"><a href="#cb151-9" aria-hidden="true"></a>/part.md (A file transclusion example)</span> -<span id="cb151-10"><a href="#cb151-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb151-11"><a href="#cb151-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="cb152"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb152-1"><a href="#cb152-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb151"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb151-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb151-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionContentBlocks{true}</a> +<a class="sourceLine" id="cb151-3" data-line-number="3"><span class="fu">\definetyping</span> [ConTeXt]</a> +<a class="sourceLine" id="cb151-4" data-line-number="4"><span class="fu">\setuptyping</span> [ConTeXt] [option=TEX]</a> +<a class="sourceLine" id="cb151-5" data-line-number="5"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb151-6" data-line-number="6"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb151-7" data-line-number="7">/table.csv (An example table)</a> +<a class="sourceLine" id="cb151-8" data-line-number="8">/code.tex (An example code listing)</a> +<a class="sourceLine" id="cb151-9" data-line-number="9">/part.md (A file transclusion example)</a> +<a class="sourceLine" id="cb151-10" data-line-number="10"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb151-11" data-line-number="11"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb152"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb152-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -1599,45 +1596,45 @@ Thomas,Edison,1847</code></pre> </tbody> </table> <p>Table 1: An example table</p> -<div class="sourceCode" id="cb153"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb153-1"><a href="#cb153-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> +<div class="sourceCode" id="cb153"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb153-1" data-line-number="1">This is an example code listing in <span class="fu">\ConTeXt</span>.</a></code></pre></div> <p>This is a <em>transcluded markdown document</em>.</p> </blockquote> -<h4 data-number="2.2.1.11" id="option-contentblockslanguagemap"><span class="header-section-number">2.2.1.11</span> Option <code>contentBlocksLanguageMap</code></h4> +<h4 id="option-contentblockslanguagemap"><span class="header-section-number">2.2.1.11</span> Option <code>contentBlocksLanguageMap</code></h4> <dl> -<dt><code>contentBlocksLanguageMap</code> (default value: <code>"markdown-languages.json"</code>)</dt> +<dt><code>contentBlocksLanguageMap</code> (default value: <code>"markdown-languages.json"</code>)</dt> <dd><p>The filename of the JSON file that maps filename extensions to programming language names in the iA Writer content blocks.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-10"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 id="latex-example-10" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>table.csv</code> with the following content:</p> <pre class="csv"><code>Name,Surname,Born Albert,Einstein,1879 Marie,Curie,1867 Thomas,Edison,1847</code></pre> <p>Create also a text document named <code>language-map.json</code> with the following content:</p> -<div class="sourceCode" id="cb155"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb155-1"><a href="#cb155-1" aria-hidden="true"></a>{</span> -<span id="cb155-2"><a href="#cb155-2" aria-hidden="true"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"LaTeX"</span></span> -<span id="cb155-3"><a href="#cb155-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb155"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb155-1" data-line-number="1"><span class="op">{</span></a> +<a class="sourceLine" id="cb155-2" data-line-number="2"> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"LaTeX"</span></a> +<a class="sourceLine" id="cb155-3" data-line-number="3"><span class="op">}</span></a></code></pre></div> <p>Create also a text document named <code>code.tex</code> with the following content:</p> -<div class="sourceCode" id="cb156"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb156-1"><a href="#cb156-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> +<div class="sourceCode" id="cb156"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb156-1" data-line-number="1">This is an example code listing in <span class="fu">\LaTeX</span>.</a></code></pre></div> <p>Create also a text document named <code>part.md</code> with the following content:</p> -<div class="sourceCode" id="cb157"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb157-1"><a href="#cb157-1" aria-hidden="true"></a>This is a *transcluded markdown document*.</span></code></pre></div> +<div class="sourceCode" id="cb157"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb157-1" data-line-number="1">This is a *transcluded markdown document*.</a></code></pre></div> <p>Create also a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb158"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb158-1"><a href="#cb158-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb158-2"><a href="#cb158-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> -<span id="cb158-3"><a href="#cb158-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> -<span id="cb158-4"><a href="#cb158-4" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb158-5"><a href="#cb158-5" aria-hidden="true"></a> contentBlocksLanguageMap = {language-map.json},</span> -<span id="cb158-6"><a href="#cb158-6" aria-hidden="true"></a>}</span> -<span id="cb158-7"><a href="#cb158-7" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb158-8"><a href="#cb158-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb158-9"><a href="#cb158-9" aria-hidden="true"></a>/table.csv (An example table)</span> -<span id="cb158-10"><a href="#cb158-10" aria-hidden="true"></a>/code.tex (An example code listing)</span> -<span id="cb158-11"><a href="#cb158-11" aria-hidden="true"></a>/part.md (A file transclusion example)</span> -<span id="cb158-12"><a href="#cb158-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb158-13"><a href="#cb158-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="cb159"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb159-1"><a href="#cb159-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb158"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb158-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb158-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</a> +<a class="sourceLine" id="cb158-3" data-line-number="3"><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb158-4" data-line-number="4"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb158-5" data-line-number="5"> contentBlocksLanguageMap = {language-map.json},</a> +<a class="sourceLine" id="cb158-6" data-line-number="6">}</a> +<a class="sourceLine" id="cb158-7" data-line-number="7"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb158-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb158-9" data-line-number="9">/table.csv (An example table)</a> +<a class="sourceLine" id="cb158-10" data-line-number="10">/code.tex (An example code listing)</a> +<a class="sourceLine" id="cb158-11" data-line-number="11">/part.md (A file transclusion example)</a> +<a class="sourceLine" id="cb158-12" data-line-number="12"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb158-13" data-line-number="13"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb159"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb159-1" data-line-number="1"><span class="ex">lualatex</span> --shell-escape document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -1667,38 +1664,38 @@ Thomas,Edison,1847</code></pre> </tbody> </table> <p>Table 1: An example table</p> -<div class="sourceCode" id="cb160"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb160-1"><a href="#cb160-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\LaTeX</span>.</span></code></pre></div> +<div class="sourceCode" id="cb160"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb160-1" data-line-number="1">This is an example code listing in <span class="fu">\LaTeX</span>.</a></code></pre></div> <p>This is a <em>transcluded markdown document</em>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-8">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<h5 id="context-example-8" class="unnumbered">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>table.csv</code> with the following content:</p> <pre class="csv"><code>Name,Surname,Born Albert,Einstein,1879 Marie,Curie,1867 Thomas,Edison,1847</code></pre> <p>Create also a text document named <code>language-map.json</code> with the following content:</p> -<div class="sourceCode" id="cb162"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb162-1"><a href="#cb162-1" aria-hidden="true"></a>{</span> -<span id="cb162-2"><a href="#cb162-2" aria-hidden="true"></a> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"ConTeXt"</span></span> -<span id="cb162-3"><a href="#cb162-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb162"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb162-1" data-line-number="1"><span class="op">{</span></a> +<a class="sourceLine" id="cb162-2" data-line-number="2"> <span class="st">"tex"</span><span class="op">:</span> <span class="st">"ConTeXt"</span></a> +<a class="sourceLine" id="cb162-3" data-line-number="3"><span class="op">}</span></a></code></pre></div> <p>Create also a text document named <code>code.tex</code> with the following content:</p> -<div class="sourceCode" id="cb163"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb163-1"><a href="#cb163-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> +<div class="sourceCode" id="cb163"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb163-1" data-line-number="1">This is an example code listing in <span class="fu">\ConTeXt</span>.</a></code></pre></div> <p>Create also a text document named <code>part.md</code> with the following content:</p> -<div class="sourceCode" id="cb164"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb164-1"><a href="#cb164-1" aria-hidden="true"></a>This is a *transcluded markdown document*.</span></code></pre></div> +<div class="sourceCode" id="cb164"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb164-1" data-line-number="1">This is a *transcluded markdown document*.</a></code></pre></div> <p>Create also a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb165"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb165-1"><a href="#cb165-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb165-2"><a href="#cb165-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> -<span id="cb165-3"><a href="#cb165-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocksLanguageMap</span>{language-map.json}</span> -<span id="cb165-4"><a href="#cb165-4" aria-hidden="true"></a><span class="fu">\definetyping</span> [ConTeXt]</span> -<span id="cb165-5"><a href="#cb165-5" aria-hidden="true"></a><span class="fu">\setuptyping</span> [ConTeXt] [option=TEX]</span> -<span id="cb165-6"><a href="#cb165-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb165-7"><a href="#cb165-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb165-8"><a href="#cb165-8" aria-hidden="true"></a>/table.csv (An example table)</span> -<span id="cb165-9"><a href="#cb165-9" aria-hidden="true"></a>/code.tex (An example code listing)</span> -<span id="cb165-10"><a href="#cb165-10" aria-hidden="true"></a>/part.md (A file transclusion example)</span> -<span id="cb165-11"><a href="#cb165-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb165-12"><a href="#cb165-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="cb166"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb166-1"><a href="#cb166-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb165"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb165-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb165-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionContentBlocks{true}</a> +<a class="sourceLine" id="cb165-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionContentBlocksLanguageMap{language-map.json}</a> +<a class="sourceLine" id="cb165-4" data-line-number="4"><span class="fu">\definetyping</span> [ConTeXt]</a> +<a class="sourceLine" id="cb165-5" data-line-number="5"><span class="fu">\setuptyping</span> [ConTeXt] [option=TEX]</a> +<a class="sourceLine" id="cb165-6" data-line-number="6"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb165-7" data-line-number="7"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb165-8" data-line-number="8">/table.csv (An example table)</a> +<a class="sourceLine" id="cb165-9" data-line-number="9">/code.tex (An example code listing)</a> +<a class="sourceLine" id="cb165-10" data-line-number="10">/part.md (A file transclusion example)</a> +<a class="sourceLine" id="cb165-11" data-line-number="11"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb165-12" data-line-number="12"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb166"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb166-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -1728,26 +1725,26 @@ Thomas,Edison,1847</code></pre> </tbody> </table> <p>Table 1: An example table</p> -<div class="sourceCode" id="cb167"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb167-1"><a href="#cb167-1" aria-hidden="true"></a>This is an example code listing in <span class="fu">\ConTeXt</span>.</span></code></pre></div> +<div class="sourceCode" id="cb167"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb167-1" data-line-number="1">This is an example code listing in <span class="fu">\ConTeXt</span>.</a></code></pre></div> <p>This is a <em>transcluded markdown document</em>.</p> </blockquote> -<h4 data-number="2.2.1.12" id="option-definitionlists"><span class="header-section-number">2.2.1.12</span> Option <code>definitionLists</code></h4> +<h4 id="option-definitionlists"><span class="header-section-number">2.2.1.12</span> Option <code>definitionLists</code></h4> <dl> <dt><code>definitionLists</code> (default value: <code>false</code>)</dt> <dd><dl> <dt>true</dt> <dd><p>Enable the pandoc definition list syntax extension:</p> -<div class="sourceCode" id="cb168"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb168-1"><a href="#cb168-1" aria-hidden="true"></a>Term 1</span> -<span id="cb168-2"><a href="#cb168-2" aria-hidden="true"></a></span> -<span id="cb168-3"><a href="#cb168-3" aria-hidden="true"></a>: Definition 1</span> -<span id="cb168-4"><a href="#cb168-4" aria-hidden="true"></a></span> -<span id="cb168-5"><a href="#cb168-5" aria-hidden="true"></a>Term 2 with *inline markup*</span> -<span id="cb168-6"><a href="#cb168-6" aria-hidden="true"></a></span> -<span id="cb168-7"><a href="#cb168-7" aria-hidden="true"></a>: Definition 2</span> -<span id="cb168-8"><a href="#cb168-8" aria-hidden="true"></a></span> -<span id="cb168-9"><a href="#cb168-9" aria-hidden="true"></a><span class="in"> { some code, part of Definition 2 }</span></span> -<span id="cb168-10"><a href="#cb168-10" aria-hidden="true"></a></span> -<span id="cb168-11"><a href="#cb168-11" aria-hidden="true"></a><span class="in"> Third paragraph of definition 2.</span></span></code></pre></div> +<div class="sourceCode" id="cb168"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb168-1" data-line-number="1">Term 1</a> +<a class="sourceLine" id="cb168-2" data-line-number="2"></a> +<a class="sourceLine" id="cb168-3" data-line-number="3">: Definition 1</a> +<a class="sourceLine" id="cb168-4" data-line-number="4"></a> +<a class="sourceLine" id="cb168-5" data-line-number="5">Term 2 with *inline markup*</a> +<a class="sourceLine" id="cb168-6" data-line-number="6"></a> +<a class="sourceLine" id="cb168-7" data-line-number="7">: Definition 2</a> +<a class="sourceLine" id="cb168-8" data-line-number="8"></a> +<a class="sourceLine" id="cb168-9" data-line-number="9"><span class="bn"> { some code, part of Definition 2 }</span></a> +<a class="sourceLine" id="cb168-10" data-line-number="10"></a> +<a class="sourceLine" id="cb168-11" data-line-number="11"><span class="bn"> Third paragraph of definition 2.</span></a></code></pre></div> </dd> </dl> </dd> @@ -1758,27 +1755,27 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-11"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb169"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb169-1"><a href="#cb169-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb169-2"><a href="#cb169-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[definitionLists]{<span class="ex">markdown</span>}</span> -<span id="cb169-3"><a href="#cb169-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb169-4"><a href="#cb169-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb169-5"><a href="#cb169-5" aria-hidden="true"></a>Term 1</span> -<span id="cb169-6"><a href="#cb169-6" aria-hidden="true"></a></span> -<span id="cb169-7"><a href="#cb169-7" aria-hidden="true"></a>: Definition 1</span> -<span id="cb169-8"><a href="#cb169-8" aria-hidden="true"></a></span> -<span id="cb169-9"><a href="#cb169-9" aria-hidden="true"></a>Term 2 with *inline markup*</span> -<span id="cb169-10"><a href="#cb169-10" aria-hidden="true"></a></span> -<span id="cb169-11"><a href="#cb169-11" aria-hidden="true"></a>: Definition 2</span> -<span id="cb169-12"><a href="#cb169-12" aria-hidden="true"></a></span> -<span id="cb169-13"><a href="#cb169-13" aria-hidden="true"></a> { some code, part of Definition 2 }</span> -<span id="cb169-14"><a href="#cb169-14" aria-hidden="true"></a></span> -<span id="cb169-15"><a href="#cb169-15" aria-hidden="true"></a> Third paragraph of definition 2.</span> -<span id="cb169-16"><a href="#cb169-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb169-17"><a href="#cb169-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="cb170"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb170-1"><a href="#cb170-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-11" class="unnumbered"><span class="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="cb169"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb169-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb169-2" data-line-number="2"><span class="bu">\usepackage</span>[definitionLists]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb169-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb169-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb169-5" data-line-number="5">Term 1</a> +<a class="sourceLine" id="cb169-6" data-line-number="6"></a> +<a class="sourceLine" id="cb169-7" data-line-number="7">: Definition 1</a> +<a class="sourceLine" id="cb169-8" data-line-number="8"></a> +<a class="sourceLine" id="cb169-9" data-line-number="9">Term 2 with *inline markup*</a> +<a class="sourceLine" id="cb169-10" data-line-number="10"></a> +<a class="sourceLine" id="cb169-11" data-line-number="11">: Definition 2</a> +<a class="sourceLine" id="cb169-12" data-line-number="12"></a> +<a class="sourceLine" id="cb169-13" data-line-number="13"> { some code, part of Definition 2 }</a> +<a class="sourceLine" id="cb169-14" data-line-number="14"></a> +<a class="sourceLine" id="cb169-15" data-line-number="15"> Third paragraph of definition 2.</a> +<a class="sourceLine" id="cb169-16" data-line-number="16"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb169-17" data-line-number="17"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb170"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb170-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <dl> @@ -1792,27 +1789,27 @@ Thomas,Edison,1847</code></pre> </dd> </dl> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-9">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb172"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb172-1"><a href="#cb172-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb172-2"><a href="#cb172-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> -<span id="cb172-3"><a href="#cb172-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb172-4"><a href="#cb172-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb172-5"><a href="#cb172-5" aria-hidden="true"></a>Term 1</span> -<span id="cb172-6"><a href="#cb172-6" aria-hidden="true"></a></span> -<span id="cb172-7"><a href="#cb172-7" aria-hidden="true"></a>: Definition 1</span> -<span id="cb172-8"><a href="#cb172-8" aria-hidden="true"></a></span> -<span id="cb172-9"><a href="#cb172-9" aria-hidden="true"></a>Term 2 with *inline markup*</span> -<span id="cb172-10"><a href="#cb172-10" aria-hidden="true"></a></span> -<span id="cb172-11"><a href="#cb172-11" aria-hidden="true"></a>: Definition 2</span> -<span id="cb172-12"><a href="#cb172-12" aria-hidden="true"></a></span> -<span id="cb172-13"><a href="#cb172-13" aria-hidden="true"></a> { some code, part of Definition 2 }</span> -<span id="cb172-14"><a href="#cb172-14" aria-hidden="true"></a></span> -<span id="cb172-15"><a href="#cb172-15" aria-hidden="true"></a> Third paragraph of definition 2.</span> -<span id="cb172-16"><a href="#cb172-16" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb172-17"><a href="#cb172-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="cb173"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb173-1"><a href="#cb173-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-9" class="unnumbered">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="cb172"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb172-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb172-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionDefinitionLists{true}</a> +<a class="sourceLine" id="cb172-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb172-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb172-5" data-line-number="5">Term 1</a> +<a class="sourceLine" id="cb172-6" data-line-number="6"></a> +<a class="sourceLine" id="cb172-7" data-line-number="7">: Definition 1</a> +<a class="sourceLine" id="cb172-8" data-line-number="8"></a> +<a class="sourceLine" id="cb172-9" data-line-number="9">Term 2 with *inline markup*</a> +<a class="sourceLine" id="cb172-10" data-line-number="10"></a> +<a class="sourceLine" id="cb172-11" data-line-number="11">: Definition 2</a> +<a class="sourceLine" id="cb172-12" data-line-number="12"></a> +<a class="sourceLine" id="cb172-13" data-line-number="13"> { some code, part of Definition 2 }</a> +<a class="sourceLine" id="cb172-14" data-line-number="14"></a> +<a class="sourceLine" id="cb172-15" data-line-number="15"> Third paragraph of definition 2.</a> +<a class="sourceLine" id="cb172-16" data-line-number="16"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb172-17" data-line-number="17"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb173"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb173-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <dl> @@ -1826,28 +1823,28 @@ Thomas,Edison,1847</code></pre> </dd> </dl> </blockquote> -<h4 data-number="2.2.1.13" id="option-fencedcode"><span class="header-section-number">2.2.1.13</span> Option <code>fencedCode</code></h4> +<h4 id="option-fencedcode"><span class="header-section-number">2.2.1.13</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="cb175"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb175-1"><a href="#cb175-1" aria-hidden="true"></a><span class="in">~~~ js</span></span> -<span id="cb175-2"><a href="#cb175-2" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb175-3"><a href="#cb175-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="cb175-4"><a href="#cb175-4" aria-hidden="true"></a>}</span> -<span id="cb175-5"><a href="#cb175-5" aria-hidden="true"></a><span class="op">~~~~~~</span></span> -<span id="cb175-6"><a href="#cb175-6" aria-hidden="true"></a></span> -<span id="cb175-7"><a href="#cb175-7" aria-hidden="true"></a> <span class="vs">``` html</span></span> -<span id="cb175-8"><a href="#cb175-8" aria-hidden="true"></a><span class="vs"> <pre></span></span> -<span id="cb175-9"><a href="#cb175-9" aria-hidden="true"></a><span class="vs"> <code></span></span> -<span id="cb175-10"><a href="#cb175-10" aria-hidden="true"></a><span class="vs"> // Some comments</span></span> -<span id="cb175-11"><a href="#cb175-11" aria-hidden="true"></a><span class="vs"> line 1 of code</span></span> -<span id="cb175-12"><a href="#cb175-12" aria-hidden="true"></a><span class="vs"> line 2 of code</span></span> -<span id="cb175-13"><a href="#cb175-13" aria-hidden="true"></a><span class="vs"> line 3 of code</span></span> -<span id="cb175-14"><a href="#cb175-14" aria-hidden="true"></a><span class="vs"> </code></span></span> -<span id="cb175-15"><a href="#cb175-15" aria-hidden="true"></a><span class="vs"> </pre></span></span> -<span id="cb175-16"><a href="#cb175-16" aria-hidden="true"></a><span class="vs"> ```</span></span></code></pre></div> +<div class="sourceCode" id="cb175"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb175-1" data-line-number="1">~~~ js</a> +<a class="sourceLine" id="cb175-2" data-line-number="2">if (a > 3) {</a> +<a class="sourceLine" id="cb175-3" data-line-number="3"><span class="bn"> moveShip(5 * gravity, DOWN);</span></a> +<a class="sourceLine" id="cb175-4" data-line-number="4">}</a> +<a class="sourceLine" id="cb175-5" data-line-number="5">~~~~~~</a> +<a class="sourceLine" id="cb175-6" data-line-number="6"></a> +<a class="sourceLine" id="cb175-7" data-line-number="7"> ``` html</a> +<a class="sourceLine" id="cb175-8" data-line-number="8"> <pre></a> +<a class="sourceLine" id="cb175-9" data-line-number="9"><span class="bn"> <code></span></a> +<a class="sourceLine" id="cb175-10" data-line-number="10"><span class="bn"> // Some comments</span></a> +<a class="sourceLine" id="cb175-11" data-line-number="11"><span class="bn"> line 1 of code</span></a> +<a class="sourceLine" id="cb175-12" data-line-number="12"><span class="bn"> line 2 of code</span></a> +<a class="sourceLine" id="cb175-13" data-line-number="13"><span class="bn"> line 3 of code</span></a> +<a class="sourceLine" id="cb175-14" data-line-number="14"><span class="bn"> </code></span></a> +<a class="sourceLine" id="cb175-15" data-line-number="15"> </pre></a> +<a class="sourceLine" id="cb175-16" data-line-number="16"> ```</a></code></pre></div> </dd> </dl> </dd> @@ -1858,187 +1855,187 @@ 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> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb176"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb176-1"><a href="#cb176-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb176-2"><a href="#cb176-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</span> -<span id="cb176-3"><a href="#cb176-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> -<span id="cb176-4"><a href="#cb176-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb176-5"><a href="#cb176-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb176-6"><a href="#cb176-6" aria-hidden="true"></a>~~~ js</span> -<span id="cb176-7"><a href="#cb176-7" aria-hidden="true"></a>if (a > 3) {</span> -<span id="cb176-8"><a href="#cb176-8" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> -<span id="cb176-9"><a href="#cb176-9" aria-hidden="true"></a>}</span> -<span id="cb176-10"><a href="#cb176-10" aria-hidden="true"></a>~~~~~~</span> -<span id="cb176-11"><a href="#cb176-11" aria-hidden="true"></a></span> -<span id="cb176-12"><a href="#cb176-12" aria-hidden="true"></a> ``` html</span> -<span id="cb176-13"><a href="#cb176-13" aria-hidden="true"></a> <pre></span> -<span id="cb176-14"><a href="#cb176-14" aria-hidden="true"></a> <code></span> -<span id="cb176-15"><a href="#cb176-15" aria-hidden="true"></a> // Some comments</span> -<span id="cb176-16"><a href="#cb176-16" aria-hidden="true"></a> line 1 of code</span> -<span id="cb176-17"><a href="#cb176-17" aria-hidden="true"></a> line 2 of code</span> -<span id="cb176-18"><a href="#cb176-18" aria-hidden="true"></a> line 3 of code</span> -<span id="cb176-19"><a href="#cb176-19" aria-hidden="true"></a> </code></span> -<span id="cb176-20"><a href="#cb176-20" aria-hidden="true"></a> </pre></span> -<span id="cb176-21"><a href="#cb176-21" aria-hidden="true"></a> ```</span> -<span id="cb176-22"><a href="#cb176-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb176-23"><a href="#cb176-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="cb177"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb177-1"><a href="#cb177-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> +<h5 id="latex-example-12" class="unnumbered"><span class="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="cb176"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb176-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb176-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">minted</span>}</a> +<a class="sourceLine" id="cb176-3" data-line-number="3"><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb176-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb176-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb176-6" data-line-number="6">~~~ js</a> +<a class="sourceLine" id="cb176-7" data-line-number="7">if (a > 3) {</a> +<a class="sourceLine" id="cb176-8" data-line-number="8"> moveShip(5 * gravity, DOWN);</a> +<a class="sourceLine" id="cb176-9" data-line-number="9">}</a> +<a class="sourceLine" id="cb176-10" data-line-number="10">~~~~~~</a> +<a class="sourceLine" id="cb176-11" data-line-number="11"></a> +<a class="sourceLine" id="cb176-12" data-line-number="12"> ``` html</a> +<a class="sourceLine" id="cb176-13" data-line-number="13"> <pre></a> +<a class="sourceLine" id="cb176-14" data-line-number="14"> <code></a> +<a class="sourceLine" id="cb176-15" data-line-number="15"> // Some comments</a> +<a class="sourceLine" id="cb176-16" data-line-number="16"> line 1 of code</a> +<a class="sourceLine" id="cb176-17" data-line-number="17"> line 2 of code</a> +<a class="sourceLine" id="cb176-18" data-line-number="18"> line 3 of code</a> +<a class="sourceLine" id="cb176-19" data-line-number="19"> </code></a> +<a class="sourceLine" id="cb176-20" data-line-number="20"> </pre></a> +<a class="sourceLine" id="cb176-21" data-line-number="21"> ```</a> +<a class="sourceLine" id="cb176-22" data-line-number="22"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb176-23" data-line-number="23"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb177"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb177-1" data-line-number="1"><span class="ex">lualatex</span> --shell-escape document.tex</a></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="cb178"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb178-1"><a href="#cb178-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb178-2"><a href="#cb178-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="cb178-3"><a href="#cb178-3" aria-hidden="true"></a>}</span></code></pre></div> -<div class="sourceCode" id="cb179"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb179-1"><a href="#cb179-1" aria-hidden="true"></a><span class="kw"><pre></span></span> -<span id="cb179-2"><a href="#cb179-2" aria-hidden="true"></a> <span class="kw"><code></span></span> -<span id="cb179-3"><a href="#cb179-3" aria-hidden="true"></a> // Some comments</span> -<span id="cb179-4"><a href="#cb179-4" aria-hidden="true"></a> line 1 of code</span> -<span id="cb179-5"><a href="#cb179-5" aria-hidden="true"></a> line 2 of code</span> -<span id="cb179-6"><a href="#cb179-6" aria-hidden="true"></a> line 3 of code</span> -<span id="cb179-7"><a href="#cb179-7" aria-hidden="true"></a> <span class="kw"></code></span></span> -<span id="cb179-8"><a href="#cb179-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="cb180"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb180-1"><a href="#cb180-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb180-2"><a href="#cb180-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFencedCode</span>{true}</span> -<span id="cb180-3"><a href="#cb180-3" aria-hidden="true"></a><span class="fu">\definetyping</span> [js]</span> -<span id="cb180-4"><a href="#cb180-4" aria-hidden="true"></a><span class="fu">\definetyping</span> [html]</span> -<span id="cb180-5"><a href="#cb180-5" aria-hidden="true"></a><span class="fu">\setuptyping</span> [html] [option=XML]</span> -<span id="cb180-6"><a href="#cb180-6" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb180-7"><a href="#cb180-7" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb180-8"><a href="#cb180-8" aria-hidden="true"></a>~~~ js</span> -<span id="cb180-9"><a href="#cb180-9" aria-hidden="true"></a>if (a > 3) {</span> -<span id="cb180-10"><a href="#cb180-10" aria-hidden="true"></a> moveShip(5 * gravity, DOWN);</span> -<span id="cb180-11"><a href="#cb180-11" aria-hidden="true"></a>}</span> -<span id="cb180-12"><a href="#cb180-12" aria-hidden="true"></a>~~~~~~</span> -<span id="cb180-13"><a href="#cb180-13" aria-hidden="true"></a></span> -<span id="cb180-14"><a href="#cb180-14" aria-hidden="true"></a> ``` html</span> -<span id="cb180-15"><a href="#cb180-15" aria-hidden="true"></a> <pre></span> -<span id="cb180-16"><a href="#cb180-16" aria-hidden="true"></a> <code></span> -<span id="cb180-17"><a href="#cb180-17" aria-hidden="true"></a> // Some comments</span> -<span id="cb180-18"><a href="#cb180-18" aria-hidden="true"></a> line 1 of code</span> -<span id="cb180-19"><a href="#cb180-19" aria-hidden="true"></a> line 2 of code</span> -<span id="cb180-20"><a href="#cb180-20" aria-hidden="true"></a> line 3 of code</span> -<span id="cb180-21"><a href="#cb180-21" aria-hidden="true"></a> </code></span> -<span id="cb180-22"><a href="#cb180-22" aria-hidden="true"></a> </pre></span> -<span id="cb180-23"><a href="#cb180-23" aria-hidden="true"></a> ```</span> -<span id="cb180-24"><a href="#cb180-24" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb180-25"><a href="#cb180-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="cb181"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb181-1"><a href="#cb181-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb178"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb178-1" data-line-number="1"><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) <span class="op">{</span></a> +<a class="sourceLine" id="cb178-2" data-line-number="2"> <span class="at">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></a> +<a class="sourceLine" id="cb178-3" data-line-number="3"><span class="op">}</span></a></code></pre></div> +<div class="sourceCode" id="cb179"><pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb179-1" data-line-number="1"><span class="kw"><pre></span></a> +<a class="sourceLine" id="cb179-2" data-line-number="2"> <span class="kw"><code></span></a> +<a class="sourceLine" id="cb179-3" data-line-number="3"> // Some comments</a> +<a class="sourceLine" id="cb179-4" data-line-number="4"> line 1 of code</a> +<a class="sourceLine" id="cb179-5" data-line-number="5"> line 2 of code</a> +<a class="sourceLine" id="cb179-6" data-line-number="6"> line 3 of code</a> +<a class="sourceLine" id="cb179-7" data-line-number="7"> <span class="kw"></code></span></a> +<a class="sourceLine" id="cb179-8" data-line-number="8"><span class="kw"></pre></span></a></code></pre></div> +</blockquote> +<h5 id="context-example-10" class="unnumbered">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="cb180"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb180-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb180-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFencedCode{true}</a> +<a class="sourceLine" id="cb180-3" data-line-number="3"><span class="fu">\definetyping</span> [js]</a> +<a class="sourceLine" id="cb180-4" data-line-number="4"><span class="fu">\definetyping</span> [html]</a> +<a class="sourceLine" id="cb180-5" data-line-number="5"><span class="fu">\setuptyping</span> [html] [option=XML]</a> +<a class="sourceLine" id="cb180-6" data-line-number="6"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb180-7" data-line-number="7"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb180-8" data-line-number="8">~~~ js</a> +<a class="sourceLine" id="cb180-9" data-line-number="9">if (a > 3) {</a> +<a class="sourceLine" id="cb180-10" data-line-number="10"> moveShip(5 * gravity, DOWN);</a> +<a class="sourceLine" id="cb180-11" data-line-number="11">}</a> +<a class="sourceLine" id="cb180-12" data-line-number="12">~~~~~~</a> +<a class="sourceLine" id="cb180-13" data-line-number="13"></a> +<a class="sourceLine" id="cb180-14" data-line-number="14"> ``` html</a> +<a class="sourceLine" id="cb180-15" data-line-number="15"> <pre></a> +<a class="sourceLine" id="cb180-16" data-line-number="16"> <code></a> +<a class="sourceLine" id="cb180-17" data-line-number="17"> // Some comments</a> +<a class="sourceLine" id="cb180-18" data-line-number="18"> line 1 of code</a> +<a class="sourceLine" id="cb180-19" data-line-number="19"> line 2 of code</a> +<a class="sourceLine" id="cb180-20" data-line-number="20"> line 3 of code</a> +<a class="sourceLine" id="cb180-21" data-line-number="21"> </code></a> +<a class="sourceLine" id="cb180-22" data-line-number="22"> </pre></a> +<a class="sourceLine" id="cb180-23" data-line-number="23"> ```</a> +<a class="sourceLine" id="cb180-24" data-line-number="24"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb180-25" data-line-number="25"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb181"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb181-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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="cb182"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb182-1"><a href="#cb182-1" aria-hidden="true"></a><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) {</span> -<span id="cb182-2"><a href="#cb182-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="cb182-3"><a href="#cb182-3" aria-hidden="true"></a>}</span></code></pre></div> -<div class="sourceCode" id="cb183"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb183-1"><a href="#cb183-1" aria-hidden="true"></a><span class="kw"><pre></span></span> -<span id="cb183-2"><a href="#cb183-2" aria-hidden="true"></a> <span class="kw"><code></span></span> -<span id="cb183-3"><a href="#cb183-3" aria-hidden="true"></a> // Some comments</span> -<span id="cb183-4"><a href="#cb183-4" aria-hidden="true"></a> line 1 of code</span> -<span id="cb183-5"><a href="#cb183-5" aria-hidden="true"></a> line 2 of code</span> -<span id="cb183-6"><a href="#cb183-6" aria-hidden="true"></a> line 3 of code</span> -<span id="cb183-7"><a href="#cb183-7" aria-hidden="true"></a> <span class="kw"></code></span></span> -<span id="cb183-8"><a href="#cb183-8" aria-hidden="true"></a><span class="kw"></pre></span></span></code></pre></div> -</blockquote> -<h4 data-number="2.2.1.14" id="option-finalizecache"><span class="header-section-number">2.2.1.14</span> Option <code>finalizeCache</code></h4> +<div class="sourceCode" id="cb182"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb182-1" data-line-number="1"><span class="cf">if</span> (a <span class="op">></span> <span class="dv">3</span>) <span class="op">{</span></a> +<a class="sourceLine" id="cb182-2" data-line-number="2"> <span class="at">moveShip</span>(<span class="dv">5</span> <span class="op">*</span> gravity<span class="op">,</span> DOWN)<span class="op">;</span></a> +<a class="sourceLine" id="cb182-3" data-line-number="3"><span class="op">}</span></a></code></pre></div> +<div class="sourceCode" id="cb183"><pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb183-1" data-line-number="1"><span class="kw"><pre></span></a> +<a class="sourceLine" id="cb183-2" data-line-number="2"> <span class="kw"><code></span></a> +<a class="sourceLine" id="cb183-3" data-line-number="3"> // Some comments</a> +<a class="sourceLine" id="cb183-4" data-line-number="4"> line 1 of code</a> +<a class="sourceLine" id="cb183-5" data-line-number="5"> line 2 of code</a> +<a class="sourceLine" id="cb183-6" data-line-number="6"> line 3 of code</a> +<a class="sourceLine" id="cb183-7" data-line-number="7"> <span class="kw"></code></span></a> +<a class="sourceLine" id="cb183-8" data-line-number="8"><span class="kw"></pre></span></a></code></pre></div> +</blockquote> +<h4 id="option-finalizecache"><span class="header-section-number">2.2.1.14</span> Option <code>finalizeCache</code></h4> <dl> <dt><code>finalizeCache</code> (default value: <code>false</code>)</dt> <dd><p>Whether an output file specified with the <strong><code>frozenCacheFileName</code></strong> option (frozen cache) that contains a mapping between an enumeration of markdown documents and their auxiliary cache files will be created.</p> <p>The frozen cache makes it possible to later typeset a plain <span class="tex">T<sub>e</sub>X</span> document that contains markdown documents without invoking Lua using the <code>\markdownOptionFrozenCache</code> plain <span class="tex">T<sub>e</sub>X</span> option. As a result, the plain <span class="tex">T<sub>e</sub>X</span> document becomes more portable, but further changes in the order and the content of markdown documents will not be reflected.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-7">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<h5 id="plain-tex-example-7" class="unnumbered">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="cb184"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb184-1"><a href="#cb184-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb184-2"><a href="#cb184-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFinalizeCache</span>{true}</span> -<span id="cb184-3"><a href="#cb184-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb184-4"><a href="#cb184-4" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb184-5"><a href="#cb184-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb184-6"><a href="#cb184-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb184"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb184-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb184-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFinalizeCache{true}</a> +<a class="sourceLine" id="cb184-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb184-4" data-line-number="4">Hello *world*!</a> +<a class="sourceLine" id="cb184-5" data-line-number="5"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb184-6" data-line-number="6"><span class="fu">\bye</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb185"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb185-1"><a href="#cb185-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb185"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb185-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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="cb186"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb186-1"><a href="#cb186-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb186-2"><a href="#cb186-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> -<span id="cb186-3"><a href="#cb186-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb186-4"><a href="#cb186-4" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb186-5"><a href="#cb186-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb186-6"><a href="#cb186-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb186"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb186-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb186-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFrozenCache{true}</a> +<a class="sourceLine" id="cb186-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb186-4" data-line-number="4">Hi *world*!</a> +<a class="sourceLine" id="cb186-5" data-line-number="5"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb186-6" data-line-number="6"><span class="fu">\bye</span></a></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb187"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb187-1"><a href="#cb187-1" aria-hidden="true"></a><span class="ex">pdftex</span> -no-shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb187"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb187-1" data-line-number="1"><span class="ex">pdftex</span> -no-shell-escape document.tex</a></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 id="latex-example-13" class="unnumbered"><span class="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="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>[finalizecache]{<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">markdown</span>}</span> -<span id="cb188-3"><a href="#cb188-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb188-4"><a href="#cb188-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb188-5"><a href="#cb188-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb188-6"><a href="#cb188-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb188-7"><a href="#cb188-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb188"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb188-1" data-line-number="1"><span class="bu">\documentclass</span>[finalizecache]{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb188-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb188-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb188-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb188-5" data-line-number="5">Hello *world*!</a> +<a class="sourceLine" id="cb188-6" data-line-number="6"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb188-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb189"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb189-1"><a href="#cb189-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb189"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb189-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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="cb190"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb190-1"><a href="#cb190-1" aria-hidden="true"></a><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</span> -<span id="cb190-2"><a href="#cb190-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb190-3"><a href="#cb190-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb190-4"><a href="#cb190-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb190-5"><a href="#cb190-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb190-6"><a href="#cb190-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb190-7"><a href="#cb190-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb190"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb190-1" data-line-number="1"><span class="bu">\documentclass</span>[frozencache]{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb190-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb190-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb190-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb190-5" data-line-number="5">Hi *world*!</a> +<a class="sourceLine" id="cb190-6" data-line-number="6"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb190-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb191"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb191-1"><a href="#cb191-1" aria-hidden="true"></a><span class="ex">pdflatex</span> -no-shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb191"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb191-1" data-line-number="1"><span class="ex">pdflatex</span> -no-shell-escape document.tex</a></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> +<h5 id="context-example-11" class="unnumbered">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="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\markdownOptionFinalizeCache</span>{true}</span> -<span id="cb192-3"><a href="#cb192-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb192-4"><a href="#cb192-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb192-5"><a href="#cb192-5" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb192-6"><a href="#cb192-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb192-7"><a href="#cb192-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb192"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb192-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb192-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFinalizeCache{true}</a> +<a class="sourceLine" id="cb192-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb192-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb192-5" data-line-number="5">Hello *world*!</a> +<a class="sourceLine" id="cb192-6" data-line-number="6"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb192-7" data-line-number="7"><span class="fu">\stoptext</span></a></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> +<div class="sourceCode" id="cb193"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb193-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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="cb194"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb194-1"><a href="#cb194-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb194-2"><a href="#cb194-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCache</span>{true}</span> -<span id="cb194-3"><a href="#cb194-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb194-4"><a href="#cb194-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb194-5"><a href="#cb194-5" aria-hidden="true"></a>Hi *world*!</span> -<span id="cb194-6"><a href="#cb194-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb194-7"><a href="#cb194-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb194"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb194-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb194-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFrozenCache{true}</a> +<a class="sourceLine" id="cb194-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb194-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb194-5" data-line-number="5">Hi *world*!</a> +<a class="sourceLine" id="cb194-6" data-line-number="6"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb194-7" data-line-number="7"><span class="fu">\stoptext</span></a></code></pre></div> <p>Last, invoke pdfTeX without shell access from the terminal:</p> -<div class="sourceCode" id="cb195"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb195-1"><a href="#cb195-1" aria-hidden="true"></a><span class="ex">texexec</span> --passon=--no-shell-escape document.tex</span></code></pre></div> +<div class="sourceCode" id="cb195"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb195-1" data-line-number="1"><span class="ex">texexec</span> --passon=--no-shell-escape document.tex</a></code></pre></div> <p>A new PDF document named <code>document.pdf</code> should be produced and contain the same text “Hello <em>world</em>!” Since we used the contents of the frozen cache using the <code>\markdownOptionFrozenCache</code> option, we were able to typeset the document without accessing the shell or invoking Lua, but the change in the content of the markdown document from “Hello <em>world</em>!” to “Hi <em>world</em>!” was not reflected.</p> -<h4 data-number="2.2.1.15" id="option-footnotes"><span class="header-section-number">2.2.1.15</span> Option <code>footnotes</code></h4> +<h4 id="option-footnotes"><span class="header-section-number">2.2.1.15</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="cb196"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb196-1"><a href="#cb196-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="cb196-2"><a href="#cb196-2" aria-hidden="true"></a></span> -<span id="cb196-3"><a href="#cb196-3" aria-hidden="true"></a><span class="ot">[^1]: </span>Here is the footnote.</span> -<span id="cb196-4"><a href="#cb196-4" aria-hidden="true"></a></span> -<span id="cb196-5"><a href="#cb196-5" aria-hidden="true"></a><span class="ot">[^longnote]: </span>Here's one with multiple blocks.</span> -<span id="cb196-6"><a href="#cb196-6" aria-hidden="true"></a></span> -<span id="cb196-7"><a href="#cb196-7" aria-hidden="true"></a><span class="in"> Subsequent paragraphs are indented to show that they</span></span> -<span id="cb196-8"><a href="#cb196-8" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb196-9"><a href="#cb196-9" aria-hidden="true"></a></span> -<span id="cb196-10"><a href="#cb196-10" aria-hidden="true"></a><span class="in"> { some.code }</span></span> -<span id="cb196-11"><a href="#cb196-11" aria-hidden="true"></a></span> -<span id="cb196-12"><a href="#cb196-12" aria-hidden="true"></a><span class="in"> The whole paragraph can be indented, or just the</span></span> -<span id="cb196-13"><a href="#cb196-13" aria-hidden="true"></a><span class="in"> first line. In this way, multi-paragraph footnotes</span></span> -<span id="cb196-14"><a href="#cb196-14" aria-hidden="true"></a><span class="in"> work like multi-paragraph list items.</span></span> -<span id="cb196-15"><a href="#cb196-15" aria-hidden="true"></a></span> -<span id="cb196-16"><a href="#cb196-16" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb196-17"><a href="#cb196-17" aria-hidden="true"></a>isn't indented.</span></code></pre></div> +<div class="sourceCode" id="cb196"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb196-1" data-line-number="1">Here is a footnote reference,<span class="ot">[^1]</span> and another.<span class="ot">[^longnote]</span></a> +<a class="sourceLine" id="cb196-2" data-line-number="2"></a> +<a class="sourceLine" id="cb196-3" data-line-number="3"><span class="ot">[^1]</span>: Here is the footnote.</a> +<a class="sourceLine" id="cb196-4" data-line-number="4"></a> +<a class="sourceLine" id="cb196-5" data-line-number="5"><span class="ot">[^longnote]</span>: Here's one with multiple blocks.</a> +<a class="sourceLine" id="cb196-6" data-line-number="6"></a> +<a class="sourceLine" id="cb196-7" data-line-number="7"><span class="bn"> Subsequent paragraphs are indented to show that they</span></a> +<a class="sourceLine" id="cb196-8" data-line-number="8">belong to the previous footnote.</a> +<a class="sourceLine" id="cb196-9" data-line-number="9"></a> +<a class="sourceLine" id="cb196-10" data-line-number="10"><span class="bn"> { some.code }</span></a> +<a class="sourceLine" id="cb196-11" data-line-number="11"></a> +<a class="sourceLine" id="cb196-12" data-line-number="12"><span class="bn"> The whole paragraph can be indented, or just the</span></a> +<a class="sourceLine" id="cb196-13" data-line-number="13"><span class="bn"> first line. In this way, multi-paragraph footnotes</span></a> +<a class="sourceLine" id="cb196-14" data-line-number="14"><span class="bn"> work like multi-paragraph list items.</span></a> +<a class="sourceLine" id="cb196-15" data-line-number="15"></a> +<a class="sourceLine" id="cb196-16" data-line-number="16">This paragraph won't be part of the note, because it</a> +<a class="sourceLine" id="cb196-17" data-line-number="17">isn't indented.</a></code></pre></div> </dd> </dl> </dd> @@ -2049,100 +2046,100 @@ 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> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb197"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb197-1"><a href="#cb197-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb197-2"><a href="#cb197-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[footnotes]{<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>Here is a footnote reference,[^1] and another.[^longnote]</span> -<span id="cb197-6"><a href="#cb197-6" aria-hidden="true"></a></span> -<span id="cb197-7"><a href="#cb197-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> -<span id="cb197-8"><a href="#cb197-8" aria-hidden="true"></a></span> -<span id="cb197-9"><a href="#cb197-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> -<span id="cb197-10"><a href="#cb197-10" aria-hidden="true"></a></span> -<span id="cb197-11"><a href="#cb197-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> -<span id="cb197-12"><a href="#cb197-12" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb197-13"><a href="#cb197-13" aria-hidden="true"></a></span> -<span id="cb197-14"><a href="#cb197-14" aria-hidden="true"></a> { some.code }</span> -<span id="cb197-15"><a href="#cb197-15" aria-hidden="true"></a></span> -<span id="cb197-16"><a href="#cb197-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> -<span id="cb197-17"><a href="#cb197-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> -<span id="cb197-18"><a href="#cb197-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> -<span id="cb197-19"><a href="#cb197-19" aria-hidden="true"></a></span> -<span id="cb197-20"><a href="#cb197-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb197-21"><a href="#cb197-21" aria-hidden="true"></a>isn't indented.</span> -<span id="cb197-22"><a href="#cb197-22" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb197-23"><a href="#cb197-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="cb198"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb198-1"><a href="#cb198-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-14" class="unnumbered"><span class="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="cb197"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb197-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb197-2" data-line-number="2"><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb197-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb197-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb197-5" data-line-number="5">Here is a footnote reference,[^1] and another.[^longnote]</a> +<a class="sourceLine" id="cb197-6" data-line-number="6"></a> +<a class="sourceLine" id="cb197-7" data-line-number="7">[^1]: Here is the footnote.</a> +<a class="sourceLine" id="cb197-8" data-line-number="8"></a> +<a class="sourceLine" id="cb197-9" data-line-number="9">[^longnote]: Here's one with multiple blocks.</a> +<a class="sourceLine" id="cb197-10" data-line-number="10"></a> +<a class="sourceLine" id="cb197-11" data-line-number="11"> Subsequent paragraphs are indented to show that they</a> +<a class="sourceLine" id="cb197-12" data-line-number="12">belong to the previous footnote.</a> +<a class="sourceLine" id="cb197-13" data-line-number="13"></a> +<a class="sourceLine" id="cb197-14" data-line-number="14"> { some.code }</a> +<a class="sourceLine" id="cb197-15" data-line-number="15"></a> +<a class="sourceLine" id="cb197-16" data-line-number="16"> The whole paragraph can be indented, or just the</a> +<a class="sourceLine" id="cb197-17" data-line-number="17"> first line. In this way, multi-paragraph footnotes</a> +<a class="sourceLine" id="cb197-18" data-line-number="18"> work like multi-paragraph list items.</a> +<a class="sourceLine" id="cb197-19" data-line-number="19"></a> +<a class="sourceLine" id="cb197-20" data-line-number="20">This paragraph won't be part of the note, because it</a> +<a class="sourceLine" id="cb197-21" data-line-number="21">isn't indented.</a> +<a class="sourceLine" id="cb197-22" data-line-number="22"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb197-23" data-line-number="23"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb198"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb198-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> -<p>Here is a footnote reference,<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> and another.<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a></p> +<p>Here is a footnote reference,<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a> and another.<a href="#fn2" class="footnote-ref" id="fnref2"><sup>2</sup></a></p> <p>This paragraph won’t be part of the note, because it isn’t indented.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-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="cb200"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb200-1"><a href="#cb200-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb200-2"><a href="#cb200-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionFootnotes</span>{true}</span> -<span id="cb200-3"><a href="#cb200-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb200-4"><a href="#cb200-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb200-5"><a href="#cb200-5" aria-hidden="true"></a>Here is a footnote reference,[^1] and another.[^longnote]</span> -<span id="cb200-6"><a href="#cb200-6" aria-hidden="true"></a></span> -<span id="cb200-7"><a href="#cb200-7" aria-hidden="true"></a>[^1]: Here is the footnote.</span> -<span id="cb200-8"><a href="#cb200-8" aria-hidden="true"></a></span> -<span id="cb200-9"><a href="#cb200-9" aria-hidden="true"></a>[^longnote]: Here's one with multiple blocks.</span> -<span id="cb200-10"><a href="#cb200-10" aria-hidden="true"></a></span> -<span id="cb200-11"><a href="#cb200-11" aria-hidden="true"></a> Subsequent paragraphs are indented to show that they</span> -<span id="cb200-12"><a href="#cb200-12" aria-hidden="true"></a>belong to the previous footnote.</span> -<span id="cb200-13"><a href="#cb200-13" aria-hidden="true"></a></span> -<span id="cb200-14"><a href="#cb200-14" aria-hidden="true"></a> { some.code }</span> -<span id="cb200-15"><a href="#cb200-15" aria-hidden="true"></a></span> -<span id="cb200-16"><a href="#cb200-16" aria-hidden="true"></a> The whole paragraph can be indented, or just the</span> -<span id="cb200-17"><a href="#cb200-17" aria-hidden="true"></a> first line. In this way, multi-paragraph footnotes</span> -<span id="cb200-18"><a href="#cb200-18" aria-hidden="true"></a> work like multi-paragraph list items.</span> -<span id="cb200-19"><a href="#cb200-19" aria-hidden="true"></a></span> -<span id="cb200-20"><a href="#cb200-20" aria-hidden="true"></a>This paragraph won't be part of the note, because it</span> -<span id="cb200-21"><a href="#cb200-21" aria-hidden="true"></a>isn't indented.</span> -<span id="cb200-22"><a href="#cb200-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb200-23"><a href="#cb200-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="cb201"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb201-1"><a href="#cb201-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-12" class="unnumbered">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb200"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb200-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb200-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFootnotes{true}</a> +<a class="sourceLine" id="cb200-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb200-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb200-5" data-line-number="5">Here is a footnote reference,[^1] and another.[^longnote]</a> +<a class="sourceLine" id="cb200-6" data-line-number="6"></a> +<a class="sourceLine" id="cb200-7" data-line-number="7">[^1]: Here is the footnote.</a> +<a class="sourceLine" id="cb200-8" data-line-number="8"></a> +<a class="sourceLine" id="cb200-9" data-line-number="9">[^longnote]: Here's one with multiple blocks.</a> +<a class="sourceLine" id="cb200-10" data-line-number="10"></a> +<a class="sourceLine" id="cb200-11" data-line-number="11"> Subsequent paragraphs are indented to show that they</a> +<a class="sourceLine" id="cb200-12" data-line-number="12">belong to the previous footnote.</a> +<a class="sourceLine" id="cb200-13" data-line-number="13"></a> +<a class="sourceLine" id="cb200-14" data-line-number="14"> { some.code }</a> +<a class="sourceLine" id="cb200-15" data-line-number="15"></a> +<a class="sourceLine" id="cb200-16" data-line-number="16"> The whole paragraph can be indented, or just the</a> +<a class="sourceLine" id="cb200-17" data-line-number="17"> first line. In this way, multi-paragraph footnotes</a> +<a class="sourceLine" id="cb200-18" data-line-number="18"> work like multi-paragraph list items.</a> +<a class="sourceLine" id="cb200-19" data-line-number="19"></a> +<a class="sourceLine" id="cb200-20" data-line-number="20">This paragraph won't be part of the note, because it</a> +<a class="sourceLine" id="cb200-21" data-line-number="21">isn't indented.</a> +<a class="sourceLine" id="cb200-22" data-line-number="22"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb200-23" data-line-number="23"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb201"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb201-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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>Here is a footnote reference,<a href="#fn3" class="footnote-ref" id="fnref3"><sup>3</sup></a> and another.<a href="#fn4" class="footnote-ref" id="fnref4"><sup>4</sup></a></p> <p>This paragraph won’t be part of the note, because it isn’t indented.</p> </blockquote> -<h4 data-number="2.2.1.16" id="option-frozencachecounter"><span class="header-section-number">2.2.1.16</span> Option <code>frozenCacheCounter</code></h4> +<h4 id="option-frozencachecounter"><span class="header-section-number">2.2.1.16</span> Option <code>frozenCacheCounter</code></h4> <dl> <dt><code>frozenCacheCounter</code> (default value: <code>0</code>)</dt> <dd><p>The number of the current markdown document that will be stored in an output file (frozen cache) when the <strong><code>finalizeCache</code></strong> is enabled. When the document number is 0, then a new frozen cache will be created. Otherwise, the frozen cache will be appended.</p> <p>Each frozen cache entry will define a <span class="tex">T<sub>e</sub>X</span> macro <code>\markdownFrozenCache</code>⟨<em>number</em>⟩ that will typeset markdown document number ⟨<em>number</em>⟩.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-7">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb203"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb203-1"><a href="#cb203-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb203-2"><a href="#cb203-2" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb203-3"><a href="#cb203-3" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb203-4"><a href="#cb203-4" aria-hidden="true"></a> local firstConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 0})</span> -<span id="cb203-5"><a href="#cb203-5" aria-hidden="true"></a> local firstInput = "Hello"</span> -<span id="cb203-6"><a href="#cb203-6" aria-hidden="true"></a> local secondConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 1})</span> -<span id="cb203-7"><a href="#cb203-7" aria-hidden="true"></a> local secondInput = "*world*!"</span> -<span id="cb203-8"><a href="#cb203-8" aria-hidden="true"></a> tex.sprint(firstConvert(firstInput) .. [[ ]] .. secondConvert(secondInput)) }</span> -<span id="cb203-9"><a href="#cb203-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="lua-module-example-7" class="unnumbered">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="cb203"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb203-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb203-2" data-line-number="2"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb203-3" data-line-number="3"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb203-4" data-line-number="4"> local firstConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 0})</a> +<a class="sourceLine" id="cb203-5" data-line-number="5"> local firstInput = "Hello"</a> +<a class="sourceLine" id="cb203-6" data-line-number="6"> local secondConvert = markdown.new({finalizeCache = true, frozenCacheCounter = 1})</a> +<a class="sourceLine" id="cb203-7" data-line-number="7"> local secondInput = "*world*!"</a> +<a class="sourceLine" id="cb203-8" data-line-number="8"> tex.sprint(firstConvert(firstInput) .. [[ ]] .. secondConvert(secondInput)) }</a> +<a class="sourceLine" id="cb203-9" data-line-number="9"><span class="fu">\bye</span></a></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb204"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb204-1"><a href="#cb204-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb204"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb204-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the text “Hello <em>world</em>!” A frozen cache with two entries will also be produced as we requested using the <code>frozenCacheCounter</code> option.</p> -<h4 data-number="2.2.1.17" id="option-hashenumerators"><span class="header-section-number">2.2.1.17</span> Option <code>hashEnumerators</code></h4> +<h4 id="option-hashenumerators"><span class="header-section-number">2.2.1.17</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="cb205"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb205-1"><a href="#cb205-1" aria-hidden="true"></a>#. Bird</span> -<span id="cb205-2"><a href="#cb205-2" aria-hidden="true"></a>#. McHale</span> -<span id="cb205-3"><a href="#cb205-3" aria-hidden="true"></a>#. Parish</span></code></pre></div> +<div class="sourceCode" id="cb205"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb205-1" data-line-number="1">#. Bird</a> +<a class="sourceLine" id="cb205-2" data-line-number="2">#. McHale</a> +<a class="sourceLine" id="cb205-3" data-line-number="3">#. Parish</a></code></pre></div> </dd> </dl> </dd> @@ -2153,27 +2150,27 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-15"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb206"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb206-1"><a href="#cb206-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb206-2"><a href="#cb206-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb206-3"><a href="#cb206-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb206-4"><a href="#cb206-4" aria-hidden="true"></a></span> -<span id="cb206-5"><a href="#cb206-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb206-6"><a href="#cb206-6" aria-hidden="true"></a>. Bird</span> -<span id="cb206-7"><a href="#cb206-7" aria-hidden="true"></a>. McHale</span> -<span id="cb206-8"><a href="#cb206-8" aria-hidden="true"></a>. Parish</span> -<span id="cb206-9"><a href="#cb206-9" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb206-10"><a href="#cb206-10" aria-hidden="true"></a></span> -<span id="cb206-11"><a href="#cb206-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hashEnumerators}</span> -<span id="cb206-12"><a href="#cb206-12" aria-hidden="true"></a>. Bird</span> -<span id="cb206-13"><a href="#cb206-13" aria-hidden="true"></a>. McHale</span> -<span id="cb206-14"><a href="#cb206-14" aria-hidden="true"></a>. Parish</span> -<span id="cb206-15"><a href="#cb206-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb206-16"><a href="#cb206-16" aria-hidden="true"></a></span> -<span id="cb206-17"><a href="#cb206-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="cb207"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb207-1"><a href="#cb207-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-15" class="unnumbered"><span class="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="cb206"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb206-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb206-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb206-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb206-4" data-line-number="4"></a> +<a class="sourceLine" id="cb206-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb206-6" data-line-number="6">. Bird</a> +<a class="sourceLine" id="cb206-7" data-line-number="7">. McHale</a> +<a class="sourceLine" id="cb206-8" data-line-number="8">. Parish</a> +<a class="sourceLine" id="cb206-9" data-line-number="9"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb206-10" data-line-number="10"></a> +<a class="sourceLine" id="cb206-11" data-line-number="11"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hashEnumerators}</a> +<a class="sourceLine" id="cb206-12" data-line-number="12">. Bird</a> +<a class="sourceLine" id="cb206-13" data-line-number="13">. McHale</a> +<a class="sourceLine" id="cb206-14" data-line-number="14">. Parish</a> +<a class="sourceLine" id="cb206-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb206-16" data-line-number="16"></a> +<a class="sourceLine" id="cb206-17" data-line-number="17"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb207"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb207-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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> @@ -2185,27 +2182,27 @@ Thomas,Edison,1847</code></pre> <li>Parish</li> </ol> </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="cb208"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb208-1"><a href="#cb208-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb208-2"><a href="#cb208-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb208-3"><a href="#cb208-3" aria-hidden="true"></a></span> -<span id="cb208-4"><a href="#cb208-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb208-5"><a href="#cb208-5" aria-hidden="true"></a>. Bird</span> -<span id="cb208-6"><a href="#cb208-6" aria-hidden="true"></a>. McHale</span> -<span id="cb208-7"><a href="#cb208-7" aria-hidden="true"></a>. Parish</span> -<span id="cb208-8"><a href="#cb208-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></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="fu">\def\markdownOptionHashEnumerators</span>{true}</span> -<span id="cb208-11"><a href="#cb208-11" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb208-12"><a href="#cb208-12" aria-hidden="true"></a>. Bird</span> -<span id="cb208-13"><a href="#cb208-13" aria-hidden="true"></a>. McHale</span> -<span id="cb208-14"><a href="#cb208-14" aria-hidden="true"></a>. Parish</span> -<span id="cb208-15"><a href="#cb208-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb208-16"><a href="#cb208-16" aria-hidden="true"></a></span> -<span id="cb208-17"><a href="#cb208-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="cb209"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb209-1"><a href="#cb209-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-13" class="unnumbered">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="cb208"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb208-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb208-2" data-line-number="2"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb208-3" data-line-number="3"></a> +<a class="sourceLine" id="cb208-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb208-5" data-line-number="5">. Bird</a> +<a class="sourceLine" id="cb208-6" data-line-number="6">. McHale</a> +<a class="sourceLine" id="cb208-7" data-line-number="7">. Parish</a> +<a class="sourceLine" id="cb208-8" data-line-number="8"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb208-9" data-line-number="9"></a> +<a class="sourceLine" id="cb208-10" data-line-number="10"><span class="fu">\def</span>\markdownOptionHashEnumerators{true}</a> +<a class="sourceLine" id="cb208-11" data-line-number="11"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb208-12" data-line-number="12">. Bird</a> +<a class="sourceLine" id="cb208-13" data-line-number="13">. McHale</a> +<a class="sourceLine" id="cb208-14" data-line-number="14">. Parish</a> +<a class="sourceLine" id="cb208-15" data-line-number="15"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb208-16" data-line-number="16"></a> +<a class="sourceLine" id="cb208-17" data-line-number="17"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb209"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb209-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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> @@ -2217,18 +2214,18 @@ Thomas,Edison,1847</code></pre> <li>Parish</li> </ol> </blockquote> -<h4 data-number="2.2.1.18" id="header-attributes"><span class="header-section-number">2.2.1.18</span> Option <code>headerAttributes</code></h4> +<h4 id="header-attributes"><span class="header-section-number">2.2.1.18</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="cb210"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb210-1"><a href="#cb210-1" aria-hidden="true"></a><span class="fu"># My first heading {#foo}</span></span> -<span id="cb210-2"><a href="#cb210-2" aria-hidden="true"></a></span> -<span id="cb210-3"><a href="#cb210-3" aria-hidden="true"></a><span class="fu">## My second heading ## {#bar .baz}</span></span> -<span id="cb210-4"><a href="#cb210-4" aria-hidden="true"></a></span> -<span id="cb210-5"><a href="#cb210-5" aria-hidden="true"></a>Yet another heading {key=value}</span> -<span id="cb210-6"><a href="#cb210-6" aria-hidden="true"></a><span class="fu">===================</span></span></code></pre></div> +<div class="sourceCode" id="cb210"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb210-1" data-line-number="1"><span class="fu"># My first heading {#foo}</span></a> +<a class="sourceLine" id="cb210-2" data-line-number="2"></a> +<a class="sourceLine" id="cb210-3" data-line-number="3"><span class="fu">## My second heading ## {#bar .baz}</span></a> +<a class="sourceLine" id="cb210-4" data-line-number="4"></a> +<a class="sourceLine" id="cb210-5" data-line-number="5">Yet another heading {key=value}</a> +<a class="sourceLine" id="cb210-6" data-line-number="6">===================</a></code></pre></div> <p>These HTML attributes have currently no effect other than enabling <a href="#slice">content slicing</a>.</p> </dd> </dl> @@ -2240,7 +2237,7 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h4 data-number="2.2.1.19" id="option-html"><span class="header-section-number">2.2.1.19</span> Option <code>html</code></h4> +<h4 id="option-html"><span class="header-section-number">2.2.1.19</span> Option <code>html</code></h4> <dl> <dt><code>html</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -2256,160 +2253,160 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-8">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb211"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb211-1"><a href="#cb211-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb211-2"><a href="#cb211-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb211-3"><a href="#cb211-3" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb211-4"><a href="#cb211-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb211-5"><a href="#cb211-5" aria-hidden="true"></a> local convert = markdown.new()</span> -<span id="cb211-6"><a href="#cb211-6" aria-hidden="true"></a> local newline = [[^^J^^J]]</span> -<span id="cb211-7"><a href="#cb211-7" aria-hidden="true"></a> local input =</span> -<span id="cb211-8"><a href="#cb211-8" aria-hidden="true"></a> "<div>*There is no block tag support.*</div>" .. newline ..</span> -<span id="cb211-9"><a href="#cb211-9" aria-hidden="true"></a> "*There is no <inline tag="tag"></inline> support.*" .. newline ..</span> -<span id="cb211-10"><a href="#cb211-10" aria-hidden="true"></a> "_There is no <!-- comment --> support._" .. newline ..</span> -<span id="cb211-11"><a href="#cb211-11" aria-hidden="true"></a> "_There is no <? HTML instruction ?> support._"</span> -<span id="cb211-12"><a href="#cb211-12" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb211-13"><a href="#cb211-13" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb211-14"><a href="#cb211-14" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb211-15"><a href="#cb211-15" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb211-16"><a href="#cb211-16" aria-hidden="true"></a> local convert = markdown.new({html = true})</span> -<span id="cb211-17"><a href="#cb211-17" aria-hidden="true"></a> local input =</span> -<span id="cb211-18"><a href="#cb211-18" aria-hidden="true"></a> "<div>*There is block tag support.*</div>" .. newline ..</span> -<span id="cb211-19"><a href="#cb211-19" aria-hidden="true"></a> "*There is <inline tag="tag"></inline> support.*" .. newline ..</span> -<span id="cb211-20"><a href="#cb211-20" aria-hidden="true"></a> "_There is <!-- comment --> support._" .. newline ..</span> -<span id="cb211-21"><a href="#cb211-21" aria-hidden="true"></a> "_There is <? HTML instruction ?> support._"</span> -<span id="cb211-22"><a href="#cb211-22" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb211-23"><a href="#cb211-23" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="lua-module-example-8" class="unnumbered">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="cb211"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb211-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb211-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb211-3" data-line-number="3"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb211-4" data-line-number="4"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb211-5" data-line-number="5"> local convert = markdown.new()</a> +<a class="sourceLine" id="cb211-6" data-line-number="6"> local newline = [[^^J^^J]]</a> +<a class="sourceLine" id="cb211-7" data-line-number="7"> local input =</a> +<a class="sourceLine" id="cb211-8" data-line-number="8"> "<div>*There is no block tag support.*</div>" .. newline ..</a> +<a class="sourceLine" id="cb211-9" data-line-number="9"> "*There is no <inline tag="tag"></inline> support.*" .. newline ..</a> +<a class="sourceLine" id="cb211-10" data-line-number="10"> "_There is no <!-- comment --> support._" .. newline ..</a> +<a class="sourceLine" id="cb211-11" data-line-number="11"> "_There is no <? HTML instruction ?> support._"</a> +<a class="sourceLine" id="cb211-12" data-line-number="12"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb211-13" data-line-number="13"><span class="fu">\par</span></a> +<a class="sourceLine" id="cb211-14" data-line-number="14"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb211-15" data-line-number="15"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb211-16" data-line-number="16"> local convert = markdown.new({html = true})</a> +<a class="sourceLine" id="cb211-17" data-line-number="17"> local input =</a> +<a class="sourceLine" id="cb211-18" data-line-number="18"> "<div>*There is block tag support.*</div>" .. newline ..</a> +<a class="sourceLine" id="cb211-19" data-line-number="19"> "*There is <inline tag="tag"></inline> support.*" .. newline ..</a> +<a class="sourceLine" id="cb211-20" data-line-number="20"> "_There is <!-- comment --> support._" .. newline ..</a> +<a class="sourceLine" id="cb211-21" data-line-number="21"> "_There is <? HTML instruction ?> support._"</a> +<a class="sourceLine" id="cb211-22" data-line-number="22"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb211-23" data-line-number="23"><span class="fu">\bye</span></a></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb212"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb212-1"><a href="#cb212-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb212"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb212-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-7">Lua CLI Example</h5> +<h5 id="lua-cli-example-7" class="unnumbered">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="cb213"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb213-1"><a href="#cb213-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb213-2"><a href="#cb213-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb213-3"><a href="#cb213-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb213-4"><a href="#cb213-4" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb213-5"><a href="#cb213-5" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb213-6"><a href="#cb213-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb213"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb213-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb213-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb213-3" data-line-number="3"><span class="fu">\input</span> optionfalse</a> +<a class="sourceLine" id="cb213-4" data-line-number="4"><span class="fu">\par</span></a> +<a class="sourceLine" id="cb213-5" data-line-number="5"><span class="fu">\input</span> optiontrue</a> +<a class="sourceLine" id="cb213-6" data-line-number="6"><span class="fu">\bye</span></a></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="cb214"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb214-1"><a href="#cb214-1" aria-hidden="true"></a><span class="kw"><div></span></span> -<span id="cb214-2"><a href="#cb214-2" aria-hidden="true"></a>*Is there block tag support?*</span> -<span id="cb214-3"><a href="#cb214-3" aria-hidden="true"></a><span class="kw"></div></span></span> -<span id="cb214-4"><a href="#cb214-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="cb214-5"><a href="#cb214-5" aria-hidden="true"></a>_Is there <span class="co"><!-- comment --></span> support?_</span> -<span id="cb214-6"><a href="#cb214-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="cb215"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb215-1"><a href="#cb215-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb215-2"><a href="#cb215-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ html=true -- content.md optiontrue.tex</span> -<span id="cb215-3"><a href="#cb215-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb214"><pre class="sourceCode html"><code class="sourceCode html"><a class="sourceLine" id="cb214-1" data-line-number="1"><span class="kw"><div></span></a> +<a class="sourceLine" id="cb214-2" data-line-number="2">*Is there block tag support?*</a> +<a class="sourceLine" id="cb214-3" data-line-number="3"><span class="kw"></div></span></a> +<a class="sourceLine" id="cb214-4" data-line-number="4">*Is there <span class="kw"><inline</span><span class="ot"> tag=</span><span class="st">"tag"</span><span class="kw">></inline></span> support?*</a> +<a class="sourceLine" id="cb214-5" data-line-number="5">_Is there <span class="co"><!-- comment --></span> support?_</a> +<a class="sourceLine" id="cb214-6" data-line-number="6">_Is there <span class="kw"><?</span> HTML instruction <span class="kw">?></span> support?_</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb215"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb215-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</a> +<a class="sourceLine" id="cb215-2" data-line-number="2"><span class="ex">texlua</span> ⟨CLI pathname⟩ html=true -- content.md optiontrue.tex</a> +<a class="sourceLine" id="cb215-3" data-line-number="3"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>Is there block tag support?</div> Is there <inline tag=”tag”></inline> support? Is there <!– comment –> support? Is there <? HTML instruction ?> support?</p> <p>Is there support? Is there support? Is there support?</p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-8">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb216"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb216-1"><a href="#cb216-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb216-2"><a href="#cb216-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb216-3"><a href="#cb216-3" aria-hidden="true"></a></span> -<span id="cb216-4"><a href="#cb216-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb216-5"><a href="#cb216-5" aria-hidden="true"></a><div></span> -<span id="cb216-6"><a href="#cb216-6" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb216-7"><a href="#cb216-7" aria-hidden="true"></a></div></span> -<span id="cb216-8"><a href="#cb216-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb216-9"><a href="#cb216-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb216-10"><a href="#cb216-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb216-11"><a href="#cb216-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb216-12"><a href="#cb216-12" aria-hidden="true"></a></span> -<span id="cb216-13"><a href="#cb216-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> -<span id="cb216-14"><a href="#cb216-14" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb216-15"><a href="#cb216-15" aria-hidden="true"></a><div></span> -<span id="cb216-16"><a href="#cb216-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb216-17"><a href="#cb216-17" aria-hidden="true"></a></div></span> -<span id="cb216-18"><a href="#cb216-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb216-19"><a href="#cb216-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb216-20"><a href="#cb216-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb216-21"><a href="#cb216-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb216-22"><a href="#cb216-22" aria-hidden="true"></a></span> -<span id="cb216-23"><a href="#cb216-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="cb217"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb217-1"><a href="#cb217-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-8" class="unnumbered">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="cb216"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb216-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb216-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb216-3" data-line-number="3"></a> +<a class="sourceLine" id="cb216-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb216-5" data-line-number="5"><div></a> +<a class="sourceLine" id="cb216-6" data-line-number="6">*There is no block tag support.*</a> +<a class="sourceLine" id="cb216-7" data-line-number="7"></div></a> +<a class="sourceLine" id="cb216-8" data-line-number="8">*There is no <inline tag="tag"></inline> support.*</a> +<a class="sourceLine" id="cb216-9" data-line-number="9">_There is no <!-- comment --> support._</a> +<a class="sourceLine" id="cb216-10" data-line-number="10">_There is no <? HTML instruction ?> support._</a> +<a class="sourceLine" id="cb216-11" data-line-number="11"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb216-12" data-line-number="12"></a> +<a class="sourceLine" id="cb216-13" data-line-number="13"><span class="fu">\def</span>\markdownOptionHtml{true}</a> +<a class="sourceLine" id="cb216-14" data-line-number="14"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb216-15" data-line-number="15"><div></a> +<a class="sourceLine" id="cb216-16" data-line-number="16">*There is block tag support.*</a> +<a class="sourceLine" id="cb216-17" data-line-number="17"></div></a> +<a class="sourceLine" id="cb216-18" data-line-number="18">*There is <inline tag="tag"></inline> support.*</a> +<a class="sourceLine" id="cb216-19" data-line-number="19">_There is <!-- comment --> support._</a> +<a class="sourceLine" id="cb216-20" data-line-number="20">_There is <? HTML instruction ?> support._</a> +<a class="sourceLine" id="cb216-21" data-line-number="21"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb216-22" data-line-number="22"></a> +<a class="sourceLine" id="cb216-23" data-line-number="23"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb217"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb217-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-16"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb218"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb218-1"><a href="#cb218-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb218-2"><a href="#cb218-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb218-3"><a href="#cb218-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb218-4"><a href="#cb218-4" aria-hidden="true"></a></span> -<span id="cb218-5"><a href="#cb218-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb218-6"><a href="#cb218-6" aria-hidden="true"></a><div></span> -<span id="cb218-7"><a href="#cb218-7" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb218-8"><a href="#cb218-8" aria-hidden="true"></a></div></span> -<span id="cb218-9"><a href="#cb218-9" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb218-10"><a href="#cb218-10" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb218-11"><a href="#cb218-11" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb218-12"><a href="#cb218-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb218-13"><a href="#cb218-13" aria-hidden="true"></a></span> -<span id="cb218-14"><a href="#cb218-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{html}</span> -<span id="cb218-15"><a href="#cb218-15" aria-hidden="true"></a><div></span> -<span id="cb218-16"><a href="#cb218-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb218-17"><a href="#cb218-17" aria-hidden="true"></a></div></span> -<span id="cb218-18"><a href="#cb218-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb218-19"><a href="#cb218-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb218-20"><a href="#cb218-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb218-21"><a href="#cb218-21" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb218-22"><a href="#cb218-22" aria-hidden="true"></a></span> -<span id="cb218-23"><a href="#cb218-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="cb219"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb219-1"><a href="#cb219-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-16" class="unnumbered"><span class="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="cb218"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb218-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb218-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb218-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb218-4" data-line-number="4"></a> +<a class="sourceLine" id="cb218-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb218-6" data-line-number="6"><div></a> +<a class="sourceLine" id="cb218-7" data-line-number="7">*There is no block tag support.*</a> +<a class="sourceLine" id="cb218-8" data-line-number="8"></div></a> +<a class="sourceLine" id="cb218-9" data-line-number="9">*There is no <inline tag="tag"></inline> support.*</a> +<a class="sourceLine" id="cb218-10" data-line-number="10">_There is no <!-- comment --> support._</a> +<a class="sourceLine" id="cb218-11" data-line-number="11">_There is no <? HTML instruction ?> support._</a> +<a class="sourceLine" id="cb218-12" data-line-number="12"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb218-13" data-line-number="13"></a> +<a class="sourceLine" id="cb218-14" data-line-number="14"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{html}</a> +<a class="sourceLine" id="cb218-15" data-line-number="15"><div></a> +<a class="sourceLine" id="cb218-16" data-line-number="16">*There is block tag support.*</a> +<a class="sourceLine" id="cb218-17" data-line-number="17"></div></a> +<a class="sourceLine" id="cb218-18" data-line-number="18">*There is <inline tag="tag"></inline> support.*</a> +<a class="sourceLine" id="cb218-19" data-line-number="19">_There is <!-- comment --> support._</a> +<a class="sourceLine" id="cb218-20" data-line-number="20">_There is <? HTML instruction ?> support._</a> +<a class="sourceLine" id="cb218-21" data-line-number="21"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb218-22" data-line-number="22"></a> +<a class="sourceLine" id="cb218-23" data-line-number="23"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb219"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb219-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-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="cb220"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb220-1"><a href="#cb220-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb220-2"><a href="#cb220-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb220-3"><a href="#cb220-3" aria-hidden="true"></a></span> -<span id="cb220-4"><a href="#cb220-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb220-5"><a href="#cb220-5" aria-hidden="true"></a><div></span> -<span id="cb220-6"><a href="#cb220-6" aria-hidden="true"></a>*There is no block tag support.*</span> -<span id="cb220-7"><a href="#cb220-7" aria-hidden="true"></a></div></span> -<span id="cb220-8"><a href="#cb220-8" aria-hidden="true"></a>*There is no <inline tag="tag"></inline> support.*</span> -<span id="cb220-9"><a href="#cb220-9" aria-hidden="true"></a>_There is no <!-- comment --> support._</span> -<span id="cb220-10"><a href="#cb220-10" aria-hidden="true"></a>_There is no <? HTML instruction ?> support._</span> -<span id="cb220-11"><a href="#cb220-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb220-12"><a href="#cb220-12" aria-hidden="true"></a></span> -<span id="cb220-13"><a href="#cb220-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionHtml</span>{true}</span> -<span id="cb220-14"><a href="#cb220-14" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb220-15"><a href="#cb220-15" aria-hidden="true"></a><div></span> -<span id="cb220-16"><a href="#cb220-16" aria-hidden="true"></a>*There is block tag support.*</span> -<span id="cb220-17"><a href="#cb220-17" aria-hidden="true"></a></div></span> -<span id="cb220-18"><a href="#cb220-18" aria-hidden="true"></a>*There is <inline tag="tag"></inline> support.*</span> -<span id="cb220-19"><a href="#cb220-19" aria-hidden="true"></a>_There is <!-- comment --> support._</span> -<span id="cb220-20"><a href="#cb220-20" aria-hidden="true"></a>_There is <? HTML instruction ?> support._</span> -<span id="cb220-21"><a href="#cb220-21" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb220-22"><a href="#cb220-22" aria-hidden="true"></a></span> -<span id="cb220-23"><a href="#cb220-23" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb221"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb221-1"><a href="#cb221-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-14" class="unnumbered">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb220"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb220-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb220-2" data-line-number="2"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb220-3" data-line-number="3"></a> +<a class="sourceLine" id="cb220-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb220-5" data-line-number="5"><div></a> +<a class="sourceLine" id="cb220-6" data-line-number="6">*There is no block tag support.*</a> +<a class="sourceLine" id="cb220-7" data-line-number="7"></div></a> +<a class="sourceLine" id="cb220-8" data-line-number="8">*There is no <inline tag="tag"></inline> support.*</a> +<a class="sourceLine" id="cb220-9" data-line-number="9">_There is no <!-- comment --> support._</a> +<a class="sourceLine" id="cb220-10" data-line-number="10">_There is no <? HTML instruction ?> support._</a> +<a class="sourceLine" id="cb220-11" data-line-number="11"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb220-12" data-line-number="12"></a> +<a class="sourceLine" id="cb220-13" data-line-number="13"><span class="fu">\def</span>\markdownOptionHtml{true}</a> +<a class="sourceLine" id="cb220-14" data-line-number="14"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb220-15" data-line-number="15"><div></a> +<a class="sourceLine" id="cb220-16" data-line-number="16">*There is block tag support.*</a> +<a class="sourceLine" id="cb220-17" data-line-number="17"></div></a> +<a class="sourceLine" id="cb220-18" data-line-number="18">*There is <inline tag="tag"></inline> support.*</a> +<a class="sourceLine" id="cb220-19" data-line-number="19">_There is <!-- comment --> support._</a> +<a class="sourceLine" id="cb220-20" data-line-number="20">_There is <? HTML instruction ?> support._</a> +<a class="sourceLine" id="cb220-21" data-line-number="21"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb220-22" data-line-number="22"></a> +<a class="sourceLine" id="cb220-23" data-line-number="23"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb221"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb221-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p><div>There is no block tag support.</div> There is no <inline tag=”tag”></inline> support. There is no <!– comment –> support. There is no <? HTML instruction ?> support.</p> <p>There is support. There is support. There is support.</p> </blockquote> -<h4 data-number="2.2.1.20" id="option-hybrid"><span class="header-section-number">2.2.1.20</span> Option <code>hybrid</code></h4> +<h4 id="option-hybrid"><span class="header-section-number">2.2.1.20</span> Option <code>hybrid</code></h4> <dl> <dt><code>hybrid</code> (default value: <code>true</code>)</dt> <dd><dl> @@ -2425,130 +2422,130 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-9">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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">\directlua</span>{</span> -<span id="cb222-4"><a href="#cb222-4" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb222-5"><a href="#cb222-5" aria-hidden="true"></a> local input, convert_safe, convert_unsafe, paragraph</span> -<span id="cb222-6"><a href="#cb222-6" aria-hidden="true"></a></span> -<span id="cb222-7"><a href="#cb222-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="cb222-8"><a href="#cb222-8" aria-hidden="true"></a> convert_safe = markdown.new()</span> -<span id="cb222-9"><a href="#cb222-9" aria-hidden="true"></a> convert_unsafe = markdown.new({hybrid = true})</span> -<span id="cb222-10"><a href="#cb222-10" aria-hidden="true"></a> paragraph = [[<span class="fu">\par</span>]]</span> -<span id="cb222-11"><a href="#cb222-11" aria-hidden="true"></a></span> -<span id="cb222-12"><a href="#cb222-12" aria-hidden="true"></a> tex.sprint(</span> -<span id="cb222-13"><a href="#cb222-13" aria-hidden="true"></a> convert_safe(input) .. paragraph ..</span> -<span id="cb222-14"><a href="#cb222-14" aria-hidden="true"></a> convert_unsafe(input)</span> -<span id="cb222-15"><a href="#cb222-15" aria-hidden="true"></a> )</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">\bye</span></span></code></pre></div> +<h5 id="lua-module-example-9" class="unnumbered">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="cb222"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb222-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb222-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb222-3" data-line-number="3"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb222-4" data-line-number="4"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb222-5" data-line-number="5"> local input, convert_safe, convert_unsafe, paragraph</a> +<a class="sourceLine" id="cb222-6" data-line-number="6"></a> +<a class="sourceLine" id="cb222-7" data-line-number="7"> input = [[<span class="ss">$</span><span class="sc">\string\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.]]</a> +<a class="sourceLine" id="cb222-8" data-line-number="8"> convert_safe = markdown.new()</a> +<a class="sourceLine" id="cb222-9" data-line-number="9"> convert_unsafe = markdown.new({hybrid = true})</a> +<a class="sourceLine" id="cb222-10" data-line-number="10"> paragraph = [[<span class="fu">\par</span>]]</a> +<a class="sourceLine" id="cb222-11" data-line-number="11"></a> +<a class="sourceLine" id="cb222-12" data-line-number="12"> tex.sprint(</a> +<a class="sourceLine" id="cb222-13" data-line-number="13"> convert_safe(input) .. paragraph ..</a> +<a class="sourceLine" id="cb222-14" data-line-number="14"> convert_unsafe(input)</a> +<a class="sourceLine" id="cb222-15" data-line-number="15"> )</a> +<a class="sourceLine" id="cb222-16" data-line-number="16">}</a> +<a class="sourceLine" id="cb222-17" data-line-number="17"><span class="fu">\bye</span></a></code></pre></div> <p>Then, 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">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb223"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb223-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-8">Lua CLI Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb224"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb224-1"><a href="#cb224-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb224-2"><a href="#cb224-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb224-3"><a href="#cb224-3" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</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><span class="fu">\begingroup</span></span> -<span id="cb224-6"><a href="#cb224-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> -<span id="cb224-7"><a href="#cb224-7" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb224-8"><a href="#cb224-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> -<span id="cb224-9"><a href="#cb224-9" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="lua-cli-example-8" class="unnumbered">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="cb224"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb224-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb224-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb224-3" data-line-number="3"><span class="fu">\input</span> optionfalse</a> +<a class="sourceLine" id="cb224-4" data-line-number="4"></a> +<a class="sourceLine" id="cb224-5" data-line-number="5"><span class="fu">\begingroup</span></a> +<a class="sourceLine" id="cb224-6" data-line-number="6"><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</a> +<a class="sourceLine" id="cb224-7" data-line-number="7"><span class="fu">\input</span> optiontrue</a> +<a class="sourceLine" id="cb224-8" data-line-number="8"><span class="fu">\endgroup</span></a> +<a class="sourceLine" id="cb224-9" data-line-number="9"><span class="fu">\bye</span></a></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="cb225"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb225-1"><a href="#cb225-1" aria-hidden="true"></a>$\sqrt{-1}$ *equals* $i$.</span></code></pre></div> +<div class="sourceCode" id="cb225"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb225-1" data-line-number="1">$\sqrt{-1}$ *equals* $i$.</a></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">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb226-2"><a href="#cb226-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- content.md optiontrue.tex</span> -<span id="cb226-3"><a href="#cb226-3" 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"><a class="sourceLine" id="cb226-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</a> +<a class="sourceLine" id="cb226-2" data-line-number="2"><span class="ex">texlua</span> ⟨CLI pathname⟩ hybrid=true -- content.md optiontrue.tex</a> +<a class="sourceLine" id="cb226-3" data-line-number="3"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-9">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="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> -<span id="cb227-4"><a href="#cb227-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb227-5"><a href="#cb227-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="cb227-6"><a href="#cb227-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb227-7"><a href="#cb227-7" aria-hidden="true"></a></span> -<span id="cb227-8"><a href="#cb227-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb227-9"><a href="#cb227-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb227-10"><a href="#cb227-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="cb227-11"><a href="#cb227-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb227-12"><a href="#cb227-12" aria-hidden="true"></a></span> -<span id="cb227-13"><a href="#cb227-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="cb228"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb228-1"><a href="#cb228-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-9" class="unnumbered">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="cb227"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb227-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb227-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb227-3" data-line-number="3"></a> +<a class="sourceLine" id="cb227-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb227-5" data-line-number="5"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</a> +<a class="sourceLine" id="cb227-6" data-line-number="6"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb227-7" data-line-number="7"></a> +<a class="sourceLine" id="cb227-8" data-line-number="8"><span class="fu">\def</span>\markdownOptionHybrid{true}</a> +<a class="sourceLine" id="cb227-9" data-line-number="9"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb227-10" data-line-number="10"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</a> +<a class="sourceLine" id="cb227-11" data-line-number="11"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb227-12" data-line-number="12"></a> +<a class="sourceLine" id="cb227-13" data-line-number="13"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb228"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb228-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="latex-example-17"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<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="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb229-2"><a href="#cb229-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb229-3"><a href="#cb229-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb229-4"><a href="#cb229-4" aria-hidden="true"></a></span> -<span id="cb229-5"><a href="#cb229-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb229-6"><a href="#cb229-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="cb229-7"><a href="#cb229-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb229-8"><a href="#cb229-8" aria-hidden="true"></a></span> -<span id="cb229-9"><a href="#cb229-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> -<span id="cb229-10"><a href="#cb229-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="cb229-11"><a href="#cb229-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</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="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb230"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb230-1"><a href="#cb230-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-17" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb229"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb229-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb229-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb229-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb229-4" data-line-number="4"></a> +<a class="sourceLine" id="cb229-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb229-6" data-line-number="6"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</a> +<a class="sourceLine" id="cb229-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb229-8" data-line-number="8"></a> +<a class="sourceLine" id="cb229-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</a> +<a class="sourceLine" id="cb229-10" data-line-number="10"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</a> +<a class="sourceLine" id="cb229-11" data-line-number="11"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb229-12" data-line-number="12"></a> +<a class="sourceLine" id="cb229-13" data-line-number="13"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb230"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb230-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-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="cb231"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb231-1"><a href="#cb231-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb231-2"><a href="#cb231-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb231-3"><a href="#cb231-3" aria-hidden="true"></a></span> -<span id="cb231-4"><a href="#cb231-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb231-5"><a href="#cb231-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="cb231-6"><a href="#cb231-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb231-7"><a href="#cb231-7" aria-hidden="true"></a></span> -<span id="cb231-8"><a href="#cb231-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb231-9"><a href="#cb231-9" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb231-10"><a href="#cb231-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="cb231-11"><a href="#cb231-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb231-12"><a href="#cb231-12" aria-hidden="true"></a></span> -<span id="cb231-13"><a href="#cb231-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="cb232"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb232-1"><a href="#cb232-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-15" class="unnumbered">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="cb231"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb231-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb231-2" data-line-number="2"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb231-3" data-line-number="3"></a> +<a class="sourceLine" id="cb231-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb231-5" data-line-number="5"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</a> +<a class="sourceLine" id="cb231-6" data-line-number="6"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb231-7" data-line-number="7"></a> +<a class="sourceLine" id="cb231-8" data-line-number="8"><span class="fu">\def</span>\markdownOptionHybrid{true}</a> +<a class="sourceLine" id="cb231-9" data-line-number="9"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb231-10" data-line-number="10"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>.</a> +<a class="sourceLine" id="cb231-11" data-line-number="11"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb231-12" data-line-number="12"></a> +<a class="sourceLine" id="cb231-13" data-line-number="13"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb232"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb232-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt {-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h4 data-number="2.2.1.21" id="option-inlinefootnotes"><span class="header-section-number">2.2.1.21</span> Option <code>inlineFootnotes</code></h4> +<h4 id="option-inlinefootnotes"><span class="header-section-number">2.2.1.21</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="cb233"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb233-1"><a href="#cb233-1" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb233-2"><a href="#cb233-2" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb233-3"><a href="#cb233-3" aria-hidden="true"></a>move down to type the note.]</span></code></pre></div> +<div class="sourceCode" id="cb233"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb233-1" data-line-number="1">Here is an inline note.^[Inlines notes are easier to</a> +<a class="sourceLine" id="cb233-2" data-line-number="2">write, since you don't have to pick an identifier and</a> +<a class="sourceLine" id="cb233-3" data-line-number="3">move down to type the note.]</a></code></pre></div> </dd> </dl> </dd> @@ -2559,51 +2556,51 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-18"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb234"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb234-1"><a href="#cb234-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb234-2"><a href="#cb234-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[inlineFootnotes]{<span class="ex">markdown</span>}</span> -<span id="cb234-3"><a href="#cb234-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb234-4"><a href="#cb234-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb234-5"><a href="#cb234-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb234-6"><a href="#cb234-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb234-7"><a href="#cb234-7" aria-hidden="true"></a>move down to type the note.]</span> -<span id="cb234-8"><a href="#cb234-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb234-9"><a href="#cb234-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="cb235"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb235-1"><a href="#cb235-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-18" class="unnumbered"><span class="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="cb234"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb234-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb234-2" data-line-number="2"><span class="bu">\usepackage</span>[inlineFootnotes]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb234-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb234-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb234-5" data-line-number="5">Here is an inline note.^[Inlines notes are easier to</a> +<a class="sourceLine" id="cb234-6" data-line-number="6">write, since you don't have to pick an identifier and</a> +<a class="sourceLine" id="cb234-7" data-line-number="7">move down to type the note.]</a> +<a class="sourceLine" id="cb234-8" data-line-number="8"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb234-9" data-line-number="9"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb235"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb235-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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> +<p>Here is an inline note.<a href="#fn5" class="footnote-ref" id="fnref5"><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> +<h5 id="context-example-16" class="unnumbered">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="cb236"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb236-1"><a href="#cb236-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb236-2"><a href="#cb236-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionInlineFootnotes</span>{true}</span> -<span id="cb236-3"><a href="#cb236-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb236-4"><a href="#cb236-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb236-5"><a href="#cb236-5" aria-hidden="true"></a>Here is an inline note.^[Inlines notes are easier to</span> -<span id="cb236-6"><a href="#cb236-6" aria-hidden="true"></a>write, since you don't have to pick an identifier and</span> -<span id="cb236-7"><a href="#cb236-7" aria-hidden="true"></a>move down to type the note.]</span> -<span id="cb236-8"><a href="#cb236-8" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb236-9"><a href="#cb236-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb236"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb236-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb236-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionInlineFootnotes{true}</a> +<a class="sourceLine" id="cb236-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb236-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb236-5" data-line-number="5">Here is an inline note.^[Inlines notes are easier to</a> +<a class="sourceLine" id="cb236-6" data-line-number="6">write, since you don't have to pick an identifier and</a> +<a class="sourceLine" id="cb236-7" data-line-number="7">move down to type the note.]</a> +<a class="sourceLine" id="cb236-8" data-line-number="8"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb236-9" data-line-number="9"><span class="fu">\stoptext</span></a></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">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb237"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb237-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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> +<p>Here is an inline note.<a href="#fn6" class="footnote-ref" id="fnref6"><sup>6</sup></a></p> </blockquote> -<h4 data-number="2.2.1.22" id="pipe-tables"><span class="header-section-number">2.2.1.22</span> Option <code>pipeTables</code></h4> +<h4 id="pipe-tables"><span class="header-section-number">2.2.1.22</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="cb238"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb238-1"><a href="#cb238-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb238-2"><a href="#cb238-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb238-3"><a href="#cb238-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb238-4"><a href="#cb238-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb238-5"><a href="#cb238-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span></code></pre></div> +<div class="sourceCode" id="cb238"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb238-1" data-line-number="1">| Right | Left | Default | Center |</a> +<a class="sourceLine" id="cb238-2" data-line-number="2">|------:|:-----|---------|:------:|</a> +<a class="sourceLine" id="cb238-3" data-line-number="3">| 12 | 12 | 12 | 12 |</a> +<a class="sourceLine" id="cb238-4" data-line-number="4">| 123 | 123 | 123 | 123 |</a> +<a class="sourceLine" id="cb238-5" data-line-number="5">| 1 | 1 | 1 | 1 |</a></code></pre></div> </dd> </dl> </dd> @@ -2614,21 +2611,21 @@ 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> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb239"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb239-1"><a href="#cb239-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb239-2"><a href="#cb239-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables]{<span class="ex">markdown</span>}</span> -<span id="cb239-3"><a href="#cb239-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb239-4"><a href="#cb239-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb239-5"><a href="#cb239-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb239-6"><a href="#cb239-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb239-7"><a href="#cb239-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb239-8"><a href="#cb239-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb239-9"><a href="#cb239-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb239-10"><a href="#cb239-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb239-11"><a href="#cb239-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="cb240"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb240-1"><a href="#cb240-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-19" class="unnumbered"><span class="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="cb239"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb239-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb239-2" data-line-number="2"><span class="bu">\usepackage</span>[pipeTables]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb239-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb239-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb239-5" data-line-number="5">| Right | Left | Default | Center |</a> +<a class="sourceLine" id="cb239-6" data-line-number="6">|------:|:-----|---------|:------:|</a> +<a class="sourceLine" id="cb239-7" data-line-number="7">| 12 | 12 | 12 | 12 |</a> +<a class="sourceLine" id="cb239-8" data-line-number="8">| 123 | 123 | 123 | 123 |</a> +<a class="sourceLine" id="cb239-9" data-line-number="9">| 1 | 1 | 1 | 1 |</a> +<a class="sourceLine" id="cb239-10" data-line-number="10"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb239-11" data-line-number="11"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb240"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb240-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -2662,21 +2659,21 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </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="cb241"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb241-1"><a href="#cb241-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb241-2"><a href="#cb241-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionPipeTables</span>{true}</span> -<span id="cb241-3"><a href="#cb241-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb241-4"><a href="#cb241-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb241-5"><a href="#cb241-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb241-6"><a href="#cb241-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb241-7"><a href="#cb241-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb241-8"><a href="#cb241-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb241-9"><a href="#cb241-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb241-10"><a href="#cb241-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb241-11"><a href="#cb241-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="cb242"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb242-1"><a href="#cb242-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-17" class="unnumbered">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="cb241"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb241-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb241-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionPipeTables{true}</a> +<a class="sourceLine" id="cb241-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb241-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb241-5" data-line-number="5">| Right | Left | Default | Center |</a> +<a class="sourceLine" id="cb241-6" data-line-number="6">|------:|:-----|---------|:------:|</a> +<a class="sourceLine" id="cb241-7" data-line-number="7">| 12 | 12 | 12 | 12 |</a> +<a class="sourceLine" id="cb241-8" data-line-number="8">| 123 | 123 | 123 | 123 |</a> +<a class="sourceLine" id="cb241-9" data-line-number="9">| 1 | 1 | 1 | 1 |</a> +<a class="sourceLine" id="cb241-10" data-line-number="10"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb241-11" data-line-number="11"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb242"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb242-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -2710,7 +2707,7 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </blockquote> -<h4 data-number="2.2.1.23" id="option-preservetabs"><span class="header-section-number">2.2.1.23</span> Option <code>preserveTabs</code></h4> +<h4 id="option-preservetabs"><span class="header-section-number">2.2.1.23</span> Option <code>preserveTabs</code></h4> <dl> <dt><code>preserveTabs</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -2726,88 +2723,88 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h4 data-number="2.2.1.24" id="option-shiftheadings"><span class="header-section-number">2.2.1.24</span> Option <code>shiftHeadings</code></h4> +<h4 id="option-shiftheadings"><span class="header-section-number">2.2.1.24</span> Option <code>shiftHeadings</code></h4> <dl> <dt><code>shiftHeadings</code> (default value: <code>0</code>)</dt> <dd><p>All headings will be shifted by ⟨<em>shift amount</em>⟩, which can be both positive and negative. Headings will not be shifted beyond level 6 or below level 1. Instead, those headings will be shifted to level 6, when ⟨<em>shift amount</em>⟩ is positive, and to level 1, when ⟨<em>shift amount</em>⟩ is negative.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-10">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<h5 id="plain-tex-example-10" class="unnumbered">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="cb243"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb243-1"><a href="#cb243-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="cb244"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb244-1"><a href="#cb244-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb244-2"><a href="#cb244-2" aria-hidden="true"></a></span> -<span id="cb244-3"><a href="#cb244-3" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> -<span id="cb244-4"><a href="#cb244-4" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> -<span id="cb244-5"><a href="#cb244-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="cb244-6"><a href="#cb244-6" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> -<span id="cb244-7"><a href="#cb244-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="cb244-8"><a href="#cb244-8" aria-hidden="true"></a></span> -<span id="cb244-9"><a href="#cb244-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> -<span id="cb244-10"><a href="#cb244-10" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb244-11"><a href="#cb244-11" aria-hidden="true"></a></span> -<span id="cb244-12"><a href="#cb244-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span> -<span id="cb244-13"><a href="#cb244-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb244-14"><a href="#cb244-14" aria-hidden="true"></a></span> -<span id="cb244-15"><a href="#cb244-15" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> -<span id="cb244-16"><a href="#cb244-16" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb244-17"><a href="#cb244-17" aria-hidden="true"></a></span> -<span id="cb244-18"><a href="#cb244-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="cb245"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb245-1"><a href="#cb245-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb243"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb243-1" data-line-number="1"><span class="fu">## A section</span></a></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="cb244"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb244-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb244-2" data-line-number="2"></a> +<a class="sourceLine" id="cb244-3" data-line-number="3"><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></a> +<a class="sourceLine" id="cb244-4" data-line-number="4"><span class="fu">\font\big</span>=cmr10 at 12pt</a> +<a class="sourceLine" id="cb244-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererHeadingTwo#1{{\big #1\par}}</a> +<a class="sourceLine" id="cb244-6" data-line-number="6"><span class="fu">\font\bigger</span>=cmr10 scaled 1440</a> +<a class="sourceLine" id="cb244-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererHeadingOne#1{{\bigger #1\par}}</a> +<a class="sourceLine" id="cb244-8" data-line-number="8"></a> +<a class="sourceLine" id="cb244-9" data-line-number="9"><span class="fu">\def</span>\markdownOptionShiftHeadings{-1}</a> +<a class="sourceLine" id="cb244-10" data-line-number="10"><span class="fu">\markdownInput</span>{example.md}</a> +<a class="sourceLine" id="cb244-11" data-line-number="11"></a> +<a class="sourceLine" id="cb244-12" data-line-number="12"><span class="fu">\def</span>\markdownOptionShiftHeadings{0}</a> +<a class="sourceLine" id="cb244-13" data-line-number="13"><span class="fu">\markdownInput</span>{example.md}</a> +<a class="sourceLine" id="cb244-14" data-line-number="14"></a> +<a class="sourceLine" id="cb244-15" data-line-number="15"><span class="fu">\def</span>\markdownOptionShiftHeadings{+1}</a> +<a class="sourceLine" id="cb244-16" data-line-number="16"><span class="fu">\markdownInput</span>{example.md}</a> +<a class="sourceLine" id="cb244-17" data-line-number="17"></a> +<a class="sourceLine" id="cb244-18" data-line-number="18"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb245"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb245-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-20"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 id="latex-example-20" class="unnumbered"><span class="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="cb246"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb246-1"><a href="#cb246-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb246-2"><a href="#cb246-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb246-3"><a href="#cb246-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{example.md}</span> -<span id="cb246-4"><a href="#cb246-4" aria-hidden="true"></a>## A section</span> -<span id="cb246-5"><a href="#cb246-5" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb246-6"><a href="#cb246-6" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb246-7"><a href="#cb246-7" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=-1]{example.md}</span> -<span id="cb246-8"><a href="#cb246-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb246-9"><a href="#cb246-9" aria-hidden="true"></a><span class="fu">\markdownInput</span>[shiftHeadings=+1]{example.md}</span> -<span id="cb246-10"><a href="#cb246-10" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb246"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb246-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb246-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb246-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{example.md}</a> +<a class="sourceLine" id="cb246-4" data-line-number="4">## A section</a> +<a class="sourceLine" id="cb246-5" data-line-number="5"><span class="kw">\end</span>{<span class="ex">filecontents</span>}</a> +<a class="sourceLine" id="cb246-6" data-line-number="6"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb246-7" data-line-number="7"><span class="fu">\markdownInput</span>[shiftHeadings=-1]{example.md}</a> +<a class="sourceLine" id="cb246-8" data-line-number="8"><span class="fu">\markdownInput</span>{example.md}</a> +<a class="sourceLine" id="cb246-9" data-line-number="9"><span class="fu">\markdownInput</span>[shiftHeadings=+1]{example.md}</a> +<a class="sourceLine" id="cb246-10" data-line-number="10"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb247"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb247-1"><a href="#cb247-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb247"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb247-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <h1 id="a-section-3">A section</h1> <h2 id="a-section-4">A section</h2> <h3 id="a-section-5">A section</h3> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-18">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<h5 id="context-example-18" class="unnumbered">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="cb248"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb248-1"><a href="#cb248-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="cb249"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb249-1"><a href="#cb249-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb249-2"><a href="#cb249-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb249-3"><a href="#cb249-3" aria-hidden="true"></a></span> -<span id="cb249-4"><a href="#cb249-4" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{-1}</span> -<span id="cb249-5"><a href="#cb249-5" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb249-6"><a href="#cb249-6" aria-hidden="true"></a></span> -<span id="cb249-7"><a href="#cb249-7" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{0}</span> -<span id="cb249-8"><a href="#cb249-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb249-9"><a href="#cb249-9" aria-hidden="true"></a></span> -<span id="cb249-10"><a href="#cb249-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionShiftHeadings</span>{+1}</span> -<span id="cb249-11"><a href="#cb249-11" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb249-12"><a href="#cb249-12" aria-hidden="true"></a></span> -<span id="cb249-13"><a href="#cb249-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb250"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb250-1"><a href="#cb250-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb248"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb248-1" data-line-number="1"><span class="fu">## A section</span></a></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="cb249"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb249-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb249-2" data-line-number="2"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb249-3" data-line-number="3"></a> +<a class="sourceLine" id="cb249-4" data-line-number="4"><span class="fu">\def</span>\markdownOptionShiftHeadings{-1}</a> +<a class="sourceLine" id="cb249-5" data-line-number="5"><span class="fu">\markdownInput</span>{example.md}</a> +<a class="sourceLine" id="cb249-6" data-line-number="6"></a> +<a class="sourceLine" id="cb249-7" data-line-number="7"><span class="fu">\def</span>\markdownOptionShiftHeadings{0}</a> +<a class="sourceLine" id="cb249-8" data-line-number="8"><span class="fu">\markdownInput</span>{example.md}</a> +<a class="sourceLine" id="cb249-9" data-line-number="9"></a> +<a class="sourceLine" id="cb249-10" data-line-number="10"><span class="fu">\def</span>\markdownOptionShiftHeadings{+1}</a> +<a class="sourceLine" id="cb249-11" data-line-number="11"><span class="fu">\markdownInput</span>{example.md}</a> +<a class="sourceLine" id="cb249-12" data-line-number="12"></a> +<a class="sourceLine" id="cb249-13" data-line-number="13"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb250"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb250-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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.25" id="slice"><span class="header-section-number">2.2.1.25</span> Option <code>slice</code></h4> +<h4 id="slice"><span class="header-section-number">2.2.1.25</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> @@ -2818,44 +2815,44 @@ Thomas,Edison,1847</code></pre> <li><code>$</code>⟨<em>identifier</em>⟩ selects the end of a section with the <abbr>HTML</abbr> attribute <code>#</code>⟨<em>identifier</em>⟩.</li> <li>⟨<em>identifier</em>⟩ corresponds to <code>^</code>⟨<em>identifier</em>⟩ for the first selector and to <code>$</code>⟨<em>identifier</em>⟩ for the second selector.</li> </ul> -<p>Specifying only a single selector, ⟨<em>identifier</em>⟩, is equivalent to specifying the two selectors ⟨<em>identifier</em>⟩ ⟨<em>identifier</em>⟩, which is equivalent to <code>^</code>⟨<em>identifier</em>⟩ <code>$</code>⟨<em>identifier</em>⟩, i.e. the entire section with the <abbr>HTML</abbr> attribute <code>#</code>⟨<em>identifier</em>⟩ will be selected.</p> +<p>Specifying only a single selector, ⟨<em>identifier</em>⟩, is equivalent to specifying the two selectors ⟨<em>identifier</em>⟩ ⟨<em>identifier</em>⟩, which is equivalent to <code>^</code>⟨<em>identifier</em>⟩ <code>$</code>⟨<em>identifier</em>⟩, i.e. the entire section with the <abbr>HTML</abbr> attribute <code>#</code>⟨<em>identifier</em>⟩ will be selected.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-11">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<h5 id="plain-tex-example-11" class="unnumbered">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="cb251"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb251-1"><a href="#cb251-1" aria-hidden="true"></a><span class="fu"># The Tragedy of Hamlet</span></span> -<span id="cb251-2"><a href="#cb251-2" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb251-3"><a href="#cb251-3" aria-hidden="true"></a></span> -<span id="cb251-4"><a href="#cb251-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> -<span id="cb251-5"><a href="#cb251-5" aria-hidden="true"></a>Hamlet kills Polonius.</span> -<span id="cb251-6"><a href="#cb251-6" aria-hidden="true"></a></span> -<span id="cb251-7"><a href="#cb251-7" aria-hidden="true"></a><span class="fu">## Act V {#act-5}</span></span> -<span id="cb251-8"><a href="#cb251-8" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb251-9"><a href="#cb251-9" aria-hidden="true"></a></span> -<span id="cb251-10"><a href="#cb251-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> -<span id="cb251-11"><a href="#cb251-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="cb252"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb252-1"><a href="#cb252-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb252-2"><a href="#cb252-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHeaderAttributes</span>{true}</span> -<span id="cb252-3"><a href="#cb252-3" aria-hidden="true"></a></span> -<span id="cb252-4"><a href="#cb252-4" aria-hidden="true"></a><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></span> -<span id="cb252-5"><a href="#cb252-5" aria-hidden="true"></a><span class="fu">\font\big</span>=cmr10 at 12pt</span> -<span id="cb252-6"><a href="#cb252-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="cb252-7"><a href="#cb252-7" aria-hidden="true"></a><span class="fu">\font\bigger</span>=cmr10 scaled 1440</span> -<span id="cb252-8"><a href="#cb252-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="cb252-9"><a href="#cb252-9" aria-hidden="true"></a></span> -<span id="cb252-10"><a href="#cb252-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> -<span id="cb252-11"><a href="#cb252-11" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb252-12"><a href="#cb252-12" aria-hidden="true"></a></span> -<span id="cb252-13"><a href="#cb252-13" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span> -<span id="cb252-14"><a href="#cb252-14" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</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">\def\markdownOptionSlice</span>{act-3 act-5}</span> -<span id="cb252-17"><a href="#cb252-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb252-18"><a href="#cb252-18" aria-hidden="true"></a></span> -<span id="cb252-19"><a href="#cb252-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="cb253"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb253-1"><a href="#cb253-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb251"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb251-1" data-line-number="1"><span class="fu"># The Tragedy of Hamlet</span></a> +<a class="sourceLine" id="cb251-2" data-line-number="2">Shakespeare's longest play.</a> +<a class="sourceLine" id="cb251-3" data-line-number="3"></a> +<a class="sourceLine" id="cb251-4" data-line-number="4"><span class="fu">## Act III {#act-3}</span></a> +<a class="sourceLine" id="cb251-5" data-line-number="5">Hamlet kills Polonius.</a> +<a class="sourceLine" id="cb251-6" data-line-number="6"></a> +<a class="sourceLine" id="cb251-7" data-line-number="7"><span class="fu">## Act V {#act-5}</span></a> +<a class="sourceLine" id="cb251-8" data-line-number="8">Hamlet dies.</a> +<a class="sourceLine" id="cb251-9" data-line-number="9"></a> +<a class="sourceLine" id="cb251-10" data-line-number="10"><span class="fu">## Act I {#act-1}</span></a> +<a class="sourceLine" id="cb251-11" data-line-number="11">Hamlet talks to ghost.</a></code></pre></div> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb252"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb252-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb252-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionHeaderAttributes{true}</a> +<a class="sourceLine" id="cb252-3" data-line-number="3"></a> +<a class="sourceLine" id="cb252-4" data-line-number="4"><span class="fu">\font\normal</span>=cmr10<span class="fu">\normal</span></a> +<a class="sourceLine" id="cb252-5" data-line-number="5"><span class="fu">\font\big</span>=cmr10 at 12pt</a> +<a class="sourceLine" id="cb252-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererHeadingTwo#1{{\big #1\par}}</a> +<a class="sourceLine" id="cb252-7" data-line-number="7"><span class="fu">\font\bigger</span>=cmr10 scaled 1440</a> +<a class="sourceLine" id="cb252-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererHeadingOne#1{{\bigger #1\par}}</a> +<a class="sourceLine" id="cb252-9" data-line-number="9"></a> +<a class="sourceLine" id="cb252-10" data-line-number="10"><span class="fu">\def</span>\markdownOptionSlice{^ ^act-3}</a> +<a class="sourceLine" id="cb252-11" data-line-number="11"><span class="fu">\markdownInput</span>{hamlet.md}</a> +<a class="sourceLine" id="cb252-12" data-line-number="12"></a> +<a class="sourceLine" id="cb252-13" data-line-number="13"><span class="fu">\def</span>\markdownOptionSlice{act-1}</a> +<a class="sourceLine" id="cb252-14" data-line-number="14"><span class="fu">\markdownInput</span>{hamlet.md}</a> +<a class="sourceLine" id="cb252-15" data-line-number="15"></a> +<a class="sourceLine" id="cb252-16" data-line-number="16"><span class="fu">\def</span>\markdownOptionSlice{act-3 act-5}</a> +<a class="sourceLine" id="cb252-17" data-line-number="17"><span class="fu">\markdownInput</span>{hamlet.md}</a> +<a class="sourceLine" id="cb252-18" data-line-number="18"></a> +<a class="sourceLine" id="cb252-19" data-line-number="19"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb253"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb253-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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> @@ -2867,30 +2864,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-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="cb254"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb254-1"><a href="#cb254-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb254-2"><a href="#cb254-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</span> -<span id="cb254-3"><a href="#cb254-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{hamlet.md}</span> -<span id="cb254-4"><a href="#cb254-4" aria-hidden="true"></a># The Tragedy of Hamlet</span> -<span id="cb254-5"><a href="#cb254-5" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb254-6"><a href="#cb254-6" aria-hidden="true"></a></span> -<span id="cb254-7"><a href="#cb254-7" aria-hidden="true"></a>## Act III {#act-3}</span> -<span id="cb254-8"><a href="#cb254-8" aria-hidden="true"></a>Hamlet kills Polonius.</span> -<span id="cb254-9"><a href="#cb254-9" aria-hidden="true"></a></span> -<span id="cb254-10"><a href="#cb254-10" aria-hidden="true"></a>## Act V {#act-5}</span> -<span id="cb254-11"><a href="#cb254-11" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb254-12"><a href="#cb254-12" aria-hidden="true"></a></span> -<span id="cb254-13"><a href="#cb254-13" aria-hidden="true"></a>## Act I {#act-1}</span> -<span id="cb254-14"><a href="#cb254-14" aria-hidden="true"></a>Hamlet talks to ghost.</span> -<span id="cb254-15"><a href="#cb254-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb254-16"><a href="#cb254-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb254-17"><a href="#cb254-17" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=^ ^act-3]{hamlet.md}</span> -<span id="cb254-18"><a href="#cb254-18" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-1]{hamlet.md}</span> -<span id="cb254-19"><a href="#cb254-19" aria-hidden="true"></a><span class="fu">\markdownInput</span>[slice=act-3 act-5]{hamlet.md}</span> -<span id="cb254-20"><a href="#cb254-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="cb255"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb255-1"><a href="#cb255-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-21" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb254"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb254-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb254-2" data-line-number="2"><span class="bu">\usepackage</span>[headerAttributes]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb254-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{hamlet.md}</a> +<a class="sourceLine" id="cb254-4" data-line-number="4"># The Tragedy of Hamlet</a> +<a class="sourceLine" id="cb254-5" data-line-number="5">Shakespeare's longest play.</a> +<a class="sourceLine" id="cb254-6" data-line-number="6"></a> +<a class="sourceLine" id="cb254-7" data-line-number="7">## Act III {#act-3}</a> +<a class="sourceLine" id="cb254-8" data-line-number="8">Hamlet kills Polonius.</a> +<a class="sourceLine" id="cb254-9" data-line-number="9"></a> +<a class="sourceLine" id="cb254-10" data-line-number="10">## Act V {#act-5}</a> +<a class="sourceLine" id="cb254-11" data-line-number="11">Hamlet dies.</a> +<a class="sourceLine" id="cb254-12" data-line-number="12"></a> +<a class="sourceLine" id="cb254-13" data-line-number="13">## Act I {#act-1}</a> +<a class="sourceLine" id="cb254-14" data-line-number="14">Hamlet talks to ghost.</a> +<a class="sourceLine" id="cb254-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">filecontents</span>}</a> +<a class="sourceLine" id="cb254-16" data-line-number="16"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb254-17" data-line-number="17"><span class="fu">\markdownInput</span>[slice=^ ^act-3]{hamlet.md}</a> +<a class="sourceLine" id="cb254-18" data-line-number="18"><span class="fu">\markdownInput</span>[slice=act-1]{hamlet.md}</a> +<a class="sourceLine" id="cb254-19" data-line-number="19"><span class="fu">\markdownInput</span>[slice=act-3 act-5]{hamlet.md}</a> +<a class="sourceLine" id="cb254-20" data-line-number="20"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb255"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb255-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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> @@ -2902,36 +2899,36 @@ Thomas,Edison,1847</code></pre> <h2 id="act-v-1">Act V</h2> <p>Hamlet dies.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-19">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<h5 id="context-example-19" class="unnumbered">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="cb256"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb256-1"><a href="#cb256-1" aria-hidden="true"></a><span class="fu"># The Tragedy of Hamlet</span></span> -<span id="cb256-2"><a href="#cb256-2" aria-hidden="true"></a>Shakespeare's longest play.</span> -<span id="cb256-3"><a href="#cb256-3" aria-hidden="true"></a></span> -<span id="cb256-4"><a href="#cb256-4" aria-hidden="true"></a><span class="fu">## Act III {#act-3}</span></span> -<span id="cb256-5"><a href="#cb256-5" aria-hidden="true"></a>Hamlet kills Polonius.</span> -<span id="cb256-6"><a href="#cb256-6" aria-hidden="true"></a></span> -<span id="cb256-7"><a href="#cb256-7" aria-hidden="true"></a><span class="fu">## Act V {#act-5}</span></span> -<span id="cb256-8"><a href="#cb256-8" aria-hidden="true"></a>Hamlet dies.</span> -<span id="cb256-9"><a href="#cb256-9" aria-hidden="true"></a></span> -<span id="cb256-10"><a href="#cb256-10" aria-hidden="true"></a><span class="fu">## Act I {#act-1}</span></span> -<span id="cb256-11"><a href="#cb256-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="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\markdownOptionHeaderAttributes</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> -<span id="cb257-5"><a href="#cb257-5" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{^ ^act-3}</span> -<span id="cb257-6"><a href="#cb257-6" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb257-7"><a href="#cb257-7" aria-hidden="true"></a></span> -<span id="cb257-8"><a href="#cb257-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-1}</span> -<span id="cb257-9"><a href="#cb257-9" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb257-10"><a href="#cb257-10" aria-hidden="true"></a></span> -<span id="cb257-11"><a href="#cb257-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionSlice</span>{act-3 act-5}</span> -<span id="cb257-12"><a href="#cb257-12" aria-hidden="true"></a><span class="fu">\markdownInput</span>{hamlet.md}</span> -<span id="cb257-13"><a href="#cb257-13" aria-hidden="true"></a></span> -<span id="cb257-14"><a href="#cb257-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="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="cb256"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb256-1" data-line-number="1"><span class="fu"># The Tragedy of Hamlet</span></a> +<a class="sourceLine" id="cb256-2" data-line-number="2">Shakespeare's longest play.</a> +<a class="sourceLine" id="cb256-3" data-line-number="3"></a> +<a class="sourceLine" id="cb256-4" data-line-number="4"><span class="fu">## Act III {#act-3}</span></a> +<a class="sourceLine" id="cb256-5" data-line-number="5">Hamlet kills Polonius.</a> +<a class="sourceLine" id="cb256-6" data-line-number="6"></a> +<a class="sourceLine" id="cb256-7" data-line-number="7"><span class="fu">## Act V {#act-5}</span></a> +<a class="sourceLine" id="cb256-8" data-line-number="8">Hamlet dies.</a> +<a class="sourceLine" id="cb256-9" data-line-number="9"></a> +<a class="sourceLine" id="cb256-10" data-line-number="10"><span class="fu">## Act I {#act-1}</span></a> +<a class="sourceLine" id="cb256-11" data-line-number="11">Hamlet talks to ghost.</a></code></pre></div> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb257"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb257-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb257-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionHeaderAttributes{true}</a> +<a class="sourceLine" id="cb257-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb257-4" data-line-number="4"></a> +<a class="sourceLine" id="cb257-5" data-line-number="5"><span class="fu">\def</span>\markdownOptionSlice{^ ^act-3}</a> +<a class="sourceLine" id="cb257-6" data-line-number="6"><span class="fu">\markdownInput</span>{hamlet.md}</a> +<a class="sourceLine" id="cb257-7" data-line-number="7"></a> +<a class="sourceLine" id="cb257-8" data-line-number="8"><span class="fu">\def</span>\markdownOptionSlice{act-1}</a> +<a class="sourceLine" id="cb257-9" data-line-number="9"><span class="fu">\markdownInput</span>{hamlet.md}</a> +<a class="sourceLine" id="cb257-10" data-line-number="10"></a> +<a class="sourceLine" id="cb257-11" data-line-number="11"><span class="fu">\def</span>\markdownOptionSlice{act-3 act-5}</a> +<a class="sourceLine" id="cb257-12" data-line-number="12"><span class="fu">\markdownInput</span>{hamlet.md}</a> +<a class="sourceLine" id="cb257-13" data-line-number="13"></a> +<a class="sourceLine" id="cb257-14" data-line-number="14"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb258"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb258-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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> @@ -2943,7 +2940,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.26" id="option-smartellipses"><span class="header-section-number">2.2.1.26</span> Option <code>smartEllipses</code></h4> +<h4 id="option-smartellipses"><span class="header-section-number">2.2.1.26</span> Option <code>smartEllipses</code></h4> <dl> <dt><code>smartEllipses</code> (default value: <code>false</code>)</dt> <dd><dl> @@ -2959,124 +2956,124 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="lua-module-example-10">Lua Module Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb259"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb259-1"><a href="#cb259-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb259-2"><a href="#cb259-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb259-3"><a href="#cb259-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb259-4"><a href="#cb259-4" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb259-5"><a href="#cb259-5" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb259-6"><a href="#cb259-6" aria-hidden="true"></a> local convert = markdown.new()</span> -<span id="cb259-7"><a href="#cb259-7" aria-hidden="true"></a> local input = "These are just three regular dots ..."</span> -<span id="cb259-8"><a href="#cb259-8" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb259-9"><a href="#cb259-9" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb259-10"><a href="#cb259-10" aria-hidden="true"></a><span class="fu">\directlua</span>{</span> -<span id="cb259-11"><a href="#cb259-11" aria-hidden="true"></a> local markdown = require("markdown")</span> -<span id="cb259-12"><a href="#cb259-12" aria-hidden="true"></a> local convert = markdown.new({smartEllipses = true})</span> -<span id="cb259-13"><a href="#cb259-13" aria-hidden="true"></a> local input = "... and this is a victorian ellipsis."</span> -<span id="cb259-14"><a href="#cb259-14" aria-hidden="true"></a> tex.sprint(convert(input)) }</span> -<span id="cb259-15"><a href="#cb259-15" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="lua-module-example-10" class="unnumbered">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="cb259"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb259-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb259-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererEllipsis{. . .}</a> +<a class="sourceLine" id="cb259-3" data-line-number="3"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb259-4" data-line-number="4"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb259-5" data-line-number="5"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb259-6" data-line-number="6"> local convert = markdown.new()</a> +<a class="sourceLine" id="cb259-7" data-line-number="7"> local input = "These are just three regular dots ..."</a> +<a class="sourceLine" id="cb259-8" data-line-number="8"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb259-9" data-line-number="9"><span class="fu">\par</span></a> +<a class="sourceLine" id="cb259-10" data-line-number="10"><span class="fu">\directlua</span>{</a> +<a class="sourceLine" id="cb259-11" data-line-number="11"> local markdown = require("markdown")</a> +<a class="sourceLine" id="cb259-12" data-line-number="12"> local convert = markdown.new({smartEllipses = true})</a> +<a class="sourceLine" id="cb259-13" data-line-number="13"> local input = "... and this is a victorian ellipsis."</a> +<a class="sourceLine" id="cb259-14" data-line-number="14"> tex.sprint(convert(input)) }</a> +<a class="sourceLine" id="cb259-15" data-line-number="15"><span class="fu">\bye</span></a></code></pre></div> <p>Then, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb260"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb260-1"><a href="#cb260-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb260"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb260-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>These are just three regular dots …</p> <p>. . . and this is a victorian ellipsis.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="lua-cli-example-9">Lua CLI Example</h5> +<h5 id="lua-cli-example-9" class="unnumbered">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="cb261"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb261-1"><a href="#cb261-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb261-2"><a href="#cb261-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb261-3"><a href="#cb261-3" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb261-4"><a href="#cb261-4" aria-hidden="true"></a><span class="fu">\input</span> optionfalse</span> -<span id="cb261-5"><a href="#cb261-5" aria-hidden="true"></a><span class="fu">\par</span></span> -<span id="cb261-6"><a href="#cb261-6" aria-hidden="true"></a><span class="fu">\input</span> optiontrue</span> -<span id="cb261-7"><a href="#cb261-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb261"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb261-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb261-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererEllipsis{. . .}</a> +<a class="sourceLine" id="cb261-3" data-line-number="3"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb261-4" data-line-number="4"><span class="fu">\input</span> optionfalse</a> +<a class="sourceLine" id="cb261-5" data-line-number="5"><span class="fu">\par</span></a> +<a class="sourceLine" id="cb261-6" data-line-number="6"><span class="fu">\input</span> optiontrue</a> +<a class="sourceLine" id="cb261-7" data-line-number="7"><span class="fu">\bye</span></a></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="cb262"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb262-1"><a href="#cb262-1" aria-hidden="true"></a>Are these just three regular dots, a victorian ellipsis, or ... ?</span></code></pre></div> +<div class="sourceCode" id="cb262"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb262-1" data-line-number="1">Are these just three regular dots, a victorian ellipsis, or ... ?</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb263"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb263-1"><a href="#cb263-1" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</span> -<span id="cb263-2"><a href="#cb263-2" aria-hidden="true"></a><span class="ex">texlua</span> ⟨CLI pathname⟩ smartEllipses=true -- content.md optiontrue.tex</span> -<span id="cb263-3"><a href="#cb263-3" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb263"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb263-1" data-line-number="1"><span class="ex">texlua</span> ⟨CLI pathname⟩ -- content.md optionfalse.tex</a> +<a class="sourceLine" id="cb263-2" data-line-number="2"><span class="ex">texlua</span> ⟨CLI pathname⟩ smartEllipses=true -- content.md optiontrue.tex</a> +<a class="sourceLine" id="cb263-3" data-line-number="3"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>where ⟨<em>CLI pathname</em>⟩ corresponds to the location of the Lua CLI script file, such as <code>~/texmf/scripts/markdown/markdown-cli.lua</code> on UN*X systems or <code>C:\Users\</code>⟨<em>Your username</em>⟩<code>\texmf\scripts\markdown\markdown-cli.lua</code> on Windows systems. Use the command <code>kpsewhich -a markdown-cli.lua</code> to locate the Lua CLI script file using <a href="https://tug.org/kpathsea/" title="Kpathsea - TeX Users Group">Kpathsea</a>.</p> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Are these just three regular dots, a victorian ellipsis, or … ?</p> <p>Are these just three regular dots, a victorian ellipsis, or . . . ?</p> </blockquote> -<h5 class="unnumbered" data-number="" id="plain-tex-example-12">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="cb264"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb264-1"><a href="#cb264-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb264-2"><a href="#cb264-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb264-3"><a href="#cb264-3" aria-hidden="true"></a></span> -<span id="cb264-4"><a href="#cb264-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb264-5"><a href="#cb264-5" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb264-6"><a href="#cb264-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb264-7"><a href="#cb264-7" aria-hidden="true"></a></span> -<span id="cb264-8"><a href="#cb264-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb264-9"><a href="#cb264-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb264-10"><a href="#cb264-10" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb264-11"><a href="#cb264-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb264-12"><a href="#cb264-12" aria-hidden="true"></a></span> -<span id="cb264-13"><a href="#cb264-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="cb265"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb265-1"><a href="#cb265-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-12" class="unnumbered">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="cb264"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb264-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb264-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererEllipsis{. . .}</a> +<a class="sourceLine" id="cb264-3" data-line-number="3"></a> +<a class="sourceLine" id="cb264-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb264-5" data-line-number="5">These are just three regular dots ...</a> +<a class="sourceLine" id="cb264-6" data-line-number="6"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb264-7" data-line-number="7"></a> +<a class="sourceLine" id="cb264-8" data-line-number="8"><span class="fu">\def</span>\markdownOptionSmartEllipses{true}</a> +<a class="sourceLine" id="cb264-9" data-line-number="9"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb264-10" data-line-number="10">... and this is a victorian ellipsis.</a> +<a class="sourceLine" id="cb264-11" data-line-number="11"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb264-12" data-line-number="12"></a> +<a class="sourceLine" id="cb264-13" data-line-number="13"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb265"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb265-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-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="cb266"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb266-1"><a href="#cb266-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb266-2"><a href="#cb266-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb266-3"><a href="#cb266-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb266-4"><a href="#cb266-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb266-5"><a href="#cb266-5" aria-hidden="true"></a> ellipsis = {. . .}</span> -<span id="cb266-6"><a href="#cb266-6" aria-hidden="true"></a> }</span> -<span id="cb266-7"><a href="#cb266-7" aria-hidden="true"></a>}</span> -<span id="cb266-8"><a href="#cb266-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb266-9"><a href="#cb266-9" aria-hidden="true"></a></span> -<span id="cb266-10"><a href="#cb266-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb266-11"><a href="#cb266-11" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb266-12"><a href="#cb266-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb266-13"><a href="#cb266-13" aria-hidden="true"></a></span> -<span id="cb266-14"><a href="#cb266-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{smartEllipses}</span> -<span id="cb266-15"><a href="#cb266-15" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb266-16"><a href="#cb266-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb266-17"><a href="#cb266-17" aria-hidden="true"></a></span> -<span id="cb266-18"><a href="#cb266-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="cb267"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb267-1"><a href="#cb267-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-22" class="unnumbered"><span class="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="cb266"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb266-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb266-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb266-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb266-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb266-5" data-line-number="5"> ellipsis = {. . .}</a> +<a class="sourceLine" id="cb266-6" data-line-number="6"> }</a> +<a class="sourceLine" id="cb266-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb266-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb266-9" data-line-number="9"></a> +<a class="sourceLine" id="cb266-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb266-11" data-line-number="11">These are just three regular dots ...</a> +<a class="sourceLine" id="cb266-12" data-line-number="12"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb266-13" data-line-number="13"></a> +<a class="sourceLine" id="cb266-14" data-line-number="14"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{smartEllipses}</a> +<a class="sourceLine" id="cb266-15" data-line-number="15">... and this is a victorian ellipsis.</a> +<a class="sourceLine" id="cb266-16" data-line-number="16"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb266-17" data-line-number="17"></a> +<a class="sourceLine" id="cb266-18" data-line-number="18"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb267"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb267-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>These are just three regular dots …</p> <p>. . . and this is a victorian ellipsis.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-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>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">\def\markdownRendererEllipsis</span>{. . .}</span> -<span id="cb268-3"><a href="#cb268-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb268-4"><a href="#cb268-4" aria-hidden="true"></a></span> -<span id="cb268-5"><a href="#cb268-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb268-6"><a href="#cb268-6" aria-hidden="true"></a>These are just three regular dots ...</span> -<span id="cb268-7"><a href="#cb268-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</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\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb268-10"><a href="#cb268-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb268-11"><a href="#cb268-11" aria-hidden="true"></a>... and this is a victorian ellipsis.</span> -<span id="cb268-12"><a href="#cb268-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb268-13"><a href="#cb268-13" aria-hidden="true"></a></span> -<span id="cb268-14"><a href="#cb268-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="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> +<h5 id="context-example-20" class="unnumbered">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="cb268"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb268-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb268-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererEllipsis{. . .}</a> +<a class="sourceLine" id="cb268-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb268-4" data-line-number="4"></a> +<a class="sourceLine" id="cb268-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb268-6" data-line-number="6">These are just three regular dots ...</a> +<a class="sourceLine" id="cb268-7" data-line-number="7"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb268-8" data-line-number="8"></a> +<a class="sourceLine" id="cb268-9" data-line-number="9"><span class="fu">\def</span>\markdownOptionSmartEllipses{true}</a> +<a class="sourceLine" id="cb268-10" data-line-number="10"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb268-11" data-line-number="11">... and this is a victorian ellipsis.</a> +<a class="sourceLine" id="cb268-12" data-line-number="12"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb268-13" data-line-number="13"></a> +<a class="sourceLine" id="cb268-14" data-line-number="14"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb269"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb269-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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.27" id="option-startnumber"><span class="header-section-number">2.2.1.27</span> Option <code>startNumber</code></h4> +<h4 id="option-startnumber"><span class="header-section-number">2.2.1.27</span> Option <code>startNumber</code></h4> <dl> <dt><code>startNumber</code> (default value: <code>true</code>)</dt> <dd><dl> @@ -3092,32 +3089,32 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<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="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">document</span>}</span> -<span id="cb270-4"><a href="#cb270-4" aria-hidden="true"></a></span> -<span id="cb270-5"><a href="#cb270-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb270-6"><a href="#cb270-6" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb270-7"><a href="#cb270-7" aria-hidden="true"></a></span> -<span id="cb270-8"><a href="#cb270-8" aria-hidden="true"></a>3. third item</span> -<span id="cb270-9"><a href="#cb270-9" aria-hidden="true"></a>4. fourth item</span> -<span id="cb270-10"><a href="#cb270-10" aria-hidden="true"></a>5. fifth item</span> -<span id="cb270-11"><a href="#cb270-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb270-12"><a href="#cb270-12" aria-hidden="true"></a></span> -<span id="cb270-13"><a href="#cb270-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{startNumber=false}</span> -<span id="cb270-14"><a href="#cb270-14" aria-hidden="true"></a>The following list does not respect the numbers specified in the</span> -<span id="cb270-15"><a href="#cb270-15" aria-hidden="true"></a>markup:</span> -<span id="cb270-16"><a href="#cb270-16" aria-hidden="true"></a></span> -<span id="cb270-17"><a href="#cb270-17" aria-hidden="true"></a>3. third item</span> -<span id="cb270-18"><a href="#cb270-18" aria-hidden="true"></a>4. fourth item</span> -<span id="cb270-19"><a href="#cb270-19" aria-hidden="true"></a>5. fifth item</span> -<span id="cb270-20"><a href="#cb270-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb270-21"><a href="#cb270-21" aria-hidden="true"></a></span> -<span id="cb270-22"><a href="#cb270-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="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> +<h5 id="latex-example-23" class="unnumbered"><span class="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="cb270"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb270-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb270-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb270-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb270-4" data-line-number="4"></a> +<a class="sourceLine" id="cb270-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb270-6" data-line-number="6">The following list respects the numbers specified in the markup:</a> +<a class="sourceLine" id="cb270-7" data-line-number="7"></a> +<a class="sourceLine" id="cb270-8" data-line-number="8">3. third item</a> +<a class="sourceLine" id="cb270-9" data-line-number="9">4. fourth item</a> +<a class="sourceLine" id="cb270-10" data-line-number="10">5. fifth item</a> +<a class="sourceLine" id="cb270-11" data-line-number="11"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb270-12" data-line-number="12"></a> +<a class="sourceLine" id="cb270-13" data-line-number="13"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{startNumber=false}</a> +<a class="sourceLine" id="cb270-14" data-line-number="14">The following list does not respect the numbers specified in the</a> +<a class="sourceLine" id="cb270-15" data-line-number="15">markup:</a> +<a class="sourceLine" id="cb270-16" data-line-number="16"></a> +<a class="sourceLine" id="cb270-17" data-line-number="17">3. third item</a> +<a class="sourceLine" id="cb270-18" data-line-number="18">4. fourth item</a> +<a class="sourceLine" id="cb270-19" data-line-number="19">5. fifth item</a> +<a class="sourceLine" id="cb270-20" data-line-number="20"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb270-21" data-line-number="21"></a> +<a class="sourceLine" id="cb270-22" data-line-number="22"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb271"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb271-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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> @@ -3133,30 +3130,30 @@ Thomas,Edison,1847</code></pre> <li>fifth item</li> </ol> </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="cb272"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb272-1"><a href="#cb272-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb272-2"><a href="#cb272-2" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb272-3"><a href="#cb272-3" aria-hidden="true"></a></span> -<span id="cb272-4"><a href="#cb272-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb272-5"><a href="#cb272-5" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb272-6"><a href="#cb272-6" aria-hidden="true"></a></span> -<span id="cb272-7"><a href="#cb272-7" aria-hidden="true"></a>3. third item</span> -<span id="cb272-8"><a href="#cb272-8" aria-hidden="true"></a>4. fourth item</span> -<span id="cb272-9"><a href="#cb272-9" aria-hidden="true"></a>5. fifth item</span> -<span id="cb272-10"><a href="#cb272-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb272-11"><a href="#cb272-11" aria-hidden="true"></a></span> -<span id="cb272-12"><a href="#cb272-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{false}</span> -<span id="cb272-13"><a href="#cb272-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb272-14"><a href="#cb272-14" aria-hidden="true"></a>The following list respects the numbers specified in the markup:</span> -<span id="cb272-15"><a href="#cb272-15" aria-hidden="true"></a></span> -<span id="cb272-16"><a href="#cb272-16" aria-hidden="true"></a>3. third item</span> -<span id="cb272-17"><a href="#cb272-17" aria-hidden="true"></a>4. fourth item</span> -<span id="cb272-18"><a href="#cb272-18" aria-hidden="true"></a>5. fifth item</span> -<span id="cb272-19"><a href="#cb272-19" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb272-20"><a href="#cb272-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="cb273"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb273-1"><a href="#cb273-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-21" class="unnumbered">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="cb272"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb272-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb272-2" data-line-number="2"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb272-3" data-line-number="3"></a> +<a class="sourceLine" id="cb272-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb272-5" data-line-number="5">The following list respects the numbers specified in the markup:</a> +<a class="sourceLine" id="cb272-6" data-line-number="6"></a> +<a class="sourceLine" id="cb272-7" data-line-number="7">3. third item</a> +<a class="sourceLine" id="cb272-8" data-line-number="8">4. fourth item</a> +<a class="sourceLine" id="cb272-9" data-line-number="9">5. fifth item</a> +<a class="sourceLine" id="cb272-10" data-line-number="10"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb272-11" data-line-number="11"></a> +<a class="sourceLine" id="cb272-12" data-line-number="12"><span class="fu">\def</span>\markdownOptionStartNumber{false}</a> +<a class="sourceLine" id="cb272-13" data-line-number="13"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb272-14" data-line-number="14">The following list respects the numbers specified in the markup:</a> +<a class="sourceLine" id="cb272-15" data-line-number="15"></a> +<a class="sourceLine" id="cb272-16" data-line-number="16">3. third item</a> +<a class="sourceLine" id="cb272-17" data-line-number="17">4. fourth item</a> +<a class="sourceLine" id="cb272-18" data-line-number="18">5. fifth item</a> +<a class="sourceLine" id="cb272-19" data-line-number="19"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb272-20" data-line-number="20"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb273"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb273-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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> @@ -3172,19 +3169,19 @@ Thomas,Edison,1847</code></pre> <li>fifth item</li> </ol> </blockquote> -<h4 data-number="2.2.1.28" id="option-stripindent"><span class="header-section-number">2.2.1.28</span> Option <code>stripIndent</code></h4> +<h4 id="option-stripindent"><span class="header-section-number">2.2.1.28</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="cb274"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb274-1"><a href="#cb274-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb274-2"><a href="#cb274-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> -<span id="cb274-3"><a href="#cb274-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb274-4"><a href="#cb274-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb274-5"><a href="#cb274-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb274-6"><a href="#cb274-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb274-7"><a href="#cb274-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb274"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb274-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb274-2" data-line-number="2"><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb274-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb274-4" data-line-number="4"> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb274-5" data-line-number="5"> Hello *world*!</a> +<a class="sourceLine" id="cb274-6" data-line-number="6"> <span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb274-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> </dd> </dl> </dd> @@ -3195,54 +3192,54 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-13">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<h5 id="plain-tex-example-13" class="unnumbered">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="cb275"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb275-1"><a href="#cb275-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb275-2"><a href="#cb275-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> -<span id="cb275-3"><a href="#cb275-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb275-4"><a href="#cb275-4" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb275-5"><a href="#cb275-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb275-6"><a href="#cb275-6" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb275"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb275-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb275-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionStripIndent{true}</a> +<a class="sourceLine" id="cb275-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb275-4" data-line-number="4"> Hello *world*!</a> +<a class="sourceLine" id="cb275-5" data-line-number="5"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb275-6" data-line-number="6"><span class="fu">\bye</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb276"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb276-1"><a href="#cb276-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb276"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb276-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-24"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 id="latex-example-24" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb277"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb277-1"><a href="#cb277-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb277-2"><a href="#cb277-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</span> -<span id="cb277-3"><a href="#cb277-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb277-4"><a href="#cb277-4" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb277-5"><a href="#cb277-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb277-6"><a href="#cb277-6" aria-hidden="true"></a> <span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb277-7"><a href="#cb277-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb277"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb277-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb277-2" data-line-number="2"><span class="bu">\usepackage</span>[stripIndent]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb277-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb277-4" data-line-number="4"> <span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb277-5" data-line-number="5"> Hello *world*!</a> +<a class="sourceLine" id="cb277-6" data-line-number="6"> <span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb277-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb278"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb278-1"><a href="#cb278-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb278"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb278-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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-22">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<h5 id="context-example-22" class="unnumbered">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="cb279"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb279-1"><a href="#cb279-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb279-2"><a href="#cb279-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionStripIndent</span>{true}</span> -<span id="cb279-3"><a href="#cb279-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb279-4"><a href="#cb279-4" aria-hidden="true"></a> <span class="fu">\startmarkdown</span></span> -<span id="cb279-5"><a href="#cb279-5" aria-hidden="true"></a> Hello *world*!</span> -<span id="cb279-6"><a href="#cb279-6" aria-hidden="true"></a> <span class="fu">\stopmarkdown</span></span> -<span id="cb279-7"><a href="#cb279-7" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb279"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb279-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb279-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionStripIndent{true}</a> +<a class="sourceLine" id="cb279-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb279-4" data-line-number="4"> <span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb279-5" data-line-number="5"> Hello *world*!</a> +<a class="sourceLine" id="cb279-6" data-line-number="6"> <span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb279-7" data-line-number="7"><span class="fu">\stoptext</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb280"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb280-1"><a href="#cb280-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb280"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb280-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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.29" id="option-tablecaptions"><span class="header-section-number">2.2.1.29</span> Option <code>tableCaptions</code></h4> +<h4 id="option-tablecaptions"><span class="header-section-number">2.2.1.29</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="cb281"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb281-1"><a href="#cb281-1" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb281-2"><a href="#cb281-2" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb281-3"><a href="#cb281-3" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb281-4"><a href="#cb281-4" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb281-5"><a href="#cb281-5" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb281-6"><a href="#cb281-6" aria-hidden="true"></a></span> -<span id="cb281-7"><a href="#cb281-7" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span></code></pre></div> +<div class="sourceCode" id="cb281"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb281-1" data-line-number="1">| Right | Left | Default | Center |</a> +<a class="sourceLine" id="cb281-2" data-line-number="2">|------:|:-----|---------|:------:|</a> +<a class="sourceLine" id="cb281-3" data-line-number="3">| 12 | 12 | 12 | 12 |</a> +<a class="sourceLine" id="cb281-4" data-line-number="4">| 123 | 123 | 123 | 123 |</a> +<a class="sourceLine" id="cb281-5" data-line-number="5">| 1 | 1 | 1 | 1 |</a> +<a class="sourceLine" id="cb281-6" data-line-number="6"></a> +<a class="sourceLine" id="cb281-7" data-line-number="7"> : Demonstration of pipe table syntax.</a></code></pre></div> </dd> </dl> </dd> @@ -3253,23 +3250,23 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-25"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb282"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb282-1"><a href="#cb282-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb282-2"><a href="#cb282-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> -<span id="cb282-3"><a href="#cb282-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb282-4"><a href="#cb282-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb282-5"><a href="#cb282-5" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb282-6"><a href="#cb282-6" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb282-7"><a href="#cb282-7" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb282-8"><a href="#cb282-8" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb282-9"><a href="#cb282-9" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb282-10"><a href="#cb282-10" aria-hidden="true"></a></span> -<span id="cb282-11"><a href="#cb282-11" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> -<span id="cb282-12"><a href="#cb282-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb282-13"><a href="#cb282-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb283"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb283-1"><a href="#cb283-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-25" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb282"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb282-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb282-2" data-line-number="2"><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb282-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb282-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb282-5" data-line-number="5">| Right | Left | Default | Center |</a> +<a class="sourceLine" id="cb282-6" data-line-number="6">|------:|:-----|---------|:------:|</a> +<a class="sourceLine" id="cb282-7" data-line-number="7">| 12 | 12 | 12 | 12 |</a> +<a class="sourceLine" id="cb282-8" data-line-number="8">| 123 | 123 | 123 | 123 |</a> +<a class="sourceLine" id="cb282-9" data-line-number="9">| 1 | 1 | 1 | 1 |</a> +<a class="sourceLine" id="cb282-10" data-line-number="10"></a> +<a class="sourceLine" id="cb282-11" data-line-number="11"> : Demonstration of pipe table syntax.</a> +<a class="sourceLine" id="cb282-12" data-line-number="12"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb282-13" data-line-number="13"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb283"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb283-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -3304,24 +3301,24 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-23">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb284"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb284-1"><a href="#cb284-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb284-2"><a href="#cb284-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionPipeTables</span>{true}</span> -<span id="cb284-3"><a href="#cb284-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTableCaptions</span>{true}</span> -<span id="cb284-4"><a href="#cb284-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb284-5"><a href="#cb284-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb284-6"><a href="#cb284-6" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb284-7"><a href="#cb284-7" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb284-8"><a href="#cb284-8" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb284-9"><a href="#cb284-9" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb284-10"><a href="#cb284-10" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb284-11"><a href="#cb284-11" aria-hidden="true"></a></span> -<span id="cb284-12"><a href="#cb284-12" aria-hidden="true"></a> : Demonstration of pipe table syntax.</span> -<span id="cb284-13"><a href="#cb284-13" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb284-14"><a href="#cb284-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb285"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb285-1"><a href="#cb285-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-23" class="unnumbered">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="cb284"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb284-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb284-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionPipeTables{true}</a> +<a class="sourceLine" id="cb284-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionTableCaptions{true}</a> +<a class="sourceLine" id="cb284-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb284-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb284-6" data-line-number="6">| Right | Left | Default | Center |</a> +<a class="sourceLine" id="cb284-7" data-line-number="7">|------:|:-----|---------|:------:|</a> +<a class="sourceLine" id="cb284-8" data-line-number="8">| 12 | 12 | 12 | 12 |</a> +<a class="sourceLine" id="cb284-9" data-line-number="9">| 123 | 123 | 123 | 123 |</a> +<a class="sourceLine" id="cb284-10" data-line-number="10">| 1 | 1 | 1 | 1 |</a> +<a class="sourceLine" id="cb284-11" data-line-number="11"></a> +<a class="sourceLine" id="cb284-12" data-line-number="12"> : Demonstration of pipe table syntax.</a> +<a class="sourceLine" id="cb284-13" data-line-number="13"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb284-14" data-line-number="14"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb285"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb285-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <table> @@ -3356,20 +3353,21 @@ Thomas,Edison,1847</code></pre> </tbody> </table> </blockquote> -<h4 data-number="2.2.1.30" id="option-texcomments"><span class="header-section-number">2.2.1.30</span> Option <code>texComments</code></h4> +<h4 id="option-texcomments"><span class="header-section-number">2.2.1.30</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="cb286"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb286-1"><a href="#cb286-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb286-2"><a href="#cb286-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</span> -<span id="cb286-3"><a href="#cb286-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb286-4"><a href="#cb286-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb286-5"><a href="#cb286-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb286-6"><a href="#cb286-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb286-7"><a href="#cb286-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb286-8"><a href="#cb286-8" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb286"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb286-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb286-2" data-line-number="2"><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb286-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb286-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb286-5" data-line-number="5">Hel<span class="co">% this is a comment</span></a> +<a class="sourceLine" id="cb286-6" data-line-number="6"> lo *world*!</a> +<a class="sourceLine" id="cb286-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb286-8" data-line-number="8"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Always enabled when <strong><code>hybrid</code></strong> is enabled.</p> </dd> </dl> </dd> @@ -3380,45 +3378,45 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-14">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<h5 id="plain-tex-example-14" class="unnumbered">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="cb287"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb287-1"><a href="#cb287-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb287-2"><a href="#cb287-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTeXComments</span>{true}</span> -<span id="cb287-3"><a href="#cb287-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb287-4"><a href="#cb287-4" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb287-5"><a href="#cb287-5" aria-hidden="true"></a> lo *world*!</span> -<span id="cb287-6"><a href="#cb287-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb287-7"><a href="#cb287-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb287"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb287-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb287-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTeXComments{true}</a> +<a class="sourceLine" id="cb287-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb287-4" data-line-number="4">Hel<span class="co">% this is a comment</span></a> +<a class="sourceLine" id="cb287-5" data-line-number="5"> lo *world*!</a> +<a class="sourceLine" id="cb287-6" data-line-number="6"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb287-7" data-line-number="7"><span class="fu">\bye</span></a></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">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb288"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb288-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-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="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>[texComments]{<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 class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb289-5"><a href="#cb289-5" aria-hidden="true"></a>Hel<span class="co">% this is a comment</span></span> -<span id="cb289-6"><a href="#cb289-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb289-7"><a href="#cb289-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb289-8"><a href="#cb289-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="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> +<h5 id="latex-example-26" class="unnumbered"><span class="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"><a class="sourceLine" id="cb289-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb289-2" data-line-number="2"><span class="bu">\usepackage</span>[texComments]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb289-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb289-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb289-5" data-line-number="5">Hel<span class="co">% this is a comment</span></a> +<a class="sourceLine" id="cb289-6" data-line-number="6"> lo *world*!</a> +<a class="sourceLine" id="cb289-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb289-8" data-line-number="8"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb290"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb290-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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-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="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">\def\markdownOptionTeXComments</span>{true}</span> -<span id="cb291-3"><a href="#cb291-3" aria-hidden="true"></a><span class="fu">\starttext</span></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>Hel<span class="co">% this is a comment</span></span> -<span id="cb291-6"><a href="#cb291-6" aria-hidden="true"></a> lo *world*!</span> -<span id="cb291-7"><a href="#cb291-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb291-8"><a href="#cb291-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="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> +<h5 id="context-example-24" class="unnumbered">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"><a class="sourceLine" id="cb291-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb291-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTeXComments{true}</a> +<a class="sourceLine" id="cb291-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb291-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb291-5" data-line-number="5">Hel<span class="co">% this is a comment</span></a> +<a class="sourceLine" id="cb291-6" data-line-number="6"> lo *world*!</a> +<a class="sourceLine" id="cb291-7" data-line-number="7"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb291-8" data-line-number="8"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb292"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb292-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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.31" id="option-tightlists"><span class="header-section-number">2.2.1.31</span> Option <code>tightLists</code></h4> +<h4 id="option-tightlists"><span class="header-section-number">2.2.1.31</span> Option <code>tightLists</code></h4> <dl> <dt><code>tightLists</code> (default value: <code>true</code>)</dt> <dd><dl> @@ -3434,39 +3432,39 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-27"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb293"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb293-1"><a href="#cb293-1" aria-hidden="true"></a><span class="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>{<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> -<span id="cb293-5"><a href="#cb293-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb293-6"><a href="#cb293-6" aria-hidden="true"></a>The following list is tight:</span> -<span id="cb293-7"><a href="#cb293-7" aria-hidden="true"></a></span> -<span id="cb293-8"><a href="#cb293-8" aria-hidden="true"></a> - first item</span> -<span id="cb293-9"><a href="#cb293-9" aria-hidden="true"></a> - second item</span> -<span id="cb293-10"><a href="#cb293-10" aria-hidden="true"></a> - third item</span> -<span id="cb293-11"><a href="#cb293-11" aria-hidden="true"></a></span> -<span id="cb293-12"><a href="#cb293-12" aria-hidden="true"></a>The following list is loose:</span> -<span id="cb293-13"><a href="#cb293-13" aria-hidden="true"></a></span> -<span id="cb293-14"><a href="#cb293-14" aria-hidden="true"></a> - first item</span> -<span id="cb293-15"><a href="#cb293-15" aria-hidden="true"></a> - second item that spans</span> -<span id="cb293-16"><a href="#cb293-16" aria-hidden="true"></a></span> -<span id="cb293-17"><a href="#cb293-17" aria-hidden="true"></a> multiple paragraphs</span> -<span id="cb293-18"><a href="#cb293-18" aria-hidden="true"></a> - third item</span> -<span id="cb293-19"><a href="#cb293-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb293-20"><a href="#cb293-20" aria-hidden="true"></a></span> -<span id="cb293-21"><a href="#cb293-21" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{tightLists=false}</span> -<span id="cb293-22"><a href="#cb293-22" aria-hidden="true"></a>The following list is now also loose:</span> -<span id="cb293-23"><a href="#cb293-23" aria-hidden="true"></a></span> -<span id="cb293-24"><a href="#cb293-24" aria-hidden="true"></a> - first item</span> -<span id="cb293-25"><a href="#cb293-25" aria-hidden="true"></a> - second item</span> -<span id="cb293-26"><a href="#cb293-26" aria-hidden="true"></a> - third item</span> -<span id="cb293-27"><a href="#cb293-27" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb293-28"><a href="#cb293-28" aria-hidden="true"></a></span> -<span id="cb293-29"><a href="#cb293-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="cb294"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb294-1"><a href="#cb294-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-27" class="unnumbered"><span class="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="cb293"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb293-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb293-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb293-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb293-4" data-line-number="4"></a> +<a class="sourceLine" id="cb293-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb293-6" data-line-number="6">The following list is tight:</a> +<a class="sourceLine" id="cb293-7" data-line-number="7"></a> +<a class="sourceLine" id="cb293-8" data-line-number="8"> - first item</a> +<a class="sourceLine" id="cb293-9" data-line-number="9"> - second item</a> +<a class="sourceLine" id="cb293-10" data-line-number="10"> - third item</a> +<a class="sourceLine" id="cb293-11" data-line-number="11"></a> +<a class="sourceLine" id="cb293-12" data-line-number="12">The following list is loose:</a> +<a class="sourceLine" id="cb293-13" data-line-number="13"></a> +<a class="sourceLine" id="cb293-14" data-line-number="14"> - first item</a> +<a class="sourceLine" id="cb293-15" data-line-number="15"> - second item that spans</a> +<a class="sourceLine" id="cb293-16" data-line-number="16"></a> +<a class="sourceLine" id="cb293-17" data-line-number="17"> multiple paragraphs</a> +<a class="sourceLine" id="cb293-18" data-line-number="18"> - third item</a> +<a class="sourceLine" id="cb293-19" data-line-number="19"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb293-20" data-line-number="20"></a> +<a class="sourceLine" id="cb293-21" data-line-number="21"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{tightLists=false}</a> +<a class="sourceLine" id="cb293-22" data-line-number="22">The following list is now also loose:</a> +<a class="sourceLine" id="cb293-23" data-line-number="23"></a> +<a class="sourceLine" id="cb293-24" data-line-number="24"> - first item</a> +<a class="sourceLine" id="cb293-25" data-line-number="25"> - second item</a> +<a class="sourceLine" id="cb293-26" data-line-number="26"> - third item</a> +<a class="sourceLine" id="cb293-27" data-line-number="27"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb293-28" data-line-number="28"></a> +<a class="sourceLine" id="cb293-29" data-line-number="29"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb294"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb294-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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> @@ -3477,9 +3475,9 @@ Thomas,Edison,1847</code></pre> </ul> <p>The following list is loose:</p> <ul> -<li><p>first item</p></li> +<li>first item</li> <li><p>second item that spans</p> -<p>multiple paragraphs</p></li> +multiple paragraphs</li> <li><p>third item</p></li> </ul> <p>The following list is now also loose:</p> @@ -3489,16 +3487,16 @@ Thomas,Edison,1847</code></pre> <li><p>third item</p></li> </ul> </blockquote> -<h4 data-number="2.2.1.32" id="option-underscores"><span class="header-section-number">2.2.1.32</span> Option <code>underscores</code></h4> +<h4 id="option-underscores"><span class="header-section-number">2.2.1.32</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="cb295"><pre class="sourceCode md"><code class="sourceCode markdown"><span id="cb295-1"><a href="#cb295-1" aria-hidden="true"></a>*single asterisks*</span> -<span id="cb295-2"><a href="#cb295-2" aria-hidden="true"></a>_single underscores_</span> -<span id="cb295-3"><a href="#cb295-3" aria-hidden="true"></a>**double asterisks**</span> -<span id="cb295-4"><a href="#cb295-4" aria-hidden="true"></a>__double underscores__</span></code></pre></div> +<div class="sourceCode" id="cb295"><pre class="sourceCode md"><code class="sourceCode markdown"><a class="sourceLine" id="cb295-1" data-line-number="1">*single asterisks*</a> +<a class="sourceLine" id="cb295-2" data-line-number="2">_single underscores_</a> +<a class="sourceLine" id="cb295-3" data-line-number="3">**double asterisks**</a> +<a class="sourceLine" id="cb295-4" data-line-number="4">__double underscores__</a></code></pre></div> </dd> </dl> </dd> @@ -3509,76 +3507,76 @@ Thomas,Edison,1847</code></pre> </dl> </dd> </dl> -<h5 class="unnumbered" data-number="" id="plain-tex-example-15">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb296"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb296-1"><a href="#cb296-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb296-2"><a href="#cb296-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb296-3"><a href="#cb296-3" aria-hidden="true"></a></span> -<span id="cb296-4"><a href="#cb296-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb296-5"><a href="#cb296-5" aria-hidden="true"></a>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="cb296-6"><a href="#cb296-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb296-7"><a href="#cb296-7" aria-hidden="true"></a></span> -<span id="cb296-8"><a href="#cb296-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> -<span id="cb296-9"><a href="#cb296-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb296-10"><a href="#cb296-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb296-11"><a href="#cb296-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb296-12"><a href="#cb296-12" aria-hidden="true"></a></span> -<span id="cb296-13"><a href="#cb296-13" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb297"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb297-1"><a href="#cb297-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-15" class="unnumbered">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb296"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb296-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb296-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionHybrid{true}</a> +<a class="sourceLine" id="cb296-3" data-line-number="3"></a> +<a class="sourceLine" id="cb296-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb296-5" data-line-number="5">This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</a> +<a class="sourceLine" id="cb296-6" data-line-number="6"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb296-7" data-line-number="7"></a> +<a class="sourceLine" id="cb296-8" data-line-number="8"><span class="fu">\def</span>\markdownOptionUnderscores{false}</a> +<a class="sourceLine" id="cb296-9" data-line-number="9"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb296-10" data-line-number="10">This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</a> +<a class="sourceLine" id="cb296-11" data-line-number="11"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb296-12" data-line-number="12"></a> +<a class="sourceLine" id="cb296-13" data-line-number="13"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb297"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb297-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-28"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb298"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb298-1"><a href="#cb298-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb298-2"><a href="#cb298-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[hybrid]{<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> -<span id="cb298-5"><a href="#cb298-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb298-6"><a href="#cb298-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="cb298-7"><a href="#cb298-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb298-8"><a href="#cb298-8" aria-hidden="true"></a></span> -<span id="cb298-9"><a href="#cb298-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{underscores=false}</span> -<span id="cb298-10"><a href="#cb298-10" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb298-11"><a href="#cb298-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb298-12"><a href="#cb298-12" aria-hidden="true"></a></span> -<span id="cb298-13"><a href="#cb298-13" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb299"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb299-1"><a href="#cb299-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-28" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb298"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb298-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb298-2" data-line-number="2"><span class="bu">\usepackage</span>[hybrid]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb298-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb298-4" data-line-number="4"></a> +<a class="sourceLine" id="cb298-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb298-6" data-line-number="6">This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</a> +<a class="sourceLine" id="cb298-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb298-8" data-line-number="8"></a> +<a class="sourceLine" id="cb298-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{underscores=false}</a> +<a class="sourceLine" id="cb298-10" data-line-number="10">This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</a> +<a class="sourceLine" id="cb298-11" data-line-number="11"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb298-12" data-line-number="12"></a> +<a class="sourceLine" id="cb298-13" data-line-number="13"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb299"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb299-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> <p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-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="cb300"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb300-1"><a href="#cb300-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb300-2"><a href="#cb300-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb300-3"><a href="#cb300-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb300-4"><a href="#cb300-4" aria-hidden="true"></a></span> -<span id="cb300-5"><a href="#cb300-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb300-6"><a href="#cb300-6" aria-hidden="true"></a>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="cb300-7"><a href="#cb300-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb300-8"><a href="#cb300-8" aria-hidden="true"></a></span> -<span id="cb300-9"><a href="#cb300-9" aria-hidden="true"></a><span class="fu">\def\markdownOptionUnderscores</span>{false}</span> -<span id="cb300-10"><a href="#cb300-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb300-11"><a href="#cb300-11" aria-hidden="true"></a>This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</span> -<span id="cb300-12"><a href="#cb300-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb300-13"><a href="#cb300-13" aria-hidden="true"></a></span> -<span id="cb300-14"><a href="#cb300-14" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb301"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb301-1"><a href="#cb301-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-25" class="unnumbered">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb300"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb300-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb300-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionHybrid{true}</a> +<a class="sourceLine" id="cb300-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb300-4" data-line-number="4"></a> +<a class="sourceLine" id="cb300-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb300-6" data-line-number="6">This is _emphasized text_ and this is a math subscript: <span class="ss">$m</span><span class="sc">\_</span><span class="ss">n$</span>.</a> +<a class="sourceLine" id="cb300-7" data-line-number="7"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb300-8" data-line-number="8"></a> +<a class="sourceLine" id="cb300-9" data-line-number="9"><span class="fu">\def</span>\markdownOptionUnderscores{false}</a> +<a class="sourceLine" id="cb300-10" data-line-number="10"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb300-11" data-line-number="11">This is *emphasized text* and this is a math subscript: <span class="ss">$m_n$</span>.</a> +<a class="sourceLine" id="cb300-12" data-line-number="12"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb300-13" data-line-number="13"></a> +<a class="sourceLine" id="cb300-14" data-line-number="14"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb301"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb301-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> <p>This is <em>emphasized text</em> and this is a math subscript: <em>mₙ</em>.</p> </blockquote> -<h3 data-number="2.2.2" id="plain-tex-1"><span class="header-section-number">2.2.2</span> Plain <span class="tex">T<sub>e</sub>X</span></h3> +<h3 id="plain-tex-1"><span class="header-section-number">2.2.2</span> Plain <span class="tex">T<sub>e</sub>X</span></h3> <p>Plain <span class="tex">T<sub>e</sub>X</span> options control the communication between the <span class="tex">T<sub>e</sub>X</span> interface and the <code>markdown</code> Lua module. They are supported by all higher-level interfaces of the Markdown package, i.e. the plain <span class="tex">T<sub>e</sub>X</span>, <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> and Con<span class="tex">T<sub>e</sub>X</span>t interfaces.</p> -<h4 data-number="2.2.2.1" id="finalizing-and-freezing-the-cache"><span class="header-section-number">2.2.2.1</span> Finalizing and Freezing the Cache</h4> +<h4 id="finalizing-and-freezing-the-cache"><span class="header-section-number">2.2.2.1</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 <code>\markdownOptionFrozenCache</code> options is as follows:</p> <ol type="1"> @@ -3589,7 +3587,7 @@ Thomas,Edison,1847</code></pre> <li>Publish the source code of the plain <span class="tex">T<sub>e</sub>X</span> document and the <strong><code>cacheDir</code></strong> directory.</li> </ol> <p>For more information, see the examples for the <strong><code>finalizeCache</code></strong> option.</p> -<h4 data-number="2.2.2.2" id="file-and-directory-names"><span class="header-section-number">2.2.2.2</span> File and Directory Names</h4> +<h4 id="file-and-directory-names"><span class="header-section-number">2.2.2.2</span> File and Directory Names</h4> <p>The plain <span class="tex">T<sub>e</sub>X</span> interface provides the following commands that you can use to specify the location of temporary files produced during the conversion from Markdown to <span class="tex">T<sub>e</sub>X</span>:</p> <ul> <li><code>\markdownOptionHelperScriptFileName</code>,</li> @@ -3601,59 +3599,59 @@ Thomas,Edison,1847</code></pre> <li><code>\markdownOptionFrozenCacheFileName</code>.</li> </ul> <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="cb302"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb302-1"><a href="#cb302-1" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb302-2"><a href="#cb302-2" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb302-3"><a href="#cb302-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionHelperScriptFileName</span>{helper-script.lua}</span> -<span id="cb302-4"><a href="#cb302-4" aria-hidden="true"></a><span class="fu">\def\markdownOptionInputTempFileName</span>{temporary-input.md}</span> -<span id="cb302-5"><a href="#cb302-5" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputTempFileName</span>{temporary-output.tex}</span> -<span id="cb302-6"><a href="#cb302-6" aria-hidden="true"></a><span class="fu">\def\markdownOptionErrorTempFileName</span>{error-output.txt}</span> -<span id="cb302-7"><a href="#cb302-7" aria-hidden="true"></a><span class="fu">\def\markdownOptionOutputDir</span>{output-directory}</span> -<span id="cb302-8"><a href="#cb302-8" aria-hidden="true"></a><span class="fu">\def\markdownOptionCacheDir</span>{output-directory/cache-directory}</span> -<span id="cb302-9"><a href="#cb302-9" aria-hidden="true"></a><span class="fu">\markdownOptionFinalizeCachetrue</span></span> -<span id="cb302-10"><a href="#cb302-10" aria-hidden="true"></a><span class="fu">\def\markdownOptionFrozenCacheFileName</span>{output-directory/cache-directory/frozen-cache.tex}</span> -<span id="cb302-11"><a href="#cb302-11" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb302-12"><a href="#cb302-12" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb302-13"><a href="#cb302-13" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb302-14"><a href="#cb302-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="cb303"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb303-1"><a href="#cb303-1" aria-hidden="true"></a><span class="ex">luatex</span> --output-directory output-directory document.tex</span></code></pre></div> +<div class="sourceCode" id="cb302"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb302-1" data-line-number="1"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb302-2" data-line-number="2"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb302-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionHelperScriptFileName{helper-script.lua}</a> +<a class="sourceLine" id="cb302-4" data-line-number="4"><span class="fu">\def</span>\markdownOptionInputTempFileName{temporary-input.md}</a> +<a class="sourceLine" id="cb302-5" data-line-number="5"><span class="fu">\def</span>\markdownOptionOutputTempFileName{temporary-output.tex}</a> +<a class="sourceLine" id="cb302-6" data-line-number="6"><span class="fu">\def</span>\markdownOptionErrorTempFileName{error-output.txt}</a> +<a class="sourceLine" id="cb302-7" data-line-number="7"><span class="fu">\def</span>\markdownOptionOutputDir{output-directory}</a> +<a class="sourceLine" id="cb302-8" data-line-number="8"><span class="fu">\def</span>\markdownOptionCacheDir{output-directory/cache-directory}</a> +<a class="sourceLine" id="cb302-9" data-line-number="9"><span class="fu">\markdownOptionFinalizeCachetrue</span></a> +<a class="sourceLine" id="cb302-10" data-line-number="10"><span class="fu">\def</span>\markdownOptionFrozenCacheFileName{output-directory/cache-directory/frozen-cache.tex}</a> +<a class="sourceLine" id="cb302-11" data-line-number="11"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb302-12" data-line-number="12">Hello *world*!</a> +<a class="sourceLine" id="cb302-13" data-line-number="13"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb302-14" data-line-number="14"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb303"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb303-1" data-line-number="1"><span class="ex">luatex</span> --output-directory output-directory document.tex</a></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="cb304"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb304-1"><a href="#cb304-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="cb304"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb304-1" data-line-number="1"><span class="ex">pdftex</span> --output-directory output-directory --shell-escape document.tex</a></code></pre></div> <p>Text documents named <code>helper-script.lua</code>, and <code>temporary-output.md</code> should be produced in the folder named <code>output-directory</code>. The document named <code>helper-script.lua</code> will contain Lua code that was executed to convert markdown to plain <span class="tex">T<sub>e</sub>X</span>. The document named <code>temporary-output.tex</code> will contain the input markdown document converted to <span class="tex">T<sub>e</sub>X</span>.</p> <p>No document named <code>error-output.txt</code> should be produced in the folder named <code>output-directory</code>. This document would only be produced if an error had occured while executing the Lua code. If this happens, please <a href="https://github.com/witiko/markdown/issues">file a bug</a>.</p> -<h4 data-number="2.2.2.3" id="package-documentation"><span class="header-section-number">2.2.2.3</span> Package Documentation</h4> +<h4 id="package-documentation"><span class="header-section-number">2.2.2.3</span> Package Documentation</h4> <p>The <code>\markdownOptionStripPercentSigns</code> macro controls whether a percent sign (<code>%</code>) at the beginning of a line will be discarded when reading Markdown input from a <span class="tex">T<sub>e</sub>X</span> document. This enables the use of markdown when writing <span class="tex">T<sub>e</sub>X</span> package documentation using the <a href="https://ctan.org/pkg/doc" title="doc – Format LaTeX documentation">Doc <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> package</a> by Frank Mittelbach. The recognized values of the macro are <code>true</code> (discard) and <code>false</code> (retain). It defaults to <code>false</code>.</p> <p>Using a text editor, create a text document named <code>document.dtx</code> with the following content:</p> -<div class="sourceCode" id="cb305"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb305-1"><a href="#cb305-1" aria-hidden="true"></a><span class="co">% \iffalse</span></span> -<span id="cb305-2"><a href="#cb305-2" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">ltxdoc</span>}</span> -<span id="cb305-3"><a href="#cb305-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[stripPercentSigns]{<span class="ex">markdown</span>}</span> -<span id="cb305-4"><a href="#cb305-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb305-5"><a href="#cb305-5" aria-hidden="true"></a><span class="fu">\DocInput</span>{document.dtx}</span> -<span id="cb305-6"><a href="#cb305-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span> -<span id="cb305-7"><a href="#cb305-7" aria-hidden="true"></a><span class="co">% \fi</span></span> -<span id="cb305-8"><a href="#cb305-8" aria-hidden="true"></a><span class="co">%</span></span> -<span id="cb305-9"><a href="#cb305-9" aria-hidden="true"></a><span class="co">% \begin{markdown}</span></span> -<span id="cb305-10"><a href="#cb305-10" aria-hidden="true"></a><span class="co">% Hello *world*!</span></span> -<span id="cb305-11"><a href="#cb305-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="cb306"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb306-1"><a href="#cb306-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.dtx</span></code></pre></div> +<div class="sourceCode" id="cb305"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb305-1" data-line-number="1"><span class="co">% \iffalse</span></a> +<a class="sourceLine" id="cb305-2" data-line-number="2"><span class="bu">\documentclass</span>{<span class="ex">ltxdoc</span>}</a> +<a class="sourceLine" id="cb305-3" data-line-number="3"><span class="bu">\usepackage</span>[stripPercentSigns]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb305-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb305-5" data-line-number="5"><span class="fu">\DocInput</span>{document.dtx}</a> +<a class="sourceLine" id="cb305-6" data-line-number="6"><span class="kw">\end</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb305-7" data-line-number="7"><span class="co">% \fi</span></a> +<a class="sourceLine" id="cb305-8" data-line-number="8"><span class="co">%</span></a> +<a class="sourceLine" id="cb305-9" data-line-number="9"><span class="co">% \begin{markdown}</span></a> +<a class="sourceLine" id="cb305-10" data-line-number="10"><span class="co">% Hello *world*!</span></a> +<a class="sourceLine" id="cb305-11" data-line-number="11"><span class="co">% \end{markdown}</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb306"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb306-1" data-line-number="1"><span class="ex">lualatex</span> document.dtx</a></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> +<h3 id="latex-1"><span class="header-section-number">2.2.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></h3> <p><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> options allow us to disable the redefinition of the default renderer prototypes from plain <span class="tex">T<sub>e</sub>X</span>, load user-contributed themes, and invoke user-defined setup snippets.</p> -<h4 data-number="2.2.3.1" id="no-default-token-renderer-prototypes"><span class="header-section-number">2.2.3.1</span> No default token renderer prototypes</h4> +<h4 id="no-default-token-renderer-prototypes"><span class="header-section-number">2.2.3.1</span> No default token renderer prototypes</h4> <p>Default token renderer prototypes require <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> packages that may clash with other packages used in a document. Additionally, if we redefine token renderers and renderer prototypes ourselves, the default definitions will bring no benefit to us. Using the <code>plain</code> package option, we can keep the default definitions from the plain <span class="tex">T<sub>e</sub>X</span> implementation (see Section ) and prevent the soft <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> prerequisites in Section from being loaded:</p> -<div class="sourceCode" id="cb307"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb307-1"><a href="#cb307-1" aria-hidden="true"></a><span class="bu">\usepackage</span>[plain]{<span class="ex">markdown</span>}</span></code></pre></div> -<h4 data-number="2.2.3.2" id="latex-themes"><span class="header-section-number">2.2.3.2</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes</h4> +<div class="sourceCode" id="cb307"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb307-1" data-line-number="1"><span class="bu">\usepackage</span>[plain]{<span class="ex">markdown</span>}</a></code></pre></div> +<h4 id="latex-themes"><span class="header-section-number">2.2.3.2</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> themes</h4> <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="cb308"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb308-1"><a href="#cb308-1" aria-hidden="true"></a><span class="bu">\usepackage</span>[</span> -<span id="cb308-2"><a href="#cb308-2" aria-hidden="true"></a> theme = witiko/beamer/MU,</span> -<span id="cb308-3"><a href="#cb308-3" aria-hidden="true"></a> theme = witiko/dot,</span> -<span id="cb308-4"><a href="#cb308-4" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span></code></pre></div> +<div class="sourceCode" id="cb308"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb308-1" data-line-number="1"><span class="bu">\usepackage</span>[</a> +<a class="sourceLine" id="cb308-2" data-line-number="2"> theme = witiko/beamer/MU,</a> +<a class="sourceLine" id="cb308-3" data-line-number="3"> theme = witiko/dot,</a> +<a class="sourceLine" id="cb308-4" data-line-number="4">]{<span class="ex">markdown</span>}</a></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> @@ -3661,44 +3659,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 <code>\markdownOptionFrozenCache</code> plain <span class="tex">T<sub>e</sub>X</span> option is enabled.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-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="cb309"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb309-1"><a href="#cb309-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb309-2"><a href="#cb309-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[theme=witiko/dot]{<span class="ex">markdown</span>}</span> -<span id="cb309-3"><a href="#cb309-3" aria-hidden="true"></a><span class="fu">\setkeys</span>{Gin}{</span> -<span id="cb309-4"><a href="#cb309-4" aria-hidden="true"></a> width=<span class="fu">\columnwidth</span>,</span> -<span id="cb309-5"><a href="#cb309-5" aria-hidden="true"></a> height=0.65<span class="fu">\paperheight</span>,</span> -<span id="cb309-6"><a href="#cb309-6" aria-hidden="true"></a> keepaspectratio}</span> -<span id="cb309-7"><a href="#cb309-7" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb309-8"><a href="#cb309-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb309-9"><a href="#cb309-9" aria-hidden="true"></a>``` dot Various formats of mathemathical formulae</span> -<span id="cb309-10"><a href="#cb309-10" aria-hidden="true"></a>digraph tree {</span> -<span id="cb309-11"><a href="#cb309-11" aria-hidden="true"></a> margin = 0;</span> -<span id="cb309-12"><a href="#cb309-12" aria-hidden="true"></a> rankdir = "LR";</span> -<span id="cb309-13"><a href="#cb309-13" aria-hidden="true"></a></span> -<span id="cb309-14"><a href="#cb309-14" aria-hidden="true"></a> latex -> pmml;</span> -<span id="cb309-15"><a href="#cb309-15" aria-hidden="true"></a> latex -> cmml;</span> -<span id="cb309-16"><a href="#cb309-16" aria-hidden="true"></a> pmml -> slt;</span> -<span id="cb309-17"><a href="#cb309-17" aria-hidden="true"></a> cmml -> opt;</span> -<span id="cb309-18"><a href="#cb309-18" aria-hidden="true"></a> cmml -> prefix;</span> -<span id="cb309-19"><a href="#cb309-19" aria-hidden="true"></a> cmml -> infix;</span> -<span id="cb309-20"><a href="#cb309-20" aria-hidden="true"></a> pmml -> mterms [style=dashed];</span> -<span id="cb309-21"><a href="#cb309-21" aria-hidden="true"></a> cmml -> mterms;</span> -<span id="cb309-22"><a href="#cb309-22" aria-hidden="true"></a></span> -<span id="cb309-23"><a href="#cb309-23" aria-hidden="true"></a> latex [label = "LaTeX"];</span> -<span id="cb309-24"><a href="#cb309-24" aria-hidden="true"></a> pmml [label = "Presentation MathML"];</span> -<span id="cb309-25"><a href="#cb309-25" aria-hidden="true"></a> cmml [label = "Content MathML"];</span> -<span id="cb309-26"><a href="#cb309-26" aria-hidden="true"></a> slt [label = "Symbol Layout Tree"];</span> -<span id="cb309-27"><a href="#cb309-27" aria-hidden="true"></a> opt [label = "Operator Tree"];</span> -<span id="cb309-28"><a href="#cb309-28" aria-hidden="true"></a> prefix [label = "Prefix"];</span> -<span id="cb309-29"><a href="#cb309-29" aria-hidden="true"></a> infix [label = "Infix"];</span> -<span id="cb309-30"><a href="#cb309-30" aria-hidden="true"></a> mterms [label = "M-Terms"];</span> -<span id="cb309-31"><a href="#cb309-31" aria-hidden="true"></a>}</span> -<span id="cb309-32"><a href="#cb309-32" aria-hidden="true"></a>```</span> -<span id="cb309-33"><a href="#cb309-33" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb309-34"><a href="#cb309-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="cb310"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb310-1"><a href="#cb310-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-29" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb309"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb309-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb309-2" data-line-number="2"><span class="bu">\usepackage</span>[theme=witiko/dot]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb309-3" data-line-number="3"><span class="fu">\setkeys</span>{Gin}{</a> +<a class="sourceLine" id="cb309-4" data-line-number="4"> width=<span class="fu">\columnwidth</span>,</a> +<a class="sourceLine" id="cb309-5" data-line-number="5"> height=0.65<span class="fu">\paperheight</span>,</a> +<a class="sourceLine" id="cb309-6" data-line-number="6"> keepaspectratio}</a> +<a class="sourceLine" id="cb309-7" data-line-number="7"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb309-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb309-9" data-line-number="9">``` dot Various formats of mathemathical formulae</a> +<a class="sourceLine" id="cb309-10" data-line-number="10">digraph tree {</a> +<a class="sourceLine" id="cb309-11" data-line-number="11"> margin = 0;</a> +<a class="sourceLine" id="cb309-12" data-line-number="12"> rankdir = "LR";</a> +<a class="sourceLine" id="cb309-13" data-line-number="13"></a> +<a class="sourceLine" id="cb309-14" data-line-number="14"> latex -> pmml;</a> +<a class="sourceLine" id="cb309-15" data-line-number="15"> latex -> cmml;</a> +<a class="sourceLine" id="cb309-16" data-line-number="16"> pmml -> slt;</a> +<a class="sourceLine" id="cb309-17" data-line-number="17"> cmml -> opt;</a> +<a class="sourceLine" id="cb309-18" data-line-number="18"> cmml -> prefix;</a> +<a class="sourceLine" id="cb309-19" data-line-number="19"> cmml -> infix;</a> +<a class="sourceLine" id="cb309-20" data-line-number="20"> pmml -> mterms [style=dashed];</a> +<a class="sourceLine" id="cb309-21" data-line-number="21"> cmml -> mterms;</a> +<a class="sourceLine" id="cb309-22" data-line-number="22"></a> +<a class="sourceLine" id="cb309-23" data-line-number="23"> latex [label = "LaTeX"];</a> +<a class="sourceLine" id="cb309-24" data-line-number="24"> pmml [label = "Presentation MathML"];</a> +<a class="sourceLine" id="cb309-25" data-line-number="25"> cmml [label = "Content MathML"];</a> +<a class="sourceLine" id="cb309-26" data-line-number="26"> slt [label = "Symbol Layout Tree"];</a> +<a class="sourceLine" id="cb309-27" data-line-number="27"> opt [label = "Operator Tree"];</a> +<a class="sourceLine" id="cb309-28" data-line-number="28"> prefix [label = "Prefix"];</a> +<a class="sourceLine" id="cb309-29" data-line-number="29"> infix [label = "Infix"];</a> +<a class="sourceLine" id="cb309-30" data-line-number="30"> mterms [label = "M-Terms"];</a> +<a class="sourceLine" id="cb309-31" data-line-number="31">}</a> +<a class="sourceLine" id="cb309-32" data-line-number="32">```</a> +<a class="sourceLine" id="cb309-33" data-line-number="33"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb309-34" data-line-number="34"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb310"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb310-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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> @@ -3708,22 +3706,22 @@ 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 <code>\markdownOptionFrozenCache</code> plain <span class="tex">T<sub>e</sub>X</span> option is enabled.</p> </dd> </dl> -<h5 class="unnumbered" data-number="" id="latex-example-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="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>[theme=witiko/graphicx/http]{<span class="ex">markdown</span>}</span> -<span id="cb311-3"><a href="#cb311-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb311-4"><a href="#cb311-4" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb311-5"><a href="#cb311-5" aria-hidden="true"></a>![img](https://github.com/witiko/markdown/raw/master/banner.png</span> -<span id="cb311-6"><a href="#cb311-6" aria-hidden="true"></a> "The banner of the Markdown package")</span> -<span id="cb311-7"><a href="#cb311-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb311-8"><a href="#cb311-8" aria-hidden="true"></a><span class="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> +<h5 id="latex-example-30" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb311"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb311-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb311-2" data-line-number="2"><span class="bu">\usepackage</span>[theme=witiko/graphicx/http]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb311-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb311-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb311-5" data-line-number="5">![img](https://github.com/witiko/markdown/raw/master/banner.png</a> +<a class="sourceLine" id="cb311-6" data-line-number="6"> "The banner of the Markdown package")</a> +<a class="sourceLine" id="cb311-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb311-8" data-line-number="8"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb312"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb312-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following image:</p> <blockquote> <figure> -<img src="https://github.com/witiko/markdown/raw/master/banner.png" title="The banner of the Markdown package" alt="" /><figcaption>img</figcaption> +<img src="https://github.com/witiko/markdown/raw/master/banner.png" title="The banner of the Markdown package" alt="img" /><figcaption>img</figcaption> </figure> </blockquote> <dl> @@ -3731,293 +3729,293 @@ 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-31"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 id="latex-example-31" class="unnumbered"><span class="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>[theme=witiko/tilde]{<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>Bartel~Leendert van~der~Waerden</span> -<span id="cb313-6"><a href="#cb313-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb313-7"><a href="#cb313-7" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb313"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb313-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb313-2" data-line-number="2"><span class="bu">\usepackage</span>[theme=witiko/tilde]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb313-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb313-4" data-line-number="4"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb313-5" data-line-number="5">Bartel~Leendert van~der~Waerden</a> +<a class="sourceLine" id="cb313-6" data-line-number="6"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb313-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">document</span>}</a></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="cb314"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb314-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, where the middot (<code>·</code>) denotes a non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> </blockquote> -<h4 data-number="2.2.3.3" id="latex-setup-snippets"><span class="header-section-number">2.2.3.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> setup snippets</h4> +<h4 id="latex-setup-snippets"><span class="header-section-number">2.2.3.3</span> <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> setup snippets</h4> <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="cb315"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb315-1"><a href="#cb315-1" aria-hidden="true"></a><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</span> -<span id="cb315-2"><a href="#cb315-2" aria-hidden="true"></a> renderers = {</span> -<span id="cb315-3"><a href="#cb315-3" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb315-4"><a href="#cb315-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="cb315-5"><a href="#cb315-5" aria-hidden="true"></a> },</span> -<span id="cb315-6"><a href="#cb315-6" aria-hidden="true"></a> },</span> -<span id="cb315-7"><a href="#cb315-7" aria-hidden="true"></a>}</span> -<span id="cb315-8"><a href="#cb315-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb315-9"><a href="#cb315-9" aria-hidden="true"></a></span> -<span id="cb315-10"><a href="#cb315-10" aria-hidden="true"></a>The following ordered list will be preceded by arabic numerals:</span> -<span id="cb315-11"><a href="#cb315-11" aria-hidden="true"></a></span> -<span id="cb315-12"><a href="#cb315-12" aria-hidden="true"></a>1. wahid</span> -<span id="cb315-13"><a href="#cb315-13" aria-hidden="true"></a>2. aithnayn</span> -<span id="cb315-14"><a href="#cb315-14" aria-hidden="true"></a></span> -<span id="cb315-15"><a href="#cb315-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb315-16"><a href="#cb315-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{snippet=romanNumerals}</span> -<span id="cb315-17"><a href="#cb315-17" aria-hidden="true"></a></span> -<span id="cb315-18"><a href="#cb315-18" aria-hidden="true"></a>The following ordered list will be preceded by roman numerals:</span> -<span id="cb315-19"><a href="#cb315-19" aria-hidden="true"></a></span> -<span id="cb315-20"><a href="#cb315-20" aria-hidden="true"></a>3. tres</span> -<span id="cb315-21"><a href="#cb315-21" aria-hidden="true"></a>4. quattuor</span> -<span id="cb315-22"><a href="#cb315-22" aria-hidden="true"></a></span> -<span id="cb315-23"><a href="#cb315-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> +<div class="sourceCode" id="cb315"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb315-1" data-line-number="1"><span class="fu">\markdownSetupSnippet</span>{romanNumerals}{</a> +<a class="sourceLine" id="cb315-2" data-line-number="2"> renderers = {</a> +<a class="sourceLine" id="cb315-3" data-line-number="3"> olItemWithNumber = {<span class="co">%</span></a> +<a class="sourceLine" id="cb315-4" data-line-number="4"> <span class="fu">\item</span>[<span class="fu">\romannumeral</span>#1<span class="fu">\relax</span>.]<span class="co">%</span></a> +<a class="sourceLine" id="cb315-5" data-line-number="5"> },</a> +<a class="sourceLine" id="cb315-6" data-line-number="6"> },</a> +<a class="sourceLine" id="cb315-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb315-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb315-9" data-line-number="9"></a> +<a class="sourceLine" id="cb315-10" data-line-number="10">The following ordered list will be preceded by arabic numerals:</a> +<a class="sourceLine" id="cb315-11" data-line-number="11"></a> +<a class="sourceLine" id="cb315-12" data-line-number="12">1. wahid</a> +<a class="sourceLine" id="cb315-13" data-line-number="13">2. aithnayn</a> +<a class="sourceLine" id="cb315-14" data-line-number="14"></a> +<a class="sourceLine" id="cb315-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb315-16" data-line-number="16"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{snippet=romanNumerals}</a> +<a class="sourceLine" id="cb315-17" data-line-number="17"></a> +<a class="sourceLine" id="cb315-18" data-line-number="18">The following ordered list will be preceded by roman numerals:</a> +<a class="sourceLine" id="cb315-19" data-line-number="19"></a> +<a class="sourceLine" id="cb315-20" data-line-number="20">3. tres</a> +<a class="sourceLine" id="cb315-21" data-line-number="21">4. quattuor</a> +<a class="sourceLine" id="cb315-22" data-line-number="22"></a> +<a class="sourceLine" id="cb315-23" data-line-number="23"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a></code></pre></div> +<h2 id="markdown-tokens"><span class="header-section-number">2.3</span> Markdown Tokens</h2> <p>A key feature of the Markdown package is the support for manipulating markdown tokens, such as headings, emphasized text, links, and lists, in <span class="tex">T<sub>e</sub>X</span>. Instead of reducing <span class="tex">T<sub>e</sub>X</span> to a PDF document producer, the Markdown package allows the user to specify how every markdown token should be processed and rendered.</p> -<h3 data-number="2.3.1" id="token-renderers"><span class="header-section-number">2.3.1</span> Token Renderers</h3> +<h3 id="token-renderers"><span class="header-section-number">2.3.1</span> Token Renderers</h3> <p>Token renderers are user-defined <span class="tex">T<sub>e</sub>X</span> macros, which render markdown tokens. In this section, I will describe the individual token renderers.</p> -<h4 data-number="2.3.1.1" id="interblock-separator-renderer"><span class="header-section-number">2.3.1.1</span> Interblock Separator Renderer</h4> +<h4 id="interblock-separator-renderer"><span class="header-section-number">2.3.1.1</span> Interblock Separator Renderer</h4> <p>The <code>\markdownRendererInterblockSeparator</code> macro represents a separator between two markdown block elements. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-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="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\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb316-3"><a href="#cb316-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb316-4"><a href="#cb316-4" aria-hidden="true"></a> {<span class="fu">\it</span>(The end of a block)}<span class="co">%</span></span> -<span id="cb316-5"><a href="#cb316-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb316-6"><a href="#cb316-6" aria-hidden="true"></a>}</span> -<span id="cb316-7"><a href="#cb316-7" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb316-8"><a href="#cb316-8" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb316-9"><a href="#cb316-9" aria-hidden="true"></a></span> -<span id="cb316-10"><a href="#cb316-10" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb316-11"><a href="#cb316-11" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb316-12"><a href="#cb316-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="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> +<h5 id="plain-tex-example-16" class="unnumbered">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="cb316"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb316-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb316-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb316-3" data-line-number="3"> \par</a> +<a class="sourceLine" id="cb316-4" data-line-number="4"> {\it(The end of a block)}<span class="co">%</span></a> +<a class="sourceLine" id="cb316-5" data-line-number="5"> \par</a> +<a class="sourceLine" id="cb316-6" data-line-number="6">}</a> +<a class="sourceLine" id="cb316-7" data-line-number="7"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb316-8" data-line-number="8">Hello *world*!</a> +<a class="sourceLine" id="cb316-9" data-line-number="9"></a> +<a class="sourceLine" id="cb316-10" data-line-number="10">_Foo_ bar!</a> +<a class="sourceLine" id="cb316-11" data-line-number="11"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb316-12" data-line-number="12"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb317"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb317-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-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="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>{<span class="ex">markdown</span>}</span> -<span id="cb318-3"><a href="#cb318-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb318-4"><a href="#cb318-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb318-5"><a href="#cb318-5" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb318-6"><a href="#cb318-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb318-7"><a href="#cb318-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> -<span id="cb318-8"><a href="#cb318-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb318-9"><a href="#cb318-9" aria-hidden="true"></a> },</span> -<span id="cb318-10"><a href="#cb318-10" aria-hidden="true"></a> },</span> -<span id="cb318-11"><a href="#cb318-11" aria-hidden="true"></a>}</span> -<span id="cb318-12"><a href="#cb318-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb318-13"><a href="#cb318-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb318-14"><a href="#cb318-14" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb318-15"><a href="#cb318-15" aria-hidden="true"></a></span> -<span id="cb318-16"><a href="#cb318-16" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb318-17"><a href="#cb318-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb318-18"><a href="#cb318-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="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> +<h5 id="latex-example-32" class="unnumbered"><span class="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="cb318"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb318-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb318-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb318-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb318-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb318-5" data-line-number="5"> interblockSeparator = {<span class="co">%</span></a> +<a class="sourceLine" id="cb318-6" data-line-number="6"> <span class="fu">\par</span></a> +<a class="sourceLine" id="cb318-7" data-line-number="7"> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></a> +<a class="sourceLine" id="cb318-8" data-line-number="8"> <span class="fu">\par</span></a> +<a class="sourceLine" id="cb318-9" data-line-number="9"> },</a> +<a class="sourceLine" id="cb318-10" data-line-number="10"> },</a> +<a class="sourceLine" id="cb318-11" data-line-number="11">}</a> +<a class="sourceLine" id="cb318-12" data-line-number="12"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb318-13" data-line-number="13"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb318-14" data-line-number="14">Hello *world*!</a> +<a class="sourceLine" id="cb318-15" data-line-number="15"></a> +<a class="sourceLine" id="cb318-16" data-line-number="16">_Foo_ bar!</a> +<a class="sourceLine" id="cb318-17" data-line-number="17"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb318-18" data-line-number="18"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb319"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb319-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(The end of a block)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-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="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\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb320-3"><a href="#cb320-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb320-4"><a href="#cb320-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(The end of a block)}<span class="co">%</span></span> -<span id="cb320-5"><a href="#cb320-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb320-6"><a href="#cb320-6" aria-hidden="true"></a>}</span> -<span id="cb320-7"><a href="#cb320-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb320-8"><a href="#cb320-8" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb320-9"><a href="#cb320-9" aria-hidden="true"></a>Hello *world*!</span> -<span id="cb320-10"><a href="#cb320-10" aria-hidden="true"></a></span> -<span id="cb320-11"><a href="#cb320-11" aria-hidden="true"></a>_Foo_ bar!</span> -<span id="cb320-12"><a href="#cb320-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb320-13"><a href="#cb320-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="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> +<h5 id="context-example-26" class="unnumbered">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="cb320"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb320-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb320-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb320-3" data-line-number="3"> \par</a> +<a class="sourceLine" id="cb320-4" data-line-number="4"> \emph{(The end of a block)}<span class="co">%</span></a> +<a class="sourceLine" id="cb320-5" data-line-number="5"> \par</a> +<a class="sourceLine" id="cb320-6" data-line-number="6">}</a> +<a class="sourceLine" id="cb320-7" data-line-number="7"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb320-8" data-line-number="8"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb320-9" data-line-number="9">Hello *world*!</a> +<a class="sourceLine" id="cb320-10" data-line-number="10"></a> +<a class="sourceLine" id="cb320-11" data-line-number="11">_Foo_ bar!</a> +<a class="sourceLine" id="cb320-12" data-line-number="12"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb320-13" data-line-number="13"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb321"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb321-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(The end of a block)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h4 data-number="2.3.1.2" id="line-break-renderer"><span class="header-section-number">2.3.1.2</span> Line Break Renderer</h4> +<h4 id="line-break-renderer"><span class="header-section-number">2.3.1.2</span> Line Break Renderer</h4> <p>The <code>\markdownRendererLineBreak</code> macro represents a forced line break. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-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="cb322"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb322-1"><a href="#cb322-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb322-2"><a href="#cb322-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> -<span id="cb322-3"><a href="#cb322-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb322-4"><a href="#cb322-4" aria-hidden="true"></a> {<span class="fu">\it</span>(A forced linebreak)}<span class="co">%</span></span> -<span id="cb322-5"><a href="#cb322-5" aria-hidden="true"></a> <span class="fu">\par</span></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><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb322-8"><a href="#cb322-8" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="plain-tex-example-17" class="unnumbered">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="cb322"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb322-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb322-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererLineBreak{<span class="co">%</span></a> +<a class="sourceLine" id="cb322-3" data-line-number="3"> \par</a> +<a class="sourceLine" id="cb322-4" data-line-number="4"> {\it(A forced linebreak)}<span class="co">%</span></a> +<a class="sourceLine" id="cb322-5" data-line-number="5"> \par</a> +<a class="sourceLine" id="cb322-6" data-line-number="6">}</a> +<a class="sourceLine" id="cb322-7" data-line-number="7"><span class="fu">\markdownInput</span>{example.md}</a> +<a class="sourceLine" id="cb322-8" data-line-number="8"><span class="fu">\bye</span></a></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="cb323"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb323-1"><a href="#cb323-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb323"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb323-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-33"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb324"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb324-1"><a href="#cb324-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb324-2"><a href="#cb324-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb324-3"><a href="#cb324-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb324-4"><a href="#cb324-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb324-5"><a href="#cb324-5" aria-hidden="true"></a> lineBreak = {<span class="co">%</span></span> -<span id="cb324-6"><a href="#cb324-6" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb324-7"><a href="#cb324-7" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> -<span id="cb324-8"><a href="#cb324-8" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb324-9"><a href="#cb324-9" aria-hidden="true"></a> },</span> -<span id="cb324-10"><a href="#cb324-10" aria-hidden="true"></a> },</span> -<span id="cb324-11"><a href="#cb324-11" aria-hidden="true"></a>}</span> -<span id="cb324-12"><a href="#cb324-12" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb324-13"><a href="#cb324-13" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb324-14"><a href="#cb324-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<h5 id="latex-example-33" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb324"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb324-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb324-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb324-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb324-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb324-5" data-line-number="5"> lineBreak = {<span class="co">%</span></a> +<a class="sourceLine" id="cb324-6" data-line-number="6"> <span class="fu">\par</span></a> +<a class="sourceLine" id="cb324-7" data-line-number="7"> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></a> +<a class="sourceLine" id="cb324-8" data-line-number="8"> <span class="fu">\par</span></a> +<a class="sourceLine" id="cb324-9" data-line-number="9"> },</a> +<a class="sourceLine" id="cb324-10" data-line-number="10"> },</a> +<a class="sourceLine" id="cb324-11" data-line-number="11">}</a> +<a class="sourceLine" id="cb324-12" data-line-number="12"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb324-13" data-line-number="13"><span class="fu">\markdownInput</span>{example.md}</a> +<a class="sourceLine" id="cb324-14" data-line-number="14"><span class="kw">\end</span>{<span class="ex">document</span>}</a></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="cb325"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb325-1"><a href="#cb325-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb325"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb325-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(A forced linebreak)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-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="cb326"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb326-1"><a href="#cb326-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb326-2"><a href="#cb326-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLineBreak</span>{<span class="co">%</span></span> -<span id="cb326-3"><a href="#cb326-3" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb326-4"><a href="#cb326-4" aria-hidden="true"></a> <span class="fu">\emph</span>{(A forced linebreak)}<span class="co">%</span></span> -<span id="cb326-5"><a href="#cb326-5" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb326-6"><a href="#cb326-6" aria-hidden="true"></a>}</span> -<span id="cb326-7"><a href="#cb326-7" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb326-8"><a href="#cb326-8" aria-hidden="true"></a><span class="fu">\markdownInput</span>{example.md}</span> -<span id="cb326-9"><a href="#cb326-9" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<h5 id="context-example-27" class="unnumbered">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="cb326"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb326-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb326-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererLineBreak{<span class="co">%</span></a> +<a class="sourceLine" id="cb326-3" data-line-number="3"> \par</a> +<a class="sourceLine" id="cb326-4" data-line-number="4"> \emph{(A forced linebreak)}<span class="co">%</span></a> +<a class="sourceLine" id="cb326-5" data-line-number="5"> \par</a> +<a class="sourceLine" id="cb326-6" data-line-number="6">}</a> +<a class="sourceLine" id="cb326-7" data-line-number="7"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb326-8" data-line-number="8"><span class="fu">\markdownInput</span>{example.md}</a> +<a class="sourceLine" id="cb326-9" data-line-number="9"><span class="fu">\stoptext</span></a></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="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> +<div class="sourceCode" id="cb327"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb327-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(A forced linebreak)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h4 data-number="2.3.1.3" id="ellipsis-renderer"><span class="header-section-number">2.3.1.3</span> Ellipsis Renderer</h4> +<h4 id="ellipsis-renderer"><span class="header-section-number">2.3.1.3</span> Ellipsis Renderer</h4> <p>The <code>\markdownRendererEllipsis</code> macro replaces any occurance of ASCII ellipses in the input text. This macro will only be produced, when the <strong><code>smartEllipses</code></strong> option is enabled. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-18">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<h5 id="plain-tex-example-18" class="unnumbered">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="cb328"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb328-1"><a href="#cb328-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb328-2"><a href="#cb328-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb328-3"><a href="#cb328-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{{<span class="fu">\it</span> SHAZAM}!}</span> -<span id="cb328-4"><a href="#cb328-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb328-5"><a href="#cb328-5" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb328-6"><a href="#cb328-6" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb328-7"><a href="#cb328-7" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<div class="sourceCode" id="cb328"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb328-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb328-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionSmartEllipses{true}</a> +<a class="sourceLine" id="cb328-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererEllipsis{{\it SHAZAM}!}</a> +<a class="sourceLine" id="cb328-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb328-5" data-line-number="5">The secret word is ...</a> +<a class="sourceLine" id="cb328-6" data-line-number="6"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb328-7" data-line-number="7"><span class="fu">\bye</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb329"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb329-1"><a href="#cb329-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb329"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb329-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-34"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb330"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb330-1"><a href="#cb330-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb330-2"><a href="#cb330-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> -<span id="cb330-3"><a href="#cb330-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb330-4"><a href="#cb330-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb330-5"><a href="#cb330-5" aria-hidden="true"></a> ellipsis = <span class="fu">\emph</span>{SHAZAM}!,</span> -<span id="cb330-6"><a href="#cb330-6" aria-hidden="true"></a> },</span> -<span id="cb330-7"><a href="#cb330-7" aria-hidden="true"></a>}</span> -<span id="cb330-8"><a href="#cb330-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb330-9"><a href="#cb330-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb330-10"><a href="#cb330-10" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb330-11"><a href="#cb330-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb330-12"><a href="#cb330-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="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.tex</span></code></pre></div> +<h5 id="latex-example-34" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb330"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb330-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb330-2" data-line-number="2"><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb330-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb330-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb330-5" data-line-number="5"> ellipsis = <span class="fu">\emph</span>{SHAZAM}!,</a> +<a class="sourceLine" id="cb330-6" data-line-number="6"> },</a> +<a class="sourceLine" id="cb330-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb330-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb330-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb330-10" data-line-number="10">The secret word is ...</a> +<a class="sourceLine" id="cb330-11" data-line-number="11"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb330-12" data-line-number="12"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb331"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb331-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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-28">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<h5 id="context-example-28" class="unnumbered">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb332"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb332-1"><a href="#cb332-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb332-2"><a href="#cb332-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionSmartEllipses</span>{true}</span> -<span id="cb332-3"><a href="#cb332-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererEllipsis</span>{<span class="fu">\emph</span>{SHAZAM}!}</span> -<span id="cb332-4"><a href="#cb332-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb332-5"><a href="#cb332-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb332-6"><a href="#cb332-6" aria-hidden="true"></a>The secret word is ...</span> -<span id="cb332-7"><a href="#cb332-7" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb332-8"><a href="#cb332-8" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb332"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb332-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb332-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionSmartEllipses{true}</a> +<a class="sourceLine" id="cb332-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererEllipsis{\emph{SHAZAM}!}</a> +<a class="sourceLine" id="cb332-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb332-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb332-6" data-line-number="6">The secret word is ...</a> +<a class="sourceLine" id="cb332-7" data-line-number="7"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb332-8" data-line-number="8"><span class="fu">\stoptext</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb333"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb333-1"><a href="#cb333-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb333"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb333-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Hello <em>world</em>!</p> <p><em>(The end of a block)</em></p> <p><em>Foo</em> bar!</p> </blockquote> -<h4 data-number="2.3.1.4" id="non-breaking-space-renderer"><span class="header-section-number">2.3.1.4</span> Non-Breaking Space Renderer</h4> +<h4 id="non-breaking-space-renderer"><span class="header-section-number">2.3.1.4</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-35"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 id="latex-example-35" class="unnumbered"><span class="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="cb334"><pre class="sourceCode bib"><code class="sourceCode bibtex"><span id="cb334-1"><a href="#cb334-1" aria-hidden="true"></a><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</span> -<span id="cb334-2"><a href="#cb334-2" aria-hidden="true"></a> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</span> -<span id="cb334-3"><a href="#cb334-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="cb334-4"><a href="#cb334-4" aria-hidden="true"></a> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</span> -<span id="cb334-5"><a href="#cb334-5" aria-hidden="true"></a> <span class="dt">year</span> = "<span class="st">1984</span>"</span> -<span id="cb334-6"><a href="#cb334-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="cb335"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb335-1"><a href="#cb335-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb335-2"><a href="#cb335-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[</span> -<span id="cb335-3"><a href="#cb335-3" aria-hidden="true"></a> citations,</span> -<span id="cb335-4"><a href="#cb335-4" aria-hidden="true"></a> citationNbsps,</span> -<span id="cb335-5"><a href="#cb335-5" aria-hidden="true"></a>]{<span class="ex">markdown</span>}</span> -<span id="cb335-6"><a href="#cb335-6" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb335-7"><a href="#cb335-7" aria-hidden="true"></a> renderers = {</span> -<span id="cb335-8"><a href="#cb335-8" aria-hidden="true"></a> nbsp = {<span class="ss">$</span><span class="sc">\cdot</span><span class="ss">$</span>},</span> -<span id="cb335-9"><a href="#cb335-9" aria-hidden="true"></a> },</span> -<span id="cb335-10"><a href="#cb335-10" aria-hidden="true"></a>}</span> -<span id="cb335-11"><a href="#cb335-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb335-12"><a href="#cb335-12" aria-hidden="true"></a></span> -<span id="cb335-13"><a href="#cb335-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb335-14"><a href="#cb335-14" aria-hidden="true"></a>The TeXbook [@knuth:tex, p. 123 and 130] is good.</span> -<span id="cb335-15"><a href="#cb335-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb335-16"><a href="#cb335-16" aria-hidden="true"></a></span> -<span id="cb335-17"><a href="#cb335-17" aria-hidden="true"></a><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</span> -<span id="cb335-18"><a href="#cb335-18" aria-hidden="true"></a><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</span> -<span id="cb335-19"><a href="#cb335-19" aria-hidden="true"></a></span> -<span id="cb335-20"><a href="#cb335-20" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> +<div class="sourceCode" id="cb334"><pre class="sourceCode bib"><code class="sourceCode bibtex"><a class="sourceLine" id="cb334-1" data-line-number="1"><span class="va">@book</span>{<span class="ot">knuth:tex</span>,</a> +<a class="sourceLine" id="cb334-2" data-line-number="2"> <span class="dt">author</span> = "<span class="st">Knuth, Donald Ervin</span>",</a> +<a class="sourceLine" id="cb334-3" data-line-number="3"> <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>",</a> +<a class="sourceLine" id="cb334-4" data-line-number="4"> <span class="dt">publisher</span> = "<span class="st">Addison-Wesley</span>",</a> +<a class="sourceLine" id="cb334-5" data-line-number="5"> <span class="dt">year</span> = "<span class="st">1984</span>"</a> +<a class="sourceLine" id="cb334-6" data-line-number="6">}</a></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="cb335"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb335-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb335-2" data-line-number="2"><span class="bu">\usepackage</span>[</a> +<a class="sourceLine" id="cb335-3" data-line-number="3"> citations,</a> +<a class="sourceLine" id="cb335-4" data-line-number="4"> citationNbsps,</a> +<a class="sourceLine" id="cb335-5" data-line-number="5">]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb335-6" data-line-number="6"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb335-7" data-line-number="7"> renderers = {</a> +<a class="sourceLine" id="cb335-8" data-line-number="8"> nbsp = {<span class="ss">$</span><span class="sc">\cdot</span><span class="ss">$</span>},</a> +<a class="sourceLine" id="cb335-9" data-line-number="9"> },</a> +<a class="sourceLine" id="cb335-10" data-line-number="10">}</a> +<a class="sourceLine" id="cb335-11" data-line-number="11"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb335-12" data-line-number="12"></a> +<a class="sourceLine" id="cb335-13" data-line-number="13"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb335-14" data-line-number="14">The TeXbook [@knuth:tex, p. 123 and 130] is good.</a> +<a class="sourceLine" id="cb335-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb335-16" data-line-number="16"></a> +<a class="sourceLine" id="cb335-17" data-line-number="17"><span class="bu">\bibliographystyle</span>{<span class="ex">plain</span>}</a> +<a class="sourceLine" id="cb335-18" data-line-number="18"><span class="bu">\bibliography</span>{<span class="ex">document.bib</span>}</a> +<a class="sourceLine" id="cb335-19" data-line-number="19"></a> +<a class="sourceLine" id="cb335-20" data-line-number="20"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> <p>Next, invoke LuaTeX and BibTeX from the terminal:</p> -<div class="sourceCode" id="cb336"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb336-1"><a href="#cb336-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb336-2"><a href="#cb336-2" aria-hidden="true"></a><span class="ex">bibtex</span> document.aux</span> -<span id="cb336-3"><a href="#cb336-3" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb336-4"><a href="#cb336-4" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb336"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb336-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a> +<a class="sourceLine" id="cb336-2" data-line-number="2"><span class="ex">bibtex</span> document.aux</a> +<a class="sourceLine" id="cb336-3" data-line-number="3"><span class="ex">lualatex</span> document.tex</a> +<a class="sourceLine" id="cb336-4" data-line-number="4"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>The TeXbook [1, p.·123·and·130] is good.</p> <h3 id="references-2">References</h3> <p>[1] Donald Ervin Knuth. <em>The TeXbook, volume A of Computers and typesetting.</em> Addison-Wesley, 1984.</p> </blockquote> -<h4 data-number="2.3.1.5" id="special-character-renderers"><span class="header-section-number">2.3.1.5</span> Special Character Renderers</h4> +<h4 id="special-character-renderers"><span class="header-section-number">2.3.1.5</span> Special Character Renderers</h4> <p>The following macros replace any special plain <span class="tex">T<sub>e</sub>X</span> characters, including the active pipe character (<code>|</code>) of Con<span class="tex">T<sub>e</sub>X</span>t, in the input text:</p> <ul> <li><code>\markdownRendererAmpersand</code> replaces the ampersand (<code>&</code>).</li> @@ -4032,405 +4030,405 @@ Thomas,Edison,1847</code></pre> <li><code>\markdownRendererTilde</code> replaces the tilde (<code>~</code>).</li> <li><code>\markdownRendererUnderscore</code> replaces the underscore (<code>_</code>).</li> </ul> -<h5 class="unnumbered" data-number="" id="plain-tex-example-19">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<h5 id="plain-tex-example-19" class="unnumbered">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="cb337"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb337-1"><a href="#cb337-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb337-2"><a href="#cb337-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> -<span id="cb337-3"><a href="#cb337-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb337-4"><a href="#cb337-4" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb337-5"><a href="#cb337-5" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb337-6"><a href="#cb337-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="cb338"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb338-1"><a href="#cb338-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb337"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb337-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb337-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererTilde{~}</a> +<a class="sourceLine" id="cb337-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb337-4" data-line-number="4">Bartel~Leendert van~der~Waerden</a> +<a class="sourceLine" id="cb337-5" data-line-number="5"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb337-6" data-line-number="6"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb338"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb338-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-36"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<h5 id="latex-example-36" class="unnumbered"><span class="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="cb339"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb339-1"><a href="#cb339-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb339-2"><a href="#cb339-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb339-3"><a href="#cb339-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb339-4"><a href="#cb339-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb339-5"><a href="#cb339-5" aria-hidden="true"></a> tilde = ~,</span> -<span id="cb339-6"><a href="#cb339-6" aria-hidden="true"></a> },</span> -<span id="cb339-7"><a href="#cb339-7" aria-hidden="true"></a>}</span> -<span id="cb339-8"><a href="#cb339-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb339-9"><a href="#cb339-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb339-10"><a href="#cb339-10" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb339-11"><a href="#cb339-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb339-12"><a href="#cb339-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="cb340"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb340-1"><a href="#cb340-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb339"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb339-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb339-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb339-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb339-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb339-5" data-line-number="5"> tilde = ~,</a> +<a class="sourceLine" id="cb339-6" data-line-number="6"> },</a> +<a class="sourceLine" id="cb339-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb339-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb339-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb339-10" data-line-number="10">Bartel~Leendert van~der~Waerden</a> +<a class="sourceLine" id="cb339-11" data-line-number="11"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb339-12" data-line-number="12"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb340"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb340-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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-29">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<h5 id="context-example-29" class="unnumbered">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="cb341"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb341-1"><a href="#cb341-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb341-2"><a href="#cb341-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{~}</span> -<span id="cb341-3"><a href="#cb341-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb341-4"><a href="#cb341-4" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb341-5"><a href="#cb341-5" aria-hidden="true"></a>Bartel~Leendert van~der~Waerden</span> -<span id="cb341-6"><a href="#cb341-6" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb341-7"><a href="#cb341-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="cb342"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb342-1"><a href="#cb342-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb341"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb341-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb341-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererTilde{~}</a> +<a class="sourceLine" id="cb341-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb341-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb341-5" data-line-number="5">Bartel~Leendert van~der~Waerden</a> +<a class="sourceLine" id="cb341-6" data-line-number="6"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb341-7" data-line-number="7"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb342"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb342-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text, where the middot (<code>·</code>) denotes a non-breaking space:</p> <blockquote> <p>Bartel·Leendert van·der·Waerden</p> </blockquote> -<h4 data-number="2.3.1.6" id="code-span-renderer"><span class="header-section-number">2.3.1.6</span> Code Span Renderer</h4> +<h4 id="code-span-renderer"><span class="header-section-number">2.3.1.6</span> Code Span Renderer</h4> <p>The <code>\markdownRendererCodeSpan</code> macro represents inlined code span in the input text. It receives a single argument that corresponds to the inlined code span.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-20">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb343"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb343-1"><a href="#cb343-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb343-2"><a href="#cb343-2" aria-hidden="true"></a><span class="fu">\input</span> lmfonts</span> -<span id="cb343-3"><a href="#cb343-3" aria-hidden="true"></a></span> -<span id="cb343-4"><a href="#cb343-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> -<span id="cb343-5"><a href="#cb343-5" aria-hidden="true"></a></span> -<span id="cb343-6"><a href="#cb343-6" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb343-7"><a href="#cb343-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="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="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb343-10"><a href="#cb343-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb343-11"><a href="#cb343-11" aria-hidden="true"></a></span> -<span id="cb343-12"><a href="#cb343-12" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb343-13"><a href="#cb343-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb343-14"><a href="#cb343-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="cb343-15"><a href="#cb343-15" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb343-16"><a href="#cb343-16" aria-hidden="true"></a></span> -<span id="cb343-17"><a href="#cb343-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="cb344"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb344-1"><a href="#cb344-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-20" class="unnumbered">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="cb343"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb343-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb343-2" data-line-number="2"><span class="fu">\input</span> lmfonts</a> +<a class="sourceLine" id="cb343-3" data-line-number="3"></a> +<a class="sourceLine" id="cb343-4" data-line-number="4"><span class="fu">\def</span>\markdownRendererCodeSpan#1{#1}</a> +<a class="sourceLine" id="cb343-5" data-line-number="5"></a> +<a class="sourceLine" id="cb343-6" data-line-number="6"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb343-7" data-line-number="7">`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</a> +<a class="sourceLine" id="cb343-8" data-line-number="8"></a> +<a class="sourceLine" id="cb343-9" data-line-number="9"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></a> +<a class="sourceLine" id="cb343-10" data-line-number="10"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb343-11" data-line-number="11"></a> +<a class="sourceLine" id="cb343-12" data-line-number="12"><span class="fu">\def</span>\markdownOptionHybrid{true}</a> +<a class="sourceLine" id="cb343-13" data-line-number="13"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb343-14" data-line-number="14"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></a> +<a class="sourceLine" id="cb343-15" data-line-number="15"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb343-16" data-line-number="16"></a> +<a class="sourceLine" id="cb343-17" data-line-number="17"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb344"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb344-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-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="cb345"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb345-1"><a href="#cb345-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb345-2"><a href="#cb345-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</span> -<span id="cb345-3"><a href="#cb345-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb345-4"><a href="#cb345-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb345-5"><a href="#cb345-5" aria-hidden="true"></a> codeSpan = {#1},</span> -<span id="cb345-6"><a href="#cb345-6" aria-hidden="true"></a> },</span> -<span id="cb345-7"><a href="#cb345-7" aria-hidden="true"></a>}</span> -<span id="cb345-8"><a href="#cb345-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb345-9"><a href="#cb345-9" aria-hidden="true"></a></span> -<span id="cb345-10"><a href="#cb345-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb345-11"><a href="#cb345-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="cb345-12"><a href="#cb345-12" aria-hidden="true"></a></span> -<span id="cb345-13"><a href="#cb345-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="cb345-14"><a href="#cb345-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb345-15"><a href="#cb345-15" aria-hidden="true"></a></span> -<span id="cb345-16"><a href="#cb345-16" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</span> -<span id="cb345-17"><a href="#cb345-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="cb345-18"><a href="#cb345-18" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb345-19"><a href="#cb345-19" aria-hidden="true"></a></span> -<span id="cb345-20"><a href="#cb345-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="cb346"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb346-1"><a href="#cb346-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-37" class="unnumbered"><span class="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="cb345"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb345-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb345-2" data-line-number="2"><span class="bu">\usepackage</span>[smartEllipses]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb345-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb345-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb345-5" data-line-number="5"> codeSpan = {#1},</a> +<a class="sourceLine" id="cb345-6" data-line-number="6"> },</a> +<a class="sourceLine" id="cb345-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb345-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb345-9" data-line-number="9"></a> +<a class="sourceLine" id="cb345-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb345-11" data-line-number="11">`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</a> +<a class="sourceLine" id="cb345-12" data-line-number="12"></a> +<a class="sourceLine" id="cb345-13" data-line-number="13"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></a> +<a class="sourceLine" id="cb345-14" data-line-number="14"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb345-15" data-line-number="15"></a> +<a class="sourceLine" id="cb345-16" data-line-number="16"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{hybrid}</a> +<a class="sourceLine" id="cb345-17" data-line-number="17"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></a> +<a class="sourceLine" id="cb345-18" data-line-number="18"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb345-19" data-line-number="19"></a> +<a class="sourceLine" id="cb345-20" data-line-number="20"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb346"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb346-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ *equals* $i$.</p> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-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="cb347"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb347-1"><a href="#cb347-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb347-2"><a href="#cb347-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererCodeSpan</span>#1{#1}</span> -<span id="cb347-3"><a href="#cb347-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb347-4"><a href="#cb347-4" aria-hidden="true"></a></span> -<span id="cb347-5"><a href="#cb347-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb347-6"><a href="#cb347-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="cb347-7"><a href="#cb347-7" aria-hidden="true"></a></span> -<span id="cb347-8"><a href="#cb347-8" aria-hidden="true"></a><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></span> -<span id="cb347-9"><a href="#cb347-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb347-10"><a href="#cb347-10" aria-hidden="true"></a></span> -<span id="cb347-11"><a href="#cb347-11" aria-hidden="true"></a><span class="fu">\def\markdownOptionHybrid</span>{true}</span> -<span id="cb347-12"><a href="#cb347-12" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb347-13"><a href="#cb347-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="cb347-14"><a href="#cb347-14" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb347-15"><a href="#cb347-15" aria-hidden="true"></a></span> -<span id="cb347-16"><a href="#cb347-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="cb348"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb348-1"><a href="#cb348-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-30" class="unnumbered">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="cb347"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb347-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb347-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererCodeSpan#1{#1}</a> +<a class="sourceLine" id="cb347-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb347-4" data-line-number="4"></a> +<a class="sourceLine" id="cb347-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb347-6" data-line-number="6">`<span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span>`</a> +<a class="sourceLine" id="cb347-7" data-line-number="7"></a> +<a class="sourceLine" id="cb347-8" data-line-number="8"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></a> +<a class="sourceLine" id="cb347-9" data-line-number="9"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb347-10" data-line-number="10"></a> +<a class="sourceLine" id="cb347-11" data-line-number="11"><span class="fu">\def</span>\markdownOptionHybrid{true}</a> +<a class="sourceLine" id="cb347-12" data-line-number="12"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb347-13" data-line-number="13"><span class="ss">$</span><span class="sc">\sqrt</span><span class="ss">{-1}$</span> *equals* <span class="ss">$i$</span></a> +<a class="sourceLine" id="cb347-14" data-line-number="14"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb347-15" data-line-number="15"></a> +<a class="sourceLine" id="cb347-16" data-line-number="16"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb348"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb348-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>$\sqrt{-1}$ *equals* $i$.</p> <p>$\sqrt{-1}$ <em>equals</em> $i$.</p> <p>√-̅1̅ <em>equals</em> <span class="math inline"><em>i</em></span>.</p> </blockquote> -<h4 data-number="2.3.1.7" id="link-renderer"><span class="header-section-number">2.3.1.7</span> Link Renderer</h4> +<h4 id="link-renderer"><span class="header-section-number">2.3.1.7</span> Link Renderer</h4> <p>The <code>\markdownRendererLink</code> macro represents a hyperlink. It receives four arguments: the label, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the link.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-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="cb349"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb349-1"><a href="#cb349-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb349-2"><a href="#cb349-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb349-3"><a href="#cb349-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="cb349-4"><a href="#cb349-4" aria-hidden="true"></a>}</span> -<span id="cb349-5"><a href="#cb349-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb349-6"><a href="#cb349-6" aria-hidden="true"></a>Please visit [the link][ctan].</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> [ctan]: https://ctan.org/</span> -<span id="cb349-9"><a href="#cb349-9" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb349-10"><a href="#cb349-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb349-11"><a href="#cb349-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="cb350"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb350-1"><a href="#cb350-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-21" class="unnumbered">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="cb349"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb349-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb349-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererLink#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb349-3" data-line-number="3"> #1 {\tt#2} titled {\it#4}<span class="co">%</span></a> +<a class="sourceLine" id="cb349-4" data-line-number="4">}</a> +<a class="sourceLine" id="cb349-5" data-line-number="5"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb349-6" data-line-number="6">Please visit [the link][ctan].</a> +<a class="sourceLine" id="cb349-7" data-line-number="7"></a> +<a class="sourceLine" id="cb349-8" data-line-number="8"> [ctan]: https://ctan.org/</a> +<a class="sourceLine" id="cb349-9" data-line-number="9"> (the Comprehensive TeX Archive Network)</a> +<a class="sourceLine" id="cb349-10" data-line-number="10"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb349-11" data-line-number="11"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb350"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb350-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-38"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb351"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb351-1"><a href="#cb351-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb351-2"><a href="#cb351-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb351-3"><a href="#cb351-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb351-4"><a href="#cb351-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb351-5"><a href="#cb351-5" aria-hidden="true"></a> link = {<span class="co">%</span></span> -<span id="cb351-6"><a href="#cb351-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="cb351-7"><a href="#cb351-7" aria-hidden="true"></a> },</span> -<span id="cb351-8"><a href="#cb351-8" aria-hidden="true"></a> },</span> -<span id="cb351-9"><a href="#cb351-9" aria-hidden="true"></a>}</span> -<span id="cb351-10"><a href="#cb351-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb351-11"><a href="#cb351-11" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb351-12"><a href="#cb351-12" aria-hidden="true"></a>Please visit [the link][ctan].</span> -<span id="cb351-13"><a href="#cb351-13" aria-hidden="true"></a></span> -<span id="cb351-14"><a href="#cb351-14" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> -<span id="cb351-15"><a href="#cb351-15" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb351-16"><a href="#cb351-16" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb351-17"><a href="#cb351-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="cb352"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb352-1"><a href="#cb352-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-38" class="unnumbered"><span class="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="cb351"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb351-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb351-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb351-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb351-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb351-5" data-line-number="5"> link = {<span class="co">%</span></a> +<a class="sourceLine" id="cb351-6" data-line-number="6"> #1 <span class="fu">\texttt</span>{#2} titled <span class="fu">\emph</span>{#4}<span class="co">%</span></a> +<a class="sourceLine" id="cb351-7" data-line-number="7"> },</a> +<a class="sourceLine" id="cb351-8" data-line-number="8"> },</a> +<a class="sourceLine" id="cb351-9" data-line-number="9">}</a> +<a class="sourceLine" id="cb351-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb351-11" data-line-number="11"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb351-12" data-line-number="12">Please visit [the link][ctan].</a> +<a class="sourceLine" id="cb351-13" data-line-number="13"></a> +<a class="sourceLine" id="cb351-14" data-line-number="14"> [ctan]: https://ctan.org/</a> +<a class="sourceLine" id="cb351-15" data-line-number="15"> (the Comprehensive TeX Archive Network)</a> +<a class="sourceLine" id="cb351-16" data-line-number="16"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb351-17" data-line-number="17"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb352"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb352-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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-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="cb353"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb353-1"><a href="#cb353-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb353-2"><a href="#cb353-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererLink</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb353-3"><a href="#cb353-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="cb353-4"><a href="#cb353-4" aria-hidden="true"></a>}</span> -<span id="cb353-5"><a href="#cb353-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb353-6"><a href="#cb353-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb353-7"><a href="#cb353-7" aria-hidden="true"></a>Please visit [the link][ctan].</span> -<span id="cb353-8"><a href="#cb353-8" aria-hidden="true"></a></span> -<span id="cb353-9"><a href="#cb353-9" aria-hidden="true"></a> [ctan]: https://ctan.org/</span> -<span id="cb353-10"><a href="#cb353-10" aria-hidden="true"></a> (the Comprehensive TeX Archive Network)</span> -<span id="cb353-11"><a href="#cb353-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb353-12"><a href="#cb353-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="cb354"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb354-1"><a href="#cb354-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-31" class="unnumbered">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="cb353"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb353-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb353-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererLink#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb353-3" data-line-number="3"> #1 {\tt#2} titled \emph{#4}<span class="co">%</span></a> +<a class="sourceLine" id="cb353-4" data-line-number="4">}</a> +<a class="sourceLine" id="cb353-5" data-line-number="5"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb353-6" data-line-number="6"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb353-7" data-line-number="7">Please visit [the link][ctan].</a> +<a class="sourceLine" id="cb353-8" data-line-number="8"></a> +<a class="sourceLine" id="cb353-9" data-line-number="9"> [ctan]: https://ctan.org/</a> +<a class="sourceLine" id="cb353-10" data-line-number="10"> (the Comprehensive TeX Archive Network)</a> +<a class="sourceLine" id="cb353-11" data-line-number="11"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb353-12" data-line-number="12"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb354"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb354-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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.8" id="image-renderer"><span class="header-section-number">2.3.1.8</span> Image Renderer</h4> +<h4 id="image-renderer"><span class="header-section-number">2.3.1.8</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-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="cb355"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb355-1"><a href="#cb355-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb355-2"><a href="#cb355-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb355-3"><a href="#cb355-3" aria-hidden="true"></a><span class="fu">\begingroup</span></span> -<span id="cb355-4"><a href="#cb355-4" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\@</span>=11</span> -<span id="cb355-5"><a href="#cb355-5" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</span> -<span id="cb355-6"><a href="#cb355-6" aria-hidden="true"></a><span class="fu">\catcode</span>`<span class="fu">\^</span>^A=14</span> -<span id="cb355-7"><a href="#cb355-7" aria-hidden="true"></a><span class="fu">\global\def\markdownRendererImage</span>#1#2#3#4{^^A</span> -<span id="cb355-8"><a href="#cb355-8" aria-hidden="true"></a> <span class="fu">\immediate\write</span>18{^^A</span></code></pre></div> -<div class="sourceCode" id="cb356"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb356-1"><a href="#cb356-1" aria-hidden="true"></a> <span class="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="cb356-2"><a href="#cb356-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="cb356-3"><a href="#cb356-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="cb356-4"><a href="#cb356-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="cb356-5"><a href="#cb356-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="cb356-6"><a href="#cb356-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="cb356-7"><a href="#cb356-7" aria-hidden="true"></a> <span class="kw">fi</span>;</span> -<span id="cb356-8"><a href="#cb356-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="cb356-9"><a href="#cb356-9" aria-hidden="true"></a> <span class="kw">else</span></span> -<span id="cb356-10"><a href="#cb356-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="cb356-11"><a href="#cb356-11" aria-hidden="true"></a> <span class="kw">fi</span>^^<span class="ex">A</span></span></code></pre></div> -<div class="sourceCode" id="cb357"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb357-1"><a href="#cb357-1" aria-hidden="true"></a> }^^A</span> -<span id="cb357-2"><a href="#cb357-2" aria-hidden="true"></a> {^^A</span> -<span id="cb357-3"><a href="#cb357-3" aria-hidden="true"></a> <span class="fu">\everyeof</span>={<span class="fu">\noexpand</span>}^^A</span> -<span id="cb357-4"><a href="#cb357-4" aria-hidden="true"></a> <span class="fu">\edef\filename</span>{<span class="fu">\@@input</span>"<span class="fu">\jobname</span>.fetched" }^^A</span> -<span id="cb357-5"><a href="#cb357-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="cb357-6"><a href="#cb357-6" aria-hidden="true"></a> }^^A</span> -<span id="cb357-7"><a href="#cb357-7" aria-hidden="true"></a>}</span> -<span id="cb357-8"><a href="#cb357-8" aria-hidden="true"></a><span class="fu">\endgroup</span></span> -<span id="cb357-9"><a href="#cb357-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb357-10"><a href="#cb357-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb357-11"><a href="#cb357-11" aria-hidden="true"></a>![TUGboat](https://tug.org/tugboat/noword.jpg)</span> -<span id="cb357-12"><a href="#cb357-12" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb357-13"><a href="#cb357-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="cb358"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb358-1"><a href="#cb358-1" aria-hidden="true"></a><span class="ex">lualatex</span> --shell-escape document.tex</span></code></pre></div> +<h5 id="latex-example-39" class="unnumbered"><span class="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="cb355"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb355-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb355-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb355-3" data-line-number="3"><span class="fu">\begingroup</span></a> +<a class="sourceLine" id="cb355-4" data-line-number="4"><span class="fu">\catcode</span>`<span class="fu">\@</span>=11</a> +<a class="sourceLine" id="cb355-5" data-line-number="5"><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</a> +<a class="sourceLine" id="cb355-6" data-line-number="6"><span class="fu">\catcode</span>`<span class="fu">\^</span>^A=14</a> +<a class="sourceLine" id="cb355-7" data-line-number="7"><span class="fu">\global\def</span>\markdownRendererImage#1#2#3#4{^^A</a> +<a class="sourceLine" id="cb355-8" data-line-number="8"> \immediate\write18{^^A</a></code></pre></div> +<div class="sourceCode" id="cb356"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb356-1" data-line-number="1"> <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></a> +<a class="sourceLine" id="cb356-2" data-line-number="2"> <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></a> +<a class="sourceLine" id="cb356-3" data-line-number="3"><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>;</a> +<a class="sourceLine" id="cb356-4" data-line-number="4"> <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></a> +<a class="sourceLine" id="cb356-5" data-line-number="5"> <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></a> +<a class="sourceLine" id="cb356-6" data-line-number="6"> <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></a> +<a class="sourceLine" id="cb356-7" data-line-number="7"> <span class="kw">fi</span>;</a> +<a class="sourceLine" id="cb356-8" data-line-number="8"> <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></a> +<a class="sourceLine" id="cb356-9" data-line-number="9"> <span class="kw">else</span></a> +<a class="sourceLine" id="cb356-10" data-line-number="10"> <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></a> +<a class="sourceLine" id="cb356-11" data-line-number="11"> <span class="kw">fi</span>^^<span class="ex">A</span></a></code></pre></div> +<div class="sourceCode" id="cb357"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb357-1" data-line-number="1"> }^^A</a> +<a class="sourceLine" id="cb357-2" data-line-number="2"> {^^A</a> +<a class="sourceLine" id="cb357-3" data-line-number="3"> <span class="fu">\everyeof</span>={<span class="fu">\noexpand</span>}^^A</a> +<a class="sourceLine" id="cb357-4" data-line-number="4"> <span class="fu">\edef</span>\filename{\@@input"\jobname.fetched" }^^A</a> +<a class="sourceLine" id="cb357-5" data-line-number="5"> <span class="bu">\includegraphics</span>[width=<span class="fu">\textwidth</span>]{<span class="fu">\filename</span>}^^A</a> +<a class="sourceLine" id="cb357-6" data-line-number="6"> }^^A</a> +<a class="sourceLine" id="cb357-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb357-8" data-line-number="8"><span class="fu">\endgroup</span></a> +<a class="sourceLine" id="cb357-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb357-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb357-11" data-line-number="11">![TUGboat](https://tug.org/tugboat/noword.jpg)</a> +<a class="sourceLine" id="cb357-12" data-line-number="12"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb357-13" data-line-number="13"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb358"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb358-1" data-line-number="1"><span class="ex">lualatex</span> --shell-escape document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following content. This assumes that you use a Unix-like operating system with Bourne or Bourne again shell as the default shell of the current user. It also assumes that the <code>md5sum</code>, <code>wget</code>, and <code>convert</code> binaries are installed and that the <span class="tex">T<sub>e</sub>X</span> engine has shell access.</p> <blockquote> <p><img src="https://tug.org/tugboat/noword.jpg" title="The Communications of the TeX Users Group" /></p> </blockquote> -<h4 data-number="2.3.1.9" id="content-block-renderers"><span class="header-section-number">2.3.1.9</span> Content Block Renderers</h4> +<h4 id="content-block-renderers"><span class="header-section-number">2.3.1.9</span> Content Block Renderers</h4> <p> The <code>\markdownRendererContentBlock</code> macro represents an iA Writer content block. It receives four arguments: the local file or online image filename extension cast to the lower case, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the content block.</p> <p>The <code>\markdownRendererContentBlockOnlineImage</code> macro represents an iA Writer online image content block. The macro receives the same arguments as <code>\markdownRendererContentBlock</code>.</p> <p>The <code>\markdownRendererContentBlockCode</code> macro represents an iA Writer content block that was recognized as a file in a known programming language by its filename extension <span class="math inline"><em>s</em></span>. If any <code>markdown-languages.json</code> file found by <strong><code>kpathsea</code></strong> contains a record <span class="math inline">(<em>k</em>, <em>v</em>)</span>, then a non-online-image content block with the filename extension <span class="math inline"><em>s</em>, <em>s</em></span><code>:lower()</code><span class="math inline"> = <em>k</em></span> is considered to be in a known programming language <span class="math inline"><em>v</em></span>. The macro receives five arguments: the local file name extension <span class="math inline"><em>s</em></span> cast to the lower case, the language <span class="math inline"><em>v</em></span>, the fully escaped <abbr>uri</abbr> that can be directly typeset, the raw <abbr>uri</abbr> that can be used outside typesetting, and the title of the content block.</p> <p>Note that you will need to place place a <code>markdown-languages.json</code> file inside your working directory or inside your local <span class="tex">T<sub>e</sub>X</span> directory structure. In this file, you will define a mapping between filename extensions and the language names recognized by your favorite syntax highlighter; there may exist other creative uses beside syntax highlighting. <a href="https://github.com/iainc/Markdown-Content-Blocks" title="File transclusion syntax for Markdown">The <code>Languages.json</code> file provided by Anton Sotkov</a> is a good starting point.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-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="cb359"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb359-1"><a href="#cb359-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb359-2"><a href="#cb359-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> -<span id="cb359-3"><a href="#cb359-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb359-4"><a href="#cb359-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb359-5"><a href="#cb359-5" aria-hidden="true"></a>}</span> -<span id="cb359-6"><a href="#cb359-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb359-7"><a href="#cb359-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb359-8"><a href="#cb359-8" aria-hidden="true"></a>}</span> -<span id="cb359-9"><a href="#cb359-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> -<span id="cb359-10"><a href="#cb359-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="cb359-11"><a href="#cb359-11" aria-hidden="true"></a>}</span> -<span id="cb359-12"><a href="#cb359-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb359-13"><a href="#cb359-13" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb359-14"><a href="#cb359-14" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb359-15"><a href="#cb359-15" aria-hidden="true"></a> and programming language names)</span> -<span id="cb359-16"><a href="#cb359-16" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb359-17"><a href="#cb359-17" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb359-18"><a href="#cb359-18" aria-hidden="true"></a><span class="fu">\bye</span></span></code></pre></div> +<h5 id="plain-tex-example-22" class="unnumbered">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="cb359"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb359-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb359-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionContentBlocks{true}</a> +<a class="sourceLine" id="cb359-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererContentBlock#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb359-4" data-line-number="4"> This is {\tt #2}, #4.</a> +<a class="sourceLine" id="cb359-5" data-line-number="5">}</a> +<a class="sourceLine" id="cb359-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererContentBlockOnlineImage#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb359-7" data-line-number="7"> This is the image {\tt #2}, #4.</a> +<a class="sourceLine" id="cb359-8" data-line-number="8">}</a> +<a class="sourceLine" id="cb359-9" data-line-number="9"><span class="fu">\def</span>\markdownRendererContentBlockCode#1#2#3#4#5{<span class="co">%</span></a> +<a class="sourceLine" id="cb359-10" data-line-number="10"> This is the #2 (\uppercase{#1}) document {\tt #3}, #5.</a> +<a class="sourceLine" id="cb359-11" data-line-number="11">}</a> +<a class="sourceLine" id="cb359-12" data-line-number="12"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb359-13" data-line-number="13">/document.tex (the document that we are currently typesetting)</a> +<a class="sourceLine" id="cb359-14" data-line-number="14">/markdown-languages.json (the mapping between filename extensions</a> +<a class="sourceLine" id="cb359-15" data-line-number="15"> and programming language names)</a> +<a class="sourceLine" id="cb359-16" data-line-number="16">https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</a> +<a class="sourceLine" id="cb359-17" data-line-number="17"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb359-18" data-line-number="18"><span class="fu">\bye</span></a></code></pre></div> <p>Create also a text document named <code>markdown-languages.json</code> with the following content:</p> -<div class="sourceCode" id="cb360"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb360-1"><a href="#cb360-1" aria-hidden="true"></a>{</span> -<span id="cb360-2"><a href="#cb360-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="cb360-3"><a href="#cb360-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb360"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb360-1" data-line-number="1"><span class="op">{</span></a> +<a class="sourceLine" id="cb360-2" data-line-number="2"> <span class="st">"json"</span><span class="op">:</span> <span class="st">"JavaScript Object Notation"</span><span class="op">,</span></a> +<a class="sourceLine" id="cb360-3" data-line-number="3"><span class="op">}</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb361"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb361-1"><a href="#cb361-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb361"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb361-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-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="cb362"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb362-1"><a href="#cb362-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb362-2"><a href="#cb362-2" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{markdown-languages.json}</span> -<span id="cb362-3"><a href="#cb362-3" aria-hidden="true"></a>{</span> -<span id="cb362-4"><a href="#cb362-4" aria-hidden="true"></a> "json": "JavaScript Object Notation",</span> -<span id="cb362-5"><a href="#cb362-5" aria-hidden="true"></a>}</span> -<span id="cb362-6"><a href="#cb362-6" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">filecontents</span>}</span> -<span id="cb362-7"><a href="#cb362-7" aria-hidden="true"></a><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</span> -<span id="cb362-8"><a href="#cb362-8" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb362-9"><a href="#cb362-9" aria-hidden="true"></a> renderers = {</span> -<span id="cb362-10"><a href="#cb362-10" aria-hidden="true"></a> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</span> -<span id="cb362-11"><a href="#cb362-11" aria-hidden="true"></a> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</span> -<span id="cb362-12"><a href="#cb362-12" aria-hidden="true"></a> contentBlockCode = {<span class="co">%</span></span> -<span id="cb362-13"><a href="#cb362-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="cb362-14"><a href="#cb362-14" aria-hidden="true"></a> },</span> -<span id="cb362-15"><a href="#cb362-15" aria-hidden="true"></a> },</span> -<span id="cb362-16"><a href="#cb362-16" aria-hidden="true"></a>}</span> -<span id="cb362-17"><a href="#cb362-17" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb362-18"><a href="#cb362-18" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb362-19"><a href="#cb362-19" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb362-20"><a href="#cb362-20" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb362-21"><a href="#cb362-21" aria-hidden="true"></a> and programming language names)</span> -<span id="cb362-22"><a href="#cb362-22" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb362-23"><a href="#cb362-23" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb362-24"><a href="#cb362-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="cb363"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb363-1"><a href="#cb363-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-40" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb362"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb362-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb362-2" data-line-number="2"><span class="kw">\begin</span>{<span class="ex">filecontents</span>}[overwrite,nosearch,noheader]{markdown-languages.json}</a> +<a class="sourceLine" id="cb362-3" data-line-number="3">{</a> +<a class="sourceLine" id="cb362-4" data-line-number="4"> "json": "JavaScript Object Notation",</a> +<a class="sourceLine" id="cb362-5" data-line-number="5">}</a> +<a class="sourceLine" id="cb362-6" data-line-number="6"><span class="kw">\end</span>{<span class="ex">filecontents</span>}</a> +<a class="sourceLine" id="cb362-7" data-line-number="7"><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb362-8" data-line-number="8"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb362-9" data-line-number="9"> renderers = {</a> +<a class="sourceLine" id="cb362-10" data-line-number="10"> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</a> +<a class="sourceLine" id="cb362-11" data-line-number="11"> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</a> +<a class="sourceLine" id="cb362-12" data-line-number="12"> contentBlockCode = {<span class="co">%</span></a> +<a class="sourceLine" id="cb362-13" data-line-number="13"> This is the #2 (<span class="fu">\MakeUppercase</span>{#1}) document <span class="fu">\texttt</span>{#3}, #5.</a> +<a class="sourceLine" id="cb362-14" data-line-number="14"> },</a> +<a class="sourceLine" id="cb362-15" data-line-number="15"> },</a> +<a class="sourceLine" id="cb362-16" data-line-number="16">}</a> +<a class="sourceLine" id="cb362-17" data-line-number="17"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb362-18" data-line-number="18"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb362-19" data-line-number="19">/document.tex (the document that we are currently typesetting)</a> +<a class="sourceLine" id="cb362-20" data-line-number="20">/markdown-languages.json (the mapping between filename extensions</a> +<a class="sourceLine" id="cb362-21" data-line-number="21"> and programming language names)</a> +<a class="sourceLine" id="cb362-22" data-line-number="22">https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</a> +<a class="sourceLine" id="cb362-23" data-line-number="23"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb362-24" data-line-number="24"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb363"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb363-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <code>document.tex</code>, the document that we are currently typesetting.</p> <p>This is the JavaScript Object Notation (JSON) document <code>markdown-languages.json</code>, the mapping between filename extensions and programming language names.</p> <p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>, the logotype of TUGboat.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-32">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb364"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb364-1"><a href="#cb364-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb364-2"><a href="#cb364-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionContentBlocks</span>{true}</span> -<span id="cb364-3"><a href="#cb364-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlock</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb364-4"><a href="#cb364-4" aria-hidden="true"></a> This is {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb364-5"><a href="#cb364-5" aria-hidden="true"></a>}</span> -<span id="cb364-6"><a href="#cb364-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockOnlineImage</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb364-7"><a href="#cb364-7" aria-hidden="true"></a> This is the image {<span class="fu">\tt</span> #2}, #4.</span> -<span id="cb364-8"><a href="#cb364-8" aria-hidden="true"></a>}</span> -<span id="cb364-9"><a href="#cb364-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererContentBlockCode</span>#1#2#3#4#5{<span class="co">%</span></span> -<span id="cb364-10"><a href="#cb364-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="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="fu">\starttext</span></span> -<span id="cb364-13"><a href="#cb364-13" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb364-14"><a href="#cb364-14" aria-hidden="true"></a>/document.tex (the document that we are currently typesetting)</span> -<span id="cb364-15"><a href="#cb364-15" aria-hidden="true"></a>/markdown-languages.json (the mapping between filename extensions</span> -<span id="cb364-16"><a href="#cb364-16" aria-hidden="true"></a> and programming language names)</span> -<span id="cb364-17"><a href="#cb364-17" aria-hidden="true"></a>https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</span> -<span id="cb364-18"><a href="#cb364-18" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb364-19"><a href="#cb364-19" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<h5 id="context-example-32" class="unnumbered">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb364"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb364-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb364-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionContentBlocks{true}</a> +<a class="sourceLine" id="cb364-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererContentBlock#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb364-4" data-line-number="4"> This is {\tt #2}, #4.</a> +<a class="sourceLine" id="cb364-5" data-line-number="5">}</a> +<a class="sourceLine" id="cb364-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererContentBlockOnlineImage#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb364-7" data-line-number="7"> This is the image {\tt #2}, #4.</a> +<a class="sourceLine" id="cb364-8" data-line-number="8">}</a> +<a class="sourceLine" id="cb364-9" data-line-number="9"><span class="fu">\def</span>\markdownRendererContentBlockCode#1#2#3#4#5{<span class="co">%</span></a> +<a class="sourceLine" id="cb364-10" data-line-number="10"> This is the #2 (\uppercase{#1}) document {\tt #3}, #5.</a> +<a class="sourceLine" id="cb364-11" data-line-number="11">}</a> +<a class="sourceLine" id="cb364-12" data-line-number="12"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb364-13" data-line-number="13"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb364-14" data-line-number="14">/document.tex (the document that we are currently typesetting)</a> +<a class="sourceLine" id="cb364-15" data-line-number="15">/markdown-languages.json (the mapping between filename extensions</a> +<a class="sourceLine" id="cb364-16" data-line-number="16"> and programming language names)</a> +<a class="sourceLine" id="cb364-17" data-line-number="17">https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</a> +<a class="sourceLine" id="cb364-18" data-line-number="18"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb364-19" data-line-number="19"><span class="fu">\stoptext</span></a></code></pre></div> <p>Create also a text document named <code>markdown-languages.json</code> with the following content:</p> -<div class="sourceCode" id="cb365"><pre class="sourceCode js"><code class="sourceCode javascript"><span id="cb365-1"><a href="#cb365-1" aria-hidden="true"></a>{</span> -<span id="cb365-2"><a href="#cb365-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="cb365-3"><a href="#cb365-3" aria-hidden="true"></a>}</span></code></pre></div> +<div class="sourceCode" id="cb365"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb365-1" data-line-number="1"><span class="op">{</span></a> +<a class="sourceLine" id="cb365-2" data-line-number="2"> <span class="st">"json"</span><span class="op">:</span> <span class="st">"JavaScript Object Notation"</span><span class="op">,</span></a> +<a class="sourceLine" id="cb365-3" data-line-number="3"><span class="op">}</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb366"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb366-1"><a href="#cb366-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb366"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb366-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <code>document.tex</code>, the document that we are currently typesetting.</p> <p>This is the JavaScript Object Notation (JSON) document <code>markdown-languages.json</code>, the mapping between filename extensions and programming language names.</p> <p>This is the image <code>https://tug.org/tugboat/noword.jpg</code>, the logotype of TUGboat.</p> </blockquote> -<h4 data-number="2.3.1.10" id="bullet-list-renderers"><span class="header-section-number">2.3.1.10</span> Bullet List Renderers</h4> +<h4 id="bullet-list-renderers"><span class="header-section-number">2.3.1.10</span> Bullet List Renderers</h4> <p>The <code>\markdownRendererUlBegin</code> macro represents the beginning of a bulleted list that contains an item with several paragraphs of text (the list is not tight). The macro receives no arguments.</p> <p>The <code>\markdownRendererUlBeginTight</code> macro represents the beginning of a bulleted list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <code>false</code>. The macro receives no arguments.</p> <p>The <code>\markdownRendererUlItem</code> macro represents an item in a bulleted list. The macro receives no arguments.</p> <p>The <code>\markdownRendererUlItemEnd</code> macro represents the end of an item in a bulleted list. The macro receives no arguments.</p> <p>The <code>\markdownRendererUlEnd</code> macro represents the end of a bulleted list that contains an item with several paragraphs of text (the list is not tight). The macro receives no arguments.</p> <p>The <code>\markdownRendererUlEndTight</code> macro represents the end of a bulleted list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <code>false</code>. The macro receives no arguments.</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="cb367"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb367-1"><a href="#cb367-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb367-2"><a href="#cb367-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb367-3"><a href="#cb367-3" aria-hidden="true"></a></span> -<span id="cb367-4"><a href="#cb367-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb367-5"><a href="#cb367-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> -<span id="cb367-6"><a href="#cb367-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb367-7"><a href="#cb367-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb367-8"><a href="#cb367-8" aria-hidden="true"></a> ,</span> -<span id="cb367-9"><a href="#cb367-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb367-10"><a href="#cb367-10" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb367-11"><a href="#cb367-11" aria-hidden="true"></a>}</span> -<span id="cb367-12"><a href="#cb367-12" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> -<span id="cb367-13"><a href="#cb367-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> -<span id="cb367-14"><a href="#cb367-14" aria-hidden="true"></a></span> -<span id="cb367-15"><a href="#cb367-15" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb367-16"><a href="#cb367-16" aria-hidden="true"></a>This is a tight list</span> -<span id="cb367-17"><a href="#cb367-17" aria-hidden="true"></a></span> -<span id="cb367-18"><a href="#cb367-18" aria-hidden="true"></a>- the first item</span> -<span id="cb367-19"><a href="#cb367-19" aria-hidden="true"></a>- the second item</span> -<span id="cb367-20"><a href="#cb367-20" aria-hidden="true"></a>- the third item</span> -<span id="cb367-21"><a href="#cb367-21" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb367-22"><a href="#cb367-22" aria-hidden="true"></a></span> -<span id="cb367-23"><a href="#cb367-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb367-24"><a href="#cb367-24" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb367-25"><a href="#cb367-25" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb367-26"><a href="#cb367-26" aria-hidden="true"></a>}</span> -<span id="cb367-27"><a href="#cb367-27" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{}</span> -<span id="cb367-28"><a href="#cb367-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{--<span class="fu">\kern</span> 0.5em}</span> -<span id="cb367-29"><a href="#cb367-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb367-30"><a href="#cb367-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{}</span> -<span id="cb367-31"><a href="#cb367-31" aria-hidden="true"></a></span> -<span id="cb367-32"><a href="#cb367-32" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb367-33"><a href="#cb367-33" aria-hidden="true"></a>This is a loose list</span> -<span id="cb367-34"><a href="#cb367-34" aria-hidden="true"></a></span> -<span id="cb367-35"><a href="#cb367-35" aria-hidden="true"></a>- This is the first item</span> -<span id="cb367-36"><a href="#cb367-36" aria-hidden="true"></a></span> -<span id="cb367-37"><a href="#cb367-37" aria-hidden="true"></a>- This is the second item</span> -<span id="cb367-38"><a href="#cb367-38" aria-hidden="true"></a></span> -<span id="cb367-39"><a href="#cb367-39" aria-hidden="true"></a>- This is the third item</span> -<span id="cb367-40"><a href="#cb367-40" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb367-41"><a href="#cb367-41" aria-hidden="true"></a></span> -<span id="cb367-42"><a href="#cb367-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="cb368"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb368-1"><a href="#cb368-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-23" class="unnumbered">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="cb367"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb367-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb367-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> +<a class="sourceLine" id="cb367-3" data-line-number="3"></a> +<a class="sourceLine" id="cb367-4" data-line-number="4"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb367-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererUlBeginTight{ (}</a> +<a class="sourceLine" id="cb367-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererUlItem{<span class="co">%</span></a> +<a class="sourceLine" id="cb367-7" data-line-number="7"> \def\markdownRendererUlItem{<span class="co">%</span></a> +<a class="sourceLine" id="cb367-8" data-line-number="8"> ,</a> +<a class="sourceLine" id="cb367-9" data-line-number="9"> \def\markdownRendererUlItem{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb367-10" data-line-number="10"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb367-11" data-line-number="11">}</a> +<a class="sourceLine" id="cb367-12" data-line-number="12"><span class="fu">\def</span>\markdownRendererUlItemEnd{}</a> +<a class="sourceLine" id="cb367-13" data-line-number="13"><span class="fu">\def</span>\markdownRendererUlEndTight{).}</a> +<a class="sourceLine" id="cb367-14" data-line-number="14"></a> +<a class="sourceLine" id="cb367-15" data-line-number="15"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb367-16" data-line-number="16">This is a tight list</a> +<a class="sourceLine" id="cb367-17" data-line-number="17"></a> +<a class="sourceLine" id="cb367-18" data-line-number="18">- the first item</a> +<a class="sourceLine" id="cb367-19" data-line-number="19">- the second item</a> +<a class="sourceLine" id="cb367-20" data-line-number="20">- the third item</a> +<a class="sourceLine" id="cb367-21" data-line-number="21"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb367-22" data-line-number="22"></a> +<a class="sourceLine" id="cb367-23" data-line-number="23"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb367-24" data-line-number="24"> :\par</a> +<a class="sourceLine" id="cb367-25" data-line-number="25"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb367-26" data-line-number="26">}</a> +<a class="sourceLine" id="cb367-27" data-line-number="27"><span class="fu">\def</span>\markdownRendererUlBegin{}</a> +<a class="sourceLine" id="cb367-28" data-line-number="28"><span class="fu">\def</span>\markdownRendererUlItem{--\kern 0.5em}</a> +<a class="sourceLine" id="cb367-29" data-line-number="29"><span class="fu">\def</span>\markdownRendererUlItemEnd{.\par}</a> +<a class="sourceLine" id="cb367-30" data-line-number="30"><span class="fu">\def</span>\markdownRendererUlEnd{}</a> +<a class="sourceLine" id="cb367-31" data-line-number="31"></a> +<a class="sourceLine" id="cb367-32" data-line-number="32"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb367-33" data-line-number="33">This is a loose list</a> +<a class="sourceLine" id="cb367-34" data-line-number="34"></a> +<a class="sourceLine" id="cb367-35" data-line-number="35">- This is the first item</a> +<a class="sourceLine" id="cb367-36" data-line-number="36"></a> +<a class="sourceLine" id="cb367-37" data-line-number="37">- This is the second item</a> +<a class="sourceLine" id="cb367-38" data-line-number="38"></a> +<a class="sourceLine" id="cb367-39" data-line-number="39">- This is the third item</a> +<a class="sourceLine" id="cb367-40" data-line-number="40"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb367-41" data-line-number="41"></a> +<a class="sourceLine" id="cb367-42" data-line-number="42"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb368"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb368-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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> @@ -4441,57 +4439,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-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="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>[tightLists]{<span class="ex">markdown</span>}</span> -<span id="cb369-3"><a href="#cb369-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb369-4"><a href="#cb369-4" aria-hidden="true"></a></span> -<span id="cb369-5"><a href="#cb369-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb369-6"><a href="#cb369-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb369-7"><a href="#cb369-7" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb369-8"><a href="#cb369-8" aria-hidden="true"></a> ulBeginTight = { (},</span> -<span id="cb369-9"><a href="#cb369-9" aria-hidden="true"></a> ulItem = {<span class="co">%</span></span> -<span id="cb369-10"><a href="#cb369-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb369-11"><a href="#cb369-11" aria-hidden="true"></a> ,</span> -<span id="cb369-12"><a href="#cb369-12" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb369-13"><a href="#cb369-13" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb369-14"><a href="#cb369-14" aria-hidden="true"></a> },</span> -<span id="cb369-15"><a href="#cb369-15" aria-hidden="true"></a> ulItemEnd = {},</span> -<span id="cb369-16"><a href="#cb369-16" aria-hidden="true"></a> ulEndTight = {).},</span> -<span id="cb369-17"><a href="#cb369-17" aria-hidden="true"></a> },</span> -<span id="cb369-18"><a href="#cb369-18" aria-hidden="true"></a>}</span> -<span id="cb369-19"><a href="#cb369-19" aria-hidden="true"></a>This is a tight list</span> -<span id="cb369-20"><a href="#cb369-20" aria-hidden="true"></a></span> -<span id="cb369-21"><a href="#cb369-21" aria-hidden="true"></a>- the first item</span> -<span id="cb369-22"><a href="#cb369-22" aria-hidden="true"></a>- the second item</span> -<span id="cb369-23"><a href="#cb369-23" aria-hidden="true"></a>- the third item</span> -<span id="cb369-24"><a href="#cb369-24" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb369-25"><a href="#cb369-25" aria-hidden="true"></a></span> -<span id="cb369-26"><a href="#cb369-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb369-27"><a href="#cb369-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb369-28"><a href="#cb369-28" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb369-29"><a href="#cb369-29" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb369-30"><a href="#cb369-30" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb369-31"><a href="#cb369-31" aria-hidden="true"></a> },</span> -<span id="cb369-32"><a href="#cb369-32" aria-hidden="true"></a> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</span> -<span id="cb369-33"><a href="#cb369-33" aria-hidden="true"></a> ulItem = {<span class="fu">\item</span>},</span> -<span id="cb369-34"><a href="#cb369-34" aria-hidden="true"></a> ulItemEnd = {.},</span> -<span id="cb369-35"><a href="#cb369-35" aria-hidden="true"></a> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> -<span id="cb369-36"><a href="#cb369-36" aria-hidden="true"></a> },</span> -<span id="cb369-37"><a href="#cb369-37" aria-hidden="true"></a>}</span> -<span id="cb369-38"><a href="#cb369-38" aria-hidden="true"></a>This is a loose list</span> -<span id="cb369-39"><a href="#cb369-39" aria-hidden="true"></a></span> -<span id="cb369-40"><a href="#cb369-40" aria-hidden="true"></a>- This is the first item</span> -<span id="cb369-41"><a href="#cb369-41" aria-hidden="true"></a></span> -<span id="cb369-42"><a href="#cb369-42" aria-hidden="true"></a>- This is the second item</span> -<span id="cb369-43"><a href="#cb369-43" aria-hidden="true"></a></span> -<span id="cb369-44"><a href="#cb369-44" aria-hidden="true"></a>- This is the third item</span> -<span id="cb369-45"><a href="#cb369-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb369-46"><a href="#cb369-46" aria-hidden="true"></a></span> -<span id="cb369-47"><a href="#cb369-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="cb370"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb370-1"><a href="#cb370-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-41" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb369"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb369-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb369-2" data-line-number="2"><span class="bu">\usepackage</span>[tightLists]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb369-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb369-4" data-line-number="4"></a> +<a class="sourceLine" id="cb369-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb369-6" data-line-number="6"> renderers = {</a> +<a class="sourceLine" id="cb369-7" data-line-number="7"> interblockSeparator = {},</a> +<a class="sourceLine" id="cb369-8" data-line-number="8"> ulBeginTight = { (},</a> +<a class="sourceLine" id="cb369-9" data-line-number="9"> ulItem = {<span class="co">%</span></a> +<a class="sourceLine" id="cb369-10" data-line-number="10"> <span class="fu">\def</span>\markdownRendererUlItem{<span class="co">%</span></a> +<a class="sourceLine" id="cb369-11" data-line-number="11"> ,</a> +<a class="sourceLine" id="cb369-12" data-line-number="12"> \def\markdownRendererUlItem{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb369-13" data-line-number="13"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb369-14" data-line-number="14"> },</a> +<a class="sourceLine" id="cb369-15" data-line-number="15"> ulItemEnd = {},</a> +<a class="sourceLine" id="cb369-16" data-line-number="16"> ulEndTight = {).},</a> +<a class="sourceLine" id="cb369-17" data-line-number="17"> },</a> +<a class="sourceLine" id="cb369-18" data-line-number="18">}</a> +<a class="sourceLine" id="cb369-19" data-line-number="19">This is a tight list</a> +<a class="sourceLine" id="cb369-20" data-line-number="20"></a> +<a class="sourceLine" id="cb369-21" data-line-number="21">- the first item</a> +<a class="sourceLine" id="cb369-22" data-line-number="22">- the second item</a> +<a class="sourceLine" id="cb369-23" data-line-number="23">- the third item</a> +<a class="sourceLine" id="cb369-24" data-line-number="24"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb369-25" data-line-number="25"></a> +<a class="sourceLine" id="cb369-26" data-line-number="26"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb369-27" data-line-number="27"> renderers = {</a> +<a class="sourceLine" id="cb369-28" data-line-number="28"> interblockSeparator = {<span class="co">%</span></a> +<a class="sourceLine" id="cb369-29" data-line-number="29"> :<span class="fu">\par</span></a> +<a class="sourceLine" id="cb369-30" data-line-number="30"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb369-31" data-line-number="31"> },</a> +<a class="sourceLine" id="cb369-32" data-line-number="32"> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</a> +<a class="sourceLine" id="cb369-33" data-line-number="33"> ulItem = {<span class="fu">\item</span>},</a> +<a class="sourceLine" id="cb369-34" data-line-number="34"> ulItemEnd = {.},</a> +<a class="sourceLine" id="cb369-35" data-line-number="35"> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</a> +<a class="sourceLine" id="cb369-36" data-line-number="36"> },</a> +<a class="sourceLine" id="cb369-37" data-line-number="37">}</a> +<a class="sourceLine" id="cb369-38" data-line-number="38">This is a loose list</a> +<a class="sourceLine" id="cb369-39" data-line-number="39"></a> +<a class="sourceLine" id="cb369-40" data-line-number="40">- This is the first item</a> +<a class="sourceLine" id="cb369-41" data-line-number="41"></a> +<a class="sourceLine" id="cb369-42" data-line-number="42">- This is the second item</a> +<a class="sourceLine" id="cb369-43" data-line-number="43"></a> +<a class="sourceLine" id="cb369-44" data-line-number="44">- This is the third item</a> +<a class="sourceLine" id="cb369-45" data-line-number="45"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb369-46" data-line-number="46"></a> +<a class="sourceLine" id="cb369-47" data-line-number="47"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb370"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb370-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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> @@ -4502,53 +4500,53 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ul> </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="cb371"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb371-1"><a href="#cb371-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb371-2"><a href="#cb371-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb371-3"><a href="#cb371-3" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb371-4"><a href="#cb371-4" aria-hidden="true"></a></span> -<span id="cb371-5"><a href="#cb371-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb371-6"><a href="#cb371-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBeginTight</span>{ (}</span> -<span id="cb371-7"><a href="#cb371-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb371-8"><a href="#cb371-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{<span class="co">%</span></span> -<span id="cb371-9"><a href="#cb371-9" aria-hidden="true"></a> ,</span> -<span id="cb371-10"><a href="#cb371-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererUlItem</span>{, and }<span class="co">%</span></span> -<span id="cb371-11"><a href="#cb371-11" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb371-12"><a href="#cb371-12" aria-hidden="true"></a>}</span> -<span id="cb371-13"><a href="#cb371-13" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{}</span> -<span id="cb371-14"><a href="#cb371-14" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEndTight</span>{).}</span> -<span id="cb371-15"><a href="#cb371-15" aria-hidden="true"></a></span> -<span id="cb371-16"><a href="#cb371-16" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb371-17"><a href="#cb371-17" aria-hidden="true"></a>This is a tight list</span> -<span id="cb371-18"><a href="#cb371-18" aria-hidden="true"></a></span> -<span id="cb371-19"><a href="#cb371-19" aria-hidden="true"></a>- the first item</span> -<span id="cb371-20"><a href="#cb371-20" aria-hidden="true"></a>- the second item</span> -<span id="cb371-21"><a href="#cb371-21" aria-hidden="true"></a>- the third item</span> -<span id="cb371-22"><a href="#cb371-22" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb371-23"><a href="#cb371-23" aria-hidden="true"></a></span> -<span id="cb371-24"><a href="#cb371-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb371-25"><a href="#cb371-25" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb371-26"><a href="#cb371-26" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb371-27"><a href="#cb371-27" aria-hidden="true"></a>}</span> -<span id="cb371-28"><a href="#cb371-28" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlBegin</span>{<span class="fu">\startitemize</span>}</span> -<span id="cb371-29"><a href="#cb371-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItem</span>{<span class="fu">\item</span>}</span> -<span id="cb371-30"><a href="#cb371-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlItemEnd</span>{.}</span> -<span id="cb371-31"><a href="#cb371-31" aria-hidden="true"></a><span class="fu">\def\markdownRendererUlEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb371-32"><a href="#cb371-32" aria-hidden="true"></a></span> -<span id="cb371-33"><a href="#cb371-33" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb371-34"><a href="#cb371-34" aria-hidden="true"></a>This is a loose list</span> -<span id="cb371-35"><a href="#cb371-35" aria-hidden="true"></a></span> -<span id="cb371-36"><a href="#cb371-36" aria-hidden="true"></a>- This is the first item</span> -<span id="cb371-37"><a href="#cb371-37" aria-hidden="true"></a></span> -<span id="cb371-38"><a href="#cb371-38" aria-hidden="true"></a>- This is the second item</span> -<span id="cb371-39"><a href="#cb371-39" aria-hidden="true"></a></span> -<span id="cb371-40"><a href="#cb371-40" aria-hidden="true"></a>- This is the third item</span> -<span id="cb371-41"><a href="#cb371-41" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb371-42"><a href="#cb371-42" aria-hidden="true"></a></span> -<span id="cb371-43"><a href="#cb371-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="cb372"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb372-1"><a href="#cb372-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-33" class="unnumbered">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="cb371"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb371-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb371-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> +<a class="sourceLine" id="cb371-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb371-4" data-line-number="4"></a> +<a class="sourceLine" id="cb371-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb371-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererUlBeginTight{ (}</a> +<a class="sourceLine" id="cb371-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererUlItem{<span class="co">%</span></a> +<a class="sourceLine" id="cb371-8" data-line-number="8"> \def\markdownRendererUlItem{<span class="co">%</span></a> +<a class="sourceLine" id="cb371-9" data-line-number="9"> ,</a> +<a class="sourceLine" id="cb371-10" data-line-number="10"> \def\markdownRendererUlItem{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb371-11" data-line-number="11"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb371-12" data-line-number="12">}</a> +<a class="sourceLine" id="cb371-13" data-line-number="13"><span class="fu">\def</span>\markdownRendererUlItemEnd{}</a> +<a class="sourceLine" id="cb371-14" data-line-number="14"><span class="fu">\def</span>\markdownRendererUlEndTight{).}</a> +<a class="sourceLine" id="cb371-15" data-line-number="15"></a> +<a class="sourceLine" id="cb371-16" data-line-number="16"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb371-17" data-line-number="17">This is a tight list</a> +<a class="sourceLine" id="cb371-18" data-line-number="18"></a> +<a class="sourceLine" id="cb371-19" data-line-number="19">- the first item</a> +<a class="sourceLine" id="cb371-20" data-line-number="20">- the second item</a> +<a class="sourceLine" id="cb371-21" data-line-number="21">- the third item</a> +<a class="sourceLine" id="cb371-22" data-line-number="22"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb371-23" data-line-number="23"></a> +<a class="sourceLine" id="cb371-24" data-line-number="24"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb371-25" data-line-number="25"> :\par</a> +<a class="sourceLine" id="cb371-26" data-line-number="26"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb371-27" data-line-number="27">}</a> +<a class="sourceLine" id="cb371-28" data-line-number="28"><span class="fu">\def</span>\markdownRendererUlBegin{\startitemize}</a> +<a class="sourceLine" id="cb371-29" data-line-number="29"><span class="fu">\def</span>\markdownRendererUlItem{\item}</a> +<a class="sourceLine" id="cb371-30" data-line-number="30"><span class="fu">\def</span>\markdownRendererUlItemEnd{.}</a> +<a class="sourceLine" id="cb371-31" data-line-number="31"><span class="fu">\def</span>\markdownRendererUlEnd{\stopitemize}</a> +<a class="sourceLine" id="cb371-32" data-line-number="32"></a> +<a class="sourceLine" id="cb371-33" data-line-number="33"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb371-34" data-line-number="34">This is a loose list</a> +<a class="sourceLine" id="cb371-35" data-line-number="35"></a> +<a class="sourceLine" id="cb371-36" data-line-number="36">- This is the first item</a> +<a class="sourceLine" id="cb371-37" data-line-number="37"></a> +<a class="sourceLine" id="cb371-38" data-line-number="38">- This is the second item</a> +<a class="sourceLine" id="cb371-39" data-line-number="39"></a> +<a class="sourceLine" id="cb371-40" data-line-number="40">- This is the third item</a> +<a class="sourceLine" id="cb371-41" data-line-number="41"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb371-42" data-line-number="42"></a> +<a class="sourceLine" id="cb371-43" data-line-number="43"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb372"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb372-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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> @@ -4559,7 +4557,7 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ul> </blockquote> -<h4 data-number="2.3.1.11" id="ordered-list-renderers"><span class="header-section-number">2.3.1.11</span> Ordered List Renderers</h4> +<h4 id="ordered-list-renderers"><span class="header-section-number">2.3.1.11</span> Ordered List Renderers</h4> <p>The <code>\markdownRendererOlBegin</code> macro represents the beginning of an ordered list that contains an item with several paragraphs of text (the list is not tight). The macro receives no arguments.</p> <p>The <code>\markdownRendererOlBeginTight</code> macro represents the beginning of an ordered list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <code>false</code>. The macro receives no arguments.</p> <p>The <code>\markdownRendererOlItem</code> macro represents an item in an ordered list. This macro will only be produced, when the <strong><code>startNumber</code></strong> option is <code>false</code>. The macro receives no arguments.</p> @@ -4567,70 +4565,70 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererOlItemWithNumber</code> macro represents an item in an ordered list. This macro will only be produced, when the <strong><code>startNumber</code></strong> option is enabled. The macro receives a single numeric argument that corresponds to the item number.</p> <p>The <code>\markdownRendererOlEnd</code> macro represents the end of an ordered list that contains an item with several paragraphs of text (the list is not tight). The macro receives no arguments.</p> <p>The <code>\markdownRendererOlEndTight</code> macro represents the end of an ordered list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <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="cb373"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb373-1"><a href="#cb373-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb373-2"><a href="#cb373-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb373-3"><a href="#cb373-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> -<span id="cb373-4"><a href="#cb373-4" aria-hidden="true"></a></span> -<span id="cb373-5"><a href="#cb373-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb373-6"><a href="#cb373-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> -<span id="cb373-7"><a href="#cb373-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb373-8"><a href="#cb373-8" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb373-9"><a href="#cb373-9" aria-hidden="true"></a> the first</span> -<span id="cb373-10"><a href="#cb373-10" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb373-11"><a href="#cb373-11" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb373-12"><a href="#cb373-12" aria-hidden="true"></a> , the second</span> -<span id="cb373-13"><a href="#cb373-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb373-14"><a href="#cb373-14" aria-hidden="true"></a> , and the third</span> -<span id="cb373-15"><a href="#cb373-15" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb373-16"><a href="#cb373-16" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb373-17"><a href="#cb373-17" aria-hidden="true"></a>}</span> -<span id="cb373-18"><a href="#cb373-18" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> -<span id="cb373-19"><a href="#cb373-19" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> -<span id="cb373-20"><a href="#cb373-20" aria-hidden="true"></a></span> -<span id="cb373-21"><a href="#cb373-21" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb373-22"><a href="#cb373-22" aria-hidden="true"></a>This is a tight list</span> -<span id="cb373-23"><a href="#cb373-23" aria-hidden="true"></a></span> -<span id="cb373-24"><a href="#cb373-24" aria-hidden="true"></a>1. item</span> -<span id="cb373-25"><a href="#cb373-25" aria-hidden="true"></a>2. item</span> -<span id="cb373-26"><a href="#cb373-26" aria-hidden="true"></a>3. item</span> -<span id="cb373-27"><a href="#cb373-27" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb373-28"><a href="#cb373-28" aria-hidden="true"></a></span> -<span id="cb373-29"><a href="#cb373-29" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb373-30"><a href="#cb373-30" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb373-31"><a href="#cb373-31" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb373-32"><a href="#cb373-32" aria-hidden="true"></a>}</span> -<span id="cb373-33"><a href="#cb373-33" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{}</span> -<span id="cb373-34"><a href="#cb373-34" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb373-35"><a href="#cb373-35" aria-hidden="true"></a> #1.<span class="fu">\kern</span> 0.5em<span class="co">%</span></span> -<span id="cb373-36"><a href="#cb373-36" aria-hidden="true"></a> This is the</span> -<span id="cb373-37"><a href="#cb373-37" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb373-38"><a href="#cb373-38" aria-hidden="true"></a> first</span> -<span id="cb373-39"><a href="#cb373-39" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb373-40"><a href="#cb373-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb373-41"><a href="#cb373-41" aria-hidden="true"></a> second</span> -<span id="cb373-42"><a href="#cb373-42" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb373-43"><a href="#cb373-43" aria-hidden="true"></a> third</span> -<span id="cb373-44"><a href="#cb373-44" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb373-45"><a href="#cb373-45" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb373-46"><a href="#cb373-46" aria-hidden="true"></a>}</span> -<span id="cb373-47"><a href="#cb373-47" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb373-48"><a href="#cb373-48" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{}</span> -<span id="cb373-49"><a href="#cb373-49" aria-hidden="true"></a></span> -<span id="cb373-50"><a href="#cb373-50" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb373-51"><a href="#cb373-51" aria-hidden="true"></a>This is a loose list</span> -<span id="cb373-52"><a href="#cb373-52" aria-hidden="true"></a></span> -<span id="cb373-53"><a href="#cb373-53" aria-hidden="true"></a>1. item</span> -<span id="cb373-54"><a href="#cb373-54" aria-hidden="true"></a></span> -<span id="cb373-55"><a href="#cb373-55" aria-hidden="true"></a>2. item</span> -<span id="cb373-56"><a href="#cb373-56" aria-hidden="true"></a></span> -<span id="cb373-57"><a href="#cb373-57" aria-hidden="true"></a>3. item</span> -<span id="cb373-58"><a href="#cb373-58" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb373-59"><a href="#cb373-59" aria-hidden="true"></a></span> -<span id="cb373-60"><a href="#cb373-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="cb374"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb374-1"><a href="#cb374-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-24" class="unnumbered">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="cb373"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb373-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb373-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> +<a class="sourceLine" id="cb373-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionStartNumber{true}</a> +<a class="sourceLine" id="cb373-4" data-line-number="4"></a> +<a class="sourceLine" id="cb373-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb373-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererOlBeginTight{ (}</a> +<a class="sourceLine" id="cb373-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb373-8" data-line-number="8"> \ifnum #1=1\relax</a> +<a class="sourceLine" id="cb373-9" data-line-number="9"> the first</a> +<a class="sourceLine" id="cb373-10" data-line-number="10"> \else</a> +<a class="sourceLine" id="cb373-11" data-line-number="11"> \ifnum #1=2\relax</a> +<a class="sourceLine" id="cb373-12" data-line-number="12"> , the second</a> +<a class="sourceLine" id="cb373-13" data-line-number="13"> \else</a> +<a class="sourceLine" id="cb373-14" data-line-number="14"> , and the third</a> +<a class="sourceLine" id="cb373-15" data-line-number="15"> \fi</a> +<a class="sourceLine" id="cb373-16" data-line-number="16"> \fi</a> +<a class="sourceLine" id="cb373-17" data-line-number="17">}</a> +<a class="sourceLine" id="cb373-18" data-line-number="18"><span class="fu">\def</span>\markdownRendererOlItemEnd{}</a> +<a class="sourceLine" id="cb373-19" data-line-number="19"><span class="fu">\def</span>\markdownRendererOlEndTight{).}</a> +<a class="sourceLine" id="cb373-20" data-line-number="20"></a> +<a class="sourceLine" id="cb373-21" data-line-number="21"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb373-22" data-line-number="22">This is a tight list</a> +<a class="sourceLine" id="cb373-23" data-line-number="23"></a> +<a class="sourceLine" id="cb373-24" data-line-number="24">1. item</a> +<a class="sourceLine" id="cb373-25" data-line-number="25">2. item</a> +<a class="sourceLine" id="cb373-26" data-line-number="26">3. item</a> +<a class="sourceLine" id="cb373-27" data-line-number="27"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb373-28" data-line-number="28"></a> +<a class="sourceLine" id="cb373-29" data-line-number="29"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb373-30" data-line-number="30"> :\par</a> +<a class="sourceLine" id="cb373-31" data-line-number="31"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb373-32" data-line-number="32">}</a> +<a class="sourceLine" id="cb373-33" data-line-number="33"><span class="fu">\def</span>\markdownRendererOlBegin{}</a> +<a class="sourceLine" id="cb373-34" data-line-number="34"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb373-35" data-line-number="35"> #1.\kern 0.5em<span class="co">%</span></a> +<a class="sourceLine" id="cb373-36" data-line-number="36"> This is the</a> +<a class="sourceLine" id="cb373-37" data-line-number="37"> \ifnum #1=1\relax</a> +<a class="sourceLine" id="cb373-38" data-line-number="38"> first</a> +<a class="sourceLine" id="cb373-39" data-line-number="39"> \else</a> +<a class="sourceLine" id="cb373-40" data-line-number="40"> \ifnum #1=2\relax</a> +<a class="sourceLine" id="cb373-41" data-line-number="41"> second</a> +<a class="sourceLine" id="cb373-42" data-line-number="42"> \else</a> +<a class="sourceLine" id="cb373-43" data-line-number="43"> third</a> +<a class="sourceLine" id="cb373-44" data-line-number="44"> \fi</a> +<a class="sourceLine" id="cb373-45" data-line-number="45"> \fi</a> +<a class="sourceLine" id="cb373-46" data-line-number="46">}</a> +<a class="sourceLine" id="cb373-47" data-line-number="47"><span class="fu">\def</span>\markdownRendererOlItemEnd{.\par}</a> +<a class="sourceLine" id="cb373-48" data-line-number="48"><span class="fu">\def</span>\markdownRendererOlEnd{}</a> +<a class="sourceLine" id="cb373-49" data-line-number="49"></a> +<a class="sourceLine" id="cb373-50" data-line-number="50"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb373-51" data-line-number="51">This is a loose list</a> +<a class="sourceLine" id="cb373-52" data-line-number="52"></a> +<a class="sourceLine" id="cb373-53" data-line-number="53">1. item</a> +<a class="sourceLine" id="cb373-54" data-line-number="54"></a> +<a class="sourceLine" id="cb373-55" data-line-number="55">2. item</a> +<a class="sourceLine" id="cb373-56" data-line-number="56"></a> +<a class="sourceLine" id="cb373-57" data-line-number="57">3. item</a> +<a class="sourceLine" id="cb373-58" data-line-number="58"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb373-59" data-line-number="59"></a> +<a class="sourceLine" id="cb373-60" data-line-number="60"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb374"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb374-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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> @@ -4641,73 +4639,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-42"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb375"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb375-1"><a href="#cb375-1" aria-hidden="true"></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>[tightLists, startNumber]{<span class="ex">markdown</span>}</span> -<span id="cb375-3"><a href="#cb375-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb375-4"><a href="#cb375-4" aria-hidden="true"></a></span> -<span id="cb375-5"><a href="#cb375-5" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb375-6"><a href="#cb375-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb375-7"><a href="#cb375-7" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb375-8"><a href="#cb375-8" aria-hidden="true"></a> olBeginTight = { (},</span> -<span id="cb375-9"><a href="#cb375-9" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb375-10"><a href="#cb375-10" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb375-11"><a href="#cb375-11" aria-hidden="true"></a> the first</span> -<span id="cb375-12"><a href="#cb375-12" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb375-13"><a href="#cb375-13" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb375-14"><a href="#cb375-14" aria-hidden="true"></a> , the second</span> -<span id="cb375-15"><a href="#cb375-15" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb375-16"><a href="#cb375-16" aria-hidden="true"></a> , and the third</span> -<span id="cb375-17"><a href="#cb375-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb375-18"><a href="#cb375-18" aria-hidden="true"></a> <span class="fu">\fi</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> olItemEnd = {},</span> -<span id="cb375-21"><a href="#cb375-21" aria-hidden="true"></a> olEndTight = {).},</span> -<span id="cb375-22"><a href="#cb375-22" aria-hidden="true"></a> },</span> -<span id="cb375-23"><a href="#cb375-23" aria-hidden="true"></a>}</span> -<span id="cb375-24"><a href="#cb375-24" aria-hidden="true"></a>This is a tight list</span> -<span id="cb375-25"><a href="#cb375-25" aria-hidden="true"></a></span> -<span id="cb375-26"><a href="#cb375-26" aria-hidden="true"></a>1. item</span> -<span id="cb375-27"><a href="#cb375-27" aria-hidden="true"></a>2. item</span> -<span id="cb375-28"><a href="#cb375-28" aria-hidden="true"></a>3. item</span> -<span id="cb375-29"><a href="#cb375-29" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb375-30"><a href="#cb375-30" aria-hidden="true"></a></span> -<span id="cb375-31"><a href="#cb375-31" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb375-32"><a href="#cb375-32" aria-hidden="true"></a> renderers = {</span> -<span id="cb375-33"><a href="#cb375-33" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb375-34"><a href="#cb375-34" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb375-35"><a href="#cb375-35" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb375-36"><a href="#cb375-36" aria-hidden="true"></a> },</span> -<span id="cb375-37"><a href="#cb375-37" aria-hidden="true"></a> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</span> -<span id="cb375-38"><a href="#cb375-38" aria-hidden="true"></a> olItemWithNumber = {<span class="co">%</span></span> -<span id="cb375-39"><a href="#cb375-39" aria-hidden="true"></a> <span class="fu">\item</span> This is the</span> -<span id="cb375-40"><a href="#cb375-40" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb375-41"><a href="#cb375-41" aria-hidden="true"></a> first</span> -<span id="cb375-42"><a href="#cb375-42" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb375-43"><a href="#cb375-43" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb375-44"><a href="#cb375-44" aria-hidden="true"></a> second</span> -<span id="cb375-45"><a href="#cb375-45" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb375-46"><a href="#cb375-46" aria-hidden="true"></a> third</span> -<span id="cb375-47"><a href="#cb375-47" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb375-48"><a href="#cb375-48" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb375-49"><a href="#cb375-49" aria-hidden="true"></a> },</span> -<span id="cb375-50"><a href="#cb375-50" aria-hidden="true"></a> olItemEnd = {.},</span> -<span id="cb375-51"><a href="#cb375-51" aria-hidden="true"></a> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</span> -<span id="cb375-52"><a href="#cb375-52" aria-hidden="true"></a> },</span> -<span id="cb375-53"><a href="#cb375-53" aria-hidden="true"></a>}</span> -<span id="cb375-54"><a href="#cb375-54" aria-hidden="true"></a>This is a loose list</span> -<span id="cb375-55"><a href="#cb375-55" aria-hidden="true"></a></span> -<span id="cb375-56"><a href="#cb375-56" aria-hidden="true"></a>1. item</span> -<span id="cb375-57"><a href="#cb375-57" aria-hidden="true"></a></span> -<span id="cb375-58"><a href="#cb375-58" aria-hidden="true"></a>2. item</span> -<span id="cb375-59"><a href="#cb375-59" aria-hidden="true"></a></span> -<span id="cb375-60"><a href="#cb375-60" aria-hidden="true"></a>3. item</span> -<span id="cb375-61"><a href="#cb375-61" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb375-62"><a href="#cb375-62" aria-hidden="true"></a></span> -<span id="cb375-63"><a href="#cb375-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="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></code></pre></div> +<h5 id="latex-example-42" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb375"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb375-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb375-2" data-line-number="2"><span class="bu">\usepackage</span>[tightLists, startNumber]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb375-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb375-4" data-line-number="4"></a> +<a class="sourceLine" id="cb375-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb375-6" data-line-number="6"> renderers = {</a> +<a class="sourceLine" id="cb375-7" data-line-number="7"> interblockSeparator = {},</a> +<a class="sourceLine" id="cb375-8" data-line-number="8"> olBeginTight = { (},</a> +<a class="sourceLine" id="cb375-9" data-line-number="9"> olItemWithNumber = {<span class="co">%</span></a> +<a class="sourceLine" id="cb375-10" data-line-number="10"> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></a> +<a class="sourceLine" id="cb375-11" data-line-number="11"> the first</a> +<a class="sourceLine" id="cb375-12" data-line-number="12"> <span class="fu">\else</span></a> +<a class="sourceLine" id="cb375-13" data-line-number="13"> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></a> +<a class="sourceLine" id="cb375-14" data-line-number="14"> , the second</a> +<a class="sourceLine" id="cb375-15" data-line-number="15"> <span class="fu">\else</span></a> +<a class="sourceLine" id="cb375-16" data-line-number="16"> , and the third</a> +<a class="sourceLine" id="cb375-17" data-line-number="17"> <span class="fu">\fi</span></a> +<a class="sourceLine" id="cb375-18" data-line-number="18"> <span class="fu">\fi</span></a> +<a class="sourceLine" id="cb375-19" data-line-number="19"> },</a> +<a class="sourceLine" id="cb375-20" data-line-number="20"> olItemEnd = {},</a> +<a class="sourceLine" id="cb375-21" data-line-number="21"> olEndTight = {).},</a> +<a class="sourceLine" id="cb375-22" data-line-number="22"> },</a> +<a class="sourceLine" id="cb375-23" data-line-number="23">}</a> +<a class="sourceLine" id="cb375-24" data-line-number="24">This is a tight list</a> +<a class="sourceLine" id="cb375-25" data-line-number="25"></a> +<a class="sourceLine" id="cb375-26" data-line-number="26">1. item</a> +<a class="sourceLine" id="cb375-27" data-line-number="27">2. item</a> +<a class="sourceLine" id="cb375-28" data-line-number="28">3. item</a> +<a class="sourceLine" id="cb375-29" data-line-number="29"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb375-30" data-line-number="30"></a> +<a class="sourceLine" id="cb375-31" data-line-number="31"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb375-32" data-line-number="32"> renderers = {</a> +<a class="sourceLine" id="cb375-33" data-line-number="33"> interblockSeparator = {<span class="co">%</span></a> +<a class="sourceLine" id="cb375-34" data-line-number="34"> :<span class="fu">\par</span></a> +<a class="sourceLine" id="cb375-35" data-line-number="35"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb375-36" data-line-number="36"> },</a> +<a class="sourceLine" id="cb375-37" data-line-number="37"> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</a> +<a class="sourceLine" id="cb375-38" data-line-number="38"> olItemWithNumber = {<span class="co">%</span></a> +<a class="sourceLine" id="cb375-39" data-line-number="39"> <span class="fu">\item</span> This is the</a> +<a class="sourceLine" id="cb375-40" data-line-number="40"> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></a> +<a class="sourceLine" id="cb375-41" data-line-number="41"> first</a> +<a class="sourceLine" id="cb375-42" data-line-number="42"> <span class="fu">\else</span></a> +<a class="sourceLine" id="cb375-43" data-line-number="43"> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></a> +<a class="sourceLine" id="cb375-44" data-line-number="44"> second</a> +<a class="sourceLine" id="cb375-45" data-line-number="45"> <span class="fu">\else</span></a> +<a class="sourceLine" id="cb375-46" data-line-number="46"> third</a> +<a class="sourceLine" id="cb375-47" data-line-number="47"> <span class="fu">\fi</span></a> +<a class="sourceLine" id="cb375-48" data-line-number="48"> <span class="fu">\fi</span></a> +<a class="sourceLine" id="cb375-49" data-line-number="49"> },</a> +<a class="sourceLine" id="cb375-50" data-line-number="50"> olItemEnd = {.},</a> +<a class="sourceLine" id="cb375-51" data-line-number="51"> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</a> +<a class="sourceLine" id="cb375-52" data-line-number="52"> },</a> +<a class="sourceLine" id="cb375-53" data-line-number="53">}</a> +<a class="sourceLine" id="cb375-54" data-line-number="54">This is a loose list</a> +<a class="sourceLine" id="cb375-55" data-line-number="55"></a> +<a class="sourceLine" id="cb375-56" data-line-number="56">1. item</a> +<a class="sourceLine" id="cb375-57" data-line-number="57"></a> +<a class="sourceLine" id="cb375-58" data-line-number="58">2. item</a> +<a class="sourceLine" id="cb375-59" data-line-number="59"></a> +<a class="sourceLine" id="cb375-60" data-line-number="60">3. item</a> +<a class="sourceLine" id="cb375-61" data-line-number="61"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb375-62" data-line-number="62"></a> +<a class="sourceLine" id="cb375-63" data-line-number="63"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb376"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb376-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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> @@ -4718,71 +4716,71 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ol> </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="cb377"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb377-1"><a href="#cb377-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb377-2"><a href="#cb377-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb377-3"><a href="#cb377-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionStartNumber</span>{true}</span> -<span id="cb377-4"><a href="#cb377-4" aria-hidden="true"></a><span class="fu">\starttext</span></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">\def\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb377-7"><a href="#cb377-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBeginTight</span>{ (}</span> -<span id="cb377-8"><a href="#cb377-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb377-9"><a href="#cb377-9" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb377-10"><a href="#cb377-10" aria-hidden="true"></a> the first</span> -<span id="cb377-11"><a href="#cb377-11" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb377-12"><a href="#cb377-12" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb377-13"><a href="#cb377-13" aria-hidden="true"></a> , the second</span> -<span id="cb377-14"><a href="#cb377-14" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb377-15"><a href="#cb377-15" aria-hidden="true"></a> , and the third</span> -<span id="cb377-16"><a href="#cb377-16" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb377-17"><a href="#cb377-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb377-18"><a href="#cb377-18" aria-hidden="true"></a>}</span> -<span id="cb377-19"><a href="#cb377-19" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{}</span> -<span id="cb377-20"><a href="#cb377-20" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEndTight</span>{).}</span> -<span id="cb377-21"><a href="#cb377-21" aria-hidden="true"></a></span> -<span id="cb377-22"><a href="#cb377-22" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb377-23"><a href="#cb377-23" aria-hidden="true"></a>This is a tight list</span> -<span id="cb377-24"><a href="#cb377-24" aria-hidden="true"></a></span> -<span id="cb377-25"><a href="#cb377-25" aria-hidden="true"></a>1. item</span> -<span id="cb377-26"><a href="#cb377-26" aria-hidden="true"></a>2. item</span> -<span id="cb377-27"><a href="#cb377-27" aria-hidden="true"></a>3. item</span> -<span id="cb377-28"><a href="#cb377-28" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb377-29"><a href="#cb377-29" aria-hidden="true"></a></span> -<span id="cb377-30"><a href="#cb377-30" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb377-31"><a href="#cb377-31" aria-hidden="true"></a> :<span class="fu">\par</span></span> -<span id="cb377-32"><a href="#cb377-32" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb377-33"><a href="#cb377-33" aria-hidden="true"></a>}</span> -<span id="cb377-34"><a href="#cb377-34" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlBegin</span>{<span class="fu">\startitemize</span>}</span> -<span id="cb377-35"><a href="#cb377-35" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemWithNumber</span>#1{<span class="co">%</span></span> -<span id="cb377-36"><a href="#cb377-36" aria-hidden="true"></a> <span class="fu">\sym</span>{#1.}</span> -<span id="cb377-37"><a href="#cb377-37" aria-hidden="true"></a> This is the</span> -<span id="cb377-38"><a href="#cb377-38" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></span> -<span id="cb377-39"><a href="#cb377-39" aria-hidden="true"></a> first</span> -<span id="cb377-40"><a href="#cb377-40" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb377-41"><a href="#cb377-41" aria-hidden="true"></a> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></span> -<span id="cb377-42"><a href="#cb377-42" aria-hidden="true"></a> second</span> -<span id="cb377-43"><a href="#cb377-43" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb377-44"><a href="#cb377-44" aria-hidden="true"></a> third</span> -<span id="cb377-45"><a href="#cb377-45" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb377-46"><a href="#cb377-46" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb377-47"><a href="#cb377-47" aria-hidden="true"></a>}</span> -<span id="cb377-48"><a href="#cb377-48" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlItemEnd</span>{.<span class="fu">\par</span>}</span> -<span id="cb377-49"><a href="#cb377-49" aria-hidden="true"></a><span class="fu">\def\markdownRendererOlEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb377-50"><a href="#cb377-50" aria-hidden="true"></a></span> -<span id="cb377-51"><a href="#cb377-51" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb377-52"><a href="#cb377-52" aria-hidden="true"></a>This is a loose list</span> -<span id="cb377-53"><a href="#cb377-53" aria-hidden="true"></a></span> -<span id="cb377-54"><a href="#cb377-54" aria-hidden="true"></a>1. item</span> -<span id="cb377-55"><a href="#cb377-55" aria-hidden="true"></a></span> -<span id="cb377-56"><a href="#cb377-56" aria-hidden="true"></a>2. item</span> -<span id="cb377-57"><a href="#cb377-57" aria-hidden="true"></a></span> -<span id="cb377-58"><a href="#cb377-58" aria-hidden="true"></a>3. item</span> -<span id="cb377-59"><a href="#cb377-59" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb377-60"><a href="#cb377-60" aria-hidden="true"></a></span> -<span id="cb377-61"><a href="#cb377-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="cb378"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb378-1"><a href="#cb378-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-34" class="unnumbered">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="cb377"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb377-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb377-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> +<a class="sourceLine" id="cb377-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionStartNumber{true}</a> +<a class="sourceLine" id="cb377-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb377-5" data-line-number="5"></a> +<a class="sourceLine" id="cb377-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb377-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererOlBeginTight{ (}</a> +<a class="sourceLine" id="cb377-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb377-9" data-line-number="9"> \ifnum #1=1\relax</a> +<a class="sourceLine" id="cb377-10" data-line-number="10"> the first</a> +<a class="sourceLine" id="cb377-11" data-line-number="11"> \else</a> +<a class="sourceLine" id="cb377-12" data-line-number="12"> \ifnum #1=2\relax</a> +<a class="sourceLine" id="cb377-13" data-line-number="13"> , the second</a> +<a class="sourceLine" id="cb377-14" data-line-number="14"> \else</a> +<a class="sourceLine" id="cb377-15" data-line-number="15"> , and the third</a> +<a class="sourceLine" id="cb377-16" data-line-number="16"> \fi</a> +<a class="sourceLine" id="cb377-17" data-line-number="17"> \fi</a> +<a class="sourceLine" id="cb377-18" data-line-number="18">}</a> +<a class="sourceLine" id="cb377-19" data-line-number="19"><span class="fu">\def</span>\markdownRendererOlItemEnd{}</a> +<a class="sourceLine" id="cb377-20" data-line-number="20"><span class="fu">\def</span>\markdownRendererOlEndTight{).}</a> +<a class="sourceLine" id="cb377-21" data-line-number="21"></a> +<a class="sourceLine" id="cb377-22" data-line-number="22"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb377-23" data-line-number="23">This is a tight list</a> +<a class="sourceLine" id="cb377-24" data-line-number="24"></a> +<a class="sourceLine" id="cb377-25" data-line-number="25">1. item</a> +<a class="sourceLine" id="cb377-26" data-line-number="26">2. item</a> +<a class="sourceLine" id="cb377-27" data-line-number="27">3. item</a> +<a class="sourceLine" id="cb377-28" data-line-number="28"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb377-29" data-line-number="29"></a> +<a class="sourceLine" id="cb377-30" data-line-number="30"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb377-31" data-line-number="31"> :\par</a> +<a class="sourceLine" id="cb377-32" data-line-number="32"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb377-33" data-line-number="33">}</a> +<a class="sourceLine" id="cb377-34" data-line-number="34"><span class="fu">\def</span>\markdownRendererOlBegin{\startitemize}</a> +<a class="sourceLine" id="cb377-35" data-line-number="35"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb377-36" data-line-number="36"> \sym{#1.}</a> +<a class="sourceLine" id="cb377-37" data-line-number="37"> This is the</a> +<a class="sourceLine" id="cb377-38" data-line-number="38"> \ifnum #1=1\relax</a> +<a class="sourceLine" id="cb377-39" data-line-number="39"> first</a> +<a class="sourceLine" id="cb377-40" data-line-number="40"> \else</a> +<a class="sourceLine" id="cb377-41" data-line-number="41"> \ifnum #1=2\relax</a> +<a class="sourceLine" id="cb377-42" data-line-number="42"> second</a> +<a class="sourceLine" id="cb377-43" data-line-number="43"> \else</a> +<a class="sourceLine" id="cb377-44" data-line-number="44"> third</a> +<a class="sourceLine" id="cb377-45" data-line-number="45"> \fi</a> +<a class="sourceLine" id="cb377-46" data-line-number="46"> \fi</a> +<a class="sourceLine" id="cb377-47" data-line-number="47">}</a> +<a class="sourceLine" id="cb377-48" data-line-number="48"><span class="fu">\def</span>\markdownRendererOlItemEnd{.\par}</a> +<a class="sourceLine" id="cb377-49" data-line-number="49"><span class="fu">\def</span>\markdownRendererOlEnd{\stopitemize}</a> +<a class="sourceLine" id="cb377-50" data-line-number="50"></a> +<a class="sourceLine" id="cb377-51" data-line-number="51"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb377-52" data-line-number="52">This is a loose list</a> +<a class="sourceLine" id="cb377-53" data-line-number="53"></a> +<a class="sourceLine" id="cb377-54" data-line-number="54">1. item</a> +<a class="sourceLine" id="cb377-55" data-line-number="55"></a> +<a class="sourceLine" id="cb377-56" data-line-number="56">2. item</a> +<a class="sourceLine" id="cb377-57" data-line-number="57"></a> +<a class="sourceLine" id="cb377-58" data-line-number="58">3. item</a> +<a class="sourceLine" id="cb377-59" data-line-number="59"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb377-60" data-line-number="60"></a> +<a class="sourceLine" id="cb377-61" data-line-number="61"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb378"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb378-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a tight list (the first item, the second item, and the third item).</p> @@ -4793,7 +4791,7 @@ Thomas,Edison,1847</code></pre> <li><p>This is the third item.</p></li> </ol> </blockquote> -<h4 data-number="2.3.1.12" id="definition-list-renderers"><span class="header-section-number">2.3.1.12</span> Definition List Renderers</h4> +<h4 id="definition-list-renderers"><span class="header-section-number">2.3.1.12</span> Definition List Renderers</h4> <p>The following macros are only produced, when the <strong><code>definitionLists</code></strong> option is enabled.</p> <p>The <code>\markdownRendererDlBegin</code> macro represents the beginning of a definition list that contains an item with several paragraphs of text (the list is not tight). The macro receives no arguments.</p> <p>The <code>\markdownRendererDlBeginTight</code> macro represents the beginning of a definition list that contains an item with several paragraphs of text (the list is not tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <code>false</code>. The macro receives no arguments.</p> @@ -4803,88 +4801,88 @@ Thomas,Edison,1847</code></pre> <p>The <code>\markdownRendererDlDefinitionEnd</code> macro represents the end of a definition in a definition list. There can be several definitions for a single term.</p> <p>The <code>\markdownRendererDlEnd</code> macro represents the end of a definition list that contains an item with several paragraphs of text (the list is not tight). The macro receives no arguments.</p> <p>The <code>\markdownRendererDlEndTight</code> macro represents the end of a definition list that contains no item with several paragraphs of text (the list is tight). This macro will only be produced, when the <strong><code>tightLists</code></strong> option is <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="cb379"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb379-1"><a href="#cb379-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb379-2"><a href="#cb379-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> -<span id="cb379-3"><a href="#cb379-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb379-4"><a href="#cb379-4" aria-hidden="true"></a></span> -<span id="cb379-5"><a href="#cb379-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb379-6"><a href="#cb379-6" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb379-7"><a href="#cb379-7" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb379-8"><a href="#cb379-8" aria-hidden="true"></a>}</span> -<span id="cb379-9"><a href="#cb379-9" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{<span class="co">%</span></span> -<span id="cb379-10"><a href="#cb379-10" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb379-11"><a href="#cb379-11" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</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="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb379-14"><a href="#cb379-14" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> -<span id="cb379-15"><a href="#cb379-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb379-16"><a href="#cb379-16" aria-hidden="true"></a> ,</span> -<span id="cb379-17"><a href="#cb379-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb379-18"><a href="#cb379-18" aria-hidden="true"></a> , and</span> -<span id="cb379-19"><a href="#cb379-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb379-20"><a href="#cb379-20" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb379-21"><a href="#cb379-21" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb379-22"><a href="#cb379-22" aria-hidden="true"></a>}</span> -<span id="cb379-23"><a href="#cb379-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb379-24"><a href="#cb379-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="cb379-25"><a href="#cb379-25" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{<span class="fu">\endgroup</span>}</span> -<span id="cb379-26"><a href="#cb379-26" aria-hidden="true"></a></span> -<span id="cb379-27"><a href="#cb379-27" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb379-28"><a href="#cb379-28" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb379-29"><a href="#cb379-29" aria-hidden="true"></a></span> -<span id="cb379-30"><a href="#cb379-30" aria-hidden="true"></a>Coffee</span> -<span id="cb379-31"><a href="#cb379-31" aria-hidden="true"></a>: black hot drink</span> -<span id="cb379-32"><a href="#cb379-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb379-33"><a href="#cb379-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb379-34"><a href="#cb379-34" aria-hidden="true"></a></span> -<span id="cb379-35"><a href="#cb379-35" aria-hidden="true"></a>Milk</span> -<span id="cb379-36"><a href="#cb379-36" aria-hidden="true"></a>: white cold drink</span> -<span id="cb379-37"><a href="#cb379-37" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb379-38"><a href="#cb379-38" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb379-39"><a href="#cb379-39" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb379-40"><a href="#cb379-40" aria-hidden="true"></a></span> -<span id="cb379-41"><a href="#cb379-41" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb379-42"><a href="#cb379-42" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb379-43"><a href="#cb379-43" aria-hidden="true"></a>}</span> -<span id="cb379-44"><a href="#cb379-44" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> -<span id="cb379-45"><a href="#cb379-45" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb379-46"><a href="#cb379-46" aria-hidden="true"></a> . #1 is a</span> -<span id="cb379-47"><a href="#cb379-47" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb379-48"><a href="#cb379-48" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb379-49"><a href="#cb379-49" aria-hidden="true"></a> ,</span> -<span id="cb379-50"><a href="#cb379-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb379-51"><a href="#cb379-51" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb379-52"><a href="#cb379-52" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb379-53"><a href="#cb379-53" aria-hidden="true"></a>}</span> -<span id="cb379-54"><a href="#cb379-54" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb379-55"><a href="#cb379-55" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> -<span id="cb379-56"><a href="#cb379-56" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> -<span id="cb379-57"><a href="#cb379-57" aria-hidden="true"></a></span> -<span id="cb379-58"><a href="#cb379-58" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb379-59"><a href="#cb379-59" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb379-60"><a href="#cb379-60" aria-hidden="true"></a></span> -<span id="cb379-61"><a href="#cb379-61" aria-hidden="true"></a>Coffee</span> -<span id="cb379-62"><a href="#cb379-62" aria-hidden="true"></a></span> -<span id="cb379-63"><a href="#cb379-63" aria-hidden="true"></a>: black hot drink</span> -<span id="cb379-64"><a href="#cb379-64" aria-hidden="true"></a></span> -<span id="cb379-65"><a href="#cb379-65" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb379-66"><a href="#cb379-66" aria-hidden="true"></a></span> -<span id="cb379-67"><a href="#cb379-67" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb379-68"><a href="#cb379-68" aria-hidden="true"></a></span> -<span id="cb379-69"><a href="#cb379-69" aria-hidden="true"></a>Milk</span> -<span id="cb379-70"><a href="#cb379-70" aria-hidden="true"></a></span> -<span id="cb379-71"><a href="#cb379-71" aria-hidden="true"></a>: white cold drink</span> -<span id="cb379-72"><a href="#cb379-72" aria-hidden="true"></a></span> -<span id="cb379-73"><a href="#cb379-73" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb379-74"><a href="#cb379-74" aria-hidden="true"></a></span> -<span id="cb379-75"><a href="#cb379-75" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb379-76"><a href="#cb379-76" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb379-77"><a href="#cb379-77" aria-hidden="true"></a></span> -<span id="cb379-78"><a href="#cb379-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="cb380"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb380-1"><a href="#cb380-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-25" class="unnumbered">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="cb379"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb379-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb379-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionDefinitionLists{true}</a> +<a class="sourceLine" id="cb379-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> +<a class="sourceLine" id="cb379-4" data-line-number="4"></a> +<a class="sourceLine" id="cb379-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb379-6" data-line-number="6"> :<span class="co">%</span></a> +<a class="sourceLine" id="cb379-7" data-line-number="7"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb379-8" data-line-number="8">}</a> +<a class="sourceLine" id="cb379-9" data-line-number="9"><span class="fu">\def</span>\markdownRendererDlBeginTight{<span class="co">%</span></a> +<a class="sourceLine" id="cb379-10" data-line-number="10"> \begingroup</a> +<a class="sourceLine" id="cb379-11" data-line-number="11"> \parindent=0pt</a> +<a class="sourceLine" id="cb379-12" data-line-number="12">}</a> +<a class="sourceLine" id="cb379-13" data-line-number="13"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb379-14" data-line-number="14"> \par{\bf#1}<span class="co">%</span></a> +<a class="sourceLine" id="cb379-15" data-line-number="15"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb379-16" data-line-number="16"> ,</a> +<a class="sourceLine" id="cb379-17" data-line-number="17"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb379-18" data-line-number="18"> , and</a> +<a class="sourceLine" id="cb379-19" data-line-number="19"> \def\markdownRendererDlDefinitionEnd{.}<span class="co">%</span></a> +<a class="sourceLine" id="cb379-20" data-line-number="20"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb379-21" data-line-number="21"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb379-22" data-line-number="22">}</a> +<a class="sourceLine" id="cb379-23" data-line-number="23"><span class="fu">\def</span>\markdownRendererDlItemEnd{}</a> +<a class="sourceLine" id="cb379-24" data-line-number="24"><span class="fu">\def</span>\markdownRendererDlDefinitionBegin{\par--\kern 0.5em}</a> +<a class="sourceLine" id="cb379-25" data-line-number="25"><span class="fu">\def</span>\markdownRendererDlEndTight{\endgroup}</a> +<a class="sourceLine" id="cb379-26" data-line-number="26"></a> +<a class="sourceLine" id="cb379-27" data-line-number="27"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb379-28" data-line-number="28">This is a tight definition list</a> +<a class="sourceLine" id="cb379-29" data-line-number="29"></a> +<a class="sourceLine" id="cb379-30" data-line-number="30">Coffee</a> +<a class="sourceLine" id="cb379-31" data-line-number="31">: black hot drink</a> +<a class="sourceLine" id="cb379-32" data-line-number="32">: prepared from roasted coffee beans</a> +<a class="sourceLine" id="cb379-33" data-line-number="33">: one of the most traded agricultural commodities in the world</a> +<a class="sourceLine" id="cb379-34" data-line-number="34"></a> +<a class="sourceLine" id="cb379-35" data-line-number="35">Milk</a> +<a class="sourceLine" id="cb379-36" data-line-number="36">: white cold drink</a> +<a class="sourceLine" id="cb379-37" data-line-number="37">: nutrient-rich</a> +<a class="sourceLine" id="cb379-38" data-line-number="38">: produced on an industrial scale</a> +<a class="sourceLine" id="cb379-39" data-line-number="39"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb379-40" data-line-number="40"></a> +<a class="sourceLine" id="cb379-41" data-line-number="41"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb379-42" data-line-number="42"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb379-43" data-line-number="43">}</a> +<a class="sourceLine" id="cb379-44" data-line-number="44"><span class="fu">\def</span>\markdownRendererDlBegin{}</a> +<a class="sourceLine" id="cb379-45" data-line-number="45"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb379-46" data-line-number="46"> . #1 is a</a> +<a class="sourceLine" id="cb379-47" data-line-number="47"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb379-48" data-line-number="48"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb379-49" data-line-number="49"> ,</a> +<a class="sourceLine" id="cb379-50" data-line-number="50"> \def\markdownRendererDlDefinitionBegin{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb379-51" data-line-number="51"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb379-52" data-line-number="52"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb379-53" data-line-number="53">}</a> +<a class="sourceLine" id="cb379-54" data-line-number="54"><span class="fu">\def</span>\markdownRendererDlItemEnd{}</a> +<a class="sourceLine" id="cb379-55" data-line-number="55"><span class="fu">\def</span>\markdownRendererDlDefinitionEnd{}</a> +<a class="sourceLine" id="cb379-56" data-line-number="56"><span class="fu">\def</span>\markdownRendererDlEnd{.}</a> +<a class="sourceLine" id="cb379-57" data-line-number="57"></a> +<a class="sourceLine" id="cb379-58" data-line-number="58"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb379-59" data-line-number="59">This is a loose definition list</a> +<a class="sourceLine" id="cb379-60" data-line-number="60"></a> +<a class="sourceLine" id="cb379-61" data-line-number="61">Coffee</a> +<a class="sourceLine" id="cb379-62" data-line-number="62"></a> +<a class="sourceLine" id="cb379-63" data-line-number="63">: black hot drink</a> +<a class="sourceLine" id="cb379-64" data-line-number="64"></a> +<a class="sourceLine" id="cb379-65" data-line-number="65">: prepared from roasted coffee beans</a> +<a class="sourceLine" id="cb379-66" data-line-number="66"></a> +<a class="sourceLine" id="cb379-67" data-line-number="67">: one of the most traded agricultural commodities in the world</a> +<a class="sourceLine" id="cb379-68" data-line-number="68"></a> +<a class="sourceLine" id="cb379-69" data-line-number="69">Milk</a> +<a class="sourceLine" id="cb379-70" data-line-number="70"></a> +<a class="sourceLine" id="cb379-71" data-line-number="71">: white cold drink</a> +<a class="sourceLine" id="cb379-72" data-line-number="72"></a> +<a class="sourceLine" id="cb379-73" data-line-number="73">: nutrient-rich</a> +<a class="sourceLine" id="cb379-74" data-line-number="74"></a> +<a class="sourceLine" id="cb379-75" data-line-number="75">: produced on an industrial scale</a> +<a class="sourceLine" id="cb379-76" data-line-number="76"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb379-77" data-line-number="77"></a> +<a class="sourceLine" id="cb379-78" data-line-number="78"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb380"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb380-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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> @@ -4902,90 +4900,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-43"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb381"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb381-1"><a href="#cb381-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb381-2"><a href="#cb381-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</span> -<span id="cb381-3"><a href="#cb381-3" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</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="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb381-6"><a href="#cb381-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb381-7"><a href="#cb381-7" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb381-8"><a href="#cb381-8" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb381-9"><a href="#cb381-9" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</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> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</span> -<span id="cb381-12"><a href="#cb381-12" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> -<span id="cb381-13"><a href="#cb381-13" aria-hidden="true"></a> <span class="fu">\item</span>[#1]</span> -<span id="cb381-14"><a href="#cb381-14" aria-hidden="true"></a> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</span> -<span id="cb381-15"><a href="#cb381-15" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb381-16"><a href="#cb381-16" aria-hidden="true"></a> ,</span> -<span id="cb381-17"><a href="#cb381-17" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb381-18"><a href="#cb381-18" aria-hidden="true"></a> , and</span> -<span id="cb381-19"><a href="#cb381-19" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb381-20"><a href="#cb381-20" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb381-21"><a href="#cb381-21" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb381-22"><a href="#cb381-22" aria-hidden="true"></a> },</span> -<span id="cb381-23"><a href="#cb381-23" aria-hidden="true"></a> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</span> -<span id="cb381-24"><a href="#cb381-24" aria-hidden="true"></a> dlDefinitionBegin = <span class="fu">\item</span>,</span> -<span id="cb381-25"><a href="#cb381-25" aria-hidden="true"></a> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</span> -<span id="cb381-26"><a href="#cb381-26" aria-hidden="true"></a> },</span> -<span id="cb381-27"><a href="#cb381-27" aria-hidden="true"></a>}</span> -<span id="cb381-28"><a href="#cb381-28" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb381-29"><a href="#cb381-29" aria-hidden="true"></a></span> -<span id="cb381-30"><a href="#cb381-30" aria-hidden="true"></a>Coffee</span> -<span id="cb381-31"><a href="#cb381-31" aria-hidden="true"></a>: black hot drink</span> -<span id="cb381-32"><a href="#cb381-32" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb381-33"><a href="#cb381-33" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb381-34"><a href="#cb381-34" aria-hidden="true"></a></span> -<span id="cb381-35"><a href="#cb381-35" aria-hidden="true"></a>Milk</span> -<span id="cb381-36"><a href="#cb381-36" aria-hidden="true"></a>: white cold drink</span> -<span id="cb381-37"><a href="#cb381-37" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb381-38"><a href="#cb381-38" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb381-39"><a href="#cb381-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb381-40"><a href="#cb381-40" aria-hidden="true"></a></span> -<span id="cb381-41"><a href="#cb381-41" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb381-42"><a href="#cb381-42" aria-hidden="true"></a> renderers = {</span> -<span id="cb381-43"><a href="#cb381-43" aria-hidden="true"></a> interblockSeparator = {<span class="co">%</span></span> -<span id="cb381-44"><a href="#cb381-44" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb381-45"><a href="#cb381-45" aria-hidden="true"></a> },</span> -<span id="cb381-46"><a href="#cb381-46" aria-hidden="true"></a> dlBegin = {},</span> -<span id="cb381-47"><a href="#cb381-47" aria-hidden="true"></a> dlItem = {<span class="co">%</span></span> -<span id="cb381-48"><a href="#cb381-48" aria-hidden="true"></a> . #1 is a</span> -<span id="cb381-49"><a href="#cb381-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb381-50"><a href="#cb381-50" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb381-51"><a href="#cb381-51" aria-hidden="true"></a> ,</span> -<span id="cb381-52"><a href="#cb381-52" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb381-53"><a href="#cb381-53" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb381-54"><a href="#cb381-54" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb381-55"><a href="#cb381-55" aria-hidden="true"></a> },</span> -<span id="cb381-56"><a href="#cb381-56" aria-hidden="true"></a> dlItemEnd = {},</span> -<span id="cb381-57"><a href="#cb381-57" aria-hidden="true"></a> dlDefinitionEnd = {},</span> -<span id="cb381-58"><a href="#cb381-58" aria-hidden="true"></a> dlEnd = {.},</span> -<span id="cb381-59"><a href="#cb381-59" aria-hidden="true"></a> },</span> -<span id="cb381-60"><a href="#cb381-60" aria-hidden="true"></a>}</span> -<span id="cb381-61"><a href="#cb381-61" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb381-62"><a href="#cb381-62" aria-hidden="true"></a></span> -<span id="cb381-63"><a href="#cb381-63" aria-hidden="true"></a>Coffee</span> -<span id="cb381-64"><a href="#cb381-64" aria-hidden="true"></a></span> -<span id="cb381-65"><a href="#cb381-65" aria-hidden="true"></a>: black hot drink</span> -<span id="cb381-66"><a href="#cb381-66" aria-hidden="true"></a></span> -<span id="cb381-67"><a href="#cb381-67" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb381-68"><a href="#cb381-68" aria-hidden="true"></a></span> -<span id="cb381-69"><a href="#cb381-69" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb381-70"><a href="#cb381-70" aria-hidden="true"></a></span> -<span id="cb381-71"><a href="#cb381-71" aria-hidden="true"></a>Milk</span> -<span id="cb381-72"><a href="#cb381-72" aria-hidden="true"></a></span> -<span id="cb381-73"><a href="#cb381-73" aria-hidden="true"></a>: white cold drink</span> -<span id="cb381-74"><a href="#cb381-74" aria-hidden="true"></a></span> -<span id="cb381-75"><a href="#cb381-75" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb381-76"><a href="#cb381-76" aria-hidden="true"></a></span> -<span id="cb381-77"><a href="#cb381-77" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb381-78"><a href="#cb381-78" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb381-79"><a href="#cb381-79" aria-hidden="true"></a></span> -<span id="cb381-80"><a href="#cb381-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="cb382"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb382-1"><a href="#cb382-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-43" class="unnumbered"><span class="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="cb381"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb381-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb381-2" data-line-number="2"><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb381-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb381-4" data-line-number="4"></a> +<a class="sourceLine" id="cb381-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb381-6" data-line-number="6"> renderers = {</a> +<a class="sourceLine" id="cb381-7" data-line-number="7"> interblockSeparator = {<span class="co">%</span></a> +<a class="sourceLine" id="cb381-8" data-line-number="8"> :<span class="co">%</span></a> +<a class="sourceLine" id="cb381-9" data-line-number="9"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb381-10" data-line-number="10"> },</a> +<a class="sourceLine" id="cb381-11" data-line-number="11"> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</a> +<a class="sourceLine" id="cb381-12" data-line-number="12"> dlItem = {<span class="co">%</span></a> +<a class="sourceLine" id="cb381-13" data-line-number="13"> <span class="fu">\item</span>[#1]</a> +<a class="sourceLine" id="cb381-14" data-line-number="14"> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</a> +<a class="sourceLine" id="cb381-15" data-line-number="15"> <span class="fu">\def</span>\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb381-16" data-line-number="16"> ,</a> +<a class="sourceLine" id="cb381-17" data-line-number="17"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb381-18" data-line-number="18"> , and</a> +<a class="sourceLine" id="cb381-19" data-line-number="19"> \def\markdownRendererDlDefinitionEnd{.}<span class="co">%</span></a> +<a class="sourceLine" id="cb381-20" data-line-number="20"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb381-21" data-line-number="21"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb381-22" data-line-number="22"> },</a> +<a class="sourceLine" id="cb381-23" data-line-number="23"> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</a> +<a class="sourceLine" id="cb381-24" data-line-number="24"> dlDefinitionBegin = <span class="fu">\item</span>,</a> +<a class="sourceLine" id="cb381-25" data-line-number="25"> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</a> +<a class="sourceLine" id="cb381-26" data-line-number="26"> },</a> +<a class="sourceLine" id="cb381-27" data-line-number="27">}</a> +<a class="sourceLine" id="cb381-28" data-line-number="28">This is a tight definition list</a> +<a class="sourceLine" id="cb381-29" data-line-number="29"></a> +<a class="sourceLine" id="cb381-30" data-line-number="30">Coffee</a> +<a class="sourceLine" id="cb381-31" data-line-number="31">: black hot drink</a> +<a class="sourceLine" id="cb381-32" data-line-number="32">: prepared from roasted coffee beans</a> +<a class="sourceLine" id="cb381-33" data-line-number="33">: one of the most traded agricultural commodities in the world</a> +<a class="sourceLine" id="cb381-34" data-line-number="34"></a> +<a class="sourceLine" id="cb381-35" data-line-number="35">Milk</a> +<a class="sourceLine" id="cb381-36" data-line-number="36">: white cold drink</a> +<a class="sourceLine" id="cb381-37" data-line-number="37">: nutrient-rich</a> +<a class="sourceLine" id="cb381-38" data-line-number="38">: produced on an industrial scale</a> +<a class="sourceLine" id="cb381-39" data-line-number="39"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb381-40" data-line-number="40"></a> +<a class="sourceLine" id="cb381-41" data-line-number="41"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb381-42" data-line-number="42"> renderers = {</a> +<a class="sourceLine" id="cb381-43" data-line-number="43"> interblockSeparator = {<span class="co">%</span></a> +<a class="sourceLine" id="cb381-44" data-line-number="44"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb381-45" data-line-number="45"> },</a> +<a class="sourceLine" id="cb381-46" data-line-number="46"> dlBegin = {},</a> +<a class="sourceLine" id="cb381-47" data-line-number="47"> dlItem = {<span class="co">%</span></a> +<a class="sourceLine" id="cb381-48" data-line-number="48"> . #1 is a</a> +<a class="sourceLine" id="cb381-49" data-line-number="49"> <span class="fu">\def</span>\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb381-50" data-line-number="50"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb381-51" data-line-number="51"> ,</a> +<a class="sourceLine" id="cb381-52" data-line-number="52"> \def\markdownRendererDlDefinitionBegin{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb381-53" data-line-number="53"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb381-54" data-line-number="54"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb381-55" data-line-number="55"> },</a> +<a class="sourceLine" id="cb381-56" data-line-number="56"> dlItemEnd = {},</a> +<a class="sourceLine" id="cb381-57" data-line-number="57"> dlDefinitionEnd = {},</a> +<a class="sourceLine" id="cb381-58" data-line-number="58"> dlEnd = {.},</a> +<a class="sourceLine" id="cb381-59" data-line-number="59"> },</a> +<a class="sourceLine" id="cb381-60" data-line-number="60">}</a> +<a class="sourceLine" id="cb381-61" data-line-number="61">This is a loose definition list</a> +<a class="sourceLine" id="cb381-62" data-line-number="62"></a> +<a class="sourceLine" id="cb381-63" data-line-number="63">Coffee</a> +<a class="sourceLine" id="cb381-64" data-line-number="64"></a> +<a class="sourceLine" id="cb381-65" data-line-number="65">: black hot drink</a> +<a class="sourceLine" id="cb381-66" data-line-number="66"></a> +<a class="sourceLine" id="cb381-67" data-line-number="67">: prepared from roasted coffee beans</a> +<a class="sourceLine" id="cb381-68" data-line-number="68"></a> +<a class="sourceLine" id="cb381-69" data-line-number="69">: one of the most traded agricultural commodities in the world</a> +<a class="sourceLine" id="cb381-70" data-line-number="70"></a> +<a class="sourceLine" id="cb381-71" data-line-number="71">Milk</a> +<a class="sourceLine" id="cb381-72" data-line-number="72"></a> +<a class="sourceLine" id="cb381-73" data-line-number="73">: white cold drink</a> +<a class="sourceLine" id="cb381-74" data-line-number="74"></a> +<a class="sourceLine" id="cb381-75" data-line-number="75">: nutrient-rich</a> +<a class="sourceLine" id="cb381-76" data-line-number="76"></a> +<a class="sourceLine" id="cb381-77" data-line-number="77">: produced on an industrial scale</a> +<a class="sourceLine" id="cb381-78" data-line-number="78"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb381-79" data-line-number="79"></a> +<a class="sourceLine" id="cb381-80" data-line-number="80"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb382"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb382-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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> @@ -5003,87 +5001,87 @@ 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="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="cb383"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb383-1"><a href="#cb383-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb383-2"><a href="#cb383-2" aria-hidden="true"></a><span class="fu">\def\markdownOptionDefinitionLists</span>{true}</span> -<span id="cb383-3"><a href="#cb383-3" aria-hidden="true"></a><span class="fu">\def\markdownOptionTightLists</span>{true}</span> -<span id="cb383-4"><a href="#cb383-4" aria-hidden="true"></a><span class="fu">\starttext</span></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">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb383-7"><a href="#cb383-7" aria-hidden="true"></a> :<span class="co">%</span></span> -<span id="cb383-8"><a href="#cb383-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb383-9"><a href="#cb383-9" aria-hidden="true"></a>}</span> -<span id="cb383-10"><a href="#cb383-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBeginTight</span>{}</span> -<span id="cb383-11"><a href="#cb383-11" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb383-12"><a href="#cb383-12" aria-hidden="true"></a> <span class="fu">\par</span>{<span class="fu">\bf</span>#1}<span class="co">%</span></span> -<span id="cb383-13"><a href="#cb383-13" aria-hidden="true"></a> <span class="fu">\startitemize</span></span> -<span id="cb383-14"><a href="#cb383-14" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb383-15"><a href="#cb383-15" aria-hidden="true"></a> ,</span> -<span id="cb383-16"><a href="#cb383-16" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{<span class="co">%</span></span> -<span id="cb383-17"><a href="#cb383-17" aria-hidden="true"></a> , and</span> -<span id="cb383-18"><a href="#cb383-18" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionEnd</span>{.}<span class="co">%</span></span> -<span id="cb383-19"><a href="#cb383-19" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb383-20"><a href="#cb383-20" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb383-21"><a href="#cb383-21" aria-hidden="true"></a>}</span> -<span id="cb383-22"><a href="#cb383-22" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{<span class="fu">\stopitemize</span>}</span> -<span id="cb383-23"><a href="#cb383-23" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="fu">\item</span>}</span> -<span id="cb383-24"><a href="#cb383-24" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEndTight</span>{}</span> -<span id="cb383-25"><a href="#cb383-25" aria-hidden="true"></a></span> -<span id="cb383-26"><a href="#cb383-26" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb383-27"><a href="#cb383-27" aria-hidden="true"></a>This is a tight definition list</span> -<span id="cb383-28"><a href="#cb383-28" aria-hidden="true"></a></span> -<span id="cb383-29"><a href="#cb383-29" aria-hidden="true"></a>Coffee</span> -<span id="cb383-30"><a href="#cb383-30" aria-hidden="true"></a>: black hot drink</span> -<span id="cb383-31"><a href="#cb383-31" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb383-32"><a href="#cb383-32" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb383-33"><a href="#cb383-33" aria-hidden="true"></a></span> -<span id="cb383-34"><a href="#cb383-34" aria-hidden="true"></a>Milk</span> -<span id="cb383-35"><a href="#cb383-35" aria-hidden="true"></a>: white cold drink</span> -<span id="cb383-36"><a href="#cb383-36" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb383-37"><a href="#cb383-37" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb383-38"><a href="#cb383-38" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb383-39"><a href="#cb383-39" aria-hidden="true"></a></span> -<span id="cb383-40"><a href="#cb383-40" aria-hidden="true"></a><span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb383-41"><a href="#cb383-41" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="fu">\par</span>}<span class="co">%</span></span> -<span id="cb383-42"><a href="#cb383-42" aria-hidden="true"></a>}</span> -<span id="cb383-43"><a href="#cb383-43" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlBegin</span>{}</span> -<span id="cb383-44"><a href="#cb383-44" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItem</span>#1{<span class="co">%</span></span> -<span id="cb383-45"><a href="#cb383-45" aria-hidden="true"></a> . #1 is a</span> -<span id="cb383-46"><a href="#cb383-46" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb383-47"><a href="#cb383-47" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{<span class="co">%</span></span> -<span id="cb383-48"><a href="#cb383-48" aria-hidden="true"></a> ,</span> -<span id="cb383-49"><a href="#cb383-49" aria-hidden="true"></a> <span class="fu">\def\markdownRendererDlDefinitionBegin</span>{, and }<span class="co">%</span></span> -<span id="cb383-50"><a href="#cb383-50" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb383-51"><a href="#cb383-51" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb383-52"><a href="#cb383-52" aria-hidden="true"></a>}</span> -<span id="cb383-53"><a href="#cb383-53" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlItemEnd</span>{}</span> -<span id="cb383-54"><a href="#cb383-54" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlDefinitionEnd</span>{}</span> -<span id="cb383-55"><a href="#cb383-55" aria-hidden="true"></a><span class="fu">\def\markdownRendererDlEnd</span>{.}</span> -<span id="cb383-56"><a href="#cb383-56" aria-hidden="true"></a></span> -<span id="cb383-57"><a href="#cb383-57" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb383-58"><a href="#cb383-58" aria-hidden="true"></a>This is a loose definition list</span> -<span id="cb383-59"><a href="#cb383-59" aria-hidden="true"></a></span> -<span id="cb383-60"><a href="#cb383-60" aria-hidden="true"></a>Coffee</span> -<span id="cb383-61"><a href="#cb383-61" aria-hidden="true"></a></span> -<span id="cb383-62"><a href="#cb383-62" aria-hidden="true"></a>: black hot drink</span> -<span id="cb383-63"><a href="#cb383-63" aria-hidden="true"></a></span> -<span id="cb383-64"><a href="#cb383-64" aria-hidden="true"></a>: prepared from roasted coffee beans</span> -<span id="cb383-65"><a href="#cb383-65" aria-hidden="true"></a></span> -<span id="cb383-66"><a href="#cb383-66" aria-hidden="true"></a>: one of the most traded agricultural commodities in the world</span> -<span id="cb383-67"><a href="#cb383-67" aria-hidden="true"></a></span> -<span id="cb383-68"><a href="#cb383-68" aria-hidden="true"></a>Milk</span> -<span id="cb383-69"><a href="#cb383-69" aria-hidden="true"></a></span> -<span id="cb383-70"><a href="#cb383-70" aria-hidden="true"></a>: white cold drink</span> -<span id="cb383-71"><a href="#cb383-71" aria-hidden="true"></a></span> -<span id="cb383-72"><a href="#cb383-72" aria-hidden="true"></a>: nutrient-rich</span> -<span id="cb383-73"><a href="#cb383-73" aria-hidden="true"></a></span> -<span id="cb383-74"><a href="#cb383-74" aria-hidden="true"></a>: produced on an industrial scale</span> -<span id="cb383-75"><a href="#cb383-75" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb383-76"><a href="#cb383-76" aria-hidden="true"></a></span> -<span id="cb383-77"><a href="#cb383-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="cb384"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb384-1"><a href="#cb384-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-35" class="unnumbered">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="cb383"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb383-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb383-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionDefinitionLists{true}</a> +<a class="sourceLine" id="cb383-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> +<a class="sourceLine" id="cb383-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb383-5" data-line-number="5"></a> +<a class="sourceLine" id="cb383-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb383-7" data-line-number="7"> :<span class="co">%</span></a> +<a class="sourceLine" id="cb383-8" data-line-number="8"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb383-9" data-line-number="9">}</a> +<a class="sourceLine" id="cb383-10" data-line-number="10"><span class="fu">\def</span>\markdownRendererDlBeginTight{}</a> +<a class="sourceLine" id="cb383-11" data-line-number="11"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb383-12" data-line-number="12"> \par{\bf#1}<span class="co">%</span></a> +<a class="sourceLine" id="cb383-13" data-line-number="13"> \startitemize</a> +<a class="sourceLine" id="cb383-14" data-line-number="14"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb383-15" data-line-number="15"> ,</a> +<a class="sourceLine" id="cb383-16" data-line-number="16"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb383-17" data-line-number="17"> , and</a> +<a class="sourceLine" id="cb383-18" data-line-number="18"> \def\markdownRendererDlDefinitionEnd{.}<span class="co">%</span></a> +<a class="sourceLine" id="cb383-19" data-line-number="19"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb383-20" data-line-number="20"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb383-21" data-line-number="21">}</a> +<a class="sourceLine" id="cb383-22" data-line-number="22"><span class="fu">\def</span>\markdownRendererDlItemEnd{\stopitemize}</a> +<a class="sourceLine" id="cb383-23" data-line-number="23"><span class="fu">\def</span>\markdownRendererDlDefinitionBegin{\item}</a> +<a class="sourceLine" id="cb383-24" data-line-number="24"><span class="fu">\def</span>\markdownRendererDlEndTight{}</a> +<a class="sourceLine" id="cb383-25" data-line-number="25"></a> +<a class="sourceLine" id="cb383-26" data-line-number="26"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb383-27" data-line-number="27">This is a tight definition list</a> +<a class="sourceLine" id="cb383-28" data-line-number="28"></a> +<a class="sourceLine" id="cb383-29" data-line-number="29">Coffee</a> +<a class="sourceLine" id="cb383-30" data-line-number="30">: black hot drink</a> +<a class="sourceLine" id="cb383-31" data-line-number="31">: prepared from roasted coffee beans</a> +<a class="sourceLine" id="cb383-32" data-line-number="32">: one of the most traded agricultural commodities in the world</a> +<a class="sourceLine" id="cb383-33" data-line-number="33"></a> +<a class="sourceLine" id="cb383-34" data-line-number="34">Milk</a> +<a class="sourceLine" id="cb383-35" data-line-number="35">: white cold drink</a> +<a class="sourceLine" id="cb383-36" data-line-number="36">: nutrient-rich</a> +<a class="sourceLine" id="cb383-37" data-line-number="37">: produced on an industrial scale</a> +<a class="sourceLine" id="cb383-38" data-line-number="38"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb383-39" data-line-number="39"></a> +<a class="sourceLine" id="cb383-40" data-line-number="40"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb383-41" data-line-number="41"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb383-42" data-line-number="42">}</a> +<a class="sourceLine" id="cb383-43" data-line-number="43"><span class="fu">\def</span>\markdownRendererDlBegin{}</a> +<a class="sourceLine" id="cb383-44" data-line-number="44"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb383-45" data-line-number="45"> . #1 is a</a> +<a class="sourceLine" id="cb383-46" data-line-number="46"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb383-47" data-line-number="47"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb383-48" data-line-number="48"> ,</a> +<a class="sourceLine" id="cb383-49" data-line-number="49"> \def\markdownRendererDlDefinitionBegin{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb383-50" data-line-number="50"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb383-51" data-line-number="51"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb383-52" data-line-number="52">}</a> +<a class="sourceLine" id="cb383-53" data-line-number="53"><span class="fu">\def</span>\markdownRendererDlItemEnd{}</a> +<a class="sourceLine" id="cb383-54" data-line-number="54"><span class="fu">\def</span>\markdownRendererDlDefinitionEnd{}</a> +<a class="sourceLine" id="cb383-55" data-line-number="55"><span class="fu">\def</span>\markdownRendererDlEnd{.}</a> +<a class="sourceLine" id="cb383-56" data-line-number="56"></a> +<a class="sourceLine" id="cb383-57" data-line-number="57"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb383-58" data-line-number="58">This is a loose definition list</a> +<a class="sourceLine" id="cb383-59" data-line-number="59"></a> +<a class="sourceLine" id="cb383-60" data-line-number="60">Coffee</a> +<a class="sourceLine" id="cb383-61" data-line-number="61"></a> +<a class="sourceLine" id="cb383-62" data-line-number="62">: black hot drink</a> +<a class="sourceLine" id="cb383-63" data-line-number="63"></a> +<a class="sourceLine" id="cb383-64" data-line-number="64">: prepared from roasted coffee beans</a> +<a class="sourceLine" id="cb383-65" data-line-number="65"></a> +<a class="sourceLine" id="cb383-66" data-line-number="66">: one of the most traded agricultural commodities in the world</a> +<a class="sourceLine" id="cb383-67" data-line-number="67"></a> +<a class="sourceLine" id="cb383-68" data-line-number="68">Milk</a> +<a class="sourceLine" id="cb383-69" data-line-number="69"></a> +<a class="sourceLine" id="cb383-70" data-line-number="70">: white cold drink</a> +<a class="sourceLine" id="cb383-71" data-line-number="71"></a> +<a class="sourceLine" id="cb383-72" data-line-number="72">: nutrient-rich</a> +<a class="sourceLine" id="cb383-73" data-line-number="73"></a> +<a class="sourceLine" id="cb383-74" data-line-number="74">: produced on an industrial scale</a> +<a class="sourceLine" id="cb383-75" data-line-number="75"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb383-76" data-line-number="76"></a> +<a class="sourceLine" id="cb383-77" data-line-number="77"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb384"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb384-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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> @@ -5101,97 +5099,97 @@ 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> -<h4 data-number="2.3.1.13" id="emphasis-renderers"><span class="header-section-number">2.3.1.13</span> Emphasis Renderers</h4> +<h4 id="emphasis-renderers"><span class="header-section-number">2.3.1.13</span> Emphasis Renderers</h4> <p>The <code>\markdownRendererEmphasis</code> macro represents an emphasized span of text. The macro receives a single argument that corresponds to the emphasized span of text.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-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="cb385"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb385-1"><a href="#cb385-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb385-2"><a href="#cb385-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{{<span class="fu">\it</span>#1}}</span> -<span id="cb385-3"><a href="#cb385-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{{<span class="fu">\bf</span>#1}}</span> -<span id="cb385-4"><a href="#cb385-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb385-5"><a href="#cb385-5" aria-hidden="true"></a>This is *emphasis*.</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>This is **strong emphasis**.</span> -<span id="cb385-8"><a href="#cb385-8" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb385-9"><a href="#cb385-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="cb386"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb386-1"><a href="#cb386-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-26" class="unnumbered">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb385"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb385-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb385-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererEmphasis#1{{\it#1}}</a> +<a class="sourceLine" id="cb385-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererStrongEmphasis#1{{\bf#1}}</a> +<a class="sourceLine" id="cb385-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb385-5" data-line-number="5">This is *emphasis*.</a> +<a class="sourceLine" id="cb385-6" data-line-number="6"></a> +<a class="sourceLine" id="cb385-7" data-line-number="7">This is **strong emphasis**.</a> +<a class="sourceLine" id="cb385-8" data-line-number="8"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb385-9" data-line-number="9"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb386"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb386-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-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="cb387"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb387-1"><a href="#cb387-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb387-2"><a href="#cb387-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb387-3"><a href="#cb387-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb387-4"><a href="#cb387-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb387-5"><a href="#cb387-5" aria-hidden="true"></a> emphasis = {<span class="fu">\emph</span>{#1}},</span> -<span id="cb387-6"><a href="#cb387-6" aria-hidden="true"></a> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</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> -<span id="cb387-9"><a href="#cb387-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb387-10"><a href="#cb387-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb387-11"><a href="#cb387-11" aria-hidden="true"></a>This is *emphasis*.</span> -<span id="cb387-12"><a href="#cb387-12" aria-hidden="true"></a></span> -<span id="cb387-13"><a href="#cb387-13" aria-hidden="true"></a>This is **strong emphasis**.</span> -<span id="cb387-14"><a href="#cb387-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb387-15"><a href="#cb387-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="cb388"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb388-1"><a href="#cb388-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-44" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb387"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb387-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb387-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb387-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb387-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb387-5" data-line-number="5"> emphasis = {<span class="fu">\emph</span>{#1}},</a> +<a class="sourceLine" id="cb387-6" data-line-number="6"> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</a> +<a class="sourceLine" id="cb387-7" data-line-number="7"> },</a> +<a class="sourceLine" id="cb387-8" data-line-number="8">}</a> +<a class="sourceLine" id="cb387-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb387-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb387-11" data-line-number="11">This is *emphasis*.</a> +<a class="sourceLine" id="cb387-12" data-line-number="12"></a> +<a class="sourceLine" id="cb387-13" data-line-number="13">This is **strong emphasis**.</a> +<a class="sourceLine" id="cb387-14" data-line-number="14"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb387-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb388"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb388-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <em>emphasis</em>.</p> <p>This is <strong>strong emphasis</strong>.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-36">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<h5 id="context-example-36" class="unnumbered">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb389"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb389-1"><a href="#cb389-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb389-2"><a href="#cb389-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererEmphasis</span>#1{<span class="fu">\emph</span>{#1}}</span> -<span id="cb389-3"><a href="#cb389-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererStrongEmphasis</span>#1{<span class="fu">\bold</span>{#1}}</span> -<span id="cb389-4"><a href="#cb389-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb389-5"><a href="#cb389-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb389-6"><a href="#cb389-6" aria-hidden="true"></a>This is *emphasis*.</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>This is **strong emphasis**.</span> -<span id="cb389-9"><a href="#cb389-9" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb389-10"><a href="#cb389-10" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb389"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb389-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb389-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererEmphasis#1{\emph{#1}}</a> +<a class="sourceLine" id="cb389-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererStrongEmphasis#1{\bold{#1}}</a> +<a class="sourceLine" id="cb389-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb389-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb389-6" data-line-number="6">This is *emphasis*.</a> +<a class="sourceLine" id="cb389-7" data-line-number="7"></a> +<a class="sourceLine" id="cb389-8" data-line-number="8">This is **strong emphasis**.</a> +<a class="sourceLine" id="cb389-9" data-line-number="9"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb389-10" data-line-number="10"><span class="fu">\stoptext</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb390"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb390-1"><a href="#cb390-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb390"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb390-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is <em>emphasis</em>.</p> <p>This is <strong>strong emphasis</strong>.</p> </blockquote> <p>The <code>\markdownRendererStrongEmphasis</code> macro represents a strongly emphasized span of text. The macro receives a single argument that corresponds to the emphasized span of text.</p> -<h4 data-number="2.3.1.14" id="block-quote-renderers"><span class="header-section-number">2.3.1.14</span> Block Quote Renderers</h4> +<h4 id="block-quote-renderers"><span class="header-section-number">2.3.1.14</span> Block Quote Renderers</h4> <p>The <code>\markdownRendererBlockQuoteBegin</code> macro represents the beginning of a block quote. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-27">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> -<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb391"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb391-1"><a href="#cb391-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb391-2"><a href="#cb391-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="co">%</span></span> -<span id="cb391-3"><a href="#cb391-3" aria-hidden="true"></a> <span class="fu">\begingroup</span></span> -<span id="cb391-4"><a href="#cb391-4" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> -<span id="cb391-5"><a href="#cb391-5" aria-hidden="true"></a> <span class="fu">\leftskip</span>=2<span class="fu">\parindent</span></span> -<span id="cb391-6"><a href="#cb391-6" aria-hidden="true"></a> <span class="fu">\parindent</span>=0pt</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">\def\markdownRendererBlockQuoteEnd</span>{<span class="co">%</span></span> -<span id="cb391-9"><a href="#cb391-9" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb391-10"><a href="#cb391-10" aria-hidden="true"></a> <span class="fu">\vskip\parindent</span></span> -<span id="cb391-11"><a href="#cb391-11" aria-hidden="true"></a> <span class="fu">\endgroup</span></span> -<span id="cb391-12"><a href="#cb391-12" aria-hidden="true"></a>}</span> -<span id="cb391-13"><a href="#cb391-13" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb391-14"><a href="#cb391-14" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb391-15"><a href="#cb391-15" aria-hidden="true"></a></span> -<span id="cb391-16"><a href="#cb391-16" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb391-17"><a href="#cb391-17" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb391-18"><a href="#cb391-18" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb391-19"><a href="#cb391-19" aria-hidden="true"></a>> stars [...]</span> -<span id="cb391-20"><a href="#cb391-20" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb391-21"><a href="#cb391-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="cb392"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb392-1"><a href="#cb392-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-27" class="unnumbered">Plain <span class="tex">T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb391"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb391-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb391-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererBlockQuoteBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb391-3" data-line-number="3"> \begingroup</a> +<a class="sourceLine" id="cb391-4" data-line-number="4"> \vskip\parindent</a> +<a class="sourceLine" id="cb391-5" data-line-number="5"> \leftskip=2\parindent</a> +<a class="sourceLine" id="cb391-6" data-line-number="6"> \parindent=0pt</a> +<a class="sourceLine" id="cb391-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb391-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererBlockQuoteEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb391-9" data-line-number="9"> \par</a> +<a class="sourceLine" id="cb391-10" data-line-number="10"> \vskip\parindent</a> +<a class="sourceLine" id="cb391-11" data-line-number="11"> \endgroup</a> +<a class="sourceLine" id="cb391-12" data-line-number="12">}</a> +<a class="sourceLine" id="cb391-13" data-line-number="13"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb391-14" data-line-number="14">A quote from William Shakespeare's King Lear:</a> +<a class="sourceLine" id="cb391-15" data-line-number="15"></a> +<a class="sourceLine" id="cb391-16" data-line-number="16">> This is the excellent foppery of the world that when we are</a> +<a class="sourceLine" id="cb391-17" data-line-number="17">> sick in fortune---often the surfeit of our own behavior---we</a> +<a class="sourceLine" id="cb391-18" data-line-number="18">> make guilty of our disasters the sun, the moon, and the</a> +<a class="sourceLine" id="cb391-19" data-line-number="19">> stars [...]</a> +<a class="sourceLine" id="cb391-20" data-line-number="20"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb391-21" data-line-number="21"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb392"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb392-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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> @@ -5199,28 +5197,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-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="cb393"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb393-1"><a href="#cb393-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb393-2"><a href="#cb393-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb393-3"><a href="#cb393-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb393-4"><a href="#cb393-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb393-5"><a href="#cb393-5" aria-hidden="true"></a> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</span> -<span id="cb393-6"><a href="#cb393-6" aria-hidden="true"></a> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</span> -<span id="cb393-7"><a href="#cb393-7" aria-hidden="true"></a> },</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="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb393-10"><a href="#cb393-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb393-11"><a href="#cb393-11" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb393-12"><a href="#cb393-12" aria-hidden="true"></a></span> -<span id="cb393-13"><a href="#cb393-13" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb393-14"><a href="#cb393-14" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb393-15"><a href="#cb393-15" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb393-16"><a href="#cb393-16" aria-hidden="true"></a>> stars [...]</span> -<span id="cb393-17"><a href="#cb393-17" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb393-18"><a href="#cb393-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="cb394"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb394-1"><a href="#cb394-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-45" class="unnumbered"><span class="latex">L<sup>a</sup>T<sub>e</sub>X</span> Example</h5> +<p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> +<div class="sourceCode" id="cb393"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb393-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb393-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb393-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb393-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb393-5" data-line-number="5"> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</a> +<a class="sourceLine" id="cb393-6" data-line-number="6"> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</a> +<a class="sourceLine" id="cb393-7" data-line-number="7"> },</a> +<a class="sourceLine" id="cb393-8" data-line-number="8">}</a> +<a class="sourceLine" id="cb393-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb393-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb393-11" data-line-number="11">A quote from William Shakespeare's King Lear:</a> +<a class="sourceLine" id="cb393-12" data-line-number="12"></a> +<a class="sourceLine" id="cb393-13" data-line-number="13">> This is the excellent foppery of the world that when we are</a> +<a class="sourceLine" id="cb393-14" data-line-number="14">> sick in fortune---often the surfeit of our own behavior---we</a> +<a class="sourceLine" id="cb393-15" data-line-number="15">> make guilty of our disasters the sun, the moon, and the</a> +<a class="sourceLine" id="cb393-16" data-line-number="16">> stars [...]</a> +<a class="sourceLine" id="cb393-17" data-line-number="17"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb393-18" data-line-number="18"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb394"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb394-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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> @@ -5228,23 +5226,23 @@ 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="context-example-37">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> +<h5 id="context-example-37" class="unnumbered">Con<span class="tex">T<sub>e</sub>X</span>t Example</h5> <p>Using a text editor, create a text document named <code>document.tex</code> with the following content:</p> -<div class="sourceCode" id="cb395"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb395-1"><a href="#cb395-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb395-2"><a href="#cb395-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteBegin</span>{<span class="fu">\startquotation</span>}</span> -<span id="cb395-3"><a href="#cb395-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererBlockQuoteEnd</span>{<span class="fu">\stopquotation</span>}</span> -<span id="cb395-4"><a href="#cb395-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb395-5"><a href="#cb395-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb395-6"><a href="#cb395-6" aria-hidden="true"></a>A quote from William Shakespeare's King Lear:</span> -<span id="cb395-7"><a href="#cb395-7" aria-hidden="true"></a></span> -<span id="cb395-8"><a href="#cb395-8" aria-hidden="true"></a>> This is the excellent foppery of the world that when we are</span> -<span id="cb395-9"><a href="#cb395-9" aria-hidden="true"></a>> sick in fortune---often the surfeit of our own behavior---we</span> -<span id="cb395-10"><a href="#cb395-10" aria-hidden="true"></a>> make guilty of our disasters the sun, the moon, and the</span> -<span id="cb395-11"><a href="#cb395-11" aria-hidden="true"></a>> stars [...]</span> -<span id="cb395-12"><a href="#cb395-12" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb395-13"><a href="#cb395-13" aria-hidden="true"></a><span class="fu">\stoptext</span></span></code></pre></div> +<div class="sourceCode" id="cb395"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb395-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb395-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererBlockQuoteBegin{\startquotation}</a> +<a class="sourceLine" id="cb395-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererBlockQuoteEnd{\stopquotation}</a> +<a class="sourceLine" id="cb395-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb395-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb395-6" data-line-number="6">A quote from William Shakespeare's King Lear:</a> +<a class="sourceLine" id="cb395-7" data-line-number="7"></a> +<a class="sourceLine" id="cb395-8" data-line-number="8">> This is the excellent foppery of the world that when we are</a> +<a class="sourceLine" id="cb395-9" data-line-number="9">> sick in fortune---often the surfeit of our own behavior---we</a> +<a class="sourceLine" id="cb395-10" data-line-number="10">> make guilty of our disasters the sun, the moon, and the</a> +<a class="sourceLine" id="cb395-11" data-line-number="11">> stars [...]</a> +<a class="sourceLine" id="cb395-12" data-line-number="12"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb395-13" data-line-number="13"><span class="fu">\stoptext</span></a></code></pre></div> <p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb396"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb396-1"><a href="#cb396-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<div class="sourceCode" id="cb396"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb396-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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> @@ -5253,398 +5251,398 @@ Thomas,Edison,1847</code></pre> </blockquote> </blockquote> <p>The <code>\markdownRendererBlockQuoteEnd</code> macro represents the end of a block quote. The macro receives no arguments.</p> -<h4 data-number="2.3.1.15" id="code-block-renderers"><span class="header-section-number">2.3.1.15</span> Code Block Renderers</h4> +<h4 id="code-block-renderers"><span class="header-section-number">2.3.1.15</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-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="cb397"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb397-1"><a href="#cb397-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb397-2"><a href="#cb397-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</span> -<span id="cb397-3"><a href="#cb397-3" aria-hidden="true"></a><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</span> -<span id="cb397-4"><a href="#cb397-4" aria-hidden="true"></a><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</span> -<span id="cb397-5"><a href="#cb397-5" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb397-6"><a href="#cb397-6" aria-hidden="true"></a> renderers = {</span> -<span id="cb397-7"><a href="#cb397-7" aria-hidden="true"></a> interblockSeparator = {</span> -<span id="cb397-8"><a href="#cb397-8" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb397-9"><a href="#cb397-9" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb397-10"><a href="#cb397-10" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb397-11"><a href="#cb397-11" aria-hidden="true"></a> <span class="fu">\def\markdownRendererInterblockSeparator</span>{<span class="co">%</span></span> -<span id="cb397-12"><a href="#cb397-12" aria-hidden="true"></a> <span class="fu">\par</span></span> -<span id="cb397-13"><a href="#cb397-13" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb397-14"><a href="#cb397-14" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb397-15"><a href="#cb397-15" aria-hidden="true"></a> }<span class="co">%</span></span> -<span id="cb397-16"><a href="#cb397-16" aria-hidden="true"></a> },</span> -<span id="cb397-17"><a href="#cb397-17" aria-hidden="true"></a> inputVerbatim = {</span> -<span id="cb397-18"><a href="#cb397-18" aria-hidden="true"></a> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></span> -<span id="cb397-19"><a href="#cb397-19" aria-hidden="true"></a> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></span> -<span id="cb397-20"><a href="#cb397-20" aria-hidden="true"></a> },</span> -<span id="cb397-21"><a href="#cb397-21" aria-hidden="true"></a> inputFencedCode = {</span> -<span id="cb397-22"><a href="#cb397-22" aria-hidden="true"></a> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></span> -<span id="cb397-23"><a href="#cb397-23" aria-hidden="true"></a> },</span> -<span id="cb397-24"><a href="#cb397-24" aria-hidden="true"></a> },</span> -<span id="cb397-25"><a href="#cb397-25" aria-hidden="true"></a>}</span> -<span id="cb397-26"><a href="#cb397-26" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb397-27"><a href="#cb397-27" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb397-28"><a href="#cb397-28" aria-hidden="true"></a>The following code</span> -<span id="cb397-29"><a href="#cb397-29" aria-hidden="true"></a></span> -<span id="cb397-30"><a href="#cb397-30" aria-hidden="true"></a> def foo(bar):</span> -<span id="cb397-31"><a href="#cb397-31" aria-hidden="true"></a> if len(bar) <= 1:</span> -<span id="cb397-32"><a href="#cb397-32" aria-hidden="true"></a> return bar[0]</span> -<span id="cb397-33"><a href="#cb397-33" aria-hidden="true"></a> elif len(bar) == 2:</span> -<span id="cb397-34"><a href="#cb397-34" aria-hidden="true"></a> return sorted(bar)</span> -<span id="cb397-35"><a href="#cb397-35" aria-hidden="true"></a> else:</span> -<span id="cb397-36"><a href="#cb397-36" aria-hidden="true"></a> baz = len(bar) // 2</span> -<span id="cb397-37"><a href="#cb397-37" aria-hidden="true"></a> return foo(bar[baz:], bar[:baz])</span> -<span id="cb397-38"><a href="#cb397-38" aria-hidden="true"></a></span> -<span id="cb397-39"><a href="#cb397-39" aria-hidden="true"></a>The following code</span> -<span id="cb397-40"><a href="#cb397-40" aria-hidden="true"></a></span> -<span id="cb397-41"><a href="#cb397-41" aria-hidden="true"></a>~~~ Python</span> -<span id="cb397-42"><a href="#cb397-42" aria-hidden="true"></a>>>> foo([4, 2, 1, 3])</span> -<span id="cb397-43"><a href="#cb397-43" aria-hidden="true"></a>[1, 2, 3, 4]</span> -<span id="cb397-44"><a href="#cb397-44" aria-hidden="true"></a>~~~~~~~~~~</span> -<span id="cb397-45"><a href="#cb397-45" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb397-46"><a href="#cb397-46" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">document</span>}</span></code></pre></div> -<p>Next, invoke LuaTeX from the terminal:</p> -<div class="sourceCode" id="cb398"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb398-1"><a href="#cb398-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-46" class="unnumbered"><span class="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="cb397"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb397-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb397-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</a> +<a class="sourceLine" id="cb397-3" data-line-number="3"><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</a> +<a class="sourceLine" id="cb397-4" data-line-number="4"><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb397-5" data-line-number="5"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb397-6" data-line-number="6"> renderers = {</a> +<a class="sourceLine" id="cb397-7" data-line-number="7"> interblockSeparator = {</a> +<a class="sourceLine" id="cb397-8" data-line-number="8"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb397-9" data-line-number="9"> \par</a> +<a class="sourceLine" id="cb397-10" data-line-number="10"> \def\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb397-11" data-line-number="11"> \def\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb397-12" data-line-number="12"> \par</a> +<a class="sourceLine" id="cb397-13" data-line-number="13"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb397-14" data-line-number="14"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb397-15" data-line-number="15"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb397-16" data-line-number="16"> },</a> +<a class="sourceLine" id="cb397-17" data-line-number="17"> inputVerbatim = {</a> +<a class="sourceLine" id="cb397-18" data-line-number="18"> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></a> +<a class="sourceLine" id="cb397-19" data-line-number="19"> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></a> +<a class="sourceLine" id="cb397-20" data-line-number="20"> },</a> +<a class="sourceLine" id="cb397-21" data-line-number="21"> inputFencedCode = {</a> +<a class="sourceLine" id="cb397-22" data-line-number="22"> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></a> +<a class="sourceLine" id="cb397-23" data-line-number="23"> },</a> +<a class="sourceLine" id="cb397-24" data-line-number="24"> },</a> +<a class="sourceLine" id="cb397-25" data-line-number="25">}</a> +<a class="sourceLine" id="cb397-26" data-line-number="26"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb397-27" data-line-number="27"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb397-28" data-line-number="28">The following code</a> +<a class="sourceLine" id="cb397-29" data-line-number="29"></a> +<a class="sourceLine" id="cb397-30" data-line-number="30"> def foo(bar):</a> +<a class="sourceLine" id="cb397-31" data-line-number="31"> if len(bar) <= 1:</a> +<a class="sourceLine" id="cb397-32" data-line-number="32"> return bar[0]</a> +<a class="sourceLine" id="cb397-33" data-line-number="33"> elif len(bar) == 2:</a> +<a class="sourceLine" id="cb397-34" data-line-number="34"> return sorted(bar)</a> +<a class="sourceLine" id="cb397-35" data-line-number="35"> else:</a> +<a class="sourceLine" id="cb397-36" data-line-number="36"> baz = len(bar) // 2</a> +<a class="sourceLine" id="cb397-37" data-line-number="37"> return foo(bar[baz:], bar[:baz])</a> +<a class="sourceLine" id="cb397-38" data-line-number="38"></a> +<a class="sourceLine" id="cb397-39" data-line-number="39">The following code</a> +<a class="sourceLine" id="cb397-40" data-line-number="40"></a> +<a class="sourceLine" id="cb397-41" data-line-number="41">~~~ Python</a> +<a class="sourceLine" id="cb397-42" data-line-number="42">>>> foo([4, 2, 1, 3])</a> +<a class="sourceLine" id="cb397-43" data-line-number="43">[1, 2, 3, 4]</a> +<a class="sourceLine" id="cb397-44" data-line-number="44">~~~~~~~~~~</a> +<a class="sourceLine" id="cb397-45" data-line-number="45"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb397-46" data-line-number="46"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb398"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb398-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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="cb399"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb399-1"><a href="#cb399-1" aria-hidden="true"></a><span class="kw">def</span> foo(bar):</span> -<span id="cb399-2"><a href="#cb399-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="cb399-3"><a href="#cb399-3" aria-hidden="true"></a> <span class="cf">return</span> bar[:<span class="dv">1</span>]</span> -<span id="cb399-4"><a href="#cb399-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="cb399-5"><a href="#cb399-5" aria-hidden="true"></a> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</span> -<span id="cb399-6"><a href="#cb399-6" aria-hidden="true"></a> <span class="cf">else</span>:</span> -<span id="cb399-7"><a href="#cb399-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="cb399-8"><a href="#cb399-8" aria-hidden="true"></a> <span class="cf">return</span> (</span> -<span id="cb399-9"><a href="#cb399-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="cb399-10"><a href="#cb399-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="cb399-11"><a href="#cb399-11" aria-hidden="true"></a> )</span></code></pre></div> +<div class="sourceCode" id="cb399"><pre class="sourceCode py"><code class="sourceCode python"><a class="sourceLine" id="cb399-1" data-line-number="1"><span class="kw">def</span> foo(bar):</a> +<a class="sourceLine" id="cb399-2" data-line-number="2"> <span class="cf">if</span> <span class="bu">len</span>(bar) <span class="op"><=</span> <span class="dv">1</span>:</a> +<a class="sourceLine" id="cb399-3" data-line-number="3"> <span class="cf">return</span> bar[:<span class="dv">1</span>]</a> +<a class="sourceLine" id="cb399-4" data-line-number="4"> <span class="cf">elif</span> <span class="bu">len</span>(bar) <span class="op">==</span> <span class="dv">2</span>:</a> +<a class="sourceLine" id="cb399-5" data-line-number="5"> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</a> +<a class="sourceLine" id="cb399-6" data-line-number="6"> <span class="cf">else</span>:</a> +<a class="sourceLine" id="cb399-7" data-line-number="7"> baz <span class="op">=</span> bar[<span class="bu">len</span>(bar) <span class="op">//</span> <span class="dv">2</span>]</a> +<a class="sourceLine" id="cb399-8" data-line-number="8"> <span class="cf">return</span> (</a> +<a class="sourceLine" id="cb399-9" data-line-number="9"> 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></a> +<a class="sourceLine" id="cb399-10" data-line-number="10"> 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])</a> +<a class="sourceLine" id="cb399-11" data-line-number="11"> )</a></code></pre></div> <p>The following code in Python contained in file <code>./_markdown_document/cf2a96e2120cef5b1fae5fea36fcc27b.verbatim</code>:</p> -<div class="sourceCode" id="cb400"><pre class="sourceCode py"><code class="sourceCode python"><span id="cb400-1"><a href="#cb400-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="cb400-2"><a href="#cb400-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="cb400"><pre class="sourceCode py"><code class="sourceCode python"><a class="sourceLine" id="cb400-1" data-line-number="1"><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>])</a> +<a class="sourceLine" id="cb400-2" data-line-number="2">[<span class="dv">1</span>, <span class="dv">2</span>, <span class="dv">3</span>, <span class="dv">4</span>]</a></code></pre></div> </blockquote> -<h4 data-number="2.3.1.16" id="heading-renderers"><span class="header-section-number">2.3.1.16</span> Heading Renderers</h4> +<h4 id="heading-renderers"><span class="header-section-number">2.3.1.16</span> Heading Renderers</h4> <p>The <code>\markdownRendererHeadingOne</code> macro represents a first level heading. The macro receives a single argument that corresponds to the heading text.</p> <p>The <code>\markdownRendererHeadingTwo</code> macro represents a second level heading. The macro receives a single argument that corresponds to the heading text.</p> <p>The <code>\markdownRendererHeadingThree</code> macro represents a third level heading. The macro receives a single argument that corresponds to the heading text.</p> <p>The <code>\markdownRendererHeadingFour</code> macro represents a fourth level heading. The macro receives a single argument that corresponds to the heading text.</p> <p>The <code>\markdownRendererHeadingFive</code> macro represents a fifth level heading. The macro receives a single argument that corresponds to the heading text.</p> <p>The <code>\markdownRendererHeadingSix</code> macro represents a sixth level heading. The macro receives a single argument that corresponds to the heading text.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-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="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\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb401-3"><a href="#cb401-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> -<span id="cb401-4"><a href="#cb401-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> -<span id="cb401-5"><a href="#cb401-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> -<span id="cb401-6"><a href="#cb401-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> -<span id="cb401-7"><a href="#cb401-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> -<span id="cb401-8"><a href="#cb401-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> -<span id="cb401-9"><a href="#cb401-9" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb401-10"><a href="#cb401-10" aria-hidden="true"></a>######</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> -<span id="cb401-13"><a href="#cb401-13" aria-hidden="true"></a>###</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">\markdownEnd</span></span> -<span id="cb401-16"><a href="#cb401-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="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> +<h5 id="plain-tex-example-28" class="unnumbered">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"><a class="sourceLine" id="cb401-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb401-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb401-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererHeadingOne{1}</a> +<a class="sourceLine" id="cb401-4" data-line-number="4"><span class="fu">\def</span>\markdownRendererHeadingTwo{2}</a> +<a class="sourceLine" id="cb401-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererHeadingThree{3}</a> +<a class="sourceLine" id="cb401-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererHeadingFour{4}</a> +<a class="sourceLine" id="cb401-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererHeadingFive{5}</a> +<a class="sourceLine" id="cb401-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererHeadingSix{6}</a> +<a class="sourceLine" id="cb401-9" data-line-number="9"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb401-10" data-line-number="10">######</a> +<a class="sourceLine" id="cb401-11" data-line-number="11">#####</a> +<a class="sourceLine" id="cb401-12" data-line-number="12">#####</a> +<a class="sourceLine" id="cb401-13" data-line-number="13">###</a> +<a class="sourceLine" id="cb401-14" data-line-number="14">######</a> +<a class="sourceLine" id="cb401-15" data-line-number="15"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb401-16" data-line-number="16"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb402"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb402-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-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="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>{<span class="ex">markdown</span>}</span> -<span id="cb403-3"><a href="#cb403-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb403-4"><a href="#cb403-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb403-5"><a href="#cb403-5" aria-hidden="true"></a> interblockSeparator = {},</span> -<span id="cb403-6"><a href="#cb403-6" aria-hidden="true"></a> headingOne = 1,</span> -<span id="cb403-7"><a href="#cb403-7" aria-hidden="true"></a> headingTwo = 2,</span> -<span id="cb403-8"><a href="#cb403-8" aria-hidden="true"></a> headingThree = 3,</span> -<span id="cb403-9"><a href="#cb403-9" aria-hidden="true"></a> headingFour = 4,</span> -<span id="cb403-10"><a href="#cb403-10" aria-hidden="true"></a> headingFive = 5,</span> -<span id="cb403-11"><a href="#cb403-11" aria-hidden="true"></a> headingSix = 6,</span> -<span id="cb403-12"><a href="#cb403-12" aria-hidden="true"></a> },</span> -<span id="cb403-13"><a href="#cb403-13" aria-hidden="true"></a>}</span> -<span id="cb403-14"><a href="#cb403-14" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb403-15"><a href="#cb403-15" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb403-16"><a href="#cb403-16" aria-hidden="true"></a>######</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>###</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><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb403-22"><a href="#cb403-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="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> +<h5 id="latex-example-47" class="unnumbered"><span class="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"><a class="sourceLine" id="cb403-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb403-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb403-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb403-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb403-5" data-line-number="5"> interblockSeparator = {},</a> +<a class="sourceLine" id="cb403-6" data-line-number="6"> headingOne = 1,</a> +<a class="sourceLine" id="cb403-7" data-line-number="7"> headingTwo = 2,</a> +<a class="sourceLine" id="cb403-8" data-line-number="8"> headingThree = 3,</a> +<a class="sourceLine" id="cb403-9" data-line-number="9"> headingFour = 4,</a> +<a class="sourceLine" id="cb403-10" data-line-number="10"> headingFive = 5,</a> +<a class="sourceLine" id="cb403-11" data-line-number="11"> headingSix = 6,</a> +<a class="sourceLine" id="cb403-12" data-line-number="12"> },</a> +<a class="sourceLine" id="cb403-13" data-line-number="13">}</a> +<a class="sourceLine" id="cb403-14" data-line-number="14"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb403-15" data-line-number="15"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb403-16" data-line-number="16">######</a> +<a class="sourceLine" id="cb403-17" data-line-number="17">#####</a> +<a class="sourceLine" id="cb403-18" data-line-number="18">#####</a> +<a class="sourceLine" id="cb403-19" data-line-number="19">###</a> +<a class="sourceLine" id="cb403-20" data-line-number="20">######</a> +<a class="sourceLine" id="cb403-21" data-line-number="21"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb403-22" data-line-number="22"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb404"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb404-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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-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="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\markdownRendererInterblockSeparator</span>{}</span> -<span id="cb405-3"><a href="#cb405-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingOne</span>{1}</span> -<span id="cb405-4"><a href="#cb405-4" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingTwo</span>{2}</span> -<span id="cb405-5"><a href="#cb405-5" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingThree</span>{3}</span> -<span id="cb405-6"><a href="#cb405-6" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFour</span>{4}</span> -<span id="cb405-7"><a href="#cb405-7" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingFive</span>{5}</span> -<span id="cb405-8"><a href="#cb405-8" aria-hidden="true"></a><span class="fu">\def\markdownRendererHeadingSix</span>{6}</span> -<span id="cb405-9"><a href="#cb405-9" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb405-10"><a href="#cb405-10" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb405-11"><a href="#cb405-11" aria-hidden="true"></a>######</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> -<span id="cb405-14"><a href="#cb405-14" aria-hidden="true"></a>###</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">\stopmarkdown</span></span> -<span id="cb405-17"><a href="#cb405-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="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> +<h5 id="context-example-38" class="unnumbered">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"><a class="sourceLine" id="cb405-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb405-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb405-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererHeadingOne{1}</a> +<a class="sourceLine" id="cb405-4" data-line-number="4"><span class="fu">\def</span>\markdownRendererHeadingTwo{2}</a> +<a class="sourceLine" id="cb405-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererHeadingThree{3}</a> +<a class="sourceLine" id="cb405-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererHeadingFour{4}</a> +<a class="sourceLine" id="cb405-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererHeadingFive{5}</a> +<a class="sourceLine" id="cb405-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererHeadingSix{6}</a> +<a class="sourceLine" id="cb405-9" data-line-number="9"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb405-10" data-line-number="10"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb405-11" data-line-number="11">######</a> +<a class="sourceLine" id="cb405-12" data-line-number="12">#####</a> +<a class="sourceLine" id="cb405-13" data-line-number="13">#####</a> +<a class="sourceLine" id="cb405-14" data-line-number="14">###</a> +<a class="sourceLine" id="cb405-15" data-line-number="15">######</a> +<a class="sourceLine" id="cb405-16" data-line-number="16"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb405-17" data-line-number="17"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb406"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb406-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>65536</p> </blockquote> -<h4 data-number="2.3.1.17" id="horizontal-rule-renderer"><span class="header-section-number">2.3.1.17</span> Horizontal Rule Renderer</h4> +<h4 id="horizontal-rule-renderer"><span class="header-section-number">2.3.1.17</span> Horizontal Rule Renderer</h4> <p>The <code>\markdownRendererHorizontalRule</code> macro represents a horizontal rule. The macro receives no arguments.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-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="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\markdownRendererHorizontalRule</span>{<span class="fu">\vfil\break</span>}</span> -<span id="cb407-3"><a href="#cb407-3" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb407-4"><a href="#cb407-4" aria-hidden="true"></a>This is the first page.</span> -<span id="cb407-5"><a href="#cb407-5" aria-hidden="true"></a></span> -<span id="cb407-6"><a href="#cb407-6" aria-hidden="true"></a>***</span> -<span id="cb407-7"><a href="#cb407-7" aria-hidden="true"></a></span> -<span id="cb407-8"><a href="#cb407-8" aria-hidden="true"></a>This is the second page.</span> -<span id="cb407-9"><a href="#cb407-9" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb407-10"><a href="#cb407-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="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> +<h5 id="plain-tex-example-29" class="unnumbered">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"><a class="sourceLine" id="cb407-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb407-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererHorizontalRule{\vfil\break}</a> +<a class="sourceLine" id="cb407-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb407-4" data-line-number="4">This is the first page.</a> +<a class="sourceLine" id="cb407-5" data-line-number="5"></a> +<a class="sourceLine" id="cb407-6" data-line-number="6">***</a> +<a class="sourceLine" id="cb407-7" data-line-number="7"></a> +<a class="sourceLine" id="cb407-8" data-line-number="8">This is the second page.</a> +<a class="sourceLine" id="cb407-9" data-line-number="9"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb407-10" data-line-number="10"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb408"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb408-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-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="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>{<span class="ex">markdown</span>}</span> -<span id="cb409-3"><a href="#cb409-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb409-4"><a href="#cb409-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb409-5"><a href="#cb409-5" aria-hidden="true"></a> horizontalRule = <span class="fu">\newpage</span>,</span> -<span id="cb409-6"><a href="#cb409-6" aria-hidden="true"></a> },</span> -<span id="cb409-7"><a href="#cb409-7" aria-hidden="true"></a>}</span> -<span id="cb409-8"><a href="#cb409-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb409-9"><a href="#cb409-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb409-10"><a href="#cb409-10" aria-hidden="true"></a>This is the first page.</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> -<span id="cb409-13"><a href="#cb409-13" aria-hidden="true"></a></span> -<span id="cb409-14"><a href="#cb409-14" aria-hidden="true"></a>This is the second page.</span> -<span id="cb409-15"><a href="#cb409-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb409-16"><a href="#cb409-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="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> +<h5 id="latex-example-48" class="unnumbered"><span class="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"><a class="sourceLine" id="cb409-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb409-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb409-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb409-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb409-5" data-line-number="5"> horizontalRule = <span class="fu">\newpage</span>,</a> +<a class="sourceLine" id="cb409-6" data-line-number="6"> },</a> +<a class="sourceLine" id="cb409-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb409-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb409-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb409-10" data-line-number="10">This is the first page.</a> +<a class="sourceLine" id="cb409-11" data-line-number="11"></a> +<a class="sourceLine" id="cb409-12" data-line-number="12">***</a> +<a class="sourceLine" id="cb409-13" data-line-number="13"></a> +<a class="sourceLine" id="cb409-14" data-line-number="14">This is the second page.</a> +<a class="sourceLine" id="cb409-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb409-16" data-line-number="16"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb410"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb410-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is the first page.</p> <hr /> <p>This is the second page.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-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="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\markdownRendererHorizontalRule</span>{<span class="fu">\page</span>[yes]}</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 class="fu">\startmarkdown</span></span> -<span id="cb411-5"><a href="#cb411-5" aria-hidden="true"></a>This is the first page.</span> -<span id="cb411-6"><a href="#cb411-6" aria-hidden="true"></a></span> -<span id="cb411-7"><a href="#cb411-7" aria-hidden="true"></a>***</span> -<span id="cb411-8"><a href="#cb411-8" aria-hidden="true"></a></span> -<span id="cb411-9"><a href="#cb411-9" aria-hidden="true"></a>This is the second page.</span> -<span id="cb411-10"><a href="#cb411-10" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb411-11"><a href="#cb411-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="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> +<h5 id="context-example-39" class="unnumbered">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"><a class="sourceLine" id="cb411-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb411-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererHorizontalRule{\page[yes]}</a> +<a class="sourceLine" id="cb411-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb411-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb411-5" data-line-number="5">This is the first page.</a> +<a class="sourceLine" id="cb411-6" data-line-number="6"></a> +<a class="sourceLine" id="cb411-7" data-line-number="7">***</a> +<a class="sourceLine" id="cb411-8" data-line-number="8"></a> +<a class="sourceLine" id="cb411-9" data-line-number="9">This is the second page.</a> +<a class="sourceLine" id="cb411-10" data-line-number="10"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb411-11" data-line-number="11"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb412"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb412-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is the first page.</p> <hr /> <p>This is the second page.</p> </blockquote> -<h4 data-number="2.3.1.18" id="footnote-renderer"><span class="header-section-number">2.3.1.18</span> Footnote Renderer</h4> +<h4 id="footnote-renderer"><span class="header-section-number">2.3.1.18</span> Footnote Renderer</h4> <p>The <code>\markdownRendererFootnote</code> macro represents a footnote. This macro will only be produced, when the <strong><code>footnotes</code></strong> option is enabled. The macro receives a single argument that corresponds to the footnote text.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-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="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\markdownOptionFootnotes</span>{true}</span> -<span id="cb413-3"><a href="#cb413-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> -<span id="cb413-4"><a href="#cb413-4" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb413-5"><a href="#cb413-5" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb413-6"><a href="#cb413-6" aria-hidden="true"></a></span> -<span id="cb413-7"><a href="#cb413-7" aria-hidden="true"></a> [^1]: this is a footnote</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> [^2]: this is some other footnote</span> -<span id="cb413-10"><a href="#cb413-10" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb413-11"><a href="#cb413-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="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> +<h5 id="plain-tex-example-30" class="unnumbered">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"><a class="sourceLine" id="cb413-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb413-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFootnotes{true}</a> +<a class="sourceLine" id="cb413-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererFootnote#1{ (and \lowercase{#1})}</a> +<a class="sourceLine" id="cb413-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb413-5" data-line-number="5">This is some text[^1] and this is some other text[^2].</a> +<a class="sourceLine" id="cb413-6" data-line-number="6"></a> +<a class="sourceLine" id="cb413-7" data-line-number="7"> [^1]: this is a footnote</a> +<a class="sourceLine" id="cb413-8" data-line-number="8"></a> +<a class="sourceLine" id="cb413-9" data-line-number="9"> [^2]: this is some other footnote</a> +<a class="sourceLine" id="cb413-10" data-line-number="10"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb413-11" data-line-number="11"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb414"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb414-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-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="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>[footnotes]{<span class="ex">markdown</span>}</span> -<span id="cb415-3"><a href="#cb415-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb415-4"><a href="#cb415-4" aria-hidden="true"></a> renderers = {</span> -<span id="cb415-5"><a href="#cb415-5" aria-hidden="true"></a> footnote = { (and <span class="fu">\MakeLowercase</span>{#1})},</span> -<span id="cb415-6"><a href="#cb415-6" aria-hidden="true"></a> },</span> -<span id="cb415-7"><a href="#cb415-7" aria-hidden="true"></a>}</span> -<span id="cb415-8"><a href="#cb415-8" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb415-9"><a href="#cb415-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb415-10"><a href="#cb415-10" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb415-11"><a href="#cb415-11" aria-hidden="true"></a></span> -<span id="cb415-12"><a href="#cb415-12" aria-hidden="true"></a> [^1]: this is a footnote</span> -<span id="cb415-13"><a href="#cb415-13" aria-hidden="true"></a></span> -<span id="cb415-14"><a href="#cb415-14" aria-hidden="true"></a> [^2]: this is some other footnote</span> -<span id="cb415-15"><a href="#cb415-15" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb415-16"><a href="#cb415-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="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> +<h5 id="latex-example-49" class="unnumbered"><span class="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"><a class="sourceLine" id="cb415-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb415-2" data-line-number="2"><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb415-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb415-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb415-5" data-line-number="5"> footnote = { (and <span class="fu">\MakeLowercase</span>{#1})},</a> +<a class="sourceLine" id="cb415-6" data-line-number="6"> },</a> +<a class="sourceLine" id="cb415-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb415-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb415-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb415-10" data-line-number="10">This is some text[^1] and this is some other text[^2].</a> +<a class="sourceLine" id="cb415-11" data-line-number="11"></a> +<a class="sourceLine" id="cb415-12" data-line-number="12"> [^1]: this is a footnote</a> +<a class="sourceLine" id="cb415-13" data-line-number="13"></a> +<a class="sourceLine" id="cb415-14" data-line-number="14"> [^2]: this is some other footnote</a> +<a class="sourceLine" id="cb415-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb415-16" data-line-number="16"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb416"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb416-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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-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="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\markdownOptionFootnotes</span>{true}</span> -<span id="cb417-3"><a href="#cb417-3" aria-hidden="true"></a><span class="fu">\def\markdownRendererFootnote</span>#1{ (and <span class="fu">\lowercase</span>{#1})}</span> -<span id="cb417-4"><a href="#cb417-4" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb417-5"><a href="#cb417-5" aria-hidden="true"></a><span class="fu">\startmarkdown</span></span> -<span id="cb417-6"><a href="#cb417-6" aria-hidden="true"></a>This is some text[^1] and this is some other text[^2].</span> -<span id="cb417-7"><a href="#cb417-7" aria-hidden="true"></a></span> -<span id="cb417-8"><a href="#cb417-8" aria-hidden="true"></a> [^1]: this is a footnote</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> [^2]: this is some other footnote</span> -<span id="cb417-11"><a href="#cb417-11" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb417-12"><a href="#cb417-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="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> +<h5 id="context-example-40" class="unnumbered">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"><a class="sourceLine" id="cb417-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb417-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFootnotes{true}</a> +<a class="sourceLine" id="cb417-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererFootnote#1{ (and \lowercase{#1})}</a> +<a class="sourceLine" id="cb417-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb417-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb417-6" data-line-number="6">This is some text[^1] and this is some other text[^2].</a> +<a class="sourceLine" id="cb417-7" data-line-number="7"></a> +<a class="sourceLine" id="cb417-8" data-line-number="8"> [^1]: this is a footnote</a> +<a class="sourceLine" id="cb417-9" data-line-number="9"></a> +<a class="sourceLine" id="cb417-10" data-line-number="10"> [^2]: this is some other footnote</a> +<a class="sourceLine" id="cb417-11" data-line-number="11"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb417-12" data-line-number="12"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb418"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb418-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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.19" id="parenthesized-citations-renderer"><span class="header-section-number">2.3.1.19</span> Parenthesized Citations Renderer</h4> +<h4 id="parenthesized-citations-renderer"><span class="header-section-number">2.3.1.19</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-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="cb419"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb419-1"><a href="#cb419-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb419-2"><a href="#cb419-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb419-3"><a href="#cb419-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> -<span id="cb419-4"><a href="#cb419-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> -<span id="cb419-5"><a href="#cb419-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb419-6"><a href="#cb419-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb419-7"><a href="#cb419-7" aria-hidden="true"></a> a parenthesized citation <span class="fu">\emph</span>{#4}</span> -<span id="cb419-8"><a href="#cb419-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb419-9"><a href="#cb419-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> -<span id="cb419-10"><a href="#cb419-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb419-11"><a href="#cb419-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb419-12"><a href="#cb419-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb419-13"><a href="#cb419-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb419-14"><a href="#cb419-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> -<span id="cb419-15"><a href="#cb419-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb419-16"><a href="#cb419-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="cb419-17"><a href="#cb419-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb419-18"><a href="#cb419-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb419-19"><a href="#cb419-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</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="fu">\expandafter\@gobble</span></span> -<span id="cb419-22"><a href="#cb419-22" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb419-23"><a href="#cb419-23" aria-hidden="true"></a> , and</span> -<span id="cb419-24"><a href="#cb419-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> -<span id="cb419-25"><a href="#cb419-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb419-26"><a href="#cb419-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb419-27"><a href="#cb419-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb419-28"><a href="#cb419-28" aria-hidden="true"></a> cite = {<span class="co">%</span></span> -<span id="cb419-29"><a href="#cb419-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> -<span id="cb419-30"><a href="#cb419-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> -<span id="cb419-31"><a href="#cb419-31" aria-hidden="true"></a> This is</span> -<span id="cb419-32"><a href="#cb419-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> -<span id="cb419-33"><a href="#cb419-33" aria-hidden="true"></a> },</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>}</span> -<span id="cb419-36"><a href="#cb419-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb419-37"><a href="#cb419-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb419-38"><a href="#cb419-38" aria-hidden="true"></a>[see @abrahams90, pp. 12; @eijkhout91, pp. 34]</span> -<span id="cb419-39"><a href="#cb419-39" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb419-40"><a href="#cb419-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="cb420"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb420-1"><a href="#cb420-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-50" class="unnumbered"><span class="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="cb419"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb419-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb419-2" data-line-number="2"><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb419-3" data-line-number="3"><span class="fu">\newcount\citationsCounter</span></a> +<a class="sourceLine" id="cb419-4" data-line-number="4"><span class="fu">\newcount\citationsTotal</span></a> +<a class="sourceLine" id="cb419-5" data-line-number="5"><span class="fu">\makeatletter</span></a> +<a class="sourceLine" id="cb419-6" data-line-number="6"><span class="fu">\def</span>\citations#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb419-7" data-line-number="7"> a parenthesized citation \emph{#4}</a> +<a class="sourceLine" id="cb419-8" data-line-number="8"> \advance\citationsCounter by 1\relax</a> +<a class="sourceLine" id="cb419-9" data-line-number="9"> \ifx\relax#2\relax</a> +<a class="sourceLine" id="cb419-10" data-line-number="10"> \ifx\relax#3\relax\else</a> +<a class="sourceLine" id="cb419-11" data-line-number="11"> with a postfix \emph{#3}<span class="co">%</span></a> +<a class="sourceLine" id="cb419-12" data-line-number="12"> \fi</a> +<a class="sourceLine" id="cb419-13" data-line-number="13"> \else</a> +<a class="sourceLine" id="cb419-14" data-line-number="14"> with a prefix \emph{#2}<span class="co">%</span></a> +<a class="sourceLine" id="cb419-15" data-line-number="15"> \ifx\relax#3\relax\else</a> +<a class="sourceLine" id="cb419-16" data-line-number="16"> \ and a postfix \emph{#3}<span class="co">%</span></a> +<a class="sourceLine" id="cb419-17" data-line-number="17"> \fi</a> +<a class="sourceLine" id="cb419-18" data-line-number="18"> \fi</a> +<a class="sourceLine" id="cb419-19" data-line-number="19"> \ifnum\citationsCounter>\citationsTotal\relax</a> +<a class="sourceLine" id="cb419-20" data-line-number="20"> .<span class="co">%</span></a> +<a class="sourceLine" id="cb419-21" data-line-number="21"> \expandafter\@gobble</a> +<a class="sourceLine" id="cb419-22" data-line-number="22"> \else</a> +<a class="sourceLine" id="cb419-23" data-line-number="23"> , and</a> +<a class="sourceLine" id="cb419-24" data-line-number="24"> \fi\citations}</a> +<a class="sourceLine" id="cb419-25" data-line-number="25"><span class="fu">\makeatother</span></a> +<a class="sourceLine" id="cb419-26" data-line-number="26"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb419-27" data-line-number="27"> renderers = {</a> +<a class="sourceLine" id="cb419-28" data-line-number="28"> cite = {<span class="co">%</span></a> +<a class="sourceLine" id="cb419-29" data-line-number="29"> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></a> +<a class="sourceLine" id="cb419-30" data-line-number="30"> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></a> +<a class="sourceLine" id="cb419-31" data-line-number="31"> This is</a> +<a class="sourceLine" id="cb419-32" data-line-number="32"> <span class="fu">\expandafter\citations</span></a> +<a class="sourceLine" id="cb419-33" data-line-number="33"> },</a> +<a class="sourceLine" id="cb419-34" data-line-number="34"> },</a> +<a class="sourceLine" id="cb419-35" data-line-number="35">}</a> +<a class="sourceLine" id="cb419-36" data-line-number="36"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb419-37" data-line-number="37"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb419-38" data-line-number="38">[see @abrahams90, pp. 12; @eijkhout91, pp. 34]</a> +<a class="sourceLine" id="cb419-39" data-line-number="39"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb419-40" data-line-number="40"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb420"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb420-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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.20" id="text-citations-renderer"><span class="header-section-number">2.3.1.20</span> Text Citations Renderer</h4> +<h4 id="text-citations-renderer"><span class="header-section-number">2.3.1.20</span> Text Citations Renderer</h4> <p>The <code>\markdownRendererTextCite</code> macro represents a string of one or more text citations. This macro will only be produced, when the <strong><code>citations</code></strong> option is enabled. The macro receives parameters in the same format as the <code>\markdownRendererCite</code> macro.</p> -<h5 class="unnumbered" data-number="" id="latex-example-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>[citations]{<span class="ex">markdown</span>}</span> -<span id="cb421-3"><a href="#cb421-3" aria-hidden="true"></a><span class="fu">\newcount\citationsCounter</span></span> -<span id="cb421-4"><a href="#cb421-4" aria-hidden="true"></a><span class="fu">\newcount\citationsTotal</span></span> -<span id="cb421-5"><a href="#cb421-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb421-6"><a href="#cb421-6" aria-hidden="true"></a><span class="fu">\def\citations</span>#1#2#3#4{<span class="co">%</span></span> -<span id="cb421-7"><a href="#cb421-7" aria-hidden="true"></a> a text citation <span class="fu">\emph</span>{#4}</span> -<span id="cb421-8"><a href="#cb421-8" aria-hidden="true"></a> <span class="fu">\advance\citationsCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb421-9"><a href="#cb421-9" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#2<span class="fu">\relax</span></span> -<span id="cb421-10"><a href="#cb421-10" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb421-11"><a href="#cb421-11" aria-hidden="true"></a> with a postfix <span class="fu">\emph</span>{#3}<span class="co">%</span></span> -<span id="cb421-12"><a href="#cb421-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb421-13"><a href="#cb421-13" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb421-14"><a href="#cb421-14" aria-hidden="true"></a> with a prefix <span class="fu">\emph</span>{#2}<span class="co">%</span></span> -<span id="cb421-15"><a href="#cb421-15" aria-hidden="true"></a> <span class="fu">\ifx\relax</span>#3<span class="fu">\relax\else</span></span> -<span id="cb421-16"><a href="#cb421-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="cb421-17"><a href="#cb421-17" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb421-18"><a href="#cb421-18" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb421-19"><a href="#cb421-19" aria-hidden="true"></a> <span class="fu">\ifnum\citationsCounter</span>><span class="fu">\citationsTotal\relax</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="fu">\expandafter\@gobble</span></span> -<span id="cb421-22"><a href="#cb421-22" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb421-23"><a href="#cb421-23" aria-hidden="true"></a> , and</span> -<span id="cb421-24"><a href="#cb421-24" aria-hidden="true"></a> <span class="fu">\fi\citations</span>}</span> -<span id="cb421-25"><a href="#cb421-25" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb421-26"><a href="#cb421-26" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb421-27"><a href="#cb421-27" aria-hidden="true"></a> renderers = {</span> -<span id="cb421-28"><a href="#cb421-28" aria-hidden="true"></a> textCite = {<span class="co">%</span></span> -<span id="cb421-29"><a href="#cb421-29" aria-hidden="true"></a> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></span> -<span id="cb421-30"><a href="#cb421-30" aria-hidden="true"></a> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></span> -<span id="cb421-31"><a href="#cb421-31" aria-hidden="true"></a> This is</span> -<span id="cb421-32"><a href="#cb421-32" aria-hidden="true"></a> <span class="fu">\expandafter\citations</span></span> -<span id="cb421-33"><a href="#cb421-33" aria-hidden="true"></a> },</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>}</span> -<span id="cb421-36"><a href="#cb421-36" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb421-37"><a href="#cb421-37" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb421-38"><a href="#cb421-38" aria-hidden="true"></a>@abrahams90 [pp. 12; also @eijkhout91]</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 class="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> +<h5 id="latex-example-51" class="unnumbered"><span class="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"><a class="sourceLine" id="cb421-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb421-2" data-line-number="2"><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb421-3" data-line-number="3"><span class="fu">\newcount\citationsCounter</span></a> +<a class="sourceLine" id="cb421-4" data-line-number="4"><span class="fu">\newcount\citationsTotal</span></a> +<a class="sourceLine" id="cb421-5" data-line-number="5"><span class="fu">\makeatletter</span></a> +<a class="sourceLine" id="cb421-6" data-line-number="6"><span class="fu">\def</span>\citations#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb421-7" data-line-number="7"> a text citation \emph{#4}</a> +<a class="sourceLine" id="cb421-8" data-line-number="8"> \advance\citationsCounter by 1\relax</a> +<a class="sourceLine" id="cb421-9" data-line-number="9"> \ifx\relax#2\relax</a> +<a class="sourceLine" id="cb421-10" data-line-number="10"> \ifx\relax#3\relax\else</a> +<a class="sourceLine" id="cb421-11" data-line-number="11"> with a postfix \emph{#3}<span class="co">%</span></a> +<a class="sourceLine" id="cb421-12" data-line-number="12"> \fi</a> +<a class="sourceLine" id="cb421-13" data-line-number="13"> \else</a> +<a class="sourceLine" id="cb421-14" data-line-number="14"> with a prefix \emph{#2}<span class="co">%</span></a> +<a class="sourceLine" id="cb421-15" data-line-number="15"> \ifx\relax#3\relax\else</a> +<a class="sourceLine" id="cb421-16" data-line-number="16"> \ and a postfix \emph{#3}<span class="co">%</span></a> +<a class="sourceLine" id="cb421-17" data-line-number="17"> \fi</a> +<a class="sourceLine" id="cb421-18" data-line-number="18"> \fi</a> +<a class="sourceLine" id="cb421-19" data-line-number="19"> \ifnum\citationsCounter>\citationsTotal\relax</a> +<a class="sourceLine" id="cb421-20" data-line-number="20"> .<span class="co">%</span></a> +<a class="sourceLine" id="cb421-21" data-line-number="21"> \expandafter\@gobble</a> +<a class="sourceLine" id="cb421-22" data-line-number="22"> \else</a> +<a class="sourceLine" id="cb421-23" data-line-number="23"> , and</a> +<a class="sourceLine" id="cb421-24" data-line-number="24"> \fi\citations}</a> +<a class="sourceLine" id="cb421-25" data-line-number="25"><span class="fu">\makeatother</span></a> +<a class="sourceLine" id="cb421-26" data-line-number="26"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb421-27" data-line-number="27"> renderers = {</a> +<a class="sourceLine" id="cb421-28" data-line-number="28"> textCite = {<span class="co">%</span></a> +<a class="sourceLine" id="cb421-29" data-line-number="29"> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></a> +<a class="sourceLine" id="cb421-30" data-line-number="30"> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></a> +<a class="sourceLine" id="cb421-31" data-line-number="31"> This is</a> +<a class="sourceLine" id="cb421-32" data-line-number="32"> <span class="fu">\expandafter\citations</span></a> +<a class="sourceLine" id="cb421-33" data-line-number="33"> },</a> +<a class="sourceLine" id="cb421-34" data-line-number="34"> },</a> +<a class="sourceLine" id="cb421-35" data-line-number="35">}</a> +<a class="sourceLine" id="cb421-36" data-line-number="36"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb421-37" data-line-number="37"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb421-38" data-line-number="38">@abrahams90 [pp. 12; also @eijkhout91]</a> +<a class="sourceLine" id="cb421-39" data-line-number="39"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb421-40" data-line-number="40"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb422"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb422-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a text citation <em>abrahams90</em> with a postfix <em>pp. 12</em>, and a citation <em>eijkhout91</em> with a prefix <em>also</em>.</p> </blockquote> -<h4 data-number="2.3.1.21" id="table-renderer"><span class="header-section-number">2.3.1.21</span> Table Renderer</h4> +<h4 id="table-renderer"><span class="header-section-number">2.3.1.21</span> Table Renderer</h4> <p>The <code>\markdownRendererTable</code> macro represents a table. This macro will only be produced, when the <strong><code>pipeTables</code></strong> option is enabled. The macro receives the parameters <code>{</code>⟨<em>caption</em>⟩<code>}{</code>⟨<em>number of rows</em>⟩<code>}{</code>⟨<em>number of columns</em>⟩<code>}</code> followed by <code>{</code>⟨<em>alignments</em>⟩<code>}</code> and then by <code>{</code>⟨<em>row</em>⟩<code>}</code> repeated ⟨<em>number of rows</em>⟩ times, where ⟨<em>row</em>⟩ is <code>{</code>⟨<em>column</em>⟩<code>}</code> repeated ⟨<em>number of columns</em>⟩ times, ⟨<em>alignments</em>⟩ is ⟨<em>alignment</em>⟩ repeated ⟨<em>number of columns</em>⟩ times, and ⟨<em>alignment</em>⟩ is one of the following:</p> <ul> <li><code>d</code> – The corresponding column has an unspecified (default) alignment.</li> @@ -5652,93 +5650,93 @@ Thomas,Edison,1847</code></pre> <li><code>c</code> – The corresponding column is centered.</li> <li><code>r</code> – The corresponding column is right-aligned.</li> </ul> -<h5 class="unnumbered" data-number="" id="latex-example-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="cb423"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb423-1"><a href="#cb423-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb423-2"><a href="#cb423-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</span> -<span id="cb423-3"><a href="#cb423-3" aria-hidden="true"></a><span class="fu">\newcount\rowCounter</span></span> -<span id="cb423-4"><a href="#cb423-4" aria-hidden="true"></a><span class="fu">\newcount\columnCounter</span></span> -<span id="cb423-5"><a href="#cb423-5" aria-hidden="true"></a><span class="fu">\makeatletter</span></span> -<span id="cb423-6"><a href="#cb423-6" aria-hidden="true"></a><span class="fu">\def\processRow</span>#1{<span class="co">%</span></span> -<span id="cb423-7"><a href="#cb423-7" aria-hidden="true"></a> <span class="fu">\columnCounter</span>=1<span class="co">%</span></span> -<span id="cb423-8"><a href="#cb423-8" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> -<span id="cb423-9"><a href="#cb423-9" aria-hidden="true"></a> As for the alignment,</span> -<span id="cb423-10"><a href="#cb423-10" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb423-11"><a href="#cb423-11" aria-hidden="true"></a> In row <span class="fu">\the\rowCounter</span>,</span> -<span id="cb423-12"><a href="#cb423-12" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb423-13"><a href="#cb423-13" aria-hidden="true"></a> <span class="fu">\processColumn</span>#1</span> -<span id="cb423-14"><a href="#cb423-14" aria-hidden="true"></a> <span class="fu">\advance\rowCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb423-15"><a href="#cb423-15" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>><span class="fu">\rowTotal\relax</span></span> -<span id="cb423-16"><a href="#cb423-16" aria-hidden="true"></a> <span class="fu">\expandafter\@gobble</span></span> -<span id="cb423-17"><a href="#cb423-17" aria-hidden="true"></a> <span class="fu">\fi\processRow</span>}<span class="co">%</span></span> -<span id="cb423-18"><a href="#cb423-18" aria-hidden="true"></a><span class="fu">\def\processColumn</span>#1{<span class="co">%</span></span> -<span id="cb423-19"><a href="#cb423-19" aria-hidden="true"></a> column number <span class="fu">\the\columnCounter</span>{}</span> -<span id="cb423-20"><a href="#cb423-20" aria-hidden="true"></a> <span class="fu">\ifnum\rowCounter</span>=0<span class="fu">\relax</span></span> -<span id="cb423-21"><a href="#cb423-21" aria-hidden="true"></a> <span class="fu">\if</span>#1d{}has default alignment<span class="fu">\fi</span></span> -<span id="cb423-22"><a href="#cb423-22" aria-hidden="true"></a> <span class="fu">\if</span>#1l{}is left-aligned<span class="fu">\fi</span></span> -<span id="cb423-23"><a href="#cb423-23" aria-hidden="true"></a> <span class="fu">\if</span>#1c{}is centered<span class="fu">\fi</span></span> -<span id="cb423-24"><a href="#cb423-24" aria-hidden="true"></a> <span class="fu">\if</span>#1r{}is right-aligned<span class="fu">\fi</span></span> -<span id="cb423-25"><a href="#cb423-25" aria-hidden="true"></a> <span class="fu">\else</span></span> -<span id="cb423-26"><a href="#cb423-26" aria-hidden="true"></a> says <span class="fu">\emph</span>{#1}<span class="co">%</span></span> -<span id="cb423-27"><a href="#cb423-27" aria-hidden="true"></a> <span class="fu">\fi</span></span> -<span id="cb423-28"><a href="#cb423-28" aria-hidden="true"></a> <span class="fu">\advance\columnCounter</span> by 1<span class="fu">\relax</span></span> -<span id="cb423-29"><a href="#cb423-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="cb423-30"><a href="#cb423-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="cb423-31"><a href="#cb423-31" aria-hidden="true"></a> <span class="fu">\ifnum\columnCounter</span>><span class="fu">\columnTotal\relax</span></span> -<span id="cb423-32"><a href="#cb423-32" aria-hidden="true"></a> .<span class="fu">\expandafter\@gobble</span></span> -<span id="cb423-33"><a href="#cb423-33" aria-hidden="true"></a> <span class="fu">\fi\processColumn</span>}<span class="co">%</span></span> -<span id="cb423-34"><a href="#cb423-34" aria-hidden="true"></a><span class="fu">\makeatother</span></span> -<span id="cb423-35"><a href="#cb423-35" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb423-36"><a href="#cb423-36" aria-hidden="true"></a> renderers = {</span> -<span id="cb423-37"><a href="#cb423-37" aria-hidden="true"></a> table = {<span class="co">%</span></span> -<span id="cb423-38"><a href="#cb423-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="cb423-39"><a href="#cb423-39" aria-hidden="true"></a> and #2 rows long.</span> -<span id="cb423-40"><a href="#cb423-40" aria-hidden="true"></a> <span class="fu">\rowCounter</span>=0<span class="co">%</span></span> -<span id="cb423-41"><a href="#cb423-41" aria-hidden="true"></a> <span class="fu">\def\rowTotal</span>{#2}<span class="co">%</span></span> -<span id="cb423-42"><a href="#cb423-42" aria-hidden="true"></a> <span class="fu">\def\columnTotal</span>{#3}<span class="co">%</span></span> -<span id="cb423-43"><a href="#cb423-43" aria-hidden="true"></a> <span class="fu">\processRow</span></span> -<span id="cb423-44"><a href="#cb423-44" aria-hidden="true"></a> },</span> -<span id="cb423-45"><a href="#cb423-45" aria-hidden="true"></a> },</span> -<span id="cb423-46"><a href="#cb423-46" aria-hidden="true"></a>}</span> -<span id="cb423-47"><a href="#cb423-47" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb423-48"><a href="#cb423-48" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb423-49"><a href="#cb423-49" aria-hidden="true"></a>| Right | Left | Default | Center |</span> -<span id="cb423-50"><a href="#cb423-50" aria-hidden="true"></a>|------:|:-----|---------|:------:|</span> -<span id="cb423-51"><a href="#cb423-51" aria-hidden="true"></a>| 12 | 12 | 12 | 12 |</span> -<span id="cb423-52"><a href="#cb423-52" aria-hidden="true"></a>| 123 | 123 | 123 | 123 |</span> -<span id="cb423-53"><a href="#cb423-53" aria-hidden="true"></a>| 1 | 1 | 1 | 1 |</span> -<span id="cb423-54"><a href="#cb423-54" aria-hidden="true"></a></span> -<span id="cb423-55"><a href="#cb423-55" aria-hidden="true"></a> : Demonstration of pipe table syntax</span> -<span id="cb423-56"><a href="#cb423-56" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb423-57"><a href="#cb423-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="cb424"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb424-1"><a href="#cb424-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-52" class="unnumbered"><span class="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="cb423"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb423-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb423-2" data-line-number="2"><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb423-3" data-line-number="3"><span class="fu">\newcount\rowCounter</span></a> +<a class="sourceLine" id="cb423-4" data-line-number="4"><span class="fu">\newcount\columnCounter</span></a> +<a class="sourceLine" id="cb423-5" data-line-number="5"><span class="fu">\makeatletter</span></a> +<a class="sourceLine" id="cb423-6" data-line-number="6"><span class="fu">\def</span>\processRow#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb423-7" data-line-number="7"> \columnCounter=1<span class="co">%</span></a> +<a class="sourceLine" id="cb423-8" data-line-number="8"> \ifnum\rowCounter=0\relax</a> +<a class="sourceLine" id="cb423-9" data-line-number="9"> As for the alignment,</a> +<a class="sourceLine" id="cb423-10" data-line-number="10"> \else</a> +<a class="sourceLine" id="cb423-11" data-line-number="11"> In row \the\rowCounter,</a> +<a class="sourceLine" id="cb423-12" data-line-number="12"> \fi</a> +<a class="sourceLine" id="cb423-13" data-line-number="13"> \processColumn#1</a> +<a class="sourceLine" id="cb423-14" data-line-number="14"> \advance\rowCounter by 1\relax</a> +<a class="sourceLine" id="cb423-15" data-line-number="15"> \ifnum\rowCounter>\rowTotal\relax</a> +<a class="sourceLine" id="cb423-16" data-line-number="16"> \expandafter\@gobble</a> +<a class="sourceLine" id="cb423-17" data-line-number="17"> \fi\processRow}<span class="co">%</span></a> +<a class="sourceLine" id="cb423-18" data-line-number="18"><span class="fu">\def</span>\processColumn#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb423-19" data-line-number="19"> column number \the\columnCounter{}</a> +<a class="sourceLine" id="cb423-20" data-line-number="20"> \ifnum\rowCounter=0\relax</a> +<a class="sourceLine" id="cb423-21" data-line-number="21"> \if#1d{}has default alignment\fi</a> +<a class="sourceLine" id="cb423-22" data-line-number="22"> \if#1l{}is left-aligned\fi</a> +<a class="sourceLine" id="cb423-23" data-line-number="23"> \if#1c{}is centered\fi</a> +<a class="sourceLine" id="cb423-24" data-line-number="24"> \if#1r{}is right-aligned\fi</a> +<a class="sourceLine" id="cb423-25" data-line-number="25"> \else</a> +<a class="sourceLine" id="cb423-26" data-line-number="26"> says \emph{#1}<span class="co">%</span></a> +<a class="sourceLine" id="cb423-27" data-line-number="27"> \fi</a> +<a class="sourceLine" id="cb423-28" data-line-number="28"> \advance\columnCounter by 1\relax</a> +<a class="sourceLine" id="cb423-29" data-line-number="29"> \ifnum\columnCounter<\columnTotal\relax, \fi</a> +<a class="sourceLine" id="cb423-30" data-line-number="30"> \ifnum\columnCounter=\columnTotal\relax, and \fi</a> +<a class="sourceLine" id="cb423-31" data-line-number="31"> \ifnum\columnCounter>\columnTotal\relax</a> +<a class="sourceLine" id="cb423-32" data-line-number="32"> .\expandafter\@gobble</a> +<a class="sourceLine" id="cb423-33" data-line-number="33"> \fi\processColumn}<span class="co">%</span></a> +<a class="sourceLine" id="cb423-34" data-line-number="34"><span class="fu">\makeatother</span></a> +<a class="sourceLine" id="cb423-35" data-line-number="35"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb423-36" data-line-number="36"> renderers = {</a> +<a class="sourceLine" id="cb423-37" data-line-number="37"> table = {<span class="co">%</span></a> +<a class="sourceLine" id="cb423-38" data-line-number="38"> This is a table with caption <span class="fu">\emph</span>{#1} that is #3 colums wide</a> +<a class="sourceLine" id="cb423-39" data-line-number="39"> and #2 rows long.</a> +<a class="sourceLine" id="cb423-40" data-line-number="40"> <span class="fu">\rowCounter</span>=0<span class="co">%</span></a> +<a class="sourceLine" id="cb423-41" data-line-number="41"> <span class="fu">\def</span>\rowTotal{#2}<span class="co">%</span></a> +<a class="sourceLine" id="cb423-42" data-line-number="42"> <span class="fu">\def</span>\columnTotal{#3}<span class="co">%</span></a> +<a class="sourceLine" id="cb423-43" data-line-number="43"> <span class="fu">\processRow</span></a> +<a class="sourceLine" id="cb423-44" data-line-number="44"> },</a> +<a class="sourceLine" id="cb423-45" data-line-number="45"> },</a> +<a class="sourceLine" id="cb423-46" data-line-number="46">}</a> +<a class="sourceLine" id="cb423-47" data-line-number="47"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb423-48" data-line-number="48"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb423-49" data-line-number="49">| Right | Left | Default | Center |</a> +<a class="sourceLine" id="cb423-50" data-line-number="50">|------:|:-----|---------|:------:|</a> +<a class="sourceLine" id="cb423-51" data-line-number="51">| 12 | 12 | 12 | 12 |</a> +<a class="sourceLine" id="cb423-52" data-line-number="52">| 123 | 123 | 123 | 123 |</a> +<a class="sourceLine" id="cb423-53" data-line-number="53">| 1 | 1 | 1 | 1 |</a> +<a class="sourceLine" id="cb423-54" data-line-number="54"></a> +<a class="sourceLine" id="cb423-55" data-line-number="55"> : Demonstration of pipe table syntax</a> +<a class="sourceLine" id="cb423-56" data-line-number="56"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb423-57" data-line-number="57"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb424"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb424-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>This is a table with caption <em>Demonstration of pipe table syntax</em> that is 4 colums wide and 4 rows long. As for the alignment, column number 1 is right-aligned, column number 2 is left-aligned, column number 3 has default alignment, and column number 4 is centered. In row 1, column number 1 says <em>Right</em>, column number 2 says <em>Left</em>, column number 3 says <em>Default</em>, and column number 4 says <em>Center</em>. In row 2, column number 1 says <em>12</em>, column number 2 says <em>12</em>, column number 3 says <em>12</em>, and column number 4 says <em>12</em>. In row 3, column number 1 says <em>123</em>, column number 2 says <em>123</em>, column number 3 says <em>123</em>, and column number 4 says <em>123</em>. In row 4, column number 1 says <em>1</em>, column number 2 says <em>1</em>, column number 3 says <em>1</em>, and column number 4 says <em>1</em>.</p> </blockquote> -<h4 data-number="2.3.1.22" id="inline-html-comment-renderer"><span class="header-section-number">2.3.1.22</span> Inline HTML Comment Renderer</h4> +<h4 id="inline-html-comment-renderer"><span class="header-section-number">2.3.1.22</span> Inline HTML Comment Renderer</h4> <p>The <code>\markdownRendererInlineHtmlComment</code> macro represents the contents of an inline <abbr>HTML</abbr> comment. This macro will only be produced, when the <strong><code>html</code></strong> option is enabled. The macro receives a single argument that corresponds to the contents of the <abbr>HTML</abbr> comment.</p> -<h5 class="unnumbered" data-number="" id="latex-example-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="cb425"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb425-1"><a href="#cb425-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb425-2"><a href="#cb425-2" aria-hidden="true"></a><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</span> -<span id="cb425-3"><a href="#cb425-3" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</span> -<span id="cb425-4"><a href="#cb425-4" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb425-5"><a href="#cb425-5" aria-hidden="true"></a> renderers = {</span> -<span id="cb425-6"><a href="#cb425-6" aria-hidden="true"></a> inlineHtmlComment = {<span class="fu">\marginnote</span>{#1}},</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> -<span id="cb425-9"><a href="#cb425-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb425-10"><a href="#cb425-10" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb425-11"><a href="#cb425-11" aria-hidden="true"></a>A useful use of HTML comments are side notes.</span> -<span id="cb425-12"><a href="#cb425-12" aria-hidden="true"></a><!-- Side notes are displayed in the horizontal margins next to the relevant</span> -<span id="cb425-13"><a href="#cb425-13" aria-hidden="true"></a>passages, which makes them easier for the reader to find than footnotes. --></span> -<span id="cb425-14"><a href="#cb425-14" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb425-15"><a href="#cb425-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="cb426"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb426-1"><a href="#cb426-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span> -<span id="cb426-2"><a href="#cb426-2" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-53" class="unnumbered"><span class="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="cb425"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb425-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb425-2" data-line-number="2"><span class="bu">\usepackage</span>[html]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb425-3" data-line-number="3"><span class="bu">\usepackage</span>{<span class="ex">marginnote</span>}</a> +<a class="sourceLine" id="cb425-4" data-line-number="4"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb425-5" data-line-number="5"> renderers = {</a> +<a class="sourceLine" id="cb425-6" data-line-number="6"> inlineHtmlComment = {<span class="fu">\marginnote</span>{#1}},</a> +<a class="sourceLine" id="cb425-7" data-line-number="7"> },</a> +<a class="sourceLine" id="cb425-8" data-line-number="8">}</a> +<a class="sourceLine" id="cb425-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb425-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb425-11" data-line-number="11">A useful use of HTML comments are side notes.</a> +<a class="sourceLine" id="cb425-12" data-line-number="12"><!-- Side notes are displayed in the horizontal margins next to the relevant</a> +<a class="sourceLine" id="cb425-13" data-line-number="13">passages, which makes them easier for the reader to find than footnotes. --></a> +<a class="sourceLine" id="cb425-14" data-line-number="14"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb425-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb426"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb426-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a> +<a class="sourceLine" id="cb426-2" data-line-number="2"><span class="ex">lualatex</span> document.tex</a></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> @@ -5747,101 +5745,101 @@ Thomas,Edison,1847</code></pre> <blockquote> <p>Side notes are displayed in the horizontal margins next to the relevant passages, which makes them easier for the reader to find than footnotes.</p> </blockquote> -<h3 data-number="2.3.2" id="token-renderer-prototypes"><span class="header-section-number">2.3.2</span> Token Renderer Prototypes</h3> +<h3 id="token-renderer-prototypes"><span class="header-section-number">2.3.2</span> Token Renderer Prototypes</h3> <p>By default, token renderers point to package-defined <span class="tex">T<sub>e</sub>X</span> macros, further referred to as <em>prototypes</em>, which provide useful default definitions.</p> -<h5 class="unnumbered" data-number="" id="plain-tex-example-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="cb427"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb427-1"><a href="#cb427-1" aria-hidden="true"></a><span class="fu">\input</span> markdown</span> -<span id="cb427-2"><a href="#cb427-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> -<span id="cb427-3"><a href="#cb427-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> -<span id="cb427-4"><a href="#cb427-4" aria-hidden="true"></a>}</span> -<span id="cb427-5"><a href="#cb427-5" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb427-6"><a href="#cb427-6" aria-hidden="true"></a>~</span> -<span id="cb427-7"><a href="#cb427-7" aria-hidden="true"></a><span class="fu">\markdownEnd</span></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="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> -<span id="cb427-10"><a href="#cb427-10" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</span></span> -<span id="cb427-11"><a href="#cb427-11" aria-hidden="true"></a>}</span> -<span id="cb427-12"><a href="#cb427-12" aria-hidden="true"></a><span class="fu">\markdownBegin</span></span> -<span id="cb427-13"><a href="#cb427-13" aria-hidden="true"></a>~</span> -<span id="cb427-14"><a href="#cb427-14" aria-hidden="true"></a><span class="fu">\markdownEnd</span></span> -<span id="cb427-15"><a href="#cb427-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="cb428"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb428-1"><a href="#cb428-1" aria-hidden="true"></a><span class="ex">luatex</span> document.tex</span></code></pre></div> +<h5 id="plain-tex-example-31" class="unnumbered">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="cb427"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb427-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb427-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererTildePrototype{<span class="co">%</span></a> +<a class="sourceLine" id="cb427-3" data-line-number="3"> Packages can specify token renderer prototypes.<span class="co">%</span></a> +<a class="sourceLine" id="cb427-4" data-line-number="4">}</a> +<a class="sourceLine" id="cb427-5" data-line-number="5"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb427-6" data-line-number="6">~</a> +<a class="sourceLine" id="cb427-7" data-line-number="7"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb427-8" data-line-number="8"></a> +<a class="sourceLine" id="cb427-9" data-line-number="9"><span class="fu">\def</span>\markdownRendererTilde{<span class="co">%</span></a> +<a class="sourceLine" id="cb427-10" data-line-number="10"> User-defined token renderers take precedence.<span class="co">%</span></a> +<a class="sourceLine" id="cb427-11" data-line-number="11">}</a> +<a class="sourceLine" id="cb427-12" data-line-number="12"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb427-13" data-line-number="13">~</a> +<a class="sourceLine" id="cb427-14" data-line-number="14"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb427-15" data-line-number="15"><span class="fu">\bye</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb428"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb428-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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-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="cb429"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb429-1"><a href="#cb429-1" aria-hidden="true"></a><span class="bu">\documentclass</span>{<span class="ex">article</span>}</span> -<span id="cb429-2"><a href="#cb429-2" aria-hidden="true"></a><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</span> -<span id="cb429-3"><a href="#cb429-3" aria-hidden="true"></a><span class="fu">\markdownSetup</span>{</span> -<span id="cb429-4"><a href="#cb429-4" aria-hidden="true"></a> rendererPrototypes = {</span> -<span id="cb429-5"><a href="#cb429-5" aria-hidden="true"></a> tilde = {Packages can specify token renderer prototypes.},</span> -<span id="cb429-6"><a href="#cb429-6" aria-hidden="true"></a> },</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><span class="kw">\begin</span>{<span class="ex">document</span>}</span> -<span id="cb429-9"><a href="#cb429-9" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown</span>}</span> -<span id="cb429-10"><a href="#cb429-10" aria-hidden="true"></a>~</span> -<span id="cb429-11"><a href="#cb429-11" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown</span>}</span> -<span id="cb429-12"><a href="#cb429-12" aria-hidden="true"></a></span> -<span id="cb429-13"><a href="#cb429-13" aria-hidden="true"></a><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</span> -<span id="cb429-14"><a href="#cb429-14" aria-hidden="true"></a> renderers = {</span> -<span id="cb429-15"><a href="#cb429-15" aria-hidden="true"></a> tilde = {User-defined token renderers take precedence.},</span> -<span id="cb429-16"><a href="#cb429-16" aria-hidden="true"></a> },</span> -<span id="cb429-17"><a href="#cb429-17" aria-hidden="true"></a>}</span> -<span id="cb429-18"><a href="#cb429-18" aria-hidden="true"></a>~</span> -<span id="cb429-19"><a href="#cb429-19" aria-hidden="true"></a><span class="kw">\end</span>{<span class="ex">markdown*</span>}</span> -<span id="cb429-20"><a href="#cb429-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="cb430"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb430-1"><a href="#cb430-1" aria-hidden="true"></a><span class="ex">lualatex</span> document.tex</span></code></pre></div> +<h5 id="latex-example-54" class="unnumbered"><span class="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="cb429"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb429-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb429-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb429-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb429-4" data-line-number="4"> rendererPrototypes = {</a> +<a class="sourceLine" id="cb429-5" data-line-number="5"> tilde = {Packages can specify token renderer prototypes.},</a> +<a class="sourceLine" id="cb429-6" data-line-number="6"> },</a> +<a class="sourceLine" id="cb429-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb429-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb429-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb429-10" data-line-number="10">~</a> +<a class="sourceLine" id="cb429-11" data-line-number="11"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb429-12" data-line-number="12"></a> +<a class="sourceLine" id="cb429-13" data-line-number="13"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb429-14" data-line-number="14"> renderers = {</a> +<a class="sourceLine" id="cb429-15" data-line-number="15"> tilde = {User-defined token renderers take precedence.},</a> +<a class="sourceLine" id="cb429-16" data-line-number="16"> },</a> +<a class="sourceLine" id="cb429-17" data-line-number="17">}</a> +<a class="sourceLine" id="cb429-18" data-line-number="18">~</a> +<a class="sourceLine" id="cb429-19" data-line-number="19"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb429-20" data-line-number="20"><span class="kw">\end</span>{<span class="ex">document</span>}</a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb430"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb430-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> <p>A PDF document named <code>document.pdf</code> should be produced and contain the following text:</p> <blockquote> <p>Packages can specify token renderer prototypes.</p> <p>User-defined token renderers take precedence.</p> </blockquote> -<h5 class="unnumbered" data-number="" id="context-example-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="cb431"><pre class="sourceCode tex"><code class="sourceCode latex"><span id="cb431-1"><a href="#cb431-1" aria-hidden="true"></a><span class="fu">\usemodule</span>[t][markdown]</span> -<span id="cb431-2"><a href="#cb431-2" aria-hidden="true"></a><span class="fu">\def\markdownRendererTildePrototype</span>{<span class="co">%</span></span> -<span id="cb431-3"><a href="#cb431-3" aria-hidden="true"></a> Packages can specify token renderer prototypes.<span class="co">%</span></span> -<span id="cb431-4"><a href="#cb431-4" aria-hidden="true"></a>}</span> -<span id="cb431-5"><a href="#cb431-5" aria-hidden="true"></a><span class="fu">\starttext</span></span> -<span id="cb431-6"><a href="#cb431-6" aria-hidden="true"></a><span class="fu">\startmarkdown</span></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">\stopmarkdown</span></span> -<span id="cb431-9"><a href="#cb431-9" aria-hidden="true"></a></span> -<span id="cb431-10"><a href="#cb431-10" aria-hidden="true"></a><span class="fu">\def\markdownRendererTilde</span>{<span class="co">%</span></span> -<span id="cb431-11"><a href="#cb431-11" aria-hidden="true"></a> User-defined token renderers take precedence.<span class="co">%</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">\startmarkdown</span></span> -<span id="cb431-14"><a href="#cb431-14" aria-hidden="true"></a>~</span> -<span id="cb431-15"><a href="#cb431-15" aria-hidden="true"></a><span class="fu">\stopmarkdown</span></span> -<span id="cb431-16"><a href="#cb431-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="cb432"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb432-1"><a href="#cb432-1" aria-hidden="true"></a><span class="ex">context</span> document.tex</span></code></pre></div> +<h5 id="context-example-41" class="unnumbered">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="cb431"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb431-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb431-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererTildePrototype{<span class="co">%</span></a> +<a class="sourceLine" id="cb431-3" data-line-number="3"> Packages can specify token renderer prototypes.<span class="co">%</span></a> +<a class="sourceLine" id="cb431-4" data-line-number="4">}</a> +<a class="sourceLine" id="cb431-5" data-line-number="5"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb431-6" data-line-number="6"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb431-7" data-line-number="7">~</a> +<a class="sourceLine" id="cb431-8" data-line-number="8"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb431-9" data-line-number="9"></a> +<a class="sourceLine" id="cb431-10" data-line-number="10"><span class="fu">\def</span>\markdownRendererTilde{<span class="co">%</span></a> +<a class="sourceLine" id="cb431-11" data-line-number="11"> User-defined token renderers take precedence.<span class="co">%</span></a> +<a class="sourceLine" id="cb431-12" data-line-number="12">}</a> +<a class="sourceLine" id="cb431-13" data-line-number="13"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb431-14" data-line-number="14">~</a> +<a class="sourceLine" id="cb431-15" data-line-number="15"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb431-16" data-line-number="16"><span class="fu">\stoptext</span></a></code></pre></div> +<p>Next, invoke LuaTeX from the terminal:</p> +<div class="sourceCode" id="cb432"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb432-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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> -<section class="footnotes" role="doc-endnotes"> +<section class="footnotes"> <hr /> <ol> -<li id="fn1" role="doc-endnote"><p>Here is the footnote.<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li> -<li id="fn2" role="doc-endnote"><p>Here’s one with multiple blocks.</p> +<li id="fn1"><p>Here is the footnote.<a href="#fnref1" class="footnote-back">↩</a></p></li> +<li id="fn2"><p>Here’s one with multiple blocks.</p> <p>Subsequent paragraphs are indented to show that they belong to the previous footnote.</p> <pre><code>{ some.code }</code></pre> -<p>The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.<a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li> -<li id="fn3" role="doc-endnote"><p>Here is the footnote.<a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li> -<li id="fn4" role="doc-endnote"><p>Here’s one with multiple blocks.</p> +<p>The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.<a href="#fnref2" class="footnote-back">↩</a></p></li> +<li id="fn3"><p>Here is the footnote.<a href="#fnref3" class="footnote-back">↩</a></p></li> +<li id="fn4"><p>Here’s one with multiple blocks.</p> <p>Subsequent paragraphs are indented to show that they belong to the previous footnote.</p> <pre><code>{ some.code }</code></pre> -<p>The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.<a href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li> -<li id="fn5" role="doc-endnote"><p>Inlines notes are easier to write, since you don’t have to pick an identifier and move down to type the note.<a href="#fnref5" class="footnote-back" role="doc-backlink">↩︎</a></p></li> -<li id="fn6" role="doc-endnote"><p>Inlines notes are easier to write, since you don’t have to pick an identifier and move down to type the note.<a href="#fnref6" class="footnote-back" role="doc-backlink">↩︎</a></p></li> +<p>The whole paragraph can be indented, or just the first line. In this way, multi-paragraph footnotes work like multi-paragraph list items.<a href="#fnref4" class="footnote-back">↩</a></p></li> +<li id="fn5"><p>Inlines notes are easier to write, since you don’t have to pick an identifier and move down to type the note.<a href="#fnref5" class="footnote-back">↩</a></p></li> +<li id="fn6"><p>Inlines notes are easier to write, since you don’t have to pick an identifier and move down to type the note.<a href="#fnref6" class="footnote-back">↩</a></p></li> </ol> </section> </body> diff --git a/macros/generic/markdown/markdown.pdf b/macros/generic/markdown/markdown.pdf Binary files differindex 147ba6c419..f24c9243e2 100644 --- a/macros/generic/markdown/markdown.pdf +++ b/macros/generic/markdown/markdown.pdf |