diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/context/third/markdown/examples/example.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/markdown/README.md | 110 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/markdown/markdown.html | 2292 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/markdown/markdown.md | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/markdown/markdown.pdf | bin | 429871 -> 431227 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/markdown/examples/example.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/markdown/markdown-cli.lua | 8 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/markdown/docstrip.cfg | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/markdown/markdown.dtx | 47 | ||||
-rw-r--r-- | Master/texmf-dist/tex/context/third/markdown/t-markdown.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/markdown/markdown.tex | 17 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/markdown/markdown.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/markdown/markdown.lua | 11 |
13 files changed, 1317 insertions, 1185 deletions
diff --git a/Master/texmf-dist/doc/context/third/markdown/examples/example.md b/Master/texmf-dist/doc/context/third/markdown/examples/example.md index 8aeb423a204..f0be0cddfab 100644 --- a/Master/texmf-dist/doc/context/third/markdown/examples/example.md +++ b/Master/texmf-dist/doc/context/third/markdown/examples/example.md @@ -15,7 +15,7 @@ This is a text paragraph containing an ellipsis ... and followed by a horizontal This is inline `code`. This is a [link](http://google.cz "Google"). _This is an *emphasized* span of text_. __This is a **strongly emphasized** span of text__. - ![example image](example-image.pdf "An example image from Martin Scharrer's mwe package") + ![example image](example-image.png "An example image from Martin Scharrer's mwe package") /scientists.csv (The great minds of the 19th century rendered via a content block) diff --git a/Master/texmf-dist/doc/generic/markdown/README.md b/Master/texmf-dist/doc/generic/markdown/README.md new file mode 100644 index 00000000000..d29e20c8752 --- /dev/null +++ b/Master/texmf-dist/doc/generic/markdown/README.md @@ -0,0 +1,110 @@ +Markdown +======== +[![release](https://img.shields.io/github/release/witiko/markdown.svg)][release] +[![CircleCI](https://circleci.com/gh/Witiko/markdown/tree/master.svg?style=shield)][CircleCI] + + [CircleCI]: https://circleci.com/gh/Witiko/markdown/tree/master "CircleCI" + [release]: https://github.com/Witiko/markdown/releases/latest "Releases ¡ Witiko/markdown" + +The Markdown package converts [markdown][] markup to TeX commands. The +functionality is provided both as a Lua module, and as plain TeX, LaTeX, and +ConTeXt macro packages that can be used to directly typeset TeX documents +containing markdown markup. Unlike other convertors, the Markdown package +does not require any external programs, and makes it easy to redefine how each +and every markdown element is rendered. Creative abuse of the markdown syntax +is encouraged. đ + + [markdown]: https://daringfireball.net/projects/markdown/basics/ "Daring Fireball: Markdown Basics" + +Further information +------------------- +For further information, consult one of the following: + +1. The [user manual][manual], which can be produced by interpreting the + `markdown.ins` file using a Unicode-aware TeX engine, such as XeTeX + (`xetex markdown.ins`) or LuaTeX (`luatex markdown.ins`). The manual will + reside in the file `markdown.md` and the CSS stylesheet `markdown.css`. +2. The [technical documentation][techdoc], which can be typeset by running the + [LaTeXMK][] tool on the `markdown.dtx` file + (`latexmk markdown.dtx`) after [installing the Markdown package][install]. + [LaTeXMK][] should be included in your TeX distribution. The typeset + documentation will reside in the file `markdown.pdf`. +3. Tutorials and example documents by [Lian Tze Lim][liantze] at [Overleaf][]: + - [How to write in Markdown on Overleaf][overleaf-1], + - [Markdown into LaTeX with Style][overleaf-2], + - [Writing Markdown in LaTeX Documents][overleaf-3], + - [Writing Beamer Slides with Markdown][overleaf-4], + - [Writing Posters with Markdown][overleaf-5], and + - [Using Markdown in LaTeX documents][overleaf-6]. +4. My journal articles published by [TUGboat][]: + - [Using Markdown inside TeX documents][tb119], and + - [Markdown 2.7.0: Towards lightweight markup in TeX][tb124]. +5. My journal articles published by [CSTUG][] (in Czech): + - [Rendering Markdown inside TeX Documents][10.5300/2016-1-4/78]. + + [overleaf-1]: https://www.overleaf.com/learn/latex/Articles/How_to_write_in_Markdown_on_Overleaf "How to write in Markdown on Overleaf" + [overleaf-2]: https://www.overleaf.com/learn/latex/Articles/Markdown_into_LaTeX_with_Style "Markdown into LaTeX with Style" + [overleaf-3]: https://www.overleaf.com/learn/how-to/Writing_Markdown_in_LaTeX_Documents "Writing Markdown in LaTeX Documents" + [overleaf-4]: https://www.overleaf.com/latex/examples/writing-beamer-slides-with-markdown/dnrwnjrpjjhw "Writing Beamer Slides with Markdown" + [overleaf-5]: https://www.overleaf.com/latex/examples/writing-posters-with-markdown/jtbgmmgqrqmh "Writing Posters with Markdown" + [overleaf-6]: https://www.overleaf.com/latex/examples/using-markdown-in-latex-documents/whdrnpcpnwrm "Using Markdown in LaTeX documents" + + [tb119]: https://www.tug.org/members/TUGboat/tb38-2/tb119novotny.pdf "Using Markdown inside TeX documents" + [tb124]: https://www.tug.org/members/TUGboat/tb40-1/tb124novotny-markdown.pdf "Markdown 2.7.0: Towards lightweight markup in TeX" + + [10.5300/2016-1-4/78]: https://doi.org/10.5300/2016-1-4/78 "Rendering Markdown inside TeX Documents" + + [install]: http://mirrors.ctan.org/macros/generic/markdown/markdown.html#installation "Markdown Package User Manual" + [liantze]: http://liantze.penguinattack.org/ "Rants from the Lab" + [manual]: http://mirrors.ctan.org/macros/generic/markdown/markdown.html "Markdown Package User Manual" + [overleaf]: https://www.overleaf.com/ "Overleaf: Real-time Collaborative Writing and Publishing Tools with Integrated PDF Preview" + [techdoc]: http://mirrors.ctan.org/macros/generic/markdown/markdown.pdf "A Markdown Interpreter for TeX" + [tugboat]: https://www.tug.org/tugboat/ "TUGboat - Communications of the TeX Users Group" + [cstug]: https://www.cstug.cz/ "ÄeskoslovenskĂŠ sdruĹženĂ uĹživatelĹŻ TeXu" + +Acknowledgements +---------------- + +| Logo | Acknowledgement | +| ------------- | ------------- | +| [<img width="150" src="https://www.fi.muni.cz/images/fi-logo.png">][fimu] | I gratefully acknowledge the funding from the [Faculty of Informatics][fimu] at the [Masaryk University][mu] in Brno, Czech Republic, for the development of the Markdown package. | +| [<img width="150" src="https://cdn.overleaf.com/img/ol-brand/overleaf_og_logo.png">][overleaf] | Extensive user documentation for the Markdown package was kindly written by [Lian Tze Lim][liantze] and published by [Overleaf][]. | +| [<img width="150" src="https://pbs.twimg.com/profile_images/1004769879319334912/6Bh1UthD.jpg">][omedym] | Support for content slicing (Lua options [`shiftHeadings`][option-shift-headings] and [`slice`][option-slice]) and pipe tables (Lua options [`pipeTables`][option-pipe-tables] and [`tableCaptions`][option-table-captions]) was graciously sponsored by [David Vins][dvins] and [Omedym][]. | + + [dvins]: https://github.com/dvins "David Vins" + [fimu]: https://www.fi.muni.cz/index.html.en "Faculty of Informatics, Masaryk University" + [mu]: https://www.muni.cz/en "Masaryk University" + [Omedym]: https://www.omedym.com/ "Omedym" + + [option-pipe-tables]: http://mirrors.ctan.org/macros/generic/markdown/markdown.html#pipe-tables "Markdown Package User Manual" + [option-shift-headings]: http://mirrors.ctan.org/macros/generic/markdown/markdown.html#option-shiftheadings "Markdown Package User Manual" + [option-slice]: http://mirrors.ctan.org/macros/generic/markdown/markdown.html#slice "Markdown Package User Manual" + [option-table-captions]: http://mirrors.ctan.org/macros/generic/markdown/markdown.html#option-tablecaptions "Markdown Package User Manual" + +Contributing +------------ +Apart from the example markdown documents, tests, and continuous integration, +which are placed in the `examples/`, `tests/`, and `.circleci/` directories, +the complete source code and documentation of the package are placed in the +`markdown.dtx` document following the [literate programming][] paradigm. +Some useful commands, such as building the release archives and typesetting +the documentation, are placed in the `Makefile` file for ease of maintenance. + +When the file `markdown.ins` is interpreted using a Unicode-aware TeX engine, +such as XeTeX (`xetex markdown.ins`) or LuaTeX (`luatex markdown.ins`), several +files are produced from the `markdown.dtx` document. In `markdown.dtx`, the +boundaries between the produced files are marked up using an XML-like syntax +provided by the [DocStrip][] plain TeX package. + +Running the [LaTeXMK][] tool on the `markdown.dtx` file +(`latexmk markdown.dtx`) after the Markdown package has been +[installed][install] typesets the documentation. In `markdown.dtx`, the +documentation is placed inside TeX comments and marked up using the +[ltxdockit][] LaTeX document class. Support for typesetting the documentation +is provided by the [doc][] LaTeX package. + + [doc]: https://ctan.org/pkg/doc "doc â Format LaTeX documentation" + [DocStrip]: https://ctan.org/pkg/docstrip "docstrip â Remove comments from file" + [LaTeXMK]: https://ctan.org/pkg/latexmk "latexmk â Fully automated LaTeX document generation" + [literate programming]: https://en.wikipedia.org/wiki/Literate_programming "Literate programming" + [ltxdockit]: https://ctan.org/pkg/ltxdockit "ltxdockit â Documentation support" diff --git a/Master/texmf-dist/doc/generic/markdown/markdown.html b/Master/texmf-dist/doc/generic/markdown/markdown.html index e6ed568bff0..cc1c9fe59ff 100644 --- a/Master/texmf-dist/doc/generic/markdown/markdown.html +++ b/Master/texmf-dist/doc/generic/markdown/markdown.html @@ -86,7 +86,7 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni <header> <h1 class="title">Markdown Package User Manual</h1> <p class="author">VĂt NovotnĂ˝</p> -<p class="date">v2.8.1 (2019/04/30)</p> +<p class="date">v2.8.2 (2020/03/20)</p> </header> <nav id="TOC"> <ul> @@ -123,7 +123,7 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni </nav> <p><link href="https://afeld.github.io/emoji-css/emoji.css" rel="stylesheet" /></p> <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 makes it easy to redefine how each and every markdown element is rendered. Creative abuse of the markdown syntax is encouraged. <i class="em em-wink"></i></p> +<p>The <a href="https://ctan.org/pkg/markdown" title="CTAN: Package markdown">Markdown package</a> converts <a href="https://daringfireball.net/projects/markdown/basics/" title="Daring Fireball: Markdown Basics">markdown</a> markup to <span class="tex">T<sub>e</sub>X</span> commands. The functionality is provided both as a Lua module and as plain <span class="tex">T<sub>e</sub>X</span>, <span class="latex">L<sup>a</sup>T<sub>e</sub>X</span>, and Con<span class="tex">T<sub>e</sub>X</span>t macro packages that can be used to directly typeset 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 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> @@ -3766,33 +3766,33 @@ multiple paragraphs</li> <a class="sourceLine" id="cb301-5" data-line-number="5"><span class="fu">\catcode</span>`<span class="fu">\%</span>=12</a> <a class="sourceLine" id="cb301-6" data-line-number="6"><span class="fu">\catcode</span>`<span class="fu">\^</span>^A=14</a> <a class="sourceLine" id="cb301-7" data-line-number="7"><span class="fu">\global\def</span>\markdownRendererImage#1#2#3#4{^^A</a> -<a class="sourceLine" id="cb301-8" data-line-number="8"> \immediate\write18{^^A</a> -<a class="sourceLine" id="cb301-9" data-line-number="9"> if printf '<span class="co">%s' "#3" | grep -q ^http; then</span></a> -<a class="sourceLine" id="cb301-10" data-line-number="10"> OUTPUT="$(printf '<span class="co">%s' "#3" | md5sum | cut -d' ' -f1).^^A</span></a> -<a class="sourceLine" id="cb301-11" data-line-number="11"> $(printf '<span class="co">%s' "#3" | sed 's/.*[.]//')";</span></a> -<a class="sourceLine" id="cb301-12" data-line-number="12"> if ! [ -e "$OUTPUT" ]; then</a> -<a class="sourceLine" id="cb301-13" data-line-number="13"> wget -O "$OUTPUT" '#3' || rm "$OUTPUT";</a> -<a class="sourceLine" id="cb301-14" data-line-number="14"> convert "$OUTPUT" png:"$OUTPUT";</a> -<a class="sourceLine" id="cb301-15" data-line-number="15"> fi;</a> -<a class="sourceLine" id="cb301-16" data-line-number="16"> printf '<span class="co">%s%%' "$OUTPUT" > \jobname.fetched;</span></a> -<a class="sourceLine" id="cb301-17" data-line-number="17"> else</a> -<a class="sourceLine" id="cb301-18" data-line-number="18"> printf '<span class="co">%s%%' "#3" > \jobname.fetched;</span></a> -<a class="sourceLine" id="cb301-19" data-line-number="19"> fi^^A</a> -<a class="sourceLine" id="cb301-20" data-line-number="20"> }^^A</a> -<a class="sourceLine" id="cb301-21" data-line-number="21"> {^^A</a> -<a class="sourceLine" id="cb301-22" data-line-number="22"> \everyeof={\noexpand}^^A</a> -<a class="sourceLine" id="cb301-23" data-line-number="23"> \edef\filename{\@@input"\jobname.fetched" }^^A</a> -<a class="sourceLine" id="cb301-24" data-line-number="24"> \includegraphics[width=\textwidth]{\filename}^^A</a> -<a class="sourceLine" id="cb301-25" data-line-number="25"> }^^A</a> -<a class="sourceLine" id="cb301-26" data-line-number="26">}</a> -<a class="sourceLine" id="cb301-27" data-line-number="27"><span class="fu">\endgroup</span></a> -<a class="sourceLine" id="cb301-28" data-line-number="28"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb301-29" data-line-number="29"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb301-30" data-line-number="30">![TUGboat](https://tug.org/tugboat/noword.jpg)</a> -<a class="sourceLine" id="cb301-31" data-line-number="31"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb301-32" data-line-number="32"><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="cb302"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb302-1" data-line-number="1"><span class="ex">lualatex</span> --shell-escape document.tex</a></code></pre></div> +<a class="sourceLine" id="cb301-8" data-line-number="8"> \immediate\write18{^^A</a></code></pre></div> +<div class="sourceCode" id="cb302"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb302-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="cb302-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="cb302-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="cb302-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="cb302-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="cb302-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="cb302-7" data-line-number="7"> <span class="kw">fi</span>;</a> +<a class="sourceLine" id="cb302-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="cb302-9" data-line-number="9"> <span class="kw">else</span></a> +<a class="sourceLine" id="cb302-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="cb302-11" data-line-number="11"> <span class="kw">fi</span>^^<span class="ex">A</span></a></code></pre></div> +<div class="sourceCode" id="cb303"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb303-1" data-line-number="1"> }^^A</a> +<a class="sourceLine" id="cb303-2" data-line-number="2"> {^^A</a> +<a class="sourceLine" id="cb303-3" data-line-number="3"> <span class="fu">\everyeof</span>={<span class="fu">\noexpand</span>}^^A</a> +<a class="sourceLine" id="cb303-4" data-line-number="4"> <span class="fu">\edef</span>\filename{\@@input"\jobname.fetched" }^^A</a> +<a class="sourceLine" id="cb303-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="cb303-6" data-line-number="6"> }^^A</a> +<a class="sourceLine" id="cb303-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb303-8" data-line-number="8"><span class="fu">\endgroup</span></a> +<a class="sourceLine" id="cb303-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb303-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb303-11" data-line-number="11">![TUGboat](https://tug.org/tugboat/noword.jpg)</a> +<a class="sourceLine" id="cb303-12" data-line-number="12"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb303-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="cb304"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb304-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> @@ -3804,30 +3804,30 @@ multiple paragraphs</li> <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 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="cb303"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb303-1" data-line-number="1"><span class="fu">\input</span> markdown</a> -<a class="sourceLine" id="cb303-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionContentBlocks{true}</a> -<a class="sourceLine" id="cb303-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererContentBlock#1#2#3#4{<span class="co">%</span></a> -<a class="sourceLine" id="cb303-4" data-line-number="4"> This is {\tt #2}, #4.</a> -<a class="sourceLine" id="cb303-5" data-line-number="5">}</a> -<a class="sourceLine" id="cb303-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererContentBlockOnlineImage#1#2#3#4{<span class="co">%</span></a> -<a class="sourceLine" id="cb303-7" data-line-number="7"> This is the image {\tt #2}, #4.</a> -<a class="sourceLine" id="cb303-8" data-line-number="8">}</a> -<a class="sourceLine" id="cb303-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="cb303-10" data-line-number="10"> This is the #2 (\uppercase{#1}) document {\tt #3}, #5.</a> -<a class="sourceLine" id="cb303-11" data-line-number="11">}</a> -<a class="sourceLine" id="cb303-12" data-line-number="12"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb303-13" data-line-number="13">/document.tex (the document that we are currently typesetting)</a> -<a class="sourceLine" id="cb303-14" data-line-number="14">/markdown-languages.json (the mapping between filename extensions</a> -<a class="sourceLine" id="cb303-15" data-line-number="15"> and programming language names)</a> -<a class="sourceLine" id="cb303-16" data-line-number="16">https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</a> -<a class="sourceLine" id="cb303-17" data-line-number="17"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb303-18" data-line-number="18"><span class="fu">\bye</span></a></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="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb305-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionContentBlocks{true}</a> +<a class="sourceLine" id="cb305-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererContentBlock#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb305-4" data-line-number="4"> This is {\tt #2}, #4.</a> +<a class="sourceLine" id="cb305-5" data-line-number="5">}</a> +<a class="sourceLine" id="cb305-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererContentBlockOnlineImage#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb305-7" data-line-number="7"> This is the image {\tt #2}, #4.</a> +<a class="sourceLine" id="cb305-8" data-line-number="8">}</a> +<a class="sourceLine" id="cb305-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="cb305-10" data-line-number="10"> This is the #2 (\uppercase{#1}) document {\tt #3}, #5.</a> +<a class="sourceLine" id="cb305-11" data-line-number="11">}</a> +<a class="sourceLine" id="cb305-12" data-line-number="12"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb305-13" data-line-number="13">/document.tex (the document that we are currently typesetting)</a> +<a class="sourceLine" id="cb305-14" data-line-number="14">/markdown-languages.json (the mapping between filename extensions</a> +<a class="sourceLine" id="cb305-15" data-line-number="15"> and programming language names)</a> +<a class="sourceLine" id="cb305-16" data-line-number="16">https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</a> +<a class="sourceLine" id="cb305-17" data-line-number="17"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb305-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="cb304"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb304-1" data-line-number="1"><span class="op">{</span></a> -<a class="sourceLine" id="cb304-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="cb304-3" data-line-number="3"><span class="op">}</span></a></code></pre></div> +<div class="sourceCode" id="cb306"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb306-1" data-line-number="1"><span class="op">{</span></a> +<a class="sourceLine" id="cb306-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="cb306-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="cb305"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb305-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> +<div class="sourceCode" id="cb307"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb307-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> @@ -3836,33 +3836,33 @@ multiple paragraphs</li> </blockquote> <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="cb306"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb306-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb306-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">filecontents</span>}</a> -<a class="sourceLine" id="cb306-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">filecontents*</span>}{markdown-languages.json}</a> -<a class="sourceLine" id="cb306-4" data-line-number="4">{</a> -<a class="sourceLine" id="cb306-5" data-line-number="5"> "json": "JavaScript Object Notation",</a> -<a class="sourceLine" id="cb306-6" data-line-number="6">}</a> -<a class="sourceLine" id="cb306-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">filecontents*</span>}</a> -<a class="sourceLine" id="cb306-8" data-line-number="8"><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb306-9" data-line-number="9"><span class="fu">\markdownSetup</span>{</a> -<a class="sourceLine" id="cb306-10" data-line-number="10"> renderers = {</a> -<a class="sourceLine" id="cb306-11" data-line-number="11"> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</a> -<a class="sourceLine" id="cb306-12" data-line-number="12"> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</a> -<a class="sourceLine" id="cb306-13" data-line-number="13"> contentBlockCode = {<span class="co">%</span></a> -<a class="sourceLine" id="cb306-14" data-line-number="14"> This is the #2 (<span class="fu">\MakeUppercase</span>{#1}) document <span class="fu">\texttt</span>{#3}, #5.</a> -<a class="sourceLine" id="cb306-15" data-line-number="15"> },</a> -<a class="sourceLine" id="cb306-16" data-line-number="16"> },</a> -<a class="sourceLine" id="cb306-17" data-line-number="17">}</a> -<a class="sourceLine" id="cb306-18" data-line-number="18"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb306-19" data-line-number="19"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb306-20" data-line-number="20">/document.tex (the document that we are currently typesetting)</a> -<a class="sourceLine" id="cb306-21" data-line-number="21">/markdown-languages.json (the mapping between filename extensions</a> -<a class="sourceLine" id="cb306-22" data-line-number="22"> and programming language names)</a> -<a class="sourceLine" id="cb306-23" data-line-number="23">https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</a> -<a class="sourceLine" id="cb306-24" data-line-number="24"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb306-25" data-line-number="25"><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="cb307"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb307-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb308-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">filecontents</span>}</a> +<a class="sourceLine" id="cb308-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">filecontents*</span>}{markdown-languages.json}</a> +<a class="sourceLine" id="cb308-4" data-line-number="4">{</a> +<a class="sourceLine" id="cb308-5" data-line-number="5"> "json": "JavaScript Object Notation",</a> +<a class="sourceLine" id="cb308-6" data-line-number="6">}</a> +<a class="sourceLine" id="cb308-7" data-line-number="7"><span class="kw">\end</span>{<span class="ex">filecontents*</span>}</a> +<a class="sourceLine" id="cb308-8" data-line-number="8"><span class="bu">\usepackage</span>[contentBlocks]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb308-9" data-line-number="9"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb308-10" data-line-number="10"> renderers = {</a> +<a class="sourceLine" id="cb308-11" data-line-number="11"> contentBlock = {This is <span class="fu">\texttt</span>{#2}, #4.},</a> +<a class="sourceLine" id="cb308-12" data-line-number="12"> contentBlockOnlineImage = {This is the image <span class="fu">\texttt</span>{#2}, #4.},</a> +<a class="sourceLine" id="cb308-13" data-line-number="13"> contentBlockCode = {<span class="co">%</span></a> +<a class="sourceLine" id="cb308-14" data-line-number="14"> This is the #2 (<span class="fu">\MakeUppercase</span>{#1}) document <span class="fu">\texttt</span>{#3}, #5.</a> +<a class="sourceLine" id="cb308-15" data-line-number="15"> },</a> +<a class="sourceLine" id="cb308-16" data-line-number="16"> },</a> +<a class="sourceLine" id="cb308-17" data-line-number="17">}</a> +<a class="sourceLine" id="cb308-18" data-line-number="18"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb308-19" data-line-number="19"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb308-20" data-line-number="20">/document.tex (the document that we are currently typesetting)</a> +<a class="sourceLine" id="cb308-21" data-line-number="21">/markdown-languages.json (the mapping between filename extensions</a> +<a class="sourceLine" id="cb308-22" data-line-number="22"> and programming language names)</a> +<a class="sourceLine" id="cb308-23" data-line-number="23">https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</a> +<a class="sourceLine" id="cb308-24" data-line-number="24"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb308-25" data-line-number="25"><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="cb309"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb309-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> @@ -3871,31 +3871,31 @@ multiple paragraphs</li> </blockquote> <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="cb308"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb308-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> -<a class="sourceLine" id="cb308-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionContentBlocks{true}</a> -<a class="sourceLine" id="cb308-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererContentBlock#1#2#3#4{<span class="co">%</span></a> -<a class="sourceLine" id="cb308-4" data-line-number="4"> This is {\tt #2}, #4.</a> -<a class="sourceLine" id="cb308-5" data-line-number="5">}</a> -<a class="sourceLine" id="cb308-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererContentBlockOnlineImage#1#2#3#4{<span class="co">%</span></a> -<a class="sourceLine" id="cb308-7" data-line-number="7"> This is the image {\tt #2}, #4.</a> -<a class="sourceLine" id="cb308-8" data-line-number="8">}</a> -<a class="sourceLine" id="cb308-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="cb308-10" data-line-number="10"> This is the #2 (\uppercase{#1}) document {\tt #3}, #5.</a> -<a class="sourceLine" id="cb308-11" data-line-number="11">}</a> -<a class="sourceLine" id="cb308-12" data-line-number="12"><span class="fu">\starttext</span></a> -<a class="sourceLine" id="cb308-13" data-line-number="13"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb308-14" data-line-number="14">/document.tex (the document that we are currently typesetting)</a> -<a class="sourceLine" id="cb308-15" data-line-number="15">/markdown-languages.json (the mapping between filename extensions</a> -<a class="sourceLine" id="cb308-16" data-line-number="16"> and programming language names)</a> -<a class="sourceLine" id="cb308-17" data-line-number="17">https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</a> -<a class="sourceLine" id="cb308-18" data-line-number="18"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb308-19" data-line-number="19"><span class="fu">\stoptext</span></a></code></pre></div> +<div class="sourceCode" id="cb310"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb310-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb310-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionContentBlocks{true}</a> +<a class="sourceLine" id="cb310-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererContentBlock#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb310-4" data-line-number="4"> This is {\tt #2}, #4.</a> +<a class="sourceLine" id="cb310-5" data-line-number="5">}</a> +<a class="sourceLine" id="cb310-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererContentBlockOnlineImage#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb310-7" data-line-number="7"> This is the image {\tt #2}, #4.</a> +<a class="sourceLine" id="cb310-8" data-line-number="8">}</a> +<a class="sourceLine" id="cb310-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="cb310-10" data-line-number="10"> This is the #2 (\uppercase{#1}) document {\tt #3}, #5.</a> +<a class="sourceLine" id="cb310-11" data-line-number="11">}</a> +<a class="sourceLine" id="cb310-12" data-line-number="12"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb310-13" data-line-number="13"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb310-14" data-line-number="14">/document.tex (the document that we are currently typesetting)</a> +<a class="sourceLine" id="cb310-15" data-line-number="15">/markdown-languages.json (the mapping between filename extensions</a> +<a class="sourceLine" id="cb310-16" data-line-number="16"> and programming language names)</a> +<a class="sourceLine" id="cb310-17" data-line-number="17">https://tug.org/tugboat/noword.jpg (the logotype of TUGboat)</a> +<a class="sourceLine" id="cb310-18" data-line-number="18"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb310-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="cb309"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb309-1" data-line-number="1"><span class="op">{</span></a> -<a class="sourceLine" id="cb309-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="cb309-3" data-line-number="3"><span class="op">}</span></a></code></pre></div> +<div class="sourceCode" id="cb311"><pre class="sourceCode js"><code class="sourceCode javascript"><a class="sourceLine" id="cb311-1" data-line-number="1"><span class="op">{</span></a> +<a class="sourceLine" id="cb311-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="cb311-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="cb310"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb310-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> +<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">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> @@ -3911,50 +3911,50 @@ multiple paragraphs</li> <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 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:</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="fu">\input</span> markdown</a> -<a class="sourceLine" id="cb311-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> -<a class="sourceLine" id="cb311-3" data-line-number="3"></a> -<a class="sourceLine" id="cb311-4" data-line-number="4"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> -<a class="sourceLine" id="cb311-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererUlBeginTight{ (}</a> -<a class="sourceLine" id="cb311-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererUlItem{<span class="co">%</span></a> -<a class="sourceLine" id="cb311-7" data-line-number="7"> \def\markdownRendererUlItem{<span class="co">%</span></a> -<a class="sourceLine" id="cb311-8" data-line-number="8"> ,</a> -<a class="sourceLine" id="cb311-9" data-line-number="9"> \def\markdownRendererUlItem{, and }<span class="co">%</span></a> -<a class="sourceLine" id="cb311-10" data-line-number="10"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb311-11" data-line-number="11">}</a> -<a class="sourceLine" id="cb311-12" data-line-number="12"><span class="fu">\def</span>\markdownRendererUlItemEnd{}</a> -<a class="sourceLine" id="cb311-13" data-line-number="13"><span class="fu">\def</span>\markdownRendererUlEndTight{).}</a> -<a class="sourceLine" id="cb311-14" data-line-number="14"></a> -<a class="sourceLine" id="cb311-15" data-line-number="15"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb311-16" data-line-number="16">This is a tight list</a> -<a class="sourceLine" id="cb311-17" data-line-number="17"></a> -<a class="sourceLine" id="cb311-18" data-line-number="18">- the first item</a> -<a class="sourceLine" id="cb311-19" data-line-number="19">- the second item</a> -<a class="sourceLine" id="cb311-20" data-line-number="20">- the third item</a> -<a class="sourceLine" id="cb311-21" data-line-number="21"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb311-22" data-line-number="22"></a> -<a class="sourceLine" id="cb311-23" data-line-number="23"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> -<a class="sourceLine" id="cb311-24" data-line-number="24"> :\par</a> -<a class="sourceLine" id="cb311-25" data-line-number="25"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb311-26" data-line-number="26">}</a> -<a class="sourceLine" id="cb311-27" data-line-number="27"><span class="fu">\def</span>\markdownRendererUlBegin{}</a> -<a class="sourceLine" id="cb311-28" data-line-number="28"><span class="fu">\def</span>\markdownRendererUlItem{--\kern 0.5em}</a> -<a class="sourceLine" id="cb311-29" data-line-number="29"><span class="fu">\def</span>\markdownRendererUlItemEnd{.\par}</a> -<a class="sourceLine" id="cb311-30" data-line-number="30"><span class="fu">\def</span>\markdownRendererUlEnd{}</a> -<a class="sourceLine" id="cb311-31" data-line-number="31"></a> -<a class="sourceLine" id="cb311-32" data-line-number="32"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb311-33" data-line-number="33">This is a loose list</a> -<a class="sourceLine" id="cb311-34" data-line-number="34"></a> -<a class="sourceLine" id="cb311-35" data-line-number="35">- This is the first item</a> -<a class="sourceLine" id="cb311-36" data-line-number="36"></a> -<a class="sourceLine" id="cb311-37" data-line-number="37">- This is the second item</a> -<a class="sourceLine" id="cb311-38" data-line-number="38"></a> -<a class="sourceLine" id="cb311-39" data-line-number="39">- This is the third item</a> -<a class="sourceLine" id="cb311-40" data-line-number="40"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb311-41" data-line-number="41"></a> -<a class="sourceLine" id="cb311-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="cb312"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb312-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb313-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> +<a class="sourceLine" id="cb313-3" data-line-number="3"></a> +<a class="sourceLine" id="cb313-4" data-line-number="4"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb313-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererUlBeginTight{ (}</a> +<a class="sourceLine" id="cb313-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererUlItem{<span class="co">%</span></a> +<a class="sourceLine" id="cb313-7" data-line-number="7"> \def\markdownRendererUlItem{<span class="co">%</span></a> +<a class="sourceLine" id="cb313-8" data-line-number="8"> ,</a> +<a class="sourceLine" id="cb313-9" data-line-number="9"> \def\markdownRendererUlItem{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb313-10" data-line-number="10"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb313-11" data-line-number="11">}</a> +<a class="sourceLine" id="cb313-12" data-line-number="12"><span class="fu">\def</span>\markdownRendererUlItemEnd{}</a> +<a class="sourceLine" id="cb313-13" data-line-number="13"><span class="fu">\def</span>\markdownRendererUlEndTight{).}</a> +<a class="sourceLine" id="cb313-14" data-line-number="14"></a> +<a class="sourceLine" id="cb313-15" data-line-number="15"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb313-16" data-line-number="16">This is a tight list</a> +<a class="sourceLine" id="cb313-17" data-line-number="17"></a> +<a class="sourceLine" id="cb313-18" data-line-number="18">- the first item</a> +<a class="sourceLine" id="cb313-19" data-line-number="19">- the second item</a> +<a class="sourceLine" id="cb313-20" data-line-number="20">- the third item</a> +<a class="sourceLine" id="cb313-21" data-line-number="21"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb313-22" data-line-number="22"></a> +<a class="sourceLine" id="cb313-23" data-line-number="23"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb313-24" data-line-number="24"> :\par</a> +<a class="sourceLine" id="cb313-25" data-line-number="25"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb313-26" data-line-number="26">}</a> +<a class="sourceLine" id="cb313-27" data-line-number="27"><span class="fu">\def</span>\markdownRendererUlBegin{}</a> +<a class="sourceLine" id="cb313-28" data-line-number="28"><span class="fu">\def</span>\markdownRendererUlItem{--\kern 0.5em}</a> +<a class="sourceLine" id="cb313-29" data-line-number="29"><span class="fu">\def</span>\markdownRendererUlItemEnd{.\par}</a> +<a class="sourceLine" id="cb313-30" data-line-number="30"><span class="fu">\def</span>\markdownRendererUlEnd{}</a> +<a class="sourceLine" id="cb313-31" data-line-number="31"></a> +<a class="sourceLine" id="cb313-32" data-line-number="32"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb313-33" data-line-number="33">This is a loose list</a> +<a class="sourceLine" id="cb313-34" data-line-number="34"></a> +<a class="sourceLine" id="cb313-35" data-line-number="35">- This is the first item</a> +<a class="sourceLine" id="cb313-36" data-line-number="36"></a> +<a class="sourceLine" id="cb313-37" data-line-number="37">- This is the second item</a> +<a class="sourceLine" id="cb313-38" data-line-number="38"></a> +<a class="sourceLine" id="cb313-39" data-line-number="39">- This is the third item</a> +<a class="sourceLine" id="cb313-40" data-line-number="40"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb313-41" data-line-number="41"></a> +<a class="sourceLine" id="cb313-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="cb314"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb314-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> @@ -3967,55 +3967,55 @@ multiple paragraphs</li> </blockquote> <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="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>[tightLists]{<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"></a> -<a class="sourceLine" id="cb313-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> -<a class="sourceLine" id="cb313-6" data-line-number="6"> renderers = {</a> -<a class="sourceLine" id="cb313-7" data-line-number="7"> interblockSeparator = {},</a> -<a class="sourceLine" id="cb313-8" data-line-number="8"> ulBeginTight = { (},</a> -<a class="sourceLine" id="cb313-9" data-line-number="9"> ulItem = {<span class="co">%</span></a> -<a class="sourceLine" id="cb313-10" data-line-number="10"> <span class="fu">\def</span>\markdownRendererUlItem{<span class="co">%</span></a> -<a class="sourceLine" id="cb313-11" data-line-number="11"> ,</a> -<a class="sourceLine" id="cb313-12" data-line-number="12"> \def\markdownRendererUlItem{, and }<span class="co">%</span></a> -<a class="sourceLine" id="cb313-13" data-line-number="13"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb313-14" data-line-number="14"> },</a> -<a class="sourceLine" id="cb313-15" data-line-number="15"> ulItemEnd = {},</a> -<a class="sourceLine" id="cb313-16" data-line-number="16"> ulEndTight = {).},</a> -<a class="sourceLine" id="cb313-17" data-line-number="17"> },</a> -<a class="sourceLine" id="cb313-18" data-line-number="18">}</a> -<a class="sourceLine" id="cb313-19" data-line-number="19">This is a tight list</a> -<a class="sourceLine" id="cb313-20" data-line-number="20"></a> -<a class="sourceLine" id="cb313-21" data-line-number="21">- the first item</a> -<a class="sourceLine" id="cb313-22" data-line-number="22">- the second item</a> -<a class="sourceLine" id="cb313-23" data-line-number="23">- the third item</a> -<a class="sourceLine" id="cb313-24" data-line-number="24"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> -<a class="sourceLine" id="cb313-25" data-line-number="25"></a> -<a class="sourceLine" id="cb313-26" data-line-number="26"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> -<a class="sourceLine" id="cb313-27" data-line-number="27"> renderers = {</a> -<a class="sourceLine" id="cb313-28" data-line-number="28"> interblockSeparator = {<span class="co">%</span></a> -<a class="sourceLine" id="cb313-29" data-line-number="29"> :<span class="fu">\par</span></a> -<a class="sourceLine" id="cb313-30" data-line-number="30"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb313-31" data-line-number="31"> },</a> -<a class="sourceLine" id="cb313-32" data-line-number="32"> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</a> -<a class="sourceLine" id="cb313-33" data-line-number="33"> ulItem = {<span class="fu">\item</span>},</a> -<a class="sourceLine" id="cb313-34" data-line-number="34"> ulItemEnd = {.},</a> -<a class="sourceLine" id="cb313-35" data-line-number="35"> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</a> -<a class="sourceLine" id="cb313-36" data-line-number="36"> },</a> -<a class="sourceLine" id="cb313-37" data-line-number="37">}</a> -<a class="sourceLine" id="cb313-38" data-line-number="38">This is a loose list</a> -<a class="sourceLine" id="cb313-39" data-line-number="39"></a> -<a class="sourceLine" id="cb313-40" data-line-number="40">- This is the first item</a> -<a class="sourceLine" id="cb313-41" data-line-number="41"></a> -<a class="sourceLine" id="cb313-42" data-line-number="42">- This is the second item</a> -<a class="sourceLine" id="cb313-43" data-line-number="43"></a> -<a class="sourceLine" id="cb313-44" data-line-number="44">- This is the third item</a> -<a class="sourceLine" id="cb313-45" data-line-number="45"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> -<a class="sourceLine" id="cb313-46" data-line-number="46"></a> -<a class="sourceLine" id="cb313-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="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> +<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="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb315-2" data-line-number="2"><span class="bu">\usepackage</span>[tightLists]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb315-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb315-4" data-line-number="4"></a> +<a class="sourceLine" id="cb315-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb315-6" data-line-number="6"> renderers = {</a> +<a class="sourceLine" id="cb315-7" data-line-number="7"> interblockSeparator = {},</a> +<a class="sourceLine" id="cb315-8" data-line-number="8"> ulBeginTight = { (},</a> +<a class="sourceLine" id="cb315-9" data-line-number="9"> ulItem = {<span class="co">%</span></a> +<a class="sourceLine" id="cb315-10" data-line-number="10"> <span class="fu">\def</span>\markdownRendererUlItem{<span class="co">%</span></a> +<a class="sourceLine" id="cb315-11" data-line-number="11"> ,</a> +<a class="sourceLine" id="cb315-12" data-line-number="12"> \def\markdownRendererUlItem{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb315-13" data-line-number="13"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb315-14" data-line-number="14"> },</a> +<a class="sourceLine" id="cb315-15" data-line-number="15"> ulItemEnd = {},</a> +<a class="sourceLine" id="cb315-16" data-line-number="16"> ulEndTight = {).},</a> +<a class="sourceLine" id="cb315-17" data-line-number="17"> },</a> +<a class="sourceLine" id="cb315-18" data-line-number="18">}</a> +<a class="sourceLine" id="cb315-19" data-line-number="19">This is a tight list</a> +<a class="sourceLine" id="cb315-20" data-line-number="20"></a> +<a class="sourceLine" id="cb315-21" data-line-number="21">- the first item</a> +<a class="sourceLine" id="cb315-22" data-line-number="22">- the second item</a> +<a class="sourceLine" id="cb315-23" data-line-number="23">- the third item</a> +<a class="sourceLine" id="cb315-24" data-line-number="24"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb315-25" data-line-number="25"></a> +<a class="sourceLine" id="cb315-26" data-line-number="26"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb315-27" data-line-number="27"> renderers = {</a> +<a class="sourceLine" id="cb315-28" data-line-number="28"> interblockSeparator = {<span class="co">%</span></a> +<a class="sourceLine" id="cb315-29" data-line-number="29"> :<span class="fu">\par</span></a> +<a class="sourceLine" id="cb315-30" data-line-number="30"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb315-31" data-line-number="31"> },</a> +<a class="sourceLine" id="cb315-32" data-line-number="32"> ulBeginTight = {<span class="kw">\begin</span>{<span class="ex">itemize</span>}},</a> +<a class="sourceLine" id="cb315-33" data-line-number="33"> ulItem = {<span class="fu">\item</span>},</a> +<a class="sourceLine" id="cb315-34" data-line-number="34"> ulItemEnd = {.},</a> +<a class="sourceLine" id="cb315-35" data-line-number="35"> ulEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</a> +<a class="sourceLine" id="cb315-36" data-line-number="36"> },</a> +<a class="sourceLine" id="cb315-37" data-line-number="37">}</a> +<a class="sourceLine" id="cb315-38" data-line-number="38">This is a loose list</a> +<a class="sourceLine" id="cb315-39" data-line-number="39"></a> +<a class="sourceLine" id="cb315-40" data-line-number="40">- This is the first item</a> +<a class="sourceLine" id="cb315-41" data-line-number="41"></a> +<a class="sourceLine" id="cb315-42" data-line-number="42">- This is the second item</a> +<a class="sourceLine" id="cb315-43" data-line-number="43"></a> +<a class="sourceLine" id="cb315-44" data-line-number="44">- This is the third item</a> +<a class="sourceLine" id="cb315-45" data-line-number="45"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb315-46" data-line-number="46"></a> +<a class="sourceLine" id="cb315-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="cb316"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb316-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> @@ -4028,51 +4028,51 @@ multiple paragraphs</li> </blockquote> <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:</p> -<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">\usemodule</span>[t][markdown]</a> -<a class="sourceLine" id="cb315-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> -<a class="sourceLine" id="cb315-3" data-line-number="3"><span class="fu">\starttext</span></a> -<a class="sourceLine" id="cb315-4" data-line-number="4"></a> -<a class="sourceLine" id="cb315-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> -<a class="sourceLine" id="cb315-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererUlBeginTight{ (}</a> -<a class="sourceLine" id="cb315-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererUlItem{<span class="co">%</span></a> -<a class="sourceLine" id="cb315-8" data-line-number="8"> \def\markdownRendererUlItem{<span class="co">%</span></a> -<a class="sourceLine" id="cb315-9" data-line-number="9"> ,</a> -<a class="sourceLine" id="cb315-10" data-line-number="10"> \def\markdownRendererUlItem{, and }<span class="co">%</span></a> -<a class="sourceLine" id="cb315-11" data-line-number="11"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb315-12" data-line-number="12">}</a> -<a class="sourceLine" id="cb315-13" data-line-number="13"><span class="fu">\def</span>\markdownRendererUlItemEnd{}</a> -<a class="sourceLine" id="cb315-14" data-line-number="14"><span class="fu">\def</span>\markdownRendererUlEndTight{).}</a> -<a class="sourceLine" id="cb315-15" data-line-number="15"></a> -<a class="sourceLine" id="cb315-16" data-line-number="16"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb315-17" data-line-number="17">This is a tight list</a> -<a class="sourceLine" id="cb315-18" data-line-number="18"></a> -<a class="sourceLine" id="cb315-19" data-line-number="19">- the first item</a> -<a class="sourceLine" id="cb315-20" data-line-number="20">- the second item</a> -<a class="sourceLine" id="cb315-21" data-line-number="21">- the third item</a> -<a class="sourceLine" id="cb315-22" data-line-number="22"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb315-23" data-line-number="23"></a> -<a class="sourceLine" id="cb315-24" data-line-number="24"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> -<a class="sourceLine" id="cb315-25" data-line-number="25"> :\par</a> -<a class="sourceLine" id="cb315-26" data-line-number="26"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb315-27" data-line-number="27">}</a> -<a class="sourceLine" id="cb315-28" data-line-number="28"><span class="fu">\def</span>\markdownRendererUlBegin{\startitemize}</a> -<a class="sourceLine" id="cb315-29" data-line-number="29"><span class="fu">\def</span>\markdownRendererUlItem{\item}</a> -<a class="sourceLine" id="cb315-30" data-line-number="30"><span class="fu">\def</span>\markdownRendererUlItemEnd{.}</a> -<a class="sourceLine" id="cb315-31" data-line-number="31"><span class="fu">\def</span>\markdownRendererUlEnd{\stopitemize}</a> -<a class="sourceLine" id="cb315-32" data-line-number="32"></a> -<a class="sourceLine" id="cb315-33" data-line-number="33"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb315-34" data-line-number="34">This is a loose list</a> -<a class="sourceLine" id="cb315-35" data-line-number="35"></a> -<a class="sourceLine" id="cb315-36" data-line-number="36">- This is the first item</a> -<a class="sourceLine" id="cb315-37" data-line-number="37"></a> -<a class="sourceLine" id="cb315-38" data-line-number="38">- This is the second item</a> -<a class="sourceLine" id="cb315-39" data-line-number="39"></a> -<a class="sourceLine" id="cb315-40" data-line-number="40">- This is the third item</a> -<a class="sourceLine" id="cb315-41" data-line-number="41"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb315-42" data-line-number="42"></a> -<a class="sourceLine" id="cb315-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="cb316"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb316-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> +<div class="sourceCode" id="cb317"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb317-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb317-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> +<a class="sourceLine" id="cb317-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb317-4" data-line-number="4"></a> +<a class="sourceLine" id="cb317-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb317-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererUlBeginTight{ (}</a> +<a class="sourceLine" id="cb317-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererUlItem{<span class="co">%</span></a> +<a class="sourceLine" id="cb317-8" data-line-number="8"> \def\markdownRendererUlItem{<span class="co">%</span></a> +<a class="sourceLine" id="cb317-9" data-line-number="9"> ,</a> +<a class="sourceLine" id="cb317-10" data-line-number="10"> \def\markdownRendererUlItem{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb317-11" data-line-number="11"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb317-12" data-line-number="12">}</a> +<a class="sourceLine" id="cb317-13" data-line-number="13"><span class="fu">\def</span>\markdownRendererUlItemEnd{}</a> +<a class="sourceLine" id="cb317-14" data-line-number="14"><span class="fu">\def</span>\markdownRendererUlEndTight{).}</a> +<a class="sourceLine" id="cb317-15" data-line-number="15"></a> +<a class="sourceLine" id="cb317-16" data-line-number="16"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb317-17" data-line-number="17">This is a tight list</a> +<a class="sourceLine" id="cb317-18" data-line-number="18"></a> +<a class="sourceLine" id="cb317-19" data-line-number="19">- the first item</a> +<a class="sourceLine" id="cb317-20" data-line-number="20">- the second item</a> +<a class="sourceLine" id="cb317-21" data-line-number="21">- the third item</a> +<a class="sourceLine" id="cb317-22" data-line-number="22"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb317-23" data-line-number="23"></a> +<a class="sourceLine" id="cb317-24" data-line-number="24"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb317-25" data-line-number="25"> :\par</a> +<a class="sourceLine" id="cb317-26" data-line-number="26"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb317-27" data-line-number="27">}</a> +<a class="sourceLine" id="cb317-28" data-line-number="28"><span class="fu">\def</span>\markdownRendererUlBegin{\startitemize}</a> +<a class="sourceLine" id="cb317-29" data-line-number="29"><span class="fu">\def</span>\markdownRendererUlItem{\item}</a> +<a class="sourceLine" id="cb317-30" data-line-number="30"><span class="fu">\def</span>\markdownRendererUlItemEnd{.}</a> +<a class="sourceLine" id="cb317-31" data-line-number="31"><span class="fu">\def</span>\markdownRendererUlEnd{\stopitemize}</a> +<a class="sourceLine" id="cb317-32" data-line-number="32"></a> +<a class="sourceLine" id="cb317-33" data-line-number="33"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb317-34" data-line-number="34">This is a loose list</a> +<a class="sourceLine" id="cb317-35" data-line-number="35"></a> +<a class="sourceLine" id="cb317-36" data-line-number="36">- This is the first item</a> +<a class="sourceLine" id="cb317-37" data-line-number="37"></a> +<a class="sourceLine" id="cb317-38" data-line-number="38">- This is the second item</a> +<a class="sourceLine" id="cb317-39" data-line-number="39"></a> +<a class="sourceLine" id="cb317-40" data-line-number="40">- This is the third item</a> +<a class="sourceLine" id="cb317-41" data-line-number="41"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb317-42" data-line-number="42"></a> +<a class="sourceLine" id="cb317-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="cb318"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb318-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> @@ -4093,68 +4093,68 @@ multiple paragraphs</li> <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 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="cb317"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb317-1" data-line-number="1"><span class="fu">\input</span> markdown</a> -<a class="sourceLine" id="cb317-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> -<a class="sourceLine" id="cb317-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionStartNumber{true}</a> -<a class="sourceLine" id="cb317-4" data-line-number="4"></a> -<a class="sourceLine" id="cb317-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> -<a class="sourceLine" id="cb317-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererOlBeginTight{ (}</a> -<a class="sourceLine" id="cb317-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> -<a class="sourceLine" id="cb317-8" data-line-number="8"> \ifnum #1=1\relax</a> -<a class="sourceLine" id="cb317-9" data-line-number="9"> the first</a> -<a class="sourceLine" id="cb317-10" data-line-number="10"> \else</a> -<a class="sourceLine" id="cb317-11" data-line-number="11"> \ifnum #1=2\relax</a> -<a class="sourceLine" id="cb317-12" data-line-number="12"> , the second</a> -<a class="sourceLine" id="cb317-13" data-line-number="13"> \else</a> -<a class="sourceLine" id="cb317-14" data-line-number="14"> , and the third</a> -<a class="sourceLine" id="cb317-15" data-line-number="15"> \fi</a> -<a class="sourceLine" id="cb317-16" data-line-number="16"> \fi</a> -<a class="sourceLine" id="cb317-17" data-line-number="17">}</a> -<a class="sourceLine" id="cb317-18" data-line-number="18"><span class="fu">\def</span>\markdownRendererOlItemEnd{}</a> -<a class="sourceLine" id="cb317-19" data-line-number="19"><span class="fu">\def</span>\markdownRendererOlEndTight{).}</a> -<a class="sourceLine" id="cb317-20" data-line-number="20"></a> -<a class="sourceLine" id="cb317-21" data-line-number="21"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb317-22" data-line-number="22">This is a tight list</a> -<a class="sourceLine" id="cb317-23" data-line-number="23"></a> -<a class="sourceLine" id="cb317-24" data-line-number="24">1. item</a> -<a class="sourceLine" id="cb317-25" data-line-number="25">2. item</a> -<a class="sourceLine" id="cb317-26" data-line-number="26">3. item</a> -<a class="sourceLine" id="cb317-27" data-line-number="27"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb317-28" data-line-number="28"></a> -<a class="sourceLine" id="cb317-29" data-line-number="29"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> -<a class="sourceLine" id="cb317-30" data-line-number="30"> :\par</a> -<a class="sourceLine" id="cb317-31" data-line-number="31"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb317-32" data-line-number="32">}</a> -<a class="sourceLine" id="cb317-33" data-line-number="33"><span class="fu">\def</span>\markdownRendererOlBegin{}</a> -<a class="sourceLine" id="cb317-34" data-line-number="34"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> -<a class="sourceLine" id="cb317-35" data-line-number="35"> #1.\kern 0.5em<span class="co">%</span></a> -<a class="sourceLine" id="cb317-36" data-line-number="36"> This is the</a> -<a class="sourceLine" id="cb317-37" data-line-number="37"> \ifnum #1=1\relax</a> -<a class="sourceLine" id="cb317-38" data-line-number="38"> first</a> -<a class="sourceLine" id="cb317-39" data-line-number="39"> \else</a> -<a class="sourceLine" id="cb317-40" data-line-number="40"> \ifnum #1=2\relax</a> -<a class="sourceLine" id="cb317-41" data-line-number="41"> second</a> -<a class="sourceLine" id="cb317-42" data-line-number="42"> \else</a> -<a class="sourceLine" id="cb317-43" data-line-number="43"> third</a> -<a class="sourceLine" id="cb317-44" data-line-number="44"> \fi</a> -<a class="sourceLine" id="cb317-45" data-line-number="45"> \fi</a> -<a class="sourceLine" id="cb317-46" data-line-number="46">}</a> -<a class="sourceLine" id="cb317-47" data-line-number="47"><span class="fu">\def</span>\markdownRendererOlItemEnd{.\par}</a> -<a class="sourceLine" id="cb317-48" data-line-number="48"><span class="fu">\def</span>\markdownRendererOlEnd{}</a> -<a class="sourceLine" id="cb317-49" data-line-number="49"></a> -<a class="sourceLine" id="cb317-50" data-line-number="50"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb317-51" data-line-number="51">This is a loose list</a> -<a class="sourceLine" id="cb317-52" data-line-number="52"></a> -<a class="sourceLine" id="cb317-53" data-line-number="53">1. item</a> -<a class="sourceLine" id="cb317-54" data-line-number="54"></a> -<a class="sourceLine" id="cb317-55" data-line-number="55">2. item</a> -<a class="sourceLine" id="cb317-56" data-line-number="56"></a> -<a class="sourceLine" id="cb317-57" data-line-number="57">3. item</a> -<a class="sourceLine" id="cb317-58" data-line-number="58"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb317-59" data-line-number="59"></a> -<a class="sourceLine" id="cb317-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="cb318"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb318-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> +<div class="sourceCode" id="cb319"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb319-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb319-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> +<a class="sourceLine" id="cb319-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionStartNumber{true}</a> +<a class="sourceLine" id="cb319-4" data-line-number="4"></a> +<a class="sourceLine" id="cb319-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb319-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererOlBeginTight{ (}</a> +<a class="sourceLine" id="cb319-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb319-8" data-line-number="8"> \ifnum #1=1\relax</a> +<a class="sourceLine" id="cb319-9" data-line-number="9"> the first</a> +<a class="sourceLine" id="cb319-10" data-line-number="10"> \else</a> +<a class="sourceLine" id="cb319-11" data-line-number="11"> \ifnum #1=2\relax</a> +<a class="sourceLine" id="cb319-12" data-line-number="12"> , the second</a> +<a class="sourceLine" id="cb319-13" data-line-number="13"> \else</a> +<a class="sourceLine" id="cb319-14" data-line-number="14"> , and the third</a> +<a class="sourceLine" id="cb319-15" data-line-number="15"> \fi</a> +<a class="sourceLine" id="cb319-16" data-line-number="16"> \fi</a> +<a class="sourceLine" id="cb319-17" data-line-number="17">}</a> +<a class="sourceLine" id="cb319-18" data-line-number="18"><span class="fu">\def</span>\markdownRendererOlItemEnd{}</a> +<a class="sourceLine" id="cb319-19" data-line-number="19"><span class="fu">\def</span>\markdownRendererOlEndTight{).}</a> +<a class="sourceLine" id="cb319-20" data-line-number="20"></a> +<a class="sourceLine" id="cb319-21" data-line-number="21"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb319-22" data-line-number="22">This is a tight list</a> +<a class="sourceLine" id="cb319-23" data-line-number="23"></a> +<a class="sourceLine" id="cb319-24" data-line-number="24">1. item</a> +<a class="sourceLine" id="cb319-25" data-line-number="25">2. item</a> +<a class="sourceLine" id="cb319-26" data-line-number="26">3. item</a> +<a class="sourceLine" id="cb319-27" data-line-number="27"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb319-28" data-line-number="28"></a> +<a class="sourceLine" id="cb319-29" data-line-number="29"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb319-30" data-line-number="30"> :\par</a> +<a class="sourceLine" id="cb319-31" data-line-number="31"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb319-32" data-line-number="32">}</a> +<a class="sourceLine" id="cb319-33" data-line-number="33"><span class="fu">\def</span>\markdownRendererOlBegin{}</a> +<a class="sourceLine" id="cb319-34" data-line-number="34"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb319-35" data-line-number="35"> #1.\kern 0.5em<span class="co">%</span></a> +<a class="sourceLine" id="cb319-36" data-line-number="36"> This is the</a> +<a class="sourceLine" id="cb319-37" data-line-number="37"> \ifnum #1=1\relax</a> +<a class="sourceLine" id="cb319-38" data-line-number="38"> first</a> +<a class="sourceLine" id="cb319-39" data-line-number="39"> \else</a> +<a class="sourceLine" id="cb319-40" data-line-number="40"> \ifnum #1=2\relax</a> +<a class="sourceLine" id="cb319-41" data-line-number="41"> second</a> +<a class="sourceLine" id="cb319-42" data-line-number="42"> \else</a> +<a class="sourceLine" id="cb319-43" data-line-number="43"> third</a> +<a class="sourceLine" id="cb319-44" data-line-number="44"> \fi</a> +<a class="sourceLine" id="cb319-45" data-line-number="45"> \fi</a> +<a class="sourceLine" id="cb319-46" data-line-number="46">}</a> +<a class="sourceLine" id="cb319-47" data-line-number="47"><span class="fu">\def</span>\markdownRendererOlItemEnd{.\par}</a> +<a class="sourceLine" id="cb319-48" data-line-number="48"><span class="fu">\def</span>\markdownRendererOlEnd{}</a> +<a class="sourceLine" id="cb319-49" data-line-number="49"></a> +<a class="sourceLine" id="cb319-50" data-line-number="50"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb319-51" data-line-number="51">This is a loose list</a> +<a class="sourceLine" id="cb319-52" data-line-number="52"></a> +<a class="sourceLine" id="cb319-53" data-line-number="53">1. item</a> +<a class="sourceLine" id="cb319-54" data-line-number="54"></a> +<a class="sourceLine" id="cb319-55" data-line-number="55">2. item</a> +<a class="sourceLine" id="cb319-56" data-line-number="56"></a> +<a class="sourceLine" id="cb319-57" data-line-number="57">3. item</a> +<a class="sourceLine" id="cb319-58" data-line-number="58"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb319-59" data-line-number="59"></a> +<a class="sourceLine" id="cb319-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="cb320"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb320-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> @@ -4167,71 +4167,71 @@ multiple paragraphs</li> </blockquote> <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.tex</code> with the following content:</p> -<div class="sourceCode" id="cb319"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb319-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb319-2" data-line-number="2"><span class="bu">\usepackage</span>[tightLists, startNumber]{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb319-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb319-4" data-line-number="4"></a> -<a class="sourceLine" id="cb319-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> -<a class="sourceLine" id="cb319-6" data-line-number="6"> renderers = {</a> -<a class="sourceLine" id="cb319-7" data-line-number="7"> interblockSeparator = {},</a> -<a class="sourceLine" id="cb319-8" data-line-number="8"> olBeginTight = { (},</a> -<a class="sourceLine" id="cb319-9" data-line-number="9"> olItemWithNumber = {<span class="co">%</span></a> -<a class="sourceLine" id="cb319-10" data-line-number="10"> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></a> -<a class="sourceLine" id="cb319-11" data-line-number="11"> the first</a> -<a class="sourceLine" id="cb319-12" data-line-number="12"> <span class="fu">\else</span></a> -<a class="sourceLine" id="cb319-13" data-line-number="13"> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></a> -<a class="sourceLine" id="cb319-14" data-line-number="14"> , the second</a> -<a class="sourceLine" id="cb319-15" data-line-number="15"> <span class="fu">\else</span></a> -<a class="sourceLine" id="cb319-16" data-line-number="16"> , and the third</a> -<a class="sourceLine" id="cb319-17" data-line-number="17"> <span class="fu">\fi</span></a> -<a class="sourceLine" id="cb319-18" data-line-number="18"> <span class="fu">\fi</span></a> -<a class="sourceLine" id="cb319-19" data-line-number="19"> },</a> -<a class="sourceLine" id="cb319-20" data-line-number="20"> olItemEnd = {},</a> -<a class="sourceLine" id="cb319-21" data-line-number="21"> olEndTight = {).},</a> -<a class="sourceLine" id="cb319-22" data-line-number="22"> },</a> -<a class="sourceLine" id="cb319-23" data-line-number="23">}</a> -<a class="sourceLine" id="cb319-24" data-line-number="24">This is a tight list</a> -<a class="sourceLine" id="cb319-25" data-line-number="25"></a> -<a class="sourceLine" id="cb319-26" data-line-number="26">1. item</a> -<a class="sourceLine" id="cb319-27" data-line-number="27">2. item</a> -<a class="sourceLine" id="cb319-28" data-line-number="28">3. item</a> -<a class="sourceLine" id="cb319-29" data-line-number="29"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> -<a class="sourceLine" id="cb319-30" data-line-number="30"></a> -<a class="sourceLine" id="cb319-31" data-line-number="31"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> -<a class="sourceLine" id="cb319-32" data-line-number="32"> renderers = {</a> -<a class="sourceLine" id="cb319-33" data-line-number="33"> interblockSeparator = {<span class="co">%</span></a> -<a class="sourceLine" id="cb319-34" data-line-number="34"> :<span class="fu">\par</span></a> -<a class="sourceLine" id="cb319-35" data-line-number="35"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb319-36" data-line-number="36"> },</a> -<a class="sourceLine" id="cb319-37" data-line-number="37"> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</a> -<a class="sourceLine" id="cb319-38" data-line-number="38"> olItemWithNumber = {<span class="co">%</span></a> -<a class="sourceLine" id="cb319-39" data-line-number="39"> <span class="fu">\item</span> This is the</a> -<a class="sourceLine" id="cb319-40" data-line-number="40"> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></a> -<a class="sourceLine" id="cb319-41" data-line-number="41"> first</a> -<a class="sourceLine" id="cb319-42" data-line-number="42"> <span class="fu">\else</span></a> -<a class="sourceLine" id="cb319-43" data-line-number="43"> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></a> -<a class="sourceLine" id="cb319-44" data-line-number="44"> second</a> -<a class="sourceLine" id="cb319-45" data-line-number="45"> <span class="fu">\else</span></a> -<a class="sourceLine" id="cb319-46" data-line-number="46"> third</a> -<a class="sourceLine" id="cb319-47" data-line-number="47"> <span class="fu">\fi</span></a> -<a class="sourceLine" id="cb319-48" data-line-number="48"> <span class="fu">\fi</span></a> -<a class="sourceLine" id="cb319-49" data-line-number="49"> },</a> -<a class="sourceLine" id="cb319-50" data-line-number="50"> olItemEnd = {.},</a> -<a class="sourceLine" id="cb319-51" data-line-number="51"> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</a> -<a class="sourceLine" id="cb319-52" data-line-number="52"> },</a> -<a class="sourceLine" id="cb319-53" data-line-number="53">}</a> -<a class="sourceLine" id="cb319-54" data-line-number="54">This is a loose list</a> -<a class="sourceLine" id="cb319-55" data-line-number="55"></a> -<a class="sourceLine" id="cb319-56" data-line-number="56">1. item</a> -<a class="sourceLine" id="cb319-57" data-line-number="57"></a> -<a class="sourceLine" id="cb319-58" data-line-number="58">2. item</a> -<a class="sourceLine" id="cb319-59" data-line-number="59"></a> -<a class="sourceLine" id="cb319-60" data-line-number="60">3. item</a> -<a class="sourceLine" id="cb319-61" data-line-number="61"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> -<a class="sourceLine" id="cb319-62" data-line-number="62"></a> -<a class="sourceLine" id="cb319-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="cb320"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb320-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> +<div class="sourceCode" id="cb321"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb321-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb321-2" data-line-number="2"><span class="bu">\usepackage</span>[tightLists, startNumber]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb321-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb321-4" data-line-number="4"></a> +<a class="sourceLine" id="cb321-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb321-6" data-line-number="6"> renderers = {</a> +<a class="sourceLine" id="cb321-7" data-line-number="7"> interblockSeparator = {},</a> +<a class="sourceLine" id="cb321-8" data-line-number="8"> olBeginTight = { (},</a> +<a class="sourceLine" id="cb321-9" data-line-number="9"> olItemWithNumber = {<span class="co">%</span></a> +<a class="sourceLine" id="cb321-10" data-line-number="10"> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></a> +<a class="sourceLine" id="cb321-11" data-line-number="11"> the first</a> +<a class="sourceLine" id="cb321-12" data-line-number="12"> <span class="fu">\else</span></a> +<a class="sourceLine" id="cb321-13" data-line-number="13"> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></a> +<a class="sourceLine" id="cb321-14" data-line-number="14"> , the second</a> +<a class="sourceLine" id="cb321-15" data-line-number="15"> <span class="fu">\else</span></a> +<a class="sourceLine" id="cb321-16" data-line-number="16"> , and the third</a> +<a class="sourceLine" id="cb321-17" data-line-number="17"> <span class="fu">\fi</span></a> +<a class="sourceLine" id="cb321-18" data-line-number="18"> <span class="fu">\fi</span></a> +<a class="sourceLine" id="cb321-19" data-line-number="19"> },</a> +<a class="sourceLine" id="cb321-20" data-line-number="20"> olItemEnd = {},</a> +<a class="sourceLine" id="cb321-21" data-line-number="21"> olEndTight = {).},</a> +<a class="sourceLine" id="cb321-22" data-line-number="22"> },</a> +<a class="sourceLine" id="cb321-23" data-line-number="23">}</a> +<a class="sourceLine" id="cb321-24" data-line-number="24">This is a tight list</a> +<a class="sourceLine" id="cb321-25" data-line-number="25"></a> +<a class="sourceLine" id="cb321-26" data-line-number="26">1. item</a> +<a class="sourceLine" id="cb321-27" data-line-number="27">2. item</a> +<a class="sourceLine" id="cb321-28" data-line-number="28">3. item</a> +<a class="sourceLine" id="cb321-29" data-line-number="29"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb321-30" data-line-number="30"></a> +<a class="sourceLine" id="cb321-31" data-line-number="31"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb321-32" data-line-number="32"> renderers = {</a> +<a class="sourceLine" id="cb321-33" data-line-number="33"> interblockSeparator = {<span class="co">%</span></a> +<a class="sourceLine" id="cb321-34" data-line-number="34"> :<span class="fu">\par</span></a> +<a class="sourceLine" id="cb321-35" data-line-number="35"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb321-36" data-line-number="36"> },</a> +<a class="sourceLine" id="cb321-37" data-line-number="37"> olBeginTight = {<span class="kw">\begin</span>{<span class="ex">enumerate</span>}},</a> +<a class="sourceLine" id="cb321-38" data-line-number="38"> olItemWithNumber = {<span class="co">%</span></a> +<a class="sourceLine" id="cb321-39" data-line-number="39"> <span class="fu">\item</span> This is the</a> +<a class="sourceLine" id="cb321-40" data-line-number="40"> <span class="fu">\ifnum</span> #1=1<span class="fu">\relax</span></a> +<a class="sourceLine" id="cb321-41" data-line-number="41"> first</a> +<a class="sourceLine" id="cb321-42" data-line-number="42"> <span class="fu">\else</span></a> +<a class="sourceLine" id="cb321-43" data-line-number="43"> <span class="fu">\ifnum</span> #1=2<span class="fu">\relax</span></a> +<a class="sourceLine" id="cb321-44" data-line-number="44"> second</a> +<a class="sourceLine" id="cb321-45" data-line-number="45"> <span class="fu">\else</span></a> +<a class="sourceLine" id="cb321-46" data-line-number="46"> third</a> +<a class="sourceLine" id="cb321-47" data-line-number="47"> <span class="fu">\fi</span></a> +<a class="sourceLine" id="cb321-48" data-line-number="48"> <span class="fu">\fi</span></a> +<a class="sourceLine" id="cb321-49" data-line-number="49"> },</a> +<a class="sourceLine" id="cb321-50" data-line-number="50"> olItemEnd = {.},</a> +<a class="sourceLine" id="cb321-51" data-line-number="51"> olEnd = {<span class="kw">\end</span>{<span class="ex">enumerate</span>}},</a> +<a class="sourceLine" id="cb321-52" data-line-number="52"> },</a> +<a class="sourceLine" id="cb321-53" data-line-number="53">}</a> +<a class="sourceLine" id="cb321-54" data-line-number="54">This is a loose list</a> +<a class="sourceLine" id="cb321-55" data-line-number="55"></a> +<a class="sourceLine" id="cb321-56" data-line-number="56">1. item</a> +<a class="sourceLine" id="cb321-57" data-line-number="57"></a> +<a class="sourceLine" id="cb321-58" data-line-number="58">2. item</a> +<a class="sourceLine" id="cb321-59" data-line-number="59"></a> +<a class="sourceLine" id="cb321-60" data-line-number="60">3. item</a> +<a class="sourceLine" id="cb321-61" data-line-number="61"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb321-62" data-line-number="62"></a> +<a class="sourceLine" id="cb321-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="cb322"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb322-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> @@ -4244,69 +4244,69 @@ multiple paragraphs</li> </blockquote> <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="cb321"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb321-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> -<a class="sourceLine" id="cb321-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> -<a class="sourceLine" id="cb321-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionStartNumber{true}</a> -<a class="sourceLine" id="cb321-4" data-line-number="4"><span class="fu">\starttext</span></a> -<a class="sourceLine" id="cb321-5" data-line-number="5"></a> -<a class="sourceLine" id="cb321-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> -<a class="sourceLine" id="cb321-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererOlBeginTight{ (}</a> -<a class="sourceLine" id="cb321-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> -<a class="sourceLine" id="cb321-9" data-line-number="9"> \ifnum #1=1\relax</a> -<a class="sourceLine" id="cb321-10" data-line-number="10"> the first</a> -<a class="sourceLine" id="cb321-11" data-line-number="11"> \else</a> -<a class="sourceLine" id="cb321-12" data-line-number="12"> \ifnum #1=2\relax</a> -<a class="sourceLine" id="cb321-13" data-line-number="13"> , the second</a> -<a class="sourceLine" id="cb321-14" data-line-number="14"> \else</a> -<a class="sourceLine" id="cb321-15" data-line-number="15"> , and the third</a> -<a class="sourceLine" id="cb321-16" data-line-number="16"> \fi</a> -<a class="sourceLine" id="cb321-17" data-line-number="17"> \fi</a> -<a class="sourceLine" id="cb321-18" data-line-number="18">}</a> -<a class="sourceLine" id="cb321-19" data-line-number="19"><span class="fu">\def</span>\markdownRendererOlItemEnd{}</a> -<a class="sourceLine" id="cb321-20" data-line-number="20"><span class="fu">\def</span>\markdownRendererOlEndTight{).}</a> -<a class="sourceLine" id="cb321-21" data-line-number="21"></a> -<a class="sourceLine" id="cb321-22" data-line-number="22"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb321-23" data-line-number="23">This is a tight list</a> -<a class="sourceLine" id="cb321-24" data-line-number="24"></a> -<a class="sourceLine" id="cb321-25" data-line-number="25">1. item</a> -<a class="sourceLine" id="cb321-26" data-line-number="26">2. item</a> -<a class="sourceLine" id="cb321-27" data-line-number="27">3. item</a> -<a class="sourceLine" id="cb321-28" data-line-number="28"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb321-29" data-line-number="29"></a> -<a class="sourceLine" id="cb321-30" data-line-number="30"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> -<a class="sourceLine" id="cb321-31" data-line-number="31"> :\par</a> -<a class="sourceLine" id="cb321-32" data-line-number="32"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb321-33" data-line-number="33">}</a> -<a class="sourceLine" id="cb321-34" data-line-number="34"><span class="fu">\def</span>\markdownRendererOlBegin{\startitemize}</a> -<a class="sourceLine" id="cb321-35" data-line-number="35"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> -<a class="sourceLine" id="cb321-36" data-line-number="36"> \sym{#1.}</a> -<a class="sourceLine" id="cb321-37" data-line-number="37"> This is the</a> -<a class="sourceLine" id="cb321-38" data-line-number="38"> \ifnum #1=1\relax</a> -<a class="sourceLine" id="cb321-39" data-line-number="39"> first</a> -<a class="sourceLine" id="cb321-40" data-line-number="40"> \else</a> -<a class="sourceLine" id="cb321-41" data-line-number="41"> \ifnum #1=2\relax</a> -<a class="sourceLine" id="cb321-42" data-line-number="42"> second</a> -<a class="sourceLine" id="cb321-43" data-line-number="43"> \else</a> -<a class="sourceLine" id="cb321-44" data-line-number="44"> third</a> -<a class="sourceLine" id="cb321-45" data-line-number="45"> \fi</a> -<a class="sourceLine" id="cb321-46" data-line-number="46"> \fi</a> -<a class="sourceLine" id="cb321-47" data-line-number="47">}</a> -<a class="sourceLine" id="cb321-48" data-line-number="48"><span class="fu">\def</span>\markdownRendererOlItemEnd{.\par}</a> -<a class="sourceLine" id="cb321-49" data-line-number="49"><span class="fu">\def</span>\markdownRendererOlEnd{\stopitemize}</a> -<a class="sourceLine" id="cb321-50" data-line-number="50"></a> -<a class="sourceLine" id="cb321-51" data-line-number="51"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb321-52" data-line-number="52">This is a loose list</a> -<a class="sourceLine" id="cb321-53" data-line-number="53"></a> -<a class="sourceLine" id="cb321-54" data-line-number="54">1. item</a> -<a class="sourceLine" id="cb321-55" data-line-number="55"></a> -<a class="sourceLine" id="cb321-56" data-line-number="56">2. item</a> -<a class="sourceLine" id="cb321-57" data-line-number="57"></a> -<a class="sourceLine" id="cb321-58" data-line-number="58">3. item</a> -<a class="sourceLine" id="cb321-59" data-line-number="59"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb321-60" data-line-number="60"></a> -<a class="sourceLine" id="cb321-61" data-line-number="61"><span class="fu">\stoptext</span></a></code></pre></div> +<div class="sourceCode" id="cb323"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb323-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb323-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> +<a class="sourceLine" id="cb323-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionStartNumber{true}</a> +<a class="sourceLine" id="cb323-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb323-5" data-line-number="5"></a> +<a class="sourceLine" id="cb323-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb323-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererOlBeginTight{ (}</a> +<a class="sourceLine" id="cb323-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb323-9" data-line-number="9"> \ifnum #1=1\relax</a> +<a class="sourceLine" id="cb323-10" data-line-number="10"> the first</a> +<a class="sourceLine" id="cb323-11" data-line-number="11"> \else</a> +<a class="sourceLine" id="cb323-12" data-line-number="12"> \ifnum #1=2\relax</a> +<a class="sourceLine" id="cb323-13" data-line-number="13"> , the second</a> +<a class="sourceLine" id="cb323-14" data-line-number="14"> \else</a> +<a class="sourceLine" id="cb323-15" data-line-number="15"> , and the third</a> +<a class="sourceLine" id="cb323-16" data-line-number="16"> \fi</a> +<a class="sourceLine" id="cb323-17" data-line-number="17"> \fi</a> +<a class="sourceLine" id="cb323-18" data-line-number="18">}</a> +<a class="sourceLine" id="cb323-19" data-line-number="19"><span class="fu">\def</span>\markdownRendererOlItemEnd{}</a> +<a class="sourceLine" id="cb323-20" data-line-number="20"><span class="fu">\def</span>\markdownRendererOlEndTight{).}</a> +<a class="sourceLine" id="cb323-21" data-line-number="21"></a> +<a class="sourceLine" id="cb323-22" data-line-number="22"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb323-23" data-line-number="23">This is a tight list</a> +<a class="sourceLine" id="cb323-24" data-line-number="24"></a> +<a class="sourceLine" id="cb323-25" data-line-number="25">1. item</a> +<a class="sourceLine" id="cb323-26" data-line-number="26">2. item</a> +<a class="sourceLine" id="cb323-27" data-line-number="27">3. item</a> +<a class="sourceLine" id="cb323-28" data-line-number="28"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb323-29" data-line-number="29"></a> +<a class="sourceLine" id="cb323-30" data-line-number="30"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb323-31" data-line-number="31"> :\par</a> +<a class="sourceLine" id="cb323-32" data-line-number="32"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb323-33" data-line-number="33">}</a> +<a class="sourceLine" id="cb323-34" data-line-number="34"><span class="fu">\def</span>\markdownRendererOlBegin{\startitemize}</a> +<a class="sourceLine" id="cb323-35" data-line-number="35"><span class="fu">\def</span>\markdownRendererOlItemWithNumber#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb323-36" data-line-number="36"> \sym{#1.}</a> +<a class="sourceLine" id="cb323-37" data-line-number="37"> This is the</a> +<a class="sourceLine" id="cb323-38" data-line-number="38"> \ifnum #1=1\relax</a> +<a class="sourceLine" id="cb323-39" data-line-number="39"> first</a> +<a class="sourceLine" id="cb323-40" data-line-number="40"> \else</a> +<a class="sourceLine" id="cb323-41" data-line-number="41"> \ifnum #1=2\relax</a> +<a class="sourceLine" id="cb323-42" data-line-number="42"> second</a> +<a class="sourceLine" id="cb323-43" data-line-number="43"> \else</a> +<a class="sourceLine" id="cb323-44" data-line-number="44"> third</a> +<a class="sourceLine" id="cb323-45" data-line-number="45"> \fi</a> +<a class="sourceLine" id="cb323-46" data-line-number="46"> \fi</a> +<a class="sourceLine" id="cb323-47" data-line-number="47">}</a> +<a class="sourceLine" id="cb323-48" data-line-number="48"><span class="fu">\def</span>\markdownRendererOlItemEnd{.\par}</a> +<a class="sourceLine" id="cb323-49" data-line-number="49"><span class="fu">\def</span>\markdownRendererOlEnd{\stopitemize}</a> +<a class="sourceLine" id="cb323-50" data-line-number="50"></a> +<a class="sourceLine" id="cb323-51" data-line-number="51"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb323-52" data-line-number="52">This is a loose list</a> +<a class="sourceLine" id="cb323-53" data-line-number="53"></a> +<a class="sourceLine" id="cb323-54" data-line-number="54">1. item</a> +<a class="sourceLine" id="cb323-55" data-line-number="55"></a> +<a class="sourceLine" id="cb323-56" data-line-number="56">2. item</a> +<a class="sourceLine" id="cb323-57" data-line-number="57"></a> +<a class="sourceLine" id="cb323-58" data-line-number="58">3. item</a> +<a class="sourceLine" id="cb323-59" data-line-number="59"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb323-60" data-line-number="60"></a> +<a class="sourceLine" id="cb323-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="cb322"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb322-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> +<div class="sourceCode" id="cb324"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb324-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> @@ -4329,132 +4329,33 @@ multiple paragraphs</li> <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 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="cb323"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb323-1" data-line-number="1"><span class="fu">\input</span> markdown</a> -<a class="sourceLine" id="cb323-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionDefinitionLists{true}</a> -<a class="sourceLine" id="cb323-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> -<a class="sourceLine" id="cb323-4" data-line-number="4"></a> -<a class="sourceLine" id="cb323-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> -<a class="sourceLine" id="cb323-6" data-line-number="6"> :<span class="co">%</span></a> -<a class="sourceLine" id="cb323-7" data-line-number="7"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb323-8" data-line-number="8">}</a> -<a class="sourceLine" id="cb323-9" data-line-number="9"><span class="fu">\def</span>\markdownRendererDlBeginTight{<span class="co">%</span></a> -<a class="sourceLine" id="cb323-10" data-line-number="10"> \begingroup</a> -<a class="sourceLine" id="cb323-11" data-line-number="11"> \parindent=0pt</a> -<a class="sourceLine" id="cb323-12" data-line-number="12">}</a> -<a class="sourceLine" id="cb323-13" data-line-number="13"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> -<a class="sourceLine" id="cb323-14" data-line-number="14"> \par{\bf#1}<span class="co">%</span></a> -<a class="sourceLine" id="cb323-15" data-line-number="15"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> -<a class="sourceLine" id="cb323-16" data-line-number="16"> ,</a> -<a class="sourceLine" id="cb323-17" data-line-number="17"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> -<a class="sourceLine" id="cb323-18" data-line-number="18"> , and</a> -<a class="sourceLine" id="cb323-19" data-line-number="19"> \def\markdownRendererDlDefinitionEnd{.}<span class="co">%</span></a> -<a class="sourceLine" id="cb323-20" data-line-number="20"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb323-21" data-line-number="21"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb323-22" data-line-number="22">}</a> -<a class="sourceLine" id="cb323-23" data-line-number="23"><span class="fu">\def</span>\markdownRendererDlItemEnd{}</a> -<a class="sourceLine" id="cb323-24" data-line-number="24"><span class="fu">\def</span>\markdownRendererDlDefinitionBegin{\par--\kern 0.5em}</a> -<a class="sourceLine" id="cb323-25" data-line-number="25"><span class="fu">\def</span>\markdownRendererDlEndTight{\endgroup}</a> -<a class="sourceLine" id="cb323-26" data-line-number="26"></a> -<a class="sourceLine" id="cb323-27" data-line-number="27"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb323-28" data-line-number="28">This is a tight definition list</a> -<a class="sourceLine" id="cb323-29" data-line-number="29"></a> -<a class="sourceLine" id="cb323-30" data-line-number="30">Coffee</a> -<a class="sourceLine" id="cb323-31" data-line-number="31">: black hot drink</a> -<a class="sourceLine" id="cb323-32" data-line-number="32">: prepared from roasted coffee beans</a> -<a class="sourceLine" id="cb323-33" data-line-number="33">: one of the most traded agricultural commodities in the world</a> -<a class="sourceLine" id="cb323-34" data-line-number="34"></a> -<a class="sourceLine" id="cb323-35" data-line-number="35">Milk</a> -<a class="sourceLine" id="cb323-36" data-line-number="36">: white cold drink</a> -<a class="sourceLine" id="cb323-37" data-line-number="37">: nutrient-rich</a> -<a class="sourceLine" id="cb323-38" data-line-number="38">: produced on an industrial scale</a> -<a class="sourceLine" id="cb323-39" data-line-number="39"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb323-40" data-line-number="40"></a> -<a class="sourceLine" id="cb323-41" data-line-number="41"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> -<a class="sourceLine" id="cb323-42" data-line-number="42"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb323-43" data-line-number="43">}</a> -<a class="sourceLine" id="cb323-44" data-line-number="44"><span class="fu">\def</span>\markdownRendererDlBegin{}</a> -<a class="sourceLine" id="cb323-45" data-line-number="45"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> -<a class="sourceLine" id="cb323-46" data-line-number="46"> . #1 is a</a> -<a class="sourceLine" id="cb323-47" data-line-number="47"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> -<a class="sourceLine" id="cb323-48" data-line-number="48"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> -<a class="sourceLine" id="cb323-49" data-line-number="49"> ,</a> -<a class="sourceLine" id="cb323-50" data-line-number="50"> \def\markdownRendererDlDefinitionBegin{, and }<span class="co">%</span></a> -<a class="sourceLine" id="cb323-51" data-line-number="51"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb323-52" data-line-number="52"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb323-53" data-line-number="53">}</a> -<a class="sourceLine" id="cb323-54" data-line-number="54"><span class="fu">\def</span>\markdownRendererDlItemEnd{}</a> -<a class="sourceLine" id="cb323-55" data-line-number="55"><span class="fu">\def</span>\markdownRendererDlDefinitionEnd{}</a> -<a class="sourceLine" id="cb323-56" data-line-number="56"><span class="fu">\def</span>\markdownRendererDlEnd{.}</a> -<a class="sourceLine" id="cb323-57" data-line-number="57"></a> -<a class="sourceLine" id="cb323-58" data-line-number="58"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb323-59" data-line-number="59">This is a loose definition list</a> -<a class="sourceLine" id="cb323-60" data-line-number="60"></a> -<a class="sourceLine" id="cb323-61" data-line-number="61">Coffee</a> -<a class="sourceLine" id="cb323-62" data-line-number="62"></a> -<a class="sourceLine" id="cb323-63" data-line-number="63">: black hot drink</a> -<a class="sourceLine" id="cb323-64" data-line-number="64"></a> -<a class="sourceLine" id="cb323-65" data-line-number="65">: prepared from roasted coffee beans</a> -<a class="sourceLine" id="cb323-66" data-line-number="66"></a> -<a class="sourceLine" id="cb323-67" data-line-number="67">: one of the most traded agricultural commodities in the world</a> -<a class="sourceLine" id="cb323-68" data-line-number="68"></a> -<a class="sourceLine" id="cb323-69" data-line-number="69">Milk</a> -<a class="sourceLine" id="cb323-70" data-line-number="70"></a> -<a class="sourceLine" id="cb323-71" data-line-number="71">: white cold drink</a> -<a class="sourceLine" id="cb323-72" data-line-number="72"></a> -<a class="sourceLine" id="cb323-73" data-line-number="73">: nutrient-rich</a> -<a class="sourceLine" id="cb323-74" data-line-number="74"></a> -<a class="sourceLine" id="cb323-75" data-line-number="75">: produced on an industrial scale</a> -<a class="sourceLine" id="cb323-76" data-line-number="76"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb323-77" data-line-number="77"></a> -<a class="sourceLine" id="cb323-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="cb324"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb324-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> -<p><strong>Coffee</strong></p> -<ul> -<li>black hot drink,</li> -<li>prepared from roasted coffee beans, and</li> -<li>one of the most traded agricultural commodities in the world.</li> -</ul> -<p><strong>Milk</strong></p> -<ul> -<li>white cold drink,</li> -<li>nutrient-rich, and</li> -<li>produced on an industrial scale.</li> -</ul> -<p>This is a loose definition list. Coffee is a black hot drink, prepared from roasted coffee beans, and one of the most traded agricultural commodities in the world. Milk is a white cold drink, nutrient-rich, and produced on an industrial scale.</p> -</blockquote> -<h5 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:</p> -<div class="sourceCode" id="cb325"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb325-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb325-2" data-line-number="2"><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb325-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<div class="sourceCode" id="cb325"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb325-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb325-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionDefinitionLists{true}</a> +<a class="sourceLine" id="cb325-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> <a class="sourceLine" id="cb325-4" data-line-number="4"></a> -<a class="sourceLine" id="cb325-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> -<a class="sourceLine" id="cb325-6" data-line-number="6"> renderers = {</a> -<a class="sourceLine" id="cb325-7" data-line-number="7"> interblockSeparator = {<span class="co">%</span></a> -<a class="sourceLine" id="cb325-8" data-line-number="8"> :<span class="co">%</span></a> -<a class="sourceLine" id="cb325-9" data-line-number="9"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb325-10" data-line-number="10"> },</a> -<a class="sourceLine" id="cb325-11" data-line-number="11"> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</a> -<a class="sourceLine" id="cb325-12" data-line-number="12"> dlItem = {<span class="co">%</span></a> -<a class="sourceLine" id="cb325-13" data-line-number="13"> <span class="fu">\item</span>[#1]</a> -<a class="sourceLine" id="cb325-14" data-line-number="14"> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</a> -<a class="sourceLine" id="cb325-15" data-line-number="15"> <span class="fu">\def</span>\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> -<a class="sourceLine" id="cb325-16" data-line-number="16"> ,</a> -<a class="sourceLine" id="cb325-17" data-line-number="17"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> -<a class="sourceLine" id="cb325-18" data-line-number="18"> , and</a> -<a class="sourceLine" id="cb325-19" data-line-number="19"> \def\markdownRendererDlDefinitionEnd{.}<span class="co">%</span></a> -<a class="sourceLine" id="cb325-20" data-line-number="20"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb325-21" data-line-number="21"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb325-22" data-line-number="22"> },</a> -<a class="sourceLine" id="cb325-23" data-line-number="23"> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</a> -<a class="sourceLine" id="cb325-24" data-line-number="24"> dlDefinitionBegin = <span class="fu">\item</span>,</a> -<a class="sourceLine" id="cb325-25" data-line-number="25"> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</a> -<a class="sourceLine" id="cb325-26" data-line-number="26"> },</a> -<a class="sourceLine" id="cb325-27" data-line-number="27">}</a> +<a class="sourceLine" id="cb325-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb325-6" data-line-number="6"> :<span class="co">%</span></a> +<a class="sourceLine" id="cb325-7" data-line-number="7"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb325-8" data-line-number="8">}</a> +<a class="sourceLine" id="cb325-9" data-line-number="9"><span class="fu">\def</span>\markdownRendererDlBeginTight{<span class="co">%</span></a> +<a class="sourceLine" id="cb325-10" data-line-number="10"> \begingroup</a> +<a class="sourceLine" id="cb325-11" data-line-number="11"> \parindent=0pt</a> +<a class="sourceLine" id="cb325-12" data-line-number="12">}</a> +<a class="sourceLine" id="cb325-13" data-line-number="13"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb325-14" data-line-number="14"> \par{\bf#1}<span class="co">%</span></a> +<a class="sourceLine" id="cb325-15" data-line-number="15"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb325-16" data-line-number="16"> ,</a> +<a class="sourceLine" id="cb325-17" data-line-number="17"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb325-18" data-line-number="18"> , and</a> +<a class="sourceLine" id="cb325-19" data-line-number="19"> \def\markdownRendererDlDefinitionEnd{.}<span class="co">%</span></a> +<a class="sourceLine" id="cb325-20" data-line-number="20"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb325-21" data-line-number="21"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb325-22" data-line-number="22">}</a> +<a class="sourceLine" id="cb325-23" data-line-number="23"><span class="fu">\def</span>\markdownRendererDlItemEnd{}</a> +<a class="sourceLine" id="cb325-24" data-line-number="24"><span class="fu">\def</span>\markdownRendererDlDefinitionBegin{\par--\kern 0.5em}</a> +<a class="sourceLine" id="cb325-25" data-line-number="25"><span class="fu">\def</span>\markdownRendererDlEndTight{\endgroup}</a> +<a class="sourceLine" id="cb325-26" data-line-number="26"></a> +<a class="sourceLine" id="cb325-27" data-line-number="27"><span class="fu">\markdownBegin</span></a> <a class="sourceLine" id="cb325-28" data-line-number="28">This is a tight definition list</a> <a class="sourceLine" id="cb325-29" data-line-number="29"></a> <a class="sourceLine" id="cb325-30" data-line-number="30">Coffee</a> @@ -4466,50 +4367,48 @@ multiple paragraphs</li> <a class="sourceLine" id="cb325-36" data-line-number="36">: white cold drink</a> <a class="sourceLine" id="cb325-37" data-line-number="37">: nutrient-rich</a> <a class="sourceLine" id="cb325-38" data-line-number="38">: produced on an industrial scale</a> -<a class="sourceLine" id="cb325-39" data-line-number="39"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb325-39" data-line-number="39"><span class="fu">\markdownEnd</span></a> <a class="sourceLine" id="cb325-40" data-line-number="40"></a> -<a class="sourceLine" id="cb325-41" data-line-number="41"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> -<a class="sourceLine" id="cb325-42" data-line-number="42"> renderers = {</a> -<a class="sourceLine" id="cb325-43" data-line-number="43"> interblockSeparator = {<span class="co">%</span></a> -<a class="sourceLine" id="cb325-44" data-line-number="44"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb325-45" data-line-number="45"> },</a> -<a class="sourceLine" id="cb325-46" data-line-number="46"> dlBegin = {},</a> -<a class="sourceLine" id="cb325-47" data-line-number="47"> dlItem = {<span class="co">%</span></a> -<a class="sourceLine" id="cb325-48" data-line-number="48"> . #1 is a</a> -<a class="sourceLine" id="cb325-49" data-line-number="49"> <span class="fu">\def</span>\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> -<a class="sourceLine" id="cb325-50" data-line-number="50"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> -<a class="sourceLine" id="cb325-51" data-line-number="51"> ,</a> -<a class="sourceLine" id="cb325-52" data-line-number="52"> \def\markdownRendererDlDefinitionBegin{, and }<span class="co">%</span></a> -<a class="sourceLine" id="cb325-53" data-line-number="53"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb325-54" data-line-number="54"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb325-55" data-line-number="55"> },</a> -<a class="sourceLine" id="cb325-56" data-line-number="56"> dlItemEnd = {},</a> -<a class="sourceLine" id="cb325-57" data-line-number="57"> dlDefinitionEnd = {},</a> -<a class="sourceLine" id="cb325-58" data-line-number="58"> dlEnd = {.},</a> -<a class="sourceLine" id="cb325-59" data-line-number="59"> },</a> -<a class="sourceLine" id="cb325-60" data-line-number="60">}</a> -<a class="sourceLine" id="cb325-61" data-line-number="61">This is a loose definition list</a> +<a class="sourceLine" id="cb325-41" data-line-number="41"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb325-42" data-line-number="42"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb325-43" data-line-number="43">}</a> +<a class="sourceLine" id="cb325-44" data-line-number="44"><span class="fu">\def</span>\markdownRendererDlBegin{}</a> +<a class="sourceLine" id="cb325-45" data-line-number="45"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb325-46" data-line-number="46"> . #1 is a</a> +<a class="sourceLine" id="cb325-47" data-line-number="47"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb325-48" data-line-number="48"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb325-49" data-line-number="49"> ,</a> +<a class="sourceLine" id="cb325-50" data-line-number="50"> \def\markdownRendererDlDefinitionBegin{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb325-51" data-line-number="51"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb325-52" data-line-number="52"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb325-53" data-line-number="53">}</a> +<a class="sourceLine" id="cb325-54" data-line-number="54"><span class="fu">\def</span>\markdownRendererDlItemEnd{}</a> +<a class="sourceLine" id="cb325-55" data-line-number="55"><span class="fu">\def</span>\markdownRendererDlDefinitionEnd{}</a> +<a class="sourceLine" id="cb325-56" data-line-number="56"><span class="fu">\def</span>\markdownRendererDlEnd{.}</a> +<a class="sourceLine" id="cb325-57" data-line-number="57"></a> +<a class="sourceLine" id="cb325-58" data-line-number="58"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb325-59" data-line-number="59">This is a loose definition list</a> +<a class="sourceLine" id="cb325-60" data-line-number="60"></a> +<a class="sourceLine" id="cb325-61" data-line-number="61">Coffee</a> <a class="sourceLine" id="cb325-62" data-line-number="62"></a> -<a class="sourceLine" id="cb325-63" data-line-number="63">Coffee</a> +<a class="sourceLine" id="cb325-63" data-line-number="63">: black hot drink</a> <a class="sourceLine" id="cb325-64" data-line-number="64"></a> -<a class="sourceLine" id="cb325-65" data-line-number="65">: black hot drink</a> +<a class="sourceLine" id="cb325-65" data-line-number="65">: prepared from roasted coffee beans</a> <a class="sourceLine" id="cb325-66" data-line-number="66"></a> -<a class="sourceLine" id="cb325-67" data-line-number="67">: prepared from roasted coffee beans</a> +<a class="sourceLine" id="cb325-67" data-line-number="67">: one of the most traded agricultural commodities in the world</a> <a class="sourceLine" id="cb325-68" data-line-number="68"></a> -<a class="sourceLine" id="cb325-69" data-line-number="69">: one of the most traded agricultural commodities in the world</a> +<a class="sourceLine" id="cb325-69" data-line-number="69">Milk</a> <a class="sourceLine" id="cb325-70" data-line-number="70"></a> -<a class="sourceLine" id="cb325-71" data-line-number="71">Milk</a> +<a class="sourceLine" id="cb325-71" data-line-number="71">: white cold drink</a> <a class="sourceLine" id="cb325-72" data-line-number="72"></a> -<a class="sourceLine" id="cb325-73" data-line-number="73">: white cold drink</a> +<a class="sourceLine" id="cb325-73" data-line-number="73">: nutrient-rich</a> <a class="sourceLine" id="cb325-74" data-line-number="74"></a> -<a class="sourceLine" id="cb325-75" data-line-number="75">: nutrient-rich</a> -<a class="sourceLine" id="cb325-76" data-line-number="76"></a> -<a class="sourceLine" id="cb325-77" data-line-number="77">: produced on an industrial scale</a> -<a class="sourceLine" id="cb325-78" data-line-number="78"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> -<a class="sourceLine" id="cb325-79" data-line-number="79"></a> -<a class="sourceLine" id="cb325-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="cb326"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb326-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> +<a class="sourceLine" id="cb325-75" data-line-number="75">: produced on an industrial scale</a> +<a class="sourceLine" id="cb325-76" data-line-number="76"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb325-77" data-line-number="77"></a> +<a class="sourceLine" id="cb325-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="cb326"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb326-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> @@ -4527,87 +4426,188 @@ multiple paragraphs</li> </ul> <p>This is a loose definition list. Coffee is a black hot drink, prepared from roasted coffee beans, and one of the most traded agricultural commodities in the world. Milk is a white cold drink, nutrient-rich, and produced on an industrial scale.</p> </blockquote> -<h5 id="context-example-31" class="unnumbered">Con<span class="tex">T<sub>e</sub>X</span>t 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:</p> -<div class="sourceCode" id="cb327"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb327-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> -<a class="sourceLine" id="cb327-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionDefinitionLists{true}</a> -<a class="sourceLine" id="cb327-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> -<a class="sourceLine" id="cb327-4" data-line-number="4"><span class="fu">\starttext</span></a> -<a class="sourceLine" id="cb327-5" data-line-number="5"></a> -<a class="sourceLine" id="cb327-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> -<a class="sourceLine" id="cb327-7" data-line-number="7"> :<span class="co">%</span></a> -<a class="sourceLine" id="cb327-8" data-line-number="8"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb327-9" data-line-number="9">}</a> -<a class="sourceLine" id="cb327-10" data-line-number="10"><span class="fu">\def</span>\markdownRendererDlBeginTight{}</a> -<a class="sourceLine" id="cb327-11" data-line-number="11"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> -<a class="sourceLine" id="cb327-12" data-line-number="12"> \par{\bf#1}<span class="co">%</span></a> -<a class="sourceLine" id="cb327-13" data-line-number="13"> \startitemize</a> -<a class="sourceLine" id="cb327-14" data-line-number="14"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> -<a class="sourceLine" id="cb327-15" data-line-number="15"> ,</a> -<a class="sourceLine" id="cb327-16" data-line-number="16"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> -<a class="sourceLine" id="cb327-17" data-line-number="17"> , and</a> -<a class="sourceLine" id="cb327-18" data-line-number="18"> \def\markdownRendererDlDefinitionEnd{.}<span class="co">%</span></a> -<a class="sourceLine" id="cb327-19" data-line-number="19"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb327-20" data-line-number="20"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb327-21" data-line-number="21">}</a> -<a class="sourceLine" id="cb327-22" data-line-number="22"><span class="fu">\def</span>\markdownRendererDlItemEnd{\stopitemize}</a> -<a class="sourceLine" id="cb327-23" data-line-number="23"><span class="fu">\def</span>\markdownRendererDlDefinitionBegin{\item}</a> -<a class="sourceLine" id="cb327-24" data-line-number="24"><span class="fu">\def</span>\markdownRendererDlEndTight{}</a> -<a class="sourceLine" id="cb327-25" data-line-number="25"></a> -<a class="sourceLine" id="cb327-26" data-line-number="26"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb327-27" data-line-number="27">This is a tight definition list</a> -<a class="sourceLine" id="cb327-28" data-line-number="28"></a> -<a class="sourceLine" id="cb327-29" data-line-number="29">Coffee</a> -<a class="sourceLine" id="cb327-30" data-line-number="30">: black hot drink</a> -<a class="sourceLine" id="cb327-31" data-line-number="31">: prepared from roasted coffee beans</a> -<a class="sourceLine" id="cb327-32" data-line-number="32">: one of the most traded agricultural commodities in the world</a> -<a class="sourceLine" id="cb327-33" data-line-number="33"></a> -<a class="sourceLine" id="cb327-34" data-line-number="34">Milk</a> -<a class="sourceLine" id="cb327-35" data-line-number="35">: white cold drink</a> -<a class="sourceLine" id="cb327-36" data-line-number="36">: nutrient-rich</a> -<a class="sourceLine" id="cb327-37" data-line-number="37">: produced on an industrial scale</a> -<a class="sourceLine" id="cb327-38" data-line-number="38"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb327-39" data-line-number="39"></a> -<a class="sourceLine" id="cb327-40" data-line-number="40"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> -<a class="sourceLine" id="cb327-41" data-line-number="41"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> -<a class="sourceLine" id="cb327-42" data-line-number="42">}</a> -<a class="sourceLine" id="cb327-43" data-line-number="43"><span class="fu">\def</span>\markdownRendererDlBegin{}</a> -<a class="sourceLine" id="cb327-44" data-line-number="44"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> -<a class="sourceLine" id="cb327-45" data-line-number="45"> . #1 is a</a> -<a class="sourceLine" id="cb327-46" data-line-number="46"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> -<a class="sourceLine" id="cb327-47" data-line-number="47"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> -<a class="sourceLine" id="cb327-48" data-line-number="48"> ,</a> -<a class="sourceLine" id="cb327-49" data-line-number="49"> \def\markdownRendererDlDefinitionBegin{, and }<span class="co">%</span></a> -<a class="sourceLine" id="cb327-50" data-line-number="50"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb327-51" data-line-number="51"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb327-52" data-line-number="52">}</a> -<a class="sourceLine" id="cb327-53" data-line-number="53"><span class="fu">\def</span>\markdownRendererDlItemEnd{}</a> -<a class="sourceLine" id="cb327-54" data-line-number="54"><span class="fu">\def</span>\markdownRendererDlDefinitionEnd{}</a> -<a class="sourceLine" id="cb327-55" data-line-number="55"><span class="fu">\def</span>\markdownRendererDlEnd{.}</a> -<a class="sourceLine" id="cb327-56" data-line-number="56"></a> -<a class="sourceLine" id="cb327-57" data-line-number="57"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb327-58" data-line-number="58">This is a loose definition list</a> -<a class="sourceLine" id="cb327-59" data-line-number="59"></a> -<a class="sourceLine" id="cb327-60" data-line-number="60">Coffee</a> -<a class="sourceLine" id="cb327-61" data-line-number="61"></a> -<a class="sourceLine" id="cb327-62" data-line-number="62">: black hot drink</a> -<a class="sourceLine" id="cb327-63" data-line-number="63"></a> -<a class="sourceLine" id="cb327-64" data-line-number="64">: prepared from roasted coffee beans</a> -<a class="sourceLine" id="cb327-65" data-line-number="65"></a> -<a class="sourceLine" id="cb327-66" data-line-number="66">: one of the most traded agricultural commodities in the world</a> -<a class="sourceLine" id="cb327-67" data-line-number="67"></a> -<a class="sourceLine" id="cb327-68" data-line-number="68">Milk</a> -<a class="sourceLine" id="cb327-69" data-line-number="69"></a> -<a class="sourceLine" id="cb327-70" data-line-number="70">: white cold drink</a> -<a class="sourceLine" id="cb327-71" data-line-number="71"></a> -<a class="sourceLine" id="cb327-72" data-line-number="72">: nutrient-rich</a> -<a class="sourceLine" id="cb327-73" data-line-number="73"></a> -<a class="sourceLine" id="cb327-74" data-line-number="74">: produced on an industrial scale</a> -<a class="sourceLine" id="cb327-75" data-line-number="75"><span class="fu">\stopmarkdown</span></a> +<div class="sourceCode" id="cb327"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb327-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb327-2" data-line-number="2"><span class="bu">\usepackage</span>[definitionLists, tightLists]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb327-3" data-line-number="3"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb327-4" data-line-number="4"></a> +<a class="sourceLine" id="cb327-5" data-line-number="5"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb327-6" data-line-number="6"> renderers = {</a> +<a class="sourceLine" id="cb327-7" data-line-number="7"> interblockSeparator = {<span class="co">%</span></a> +<a class="sourceLine" id="cb327-8" data-line-number="8"> :<span class="co">%</span></a> +<a class="sourceLine" id="cb327-9" data-line-number="9"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb327-10" data-line-number="10"> },</a> +<a class="sourceLine" id="cb327-11" data-line-number="11"> dlBeginTight = {<span class="kw">\begin</span>{<span class="ex">description</span>}},</a> +<a class="sourceLine" id="cb327-12" data-line-number="12"> dlItem = {<span class="co">%</span></a> +<a class="sourceLine" id="cb327-13" data-line-number="13"> <span class="fu">\item</span>[#1]</a> +<a class="sourceLine" id="cb327-14" data-line-number="14"> <span class="kw">\begin</span>{<span class="ex">itemize</span>}</a> +<a class="sourceLine" id="cb327-15" data-line-number="15"> <span class="fu">\def</span>\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb327-16" data-line-number="16"> ,</a> +<a class="sourceLine" id="cb327-17" data-line-number="17"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb327-18" data-line-number="18"> , and</a> +<a class="sourceLine" id="cb327-19" data-line-number="19"> \def\markdownRendererDlDefinitionEnd{.}<span class="co">%</span></a> +<a class="sourceLine" id="cb327-20" data-line-number="20"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb327-21" data-line-number="21"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb327-22" data-line-number="22"> },</a> +<a class="sourceLine" id="cb327-23" data-line-number="23"> dlItemEnd = {<span class="kw">\end</span>{<span class="ex">itemize</span>}},</a> +<a class="sourceLine" id="cb327-24" data-line-number="24"> dlDefinitionBegin = <span class="fu">\item</span>,</a> +<a class="sourceLine" id="cb327-25" data-line-number="25"> dlEndTight = {<span class="kw">\end</span>{<span class="ex">description</span>}},</a> +<a class="sourceLine" id="cb327-26" data-line-number="26"> },</a> +<a class="sourceLine" id="cb327-27" data-line-number="27">}</a> +<a class="sourceLine" id="cb327-28" data-line-number="28">This is a tight definition list</a> +<a class="sourceLine" id="cb327-29" data-line-number="29"></a> +<a class="sourceLine" id="cb327-30" data-line-number="30">Coffee</a> +<a class="sourceLine" id="cb327-31" data-line-number="31">: black hot drink</a> +<a class="sourceLine" id="cb327-32" data-line-number="32">: prepared from roasted coffee beans</a> +<a class="sourceLine" id="cb327-33" data-line-number="33">: one of the most traded agricultural commodities in the world</a> +<a class="sourceLine" id="cb327-34" data-line-number="34"></a> +<a class="sourceLine" id="cb327-35" data-line-number="35">Milk</a> +<a class="sourceLine" id="cb327-36" data-line-number="36">: white cold drink</a> +<a class="sourceLine" id="cb327-37" data-line-number="37">: nutrient-rich</a> +<a class="sourceLine" id="cb327-38" data-line-number="38">: produced on an industrial scale</a> +<a class="sourceLine" id="cb327-39" data-line-number="39"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb327-40" data-line-number="40"></a> +<a class="sourceLine" id="cb327-41" data-line-number="41"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb327-42" data-line-number="42"> renderers = {</a> +<a class="sourceLine" id="cb327-43" data-line-number="43"> interblockSeparator = {<span class="co">%</span></a> +<a class="sourceLine" id="cb327-44" data-line-number="44"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb327-45" data-line-number="45"> },</a> +<a class="sourceLine" id="cb327-46" data-line-number="46"> dlBegin = {},</a> +<a class="sourceLine" id="cb327-47" data-line-number="47"> dlItem = {<span class="co">%</span></a> +<a class="sourceLine" id="cb327-48" data-line-number="48"> . #1 is a</a> +<a class="sourceLine" id="cb327-49" data-line-number="49"> <span class="fu">\def</span>\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb327-50" data-line-number="50"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb327-51" data-line-number="51"> ,</a> +<a class="sourceLine" id="cb327-52" data-line-number="52"> \def\markdownRendererDlDefinitionBegin{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb327-53" data-line-number="53"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb327-54" data-line-number="54"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb327-55" data-line-number="55"> },</a> +<a class="sourceLine" id="cb327-56" data-line-number="56"> dlItemEnd = {},</a> +<a class="sourceLine" id="cb327-57" data-line-number="57"> dlDefinitionEnd = {},</a> +<a class="sourceLine" id="cb327-58" data-line-number="58"> dlEnd = {.},</a> +<a class="sourceLine" id="cb327-59" data-line-number="59"> },</a> +<a class="sourceLine" id="cb327-60" data-line-number="60">}</a> +<a class="sourceLine" id="cb327-61" data-line-number="61">This is a loose definition list</a> +<a class="sourceLine" id="cb327-62" data-line-number="62"></a> +<a class="sourceLine" id="cb327-63" data-line-number="63">Coffee</a> +<a class="sourceLine" id="cb327-64" data-line-number="64"></a> +<a class="sourceLine" id="cb327-65" data-line-number="65">: black hot drink</a> +<a class="sourceLine" id="cb327-66" data-line-number="66"></a> +<a class="sourceLine" id="cb327-67" data-line-number="67">: prepared from roasted coffee beans</a> +<a class="sourceLine" id="cb327-68" data-line-number="68"></a> +<a class="sourceLine" id="cb327-69" data-line-number="69">: one of the most traded agricultural commodities in the world</a> +<a class="sourceLine" id="cb327-70" data-line-number="70"></a> +<a class="sourceLine" id="cb327-71" data-line-number="71">Milk</a> +<a class="sourceLine" id="cb327-72" data-line-number="72"></a> +<a class="sourceLine" id="cb327-73" data-line-number="73">: white cold drink</a> +<a class="sourceLine" id="cb327-74" data-line-number="74"></a> +<a class="sourceLine" id="cb327-75" data-line-number="75">: nutrient-rich</a> <a class="sourceLine" id="cb327-76" data-line-number="76"></a> -<a class="sourceLine" id="cb327-77" data-line-number="77"><span class="fu">\stoptext</span></a></code></pre></div> +<a class="sourceLine" id="cb327-77" data-line-number="77">: produced on an industrial scale</a> +<a class="sourceLine" id="cb327-78" data-line-number="78"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb327-79" data-line-number="79"></a> +<a class="sourceLine" id="cb327-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="cb328"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb328-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> +<div class="sourceCode" id="cb328"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb328-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> +<p><strong>Coffee</strong></p> +<ul> +<li>black hot drink,</li> +<li>prepared from roasted coffee beans, and</li> +<li>one of the most traded agricultural commodities in the world.</li> +</ul> +<p><strong>Milk</strong></p> +<ul> +<li>white cold drink,</li> +<li>nutrient-rich, and</li> +<li>produced on an industrial scale.</li> +</ul> +<p>This is a loose definition list. Coffee is a black hot drink, prepared from roasted coffee beans, and one of the most traded agricultural commodities in the world. Milk is a white cold drink, nutrient-rich, and produced on an industrial scale.</p> +</blockquote> +<h5 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="cb329"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb329-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb329-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionDefinitionLists{true}</a> +<a class="sourceLine" id="cb329-3" data-line-number="3"><span class="fu">\def</span>\markdownOptionTightLists{true}</a> +<a class="sourceLine" id="cb329-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb329-5" data-line-number="5"></a> +<a class="sourceLine" id="cb329-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb329-7" data-line-number="7"> :<span class="co">%</span></a> +<a class="sourceLine" id="cb329-8" data-line-number="8"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb329-9" data-line-number="9">}</a> +<a class="sourceLine" id="cb329-10" data-line-number="10"><span class="fu">\def</span>\markdownRendererDlBeginTight{}</a> +<a class="sourceLine" id="cb329-11" data-line-number="11"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb329-12" data-line-number="12"> \par{\bf#1}<span class="co">%</span></a> +<a class="sourceLine" id="cb329-13" data-line-number="13"> \startitemize</a> +<a class="sourceLine" id="cb329-14" data-line-number="14"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb329-15" data-line-number="15"> ,</a> +<a class="sourceLine" id="cb329-16" data-line-number="16"> \def\markdownRendererDlDefinitionEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb329-17" data-line-number="17"> , and</a> +<a class="sourceLine" id="cb329-18" data-line-number="18"> \def\markdownRendererDlDefinitionEnd{.}<span class="co">%</span></a> +<a class="sourceLine" id="cb329-19" data-line-number="19"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb329-20" data-line-number="20"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb329-21" data-line-number="21">}</a> +<a class="sourceLine" id="cb329-22" data-line-number="22"><span class="fu">\def</span>\markdownRendererDlItemEnd{\stopitemize}</a> +<a class="sourceLine" id="cb329-23" data-line-number="23"><span class="fu">\def</span>\markdownRendererDlDefinitionBegin{\item}</a> +<a class="sourceLine" id="cb329-24" data-line-number="24"><span class="fu">\def</span>\markdownRendererDlEndTight{}</a> +<a class="sourceLine" id="cb329-25" data-line-number="25"></a> +<a class="sourceLine" id="cb329-26" data-line-number="26"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb329-27" data-line-number="27">This is a tight definition list</a> +<a class="sourceLine" id="cb329-28" data-line-number="28"></a> +<a class="sourceLine" id="cb329-29" data-line-number="29">Coffee</a> +<a class="sourceLine" id="cb329-30" data-line-number="30">: black hot drink</a> +<a class="sourceLine" id="cb329-31" data-line-number="31">: prepared from roasted coffee beans</a> +<a class="sourceLine" id="cb329-32" data-line-number="32">: one of the most traded agricultural commodities in the world</a> +<a class="sourceLine" id="cb329-33" data-line-number="33"></a> +<a class="sourceLine" id="cb329-34" data-line-number="34">Milk</a> +<a class="sourceLine" id="cb329-35" data-line-number="35">: white cold drink</a> +<a class="sourceLine" id="cb329-36" data-line-number="36">: nutrient-rich</a> +<a class="sourceLine" id="cb329-37" data-line-number="37">: produced on an industrial scale</a> +<a class="sourceLine" id="cb329-38" data-line-number="38"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb329-39" data-line-number="39"></a> +<a class="sourceLine" id="cb329-40" data-line-number="40"><span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb329-41" data-line-number="41"> \def\markdownRendererInterblockSeparator{\par}<span class="co">%</span></a> +<a class="sourceLine" id="cb329-42" data-line-number="42">}</a> +<a class="sourceLine" id="cb329-43" data-line-number="43"><span class="fu">\def</span>\markdownRendererDlBegin{}</a> +<a class="sourceLine" id="cb329-44" data-line-number="44"><span class="fu">\def</span>\markdownRendererDlItem#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb329-45" data-line-number="45"> . #1 is a</a> +<a class="sourceLine" id="cb329-46" data-line-number="46"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb329-47" data-line-number="47"> \def\markdownRendererDlDefinitionBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb329-48" data-line-number="48"> ,</a> +<a class="sourceLine" id="cb329-49" data-line-number="49"> \def\markdownRendererDlDefinitionBegin{, and }<span class="co">%</span></a> +<a class="sourceLine" id="cb329-50" data-line-number="50"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb329-51" data-line-number="51"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb329-52" data-line-number="52">}</a> +<a class="sourceLine" id="cb329-53" data-line-number="53"><span class="fu">\def</span>\markdownRendererDlItemEnd{}</a> +<a class="sourceLine" id="cb329-54" data-line-number="54"><span class="fu">\def</span>\markdownRendererDlDefinitionEnd{}</a> +<a class="sourceLine" id="cb329-55" data-line-number="55"><span class="fu">\def</span>\markdownRendererDlEnd{.}</a> +<a class="sourceLine" id="cb329-56" data-line-number="56"></a> +<a class="sourceLine" id="cb329-57" data-line-number="57"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb329-58" data-line-number="58">This is a loose definition list</a> +<a class="sourceLine" id="cb329-59" data-line-number="59"></a> +<a class="sourceLine" id="cb329-60" data-line-number="60">Coffee</a> +<a class="sourceLine" id="cb329-61" data-line-number="61"></a> +<a class="sourceLine" id="cb329-62" data-line-number="62">: black hot drink</a> +<a class="sourceLine" id="cb329-63" data-line-number="63"></a> +<a class="sourceLine" id="cb329-64" data-line-number="64">: prepared from roasted coffee beans</a> +<a class="sourceLine" id="cb329-65" data-line-number="65"></a> +<a class="sourceLine" id="cb329-66" data-line-number="66">: one of the most traded agricultural commodities in the world</a> +<a class="sourceLine" id="cb329-67" data-line-number="67"></a> +<a class="sourceLine" id="cb329-68" data-line-number="68">Milk</a> +<a class="sourceLine" id="cb329-69" data-line-number="69"></a> +<a class="sourceLine" id="cb329-70" data-line-number="70">: white cold drink</a> +<a class="sourceLine" id="cb329-71" data-line-number="71"></a> +<a class="sourceLine" id="cb329-72" data-line-number="72">: nutrient-rich</a> +<a class="sourceLine" id="cb329-73" data-line-number="73"></a> +<a class="sourceLine" id="cb329-74" data-line-number="74">: produced on an industrial scale</a> +<a class="sourceLine" id="cb329-75" data-line-number="75"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb329-76" data-line-number="76"></a> +<a class="sourceLine" id="cb329-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="cb330"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb330-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> @@ -4629,17 +4629,17 @@ multiple paragraphs</li> <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 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="cb329"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb329-1" data-line-number="1"><span class="fu">\input</span> markdown</a> -<a class="sourceLine" id="cb329-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererEmphasis#1{{\it#1}}</a> -<a class="sourceLine" id="cb329-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererStrongEmphasis#1{{\bf#1}}</a> -<a class="sourceLine" id="cb329-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb329-5" data-line-number="5">This is *emphasis*.</a> -<a class="sourceLine" id="cb329-6" data-line-number="6"></a> -<a class="sourceLine" id="cb329-7" data-line-number="7">This is **strong emphasis**.</a> -<a class="sourceLine" id="cb329-8" data-line-number="8"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb329-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="cb330"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb330-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> +<div class="sourceCode" id="cb331"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb331-1" data-line-number="1"><span class="fu">\input</span> markdown</a> +<a class="sourceLine" id="cb331-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererEmphasis#1{{\it#1}}</a> +<a class="sourceLine" id="cb331-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererStrongEmphasis#1{{\bf#1}}</a> +<a class="sourceLine" id="cb331-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb331-5" data-line-number="5">This is *emphasis*.</a> +<a class="sourceLine" id="cb331-6" data-line-number="6"></a> +<a class="sourceLine" id="cb331-7" data-line-number="7">This is **strong emphasis**.</a> +<a class="sourceLine" id="cb331-8" data-line-number="8"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb331-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="cb332"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb332-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> @@ -4647,23 +4647,23 @@ multiple paragraphs</li> </blockquote> <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="cb331"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb331-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb331-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb331-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> -<a class="sourceLine" id="cb331-4" data-line-number="4"> renderers = {</a> -<a class="sourceLine" id="cb331-5" data-line-number="5"> emphasis = {<span class="fu">\emph</span>{#1}},</a> -<a class="sourceLine" id="cb331-6" data-line-number="6"> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</a> -<a class="sourceLine" id="cb331-7" data-line-number="7"> },</a> -<a class="sourceLine" id="cb331-8" data-line-number="8">}</a> -<a class="sourceLine" id="cb331-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb331-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb331-11" data-line-number="11">This is *emphasis*.</a> -<a class="sourceLine" id="cb331-12" data-line-number="12"></a> -<a class="sourceLine" id="cb331-13" data-line-number="13">This is **strong emphasis**.</a> -<a class="sourceLine" id="cb331-14" data-line-number="14"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb331-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="cb332"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb332-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> +<div class="sourceCode" id="cb333"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb333-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb333-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb333-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb333-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb333-5" data-line-number="5"> emphasis = {<span class="fu">\emph</span>{#1}},</a> +<a class="sourceLine" id="cb333-6" data-line-number="6"> strongEmphasis = {<span class="fu">\textbf</span>{#1}},</a> +<a class="sourceLine" id="cb333-7" data-line-number="7"> },</a> +<a class="sourceLine" id="cb333-8" data-line-number="8">}</a> +<a class="sourceLine" id="cb333-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb333-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb333-11" data-line-number="11">This is *emphasis*.</a> +<a class="sourceLine" id="cb333-12" data-line-number="12"></a> +<a class="sourceLine" id="cb333-13" data-line-number="13">This is **strong emphasis**.</a> +<a class="sourceLine" id="cb333-14" data-line-number="14"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb333-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="cb334"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb334-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> @@ -4671,18 +4671,18 @@ multiple paragraphs</li> </blockquote> <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="cb333"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb333-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> -<a class="sourceLine" id="cb333-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererEmphasis#1{\emph{#1}}</a> -<a class="sourceLine" id="cb333-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererStrongEmphasis#1{\bold{#1}}</a> -<a class="sourceLine" id="cb333-4" data-line-number="4"><span class="fu">\starttext</span></a> -<a class="sourceLine" id="cb333-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb333-6" data-line-number="6">This is *emphasis*.</a> -<a class="sourceLine" id="cb333-7" data-line-number="7"></a> -<a class="sourceLine" id="cb333-8" data-line-number="8">This is **strong emphasis**.</a> -<a class="sourceLine" id="cb333-9" data-line-number="9"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb333-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="cb334"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb334-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> +<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="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb335-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererEmphasis#1{\emph{#1}}</a> +<a class="sourceLine" id="cb335-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererStrongEmphasis#1{\bold{#1}}</a> +<a class="sourceLine" id="cb335-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb335-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb335-6" data-line-number="6">This is *emphasis*.</a> +<a class="sourceLine" id="cb335-7" data-line-number="7"></a> +<a class="sourceLine" id="cb335-8" data-line-number="8">This is **strong emphasis**.</a> +<a class="sourceLine" id="cb335-9" data-line-number="9"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb335-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="cb336"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb336-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> @@ -4693,29 +4693,29 @@ multiple paragraphs</li> <p>The <code>\markdownRendererBlockQuoteBegin</code> macro represents the beginning of a block quote. The macro receives no arguments.</p> <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="cb335"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb335-1" data-line-number="1"><span class="fu">\input</span> markdown</a> -<a class="sourceLine" id="cb335-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererBlockQuoteBegin{<span class="co">%</span></a> -<a class="sourceLine" id="cb335-3" data-line-number="3"> \begingroup</a> -<a class="sourceLine" id="cb335-4" data-line-number="4"> \vskip\parindent</a> -<a class="sourceLine" id="cb335-5" data-line-number="5"> \leftskip=2\parindent</a> -<a class="sourceLine" id="cb335-6" data-line-number="6"> \parindent=0pt</a> -<a class="sourceLine" id="cb335-7" data-line-number="7">}</a> -<a class="sourceLine" id="cb335-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererBlockQuoteEnd{<span class="co">%</span></a> -<a class="sourceLine" id="cb335-9" data-line-number="9"> \par</a> -<a class="sourceLine" id="cb335-10" data-line-number="10"> \vskip\parindent</a> -<a class="sourceLine" id="cb335-11" data-line-number="11"> \endgroup</a> -<a class="sourceLine" id="cb335-12" data-line-number="12">}</a> -<a class="sourceLine" id="cb335-13" data-line-number="13"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb335-14" data-line-number="14">A quote from William Shakespeare's King Lear:</a> -<a class="sourceLine" id="cb335-15" data-line-number="15"></a> -<a class="sourceLine" id="cb335-16" data-line-number="16">> This is the excellent foppery of the world that when we are</a> -<a class="sourceLine" id="cb335-17" data-line-number="17">> sick in fortune---often the surfeit of our own behavior---we</a> -<a class="sourceLine" id="cb335-18" data-line-number="18">> make guilty of our disasters the sun, the moon, and the</a> -<a class="sourceLine" id="cb335-19" data-line-number="19">> stars [...]</a> -<a class="sourceLine" id="cb335-20" data-line-number="20"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb335-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="cb336"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb336-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></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>\markdownRendererBlockQuoteBegin{<span class="co">%</span></a> +<a class="sourceLine" id="cb337-3" data-line-number="3"> \begingroup</a> +<a class="sourceLine" id="cb337-4" data-line-number="4"> \vskip\parindent</a> +<a class="sourceLine" id="cb337-5" data-line-number="5"> \leftskip=2\parindent</a> +<a class="sourceLine" id="cb337-6" data-line-number="6"> \parindent=0pt</a> +<a class="sourceLine" id="cb337-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb337-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererBlockQuoteEnd{<span class="co">%</span></a> +<a class="sourceLine" id="cb337-9" data-line-number="9"> \par</a> +<a class="sourceLine" id="cb337-10" data-line-number="10"> \vskip\parindent</a> +<a class="sourceLine" id="cb337-11" data-line-number="11"> \endgroup</a> +<a class="sourceLine" id="cb337-12" data-line-number="12">}</a> +<a class="sourceLine" id="cb337-13" data-line-number="13"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb337-14" data-line-number="14">A quote from William Shakespeare's King Lear:</a> +<a class="sourceLine" id="cb337-15" data-line-number="15"></a> +<a class="sourceLine" id="cb337-16" data-line-number="16">> This is the excellent foppery of the world that when we are</a> +<a class="sourceLine" id="cb337-17" data-line-number="17">> sick in fortune---often the surfeit of our own behavior---we</a> +<a class="sourceLine" id="cb337-18" data-line-number="18">> make guilty of our disasters the sun, the moon, and the</a> +<a class="sourceLine" id="cb337-19" data-line-number="19">> stars [...]</a> +<a class="sourceLine" id="cb337-20" data-line-number="20"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb337-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="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:</p> <blockquote> <p>A quote from William Shakespeareâs King Lear:</p> @@ -4725,26 +4725,26 @@ multiple paragraphs</li> </blockquote> <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="cb337"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb337-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb337-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb337-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> -<a class="sourceLine" id="cb337-4" data-line-number="4"> renderers = {</a> -<a class="sourceLine" id="cb337-5" data-line-number="5"> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</a> -<a class="sourceLine" id="cb337-6" data-line-number="6"> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</a> -<a class="sourceLine" id="cb337-7" data-line-number="7"> },</a> -<a class="sourceLine" id="cb337-8" data-line-number="8">}</a> -<a class="sourceLine" id="cb337-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb337-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb337-11" data-line-number="11">A quote from William Shakespeare's King Lear:</a> -<a class="sourceLine" id="cb337-12" data-line-number="12"></a> -<a class="sourceLine" id="cb337-13" data-line-number="13">> This is the excellent foppery of the world that when we are</a> -<a class="sourceLine" id="cb337-14" data-line-number="14">> sick in fortune---often the surfeit of our own behavior---we</a> -<a class="sourceLine" id="cb337-15" data-line-number="15">> make guilty of our disasters the sun, the moon, and the</a> -<a class="sourceLine" id="cb337-16" data-line-number="16">> stars [...]</a> -<a class="sourceLine" id="cb337-17" data-line-number="17"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb337-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="cb338"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb338-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></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"> blockQuoteBegin = {<span class="kw">\begin</span>{<span class="ex">quote</span>}},</a> +<a class="sourceLine" id="cb339-6" data-line-number="6"> blockQuoteEnd = {<span class="kw">\end</span>{<span class="ex">quote</span>}},</a> +<a class="sourceLine" id="cb339-7" data-line-number="7"> },</a> +<a class="sourceLine" id="cb339-8" data-line-number="8">}</a> +<a class="sourceLine" id="cb339-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb339-10" data-line-number="10"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb339-11" data-line-number="11">A quote from William Shakespeare's King Lear:</a> +<a class="sourceLine" id="cb339-12" data-line-number="12"></a> +<a class="sourceLine" id="cb339-13" data-line-number="13">> This is the excellent foppery of the world that when we are</a> +<a class="sourceLine" id="cb339-14" data-line-number="14">> sick in fortune---often the surfeit of our own behavior---we</a> +<a class="sourceLine" id="cb339-15" data-line-number="15">> make guilty of our disasters the sun, the moon, and the</a> +<a class="sourceLine" id="cb339-16" data-line-number="16">> stars [...]</a> +<a class="sourceLine" id="cb339-17" data-line-number="17"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb339-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="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:</p> <blockquote> <p>A quote from William Shakespeareâs King Lear:</p> @@ -4754,21 +4754,21 @@ multiple paragraphs</li> </blockquote> <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="cb339"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb339-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> -<a class="sourceLine" id="cb339-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererBlockQuoteBegin{\startquotation}</a> -<a class="sourceLine" id="cb339-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererBlockQuoteEnd{\stopquotation}</a> -<a class="sourceLine" id="cb339-4" data-line-number="4"><span class="fu">\starttext</span></a> -<a class="sourceLine" id="cb339-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb339-6" data-line-number="6">A quote from William Shakespeare's King Lear:</a> -<a class="sourceLine" id="cb339-7" data-line-number="7"></a> -<a class="sourceLine" id="cb339-8" data-line-number="8">> This is the excellent foppery of the world that when we are</a> -<a class="sourceLine" id="cb339-9" data-line-number="9">> sick in fortune---often the surfeit of our own behavior---we</a> -<a class="sourceLine" id="cb339-10" data-line-number="10">> make guilty of our disasters the sun, the moon, and the</a> -<a class="sourceLine" id="cb339-11" data-line-number="11">> stars [...]</a> -<a class="sourceLine" id="cb339-12" data-line-number="12"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb339-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="cb340"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb340-1" data-line-number="1"><span class="ex">context</span> document.tex</a></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>\markdownRendererBlockQuoteBegin{\startquotation}</a> +<a class="sourceLine" id="cb341-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererBlockQuoteEnd{\stopquotation}</a> +<a class="sourceLine" id="cb341-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb341-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb341-6" data-line-number="6">A quote from William Shakespeare's King Lear:</a> +<a class="sourceLine" id="cb341-7" data-line-number="7"></a> +<a class="sourceLine" id="cb341-8" data-line-number="8">> This is the excellent foppery of the world that when we are</a> +<a class="sourceLine" id="cb341-9" data-line-number="9">> sick in fortune---often the surfeit of our own behavior---we</a> +<a class="sourceLine" id="cb341-10" data-line-number="10">> make guilty of our disasters the sun, the moon, and the</a> +<a class="sourceLine" id="cb341-11" data-line-number="11">> stars [...]</a> +<a class="sourceLine" id="cb341-12" data-line-number="12"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb341-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="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:</p> <blockquote> <p>A quote from William Shakespeareâs King Lear:</p> @@ -4782,71 +4782,71 @@ multiple paragraphs</li> <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 <code>true</code>. 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 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="cb341"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb341-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb341-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</a> -<a class="sourceLine" id="cb341-3" data-line-number="3"><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</a> -<a class="sourceLine" id="cb341-4" data-line-number="4"><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb341-5" data-line-number="5"><span class="fu">\markdownSetup</span>{</a> -<a class="sourceLine" id="cb341-6" data-line-number="6"> renderers = {</a> -<a class="sourceLine" id="cb341-7" data-line-number="7"> interblockSeparator = {</a> -<a class="sourceLine" id="cb341-8" data-line-number="8"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> -<a class="sourceLine" id="cb341-9" data-line-number="9"> \par</a> -<a class="sourceLine" id="cb341-10" data-line-number="10"> \def\markdownRendererInterblockSeparator{<span class="co">%</span></a> -<a class="sourceLine" id="cb341-11" data-line-number="11"> \def\markdownRendererInterblockSeparator{<span class="co">%</span></a> -<a class="sourceLine" id="cb341-12" data-line-number="12"> \par</a> -<a class="sourceLine" id="cb341-13" data-line-number="13"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb341-14" data-line-number="14"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb341-15" data-line-number="15"> }<span class="co">%</span></a> -<a class="sourceLine" id="cb341-16" data-line-number="16"> },</a> -<a class="sourceLine" id="cb341-17" data-line-number="17"> inputVerbatim = {</a> -<a class="sourceLine" id="cb341-18" data-line-number="18"> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></a> -<a class="sourceLine" id="cb341-19" data-line-number="19"> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></a> -<a class="sourceLine" id="cb341-20" data-line-number="20"> },</a> -<a class="sourceLine" id="cb341-21" data-line-number="21"> inputFencedCode = {</a> -<a class="sourceLine" id="cb341-22" data-line-number="22"> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></a> -<a class="sourceLine" id="cb341-23" data-line-number="23"> },</a> -<a class="sourceLine" id="cb341-24" data-line-number="24"> },</a> -<a class="sourceLine" id="cb341-25" data-line-number="25">}</a> -<a class="sourceLine" id="cb341-26" data-line-number="26"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb341-27" data-line-number="27"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb341-28" data-line-number="28">The following code</a> -<a class="sourceLine" id="cb341-29" data-line-number="29"></a> -<a class="sourceLine" id="cb341-30" data-line-number="30"> def foo(bar):</a> -<a class="sourceLine" id="cb341-31" data-line-number="31"> if len(bar) <= 1:</a> -<a class="sourceLine" id="cb341-32" data-line-number="32"> return bar[0]</a> -<a class="sourceLine" id="cb341-33" data-line-number="33"> elif len(bar) == 2:</a> -<a class="sourceLine" id="cb341-34" data-line-number="34"> return sorted(bar)</a> -<a class="sourceLine" id="cb341-35" data-line-number="35"> else:</a> -<a class="sourceLine" id="cb341-36" data-line-number="36"> baz = len(bar) // 2</a> -<a class="sourceLine" id="cb341-37" data-line-number="37"> return foo(bar[baz:], bar[:baz])</a> -<a class="sourceLine" id="cb341-38" data-line-number="38"></a> -<a class="sourceLine" id="cb341-39" data-line-number="39">The following code</a> -<a class="sourceLine" id="cb341-40" data-line-number="40"></a> -<a class="sourceLine" id="cb341-41" data-line-number="41">~~~ Python</a> -<a class="sourceLine" id="cb341-42" data-line-number="42">>>> foo([4, 2, 1, 3])</a> -<a class="sourceLine" id="cb341-43" data-line-number="43">[1, 2, 3, 4]</a> -<a class="sourceLine" id="cb341-44" data-line-number="44">~~~~~~~~~~</a> -<a class="sourceLine" id="cb341-45" data-line-number="45"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb341-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="cb342"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb342-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> +<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="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb343-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">verbatim</span>}</a> +<a class="sourceLine" id="cb343-3" data-line-number="3"><span class="bu">\usepackage</span>[hyphens]{<span class="ex">url</span>}</a> +<a class="sourceLine" id="cb343-4" data-line-number="4"><span class="bu">\usepackage</span>[fencedCode]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb343-5" data-line-number="5"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb343-6" data-line-number="6"> renderers = {</a> +<a class="sourceLine" id="cb343-7" data-line-number="7"> interblockSeparator = {</a> +<a class="sourceLine" id="cb343-8" data-line-number="8"> <span class="fu">\def</span>\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb343-9" data-line-number="9"> \par</a> +<a class="sourceLine" id="cb343-10" data-line-number="10"> \def\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb343-11" data-line-number="11"> \def\markdownRendererInterblockSeparator{<span class="co">%</span></a> +<a class="sourceLine" id="cb343-12" data-line-number="12"> \par</a> +<a class="sourceLine" id="cb343-13" data-line-number="13"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb343-14" data-line-number="14"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb343-15" data-line-number="15"> }<span class="co">%</span></a> +<a class="sourceLine" id="cb343-16" data-line-number="16"> },</a> +<a class="sourceLine" id="cb343-17" data-line-number="17"> inputVerbatim = {</a> +<a class="sourceLine" id="cb343-18" data-line-number="18"> is contained in file <span class="fu">\url</span>{#1}:<span class="co">%</span></a> +<a class="sourceLine" id="cb343-19" data-line-number="19"> <span class="fu">\verbatiminput</span>{#1}<span class="co">%</span></a> +<a class="sourceLine" id="cb343-20" data-line-number="20"> },</a> +<a class="sourceLine" id="cb343-21" data-line-number="21"> inputFencedCode = {</a> +<a class="sourceLine" id="cb343-22" data-line-number="22"> in #2 <span class="fu">\markdownRendererInputVerbatim</span>{#1}<span class="co">%</span></a> +<a class="sourceLine" id="cb343-23" data-line-number="23"> },</a> +<a class="sourceLine" id="cb343-24" data-line-number="24"> },</a> +<a class="sourceLine" id="cb343-25" data-line-number="25">}</a> +<a class="sourceLine" id="cb343-26" data-line-number="26"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb343-27" data-line-number="27"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb343-28" data-line-number="28">The following code</a> +<a class="sourceLine" id="cb343-29" data-line-number="29"></a> +<a class="sourceLine" id="cb343-30" data-line-number="30"> def foo(bar):</a> +<a class="sourceLine" id="cb343-31" data-line-number="31"> if len(bar) <= 1:</a> +<a class="sourceLine" id="cb343-32" data-line-number="32"> return bar[0]</a> +<a class="sourceLine" id="cb343-33" data-line-number="33"> elif len(bar) == 2:</a> +<a class="sourceLine" id="cb343-34" data-line-number="34"> return sorted(bar)</a> +<a class="sourceLine" id="cb343-35" data-line-number="35"> else:</a> +<a class="sourceLine" id="cb343-36" data-line-number="36"> baz = len(bar) // 2</a> +<a class="sourceLine" id="cb343-37" data-line-number="37"> return foo(bar[baz:], bar[:baz])</a> +<a class="sourceLine" id="cb343-38" data-line-number="38"></a> +<a class="sourceLine" id="cb343-39" data-line-number="39">The following code</a> +<a class="sourceLine" id="cb343-40" data-line-number="40"></a> +<a class="sourceLine" id="cb343-41" data-line-number="41">~~~ Python</a> +<a class="sourceLine" id="cb343-42" data-line-number="42">>>> foo([4, 2, 1, 3])</a> +<a class="sourceLine" id="cb343-43" data-line-number="43">[1, 2, 3, 4]</a> +<a class="sourceLine" id="cb343-44" data-line-number="44">~~~~~~~~~~</a> +<a class="sourceLine" id="cb343-45" data-line-number="45"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb343-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="cb344"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb344-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="cb343"><pre class="sourceCode py"><code class="sourceCode python"><a class="sourceLine" id="cb343-1" data-line-number="1"><span class="kw">def</span> foo(bar):</a> -<a class="sourceLine" id="cb343-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="cb343-3" data-line-number="3"> <span class="cf">return</span> bar[:<span class="dv">1</span>]</a> -<a class="sourceLine" id="cb343-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="cb343-5" data-line-number="5"> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</a> -<a class="sourceLine" id="cb343-6" data-line-number="6"> <span class="cf">else</span>:</a> -<a class="sourceLine" id="cb343-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="cb343-8" data-line-number="8"> <span class="cf">return</span> (</a> -<a class="sourceLine" id="cb343-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="cb343-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="cb343-11" data-line-number="11"> )</a></code></pre></div> +<div class="sourceCode" id="cb345"><pre class="sourceCode py"><code class="sourceCode python"><a class="sourceLine" id="cb345-1" data-line-number="1"><span class="kw">def</span> foo(bar):</a> +<a class="sourceLine" id="cb345-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="cb345-3" data-line-number="3"> <span class="cf">return</span> bar[:<span class="dv">1</span>]</a> +<a class="sourceLine" id="cb345-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="cb345-5" data-line-number="5"> <span class="cf">return</span> <span class="bu">sorted</span>(bar)</a> +<a class="sourceLine" id="cb345-6" data-line-number="6"> <span class="cf">else</span>:</a> +<a class="sourceLine" id="cb345-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="cb345-8" data-line-number="8"> <span class="cf">return</span> (</a> +<a class="sourceLine" id="cb345-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="cb345-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="cb345-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="cb344"><pre class="sourceCode py"><code class="sourceCode python"><a class="sourceLine" id="cb344-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="cb344-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> +<div class="sourceCode" id="cb346"><pre class="sourceCode py"><code class="sourceCode python"><a class="sourceLine" id="cb346-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="cb346-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 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> @@ -4857,79 +4857,79 @@ multiple paragraphs</li> <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 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="cb345"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb345-1" data-line-number="1"><span class="fu">\input</span> markdown</a> -<a class="sourceLine" id="cb345-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> -<a class="sourceLine" id="cb345-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererHeadingOne{1}</a> -<a class="sourceLine" id="cb345-4" data-line-number="4"><span class="fu">\def</span>\markdownRendererHeadingTwo{2}</a> -<a class="sourceLine" id="cb345-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererHeadingThree{3}</a> -<a class="sourceLine" id="cb345-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererHeadingFour{4}</a> -<a class="sourceLine" id="cb345-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererHeadingFive{5}</a> -<a class="sourceLine" id="cb345-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererHeadingSix{6}</a> -<a class="sourceLine" id="cb345-9" data-line-number="9"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb345-10" data-line-number="10">######</a> -<a class="sourceLine" id="cb345-11" data-line-number="11">#####</a> -<a class="sourceLine" id="cb345-12" data-line-number="12">#####</a> -<a class="sourceLine" id="cb345-13" data-line-number="13">###</a> -<a class="sourceLine" id="cb345-14" data-line-number="14">######</a> -<a class="sourceLine" id="cb345-15" data-line-number="15"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb345-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="cb346"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb346-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> +<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">\input</span> markdown</a> +<a class="sourceLine" id="cb347-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb347-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererHeadingOne{1}</a> +<a class="sourceLine" id="cb347-4" data-line-number="4"><span class="fu">\def</span>\markdownRendererHeadingTwo{2}</a> +<a class="sourceLine" id="cb347-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererHeadingThree{3}</a> +<a class="sourceLine" id="cb347-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererHeadingFour{4}</a> +<a class="sourceLine" id="cb347-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererHeadingFive{5}</a> +<a class="sourceLine" id="cb347-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererHeadingSix{6}</a> +<a class="sourceLine" id="cb347-9" data-line-number="9"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb347-10" data-line-number="10">######</a> +<a class="sourceLine" id="cb347-11" data-line-number="11">#####</a> +<a class="sourceLine" id="cb347-12" data-line-number="12">#####</a> +<a class="sourceLine" id="cb347-13" data-line-number="13">###</a> +<a class="sourceLine" id="cb347-14" data-line-number="14">######</a> +<a class="sourceLine" id="cb347-15" data-line-number="15"><span class="fu">\markdownEnd</span></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">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 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="cb347"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb347-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb347-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb347-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> -<a class="sourceLine" id="cb347-4" data-line-number="4"> renderers = {</a> -<a class="sourceLine" id="cb347-5" data-line-number="5"> interblockSeparator = {},</a> -<a class="sourceLine" id="cb347-6" data-line-number="6"> headingOne = 1,</a> -<a class="sourceLine" id="cb347-7" data-line-number="7"> headingTwo = 2,</a> -<a class="sourceLine" id="cb347-8" data-line-number="8"> headingThree = 3,</a> -<a class="sourceLine" id="cb347-9" data-line-number="9"> headingFour = 4,</a> -<a class="sourceLine" id="cb347-10" data-line-number="10"> headingFive = 5,</a> -<a class="sourceLine" id="cb347-11" data-line-number="11"> headingSix = 6,</a> -<a class="sourceLine" id="cb347-12" data-line-number="12"> },</a> -<a class="sourceLine" id="cb347-13" data-line-number="13">}</a> -<a class="sourceLine" id="cb347-14" data-line-number="14"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb347-15" data-line-number="15"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb347-16" data-line-number="16">######</a> -<a class="sourceLine" id="cb347-17" data-line-number="17">#####</a> -<a class="sourceLine" id="cb347-18" data-line-number="18">#####</a> -<a class="sourceLine" id="cb347-19" data-line-number="19">###</a> -<a class="sourceLine" id="cb347-20" data-line-number="20">######</a> -<a class="sourceLine" id="cb347-21" data-line-number="21"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb347-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="cb348"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb348-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> +<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="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb349-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb349-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb349-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb349-5" data-line-number="5"> interblockSeparator = {},</a> +<a class="sourceLine" id="cb349-6" data-line-number="6"> headingOne = 1,</a> +<a class="sourceLine" id="cb349-7" data-line-number="7"> headingTwo = 2,</a> +<a class="sourceLine" id="cb349-8" data-line-number="8"> headingThree = 3,</a> +<a class="sourceLine" id="cb349-9" data-line-number="9"> headingFour = 4,</a> +<a class="sourceLine" id="cb349-10" data-line-number="10"> headingFive = 5,</a> +<a class="sourceLine" id="cb349-11" data-line-number="11"> headingSix = 6,</a> +<a class="sourceLine" id="cb349-12" data-line-number="12"> },</a> +<a class="sourceLine" id="cb349-13" data-line-number="13">}</a> +<a class="sourceLine" id="cb349-14" data-line-number="14"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb349-15" data-line-number="15"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb349-16" data-line-number="16">######</a> +<a class="sourceLine" id="cb349-17" data-line-number="17">#####</a> +<a class="sourceLine" id="cb349-18" data-line-number="18">#####</a> +<a class="sourceLine" id="cb349-19" data-line-number="19">###</a> +<a class="sourceLine" id="cb349-20" data-line-number="20">######</a> +<a class="sourceLine" id="cb349-21" data-line-number="21"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb349-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="cb350"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb350-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 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="cb349"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb349-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> -<a class="sourceLine" id="cb349-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> -<a class="sourceLine" id="cb349-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererHeadingOne{1}</a> -<a class="sourceLine" id="cb349-4" data-line-number="4"><span class="fu">\def</span>\markdownRendererHeadingTwo{2}</a> -<a class="sourceLine" id="cb349-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererHeadingThree{3}</a> -<a class="sourceLine" id="cb349-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererHeadingFour{4}</a> -<a class="sourceLine" id="cb349-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererHeadingFive{5}</a> -<a class="sourceLine" id="cb349-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererHeadingSix{6}</a> -<a class="sourceLine" id="cb349-9" data-line-number="9"><span class="fu">\starttext</span></a> -<a class="sourceLine" id="cb349-10" data-line-number="10"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb349-11" data-line-number="11">######</a> -<a class="sourceLine" id="cb349-12" data-line-number="12">#####</a> -<a class="sourceLine" id="cb349-13" data-line-number="13">#####</a> -<a class="sourceLine" id="cb349-14" data-line-number="14">###</a> -<a class="sourceLine" id="cb349-15" data-line-number="15">######</a> -<a class="sourceLine" id="cb349-16" data-line-number="16"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb349-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="cb350"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb350-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> +<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="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb351-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererInterblockSeparator{}</a> +<a class="sourceLine" id="cb351-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererHeadingOne{1}</a> +<a class="sourceLine" id="cb351-4" data-line-number="4"><span class="fu">\def</span>\markdownRendererHeadingTwo{2}</a> +<a class="sourceLine" id="cb351-5" data-line-number="5"><span class="fu">\def</span>\markdownRendererHeadingThree{3}</a> +<a class="sourceLine" id="cb351-6" data-line-number="6"><span class="fu">\def</span>\markdownRendererHeadingFour{4}</a> +<a class="sourceLine" id="cb351-7" data-line-number="7"><span class="fu">\def</span>\markdownRendererHeadingFive{5}</a> +<a class="sourceLine" id="cb351-8" data-line-number="8"><span class="fu">\def</span>\markdownRendererHeadingSix{6}</a> +<a class="sourceLine" id="cb351-9" data-line-number="9"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb351-10" data-line-number="10"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb351-11" data-line-number="11">######</a> +<a class="sourceLine" id="cb351-12" data-line-number="12">#####</a> +<a class="sourceLine" id="cb351-13" data-line-number="13">#####</a> +<a class="sourceLine" id="cb351-14" data-line-number="14">###</a> +<a class="sourceLine" id="cb351-15" data-line-number="15">######</a> +<a class="sourceLine" id="cb351-16" data-line-number="16"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb351-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="cb352"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb352-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> @@ -4938,18 +4938,18 @@ multiple paragraphs</li> <p>The <code>\markdownRendererHorizontalRule</code> macro represents a horizontal rule. The macro receives no arguments.</p> <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="cb351"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb351-1" data-line-number="1"><span class="fu">\input</span> markdown</a> -<a class="sourceLine" id="cb351-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererHorizontalRule{\vfil\break}</a> -<a class="sourceLine" id="cb351-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb351-4" data-line-number="4">This is the first page.</a> -<a class="sourceLine" id="cb351-5" data-line-number="5"></a> -<a class="sourceLine" id="cb351-6" data-line-number="6">***</a> -<a class="sourceLine" id="cb351-7" data-line-number="7"></a> -<a class="sourceLine" id="cb351-8" data-line-number="8">This is the second page.</a> -<a class="sourceLine" id="cb351-9" data-line-number="9"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb351-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="cb352"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb352-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> +<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">\input</span> markdown</a> +<a class="sourceLine" id="cb353-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererHorizontalRule{\vfil\break}</a> +<a class="sourceLine" id="cb353-3" data-line-number="3"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb353-4" data-line-number="4">This is the first page.</a> +<a class="sourceLine" id="cb353-5" data-line-number="5"></a> +<a class="sourceLine" id="cb353-6" data-line-number="6">***</a> +<a class="sourceLine" id="cb353-7" data-line-number="7"></a> +<a class="sourceLine" id="cb353-8" data-line-number="8">This is the second page.</a> +<a class="sourceLine" id="cb353-9" data-line-number="9"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb353-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="cb354"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb354-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> @@ -4958,24 +4958,24 @@ multiple paragraphs</li> </blockquote> <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="cb353"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb353-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb353-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb353-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> -<a class="sourceLine" id="cb353-4" data-line-number="4"> renderers = {</a> -<a class="sourceLine" id="cb353-5" data-line-number="5"> horizontalRule = <span class="fu">\newpage</span>,</a> -<a class="sourceLine" id="cb353-6" data-line-number="6"> },</a> -<a class="sourceLine" id="cb353-7" data-line-number="7">}</a> -<a class="sourceLine" id="cb353-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb353-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb353-10" data-line-number="10">This is the first page.</a> -<a class="sourceLine" id="cb353-11" data-line-number="11"></a> -<a class="sourceLine" id="cb353-12" data-line-number="12">***</a> -<a class="sourceLine" id="cb353-13" data-line-number="13"></a> -<a class="sourceLine" id="cb353-14" data-line-number="14">This is the second page.</a> -<a class="sourceLine" id="cb353-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb353-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="cb354"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb354-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> +<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">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb355-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb355-5" data-line-number="5"> horizontalRule = <span class="fu">\newpage</span>,</a> +<a class="sourceLine" id="cb355-6" data-line-number="6"> },</a> +<a class="sourceLine" id="cb355-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb355-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb355-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb355-10" data-line-number="10">This is the first page.</a> +<a class="sourceLine" id="cb355-11" data-line-number="11"></a> +<a class="sourceLine" id="cb355-12" data-line-number="12">***</a> +<a class="sourceLine" id="cb355-13" data-line-number="13"></a> +<a class="sourceLine" id="cb355-14" data-line-number="14">This is the second page.</a> +<a class="sourceLine" id="cb355-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb355-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="cb356"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb356-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> @@ -4984,19 +4984,19 @@ multiple paragraphs</li> </blockquote> <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="cb355"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb355-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> -<a class="sourceLine" id="cb355-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererHorizontalRule{\page[yes]}</a> -<a class="sourceLine" id="cb355-3" data-line-number="3"><span class="fu">\starttext</span></a> -<a class="sourceLine" id="cb355-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb355-5" data-line-number="5">This is the first page.</a> -<a class="sourceLine" id="cb355-6" data-line-number="6"></a> -<a class="sourceLine" id="cb355-7" data-line-number="7">***</a> -<a class="sourceLine" id="cb355-8" data-line-number="8"></a> -<a class="sourceLine" id="cb355-9" data-line-number="9">This is the second page.</a> -<a class="sourceLine" id="cb355-10" data-line-number="10"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb355-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="cb356"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb356-1" data-line-number="1"><span class="ex">context</span> document.tex</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"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb357-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererHorizontalRule{\page[yes]}</a> +<a class="sourceLine" id="cb357-3" data-line-number="3"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb357-4" data-line-number="4"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb357-5" data-line-number="5">This is the first page.</a> +<a class="sourceLine" id="cb357-6" data-line-number="6"></a> +<a class="sourceLine" id="cb357-7" data-line-number="7">***</a> +<a class="sourceLine" id="cb357-8" data-line-number="8"></a> +<a class="sourceLine" id="cb357-9" data-line-number="9">This is the second page.</a> +<a class="sourceLine" id="cb357-10" data-line-number="10"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb357-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="cb358"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb358-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> @@ -5007,63 +5007,63 @@ multiple paragraphs</li> <p>The <code>\markdownRendererFootnote</code> macro represents a footnote. This macro will only be produced, when the <strong><code>footnotes</code></strong> option is <code>true</code>. The macro receives a single argument that corresponds to the footnote text.</p> <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="cb357"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb357-1" data-line-number="1"><span class="fu">\input</span> markdown</a> -<a class="sourceLine" id="cb357-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFootnotes{true}</a> -<a class="sourceLine" id="cb357-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererFootnote#1{ (and \lowercase{#1})}</a> -<a class="sourceLine" id="cb357-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb357-5" data-line-number="5">This is some text[^1] and this is some other text[^2].</a> -<a class="sourceLine" id="cb357-6" data-line-number="6"></a> -<a class="sourceLine" id="cb357-7" data-line-number="7"> [^1]: this is a footnote</a> -<a class="sourceLine" id="cb357-8" data-line-number="8"></a> -<a class="sourceLine" id="cb357-9" data-line-number="9"> [^2]: this is some other footnote</a> -<a class="sourceLine" id="cb357-10" data-line-number="10"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb357-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="cb358"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb358-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> +<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>\markdownOptionFootnotes{true}</a> +<a class="sourceLine" id="cb359-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererFootnote#1{ (and \lowercase{#1})}</a> +<a class="sourceLine" id="cb359-4" data-line-number="4"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb359-5" data-line-number="5">This is some text[^1] and this is some other text[^2].</a> +<a class="sourceLine" id="cb359-6" data-line-number="6"></a> +<a class="sourceLine" id="cb359-7" data-line-number="7"> [^1]: this is a footnote</a> +<a class="sourceLine" id="cb359-8" data-line-number="8"></a> +<a class="sourceLine" id="cb359-9" data-line-number="9"> [^2]: this is some other footnote</a> +<a class="sourceLine" id="cb359-10" data-line-number="10"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb359-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="cb360"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb360-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 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="cb359"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb359-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb359-2" data-line-number="2"><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb359-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> -<a class="sourceLine" id="cb359-4" data-line-number="4"> renderers = {</a> -<a class="sourceLine" id="cb359-5" data-line-number="5"> footnote = { (and <span class="fu">\MakeLowercase</span>{#1})},</a> -<a class="sourceLine" id="cb359-6" data-line-number="6"> },</a> -<a class="sourceLine" id="cb359-7" data-line-number="7">}</a> -<a class="sourceLine" id="cb359-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb359-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb359-10" data-line-number="10">This is some text[^1] and this is some other text[^2].</a> -<a class="sourceLine" id="cb359-11" data-line-number="11"></a> -<a class="sourceLine" id="cb359-12" data-line-number="12"> [^1]: this is a footnote</a> -<a class="sourceLine" id="cb359-13" data-line-number="13"></a> -<a class="sourceLine" id="cb359-14" data-line-number="14"> [^2]: this is some other footnote</a> -<a class="sourceLine" id="cb359-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb359-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="cb360"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb360-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> +<div class="sourceCode" id="cb361"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb361-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb361-2" data-line-number="2"><span class="bu">\usepackage</span>[footnotes]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb361-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb361-4" data-line-number="4"> renderers = {</a> +<a class="sourceLine" id="cb361-5" data-line-number="5"> footnote = { (and <span class="fu">\MakeLowercase</span>{#1})},</a> +<a class="sourceLine" id="cb361-6" data-line-number="6"> },</a> +<a class="sourceLine" id="cb361-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb361-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb361-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb361-10" data-line-number="10">This is some text[^1] and this is some other text[^2].</a> +<a class="sourceLine" id="cb361-11" data-line-number="11"></a> +<a class="sourceLine" id="cb361-12" data-line-number="12"> [^1]: this is a footnote</a> +<a class="sourceLine" id="cb361-13" data-line-number="13"></a> +<a class="sourceLine" id="cb361-14" data-line-number="14"> [^2]: this is some other footnote</a> +<a class="sourceLine" id="cb361-15" data-line-number="15"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb361-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="cb362"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb362-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 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="cb361"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb361-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> -<a class="sourceLine" id="cb361-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFootnotes{true}</a> -<a class="sourceLine" id="cb361-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererFootnote#1{ (and \lowercase{#1})}</a> -<a class="sourceLine" id="cb361-4" data-line-number="4"><span class="fu">\starttext</span></a> -<a class="sourceLine" id="cb361-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb361-6" data-line-number="6">This is some text[^1] and this is some other text[^2].</a> -<a class="sourceLine" id="cb361-7" data-line-number="7"></a> -<a class="sourceLine" id="cb361-8" data-line-number="8"> [^1]: this is a footnote</a> -<a class="sourceLine" id="cb361-9" data-line-number="9"></a> -<a class="sourceLine" id="cb361-10" data-line-number="10"> [^2]: this is some other footnote</a> -<a class="sourceLine" id="cb361-11" data-line-number="11"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb361-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="cb362"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb362-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> +<div class="sourceCode" id="cb363"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb363-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb363-2" data-line-number="2"><span class="fu">\def</span>\markdownOptionFootnotes{true}</a> +<a class="sourceLine" id="cb363-3" data-line-number="3"><span class="fu">\def</span>\markdownRendererFootnote#1{ (and \lowercase{#1})}</a> +<a class="sourceLine" id="cb363-4" data-line-number="4"><span class="fu">\starttext</span></a> +<a class="sourceLine" id="cb363-5" data-line-number="5"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb363-6" data-line-number="6">This is some text[^1] and this is some other text[^2].</a> +<a class="sourceLine" id="cb363-7" data-line-number="7"></a> +<a class="sourceLine" id="cb363-8" data-line-number="8"> [^1]: this is a footnote</a> +<a class="sourceLine" id="cb363-9" data-line-number="9"></a> +<a class="sourceLine" id="cb363-10" data-line-number="10"> [^2]: this is some other footnote</a> +<a class="sourceLine" id="cb363-11" data-line-number="11"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb363-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="cb364"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb364-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> @@ -5072,63 +5072,13 @@ multiple paragraphs</li> <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 <code>true</code>. The macro receives the parameter <code>{</code>â¨<em>number of citations</em>âŠ<code>}</code> followed by <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 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="cb363"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb363-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb363-2" data-line-number="2"><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb363-3" data-line-number="3"><span class="fu">\newcount\citationsCounter</span></a> -<a class="sourceLine" id="cb363-4" data-line-number="4"><span class="fu">\newcount\citationsTotal</span></a> -<a class="sourceLine" id="cb363-5" data-line-number="5"><span class="fu">\makeatletter</span></a> -<a class="sourceLine" id="cb363-6" data-line-number="6"><span class="fu">\def</span>\citations#1#2#3#4{<span class="co">%</span></a> -<a class="sourceLine" id="cb363-7" data-line-number="7"> a parenthesized citation \emph{#4}</a> -<a class="sourceLine" id="cb363-8" data-line-number="8"> \advance\citationsCounter by 1\relax</a> -<a class="sourceLine" id="cb363-9" data-line-number="9"> \ifx\relax#2\relax</a> -<a class="sourceLine" id="cb363-10" data-line-number="10"> \ifx\relax#3\relax\else</a> -<a class="sourceLine" id="cb363-11" data-line-number="11"> with a postfix \emph{#3}<span class="co">%</span></a> -<a class="sourceLine" id="cb363-12" data-line-number="12"> \fi</a> -<a class="sourceLine" id="cb363-13" data-line-number="13"> \else</a> -<a class="sourceLine" id="cb363-14" data-line-number="14"> with a prefix \emph{#2}<span class="co">%</span></a> -<a class="sourceLine" id="cb363-15" data-line-number="15"> \ifx\relax#3\relax\else</a> -<a class="sourceLine" id="cb363-16" data-line-number="16"> \ and a postfix \emph{#3}<span class="co">%</span></a> -<a class="sourceLine" id="cb363-17" data-line-number="17"> \fi</a> -<a class="sourceLine" id="cb363-18" data-line-number="18"> \fi</a> -<a class="sourceLine" id="cb363-19" data-line-number="19"> \ifnum\citationsCounter>\citationsTotal\relax</a> -<a class="sourceLine" id="cb363-20" data-line-number="20"> .<span class="co">%</span></a> -<a class="sourceLine" id="cb363-21" data-line-number="21"> \expandafter\@gobble</a> -<a class="sourceLine" id="cb363-22" data-line-number="22"> \else</a> -<a class="sourceLine" id="cb363-23" data-line-number="23"> , and</a> -<a class="sourceLine" id="cb363-24" data-line-number="24"> \fi\citations}</a> -<a class="sourceLine" id="cb363-25" data-line-number="25"><span class="fu">\makeatother</span></a> -<a class="sourceLine" id="cb363-26" data-line-number="26"><span class="fu">\markdownSetup</span>{</a> -<a class="sourceLine" id="cb363-27" data-line-number="27"> renderers = {</a> -<a class="sourceLine" id="cb363-28" data-line-number="28"> cite = {<span class="co">%</span></a> -<a class="sourceLine" id="cb363-29" data-line-number="29"> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></a> -<a class="sourceLine" id="cb363-30" data-line-number="30"> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></a> -<a class="sourceLine" id="cb363-31" data-line-number="31"> This is</a> -<a class="sourceLine" id="cb363-32" data-line-number="32"> <span class="fu">\expandafter\citations</span></a> -<a class="sourceLine" id="cb363-33" data-line-number="33"> },</a> -<a class="sourceLine" id="cb363-34" data-line-number="34"> },</a> -<a class="sourceLine" id="cb363-35" data-line-number="35">}</a> -<a class="sourceLine" id="cb363-36" data-line-number="36"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb363-37" data-line-number="37"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb363-38" data-line-number="38">[see @abrahams90, pp. 12; @eijkhout91, pp. 34]</a> -<a class="sourceLine" id="cb363-39" data-line-number="39"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb363-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="cb364"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb364-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 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 <code>true</code>. The macro receives parameters in the same format as the <code>\markdownRendererCite</code> macro.</p> -<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="cb365"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb365-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> <a class="sourceLine" id="cb365-2" data-line-number="2"><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</a> <a class="sourceLine" id="cb365-3" data-line-number="3"><span class="fu">\newcount\citationsCounter</span></a> <a class="sourceLine" id="cb365-4" data-line-number="4"><span class="fu">\newcount\citationsTotal</span></a> <a class="sourceLine" id="cb365-5" data-line-number="5"><span class="fu">\makeatletter</span></a> <a class="sourceLine" id="cb365-6" data-line-number="6"><span class="fu">\def</span>\citations#1#2#3#4{<span class="co">%</span></a> -<a class="sourceLine" id="cb365-7" data-line-number="7"> a text citation \emph{#4}</a> +<a class="sourceLine" id="cb365-7" data-line-number="7"> a parenthesized citation \emph{#4}</a> <a class="sourceLine" id="cb365-8" data-line-number="8"> \advance\citationsCounter by 1\relax</a> <a class="sourceLine" id="cb365-9" data-line-number="9"> \ifx\relax#2\relax</a> <a class="sourceLine" id="cb365-10" data-line-number="10"> \ifx\relax#3\relax\else</a> @@ -5149,7 +5099,7 @@ multiple paragraphs</li> <a class="sourceLine" id="cb365-25" data-line-number="25"><span class="fu">\makeatother</span></a> <a class="sourceLine" id="cb365-26" data-line-number="26"><span class="fu">\markdownSetup</span>{</a> <a class="sourceLine" id="cb365-27" data-line-number="27"> renderers = {</a> -<a class="sourceLine" id="cb365-28" data-line-number="28"> textCite = {<span class="co">%</span></a> +<a class="sourceLine" id="cb365-28" data-line-number="28"> cite = {<span class="co">%</span></a> <a class="sourceLine" id="cb365-29" data-line-number="29"> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></a> <a class="sourceLine" id="cb365-30" data-line-number="30"> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></a> <a class="sourceLine" id="cb365-31" data-line-number="31"> This is</a> @@ -5159,13 +5109,63 @@ multiple paragraphs</li> <a class="sourceLine" id="cb365-35" data-line-number="35">}</a> <a class="sourceLine" id="cb365-36" data-line-number="36"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> <a class="sourceLine" id="cb365-37" data-line-number="37"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb365-38" data-line-number="38">@abrahams90 [pp. 12; also @eijkhout91]</a> +<a class="sourceLine" id="cb365-38" data-line-number="38">[see @abrahams90, pp. 12; @eijkhout91, pp. 34]</a> <a class="sourceLine" id="cb365-39" data-line-number="39"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> <a class="sourceLine" id="cb365-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="cb366"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb366-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 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 <code>true</code>. The macro receives parameters in the same format as the <code>\markdownRendererCite</code> macro.</p> +<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="cb367"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb367-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb367-2" data-line-number="2"><span class="bu">\usepackage</span>[citations]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb367-3" data-line-number="3"><span class="fu">\newcount\citationsCounter</span></a> +<a class="sourceLine" id="cb367-4" data-line-number="4"><span class="fu">\newcount\citationsTotal</span></a> +<a class="sourceLine" id="cb367-5" data-line-number="5"><span class="fu">\makeatletter</span></a> +<a class="sourceLine" id="cb367-6" data-line-number="6"><span class="fu">\def</span>\citations#1#2#3#4{<span class="co">%</span></a> +<a class="sourceLine" id="cb367-7" data-line-number="7"> a text citation \emph{#4}</a> +<a class="sourceLine" id="cb367-8" data-line-number="8"> \advance\citationsCounter by 1\relax</a> +<a class="sourceLine" id="cb367-9" data-line-number="9"> \ifx\relax#2\relax</a> +<a class="sourceLine" id="cb367-10" data-line-number="10"> \ifx\relax#3\relax\else</a> +<a class="sourceLine" id="cb367-11" data-line-number="11"> with a postfix \emph{#3}<span class="co">%</span></a> +<a class="sourceLine" id="cb367-12" data-line-number="12"> \fi</a> +<a class="sourceLine" id="cb367-13" data-line-number="13"> \else</a> +<a class="sourceLine" id="cb367-14" data-line-number="14"> with a prefix \emph{#2}<span class="co">%</span></a> +<a class="sourceLine" id="cb367-15" data-line-number="15"> \ifx\relax#3\relax\else</a> +<a class="sourceLine" id="cb367-16" data-line-number="16"> \ and a postfix \emph{#3}<span class="co">%</span></a> +<a class="sourceLine" id="cb367-17" data-line-number="17"> \fi</a> +<a class="sourceLine" id="cb367-18" data-line-number="18"> \fi</a> +<a class="sourceLine" id="cb367-19" data-line-number="19"> \ifnum\citationsCounter>\citationsTotal\relax</a> +<a class="sourceLine" id="cb367-20" data-line-number="20"> .<span class="co">%</span></a> +<a class="sourceLine" id="cb367-21" data-line-number="21"> \expandafter\@gobble</a> +<a class="sourceLine" id="cb367-22" data-line-number="22"> \else</a> +<a class="sourceLine" id="cb367-23" data-line-number="23"> , and</a> +<a class="sourceLine" id="cb367-24" data-line-number="24"> \fi\citations}</a> +<a class="sourceLine" id="cb367-25" data-line-number="25"><span class="fu">\makeatother</span></a> +<a class="sourceLine" id="cb367-26" data-line-number="26"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb367-27" data-line-number="27"> renderers = {</a> +<a class="sourceLine" id="cb367-28" data-line-number="28"> textCite = {<span class="co">%</span></a> +<a class="sourceLine" id="cb367-29" data-line-number="29"> <span class="fu">\citationsCounter</span>=1<span class="co">%</span></a> +<a class="sourceLine" id="cb367-30" data-line-number="30"> <span class="fu">\citationsTotal</span>=#1<span class="co">%</span></a> +<a class="sourceLine" id="cb367-31" data-line-number="31"> This is</a> +<a class="sourceLine" id="cb367-32" data-line-number="32"> <span class="fu">\expandafter\citations</span></a> +<a class="sourceLine" id="cb367-33" data-line-number="33"> },</a> +<a class="sourceLine" id="cb367-34" data-line-number="34"> },</a> +<a class="sourceLine" id="cb367-35" data-line-number="35">}</a> +<a class="sourceLine" id="cb367-36" data-line-number="36"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb367-37" data-line-number="37"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb367-38" data-line-number="38">@abrahams90 [pp. 12; also @eijkhout91]</a> +<a class="sourceLine" id="cb367-39" data-line-number="39"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb367-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="cb368"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb368-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 id="table-renderer"><span class="header-section-number">2.3.1.21</span> Table Renderer</h4> @@ -5178,67 +5178,67 @@ multiple paragraphs</li> </ul> <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="cb367"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb367-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb367-2" data-line-number="2"><span class="bu">\usepackage</span>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb367-3" data-line-number="3"><span class="fu">\newcount\rowCounter</span></a> -<a class="sourceLine" id="cb367-4" data-line-number="4"><span class="fu">\newcount\columnCounter</span></a> -<a class="sourceLine" id="cb367-5" data-line-number="5"><span class="fu">\makeatletter</span></a> -<a class="sourceLine" id="cb367-6" data-line-number="6"><span class="fu">\def</span>\processRow#1{<span class="co">%</span></a> -<a class="sourceLine" id="cb367-7" data-line-number="7"> \columnCounter=1<span class="co">%</span></a> -<a class="sourceLine" id="cb367-8" data-line-number="8"> \ifnum\rowCounter=0\relax</a> -<a class="sourceLine" id="cb367-9" data-line-number="9"> As for the alignment,</a> -<a class="sourceLine" id="cb367-10" data-line-number="10"> \else</a> -<a class="sourceLine" id="cb367-11" data-line-number="11"> In row \the\rowCounter,</a> -<a class="sourceLine" id="cb367-12" data-line-number="12"> \fi</a> -<a class="sourceLine" id="cb367-13" data-line-number="13"> \processColumn#1</a> -<a class="sourceLine" id="cb367-14" data-line-number="14"> \advance\rowCounter by 1\relax</a> -<a class="sourceLine" id="cb367-15" data-line-number="15"> \ifnum\rowCounter>\rowTotal\relax</a> -<a class="sourceLine" id="cb367-16" data-line-number="16"> \expandafter\@gobble</a> -<a class="sourceLine" id="cb367-17" data-line-number="17"> \fi\processRow}<span class="co">%</span></a> -<a class="sourceLine" id="cb367-18" data-line-number="18"><span class="fu">\def</span>\processColumn#1{<span class="co">%</span></a> -<a class="sourceLine" id="cb367-19" data-line-number="19"> column number \the\columnCounter{}</a> -<a class="sourceLine" id="cb367-20" data-line-number="20"> \ifnum\rowCounter=0\relax</a> -<a class="sourceLine" id="cb367-21" data-line-number="21"> \if#1d{}has default alignment\fi</a> -<a class="sourceLine" id="cb367-22" data-line-number="22"> \if#1l{}is left-aligned\fi</a> -<a class="sourceLine" id="cb367-23" data-line-number="23"> \if#1c{}is centered\fi</a> -<a class="sourceLine" id="cb367-24" data-line-number="24"> \if#1r{}is right-aligned\fi</a> -<a class="sourceLine" id="cb367-25" data-line-number="25"> \else</a> -<a class="sourceLine" id="cb367-26" data-line-number="26"> says \emph{#1}<span class="co">%</span></a> -<a class="sourceLine" id="cb367-27" data-line-number="27"> \fi</a> -<a class="sourceLine" id="cb367-28" data-line-number="28"> \advance\columnCounter by 1\relax</a> -<a class="sourceLine" id="cb367-29" data-line-number="29"> \ifnum\columnCounter<\columnTotal\relax, \fi</a> -<a class="sourceLine" id="cb367-30" data-line-number="30"> \ifnum\columnCounter=\columnTotal\relax, and \fi</a> -<a class="sourceLine" id="cb367-31" data-line-number="31"> \ifnum\columnCounter>\columnTotal\relax</a> -<a class="sourceLine" id="cb367-32" data-line-number="32"> .\expandafter\@gobble</a> -<a class="sourceLine" id="cb367-33" data-line-number="33"> \fi\processColumn}<span class="co">%</span></a> -<a class="sourceLine" id="cb367-34" data-line-number="34"><span class="fu">\makeatother</span></a> -<a class="sourceLine" id="cb367-35" data-line-number="35"><span class="fu">\markdownSetup</span>{</a> -<a class="sourceLine" id="cb367-36" data-line-number="36"> renderers = {</a> -<a class="sourceLine" id="cb367-37" data-line-number="37"> table = {<span class="co">%</span></a> -<a class="sourceLine" id="cb367-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="cb367-39" data-line-number="39"> and #2 rows long.</a> -<a class="sourceLine" id="cb367-40" data-line-number="40"> <span class="fu">\rowCounter</span>=0<span class="co">%</span></a> -<a class="sourceLine" id="cb367-41" data-line-number="41"> <span class="fu">\def</span>\rowTotal{#2}<span class="co">%</span></a> -<a class="sourceLine" id="cb367-42" data-line-number="42"> <span class="fu">\def</span>\columnTotal{#3}<span class="co">%</span></a> -<a class="sourceLine" id="cb367-43" data-line-number="43"> <span class="fu">\processRow</span></a> -<a class="sourceLine" id="cb367-44" data-line-number="44"> },</a> -<a class="sourceLine" id="cb367-45" data-line-number="45"> },</a> -<a class="sourceLine" id="cb367-46" data-line-number="46">}</a> -<a class="sourceLine" id="cb367-47" data-line-number="47"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb367-48" data-line-number="48"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb367-49" data-line-number="49">| Right | Left | Default | Center |</a> -<a class="sourceLine" id="cb367-50" data-line-number="50">|------:|:-----|---------|:------:|</a> -<a class="sourceLine" id="cb367-51" data-line-number="51">| 12 | 12 | 12 | 12 |</a> -<a class="sourceLine" id="cb367-52" data-line-number="52">| 123 | 123 | 123 | 123 |</a> -<a class="sourceLine" id="cb367-53" data-line-number="53">| 1 | 1 | 1 | 1 |</a> -<a class="sourceLine" id="cb367-54" data-line-number="54"></a> -<a class="sourceLine" id="cb367-55" data-line-number="55"> : Demonstration of pipe table syntax</a> -<a class="sourceLine" id="cb367-56" data-line-number="56"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb367-57" data-line-number="57"><span class="kw">\end</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb367-58" data-line-number="58"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb367-59" data-line-number="59"><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="cb368"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb368-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> +<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>[pipeTables, tableCaptions]{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb369-3" data-line-number="3"><span class="fu">\newcount\rowCounter</span></a> +<a class="sourceLine" id="cb369-4" data-line-number="4"><span class="fu">\newcount\columnCounter</span></a> +<a class="sourceLine" id="cb369-5" data-line-number="5"><span class="fu">\makeatletter</span></a> +<a class="sourceLine" id="cb369-6" data-line-number="6"><span class="fu">\def</span>\processRow#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb369-7" data-line-number="7"> \columnCounter=1<span class="co">%</span></a> +<a class="sourceLine" id="cb369-8" data-line-number="8"> \ifnum\rowCounter=0\relax</a> +<a class="sourceLine" id="cb369-9" data-line-number="9"> As for the alignment,</a> +<a class="sourceLine" id="cb369-10" data-line-number="10"> \else</a> +<a class="sourceLine" id="cb369-11" data-line-number="11"> In row \the\rowCounter,</a> +<a class="sourceLine" id="cb369-12" data-line-number="12"> \fi</a> +<a class="sourceLine" id="cb369-13" data-line-number="13"> \processColumn#1</a> +<a class="sourceLine" id="cb369-14" data-line-number="14"> \advance\rowCounter by 1\relax</a> +<a class="sourceLine" id="cb369-15" data-line-number="15"> \ifnum\rowCounter>\rowTotal\relax</a> +<a class="sourceLine" id="cb369-16" data-line-number="16"> \expandafter\@gobble</a> +<a class="sourceLine" id="cb369-17" data-line-number="17"> \fi\processRow}<span class="co">%</span></a> +<a class="sourceLine" id="cb369-18" data-line-number="18"><span class="fu">\def</span>\processColumn#1{<span class="co">%</span></a> +<a class="sourceLine" id="cb369-19" data-line-number="19"> column number \the\columnCounter{}</a> +<a class="sourceLine" id="cb369-20" data-line-number="20"> \ifnum\rowCounter=0\relax</a> +<a class="sourceLine" id="cb369-21" data-line-number="21"> \if#1d{}has default alignment\fi</a> +<a class="sourceLine" id="cb369-22" data-line-number="22"> \if#1l{}is left-aligned\fi</a> +<a class="sourceLine" id="cb369-23" data-line-number="23"> \if#1c{}is centered\fi</a> +<a class="sourceLine" id="cb369-24" data-line-number="24"> \if#1r{}is right-aligned\fi</a> +<a class="sourceLine" id="cb369-25" data-line-number="25"> \else</a> +<a class="sourceLine" id="cb369-26" data-line-number="26"> says \emph{#1}<span class="co">%</span></a> +<a class="sourceLine" id="cb369-27" data-line-number="27"> \fi</a> +<a class="sourceLine" id="cb369-28" data-line-number="28"> \advance\columnCounter by 1\relax</a> +<a class="sourceLine" id="cb369-29" data-line-number="29"> \ifnum\columnCounter<\columnTotal\relax, \fi</a> +<a class="sourceLine" id="cb369-30" data-line-number="30"> \ifnum\columnCounter=\columnTotal\relax, and \fi</a> +<a class="sourceLine" id="cb369-31" data-line-number="31"> \ifnum\columnCounter>\columnTotal\relax</a> +<a class="sourceLine" id="cb369-32" data-line-number="32"> .\expandafter\@gobble</a> +<a class="sourceLine" id="cb369-33" data-line-number="33"> \fi\processColumn}<span class="co">%</span></a> +<a class="sourceLine" id="cb369-34" data-line-number="34"><span class="fu">\makeatother</span></a> +<a class="sourceLine" id="cb369-35" data-line-number="35"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb369-36" data-line-number="36"> renderers = {</a> +<a class="sourceLine" id="cb369-37" data-line-number="37"> table = {<span class="co">%</span></a> +<a class="sourceLine" id="cb369-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="cb369-39" data-line-number="39"> and #2 rows long.</a> +<a class="sourceLine" id="cb369-40" data-line-number="40"> <span class="fu">\rowCounter</span>=0<span class="co">%</span></a> +<a class="sourceLine" id="cb369-41" data-line-number="41"> <span class="fu">\def</span>\rowTotal{#2}<span class="co">%</span></a> +<a class="sourceLine" id="cb369-42" data-line-number="42"> <span class="fu">\def</span>\columnTotal{#3}<span class="co">%</span></a> +<a class="sourceLine" id="cb369-43" data-line-number="43"> <span class="fu">\processRow</span></a> +<a class="sourceLine" id="cb369-44" data-line-number="44"> },</a> +<a class="sourceLine" id="cb369-45" data-line-number="45"> },</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">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb369-48" data-line-number="48"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb369-49" data-line-number="49">| Right | Left | Default | Center |</a> +<a class="sourceLine" id="cb369-50" data-line-number="50">|------:|:-----|---------|:------:|</a> +<a class="sourceLine" id="cb369-51" data-line-number="51">| 12 | 12 | 12 | 12 |</a> +<a class="sourceLine" id="cb369-52" data-line-number="52">| 123 | 123 | 123 | 123 |</a> +<a class="sourceLine" id="cb369-53" data-line-number="53">| 1 | 1 | 1 | 1 |</a> +<a class="sourceLine" id="cb369-54" data-line-number="54"></a> +<a class="sourceLine" id="cb369-55" data-line-number="55"> : Demonstration of pipe table syntax</a> +<a class="sourceLine" id="cb369-56" data-line-number="56"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb369-57" data-line-number="57"><span class="kw">\end</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb369-58" data-line-number="58"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb369-59" data-line-number="59"><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 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> @@ -5247,23 +5247,23 @@ multiple paragraphs</li> <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 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="cb369"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb369-1" data-line-number="1"><span class="fu">\input</span> markdown</a> -<a class="sourceLine" id="cb369-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererTildePrototype{<span class="co">%</span></a> -<a class="sourceLine" id="cb369-3" data-line-number="3"> Packages can specify token renderer prototypes.<span class="co">%</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="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb369-6" data-line-number="6">~</a> -<a class="sourceLine" id="cb369-7" data-line-number="7"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb369-8" data-line-number="8"></a> -<a class="sourceLine" id="cb369-9" data-line-number="9"><span class="fu">\def</span>\markdownRendererTilde{<span class="co">%</span></a> -<a class="sourceLine" id="cb369-10" data-line-number="10"> User-defined token renderers take precedence.<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"><span class="fu">\markdownBegin</span></a> -<a class="sourceLine" id="cb369-13" data-line-number="13">~</a> -<a class="sourceLine" id="cb369-14" data-line-number="14"><span class="fu">\markdownEnd</span></a> -<a class="sourceLine" id="cb369-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="cb370"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb370-1" data-line-number="1"><span class="ex">luatex</span> document.tex</a></code></pre></div> +<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">\input</span> markdown</a> +<a class="sourceLine" id="cb371-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererTildePrototype{<span class="co">%</span></a> +<a class="sourceLine" id="cb371-3" data-line-number="3"> Packages can specify token renderer prototypes.<span class="co">%</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">\markdownBegin</span></a> +<a class="sourceLine" id="cb371-6" data-line-number="6">~</a> +<a class="sourceLine" id="cb371-7" data-line-number="7"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb371-8" data-line-number="8"></a> +<a class="sourceLine" id="cb371-9" data-line-number="9"><span class="fu">\def</span>\markdownRendererTilde{<span class="co">%</span></a> +<a class="sourceLine" id="cb371-10" data-line-number="10"> User-defined token renderers take precedence.<span class="co">%</span></a> +<a class="sourceLine" id="cb371-11" data-line-number="11">}</a> +<a class="sourceLine" id="cb371-12" data-line-number="12"><span class="fu">\markdownBegin</span></a> +<a class="sourceLine" id="cb371-13" data-line-number="13">~</a> +<a class="sourceLine" id="cb371-14" data-line-number="14"><span class="fu">\markdownEnd</span></a> +<a class="sourceLine" id="cb371-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="cb372"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb372-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> @@ -5271,28 +5271,28 @@ multiple paragraphs</li> </blockquote> <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="cb371"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb371-1" data-line-number="1"><span class="bu">\documentclass</span>{<span class="ex">article</span>}</a> -<a class="sourceLine" id="cb371-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb371-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> -<a class="sourceLine" id="cb371-4" data-line-number="4"> rendererPrototypes = {</a> -<a class="sourceLine" id="cb371-5" data-line-number="5"> tilde = {Packages can specify token renderer prototypes.},</a> -<a class="sourceLine" id="cb371-6" data-line-number="6"> },</a> -<a class="sourceLine" id="cb371-7" data-line-number="7">}</a> -<a class="sourceLine" id="cb371-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> -<a class="sourceLine" id="cb371-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> -<a class="sourceLine" id="cb371-10" data-line-number="10">~</a> -<a class="sourceLine" id="cb371-11" data-line-number="11"><span class="kw">\end</span>{<span class="ex">markdown</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="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> -<a class="sourceLine" id="cb371-14" data-line-number="14"> renderers = {</a> -<a class="sourceLine" id="cb371-15" data-line-number="15"> tilde = {User-defined token renderers take precedence.},</a> -<a class="sourceLine" id="cb371-16" data-line-number="16"> },</a> -<a class="sourceLine" id="cb371-17" data-line-number="17">}</a> -<a class="sourceLine" id="cb371-18" data-line-number="18">~</a> -<a class="sourceLine" id="cb371-19" data-line-number="19"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> -<a class="sourceLine" id="cb371-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="cb372"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb372-1" data-line-number="1"><span class="ex">lualatex</span> document.tex</a></code></pre></div> +<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="bu">\documentclass</span>{<span class="ex">article</span>}</a> +<a class="sourceLine" id="cb373-2" data-line-number="2"><span class="bu">\usepackage</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb373-3" data-line-number="3"><span class="fu">\markdownSetup</span>{</a> +<a class="sourceLine" id="cb373-4" data-line-number="4"> rendererPrototypes = {</a> +<a class="sourceLine" id="cb373-5" data-line-number="5"> tilde = {Packages can specify token renderer prototypes.},</a> +<a class="sourceLine" id="cb373-6" data-line-number="6"> },</a> +<a class="sourceLine" id="cb373-7" data-line-number="7">}</a> +<a class="sourceLine" id="cb373-8" data-line-number="8"><span class="kw">\begin</span>{<span class="ex">document</span>}</a> +<a class="sourceLine" id="cb373-9" data-line-number="9"><span class="kw">\begin</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb373-10" data-line-number="10">~</a> +<a class="sourceLine" id="cb373-11" data-line-number="11"><span class="kw">\end</span>{<span class="ex">markdown</span>}</a> +<a class="sourceLine" id="cb373-12" data-line-number="12"></a> +<a class="sourceLine" id="cb373-13" data-line-number="13"><span class="kw">\begin</span>{<span class="ex">markdown*</span>}{</a> +<a class="sourceLine" id="cb373-14" data-line-number="14"> renderers = {</a> +<a class="sourceLine" id="cb373-15" data-line-number="15"> tilde = {User-defined token renderers take precedence.},</a> +<a class="sourceLine" id="cb373-16" data-line-number="16"> },</a> +<a class="sourceLine" id="cb373-17" data-line-number="17">}</a> +<a class="sourceLine" id="cb373-18" data-line-number="18">~</a> +<a class="sourceLine" id="cb373-19" data-line-number="19"><span class="kw">\end</span>{<span class="ex">markdown*</span>}</a> +<a class="sourceLine" id="cb373-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="cb374"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb374-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> @@ -5300,24 +5300,24 @@ multiple paragraphs</li> </blockquote> <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="cb373"><pre class="sourceCode tex"><code class="sourceCode latex"><a class="sourceLine" id="cb373-1" data-line-number="1"><span class="fu">\usemodule</span>[t][markdown]</a> -<a class="sourceLine" id="cb373-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererTildePrototype{<span class="co">%</span></a> -<a class="sourceLine" id="cb373-3" data-line-number="3"> Packages can specify token renderer prototypes.<span class="co">%</span></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">\starttext</span></a> -<a class="sourceLine" id="cb373-6" data-line-number="6"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb373-7" data-line-number="7">~</a> -<a class="sourceLine" id="cb373-8" data-line-number="8"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb373-9" data-line-number="9"></a> -<a class="sourceLine" id="cb373-10" data-line-number="10"><span class="fu">\def</span>\markdownRendererTilde{<span class="co">%</span></a> -<a class="sourceLine" id="cb373-11" data-line-number="11"> User-defined token renderers take precedence.<span class="co">%</span></a> -<a class="sourceLine" id="cb373-12" data-line-number="12">}</a> -<a class="sourceLine" id="cb373-13" data-line-number="13"><span class="fu">\startmarkdown</span></a> -<a class="sourceLine" id="cb373-14" data-line-number="14">~</a> -<a class="sourceLine" id="cb373-15" data-line-number="15"><span class="fu">\stopmarkdown</span></a> -<a class="sourceLine" id="cb373-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="cb374"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb374-1" data-line-number="1"><span class="ex">context</span> document.tex</a></code></pre></div> +<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="fu">\usemodule</span>[t][markdown]</a> +<a class="sourceLine" id="cb375-2" data-line-number="2"><span class="fu">\def</span>\markdownRendererTildePrototype{<span class="co">%</span></a> +<a class="sourceLine" id="cb375-3" data-line-number="3"> Packages can specify token renderer prototypes.<span class="co">%</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="fu">\starttext</span></a> +<a class="sourceLine" id="cb375-6" data-line-number="6"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb375-7" data-line-number="7">~</a> +<a class="sourceLine" id="cb375-8" data-line-number="8"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb375-9" data-line-number="9"></a> +<a class="sourceLine" id="cb375-10" data-line-number="10"><span class="fu">\def</span>\markdownRendererTilde{<span class="co">%</span></a> +<a class="sourceLine" id="cb375-11" data-line-number="11"> User-defined token renderers take precedence.<span class="co">%</span></a> +<a class="sourceLine" id="cb375-12" data-line-number="12">}</a> +<a class="sourceLine" id="cb375-13" data-line-number="13"><span class="fu">\startmarkdown</span></a> +<a class="sourceLine" id="cb375-14" data-line-number="14">~</a> +<a class="sourceLine" id="cb375-15" data-line-number="15"><span class="fu">\stopmarkdown</span></a> +<a class="sourceLine" id="cb375-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="cb376"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb376-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> diff --git a/Master/texmf-dist/doc/generic/markdown/markdown.md b/Master/texmf-dist/doc/generic/markdown/markdown.md index ddd8c67dcdb..2a184c3f258 100644 --- a/Master/texmf-dist/doc/generic/markdown/markdown.md +++ b/Master/texmf-dist/doc/generic/markdown/markdown.md @@ -14,8 +14,9 @@ The [Markdown package][pkg] converts [markdown][] markup to \TeX{} commands. The functionality is provided both as a Lua module and as plain \TeX{}, \LaTeX{}, and \Hologo{ConTeXt} macro packages that can be used to directly typeset \TeX documents containing markdown markup. Unlike other convertors, the Markdown package -makes it easy to redefine how each and every markdown element is rendered. -Creative abuse of the markdown syntax is encouraged. ;-) +does not require any external programs, and makes it easy to redefine how each +and every markdown element is rendered. Creative abuse of the markdown +syntax is encouraged. ;-) [markdown]: https://daringfireball.net/projects/markdown/basics/ (Daring Fireball: Markdown Basics) diff --git a/Master/texmf-dist/doc/generic/markdown/markdown.pdf b/Master/texmf-dist/doc/generic/markdown/markdown.pdf Binary files differindex d166468833e..4d8394cebd3 100644 --- a/Master/texmf-dist/doc/generic/markdown/markdown.pdf +++ b/Master/texmf-dist/doc/generic/markdown/markdown.pdf diff --git a/Master/texmf-dist/doc/latex/markdown/examples/example.md b/Master/texmf-dist/doc/latex/markdown/examples/example.md index 8aeb423a204..f0be0cddfab 100644 --- a/Master/texmf-dist/doc/latex/markdown/examples/example.md +++ b/Master/texmf-dist/doc/latex/markdown/examples/example.md @@ -15,7 +15,7 @@ This is a text paragraph containing an ellipsis ... and followed by a horizontal This is inline `code`. This is a [link](http://google.cz "Google"). _This is an *emphasized* span of text_. __This is a **strongly emphasized** span of text__. - ![example image](example-image.pdf "An example image from Martin Scharrer's mwe package") + ![example image](example-image.png "An example image from Martin Scharrer's mwe package") /scientists.csv (The great minds of the 19th century rendered via a content block) diff --git a/Master/texmf-dist/scripts/markdown/markdown-cli.lua b/Master/texmf-dist/scripts/markdown/markdown-cli.lua index 96a06753132..6f6d10091b7 100644 --- a/Master/texmf-dist/scripts/markdown/markdown-cli.lua +++ b/Master/texmf-dist/scripts/markdown/markdown-cli.lua @@ -20,7 +20,7 @@ -- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- --- Copyright (C) 2016-2019 VĂt NovotnĂ˝ +-- Copyright (C) 2016-2020 VĂt NovotnĂ˝ -- -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -58,11 +58,11 @@ -- those in the standard .ins files. -- local metadata = { - version = "2.8.1", + version = "2.8.2", 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", - "2016-2019 VĂt NovotnĂ˝"}, + "2016-2020 VĂt NovotnĂ˝"}, license = "LPPL 1.3" } @@ -190,7 +190,7 @@ if metadata.version ~= md.metadata.version then "markdown.lua " .. md.metadata.version .. ".") end local convert = md.new(options) -local output = convert(input:gsub("\r\n?", "\n")) +local output = convert(input:gsub("\r\n?", "\n") .. "\n") if output_filename then local output_file = io.open(output_filename, "w") diff --git a/Master/texmf-dist/source/generic/markdown/docstrip.cfg b/Master/texmf-dist/source/generic/markdown/docstrip.cfg index a03b51c87b3..60f15d39350 100644 --- a/Master/texmf-dist/source/generic/markdown/docstrip.cfg +++ b/Master/texmf-dist/source/generic/markdown/docstrip.cfg @@ -22,7 +22,7 @@ -- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE^^J% -- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.^^J% -- ^^J% --- Copyright (C) 2016-2019 VĂt NovotnĂ˝^^J% +-- Copyright (C) 2016-2020 VĂt NovotnĂ˝^^J% -- ^^J% -- This work may be distributed and/or modified under the^^J% -- conditions of the LaTeX Project Public License, either version 1.3^^J% @@ -62,7 +62,7 @@ \let\luapostamble\empty \declarepreamble\texpreamble -Copyright (C) 2016-2019 VĂt NovotnĂ˝ +Copyright (C) 2016-2020 VĂt NovotnĂ˝ This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/source/generic/markdown/markdown.dtx b/Master/texmf-dist/source/generic/markdown/markdown.dtx index 71c06b81544..0cf9f4f9ace 100644 --- a/Master/texmf-dist/source/generic/markdown/markdown.dtx +++ b/Master/texmf-dist/source/generic/markdown/markdown.dtx @@ -535,8 +535,9 @@ The [Markdown package][pkg] converts [markdown][] markup to \TeX{} commands. The functionality is provided both as a Lua module and as plain \TeX{}, \LaTeX{}, and \Hologo{ConTeXt} macro packages that can be used to directly typeset \TeX documents containing markdown markup. Unlike other convertors, the Markdown package -makes it easy to redefine how each and every markdown element is rendered. -Creative abuse of the markdown syntax is encouraged. ;-) +does not require any external programs, and makes it easy to redefine how each +and every markdown element is rendered. Creative abuse of the markdown +syntax is encouraged. ;-) [markdown]: https://daringfireball.net/projects/markdown/basics/ (Daring Fireball: Markdown Basics) @@ -569,11 +570,11 @@ documentation][techdoc]. % \fi % \begin{macrocode} local metadata = { - version = "2.8.1", + version = "2.8.2", 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", - "2016-2019 VĂt NovotnĂ˝"}, + "2016-2020 VĂt NovotnĂ˝"}, license = "LPPL 1.3" } @@ -5659,8 +5660,8 @@ pdftex --shell-escape document.tex % % \end{markdown} % \begin{macrocode} -\def\markdownLastModified{2019/04/30}% -\def\markdownVersion{2.8.1}% +\def\markdownLastModified{2020/03/20}% +\def\markdownVersion{2.8.2}% % \end{macrocode} % \par % \begin{markdown} @@ -5796,7 +5797,7 @@ interfaces. % of the document being typeset. % % The expansion of this macro must not contain quotation marks (`"`) or -% backslash symbols (`extbackslash`). Mind that \TeX{} engines tend to +% backslash symbols (`\`). Mind that \TeX{} engines tend to % put quotation marks around \m{jobname}, when it contains spaces. % % \end{markdown} @@ -6939,6 +6940,8 @@ following content: \catcode`\^^A=14 \global\def\markdownRendererImage#1#2#3#4{^^A \immediate\write18{^^A +``` +``` sh if printf '%s' "#3" | grep -q ^http; then OUTPUT="$(printf '%s' "#3" | md5sum | cut -d' ' -f1).^^A $(printf '%s' "#3" | sed 's/.*[.]//')"; @@ -6950,6 +6953,8 @@ following content: else printf '%s%%' "#3" > \jobname.fetched; fi^^A +``` +``` tex }^^A {^^A \everyeof={\noexpand}^^A @@ -13701,6 +13706,7 @@ function M.writer.new(options) % \begin{macrocode} function self.verbatim(s) if not self.is_writing then return "" end + s = string.gsub(s, '[\r\n%s]*$', '') local name = util.cache(options.cacheDir, s, nil, nil, ".verbatim") return {"\\markdownRendererInputVerbatim{",name,"}"} end @@ -13716,6 +13722,7 @@ function M.writer.new(options) % \begin{macrocode} function self.fencedCode(i, s) if not self.is_writing then return "" end + s = string.gsub(s, '[\r\n%s]*$', '') local name = util.cache(options.cacheDir, s, nil, nil, ".verbatim") return {"\\markdownRendererInputFencedCode{",name,"}{",i,"}"} end @@ -14978,7 +14985,8 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline % % \end{markdown} % \begin{macrocode} - larsers.Str = parsers.normalchar^1 / writer.string + larsers.Str = (parsers.normalchar * (parsers.normalchar + parsers.at)^0) + / writer.string larsers.Symbol = (parsers.specialchar - parsers.tightblocksep) / writer.string @@ -15650,7 +15658,14 @@ if metadata.version ~= md.metadata.version then "markdown.lua " .. md.metadata.version .. ".") end local convert = md.new(options) -local output = convert(input:gsub("\r\n?", "\n")) +% \end{macrocode} +% \begin{markdown} +% Since the Lua converter expects \acro{unix} line endings, normalize the +% input. Also add a line ending at the end of the file in case the input file +% has none. +% \end{markdown} +% \begin{macrocode} +local output = convert(input:gsub("\r\n?", "\n") .. "\n") if output_filename then local output_file = io.open(output_filename, "w") @@ -16016,7 +16031,10 @@ local convert = md.new(\markdownLuaOptions) |markdownInfo{The ending token sequence was found}@ |immediate|closeout|markdownOutputFileStream@ |endgroup@ - |markdownInput|markdownOptionInputTempFileName@ + |markdownInput{@ + |markdownOptionOutputDir@ + /|markdownOptionInputTempFileName@ + }@ #2}@ |fi@ % \end{macrocode} @@ -16285,16 +16303,15 @@ local convert = md.new(\markdownLuaOptions) |closein|markdownInputFileStream |markdownLuaExecute{% |markdownPrepare - local input = assert(io.open("% - |markdownOptionOutputDir - /#1", "r"):read("*a")) + local input = assert(io.open("#1", "r"):read("*a")) % \end{macrocode} % \begin{markdown} % Since the Lua converter expects \acro{unix} line endings, normalize the -% input. +% input. Also add a line ending at the end of the file in case the input file +% has none. % \end{markdown} % \begin{macrocode} - print(convert(input:gsub("\r\n?", "\n")))}}% + print(convert(input:gsub("\r\n?", "\n") .. "\n"))}}% |endgroup % \end{macrocode} % \iffalse diff --git a/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex b/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex index bba5f689d01..c7a27aedf3c 100644 --- a/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex +++ b/Master/texmf-dist/tex/context/third/markdown/t-markdown.tex @@ -6,7 +6,7 @@ %% %% markdown.dtx (with options: `context') %% -%% Copyright (C) 2016-2019 VĂt NovotnĂ˝ +%% Copyright (C) 2016-2020 VĂt NovotnĂ˝ %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/generic/markdown/markdown.tex b/Master/texmf-dist/tex/generic/markdown/markdown.tex index cf53a16eefe..9e2083313cf 100644 --- a/Master/texmf-dist/tex/generic/markdown/markdown.tex +++ b/Master/texmf-dist/tex/generic/markdown/markdown.tex @@ -6,7 +6,7 @@ %% %% markdown.dtx (with options: `tex') %% -%% Copyright (C) 2016-2019 VĂt NovotnĂ˝ +%% Copyright (C) 2016-2020 VĂt NovotnĂ˝ %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -45,8 +45,8 @@ %% %% The names of the source files used are shown above. %% -\def\markdownLastModified{2019/04/30}% -\def\markdownVersion{2.8.1}% +\def\markdownLastModified{2020/03/20}% +\def\markdownVersion{2.8.2}% \let\markdownBegin\relax \let\markdownEnd\relax \let\markdownInput\relax @@ -496,7 +496,10 @@ local convert = md.new(\markdownLuaOptions) |markdownInfo{The ending token sequence was found}@ |immediate|closeout|markdownOutputFileStream@ |endgroup@ - |markdownInput|markdownOptionInputTempFileName@ + |markdownInput{@ + |markdownOptionOutputDir@ + /|markdownOptionInputTempFileName@ + }@ #2}@ |fi@ ^^M}@ @@ -593,10 +596,8 @@ local convert = md.new(\markdownLuaOptions) |closein|markdownInputFileStream |markdownLuaExecute{% |markdownPrepare - local input = assert(io.open("% - |markdownOptionOutputDir - /#1", "r"):read("*a")) - print(convert(input:gsub("\r\n?", "\n")))}}% + local input = assert(io.open("#1", "r"):read("*a")) + print(convert(input:gsub("\r\n?", "\n") .. "\n"))}}% |endgroup \endinput %% diff --git a/Master/texmf-dist/tex/latex/markdown/markdown.sty b/Master/texmf-dist/tex/latex/markdown/markdown.sty index 301434928a5..2a1e14dbe7f 100644 --- a/Master/texmf-dist/tex/latex/markdown/markdown.sty +++ b/Master/texmf-dist/tex/latex/markdown/markdown.sty @@ -6,7 +6,7 @@ %% %% markdown.dtx (with options: `latex') %% -%% Copyright (C) 2016-2019 VĂt NovotnĂ˝ +%% Copyright (C) 2016-2020 VĂt NovotnĂ˝ %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 diff --git a/Master/texmf-dist/tex/luatex/markdown/markdown.lua b/Master/texmf-dist/tex/luatex/markdown/markdown.lua index 3760928f9b8..36d2b611a78 100644 --- a/Master/texmf-dist/tex/luatex/markdown/markdown.lua +++ b/Master/texmf-dist/tex/luatex/markdown/markdown.lua @@ -20,7 +20,7 @@ -- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- --- Copyright (C) 2016-2019 VĂt NovotnĂ˝ +-- Copyright (C) 2016-2020 VĂt NovotnĂ˝ -- -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -58,11 +58,11 @@ -- those in the standard .ins files. -- local metadata = { - version = "2.8.1", + version = "2.8.2", 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", - "2016-2019 VĂt NovotnĂ˝"}, + "2016-2020 VĂt NovotnĂ˝"}, license = "LPPL 1.3" } @@ -2548,11 +2548,13 @@ function M.writer.new(options) end function self.verbatim(s) if not self.is_writing then return "" end + s = string.gsub(s, '[\r\n%s]*$', '') local name = util.cache(options.cacheDir, s, nil, nil, ".verbatim") return {"\\markdownRendererInputVerbatim{",name,"}"} end function self.fencedCode(i, s) if not self.is_writing then return "" end + s = string.gsub(s, '[\r\n%s]*$', '') local name = util.cache(options.cacheDir, s, nil, nil, ".verbatim") return {"\\markdownRendererInputFencedCode{",name,"}{",i,"}"} end @@ -3496,7 +3498,8 @@ larsers.PipeTable = Ct(larsers.table_row * parsers.newline end end end - larsers.Str = parsers.normalchar^1 / writer.string + larsers.Str = (parsers.normalchar * (parsers.normalchar + parsers.at)^0) + / writer.string larsers.Symbol = (parsers.specialchar - parsers.tightblocksep) / writer.string |